@epilot/file-client 1.15.0 → 1.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
File without changes
package/dist/client.js CHANGED
File without changes
File without changes
@@ -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={330:function(e,r,i){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var t=a(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"},{"$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":{}}}},"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},"DeleteTempFileQueryParam":{"name":"delete_temp_file","in":"query","required":false}}},"servers":[{"url":"https://file.sls.epilot.io"}]}')}},r={},i=function i(a){var t=r[a];if(void 0!==t)return t.exports;var n=r[a]={exports:{}};return e[a].call(n.exports,n,n.exports,i),n.exports}(330),a=exports;for(var t in i)a[t]=i[t];i.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
@@ -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": {
@@ -396,6 +399,11 @@
396
399
  "name": "async",
397
400
  "in": "query",
398
401
  "required": false
402
+ },
403
+ "DeleteTempFileQueryParam": {
404
+ "name": "delete_temp_file",
405
+ "in": "query",
406
+ "required": false
399
407
  }
400
408
  }
401
409
  },
package/dist/openapi.d.ts CHANGED
@@ -17,6 +17,7 @@ declare namespace Components {
17
17
  */
18
18
  Schemas.ActivityId /* ulid */;
19
19
  export type AsyncOperationQueryParam = boolean;
20
+ export type DeleteTempFileQueryParam = boolean;
20
21
  export type FillActivityQueryParam = boolean;
21
22
  export type StrictQueryParam = boolean;
22
23
  }
@@ -25,6 +26,7 @@ declare namespace Components {
25
26
  ActivityIdQueryParam?: Parameters.ActivityIdQueryParam;
26
27
  FillActivityQueryParam?: Parameters.FillActivityQueryParam;
27
28
  AsyncOperationQueryParam?: Parameters.AsyncOperationQueryParam;
29
+ DeleteTempFileQueryParam?: Parameters.DeleteTempFileQueryParam;
28
30
  }
29
31
  namespace Schemas {
30
32
  /**
@@ -245,7 +247,7 @@ declare namespace Components {
245
247
  * https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf
246
248
  */
247
249
  source_url?: string;
248
- s3ref?: S3Ref;
250
+ s3ref?: S3Reference;
249
251
  versions: FileItem[];
250
252
  _updated_at?: string; // date-time
251
253
  _created_at?: string; // date-time
@@ -677,6 +679,9 @@ declare namespace Paths {
677
679
  * ef7d985c-2385-44f4-9c71-ae06a52264f8
678
680
  */
679
681
  Components.Schemas.FileEntityId;
682
+ /**
683
+ * Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted
684
+ */
680
685
  export type Purge = boolean;
681
686
  export type Strict = boolean;
682
687
  }
@@ -684,7 +689,7 @@ declare namespace Paths {
684
689
  id: Parameters.Id;
685
690
  }
686
691
  export interface QueryParameters {
687
- purge?: Parameters.Purge;
692
+ purge?: /* Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted */ Parameters.Purge;
688
693
  activity_id?: Parameters.ActivityId;
689
694
  strict?: Parameters.Strict;
690
695
  }
@@ -953,6 +958,7 @@ declare namespace Paths {
953
958
  */
954
959
  Components.Schemas.ActivityId /* ulid */;
955
960
  export type Async = boolean;
961
+ export type DeleteTempFile = boolean;
956
962
  export type FillActivity = boolean;
957
963
  export type Strict = boolean;
958
964
  }
@@ -961,6 +967,7 @@ declare namespace Paths {
961
967
  fill_activity?: Parameters.FillActivity;
962
968
  strict?: Parameters.Strict;
963
969
  async?: Parameters.Async;
970
+ delete_temp_file?: Parameters.DeleteTempFile;
964
971
  }
965
972
  export type RequestBody = Components.Schemas.SaveFilePayloadV2;
966
973
  namespace Responses {
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": "0.2.0",
5
+ "version": "0.2.1",
6
6
  "description": "Upload and manage epilot Files"
7
7
  },
8
8
  "tags": [
@@ -136,6 +136,9 @@
136
136
  },
137
137
  {
138
138
  "$ref": "#/components/parameters/AsyncOperationQueryParam"
139
+ },
140
+ {
141
+ "$ref": "#/components/parameters/DeleteTempFileQueryParam"
139
142
  }
140
143
  ],
141
144
  "requestBody": {
@@ -394,7 +397,8 @@
394
397
  "in": "query",
395
398
  "schema": {
396
399
  "type": "boolean",
397
- "default": false
400
+ "default": false,
401
+ "description": "Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted"
398
402
  }
399
403
  },
400
404
  {
@@ -1255,8 +1259,14 @@
1255
1259
  "example": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf"
1256
1260
  },
1257
1261
  "s3ref": {
1258
- "$ref": "#/components/schemas/S3Ref",
1259
- "readOnly": true
1262
+ "allOf": [
1263
+ {
1264
+ "$ref": "#/components/schemas/S3Ref"
1265
+ },
1266
+ {
1267
+ "readOnly": true
1268
+ }
1269
+ ]
1260
1270
  },
1261
1271
  "versions": {
1262
1272
  "type": "array",
@@ -1679,6 +1689,16 @@
1679
1689
  "type": "boolean",
1680
1690
  "default": false
1681
1691
  }
1692
+ },
1693
+ "DeleteTempFileQueryParam": {
1694
+ "name": "delete_temp_file",
1695
+ "description": "Delete the temp file from S3 after copying it permanently",
1696
+ "in": "query",
1697
+ "required": false,
1698
+ "schema": {
1699
+ "type": "boolean",
1700
+ "default": true
1701
+ }
1682
1702
  }
1683
1703
  }
1684
1704
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/file-client",
3
- "version": "1.15.0",
3
+ "version": "1.15.2",
4
4
  "description": "Client library for the epilot File API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -61,10 +61,10 @@
61
61
  "@types/jest": "^26.0.20",
62
62
  "axios": "^1.11.0",
63
63
  "copy-webpack-plugin": "^7.0.0",
64
- "jest": "^26.6.3",
64
+ "jest": "^29.6.2",
65
65
  "json-loader": "^0.5.7",
66
66
  "openapicmd": "^2.7.0",
67
- "ts-jest": "^26.5.0",
67
+ "ts-jest": "^29.4.1",
68
68
  "ts-loader": "^8.0.14",
69
69
  "ts-node": "^10.9.1",
70
70
  "typescript": "^4.1.3",