/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 94600b45d9b3 */ import * as z from "zod/v3"; import { DocumentDefinition, DocumentDefinition$Outbound, DocumentDefinition$outboundSchema, } from "./documentdefinition.js"; /** * Describes the request body of the /indexdocuments API call */ export type IndexDocumentsRequest = { /** * Optional id parameter to identify and track a batch of documents. */ uploadId?: string | undefined; /** * Datasource of the documents */ datasource: string; /** * Batch of documents being added/updated */ documents: Array; }; /** @internal */ export type IndexDocumentsRequest$Outbound = { uploadId?: string | undefined; datasource: string; documents: Array; }; /** @internal */ export const IndexDocumentsRequest$outboundSchema: z.ZodType< IndexDocumentsRequest$Outbound, z.ZodTypeDef, IndexDocumentsRequest > = z.object({ uploadId: z.string().optional(), datasource: z.string(), documents: z.array(DocumentDefinition$outboundSchema), }); export function indexDocumentsRequestToJSON( indexDocumentsRequest: IndexDocumentsRequest, ): string { return JSON.stringify( IndexDocumentsRequest$outboundSchema.parse(indexDocumentsRequest), ); }