UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

61 lines 3.12 kB
import { EntityContactsRefreshParamsSchema, EntityContactsRefreshResponseSchema, } from '../schemas'; /** * Creates the entityContacts resource methods * OpenAPI Path: /entity-contacts → entityContacts.* * @description Entity contacts data refresh and synchronization following OpenAPI path mirroring pattern */ export function createEntityContactsResource(executeRequest) { return { /** * Entity contacts refresh operations - OpenAPI Path: /entity-contacts/refresh */ refresh: { /** * Trigger entity contacts data refresh for synchronization * @description Initiates a data refresh operation for entity contacts to synchronize with the P21 ERP system. Returns status of the refresh operation for monitoring and verification. * * @fullPath api.p21Apis.entityContacts.refresh.get * @service p21-apis * @domain entity-data-management * @dataMethod entityContactsData.refresh.get * @discoverable true * @searchTerms ["entity contacts", "data refresh", "synchronization", "contact sync", "entity sync"] * @relatedEndpoints ["api.p21Apis.entityCustomers.refresh.get", "api.p21Apis.healthCheck.get", "api.p21Core.address.list"] * @commonPatterns ["Refresh contact data", "Synchronize entity contacts", "Trigger data sync", "Update contact information"] * @workflow ["data-synchronization", "entity-refresh", "contact-management", "erp-sync"] * @prerequisites ["Valid site ID", "Data refresh permissions", "Entity access rights"] * @nextSteps ["api.p21Core.address.list for contact addresses", "api.customers.customer.list for customer contacts"] * @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-contacts/refresh', paramsSchema: EntityContactsRefreshParamsSchema, responseSchema: EntityContactsRefreshResponseSchema, }, params || {}); }, }, }; } /** * Creates the entityContactsData resource methods (data-only versions) */ export function createEntityContactsDataResource(entityContacts) { return { refresh: { /** * Get only entity contacts 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 entityContacts.refresh.get(params); return response.data; }, }, }; } //# sourceMappingURL=entity-contacts.js.map