UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

40 lines 1.4 kB
import { z } from 'zod'; import { BaseResponseSchema } from '../../../core/schemas'; /** * AI Suggestion Entity Schema (matches Items.json) */ export const AISuggestionSchema = z.object({ description: z.string(), length: z.number().min(0), euclideanDistance: z.number(), taxicabDistance: z.number(), }); /** * Display Description Suggestion Schema (255 character limit) */ export const DisplayDescSuggestionSchema = AISuggestionSchema.extend({ description: z.string().max(255), length: z.number().min(0).max(255), }); /** * Web Description Suggestion Schema (4000 character limit) */ export const WebDescSuggestionSchema = AISuggestionSchema.extend({ description: z.string().max(4000), length: z.number().min(0).max(4000), }); /** * Parameter Schemas */ export const AISuggestionParamsSchema = z.object({ limit: z.number().min(1).max(50).optional(), model: z.string().optional(), }); /** * Response Schemas (matches Items.json exactly) */ export const SuggestDisplayDescResponseSchema = BaseResponseSchema(z.union([z.array(DisplayDescSuggestionSchema), z.literal(false)])); export const SuggestWebDescResponseSchema = BaseResponseSchema(z.array(WebDescSuggestionSchema)); // Legacy schemas for backward compatibility export const AISuggestionsResponseSchema = BaseResponseSchema(z.array(AISuggestionSchema)); //# sourceMappingURL=ai-suggestions.js.map