UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

522 lines 21.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createInvMastResource = createInvMastResource; exports.createInvMastDataResource = createInvMastDataResource; const common_schemas_1 = require("../../../core/common-schemas"); const schemas_1 = require("../schemas"); /** * Creates the invMast resource methods * OpenAPI Path: /inv-mast → invMast.* * @description Inventory Master endpoints */ function createInvMastResource(executeRequest) { return { /** * List inventory masters * @description Retrieve a paginated list of inventory master items * @fullPath api.items.invMast.list * @service items * @domain inventory-management * @discoverable true */ list: async (params) => { return executeRequest({ method: 'GET', path: '/inv-mast', paramsSchema: schemas_1.ProductListParamsSchema, responseSchema: schemas_1.ProductListResponseSchema, }, params); }, /** * OpenAPI Path: /inv-mast/lookup → invMast.lookup.get * @description Lookup endpoint for inventory master */ lookup: { /** * Lookup inventory master items * @description Search for inventory master items using lookup functionality * @fullPath api.items.invMast.lookup.get * @service items * @domain inventory-management * @discoverable true */ get: async (params) => { return executeRequest({ method: 'GET', path: '/inv-mast/lookup', paramsSchema: schemas_1.InvMastLookupParamsSchema, responseSchema: schemas_1.InvMastLookupResponseSchema, }, params); }, }, /** * Get inventory master details * @description Retrieve specific inventory master item details * @fullPath api.items.invMast.get * @service items * @domain inventory-management * @discoverable true */ get: async (invMastUid) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}`, responseSchema: schemas_1.ProductResponseSchema, }); }, /** * OpenAPI Path: /inv-mast/{invMastUid}/alternate-code → invMast.alternateCode.list * @description Nested path for alternate codes */ alternateCode: { /** * List alternate codes for inventory master * @description Get alternate codes for a specific inventory master item * @fullPath api.items.invMast.alternateCode.list * @service items * @domain inventory-management * @discoverable true */ list: async (invMastUid) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/alternate-code`, responseSchema: schemas_1.AlternateCodeListResponseSchema, }); }, }, /** * OpenAPI Path: /inv-mast/{invMastUid}/attributes → invMast.attributes.* * @description Nested path for inventory master attributes */ attributes: { /** * List inventory master attributes * @description Get attributes for a specific inventory master item * @fullPath api.items.invMast.attributes.list * @service items * @domain inventory-management * @discoverable true */ list: async (invMastUid, params) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/attributes`, paramsSchema: common_schemas_1.StandardPaginationParamsSchema, responseSchema: schemas_1.ItemAttributeValueListResponseSchema, }, params); }, /** * Create inventory master attribute * @description Create attribute association for inventory master item * @fullPath api.items.invMast.attributes.create * @service items * @domain inventory-management * @discoverable true */ create: async (invMastUid, data) => { return executeRequest({ method: 'POST', path: `/inv-mast/${invMastUid}/attributes`, paramsSchema: schemas_1.CreateItemAttributeValueRequestSchema, responseSchema: schemas_1.ItemAttributeValueResponseSchema, }, data); }, /** * OpenAPI Path: /inv-mast/{invMastUid}/attributes/{attributeUid}/values → invMast.attributes.values.* * @description Deep nested path for inventory master attribute values */ values: { /** * List inventory master attribute values * @description Get attribute values for a specific attribute of an inventory master item * @fullPath api.items.invMast.attributes.values.list * @service items * @domain inventory-management * @discoverable true */ list: async (invMastUid, attributeUid, params) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/attributes/${attributeUid}/values`, paramsSchema: common_schemas_1.StandardPaginationParamsSchema, responseSchema: schemas_1.ItemAttributeValueListResponseSchema, }, params); }, /** * Create inventory master attribute value * @description Create attribute value for a specific attribute of an inventory master item * @fullPath api.items.invMast.attributes.values.create * @service items * @domain inventory-management * @discoverable true */ create: async (invMastUid, attributeUid, data) => { return executeRequest({ method: 'POST', path: `/inv-mast/${invMastUid}/attributes/${attributeUid}/values`, paramsSchema: schemas_1.CreateItemAttributeValueRequestSchema, responseSchema: schemas_1.ItemAttributeValueResponseSchema, }, data); }, /** * Update inventory master attribute value * @description Update attribute value for a specific attribute of an inventory master item * @fullPath api.items.invMast.attributes.values.update * @service items * @domain inventory-management * @discoverable true */ update: async (invMastUid, attributeUid, attributeValueUid, data) => { return executeRequest({ method: 'PUT', path: `/inv-mast/${invMastUid}/attributes/${attributeUid}/values/${attributeValueUid}`, paramsSchema: schemas_1.UpdateItemAttributeValueRequestSchema, responseSchema: schemas_1.ItemAttributeValueResponseSchema, }, data); }, /** * Delete inventory master attribute value * @description Delete attribute value for a specific attribute of an inventory master item * @fullPath api.items.invMast.attributes.values.delete * @service items * @domain inventory-management * @discoverable true */ delete: async (invMastUid, attributeUid, attributeValueUid) => { return executeRequest({ method: 'DELETE', path: `/inv-mast/${invMastUid}/attributes/${attributeUid}/values/${attributeValueUid}`, responseSchema: schemas_1.ItemAttributeValueResponseSchema, }); }, }, }, /** * OpenAPI Path: /inv-mast/{invMastUid}/doc → invMast.doc.list * @description Nested path for inventory master documents */ doc: { /** * List inventory master documents * @description Get documents for a specific inventory master item * @fullPath api.items.invMast.doc.list * @service items * @domain inventory-management * @discoverable true */ list: async (invMastUid, params) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/doc`, paramsSchema: schemas_1.InvMastDocParamsSchema, responseSchema: schemas_1.InvMastDocResponseSchema, }, params); }, }, /** * OpenAPI Path: /inv-mast/{invMastUid}/faq → invMast.faq.* * @description Nested path for inventory master FAQs */ faq: { /** * List inventory master FAQs * @description Get FAQs for a specific inventory master item * @fullPath api.items.invMast.faq.list * @service items * @domain inventory-management * @discoverable true */ list: async (invMastUid, params) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/faq`, paramsSchema: common_schemas_1.StandardPaginationParamsSchema, responseSchema: schemas_1.InvMastFaqListResponseSchema, }, params); }, /** * Create inventory master FAQ * @description Create FAQ for a specific inventory master item * @fullPath api.items.invMast.faq.create * @service items * @domain inventory-management * @discoverable true */ create: async (invMastUid, data) => { return executeRequest({ method: 'POST', path: `/inv-mast/${invMastUid}/faq`, paramsSchema: schemas_1.CreateInvMastFaqRequestSchema, responseSchema: schemas_1.InvMastFaqResponseSchema, }, data); }, /** * Get inventory master FAQ * @description Get specific FAQ for an inventory master item * @fullPath api.items.invMast.faq.get * @service items * @domain inventory-management * @discoverable true */ get: async (invMastUid, invMastFaqUid) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/faq/${invMastFaqUid}`, responseSchema: schemas_1.InvMastFaqResponseSchema, }); }, /** * Update inventory master FAQ * @description Update FAQ for a specific inventory master item * @fullPath api.items.invMast.faq.update * @service items * @domain inventory-management * @discoverable true */ update: async (invMastUid, invMastFaqUid, data) => { return executeRequest({ method: 'PUT', path: `/inv-mast/${invMastUid}/faq/${invMastFaqUid}`, paramsSchema: schemas_1.UpdateInvMastFaqRequestSchema, responseSchema: schemas_1.InvMastFaqResponseSchema, }, data); }, /** * Delete inventory master FAQ * @description Delete FAQ for a specific inventory master item * @fullPath api.items.invMast.faq.delete * @service items * @domain inventory-management * @discoverable true */ delete: async (invMastUid, invMastFaqUid) => { return executeRequest({ method: 'DELETE', path: `/inv-mast/${invMastUid}/faq/${invMastFaqUid}`, responseSchema: schemas_1.InvMastFaqResponseSchema, }); }, }, /** * OpenAPI Path: /inv-mast/{invMastUid}/inv-accessory → invMast.invAccessory.list * @description Nested path for inventory master accessories */ invAccessory: { /** * List inventory master accessories * @description Get accessories for a specific inventory master item * @fullPath api.items.invMast.invAccessory.list * @service items * @domain inventory-management * @discoverable true */ list: async (invMastUid) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/inv-accessory`, responseSchema: schemas_1.AccessoryListResponseSchema, }); }, }, /** * OpenAPI Path: /inv-mast/{invMastUid}/inv-sub → invMast.invSub.list * @description Nested path for inventory master sub items */ invSub: { /** * List inventory master sub items * @description Get sub items for a specific inventory master item * @fullPath api.items.invMast.invSub.list * @service items * @domain inventory-management * @discoverable true */ list: async (invMastUid) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/inv-sub`, responseSchema: schemas_1.InvMastSubPartsResponseSchema, }); }, }, /** * OpenAPI Path: /inv-mast/{invMastUid}/locations → invMast.locations.* * @description Deep nested path for inventory master locations */ locations: { /** * OpenAPI Path: /inv-mast/{invMastUid}/locations/{locationId}/bins → invMast.locations.bins.* * @description Deep nested path for inventory master location bins */ bins: { /** * List inventory master location bins * @description Get bins for a specific location of an inventory master item * @fullPath api.items.invMast.locations.bins.list * @service items * @domain inventory-management * @discoverable true */ list: async (invMastUid, locationId, params) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/locations/${locationId}/bins`, paramsSchema: schemas_1.InvMastLocationsBinsParamsSchema, responseSchema: schemas_1.InvMastLocationBinListResponseSchema, }, params); }, /** * Get inventory master location bin * @description Get specific bin for a location of an inventory master item * @fullPath api.items.invMast.locations.bins.get * @service items * @domain inventory-management * @discoverable true */ get: async (invMastUid, locationId, bin) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/locations/${locationId}/bins/${bin}`, responseSchema: schemas_1.InvMastLocationBinResponseSchema, }); }, }, }, /** * OpenAPI Path: /inv-mast/{invMastUid}/similar → invMast.similar.list * @description Nested path for similar inventory master items */ similar: { /** * List similar inventory master items * @description Get similar items for a specific inventory master item * @fullPath api.items.invMast.similar.list * @service items * @domain inventory-management * @discoverable true */ list: async (invMastUid) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/similar`, responseSchema: schemas_1.SimilarProductListResponseSchema, }); }, }, /** * OpenAPI Path: /inv-mast/{invMastUid}/stock → invMast.stock.get * @description Nested path for inventory master stock (single object) */ stock: { /** * Get inventory master stock information * @description Get stock information for a specific inventory master item * @fullPath api.items.invMast.stock.get * @service items * @domain inventory-management * @discoverable true */ get: async (invMastUid, params) => { return executeRequest({ method: 'GET', path: `/inv-mast/${invMastUid}/stock`, paramsSchema: schemas_1.GetStockParamsSchema, responseSchema: schemas_1.GetStockResponseSchema, }, params); }, }, }; } /** * Creates the invMastData resource methods (data-only versions) */ function createInvMastDataResource(invMast) { return { list: async (params) => { const response = await invMast.list(params); return response.data; }, lookup: { get: async (params) => { const response = await invMast.lookup.get(params); return response.data; }, }, get: async (invMastUid) => { const response = await invMast.get(invMastUid); return response.data; }, alternateCode: { list: async (invMastUid) => { const response = await invMast.alternateCode.list(invMastUid); return response.data; }, }, attributes: { list: async (invMastUid, params) => { const response = await invMast.attributes.list(invMastUid, params); return response.data; }, values: { list: async (invMastUid, attributeUid, params) => { const response = await invMast.attributes.values.list(invMastUid, attributeUid, params); return response.data; }, }, }, doc: { list: async (invMastUid, params) => { const response = await invMast.doc.list(invMastUid, params); return response.data; }, }, faq: { list: async (invMastUid, params) => { const response = await invMast.faq.list(invMastUid, params); return response.data; }, get: async (invMastUid, invMastFaqUid) => { const response = await invMast.faq.get(invMastUid, invMastFaqUid); return response.data; }, }, invAccessory: { list: async (invMastUid) => { const response = await invMast.invAccessory.list(invMastUid); return response.data; }, }, invSub: { list: async (invMastUid) => { const response = await invMast.invSub.list(invMastUid); return response.data; }, }, locations: { bins: { list: async (invMastUid, locationId, params) => { const response = await invMast.locations.bins.list(invMastUid, locationId, params); return response.data; }, get: async (invMastUid, locationId, bin) => { const response = await invMast.locations.bins.get(invMastUid, locationId, bin); return response.data; }, }, }, similar: { list: async (invMastUid) => { const response = await invMast.similar.list(invMastUid); return response.data; }, }, stock: { get: async (invMastUid, params) => { const response = await invMast.stock.get(invMastUid, params); return response.data; }, }, }; } //# sourceMappingURL=inv-mast.js.map