/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 57b098fd87dc */ import * as z from "zod/v3"; import { DocumentSpecUnion, DocumentSpecUnion$Outbound, DocumentSpecUnion$outboundSchema, } from "./documentspecunion.js"; /** * Summary of the document */ export type SummarizeRequest = { /** * The ISO 8601 timestamp associated with the client request. */ timestamp?: Date | undefined; /** * Optional query that the summary should be about */ query?: string | undefined; /** * Optional length of summary output. If not given, defaults to 500 chars. */ preferredSummaryLength?: number | undefined; /** * Specifications of documents to summarize */ documentSpecs: Array; /** * An opaque token that represents this particular result. To be used for /feedback reporting. */ trackingToken?: string | undefined; }; /** @internal */ export type SummarizeRequest$Outbound = { timestamp?: string | undefined; query?: string | undefined; preferredSummaryLength?: number | undefined; documentSpecs: Array; trackingToken?: string | undefined; }; /** @internal */ export const SummarizeRequest$outboundSchema: z.ZodType< SummarizeRequest$Outbound, z.ZodTypeDef, SummarizeRequest > = z.object({ timestamp: z.date().transform(v => v.toISOString()).optional(), query: z.string().optional(), preferredSummaryLength: z.number().int().optional(), documentSpecs: z.array(DocumentSpecUnion$outboundSchema), trackingToken: z.string().optional(), }); export function summarizeRequestToJSON( summarizeRequest: SummarizeRequest, ): string { return JSON.stringify( SummarizeRequest$outboundSchema.parse(summarizeRequest), ); }