/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 2a79e8af3399 */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { SideBySideImplementation, SideBySideImplementation$Outbound, SideBySideImplementation$outboundSchema, } from "./sidebysideimplementation.js"; /** * The source associated with the side-by-side feedback event. */ export const ManualFeedbackSideBySideInfoSource = { LiveEval: "LIVE_EVAL", Chat: "CHAT", Search: "SEARCH", } as const; /** * The source associated with the side-by-side feedback event. */ export type ManualFeedbackSideBySideInfoSource = ClosedEnum< typeof ManualFeedbackSideBySideInfoSource >; /** * The vote for this specific implementation. */ export const ManualFeedbackSideBySideInfoVote = { Upvote: "UPVOTE", Downvote: "DOWNVOTE", Neutral: "NEUTRAL", } as const; /** * The vote for this specific implementation. */ export type ManualFeedbackSideBySideInfoVote = ClosedEnum< typeof ManualFeedbackSideBySideInfoVote >; export type ManualFeedbackSideBySideInfo = { /** * The email address of the user who submitted the side-by-side feedback. */ email?: string | undefined; /** * The source associated with the side-by-side feedback event. */ source?: ManualFeedbackSideBySideInfoSource | undefined; /** * The query or prompt that was evaluated across multiple implementations. */ query?: string | undefined; /** * Array of implementations that were compared side-by-side. */ implementations?: Array | undefined; /** * Unique identifier for this evaluation session to group related feedback events. */ evaluationSessionId?: string | undefined; /** * The ID of the implementation this specific feedback event is for. */ implementationId?: string | undefined; /** * The vote for this specific implementation. */ vote?: ManualFeedbackSideBySideInfoVote | undefined; /** * Specific feedback comments for this implementation. */ comments?: string | undefined; }; /** @internal */ export const ManualFeedbackSideBySideInfoSource$outboundSchema: z.ZodNativeEnum< typeof ManualFeedbackSideBySideInfoSource > = z.nativeEnum(ManualFeedbackSideBySideInfoSource); /** @internal */ export const ManualFeedbackSideBySideInfoVote$outboundSchema: z.ZodNativeEnum< typeof ManualFeedbackSideBySideInfoVote > = z.nativeEnum(ManualFeedbackSideBySideInfoVote); /** @internal */ export type ManualFeedbackSideBySideInfo$Outbound = { email?: string | undefined; source?: string | undefined; query?: string | undefined; implementations?: Array | undefined; evaluationSessionId?: string | undefined; implementationId?: string | undefined; vote?: string | undefined; comments?: string | undefined; }; /** @internal */ export const ManualFeedbackSideBySideInfo$outboundSchema: z.ZodType< ManualFeedbackSideBySideInfo$Outbound, z.ZodTypeDef, ManualFeedbackSideBySideInfo > = z.object({ email: z.string().optional(), source: ManualFeedbackSideBySideInfoSource$outboundSchema.optional(), query: z.string().optional(), implementations: z.array(SideBySideImplementation$outboundSchema).optional(), evaluationSessionId: z.string().optional(), implementationId: z.string().optional(), vote: ManualFeedbackSideBySideInfoVote$outboundSchema.optional(), comments: z.string().optional(), }); export function manualFeedbackSideBySideInfoToJSON( manualFeedbackSideBySideInfo: ManualFeedbackSideBySideInfo, ): string { return JSON.stringify( ManualFeedbackSideBySideInfo$outboundSchema.parse( manualFeedbackSideBySideInfo, ), ); }