UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

46 lines 3.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProductFindResponseSchema = exports.ProductResponseSchema = exports.ProductListResponseSchema = exports.EnableProductRequestSchema = exports.UpdateProductRequestSchema = exports.CreateProductRequestSchema = exports.ProductFindParamsSchema = exports.ProductListParamsSchema = exports.ProductFindItemSchema = exports.ProductSchema = exports.DistributorResponseSchema = exports.DistributorListResponseSchema = exports.EnableDistributorRequestSchema = exports.UpdateDistributorRequestSchema = exports.CreateDistributorRequestSchema = exports.DistributorListParamsSchema = exports.DistributorSchema = void 0; const zod_1 = require("zod"); const schemas_1 = require("../../../core/schemas"); /** Distributor - key field only, passthrough for API flexibility */ exports.DistributorSchema = zod_1.z.object({ distributorsUid: zod_1.z.number() }).passthrough(); exports.DistributorListParamsSchema = schemas_1.BaseGetParamsSchema.extend({ customerId: zod_1.z.number().optional(), statusCd: zod_1.z.number().optional(), }); /** Create distributor request - passthrough for flexible input */ exports.CreateDistributorRequestSchema = zod_1.z.object({}).passthrough(); /** Update distributor request - passthrough for flexible input */ exports.UpdateDistributorRequestSchema = zod_1.z.object({}).passthrough(); /** Enable distributor request - passthrough for flexible input */ exports.EnableDistributorRequestSchema = zod_1.z.object({}).passthrough(); exports.DistributorListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.DistributorSchema)); exports.DistributorResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.DistributorSchema); /** Product - key field only, passthrough for API flexibility */ exports.ProductSchema = zod_1.z.object({ productsUid: zod_1.z.number() }).passthrough(); /** Product find item - key field only, passthrough for API flexibility */ exports.ProductFindItemSchema = zod_1.z.object({ invMastUid: zod_1.z.number() }).passthrough(); exports.ProductListParamsSchema = schemas_1.BaseGetParamsSchema.extend({ customerId: zod_1.z.number().optional(), distributorsUid: zod_1.z.number().optional(), limit: zod_1.z.number().optional(), offset: zod_1.z.number().optional(), prefix: zod_1.z.string().optional(), q: zod_1.z.string().optional(), statusCd: zod_1.z.number().optional(), }); exports.ProductFindParamsSchema = schemas_1.BaseGetParamsSchema.extend({ customerId: zod_1.z.number().optional(), prefix: zod_1.z.string().optional(), }); /** Create product request - passthrough for flexible input */ exports.CreateProductRequestSchema = zod_1.z.object({}).passthrough(); /** Update product request - passthrough for flexible input */ exports.UpdateProductRequestSchema = zod_1.z.object({}).passthrough(); /** Enable product request - passthrough for flexible input */ exports.EnableProductRequestSchema = zod_1.z.object({}).passthrough(); exports.ProductListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.ProductSchema)); exports.ProductResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.ProductSchema); exports.ProductFindResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.ProductFindItemSchema)); //# sourceMappingURL=products.js.map