@epilot/file-client 1.3.0 → 1.3.3

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/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,271 +8,291 @@ import {
8
8
  } from 'openapi-client-axios';
9
9
 
10
10
  declare namespace Components {
11
- namespace Schemas {
12
- export interface DeleteFilePayload {
13
- s3ref: S3Reference;
14
- }
15
- export interface FileEntity {
16
- _id?: FileEntityId;
17
- /**
18
- * example:
19
- * document.pdf
20
- */
21
- filename?: string;
22
- access_control?: "private" | "public-read";
23
- /**
24
- * Direct URL for file (public only if file access control is public-read)
25
- * example:
26
- * https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
27
- */
28
- public_url?: string; // url
29
- /**
30
- * Human readable type for file
31
- */
32
- type?: "document" | "document_template" | "text" | "image" | "video" | "audio" | "spreadsheet" | "presentation" | "font" | "archive" | "application" | "unknown";
33
- /**
34
- * MIME type of the file
35
- * example:
36
- * application/pdf
37
- */
38
- mime_type?: string;
39
- /**
40
- * File size in bytes
41
- */
42
- size_bytes?: number;
43
- versions?: {
44
- s3ref?: S3Reference;
45
- }[];
46
- }
47
- /**
48
- * example:
49
- * ef7d985c-2385-44f4-9c71-ae06a52264f8
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 Version = number;
130
- }
131
- export interface PathParameters {
132
- id: Parameters.Id;
133
- }
134
- export interface QueryParameters {
135
- version?: Parameters.Version;
136
- attachment?: Parameters.Attachment;
137
- }
138
- namespace Responses {
139
- export interface $200 {
140
- /**
141
- * example:
142
- * https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
143
- */
144
- download_url?: string; // uri
145
- }
146
- }
147
- }
148
- namespace DownloadS3File {
149
- namespace Parameters {
150
- export type Attachment = boolean;
151
- export type S3Bucket = string;
152
- export type S3Key = string;
153
- }
154
- export interface QueryParameters {
155
- s3_key: Parameters.S3Key;
156
- s3_bucket: Parameters.S3Bucket;
157
- attachment?: Parameters.Attachment;
158
- }
159
- namespace Responses {
160
- 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
+ }
161
51
  /**
162
52
  * example:
163
- * https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
53
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
164
54
  */
165
- download_url?: string; // uri
166
- }
167
- }
168
- }
169
- namespace PreviewFile {
170
- namespace Parameters {
171
- export type H = number;
172
- export type Id = Components.Schemas.FileEntityId;
173
- export type Version = number;
174
- export type W = number;
175
- }
176
- export interface PathParameters {
177
- id: Parameters.Id;
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
+ }
178
123
  }
179
- export interface QueryParameters {
180
- version?: Parameters.Version;
181
- w?: Parameters.W;
182
- h?: Parameters.H;
124
+ }
125
+ declare namespace Paths {
126
+ namespace DeleteFile {
127
+ export type RequestBody = Components.Schemas.DeleteFilePayload;
128
+ namespace Responses {
129
+ export interface $200 {
130
+ }
131
+ }
183
132
  }
184
- }
185
- namespace PreviewS3File {
186
- namespace Parameters {
187
- export type H = number;
188
- export type W = number;
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
+ }
189
159
  }
190
- export interface QueryParameters {
191
- w?: Parameters.W;
192
- h?: Parameters.H;
160
+ namespace DownloadS3File {
161
+ namespace Parameters {
162
+ export type Attachment = boolean;
163
+ export type S3Bucket = string;
164
+ export type S3Key = string;
165
+ }
166
+ export interface QueryParameters {
167
+ s3_key: Parameters.S3Key;
168
+ s3_bucket: Parameters.S3Bucket;
169
+ attachment?: Parameters.Attachment;
170
+ }
171
+ namespace Responses {
172
+ export interface $200 {
173
+ /**
174
+ * example:
175
+ * https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
176
+ */
177
+ download_url?: string; // uri
178
+ }
179
+ }
193
180
  }
194
- export type RequestBody = Components.Schemas.S3Reference;
195
- }
196
- namespace SaveFile {
197
- export type RequestBody = Components.Schemas.SaveFilePayload;
198
- namespace Responses {
199
- export type $201 = Components.Schemas.FileEntity;
181
+ namespace PreviewFile {
182
+ namespace Parameters {
183
+ export type H = number;
184
+ export type Id = /**
185
+ * example:
186
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
187
+ */
188
+ Components.Schemas.FileEntityId;
189
+ export type Version = number;
190
+ export type W = number;
191
+ }
192
+ export interface PathParameters {
193
+ id: Parameters.Id;
194
+ }
195
+ export interface QueryParameters {
196
+ version?: Parameters.Version;
197
+ w?: Parameters.W;
198
+ h?: Parameters.H;
199
+ }
200
200
  }
201
- }
202
- namespace UploadFile {
203
- namespace Parameters {
204
- export type FileEntityId = Components.Schemas.FileEntityId;
201
+ namespace PreviewS3File {
202
+ namespace Parameters {
203
+ export type H = number;
204
+ export type W = number;
205
+ }
206
+ export interface QueryParameters {
207
+ w?: Parameters.W;
208
+ h?: Parameters.H;
209
+ }
210
+ export type RequestBody = Components.Schemas.S3Reference;
205
211
  }
206
- export interface QueryParameters {
207
- file_entity_id?: Parameters.FileEntityId;
212
+ namespace SaveFile {
213
+ export type RequestBody = Components.Schemas.SaveFilePayload;
214
+ namespace Responses {
215
+ export type $201 = Components.Schemas.FileEntity;
216
+ }
208
217
  }
209
- export type RequestBody = Components.Schemas.UploadFilePayload;
210
- namespace Responses {
211
- export interface $201 {
212
- /**
213
- * example:
214
- * {
215
- * "bucket": "epilot-files-prod",
216
- * "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
217
- * }
218
- */
219
- s3ref?: {
220
- /**
221
- * example:
222
- * epilot-files-prod
223
- */
224
- bucket: string;
225
- /**
226
- * example:
227
- * 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
228
- */
229
- key: string;
230
- };
231
- /**
232
- * example:
233
- * https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
234
- */
235
- upload_url?: string; // url
236
- /**
237
- * Returned only if file is permanent i.e. file_entity_id is passed
238
- * example:
239
- * https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
240
- */
241
- public_url?: string; // url
242
- }
218
+ namespace UploadFile {
219
+ namespace Parameters {
220
+ export type FileEntityId = /**
221
+ * example:
222
+ * ef7d985c-2385-44f4-9c71-ae06a52264f8
223
+ */
224
+ Components.Schemas.FileEntityId;
225
+ }
226
+ export interface QueryParameters {
227
+ file_entity_id?: Parameters.FileEntityId;
228
+ }
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
+ * Returned only if file is permanent i.e. file_entity_id is passed
258
+ * example:
259
+ * https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
260
+ */
261
+ public_url?: string; // url
262
+ }
263
+ }
243
264
  }
244
- }
245
- namespace UploadFilePublic {
246
- export type RequestBody = Components.Schemas.UploadFilePayload;
247
- namespace Responses {
248
- export interface $201 {
249
- /**
250
- * example:
251
- * {
252
- * "bucket": "epilot-files-prod",
253
- * "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
254
- * }
255
- */
256
- s3ref?: {
257
- /**
258
- * example:
259
- * epilot-files-prod
260
- */
261
- bucket: string;
262
- /**
263
- * example:
264
- * 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
265
- */
266
- key: string;
267
- };
268
- /**
269
- * example:
270
- * https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
271
- */
272
- upload_url?: string; // url
273
- }
265
+ namespace UploadFilePublic {
266
+ export type RequestBody = Components.Schemas.UploadFilePayload;
267
+ namespace Responses {
268
+ export interface $201 {
269
+ /**
270
+ * example:
271
+ * {
272
+ * "bucket": "epilot-files-prod",
273
+ * "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
274
+ * }
275
+ */
276
+ s3ref?: {
277
+ /**
278
+ * example:
279
+ * epilot-files-prod
280
+ */
281
+ bucket: string;
282
+ /**
283
+ * example:
284
+ * 123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf
285
+ */
286
+ key: string;
287
+ };
288
+ /**
289
+ * example:
290
+ * https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123
291
+ */
292
+ upload_url?: string; // url
293
+ }
294
+ }
274
295
  }
275
- }
276
296
  }
277
297
 
278
298
  export interface OperationMethods {
@@ -366,7 +386,7 @@ export interface OperationMethods {
366
386
  parameters?: Parameters<UnknownParamsObject> | null,
367
387
  data?: Paths.DeleteFile.RequestBody,
368
388
  config?: AxiosRequestConfig
369
- ): OperationResponse<any>
389
+ ): OperationResponse<Paths.DeleteFile.Responses.$200>
370
390
  }
371
391
 
372
392
  export interface PathsDictionary {
@@ -475,7 +495,7 @@ export interface PathsDictionary {
475
495
  parameters?: Parameters<UnknownParamsObject> | null,
476
496
  data?: Paths.DeleteFile.RequestBody,
477
497
  config?: AxiosRequestConfig
478
- ): OperationResponse<any>
498
+ ): OperationResponse<Paths.DeleteFile.Responses.$200>
479
499
  }
480
500
  }
481
501