@epilot/file-client 1.18.0 → 1.19.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={330: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},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","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"parents","in":"query","required":false,"style":"form","explode":true}],"responses":{}},"post":{"operationId":"createFileFolder","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/entity/{id}/folders/{folderSlug}":{"put":{"operationId":"updateFileFolder","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFileFolder","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"responses":{}}},"/v1/entity/{id}/folders/{folderSlug}/files":{"get":{"operationId":"getFilesInFolder","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"responses":{}}},"/v1/folders/{schemaSlug}":{"get":{"operationId":"getGlobalFileFolders","deprecated":true,"parameters":[{"name":"schemaSlug","in":"path","required":true}],"responses":{}}},"/v1/entity/{id}/collections":{"get":{"operationId":"getFileCollections","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"parents","in":"query","required":false,"style":"form","explode":true}],"responses":{}},"post":{"operationId":"createFileCollection","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/entity/{id}/collections/{collectionSlug}":{"put":{"operationId":"updateFileCollection","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"collectionSlug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFileCollection","parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"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}},"responses":{"NotFoundError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://file.sls.epilot.io"}]}')}},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}(330),a=exports;for(var n in t)a[n]=t[n];t.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330: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},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","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"parents","in":"query","required":false,"style":"form","explode":true}],"responses":{}},"post":{"operationId":"createFileFolder","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/entity/{id}/folders/{folderSlug}":{"put":{"operationId":"updateFileFolder","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFileFolder","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"responses":{}}},"/v1/entity/{id}/folders/{folderSlug}/files":{"get":{"operationId":"getFilesInFolder","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"folderSlug","in":"path","required":true}],"responses":{}}},"/v1/folders/{schemaSlug}":{"get":{"operationId":"getGlobalFileFolders","deprecated":true,"parameters":[{"name":"schemaSlug","in":"path","required":true}],"responses":{}}},"/v1/entity/{id}/collections":{"get":{"operationId":"getFileCollections","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"parents","in":"query","required":false,"style":"form","explode":true}],"responses":{}},"post":{"operationId":"createFileCollection","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/entity/{id}/collections/{collectionSlug}":{"put":{"operationId":"updateFileCollection","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"collectionSlug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteFileCollection","deprecated":true,"parameters":[{"$ref":"#/components/parameters/EntityIdPathParam"},{"name":"collectionSlug","in":"path","required":true}],"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}},"responses":{"NotFoundError":{"content":{"application/json":{}}}}},"servers":[{"url":"https://file.sls.epilot.io"}]}')}},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}(330),a=exports;for(var n in t)a[n]=t[n];t.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
@@ -484,6 +484,7 @@
484
484
  "/v1/entity/{id}/collections": {
485
485
  "get": {
486
486
  "operationId": "getFileCollections",
487
+ "deprecated": true,
487
488
  "parameters": [
488
489
  {
489
490
  "$ref": "#/components/parameters/EntityIdPathParam"
@@ -500,6 +501,7 @@
500
501
  },
501
502
  "post": {
502
503
  "operationId": "createFileCollection",
504
+ "deprecated": true,
503
505
  "parameters": [
504
506
  {
505
507
  "$ref": "#/components/parameters/EntityIdPathParam"
@@ -517,6 +519,7 @@
517
519
  "/v1/entity/{id}/collections/{collectionSlug}": {
518
520
  "put": {
519
521
  "operationId": "updateFileCollection",
522
+ "deprecated": true,
520
523
  "parameters": [
521
524
  {
522
525
  "$ref": "#/components/parameters/EntityIdPathParam"
@@ -537,6 +540,7 @@
537
540
  },
538
541
  "delete": {
539
542
  "operationId": "deleteFileCollection",
543
+ "deprecated": true,
540
544
  "parameters": [
541
545
  {
542
546
  "$ref": "#/components/parameters/EntityIdPathParam"
@@ -550,6 +554,76 @@
550
554
  "responses": {}
551
555
  }
552
556
  },
557
+ "/v1/{slug}/collections": {
558
+ "get": {
559
+ "operationId": "getUserSchemaFileCollections",
560
+ "parameters": [
561
+ {
562
+ "name": "slug",
563
+ "in": "path",
564
+ "required": true
565
+ }
566
+ ],
567
+ "responses": {}
568
+ },
569
+ "post": {
570
+ "operationId": "createUserSchemaFileCollection",
571
+ "parameters": [
572
+ {
573
+ "name": "slug",
574
+ "in": "path",
575
+ "required": true
576
+ }
577
+ ],
578
+ "requestBody": {
579
+ "required": true,
580
+ "content": {
581
+ "application/json": {}
582
+ }
583
+ },
584
+ "responses": {}
585
+ }
586
+ },
587
+ "/v1/{slug}/collections/{collectionSlug}": {
588
+ "put": {
589
+ "operationId": "updateUserSchemaFileCollection",
590
+ "parameters": [
591
+ {
592
+ "name": "slug",
593
+ "in": "path",
594
+ "required": true
595
+ },
596
+ {
597
+ "name": "collectionSlug",
598
+ "in": "path",
599
+ "required": true
600
+ }
601
+ ],
602
+ "requestBody": {
603
+ "required": true,
604
+ "content": {
605
+ "application/json": {}
606
+ }
607
+ },
608
+ "responses": {}
609
+ },
610
+ "delete": {
611
+ "operationId": "deleteUserSchemaFileCollection",
612
+ "parameters": [
613
+ {
614
+ "name": "slug",
615
+ "in": "path",
616
+ "required": true
617
+ },
618
+ {
619
+ "name": "collectionSlug",
620
+ "in": "path",
621
+ "required": true
622
+ }
623
+ ],
624
+ "responses": {}
625
+ }
626
+ },
553
627
  "/v1/entity/{id}/collections/{collectionSlug}/files": {
554
628
  "get": {
555
629
  "operationId": "getFilesInCollection",
package/dist/openapi.d.ts CHANGED
@@ -979,6 +979,26 @@ declare namespace Paths {
979
979
  Components.Responses.NotFoundError;
980
980
  }
981
981
  }
982
+ namespace CreateUserSchemaFileCollection {
983
+ namespace Parameters {
984
+ /**
985
+ * example:
986
+ * opportunity
987
+ */
988
+ export type Slug = string;
989
+ }
990
+ export interface PathParameters {
991
+ slug: /**
992
+ * example:
993
+ * opportunity
994
+ */
995
+ Parameters.Slug;
996
+ }
997
+ export type RequestBody = /* Request body for creating a file collection */ Components.Schemas.FileCollectionCreateRequest;
998
+ namespace Responses {
999
+ export type $201 = /* A file collection with identifiers and timestamps */ Components.Schemas.FileCollectionItem;
1000
+ }
1001
+ }
982
1002
  namespace DeleteFile {
983
1003
  namespace Parameters {
984
1004
  export type ActivityId = /**
@@ -1086,6 +1106,45 @@ declare namespace Paths {
1086
1106
  }
1087
1107
  }
1088
1108
  }
1109
+ namespace DeleteUserSchemaFileCollection {
1110
+ namespace Parameters {
1111
+ /**
1112
+ * example:
1113
+ * documents
1114
+ */
1115
+ export type CollectionSlug = string;
1116
+ /**
1117
+ * example:
1118
+ * opportunity
1119
+ */
1120
+ export type Slug = string;
1121
+ }
1122
+ export interface PathParameters {
1123
+ slug: /**
1124
+ * example:
1125
+ * opportunity
1126
+ */
1127
+ Parameters.Slug;
1128
+ collectionSlug: /**
1129
+ * example:
1130
+ * documents
1131
+ */
1132
+ Parameters.CollectionSlug;
1133
+ }
1134
+ namespace Responses {
1135
+ export interface $200 {
1136
+ }
1137
+ export type $404 = /**
1138
+ * A generic error returned by the API
1139
+ * example:
1140
+ * {
1141
+ * "status": 404,
1142
+ * "error": "Not Found"
1143
+ * }
1144
+ */
1145
+ Components.Responses.NotFoundError;
1146
+ }
1147
+ }
1089
1148
  namespace DownloadFile {
1090
1149
  namespace Parameters {
1091
1150
  export type Attachment = boolean;
@@ -1370,6 +1429,25 @@ declare namespace Paths {
1370
1429
  }
1371
1430
  }
1372
1431
  }
1432
+ namespace GetUserSchemaFileCollections {
1433
+ namespace Parameters {
1434
+ /**
1435
+ * example:
1436
+ * opportunity
1437
+ */
1438
+ export type Slug = string;
1439
+ }
1440
+ export interface PathParameters {
1441
+ slug: /**
1442
+ * example:
1443
+ * opportunity
1444
+ */
1445
+ Parameters.Slug;
1446
+ }
1447
+ namespace Responses {
1448
+ export type $200 = /* A file collection with identifiers and timestamps */ Components.Schemas.FileCollectionItem[];
1449
+ }
1450
+ }
1373
1451
  namespace ListPublicLinksForFile {
1374
1452
  namespace Parameters {
1375
1453
  /**
@@ -1599,6 +1677,45 @@ declare namespace Paths {
1599
1677
  Components.Responses.NotFoundError;
1600
1678
  }
1601
1679
  }
1680
+ namespace UpdateUserSchemaFileCollection {
1681
+ namespace Parameters {
1682
+ /**
1683
+ * example:
1684
+ * documents
1685
+ */
1686
+ export type CollectionSlug = string;
1687
+ /**
1688
+ * example:
1689
+ * opportunity
1690
+ */
1691
+ export type Slug = string;
1692
+ }
1693
+ export interface PathParameters {
1694
+ slug: /**
1695
+ * example:
1696
+ * opportunity
1697
+ */
1698
+ Parameters.Slug;
1699
+ collectionSlug: /**
1700
+ * example:
1701
+ * documents
1702
+ */
1703
+ Parameters.CollectionSlug;
1704
+ }
1705
+ export type RequestBody = Components.Schemas.FileCollectionAttributes;
1706
+ namespace Responses {
1707
+ export type $200 = /* A file collection with identifiers and timestamps */ Components.Schemas.FileCollectionItem;
1708
+ export type $404 = /**
1709
+ * A generic error returned by the API
1710
+ * example:
1711
+ * {
1712
+ * "status": 404,
1713
+ * "error": "Not Found"
1714
+ * }
1715
+ */
1716
+ Components.Responses.NotFoundError;
1717
+ }
1718
+ }
1602
1719
  namespace UploadFile {
1603
1720
  namespace Parameters {
1604
1721
  export type FileEntityId = /**
@@ -1988,7 +2105,7 @@ export interface OperationMethods {
1988
2105
  /**
1989
2106
  * updateFileCollection - updateFileCollection
1990
2107
  *
1991
- * Updates a specific file collection by slug
2108
+ * Updates a file collection for the specified entity
1992
2109
  */
1993
2110
  'updateFileCollection'(
1994
2111
  parameters?: Parameters<Paths.UpdateFileCollection.PathParameters> | null,
@@ -1998,17 +2115,57 @@ export interface OperationMethods {
1998
2115
  /**
1999
2116
  * deleteFileCollection - deleteFileCollection
2000
2117
  *
2001
- * Deletes a specific file collection by slug
2118
+ * Deletes a file collection for the specified entity
2002
2119
  */
2003
2120
  'deleteFileCollection'(
2004
2121
  parameters?: Parameters<Paths.DeleteFileCollection.PathParameters> | null,
2005
2122
  data?: any,
2006
2123
  config?: AxiosRequestConfig
2007
2124
  ): OperationResponse<Paths.DeleteFileCollection.Responses.$200>
2125
+ /**
2126
+ * getUserSchemaFileCollections - getUserSchemaFileCollections
2127
+ *
2128
+ * Gets a list of file collections for the current user and schema
2129
+ */
2130
+ 'getUserSchemaFileCollections'(
2131
+ parameters?: Parameters<Paths.GetUserSchemaFileCollections.PathParameters> | null,
2132
+ data?: any,
2133
+ config?: AxiosRequestConfig
2134
+ ): OperationResponse<Paths.GetUserSchemaFileCollections.Responses.$200>
2135
+ /**
2136
+ * createUserSchemaFileCollection - createUserSchemaFileCollection
2137
+ *
2138
+ * Creates a new file collection for the current user and schema
2139
+ */
2140
+ 'createUserSchemaFileCollection'(
2141
+ parameters?: Parameters<Paths.CreateUserSchemaFileCollection.PathParameters> | null,
2142
+ data?: Paths.CreateUserSchemaFileCollection.RequestBody,
2143
+ config?: AxiosRequestConfig
2144
+ ): OperationResponse<Paths.CreateUserSchemaFileCollection.Responses.$201>
2145
+ /**
2146
+ * updateUserSchemaFileCollection - updateUserSchemaFileCollection
2147
+ *
2148
+ * Updates a file collection for the current user and schema
2149
+ */
2150
+ 'updateUserSchemaFileCollection'(
2151
+ parameters?: Parameters<Paths.UpdateUserSchemaFileCollection.PathParameters> | null,
2152
+ data?: Paths.UpdateUserSchemaFileCollection.RequestBody,
2153
+ config?: AxiosRequestConfig
2154
+ ): OperationResponse<Paths.UpdateUserSchemaFileCollection.Responses.$200>
2155
+ /**
2156
+ * deleteUserSchemaFileCollection - deleteUserSchemaFileCollection
2157
+ *
2158
+ * Deletes a file collection for the current user and schema
2159
+ */
2160
+ 'deleteUserSchemaFileCollection'(
2161
+ parameters?: Parameters<Paths.DeleteUserSchemaFileCollection.PathParameters> | null,
2162
+ data?: any,
2163
+ config?: AxiosRequestConfig
2164
+ ): OperationResponse<Paths.DeleteUserSchemaFileCollection.Responses.$200>
2008
2165
  /**
2009
2166
  * getFilesInCollection - getFilesInCollection
2010
2167
  *
2011
- * Gets all files within a specific collection for an entity
2168
+ * Gets all files within a specific collection for an entity (uses schema-based taxonomy derived from entity)
2012
2169
  */
2013
2170
  'getFilesInCollection'(
2014
2171
  parameters?: Parameters<Paths.GetFilesInCollection.PathParameters> | null,
@@ -2387,7 +2544,7 @@ export interface PathsDictionary {
2387
2544
  /**
2388
2545
  * updateFileCollection - updateFileCollection
2389
2546
  *
2390
- * Updates a specific file collection by slug
2547
+ * Updates a file collection for the specified entity
2391
2548
  */
2392
2549
  'put'(
2393
2550
  parameters?: Parameters<Paths.UpdateFileCollection.PathParameters> | null,
@@ -2397,7 +2554,7 @@ export interface PathsDictionary {
2397
2554
  /**
2398
2555
  * deleteFileCollection - deleteFileCollection
2399
2556
  *
2400
- * Deletes a specific file collection by slug
2557
+ * Deletes a file collection for the specified entity
2401
2558
  */
2402
2559
  'delete'(
2403
2560
  parameters?: Parameters<Paths.DeleteFileCollection.PathParameters> | null,
@@ -2405,11 +2562,55 @@ export interface PathsDictionary {
2405
2562
  config?: AxiosRequestConfig
2406
2563
  ): OperationResponse<Paths.DeleteFileCollection.Responses.$200>
2407
2564
  }
2565
+ ['/v1/{slug}/collections']: {
2566
+ /**
2567
+ * getUserSchemaFileCollections - getUserSchemaFileCollections
2568
+ *
2569
+ * Gets a list of file collections for the current user and schema
2570
+ */
2571
+ 'get'(
2572
+ parameters?: Parameters<Paths.GetUserSchemaFileCollections.PathParameters> | null,
2573
+ data?: any,
2574
+ config?: AxiosRequestConfig
2575
+ ): OperationResponse<Paths.GetUserSchemaFileCollections.Responses.$200>
2576
+ /**
2577
+ * createUserSchemaFileCollection - createUserSchemaFileCollection
2578
+ *
2579
+ * Creates a new file collection for the current user and schema
2580
+ */
2581
+ 'post'(
2582
+ parameters?: Parameters<Paths.CreateUserSchemaFileCollection.PathParameters> | null,
2583
+ data?: Paths.CreateUserSchemaFileCollection.RequestBody,
2584
+ config?: AxiosRequestConfig
2585
+ ): OperationResponse<Paths.CreateUserSchemaFileCollection.Responses.$201>
2586
+ }
2587
+ ['/v1/{slug}/collections/{collectionSlug}']: {
2588
+ /**
2589
+ * updateUserSchemaFileCollection - updateUserSchemaFileCollection
2590
+ *
2591
+ * Updates a file collection for the current user and schema
2592
+ */
2593
+ 'put'(
2594
+ parameters?: Parameters<Paths.UpdateUserSchemaFileCollection.PathParameters> | null,
2595
+ data?: Paths.UpdateUserSchemaFileCollection.RequestBody,
2596
+ config?: AxiosRequestConfig
2597
+ ): OperationResponse<Paths.UpdateUserSchemaFileCollection.Responses.$200>
2598
+ /**
2599
+ * deleteUserSchemaFileCollection - deleteUserSchemaFileCollection
2600
+ *
2601
+ * Deletes a file collection for the current user and schema
2602
+ */
2603
+ 'delete'(
2604
+ parameters?: Parameters<Paths.DeleteUserSchemaFileCollection.PathParameters> | null,
2605
+ data?: any,
2606
+ config?: AxiosRequestConfig
2607
+ ): OperationResponse<Paths.DeleteUserSchemaFileCollection.Responses.$200>
2608
+ }
2408
2609
  ['/v1/entity/{id}/collections/{collectionSlug}/files']: {
2409
2610
  /**
2410
2611
  * getFilesInCollection - getFilesInCollection
2411
2612
  *
2412
- * Gets all files within a specific collection for an entity
2613
+ * Gets all files within a specific collection for an entity (uses schema-based taxonomy derived from entity)
2413
2614
  */
2414
2615
  'get'(
2415
2616
  parameters?: Parameters<Paths.GetFilesInCollection.PathParameters> | null,
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.3.0",
5
+ "version": "1.4.0",
6
6
  "description": "Upload and manage epilot Files\n\n## Changelog\n<a href=\"changelog\">View API Changelog</a>\n"
7
7
  },
8
8
  "tags": [
@@ -1385,6 +1385,7 @@
1385
1385
  "operationId": "getFileCollections",
1386
1386
  "summary": "getFileCollections",
1387
1387
  "description": "Gets a list of collections that exist for an entity",
1388
+ "deprecated": true,
1388
1389
  "tags": [
1389
1390
  "File Collections"
1390
1391
  ],
@@ -1430,6 +1431,7 @@
1430
1431
  "operationId": "createFileCollection",
1431
1432
  "summary": "createFileCollection",
1432
1433
  "description": "Creates a new file collection for the specified entity",
1434
+ "deprecated": true,
1433
1435
  "tags": [
1434
1436
  "File Collections"
1435
1437
  ],
@@ -1469,7 +1471,8 @@
1469
1471
  "put": {
1470
1472
  "operationId": "updateFileCollection",
1471
1473
  "summary": "updateFileCollection",
1472
- "description": "Updates a specific file collection by slug",
1474
+ "description": "Updates a file collection for the specified entity",
1475
+ "deprecated": true,
1473
1476
  "tags": [
1474
1477
  "File Collections"
1475
1478
  ],
@@ -1517,7 +1520,8 @@
1517
1520
  "delete": {
1518
1521
  "operationId": "deleteFileCollection",
1519
1522
  "summary": "deleteFileCollection",
1520
- "description": "Deletes a specific file collection by slug",
1523
+ "description": "Deletes a file collection for the specified entity",
1524
+ "deprecated": true,
1521
1525
  "tags": [
1522
1526
  "File Collections"
1523
1527
  ],
@@ -1546,11 +1550,185 @@
1546
1550
  }
1547
1551
  }
1548
1552
  },
1553
+ "/v1/{slug}/collections": {
1554
+ "get": {
1555
+ "operationId": "getUserSchemaFileCollections",
1556
+ "summary": "getUserSchemaFileCollections",
1557
+ "description": "Gets a list of file collections for the current user and schema",
1558
+ "tags": [
1559
+ "File Collections"
1560
+ ],
1561
+ "parameters": [
1562
+ {
1563
+ "name": "slug",
1564
+ "in": "path",
1565
+ "required": true,
1566
+ "description": "The schema slug (e.g., order, opportunity)",
1567
+ "schema": {
1568
+ "type": "string",
1569
+ "example": "opportunity"
1570
+ }
1571
+ }
1572
+ ],
1573
+ "responses": {
1574
+ "200": {
1575
+ "description": "List of collections for the user and schema",
1576
+ "content": {
1577
+ "application/json": {
1578
+ "schema": {
1579
+ "type": "array",
1580
+ "items": {
1581
+ "$ref": "#/components/schemas/FileCollectionItem"
1582
+ }
1583
+ }
1584
+ }
1585
+ }
1586
+ }
1587
+ }
1588
+ },
1589
+ "post": {
1590
+ "operationId": "createUserSchemaFileCollection",
1591
+ "summary": "createUserSchemaFileCollection",
1592
+ "description": "Creates a new file collection for the current user and schema",
1593
+ "tags": [
1594
+ "File Collections"
1595
+ ],
1596
+ "parameters": [
1597
+ {
1598
+ "name": "slug",
1599
+ "in": "path",
1600
+ "required": true,
1601
+ "description": "The schema slug (e.g., order, opportunity)",
1602
+ "schema": {
1603
+ "type": "string",
1604
+ "example": "opportunity"
1605
+ }
1606
+ }
1607
+ ],
1608
+ "requestBody": {
1609
+ "required": true,
1610
+ "content": {
1611
+ "application/json": {
1612
+ "schema": {
1613
+ "$ref": "#/components/schemas/FileCollectionCreateRequest"
1614
+ }
1615
+ }
1616
+ }
1617
+ },
1618
+ "responses": {
1619
+ "201": {
1620
+ "description": "File collection created successfully",
1621
+ "content": {
1622
+ "application/json": {
1623
+ "schema": {
1624
+ "$ref": "#/components/schemas/FileCollectionItem"
1625
+ }
1626
+ }
1627
+ }
1628
+ }
1629
+ }
1630
+ }
1631
+ },
1632
+ "/v1/{slug}/collections/{collectionSlug}": {
1633
+ "put": {
1634
+ "operationId": "updateUserSchemaFileCollection",
1635
+ "summary": "updateUserSchemaFileCollection",
1636
+ "description": "Updates a file collection for the current user and schema",
1637
+ "tags": [
1638
+ "File Collections"
1639
+ ],
1640
+ "parameters": [
1641
+ {
1642
+ "name": "slug",
1643
+ "in": "path",
1644
+ "required": true,
1645
+ "description": "The schema slug (e.g., order, opportunity)",
1646
+ "schema": {
1647
+ "type": "string",
1648
+ "example": "opportunity"
1649
+ }
1650
+ },
1651
+ {
1652
+ "name": "collectionSlug",
1653
+ "in": "path",
1654
+ "required": true,
1655
+ "description": "The slug identifier for the collection",
1656
+ "schema": {
1657
+ "type": "string",
1658
+ "example": "documents"
1659
+ }
1660
+ }
1661
+ ],
1662
+ "requestBody": {
1663
+ "required": true,
1664
+ "content": {
1665
+ "application/json": {
1666
+ "schema": {
1667
+ "$ref": "#/components/schemas/FileCollectionAttributes"
1668
+ }
1669
+ }
1670
+ }
1671
+ },
1672
+ "responses": {
1673
+ "200": {
1674
+ "description": "File collection updated successfully",
1675
+ "content": {
1676
+ "application/json": {
1677
+ "schema": {
1678
+ "$ref": "#/components/schemas/FileCollectionItem"
1679
+ }
1680
+ }
1681
+ }
1682
+ },
1683
+ "404": {
1684
+ "$ref": "#/components/responses/NotFoundError"
1685
+ }
1686
+ }
1687
+ },
1688
+ "delete": {
1689
+ "operationId": "deleteUserSchemaFileCollection",
1690
+ "summary": "deleteUserSchemaFileCollection",
1691
+ "description": "Deletes a file collection for the current user and schema",
1692
+ "tags": [
1693
+ "File Collections"
1694
+ ],
1695
+ "parameters": [
1696
+ {
1697
+ "name": "slug",
1698
+ "in": "path",
1699
+ "required": true,
1700
+ "description": "The schema slug (e.g., order, opportunity)",
1701
+ "schema": {
1702
+ "type": "string",
1703
+ "example": "opportunity"
1704
+ }
1705
+ },
1706
+ {
1707
+ "name": "collectionSlug",
1708
+ "in": "path",
1709
+ "required": true,
1710
+ "description": "The slug identifier for the collection",
1711
+ "schema": {
1712
+ "type": "string",
1713
+ "example": "documents"
1714
+ }
1715
+ }
1716
+ ],
1717
+ "responses": {
1718
+ "200": {
1719
+ "description": "File collection deleted successfully"
1720
+ },
1721
+ "404": {
1722
+ "$ref": "#/components/responses/NotFoundError"
1723
+ }
1724
+ }
1725
+ }
1726
+ },
1549
1727
  "/v1/entity/{id}/collections/{collectionSlug}/files": {
1550
1728
  "get": {
1551
1729
  "operationId": "getFilesInCollection",
1552
1730
  "summary": "getFilesInCollection",
1553
- "description": "Gets all files within a specific collection for an entity",
1731
+ "description": "Gets all files within a specific collection for an entity (uses schema-based taxonomy derived from entity)",
1554
1732
  "tags": [
1555
1733
  "File Collections"
1556
1734
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/file-client",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "Client library for the epilot File API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",