@epilot/sdk 2.20.80 → 2.20.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/file-runtime.json +1 -1
- package/definitions/file.json +834 -9
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/chat.cjs +6 -6
- package/dist/apis/chat.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +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/external-values.cjs +6 -6
- package/dist/apis/external-values.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/identity.cjs +6 -6
- package/dist/apis/identity.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/phone-integration.cjs +6 -6
- package/dist/apis/phone-integration.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 +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-KH4BRB6Z.js → chunk-2PFXDXXZ.js} +2 -2
- package/dist/{chunk-OLRBYITL.cjs → chunk-3PQISQCY.cjs} +2 -2
- package/dist/chunk-4HTTGQEJ.cjs +14 -0
- package/dist/chunk-IWKGR2GI.js +14 -0
- package/dist/file-3MIGWJIS.cjs +7 -0
- package/dist/file-LA7WL5QQ.js +7 -0
- package/dist/{file-runtime-RS4DX5LB.js → file-runtime-JOWOEQD2.js} +1 -1
- package/dist/file-runtime-LBP7QFAO.cjs +5 -0
- package/dist/{file.d-DELNV63w.d.cts → file.d-BIakPRHY.d.cts} +556 -3
- package/dist/{file.d-DELNV63w.d.ts → file.d-BIakPRHY.d.ts} +556 -3
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/docs/file.md +344 -0
- package/package.json +1 -1
- package/dist/chunk-424JLS5G.cjs +0 -14
- package/dist/chunk-FGQBS7TA.js +0 -14
- package/dist/file-2KT6MMMG.cjs +0 -7
- package/dist/file-N3SGGI6E.js +0 -7
- package/dist/file-runtime-JL2IZ2CE.cjs +0 -5
package/definitions/file.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "File API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.14.0",
|
|
6
6
|
"description": "The File API enables you to upload, store, manage, and share files within the epilot platform.\n\n## Key Features\n- **Upload files** to temporary storage and save them permanently as File entities\n- **Generate previews** (thumbnails) for images and documents\n- **Create public links** to share private files externally\n- **Organize files** into collections for better management\n- **Version control** with automatic file versioning on updates\n\n## File Upload Workflow\n1. Call `uploadFileV2` to get a pre-signed S3 URL\n2. Upload your file directly to S3 using the pre-signed URL (PUT request)\n3. Call `saveFileV2` with the S3 reference to create a permanent File entity\n\n## Changelog\n<a href=\"changelog\">View API Changelog</a>\n"
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -67,6 +67,12 @@
|
|
|
67
67
|
"/v2/files/upload": {
|
|
68
68
|
"post": {
|
|
69
69
|
"operationId": "uploadFileV2",
|
|
70
|
+
"x-epilot-permissions": [
|
|
71
|
+
{
|
|
72
|
+
"action": "entity:create",
|
|
73
|
+
"resource": "file"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
70
76
|
"summary": "uploadFileV2",
|
|
71
77
|
"description": "Create pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFileV2 operation to store file file permanently.\n",
|
|
72
78
|
"tags": [
|
|
@@ -136,6 +142,20 @@
|
|
|
136
142
|
"/v2/files": {
|
|
137
143
|
"post": {
|
|
138
144
|
"operationId": "saveFileV2",
|
|
145
|
+
"x-epilot-permissions": [
|
|
146
|
+
{
|
|
147
|
+
"anyOf": [
|
|
148
|
+
{
|
|
149
|
+
"action": "entity:create",
|
|
150
|
+
"resource": "file"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"action": "entity:edit",
|
|
154
|
+
"resource": "file"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
],
|
|
139
159
|
"summary": "saveFileV2",
|
|
140
160
|
"description": "Saves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\nSaves metadata to file entity and stores a version when `s3ref` or `source_url` is passed.\n",
|
|
141
161
|
"tags": [
|
|
@@ -296,6 +316,12 @@
|
|
|
296
316
|
"/v1/files/upload": {
|
|
297
317
|
"post": {
|
|
298
318
|
"operationId": "uploadFile",
|
|
319
|
+
"x-epilot-permissions": [
|
|
320
|
+
{
|
|
321
|
+
"action": "entity:create",
|
|
322
|
+
"resource": "file"
|
|
323
|
+
}
|
|
324
|
+
],
|
|
299
325
|
"summary": "uploadFile",
|
|
300
326
|
"deprecated": true,
|
|
301
327
|
"description": "**DEPRECATED** - Will be removed on **2025-06-30**. Use `POST /v2/files/upload` instead.\n\n## Migration Guide\nReplace calls to this endpoint with `uploadFileV2`:\n\n| v1 Parameter | v2 Parameter | Notes |\n|--------------|--------------|-------|\n| `file_entity_id` | `file_entity_id` | No change |\n\nThe v2 response includes the same fields with improved structure.\n\n---\n\nCreate pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFile operation to store file file permanently.\n",
|
|
@@ -384,6 +410,20 @@
|
|
|
384
410
|
"/v1/files": {
|
|
385
411
|
"post": {
|
|
386
412
|
"operationId": "saveFile",
|
|
413
|
+
"x-epilot-permissions": [
|
|
414
|
+
{
|
|
415
|
+
"anyOf": [
|
|
416
|
+
{
|
|
417
|
+
"action": "entity:create",
|
|
418
|
+
"resource": "file"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"action": "entity:edit",
|
|
422
|
+
"resource": "file"
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
],
|
|
387
427
|
"summary": "saveFile",
|
|
388
428
|
"deprecated": true,
|
|
389
429
|
"description": "**DEPRECATED** - Will be removed on **2025-06-30**. Use `POST /v2/files` instead.\n\n## Migration Guide\nReplace calls to this endpoint with `saveFileV2`:\n\n| v1 Feature | v2 Feature | Notes |\n|------------|------------|-------|\n| `activity_id` param | `activity_id` param | No change |\n| `async` param | `async` param | No change |\n| - | `fill_activity` param | New in v2 |\n| - | `strict` param | New in v2 |\n| - | `delete_temp_file` param | New in v2, defaults to true |\n\nThe v2 endpoint supports additional parameters for better control over file saving behavior.\n\n---\n\nCreate / Update a permanent File entity.\n\nMakes file object permanent and saves metadata to file entity.\n",
|
|
@@ -452,6 +492,12 @@
|
|
|
452
492
|
"/v2/files/{id}": {
|
|
453
493
|
"get": {
|
|
454
494
|
"operationId": "getFile",
|
|
495
|
+
"x-epilot-permissions": [
|
|
496
|
+
{
|
|
497
|
+
"action": "entity:view",
|
|
498
|
+
"resource": "file:{id}"
|
|
499
|
+
}
|
|
500
|
+
],
|
|
455
501
|
"summary": "getFile",
|
|
456
502
|
"description": "Get a file entity by id",
|
|
457
503
|
"tags": [
|
|
@@ -509,6 +555,12 @@
|
|
|
509
555
|
},
|
|
510
556
|
"delete": {
|
|
511
557
|
"operationId": "deleteFile",
|
|
558
|
+
"x-epilot-permissions": [
|
|
559
|
+
{
|
|
560
|
+
"action": "entity:delete",
|
|
561
|
+
"resource": "file:{id}"
|
|
562
|
+
}
|
|
563
|
+
],
|
|
512
564
|
"summary": "deleteFile",
|
|
513
565
|
"description": "Delete a file entity by id",
|
|
514
566
|
"tags": [
|
|
@@ -568,6 +620,12 @@
|
|
|
568
620
|
"/v1/files/{id}/download": {
|
|
569
621
|
"get": {
|
|
570
622
|
"operationId": "downloadFile",
|
|
623
|
+
"x-epilot-permissions": [
|
|
624
|
+
{
|
|
625
|
+
"action": "entity:view",
|
|
626
|
+
"resource": "file:{id}"
|
|
627
|
+
}
|
|
628
|
+
],
|
|
571
629
|
"summary": "downloadFile",
|
|
572
630
|
"description": "Generate a pre-signed download URL for a file.\n\nThe returned URL is valid for a limited time (typically 15 minutes) and can be used to download the file directly.\n\n**Download attribution (`x-track-*`):** any query parameter whose name starts with\n`x-track-` is treated as opaque tracking metadata and signed into the returned URL, so it\nshows up in the S3 access logs / CloudTrail data events when the link is actually opened.\nThis is a generic, service-agnostic channel — e.g. the customer portal sends\n`x-track-portal-id` and `x-track-contact-id`. Only the `x-track-` namespace is forwarded;\nthe values cannot affect how S3 resolves or serves the object. Parameter names must match\n`^x-track-[a-z0-9](?:[a-z0-9_-]{0,38}[a-z0-9])?$`, values are capped at 256 characters, and\nat most 10 such parameters are honoured (see the `x-track` parameter below).\n",
|
|
573
631
|
"tags": [
|
|
@@ -656,6 +714,20 @@
|
|
|
656
714
|
"/v1/files:downloadS3": {
|
|
657
715
|
"post": {
|
|
658
716
|
"operationId": "downloadS3File",
|
|
717
|
+
"x-epilot-permissions": [
|
|
718
|
+
{
|
|
719
|
+
"anyOf": [
|
|
720
|
+
{
|
|
721
|
+
"action": "entity:view",
|
|
722
|
+
"resource": "file"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"action": "entity:download",
|
|
726
|
+
"resource": "file"
|
|
727
|
+
}
|
|
728
|
+
]
|
|
729
|
+
}
|
|
730
|
+
],
|
|
659
731
|
"summary": "downloadS3File",
|
|
660
732
|
"description": "Generate a pre-signed download URL for a file using its S3 reference.\n\nUse this endpoint when you have the S3 bucket and key but not the file entity ID.\n",
|
|
661
733
|
"tags": [
|
|
@@ -732,6 +804,16 @@
|
|
|
732
804
|
"/v1/files:downloadFiles": {
|
|
733
805
|
"post": {
|
|
734
806
|
"operationId": "downloadFiles",
|
|
807
|
+
"x-epilot-permissions": [
|
|
808
|
+
{
|
|
809
|
+
"action": "entity:download",
|
|
810
|
+
"resource": "file"
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"action": "entity:view",
|
|
814
|
+
"resource": "file"
|
|
815
|
+
}
|
|
816
|
+
],
|
|
735
817
|
"summary": "downloadFiles",
|
|
736
818
|
"description": "Bulk generate pre-signed download URLs for multiple files in a single request.\n\nThis is more efficient than calling `downloadFile` multiple times when you need to download several files.\n",
|
|
737
819
|
"tags": [
|
|
@@ -812,8 +894,18 @@
|
|
|
812
894
|
"/v1/files:zipJob": {
|
|
813
895
|
"post": {
|
|
814
896
|
"operationId": "createZipJob",
|
|
897
|
+
"x-epilot-permissions": [
|
|
898
|
+
{
|
|
899
|
+
"action": "entity:download",
|
|
900
|
+
"resource": "file"
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"action": "entity:view",
|
|
904
|
+
"resource": "file"
|
|
905
|
+
}
|
|
906
|
+
],
|
|
815
907
|
"summary": "createZipJob",
|
|
816
|
-
"description": "Create a background job to ZIP multiple files and send a download link via email.\n\nFor bulk downloads of more than 50 files, use this async endpoint instead of client-side zipping.\nThe job will:\n1. Download all requested files from S3\n2. Create a ZIP archive\n3. Upload the ZIP to temporary storage\n4. Send an email notification with the download link\n\nThe ZIP file will be available for 7 days.\n",
|
|
908
|
+
"description": "Create a background job to ZIP multiple files and send a download link via email.\n\nFor bulk downloads of more than 50 files, use this async endpoint instead of client-side zipping.\nThe job will:\n1. Download all requested files from S3\n2. Create a ZIP archive\n3. Upload the ZIP to temporary storage\n4. Send an email notification with the download link\n\nPermissions: requires `entity:download` on files. With `file_entity_ids` every file must be\nviewable by the caller, otherwise the request is rejected with 403. An `entity_query` is\nresolved with the caller's permissions when the job is created (restricted to `_schema:file`);\nonly the files it returns are zipped. A query that matches no viewable files returns 400.\n\nThe ZIP file will be available for 7 days.\n",
|
|
817
909
|
"tags": [
|
|
818
910
|
"File"
|
|
819
911
|
],
|
|
@@ -855,6 +947,9 @@
|
|
|
855
947
|
"401": {
|
|
856
948
|
"$ref": "#/components/responses/UnauthorizedError"
|
|
857
949
|
},
|
|
950
|
+
"403": {
|
|
951
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
952
|
+
},
|
|
858
953
|
"500": {
|
|
859
954
|
"$ref": "#/components/responses/InternalServerError"
|
|
860
955
|
}
|
|
@@ -864,6 +959,11 @@
|
|
|
864
959
|
"/v1/files:zipJob/{job_id}": {
|
|
865
960
|
"get": {
|
|
866
961
|
"operationId": "getZipJob",
|
|
962
|
+
"x-epilot-permissions": [
|
|
963
|
+
{
|
|
964
|
+
"access": "owner"
|
|
965
|
+
}
|
|
966
|
+
],
|
|
867
967
|
"summary": "getZipJob",
|
|
868
968
|
"description": "Get the status of a ZIP job",
|
|
869
969
|
"tags": [
|
|
@@ -907,6 +1007,12 @@
|
|
|
907
1007
|
"/v1/files/{id}/summary": {
|
|
908
1008
|
"get": {
|
|
909
1009
|
"operationId": "getFileSummary",
|
|
1010
|
+
"x-epilot-permissions": [
|
|
1011
|
+
{
|
|
1012
|
+
"action": "entity:view",
|
|
1013
|
+
"resource": "file:{id}"
|
|
1014
|
+
}
|
|
1015
|
+
],
|
|
910
1016
|
"summary": "getFileSummary",
|
|
911
1017
|
"description": "Get summary text for a file entity together with the current summary job status when available.",
|
|
912
1018
|
"tags": [
|
|
@@ -955,6 +1061,12 @@
|
|
|
955
1061
|
"/v1/files/{id}/summary/feedback": {
|
|
956
1062
|
"get": {
|
|
957
1063
|
"operationId": "getFileSummaryFeedback",
|
|
1064
|
+
"x-epilot-permissions": [
|
|
1065
|
+
{
|
|
1066
|
+
"action": "entity:view",
|
|
1067
|
+
"resource": "file:{id}"
|
|
1068
|
+
}
|
|
1069
|
+
],
|
|
958
1070
|
"summary": "Get file summary feedback",
|
|
959
1071
|
"description": "Get the authenticated user's feedback for the current generated file summary.",
|
|
960
1072
|
"tags": [
|
|
@@ -1001,6 +1113,12 @@
|
|
|
1001
1113
|
},
|
|
1002
1114
|
"put": {
|
|
1003
1115
|
"operationId": "putFileSummaryFeedback",
|
|
1116
|
+
"x-epilot-permissions": [
|
|
1117
|
+
{
|
|
1118
|
+
"action": "entity:view",
|
|
1119
|
+
"resource": "file:{id}"
|
|
1120
|
+
}
|
|
1121
|
+
],
|
|
1004
1122
|
"summary": "Submit file summary feedback",
|
|
1005
1123
|
"description": "Upsert thumbs up/down feedback for the current generated file summary.",
|
|
1006
1124
|
"tags": [
|
|
@@ -1062,6 +1180,12 @@
|
|
|
1062
1180
|
"/v1/files/{id}/summary-jobs": {
|
|
1063
1181
|
"post": {
|
|
1064
1182
|
"operationId": "createFileSummaryJob",
|
|
1183
|
+
"x-epilot-permissions": [
|
|
1184
|
+
{
|
|
1185
|
+
"action": "entity:view",
|
|
1186
|
+
"resource": "file:{id}"
|
|
1187
|
+
}
|
|
1188
|
+
],
|
|
1065
1189
|
"summary": "createFileSummaryJob",
|
|
1066
1190
|
"description": "Create or return the current AI summary job for a file entity.",
|
|
1067
1191
|
"tags": [
|
|
@@ -1110,6 +1234,12 @@
|
|
|
1110
1234
|
"/v1/files/{id}/summary-jobs/current": {
|
|
1111
1235
|
"get": {
|
|
1112
1236
|
"operationId": "getCurrentFileSummaryJob",
|
|
1237
|
+
"x-epilot-permissions": [
|
|
1238
|
+
{
|
|
1239
|
+
"action": "entity:view",
|
|
1240
|
+
"resource": "file:{id}"
|
|
1241
|
+
}
|
|
1242
|
+
],
|
|
1113
1243
|
"summary": "getCurrentFileSummaryJob",
|
|
1114
1244
|
"description": "Get the latest AI summary job for the file entity's current source.",
|
|
1115
1245
|
"tags": [
|
|
@@ -1158,6 +1288,12 @@
|
|
|
1158
1288
|
"/v1/files/{id}/summary-jobs/{job_id}": {
|
|
1159
1289
|
"get": {
|
|
1160
1290
|
"operationId": "getFileSummaryJob",
|
|
1291
|
+
"x-epilot-permissions": [
|
|
1292
|
+
{
|
|
1293
|
+
"action": "entity:view",
|
|
1294
|
+
"resource": "file:{id}"
|
|
1295
|
+
}
|
|
1296
|
+
],
|
|
1161
1297
|
"summary": "getFileSummaryJob",
|
|
1162
1298
|
"description": "Get an AI summary job by id.",
|
|
1163
1299
|
"tags": [
|
|
@@ -1216,6 +1352,12 @@
|
|
|
1216
1352
|
"/v1/files/{id}/summary:generate": {
|
|
1217
1353
|
"post": {
|
|
1218
1354
|
"operationId": "generateFileSummary",
|
|
1355
|
+
"x-epilot-permissions": [
|
|
1356
|
+
{
|
|
1357
|
+
"action": "entity:view",
|
|
1358
|
+
"resource": "file:{id}"
|
|
1359
|
+
}
|
|
1360
|
+
],
|
|
1219
1361
|
"summary": "generateFileSummary",
|
|
1220
1362
|
"description": "Compatibility alias for creating or returning the current AI summary job for a file entity.",
|
|
1221
1363
|
"tags": [
|
|
@@ -1231,14 +1373,279 @@
|
|
|
1231
1373
|
"$ref": "#/components/schemas/FileEntityId"
|
|
1232
1374
|
}
|
|
1233
1375
|
}
|
|
1234
|
-
],
|
|
1376
|
+
],
|
|
1377
|
+
"responses": {
|
|
1378
|
+
"202": {
|
|
1379
|
+
"description": "Summary generation accepted",
|
|
1380
|
+
"content": {
|
|
1381
|
+
"application/json": {
|
|
1382
|
+
"schema": {
|
|
1383
|
+
"$ref": "#/components/schemas/FileSummaryJob"
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
},
|
|
1388
|
+
"400": {
|
|
1389
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1390
|
+
},
|
|
1391
|
+
"401": {
|
|
1392
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1393
|
+
},
|
|
1394
|
+
"403": {
|
|
1395
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1396
|
+
},
|
|
1397
|
+
"404": {
|
|
1398
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
1399
|
+
},
|
|
1400
|
+
"500": {
|
|
1401
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
"/v1/files/{id}/attribute-suggestion-jobs": {
|
|
1407
|
+
"post": {
|
|
1408
|
+
"operationId": "createFileAttributeSuggestionJob",
|
|
1409
|
+
"x-epilot-permissions": [
|
|
1410
|
+
{
|
|
1411
|
+
"action": "entity:view",
|
|
1412
|
+
"resource": "file:{id}"
|
|
1413
|
+
}
|
|
1414
|
+
],
|
|
1415
|
+
"summary": "createFileAttributeSuggestionJob",
|
|
1416
|
+
"description": "Start an auto-fill job that reads the file's extracted text and suggests values for the related entity's attributes. Requires `entity:view` on the file and on the related entity. Returns 404 with `error_code: file_not_extracted` while the file has not been extracted yet; callers retry until the extraction is ready.",
|
|
1417
|
+
"tags": [
|
|
1418
|
+
"File"
|
|
1419
|
+
],
|
|
1420
|
+
"parameters": [
|
|
1421
|
+
{
|
|
1422
|
+
"name": "id",
|
|
1423
|
+
"in": "path",
|
|
1424
|
+
"required": true,
|
|
1425
|
+
"description": "The UUID of the file entity",
|
|
1426
|
+
"schema": {
|
|
1427
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
],
|
|
1431
|
+
"requestBody": {
|
|
1432
|
+
"required": true,
|
|
1433
|
+
"content": {
|
|
1434
|
+
"application/json": {
|
|
1435
|
+
"schema": {
|
|
1436
|
+
"$ref": "#/components/schemas/CreateFileAttributeSuggestionJobRequest"
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1441
|
+
"responses": {
|
|
1442
|
+
"202": {
|
|
1443
|
+
"description": "Suggestion job accepted",
|
|
1444
|
+
"content": {
|
|
1445
|
+
"application/json": {
|
|
1446
|
+
"schema": {
|
|
1447
|
+
"$ref": "#/components/schemas/FileAttributeSuggestionJob"
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
},
|
|
1452
|
+
"400": {
|
|
1453
|
+
"$ref": "#/components/responses/FileAttributeSuggestionErrorResponse"
|
|
1454
|
+
},
|
|
1455
|
+
"401": {
|
|
1456
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1457
|
+
},
|
|
1458
|
+
"403": {
|
|
1459
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1460
|
+
},
|
|
1461
|
+
"404": {
|
|
1462
|
+
"$ref": "#/components/responses/FileAttributeSuggestionErrorResponse"
|
|
1463
|
+
},
|
|
1464
|
+
"422": {
|
|
1465
|
+
"$ref": "#/components/responses/FileAttributeSuggestionErrorResponse"
|
|
1466
|
+
},
|
|
1467
|
+
"500": {
|
|
1468
|
+
"$ref": "#/components/responses/FileAttributeSuggestionErrorResponse"
|
|
1469
|
+
},
|
|
1470
|
+
"503": {
|
|
1471
|
+
"$ref": "#/components/responses/FileAttributeSuggestionErrorResponse"
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
"/v1/files/{id}/attribute-suggestion-jobs/latest": {
|
|
1477
|
+
"get": {
|
|
1478
|
+
"operationId": "getLatestFileAttributeSuggestions",
|
|
1479
|
+
"x-epilot-permissions": [
|
|
1480
|
+
{
|
|
1481
|
+
"action": "entity:view",
|
|
1482
|
+
"resource": "file:{id}"
|
|
1483
|
+
}
|
|
1484
|
+
],
|
|
1485
|
+
"summary": "getLatestFileAttributeSuggestions",
|
|
1486
|
+
"description": "Get the most recent attribute suggestion job of any status for the file and the given entity. Returns 404 with `error_code: no_file_attribute_suggestions_job` when auto-fill has not run yet.",
|
|
1487
|
+
"tags": [
|
|
1488
|
+
"File"
|
|
1489
|
+
],
|
|
1490
|
+
"parameters": [
|
|
1491
|
+
{
|
|
1492
|
+
"name": "id",
|
|
1493
|
+
"in": "path",
|
|
1494
|
+
"required": true,
|
|
1495
|
+
"description": "The UUID of the file entity",
|
|
1496
|
+
"schema": {
|
|
1497
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1498
|
+
}
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"name": "entity_id",
|
|
1502
|
+
"in": "query",
|
|
1503
|
+
"required": true,
|
|
1504
|
+
"description": "The entity the suggestions are for",
|
|
1505
|
+
"schema": {
|
|
1506
|
+
"type": "string",
|
|
1507
|
+
"format": "uuid"
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
],
|
|
1511
|
+
"responses": {
|
|
1512
|
+
"200": {
|
|
1513
|
+
"description": "Latest suggestion job",
|
|
1514
|
+
"content": {
|
|
1515
|
+
"application/json": {
|
|
1516
|
+
"schema": {
|
|
1517
|
+
"$ref": "#/components/schemas/FileAttributeSuggestionJob"
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
},
|
|
1522
|
+
"400": {
|
|
1523
|
+
"$ref": "#/components/responses/BadRequestError"
|
|
1524
|
+
},
|
|
1525
|
+
"401": {
|
|
1526
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1527
|
+
},
|
|
1528
|
+
"403": {
|
|
1529
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1530
|
+
},
|
|
1531
|
+
"404": {
|
|
1532
|
+
"$ref": "#/components/responses/FileAttributeSuggestionErrorResponse"
|
|
1533
|
+
},
|
|
1534
|
+
"500": {
|
|
1535
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
"/v1/files/{id}/attribute-suggestion-jobs/{job_id}": {
|
|
1541
|
+
"get": {
|
|
1542
|
+
"operationId": "getFileAttributeSuggestionJob",
|
|
1543
|
+
"x-epilot-permissions": [
|
|
1544
|
+
{
|
|
1545
|
+
"action": "entity:view",
|
|
1546
|
+
"resource": "file:{id}"
|
|
1547
|
+
}
|
|
1548
|
+
],
|
|
1549
|
+
"summary": "getFileAttributeSuggestionJob",
|
|
1550
|
+
"description": "Get an attribute suggestion job of the file. Poll until `jobStatus.status` is `COMPLETED` or `FAILED`.",
|
|
1551
|
+
"tags": [
|
|
1552
|
+
"File"
|
|
1553
|
+
],
|
|
1554
|
+
"parameters": [
|
|
1555
|
+
{
|
|
1556
|
+
"name": "id",
|
|
1557
|
+
"in": "path",
|
|
1558
|
+
"required": true,
|
|
1559
|
+
"description": "The UUID of the file entity",
|
|
1560
|
+
"schema": {
|
|
1561
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1562
|
+
}
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
"name": "job_id",
|
|
1566
|
+
"in": "path",
|
|
1567
|
+
"required": true,
|
|
1568
|
+
"description": "The attribute suggestion job ID",
|
|
1569
|
+
"schema": {
|
|
1570
|
+
"type": "string"
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
],
|
|
1574
|
+
"responses": {
|
|
1575
|
+
"200": {
|
|
1576
|
+
"description": "Suggestion job",
|
|
1577
|
+
"content": {
|
|
1578
|
+
"application/json": {
|
|
1579
|
+
"schema": {
|
|
1580
|
+
"$ref": "#/components/schemas/FileAttributeSuggestionJob"
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
},
|
|
1585
|
+
"401": {
|
|
1586
|
+
"$ref": "#/components/responses/UnauthorizedError"
|
|
1587
|
+
},
|
|
1588
|
+
"403": {
|
|
1589
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
1590
|
+
},
|
|
1591
|
+
"404": {
|
|
1592
|
+
"$ref": "#/components/responses/FileAttributeSuggestionErrorResponse"
|
|
1593
|
+
},
|
|
1594
|
+
"500": {
|
|
1595
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
"patch": {
|
|
1600
|
+
"operationId": "updateFileAttributeSuggestionStatus",
|
|
1601
|
+
"x-epilot-permissions": [
|
|
1602
|
+
{
|
|
1603
|
+
"action": "entity:view",
|
|
1604
|
+
"resource": "file:{id}"
|
|
1605
|
+
}
|
|
1606
|
+
],
|
|
1607
|
+
"summary": "updateFileAttributeSuggestionStatus",
|
|
1608
|
+
"description": "Record that suggestions were accepted, discarded or copied. Only the suggestion entries named in the request change; unknown attribute names are ignored. Applying a value to the entity stays with the caller.",
|
|
1609
|
+
"tags": [
|
|
1610
|
+
"File"
|
|
1611
|
+
],
|
|
1612
|
+
"parameters": [
|
|
1613
|
+
{
|
|
1614
|
+
"name": "id",
|
|
1615
|
+
"in": "path",
|
|
1616
|
+
"required": true,
|
|
1617
|
+
"description": "The UUID of the file entity",
|
|
1618
|
+
"schema": {
|
|
1619
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
"name": "job_id",
|
|
1624
|
+
"in": "path",
|
|
1625
|
+
"required": true,
|
|
1626
|
+
"description": "The attribute suggestion job ID",
|
|
1627
|
+
"schema": {
|
|
1628
|
+
"type": "string"
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
],
|
|
1632
|
+
"requestBody": {
|
|
1633
|
+
"required": true,
|
|
1634
|
+
"content": {
|
|
1635
|
+
"application/json": {
|
|
1636
|
+
"schema": {
|
|
1637
|
+
"$ref": "#/components/schemas/UpdateFileAttributeSuggestionStatusRequest"
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
},
|
|
1235
1642
|
"responses": {
|
|
1236
|
-
"
|
|
1237
|
-
"description": "
|
|
1643
|
+
"200": {
|
|
1644
|
+
"description": "Updated suggestion job",
|
|
1238
1645
|
"content": {
|
|
1239
1646
|
"application/json": {
|
|
1240
1647
|
"schema": {
|
|
1241
|
-
"$ref": "#/components/schemas/
|
|
1648
|
+
"$ref": "#/components/schemas/FileAttributeSuggestionJob"
|
|
1242
1649
|
}
|
|
1243
1650
|
}
|
|
1244
1651
|
}
|
|
@@ -1253,7 +1660,10 @@
|
|
|
1253
1660
|
"$ref": "#/components/responses/ForbiddenError"
|
|
1254
1661
|
},
|
|
1255
1662
|
"404": {
|
|
1256
|
-
"$ref": "#/components/responses/
|
|
1663
|
+
"$ref": "#/components/responses/FileAttributeSuggestionErrorResponse"
|
|
1664
|
+
},
|
|
1665
|
+
"409": {
|
|
1666
|
+
"$ref": "#/components/responses/ConflictError"
|
|
1257
1667
|
},
|
|
1258
1668
|
"500": {
|
|
1259
1669
|
"$ref": "#/components/responses/InternalServerError"
|
|
@@ -1264,6 +1674,12 @@
|
|
|
1264
1674
|
"/v1/files/{id}/text": {
|
|
1265
1675
|
"get": {
|
|
1266
1676
|
"operationId": "getFileText",
|
|
1677
|
+
"x-epilot-permissions": [
|
|
1678
|
+
{
|
|
1679
|
+
"action": "entity:view",
|
|
1680
|
+
"resource": "file:{id}"
|
|
1681
|
+
}
|
|
1682
|
+
],
|
|
1267
1683
|
"summary": "getFileText",
|
|
1268
1684
|
"description": "Get the plain-text representation of a file entity. Returns status `not_ready` while text is being prepared and `unsupported` when text is unavailable for the file or organization.",
|
|
1269
1685
|
"tags": [
|
|
@@ -1312,6 +1728,12 @@
|
|
|
1312
1728
|
"/v1/files/validations": {
|
|
1313
1729
|
"post": {
|
|
1314
1730
|
"operationId": "validateFile",
|
|
1731
|
+
"x-epilot-permissions": [
|
|
1732
|
+
{
|
|
1733
|
+
"action": "entity:view",
|
|
1734
|
+
"resource": "file"
|
|
1735
|
+
}
|
|
1736
|
+
],
|
|
1315
1737
|
"summary": "validateFile",
|
|
1316
1738
|
"description": "Validate an uploaded file against one or more document validation rules\n(validation-rules-api rules with `input_type: document`).\n\nThe file is referenced either by its file entity id or, for an upload that has not been\nsaved as an entity yet (e.g. a journey upload in the temporary prefix), by its S3 reference.\nThe service collects an observation of the file - deterministic facts such as the sniffed\nmime type, size, page count, image resolution, blank and password-protection detection -\nand evaluates every rule against it with the shared validation rules engine.\n\nThe response carries one result per rule with a per-condition outcome (`pass`, `fail`,\n`uncertain`, `skipped`), plus the observation the results were derived from. `status` is\n`completed` for checks that finish synchronously; `pending` is reserved for check levels\nthat need asynchronous content extraction.\n",
|
|
1317
1739
|
"tags": [
|
|
@@ -1379,6 +1801,12 @@
|
|
|
1379
1801
|
"/v1/files/{id}/preview": {
|
|
1380
1802
|
"get": {
|
|
1381
1803
|
"operationId": "previewFile",
|
|
1804
|
+
"x-epilot-permissions": [
|
|
1805
|
+
{
|
|
1806
|
+
"action": "entity:view",
|
|
1807
|
+
"resource": "file:{id}"
|
|
1808
|
+
}
|
|
1809
|
+
],
|
|
1382
1810
|
"summary": "previewFile",
|
|
1383
1811
|
"description": "Generate a thumbnail preview for a file entity.\n\nSupported file types include images (PNG, JPEG, GIF, WebP), PDFs, and common document formats.\nThe preview is returned as an image (PNG or JPEG).\n\n**Tip:** Use with CookieAuth to embed previews directly in `<img>` tags.\n",
|
|
1384
1812
|
"tags": [
|
|
@@ -1458,6 +1886,12 @@
|
|
|
1458
1886
|
"/v1/files:previewS3": {
|
|
1459
1887
|
"post": {
|
|
1460
1888
|
"operationId": "previewS3File",
|
|
1889
|
+
"x-epilot-permissions": [
|
|
1890
|
+
{
|
|
1891
|
+
"action": "entity:view",
|
|
1892
|
+
"resource": "file"
|
|
1893
|
+
}
|
|
1894
|
+
],
|
|
1461
1895
|
"summary": "previewS3File",
|
|
1462
1896
|
"description": "Generate a thumbnail preview from an S3 reference.\n\nUse this endpoint when you have the S3 bucket and key but not the file entity ID.\n",
|
|
1463
1897
|
"tags": [
|
|
@@ -1534,6 +1968,12 @@
|
|
|
1534
1968
|
},
|
|
1535
1969
|
"get": {
|
|
1536
1970
|
"operationId": "previewS3FileGet",
|
|
1971
|
+
"x-epilot-permissions": [
|
|
1972
|
+
{
|
|
1973
|
+
"action": "entity:view",
|
|
1974
|
+
"resource": "file"
|
|
1975
|
+
}
|
|
1976
|
+
],
|
|
1537
1977
|
"summary": "previewS3FileGet",
|
|
1538
1978
|
"description": "Get a thumbnail preview from an S3 reference using query parameters.\n\nThis GET variant is useful for embedding previews directly in `<img>` tags.\n",
|
|
1539
1979
|
"tags": [
|
|
@@ -1616,7 +2056,7 @@
|
|
|
1616
2056
|
"get": {
|
|
1617
2057
|
"operationId": "previewPublicFile",
|
|
1618
2058
|
"summary": "previewPublicFile",
|
|
1619
|
-
"description": "Generate a thumbnail preview for a public file entity.\n\n**No authentication required.** This endpoint only works for files with `access_control: public-read`.\n",
|
|
2059
|
+
"description": "Generate a thumbnail preview for a public file entity.\n\n**No authentication required.** This endpoint only works for files with `access_control: public-read`.\n\nSVG files are rasterized to PNG by default. With `keep_original=true`, SVG files redirect\nto the selected version's original S3 object, preserving vector rendering. Width and\nheight parameters are ignored only for SVG files when this option is enabled.\nThis option only applies to SVG files; previews of other file formats are unchanged.\n",
|
|
1620
2060
|
"security": [],
|
|
1621
2061
|
"tags": [
|
|
1622
2062
|
"Preview"
|
|
@@ -1658,6 +2098,15 @@
|
|
|
1658
2098
|
},
|
|
1659
2099
|
"example": 200
|
|
1660
2100
|
},
|
|
2101
|
+
{
|
|
2102
|
+
"name": "keep_original",
|
|
2103
|
+
"in": "query",
|
|
2104
|
+
"description": "Applies only to SVG files. When true, redirects SVG files to the selected version's\noriginal S3 object instead of rasterizing to PNG and ignores width/height parameters.\nPreview behavior for all other file formats is unchanged.\n",
|
|
2105
|
+
"schema": {
|
|
2106
|
+
"type": "boolean",
|
|
2107
|
+
"default": false
|
|
2108
|
+
}
|
|
2109
|
+
},
|
|
1661
2110
|
{
|
|
1662
2111
|
"name": "org_id",
|
|
1663
2112
|
"in": "query",
|
|
@@ -1704,7 +2153,7 @@
|
|
|
1704
2153
|
"description": "No preview could be generated and no redirect target is available\n(the file has no public URL). No body is returned.\n"
|
|
1705
2154
|
},
|
|
1706
2155
|
"302": {
|
|
1707
|
-
"description": "
|
|
2156
|
+
"description": "With `keep_original=true`, SVG files redirect to the selected version's original S3 object without rasterization.\nPublic files also redirect to the original file when a preview cannot\nbe optimized (e.g. image dimensions above the input pixel limit, an oversized\nfile, or an unsupported/undecodable format), which the browser can render directly.\n",
|
|
1708
2157
|
"headers": {
|
|
1709
2158
|
"Location": {
|
|
1710
2159
|
"description": "URL of the original public file",
|
|
@@ -1764,6 +2213,11 @@
|
|
|
1764
2213
|
"/v1/files/session": {
|
|
1765
2214
|
"get": {
|
|
1766
2215
|
"operationId": "getSession",
|
|
2216
|
+
"x-epilot-permissions": [
|
|
2217
|
+
{
|
|
2218
|
+
"access": "self"
|
|
2219
|
+
}
|
|
2220
|
+
],
|
|
1767
2221
|
"summary": "getSession",
|
|
1768
2222
|
"description": "Start a browser session by converting a Bearer token into a server-side cookie.\n\n**Use case:** After calling this endpoint, you can use preview URLs directly in `<img>` tags\nwithout needing to set the Authorization header manually.\n\n**Example flow:**\n1. Call this endpoint with your Bearer token: `GET /v1/files/session` with `Authorization: Bearer <token>`\n2. The server sets an HTTP-only cookie named `token`\n3. Use preview URLs directly: `<img src=\"https://file.sls.epilot.io/v1/files/{id}/preview\" />`\n",
|
|
1769
2223
|
"tags": [
|
|
@@ -1789,6 +2243,11 @@
|
|
|
1789
2243
|
},
|
|
1790
2244
|
"delete": {
|
|
1791
2245
|
"operationId": "deleteSession",
|
|
2246
|
+
"x-epilot-permissions": [
|
|
2247
|
+
{
|
|
2248
|
+
"access": "self"
|
|
2249
|
+
}
|
|
2250
|
+
],
|
|
1792
2251
|
"summary": "deleteSession",
|
|
1793
2252
|
"description": "End a browser session by deleting the token cookie.\n\nCall this endpoint to log out and clear the session cookie.\n",
|
|
1794
2253
|
"tags": [
|
|
@@ -1804,6 +2263,16 @@
|
|
|
1804
2263
|
"/v1/files/{id}/public/links": {
|
|
1805
2264
|
"post": {
|
|
1806
2265
|
"operationId": "generatePublicLink",
|
|
2266
|
+
"x-epilot-permissions": [
|
|
2267
|
+
{
|
|
2268
|
+
"action": "entity:view",
|
|
2269
|
+
"resource": "file"
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
"action": "entity:view",
|
|
2273
|
+
"resource": "file:{id}"
|
|
2274
|
+
}
|
|
2275
|
+
],
|
|
1807
2276
|
"summary": "generatePublicLink",
|
|
1808
2277
|
"description": "Generate a public link to share a private file externally.\n\nThe generated link:\n- Is permanent until explicitly revoked\n- Includes the filename for user-friendly URLs\n- Does not require authentication to access\n- Redirects to a signed download URL when accessed\n\n**Use case:** Share invoices, contracts, or documents with external parties who don't have epilot accounts.\n",
|
|
1809
2278
|
"tags": [
|
|
@@ -1849,6 +2318,12 @@
|
|
|
1849
2318
|
},
|
|
1850
2319
|
"get": {
|
|
1851
2320
|
"operationId": "listPublicLinksForFile",
|
|
2321
|
+
"x-epilot-permissions": [
|
|
2322
|
+
{
|
|
2323
|
+
"action": "entity:view",
|
|
2324
|
+
"resource": "file:{id}"
|
|
2325
|
+
}
|
|
2326
|
+
],
|
|
1852
2327
|
"summary": "listPublicLinksForFile",
|
|
1853
2328
|
"description": "Fetches all public links previously generated for a file",
|
|
1854
2329
|
"parameters": [
|
|
@@ -1894,6 +2369,12 @@
|
|
|
1894
2369
|
}
|
|
1895
2370
|
}
|
|
1896
2371
|
},
|
|
2372
|
+
"403": {
|
|
2373
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
2374
|
+
},
|
|
2375
|
+
"404": {
|
|
2376
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
2377
|
+
},
|
|
1897
2378
|
"501": {
|
|
1898
2379
|
"description": "Not implemented",
|
|
1899
2380
|
"content": {
|
|
@@ -1989,6 +2470,12 @@
|
|
|
1989
2470
|
"/v1/files/public/links/{id}": {
|
|
1990
2471
|
"delete": {
|
|
1991
2472
|
"operationId": "revokePublicLink",
|
|
2473
|
+
"x-epilot-permissions": [
|
|
2474
|
+
{
|
|
2475
|
+
"action": "entity:edit",
|
|
2476
|
+
"resource": "file"
|
|
2477
|
+
}
|
|
2478
|
+
],
|
|
1992
2479
|
"summary": "revokePublicLink",
|
|
1993
2480
|
"description": "Revokes a given public link by ID",
|
|
1994
2481
|
"parameters": [
|
|
@@ -2010,6 +2497,12 @@
|
|
|
2010
2497
|
"204": {
|
|
2011
2498
|
"description": "Public link revoked successfully"
|
|
2012
2499
|
},
|
|
2500
|
+
"403": {
|
|
2501
|
+
"$ref": "#/components/responses/ForbiddenError"
|
|
2502
|
+
},
|
|
2503
|
+
"404": {
|
|
2504
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
2505
|
+
},
|
|
2013
2506
|
"501": {
|
|
2014
2507
|
"description": "Not implemented",
|
|
2015
2508
|
"content": {
|
|
@@ -2030,6 +2523,11 @@
|
|
|
2030
2523
|
"/v1/files/download:verify": {
|
|
2031
2524
|
"post": {
|
|
2032
2525
|
"operationId": "verifyCustomDownloadUrl",
|
|
2526
|
+
"x-epilot-permissions": [
|
|
2527
|
+
{
|
|
2528
|
+
"access": "org"
|
|
2529
|
+
}
|
|
2530
|
+
],
|
|
2033
2531
|
"summary": "verifyCustomDownloadUrl",
|
|
2034
2532
|
"description": "Verify that a custom download URL is valid and has not expired.\n\nUse this endpoint to validate custom download URLs before redirecting users.\nCustom download URLs include a signature and expiration time for security.\n",
|
|
2035
2533
|
"tags": [
|
|
@@ -2181,6 +2679,11 @@
|
|
|
2181
2679
|
"/v1/{slug}/collections": {
|
|
2182
2680
|
"get": {
|
|
2183
2681
|
"operationId": "getUserSchemaFileCollections",
|
|
2682
|
+
"x-epilot-permissions": [
|
|
2683
|
+
{
|
|
2684
|
+
"access": "self"
|
|
2685
|
+
}
|
|
2686
|
+
],
|
|
2184
2687
|
"summary": "getUserSchemaFileCollections",
|
|
2185
2688
|
"description": "Get all file collections for the current user within a specific schema.\n\nCollections help organize files into logical groups (e.g., \"Contracts\", \"Invoices\").\nUser collections are private to the creating user.\n",
|
|
2186
2689
|
"tags": [
|
|
@@ -2234,6 +2737,11 @@
|
|
|
2234
2737
|
},
|
|
2235
2738
|
"post": {
|
|
2236
2739
|
"operationId": "createUserSchemaFileCollection",
|
|
2740
|
+
"x-epilot-permissions": [
|
|
2741
|
+
{
|
|
2742
|
+
"access": "self"
|
|
2743
|
+
}
|
|
2744
|
+
],
|
|
2237
2745
|
"summary": "createUserSchemaFileCollection",
|
|
2238
2746
|
"description": "Create a new file collection for the current user within a specific schema.\n\nThe collection will be private to the creating user and associated with the specified schema.\n",
|
|
2239
2747
|
"tags": [
|
|
@@ -2303,6 +2811,11 @@
|
|
|
2303
2811
|
"/v1/{slug}/collections/{collectionSlug}": {
|
|
2304
2812
|
"put": {
|
|
2305
2813
|
"operationId": "updateUserSchemaFileCollection",
|
|
2814
|
+
"x-epilot-permissions": [
|
|
2815
|
+
{
|
|
2816
|
+
"access": "self"
|
|
2817
|
+
}
|
|
2818
|
+
],
|
|
2306
2819
|
"summary": "updateUserSchemaFileCollection",
|
|
2307
2820
|
"description": "Update an existing file collection.\n\nYou can update the name, parent relationships, starred status, and enabled locations/purposes.\n",
|
|
2308
2821
|
"tags": [
|
|
@@ -2379,6 +2892,11 @@
|
|
|
2379
2892
|
},
|
|
2380
2893
|
"delete": {
|
|
2381
2894
|
"operationId": "deleteUserSchemaFileCollection",
|
|
2895
|
+
"x-epilot-permissions": [
|
|
2896
|
+
{
|
|
2897
|
+
"access": "self"
|
|
2898
|
+
}
|
|
2899
|
+
],
|
|
2382
2900
|
"summary": "deleteUserSchemaFileCollection",
|
|
2383
2901
|
"description": "Delete a file collection.\n\n**Note:** Deleting a collection does not delete the files within it.\nFiles will remain but will no longer be associated with this collection.\n",
|
|
2384
2902
|
"tags": [
|
|
@@ -2425,6 +2943,16 @@
|
|
|
2425
2943
|
"/v1/entity/{id}/collections/{collectionSlug}/files": {
|
|
2426
2944
|
"get": {
|
|
2427
2945
|
"operationId": "getFilesInCollection",
|
|
2946
|
+
"x-epilot-permissions": [
|
|
2947
|
+
{
|
|
2948
|
+
"action": "entity:view"
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
"action": "entity:view",
|
|
2952
|
+
"resource": "file",
|
|
2953
|
+
"filter": true
|
|
2954
|
+
}
|
|
2955
|
+
],
|
|
2428
2956
|
"summary": "getFilesInCollection",
|
|
2429
2957
|
"description": "Get all files within a specific collection for an entity.\n\nThe schema is automatically derived from the entity. This endpoint requires\nview permission on the parent entity to access its files.\n",
|
|
2430
2958
|
"tags": [
|
|
@@ -2499,6 +3027,11 @@
|
|
|
2499
3027
|
"/v1/collections/{schemaSlug}": {
|
|
2500
3028
|
"get": {
|
|
2501
3029
|
"operationId": "getGlobalFileCollections",
|
|
3030
|
+
"x-epilot-permissions": [
|
|
3031
|
+
{
|
|
3032
|
+
"access": "org"
|
|
3033
|
+
}
|
|
3034
|
+
],
|
|
2502
3035
|
"summary": "getGlobalFileCollections",
|
|
2503
3036
|
"description": "Get all global file collections for a specific schema.\n\nGlobal collections are shared across all users in the organization for the specified schema.\nUnlike user collections, these are visible to everyone with access to entities of that schema.\n",
|
|
2504
3037
|
"tags": [
|
|
@@ -2878,6 +3411,288 @@
|
|
|
2878
3411
|
}
|
|
2879
3412
|
}
|
|
2880
3413
|
},
|
|
3414
|
+
"FileAttributeSuggestionJobStatus": {
|
|
3415
|
+
"type": "object",
|
|
3416
|
+
"required": [
|
|
3417
|
+
"status",
|
|
3418
|
+
"progress"
|
|
3419
|
+
],
|
|
3420
|
+
"properties": {
|
|
3421
|
+
"status": {
|
|
3422
|
+
"type": "string",
|
|
3423
|
+
"enum": [
|
|
3424
|
+
"INITIATED",
|
|
3425
|
+
"IN_PROGRESS",
|
|
3426
|
+
"COMPLETED",
|
|
3427
|
+
"FAILED"
|
|
3428
|
+
]
|
|
3429
|
+
},
|
|
3430
|
+
"progress": {
|
|
3431
|
+
"type": "number",
|
|
3432
|
+
"description": "Progress in percent (0-100)"
|
|
3433
|
+
},
|
|
3434
|
+
"error": {
|
|
3435
|
+
"type": "string",
|
|
3436
|
+
"description": "Failure reason when status is FAILED"
|
|
3437
|
+
}
|
|
3438
|
+
}
|
|
3439
|
+
},
|
|
3440
|
+
"FileAttributeSuggestion": {
|
|
3441
|
+
"type": "object",
|
|
3442
|
+
"properties": {
|
|
3443
|
+
"attribute_name": {
|
|
3444
|
+
"type": "string",
|
|
3445
|
+
"description": "Schema attribute name (field key on the entity)"
|
|
3446
|
+
},
|
|
3447
|
+
"attribute_label": {
|
|
3448
|
+
"type": "string",
|
|
3449
|
+
"description": "Human readable attribute label"
|
|
3450
|
+
},
|
|
3451
|
+
"attribute_type": {
|
|
3452
|
+
"type": "string",
|
|
3453
|
+
"enum": [
|
|
3454
|
+
"date",
|
|
3455
|
+
"number",
|
|
3456
|
+
"boolean",
|
|
3457
|
+
"select",
|
|
3458
|
+
"string"
|
|
3459
|
+
]
|
|
3460
|
+
},
|
|
3461
|
+
"suggested_value": {
|
|
3462
|
+
"description": "Scalar matching the attribute schema. Dates as `YYYY-MM-DD`.",
|
|
3463
|
+
"oneOf": [
|
|
3464
|
+
{
|
|
3465
|
+
"type": "string"
|
|
3466
|
+
},
|
|
3467
|
+
{
|
|
3468
|
+
"type": "number"
|
|
3469
|
+
},
|
|
3470
|
+
{
|
|
3471
|
+
"type": "boolean"
|
|
3472
|
+
}
|
|
3473
|
+
]
|
|
3474
|
+
},
|
|
3475
|
+
"confidence": {
|
|
3476
|
+
"type": "string",
|
|
3477
|
+
"enum": [
|
|
3478
|
+
"high",
|
|
3479
|
+
"medium",
|
|
3480
|
+
"low"
|
|
3481
|
+
]
|
|
3482
|
+
},
|
|
3483
|
+
"source_page": {
|
|
3484
|
+
"type": "integer",
|
|
3485
|
+
"description": "Page number in the document where the value was found"
|
|
3486
|
+
},
|
|
3487
|
+
"evidence": {
|
|
3488
|
+
"type": "string",
|
|
3489
|
+
"description": "Quote from the document followed by a short explanation of the mapping"
|
|
3490
|
+
},
|
|
3491
|
+
"status": {
|
|
3492
|
+
"type": "string",
|
|
3493
|
+
"enum": [
|
|
3494
|
+
"suggested",
|
|
3495
|
+
"accepted",
|
|
3496
|
+
"discarded"
|
|
3497
|
+
],
|
|
3498
|
+
"default": "suggested"
|
|
3499
|
+
},
|
|
3500
|
+
"status_updated_by": {
|
|
3501
|
+
"type": "string",
|
|
3502
|
+
"description": "User id that last updated the suggestion status"
|
|
3503
|
+
},
|
|
3504
|
+
"status_updated_at": {
|
|
3505
|
+
"type": "number",
|
|
3506
|
+
"description": "Epoch milliseconds of the last status update"
|
|
3507
|
+
},
|
|
3508
|
+
"discard_reason": {
|
|
3509
|
+
"type": "string",
|
|
3510
|
+
"description": "Reason given when the suggestion was discarded"
|
|
3511
|
+
},
|
|
3512
|
+
"is_copied": {
|
|
3513
|
+
"type": "boolean",
|
|
3514
|
+
"description": "Whether a user copied the suggested value"
|
|
3515
|
+
},
|
|
3516
|
+
"copied_by": {
|
|
3517
|
+
"type": "string",
|
|
3518
|
+
"description": "User id that copied the suggested value"
|
|
3519
|
+
},
|
|
3520
|
+
"copied_at": {
|
|
3521
|
+
"type": "number",
|
|
3522
|
+
"description": "Epoch milliseconds when the value was copied"
|
|
3523
|
+
},
|
|
3524
|
+
"suggestion_type": {
|
|
3525
|
+
"type": "string",
|
|
3526
|
+
"enum": [
|
|
3527
|
+
"new_value",
|
|
3528
|
+
"update"
|
|
3529
|
+
],
|
|
3530
|
+
"description": "`new_value` when the entity field is empty, `update` when the suggestion proposes a change"
|
|
3531
|
+
}
|
|
3532
|
+
}
|
|
3533
|
+
},
|
|
3534
|
+
"FileAttributeSuggestionsPayload": {
|
|
3535
|
+
"type": "object",
|
|
3536
|
+
"required": [
|
|
3537
|
+
"file_id",
|
|
3538
|
+
"entity_id",
|
|
3539
|
+
"entity_slug",
|
|
3540
|
+
"suggestions"
|
|
3541
|
+
],
|
|
3542
|
+
"properties": {
|
|
3543
|
+
"file_id": {
|
|
3544
|
+
"type": "string"
|
|
3545
|
+
},
|
|
3546
|
+
"entity_id": {
|
|
3547
|
+
"type": "string"
|
|
3548
|
+
},
|
|
3549
|
+
"entity_slug": {
|
|
3550
|
+
"type": "string"
|
|
3551
|
+
},
|
|
3552
|
+
"generated_by": {
|
|
3553
|
+
"type": "string",
|
|
3554
|
+
"description": "User id that requested the job"
|
|
3555
|
+
},
|
|
3556
|
+
"generated_at": {
|
|
3557
|
+
"type": "number",
|
|
3558
|
+
"description": "Epoch milliseconds when the job was requested"
|
|
3559
|
+
},
|
|
3560
|
+
"suggestions": {
|
|
3561
|
+
"type": "array",
|
|
3562
|
+
"items": {
|
|
3563
|
+
"$ref": "#/components/schemas/FileAttributeSuggestion"
|
|
3564
|
+
}
|
|
3565
|
+
}
|
|
3566
|
+
}
|
|
3567
|
+
},
|
|
3568
|
+
"FileAttributeSuggestionJob": {
|
|
3569
|
+
"type": "object",
|
|
3570
|
+
"required": [
|
|
3571
|
+
"jobId",
|
|
3572
|
+
"jobStatus",
|
|
3573
|
+
"payload",
|
|
3574
|
+
"createdAt",
|
|
3575
|
+
"updatedAt"
|
|
3576
|
+
],
|
|
3577
|
+
"properties": {
|
|
3578
|
+
"jobId": {
|
|
3579
|
+
"type": "string",
|
|
3580
|
+
"description": "Attribute suggestion job ID (ULID)"
|
|
3581
|
+
},
|
|
3582
|
+
"jobStatus": {
|
|
3583
|
+
"$ref": "#/components/schemas/FileAttributeSuggestionJobStatus"
|
|
3584
|
+
},
|
|
3585
|
+
"payload": {
|
|
3586
|
+
"$ref": "#/components/schemas/FileAttributeSuggestionsPayload"
|
|
3587
|
+
},
|
|
3588
|
+
"createdAt": {
|
|
3589
|
+
"type": "number",
|
|
3590
|
+
"description": "Epoch milliseconds"
|
|
3591
|
+
},
|
|
3592
|
+
"updatedAt": {
|
|
3593
|
+
"type": "number",
|
|
3594
|
+
"description": "Epoch milliseconds"
|
|
3595
|
+
}
|
|
3596
|
+
}
|
|
3597
|
+
},
|
|
3598
|
+
"CreateFileAttributeSuggestionJobRequest": {
|
|
3599
|
+
"type": "object",
|
|
3600
|
+
"required": [
|
|
3601
|
+
"entity_slug",
|
|
3602
|
+
"entity_id"
|
|
3603
|
+
],
|
|
3604
|
+
"properties": {
|
|
3605
|
+
"entity_slug": {
|
|
3606
|
+
"type": "string",
|
|
3607
|
+
"minLength": 1,
|
|
3608
|
+
"maxLength": 255,
|
|
3609
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
3610
|
+
"description": "Schema slug of the entity to suggest values for",
|
|
3611
|
+
"example": "opportunity"
|
|
3612
|
+
},
|
|
3613
|
+
"entity_id": {
|
|
3614
|
+
"type": "string",
|
|
3615
|
+
"format": "uuid",
|
|
3616
|
+
"description": "The entity to suggest values for"
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
},
|
|
3620
|
+
"UpdateFileAttributeSuggestionStatusRequest": {
|
|
3621
|
+
"type": "object",
|
|
3622
|
+
"required": [
|
|
3623
|
+
"suggestionStatusUpdates"
|
|
3624
|
+
],
|
|
3625
|
+
"properties": {
|
|
3626
|
+
"suggestionStatusUpdates": {
|
|
3627
|
+
"type": "array",
|
|
3628
|
+
"minItems": 1,
|
|
3629
|
+
"items": {
|
|
3630
|
+
"type": "object",
|
|
3631
|
+
"required": [
|
|
3632
|
+
"attribute_name"
|
|
3633
|
+
],
|
|
3634
|
+
"anyOf": [
|
|
3635
|
+
{
|
|
3636
|
+
"required": [
|
|
3637
|
+
"status"
|
|
3638
|
+
]
|
|
3639
|
+
},
|
|
3640
|
+
{
|
|
3641
|
+
"required": [
|
|
3642
|
+
"is_copied"
|
|
3643
|
+
]
|
|
3644
|
+
}
|
|
3645
|
+
],
|
|
3646
|
+
"properties": {
|
|
3647
|
+
"attribute_name": {
|
|
3648
|
+
"type": "string",
|
|
3649
|
+
"description": "The attribute_name of the suggestion to update"
|
|
3650
|
+
},
|
|
3651
|
+
"status": {
|
|
3652
|
+
"type": "string",
|
|
3653
|
+
"enum": [
|
|
3654
|
+
"accepted",
|
|
3655
|
+
"discarded"
|
|
3656
|
+
]
|
|
3657
|
+
},
|
|
3658
|
+
"is_copied": {
|
|
3659
|
+
"type": "boolean",
|
|
3660
|
+
"description": "Set to true when the user copied the suggested value"
|
|
3661
|
+
},
|
|
3662
|
+
"discard_reason": {
|
|
3663
|
+
"type": "string",
|
|
3664
|
+
"description": "Optional reason when status is discarded"
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
}
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
},
|
|
3671
|
+
"FileAttributeSuggestionError": {
|
|
3672
|
+
"allOf": [
|
|
3673
|
+
{
|
|
3674
|
+
"$ref": "#/components/schemas/ErrorObject"
|
|
3675
|
+
},
|
|
3676
|
+
{
|
|
3677
|
+
"type": "object",
|
|
3678
|
+
"properties": {
|
|
3679
|
+
"error_code": {
|
|
3680
|
+
"type": "string",
|
|
3681
|
+
"enum": [
|
|
3682
|
+
"entity_or_schema_unavailable",
|
|
3683
|
+
"file_not_extracted",
|
|
3684
|
+
"extraction_unsupported",
|
|
3685
|
+
"extraction_failed",
|
|
3686
|
+
"extraction_status_unavailable",
|
|
3687
|
+
"processing_enqueue_failed",
|
|
3688
|
+
"no_file_attribute_suggestions_job",
|
|
3689
|
+
"job_not_found"
|
|
3690
|
+
]
|
|
3691
|
+
}
|
|
3692
|
+
}
|
|
3693
|
+
}
|
|
3694
|
+
]
|
|
3695
|
+
},
|
|
2881
3696
|
"FileTextStatus": {
|
|
2882
3697
|
"type": "string",
|
|
2883
3698
|
"description": "Availability of the plain-text representation for a file entity.",
|
|
@@ -4148,6 +4963,16 @@
|
|
|
4148
4963
|
}
|
|
4149
4964
|
},
|
|
4150
4965
|
"responses": {
|
|
4966
|
+
"FileAttributeSuggestionErrorResponse": {
|
|
4967
|
+
"description": "Attribute suggestion error with a machine readable `error_code`",
|
|
4968
|
+
"content": {
|
|
4969
|
+
"application/json": {
|
|
4970
|
+
"schema": {
|
|
4971
|
+
"$ref": "#/components/schemas/FileAttributeSuggestionError"
|
|
4972
|
+
}
|
|
4973
|
+
}
|
|
4974
|
+
}
|
|
4975
|
+
},
|
|
4151
4976
|
"BadRequestError": {
|
|
4152
4977
|
"description": "Invalid request parameters or payload",
|
|
4153
4978
|
"content": {
|