UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

85 lines 3.67 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createItemUomResource = createItemUomResource; exports.createItemUomDataResource = createItemUomDataResource; const schemas_1 = require("../schemas"); /** * Creates the itemUom resource methods * OpenAPI Path: /item-uom → itemUom.* * @description Methods for managing item units of measure (UOM) */ function createItemUomResource(executeRequest) { return { /** * List item units of measure * @description Retrieve a paginated list of item UOMs with filtering options * @fullPath api.items.itemUom.list * @service items * @domain inventory-management * @discoverable true * @dataMethod itemUomData.list * @searchTerms ["uom", "unit", "measure", "items", "inventory"] * @relatedEndpoints ["invMast.list", "attributes.list", "categories.list"] * @commonPatterns ["Get item units of measure", "List UOMs for items", "Filter UOMs by item"] * @workflow ["inventory-management", "product-configuration"] * @prerequisites ["Bearer token", "x-site-id header"] * @nextSteps ["Use UOM data for pricing calculations", "Configure item units"] * @businessRules ["Returns paginated results", "Supports filtering by item and unit of measure"] * @functionalArea "inventory-management" * @crossSite true * @caching "5 minutes - UOM data changes infrequently" * @performance "Fast - indexed lookup operation" */ list: async (params) => { return executeRequest({ method: 'GET', path: '/item-uom', paramsSchema: schemas_1.ItemUomListParamsSchema, responseSchema: schemas_1.ItemUomListResponseSchema, }, params); }, /** * Get item unit of measure details * @description Retrieve specific item UOM details by ID * @fullPath api.items.itemUom.get * @service items * @domain inventory-management * @discoverable true * @dataMethod itemUomData.get * @searchTerms ["uom", "unit", "measure", "details", "specific"] * @relatedEndpoints ["itemUom.list", "invMast.get", "attributes.get"] * @commonPatterns ["Get UOM details by ID", "Retrieve unit of measure information"] * @workflow ["inventory-management", "product-configuration"] * @prerequisites ["Valid itemUomUid", "Bearer token", "x-site-id header"] * @nextSteps ["Use UOM details for calculations", "Update item configurations"] * @businessRules ["Returns single UOM record", "Must provide valid itemUomUid"] * @functionalArea "inventory-management" * @crossSite true * @caching "5 minutes - UOM data changes infrequently" * @performance "Very fast - direct ID lookup" */ get: async (itemUomUid) => { return executeRequest({ method: 'GET', path: `/item-uom/${itemUomUid}`, responseSchema: schemas_1.ItemUomResponseSchema, }); }, }; } /** * Creates the itemUomData resource methods (data-only versions) */ function createItemUomDataResource(itemUom) { return { list: async (params) => { const response = await itemUom.list(params); return response.data; }, get: async (itemUomUid) => { const response = await itemUom.get(itemUomUid); return response.data; }, }; } //# sourceMappingURL=item-uom.js.map