import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { PageIterator } from "../types/operations.js"; export declare class Documents extends ClientSDK { /** * Create Document * * @remarks * On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. */ create(request: components.CreateDocumentParams, options?: RequestOptions): Promise; /** * List Documents * * @remarks * List all documents sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. */ list(request?: operations.ListDocumentsRequest | undefined, options?: RequestOptions): Promise>; /** * Create Document Raw * * @remarks * Ingest a document as raw text. On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. */ createRaw(request: components.CreateDocumentRawParams, options?: RequestOptions): Promise; /** * Create Document From Url * * @remarks * Ingest a document from a publicly accessible URL. On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. PDF files over 2000 pages are not supported in hi_res mode. */ createDocumentFromUrl(request: components.CreateDocumentFromUrlParams, options?: RequestOptions): Promise; /** * Get Document */ get(request: operations.GetDocumentRequest, options?: RequestOptions): Promise; /** * Delete Document */ delete(request: operations.DeleteDocumentRequest, options?: RequestOptions): Promise; /** * Update Document File */ updateFile(request: operations.UpdateDocumentFileRequest, options?: RequestOptions): Promise; /** * Update Document Raw */ updateRaw(request: operations.UpdateDocumentRawRequest, options?: RequestOptions): Promise; /** * Update Document Url * * @remarks * Updates a document from a publicly accessible URL. On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`. PDF files over 2000 pages are not supported in hi_res mode. */ updateDocumentFromUrl(request: operations.UpdateDocumentFromUrlRequest, options?: RequestOptions): Promise; /** * Patch Document Metadata */ patchMetadata(request: operations.PatchDocumentMetadataRequest, options?: RequestOptions): Promise; /** * Get Document Chunks * * @remarks * List all document chunks sorted by index in ascending order. May be limited to a range of chunk indices with the `start_index` and `end_index` parameters. Documents created prior to 9/18/2024, which have not been updated since, have chunks which do not include an index and their index will be returned as -1. They will be sorted by their ID instead. Updating the document using the `Update Document File` or `Update Document Raw` endpoint will regenerate document chunks, including their index. Results are paginated with a max limit of 100. When more chunks are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page. */ getChunks(request: operations.GetDocumentChunksRequest, options?: RequestOptions): Promise; /** * Get Document Chunk * * @remarks * Gets a document chunk by its document and chunk ID. */ getChunk(request: operations.GetDocumentChunkRequest, options?: RequestOptions): Promise; /** * Get Document Chunk Content * * @remarks * Returns the content of a document chunk in the requested format. Can be used to stream media of the content for audio/video documents. */ getChunkContent(request: operations.GetDocumentChunkContentRequest, options?: RequestOptions): Promise; /** * Get Document Content * * @remarks * Get the content of a document. The `media_type` parameter can be used to request the content in a different format. When requesting as `application/json` additional metadata about the document will be included. If the original document contained content such as images or other non-textual media, this response will include a text description of that media instead of the original file data. Using mime types such as `audio/mpeg` or `video/mp4` will stream the file in a format that can be provided to an audio video player. */ getContent(request: operations.GetDocumentContentRequest, options?: RequestOptions): Promise; /** * Get Document Source * * @remarks * Get the source file of a document. The source file is the original file that was uploaded to create the document. If the document was created from a URL, the source file will be the content of the URL. If the document was created by a connection, the source file will vary based on the type of the connection. For example, a Google Drive connection will return the file that was synced from the Google Drive, while a SalesForce connection would return a JSON file of the data synced from SalesForce. */ getSource(request: operations.GetDocumentSourceRequest, options?: RequestOptions): Promise>; /** * Get Document Summary * * @remarks * Get a LLM generated summary of the document. The summary is created when the document is first created or updated. Documents of types ['xls', 'xlsx', 'csv', 'json'] are not supported for summarization. Documents greater than 1M in token length are not supported. This feature is in beta and may change in the future. */ getSummary(request: operations.GetDocumentSummaryRequest, options?: RequestOptions): Promise; } //# sourceMappingURL=documents.d.ts.map