UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

42 lines 2.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ItemAttributeValueResponseSchema = exports.ItemAttributeValueListResponseSchema = exports.AttributeValueListResponseSchema = exports.AttributeListResponseSchema = exports.AttributeResponseSchema = exports.CreateItemAttributeValueRequestSchema = exports.ItemAttributeValueSchema = exports.AttributeValueSchema = exports.UpdateAttributeRequestSchema = exports.CreateAttributeRequestSchema = exports.AttributeSchema = exports.AttributeValuesListParamsSchema = exports.AttributesListParamsSchema = void 0; const zod_1 = require("zod"); const schemas_1 = require("../../../core/schemas"); /** Attributes list params */ exports.AttributesListParamsSchema = zod_1.z.object({ limit: zod_1.z.number().int().positive().optional(), offset: zod_1.z.number().int().min(0).optional(), orderBy: zod_1.z.string().optional(), q: zod_1.z.string().optional(), statusCd: zod_1.z.number().optional(), }); /** Attribute values list params */ exports.AttributeValuesListParamsSchema = zod_1.z.object({ limit: zod_1.z.number().int().positive().optional(), offset: zod_1.z.number().int().min(0).optional(), orderBy: zod_1.z.string().optional(), q: zod_1.z.string().optional(), statusCd: zod_1.z.number().optional(), }); /** Attribute - key field only, passthrough for API flexibility */ exports.AttributeSchema = zod_1.z.object({ attributeUid: zod_1.z.number() }).passthrough(); /** Create attribute request - passthrough for flexible input */ exports.CreateAttributeRequestSchema = zod_1.z.object({}).passthrough(); /** Update attribute request - passthrough for flexible input */ exports.UpdateAttributeRequestSchema = zod_1.z.object({}).passthrough(); /** Attribute value - key field only, passthrough for API flexibility */ exports.AttributeValueSchema = zod_1.z.object({ attributeValueUid: zod_1.z.number() }).passthrough(); /** Item attribute value - key field only, passthrough for API flexibility */ exports.ItemAttributeValueSchema = zod_1.z .object({ itemAttributeValueUid: zod_1.z.number() }) .passthrough(); /** Create item attribute value request - passthrough for flexible input */ exports.CreateItemAttributeValueRequestSchema = zod_1.z.object({}).passthrough(); // Response schemas exports.AttributeResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.AttributeSchema); exports.AttributeListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.AttributeSchema)); exports.AttributeValueListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.AttributeValueSchema)); exports.ItemAttributeValueListResponseSchema = (0, schemas_1.BaseResponseSchema)(zod_1.z.array(exports.ItemAttributeValueSchema)); exports.ItemAttributeValueResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.ItemAttributeValueSchema); //# sourceMappingURL=attributes.js.map