import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateDocumentFileParams22 = {}; export declare const UpdateDocumentFileParams21: { readonly HiRes: "hi_res"; readonly Fast: "fast"; }; export type UpdateDocumentFileParams21 = ClosedEnum; export type Mode2 = UpdateDocumentFileParams21 | UpdateDocumentFileParams22; export declare const UpdateDocumentFileParamsModeStatic: { readonly HiRes: "hi_res"; readonly Fast: "fast"; }; export type UpdateDocumentFileParamsModeStatic = ClosedEnum; export declare const UpdateDocumentFileParamsModeVideo: { readonly AudioOnly: "audio_only"; readonly VideoOnly: "video_only"; readonly AudioVideo: "audio_video"; }; export type UpdateDocumentFileParamsModeVideo = ClosedEnum; export type UpdateDocumentFileParamsMode1 = { static?: UpdateDocumentFileParamsModeStatic | null | undefined; audio?: boolean | null | undefined; video?: UpdateDocumentFileParamsModeVideo | null | undefined; }; /** * Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" */ export type UpdateDocumentFileParamsMode = UpdateDocumentFileParamsMode1 | UpdateDocumentFileParams21 | UpdateDocumentFileParams22; export type UpdateDocumentFileParamsFile = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; export type UpdateDocumentFileParams = { /** * Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key "static". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only "fast" Video documents only { "video": "audio_video" } Specify multiple document types { "static": "hi_res", "audio": true, "video": "video_only" } Specify only textual or audio document types { "static": "fast", "audio": true } Highest quality processing for all media types "all" */ mode?: UpdateDocumentFileParamsMode1 | UpdateDocumentFileParams21 | UpdateDocumentFileParams22 | undefined; /** * The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml` * * @remarks * Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic` * Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. PDF files over 2000 pages are not supported in hi_res mode. */ file: UpdateDocumentFileParamsFile | Blob; }; /** @internal */ export declare const UpdateDocumentFileParams22$inboundSchema: z.ZodType; /** @internal */ export type UpdateDocumentFileParams22$Outbound = {}; /** @internal */ export declare const UpdateDocumentFileParams22$outboundSchema: z.ZodType; export declare function updateDocumentFileParams22ToJSON(updateDocumentFileParams22: UpdateDocumentFileParams22): string; export declare function updateDocumentFileParams22FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UpdateDocumentFileParams21$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const UpdateDocumentFileParams21$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Mode2$inboundSchema: z.ZodType; /** @internal */ export type Mode2$Outbound = string | UpdateDocumentFileParams22$Outbound; /** @internal */ export declare const Mode2$outboundSchema: z.ZodType; export declare function mode2ToJSON(mode2: Mode2): string; export declare function mode2FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UpdateDocumentFileParamsModeStatic$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const UpdateDocumentFileParamsModeStatic$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const UpdateDocumentFileParamsModeVideo$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const UpdateDocumentFileParamsModeVideo$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const UpdateDocumentFileParamsMode1$inboundSchema: z.ZodType; /** @internal */ export type UpdateDocumentFileParamsMode1$Outbound = { static?: string | null | undefined; audio?: boolean | null | undefined; video?: string | null | undefined; }; /** @internal */ export declare const UpdateDocumentFileParamsMode1$outboundSchema: z.ZodType; export declare function updateDocumentFileParamsMode1ToJSON(updateDocumentFileParamsMode1: UpdateDocumentFileParamsMode1): string; export declare function updateDocumentFileParamsMode1FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UpdateDocumentFileParamsMode$inboundSchema: z.ZodType; /** @internal */ export type UpdateDocumentFileParamsMode$Outbound = UpdateDocumentFileParamsMode1$Outbound | string | UpdateDocumentFileParams22$Outbound; /** @internal */ export declare const UpdateDocumentFileParamsMode$outboundSchema: z.ZodType; export declare function updateDocumentFileParamsModeToJSON(updateDocumentFileParamsMode: UpdateDocumentFileParamsMode): string; export declare function updateDocumentFileParamsModeFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UpdateDocumentFileParamsFile$inboundSchema: z.ZodType; /** @internal */ export type UpdateDocumentFileParamsFile$Outbound = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; /** @internal */ export declare const UpdateDocumentFileParamsFile$outboundSchema: z.ZodType; export declare function updateDocumentFileParamsFileToJSON(updateDocumentFileParamsFile: UpdateDocumentFileParamsFile): string; export declare function updateDocumentFileParamsFileFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UpdateDocumentFileParams$inboundSchema: z.ZodType; /** @internal */ export type UpdateDocumentFileParams$Outbound = { mode?: UpdateDocumentFileParamsMode1$Outbound | string | UpdateDocumentFileParams22$Outbound | undefined; file: UpdateDocumentFileParamsFile$Outbound | Blob; }; /** @internal */ export declare const UpdateDocumentFileParams$outboundSchema: z.ZodType; export declare function updateDocumentFileParamsToJSON(updateDocumentFileParams: UpdateDocumentFileParams): string; export declare function updateDocumentFileParamsFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=updatedocumentfileparams.d.ts.map