@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
23 lines • 1.08 kB
JavaScript
import { z } from 'zod';
import { BaseResponseSchema } from '../../../core/schemas';
import { SearchTypeSchema } from './itemSearch';
/** Search attributes params */
export const SearchAttributesParamsSchema = z.object({
q: z.string().min(1),
searchType: SearchTypeSchema,
cacheSiteId: z.string().optional(),
cacheTtl: z.number().int().min(0).optional().default(0),
filters: z.string().optional(),
});
/** Attribute value - key field only, passthrough for API flexibility */
export const AttributeValueSchema = z.object({ attributeValueUid: z.number().int() }).passthrough();
/** Attribute - key field only, passthrough for API flexibility */
export const AttributeSchema = z.object({ attributeUid: z.number().int() }).passthrough();
/** Search attributes data - passthrough for API flexibility */
export const SearchAttributesDataSchema = z
.object({
attributes: z.array(AttributeSchema),
})
.passthrough();
export const SearchAttributesResponseSchema = BaseResponseSchema(SearchAttributesDataSchema);
//# sourceMappingURL=itemSearchAttributes.js.map