@epilot/file-client 0.1.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +104 -46
- package/package.json +1 -1
- package/src/openapi.d.ts +104 -46
package/dist/definition.js
CHANGED
|
@@ -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 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":{"
|
|
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":{"name":{"type":"string","example":"document.pdf"},"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"},"name":{"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":{"name":{"type":"string","example":"document.pdf"},"size":{"type":"integer","example":1234},"type":{"type":"string","example":"image/jpeg"}}}]}}}}')}},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:
|
|
@@ -50,12 +44,17 @@ declare namespace Components {
|
|
|
50
44
|
* example:
|
|
51
45
|
* document.pdf
|
|
52
46
|
*/
|
|
53
|
-
|
|
47
|
+
name?: string;
|
|
54
48
|
/**
|
|
55
49
|
* example:
|
|
56
50
|
* 1234
|
|
57
51
|
*/
|
|
58
|
-
|
|
52
|
+
size?: number;
|
|
53
|
+
/**
|
|
54
|
+
* example:
|
|
55
|
+
* image/jpeg
|
|
56
|
+
*/
|
|
57
|
+
type?: string;
|
|
59
58
|
}
|
|
60
59
|
export interface S3Reference {
|
|
61
60
|
/**
|
|
@@ -69,14 +68,47 @@ declare namespace Components {
|
|
|
69
68
|
*/
|
|
70
69
|
key: string;
|
|
71
70
|
}
|
|
71
|
+
export interface SaveFilePayload {
|
|
72
|
+
s3ref: S3Reference;
|
|
73
|
+
/**
|
|
74
|
+
* if passed, adds a new version to existing file entity
|
|
75
|
+
*/
|
|
76
|
+
file_entity_id?: string;
|
|
77
|
+
/**
|
|
78
|
+
* example:
|
|
79
|
+
* document.pdf
|
|
80
|
+
*/
|
|
81
|
+
name?: string;
|
|
82
|
+
/**
|
|
83
|
+
* example:
|
|
84
|
+
* 42012
|
|
85
|
+
*/
|
|
86
|
+
size?: number;
|
|
87
|
+
/**
|
|
88
|
+
* example:
|
|
89
|
+
* image/jpeg
|
|
90
|
+
*/
|
|
91
|
+
type?: string;
|
|
92
|
+
access_control?: "private" | "public";
|
|
93
|
+
}
|
|
94
|
+
export interface UploadFilePayload {
|
|
95
|
+
/**
|
|
96
|
+
* example:
|
|
97
|
+
* document.pdf
|
|
98
|
+
*/
|
|
99
|
+
name?: string;
|
|
100
|
+
/**
|
|
101
|
+
* MIME type of file
|
|
102
|
+
* example:
|
|
103
|
+
* image/png
|
|
104
|
+
*/
|
|
105
|
+
type?: string;
|
|
106
|
+
}
|
|
72
107
|
}
|
|
73
108
|
}
|
|
74
109
|
declare namespace Paths {
|
|
75
|
-
namespace
|
|
76
|
-
export type RequestBody = Components.Schemas.
|
|
77
|
-
namespace Responses {
|
|
78
|
-
export type $201 = Components.Schemas.FileEntity;
|
|
79
|
-
}
|
|
110
|
+
namespace DeleteFile {
|
|
111
|
+
export type RequestBody = Components.Schemas.DeleteFilePayload;
|
|
80
112
|
}
|
|
81
113
|
namespace DownloadFile {
|
|
82
114
|
namespace Parameters {
|
|
@@ -115,14 +147,20 @@ declare namespace Paths {
|
|
|
115
147
|
h?: Parameters.H;
|
|
116
148
|
}
|
|
117
149
|
}
|
|
150
|
+
namespace SaveFile {
|
|
151
|
+
export type RequestBody = Components.Schemas.SaveFilePayload;
|
|
152
|
+
namespace Responses {
|
|
153
|
+
export type $201 = Components.Schemas.FileEntity;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
118
156
|
namespace UploadFile {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
* example:
|
|
122
|
-
* document.pdf
|
|
123
|
-
*/
|
|
124
|
-
filename: string;
|
|
157
|
+
namespace Parameters {
|
|
158
|
+
export type FileEntityId = Components.Schemas.FileEntityId;
|
|
125
159
|
}
|
|
160
|
+
export interface QueryParameters {
|
|
161
|
+
file_entity_id?: Parameters.FileEntityId;
|
|
162
|
+
}
|
|
163
|
+
export type RequestBody = Components.Schemas.UploadFilePayload;
|
|
126
164
|
namespace Responses {
|
|
127
165
|
export interface $201 {
|
|
128
166
|
/**
|
|
@@ -153,19 +191,7 @@ declare namespace Paths {
|
|
|
153
191
|
}
|
|
154
192
|
}
|
|
155
193
|
namespace UploadFilePublic {
|
|
156
|
-
export
|
|
157
|
-
/**
|
|
158
|
-
* example:
|
|
159
|
-
* document.pdf
|
|
160
|
-
*/
|
|
161
|
-
filename: string;
|
|
162
|
-
/**
|
|
163
|
-
* MIME type of file
|
|
164
|
-
* example:
|
|
165
|
-
* image/png
|
|
166
|
-
*/
|
|
167
|
-
content_type?: string;
|
|
168
|
-
}
|
|
194
|
+
export type RequestBody = Components.Schemas.UploadFilePayload;
|
|
169
195
|
namespace Responses {
|
|
170
196
|
export interface $201 {
|
|
171
197
|
/**
|
|
@@ -220,20 +246,25 @@ export interface OperationMethods {
|
|
|
220
246
|
*
|
|
221
247
|
*/
|
|
222
248
|
'uploadFile'(
|
|
223
|
-
parameters?: Parameters<
|
|
249
|
+
parameters?: Parameters<Paths.UploadFile.QueryParameters> | null,
|
|
224
250
|
data?: Paths.UploadFile.RequestBody,
|
|
225
251
|
config?: AxiosRequestConfig
|
|
226
252
|
): OperationResponse<Paths.UploadFile.Responses.$201>
|
|
227
253
|
/**
|
|
228
|
-
*
|
|
254
|
+
* saveFile - saveFile
|
|
255
|
+
*
|
|
256
|
+
* Create / Update a permanent File entity
|
|
257
|
+
*
|
|
258
|
+
* Makes file object permanent
|
|
259
|
+
*
|
|
260
|
+
* Saves metadata to file entity
|
|
229
261
|
*
|
|
230
|
-
* Create a permanent File entity
|
|
231
262
|
*/
|
|
232
|
-
'
|
|
263
|
+
'saveFile'(
|
|
233
264
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
234
|
-
data?: Paths.
|
|
265
|
+
data?: Paths.SaveFile.RequestBody,
|
|
235
266
|
config?: AxiosRequestConfig
|
|
236
|
-
): OperationResponse<Paths.
|
|
267
|
+
): OperationResponse<Paths.SaveFile.Responses.$201>
|
|
237
268
|
/**
|
|
238
269
|
* downloadFile - downloadFile
|
|
239
270
|
*
|
|
@@ -254,6 +285,16 @@ export interface OperationMethods {
|
|
|
254
285
|
data?: any,
|
|
255
286
|
config?: AxiosRequestConfig
|
|
256
287
|
): OperationResponse<any>
|
|
288
|
+
/**
|
|
289
|
+
* deleteFile - deleteFile
|
|
290
|
+
*
|
|
291
|
+
* Delete file entity
|
|
292
|
+
*/
|
|
293
|
+
'deleteFile'(
|
|
294
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
295
|
+
data?: Paths.DeleteFile.RequestBody,
|
|
296
|
+
config?: AxiosRequestConfig
|
|
297
|
+
): OperationResponse<any>
|
|
257
298
|
}
|
|
258
299
|
|
|
259
300
|
export interface PathsDictionary {
|
|
@@ -282,22 +323,27 @@ export interface PathsDictionary {
|
|
|
282
323
|
*
|
|
283
324
|
*/
|
|
284
325
|
'post'(
|
|
285
|
-
parameters?: Parameters<
|
|
326
|
+
parameters?: Parameters<Paths.UploadFile.QueryParameters> | null,
|
|
286
327
|
data?: Paths.UploadFile.RequestBody,
|
|
287
328
|
config?: AxiosRequestConfig
|
|
288
329
|
): OperationResponse<Paths.UploadFile.Responses.$201>
|
|
289
330
|
}
|
|
290
331
|
['/v1/files']: {
|
|
291
332
|
/**
|
|
292
|
-
*
|
|
333
|
+
* saveFile - saveFile
|
|
334
|
+
*
|
|
335
|
+
* Create / Update a permanent File entity
|
|
336
|
+
*
|
|
337
|
+
* Makes file object permanent
|
|
338
|
+
*
|
|
339
|
+
* Saves metadata to file entity
|
|
293
340
|
*
|
|
294
|
-
* Create a permanent File entity
|
|
295
341
|
*/
|
|
296
342
|
'post'(
|
|
297
343
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
298
|
-
data?: Paths.
|
|
344
|
+
data?: Paths.SaveFile.RequestBody,
|
|
299
345
|
config?: AxiosRequestConfig
|
|
300
|
-
): OperationResponse<Paths.
|
|
346
|
+
): OperationResponse<Paths.SaveFile.Responses.$201>
|
|
301
347
|
}
|
|
302
348
|
['/v1/files/{id}/download']: {
|
|
303
349
|
/**
|
|
@@ -323,6 +369,18 @@ export interface PathsDictionary {
|
|
|
323
369
|
config?: AxiosRequestConfig
|
|
324
370
|
): OperationResponse<any>
|
|
325
371
|
}
|
|
372
|
+
['/v1/files/delete']: {
|
|
373
|
+
/**
|
|
374
|
+
* deleteFile - deleteFile
|
|
375
|
+
*
|
|
376
|
+
* Delete file entity
|
|
377
|
+
*/
|
|
378
|
+
'delete'(
|
|
379
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
380
|
+
data?: Paths.DeleteFile.RequestBody,
|
|
381
|
+
config?: AxiosRequestConfig
|
|
382
|
+
): OperationResponse<any>
|
|
383
|
+
}
|
|
326
384
|
}
|
|
327
385
|
|
|
328
386
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
package/package.json
CHANGED
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:
|
|
@@ -50,12 +44,17 @@ declare namespace Components {
|
|
|
50
44
|
* example:
|
|
51
45
|
* document.pdf
|
|
52
46
|
*/
|
|
53
|
-
|
|
47
|
+
name?: string;
|
|
54
48
|
/**
|
|
55
49
|
* example:
|
|
56
50
|
* 1234
|
|
57
51
|
*/
|
|
58
|
-
|
|
52
|
+
size?: number;
|
|
53
|
+
/**
|
|
54
|
+
* example:
|
|
55
|
+
* image/jpeg
|
|
56
|
+
*/
|
|
57
|
+
type?: string;
|
|
59
58
|
}
|
|
60
59
|
export interface S3Reference {
|
|
61
60
|
/**
|
|
@@ -69,14 +68,47 @@ declare namespace Components {
|
|
|
69
68
|
*/
|
|
70
69
|
key: string;
|
|
71
70
|
}
|
|
71
|
+
export interface SaveFilePayload {
|
|
72
|
+
s3ref: S3Reference;
|
|
73
|
+
/**
|
|
74
|
+
* if passed, adds a new version to existing file entity
|
|
75
|
+
*/
|
|
76
|
+
file_entity_id?: string;
|
|
77
|
+
/**
|
|
78
|
+
* example:
|
|
79
|
+
* document.pdf
|
|
80
|
+
*/
|
|
81
|
+
name?: string;
|
|
82
|
+
/**
|
|
83
|
+
* example:
|
|
84
|
+
* 42012
|
|
85
|
+
*/
|
|
86
|
+
size?: number;
|
|
87
|
+
/**
|
|
88
|
+
* example:
|
|
89
|
+
* image/jpeg
|
|
90
|
+
*/
|
|
91
|
+
type?: string;
|
|
92
|
+
access_control?: "private" | "public";
|
|
93
|
+
}
|
|
94
|
+
export interface UploadFilePayload {
|
|
95
|
+
/**
|
|
96
|
+
* example:
|
|
97
|
+
* document.pdf
|
|
98
|
+
*/
|
|
99
|
+
name?: string;
|
|
100
|
+
/**
|
|
101
|
+
* MIME type of file
|
|
102
|
+
* example:
|
|
103
|
+
* image/png
|
|
104
|
+
*/
|
|
105
|
+
type?: string;
|
|
106
|
+
}
|
|
72
107
|
}
|
|
73
108
|
}
|
|
74
109
|
declare namespace Paths {
|
|
75
|
-
namespace
|
|
76
|
-
export type RequestBody = Components.Schemas.
|
|
77
|
-
namespace Responses {
|
|
78
|
-
export type $201 = Components.Schemas.FileEntity;
|
|
79
|
-
}
|
|
110
|
+
namespace DeleteFile {
|
|
111
|
+
export type RequestBody = Components.Schemas.DeleteFilePayload;
|
|
80
112
|
}
|
|
81
113
|
namespace DownloadFile {
|
|
82
114
|
namespace Parameters {
|
|
@@ -115,14 +147,20 @@ declare namespace Paths {
|
|
|
115
147
|
h?: Parameters.H;
|
|
116
148
|
}
|
|
117
149
|
}
|
|
150
|
+
namespace SaveFile {
|
|
151
|
+
export type RequestBody = Components.Schemas.SaveFilePayload;
|
|
152
|
+
namespace Responses {
|
|
153
|
+
export type $201 = Components.Schemas.FileEntity;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
118
156
|
namespace UploadFile {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
* example:
|
|
122
|
-
* document.pdf
|
|
123
|
-
*/
|
|
124
|
-
filename: string;
|
|
157
|
+
namespace Parameters {
|
|
158
|
+
export type FileEntityId = Components.Schemas.FileEntityId;
|
|
125
159
|
}
|
|
160
|
+
export interface QueryParameters {
|
|
161
|
+
file_entity_id?: Parameters.FileEntityId;
|
|
162
|
+
}
|
|
163
|
+
export type RequestBody = Components.Schemas.UploadFilePayload;
|
|
126
164
|
namespace Responses {
|
|
127
165
|
export interface $201 {
|
|
128
166
|
/**
|
|
@@ -153,19 +191,7 @@ declare namespace Paths {
|
|
|
153
191
|
}
|
|
154
192
|
}
|
|
155
193
|
namespace UploadFilePublic {
|
|
156
|
-
export
|
|
157
|
-
/**
|
|
158
|
-
* example:
|
|
159
|
-
* document.pdf
|
|
160
|
-
*/
|
|
161
|
-
filename: string;
|
|
162
|
-
/**
|
|
163
|
-
* MIME type of file
|
|
164
|
-
* example:
|
|
165
|
-
* image/png
|
|
166
|
-
*/
|
|
167
|
-
content_type?: string;
|
|
168
|
-
}
|
|
194
|
+
export type RequestBody = Components.Schemas.UploadFilePayload;
|
|
169
195
|
namespace Responses {
|
|
170
196
|
export interface $201 {
|
|
171
197
|
/**
|
|
@@ -220,20 +246,25 @@ export interface OperationMethods {
|
|
|
220
246
|
*
|
|
221
247
|
*/
|
|
222
248
|
'uploadFile'(
|
|
223
|
-
parameters?: Parameters<
|
|
249
|
+
parameters?: Parameters<Paths.UploadFile.QueryParameters> | null,
|
|
224
250
|
data?: Paths.UploadFile.RequestBody,
|
|
225
251
|
config?: AxiosRequestConfig
|
|
226
252
|
): OperationResponse<Paths.UploadFile.Responses.$201>
|
|
227
253
|
/**
|
|
228
|
-
*
|
|
254
|
+
* saveFile - saveFile
|
|
255
|
+
*
|
|
256
|
+
* Create / Update a permanent File entity
|
|
257
|
+
*
|
|
258
|
+
* Makes file object permanent
|
|
259
|
+
*
|
|
260
|
+
* Saves metadata to file entity
|
|
229
261
|
*
|
|
230
|
-
* Create a permanent File entity
|
|
231
262
|
*/
|
|
232
|
-
'
|
|
263
|
+
'saveFile'(
|
|
233
264
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
234
|
-
data?: Paths.
|
|
265
|
+
data?: Paths.SaveFile.RequestBody,
|
|
235
266
|
config?: AxiosRequestConfig
|
|
236
|
-
): OperationResponse<Paths.
|
|
267
|
+
): OperationResponse<Paths.SaveFile.Responses.$201>
|
|
237
268
|
/**
|
|
238
269
|
* downloadFile - downloadFile
|
|
239
270
|
*
|
|
@@ -254,6 +285,16 @@ export interface OperationMethods {
|
|
|
254
285
|
data?: any,
|
|
255
286
|
config?: AxiosRequestConfig
|
|
256
287
|
): OperationResponse<any>
|
|
288
|
+
/**
|
|
289
|
+
* deleteFile - deleteFile
|
|
290
|
+
*
|
|
291
|
+
* Delete file entity
|
|
292
|
+
*/
|
|
293
|
+
'deleteFile'(
|
|
294
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
295
|
+
data?: Paths.DeleteFile.RequestBody,
|
|
296
|
+
config?: AxiosRequestConfig
|
|
297
|
+
): OperationResponse<any>
|
|
257
298
|
}
|
|
258
299
|
|
|
259
300
|
export interface PathsDictionary {
|
|
@@ -282,22 +323,27 @@ export interface PathsDictionary {
|
|
|
282
323
|
*
|
|
283
324
|
*/
|
|
284
325
|
'post'(
|
|
285
|
-
parameters?: Parameters<
|
|
326
|
+
parameters?: Parameters<Paths.UploadFile.QueryParameters> | null,
|
|
286
327
|
data?: Paths.UploadFile.RequestBody,
|
|
287
328
|
config?: AxiosRequestConfig
|
|
288
329
|
): OperationResponse<Paths.UploadFile.Responses.$201>
|
|
289
330
|
}
|
|
290
331
|
['/v1/files']: {
|
|
291
332
|
/**
|
|
292
|
-
*
|
|
333
|
+
* saveFile - saveFile
|
|
334
|
+
*
|
|
335
|
+
* Create / Update a permanent File entity
|
|
336
|
+
*
|
|
337
|
+
* Makes file object permanent
|
|
338
|
+
*
|
|
339
|
+
* Saves metadata to file entity
|
|
293
340
|
*
|
|
294
|
-
* Create a permanent File entity
|
|
295
341
|
*/
|
|
296
342
|
'post'(
|
|
297
343
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
298
|
-
data?: Paths.
|
|
344
|
+
data?: Paths.SaveFile.RequestBody,
|
|
299
345
|
config?: AxiosRequestConfig
|
|
300
|
-
): OperationResponse<Paths.
|
|
346
|
+
): OperationResponse<Paths.SaveFile.Responses.$201>
|
|
301
347
|
}
|
|
302
348
|
['/v1/files/{id}/download']: {
|
|
303
349
|
/**
|
|
@@ -323,6 +369,18 @@ export interface PathsDictionary {
|
|
|
323
369
|
config?: AxiosRequestConfig
|
|
324
370
|
): OperationResponse<any>
|
|
325
371
|
}
|
|
372
|
+
['/v1/files/delete']: {
|
|
373
|
+
/**
|
|
374
|
+
* deleteFile - deleteFile
|
|
375
|
+
*
|
|
376
|
+
* Delete file entity
|
|
377
|
+
*/
|
|
378
|
+
'delete'(
|
|
379
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
380
|
+
data?: Paths.DeleteFile.RequestBody,
|
|
381
|
+
config?: AxiosRequestConfig
|
|
382
|
+
): OperationResponse<any>
|
|
383
|
+
}
|
|
326
384
|
}
|
|
327
385
|
|
|
328
386
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|