@epilot/file-client 1.26.0 → 1.27.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 epilot GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={438(e,r,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t(466));r.default=i.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v2/files/upload":{"post":{"operationId":"uploadFileV2","parameters":[{"name":"file_entity_id","in":"query"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/files":{"post":{"operationId":"saveFileV2","parameters":[{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/FillActivityQueryParam"},{"$ref":"#/components/parameters/StrictQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/DeleteTempFileQueryParam"},{"$ref":"#/components/parameters/VersionOnlyQueryParam"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files/upload":{"post":{"operationId":"uploadFile","deprecated":true,"parameters":[{"name":"file_entity_id","in":"query"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files":{"post":{"operationId":"saveFile","deprecated":true,"parameters":[{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/VersionOnlyQueryParam"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/files/{id}":{"get":{"operationId":"getFile","parameters":[{"name":"id","in":"path","required":true},{"name":"source_url","in":"query"},{"$ref":"#/components/parameters/StrictQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"responses":{}},"delete":{"operationId":"deleteFile","parameters":[{"name":"id","in":"path","required":true},{"name":"purge","in":"query"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/StrictQueryParam"}],"responses":{}}},"/v1/files/{id}/download":{"get":{"operationId":"downloadFile","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query"},{"name":"attachment","in":"query"}],"responses":{}}},"/v1/files:downloadS3":{"post":{"operationId":"downloadS3File","parameters":[{"name":"s3_key","in":"query","required":true},{"name":"s3_bucket","in":"query","required":true},{"name":"attachment","in":"query"}],"responses":{}}},"/v1/files:downloadFiles":{"post":{"operationId":"downloadFiles","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files:zipJob":{"post":{"operationId":"createZipJob","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files:zipJob/{job_id}":{"get":{"operationId":"getZipJob","parameters":[{"name":"job_id","in":"path","required":true}],"responses":{}}},"/v1/files/{id}/summary:generate":{"post":{"operationId":"generateFileSummary","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/{id}/preview":{"get":{"operationId":"previewFile","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query"},{"name":"w","in":"query"},{"name":"h","in":"query"}],"responses":{}}},"/v1/files:previewS3":{"post":{"operationId":"previewS3File","parameters":[{"name":"w","in":"query"},{"name":"h","in":"query"}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"get":{"operationId":"previewS3FileGet","parameters":[{"name":"key","in":"query","required":true},{"name":"bucket","in":"query","required":true},{"name":"w","in":"query"},{"name":"h","in":"query"}],"responses":{}}},"/v1/files/public/{id}/preview":{"get":{"operationId":"previewPublicFile","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query"},{"name":"w","in":"query"},{"name":"h","in":"query"},{"name":"org_id","in":"query"}],"responses":{}}},"/v1/files/session":{"get":{"operationId":"getSession","responses":{}},"delete":{"operationId":"deleteSession","responses":{}}},"/v1/files/{id}/public/links":{"post":{"operationId":"generatePublicLink","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"get":{"operationId":"listPublicLinksForFile","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/public/links/{id}/{filename}":{"get":{"operationId":"accessPublicLink","parameters":[{"name":"id","in":"path","required":true},{"name":"filename","in":"path","required":true},{"name":"hash","in":"query","required":false}],"responses":{}}},"/v1/files/public/links/{id}":{"delete":{"operationId":"revokePublicLink","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/download:verify":{"post":{"operationId":"verifyCustomDownloadUrl","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files/public/upload":{"post":{"operationId":"uploadFilePublic","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/{slug}/collections":{"get":{"operationId":"getUserSchemaFileCollections","parameters":[{"name":"slug","in":"path","required":true}],"responses":{}},"post":{"operationId":"createUserSchemaFileCollection","parameters":[{"name":"slug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/{slug}/collections/{collectionSlug}":{"put":{"operationId":"updateUserSchemaFileCollection","parameters":[{"name":"slug","in":"path","required":true},{"name":"collectionSlug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteUserSchemaFileCollection","parameters":[{"name":"slug","in":"path","required":true},{"name":"collectionSlug","in":"path","required":true}],"responses":{}}},"/v1/entity/{id}/collections/{collectionSlug}/files":{"get":{"operationId":"getFilesInCollection","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"collectionSlug","in":"path","required":true}],"responses":{}}},"/v1/collections/{schemaSlug}":{"get":{"operationId":"getGlobalFileCollections","parameters":[{"name":"schemaSlug","in":"path","required":true}],"responses":{}}}},"components":{"parameters":{"EntityIdPathParam":{"name":"id","in":"path","required":true},"StrictQueryParam":{"name":"strict","in":"query","required":false},"ActivityIdQueryParam":{"name":"activity_id","in":"query","required":false},"FillActivityQueryParam":{"name":"fill_activity","in":"query","required":false},"AsyncOperationQueryParam":{"name":"async","in":"query","required":false},"DeleteTempFileQueryParam":{"name":"delete_temp_file","in":"query","required":false},"VersionOnlyQueryParam":{"name":"version_only","in":"query","required":false}},"responses":{"BadRequestError":{"content":{"application/json":{}}},"UnauthorizedError":{"content":{"application/json":{}}},"ForbiddenError":{"content":{"application/json":{}}},"NotFoundError":{"content":{"application/json":{}}},"ConflictError":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://file.sls.epilot.io"}]}')}},r={},t=function t(n){var i=r[n];if(void 0!==i)return i.exports;var a=r[n]={exports:{}};return e[n].call(a.exports,a,a.exports,t),a.exports}(438),n=exports;for(var i in t)n[i]=t[i];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={438(e,r,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var n=i(t(466));r.default=n.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v2/files/upload":{"post":{"operationId":"uploadFileV2","parameters":[{"name":"file_entity_id","in":"query"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/files":{"post":{"operationId":"saveFileV2","parameters":[{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/FillActivityQueryParam"},{"$ref":"#/components/parameters/StrictQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/DeleteTempFileQueryParam"},{"$ref":"#/components/parameters/VersionOnlyQueryParam"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files/upload":{"post":{"operationId":"uploadFile","deprecated":true,"parameters":[{"name":"file_entity_id","in":"query"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files":{"post":{"operationId":"saveFile","deprecated":true,"parameters":[{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"},{"$ref":"#/components/parameters/VersionOnlyQueryParam"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/files/{id}":{"get":{"operationId":"getFile","parameters":[{"name":"id","in":"path","required":true},{"name":"source_url","in":"query"},{"$ref":"#/components/parameters/StrictQueryParam"},{"$ref":"#/components/parameters/AsyncOperationQueryParam"}],"responses":{}},"delete":{"operationId":"deleteFile","parameters":[{"name":"id","in":"path","required":true},{"name":"purge","in":"query"},{"$ref":"#/components/parameters/ActivityIdQueryParam"},{"$ref":"#/components/parameters/StrictQueryParam"}],"responses":{}}},"/v1/files/{id}/download":{"get":{"operationId":"downloadFile","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query"},{"name":"attachment","in":"query"}],"responses":{}}},"/v1/files:downloadS3":{"post":{"operationId":"downloadS3File","parameters":[{"name":"s3_key","in":"query","required":true},{"name":"s3_bucket","in":"query","required":true},{"name":"attachment","in":"query"}],"responses":{}}},"/v1/files:downloadFiles":{"post":{"operationId":"downloadFiles","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files:zipJob":{"post":{"operationId":"createZipJob","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files:zipJob/{job_id}":{"get":{"operationId":"getZipJob","parameters":[{"name":"job_id","in":"path","required":true}],"responses":{}}},"/v1/files/{id}/summary":{"get":{"operationId":"getFileSummary","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/{id}/summary-jobs":{"post":{"operationId":"createFileSummaryJob","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/{id}/summary-jobs/current":{"get":{"operationId":"getCurrentFileSummaryJob","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/{id}/summary-jobs/{job_id}":{"get":{"operationId":"getFileSummaryJob","parameters":[{"name":"id","in":"path","required":true},{"name":"job_id","in":"path","required":true}],"responses":{}}},"/v1/files/{id}/summary:generate":{"post":{"operationId":"generateFileSummary","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/{id}/preview":{"get":{"operationId":"previewFile","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query"},{"name":"w","in":"query"},{"name":"h","in":"query"}],"responses":{}}},"/v1/files:previewS3":{"post":{"operationId":"previewS3File","parameters":[{"name":"w","in":"query"},{"name":"h","in":"query"}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"get":{"operationId":"previewS3FileGet","parameters":[{"name":"key","in":"query","required":true},{"name":"bucket","in":"query","required":true},{"name":"w","in":"query"},{"name":"h","in":"query"}],"responses":{}}},"/v1/files/public/{id}/preview":{"get":{"operationId":"previewPublicFile","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query"},{"name":"w","in":"query"},{"name":"h","in":"query"},{"name":"org_id","in":"query"}],"responses":{}}},"/v1/files/session":{"get":{"operationId":"getSession","responses":{}},"delete":{"operationId":"deleteSession","responses":{}}},"/v1/files/{id}/public/links":{"post":{"operationId":"generatePublicLink","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"get":{"operationId":"listPublicLinksForFile","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/public/links/{id}/{filename}":{"get":{"operationId":"accessPublicLink","parameters":[{"name":"id","in":"path","required":true},{"name":"filename","in":"path","required":true},{"name":"hash","in":"query","required":false}],"responses":{}}},"/v1/files/public/links/{id}":{"delete":{"operationId":"revokePublicLink","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/files/download:verify":{"post":{"operationId":"verifyCustomDownloadUrl","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/files/public/upload":{"post":{"operationId":"uploadFilePublic","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/{slug}/collections":{"get":{"operationId":"getUserSchemaFileCollections","parameters":[{"name":"slug","in":"path","required":true}],"responses":{}},"post":{"operationId":"createUserSchemaFileCollection","parameters":[{"name":"slug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/{slug}/collections/{collectionSlug}":{"put":{"operationId":"updateUserSchemaFileCollection","parameters":[{"name":"slug","in":"path","required":true},{"name":"collectionSlug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteUserSchemaFileCollection","parameters":[{"name":"slug","in":"path","required":true},{"name":"collectionSlug","in":"path","required":true}],"responses":{}}},"/v1/entity/{id}/collections/{collectionSlug}/files":{"get":{"operationId":"getFilesInCollection","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"collectionSlug","in":"path","required":true}],"responses":{}}},"/v1/collections/{schemaSlug}":{"get":{"operationId":"getGlobalFileCollections","parameters":[{"name":"schemaSlug","in":"path","required":true}],"responses":{}}}},"components":{"parameters":{"EntityIdPathParam":{"name":"id","in":"path","required":true},"StrictQueryParam":{"name":"strict","in":"query","required":false},"ActivityIdQueryParam":{"name":"activity_id","in":"query","required":false},"FillActivityQueryParam":{"name":"fill_activity","in":"query","required":false},"AsyncOperationQueryParam":{"name":"async","in":"query","required":false},"DeleteTempFileQueryParam":{"name":"delete_temp_file","in":"query","required":false},"VersionOnlyQueryParam":{"name":"version_only","in":"query","required":false}},"responses":{"BadRequestError":{"content":{"application/json":{}}},"UnauthorizedError":{"content":{"application/json":{}}},"ForbiddenError":{"content":{"application/json":{}}},"NotFoundError":{"content":{"application/json":{}}},"ConflictError":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://file.sls.epilot.io"}]}')}},r={},t=function t(i){var n=r[i];if(void 0!==n)return n.exports;var a=r[i]={exports:{}};return e[i].call(a.exports,a,a.exports,t),a.exports}(438),i=exports;for(var n in t)i[n]=t[n];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
@@ -216,6 +216,63 @@
216
216
  "responses": {}
217
217
  }
218
218
  },
219
+ "/v1/files/{id}/summary": {
220
+ "get": {
221
+ "operationId": "getFileSummary",
222
+ "parameters": [
223
+ {
224
+ "name": "id",
225
+ "in": "path",
226
+ "required": true
227
+ }
228
+ ],
229
+ "responses": {}
230
+ }
231
+ },
232
+ "/v1/files/{id}/summary-jobs": {
233
+ "post": {
234
+ "operationId": "createFileSummaryJob",
235
+ "parameters": [
236
+ {
237
+ "name": "id",
238
+ "in": "path",
239
+ "required": true
240
+ }
241
+ ],
242
+ "responses": {}
243
+ }
244
+ },
245
+ "/v1/files/{id}/summary-jobs/current": {
246
+ "get": {
247
+ "operationId": "getCurrentFileSummaryJob",
248
+ "parameters": [
249
+ {
250
+ "name": "id",
251
+ "in": "path",
252
+ "required": true
253
+ }
254
+ ],
255
+ "responses": {}
256
+ }
257
+ },
258
+ "/v1/files/{id}/summary-jobs/{job_id}": {
259
+ "get": {
260
+ "operationId": "getFileSummaryJob",
261
+ "parameters": [
262
+ {
263
+ "name": "id",
264
+ "in": "path",
265
+ "required": true
266
+ },
267
+ {
268
+ "name": "job_id",
269
+ "in": "path",
270
+ "required": true
271
+ }
272
+ ],
273
+ "responses": {}
274
+ }
275
+ },
219
276
  "/v1/files/{id}/summary:generate": {
220
277
  "post": {
221
278
  "operationId": "generateFileSummary",
package/dist/openapi.d.ts CHANGED
@@ -2356,6 +2356,12 @@ declare namespace Components {
2356
2356
  * https://some-api-url.com/download?file_id=123
2357
2357
  */
2358
2358
  export type CustomDownloadUrl = string; // uri
2359
+ /**
2360
+ * Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.
2361
+ * example:
2362
+ * token
2363
+ */
2364
+ export type CustomDownloadUrlAuth = "presigned" | "token";
2359
2365
  export type DownloadFilesPayload = {
2360
2366
  id: /**
2361
2367
  * example:
@@ -2455,6 +2461,12 @@ declare namespace Components {
2455
2461
  * https://some-api-url.com/download?file_id=123
2456
2462
  */
2457
2463
  CustomDownloadUrl /* uri */;
2464
+ custom_download_url_auth?: /**
2465
+ * Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.
2466
+ * example:
2467
+ * token
2468
+ */
2469
+ CustomDownloadUrlAuth;
2458
2470
  /**
2459
2471
  * Compact German summary for hover and list preview surfaces.
2460
2472
  */
@@ -2471,7 +2483,6 @@ declare namespace Components {
2471
2483
  * Short English paragraph summary for file preview surfaces.
2472
2484
  */
2473
2485
  short_summary_en?: string;
2474
- summary_status?: /* Current AI summary generation state for the file. */ FileSummaryStatus;
2475
2486
  }
2476
2487
  export interface FileCollectionAttributes {
2477
2488
  /**
@@ -2671,6 +2682,12 @@ declare namespace Components {
2671
2682
  * https://some-api-url.com/download?file_id=123
2672
2683
  */
2673
2684
  CustomDownloadUrl /* uri */;
2685
+ custom_download_url_auth?: /**
2686
+ * Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.
2687
+ * example:
2688
+ * token
2689
+ */
2690
+ CustomDownloadUrlAuth;
2674
2691
  /**
2675
2692
  * Compact German summary for hover and list preview surfaces.
2676
2693
  */
@@ -2687,7 +2704,6 @@ declare namespace Components {
2687
2704
  * Short English paragraph summary for file preview surfaces.
2688
2705
  */
2689
2706
  short_summary_en?: string;
2690
- summary_status?: /* Current AI summary generation state for the file. */ FileSummaryStatus;
2691
2707
  /**
2692
2708
  * Source URL for the file. Included if the entity was created from source_url, or when ?source_url=true
2693
2709
  * example:
@@ -2759,13 +2775,52 @@ declare namespace Components {
2759
2775
  EntitySlug;
2760
2776
  _tags?: string[];
2761
2777
  }
2762
- export interface FileSummaryGenerationStatus {
2763
- status: /* Current AI summary generation state for the file. */ FileSummaryStatus;
2778
+ export interface FileSummary {
2779
+ status?: /* Current state of a file summary job. */ FileSummaryJobStatus;
2780
+ /**
2781
+ * Current summary job ID when available.
2782
+ */
2783
+ job_id?: string; // uuid
2784
+ /**
2785
+ * Compact German summary for hover and list preview surfaces.
2786
+ */
2787
+ preview_summary_de?: string | null;
2788
+ /**
2789
+ * Short German paragraph summary for file preview surfaces.
2790
+ */
2791
+ short_summary_de?: string | null;
2792
+ /**
2793
+ * Compact English summary for hover and list preview surfaces.
2794
+ */
2795
+ preview_summary_en?: string | null;
2796
+ /**
2797
+ * Short English paragraph summary for file preview surfaces.
2798
+ */
2799
+ short_summary_en?: string | null;
2800
+ }
2801
+ export interface FileSummaryJob {
2802
+ /**
2803
+ * File summary job ID.
2804
+ */
2805
+ job_id: string; // uuid
2806
+ file_id: /**
2807
+ * example:
2808
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
2809
+ */
2810
+ FileEntityId;
2811
+ status: /* Current state of a file summary job. */ FileSummaryJobStatus;
2812
+ /**
2813
+ * Human-readable failure or unsupported reason when available.
2814
+ */
2815
+ error?: string;
2816
+ created_at: string; // date-time
2817
+ updated_at: string; // date-time
2818
+ completed_at?: string; // date-time
2764
2819
  }
2765
2820
  /**
2766
- * Current AI summary generation state for the file.
2821
+ * Current state of a file summary job.
2767
2822
  */
2768
- export type FileSummaryStatus = "processing" | "completed" | "failed" | "unsupported";
2823
+ export type FileSummaryJobStatus = "queued" | "waiting_for_extraction" | "processing" | "completed" | "failed" | "unsupported" | "stale";
2769
2824
  export type FileType = "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown";
2770
2825
  export interface FileUpload {
2771
2826
  s3ref?: S3Reference;
@@ -2890,6 +2945,12 @@ declare namespace Components {
2890
2945
  * https://some-api-url.com/download?file_id=123
2891
2946
  */
2892
2947
  CustomDownloadUrl /* uri */;
2948
+ custom_download_url_auth?: /**
2949
+ * Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.
2950
+ * example:
2951
+ * token
2952
+ */
2953
+ CustomDownloadUrlAuth;
2893
2954
  /**
2894
2955
  * Compact German summary for hover and list preview surfaces.
2895
2956
  */
@@ -2906,7 +2967,6 @@ declare namespace Components {
2906
2967
  * Short English paragraph summary for file preview surfaces.
2907
2968
  */
2908
2969
  short_summary_en?: string;
2909
- summary_status?: /* Current AI summary generation state for the file. */ FileSummaryStatus;
2910
2970
  }
2911
2971
  export interface SaveFileFromSourceURLPayload {
2912
2972
  [name: string]: any;
@@ -2986,6 +3046,12 @@ declare namespace Components {
2986
3046
  * https://some-api-url.com/download?file_id=123
2987
3047
  */
2988
3048
  CustomDownloadUrl /* uri */;
3049
+ custom_download_url_auth?: /**
3050
+ * Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.
3051
+ * example:
3052
+ * token
3053
+ */
3054
+ CustomDownloadUrlAuth;
2989
3055
  /**
2990
3056
  * Compact German summary for hover and list preview surfaces.
2991
3057
  */
@@ -3002,7 +3068,6 @@ declare namespace Components {
3002
3068
  * Short English paragraph summary for file preview surfaces.
3003
3069
  */
3004
3070
  short_summary_en?: string;
3005
- summary_status?: /* Current AI summary generation state for the file. */ FileSummaryStatus;
3006
3071
  source_url?: /**
3007
3072
  * Custom external download url used for the file
3008
3073
  * example:
@@ -3090,6 +3155,12 @@ declare namespace Components {
3090
3155
  * https://some-api-url.com/download?file_id=123
3091
3156
  */
3092
3157
  CustomDownloadUrl /* uri */;
3158
+ custom_download_url_auth?: /**
3159
+ * Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.
3160
+ * example:
3161
+ * token
3162
+ */
3163
+ CustomDownloadUrlAuth;
3093
3164
  /**
3094
3165
  * Compact German summary for hover and list preview surfaces.
3095
3166
  */
@@ -3106,7 +3177,6 @@ declare namespace Components {
3106
3177
  * Short English paragraph summary for file preview surfaces.
3107
3178
  */
3108
3179
  short_summary_en?: string;
3109
- summary_status?: /* Current AI summary generation state for the file. */ FileSummaryStatus;
3110
3180
  s3ref?: S3Ref;
3111
3181
  }
3112
3182
  export interface UploadFilePayload {
@@ -3276,6 +3346,66 @@ declare namespace Paths {
3276
3346
  Components.Responses.InternalServerError;
3277
3347
  }
3278
3348
  }
3349
+ namespace CreateFileSummaryJob {
3350
+ namespace Parameters {
3351
+ export type Id = /**
3352
+ * example:
3353
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
3354
+ */
3355
+ Components.Schemas.FileEntityId;
3356
+ }
3357
+ export interface PathParameters {
3358
+ id: Parameters.Id;
3359
+ }
3360
+ namespace Responses {
3361
+ export type $202 = Components.Schemas.FileSummaryJob;
3362
+ export type $400 = /**
3363
+ * A generic error returned by the API
3364
+ * example:
3365
+ * {
3366
+ * "status": 400,
3367
+ * "error": "Bad Request: filename is required"
3368
+ * }
3369
+ */
3370
+ Components.Responses.BadRequestError;
3371
+ export type $401 = /**
3372
+ * A generic error returned by the API
3373
+ * example:
3374
+ * {
3375
+ * "status": 401,
3376
+ * "error": "Unauthorized: Invalid or expired token"
3377
+ * }
3378
+ */
3379
+ Components.Responses.UnauthorizedError;
3380
+ export type $403 = /**
3381
+ * A generic error returned by the API
3382
+ * example:
3383
+ * {
3384
+ * "status": 403,
3385
+ * "error": "Forbidden: You do not have permission to access this file"
3386
+ * }
3387
+ */
3388
+ Components.Responses.ForbiddenError;
3389
+ export type $404 = /**
3390
+ * A generic error returned by the API
3391
+ * example:
3392
+ * {
3393
+ * "status": 404,
3394
+ * "error": "Not Found: File entity not found"
3395
+ * }
3396
+ */
3397
+ Components.Responses.NotFoundError;
3398
+ export type $500 = /**
3399
+ * A generic error returned by the API
3400
+ * example:
3401
+ * {
3402
+ * "status": 500,
3403
+ * "error": "Internal Server Error"
3404
+ * }
3405
+ */
3406
+ Components.Responses.InternalServerError;
3407
+ }
3408
+ }
3279
3409
  namespace CreateUserSchemaFileCollection {
3280
3410
  namespace Parameters {
3281
3411
  export type Slug = string;
@@ -3646,7 +3776,7 @@ declare namespace Paths {
3646
3776
  id: Parameters.Id;
3647
3777
  }
3648
3778
  namespace Responses {
3649
- export type $202 = Components.Schemas.FileSummaryGenerationStatus;
3779
+ export type $202 = Components.Schemas.FileSummaryJob;
3650
3780
  export type $400 = /**
3651
3781
  * A generic error returned by the API
3652
3782
  * example:
@@ -3683,15 +3813,60 @@ declare namespace Paths {
3683
3813
  * }
3684
3814
  */
3685
3815
  Components.Responses.NotFoundError;
3686
- export type $409 = /**
3816
+ export type $500 = /**
3687
3817
  * A generic error returned by the API
3688
3818
  * example:
3689
3819
  * {
3690
- * "status": 409,
3691
- * "error": "Extracted file content is still being prepared"
3820
+ * "status": 500,
3821
+ * "error": "Internal Server Error"
3692
3822
  * }
3693
3823
  */
3694
- Components.Responses.ConflictError;
3824
+ Components.Responses.InternalServerError;
3825
+ }
3826
+ }
3827
+ namespace GeneratePublicLink {
3828
+ namespace Parameters {
3829
+ export type Id = /**
3830
+ * example:
3831
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
3832
+ */
3833
+ Components.Schemas.FileEntityId;
3834
+ }
3835
+ export interface PathParameters {
3836
+ id: Parameters.Id;
3837
+ }
3838
+ namespace Responses {
3839
+ /**
3840
+ * The public URL that can be shared externally
3841
+ */
3842
+ export type $201 = string;
3843
+ export type $401 = /**
3844
+ * A generic error returned by the API
3845
+ * example:
3846
+ * {
3847
+ * "status": 401,
3848
+ * "error": "Unauthorized: Invalid or expired token"
3849
+ * }
3850
+ */
3851
+ Components.Responses.UnauthorizedError;
3852
+ export type $403 = /**
3853
+ * A generic error returned by the API
3854
+ * example:
3855
+ * {
3856
+ * "status": 403,
3857
+ * "error": "Forbidden: You do not have permission to access this file"
3858
+ * }
3859
+ */
3860
+ Components.Responses.ForbiddenError;
3861
+ export type $404 = /**
3862
+ * A generic error returned by the API
3863
+ * example:
3864
+ * {
3865
+ * "status": 404,
3866
+ * "error": "Not Found: File entity not found"
3867
+ * }
3868
+ */
3869
+ Components.Responses.NotFoundError;
3695
3870
  export type $500 = /**
3696
3871
  * A generic error returned by the API
3697
3872
  * example:
@@ -3703,7 +3878,7 @@ declare namespace Paths {
3703
3878
  Components.Responses.InternalServerError;
3704
3879
  }
3705
3880
  }
3706
- namespace GeneratePublicLink {
3881
+ namespace GetCurrentFileSummaryJob {
3707
3882
  namespace Parameters {
3708
3883
  export type Id = /**
3709
3884
  * example:
@@ -3715,10 +3890,16 @@ declare namespace Paths {
3715
3890
  id: Parameters.Id;
3716
3891
  }
3717
3892
  namespace Responses {
3718
- /**
3719
- * The public URL that can be shared externally
3893
+ export type $200 = Components.Schemas.FileSummaryJob;
3894
+ export type $400 = /**
3895
+ * A generic error returned by the API
3896
+ * example:
3897
+ * {
3898
+ * "status": 400,
3899
+ * "error": "Bad Request: filename is required"
3900
+ * }
3720
3901
  */
3721
- export type $201 = string;
3902
+ Components.Responses.BadRequestError;
3722
3903
  export type $401 = /**
3723
3904
  * A generic error returned by the API
3724
3905
  * example:
@@ -3819,6 +4000,128 @@ declare namespace Paths {
3819
4000
  Components.Responses.InternalServerError;
3820
4001
  }
3821
4002
  }
4003
+ namespace GetFileSummary {
4004
+ namespace Parameters {
4005
+ export type Id = /**
4006
+ * example:
4007
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
4008
+ */
4009
+ Components.Schemas.FileEntityId;
4010
+ }
4011
+ export interface PathParameters {
4012
+ id: Parameters.Id;
4013
+ }
4014
+ namespace Responses {
4015
+ export type $200 = Components.Schemas.FileSummary;
4016
+ export type $400 = /**
4017
+ * A generic error returned by the API
4018
+ * example:
4019
+ * {
4020
+ * "status": 400,
4021
+ * "error": "Bad Request: filename is required"
4022
+ * }
4023
+ */
4024
+ Components.Responses.BadRequestError;
4025
+ export type $401 = /**
4026
+ * A generic error returned by the API
4027
+ * example:
4028
+ * {
4029
+ * "status": 401,
4030
+ * "error": "Unauthorized: Invalid or expired token"
4031
+ * }
4032
+ */
4033
+ Components.Responses.UnauthorizedError;
4034
+ export type $403 = /**
4035
+ * A generic error returned by the API
4036
+ * example:
4037
+ * {
4038
+ * "status": 403,
4039
+ * "error": "Forbidden: You do not have permission to access this file"
4040
+ * }
4041
+ */
4042
+ Components.Responses.ForbiddenError;
4043
+ export type $404 = /**
4044
+ * A generic error returned by the API
4045
+ * example:
4046
+ * {
4047
+ * "status": 404,
4048
+ * "error": "Not Found: File entity not found"
4049
+ * }
4050
+ */
4051
+ Components.Responses.NotFoundError;
4052
+ export type $500 = /**
4053
+ * A generic error returned by the API
4054
+ * example:
4055
+ * {
4056
+ * "status": 500,
4057
+ * "error": "Internal Server Error"
4058
+ * }
4059
+ */
4060
+ Components.Responses.InternalServerError;
4061
+ }
4062
+ }
4063
+ namespace GetFileSummaryJob {
4064
+ namespace Parameters {
4065
+ export type Id = /**
4066
+ * example:
4067
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
4068
+ */
4069
+ Components.Schemas.FileEntityId;
4070
+ export type JobId = string; // uuid
4071
+ }
4072
+ export interface PathParameters {
4073
+ id: Parameters.Id;
4074
+ job_id: Parameters.JobId /* uuid */;
4075
+ }
4076
+ namespace Responses {
4077
+ export type $200 = Components.Schemas.FileSummaryJob;
4078
+ export type $400 = /**
4079
+ * A generic error returned by the API
4080
+ * example:
4081
+ * {
4082
+ * "status": 400,
4083
+ * "error": "Bad Request: filename is required"
4084
+ * }
4085
+ */
4086
+ Components.Responses.BadRequestError;
4087
+ export type $401 = /**
4088
+ * A generic error returned by the API
4089
+ * example:
4090
+ * {
4091
+ * "status": 401,
4092
+ * "error": "Unauthorized: Invalid or expired token"
4093
+ * }
4094
+ */
4095
+ Components.Responses.UnauthorizedError;
4096
+ export type $403 = /**
4097
+ * A generic error returned by the API
4098
+ * example:
4099
+ * {
4100
+ * "status": 403,
4101
+ * "error": "Forbidden: You do not have permission to access this file"
4102
+ * }
4103
+ */
4104
+ Components.Responses.ForbiddenError;
4105
+ export type $404 = /**
4106
+ * A generic error returned by the API
4107
+ * example:
4108
+ * {
4109
+ * "status": 404,
4110
+ * "error": "Not Found: File entity not found"
4111
+ * }
4112
+ */
4113
+ Components.Responses.NotFoundError;
4114
+ export type $500 = /**
4115
+ * A generic error returned by the API
4116
+ * example:
4117
+ * {
4118
+ * "status": 500,
4119
+ * "error": "Internal Server Error"
4120
+ * }
4121
+ */
4122
+ Components.Responses.InternalServerError;
4123
+ }
4124
+ }
3822
4125
  namespace GetFilesInCollection {
3823
4126
  namespace Parameters {
3824
4127
  export type CollectionSlug = string;
@@ -4725,10 +5028,50 @@ export interface OperationMethods {
4725
5028
  data?: any,
4726
5029
  config?: AxiosRequestConfig
4727
5030
  ): OperationResponse<Paths.GetZipJob.Responses.$200>
5031
+ /**
5032
+ * getFileSummary - getFileSummary
5033
+ *
5034
+ * Get summary text for a file entity together with the current summary job status when available.
5035
+ */
5036
+ 'getFileSummary'(
5037
+ parameters?: Parameters<Paths.GetFileSummary.PathParameters> | null,
5038
+ data?: any,
5039
+ config?: AxiosRequestConfig
5040
+ ): OperationResponse<Paths.GetFileSummary.Responses.$200>
5041
+ /**
5042
+ * createFileSummaryJob - createFileSummaryJob
5043
+ *
5044
+ * Create or return the current AI summary job for a file entity.
5045
+ */
5046
+ 'createFileSummaryJob'(
5047
+ parameters?: Parameters<Paths.CreateFileSummaryJob.PathParameters> | null,
5048
+ data?: any,
5049
+ config?: AxiosRequestConfig
5050
+ ): OperationResponse<Paths.CreateFileSummaryJob.Responses.$202>
5051
+ /**
5052
+ * getCurrentFileSummaryJob - getCurrentFileSummaryJob
5053
+ *
5054
+ * Get the latest AI summary job for the file entity's current source.
5055
+ */
5056
+ 'getCurrentFileSummaryJob'(
5057
+ parameters?: Parameters<Paths.GetCurrentFileSummaryJob.PathParameters> | null,
5058
+ data?: any,
5059
+ config?: AxiosRequestConfig
5060
+ ): OperationResponse<Paths.GetCurrentFileSummaryJob.Responses.$200>
5061
+ /**
5062
+ * getFileSummaryJob - getFileSummaryJob
5063
+ *
5064
+ * Get an AI summary job by id.
5065
+ */
5066
+ 'getFileSummaryJob'(
5067
+ parameters?: Parameters<Paths.GetFileSummaryJob.PathParameters> | null,
5068
+ data?: any,
5069
+ config?: AxiosRequestConfig
5070
+ ): OperationResponse<Paths.GetFileSummaryJob.Responses.$200>
4728
5071
  /**
4729
5072
  * generateFileSummary - generateFileSummary
4730
5073
  *
4731
- * Request AI generation of preview and short summaries for a file entity.
5074
+ * Compatibility alias for creating or returning the current AI summary job for a file entity.
4732
5075
  */
4733
5076
  'generateFileSummary'(
4734
5077
  parameters?: Parameters<Paths.GenerateFileSummary.PathParameters> | null,
@@ -5186,11 +5529,59 @@ export interface PathsDictionary {
5186
5529
  config?: AxiosRequestConfig
5187
5530
  ): OperationResponse<Paths.GetZipJob.Responses.$200>
5188
5531
  }
5532
+ ['/v1/files/{id}/summary']: {
5533
+ /**
5534
+ * getFileSummary - getFileSummary
5535
+ *
5536
+ * Get summary text for a file entity together with the current summary job status when available.
5537
+ */
5538
+ 'get'(
5539
+ parameters?: Parameters<Paths.GetFileSummary.PathParameters> | null,
5540
+ data?: any,
5541
+ config?: AxiosRequestConfig
5542
+ ): OperationResponse<Paths.GetFileSummary.Responses.$200>
5543
+ }
5544
+ ['/v1/files/{id}/summary-jobs']: {
5545
+ /**
5546
+ * createFileSummaryJob - createFileSummaryJob
5547
+ *
5548
+ * Create or return the current AI summary job for a file entity.
5549
+ */
5550
+ 'post'(
5551
+ parameters?: Parameters<Paths.CreateFileSummaryJob.PathParameters> | null,
5552
+ data?: any,
5553
+ config?: AxiosRequestConfig
5554
+ ): OperationResponse<Paths.CreateFileSummaryJob.Responses.$202>
5555
+ }
5556
+ ['/v1/files/{id}/summary-jobs/current']: {
5557
+ /**
5558
+ * getCurrentFileSummaryJob - getCurrentFileSummaryJob
5559
+ *
5560
+ * Get the latest AI summary job for the file entity's current source.
5561
+ */
5562
+ 'get'(
5563
+ parameters?: Parameters<Paths.GetCurrentFileSummaryJob.PathParameters> | null,
5564
+ data?: any,
5565
+ config?: AxiosRequestConfig
5566
+ ): OperationResponse<Paths.GetCurrentFileSummaryJob.Responses.$200>
5567
+ }
5568
+ ['/v1/files/{id}/summary-jobs/{job_id}']: {
5569
+ /**
5570
+ * getFileSummaryJob - getFileSummaryJob
5571
+ *
5572
+ * Get an AI summary job by id.
5573
+ */
5574
+ 'get'(
5575
+ parameters?: Parameters<Paths.GetFileSummaryJob.PathParameters> | null,
5576
+ data?: any,
5577
+ config?: AxiosRequestConfig
5578
+ ): OperationResponse<Paths.GetFileSummaryJob.Responses.$200>
5579
+ }
5189
5580
  ['/v1/files/{id}/summary:generate']: {
5190
5581
  /**
5191
5582
  * generateFileSummary - generateFileSummary
5192
5583
  *
5193
- * Request AI generation of preview and short summaries for a file entity.
5584
+ * Compatibility alias for creating or returning the current AI summary job for a file entity.
5194
5585
  */
5195
5586
  'post'(
5196
5587
  parameters?: Parameters<Paths.GenerateFileSummary.PathParameters> | null,
@@ -5493,6 +5884,7 @@ export type BatchSaveFileVersionPayload = Components.Schemas.BatchSaveFileVersio
5493
5884
  export type CommonSaveFilePayload = Components.Schemas.CommonSaveFilePayload;
5494
5885
  export type CreateZipJobPayload = Components.Schemas.CreateZipJobPayload;
5495
5886
  export type CustomDownloadUrl = Components.Schemas.CustomDownloadUrl;
5887
+ export type CustomDownloadUrlAuth = Components.Schemas.CustomDownloadUrlAuth;
5496
5888
  export type DownloadFilesPayload = Components.Schemas.DownloadFilesPayload;
5497
5889
  export type EntityId = Components.Schemas.EntityId;
5498
5890
  export type EntitySlug = Components.Schemas.EntitySlug;
@@ -5506,8 +5898,9 @@ export type FileEntity = Components.Schemas.FileEntity;
5506
5898
  export type FileEntityId = Components.Schemas.FileEntityId;
5507
5899
  export type FileItem = Components.Schemas.FileItem;
5508
5900
  export type FileRelationItem = Components.Schemas.FileRelationItem;
5509
- export type FileSummaryGenerationStatus = Components.Schemas.FileSummaryGenerationStatus;
5510
- export type FileSummaryStatus = Components.Schemas.FileSummaryStatus;
5901
+ export type FileSummary = Components.Schemas.FileSummary;
5902
+ export type FileSummaryJob = Components.Schemas.FileSummaryJob;
5903
+ export type FileSummaryJobStatus = Components.Schemas.FileSummaryJobStatus;
5511
5904
  export type FileType = Components.Schemas.FileType;
5512
5905
  export type FileUpload = Components.Schemas.FileUpload;
5513
5906
  export type PublicLink = Components.Schemas.PublicLink;
package/dist/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "File API",
5
- "version": "1.10.0",
5
+ "version": "1.12.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": [
@@ -875,11 +875,213 @@
875
875
  }
876
876
  }
877
877
  },
878
+ "/v1/files/{id}/summary": {
879
+ "get": {
880
+ "operationId": "getFileSummary",
881
+ "summary": "getFileSummary",
882
+ "description": "Get summary text for a file entity together with the current summary job status when available.",
883
+ "tags": [
884
+ "File"
885
+ ],
886
+ "parameters": [
887
+ {
888
+ "name": "id",
889
+ "in": "path",
890
+ "required": true,
891
+ "description": "The UUID of the file entity",
892
+ "schema": {
893
+ "$ref": "#/components/schemas/FileEntityId"
894
+ }
895
+ }
896
+ ],
897
+ "responses": {
898
+ "200": {
899
+ "description": "Current file summary state",
900
+ "content": {
901
+ "application/json": {
902
+ "schema": {
903
+ "$ref": "#/components/schemas/FileSummary"
904
+ }
905
+ }
906
+ }
907
+ },
908
+ "400": {
909
+ "$ref": "#/components/responses/BadRequestError"
910
+ },
911
+ "401": {
912
+ "$ref": "#/components/responses/UnauthorizedError"
913
+ },
914
+ "403": {
915
+ "$ref": "#/components/responses/ForbiddenError"
916
+ },
917
+ "404": {
918
+ "$ref": "#/components/responses/NotFoundError"
919
+ },
920
+ "500": {
921
+ "$ref": "#/components/responses/InternalServerError"
922
+ }
923
+ }
924
+ }
925
+ },
926
+ "/v1/files/{id}/summary-jobs": {
927
+ "post": {
928
+ "operationId": "createFileSummaryJob",
929
+ "summary": "createFileSummaryJob",
930
+ "description": "Create or return the current AI summary job for a file entity.",
931
+ "tags": [
932
+ "File"
933
+ ],
934
+ "parameters": [
935
+ {
936
+ "name": "id",
937
+ "in": "path",
938
+ "required": true,
939
+ "description": "The UUID of the file entity",
940
+ "schema": {
941
+ "$ref": "#/components/schemas/FileEntityId"
942
+ }
943
+ }
944
+ ],
945
+ "responses": {
946
+ "202": {
947
+ "description": "Summary job accepted",
948
+ "content": {
949
+ "application/json": {
950
+ "schema": {
951
+ "$ref": "#/components/schemas/FileSummaryJob"
952
+ }
953
+ }
954
+ }
955
+ },
956
+ "400": {
957
+ "$ref": "#/components/responses/BadRequestError"
958
+ },
959
+ "401": {
960
+ "$ref": "#/components/responses/UnauthorizedError"
961
+ },
962
+ "403": {
963
+ "$ref": "#/components/responses/ForbiddenError"
964
+ },
965
+ "404": {
966
+ "$ref": "#/components/responses/NotFoundError"
967
+ },
968
+ "500": {
969
+ "$ref": "#/components/responses/InternalServerError"
970
+ }
971
+ }
972
+ }
973
+ },
974
+ "/v1/files/{id}/summary-jobs/current": {
975
+ "get": {
976
+ "operationId": "getCurrentFileSummaryJob",
977
+ "summary": "getCurrentFileSummaryJob",
978
+ "description": "Get the latest AI summary job for the file entity's current source.",
979
+ "tags": [
980
+ "File"
981
+ ],
982
+ "parameters": [
983
+ {
984
+ "name": "id",
985
+ "in": "path",
986
+ "required": true,
987
+ "description": "The UUID of the file entity",
988
+ "schema": {
989
+ "$ref": "#/components/schemas/FileEntityId"
990
+ }
991
+ }
992
+ ],
993
+ "responses": {
994
+ "200": {
995
+ "description": "Current summary job",
996
+ "content": {
997
+ "application/json": {
998
+ "schema": {
999
+ "$ref": "#/components/schemas/FileSummaryJob"
1000
+ }
1001
+ }
1002
+ }
1003
+ },
1004
+ "400": {
1005
+ "$ref": "#/components/responses/BadRequestError"
1006
+ },
1007
+ "401": {
1008
+ "$ref": "#/components/responses/UnauthorizedError"
1009
+ },
1010
+ "403": {
1011
+ "$ref": "#/components/responses/ForbiddenError"
1012
+ },
1013
+ "404": {
1014
+ "$ref": "#/components/responses/NotFoundError"
1015
+ },
1016
+ "500": {
1017
+ "$ref": "#/components/responses/InternalServerError"
1018
+ }
1019
+ }
1020
+ }
1021
+ },
1022
+ "/v1/files/{id}/summary-jobs/{job_id}": {
1023
+ "get": {
1024
+ "operationId": "getFileSummaryJob",
1025
+ "summary": "getFileSummaryJob",
1026
+ "description": "Get an AI summary job by id.",
1027
+ "tags": [
1028
+ "File"
1029
+ ],
1030
+ "parameters": [
1031
+ {
1032
+ "name": "id",
1033
+ "in": "path",
1034
+ "required": true,
1035
+ "description": "The UUID of the file entity",
1036
+ "schema": {
1037
+ "$ref": "#/components/schemas/FileEntityId"
1038
+ }
1039
+ },
1040
+ {
1041
+ "name": "job_id",
1042
+ "in": "path",
1043
+ "required": true,
1044
+ "description": "The UUID of the summary job",
1045
+ "schema": {
1046
+ "type": "string",
1047
+ "format": "uuid"
1048
+ }
1049
+ }
1050
+ ],
1051
+ "responses": {
1052
+ "200": {
1053
+ "description": "Summary job",
1054
+ "content": {
1055
+ "application/json": {
1056
+ "schema": {
1057
+ "$ref": "#/components/schemas/FileSummaryJob"
1058
+ }
1059
+ }
1060
+ }
1061
+ },
1062
+ "400": {
1063
+ "$ref": "#/components/responses/BadRequestError"
1064
+ },
1065
+ "401": {
1066
+ "$ref": "#/components/responses/UnauthorizedError"
1067
+ },
1068
+ "403": {
1069
+ "$ref": "#/components/responses/ForbiddenError"
1070
+ },
1071
+ "404": {
1072
+ "$ref": "#/components/responses/NotFoundError"
1073
+ },
1074
+ "500": {
1075
+ "$ref": "#/components/responses/InternalServerError"
1076
+ }
1077
+ }
1078
+ }
1079
+ },
878
1080
  "/v1/files/{id}/summary:generate": {
879
1081
  "post": {
880
1082
  "operationId": "generateFileSummary",
881
1083
  "summary": "generateFileSummary",
882
- "description": "Request AI generation of preview and short summaries for a file entity.",
1084
+ "description": "Compatibility alias for creating or returning the current AI summary job for a file entity.",
883
1085
  "tags": [
884
1086
  "File"
885
1087
  ],
@@ -900,7 +1102,7 @@
900
1102
  "content": {
901
1103
  "application/json": {
902
1104
  "schema": {
903
- "$ref": "#/components/schemas/FileSummaryGenerationStatus"
1105
+ "$ref": "#/components/schemas/FileSummaryJob"
904
1106
  }
905
1107
  }
906
1108
  }
@@ -917,9 +1119,6 @@
917
1119
  "404": {
918
1120
  "$ref": "#/components/responses/NotFoundError"
919
1121
  },
920
- "409": {
921
- "$ref": "#/components/responses/ConflictError"
922
- },
923
1122
  "500": {
924
1123
  "$ref": "#/components/responses/InternalServerError"
925
1124
  }
@@ -2196,6 +2395,9 @@
2196
2395
  "custom_download_url": {
2197
2396
  "$ref": "#/components/schemas/CustomDownloadUrl"
2198
2397
  },
2398
+ "custom_download_url_auth": {
2399
+ "$ref": "#/components/schemas/CustomDownloadUrlAuth"
2400
+ },
2199
2401
  "preview_summary_de": {
2200
2402
  "type": "string",
2201
2403
  "description": "Compact German summary for hover and list preview surfaces.",
@@ -2215,9 +2417,6 @@
2215
2417
  "type": "string",
2216
2418
  "description": "Short English paragraph summary for file preview surfaces.",
2217
2419
  "readOnly": true
2218
- },
2219
- "summary_status": {
2220
- "$ref": "#/components/schemas/FileSummaryStatus"
2221
2420
  }
2222
2421
  }
2223
2422
  },
@@ -2238,34 +2437,108 @@
2238
2437
  "unknown"
2239
2438
  ]
2240
2439
  },
2241
- "FileSummaryStatus": {
2440
+ "FileSummaryJobStatus": {
2242
2441
  "type": "string",
2243
- "description": "Current AI summary generation state for the file.",
2442
+ "description": "Current state of a file summary job.",
2244
2443
  "enum": [
2444
+ "queued",
2445
+ "waiting_for_extraction",
2245
2446
  "processing",
2246
2447
  "completed",
2247
2448
  "failed",
2248
- "unsupported"
2449
+ "unsupported",
2450
+ "stale"
2249
2451
  ],
2250
2452
  "readOnly": true
2251
2453
  },
2252
- "FileSummaryGenerationStatus": {
2454
+ "FileSummaryJob": {
2253
2455
  "type": "object",
2254
2456
  "properties": {
2457
+ "job_id": {
2458
+ "type": "string",
2459
+ "format": "uuid",
2460
+ "description": "File summary job ID."
2461
+ },
2462
+ "file_id": {
2463
+ "$ref": "#/components/schemas/FileEntityId"
2464
+ },
2255
2465
  "status": {
2256
- "$ref": "#/components/schemas/FileSummaryStatus"
2466
+ "$ref": "#/components/schemas/FileSummaryJobStatus"
2467
+ },
2468
+ "error": {
2469
+ "type": "string",
2470
+ "description": "Human-readable failure or unsupported reason when available."
2471
+ },
2472
+ "created_at": {
2473
+ "type": "string",
2474
+ "format": "date-time"
2475
+ },
2476
+ "updated_at": {
2477
+ "type": "string",
2478
+ "format": "date-time"
2479
+ },
2480
+ "completed_at": {
2481
+ "type": "string",
2482
+ "format": "date-time"
2257
2483
  }
2258
2484
  },
2259
2485
  "required": [
2260
- "status"
2486
+ "job_id",
2487
+ "file_id",
2488
+ "status",
2489
+ "created_at",
2490
+ "updated_at"
2261
2491
  ]
2262
2492
  },
2493
+ "FileSummary": {
2494
+ "type": "object",
2495
+ "properties": {
2496
+ "status": {
2497
+ "$ref": "#/components/schemas/FileSummaryJobStatus"
2498
+ },
2499
+ "job_id": {
2500
+ "type": "string",
2501
+ "format": "uuid",
2502
+ "description": "Current summary job ID when available."
2503
+ },
2504
+ "preview_summary_de": {
2505
+ "type": "string",
2506
+ "nullable": true,
2507
+ "description": "Compact German summary for hover and list preview surfaces."
2508
+ },
2509
+ "short_summary_de": {
2510
+ "type": "string",
2511
+ "nullable": true,
2512
+ "description": "Short German paragraph summary for file preview surfaces."
2513
+ },
2514
+ "preview_summary_en": {
2515
+ "type": "string",
2516
+ "nullable": true,
2517
+ "description": "Compact English summary for hover and list preview surfaces."
2518
+ },
2519
+ "short_summary_en": {
2520
+ "type": "string",
2521
+ "nullable": true,
2522
+ "description": "Short English paragraph summary for file preview surfaces."
2523
+ }
2524
+ }
2525
+ },
2263
2526
  "CustomDownloadUrl": {
2264
2527
  "description": "Custom external download url used for the file",
2265
2528
  "type": "string",
2266
2529
  "format": "uri",
2267
2530
  "example": "https://some-api-url.com/download?file_id=123"
2268
2531
  },
2532
+ "CustomDownloadUrlAuth": {
2533
+ "description": "Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.",
2534
+ "type": "string",
2535
+ "enum": [
2536
+ "presigned",
2537
+ "token"
2538
+ ],
2539
+ "default": "presigned",
2540
+ "example": "token"
2541
+ },
2269
2542
  "FileEntity": {
2270
2543
  "allOf": [
2271
2544
  {
@@ -2437,6 +2710,9 @@
2437
2710
  "properties": {
2438
2711
  "custom_download_url": {
2439
2712
  "$ref": "#/components/schemas/CustomDownloadUrl"
2713
+ },
2714
+ "custom_download_url_auth": {
2715
+ "$ref": "#/components/schemas/CustomDownloadUrlAuth"
2440
2716
  }
2441
2717
  }
2442
2718
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/file-client",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "Client library for the epilot File API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",