UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

56 lines 2.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createInvLocResource = createInvLocResource; exports.createInvLocDataResource = createInvLocDataResource; const schemas_1 = require("../schemas"); /** * Creates the invLoc resource methods * OpenAPI Path: /inv-loc → invLoc.* * @description Inventory Location endpoints */ function createInvLocResource(executeRequest) { return { /** * List inventory locations * @description Retrieve a paginated list of inventory location records * @fullPath api.items.invLoc.list * @service items * @domain inventory-management * @dataMethod invLocData.list * @discoverable true * @searchTerms ["inventory locations", "inv loc", "stock locations", "warehouse locations"] * @relatedEndpoints ["api.items.invMast.list", "api.items.locations.bins.list"] * @commonPatterns ["List inventory by location", "Filter by invMastUid", "Pagination"] * @workflow ["inventory-management", "stock-tracking"] * @prerequisites ["Valid authentication", "Bearer token", "x-site-id header"] * @nextSteps ["Use invMastUid for item details", "Check stock levels"] * @businessRules ["Returns array of inv_loc records", "Supports filtering by invMastUid", "Supports pagination"] * @functionalArea "inventory-management" * @caching "Variable TTL based on cacheTtl parameter" * @performance "Good - supports filtering and pagination" * * @param params Optional filtering and pagination parameters * @returns Promise<InvLocListResponse> Complete response with inventory locations array */ list: async (params) => { return executeRequest({ method: 'GET', path: '/inv-loc', paramsSchema: schemas_1.InvLocListParamsSchema, responseSchema: schemas_1.InvLocListResponseSchema, }, params); }, }; } /** * Creates the invLocData resource methods (data-only versions) */ function createInvLocDataResource(invLoc) { return { list: async (params) => { const response = await invLoc.list(params); return response.data; }, }; } //# sourceMappingURL=inv-loc.js.map