@epilot/file-client 1.1.8 → 1.3.1
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/README.md +19 -28
- package/dist/client.d.ts +2 -1
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +8 -1
- package/dist/openapi.d.ts +256 -240
- package/dist/openapi.json +562 -0
- package/package.json +29 -19
- package/src/openapi.d.ts +0 -443
package/dist/openapi.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import {
|
|
2
|
+
import type {
|
|
3
3
|
OpenAPIClient,
|
|
4
4
|
Parameters,
|
|
5
5
|
UnknownParamsObject,
|
|
@@ -8,254 +8,270 @@ import {
|
|
|
8
8
|
} from 'openapi-client-axios';
|
|
9
9
|
|
|
10
10
|
declare namespace Components {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
export type FileEntityId = string;
|
|
52
|
-
export interface FileItem {
|
|
53
|
-
/**
|
|
54
|
-
* example:
|
|
55
|
-
* epilot-files-prod
|
|
56
|
-
*/
|
|
57
|
-
bucket: string;
|
|
58
|
-
/**
|
|
59
|
-
* example:
|
|
60
|
-
* 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
61
|
-
*/
|
|
62
|
-
key: string;
|
|
63
|
-
/**
|
|
64
|
-
* example:
|
|
65
|
-
* document.pdf
|
|
66
|
-
*/
|
|
67
|
-
filename?: string;
|
|
68
|
-
/**
|
|
69
|
-
* example:
|
|
70
|
-
* 1234
|
|
71
|
-
*/
|
|
72
|
-
size_bytes?: number;
|
|
73
|
-
/**
|
|
74
|
-
* example:
|
|
75
|
-
* image/jpeg
|
|
76
|
-
*/
|
|
77
|
-
mime_type?: string;
|
|
78
|
-
}
|
|
79
|
-
export interface S3Reference {
|
|
80
|
-
/**
|
|
81
|
-
* example:
|
|
82
|
-
* epilot-files-prod
|
|
83
|
-
*/
|
|
84
|
-
bucket: string;
|
|
85
|
-
/**
|
|
86
|
-
* example:
|
|
87
|
-
* 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
88
|
-
*/
|
|
89
|
-
key: string;
|
|
90
|
-
}
|
|
91
|
-
export interface SaveFilePayload {
|
|
92
|
-
s3ref: S3Reference;
|
|
93
|
-
/**
|
|
94
|
-
* if passed, adds a new version to existing file entity
|
|
95
|
-
*/
|
|
96
|
-
file_entity_id?: string;
|
|
97
|
-
document_type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown";
|
|
98
|
-
/**
|
|
99
|
-
* example:
|
|
100
|
-
* document.pdf
|
|
101
|
-
*/
|
|
102
|
-
filename?: string;
|
|
103
|
-
_tags?: string[];
|
|
104
|
-
access_control?: "private" | "public-read";
|
|
105
|
-
}
|
|
106
|
-
export interface UploadFilePayload {
|
|
107
|
-
/**
|
|
108
|
-
* example:
|
|
109
|
-
* document.pdf
|
|
110
|
-
*/
|
|
111
|
-
filename: string;
|
|
112
|
-
/**
|
|
113
|
-
* MIME type of file
|
|
114
|
-
* example:
|
|
115
|
-
* application/pdf
|
|
116
|
-
*/
|
|
117
|
-
mime_type?: string;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
declare namespace Paths {
|
|
122
|
-
namespace DeleteFile {
|
|
123
|
-
export type RequestBody = Components.Schemas.DeleteFilePayload;
|
|
124
|
-
}
|
|
125
|
-
namespace DownloadFile {
|
|
126
|
-
namespace Parameters {
|
|
127
|
-
export type Attachment = boolean;
|
|
128
|
-
export type Id = Components.Schemas.FileEntityId;
|
|
129
|
-
export type S3Bucket = string;
|
|
130
|
-
export type S3Key = string;
|
|
131
|
-
export type Version = number;
|
|
132
|
-
}
|
|
133
|
-
export interface PathParameters {
|
|
134
|
-
id?: Parameters.Id;
|
|
135
|
-
}
|
|
136
|
-
export interface QueryParameters {
|
|
137
|
-
version?: Parameters.Version;
|
|
138
|
-
attachment?: Parameters.Attachment;
|
|
139
|
-
s3_key?: Parameters.S3Key;
|
|
140
|
-
s3_bucket?: Parameters.S3Bucket;
|
|
141
|
-
}
|
|
142
|
-
namespace Responses {
|
|
143
|
-
export interface $200 {
|
|
11
|
+
namespace Schemas {
|
|
12
|
+
export interface DeleteFilePayload {
|
|
13
|
+
s3ref: S3Reference;
|
|
14
|
+
}
|
|
15
|
+
export interface FileEntity {
|
|
16
|
+
_id?: /**
|
|
17
|
+
* example:
|
|
18
|
+
* ef7d985c-2385-44f4-9c71-ae06a52264f8
|
|
19
|
+
*/
|
|
20
|
+
FileEntityId;
|
|
21
|
+
/**
|
|
22
|
+
* example:
|
|
23
|
+
* document.pdf
|
|
24
|
+
*/
|
|
25
|
+
filename?: string;
|
|
26
|
+
access_control?: "private" | "public-read";
|
|
27
|
+
/**
|
|
28
|
+
* Direct URL for file (public only if file access control is public-read)
|
|
29
|
+
* example:
|
|
30
|
+
* https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
31
|
+
*/
|
|
32
|
+
public_url?: string; // url
|
|
33
|
+
/**
|
|
34
|
+
* Human readable type for file
|
|
35
|
+
*/
|
|
36
|
+
type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown";
|
|
37
|
+
/**
|
|
38
|
+
* MIME type of the file
|
|
39
|
+
* example:
|
|
40
|
+
* application/pdf
|
|
41
|
+
*/
|
|
42
|
+
mime_type?: string;
|
|
43
|
+
/**
|
|
44
|
+
* File size in bytes
|
|
45
|
+
*/
|
|
46
|
+
size_bytes?: number;
|
|
47
|
+
versions?: {
|
|
48
|
+
s3ref?: S3Reference;
|
|
49
|
+
}[];
|
|
50
|
+
}
|
|
144
51
|
/**
|
|
145
52
|
* example:
|
|
146
|
-
*
|
|
53
|
+
* ef7d985c-2385-44f4-9c71-ae06a52264f8
|
|
147
54
|
*/
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
55
|
+
export type FileEntityId = string;
|
|
56
|
+
export interface FileItem {
|
|
57
|
+
/**
|
|
58
|
+
* example:
|
|
59
|
+
* epilot-files-prod
|
|
60
|
+
*/
|
|
61
|
+
bucket: string;
|
|
62
|
+
/**
|
|
63
|
+
* example:
|
|
64
|
+
* 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
65
|
+
*/
|
|
66
|
+
key: string;
|
|
67
|
+
/**
|
|
68
|
+
* example:
|
|
69
|
+
* document.pdf
|
|
70
|
+
*/
|
|
71
|
+
filename?: string;
|
|
72
|
+
/**
|
|
73
|
+
* example:
|
|
74
|
+
* 1234
|
|
75
|
+
*/
|
|
76
|
+
size_bytes?: number;
|
|
77
|
+
/**
|
|
78
|
+
* example:
|
|
79
|
+
* image/jpeg
|
|
80
|
+
*/
|
|
81
|
+
mime_type?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface S3Reference {
|
|
84
|
+
/**
|
|
85
|
+
* example:
|
|
86
|
+
* epilot-files-prod
|
|
87
|
+
*/
|
|
88
|
+
bucket: string;
|
|
89
|
+
/**
|
|
90
|
+
* example:
|
|
91
|
+
* 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
92
|
+
*/
|
|
93
|
+
key: string;
|
|
94
|
+
}
|
|
95
|
+
export interface SaveFilePayload {
|
|
96
|
+
s3ref: S3Reference;
|
|
97
|
+
/**
|
|
98
|
+
* if passed, adds a new version to existing file entity
|
|
99
|
+
*/
|
|
100
|
+
file_entity_id?: string;
|
|
101
|
+
document_type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown";
|
|
102
|
+
/**
|
|
103
|
+
* example:
|
|
104
|
+
* document.pdf
|
|
105
|
+
*/
|
|
106
|
+
filename?: string;
|
|
107
|
+
_tags?: string[];
|
|
108
|
+
access_control?: "private" | "public-read";
|
|
109
|
+
}
|
|
110
|
+
export interface UploadFilePayload {
|
|
111
|
+
/**
|
|
112
|
+
* example:
|
|
113
|
+
* document.pdf
|
|
114
|
+
*/
|
|
115
|
+
filename: string;
|
|
116
|
+
/**
|
|
117
|
+
* MIME type of file
|
|
118
|
+
* example:
|
|
119
|
+
* application/pdf
|
|
120
|
+
*/
|
|
121
|
+
mime_type?: string;
|
|
122
|
+
}
|
|
158
123
|
}
|
|
159
|
-
|
|
160
|
-
|
|
124
|
+
}
|
|
125
|
+
declare namespace Paths {
|
|
126
|
+
namespace DeleteFile {
|
|
127
|
+
export type RequestBody = Components.Schemas.DeleteFilePayload;
|
|
128
|
+
namespace Responses {
|
|
129
|
+
export interface $200 {
|
|
130
|
+
}
|
|
131
|
+
}
|
|
161
132
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
133
|
+
namespace DownloadFile {
|
|
134
|
+
namespace Parameters {
|
|
135
|
+
export type Attachment = boolean;
|
|
136
|
+
export type Id = /**
|
|
137
|
+
* example:
|
|
138
|
+
* ef7d985c-2385-44f4-9c71-ae06a52264f8
|
|
139
|
+
*/
|
|
140
|
+
Components.Schemas.FileEntityId;
|
|
141
|
+
export type Version = number;
|
|
142
|
+
}
|
|
143
|
+
export interface PathParameters {
|
|
144
|
+
id: Parameters.Id;
|
|
145
|
+
}
|
|
146
|
+
export interface QueryParameters {
|
|
147
|
+
version?: Parameters.Version;
|
|
148
|
+
attachment?: Parameters.Attachment;
|
|
149
|
+
}
|
|
150
|
+
namespace Responses {
|
|
151
|
+
export interface $200 {
|
|
152
|
+
/**
|
|
153
|
+
* example:
|
|
154
|
+
* https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
|
|
155
|
+
*/
|
|
156
|
+
download_url?: string; // uri
|
|
157
|
+
}
|
|
158
|
+
}
|
|
166
159
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
160
|
+
namespace PreviewFile {
|
|
161
|
+
namespace Parameters {
|
|
162
|
+
export type H = number;
|
|
163
|
+
export type Id = /**
|
|
164
|
+
* example:
|
|
165
|
+
* ef7d985c-2385-44f4-9c71-ae06a52264f8
|
|
166
|
+
*/
|
|
167
|
+
Components.Schemas.FileEntityId;
|
|
168
|
+
export type Version = number;
|
|
169
|
+
export type W = number;
|
|
170
|
+
}
|
|
171
|
+
export interface PathParameters {
|
|
172
|
+
id: Parameters.Id;
|
|
173
|
+
}
|
|
174
|
+
export interface QueryParameters {
|
|
175
|
+
version?: Parameters.Version;
|
|
176
|
+
w?: Parameters.W;
|
|
177
|
+
h?: Parameters.H;
|
|
178
|
+
}
|
|
172
179
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
180
|
+
namespace PreviewS3File {
|
|
181
|
+
namespace Parameters {
|
|
182
|
+
export type H = number;
|
|
183
|
+
export type W = number;
|
|
184
|
+
}
|
|
185
|
+
export interface QueryParameters {
|
|
186
|
+
w?: Parameters.W;
|
|
187
|
+
h?: Parameters.H;
|
|
188
|
+
}
|
|
189
|
+
export type RequestBody = Components.Schemas.S3Reference;
|
|
176
190
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
export type $201 = Components.Schemas.FileEntity;
|
|
191
|
+
namespace SaveFile {
|
|
192
|
+
export type RequestBody = Components.Schemas.SaveFilePayload;
|
|
193
|
+
namespace Responses {
|
|
194
|
+
export type $201 = Components.Schemas.FileEntity;
|
|
195
|
+
}
|
|
183
196
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
197
|
+
namespace UploadFile {
|
|
198
|
+
namespace Parameters {
|
|
199
|
+
export type FileEntityId = /**
|
|
200
|
+
* example:
|
|
201
|
+
* ef7d985c-2385-44f4-9c71-ae06a52264f8
|
|
202
|
+
*/
|
|
203
|
+
Components.Schemas.FileEntityId;
|
|
204
|
+
}
|
|
205
|
+
export interface QueryParameters {
|
|
206
|
+
file_entity_id?: Parameters.FileEntityId;
|
|
207
|
+
}
|
|
208
|
+
export type RequestBody = Components.Schemas.UploadFilePayload;
|
|
209
|
+
namespace Responses {
|
|
210
|
+
export interface $201 {
|
|
211
|
+
/**
|
|
212
|
+
* example:
|
|
213
|
+
* {
|
|
214
|
+
* "bucket": "epilot-files-prod",
|
|
215
|
+
* "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
216
|
+
* }
|
|
217
|
+
*/
|
|
218
|
+
s3ref?: {
|
|
219
|
+
/**
|
|
220
|
+
* example:
|
|
221
|
+
* epilot-files-prod
|
|
222
|
+
*/
|
|
223
|
+
bucket: string;
|
|
224
|
+
/**
|
|
225
|
+
* example:
|
|
226
|
+
* 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
227
|
+
*/
|
|
228
|
+
key: string;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* example:
|
|
232
|
+
* https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
|
|
233
|
+
*/
|
|
234
|
+
upload_url?: string; // url
|
|
235
|
+
/**
|
|
236
|
+
* Returned only if file is permanent i.e. file_entity_id is passed
|
|
237
|
+
* example:
|
|
238
|
+
* https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
239
|
+
*/
|
|
240
|
+
public_url?: string; // url
|
|
241
|
+
}
|
|
242
|
+
}
|
|
188
243
|
}
|
|
189
|
-
|
|
190
|
-
|
|
244
|
+
namespace UploadFilePublic {
|
|
245
|
+
export type RequestBody = Components.Schemas.UploadFilePayload;
|
|
246
|
+
namespace Responses {
|
|
247
|
+
export interface $201 {
|
|
248
|
+
/**
|
|
249
|
+
* example:
|
|
250
|
+
* {
|
|
251
|
+
* "bucket": "epilot-files-prod",
|
|
252
|
+
* "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
253
|
+
* }
|
|
254
|
+
*/
|
|
255
|
+
s3ref?: {
|
|
256
|
+
/**
|
|
257
|
+
* example:
|
|
258
|
+
* epilot-files-prod
|
|
259
|
+
*/
|
|
260
|
+
bucket: string;
|
|
261
|
+
/**
|
|
262
|
+
* example:
|
|
263
|
+
* 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
264
|
+
*/
|
|
265
|
+
key: string;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* example:
|
|
269
|
+
* https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
|
|
270
|
+
*/
|
|
271
|
+
upload_url?: string; // url
|
|
272
|
+
}
|
|
273
|
+
}
|
|
191
274
|
}
|
|
192
|
-
export type RequestBody = Components.Schemas.UploadFilePayload;
|
|
193
|
-
namespace Responses {
|
|
194
|
-
export interface $201 {
|
|
195
|
-
/**
|
|
196
|
-
* example:
|
|
197
|
-
* {
|
|
198
|
-
* "bucket": "epilot-files-prod",
|
|
199
|
-
* "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
200
|
-
* }
|
|
201
|
-
*/
|
|
202
|
-
s3ref?: {
|
|
203
|
-
/**
|
|
204
|
-
* example:
|
|
205
|
-
* epilot-files-prod
|
|
206
|
-
*/
|
|
207
|
-
bucket: string;
|
|
208
|
-
/**
|
|
209
|
-
* example:
|
|
210
|
-
* 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
211
|
-
*/
|
|
212
|
-
key: string;
|
|
213
|
-
};
|
|
214
|
-
/**
|
|
215
|
-
* example:
|
|
216
|
-
* https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
|
|
217
|
-
*/
|
|
218
|
-
upload_url?: string; // url
|
|
219
|
-
/**
|
|
220
|
-
* Returned only if file is permanent i.e. file_entity_id is passed
|
|
221
|
-
* example:
|
|
222
|
-
* https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
223
|
-
*/
|
|
224
|
-
public_url?: string; // url
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
namespace UploadFilePublic {
|
|
229
|
-
export type RequestBody = Components.Schemas.UploadFilePayload;
|
|
230
|
-
namespace Responses {
|
|
231
|
-
export interface $201 {
|
|
232
|
-
/**
|
|
233
|
-
* example:
|
|
234
|
-
* {
|
|
235
|
-
* "bucket": "epilot-files-prod",
|
|
236
|
-
* "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
237
|
-
* }
|
|
238
|
-
*/
|
|
239
|
-
s3ref?: {
|
|
240
|
-
/**
|
|
241
|
-
* example:
|
|
242
|
-
* epilot-files-prod
|
|
243
|
-
*/
|
|
244
|
-
bucket: string;
|
|
245
|
-
/**
|
|
246
|
-
* example:
|
|
247
|
-
* 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
|
|
248
|
-
*/
|
|
249
|
-
key: string;
|
|
250
|
-
};
|
|
251
|
-
/**
|
|
252
|
-
* example:
|
|
253
|
-
* https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
|
|
254
|
-
*/
|
|
255
|
-
upload_url?: string; // url
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
275
|
}
|
|
260
276
|
|
|
261
277
|
export interface OperationMethods {
|
|
@@ -339,7 +355,7 @@ export interface OperationMethods {
|
|
|
339
355
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
340
356
|
data?: Paths.DeleteFile.RequestBody,
|
|
341
357
|
config?: AxiosRequestConfig
|
|
342
|
-
): OperationResponse<
|
|
358
|
+
): OperationResponse<Paths.DeleteFile.Responses.$200>
|
|
343
359
|
}
|
|
344
360
|
|
|
345
361
|
export interface PathsDictionary {
|
|
@@ -436,7 +452,7 @@ export interface PathsDictionary {
|
|
|
436
452
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
437
453
|
data?: Paths.DeleteFile.RequestBody,
|
|
438
454
|
config?: AxiosRequestConfig
|
|
439
|
-
): OperationResponse<
|
|
455
|
+
): OperationResponse<Paths.DeleteFile.Responses.$200>
|
|
440
456
|
}
|
|
441
457
|
}
|
|
442
458
|
|