@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
38 lines • 1.22 kB
JavaScript
import { CustomerListParamsSchema, CustomerListResponseSchema } from '../schemas';
/**
* Creates the customerList resource methods
* OpenAPI Path: /customer → customerList.*
* @description Customer listing operations
*/
export function createCustomerListResource(executeRequest) {
return {
/**
* List customers with pagination and filtering
* @fullPath api.customers.customerList.list
* @service customers
* @domain customer-management
* @dataMethod customerListData.list
* @discoverable true
*/
list: async (params) => {
return executeRequest({
method: 'GET',
path: '/customer',
paramsSchema: CustomerListParamsSchema,
responseSchema: CustomerListResponseSchema,
}, params);
},
};
}
/**
* Creates the customerListData resource methods (data-only versions)
*/
export function createCustomerListDataResource(customerList) {
return {
list: async (params) => {
const response = await customerList.list(params);
return response.data;
},
};
}
//# sourceMappingURL=customer-list.js.map