@epilot/sdk 2.20.9 → 2.20.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/file-runtime.json +1 -1
- package/definitions/file.json +392 -0
- package/definitions/journey-runtime.json +1 -1
- package/definitions/journey.json +526 -5
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +24 -6
- package/dist/apis/entity.d.cts +15 -1
- package/dist/apis/entity.d.ts +15 -1
- package/dist/apis/entity.js +19 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +8 -8
- package/dist/apis/file.d.cts +2 -2
- package/dist/apis/file.d.ts +2 -2
- package/dist/apis/file.js +2 -2
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +8 -8
- package/dist/apis/journey.d.cts +2 -2
- package/dist/apis/journey.d.ts +2 -2
- package/dist/apis/journey.js +2 -2
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -27
- package/dist/apis/pricing.d.cts +1 -13
- package/dist/apis/pricing.d.ts +1 -13
- package/dist/apis/pricing.js +1 -22
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-5S2PEECD.cjs → chunk-424JLS5G.cjs} +1 -1
- package/dist/{chunk-JBFTKLP2.js → chunk-A7UIYIBZ.js} +4 -4
- package/dist/chunk-FGQBS7TA.js +14 -0
- package/dist/chunk-HL4MZXEK.js +14 -0
- package/dist/{chunk-VCD3C4UW.cjs → chunk-VAGYR2R6.cjs} +4 -4
- package/dist/chunk-W6R2J6KQ.cjs +14 -0
- package/dist/file-LFOTXMRJ.cjs +7 -0
- package/dist/file-ND2JH5EM.js +7 -0
- package/dist/file-runtime-JL2IZ2CE.cjs +5 -0
- package/dist/{file-runtime-423SISQ2.js → file-runtime-RS4DX5LB.js} +1 -1
- package/dist/{file.d-CBsXF4W8.d.cts → file.d-DELNV63w.d.cts} +340 -9
- package/dist/{file.d-CBsXF4W8.d.ts → file.d-DELNV63w.d.ts} +340 -9
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/journey-FNWHSZW3.js +7 -0
- package/dist/journey-FUJDOH5O.cjs +7 -0
- package/dist/{journey-runtime-PAJVCFMZ.cjs → journey-runtime-EFWGEDUE.cjs} +2 -2
- package/dist/{journey-runtime-33QDS2WK.js → journey-runtime-VCADGDRV.js} +1 -1
- package/dist/{journey.d-bxl2l7qg.d.cts → journey.d-6Bs1uNLT.d.cts} +1062 -14
- package/dist/{journey.d-bxl2l7qg.d.ts → journey.d-6Bs1uNLT.d.ts} +1062 -14
- package/docs/file.md +272 -0
- package/docs/journey.md +676 -0
- package/package.json +1 -1
- package/dist/chunk-CIKDOXDL.cjs +0 -14
- package/dist/chunk-IBMGFLXF.js +0 -14
- package/dist/chunk-XJUB5BYM.js +0 -14
- package/dist/file-M5HNKOPG.cjs +0 -7
- package/dist/file-ZUNCUDBY.js +0 -7
- package/dist/file-runtime-IHVDQNIX.cjs +0 -5
- package/dist/journey-2HHH7MLM.js +0 -7
- package/dist/journey-4CXKZMKV.cjs +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/file.json
|
|
4
|
+
var file_default = '# File API\n\n- **Base URL:** `https://file.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/file](https://docs.epilot.io/api/file)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.file.uploadFileV2(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/file\'\n\nconst fileClient = getClient()\nauthorize(fileClient, () => \'<token>\')\nconst { data } = await fileClient.uploadFileV2(...)\n```\n\n## Operations\n\n**File**\n- [`uploadFileV2`](#uploadfilev2)\n- [`saveFileV2`](#savefilev2)\n- [`getFile`](#getfile)\n- [`deleteFile`](#deletefile)\n- [`downloadFile`](#downloadfile)\n- [`downloadS3File`](#downloads3file)\n- [`downloadFiles`](#downloadfiles)\n- [`createZipJob`](#createzipjob)\n- [`getZipJob`](#getzipjob)\n- [`getFileSummary`](#getfilesummary)\n- [`getFileSummaryFeedback`](#getfilesummaryfeedback)\n- [`putFileSummaryFeedback`](#putfilesummaryfeedback)\n- [`createFileSummaryJob`](#createfilesummaryjob)\n- [`getCurrentFileSummaryJob`](#getcurrentfilesummaryjob)\n- [`getFileSummaryJob`](#getfilesummaryjob)\n- [`generateFileSummary`](#generatefilesummary)\n- [`getFileText`](#getfiletext)\n- [`validateFile`](#validatefile)\n- [`verifyCustomDownloadUrl`](#verifycustomdownloadurl)\n- [`uploadFilePublic`](#uploadfilepublic)\n\n**Preview**\n- [`previewFile`](#previewfile)\n- [`previewS3File`](#previews3file)\n- [`previewS3FileGet`](#previews3fileget)\n- [`previewPublicFile`](#previewpublicfile)\n\n**Session**\n- [`getSession`](#getsession)\n- [`deleteSession`](#deletesession)\n\n**Public Links**\n- [`generatePublicLink`](#generatepubliclink)\n- [`listPublicLinksForFile`](#listpubliclinksforfile)\n- [`accessPublicLink`](#accesspubliclink)\n- [`revokePublicLink`](#revokepubliclink)\n\n**File Collections**\n- [`getUserSchemaFileCollections`](#getuserschemafilecollections)\n- [`createUserSchemaFileCollection`](#createuserschemafilecollection)\n- [`updateUserSchemaFileCollection`](#updateuserschemafilecollection)\n- [`deleteUserSchemaFileCollection`](#deleteuserschemafilecollection)\n- [`getFilesInCollection`](#getfilesincollection)\n- [`getGlobalFileCollections`](#getglobalfilecollections)\n\n**Schemas**\n- [`EntityId`](#entityid)\n- [`EntitySlug`](#entityslug)\n- [`ActivityId`](#activityid)\n- [`FileEntityId`](#fileentityid)\n- [`FileAttributes`](#fileattributes)\n- [`FileType`](#filetype)\n- [`FileSummaryJobStatus`](#filesummaryjobstatus)\n- [`FileSummaryJob`](#filesummaryjob)\n- [`FileSummary`](#filesummary)\n- [`FileSummaryFeedback`](#filesummaryfeedback)\n- [`FileSummaryFeedbackResponse`](#filesummaryfeedbackresponse)\n- [`PutFileSummaryFeedbackRequest`](#putfilesummaryfeedbackrequest)\n- [`FileTextStatus`](#filetextstatus)\n- [`FileValidationRequest`](#filevalidationrequest)\n- [`FileValidationFileReference`](#filevalidationfilereference)\n- [`FileValidation`](#filevalidation)\n- [`FileValidationFile`](#filevalidationfile)\n- [`FileValidationObservation`](#filevalidationobservation)\n- [`FileValidationJudgement`](#filevalidationjudgement)\n- [`FileValidationFacts`](#filevalidationfacts)\n- [`FileValidationRuleResult`](#filevalidationruleresult)\n- [`FileValidationConditionResult`](#filevalidationconditionresult)\n- [`FileText`](#filetext)\n- [`FileTextReady`](#filetextready)\n- [`FileTextNotReady`](#filetextnotready)\n- [`FileTextUnsupported`](#filetextunsupported)\n- [`CustomDownloadUrl`](#customdownloadurl)\n- [`CustomDownloadUrlAuth`](#customdownloadurlauth)\n- [`FileEntity`](#fileentity)\n- [`CommonSaveFilePayload`](#commonsavefilepayload)\n- [`SaveS3FilePayload`](#saves3filepayload)\n- [`SaveFileFromSourceURLPayload`](#savefilefromsourceurlpayload)\n- [`SaveCustomFilePayload`](#savecustomfilepayload)\n- [`SaveFilePayload`](#savefilepayload)\n- [`SaveFilePayloadV2`](#savefilepayloadv2)\n- [`BatchSaveFileVersionPayload`](#batchsavefileversionpayload)\n- [`UploadFilePayload`](#uploadfilepayload)\n- [`FileUpload`](#fileupload)\n- [`DownloadFilesPayload`](#downloadfilespayload)\n- [`CreateZipJobPayload`](#createzipjobpayload)\n- [`ZipJob`](#zipjob)\n- [`VerifyCustomDownloadUrlPayload`](#verifycustomdownloadurlpayload)\n- [`S3Reference`](#s3reference)\n- [`S3Ref`](#s3ref)\n- [`FileItem`](#fileitem)\n- [`FileRelationItem`](#filerelationitem)\n- [`PublicLink`](#publiclink)\n- [`BaseEntityOwner`](#baseentityowner)\n- [`BaseEntityAcl`](#baseentityacl)\n- [`ErrorObject`](#errorobject)\n- [`FileCollectionId`](#filecollectionid)\n- [`FileCollectionItem`](#filecollectionitem)\n- [`FileCollectionAttributes`](#filecollectionattributes)\n- [`FileCollectionCreateRequest`](#filecollectioncreaterequest)\n\n### `uploadFileV2`\n\nCreate pre-signed S3 URL to upload a file to keep temporarily (one week).\n\n`POST /v2/files/upload`\n\n```ts\nconst { data } = await client.uploadFileV2(\n {\n file_entity_id: \'example\',\n },\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n}\n```\n\n</details>\n\n---\n\n### `saveFileV2`\n\nSaves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\n`POST /v2/files`\n\n```ts\nconst { data } = await client.saveFileV2(\n {\n activity_id: \'example\',\n fill_activity: true,\n strict: true,\n async: true,\n delete_temp_file: true,\n version_only: true,\n },\n {\n _id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n file_entity_id: \'string\',\n relations: [\n {\n entity_id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n _schema: \'contact\',\n _tags: [\'string\']\n }\n ],\n _tags: [\'tag1\', \'tag2\'],\n _purpose: [\'8d396871-95a0-4c9d-bb4d-9eda9c35776c\', \'da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8\'],\n _manifest: [\'123e4567-e89b-12d3-a456-426614174000\'],\n filename: \'document.pdf\',\n type: \'document\',\n mime_type: \'application/pdf\',\n size_bytes: 1234,\n readable_size: \'1.2 MB\',\n etag: \'9bb58f26192e4ba00f01e2e7b136bbd8\',\n access_control: \'private\',\n public_url: \'https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf\',\n custom_download_url: \'https://some-api-url.com/download?file_id=123\',\n custom_download_url_auth: \'token\',\n preview_summary_de: \'string\',\n short_summary_de: \'string\',\n preview_summary_en: \'string\',\n short_summary_en: \'string\',\n file_summary_execution_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n s3ref: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "custom_download_url_auth": "token",\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "file_summary_execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `getFile`\n\nGet a file entity by id\n\n`GET /v2/files/{id}`\n\n```ts\nconst { data } = await client.getFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n source_url: true,\n strict: true,\n async: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "custom_download_url_auth": "token",\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "file_summary_execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `deleteFile`\n\nDelete a file entity by id\n\n`DELETE /v2/files/{id}`\n\n```ts\nconst { data } = await client.deleteFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n purge: true,\n activity_id: \'example\',\n strict: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "custom_download_url_auth": "token",\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "file_summary_execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n}\n```\n\n</details>\n\n---\n\n### `downloadFile`\n\nGenerate a pre-signed download URL for a file.\n\n`GET /v1/files/{id}/download`\n\n```ts\nconst { data } = await client.downloadFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n attachment: true,\n x-track: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadS3File`\n\nGenerate a pre-signed download URL for a file using its S3 reference.\n\n`POST /v1/files:downloadS3`\n\n```ts\nconst { data } = await client.downloadS3File({\n s3_key: \'example\',\n s3_bucket: \'example\',\n attachment: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"\n}\n```\n\n</details>\n\n---\n\n### `downloadFiles`\n\nBulk generate pre-signed download URLs for multiple files in a single request.\n\n`POST /v1/files:downloadFiles`\n\n```ts\nconst { data } = await client.downloadFiles(\n null,\n [\n {\n id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\',\n version: 0\n }\n ],\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "file_entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"\n }\n]\n```\n\n</details>\n\n---\n\n### `createZipJob`\n\nCreate a background job to ZIP multiple files and send a download link via email.\n\n`POST /v1/files:zipJob`\n\n```ts\nconst { data } = await client.createZipJob(\n null,\n {},\n)\n```\n\n---\n\n### `getZipJob`\n\nGet the status of a ZIP job\n\n`GET /v1/files:zipJob/{job_id}`\n\n```ts\nconst { data } = await client.getZipJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "status": "completed",\n "progress": {\n "total_files": 100,\n "downloaded_files": 75,\n "failed_files": 2\n },\n "result": {\n "file_entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/files.zip?X-Amz-...",\n "expires_at": "2024-01-02T12:00:00Z",\n "zip_size_bytes": 104857600\n },\n "error": "Failed to download file: access denied",\n "created_at": "2024-01-01T12:00:00Z",\n "created_by": "10234",\n "org_id": "123",\n "updated_at": "2024-01-01T12:05:00Z"\n}\n```\n\n</details>\n\n---\n\n### `getFileSummary`\n\nGet summary text for a file entity together with the current summary job status when available.\n\n`GET /v1/files/{id}/summary`\n\n```ts\nconst { data } = await client.getFileSummary({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "queued",\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "feedback_available": true,\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string"\n}\n```\n\n</details>\n\n---\n\n### `getFileSummaryFeedback`\n\nGet file summary feedback\n\n`GET /v1/files/{id}/summary/feedback`\n\n```ts\nconst { data } = await client.getFileSummaryFeedback({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n### `putFileSummaryFeedback`\n\nSubmit file summary feedback\n\n`PUT /v1/files/{id}/summary/feedback`\n\n```ts\nconst { data } = await client.putFileSummaryFeedback(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n rating: \'up\',\n comment: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "feedback": {\n "rating": "up",\n "comment": "string",\n "user_id": "string",\n "submitted_at": "1970-01-01T00:00:00.000Z"\n }\n}\n```\n\n</details>\n\n---\n\n### `createFileSummaryJob`\n\nCreate or return the current AI summary job for a file entity.\n\n`POST /v1/files/{id}/summary-jobs`\n\n```ts\nconst { data } = await client.createFileSummaryJob({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getCurrentFileSummaryJob`\n\nGet the latest AI summary job for the file entity\'s current source.\n\n`GET /v1/files/{id}/summary-jobs/current`\n\n```ts\nconst { data } = await client.getCurrentFileSummaryJob({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "file_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "status": "queued",\n "error": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getFileSummaryJob`\n\nGet an AI summary job by id.\n\n`GET /v1/files/{id}/summary-jobs/{job_id}`\n\n```ts\nconst { data } = await client.getFileSummaryJob({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "file_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "status": "queued",\n "error": "string",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `generateFileSummary`\n\nCompatibility alias for creating or returning the current AI summary job for a file entity.\n\n`POST /v1/files/{id}/summary:generate`\n\n```ts\nconst { data } = await client.generateFileSummary({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getFileText`\n\nGet the plain-text representation of a file entity. Returns status `not_ready` while text is being prepared and `unsupported` when text is unavailable for the file or organization.\n\n`GET /v1/files/{id}/text`\n\n```ts\nconst { data } = await client.getFileText({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "ready",\n "text": "string",\n "truncated": true,\n "total_chars": 0\n}\n```\n\n</details>\n\n---\n\n### `validateFile`\n\nValidate an uploaded file against one or more document validation rules\n(validation-rules-api rules with `input_type: document`).\n\n`POST /v1/files/validations`\n\n```ts\nconst { data } = await client.validateFile(\n null,\n {\n file: {\n entity_id: \'ef7d985c-2385-44f4-9c71-ae06a52264f8\'\n },\n rule_ids: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "status": "completed",\n "file": {\n "entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "s3ref": {},\n "filename": "string",\n "mime_type": "string",\n "size_bytes": 0\n },\n "observation": {\n "facts": {\n "mime_type": "string",\n "size_bytes": 0,\n "page_count": 0,\n "longer_edge_px": 0,\n "is_blank": true,\n "is_password_protected": true\n },\n "judgements": {},\n "document_type": {\n "slug": "string",\n "confidence": 0\n }\n },\n "results": [\n {\n "rule_id": "string",\n "rule_title": "string",\n "level": "basic",\n "is_valid": true,\n "failed_parts": ["string"],\n "warnings": ["string"],\n "conditions": [\n {\n "id": "string",\n "operator": "string",\n "outcome": "pass",\n "blocking": true,\n "message": "string",\n "evidence": "string",\n "explanation": "string"\n }\n ]\n }\n ],\n "created_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `previewFile`\n\nGenerate a thumbnail preview for a file entity.\n\n`GET /v1/files/{id}/preview`\n\n```ts\nconst { data } = await client.previewFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewS3File`\n\nGenerate a thumbnail preview from an S3 reference.\n\n`POST /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3File(\n {\n w: 1,\n h: 1,\n },\n {},\n)\n```\n\n---\n\n### `previewS3FileGet`\n\nGet a thumbnail preview from an S3 reference using query parameters.\n\n`GET /v1/files:previewS3`\n\n```ts\nconst { data } = await client.previewS3FileGet({\n key: \'example\',\n bucket: \'example\',\n w: 1,\n h: 1,\n})\n```\n\n---\n\n### `previewPublicFile`\n\nGenerate a thumbnail preview for a public file entity.\n\n`GET /v1/files/public/{id}/preview`\n\n```ts\nconst { data } = await client.previewPublicFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n version: 1,\n w: 1,\n h: 1,\n org_id: \'example\',\n})\n```\n\n---\n\n### `getSession`\n\nStart a browser session by converting a Bearer token into a server-side cookie.\n\n`GET /v1/files/session`\n\n```ts\nconst { data } = await client.getSession()\n```\n\n---\n\n### `deleteSession`\n\nEnd a browser session by deleting the token cookie.\n\n`DELETE /v1/files/session`\n\n```ts\nconst { data } = await client.deleteSession()\n```\n\n---\n\n### `generatePublicLink`\n\nGenerate a public link to share a private file externally.\n\n`POST /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.generatePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n"string"\n```\n\n</details>\n\n---\n\n### `listPublicLinksForFile`\n\nFetches all public links previously generated for a file\n\n`GET /v1/files/{id}/public/links`\n\n```ts\nconst { data } = await client.listPublicLinksForFile({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "link": "https://file.sls.epilot.io/v1/files/public/links/3ef5c6d9-818d-45e6-8efb-b1de59079a1c",\n "last_accessed_at": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `accessPublicLink`\n\nAccess a file via its public link.\n\n`GET /v1/files/public/links/{id}/{filename}`\n\n```ts\nconst { data } = await client.accessPublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n filename: \'example\',\n hash: \'example\',\n})\n```\n\n---\n\n### `revokePublicLink`\n\nRevokes a given public link by ID\n\n`DELETE /v1/files/public/links/{id}`\n\n```ts\nconst { data } = await client.revokePublicLink({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `verifyCustomDownloadUrl`\n\nVerify that a custom download URL is valid and has not expired.\n\n`POST /v1/files/download:verify`\n\n```ts\nconst { data } = await client.verifyCustomDownloadUrl(\n null,\n {\n custom_download_url: \'https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "valid": true\n}\n```\n\n</details>\n\n---\n\n### `uploadFilePublic`\n\nCreate a pre-signed S3 URL for uploading a file without authentication.\n\n`POST /v1/files/public/upload`\n\n```ts\nconst { data } = await client.uploadFilePublic(\n null,\n {\n filename: \'document.pdf\',\n mime_type: \'application/pdf\',\n index_tag: \'2f6a377c8e78\',\n metadata: {\n color: \'blue\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "s3ref": {\n "bucket": "epilot-prod-user-content",\n "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"\n },\n "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",\n "error": "File entity not found"\n}\n```\n\n</details>\n\n---\n\n### `getUserSchemaFileCollections`\n\nGet all file collections for the current user within a specific schema.\n\n`GET /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.getUserSchemaFileCollections({\n slug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n### `createUserSchemaFileCollection`\n\nCreate a new file collection for the current user within a specific schema.\n\n`POST /v1/{slug}/collections`\n\n```ts\nconst { data } = await client.createUserSchemaFileCollection(\n {\n slug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `updateUserSchemaFileCollection`\n\nUpdate an existing file collection.\n\n`PUT /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.updateUserSchemaFileCollection(\n {\n slug: \'example\',\n collectionSlug: \'example\',\n },\n {\n name: \'string\',\n parents: [\'string\'],\n starred: false,\n enabled_locations: [\'string\'],\n enabled_purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteUserSchemaFileCollection`\n\nDelete a file collection.\n\n`DELETE /v1/{slug}/collections/{collectionSlug}`\n\n```ts\nconst { data } = await client.deleteUserSchemaFileCollection({\n slug: \'example\',\n collectionSlug: \'example\',\n})\n```\n\n---\n\n### `getFilesInCollection`\n\nGet all files within a specific collection for an entity.\n\n`GET /v1/entity/{id}/collections/{collectionSlug}/files`\n\n```ts\nconst { data } = await client.getFilesInCollection({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n collectionSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "_title": "document.pdf",\n "_schema": "file",\n "_org": "123",\n "_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",\n "_tags": ["tag1", "tag2"],\n "_purpose": ["8d396871-95a0-4c9d-bb4d-9eda9c35776c", "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"],\n "_manifest": ["123e4567-e89b-12d3-a456-426614174000"],\n "filename": "document.pdf",\n "type": "document",\n "mime_type": "application/pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8",\n "access_control": "private",\n "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",\n "custom_download_url": "https://some-api-url.com/download?file_id=123",\n "custom_download_url_auth": "token",\n "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "file_summary_execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "source_url": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf",\n "s3ref": {},\n "versions": [\n {\n "s3ref": {},\n "filename": "document.pdf",\n "size_bytes": 1234,\n "readable_size": "1.2 MB",\n "mime_type": "image/jpeg",\n "etag": "9bb58f26192e4ba00f01e2e7b136bbd8"\n }\n ],\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "__additional": {}\n }\n]\n```\n\n</details>\n\n---\n\n### `getGlobalFileCollections`\n\nGet all global file collections for a specific schema.\n\n`GET /v1/collections/{schemaSlug}`\n\n```ts\nconst { data } = await client.getGlobalFileCollections({\n schemaSlug: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "slug": "_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234:documents",\n "name": "Documents",\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "parents": ["_system_files_collection_3fa85f64-5717-4562-b3fc-2c963f66afa6_10234"],\n "starred": false,\n "order": 0,\n "enabled_locations": ["string"],\n "enabled_purposes": ["9eefcb98-93cf-4c5b-a040-f1d26d57c177", "5c544c09-a691-43ed-a7fa-0a8b44b5b161"],\n "created_at": "2024-01-01T12:00:00Z",\n "updated_at": "2024-01-02T12:00:00Z"\n }\n]\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `EntityId`\n\n```ts\ntype EntityId = string\n```\n\n### `EntitySlug`\n\nURL-friendly identifier for the entity schema\n\n```ts\ntype EntitySlug = string\n```\n\n### `ActivityId`\n\nSee https://github.com/ulid/spec\n\n```ts\ntype ActivityId = string // ulid\n```\n\n### `FileEntityId`\n\n```ts\ntype FileEntityId = string | string // uuid\n```\n\n### `FileAttributes`\n\n```ts\ntype FileAttributes = {\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n}\n```\n\n### `FileType`\n\n```ts\ntype FileType = "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n```\n\n### `FileSummaryJobStatus`\n\nCurrent state of a file summary job.\n\n```ts\ntype FileSummaryJobStatus = "queued" | "waiting_for_extraction" | "processing" | "completed" | "failed" | "unsupported" | "stale"\n```\n\n### `FileSummaryJob`\n\n```ts\ntype FileSummaryJob = {\n job_id: string // uuid\n file_id: string | string // uuid\n status: "queued" | "waiting_for_extraction" | "processing" | "completed" | "failed" | "unsupported" | "stale"\n error?: string\n created_at: string // date-time\n updated_at: string // date-time\n completed_at?: string // date-time\n}\n```\n\n### `FileSummary`\n\n```ts\ntype FileSummary = {\n status?: "queued" | "waiting_for_extraction" | "processing" | "completed" | "failed" | "unsupported" | "stale"\n job_id?: string // uuid\n feedback_available?: boolean\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n}\n```\n\n### `FileSummaryFeedback`\n\n```ts\ntype FileSummaryFeedback = {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n}\n```\n\n### `FileSummaryFeedbackResponse`\n\n```ts\ntype FileSummaryFeedbackResponse = {\n feedback: {\n rating: "up" | "down"\n comment?: string\n user_id: string\n submitted_at: string // date-time\n }\n}\n```\n\n### `PutFileSummaryFeedbackRequest`\n\n```ts\ntype PutFileSummaryFeedbackRequest = {\n rating: "up" | "down"\n comment?: string\n}\n```\n\n### `FileTextStatus`\n\nAvailability of the plain-text representation for a file entity.\n\n```ts\ntype FileTextStatus = "ready" | "not_ready" | "unsupported"\n```\n\n### `FileValidationRequest`\n\n```ts\ntype FileValidationRequest = {\n file: {\n entity_id: string | string // uuid\n } | {\n s3ref: unknown\n }\n rule_ids: string[]\n}\n```\n\n### `FileValidationFileReference`\n\nThe file to validate - a saved file entity, or an uploaded object not saved as an entity yet.\n\n```ts\ntype FileValidationFileReference = {\n entity_id: string | string // uuid\n} | {\n s3ref: unknown\n}\n```\n\n### `FileValidation`\n\n```ts\ntype FileValidation = {\n id: string\n status: "completed" | "pending" | "failed"\n file: {\n entity_id?: string | string // uuid\n s3ref?: unknown\n filename?: string\n mime_type?: string\n size_bytes?: number\n }\n observation: {\n facts: {\n mime_type?: { ... }\n size_bytes?: { ... }\n page_count?: { ... }\n longer_edge_px?: { ... }\n is_blank?: { ... }\n is_password_protected?: { ... }\n }\n judgements?: Record<string, {\n result: { ... }\n confidence?: { ... }\n evidence?: { ... }\n explanation?: { ... }\n }>\n document_type?: {\n slug?: { ... }\n confidence?: { ... }\n }\n }\n results: Array<{\n rule_id: string\n rule_title?: string\n level: "basic" | "standard" | "advanced"\n is_valid: boolean\n failed_parts?: string[]\n warnings?: string[]\n conditions: Array<{\n id: { ... }\n operator: { ... }\n outcome: { ... }\n blocking: { ... }\n message: { ... }\n evidence?: { ... }\n explanation?: { ... }\n }>\n }>\n created_at: string // date-time\n}\n```\n\n### `FileValidationFile`\n\nThe file that was validated, with the identity facts collected from its content.\n\n```ts\ntype FileValidationFile = {\n entity_id?: string | string // uuid\n s3ref?: unknown\n filename?: string\n mime_type?: string\n size_bytes?: number\n}\n```\n\n### `FileValidationObservation`\n\nEverything observed about the file, as passed to the validation rules engine.\n\n```ts\ntype FileValidationObservation = {\n facts: {\n mime_type?: string\n size_bytes?: number\n page_count?: number\n longer_edge_px?: number\n is_blank?: boolean\n is_password_protected?: boolean\n }\n judgements?: Record<string, {\n result: "pass" | "fail" | "uncertain"\n confidence?: number\n evidence?: string\n explanation?: string\n }>\n document_type?: {\n slug?: string\n confidence?: number\n }\n}\n```\n\n### `FileValidationJudgement`\n\n```ts\ntype FileValidationJudgement = {\n result: "pass" | "fail" | "uncertain"\n confidence?: number\n evidence?: string\n explanation?: string\n}\n```\n\n### `FileValidationFacts`\n\nDeterministic properties of the file. A property that is absent could not be determined\n(for example the resolution of an image the service cannot decode); conditions that need it\nare skipped rather than failed.\n\n\n```ts\ntype FileValidationFacts = {\n mime_type?: string\n size_bytes?: number\n page_count?: number\n longer_edge_px?: number\n is_blank?: boolean\n is_password_protected?: boolean\n}\n```\n\n### `FileValidationRuleResult`\n\n```ts\ntype FileValidationRuleResult = {\n rule_id: string\n rule_title?: string\n level: "basic" | "standard" | "advanced"\n is_valid: boolean\n failed_parts?: string[]\n warnings?: string[]\n conditions: Array<{\n id: string\n operator: string\n outcome: "pass" | "fail" | "uncertain" | "skipped"\n blocking: boolean\n message: string\n evidence?: string\n explanation?: string\n }>\n}\n```\n\n### `FileValidationConditionResult`\n\n```ts\ntype FileValidationConditionResult = {\n id: string\n operator: string\n outcome: "pass" | "fail" | "uncertain" | "skipped"\n blocking: boolean\n message: string\n evidence?: string\n explanation?: string\n}\n```\n\n### `FileText`\n\n```ts\ntype FileText = {\n status: "ready"\n text: string\n truncated: boolean\n total_chars: number\n} | {\n status: "not_ready"\n} | {\n status: "unsupported"\n}\n```\n\n### `FileTextReady`\n\n```ts\ntype FileTextReady = {\n status: "ready"\n text: string\n truncated: boolean\n total_chars: number\n}\n```\n\n### `FileTextNotReady`\n\n```ts\ntype FileTextNotReady = {\n status: "not_ready"\n}\n```\n\n### `FileTextUnsupported`\n\n```ts\ntype FileTextUnsupported = {\n status: "unsupported"\n}\n```\n\n### `CustomDownloadUrl`\n\nCustom external download url used for the file\n\n```ts\ntype CustomDownloadUrl = string // uri\n```\n\n### `CustomDownloadUrlAuth`\n\nAuthorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller\'s bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/s\n\n```ts\ntype CustomDownloadUrlAuth = "presigned" | "token"\n```\n\n### `FileEntity`\n\n```ts\ntype FileEntity = {\n _title: string\n _schema: "file"\n _org: string\n _id: string | string // uuid\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename: string\n type: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n source_url?: string\n s3ref?: object\n versions: Array<{\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n etag?: string\n }>\n _updated_at?: string // date-time\n _created_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n __additional?: Record<string, unknown>\n}\n```\n\n### `CommonSaveFilePayload`\n\n```ts\ntype CommonSaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n}\n```\n\n### `SaveS3FilePayload`\n\n```ts\ntype SaveS3FilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n s3ref?: unknown\n}\n```\n\n### `SaveFileFromSourceURLPayload`\n\n```ts\ntype SaveFileFromSourceURLPayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n source_url?: string // uri\n}\n```\n\n### `SaveCustomFilePayload`\n\n```ts\ntype SaveCustomFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n}\n```\n\n### `SaveFilePayload`\n\n```ts\ntype SaveFilePayload = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n}\n```\n\n### `SaveFilePayloadV2`\n\n```ts\ntype SaveFilePayloadV2 = {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n s3ref?: unknown\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n source_url?: string // uri\n} | {\n _id?: object\n file_entity_id?: string\n relations?: Array<{\n entity_id: string\n _schema?: string\n _tags?: string[]\n }>\n _tags?: string[]\n _purpose?: string[]\n _manifest?: string // uuid[]\n filename?: string\n type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown"\n mime_type?: string\n size_bytes?: number\n readable_size?: string\n etag?: string\n access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n custom_download_url_auth?: "presigned" | "token"\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n file_summary_execution_id?: string // uuid\n}\n```\n\n### `BatchSaveFileVersionPayload`\n\nPayload for batch version save. Only s3ref payloads are supported.\n\n```ts\ntype BatchSaveFileVersionPayload = {\n _id?: object\n file_entity_id?: string\n filename?: string\n mime_type?: string\n access_control?: "private" | "public-read"\n s3ref: unknown\n}\n```\n\n### `UploadFilePayload`\n\n```ts\ntype UploadFilePayload = {\n filename: string\n mime_type?: string\n index_tag?: string\n metadata?: Record<string, string>\n}\n```\n\n### `FileUpload`\n\n```ts\ntype FileUpload = {\n s3ref?: object\n upload_url?: string // url\n public_url?: string // url\n}\n```\n\n### `DownloadFilesPayload`\n\n```ts\ntype DownloadFilesPayload = Array<{\n id: string | string // uuid\n version?: number\n}>\n```\n\n### `CreateZipJobPayload`\n\nRequest payload to create a ZIP job for bulk file download.\nProvide either an explicit list of `file_entity_ids` (up to 1000) or an\n`entity_query` that resolves to file entities (up to 10000).\n\n\n```ts\ntype CreateZipJobPayload = unknown | unknown\n```\n\n### `ZipJob`\n\nZIP job status and result\n\n```ts\ntype ZipJob = {\n job_id?: string // uuid\n status?: "queued" | "downloading" | "zipping" | "uploading" | "sending_notification" | "completed" | "failed"\n progress?: {\n total_files?: number\n downloaded_files?: number\n failed_files?: number\n }\n result?: {\n file_entity_id?: string // uuid\n download_url?: string // uri\n expires_at?: string // date-time\n zip_size_bytes?: number\n }\n error?: string\n created_at?: string // date-time\n created_by?: string\n org_id?: string\n updated_at?: string // date-time\n}\n```\n\n### `VerifyCustomDownloadUrlPayload`\n\n```ts\ntype VerifyCustomDownloadUrlPayload = {\n custom_download_url: string\n}\n```\n\n### `S3Reference`\n\n```ts\ntype S3Reference = {\n bucket: string\n key: string\n}\n```\n\n### `S3Ref`\n\n```ts\ntype S3Ref = {\n bucket: string\n key: string\n}\n```\n\n### `FileItem`\n\n```ts\ntype FileItem = {\n s3ref?: unknown\n filename?: string\n size_bytes?: number\n readable_size?: string\n mime_type?: string\n etag?: string\n}\n```\n\n### `FileRelationItem`\n\n```ts\ntype FileRelationItem = {\n entity_id: string\n _schema?: string\n _tags?: string[]\n}\n```\n\n### `PublicLink`\n\n```ts\ntype PublicLink = {\n id?: string\n link?: string\n last_accessed_at?: string\n}\n```\n\n### `BaseEntityOwner`\n\nThe user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n\n\n```ts\ntype BaseEntityOwner = {\n org_id: string\n user_id?: string\n}\n```\n\n### `BaseEntityAcl`\n\nAccess control list (ACL) for an entity. Defines sharing access to external orgs or users.\n\n```ts\ntype BaseEntityAcl = {\n view?: string[]\n edit?: string[]\n delete?: string[]\n}\n```\n\n### `ErrorObject`\n\nA generic error returned by the API\n\n```ts\ntype ErrorObject = {\n status?: number\n error?: string\n}\n```\n\n### `FileCollectionId`\n\nGenerated uuid for a file collection\n\n```ts\ntype FileCollectionId = string // uuid\n```\n\n### `FileCollectionItem`\n\nA file collection with identifiers and timestamps\n\n```ts\ntype FileCollectionItem = {\n slug?: string\n name: string\n id?: string // uuid\n parents?: string[]\n starred?: boolean\n order?: number\n enabled_locations?: string[]\n enabled_purposes?: string[]\n created_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `FileCollectionAttributes`\n\n```ts\ntype FileCollectionAttributes = {\n name?: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n\n### `FileCollectionCreateRequest`\n\nRequest body for creating a file collection\n\n```ts\ntype FileCollectionCreateRequest = {\n name: string\n parents?: string[]\n starred?: boolean\n enabled_locations?: string[]\n enabled_purposes?: string[]\n}\n```\n';
|
|
5
|
+
export {
|
|
6
|
+
file_default as default
|
|
7
|
+
};
|
|
@@ -166,6 +166,28 @@ declare namespace Components {
|
|
|
166
166
|
*/
|
|
167
167
|
error?: string;
|
|
168
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* A generic error returned by the API
|
|
171
|
+
* example:
|
|
172
|
+
* {
|
|
173
|
+
* "status": 422,
|
|
174
|
+
* "error": "File type not allowed"
|
|
175
|
+
* }
|
|
176
|
+
*/
|
|
177
|
+
export interface UnprocessableEntityError {
|
|
178
|
+
/**
|
|
179
|
+
* The HTTP status code of the error
|
|
180
|
+
* example:
|
|
181
|
+
* 400
|
|
182
|
+
*/
|
|
183
|
+
status?: number;
|
|
184
|
+
/**
|
|
185
|
+
* The error message
|
|
186
|
+
* example:
|
|
187
|
+
* Bad Request
|
|
188
|
+
*/
|
|
189
|
+
error?: string;
|
|
190
|
+
}
|
|
169
191
|
}
|
|
170
192
|
namespace Schemas {
|
|
171
193
|
/**
|
|
@@ -2908,6 +2930,160 @@ declare namespace Components {
|
|
|
2908
2930
|
*/
|
|
2909
2931
|
public_url?: string; // url
|
|
2910
2932
|
}
|
|
2933
|
+
export interface FileValidation {
|
|
2934
|
+
/**
|
|
2935
|
+
* Identifier of this validation run.
|
|
2936
|
+
*/
|
|
2937
|
+
id: string;
|
|
2938
|
+
/**
|
|
2939
|
+
* `completed` when every rule was evaluated. `pending` is reserved for check levels that
|
|
2940
|
+
* need asynchronous content extraction; `failed` when the observation could not be produced.
|
|
2941
|
+
*
|
|
2942
|
+
*/
|
|
2943
|
+
status: "completed" | "pending" | "failed";
|
|
2944
|
+
file: /* The file that was validated, with the identity facts collected from its content. */ FileValidationFile;
|
|
2945
|
+
observation: /* Everything observed about the file, as passed to the validation rules engine. */ FileValidationObservation;
|
|
2946
|
+
results: FileValidationRuleResult[];
|
|
2947
|
+
created_at: string; // date-time
|
|
2948
|
+
}
|
|
2949
|
+
export interface FileValidationConditionResult {
|
|
2950
|
+
id: string;
|
|
2951
|
+
operator: string;
|
|
2952
|
+
outcome: "pass" | "fail" | "uncertain" | "skipped";
|
|
2953
|
+
/**
|
|
2954
|
+
* True when this outcome makes the file invalid.
|
|
2955
|
+
*/
|
|
2956
|
+
blocking: boolean;
|
|
2957
|
+
/**
|
|
2958
|
+
* The condition's configured error message.
|
|
2959
|
+
*/
|
|
2960
|
+
message: string;
|
|
2961
|
+
evidence?: string;
|
|
2962
|
+
explanation?: string;
|
|
2963
|
+
}
|
|
2964
|
+
/**
|
|
2965
|
+
* Deterministic properties of the file. A property that is absent could not be determined
|
|
2966
|
+
* (for example the resolution of an image the service cannot decode); conditions that need it
|
|
2967
|
+
* are skipped rather than failed.
|
|
2968
|
+
*
|
|
2969
|
+
*/
|
|
2970
|
+
export interface FileValidationFacts {
|
|
2971
|
+
mime_type?: string;
|
|
2972
|
+
size_bytes?: number;
|
|
2973
|
+
/**
|
|
2974
|
+
* Pages of a PDF; 1 for images.
|
|
2975
|
+
*/
|
|
2976
|
+
page_count?: number;
|
|
2977
|
+
/**
|
|
2978
|
+
* Longer edge of an image in pixels.
|
|
2979
|
+
*/
|
|
2980
|
+
longer_edge_px?: number;
|
|
2981
|
+
is_blank?: boolean;
|
|
2982
|
+
is_password_protected?: boolean;
|
|
2983
|
+
}
|
|
2984
|
+
/**
|
|
2985
|
+
* The file that was validated, with the identity facts collected from its content.
|
|
2986
|
+
*/
|
|
2987
|
+
export interface FileValidationFile {
|
|
2988
|
+
entity_id?: /**
|
|
2989
|
+
* example:
|
|
2990
|
+
* ef7d985c-2385-44f4-9c71-ae06a52264f8
|
|
2991
|
+
*/
|
|
2992
|
+
FileEntityId;
|
|
2993
|
+
s3ref?: S3Ref;
|
|
2994
|
+
filename?: string;
|
|
2995
|
+
/**
|
|
2996
|
+
* Mime type detected from the file content, falling back to the declared type.
|
|
2997
|
+
*/
|
|
2998
|
+
mime_type?: string;
|
|
2999
|
+
size_bytes?: number;
|
|
3000
|
+
}
|
|
3001
|
+
/**
|
|
3002
|
+
* The file to validate - a saved file entity, or an uploaded object not saved as an entity yet.
|
|
3003
|
+
*/
|
|
3004
|
+
export type FileValidationFileReference = /* The file to validate - a saved file entity, or an uploaded object not saved as an entity yet. */ {
|
|
3005
|
+
entity_id: /**
|
|
3006
|
+
* example:
|
|
3007
|
+
* ef7d985c-2385-44f4-9c71-ae06a52264f8
|
|
3008
|
+
*/
|
|
3009
|
+
FileEntityId;
|
|
3010
|
+
} | {
|
|
3011
|
+
s3ref: S3Ref;
|
|
3012
|
+
};
|
|
3013
|
+
export interface FileValidationJudgement {
|
|
3014
|
+
result: "pass" | "fail" | "uncertain";
|
|
3015
|
+
confidence?: number;
|
|
3016
|
+
evidence?: string;
|
|
3017
|
+
explanation?: string;
|
|
3018
|
+
}
|
|
3019
|
+
/**
|
|
3020
|
+
* Everything observed about the file, as passed to the validation rules engine.
|
|
3021
|
+
*/
|
|
3022
|
+
export interface FileValidationObservation {
|
|
3023
|
+
facts: /**
|
|
3024
|
+
* Deterministic properties of the file. A property that is absent could not be determined
|
|
3025
|
+
* (for example the resolution of an image the service cannot decode); conditions that need it
|
|
3026
|
+
* are skipped rather than failed.
|
|
3027
|
+
*
|
|
3028
|
+
*/
|
|
3029
|
+
FileValidationFacts;
|
|
3030
|
+
/**
|
|
3031
|
+
* Content judgements keyed by condition id, produced by the document requirements
|
|
3032
|
+
* check for `meetsCriteria` conditions at the `standard` and `advanced` levels.
|
|
3033
|
+
* Absent when no content check ran (basic level, unsupported file, or the check
|
|
3034
|
+
* did not finish within its budget).
|
|
3035
|
+
*
|
|
3036
|
+
*/
|
|
3037
|
+
judgements?: {
|
|
3038
|
+
[name: string]: FileValidationJudgement;
|
|
3039
|
+
};
|
|
3040
|
+
/**
|
|
3041
|
+
* Document type detected by the content check, when it ran.
|
|
3042
|
+
*/
|
|
3043
|
+
document_type?: {
|
|
3044
|
+
slug?: string;
|
|
3045
|
+
confidence?: number;
|
|
3046
|
+
};
|
|
3047
|
+
}
|
|
3048
|
+
export interface FileValidationRequest {
|
|
3049
|
+
file: /* The file to validate - a saved file entity, or an uploaded object not saved as an entity yet. */ FileValidationFileReference;
|
|
3050
|
+
/**
|
|
3051
|
+
* Document validation rules to evaluate. Rules of another input type are rejected.
|
|
3052
|
+
*/
|
|
3053
|
+
rule_ids: [
|
|
3054
|
+
string,
|
|
3055
|
+
string?,
|
|
3056
|
+
string?,
|
|
3057
|
+
string?,
|
|
3058
|
+
string?,
|
|
3059
|
+
string?,
|
|
3060
|
+
string?,
|
|
3061
|
+
string?,
|
|
3062
|
+
string?,
|
|
3063
|
+
string?
|
|
3064
|
+
];
|
|
3065
|
+
}
|
|
3066
|
+
export interface FileValidationRuleResult {
|
|
3067
|
+
rule_id: string;
|
|
3068
|
+
rule_title?: string;
|
|
3069
|
+
/**
|
|
3070
|
+
* The rule's check level.
|
|
3071
|
+
*/
|
|
3072
|
+
level: "basic" | "standard" | "advanced";
|
|
3073
|
+
/**
|
|
3074
|
+
* True when every blocking condition passed or was skipped.
|
|
3075
|
+
*/
|
|
3076
|
+
is_valid: boolean;
|
|
3077
|
+
/**
|
|
3078
|
+
* Error messages of blocking conditions that failed.
|
|
3079
|
+
*/
|
|
3080
|
+
failed_parts?: string[];
|
|
3081
|
+
/**
|
|
3082
|
+
* Error messages of advisory conditions that failed and of uncertain judgements.
|
|
3083
|
+
*/
|
|
3084
|
+
warnings?: string[];
|
|
3085
|
+
conditions: FileValidationConditionResult[];
|
|
3086
|
+
}
|
|
2911
3087
|
export interface PublicLink {
|
|
2912
3088
|
/**
|
|
2913
3089
|
* ID of the public link
|
|
@@ -4855,6 +5031,15 @@ declare namespace Paths {
|
|
|
4855
5031
|
* }
|
|
4856
5032
|
*/
|
|
4857
5033
|
Components.Responses.UnauthorizedError;
|
|
5034
|
+
export type $422 = /**
|
|
5035
|
+
* A generic error returned by the API
|
|
5036
|
+
* example:
|
|
5037
|
+
* {
|
|
5038
|
+
* "status": 422,
|
|
5039
|
+
* "error": "File type not allowed"
|
|
5040
|
+
* }
|
|
5041
|
+
*/
|
|
5042
|
+
Components.Responses.UnprocessableEntityError;
|
|
4858
5043
|
export type $500 = /**
|
|
4859
5044
|
* A generic error returned by the API
|
|
4860
5045
|
* example:
|
|
@@ -4939,6 +5124,15 @@ declare namespace Paths {
|
|
|
4939
5124
|
* }
|
|
4940
5125
|
*/
|
|
4941
5126
|
Components.Responses.NotFoundError;
|
|
5127
|
+
export type $422 = /**
|
|
5128
|
+
* A generic error returned by the API
|
|
5129
|
+
* example:
|
|
5130
|
+
* {
|
|
5131
|
+
* "status": 422,
|
|
5132
|
+
* "error": "File type not allowed"
|
|
5133
|
+
* }
|
|
5134
|
+
*/
|
|
5135
|
+
Components.Responses.UnprocessableEntityError;
|
|
4942
5136
|
export type $500 = /**
|
|
4943
5137
|
* A generic error returned by the API
|
|
4944
5138
|
* example:
|
|
@@ -5045,6 +5239,15 @@ declare namespace Paths {
|
|
|
5045
5239
|
* }
|
|
5046
5240
|
*/
|
|
5047
5241
|
Components.Responses.UnauthorizedError;
|
|
5242
|
+
export type $422 = /**
|
|
5243
|
+
* A generic error returned by the API
|
|
5244
|
+
* example:
|
|
5245
|
+
* {
|
|
5246
|
+
* "status": 422,
|
|
5247
|
+
* "error": "File type not allowed"
|
|
5248
|
+
* }
|
|
5249
|
+
*/
|
|
5250
|
+
Components.Responses.UnprocessableEntityError;
|
|
5048
5251
|
export type $500 = /**
|
|
5049
5252
|
* A generic error returned by the API
|
|
5050
5253
|
* example:
|
|
@@ -5083,6 +5286,15 @@ declare namespace Paths {
|
|
|
5083
5286
|
* }
|
|
5084
5287
|
*/
|
|
5085
5288
|
Components.Responses.BadRequestError;
|
|
5289
|
+
export type $422 = /**
|
|
5290
|
+
* A generic error returned by the API
|
|
5291
|
+
* example:
|
|
5292
|
+
* {
|
|
5293
|
+
* "status": 422,
|
|
5294
|
+
* "error": "File type not allowed"
|
|
5295
|
+
* }
|
|
5296
|
+
*/
|
|
5297
|
+
Components.Responses.UnprocessableEntityError;
|
|
5086
5298
|
export type $500 = /**
|
|
5087
5299
|
* A generic error returned by the API
|
|
5088
5300
|
* example:
|
|
@@ -5126,6 +5338,68 @@ declare namespace Paths {
|
|
|
5126
5338
|
* }
|
|
5127
5339
|
*/
|
|
5128
5340
|
Components.Responses.UnauthorizedError;
|
|
5341
|
+
export type $422 = /**
|
|
5342
|
+
* A generic error returned by the API
|
|
5343
|
+
* example:
|
|
5344
|
+
* {
|
|
5345
|
+
* "status": 422,
|
|
5346
|
+
* "error": "File type not allowed"
|
|
5347
|
+
* }
|
|
5348
|
+
*/
|
|
5349
|
+
Components.Responses.UnprocessableEntityError;
|
|
5350
|
+
export type $500 = /**
|
|
5351
|
+
* A generic error returned by the API
|
|
5352
|
+
* example:
|
|
5353
|
+
* {
|
|
5354
|
+
* "status": 500,
|
|
5355
|
+
* "error": "Internal Server Error"
|
|
5356
|
+
* }
|
|
5357
|
+
*/
|
|
5358
|
+
Components.Responses.InternalServerError;
|
|
5359
|
+
}
|
|
5360
|
+
}
|
|
5361
|
+
namespace ValidateFile {
|
|
5362
|
+
export type RequestBody = Components.Schemas.FileValidationRequest;
|
|
5363
|
+
namespace Responses {
|
|
5364
|
+
export type $200 = Components.Schemas.FileValidation;
|
|
5365
|
+
export type $400 = /**
|
|
5366
|
+
* A generic error returned by the API
|
|
5367
|
+
* example:
|
|
5368
|
+
* {
|
|
5369
|
+
* "status": 400,
|
|
5370
|
+
* "error": "Bad Request: filename is required"
|
|
5371
|
+
* }
|
|
5372
|
+
*/
|
|
5373
|
+
Components.Responses.BadRequestError;
|
|
5374
|
+
export type $401 = /**
|
|
5375
|
+
* A generic error returned by the API
|
|
5376
|
+
* example:
|
|
5377
|
+
* {
|
|
5378
|
+
* "status": 401,
|
|
5379
|
+
* "error": "Unauthorized: Invalid or expired token"
|
|
5380
|
+
* }
|
|
5381
|
+
*/
|
|
5382
|
+
Components.Responses.UnauthorizedError;
|
|
5383
|
+
export type $403 = /**
|
|
5384
|
+
* A generic error returned by the API
|
|
5385
|
+
* example:
|
|
5386
|
+
* {
|
|
5387
|
+
* "status": 403,
|
|
5388
|
+
* "error": "Forbidden: You do not have permission to access this file"
|
|
5389
|
+
* }
|
|
5390
|
+
*/
|
|
5391
|
+
Components.Responses.ForbiddenError;
|
|
5392
|
+
export type $404 = /**
|
|
5393
|
+
* A generic error returned by the API
|
|
5394
|
+
* example:
|
|
5395
|
+
* {
|
|
5396
|
+
* "status": 404,
|
|
5397
|
+
* "error": "Not Found: File entity not found"
|
|
5398
|
+
* }
|
|
5399
|
+
*/
|
|
5400
|
+
Components.Responses.NotFoundError;
|
|
5401
|
+
export type $413 = /* A generic error returned by the API */ Components.Schemas.ErrorObject;
|
|
5402
|
+
export type $422 = /* A generic error returned by the API */ Components.Schemas.ErrorObject;
|
|
5129
5403
|
export type $500 = /**
|
|
5130
5404
|
* A generic error returned by the API
|
|
5131
5405
|
* example:
|
|
@@ -5371,23 +5645,23 @@ interface OperationMethods {
|
|
|
5371
5645
|
): OperationResponse<Paths.GetFileSummary.Responses.$200>
|
|
5372
5646
|
/**
|
|
5373
5647
|
* getFileSummaryFeedback - Get file summary feedback
|
|
5374
|
-
*
|
|
5648
|
+
*
|
|
5375
5649
|
* Get the authenticated user's feedback for the current generated file summary.
|
|
5376
5650
|
*/
|
|
5377
5651
|
'getFileSummaryFeedback'(
|
|
5378
5652
|
parameters?: Parameters<Paths.GetFileSummaryFeedback.PathParameters> | null,
|
|
5379
5653
|
data?: any,
|
|
5380
|
-
config?: AxiosRequestConfig
|
|
5654
|
+
config?: AxiosRequestConfig
|
|
5381
5655
|
): OperationResponse<Paths.GetFileSummaryFeedback.Responses.$200>
|
|
5382
5656
|
/**
|
|
5383
5657
|
* putFileSummaryFeedback - Submit file summary feedback
|
|
5384
|
-
*
|
|
5658
|
+
*
|
|
5385
5659
|
* Upsert thumbs up/down feedback for the current generated file summary.
|
|
5386
5660
|
*/
|
|
5387
5661
|
'putFileSummaryFeedback'(
|
|
5388
5662
|
parameters?: Parameters<Paths.PutFileSummaryFeedback.PathParameters> | null,
|
|
5389
5663
|
data?: Paths.PutFileSummaryFeedback.RequestBody,
|
|
5390
|
-
config?: AxiosRequestConfig
|
|
5664
|
+
config?: AxiosRequestConfig
|
|
5391
5665
|
): OperationResponse<Paths.PutFileSummaryFeedback.Responses.$200>
|
|
5392
5666
|
/**
|
|
5393
5667
|
* createFileSummaryJob - createFileSummaryJob
|
|
@@ -5439,6 +5713,29 @@ interface OperationMethods {
|
|
|
5439
5713
|
data?: any,
|
|
5440
5714
|
config?: AxiosRequestConfig
|
|
5441
5715
|
): OperationResponse<Paths.GetFileText.Responses.$200>
|
|
5716
|
+
/**
|
|
5717
|
+
* validateFile - validateFile
|
|
5718
|
+
*
|
|
5719
|
+
* Validate an uploaded file against one or more document validation rules
|
|
5720
|
+
* (validation-rules-api rules with `input_type: document`).
|
|
5721
|
+
*
|
|
5722
|
+
* The file is referenced either by its file entity id or, for an upload that has not been
|
|
5723
|
+
* saved as an entity yet (e.g. a journey upload in the temporary prefix), by its S3 reference.
|
|
5724
|
+
* The service collects an observation of the file - deterministic facts such as the sniffed
|
|
5725
|
+
* mime type, size, page count, image resolution, blank and password-protection detection -
|
|
5726
|
+
* and evaluates every rule against it with the shared validation rules engine.
|
|
5727
|
+
*
|
|
5728
|
+
* The response carries one result per rule with a per-condition outcome (`pass`, `fail`,
|
|
5729
|
+
* `uncertain`, `skipped`), plus the observation the results were derived from. `status` is
|
|
5730
|
+
* `completed` for checks that finish synchronously; `pending` is reserved for check levels
|
|
5731
|
+
* that need asynchronous content extraction.
|
|
5732
|
+
*
|
|
5733
|
+
*/
|
|
5734
|
+
'validateFile'(
|
|
5735
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5736
|
+
data?: Paths.ValidateFile.RequestBody,
|
|
5737
|
+
config?: AxiosRequestConfig
|
|
5738
|
+
): OperationResponse<Paths.ValidateFile.Responses.$200>
|
|
5442
5739
|
/**
|
|
5443
5740
|
* previewFile - previewFile
|
|
5444
5741
|
*
|
|
@@ -5914,23 +6211,23 @@ interface PathsDictionary {
|
|
|
5914
6211
|
['/v1/files/{id}/summary/feedback']: {
|
|
5915
6212
|
/**
|
|
5916
6213
|
* getFileSummaryFeedback - Get file summary feedback
|
|
5917
|
-
*
|
|
6214
|
+
*
|
|
5918
6215
|
* Get the authenticated user's feedback for the current generated file summary.
|
|
5919
6216
|
*/
|
|
5920
6217
|
'get'(
|
|
5921
6218
|
parameters?: Parameters<Paths.GetFileSummaryFeedback.PathParameters> | null,
|
|
5922
6219
|
data?: any,
|
|
5923
|
-
config?: AxiosRequestConfig
|
|
6220
|
+
config?: AxiosRequestConfig
|
|
5924
6221
|
): OperationResponse<Paths.GetFileSummaryFeedback.Responses.$200>
|
|
5925
6222
|
/**
|
|
5926
6223
|
* putFileSummaryFeedback - Submit file summary feedback
|
|
5927
|
-
*
|
|
6224
|
+
*
|
|
5928
6225
|
* Upsert thumbs up/down feedback for the current generated file summary.
|
|
5929
6226
|
*/
|
|
5930
6227
|
'put'(
|
|
5931
6228
|
parameters?: Parameters<Paths.PutFileSummaryFeedback.PathParameters> | null,
|
|
5932
6229
|
data?: Paths.PutFileSummaryFeedback.RequestBody,
|
|
5933
|
-
config?: AxiosRequestConfig
|
|
6230
|
+
config?: AxiosRequestConfig
|
|
5934
6231
|
): OperationResponse<Paths.PutFileSummaryFeedback.Responses.$200>
|
|
5935
6232
|
}
|
|
5936
6233
|
['/v1/files/{id}/summary-jobs']: {
|
|
@@ -5993,6 +6290,31 @@ interface PathsDictionary {
|
|
|
5993
6290
|
config?: AxiosRequestConfig
|
|
5994
6291
|
): OperationResponse<Paths.GetFileText.Responses.$200>
|
|
5995
6292
|
}
|
|
6293
|
+
['/v1/files/validations']: {
|
|
6294
|
+
/**
|
|
6295
|
+
* validateFile - validateFile
|
|
6296
|
+
*
|
|
6297
|
+
* Validate an uploaded file against one or more document validation rules
|
|
6298
|
+
* (validation-rules-api rules with `input_type: document`).
|
|
6299
|
+
*
|
|
6300
|
+
* The file is referenced either by its file entity id or, for an upload that has not been
|
|
6301
|
+
* saved as an entity yet (e.g. a journey upload in the temporary prefix), by its S3 reference.
|
|
6302
|
+
* The service collects an observation of the file - deterministic facts such as the sniffed
|
|
6303
|
+
* mime type, size, page count, image resolution, blank and password-protection detection -
|
|
6304
|
+
* and evaluates every rule against it with the shared validation rules engine.
|
|
6305
|
+
*
|
|
6306
|
+
* The response carries one result per rule with a per-condition outcome (`pass`, `fail`,
|
|
6307
|
+
* `uncertain`, `skipped`), plus the observation the results were derived from. `status` is
|
|
6308
|
+
* `completed` for checks that finish synchronously; `pending` is reserved for check levels
|
|
6309
|
+
* that need asynchronous content extraction.
|
|
6310
|
+
*
|
|
6311
|
+
*/
|
|
6312
|
+
'post'(
|
|
6313
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
6314
|
+
data?: Paths.ValidateFile.RequestBody,
|
|
6315
|
+
config?: AxiosRequestConfig
|
|
6316
|
+
): OperationResponse<Paths.ValidateFile.Responses.$200>
|
|
6317
|
+
}
|
|
5996
6318
|
['/v1/files/{id}/preview']: {
|
|
5997
6319
|
/**
|
|
5998
6320
|
* previewFile - previewFile
|
|
@@ -6314,6 +6636,15 @@ type FileTextStatus = Components.Schemas.FileTextStatus;
|
|
|
6314
6636
|
type FileTextUnsupported = Components.Schemas.FileTextUnsupported;
|
|
6315
6637
|
type FileType = Components.Schemas.FileType;
|
|
6316
6638
|
type FileUpload = Components.Schemas.FileUpload;
|
|
6639
|
+
type FileValidation = Components.Schemas.FileValidation;
|
|
6640
|
+
type FileValidationConditionResult = Components.Schemas.FileValidationConditionResult;
|
|
6641
|
+
type FileValidationFacts = Components.Schemas.FileValidationFacts;
|
|
6642
|
+
type FileValidationFile = Components.Schemas.FileValidationFile;
|
|
6643
|
+
type FileValidationFileReference = Components.Schemas.FileValidationFileReference;
|
|
6644
|
+
type FileValidationJudgement = Components.Schemas.FileValidationJudgement;
|
|
6645
|
+
type FileValidationObservation = Components.Schemas.FileValidationObservation;
|
|
6646
|
+
type FileValidationRequest = Components.Schemas.FileValidationRequest;
|
|
6647
|
+
type FileValidationRuleResult = Components.Schemas.FileValidationRuleResult;
|
|
6317
6648
|
type PublicLink = Components.Schemas.PublicLink;
|
|
6318
6649
|
type PutFileSummaryFeedbackRequest = Components.Schemas.PutFileSummaryFeedbackRequest;
|
|
6319
6650
|
type S3Ref = Components.Schemas.S3Ref;
|
|
@@ -6327,4 +6658,4 @@ type UploadFilePayload = Components.Schemas.UploadFilePayload;
|
|
|
6327
6658
|
type VerifyCustomDownloadUrlPayload = Components.Schemas.VerifyCustomDownloadUrlPayload;
|
|
6328
6659
|
type ZipJob = Components.Schemas.ZipJob;
|
|
6329
6660
|
|
|
6330
|
-
export { type ActivityId as A, type BaseEntityAcl as B, type Client as C, type DownloadFilesPayload as D, type EntityId as E, type FileAttributes as F, type FileTextStatus as G, type FileTextUnsupported as H, type FileType as I, type FileUpload as J, type
|
|
6661
|
+
export { type SaveFilePayload as $, type ActivityId as A, type BaseEntityAcl as B, type Client as C, type DownloadFilesPayload as D, type EntityId as E, type FileAttributes as F, type FileTextStatus as G, type FileTextUnsupported as H, type FileType as I, type FileUpload as J, type FileValidation as K, type FileValidationConditionResult as L, type FileValidationFacts as M, type FileValidationFile as N, type OperationMethods as O, Paths as P, type FileValidationFileReference as Q, type FileValidationJudgement as R, type FileValidationObservation as S, type FileValidationRequest as T, type FileValidationRuleResult as U, type PublicLink as V, type PutFileSummaryFeedbackRequest as W, type S3Ref as X, type S3Reference as Y, type SaveCustomFilePayload as Z, type SaveFileFromSourceURLPayload as _, Components as a, type SaveFilePayloadV2 as a0, type SaveS3FilePayload as a1, type UploadFilePayload as a2, type VerifyCustomDownloadUrlPayload as a3, type ZipJob as a4, type PathsDictionary as b, type BaseEntityOwner as c, type BatchSaveFileVersionPayload as d, type CommonSaveFilePayload as e, type CreateZipJobPayload as f, type CustomDownloadUrl as g, type CustomDownloadUrlAuth as h, type EntitySlug as i, type ErrorObject as j, type FileCollectionAttributes as k, type FileCollectionCreateRequest as l, type FileCollectionId as m, type FileCollectionItem as n, type FileEntity as o, type FileEntityId as p, type FileItem as q, type FileRelationItem as r, type FileSummary as s, type FileSummaryFeedback as t, type FileSummaryFeedbackResponse as u, type FileSummaryJob as v, type FileSummaryJobStatus as w, type FileText as x, type FileTextNotReady as y, type FileTextReady as z };
|