@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
65 lines • 3.32 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEntityCustomersResource = createEntityCustomersResource;
exports.createEntityCustomersDataResource = createEntityCustomersDataResource;
const schemas_1 = require("../schemas");
/**
* Creates the entityCustomers resource methods
* OpenAPI Path: /entity-customers → entityCustomers.*
* @description Entity customers data refresh and synchronization following OpenAPI path mirroring pattern
*/
function createEntityCustomersResource(executeRequest) {
return {
/**
* Entity customers refresh operations - OpenAPI Path: /entity-customers/refresh
*/
refresh: {
/**
* Trigger entity customers data refresh for synchronization
* @description Initiates a data refresh operation for entity customers to synchronize with the P21 ERP system. Returns status of the refresh operation for monitoring and verification.
*
* @fullPath api.p21Apis.entityCustomers.refresh.get
* @service p21-apis
* @domain entity-data-management
* @dataMethod entityCustomersData.refresh.get
* @discoverable true
* @searchTerms ["entity customers", "data refresh", "synchronization", "customer sync", "entity sync"]
* @relatedEndpoints ["api.p21Apis.entityContacts.refresh.get", "api.p21Apis.healthCheck.get", "api.customers.customer.list"]
* @commonPatterns ["Refresh customer data", "Synchronize entity customers", "Trigger data sync", "Update customer information"]
* @workflow ["data-synchronization", "entity-refresh", "customer-management", "erp-sync"]
* @prerequisites ["Valid site ID", "Data refresh permissions", "Entity access rights"]
* @nextSteps ["api.customers.customer.list for customer details", "api.p21Core.company.list for company customers"]
* @businessRules ["Site-scoped refresh operations", "Asynchronous data synchronization", "Background processing for large datasets"]
* @functionalArea "entity-data-management"
* @performance "Asynchronous operation, returns immediately with status"
*/
get: async (params) => {
return executeRequest({
method: 'GET',
path: '/entity-customers/refresh',
paramsSchema: schemas_1.EntityCustomersRefreshParamsSchema,
responseSchema: schemas_1.EntityCustomersRefreshResponseSchema,
}, params || {});
},
},
};
}
/**
* Creates the entityCustomersData resource methods (data-only versions)
*/
function createEntityCustomersDataResource(entityCustomers) {
return {
refresh: {
/**
* Get only entity customers refresh data without response metadata
* @param params Site ID and refresh parameters
* @returns Promise<EntityRefreshData> Direct refresh result object
*/
get: async (params) => {
const response = await entityCustomers.refresh.get(params);
return response.data;
},
},
};
}
//# sourceMappingURL=entity-customers.js.map