UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

40 lines 1.79 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SearchAttributesResponseSchema = exports.SearchAttributesDataSchema = exports.AttributeSchema = exports.AttributeValueSchema = exports.SearchAttributesParamsSchema = void 0; const zod_1 = require("zod"); const schemas_1 = require("../../../core/schemas"); const common_1 = require("./common"); // Search attributes schemas exports.SearchAttributesParamsSchema = schemas_1.BaseGetParamsSchema.extend({ q: zod_1.z.string().min(1, 'Search query is required'), searchType: common_1.SearchTypeSchema, cacheSiteId: zod_1.z.string().optional(), cacheTtl: zod_1.z.number().optional().default(0), filters: zod_1.z.string().optional(), classId5List: zod_1.z.string().optional(), classidList: zod_1.z.string().optional(), fields: zod_1.z.string().optional(), from: zod_1.z.number().optional(), operator: zod_1.z.string().optional(), size: zod_1.z.number().optional(), sort: zod_1.z.string().optional(), sourceFieldsList: zod_1.z.string().optional(), }); exports.AttributeValueSchema = zod_1.z.object({ attributeValueUid: zod_1.z.number(), attributeValue: zod_1.z.string(), sequenceNo: zod_1.z.number(), }); exports.AttributeSchema = zod_1.z.object({ attributeUid: zod_1.z.number(), attributeId: zod_1.z.string(), attributeDesc: zod_1.z.string(), sequenceNo: zod_1.z.number(), valueCount: zod_1.z.number(), values: zod_1.z.array(exports.AttributeValueSchema), }); exports.SearchAttributesDataSchema = zod_1.z.object({ attributes: zod_1.z.array(exports.AttributeSchema), }); exports.SearchAttributesResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.SearchAttributesDataSchema); //# sourceMappingURL=attributes.js.map