UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

42 lines 2.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BrandListResponseSchema = exports.BrandResponseSchema = exports.BrandDetailParamsSchema = exports.BrandListParamsSchema = exports.UpdateBrandRequestSchema = exports.CreateBrandRequestSchema = exports.BrandSchema = void 0; const zod_1 = require("zod"); const schemas_1 = require("../../../core/schemas"); const schema_utils_1 = require("../../../core/schema-utils"); // Brand schemas based on Brands.json exports.BrandSchema = zod_1.z.object({ brandsUid: zod_1.z.number().min(1), brandsName: zod_1.z.string().max(255).min(1), brandsId: zod_1.z.string().max(255), brandsDesc: zod_1.z.string().max(40).nullable().optional(), dateCreated: (0, schema_utils_1.mysqlDatetimeSchema)(), dateLastModified: (0, schema_utils_1.mysqlDatetimeSchema)(), updateCd: zod_1.z.number(), statusCd: zod_1.z.number(), processCd: zod_1.z.number(), }); exports.CreateBrandRequestSchema = zod_1.z.object({ brandsName: zod_1.z.string().max(255).min(1), brandsDesc: zod_1.z.string().max(40).nullable().optional(), }); exports.UpdateBrandRequestSchema = zod_1.z.object({ brandsName: zod_1.z.string().max(255).min(1).optional(), brandsDesc: zod_1.z.string().max(40).nullable().optional(), statusCd: zod_1.z.number().optional(), processCd: zod_1.z.number().optional(), }); exports.BrandListParamsSchema = zod_1.z.object({ limit: zod_1.z.coerce.number().int().positive().optional(), offset: zod_1.z.coerce.number().int().min(0).optional(), q: zod_1.z.string().optional(), statusCd: zod_1.z.coerce.number().optional(), orderBy: zod_1.z.string().optional(), }); exports.BrandDetailParamsSchema = zod_1.z.object({ brandsUid: zod_1.z.coerce.number().min(1), }); // Response schemas using BaseResponseSchema (8-field format) exports.BrandResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.BrandSchema); exports.BrandListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.BrandSchema)); //# sourceMappingURL=brands.js.map