@epilot/file-client 1.15.1 → 1.16.0-alpha.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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={390:function(e,r,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var t=n(i(466));r.default=t.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"}],"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"}],"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/{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":{}}}},"components":{"parameters":{"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}}},"servers":[{"url":"https://file.sls.epilot.io"}]}')}},r={},i=function i(n){var t=r[n];if(void 0!==t)return t.exports;var a=r[n]={exports:{}};return e[n].call(a.exports,a,a.exports,i),a.exports}(390),n=exports;for(var t in i)n[t]=i[t];i.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={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"}],"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"}],"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/{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/entity/{id}/folders":{"get":{"operationId":"getFileFolders","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"parents","in":"query","required":false,"style":"form","explode":true}],"responses":{}},"post":{"operationId":"createFileFolder","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/entity/{id}/folders/{folderSlug}":{"put":{"operationId":"updateFileFolder","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFileFolder","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"responses":{}}},"/v1/entity/{id}/folders/{folderSlug}/files":{"get":{"operationId":"getFilesInFolder","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","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}},"responses":{"NotFoundError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://file.sls.epilot.io"}]}')},757:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var n=a(t(466));r.default=n.default}},r={},t=function t(a){var n=r[a];if(void 0!==n)return n.exports;var i=r[a]={exports:{}};return e[a].call(i.exports,i,i.exports,t),i.exports}(757),a=exports;for(var n in t)a[n]=t[n];t.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
@@ -37,6 +37,9 @@
37
37
  },
38
38
  {
39
39
  "$ref": "#/components/parameters/AsyncOperationQueryParam"
40
+ },
41
+ {
42
+ "$ref": "#/components/parameters/DeleteTempFileQueryParam"
40
43
  }
41
44
  ],
42
45
  "requestBody": {
@@ -373,10 +376,100 @@
373
376
  },
374
377
  "responses": {}
375
378
  }
379
+ },
380
+ "/v1/entity/{id}/folders": {
381
+ "get": {
382
+ "operationId": "getFileFolders",
383
+ "parameters": [
384
+ {
385
+ "$ref": "#/components/parameters/EntityIdPathParam"
386
+ },
387
+ {
388
+ "name": "parents",
389
+ "in": "query",
390
+ "required": false,
391
+ "style": "form",
392
+ "explode": true
393
+ }
394
+ ],
395
+ "responses": {}
396
+ },
397
+ "post": {
398
+ "operationId": "createFileFolder",
399
+ "parameters": [
400
+ {
401
+ "$ref": "#/components/parameters/EntityIdPathParam"
402
+ }
403
+ ],
404
+ "requestBody": {
405
+ "required": true,
406
+ "content": {
407
+ "application/json": {}
408
+ }
409
+ },
410
+ "responses": {}
411
+ }
412
+ },
413
+ "/v1/entity/{id}/folders/{folderSlug}": {
414
+ "put": {
415
+ "operationId": "updateFileFolder",
416
+ "parameters": [
417
+ {
418
+ "$ref": "#/components/parameters/EntityIdPathParam"
419
+ },
420
+ {
421
+ "name": "folderSlug",
422
+ "in": "path",
423
+ "required": true
424
+ }
425
+ ],
426
+ "requestBody": {
427
+ "required": true,
428
+ "content": {
429
+ "application/json": {}
430
+ }
431
+ },
432
+ "responses": {}
433
+ },
434
+ "delete": {
435
+ "operationId": "deleteFileFolder",
436
+ "parameters": [
437
+ {
438
+ "$ref": "#/components/parameters/EntityIdPathParam"
439
+ },
440
+ {
441
+ "name": "folderSlug",
442
+ "in": "path",
443
+ "required": true
444
+ }
445
+ ],
446
+ "responses": {}
447
+ }
448
+ },
449
+ "/v1/entity/{id}/folders/{folderSlug}/files": {
450
+ "get": {
451
+ "operationId": "getFilesInFolder",
452
+ "parameters": [
453
+ {
454
+ "$ref": "#/components/parameters/EntityIdPathParam"
455
+ },
456
+ {
457
+ "name": "folderSlug",
458
+ "in": "path",
459
+ "required": true
460
+ }
461
+ ],
462
+ "responses": {}
463
+ }
376
464
  }
377
465
  },
378
466
  "components": {
379
467
  "parameters": {
468
+ "EntityIdPathParam": {
469
+ "name": "id",
470
+ "in": "path",
471
+ "required": true
472
+ },
380
473
  "StrictQueryParam": {
381
474
  "name": "strict",
382
475
  "in": "query",
@@ -396,6 +489,18 @@
396
489
  "name": "async",
397
490
  "in": "query",
398
491
  "required": false
492
+ },
493
+ "DeleteTempFileQueryParam": {
494
+ "name": "delete_temp_file",
495
+ "in": "query",
496
+ "required": false
497
+ }
498
+ },
499
+ "responses": {
500
+ "NotFoundError": {
501
+ "content": {
502
+ "application/json": {}
503
+ }
399
504
  }
400
505
  }
401
506
  },
package/dist/openapi.d.ts CHANGED
@@ -17,14 +17,48 @@ declare namespace Components {
17
17
  */
18
18
  Schemas.ActivityId /* ulid */;
19
19
  export type AsyncOperationQueryParam = boolean;
20
+ export type DeleteTempFileQueryParam = boolean;
21
+ export type EntityIdPathParam = /**
22
+ * example:
23
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
24
+ */
25
+ Schemas.EntityId;
20
26
  export type FillActivityQueryParam = boolean;
21
27
  export type StrictQueryParam = boolean;
22
28
  }
29
+ export interface PathParameters {
30
+ EntityIdPathParam?: Parameters.EntityIdPathParam;
31
+ }
23
32
  export interface QueryParameters {
24
33
  StrictQueryParam?: Parameters.StrictQueryParam;
25
34
  ActivityIdQueryParam?: Parameters.ActivityIdQueryParam;
26
35
  FillActivityQueryParam?: Parameters.FillActivityQueryParam;
27
36
  AsyncOperationQueryParam?: Parameters.AsyncOperationQueryParam;
37
+ DeleteTempFileQueryParam?: Parameters.DeleteTempFileQueryParam;
38
+ }
39
+ namespace Responses {
40
+ /**
41
+ * A generic error returned by the API
42
+ * example:
43
+ * {
44
+ * "status": 404,
45
+ * "error": "Not Found"
46
+ * }
47
+ */
48
+ export interface NotFoundError {
49
+ /**
50
+ * The HTTP status code of the error
51
+ * example:
52
+ * 400
53
+ */
54
+ status?: number;
55
+ /**
56
+ * The error message
57
+ * example:
58
+ * Bad Request
59
+ */
60
+ error?: string;
61
+ }
28
62
  }
29
63
  namespace Schemas {
30
64
  /**
@@ -106,6 +140,23 @@ declare namespace Components {
106
140
  * contact
107
141
  */
108
142
  export type EntitySlug = string;
143
+ /**
144
+ * A generic error returned by the API
145
+ */
146
+ export interface ErrorObject {
147
+ /**
148
+ * The HTTP status code of the error
149
+ * example:
150
+ * 400
151
+ */
152
+ status?: number;
153
+ /**
154
+ * The error message
155
+ * example:
156
+ * Bad Request
157
+ */
158
+ error?: string;
159
+ }
109
160
  export interface FileAttributes {
110
161
  /**
111
162
  * example:
@@ -245,7 +296,7 @@ declare namespace Components {
245
296
  * https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf
246
297
  */
247
298
  source_url?: string;
248
- s3ref?: S3Ref;
299
+ s3ref?: S3Reference;
249
300
  versions: FileItem[];
250
301
  _updated_at?: string; // date-time
251
302
  _created_at?: string; // date-time
@@ -269,6 +320,104 @@ declare namespace Components {
269
320
  * ef7d985c-2385-44f4-9c71-ae06a52264f8
270
321
  */
271
322
  export type FileEntityId = string;
323
+ export interface FileFolderAttributes {
324
+ /**
325
+ * Name of the file folder
326
+ */
327
+ name?: string;
328
+ /**
329
+ * Optional parent folder slug. If not provided, the folder will be created at the top level
330
+ */
331
+ parent?: string;
332
+ /**
333
+ * Array of file IDs in this folder
334
+ */
335
+ files?: string /* uuid */[];
336
+ }
337
+ /**
338
+ * Request body for creating a file folder
339
+ */
340
+ export interface FileFolderCreateRequest {
341
+ /**
342
+ * Name of the file folder
343
+ */
344
+ name: string;
345
+ /**
346
+ * Optional parent folder slug. If not provided, the folder will be created at the top level
347
+ */
348
+ parent?: string;
349
+ /**
350
+ * Array of file IDs in this folder
351
+ */
352
+ files?: string /* uuid */[];
353
+ }
354
+ /**
355
+ * Generated uuid for a file folder
356
+ */
357
+ export type FileFolderId = string; // uuid
358
+ /**
359
+ * A file folder with identifiers and timestamps
360
+ */
361
+ export interface FileFolderItem {
362
+ id: /* Generated uuid for a file folder */ FileFolderId /* uuid */;
363
+ /**
364
+ * Organization ID
365
+ * example:
366
+ * 123
367
+ */
368
+ orgId: string;
369
+ entityId: /**
370
+ * example:
371
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
372
+ */
373
+ EntityId;
374
+ /**
375
+ * Logical type for this item (e.g. "folder")
376
+ * example:
377
+ * folder
378
+ */
379
+ type: string;
380
+ /**
381
+ * example:
382
+ * MyFolderOfImportantFiles
383
+ */
384
+ name: string;
385
+ entity_id: /**
386
+ * example:
387
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
388
+ */
389
+ EntityId;
390
+ /**
391
+ * URL-friendly identifier for the folder
392
+ * example:
393
+ * documents
394
+ */
395
+ slug: string;
396
+ /**
397
+ * Array of file IDs in this folder
398
+ * example:
399
+ * [
400
+ * "123e4567-e89b-12d3-a456-426614174000"
401
+ * ]
402
+ */
403
+ files: string /* uuid */[];
404
+ /**
405
+ * User ID who created the folder
406
+ * example:
407
+ * 17622
408
+ */
409
+ created_by: string;
410
+ /**
411
+ * example:
412
+ * 2025-08-20T12:01:00Z
413
+ */
414
+ created_at: string; // date-time
415
+ /**
416
+ * example:
417
+ * 2025-08-20T12:01:00Z
418
+ */
419
+ updated_at: string; // date-time
420
+ }
272
421
  export interface FileItem {
273
422
  s3ref?: S3Ref;
274
423
  /**
@@ -664,6 +813,31 @@ declare namespace Paths {
664
813
  }
665
814
  }
666
815
  }
816
+ namespace CreateFileFolder {
817
+ namespace Parameters {
818
+ export type Id = /**
819
+ * example:
820
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
821
+ */
822
+ Components.Schemas.EntityId;
823
+ }
824
+ export interface PathParameters {
825
+ id: Parameters.Id;
826
+ }
827
+ export type RequestBody = /* Request body for creating a file folder */ Components.Schemas.FileFolderCreateRequest;
828
+ namespace Responses {
829
+ export type $201 = /* A file folder with identifiers and timestamps */ Components.Schemas.FileFolderItem;
830
+ export type $404 = /**
831
+ * A generic error returned by the API
832
+ * example:
833
+ * {
834
+ * "status": 404,
835
+ * "error": "Not Found"
836
+ * }
837
+ */
838
+ Components.Responses.NotFoundError;
839
+ }
840
+ }
667
841
  namespace DeleteFile {
668
842
  namespace Parameters {
669
843
  export type ActivityId = /**
@@ -677,6 +851,9 @@ declare namespace Paths {
677
851
  * ef7d985c-2385-44f4-9c71-ae06a52264f8
678
852
  */
679
853
  Components.Schemas.FileEntityId;
854
+ /**
855
+ * Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted
856
+ */
680
857
  export type Purge = boolean;
681
858
  export type Strict = boolean;
682
859
  }
@@ -684,7 +861,7 @@ declare namespace Paths {
684
861
  id: Parameters.Id;
685
862
  }
686
863
  export interface QueryParameters {
687
- purge?: Parameters.Purge;
864
+ purge?: /* Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted */ Parameters.Purge;
688
865
  activity_id?: Parameters.ActivityId;
689
866
  strict?: Parameters.Strict;
690
867
  }
@@ -692,6 +869,41 @@ declare namespace Paths {
692
869
  export type $200 = Components.Schemas.FileEntity;
693
870
  }
694
871
  }
872
+ namespace DeleteFileFolder {
873
+ namespace Parameters {
874
+ /**
875
+ * example:
876
+ * documents
877
+ */
878
+ export type FolderSlug = string;
879
+ export type Id = /**
880
+ * example:
881
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
882
+ */
883
+ Components.Schemas.EntityId;
884
+ }
885
+ export interface PathParameters {
886
+ id: Parameters.Id;
887
+ folderSlug: /**
888
+ * example:
889
+ * documents
890
+ */
891
+ Parameters.FolderSlug;
892
+ }
893
+ namespace Responses {
894
+ export interface $200 {
895
+ }
896
+ export type $404 = /**
897
+ * A generic error returned by the API
898
+ * example:
899
+ * {
900
+ * "status": 404,
901
+ * "error": "Not Found"
902
+ * }
903
+ */
904
+ Components.Responses.NotFoundError;
905
+ }
906
+ }
695
907
  namespace DeleteSession {
696
908
  namespace Responses {
697
909
  export interface $200 {
@@ -804,6 +1016,75 @@ declare namespace Paths {
804
1016
  export type $200 = Components.Schemas.FileEntity;
805
1017
  }
806
1018
  }
1019
+ namespace GetFileFolders {
1020
+ namespace Parameters {
1021
+ export type Id = /**
1022
+ * example:
1023
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
1024
+ */
1025
+ Components.Schemas.EntityId;
1026
+ export type Parents = string[];
1027
+ }
1028
+ export interface PathParameters {
1029
+ id: Parameters.Id;
1030
+ }
1031
+ export interface QueryParameters {
1032
+ parents?: Parameters.Parents;
1033
+ }
1034
+ namespace Responses {
1035
+ export interface $200 {
1036
+ results?: /* A file folder with identifiers and timestamps */ Components.Schemas.FileFolderItem[];
1037
+ }
1038
+ export type $404 = /**
1039
+ * A generic error returned by the API
1040
+ * example:
1041
+ * {
1042
+ * "status": 404,
1043
+ * "error": "Not Found"
1044
+ * }
1045
+ */
1046
+ Components.Responses.NotFoundError;
1047
+ }
1048
+ }
1049
+ namespace GetFilesInFolder {
1050
+ namespace Parameters {
1051
+ /**
1052
+ * example:
1053
+ * documents
1054
+ */
1055
+ export type FolderSlug = string;
1056
+ export type Id = /**
1057
+ * example:
1058
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
1059
+ */
1060
+ Components.Schemas.EntityId;
1061
+ }
1062
+ export interface PathParameters {
1063
+ id: Parameters.Id;
1064
+ folderSlug: /**
1065
+ * example:
1066
+ * documents
1067
+ */
1068
+ Parameters.FolderSlug;
1069
+ }
1070
+ namespace Responses {
1071
+ export type $200 = Components.Schemas.FileEntity[];
1072
+ export interface $403 {
1073
+ /**
1074
+ * example:
1075
+ * User must have permission to view this entity to access its files
1076
+ */
1077
+ error?: string;
1078
+ }
1079
+ export interface $404 {
1080
+ /**
1081
+ * example:
1082
+ * Entity not found
1083
+ */
1084
+ error?: string;
1085
+ }
1086
+ }
1087
+ }
807
1088
  namespace GetSession {
808
1089
  namespace Responses {
809
1090
  export interface $200 {
@@ -953,6 +1234,7 @@ declare namespace Paths {
953
1234
  */
954
1235
  Components.Schemas.ActivityId /* ulid */;
955
1236
  export type Async = boolean;
1237
+ export type DeleteTempFile = boolean;
956
1238
  export type FillActivity = boolean;
957
1239
  export type Strict = boolean;
958
1240
  }
@@ -961,12 +1243,48 @@ declare namespace Paths {
961
1243
  fill_activity?: Parameters.FillActivity;
962
1244
  strict?: Parameters.Strict;
963
1245
  async?: Parameters.Async;
1246
+ delete_temp_file?: Parameters.DeleteTempFile;
964
1247
  }
965
1248
  export type RequestBody = Components.Schemas.SaveFilePayloadV2;
966
1249
  namespace Responses {
967
1250
  export type $200 = Components.Schemas.FileEntity;
968
1251
  }
969
1252
  }
1253
+ namespace UpdateFileFolder {
1254
+ namespace Parameters {
1255
+ /**
1256
+ * example:
1257
+ * documents
1258
+ */
1259
+ export type FolderSlug = string;
1260
+ export type Id = /**
1261
+ * example:
1262
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
1263
+ */
1264
+ Components.Schemas.EntityId;
1265
+ }
1266
+ export interface PathParameters {
1267
+ id: Parameters.Id;
1268
+ folderSlug: /**
1269
+ * example:
1270
+ * documents
1271
+ */
1272
+ Parameters.FolderSlug;
1273
+ }
1274
+ export type RequestBody = /* Request body for creating a file folder */ Components.Schemas.FileFolderCreateRequest;
1275
+ namespace Responses {
1276
+ export type $200 = /* A file folder with identifiers and timestamps */ Components.Schemas.FileFolderItem;
1277
+ export type $404 = /**
1278
+ * A generic error returned by the API
1279
+ * example:
1280
+ * {
1281
+ * "status": 404,
1282
+ * "error": "Not Found"
1283
+ * }
1284
+ */
1285
+ Components.Responses.NotFoundError;
1286
+ }
1287
+ }
970
1288
  namespace UploadFile {
971
1289
  namespace Parameters {
972
1290
  export type FileEntityId = /**
@@ -1006,6 +1324,11 @@ declare namespace Paths {
1006
1324
  * https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
1007
1325
  */
1008
1326
  upload_url?: string; // url
1327
+ /**
1328
+ * example:
1329
+ * File entity not found
1330
+ */
1331
+ error?: string;
1009
1332
  }
1010
1333
  }
1011
1334
  }
@@ -1268,6 +1591,56 @@ export interface OperationMethods {
1268
1591
  data?: Paths.UploadFilePublic.RequestBody,
1269
1592
  config?: AxiosRequestConfig
1270
1593
  ): OperationResponse<Paths.UploadFilePublic.Responses.$201>
1594
+ /**
1595
+ * getFileFolders - getFileFolders
1596
+ *
1597
+ * Gets a list of folders that exist for an entity
1598
+ */
1599
+ 'getFileFolders'(
1600
+ parameters?: Parameters<Paths.GetFileFolders.QueryParameters & Paths.GetFileFolders.PathParameters> | null,
1601
+ data?: any,
1602
+ config?: AxiosRequestConfig
1603
+ ): OperationResponse<Paths.GetFileFolders.Responses.$200>
1604
+ /**
1605
+ * createFileFolder - createFileFolder
1606
+ *
1607
+ * Creates a new file folder for the specified entity
1608
+ */
1609
+ 'createFileFolder'(
1610
+ parameters?: Parameters<Paths.CreateFileFolder.PathParameters> | null,
1611
+ data?: Paths.CreateFileFolder.RequestBody,
1612
+ config?: AxiosRequestConfig
1613
+ ): OperationResponse<Paths.CreateFileFolder.Responses.$201>
1614
+ /**
1615
+ * updateFileFolder - updateFileFolder
1616
+ *
1617
+ * Updates a specific file folder by slug
1618
+ */
1619
+ 'updateFileFolder'(
1620
+ parameters?: Parameters<Paths.UpdateFileFolder.PathParameters> | null,
1621
+ data?: Paths.UpdateFileFolder.RequestBody,
1622
+ config?: AxiosRequestConfig
1623
+ ): OperationResponse<Paths.UpdateFileFolder.Responses.$200>
1624
+ /**
1625
+ * deleteFileFolder - deleteFileFolder
1626
+ *
1627
+ * Deletes a specific file folder by slug
1628
+ */
1629
+ 'deleteFileFolder'(
1630
+ parameters?: Parameters<Paths.DeleteFileFolder.PathParameters> | null,
1631
+ data?: any,
1632
+ config?: AxiosRequestConfig
1633
+ ): OperationResponse<Paths.DeleteFileFolder.Responses.$200>
1634
+ /**
1635
+ * getFilesInFolder - getFilesInFolder
1636
+ *
1637
+ * Gets all files within a specific folder for an entity
1638
+ */
1639
+ 'getFilesInFolder'(
1640
+ parameters?: Parameters<Paths.GetFilesInFolder.PathParameters> | null,
1641
+ data?: any,
1642
+ config?: AxiosRequestConfig
1643
+ ): OperationResponse<Paths.GetFilesInFolder.Responses.$200>
1271
1644
  }
1272
1645
 
1273
1646
  export interface PathsDictionary {
@@ -1536,6 +1909,62 @@ export interface PathsDictionary {
1536
1909
  config?: AxiosRequestConfig
1537
1910
  ): OperationResponse<Paths.UploadFilePublic.Responses.$201>
1538
1911
  }
1912
+ ['/v1/entity/{id}/folders']: {
1913
+ /**
1914
+ * getFileFolders - getFileFolders
1915
+ *
1916
+ * Gets a list of folders that exist for an entity
1917
+ */
1918
+ 'get'(
1919
+ parameters?: Parameters<Paths.GetFileFolders.QueryParameters & Paths.GetFileFolders.PathParameters> | null,
1920
+ data?: any,
1921
+ config?: AxiosRequestConfig
1922
+ ): OperationResponse<Paths.GetFileFolders.Responses.$200>
1923
+ /**
1924
+ * createFileFolder - createFileFolder
1925
+ *
1926
+ * Creates a new file folder for the specified entity
1927
+ */
1928
+ 'post'(
1929
+ parameters?: Parameters<Paths.CreateFileFolder.PathParameters> | null,
1930
+ data?: Paths.CreateFileFolder.RequestBody,
1931
+ config?: AxiosRequestConfig
1932
+ ): OperationResponse<Paths.CreateFileFolder.Responses.$201>
1933
+ }
1934
+ ['/v1/entity/{id}/folders/{folderSlug}']: {
1935
+ /**
1936
+ * updateFileFolder - updateFileFolder
1937
+ *
1938
+ * Updates a specific file folder by slug
1939
+ */
1940
+ 'put'(
1941
+ parameters?: Parameters<Paths.UpdateFileFolder.PathParameters> | null,
1942
+ data?: Paths.UpdateFileFolder.RequestBody,
1943
+ config?: AxiosRequestConfig
1944
+ ): OperationResponse<Paths.UpdateFileFolder.Responses.$200>
1945
+ /**
1946
+ * deleteFileFolder - deleteFileFolder
1947
+ *
1948
+ * Deletes a specific file folder by slug
1949
+ */
1950
+ 'delete'(
1951
+ parameters?: Parameters<Paths.DeleteFileFolder.PathParameters> | null,
1952
+ data?: any,
1953
+ config?: AxiosRequestConfig
1954
+ ): OperationResponse<Paths.DeleteFileFolder.Responses.$200>
1955
+ }
1956
+ ['/v1/entity/{id}/folders/{folderSlug}/files']: {
1957
+ /**
1958
+ * getFilesInFolder - getFilesInFolder
1959
+ *
1960
+ * Gets all files within a specific folder for an entity
1961
+ */
1962
+ 'get'(
1963
+ parameters?: Parameters<Paths.GetFilesInFolder.PathParameters> | null,
1964
+ data?: any,
1965
+ config?: AxiosRequestConfig
1966
+ ): OperationResponse<Paths.GetFilesInFolder.Responses.$200>
1967
+ }
1539
1968
  }
1540
1969
 
1541
1970
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
@@ -1549,9 +1978,14 @@ export type CustomDownloadUrl = Components.Schemas.CustomDownloadUrl;
1549
1978
  export type DownloadFilesPayload = Components.Schemas.DownloadFilesPayload;
1550
1979
  export type EntityId = Components.Schemas.EntityId;
1551
1980
  export type EntitySlug = Components.Schemas.EntitySlug;
1981
+ export type ErrorObject = Components.Schemas.ErrorObject;
1552
1982
  export type FileAttributes = Components.Schemas.FileAttributes;
1553
1983
  export type FileEntity = Components.Schemas.FileEntity;
1554
1984
  export type FileEntityId = Components.Schemas.FileEntityId;
1985
+ export type FileFolderAttributes = Components.Schemas.FileFolderAttributes;
1986
+ export type FileFolderCreateRequest = Components.Schemas.FileFolderCreateRequest;
1987
+ export type FileFolderId = Components.Schemas.FileFolderId;
1988
+ export type FileFolderItem = Components.Schemas.FileFolderItem;
1555
1989
  export type FileItem = Components.Schemas.FileItem;
1556
1990
  export type FileRelationItem = Components.Schemas.FileRelationItem;
1557
1991
  export type FileType = Components.Schemas.FileType;
package/dist/openapi.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "File API",
5
- "version": "0.2.0",
6
- "description": "Upload and manage epilot Files"
5
+ "version": "1.0.0",
6
+ "description": "Upload and manage epilot Files\n\n## Changelog\n<a href=\"changelog\">View API Changelog</a>\n"
7
7
  },
8
8
  "tags": [
9
9
  {
@@ -30,6 +30,10 @@
30
30
  "name": "file_schema",
31
31
  "x-displayName": "File",
32
32
  "description": "<SchemaDefinition schemaRef=\"#/components/schemas/FileEntity\" />\n"
33
+ },
34
+ {
35
+ "name": "File Folders",
36
+ "description": "Folder management for organizing files within entities"
33
37
  }
34
38
  ],
35
39
  "x-tagGroups": [
@@ -40,6 +44,7 @@
40
44
  "Preview",
41
45
  "Public Links",
42
46
  "Session",
47
+ "File Folders",
43
48
  "Deprecated"
44
49
  ]
45
50
  },
@@ -136,6 +141,9 @@
136
141
  },
137
142
  {
138
143
  "$ref": "#/components/parameters/AsyncOperationQueryParam"
144
+ },
145
+ {
146
+ "$ref": "#/components/parameters/DeleteTempFileQueryParam"
139
147
  }
140
148
  ],
141
149
  "requestBody": {
@@ -394,7 +402,8 @@
394
402
  "in": "query",
395
403
  "schema": {
396
404
  "type": "boolean",
397
- "default": false
405
+ "default": false,
406
+ "description": "Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted"
398
407
  }
399
408
  },
400
409
  {
@@ -1072,6 +1081,253 @@
1072
1081
  "type": "string",
1073
1082
  "format": "url",
1074
1083
  "example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
1084
+ },
1085
+ "error": {
1086
+ "type": "string",
1087
+ "example": "File entity not found"
1088
+ }
1089
+ }
1090
+ }
1091
+ }
1092
+ }
1093
+ }
1094
+ }
1095
+ }
1096
+ },
1097
+ "/v1/entity/{id}/folders": {
1098
+ "get": {
1099
+ "operationId": "getFileFolders",
1100
+ "summary": "getFileFolders",
1101
+ "description": "Gets a list of folders that exist for an entity",
1102
+ "tags": [
1103
+ "File Folders"
1104
+ ],
1105
+ "parameters": [
1106
+ {
1107
+ "$ref": "#/components/parameters/EntityIdPathParam"
1108
+ },
1109
+ {
1110
+ "name": "parents",
1111
+ "in": "query",
1112
+ "description": "Optional array of parent folder slugs to filter by",
1113
+ "required": false,
1114
+ "schema": {
1115
+ "type": "array",
1116
+ "items": {
1117
+ "type": "string"
1118
+ }
1119
+ },
1120
+ "style": "form",
1121
+ "explode": true
1122
+ }
1123
+ ],
1124
+ "responses": {
1125
+ "200": {
1126
+ "description": "List of folders for the entity",
1127
+ "content": {
1128
+ "application/json": {
1129
+ "schema": {
1130
+ "type": "object",
1131
+ "properties": {
1132
+ "results": {
1133
+ "type": "array",
1134
+ "items": {
1135
+ "$ref": "#/components/schemas/FileFolderItem"
1136
+ }
1137
+ }
1138
+ }
1139
+ }
1140
+ }
1141
+ }
1142
+ },
1143
+ "404": {
1144
+ "$ref": "#/components/responses/NotFoundError"
1145
+ }
1146
+ }
1147
+ },
1148
+ "post": {
1149
+ "operationId": "createFileFolder",
1150
+ "summary": "createFileFolder",
1151
+ "description": "Creates a new file folder for the specified entity",
1152
+ "tags": [
1153
+ "File Folders"
1154
+ ],
1155
+ "parameters": [
1156
+ {
1157
+ "$ref": "#/components/parameters/EntityIdPathParam"
1158
+ }
1159
+ ],
1160
+ "requestBody": {
1161
+ "required": true,
1162
+ "content": {
1163
+ "application/json": {
1164
+ "schema": {
1165
+ "$ref": "#/components/schemas/FileFolderCreateRequest"
1166
+ }
1167
+ }
1168
+ }
1169
+ },
1170
+ "responses": {
1171
+ "201": {
1172
+ "description": "File folder created successfully",
1173
+ "content": {
1174
+ "application/json": {
1175
+ "schema": {
1176
+ "$ref": "#/components/schemas/FileFolderItem"
1177
+ }
1178
+ }
1179
+ }
1180
+ },
1181
+ "404": {
1182
+ "$ref": "#/components/responses/NotFoundError"
1183
+ }
1184
+ }
1185
+ }
1186
+ },
1187
+ "/v1/entity/{id}/folders/{folderSlug}": {
1188
+ "put": {
1189
+ "operationId": "updateFileFolder",
1190
+ "summary": "updateFileFolder",
1191
+ "description": "Updates a specific file folder by slug",
1192
+ "tags": [
1193
+ "File Folders"
1194
+ ],
1195
+ "parameters": [
1196
+ {
1197
+ "$ref": "#/components/parameters/EntityIdPathParam"
1198
+ },
1199
+ {
1200
+ "name": "folderSlug",
1201
+ "in": "path",
1202
+ "required": true,
1203
+ "description": "The slug identifier for the folder",
1204
+ "schema": {
1205
+ "type": "string",
1206
+ "example": "documents"
1207
+ }
1208
+ }
1209
+ ],
1210
+ "requestBody": {
1211
+ "required": true,
1212
+ "content": {
1213
+ "application/json": {
1214
+ "schema": {
1215
+ "$ref": "#/components/schemas/FileFolderCreateRequest"
1216
+ }
1217
+ }
1218
+ }
1219
+ },
1220
+ "responses": {
1221
+ "200": {
1222
+ "description": "File folder updated successfully",
1223
+ "content": {
1224
+ "application/json": {
1225
+ "schema": {
1226
+ "$ref": "#/components/schemas/FileFolderItem"
1227
+ }
1228
+ }
1229
+ }
1230
+ },
1231
+ "404": {
1232
+ "$ref": "#/components/responses/NotFoundError"
1233
+ }
1234
+ }
1235
+ },
1236
+ "delete": {
1237
+ "operationId": "deleteFileFolder",
1238
+ "summary": "deleteFileFolder",
1239
+ "description": "Deletes a specific file folder by slug",
1240
+ "tags": [
1241
+ "File Folders"
1242
+ ],
1243
+ "parameters": [
1244
+ {
1245
+ "$ref": "#/components/parameters/EntityIdPathParam"
1246
+ },
1247
+ {
1248
+ "name": "folderSlug",
1249
+ "in": "path",
1250
+ "required": true,
1251
+ "description": "The slug identifier for the folder",
1252
+ "schema": {
1253
+ "type": "string",
1254
+ "example": "documents"
1255
+ }
1256
+ }
1257
+ ],
1258
+ "responses": {
1259
+ "200": {
1260
+ "description": "File folder deleted successfully"
1261
+ },
1262
+ "404": {
1263
+ "$ref": "#/components/responses/NotFoundError"
1264
+ }
1265
+ }
1266
+ }
1267
+ },
1268
+ "/v1/entity/{id}/folders/{folderSlug}/files": {
1269
+ "get": {
1270
+ "operationId": "getFilesInFolder",
1271
+ "summary": "getFilesInFolder",
1272
+ "description": "Gets all files within a specific folder for an entity",
1273
+ "tags": [
1274
+ "File Folders"
1275
+ ],
1276
+ "parameters": [
1277
+ {
1278
+ "$ref": "#/components/parameters/EntityIdPathParam"
1279
+ },
1280
+ {
1281
+ "name": "folderSlug",
1282
+ "in": "path",
1283
+ "required": true,
1284
+ "description": "The slug identifier for the folder",
1285
+ "schema": {
1286
+ "type": "string",
1287
+ "example": "documents"
1288
+ }
1289
+ }
1290
+ ],
1291
+ "responses": {
1292
+ "200": {
1293
+ "description": "List of files in the folder",
1294
+ "content": {
1295
+ "application/json": {
1296
+ "schema": {
1297
+ "type": "array",
1298
+ "items": {
1299
+ "$ref": "#/components/schemas/FileEntity"
1300
+ }
1301
+ }
1302
+ }
1303
+ }
1304
+ },
1305
+ "403": {
1306
+ "description": "User must have permission to view this entity to access its files",
1307
+ "content": {
1308
+ "application/json": {
1309
+ "schema": {
1310
+ "type": "object",
1311
+ "properties": {
1312
+ "error": {
1313
+ "type": "string",
1314
+ "example": "User must have permission to view this entity to access its files"
1315
+ }
1316
+ }
1317
+ }
1318
+ }
1319
+ }
1320
+ },
1321
+ "404": {
1322
+ "description": "Entity or folder not found",
1323
+ "content": {
1324
+ "application/json": {
1325
+ "schema": {
1326
+ "type": "object",
1327
+ "properties": {
1328
+ "error": {
1329
+ "type": "string",
1330
+ "example": "Entity not found"
1075
1331
  }
1076
1332
  }
1077
1333
  }
@@ -1255,8 +1511,14 @@
1255
1511
  "example": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf"
1256
1512
  },
1257
1513
  "s3ref": {
1258
- "$ref": "#/components/schemas/S3Ref",
1259
- "readOnly": true
1514
+ "allOf": [
1515
+ {
1516
+ "$ref": "#/components/schemas/S3Ref"
1517
+ },
1518
+ {
1519
+ "readOnly": true
1520
+ }
1521
+ ]
1260
1522
  },
1261
1523
  "versions": {
1262
1524
  "type": "array",
@@ -1638,9 +1900,148 @@
1638
1900
  }
1639
1901
  }
1640
1902
  }
1903
+ },
1904
+ "FileFolderId": {
1905
+ "description": "Generated uuid for a file folder",
1906
+ "type": "string",
1907
+ "format": "uuid"
1908
+ },
1909
+ "FileFolderItem": {
1910
+ "description": "A file folder with identifiers and timestamps",
1911
+ "type": "object",
1912
+ "properties": {
1913
+ "id": {
1914
+ "$ref": "#/components/schemas/FileFolderId"
1915
+ },
1916
+ "orgId": {
1917
+ "type": "string",
1918
+ "description": "Organization ID",
1919
+ "example": "123"
1920
+ },
1921
+ "entityId": {
1922
+ "$ref": "#/components/schemas/EntityId"
1923
+ },
1924
+ "type": {
1925
+ "type": "string",
1926
+ "description": "Logical type for this item (e.g. \"folder\")",
1927
+ "example": "folder"
1928
+ },
1929
+ "name": {
1930
+ "type": "string",
1931
+ "example": "MyFolderOfImportantFiles"
1932
+ },
1933
+ "entity_id": {
1934
+ "$ref": "#/components/schemas/EntityId"
1935
+ },
1936
+ "slug": {
1937
+ "type": "string",
1938
+ "description": "URL-friendly identifier for the folder",
1939
+ "example": "documents"
1940
+ },
1941
+ "files": {
1942
+ "type": "array",
1943
+ "description": "Array of file IDs in this folder",
1944
+ "items": {
1945
+ "type": "string",
1946
+ "format": "uuid"
1947
+ },
1948
+ "example": [
1949
+ "123e4567-e89b-12d3-a456-426614174000"
1950
+ ]
1951
+ },
1952
+ "created_by": {
1953
+ "type": "string",
1954
+ "description": "User ID who created the folder",
1955
+ "example": "17622"
1956
+ },
1957
+ "created_at": {
1958
+ "type": "string",
1959
+ "format": "date-time",
1960
+ "example": "2025-08-20T12:01:00Z"
1961
+ },
1962
+ "updated_at": {
1963
+ "type": "string",
1964
+ "format": "date-time",
1965
+ "example": "2025-08-20T12:01:00Z"
1966
+ }
1967
+ },
1968
+ "required": [
1969
+ "id",
1970
+ "orgId",
1971
+ "entityId",
1972
+ "type",
1973
+ "name",
1974
+ "entity_id",
1975
+ "slug",
1976
+ "files",
1977
+ "created_by",
1978
+ "created_at",
1979
+ "updated_at"
1980
+ ]
1981
+ },
1982
+ "ErrorObject": {
1983
+ "description": "A generic error returned by the API",
1984
+ "type": "object",
1985
+ "properties": {
1986
+ "status": {
1987
+ "type": "integer",
1988
+ "description": "The HTTP status code of the error",
1989
+ "example": 400
1990
+ },
1991
+ "error": {
1992
+ "type": "string",
1993
+ "description": "The error message",
1994
+ "example": "Bad Request"
1995
+ }
1996
+ }
1997
+ },
1998
+ "FileFolderAttributes": {
1999
+ "type": "object",
2000
+ "properties": {
2001
+ "name": {
2002
+ "type": "string",
2003
+ "description": "Name of the file folder"
2004
+ },
2005
+ "parent": {
2006
+ "type": "string",
2007
+ "description": "Optional parent folder slug. If not provided, the folder will be created at the top level"
2008
+ },
2009
+ "files": {
2010
+ "type": "array",
2011
+ "description": "Array of file IDs in this folder",
2012
+ "items": {
2013
+ "type": "string",
2014
+ "format": "uuid"
2015
+ }
2016
+ }
2017
+ },
2018
+ "additionalProperties": false
2019
+ },
2020
+ "FileFolderCreateRequest": {
2021
+ "description": "Request body for creating a file folder",
2022
+ "allOf": [
2023
+ {
2024
+ "$ref": "#/components/schemas/FileFolderAttributes"
2025
+ },
2026
+ {
2027
+ "type": "object",
2028
+ "required": [
2029
+ "name"
2030
+ ]
2031
+ }
2032
+ ]
1641
2033
  }
1642
2034
  },
1643
2035
  "parameters": {
2036
+ "EntityIdPathParam": {
2037
+ "name": "id",
2038
+ "description": "Entity id",
2039
+ "in": "path",
2040
+ "required": true,
2041
+ "schema": {
2042
+ "$ref": "#/components/schemas/EntityId"
2043
+ }
2044
+ },
1644
2045
  "StrictQueryParam": {
1645
2046
  "name": "strict",
1646
2047
  "in": "query",
@@ -1679,6 +2080,38 @@
1679
2080
  "type": "boolean",
1680
2081
  "default": false
1681
2082
  }
2083
+ },
2084
+ "DeleteTempFileQueryParam": {
2085
+ "name": "delete_temp_file",
2086
+ "description": "Delete the temp file from S3 after copying it permanently",
2087
+ "in": "query",
2088
+ "required": false,
2089
+ "schema": {
2090
+ "type": "boolean",
2091
+ "default": true
2092
+ }
2093
+ }
2094
+ },
2095
+ "responses": {
2096
+ "NotFoundError": {
2097
+ "description": "The requested resource was not found",
2098
+ "content": {
2099
+ "application/json": {
2100
+ "schema": {
2101
+ "allOf": [
2102
+ {
2103
+ "$ref": "#/components/schemas/ErrorObject"
2104
+ },
2105
+ {
2106
+ "example": {
2107
+ "status": 404,
2108
+ "error": "Not Found"
2109
+ }
2110
+ }
2111
+ ]
2112
+ }
2113
+ }
2114
+ }
1682
2115
  }
1683
2116
  }
1684
2117
  },
package/package.json CHANGED
@@ -1,12 +1,24 @@
1
1
  {
2
2
  "name": "@epilot/file-client",
3
- "version": "1.15.1",
3
+ "version": "1.16.0-alpha.0",
4
4
  "description": "Client library for the epilot File API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "author": "epilot GmbH",
8
8
  "license": "MIT",
9
9
  "private": false,
10
+ "scripts": {
11
+ "test": "jest",
12
+ "typescript": "tsc",
13
+ "bundle-definition": "webpack",
14
+ "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/file.yaml",
15
+ "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
16
+ "build": "tsc && npm run build:patch && npm run bundle-definition",
17
+ "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
18
+ "build:watch": "npm run build && tsc -w",
19
+ "prepublishOnly": "npm run typegen && npm run build",
20
+ "lint": "pnpm exec eslint src"
21
+ },
10
22
  "repository": {
11
23
  "type": "git",
12
24
  "url": "git+https://github.com/epilot-dev/sdk-js.git",
@@ -49,26 +61,15 @@
49
61
  "@types/jest": "^26.0.20",
50
62
  "axios": "^1.11.0",
51
63
  "copy-webpack-plugin": "^7.0.0",
52
- "jest": "^26.6.3",
64
+ "jest": "^29.6.2",
53
65
  "json-loader": "^0.5.7",
54
66
  "openapicmd": "^2.7.0",
55
- "ts-jest": "^26.5.0",
67
+ "ts-jest": "^29.4.1",
56
68
  "ts-loader": "^8.0.14",
57
69
  "ts-node": "^10.9.1",
58
70
  "typescript": "^4.1.3",
59
71
  "webpack": "^5.18.0",
60
72
  "webpack-cli": "^4.4.0"
61
73
  },
62
- "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7",
63
- "scripts": {
64
- "test": "jest",
65
- "typescript": "tsc",
66
- "bundle-definition": "webpack",
67
- "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/file.yaml",
68
- "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
69
- "build": "tsc && npm run build:patch && npm run bundle-definition",
70
- "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
71
- "build:watch": "npm run build && tsc -w",
72
- "lint": "pnpm exec eslint src"
73
- }
74
- }
74
+ "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
75
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2025 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.