UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

24 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PriceEngineResponseSchema = exports.PriceEngineDataSchema = exports.PriceEngineParamsSchema = void 0; const zod_1 = require("zod"); const schemas_1 = require("../../../core/schemas"); // Price Engine Parameters Schema exports.PriceEngineParamsSchema = schemas_1.BaseGetParamsSchema.extend({ customerId: zod_1.z.number(), itemId: zod_1.z.string(), quantity: zod_1.z.number().optional(), shipToId: zod_1.z.number().optional(), unitOfMeasure: zod_1.z.string().optional(), companyId: zod_1.z.string().optional(), cacheTtl: zod_1.z.number().optional().default(0), }); // Price Engine Data Schema - validates unitPrice as critical field, rest is pass-through exports.PriceEngineDataSchema = zod_1.z .object({ unitPrice: zod_1.z.number(), // REQUIRED - core pricing data that must be validated }) .passthrough(); // Allow all other fields to pass through without strict validation // Response Schema exports.PriceEngineResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.PriceEngineDataSchema); //# sourceMappingURL=priceEngine.js.map