@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
35 lines • 2.21 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InventoryLocationBinListResponseSchema = exports.InventoryLocationBinResponseSchema = exports.BinListResponseSchema = exports.BinResponseSchema = exports.InventoryLocationBinListParamsSchema = exports.BinListParamsSchema = exports.UpdateBinRequestSchema = exports.CreateBinRequestSchema = exports.InventoryLocationBinSchema = exports.BinSchema = void 0;
const zod_1 = require("zod");
const schemas_1 = require("../../../core/schemas");
/** Bin - key field only, passthrough for API flexibility */
exports.BinSchema = zod_1.z.object({ binUid: zod_1.z.coerce.number() }).passthrough();
/** Inventory location bin - key field only, passthrough for API flexibility */
exports.InventoryLocationBinSchema = zod_1.z
.object({ invLocBinUid: zod_1.z.coerce.number() })
.passthrough();
/** Create bin request - passthrough for flexible input */
exports.CreateBinRequestSchema = zod_1.z.object({}).passthrough();
/** Update bin request - passthrough for flexible input */
exports.UpdateBinRequestSchema = zod_1.z.object({}).passthrough();
/** Bin list params - passthrough for flexible input */
exports.BinListParamsSchema = schemas_1.BaseGetParamsSchema.extend({
binType: zod_1.z.string().optional(),
isActive: zod_1.z.string().optional(),
zone: zod_1.z.string().optional(),
q: zod_1.z.string().optional(),
orderBy: zod_1.z.string().optional(),
});
/** Inventory location bin list params */
exports.InventoryLocationBinListParamsSchema = schemas_1.BaseGetParamsSchema.extend({
invMastUid: zod_1.z.coerce.number().optional(),
hasStock: zod_1.z.boolean().optional(),
orderBy: zod_1.z.string().optional(),
});
// Response Schemas
exports.BinResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.BinSchema);
exports.BinListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.BinSchema));
exports.InventoryLocationBinResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.InventoryLocationBinSchema);
exports.InventoryLocationBinListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.InventoryLocationBinSchema));
//# sourceMappingURL=bins.js.map