@epilot/sdk 2.10.0 → 2.10.2
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/ai-agents-runtime.json +1 -1
- package/definitions/ai-agents.json +971 -98
- package/definitions/customer-portal-runtime.json +1 -1
- package/definitions/customer-portal.json +1238 -124
- package/definitions/file-runtime.json +1 -1
- package/definitions/file.json +291 -15
- package/definitions/targeting-runtime.json +1 -1
- package/definitions/targeting.json +7 -2
- package/definitions/workflow-runtime.json +1 -1
- package/definitions/workflow.json +445 -60
- package/dist/ai-agents-D6C5TXLD.cjs +7 -0
- package/dist/ai-agents-Y6PH53PH.js +7 -0
- package/dist/{ai-agents-runtime-25YRUJHI.js → ai-agents-runtime-EA23HCCP.js} +1 -1
- package/dist/{ai-agents-runtime-TILIO3UM.cjs → ai-agents-runtime-WZ3EI3NH.cjs} +2 -2
- package/dist/{ai-agents.d-CC5IjXrs.d.cts → ai-agents.d-D-7bTH-9.d.cts} +506 -5
- package/dist/{ai-agents.d-CC5IjXrs.d.ts → ai-agents.d-D-7bTH-9.d.ts} +506 -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 +8 -8
- package/dist/apis/ai-agents.d.cts +2 -2
- package/dist/apis/ai-agents.d.ts +2 -2
- package/dist/apis/ai-agents.js +2 -2
- 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 +8 -8
- package/dist/apis/customer-portal.d.cts +2 -2
- package/dist/apis/customer-portal.d.ts +2 -2
- package/dist/apis/customer-portal.js +2 -2
- 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 +6 -6
- package/dist/apis/entity.js +1 -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 +6 -6
- package/dist/apis/journey.js +1 -1
- 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 -6
- package/dist/apis/pricing.js +1 -1
- 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 +8 -8
- package/dist/apis/targeting.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- package/dist/apis/targeting.js +2 -2
- 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 +8 -8
- package/dist/apis/workflow.d.cts +2 -2
- package/dist/apis/workflow.d.ts +2 -2
- package/dist/apis/workflow.js +2 -2
- package/dist/{chunk-KQKBSWGI.js → chunk-522LYPPW.js} +1 -1
- package/dist/{chunk-MCK2QUSD.cjs → chunk-7ILTRJDQ.cjs} +1 -1
- package/dist/chunk-BRWY3QHG.js +14 -0
- package/dist/chunk-G5KVG3RU.js +14 -0
- package/dist/{chunk-LSPXLT3A.js → chunk-H3NMCCSA.js} +1 -1
- package/dist/chunk-JBPITLKN.cjs +14 -0
- package/dist/chunk-LNLUCLPL.cjs +14 -0
- package/dist/chunk-LSMVZMBY.js +14 -0
- package/dist/{chunk-XH5F3S6Y.js → chunk-O6DUKVXV.js} +10 -10
- package/dist/{chunk-QNZPOA54.cjs → chunk-PM25LLET.cjs} +1 -1
- package/dist/{chunk-OJGUX5TG.cjs → chunk-WK3YGGRO.cjs} +10 -10
- package/dist/chunk-YEBEA6XU.cjs +14 -0
- package/dist/customer-portal-MY3GZVUL.cjs +7 -0
- package/dist/customer-portal-YSODD3RC.js +7 -0
- package/dist/{customer-portal-runtime-TDHV2YVY.js → customer-portal-runtime-C6ZIKX2V.js} +1 -1
- package/dist/{customer-portal-runtime-HA6CPWB4.cjs → customer-portal-runtime-M7O3RDJ5.cjs} +2 -2
- package/dist/{customer-portal.d-BRwiQehb.d.cts → customer-portal.d-Bx5_n5UL.d.cts} +827 -8
- package/dist/{customer-portal.d-BRwiQehb.d.ts → customer-portal.d-Bx5_n5UL.d.ts} +827 -8
- package/dist/file-7CQXDQ3I.cjs +7 -0
- package/dist/file-O6ZD3HOU.js +7 -0
- package/dist/file-runtime-HYLQTQBX.cjs +5 -0
- package/dist/{file-runtime-DKGFS44O.js → file-runtime-VY6DJAQ3.js} +1 -1
- package/dist/{file.d-BjlMgTwj.d.cts → file.d-BN417xok.d.cts} +416 -23
- package/dist/{file.d-BjlMgTwj.d.ts → file.d-BN417xok.d.ts} +416 -23
- package/dist/index.cjs +18 -18
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/dist/{targeting-WC62BBZN.cjs → targeting-4YMBBPDW.cjs} +1 -1
- package/dist/{targeting-X4Y2ODBT.js → targeting-VCENULF6.js} +1 -1
- package/dist/{targeting-runtime-D5YUPZQM.js → targeting-runtime-QI7322HB.js} +1 -1
- package/dist/{targeting-runtime-MLMOM7CK.cjs → targeting-runtime-X3DQ527N.cjs} +2 -2
- package/dist/{targeting.d-0rNF7ErD.d.cts → targeting.d-Bq3onSes.d.cts} +1 -1
- package/dist/{targeting.d-0rNF7ErD.d.ts → targeting.d-Bq3onSes.d.ts} +1 -1
- package/dist/workflow-7OU2YEEI.cjs +7 -0
- package/dist/workflow-IVKCWS44.js +7 -0
- package/dist/{workflow-runtime-DNTQDYPQ.js → workflow-runtime-L5HMFISV.js} +1 -1
- package/dist/{workflow-runtime-VKFESVFX.cjs → workflow-runtime-LMGACZP4.cjs} +2 -2
- package/dist/{workflow.d-CMSKt8oN.d.cts → workflow.d-eFv0ecBi.d.cts} +745 -81
- package/dist/{workflow.d-CMSKt8oN.d.ts → workflow.d-eFv0ecBi.d.ts} +745 -81
- package/docs/ai-agents.md +641 -23
- package/docs/customer-portal.md +700 -31
- package/docs/file.md +165 -25
- package/docs/targeting.md +1 -1
- package/docs/workflow.md +247 -47
- package/package.json +11 -12
- package/definitions/focus-pocus-runtime.json +0 -1
- package/definitions/focus-pocus.json +0 -757
- package/dist/ai-agents-IZWFEUSH.js +0 -7
- package/dist/ai-agents-PWHKNRCX.cjs +0 -7
- package/dist/chunk-4M5V6BIT.cjs +0 -14
- package/dist/chunk-5ZXGKLB6.cjs +0 -14
- package/dist/chunk-774ASAAH.js +0 -14
- package/dist/chunk-FARDEGPH.cjs +0 -14
- package/dist/chunk-JENQHXFI.js +0 -14
- package/dist/chunk-RDVFQOCQ.js +0 -14
- package/dist/customer-portal-4DXHY42V.js +0 -7
- package/dist/customer-portal-5OSGSYGF.cjs +0 -7
- package/dist/file-2MSILSPP.cjs +0 -7
- package/dist/file-JVFTT5RZ.js +0 -7
- package/dist/file-runtime-7AWKNQU6.cjs +0 -5
- package/dist/workflow-3WBD74WR.js +0 -7
- package/dist/workflow-WIUZ5TOX.cjs +0 -7
package/dist/file-2MSILSPP.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
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- [`generateFileSummary`](#generatefilesummary)\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- [`FileSummaryStatus`](#filesummarystatus)\n- [`FileSummaryGenerationStatus`](#filesummarygenerationstatus)\n- [`CustomDownloadUrl`](#customdownloadurl)\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 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 preview_summary_de: \'string\',\n short_summary_de: \'string\',\n preview_summary_en: \'string\',\n short_summary_en: \'string\',\n summary_status: \'processing\',\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 "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 "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "summary_status": "processing",\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 }\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 "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 "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "summary_status": "processing",\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 }\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 "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 "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "summary_status": "processing",\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 }\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})\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### `generateFileSummary`\n\nRequest AI generation of preview and short summaries 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### `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 "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 "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "summary_status": "processing",\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 }\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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### `FileSummaryStatus`\n\nCurrent AI summary generation state for the file.\n\n```ts\ntype FileSummaryStatus = "processing" | "completed" | "failed" | "unsupported"\n```\n\n### `FileSummaryGenerationStatus`\n\n```ts\ntype FileSummaryGenerationStatus = {\n status: "processing" | "completed" | "failed" | "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### `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 access_control: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 }>\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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}\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
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = file_default;
|
package/dist/file-JVFTT5RZ.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
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- [`generateFileSummary`](#generatefilesummary)\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- [`FileSummaryStatus`](#filesummarystatus)\n- [`FileSummaryGenerationStatus`](#filesummarygenerationstatus)\n- [`CustomDownloadUrl`](#customdownloadurl)\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 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 preview_summary_de: \'string\',\n short_summary_de: \'string\',\n preview_summary_en: \'string\',\n short_summary_en: \'string\',\n summary_status: \'processing\',\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 "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 "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "summary_status": "processing",\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 }\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 "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 "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "summary_status": "processing",\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 }\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 "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 "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "summary_status": "processing",\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 }\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})\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### `generateFileSummary`\n\nRequest AI generation of preview and short summaries 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### `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 "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 "preview_summary_de": "string",\n "short_summary_de": "string",\n "preview_summary_en": "string",\n "short_summary_en": "string",\n "summary_status": "processing",\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 }\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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### `FileSummaryStatus`\n\nCurrent AI summary generation state for the file.\n\n```ts\ntype FileSummaryStatus = "processing" | "completed" | "failed" | "unsupported"\n```\n\n### `FileSummaryGenerationStatus`\n\n```ts\ntype FileSummaryGenerationStatus = {\n status: "processing" | "completed" | "failed" | "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### `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 access_control: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 }>\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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 access_control?: "private" | "public-read"\n public_url?: string // url\n custom_download_url?: string // uri\n preview_summary_de?: string\n short_summary_de?: string\n preview_summary_en?: string\n short_summary_en?: string\n summary_status?: "processing" | "completed" | "failed" | "unsupported"\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}\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
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/workflow.json
|
|
4
|
-
var workflow_default = '# Workflows Executions\n\n- **Base URL:** `https://workflows-execution.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/workflow](https://docs.epilot.io/api/workflow)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.workflow.getExecutions(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/workflow\'\n\nconst workflowClient = getClient()\nauthorize(workflowClient, () => \'<token>\')\nconst { data } = await workflowClient.getExecutions(...)\n```\n\n## Operations\n\n**Workflow Executions**\n- [`getExecutions`](#getexecutions)\n- [`createExecution`](#createexecution)\n- [`getExecution`](#getexecution)\n- [`updateExecution`](#updateexecution)\n- [`deleteExecution`](#deleteexecution)\n\n**Workflow Steps**\n- [`createStep`](#createstep)\n- [`updateStep`](#updatestep)\n- [`deleteStep`](#deletestep)\n\n**Closing Reasons**\n- [`getClosingReasonExecution`](#getclosingreasonexecution)\n\n**Flows V2**\n- [`startFlowExecution`](#startflowexecution)\n- [`getFlowExecution`](#getflowexecution)\n- [`patchFlowExecution`](#patchflowexecution)\n- [`deleteFlowExecution`](#deleteflowexecution)\n- [`searchFlowExecutions`](#searchflowexecutions)\n- [`patchTask`](#patchtask)\n- [`runTaskAutomation`](#runtaskautomation)\n- [`executeTask`](#executetask)\n- [`patchPhase`](#patchphase)\n- [`addTask`](#addtask)\n- [`cancelTaskSchedule`](#canceltaskschedule)\n- [`runTaskScheduleNow`](#runtaskschedulenow)\n\n**Schemas**\n- [`WorkflowExecutionCreateReq`](#workflowexecutioncreatereq)\n- [`WorkflowExecutionUpdateReq`](#workflowexecutionupdatereq)\n- [`ClosingReason`](#closingreason)\n- [`WorkflowContext`](#workflowcontext)\n- [`WorkflowExecutionBase`](#workflowexecutionbase)\n- [`WorkflowExecutionSlim`](#workflowexecutionslim)\n- [`FlowSlim`](#flowslim)\n- [`Flow`](#flow)\n- [`WorkflowExecution`](#workflowexecution)\n- [`WorkflowStatus`](#workflowstatus)\n- [`SectionSimplified`](#sectionsimplified)\n- [`Section`](#section)\n- [`StepId`](#stepid)\n- [`StepSimplified`](#stepsimplified)\n- [`Step`](#step)\n- [`StepExtended`](#stepextended)\n- [`StepStatus`](#stepstatus)\n- [`SectionStatus`](#sectionstatus)\n- [`StepType`](#steptype)\n- [`StepJourney`](#stepjourney)\n- [`AutomationConfig`](#automationconfig)\n- [`ECPDetails`](#ecpdetails)\n- [`PartnerDetails`](#partnerdetails)\n- [`StepDescription`](#stepdescription)\n- [`ItemType`](#itemtype)\n- [`TriggerType`](#triggertype)\n- [`CreateStepReq`](#createstepreq)\n- [`UpdateStepReq`](#updatestepreq)\n- [`StepPositionAt`](#steppositionat)\n- [`UpdateStepResp`](#updatestepresp)\n- [`SearchStepsResp`](#searchstepsresp)\n- [`SearchExecutionsReq`](#searchexecutionsreq)\n- [`SearchExecutionsResp`](#searchexecutionsresp)\n- [`LastEvaluatedKey`](#lastevaluatedkey)\n- [`SearchStepsReq`](#searchstepsreq)\n- [`SearchSorting`](#searchsorting)\n- [`SearchPagination`](#searchpagination)\n- [`ExecutionPaginationDynamo`](#executionpaginationdynamo)\n- [`ErrorResp`](#errorresp)\n- [`ClosingReasonResp`](#closingreasonresp)\n- [`PhaseInEntity`](#phaseinentity)\n- [`WorkflowInEntity`](#workflowinentity)\n- [`UpdateEntityAttributes`](#updateentityattributes)\n- [`EntitySync`](#entitysync)\n- [`DynamicDueDate`](#dynamicduedate)\n- [`StepRequirement`](#steprequirement)\n- [`StartFlowReq`](#startflowreq)\n- [`SearchFlowsReq`](#searchflowsreq)\n- [`PatchFlowReq`](#patchflowreq)\n- [`FlowExecution`](#flowexecution)\n- [`FlowClosingReason`](#flowclosingreason)\n- [`FlowTrigger`](#flowtrigger)\n- [`FlowContext`](#flowcontext)\n- [`EntityRef`](#entityref)\n- [`PhaseId`](#phaseid)\n- [`TaskId`](#taskid)\n- [`Task`](#task)\n- [`TaskType`](#tasktype)\n- [`ManualTask`](#manualtask)\n- [`AutomationTask`](#automationtask)\n- [`LoopInfo`](#loopinfo)\n- [`LoopConfig`](#loopconfig)\n- [`TriggerMode`](#triggermode)\n- [`ActionSchedule`](#actionschedule)\n- [`ImmediateSchedule`](#immediateschedule)\n- [`DelayedSchedule`](#delayedschedule)\n- [`RelativeSchedule`](#relativeschedule)\n- [`DecisionTask`](#decisiontask)\n- [`AiAgentTask`](#aiagenttask)\n- [`AgentConfig`](#agentconfig)\n- [`AgentExecutionInfo`](#agentexecutioninfo)\n- [`TaskBase`](#taskbase)\n- [`Phase`](#phase)\n- [`Edge`](#edge)\n- [`AutomationInfo`](#automationinfo)\n- [`AutomationInputContext`](#automationinputcontext)\n- [`AnalyticsInfo`](#analyticsinfo)\n- [`ConditionId`](#conditionid)\n- [`Condition`](#condition)\n- [`Statement`](#statement)\n- [`EvaluationSource`](#evaluationsource)\n- [`Operator`](#operator)\n- [`DueDateConfig`](#duedateconfig)\n- [`TimeUnit`](#timeunit)\n- [`EnableRequirement`](#enablerequirement)\n- [`FlowTemplateId`](#flowtemplateid)\n- [`FlowExecutionId`](#flowexecutionid)\n- [`UserId`](#userid)\n- [`VariableAssignment`](#variableassignment)\n- [`Assignees`](#assignees)\n- [`PatchTaskReq`](#patchtaskreq)\n- [`PatchPhaseReq`](#patchphasereq)\n- [`AddTaskReq`](#addtaskreq)\n\n### `getExecutions`\n\nRetrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are more light weight - steps are not loaded with all information.\n\n`GET /v1/workflows/executions`\n\n```ts\nconst { data } = await client.getExecutions({\n context: \'example\',\n schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "id": "8gja72h6kas6h",\n "name": "Lead Qualification",\n "trigger": "MANUAL",\n "status": "STARTED",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:01:13.000Z",\n "flow": [\n {\n "id": "sectionId1",\n "definitionId": "section_definition_id_1",\n "name": "Initial Information Gathering",\n "type": "SECTION",\n "steps": [\n {\n "id": "sada5641f3a21",\n "definitionId": "step_definition_id_1",\n "name": "Call client"\n },\n {\n "id": "sada5641f3a22",\n "definitionId": "step_definition_id_2",\n "name": "Check product availability"\n }\n ]\n },\n {\n "id": "firstLevelStepId1",\n "definitionId": "step_definition_id_4",\n "name": "Print and send catalog",\n "type": "STEP"\n }\n ]\n }\n]\n```\n\n</details>\n\n---\n\n### `createExecution`\n\nCreate a Workflow Execution. Start a new workflow execution, based on a workflow definition (template).\n\n`POST /v1/workflows/executions`\n\n```ts\nconst { data } = await client.createExecution(\n null,\n {\n workflowId: \'j3f23fh23uif98\',\n trigger: \'AUTOMATIC\',\n contexts: [\n {\n id: \'3fa3fa86-0907-4642-a57e-0fe30a19874d\',\n schema: \'contact\'\n },\n {\n id: \'3a6d42fa-5070-4723-b90f-41ead4303e33\',\n schema: \'opportunity\'\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "8gja72h6kas6h",\n "name": "Lead Qualification",\n "trigger": "MANUAL",\n "status": "STARTED",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:01:13.000Z",\n "assignedTo": ["252", "29052"],\n "flow": [\n {\n "id": "sectionId1",\n "name": "Initial Information Gathering",\n "steps": [\n {\n "id": "sada5641f3a21",\n "name": "Call client and confirm address and product",\n "definitionId": "step_definition_id_1",\n "status": "ASSIGNED",\n "assignedTo": ["11"]\n },\n {\n "id": "sada5641f3a22",\n "name": "Check product availability",\n "status": "UNASSIGNED",\n "definitionId": "step_definition_id_2"\n }\n ]\n },\n {\n "id": "firstLevelStepId1",\n "definitionId": "step_definition_id_4",\n "name": "Print and send catalog",\n "status": "SKIPPED",\n "dueDate": "2023-01-15T20:00:00"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getExecution`\n\nGet a full workflow execution, included steps information, by execution id.\n\n`GET /v1/workflows/executions/{executionId}`\n\n```ts\nconst { data } = await client.getExecution({\n executionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "8gja72h6kas6h",\n "name": "Lead Qualification",\n "trigger": "MANUAL",\n "status": "STARTED",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:01:13.000Z",\n "assignedTo": ["252", "29052"],\n "flow": [\n {\n "id": "sectionId1",\n "name": "Initial Information Gathering",\n "steps": [\n {\n "id": "sada5641f3a21",\n "name": "Call client and confirm address and product",\n "definitionId": "step_definition_id_1",\n "status": "ASSIGNED",\n "assignedTo": ["11"]\n },\n {\n "id": "sada5641f3a22",\n "name": "Check product availability",\n "status": "UNASSIGNED",\n "definitionId": "step_definition_id_2"\n }\n ]\n },\n {\n "id": "firstLevelStepId1",\n "definitionId": "step_definition_id_4",\n "name": "Print and send catalog",\n "status": "SKIPPED",\n "dueDate": "2023-01-15T20:00:00"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `updateExecution`\n\nPatches updates like assignees, status, closingReason for a single Workflow Execution.\n\n`PATCH /v1/workflows/executions/{executionId}`\n\n```ts\nconst { data } = await client.updateExecution(\n {\n executionId: \'example\',\n },\n {\n status: \'STARTED\',\n assignedTo: [\'string\'],\n selectedClosingReasons: [\n {\n id: \'string\',\n title: \'string\'\n }\n ],\n closingReasonDescription: \'string\',\n dueDate: \'string\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n closedBy: \'string\',\n contexts: [\n {\n id: \'string\',\n title: \'string\',\n schema: \'string\'\n }\n ],\n completedTime: \'string\'\n },\n)\n```\n\n---\n\n### `deleteExecution`\n\nDelete workflow execution by id. Workflow contexts will NOT be deleted.\n\n`DELETE /v1/workflows/executions/{executionId}`\n\n```ts\nconst { data } = await client.deleteExecution({\n executionId: \'example\',\n})\n```\n\n---\n\n### `createStep`\n\nCreate a new step in current workflow execution.\n\n`POST /v1/workflows/executions/{executionId}/steps`\n\n```ts\nconst { data } = await client.createStep(\n {\n executionId: \'example\',\n },\n {\n insertionIndex: 0,\n name: \'string\',\n description: {\n enabled: true,\n value: \'string\'\n },\n status: \'UNASSIGNED\',\n sectionId: \'string\',\n executionType: \'MANUAL\',\n automationConfig: {\n flowId: \'string\',\n executionId: \'string\',\n executionStatus: \'string\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "definitionId": "string",\n "entityRefId": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "type": "STEP",\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "enabled": true,\n "requirements": [\n {\n "definitionId": "string",\n "type": "STEP",\n "condition": "CLOSED"\n }\n ],\n "executionType": "MANUAL",\n "sectionId": "string",\n "executionId": "string",\n "userIds": [0],\n "assignedTo": ["string"],\n "assignedToInProgress": "string",\n "assignedToOnHold": "string",\n "status": "UNASSIGNED",\n "created": "string",\n "lastUpdated": "string",\n "statusLastUpdated": "string",\n "startedTime": "string",\n "completedTime": "string",\n "dueDate": "string",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "manuallyCreated": true,\n "automationConfig": {\n "flowId": "string",\n "executionId": "string",\n "executionStatus": "string"\n },\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\n "taxonomies": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `updateStep`\n\nPatches various changes to a workflow execution step.\n\n`PATCH /v1/workflows/executions/{executionId}/steps/{stepId}`\n\n```ts\nconst { data } = await client.updateStep(\n {\n executionId: \'example\',\n stepId: \'example\',\n },\n {\n stepId: \'string\',\n entityRefId: \'string\',\n userIds: [0],\n assignedTo: [\'string\'],\n assignedToInProgress: \'string\',\n assignedToOnHold: \'string\',\n status: \'UNASSIGNED\',\n dueDate: \'string\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n name: \'string\',\n description: {\n enabled: true,\n value: \'string\'\n },\n position: {\n index: 0,\n sectionId: \'string\'\n },\n automationConfig: {\n flowId: \'string\',\n executionId: \'string\',\n executionStatus: \'string\'\n },\n startedTime: \'string\',\n completedTime: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "definitionId": "string",\n "entityRefId": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "type": "STEP",\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "enabled": true,\n "requirements": [\n {\n "definitionId": "string",\n "type": "STEP",\n "condition": "CLOSED"\n }\n ],\n "executionType": "MANUAL",\n "sectionId": "string",\n "executionId": "string",\n "userIds": [0],\n "assignedTo": ["string"],\n "assignedToInProgress": "string",\n "assignedToOnHold": "string",\n "status": "UNASSIGNED",\n "created": "string",\n "lastUpdated": "string",\n "statusLastUpdated": "string",\n "startedTime": "string",\n "completedTime": "string",\n "dueDate": "string",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "manuallyCreated": true,\n "automationConfig": {\n "flowId": "string",\n "executionId": "string",\n "executionStatus": "string"\n },\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\n "taxonomies": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `deleteStep`\n\nDeletes a step from a workflow execution.\n\n`DELETE /v1/workflows/executions/{executionId}/steps/{stepId}`\n\n```ts\nconst { data } = await client.deleteStep({\n executionId: \'example\',\n stepId: \'example\',\n})\n```\n\n---\n\n### `getClosingReasonExecution`\n\nShows all Closing Reasons defined at the moment of starting the Workflow Execution.\nThe Closing Reasons shown in the execution are just snapshots\nfrom the state of the Definition when the instance was\n\n`GET /v1/workflows/executions/{executionId}/closing-reasons`\n\n```ts\nconst { data } = await client.getClosingReasonExecution({\n executionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "reasons": [\n {\n "id": "string",\n "title": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `startFlowExecution`\n\nStarts a new Flow Execution based on a flow template.\n\n`POST /v2/flows/executions`\n\n```ts\nconst { data } = await client.startFlowExecution(\n null,\n {\n flow_template_id: \'string\',\n trigger: {\n type: \'MANUAL\',\n automation_config: {\n flow_id: \'string\',\n execution_id: \'string\',\n execution_status: \'string\',\n error_reason: \'string\',\n input_context: {\n source: \'trigger\',\n task_id: \'string\'\n }\n }\n },\n contexts: [\n {\n entity_id: \'string\',\n entity_schema: \'string\',\n is_primary: false\n }\n ],\n purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "flow_template_id": "string",\n "org_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string",\n "due_date": "string",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "status": "STARTED",\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "string",\n "completed_at": "string",\n "closed_at": "string",\n "started_by": "string",\n "closed_by": "string"\n },\n "contexts": [\n {\n "entity_id": "string",\n "entity_schema": "string",\n "is_primary": false\n }\n ],\n "crt_tasks": [\n {\n "id": "string"\n }\n ],\n "phases": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "status": "OPEN",\n "updated_at": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "analytics": {},\n "taxonomies": ["string"],\n "loop_config": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {},\n "status": "UNASSIGNED",\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "analytics": {},\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {}\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "abc123",\n "none_met": true\n }\n ],\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n },\n "closing_reason": {\n "selected_reasons": [\n {}\n ],\n "configured_reasons": [\n {}\n ],\n "extra_description": "string"\n },\n "available_in_ecp": true,\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "trigger": {\n "type": "MANUAL",\n "automation_config": {\n "flow_id": "string",\n "execution_id": "string",\n "execution_status": "string",\n "error_reason": "string",\n "input_context": {}\n }\n },\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `getFlowExecution`\n\nGet a full flow execution, included tasks, phases, edges & analytics.\n\n`GET /v2/flows/executions/{execution_id}`\n\n```ts\nconst { data } = await client.getFlowExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "flow_template_id": "string",\n "org_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string",\n "due_date": "string",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "status": "STARTED",\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "string",\n "completed_at": "string",\n "closed_at": "string",\n "started_by": "string",\n "closed_by": "string"\n },\n "contexts": [\n {\n "entity_id": "string",\n "entity_schema": "string",\n "is_primary": false\n }\n ],\n "crt_tasks": [\n {\n "id": "string"\n }\n ],\n "phases": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "status": "OPEN",\n "updated_at": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "analytics": {},\n "taxonomies": ["string"],\n "loop_config": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {},\n "status": "UNASSIGNED",\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "analytics": {},\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {}\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "abc123",\n "none_met": true\n }\n ],\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n },\n "closing_reason": {\n "selected_reasons": [\n {}\n ],\n "configured_reasons": [\n {}\n ],\n "extra_description": "string"\n },\n "available_in_ecp": true,\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "trigger": {\n "type": "MANUAL",\n "automation_config": {\n "flow_id": "string",\n "execution_id": "string",\n "execution_status": "string",\n "error_reason": "string",\n "input_context": {}\n }\n },\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `patchFlowExecution`\n\nPatch flow execution with new assignees, status, analytics & other changes.\n\n`PATCH /v2/flows/executions/{execution_id}`\n\n```ts\nconst { data } = await client.patchFlowExecution(\n {\n execution_id: \'example\',\n },\n {\n status: \'STARTED\',\n assigned_to: [\'string\'],\n closing_reason: {\n selected_reasons: [\n {\n id: \'string\',\n title: \'string\'\n }\n ],\n configured_reasons: [\n {\n id: \'string\',\n title: \'string\'\n }\n ],\n extra_description: \'string\'\n },\n due_date: \'string\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n contexts: [\n {\n entity_id: \'string\',\n entity_schema: \'string\',\n is_primary: false\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "flow_template_id": "string",\n "org_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string",\n "due_date": "string",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "status": "STARTED",\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "string",\n "completed_at": "string",\n "closed_at": "string",\n "started_by": "string",\n "closed_by": "string"\n },\n "contexts": [\n {\n "entity_id": "string",\n "entity_schema": "string",\n "is_primary": false\n }\n ],\n "crt_tasks": [\n {\n "id": "string"\n }\n ],\n "phases": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "status": "OPEN",\n "updated_at": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "analytics": {},\n "taxonomies": ["string"],\n "loop_config": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {},\n "status": "UNASSIGNED",\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "analytics": {},\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {}\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "abc123",\n "none_met": true\n }\n ],\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n },\n "closing_reason": {\n "selected_reasons": [\n {}\n ],\n "configured_reasons": [\n {}\n ],\n "extra_description": "string"\n },\n "available_in_ecp": true,\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "trigger": {\n "type": "MANUAL",\n "automation_config": {\n "flow_id": "string",\n "execution_id": "string",\n "execution_status": "string",\n "error_reason": "string",\n "input_context": {}\n }\n },\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `deleteFlowExecution`\n\nDeletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted.\n\n`DELETE /v2/flows/executions/{execution_id}`\n\n```ts\nconst { data } = await client.deleteFlowExecution({\n execution_id: \'example\',\n soft: true,\n})\n```\n\n---\n\n### `searchFlowExecutions`\n\nSearch Flow Executions for a specific Entity.\n\n`POST /v2/flows/executions:search`\n\n```ts\nconst { data } = await client.searchFlowExecutions(\n null,\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "string",\n "flow_template_id": "string",\n "org_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string",\n "due_date": "string",\n "due_date_config": {},\n "status": "STARTED",\n "assigned_to": ["string"],\n "analytics": {},\n "contexts": [],\n "crt_tasks": [],\n "phases": [],\n "tasks": [],\n "edges": [],\n "_execution_chain": {},\n "closing_reason": {},\n "available_in_ecp": true,\n "entity_sync": [],\n "taxonomies": ["string"],\n "trigger": {},\n "singleClosingReasonSelection": true\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `patchTask`\n\nChanges various attributes of a flow task, like assignees, status, due date, etc.\n\n`PATCH /v2/flows/executions/{execution_id}/tasks/{task_id}`\n\n```ts\nconst { data } = await client.patchTask(\n {\n execution_id: \'example\',\n task_id: \'example\',\n },\n {\n name: \'string\',\n status: \'UNASSIGNED\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\'],\n enabled: true,\n automation_config: {\n flow_id: \'string\',\n execution_id: \'string\',\n execution_status: \'string\',\n error_reason: \'string\',\n input_context: {\n source: \'trigger\',\n task_id: \'string\'\n }\n },\n description: {\n enabled: true,\n value: \'string\'\n },\n ecp: {\n enabled: true,\n label: \'string\',\n description: \'string\',\n journey: {\n id: \'string\',\n journeyId: \'string\',\n name: \'string\',\n complete_task_automatically: true\n }\n },\n installer: {\n enabled: true,\n label: \'string\',\n description: \'string\',\n journey: {\n id: \'string\',\n journeyId: \'string\',\n name: \'string\',\n complete_task_automatically: true\n }\n },\n partner: {\n enabled: true,\n label: \'string\',\n description: \'string\'\n },\n next_condition_id: \'string\',\n revert_execution: false\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `runTaskAutomation`\n\nRuns configured automation for a flow task\n\n`POST /v2/flows/executions/{execution_id}/tasks/{task_id}/automation:run`\n\n```ts\nconst { data } = await client.runTaskAutomation({\n execution_id: \'example\',\n task_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {\n "flow_id": "string",\n "execution_id": "string",\n "execution_status": "string",\n "error_reason": "string",\n "input_context": {\n "source": "trigger",\n "task_id": "string"\n }\n },\n "automation_execution_id": "string",\n "trigger_mode": "manual",\n "schedule": {\n "mode": "immediate"\n },\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `executeTask`\n\nExecutes any kind of flow task immediately.\n\n`POST /v2/flows/executions/{execution_id}/tasks/{task_id}/execute`\n\n```ts\nconst { data } = await client.executeTask({\n execution_id: \'example\',\n task_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `patchPhase`\n\nApply updates to a phase within flow execution\n\n`PATCH /v2/flows/executions/{execution_id}/phases/{phase_id}`\n\n```ts\nconst { data } = await client.patchPhase(\n {\n execution_id: \'example\',\n phase_id: \'example\',\n },\n {\n name: \'string\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "status": "OPEN",\n "updated_at": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "taxonomies": ["string"],\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `addTask`\n\nCreate a new task in current workflow execution.\n\n`POST /v2/flows/executions/{execution_id}/tasks`\n\n```ts\nconst { data } = await client.addTask(\n {\n execution_id: \'example\',\n },\n {\n previous_task_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n next_task_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n task: {\n id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n name: \'string\',\n status: \'UNASSIGNED\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\'],\n enabled: true,\n automation_config: {\n flow_id: \'string\',\n execution_id: \'string\',\n execution_status: \'string\',\n error_reason: \'string\',\n input_context: {\n source: \'trigger\',\n task_id: \'string\'\n }\n },\n phase_id: \'string\',\n task_type: \'MANUAL\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `cancelTaskSchedule`\n\nCancels a scheduled task, deleting the schedule and marking the task as skipped.\n\n`DELETE /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule`\n\n```ts\nconst { data } = await client.cancelTaskSchedule({\n execution_id: \'example\',\n task_id: \'example\',\n})\n```\n\n---\n\n### `runTaskScheduleNow`\n\nCancels the pending schedule for a task and immediately triggers its automation execution.\n\n`POST /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule/run-now`\n\n```ts\nconst { data } = await client.runTaskScheduleNow({\n execution_id: \'example\',\n task_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `WorkflowExecutionCreateReq`\n\n```ts\ntype WorkflowExecutionCreateReq = {\n workflowId: string\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n purposes?: string[]\n}\n```\n\n### `WorkflowExecutionUpdateReq`\n\n```ts\ntype WorkflowExecutionUpdateReq = {\n status?: "STARTED" | "DONE" | "CLOSED"\n assignedTo?: string[]\n selectedClosingReasons?: Array<{\n id: string\n title: string\n }>\n closingReasonDescription?: string\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n closedBy?: string\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n completedTime?: string\n}\n```\n\n### `ClosingReason`\n\n```ts\ntype ClosingReason = {\n id: string\n title: string\n}\n```\n\n### `WorkflowContext`\n\n```ts\ntype WorkflowContext = {\n id: string\n title: string\n schema: string\n}\n```\n\n### `WorkflowExecutionBase`\n\n```ts\ntype WorkflowExecutionBase = {\n id?: string\n definitionId?: string\n orgId?: string\n name?: string\n creationTime?: string\n lastUpdateTime?: string\n dueDate?: string\n completedTime?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n status?: "STARTED" | "DONE" | "CLOSED"\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n lastModifiedBy?: string\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n nextOpenStep?: {\n id?: string\n entityRefId?: string\n }\n configuredClosingReasonSnapshot?: Array<{\n id: string\n title: string\n }>\n selectedClosingReasons?: Array<{\n id: string\n title: string\n }>\n closingReasonDescription?: string\n enableECPWorkflow?: boolean\n updateEntityAttributes?: Array<{\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: { ... }\n entityAttribute: { ... }\n }\n }>\n version?: number\n taxonomies?: string[]\n singleClosingReasonSelection?: boolean\n}\n```\n\n### `WorkflowExecutionSlim`\n\n```ts\ntype WorkflowExecutionSlim = {\n id?: string\n definitionId?: string\n orgId?: string\n name?: string\n creationTime?: string\n lastUpdateTime?: string\n dueDate?: string\n completedTime?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n status?: "STARTED" | "DONE" | "CLOSED"\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n lastModifiedBy?: string\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n nextOpenStep?: {\n id?: string\n entityRefId?: string\n }\n configuredClosingReasonSnapshot?: Array<{\n id: string\n title: string\n }>\n selectedClosingReasons?: Array<{\n id: string\n title: string\n }>\n closingReasonDescription?: string\n enableECPWorkflow?: boolean\n updateEntityAttributes?: Array<{\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: { ... }\n entityAttribute: { ... }\n }\n }>\n version?: number\n taxonomies?: string[]\n singleClosingReasonSelection?: boolean\n flow: Array<{\n id: string\n definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: string[]\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n // ...\n}\n```\n\n### `FlowSlim`\n\n```ts\ntype FlowSlim = {\n flow: Array<{\n id: string\n definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: string[]\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n } | {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n partner?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n }\n enabled?: boolean\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: string\n dueDate?: string\n dynamicDueDate?: {\n // ...\n}\n```\n\n### `Flow`\n\n```ts\ntype Flow = {\n flow: Array<{\n id: string\n definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: string[]\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n } | {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n partner?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n }\n enabled?: boolean\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: string\n dueDate?: string\n dynamicDueDate?: {\n // ...\n}\n```\n\n### `WorkflowExecution`\n\n```ts\ntype WorkflowExecution = {\n id?: string\n definitionId?: string\n orgId?: string\n name?: string\n creationTime?: string\n lastUpdateTime?: string\n dueDate?: string\n completedTime?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n status?: "STARTED" | "DONE" | "CLOSED"\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n lastModifiedBy?: string\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n nextOpenStep?: {\n id?: string\n entityRefId?: string\n }\n configuredClosingReasonSnapshot?: Array<{\n id: string\n title: string\n }>\n selectedClosingReasons?: Array<{\n id: string\n title: string\n }>\n closingReasonDescription?: string\n enableECPWorkflow?: boolean\n updateEntityAttributes?: Array<{\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: { ... }\n entityAttribute: { ... }\n }\n }>\n version?: number\n taxonomies?: string[]\n singleClosingReasonSelection?: boolean\n flow: Array<{\n id: string\n definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: string[]\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n // ...\n}\n```\n\n### `WorkflowStatus`\n\n```ts\ntype WorkflowStatus = "STARTED" | "DONE" | "CLOSED"\n```\n\n### `SectionSimplified`\n\nA group of Steps that define the progress of the Workflow\n\n```ts\ntype SectionSimplified = {\n id: string\n definitionId?: string\n name: string\n type: "STEP" | "SECTION"\n steps: Array<{\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n partner?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n }\n enabled?: boolean\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n }>\n assignedTo?: string[]\n}\n```\n\n### `Section`\n\nA group of Steps that define the progress of the Workflow\n\n```ts\ntype Section = {\n id: string\n definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: string[]\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n partner?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n }\n enabled?: boolean\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: string\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n manuallyCreated?: boolean\n automationConfig?: {\n flowId: { ... }\n executionId?: { ... }\n executionStatus?: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n taxonomies?: string[]\n }>\n taxonomies?: string[]\n}\n```\n\n### `StepId`\n\n```ts\ntype StepId = {\n id?: string\n entityRefId?: string\n}\n```\n\n### `StepSimplified`\n\n```ts\ntype StepSimplified = {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n enabled?: boolean\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n}\n```\n\n### `Step`\n\n```ts\ntype Step = {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n enabled?: boolean\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: string\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n manuallyCreated?: boolean\n automationConfig?: {\n flowId: string\n executionId?: string\n executionStatus?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n taxonomies?: string[]\n}\n```\n\n### `StepExtended`\n\n```ts\ntype StepExtended = {\n executionId: string\n executionName: string\n executionStatus: "STARTED" | "DONE" | "CLOSED"\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n}\n```\n\n### `StepStatus`\n\n**Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:\n- **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)\n- **ASSIGNED**: Step has been assi\n\n```ts\ntype StepStatus = "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n```\n\n### `SectionStatus`\n\n```ts\ntype SectionStatus = "OPEN" | "IN_PROGRESS" | "COMPLETED"\n```\n\n### `StepType`\n\n```ts\ntype StepType = "MANUAL" | "AUTOMATION"\n```\n\n### `StepJourney`\n\n```ts\ntype StepJourney = {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n}\n```\n\n### `AutomationConfig`\n\nConfiguration for automation execution to run\n\n```ts\ntype AutomationConfig = {\n flowId: string\n executionId?: string\n executionStatus?: string\n}\n```\n\n### `ECPDetails`\n\nDetails regarding ECP for the workflow step\n\n```ts\ntype ECPDetails = {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n}\n```\n\n### `PartnerDetails`\n\nDetails regarding partner for the workflow step\n\n```ts\ntype PartnerDetails = {\n enabled?: boolean\n label?: string\n description?: string\n}\n```\n\n### `StepDescription`\n\nLonger information regarding Task\n\n```ts\ntype StepDescription = {\n enabled?: boolean\n value?: string\n}\n```\n\n### `ItemType`\n\n```ts\ntype ItemType = "STEP" | "SECTION"\n```\n\n### `TriggerType`\n\n```ts\ntype TriggerType = "MANUAL" | "AUTOMATIC"\n```\n\n### `CreateStepReq`\n\n```ts\ntype CreateStepReq = {\n insertionIndex: number\n name: string\n description?: {\n enabled: boolean\n value: string\n }\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n sectionId?: string\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: string\n executionId?: string\n executionStatus?: string\n }\n}\n```\n\n### `UpdateStepReq`\n\n```ts\ntype UpdateStepReq = {\n stepId?: string\n entityRefId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n name?: string\n description?: {\n enabled: boolean\n value: string\n }\n position?: {\n index: number\n sectionId?: string\n }\n automationConfig?: {\n flowId: string\n executionId?: string\n executionStatus?: string\n }\n startedTime?: string\n completedTime?: string\n}\n```\n\n### `StepPositionAt`\n\n```ts\ntype StepPositionAt = {\n index: number\n sectionId?: string\n}\n```\n\n### `UpdateStepResp`\n\n```ts\ntype UpdateStepResp = {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n enabled?: boolean\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: string\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n manuallyCreated?: boolean\n automationConfig?: {\n flowId: string\n executionId?: string\n executionStatus?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n taxonomies?: string[]\n}\n```\n\n### `SearchStepsResp`\n\n```ts\ntype SearchStepsResp = {\n hits?: number\n results?: Array<{\n executionId: string\n executionName: string\n executionStatus: "STARTED" | "DONE" | "CLOSED"\n contexts?: Array<{\n id: { ... }\n title: { ... }\n schema: { ... }\n }>\n }>\n}\n```\n\n### `SearchExecutionsReq`\n\n```ts\ntype SearchExecutionsReq = {\n name?: string\n status?: "STARTED" | "DONE" | "CLOSED"\n includeDoneWorkflows?: boolean\n assignedTo?: string\n sorting?: "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC"\n pagination?: {\n orgId?: string\n creationTime?: string\n }\n}\n```\n\n### `SearchExecutionsResp`\n\n```ts\ntype SearchExecutionsResp = {\n executions: Array<{\n id?: string\n definitionId?: string\n orgId?: string\n name?: string\n creationTime?: string\n lastUpdateTime?: string\n dueDate?: string\n completedTime?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n status?: "STARTED" | "DONE" | "CLOSED"\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n lastModifiedBy?: string\n contexts?: Array<{\n id: { ... }\n title: { ... }\n schema: { ... }\n }>\n nextOpenStep?: {\n id?: { ... }\n entityRefId?: { ... }\n }\n configuredClosingReasonSnapshot?: Array<{\n id: { ... }\n title: { ... }\n }>\n selectedClosingReasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n closingReasonDescription?: string\n enableECPWorkflow?: boolean\n updateEntityAttributes?: Array<{\n source: { ... }\n target: { ... }\n }>\n version?: number\n taxonomies?: string[]\n singleClosingReasonSelection?: boolean\n flow: Array<{\n id: { ... }\n definitionId?: { ... }\n name: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n status?: { ... }\n type: { ... }\n steps: { ... }\n taxonomies?: { ... }\n } | {\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n }>\n lastEvaluatedKey?: {\n orgId?: string\n creationTime?: string\n }\n}\n```\n\n### `LastEvaluatedKey`\n\n```ts\ntype LastEvaluatedKey = {\n orgId?: string\n creationTime?: string\n}\n```\n\n### `SearchStepsReq`\n\n```ts\ntype SearchStepsReq = {\n executionName?: string\n stepName?: string\n assignedTo?: number\n includeDoneWorkflows?: boolean\n manuallyCreated?: boolean\n status?: "OPEN" | "COMPLETE" | "NEXT_OPEN_ITEM_IN_WORKFLOW"\n sorting?: "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC"\n pagination?: {\n from?: number\n size?: number\n }\n}\n```\n\n### `SearchSorting`\n\n```ts\ntype SearchSorting = "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC"\n```\n\n### `SearchPagination`\n\n```ts\ntype SearchPagination = {\n from?: number\n size?: number\n}\n```\n\n### `ExecutionPaginationDynamo`\n\n```ts\ntype ExecutionPaginationDynamo = {\n orgId?: string\n creationTime?: string\n}\n```\n\n### `ErrorResp`\n\n```ts\ntype ErrorResp = {\n message?: string\n}\n```\n\n### `ClosingReasonResp`\n\n```ts\ntype ClosingReasonResp = {\n reasons?: Array<{\n id: string\n title: string\n }>\n}\n```\n\n### `PhaseInEntity`\n\n```ts\ntype PhaseInEntity = {\n phase_id?: string\n phase_name?: string\n phase_progress?: number\n phase_assignees?: string[]\n}\n```\n\n### `WorkflowInEntity`\n\n```ts\ntype WorkflowInEntity = {\n id?: string\n definition_id?: string\n name?: string\n status?: "STARTED" | "DONE" | "CLOSED"\n assignees?: string[]\n duedate?: string // date-time\n last_update_time?: string // date-time\n progress?: number\n upcoming_tasks_assignees?: string[]\n task_id?: string\n task_name?: string\n task_assignees?: string[]\n task_duedate?: string // date-time\n task_execution_type?: "MANUAL" | "AUTOMATION"\n task_status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n phase_id?: string\n phase_name?: string\n phase_assignees?: string[]\n phase_progress?: number\n phases_in_progress?: Array<{\n phase_id?: string\n phase_name?: string\n phase_progress?: number\n phase_assignees?: string[]\n }>\n selected_closing_reasons?: Array<{\n id: string\n title: string\n }>\n closing_reason_description?: string\n}\n```\n\n### `UpdateEntityAttributes`\n\n```ts\ntype UpdateEntityAttributes = {\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `EntitySync`\n\n```ts\ntype EntitySync = {\n trigger: {\n event: "FlowStarted" | "FlowCompleted" | "FlowCancelled" | "FlowReopened" | "FlowDeleted" | "FlowAssigned" | "FlowDueDateChanged" | "FlowContextsChanged" | "TaskUpdated" | "CurrTaskChanged" | "TaskCompleted" | "TaskSkipped" | "TaskMarkedInProgress" | "TaskMarkedOnHold" | "PhaseUpdated" | "PhaseCompleted" | "PhaseSkipped" | "PhaseMarkedInProgress"\n filter?: {\n task_template_id?: { ... }\n phase_template_id?: { ... }\n }\n }\n value: {\n source: "workflow_name" | "workflow_status" | "workflow_assigned_to" | "task_name" | "task_status" | "task_assigned_to" | "phase_name" | "phase_status" | "phase_assigned_to" | "custom_value"\n value?: string\n }\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `DynamicDueDate`\n\nset a Duedate for a step then a specific\n\n```ts\ntype DynamicDueDate = {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n}\n```\n\n### `StepRequirement`\n\ndescribe the requirement for step enablement\n\n```ts\ntype StepRequirement = {\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n}\n```\n\n### `StartFlowReq`\n\n```ts\ntype StartFlowReq = {\n flow_template_id: string\n trigger?: {\n type?: "MANUAL" | "AUTOMATIC"\n automation_config?: {\n flow_id: { ... }\n execution_id?: { ... }\n execution_status?: { ... }\n error_reason?: { ... }\n input_context?: { ... }\n }\n }\n contexts: Array<{\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n }>\n purposes?: string[]\n}\n```\n\n### `SearchFlowsReq`\n\n```ts\ntype SearchFlowsReq = {\n entity_id: string\n entity_schema: string\n}\n```\n\n### `PatchFlowReq`\n\n```ts\ntype PatchFlowReq = {\n status?: "STARTED" | "DONE" | "CLOSED"\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n closing_reason?: {\n selected_reasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n configured_reasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n extra_description?: string\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n contexts?: Array<{\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n }>\n}\n```\n\n### `FlowExecution`\n\n```ts\ntype FlowExecution = {\n id: string\n flow_template_id: string\n org_id: string\n name: string\n created_at: string\n updated_at: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n status: "STARTED" | "DONE" | "CLOSED"\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n analytics: {\n started_at?: string\n completed_at?: string\n closed_at?: string\n started_by?: string\n closed_by?: string\n }\n contexts: Array<{\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n }>\n crt_tasks: Array<{\n id?: string\n }>\n phases?: Array<{\n id: string\n template_id: string\n name: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n analytics?: {\n started_at?: { ... }\n in_progress_at?: { ... }\n completed_at?: { ... }\n status_updated_at?: { ... }\n in_progress_by?: { ... }\n completed_by?: { ... }\n skipped_by?: { ... }\n on_hold_by?: { ... }\n }\n taxonomies?: string[]\n loop_config?: {\n max_iterations: { ... }\n crt_iterations?: { ... }\n }\n }>\n tasks: Array<{\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n requirements?: Array<{\n task_id?: { ... }\n phase_id?: { ... }\n when: { ... }\n }>\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n // ...\n}\n```\n\n### `FlowClosingReason`\n\n```ts\ntype FlowClosingReason = {\n selected_reasons?: Array<{\n id: string\n title: string\n }>\n configured_reasons?: Array<{\n id: string\n title: string\n }>\n extra_description?: string\n}\n```\n\n### `FlowTrigger`\n\n```ts\ntype FlowTrigger = {\n type?: "MANUAL" | "AUTOMATIC"\n automation_config?: {\n flow_id: string\n execution_id?: string\n execution_status?: string\n error_reason?: string\n input_context?: {\n source: { ... }\n task_id?: { ... }\n }\n }\n}\n```\n\n### `FlowContext`\n\n```ts\ntype FlowContext = {\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n}\n```\n\n### `EntityRef`\n\n```ts\ntype EntityRef = {\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n}\n```\n\n### `PhaseId`\n\n```ts\ntype PhaseId = string\n```\n\n### `TaskId`\n\n```ts\ntype TaskId = string\n```\n\n### `Task`\n\n```ts\ntype Task = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n loop_config?: {\n max_iterations: number\n crt_iterations?: number\n }\n} | {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n // ...\n}\n```\n\n### `TaskType`\n\n```ts\ntype TaskType = "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n```\n\n### `ManualTask`\n\n```ts\ntype ManualTask = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n loop_config?: {\n max_iterations: number\n crt_iterations?: number\n }\n}\n```\n\n### `AutomationTask`\n\n```ts\ntype AutomationTask = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n automation_config: {\n flow_id: string\n execution_id?: string\n execution_status?: string\n error_reason?: string\n input_context?: {\n source: { ... }\n task_id?: { ... }\n }\n }\n automation_execution_id?: string\n trigger_mode?: "manual" | "automatic"\n schedule?: {\n mode: "immediate"\n } | {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n schedule_id?: string\n } | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n // ...\n}\n```\n\n### `LoopInfo`\n\nInformation about loop iterations, when task is part of a loop branch\n\n```ts\ntype LoopInfo = {\n max_iterations: number\n crt_iterations?: number\n}\n```\n\n### `LoopConfig`\n\n```ts\ntype LoopConfig = {\n loop_branch_id: string\n exit_branch_id: string\n max_iterations: number\n crt_iterations?: number\n}\n```\n\n### `TriggerMode`\n\n```ts\ntype TriggerMode = "manual" | "automatic"\n```\n\n### `ActionSchedule`\n\n```ts\ntype ActionSchedule = {\n mode: "immediate"\n} | {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n schedule_id?: string\n} | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"\n schema?: string\n attribute?: string\n }\n schedule_id?: string\n}\n```\n\n### `ImmediateSchedule`\n\n```ts\ntype ImmediateSchedule = {\n mode: "immediate"\n}\n```\n\n### `DelayedSchedule`\n\n```ts\ntype DelayedSchedule = {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n schedule_id?: string\n}\n```\n\n### `RelativeSchedule`\n\n```ts\ntype RelativeSchedule = {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"\n schema?: string\n attribute?: string\n }\n schedule_id?: string\n}\n```\n\n### `DecisionTask`\n\n```ts\ntype DecisionTask = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n trigger_mode: "manual" | "automatic"\n conditions: Array<{\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: { ... }\n source: { ... }\n operator: { ... }\n values: { ... }\n value_type?: { ... }\n }>\n evaluated_at?: string // date-time\n is_met?: boolean\n }>\n allow_parallel_execution?: boolean\n schedule?: {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n schedule_id?: string\n } | {\n mode: "relative"\n direction: "before" | "after"\n // ...\n}\n```\n\n### `AiAgentTask`\n\n```ts\ntype AiAgentTask = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n agent_config?: {\n agent_id: string\n parameters?: object\n }\n loop_config?: {\n max_iterations: number\n crt_iterations?: number\n }\n agent_execution?: {\n execution_id?: string\n execution_status?: string\n error_reason?: string\n }\n agent_execution_id?: string\n}\n```\n\n### `AgentConfig`\n\nConfiguration for AI Agent to run\n\n```ts\ntype AgentConfig = {\n agent_id: string\n parameters?: object\n}\n```\n\n### `AgentExecutionInfo`\n\n```ts\ntype AgentExecutionInfo = {\n execution_id?: string\n execution_status?: string\n error_reason?: string\n}\n```\n\n### `TaskBase`\n\n```ts\ntype TaskBase = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n}\n```\n\n### `Phase`\n\n```ts\ntype Phase = {\n id: string\n template_id: string\n name: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n analytics?: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n taxonomies?: string[]\n loop_config?: {\n max_iterations: number\n crt_iterations?: number\n }\n}\n```\n\n### `Edge`\n\n```ts\ntype Edge = {\n id: string\n from_id: string\n to_id: string\n condition_id?: string\n none_met?: boolean\n}\n```\n\n### `AutomationInfo`\n\n```ts\ntype AutomationInfo = {\n flow_id: string\n execution_id?: string\n execution_status?: string\n error_reason?: string\n input_context?: {\n source: "trigger" | "task"\n task_id?: string\n }\n}\n```\n\n### `AutomationInputContext`\n\nOptional. Source of the entity fed into this automation task. If omitted, the workflow\'s primary entity is used.\n\n\n```ts\ntype AutomationInputContext = {\n source: "trigger" | "task"\n task_id?: string\n}\n```\n\n### `AnalyticsInfo`\n\n```ts\ntype AnalyticsInfo = {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n}\n```\n\n### `ConditionId`\n\nA locally unique identifier for the condition\n\n```ts\ntype ConditionId = string\n```\n\n### `Condition`\n\n```ts\ntype Condition = {\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: string\n source: {\n id?: { ... }\n origin?: { ... }\n origin_type?: { ... }\n schema?: { ... }\n attribute?: { ... }\n attribute_type?: { ... }\n attribute_repeatable?: { ... }\n attribute_operation?: { ... }\n attribute_sub_field?: { ... }\n date_offset?: { ... }\n }\n operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values: string[]\n value_type?: "static" | "relative_date"\n }>\n evaluated_at?: string // date-time\n is_met?: boolean\n}\n```\n\n### `Statement`\n\n```ts\ntype Statement = {\n id: string\n source: {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attribute_sub_field?: string\n date_offset?: {\n amount?: { ... }\n unit?: { ... }\n }\n }\n operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values: string[]\n value_type?: "static" | "relative_date"\n}\n```\n\n### `EvaluationSource`\n\n```ts\ntype EvaluationSource = {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attribute_sub_field?: string\n date_offset?: {\n amount?: number\n unit?: "days" | "months" | "years"\n }\n}\n```\n\n### `Operator`\n\n```ts\ntype Operator = "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n```\n\n### `DueDateConfig`\n\nSet due date for the task based on a dynamic condition\n\n```ts\ntype DueDateConfig = {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n}\n```\n\n### `TimeUnit`\n\n```ts\ntype TimeUnit = "minutes" | "hours" | "days" | "weeks" | "months"\n```\n\n### `EnableRequirement`\n\ndescribe the requirement for a task to be enabled\n\n```ts\ntype EnableRequirement = {\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n}\n```\n\n### `FlowTemplateId`\n\n```ts\ntype FlowTemplateId = string\n```\n\n### `FlowExecutionId`\n\n```ts\ntype FlowExecutionId = string\n```\n\n### `UserId`\n\nThe user id\n\n```ts\ntype UserId = string\n```\n\n### `VariableAssignment`\n\nRepresents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.\n\n```ts\ntype VariableAssignment = {\n variable: string\n value?: string[]\n}\n```\n\n### `Assignees`\n\nThe user ids or variable assignments\n\n```ts\ntype Assignees = Array<string | {\n variable: string\n value?: string[]\n}>\n```\n\n### `PatchTaskReq`\n\n```ts\ntype PatchTaskReq = {\n name?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n enabled?: boolean\n automation_config?: {\n flow_id: string\n execution_id?: string\n execution_status?: string\n error_reason?: string\n input_context?: {\n source: { ... }\n task_id?: { ... }\n }\n }\n description?: {\n enabled?: boolean\n value?: string\n }\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n next_condition_id?: string\n revert_execution?: boolean\n}\n```\n\n### `PatchPhaseReq`\n\n```ts\ntype PatchPhaseReq = {\n name?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n}\n```\n\n### `AddTaskReq`\n\n```ts\ntype AddTaskReq = {\n previous_task_id: string // uuid\n next_task_id: string // uuid\n task: {\n id?: string // uuid\n name: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n enabled?: boolean\n automation_config?: {\n flow_id: { ... }\n execution_id?: { ... }\n execution_status?: { ... }\n error_reason?: { ... }\n input_context?: { ... }\n }\n phase_id?: string\n task_type?: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n }\n}\n```\n';
|
|
5
|
-
export {
|
|
6
|
-
workflow_default as default
|
|
7
|
-
};
|