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 Two2 = {}; export declare const Two1: { readonly HiRes: "hi_res"; readonly Fast: "fast"; }; export type Two1 = ClosedEnum; export type Two = Two1 | Two2; export declare const ModeStatic: { readonly HiRes: "hi_res"; readonly Fast: "fast"; }; export type ModeStatic = ClosedEnum; export declare const ModeVideo: { readonly AudioOnly: "audio_only"; readonly VideoOnly: "video_only"; readonly AudioVideo: "audio_video"; }; export type ModeVideo = ClosedEnum; export type One = { static?: ModeStatic | null | undefined; audio?: boolean | null | undefined; video?: ModeVideo | 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 Mode = One | Two1 | Two2; export type Metadata = string | number | boolean | Array; export type FileT = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; export type CreateDocumentParams = { /** * 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?: One | Two1 | Two2 | undefined; /** * Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`, `chunk_content_type`. */ metadata?: { [k: string]: string | number | boolean | Array; } | 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: FileT | Blob; /** * An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found. */ externalId?: string | undefined; /** * An optional name for the document. If set, the document will have this name. Otherwise it will default to the file's name. */ name?: string | undefined; /** * An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created. */ partition?: string | undefined; }; /** @internal */ export declare const Two2$inboundSchema: z.ZodType; /** @internal */ export type Two2$Outbound = {}; /** @internal */ export declare const Two2$outboundSchema: z.ZodType; export declare function two2ToJSON(two2: Two2): string; export declare function two2FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Two1$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Two1$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Two$inboundSchema: z.ZodType; /** @internal */ export type Two$Outbound = string | Two2$Outbound; /** @internal */ export declare const Two$outboundSchema: z.ZodType; export declare function twoToJSON(two: Two): string; export declare function twoFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ModeStatic$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ModeStatic$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ModeVideo$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ModeVideo$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const One$inboundSchema: z.ZodType; /** @internal */ export type One$Outbound = { static?: string | null | undefined; audio?: boolean | null | undefined; video?: string | null | undefined; }; /** @internal */ export declare const One$outboundSchema: z.ZodType; export declare function oneToJSON(one: One): string; export declare function oneFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Mode$inboundSchema: z.ZodType; /** @internal */ export type Mode$Outbound = One$Outbound | string | Two2$Outbound; /** @internal */ export declare const Mode$outboundSchema: z.ZodType; export declare function modeToJSON(mode: Mode): string; export declare function modeFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Metadata$inboundSchema: z.ZodType; /** @internal */ export type Metadata$Outbound = string | number | boolean | Array; /** @internal */ export declare const Metadata$outboundSchema: z.ZodType; export declare function metadataToJSON(metadata: Metadata): string; export declare function metadataFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const FileT$inboundSchema: z.ZodType; /** @internal */ export type FileT$Outbound = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; /** @internal */ export declare const FileT$outboundSchema: z.ZodType; export declare function fileToJSON(fileT: FileT): string; export declare function fileFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const CreateDocumentParams$inboundSchema: z.ZodType; /** @internal */ export type CreateDocumentParams$Outbound = { mode?: One$Outbound | string | Two2$Outbound | undefined; metadata?: { [k: string]: string | number | boolean | Array; } | undefined; file: FileT$Outbound | Blob; external_id?: string | undefined; name?: string | undefined; partition?: string | undefined; }; /** @internal */ export declare const CreateDocumentParams$outboundSchema: z.ZodType; export declare function createDocumentParamsToJSON(createDocumentParams: CreateDocumentParams): string; export declare function createDocumentParamsFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=createdocumentparams.d.ts.map