Class AsyncRawDocumentsClient

java.lang.Object
ai.vectros.resources.documents.AsyncRawDocumentsClient

public class AsyncRawDocumentsClient extends Object
  • Field Details

  • Constructor Details

    • AsyncRawDocumentsClient

      public AsyncRawDocumentsClient(ClientOptions clientOptions)
  • Method Details

    • listDocuments

      Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId, orgId, or clientId). The response is a {data, nextCursor} envelope; pass nextCursor back as startFrom to fetch the next page. Requires the documents:r scope.
    • listDocuments

      public CompletableFuture<VectrosApiHttpResponse<DocumentPage>> listDocuments(RequestOptions requestOptions)
      Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId, orgId, or clientId). The response is a {data, nextCursor} envelope; pass nextCursor back as startFrom to fetch the next page. Requires the documents:r scope.
    • listDocuments

      Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId, orgId, or clientId). The response is a {data, nextCursor} envelope; pass nextCursor back as startFrom to fetch the next page. Requires the documents:r scope.
    • listDocuments

      Returns a paginated list of your documents, optionally filtered by folder (folderId) and/or owner (userId, orgId, or clientId). The response is a {data, nextCursor} envelope; pass nextCursor back as startFrom to fetch the next page. Requires the documents:r scope.
    • ingestDocument

      Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable. Requires the documents:c scope.
    • ingestDocument

      public CompletableFuture<VectrosApiHttpResponse<DocumentResponse>> ingestDocument(DocumentRequest request, RequestOptions requestOptions)
      Creates a document from a raw text string and queues it for asynchronous indexing so it becomes searchable. Requires the documents:c scope.
    • getDocument

      Returns a single document by its ID, including its full structured payload. Requires the documents:r scope.
    • getDocument

      Returns a single document by its ID, including its full structured payload. Requires the documents:r scope.
    • getDocument

      Returns a single document by its ID, including its full structured payload. Requires the documents:r scope.
    • getDocument

      Returns a single document by its ID, including its full structured payload. Requires the documents:r scope.
    • updateDocument

      Replaces the mutable fields of a document. This is a full replacement of the payload — to merge fields instead, use PATCH. If you supply new text, the document body is re-ingested and re-queued for indexing. Requires the documents:u scope.
    • updateDocument

      Replaces the mutable fields of a document. This is a full replacement of the payload — to merge fields instead, use PATCH. If you supply new text, the document body is re-ingested and re-queued for indexing. Requires the documents:u scope.
    • deleteDocument

      public CompletableFuture<VectrosApiHttpResponse<Void>> deleteDocument(String id)
      Permanently deletes the document and removes it from the search index. This cannot be undone. Requires the documents:d scope.
    • deleteDocument

      public CompletableFuture<VectrosApiHttpResponse<Void>> deleteDocument(String id, RequestOptions requestOptions)
      Permanently deletes the document and removes it from the search index. This cannot be undone. Requires the documents:d scope.
    • deleteDocument

      Permanently deletes the document and removes it from the search index. This cannot be undone. Requires the documents:d scope.
    • deleteDocument

      public CompletableFuture<VectrosApiHttpResponse<Void>> deleteDocument(String id, DeleteDocumentRequest request, RequestOptions requestOptions)
      Permanently deletes the document and removes it from the search index. This cannot be undone. Requires the documents:d scope.
    • patchDocument

      Partially updates a document using an RFC 7386 JSON Merge Patch. The payload object is deep-merged: keys you send overwrite existing values (recursing into nested objects), a key set to null is deleted, and keys you omit are preserved — unlike PUT, which replaces the whole payload. Top-level fields (title, storeText, folderId, schemaId, ownership) are set when present and left unchanged when omitted; sending a top-level field as null is rejected. Supplying text re-ingests the document body (same as PUT). indexMode and externalId are immutable and rejected if present. The merged result is validated against the bound schema. Pass expectedVersion for optimistic concurrency (409 on conflict). Requires the documents:u scope.
    • patchDocument

      Partially updates a document using an RFC 7386 JSON Merge Patch. The payload object is deep-merged: keys you send overwrite existing values (recursing into nested objects), a key set to null is deleted, and keys you omit are preserved — unlike PUT, which replaces the whole payload. Top-level fields (title, storeText, folderId, schemaId, ownership) are set when present and left unchanged when omitted; sending a top-level field as null is rejected. Supplying text re-ingests the document body (same as PUT). indexMode and externalId are immutable and rejected if present. The merged result is validated against the bound schema. Pass expectedVersion for optimistic concurrency (409 on conflict). Requires the documents:u scope.
    • lookupDocuments

      Finds documents of a given type by a schema-declared lookup field. The document must be bound to a schema (via schemaId) that declares the field as a lookup field. A lookup on a sensitive field is rejected here, because the value would appear in the URL query string; use POST /v1/documents/lookup (the request-body variant) for a sensitive field instead. Results are paginated: set limit for the page size and feed the returned nextCursor back as startFrom to fetch the next page. The response is a {data, nextCursor} envelope. Requires the documents:r scope.
    • lookupDocuments

      Finds documents of a given type by a schema-declared lookup field. The document must be bound to a schema (via schemaId) that declares the field as a lookup field. A lookup on a sensitive field is rejected here, because the value would appear in the URL query string; use POST /v1/documents/lookup (the request-body variant) for a sensitive field instead. Results are paginated: set limit for the page size and feed the returned nextCursor back as startFrom to fetch the next page. The response is a {data, nextCursor} envelope. Requires the documents:r scope.
    • lookupDocumentsByBody

      Request-body equivalent of GET /v1/documents/lookup. Use this when looking up by a sensitive field: the value travels in the request body (and is blind-indexed server-side) instead of the URL query string, so it never lands in access, CDN, or proxy logs. The GET variant rejects value for a sensitive field and directs you here. Requires the documents:r scope.
    • lookupDocumentsByBody

      public CompletableFuture<VectrosApiHttpResponse<DocumentLookupPage>> lookupDocumentsByBody(DocumentLookupRequest request, RequestOptions requestOptions)
      Request-body equivalent of GET /v1/documents/lookup. Use this when looking up by a sensitive field: the value travels in the request body (and is blind-indexed server-side) instead of the URL query string, so it never lands in access, CDN, or proxy logs. The GET variant rejects value for a sensitive field and directs you here. Requires the documents:r scope.
    • getDocumentDownloadUrl

      Returns a short-lived presigned S3 GET URL for the original uploaded file. Only available for file-backed documents (created via POST /v1/documents/upload); text-only documents return 400. Requires the documents:r scope.
    • getDocumentDownloadUrl

      public CompletableFuture<VectrosApiHttpResponse<DocumentDownloadResponse>> getDocumentDownloadUrl(String id, RequestOptions requestOptions)
      Returns a short-lived presigned S3 GET URL for the original uploaded file. Only available for file-backed documents (created via POST /v1/documents/upload); text-only documents return 400. Requires the documents:r scope.
    • getDocumentDownloadUrl

      Returns a short-lived presigned S3 GET URL for the original uploaded file. Only available for file-backed documents (created via POST /v1/documents/upload); text-only documents return 400. Requires the documents:r scope.
    • getDocumentDownloadUrl

      Returns a short-lived presigned S3 GET URL for the original uploaded file. Only available for file-backed documents (created via POST /v1/documents/upload); text-only documents return 400. Requires the documents:r scope.
    • getDocumentText

      Returns the full extracted or ingested text body for documents that were stored with storeText=true. Returns 404 when the document does not exist or when no text is available (because storeText was false, or extraction has not yet completed). Requires the documents:r scope.
    • getDocumentText

      public CompletableFuture<VectrosApiHttpResponse<DocumentTextResponse>> getDocumentText(String id, RequestOptions requestOptions)
      Returns the full extracted or ingested text body for documents that were stored with storeText=true. Returns 404 when the document does not exist or when no text is available (because storeText was false, or extraction has not yet completed). Requires the documents:r scope.
    • getDocumentText

      Returns the full extracted or ingested text body for documents that were stored with storeText=true. Returns 404 when the document does not exist or when no text is available (because storeText was false, or extraction has not yet completed). Requires the documents:r scope.
    • getDocumentText

      Returns the full extracted or ingested text body for documents that were stored with storeText=true. Returns 404 when the document does not exist or when no text is available (because storeText was false, or extraction has not yet completed). Requires the documents:r scope.
    • getDocumentVersions

      Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document. History is recorded only for documents bound to a schema that has audit history enabled (the default for typed documents); untyped documents have no version history. The response is a {data, nextCursor} envelope. Requires the documents:r scope.
    • getDocumentVersions

      public CompletableFuture<VectrosApiHttpResponse<ModelDataVersionPage>> getDocumentVersions(String id, RequestOptions requestOptions)
      Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document. History is recorded only for documents bound to a schema that has audit history enabled (the default for typed documents); untyped documents have no version history. The response is a {data, nextCursor} envelope. Requires the documents:r scope.
    • getDocumentVersions

      Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document. History is recorded only for documents bound to a schema that has audit history enabled (the default for typed documents); untyped documents have no version history. The response is a {data, nextCursor} envelope. Requires the documents:r scope.
    • getDocumentVersions

      Returns the audit trail of changes (CREATE, UPDATE, DELETE) for a document. History is recorded only for documents bound to a schema that has audit history enabled (the default for typed documents); untyped documents have no version history. The response is a {data, nextCursor} envelope. Requires the documents:r scope.
    • uploadDocument

      Starts a file-based document by returning a short-lived presigned S3 PUT URL. Upload the file bytes directly to uploadUrl; the document is then automatically queued for text extraction and asynchronous indexing. Requires the documents:c scope.
    • uploadDocument

      Starts a file-based document by returning a short-lived presigned S3 PUT URL. Upload the file bytes directly to uploadUrl; the document is then automatically queued for text extraction and asynchronous indexing. Requires the documents:c scope.