/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: deb13e2cdc65 */ import * as z from "zod/v3"; import { DocumentDefinition, DocumentDefinition$Outbound, DocumentDefinition$outboundSchema, } from "./documentdefinition.js"; /** * Describes the request body of the /indexdocument API call */ export type IndexDocumentRequest = { /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ version?: number | undefined; /** * Indexable document structure */ document: DocumentDefinition; }; /** @internal */ export type IndexDocumentRequest$Outbound = { version?: number | undefined; document: DocumentDefinition$Outbound; }; /** @internal */ export const IndexDocumentRequest$outboundSchema: z.ZodType< IndexDocumentRequest$Outbound, z.ZodTypeDef, IndexDocumentRequest > = z.object({ version: z.number().int().optional(), document: DocumentDefinition$outboundSchema, }); export function indexDocumentRequestToJSON( indexDocumentRequest: IndexDocumentRequest, ): string { return JSON.stringify( IndexDocumentRequest$outboundSchema.parse(indexDocumentRequest), ); }