@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
26 lines • 1.42 kB
JavaScript
;
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 itemSearch_1 = require("./itemSearch");
/** Search attributes params */
exports.SearchAttributesParamsSchema = zod_1.z.object({
q: zod_1.z.string().min(1),
searchType: itemSearch_1.SearchTypeSchema,
cacheSiteId: zod_1.z.string().optional(),
cacheTtl: zod_1.z.number().int().min(0).optional().default(0),
filters: zod_1.z.string().optional(),
});
/** Attribute value - key field only, passthrough for API flexibility */
exports.AttributeValueSchema = zod_1.z.object({ attributeValueUid: zod_1.z.number().int() }).passthrough();
/** Attribute - key field only, passthrough for API flexibility */
exports.AttributeSchema = zod_1.z.object({ attributeUid: zod_1.z.number().int() }).passthrough();
/** Search attributes data - passthrough for API flexibility */
exports.SearchAttributesDataSchema = zod_1.z
.object({
attributes: zod_1.z.array(exports.AttributeSchema),
})
.passthrough();
exports.SearchAttributesResponseSchema = (0, schemas_1.BaseResponseSchema)(exports.SearchAttributesDataSchema);
//# sourceMappingURL=itemSearchAttributes.js.map