@epilot/file-client 0.1.1 → 0.2.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
- !function(e,t){for(var i in t)e[i]=t[i];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,i){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(i(279));t.default=r.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"File API","version":"0.1.0","description":"File Upload and Management for epilot SaaS"},"tags":[{"name":"files","description":"Files"}],"security":[{"EpilotAuth":[]}],"paths":{"/v1/files/public/upload":{"post":{"operationId":"uploadFilePublic","summary":"uploadFilePublic","security":[],"description":"Create pre-signed S3 URL to upload a file to keep temporarily (one week).\\n\\nUse the createFile operation to store file file permanently.\\n","tags":["files"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","example":"document.pdf"}},"required":["filename"]}}}},"responses":{"201":{"description":"Pre-signed URL for POST / PUT upload","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string","format":"url","example":"https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"},"s3ref":{"allOf":[{"$ref":"#/components/schemas/S3Reference"},{"example":{"bucket":"epilot-files-prod","key":"123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"}}]}}}}}}}}},"/v1/files/upload":{"post":{"operationId":"uploadFile","summary":"uploadFile","description":"Create pre-signed S3 URL to upload a file to keep temporarily (one week).\\n\\nUse the createFile operation to store file file permanently.\\n","tags":["files"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","example":"document.pdf"}},"required":["filename"]}}}},"responses":{"201":{"description":"Pre-signed URL for POST / PUT upload","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string","format":"url","example":"https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"},"s3ref":{"allOf":[{"$ref":"#/components/schemas/S3Reference"},{"example":{"bucket":"epilot-files-prod","key":"123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"}}]}}}}}}}}},"/v1/files":{"post":{"operationId":"createFile","summary":"createFile","description":"Create a permanent File entity","tags":["files"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileEntityPayload"}}}},"responses":{"201":{"description":"Created File Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileEntity"}}}}}}},"/v1/files/{id}/download":{"get":{"operationId":"downloadFile","summary":"downloadFile","description":"Generate pre-signed download S3 url for a file","tags":["files"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FileEntityId"}},{"name":"version","in":"query","description":"index of file version","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Generated thumbnail image","content":{"application/json":{"schema":{"type":"object","properties":{"download_url":{"type":"string","format":"uri","example":"https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"}}}}}}}}},"/v1/files/{id}/preview":{"get":{"operationId":"previewFile","summary":"previewFile","description":"Generate thumbnail preview for a file entity","tags":["files"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FileEntityId"}},{"name":"version","in":"query","description":"index of file version","schema":{"type":"integer","default":0}},{"name":"w","in":"query","description":"width","schema":{"type":"integer"}},{"name":"h","in":"query","description":"height","schema":{"type":"integer"}}],"responses":{"200":{"description":"Generated thumbnail image","content":{"image/png":{},"image/jpeg":{}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"}},"schemas":{"FileEntityId":{"type":"string","example":"ef7d985c-2385-44f4-9c71-ae06a52264f8"},"FileEntity":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/FileEntityId"},"filename":{"type":"string","example":"document.pdf"},"access_control":{"type":"string","default":"private","enum":["private","public"]},"versions":{"type":"array","items":{"type":"object","properties":{"s3ref":{"$ref":"#/components/schemas/S3Reference"}}}}}},"FileEntityPayload":{"type":"object","properties":{"filename":{"type":"string","example":"document.pdf"},"access_control":{"type":"string","default":"private","enum":["private","public"]},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FileItem"}}}},"S3Reference":{"type":"object","properties":{"bucket":{"type":"string","example":"epilot-files-prod"},"key":{"type":"string","example":"123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"}},"required":["bucket","key"]},"FileItem":{"allOf":[{"$ref":"#/components/schemas/S3Reference"},{"type":"object","properties":{"filename":{"type":"string","example":"document.pdf"},"size_bytes":{"type":"integer","example":1234}}}]}}}}')}},t={};return function i(a){if(t[a])return t[a].exports;var r=t[a]={exports:{}};return e[a].call(r.exports,r,r.exports,i),r.exports}(914)})());
1
+ !function(e,t){for(var i in t)e[i]=t[i];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,i){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=a(i(279));t.default=n.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"File API","version":"0.1.0","description":"File Upload and Management for epilot SaaS"},"tags":[{"name":"files","description":"Files"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]}],"paths":{"/v1/files/public/upload":{"post":{"operationId":"uploadFilePublic","summary":"uploadFilePublic","security":[],"description":"Create pre-signed S3 URL to upload a file to keep temporarily (one week).\\n\\nUse the createFile operation to store file file permanently.\\n","tags":["files"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFilePayload"}}}},"responses":{"201":{"description":"Pre-signed URL for POST / PUT upload","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string","format":"url","example":"https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"},"s3ref":{"allOf":[{"$ref":"#/components/schemas/S3Reference"},{"example":{"bucket":"epilot-files-prod","key":"123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"}}]}}}}}}}}},"/v1/files/upload":{"post":{"operationId":"uploadFile","summary":"uploadFile","description":"Create pre-signed S3 URL to upload a file to keep temporarily (one week).\\n\\nUse the createFile operation to store file file permanently.\\n","tags":["files"],"parameters":[{"name":"file_entity_id","in":"query","description":"file entity id","schema":{"$ref":"#/components/schemas/FileEntityId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFilePayload","type":"object"}}}},"responses":{"201":{"description":"Pre-signed URL for POST / PUT upload","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string","format":"url","example":"https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"},"s3ref":{"allOf":[{"$ref":"#/components/schemas/S3Reference"},{"example":{"bucket":"epilot-files-prod","key":"123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"}}]}}}}}}}}},"/v1/files":{"post":{"operationId":"saveFile","summary":"saveFile","description":"Create / Update a permanent File entity\\n\\nMakes file object permanent\\n\\nSaves metadata to file entity\\n","tags":["files"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveFilePayload"}}}},"responses":{"201":{"description":"Created File Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileEntity"}}}}}}},"/v1/files/{id}/download":{"get":{"operationId":"downloadFile","summary":"downloadFile","description":"Generate pre-signed download S3 url for a file","tags":["files"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FileEntityId"}},{"name":"version","in":"query","description":"index of file version","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Generated thumbnail image","content":{"application/json":{"schema":{"type":"object","properties":{"download_url":{"type":"string","format":"uri","example":"https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"}}}}}}}}},"/v1/files/{id}/preview":{"get":{"operationId":"previewFile","summary":"previewFile","description":"Generate thumbnail preview for a file entity","tags":["files"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FileEntityId"}},{"name":"version","in":"query","description":"index of file version","schema":{"type":"integer","default":0}},{"name":"w","in":"query","description":"width","schema":{"type":"integer"}},{"name":"h","in":"query","description":"height","schema":{"type":"integer"}}],"responses":{"200":{"description":"Generated thumbnail image","content":{"image/png":{},"image/jpeg":{}}}}}},"/v1/files/delete":{"delete":{"operationId":"deleteFile","summary":"deleteFile","description":"Delete file entity","tags":["files"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFilePayload"}}}},"responses":{"200":{"description":"File delete response"}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"}},"schemas":{"FileEntityId":{"type":"string","example":"ef7d985c-2385-44f4-9c71-ae06a52264f8"},"FileEntity":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/FileEntityId"},"filename":{"type":"string","example":"document.pdf"},"access_control":{"type":"string","default":"private","enum":["private","public"]},"versions":{"type":"array","items":{"type":"object","properties":{"s3ref":{"$ref":"#/components/schemas/S3Reference"}}}}}},"UploadFilePayload":{"type":"object","properties":{"filename":{"type":"string","example":"document.pdf"},"content_type":{"description":"MIME type of file","type":"string","example":"image/png","default":"application/octet-stream"}},"required":["filename"]},"SaveFilePayload":{"type":"object","properties":{"s3ref":{"$ref":"#/components/schemas/S3Reference"},"file_entity_id":{"type":"string","description":"if passed, adds a new version to existing file entity"},"filename":{"type":"string","example":"document.pdf"},"size":{"type":"number","example":42012},"type":{"type":"string","example":"image/jpeg"},"access_control":{"type":"string","default":"private","enum":["private","public"]}},"required":["s3ref"]},"DeleteFilePayload":{"type":"object","properties":{"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"required":["s3ref"]},"S3Reference":{"type":"object","properties":{"bucket":{"type":"string","example":"epilot-files-prod"},"key":{"type":"string","example":"123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"}},"required":["bucket","key"]},"FileItem":{"allOf":[{"$ref":"#/components/schemas/S3Reference"},{"type":"object","properties":{"filename":{"type":"string","example":"document.pdf"},"size_bytes":{"type":"integer","example":1234}}}]}}}}')}},t={};return function i(a){if(t[a])return t[a].exports;var n=t[a]={exports:{}};return e[a].call(n.exports,n,n.exports,i),n.exports}(914)})());
package/dist/openapi.d.ts CHANGED
@@ -9,6 +9,9 @@ import {
9
9
 
10
10
  declare namespace Components {
11
11
  namespace Schemas {
12
+ export interface DeleteFilePayload {
13
+ s3ref: S3Reference;
14
+ }
12
15
  export interface FileEntity {
13
16
  _id?: FileEntityId;
14
17
  /**
@@ -26,15 +29,6 @@ declare namespace Components {
26
29
  * ef7d985c-2385-44f4-9c71-ae06a52264f8
27
30
  */
28
31
  export type FileEntityId = string;
29
- export interface FileEntityPayload {
30
- /**
31
- * example:
32
- * document.pdf
33
- */
34
- filename?: string;
35
- access_control?: "private" | "public";
36
- versions?: FileItem[];
37
- }
38
32
  export interface FileItem {
39
33
  /**
40
34
  * example:
@@ -69,14 +63,47 @@ declare namespace Components {
69
63
  */
70
64
  key: string;
71
65
  }
66
+ export interface SaveFilePayload {
67
+ s3ref: S3Reference;
68
+ /**
69
+ * if passed, adds a new version to existing file entity
70
+ */
71
+ file_entity_id?: string;
72
+ /**
73
+ * example:
74
+ * document.pdf
75
+ */
76
+ filename?: string;
77
+ /**
78
+ * example:
79
+ * 42012
80
+ */
81
+ size?: number;
82
+ /**
83
+ * example:
84
+ * image/jpeg
85
+ */
86
+ type?: string;
87
+ access_control?: "private" | "public";
88
+ }
89
+ export interface UploadFilePayload {
90
+ /**
91
+ * example:
92
+ * document.pdf
93
+ */
94
+ filename: string;
95
+ /**
96
+ * MIME type of file
97
+ * example:
98
+ * image/png
99
+ */
100
+ content_type?: string;
101
+ }
72
102
  }
73
103
  }
74
104
  declare namespace Paths {
75
- namespace CreateFile {
76
- export type RequestBody = Components.Schemas.FileEntityPayload;
77
- namespace Responses {
78
- export type $201 = Components.Schemas.FileEntity;
79
- }
105
+ namespace DeleteFile {
106
+ export type RequestBody = Components.Schemas.DeleteFilePayload;
80
107
  }
81
108
  namespace DownloadFile {
82
109
  namespace Parameters {
@@ -115,14 +142,20 @@ declare namespace Paths {
115
142
  h?: Parameters.H;
116
143
  }
117
144
  }
145
+ namespace SaveFile {
146
+ export type RequestBody = Components.Schemas.SaveFilePayload;
147
+ namespace Responses {
148
+ export type $201 = Components.Schemas.FileEntity;
149
+ }
150
+ }
118
151
  namespace UploadFile {
119
- export interface RequestBody {
120
- /**
121
- * example:
122
- * document.pdf
123
- */
124
- filename: string;
152
+ namespace Parameters {
153
+ export type FileEntityId = Components.Schemas.FileEntityId;
154
+ }
155
+ export interface QueryParameters {
156
+ file_entity_id?: Parameters.FileEntityId;
125
157
  }
158
+ export type RequestBody = Components.Schemas.UploadFilePayload;
126
159
  namespace Responses {
127
160
  export interface $201 {
128
161
  /**
@@ -153,13 +186,7 @@ declare namespace Paths {
153
186
  }
154
187
  }
155
188
  namespace UploadFilePublic {
156
- export interface RequestBody {
157
- /**
158
- * example:
159
- * document.pdf
160
- */
161
- filename: string;
162
- }
189
+ export type RequestBody = Components.Schemas.UploadFilePayload;
163
190
  namespace Responses {
164
191
  export interface $201 {
165
192
  /**
@@ -214,20 +241,25 @@ export interface OperationMethods {
214
241
  *
215
242
  */
216
243
  'uploadFile'(
217
- parameters?: Parameters<UnknownParamsObject> | null,
244
+ parameters?: Parameters<Paths.UploadFile.QueryParameters> | null,
218
245
  data?: Paths.UploadFile.RequestBody,
219
246
  config?: AxiosRequestConfig
220
247
  ): OperationResponse<Paths.UploadFile.Responses.$201>
221
248
  /**
222
- * createFile - createFile
249
+ * saveFile - saveFile
250
+ *
251
+ * Create / Update a permanent File entity
252
+ *
253
+ * Makes file object permanent
254
+ *
255
+ * Saves metadata to file entity
223
256
  *
224
- * Create a permanent File entity
225
257
  */
226
- 'createFile'(
258
+ 'saveFile'(
227
259
  parameters?: Parameters<UnknownParamsObject> | null,
228
- data?: Paths.CreateFile.RequestBody,
260
+ data?: Paths.SaveFile.RequestBody,
229
261
  config?: AxiosRequestConfig
230
- ): OperationResponse<Paths.CreateFile.Responses.$201>
262
+ ): OperationResponse<Paths.SaveFile.Responses.$201>
231
263
  /**
232
264
  * downloadFile - downloadFile
233
265
  *
@@ -248,6 +280,16 @@ export interface OperationMethods {
248
280
  data?: any,
249
281
  config?: AxiosRequestConfig
250
282
  ): OperationResponse<any>
283
+ /**
284
+ * deleteFile - deleteFile
285
+ *
286
+ * Delete file entity
287
+ */
288
+ 'deleteFile'(
289
+ parameters?: Parameters<UnknownParamsObject> | null,
290
+ data?: Paths.DeleteFile.RequestBody,
291
+ config?: AxiosRequestConfig
292
+ ): OperationResponse<any>
251
293
  }
252
294
 
253
295
  export interface PathsDictionary {
@@ -276,22 +318,27 @@ export interface PathsDictionary {
276
318
  *
277
319
  */
278
320
  'post'(
279
- parameters?: Parameters<UnknownParamsObject> | null,
321
+ parameters?: Parameters<Paths.UploadFile.QueryParameters> | null,
280
322
  data?: Paths.UploadFile.RequestBody,
281
323
  config?: AxiosRequestConfig
282
324
  ): OperationResponse<Paths.UploadFile.Responses.$201>
283
325
  }
284
326
  ['/v1/files']: {
285
327
  /**
286
- * createFile - createFile
328
+ * saveFile - saveFile
329
+ *
330
+ * Create / Update a permanent File entity
331
+ *
332
+ * Makes file object permanent
333
+ *
334
+ * Saves metadata to file entity
287
335
  *
288
- * Create a permanent File entity
289
336
  */
290
337
  'post'(
291
338
  parameters?: Parameters<UnknownParamsObject> | null,
292
- data?: Paths.CreateFile.RequestBody,
339
+ data?: Paths.SaveFile.RequestBody,
293
340
  config?: AxiosRequestConfig
294
- ): OperationResponse<Paths.CreateFile.Responses.$201>
341
+ ): OperationResponse<Paths.SaveFile.Responses.$201>
295
342
  }
296
343
  ['/v1/files/{id}/download']: {
297
344
  /**
@@ -317,6 +364,18 @@ export interface PathsDictionary {
317
364
  config?: AxiosRequestConfig
318
365
  ): OperationResponse<any>
319
366
  }
367
+ ['/v1/files/delete']: {
368
+ /**
369
+ * deleteFile - deleteFile
370
+ *
371
+ * Delete file entity
372
+ */
373
+ 'delete'(
374
+ parameters?: Parameters<UnknownParamsObject> | null,
375
+ data?: Paths.DeleteFile.RequestBody,
376
+ config?: AxiosRequestConfig
377
+ ): OperationResponse<any>
378
+ }
320
379
  }
321
380
 
322
381
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/file-client",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "API client for epilot File API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/openapi.d.ts CHANGED
@@ -9,6 +9,9 @@ import {
9
9
 
10
10
  declare namespace Components {
11
11
  namespace Schemas {
12
+ export interface DeleteFilePayload {
13
+ s3ref: S3Reference;
14
+ }
12
15
  export interface FileEntity {
13
16
  _id?: FileEntityId;
14
17
  /**
@@ -26,15 +29,6 @@ declare namespace Components {
26
29
  * ef7d985c-2385-44f4-9c71-ae06a52264f8
27
30
  */
28
31
  export type FileEntityId = string;
29
- export interface FileEntityPayload {
30
- /**
31
- * example:
32
- * document.pdf
33
- */
34
- filename?: string;
35
- access_control?: "private" | "public";
36
- versions?: FileItem[];
37
- }
38
32
  export interface FileItem {
39
33
  /**
40
34
  * example:
@@ -69,14 +63,47 @@ declare namespace Components {
69
63
  */
70
64
  key: string;
71
65
  }
66
+ export interface SaveFilePayload {
67
+ s3ref: S3Reference;
68
+ /**
69
+ * if passed, adds a new version to existing file entity
70
+ */
71
+ file_entity_id?: string;
72
+ /**
73
+ * example:
74
+ * document.pdf
75
+ */
76
+ filename?: string;
77
+ /**
78
+ * example:
79
+ * 42012
80
+ */
81
+ size?: number;
82
+ /**
83
+ * example:
84
+ * image/jpeg
85
+ */
86
+ type?: string;
87
+ access_control?: "private" | "public";
88
+ }
89
+ export interface UploadFilePayload {
90
+ /**
91
+ * example:
92
+ * document.pdf
93
+ */
94
+ filename: string;
95
+ /**
96
+ * MIME type of file
97
+ * example:
98
+ * image/png
99
+ */
100
+ content_type?: string;
101
+ }
72
102
  }
73
103
  }
74
104
  declare namespace Paths {
75
- namespace CreateFile {
76
- export type RequestBody = Components.Schemas.FileEntityPayload;
77
- namespace Responses {
78
- export type $201 = Components.Schemas.FileEntity;
79
- }
105
+ namespace DeleteFile {
106
+ export type RequestBody = Components.Schemas.DeleteFilePayload;
80
107
  }
81
108
  namespace DownloadFile {
82
109
  namespace Parameters {
@@ -115,14 +142,20 @@ declare namespace Paths {
115
142
  h?: Parameters.H;
116
143
  }
117
144
  }
145
+ namespace SaveFile {
146
+ export type RequestBody = Components.Schemas.SaveFilePayload;
147
+ namespace Responses {
148
+ export type $201 = Components.Schemas.FileEntity;
149
+ }
150
+ }
118
151
  namespace UploadFile {
119
- export interface RequestBody {
120
- /**
121
- * example:
122
- * document.pdf
123
- */
124
- filename: string;
152
+ namespace Parameters {
153
+ export type FileEntityId = Components.Schemas.FileEntityId;
154
+ }
155
+ export interface QueryParameters {
156
+ file_entity_id?: Parameters.FileEntityId;
125
157
  }
158
+ export type RequestBody = Components.Schemas.UploadFilePayload;
126
159
  namespace Responses {
127
160
  export interface $201 {
128
161
  /**
@@ -153,13 +186,7 @@ declare namespace Paths {
153
186
  }
154
187
  }
155
188
  namespace UploadFilePublic {
156
- export interface RequestBody {
157
- /**
158
- * example:
159
- * document.pdf
160
- */
161
- filename: string;
162
- }
189
+ export type RequestBody = Components.Schemas.UploadFilePayload;
163
190
  namespace Responses {
164
191
  export interface $201 {
165
192
  /**
@@ -214,20 +241,25 @@ export interface OperationMethods {
214
241
  *
215
242
  */
216
243
  'uploadFile'(
217
- parameters?: Parameters<UnknownParamsObject> | null,
244
+ parameters?: Parameters<Paths.UploadFile.QueryParameters> | null,
218
245
  data?: Paths.UploadFile.RequestBody,
219
246
  config?: AxiosRequestConfig
220
247
  ): OperationResponse<Paths.UploadFile.Responses.$201>
221
248
  /**
222
- * createFile - createFile
249
+ * saveFile - saveFile
250
+ *
251
+ * Create / Update a permanent File entity
252
+ *
253
+ * Makes file object permanent
254
+ *
255
+ * Saves metadata to file entity
223
256
  *
224
- * Create a permanent File entity
225
257
  */
226
- 'createFile'(
258
+ 'saveFile'(
227
259
  parameters?: Parameters<UnknownParamsObject> | null,
228
- data?: Paths.CreateFile.RequestBody,
260
+ data?: Paths.SaveFile.RequestBody,
229
261
  config?: AxiosRequestConfig
230
- ): OperationResponse<Paths.CreateFile.Responses.$201>
262
+ ): OperationResponse<Paths.SaveFile.Responses.$201>
231
263
  /**
232
264
  * downloadFile - downloadFile
233
265
  *
@@ -248,6 +280,16 @@ export interface OperationMethods {
248
280
  data?: any,
249
281
  config?: AxiosRequestConfig
250
282
  ): OperationResponse<any>
283
+ /**
284
+ * deleteFile - deleteFile
285
+ *
286
+ * Delete file entity
287
+ */
288
+ 'deleteFile'(
289
+ parameters?: Parameters<UnknownParamsObject> | null,
290
+ data?: Paths.DeleteFile.RequestBody,
291
+ config?: AxiosRequestConfig
292
+ ): OperationResponse<any>
251
293
  }
252
294
 
253
295
  export interface PathsDictionary {
@@ -276,22 +318,27 @@ export interface PathsDictionary {
276
318
  *
277
319
  */
278
320
  'post'(
279
- parameters?: Parameters<UnknownParamsObject> | null,
321
+ parameters?: Parameters<Paths.UploadFile.QueryParameters> | null,
280
322
  data?: Paths.UploadFile.RequestBody,
281
323
  config?: AxiosRequestConfig
282
324
  ): OperationResponse<Paths.UploadFile.Responses.$201>
283
325
  }
284
326
  ['/v1/files']: {
285
327
  /**
286
- * createFile - createFile
328
+ * saveFile - saveFile
329
+ *
330
+ * Create / Update a permanent File entity
331
+ *
332
+ * Makes file object permanent
333
+ *
334
+ * Saves metadata to file entity
287
335
  *
288
- * Create a permanent File entity
289
336
  */
290
337
  'post'(
291
338
  parameters?: Parameters<UnknownParamsObject> | null,
292
- data?: Paths.CreateFile.RequestBody,
339
+ data?: Paths.SaveFile.RequestBody,
293
340
  config?: AxiosRequestConfig
294
- ): OperationResponse<Paths.CreateFile.Responses.$201>
341
+ ): OperationResponse<Paths.SaveFile.Responses.$201>
295
342
  }
296
343
  ['/v1/files/{id}/download']: {
297
344
  /**
@@ -317,6 +364,18 @@ export interface PathsDictionary {
317
364
  config?: AxiosRequestConfig
318
365
  ): OperationResponse<any>
319
366
  }
367
+ ['/v1/files/delete']: {
368
+ /**
369
+ * deleteFile - deleteFile
370
+ *
371
+ * Delete file entity
372
+ */
373
+ 'delete'(
374
+ parameters?: Parameters<UnknownParamsObject> | null,
375
+ data?: Paths.DeleteFile.RequestBody,
376
+ config?: AxiosRequestConfig
377
+ ): OperationResponse<any>
378
+ }
320
379
  }
321
380
 
322
381
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>