@epilot/file-client 1.13.0 → 1.14.0-rc1
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 +1 -1
- package/dist/client.d.ts +0 -0
- package/dist/client.js +0 -0
- package/dist/definition.d.ts +0 -0
- package/dist/definition.js +1 -1
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -1
- package/dist/openapi-runtime.json +192 -87
- package/dist/openapi.d.ts +668 -287
- package/dist/openapi.json +834 -574
- package/package.json +8 -6
- package/LICENSE +0 -21
package/dist/openapi.json
CHANGED
|
@@ -2,17 +2,52 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "File API",
|
|
5
|
-
"version": "0.
|
|
6
|
-
"description": "Upload and manage
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"description": "Upload and manage epilot Files"
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
9
9
|
{
|
|
10
|
-
"name": "
|
|
11
|
-
"description": "
|
|
10
|
+
"name": "File",
|
|
11
|
+
"description": "Upload and Manage File Entities"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
"name": "
|
|
14
|
+
"name": "Preview",
|
|
15
|
+
"description": "Preview APIs"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Public Links",
|
|
19
|
+
"description": "Create and Manage Public Links for Files"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Session",
|
|
15
23
|
"description": "Session API for cookie authentication"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "Deprecated",
|
|
27
|
+
"description": "Deprecated APIs"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "file_schema",
|
|
31
|
+
"x-displayName": "File",
|
|
32
|
+
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/FileEntity\" />\n"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"x-tagGroups": [
|
|
36
|
+
{
|
|
37
|
+
"name": "APIs",
|
|
38
|
+
"tags": [
|
|
39
|
+
"File",
|
|
40
|
+
"Preview",
|
|
41
|
+
"Public Links",
|
|
42
|
+
"Session",
|
|
43
|
+
"Deprecated"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "Schemas",
|
|
48
|
+
"tags": [
|
|
49
|
+
"file_schema"
|
|
50
|
+
]
|
|
16
51
|
}
|
|
17
52
|
],
|
|
18
53
|
"security": [
|
|
@@ -24,20 +59,45 @@
|
|
|
24
59
|
}
|
|
25
60
|
],
|
|
26
61
|
"paths": {
|
|
27
|
-
"/
|
|
62
|
+
"/v2/files/upload": {
|
|
28
63
|
"post": {
|
|
29
|
-
"operationId": "
|
|
30
|
-
"summary": "
|
|
31
|
-
"
|
|
32
|
-
"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",
|
|
64
|
+
"operationId": "uploadFileV2",
|
|
65
|
+
"summary": "uploadFileV2",
|
|
66
|
+
"description": "Create pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFileV2 operation to store file file permanently.\n",
|
|
33
67
|
"tags": [
|
|
34
|
-
"
|
|
68
|
+
"File"
|
|
69
|
+
],
|
|
70
|
+
"parameters": [
|
|
71
|
+
{
|
|
72
|
+
"name": "file_entity_id",
|
|
73
|
+
"in": "query",
|
|
74
|
+
"description": "Use this parameter when uploading a file directly to an existing file entity.\n\nNote: still requires calling saveFileV2 to save the file permanently.\n",
|
|
75
|
+
"schema": {
|
|
76
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
35
79
|
],
|
|
36
80
|
"requestBody": {
|
|
37
81
|
"content": {
|
|
38
82
|
"application/json": {
|
|
39
83
|
"schema": {
|
|
40
84
|
"$ref": "#/components/schemas/UploadFilePayload"
|
|
85
|
+
},
|
|
86
|
+
"examples": {
|
|
87
|
+
"Upload an image file": {
|
|
88
|
+
"description": "Upload an image file",
|
|
89
|
+
"value": {
|
|
90
|
+
"filename": "image.png",
|
|
91
|
+
"mime_type": "image/png"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"Upload a document": {
|
|
95
|
+
"description": "Upload an image file",
|
|
96
|
+
"value": {
|
|
97
|
+
"filename": "document.pdf",
|
|
98
|
+
"mime_type": "application/pdf"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
41
101
|
}
|
|
42
102
|
}
|
|
43
103
|
}
|
|
@@ -48,27 +108,110 @@
|
|
|
48
108
|
"content": {
|
|
49
109
|
"application/json": {
|
|
50
110
|
"schema": {
|
|
51
|
-
"
|
|
52
|
-
|
|
111
|
+
"$ref": "#/components/schemas/FileUpload"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"/v2/files": {
|
|
120
|
+
"post": {
|
|
121
|
+
"operationId": "saveFileV2",
|
|
122
|
+
"summary": "saveFileV2",
|
|
123
|
+
"description": "Saves a permanent file entity. Updates an existing file entity when `_id` is passed.\n\nSaves metadata to file entity and stores a version when `s3ref` or `source_url` is passed.\n",
|
|
124
|
+
"tags": [
|
|
125
|
+
"File"
|
|
126
|
+
],
|
|
127
|
+
"parameters": [
|
|
128
|
+
{
|
|
129
|
+
"$ref": "#/components/parameters/ActivityIdQueryParam"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"$ref": "#/components/parameters/FillActivityQueryParam"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"$ref": "#/components/parameters/StrictQueryParam"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"$ref": "#/components/parameters/AsyncOperationQueryParam"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"requestBody": {
|
|
142
|
+
"content": {
|
|
143
|
+
"application/json": {
|
|
144
|
+
"schema": {
|
|
145
|
+
"$ref": "#/components/schemas/SaveFilePayloadV2"
|
|
146
|
+
},
|
|
147
|
+
"examples": {
|
|
148
|
+
"New file from s3ref": {
|
|
149
|
+
"description": "Standard epilot file entity with S3 Ref",
|
|
150
|
+
"value": {
|
|
151
|
+
"type": "document",
|
|
152
|
+
"filename": "document.pdf",
|
|
153
|
+
"_tags": [
|
|
154
|
+
"string"
|
|
155
|
+
],
|
|
156
|
+
"access_control": "private",
|
|
53
157
|
"s3ref": {
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
"$ref": "#/components/schemas/S3Reference"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"example": {
|
|
60
|
-
"bucket": "epilot-files-prod",
|
|
61
|
-
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
"upload_url": {
|
|
67
|
-
"type": "string",
|
|
68
|
-
"format": "url",
|
|
69
|
-
"example": "https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
158
|
+
"bucket": "epilot-prod-user-content",
|
|
159
|
+
"key": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
70
160
|
}
|
|
71
161
|
}
|
|
162
|
+
},
|
|
163
|
+
"Update existing file with relations": {
|
|
164
|
+
"description": "Update existing file entity with _id",
|
|
165
|
+
"value": {
|
|
166
|
+
"_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
|
|
167
|
+
"filename": "document.pdf",
|
|
168
|
+
"access_control": "private",
|
|
169
|
+
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
170
|
+
"shared_with_end_customer": true,
|
|
171
|
+
"relations": [
|
|
172
|
+
{
|
|
173
|
+
"entity_id": "77a1e0cc-7b92-4d41-8cce-eefd317ec004",
|
|
174
|
+
"_schema": "contact"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"New file from source_url": {
|
|
180
|
+
"description": "New epilot file entity from a source_url",
|
|
181
|
+
"value": {
|
|
182
|
+
"type": "document",
|
|
183
|
+
"filename": "document.pdf",
|
|
184
|
+
"_tags": [
|
|
185
|
+
"string"
|
|
186
|
+
],
|
|
187
|
+
"access_control": "private",
|
|
188
|
+
"source_url": "https://docs.epilot.io/document.pdf"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"File with custom download URL (external)": {
|
|
192
|
+
"description": "Custom file entity with custom download url",
|
|
193
|
+
"value": {
|
|
194
|
+
"type": "document",
|
|
195
|
+
"filename": "document.pdf",
|
|
196
|
+
"_tags": [
|
|
197
|
+
"string"
|
|
198
|
+
],
|
|
199
|
+
"access_control": "private",
|
|
200
|
+
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
201
|
+
"shared_with_end_customer": true
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"responses": {
|
|
209
|
+
"200": {
|
|
210
|
+
"description": "Created File Entity",
|
|
211
|
+
"content": {
|
|
212
|
+
"application/json": {
|
|
213
|
+
"schema": {
|
|
214
|
+
"$ref": "#/components/schemas/FileEntity"
|
|
72
215
|
}
|
|
73
216
|
}
|
|
74
217
|
}
|
|
@@ -80,9 +223,10 @@
|
|
|
80
223
|
"post": {
|
|
81
224
|
"operationId": "uploadFile",
|
|
82
225
|
"summary": "uploadFile",
|
|
83
|
-
"
|
|
226
|
+
"deprecated": true,
|
|
227
|
+
"description": "Create pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFile operation to store file file permanently.\n",
|
|
84
228
|
"tags": [
|
|
85
|
-
"
|
|
229
|
+
"Deprecated"
|
|
86
230
|
],
|
|
87
231
|
"parameters": [
|
|
88
232
|
{
|
|
@@ -98,8 +242,7 @@
|
|
|
98
242
|
"content": {
|
|
99
243
|
"application/json": {
|
|
100
244
|
"schema": {
|
|
101
|
-
"$ref": "#/components/schemas/UploadFilePayload"
|
|
102
|
-
"type": "object"
|
|
245
|
+
"$ref": "#/components/schemas/UploadFilePayload"
|
|
103
246
|
}
|
|
104
247
|
}
|
|
105
248
|
}
|
|
@@ -115,11 +258,11 @@
|
|
|
115
258
|
"s3ref": {
|
|
116
259
|
"allOf": [
|
|
117
260
|
{
|
|
118
|
-
"$ref": "#/components/schemas/
|
|
261
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
119
262
|
},
|
|
120
263
|
{
|
|
121
264
|
"example": {
|
|
122
|
-
"bucket": "epilot-
|
|
265
|
+
"bucket": "epilot-prod-user-content",
|
|
123
266
|
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
124
267
|
}
|
|
125
268
|
}
|
|
@@ -128,13 +271,13 @@
|
|
|
128
271
|
"upload_url": {
|
|
129
272
|
"type": "string",
|
|
130
273
|
"format": "url",
|
|
131
|
-
"example": "https://epilot-
|
|
274
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
132
275
|
},
|
|
133
276
|
"public_url": {
|
|
134
277
|
"description": "Returned only if file is permanent i.e. file_entity_id is passed",
|
|
135
278
|
"type": "string",
|
|
136
279
|
"format": "url",
|
|
137
|
-
"example": "https://epilot-
|
|
280
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
138
281
|
}
|
|
139
282
|
}
|
|
140
283
|
}
|
|
@@ -148,67 +291,24 @@
|
|
|
148
291
|
"post": {
|
|
149
292
|
"operationId": "saveFile",
|
|
150
293
|
"summary": "saveFile",
|
|
294
|
+
"deprecated": true,
|
|
151
295
|
"description": "Create / Update a permanent File entity\n\nMakes file object permanent\n\nSaves metadata to file entity\n",
|
|
152
296
|
"tags": [
|
|
153
|
-
"
|
|
297
|
+
"Deprecated"
|
|
298
|
+
],
|
|
299
|
+
"parameters": [
|
|
300
|
+
{
|
|
301
|
+
"$ref": "#/components/parameters/ActivityIdQueryParam"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"$ref": "#/components/parameters/AsyncOperationQueryParam"
|
|
305
|
+
}
|
|
154
306
|
],
|
|
155
307
|
"requestBody": {
|
|
156
308
|
"content": {
|
|
157
309
|
"application/json": {
|
|
158
310
|
"schema": {
|
|
159
311
|
"$ref": "#/components/schemas/SaveFilePayload"
|
|
160
|
-
},
|
|
161
|
-
"examples": {
|
|
162
|
-
"S3File": {
|
|
163
|
-
"description": "Standard epilot file entity with S3 Ref",
|
|
164
|
-
"value": {
|
|
165
|
-
"file_entity_id": "string",
|
|
166
|
-
"document_type": "document",
|
|
167
|
-
"filename": "document.pdf",
|
|
168
|
-
"_tags": [
|
|
169
|
-
"string"
|
|
170
|
-
],
|
|
171
|
-
"access_control": "private",
|
|
172
|
-
"s3ref": {
|
|
173
|
-
"bucket": "epilot-files-prod",
|
|
174
|
-
"key": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
"CustomFile": {
|
|
179
|
-
"description": "Custom file entity with custom download url",
|
|
180
|
-
"value": {
|
|
181
|
-
"file_entity_id": "string",
|
|
182
|
-
"document_type": "document",
|
|
183
|
-
"filename": "document.pdf",
|
|
184
|
-
"_tags": [
|
|
185
|
-
"string"
|
|
186
|
-
],
|
|
187
|
-
"access_control": "private",
|
|
188
|
-
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
189
|
-
"shared_with_end_customer": true
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
"CustomFileWithRelations": {
|
|
193
|
-
"description": "Custom file entity with custom download url",
|
|
194
|
-
"value": {
|
|
195
|
-
"file_entity_id": "string",
|
|
196
|
-
"document_type": "document",
|
|
197
|
-
"filename": "document.pdf",
|
|
198
|
-
"_tags": [
|
|
199
|
-
"string"
|
|
200
|
-
],
|
|
201
|
-
"access_control": "private",
|
|
202
|
-
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
203
|
-
"shared_with_end_customer": true,
|
|
204
|
-
"relations": [
|
|
205
|
-
{
|
|
206
|
-
"entity_id": "77a1e0cc-7b92-4d41-8cce-eefd317ec004",
|
|
207
|
-
"_schema": "contact"
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
312
|
}
|
|
213
313
|
}
|
|
214
314
|
}
|
|
@@ -227,13 +327,13 @@
|
|
|
227
327
|
}
|
|
228
328
|
}
|
|
229
329
|
},
|
|
230
|
-
"/
|
|
330
|
+
"/v2/files/{id}": {
|
|
231
331
|
"get": {
|
|
232
|
-
"operationId": "
|
|
233
|
-
"summary": "
|
|
234
|
-
"description": "
|
|
332
|
+
"operationId": "getFile",
|
|
333
|
+
"summary": "getFile",
|
|
334
|
+
"description": "Get a file entity by id",
|
|
235
335
|
"tags": [
|
|
236
|
-
"
|
|
336
|
+
"File"
|
|
237
337
|
],
|
|
238
338
|
"parameters": [
|
|
239
339
|
{
|
|
@@ -245,74 +345,72 @@
|
|
|
245
345
|
}
|
|
246
346
|
},
|
|
247
347
|
{
|
|
248
|
-
"name": "
|
|
348
|
+
"name": "source_url",
|
|
249
349
|
"in": "query",
|
|
250
|
-
"description": "index of file version",
|
|
251
350
|
"schema": {
|
|
252
|
-
"type": "
|
|
253
|
-
"default":
|
|
351
|
+
"type": "boolean",
|
|
352
|
+
"default": false,
|
|
353
|
+
"description": "Generate a source_url for the file entity, if it doesn't have one"
|
|
254
354
|
}
|
|
255
355
|
},
|
|
256
356
|
{
|
|
257
|
-
"
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
"
|
|
261
|
-
"type": "boolean",
|
|
262
|
-
"default": true
|
|
263
|
-
}
|
|
357
|
+
"$ref": "#/components/parameters/StrictQueryParam"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"$ref": "#/components/parameters/AsyncOperationQueryParam"
|
|
264
361
|
}
|
|
265
362
|
],
|
|
266
363
|
"responses": {
|
|
267
364
|
"200": {
|
|
268
|
-
"description": "
|
|
365
|
+
"description": "File Entity",
|
|
269
366
|
"content": {
|
|
270
367
|
"application/json": {
|
|
271
368
|
"schema": {
|
|
272
|
-
"
|
|
273
|
-
"properties": {
|
|
274
|
-
"download_url": {
|
|
275
|
-
"type": "string",
|
|
276
|
-
"format": "uri",
|
|
277
|
-
"example": "https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
278
|
-
}
|
|
279
|
-
}
|
|
369
|
+
"$ref": "#/components/schemas/FileEntity"
|
|
280
370
|
}
|
|
281
371
|
}
|
|
282
372
|
}
|
|
283
373
|
}
|
|
284
374
|
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
"
|
|
290
|
-
"summary": "verifyCustomDownloadUrl",
|
|
291
|
-
"description": "Verify a pre-signed custom download url for a file",
|
|
375
|
+
},
|
|
376
|
+
"delete": {
|
|
377
|
+
"operationId": "deleteFile",
|
|
378
|
+
"summary": "deleteFile",
|
|
379
|
+
"description": "Delete a file entity by id",
|
|
292
380
|
"tags": [
|
|
293
|
-
"
|
|
381
|
+
"File"
|
|
294
382
|
],
|
|
295
|
-
"
|
|
296
|
-
|
|
297
|
-
"
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
383
|
+
"parameters": [
|
|
384
|
+
{
|
|
385
|
+
"name": "id",
|
|
386
|
+
"in": "path",
|
|
387
|
+
"required": true,
|
|
388
|
+
"schema": {
|
|
389
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "purge",
|
|
394
|
+
"in": "query",
|
|
395
|
+
"schema": {
|
|
396
|
+
"type": "boolean",
|
|
397
|
+
"default": false
|
|
301
398
|
}
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"$ref": "#/components/parameters/ActivityIdQueryParam"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"$ref": "#/components/parameters/StrictQueryParam"
|
|
302
405
|
}
|
|
303
|
-
|
|
406
|
+
],
|
|
304
407
|
"responses": {
|
|
305
408
|
"200": {
|
|
306
|
-
"description": "
|
|
409
|
+
"description": "The deleted file",
|
|
307
410
|
"content": {
|
|
308
411
|
"application/json": {
|
|
309
412
|
"schema": {
|
|
310
|
-
"
|
|
311
|
-
"properties": {
|
|
312
|
-
"valid": {
|
|
313
|
-
"type": "boolean"
|
|
314
|
-
}
|
|
315
|
-
}
|
|
413
|
+
"$ref": "#/components/schemas/FileEntity"
|
|
316
414
|
}
|
|
317
415
|
}
|
|
318
416
|
}
|
|
@@ -320,42 +418,54 @@
|
|
|
320
418
|
}
|
|
321
419
|
}
|
|
322
420
|
},
|
|
323
|
-
"/v1/files
|
|
324
|
-
"
|
|
325
|
-
"operationId": "
|
|
326
|
-
"summary": "
|
|
327
|
-
"description": "Generate pre-signed download S3
|
|
421
|
+
"/v1/files/{id}/download": {
|
|
422
|
+
"get": {
|
|
423
|
+
"operationId": "downloadFile",
|
|
424
|
+
"summary": "downloadFile",
|
|
425
|
+
"description": "Generate pre-signed download S3 url for a file",
|
|
328
426
|
"tags": [
|
|
329
|
-
"
|
|
427
|
+
"File"
|
|
330
428
|
],
|
|
331
|
-
"
|
|
332
|
-
|
|
333
|
-
"
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
429
|
+
"parameters": [
|
|
430
|
+
{
|
|
431
|
+
"name": "id",
|
|
432
|
+
"in": "path",
|
|
433
|
+
"required": true,
|
|
434
|
+
"schema": {
|
|
435
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "version",
|
|
440
|
+
"in": "query",
|
|
441
|
+
"description": "index of file version",
|
|
442
|
+
"schema": {
|
|
443
|
+
"type": "integer",
|
|
444
|
+
"default": 0
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "attachment",
|
|
449
|
+
"in": "query",
|
|
450
|
+
"description": "Controls the Content-Disposition header to control browser behaviour. Set to true to trigger download.",
|
|
451
|
+
"schema": {
|
|
452
|
+
"type": "boolean",
|
|
453
|
+
"default": true
|
|
337
454
|
}
|
|
338
455
|
}
|
|
339
|
-
|
|
456
|
+
],
|
|
340
457
|
"responses": {
|
|
341
458
|
"200": {
|
|
342
|
-
"description": "Generated
|
|
459
|
+
"description": "Generated thumbnail image",
|
|
343
460
|
"content": {
|
|
344
461
|
"application/json": {
|
|
345
462
|
"schema": {
|
|
346
|
-
"type": "
|
|
347
|
-
"
|
|
348
|
-
"
|
|
349
|
-
|
|
350
|
-
"
|
|
351
|
-
|
|
352
|
-
"format": "uri",
|
|
353
|
-
"example": "https://epilot-files-prod.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
354
|
-
},
|
|
355
|
-
"file_entity_id": {
|
|
356
|
-
"type": "string",
|
|
357
|
-
"format": "uuid"
|
|
358
|
-
}
|
|
463
|
+
"type": "object",
|
|
464
|
+
"properties": {
|
|
465
|
+
"download_url": {
|
|
466
|
+
"type": "string",
|
|
467
|
+
"format": "uri",
|
|
468
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
359
469
|
}
|
|
360
470
|
}
|
|
361
471
|
}
|
|
@@ -371,7 +481,7 @@
|
|
|
371
481
|
"summary": "downloadS3File",
|
|
372
482
|
"description": "Generate pre-signed download S3 url for a file",
|
|
373
483
|
"tags": [
|
|
374
|
-
"
|
|
484
|
+
"File"
|
|
375
485
|
],
|
|
376
486
|
"parameters": [
|
|
377
487
|
{
|
|
@@ -411,7 +521,52 @@
|
|
|
411
521
|
"download_url": {
|
|
412
522
|
"type": "string",
|
|
413
523
|
"format": "uri",
|
|
414
|
-
"example": "https://epilot-
|
|
524
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"/v1/files:downloadFiles": {
|
|
535
|
+
"post": {
|
|
536
|
+
"operationId": "downloadFiles",
|
|
537
|
+
"summary": "downloadFiles",
|
|
538
|
+
"description": "Bulk generate pre-signed download S3 urls for multiple files",
|
|
539
|
+
"tags": [
|
|
540
|
+
"File"
|
|
541
|
+
],
|
|
542
|
+
"requestBody": {
|
|
543
|
+
"content": {
|
|
544
|
+
"application/json": {
|
|
545
|
+
"schema": {
|
|
546
|
+
"$ref": "#/components/schemas/DownloadFilesPayload"
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"responses": {
|
|
552
|
+
"200": {
|
|
553
|
+
"description": "Generated download urls",
|
|
554
|
+
"content": {
|
|
555
|
+
"application/json": {
|
|
556
|
+
"schema": {
|
|
557
|
+
"type": "array",
|
|
558
|
+
"items": {
|
|
559
|
+
"type": "object",
|
|
560
|
+
"properties": {
|
|
561
|
+
"download_url": {
|
|
562
|
+
"type": "string",
|
|
563
|
+
"format": "uri",
|
|
564
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
565
|
+
},
|
|
566
|
+
"file_entity_id": {
|
|
567
|
+
"type": "string",
|
|
568
|
+
"format": "uuid"
|
|
569
|
+
}
|
|
415
570
|
}
|
|
416
571
|
}
|
|
417
572
|
}
|
|
@@ -427,7 +582,7 @@
|
|
|
427
582
|
"summary": "previewFile",
|
|
428
583
|
"description": "Generate thumbnail preview for a file entity",
|
|
429
584
|
"tags": [
|
|
430
|
-
"
|
|
585
|
+
"Preview"
|
|
431
586
|
],
|
|
432
587
|
"parameters": [
|
|
433
588
|
{
|
|
@@ -475,33 +630,15 @@
|
|
|
475
630
|
}
|
|
476
631
|
}
|
|
477
632
|
},
|
|
478
|
-
"/v1/files
|
|
479
|
-
"
|
|
480
|
-
"operationId": "
|
|
481
|
-
"summary": "
|
|
482
|
-
"description": "Generate thumbnail preview for a
|
|
483
|
-
"security": [],
|
|
633
|
+
"/v1/files:previewS3": {
|
|
634
|
+
"post": {
|
|
635
|
+
"operationId": "previewS3File",
|
|
636
|
+
"summary": "previewS3File",
|
|
637
|
+
"description": "Generate thumbnail preview from an s3 reference for a file entity",
|
|
484
638
|
"tags": [
|
|
485
|
-
"
|
|
639
|
+
"Preview"
|
|
486
640
|
],
|
|
487
641
|
"parameters": [
|
|
488
|
-
{
|
|
489
|
-
"name": "id",
|
|
490
|
-
"in": "path",
|
|
491
|
-
"required": true,
|
|
492
|
-
"schema": {
|
|
493
|
-
"$ref": "#/components/schemas/FileEntityId"
|
|
494
|
-
}
|
|
495
|
-
},
|
|
496
|
-
{
|
|
497
|
-
"name": "version",
|
|
498
|
-
"in": "query",
|
|
499
|
-
"description": "index of file version",
|
|
500
|
-
"schema": {
|
|
501
|
-
"type": "integer",
|
|
502
|
-
"default": 0
|
|
503
|
-
}
|
|
504
|
-
},
|
|
505
642
|
{
|
|
506
643
|
"name": "w",
|
|
507
644
|
"in": "query",
|
|
@@ -517,34 +654,33 @@
|
|
|
517
654
|
"schema": {
|
|
518
655
|
"type": "integer"
|
|
519
656
|
}
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
"name": "org_id",
|
|
523
|
-
"in": "query",
|
|
524
|
-
"description": "Org id",
|
|
525
|
-
"schema": {
|
|
526
|
-
"type": "string"
|
|
527
|
-
}
|
|
528
657
|
}
|
|
529
658
|
],
|
|
659
|
+
"requestBody": {
|
|
660
|
+
"content": {
|
|
661
|
+
"application/json": {
|
|
662
|
+
"schema": {
|
|
663
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
},
|
|
530
668
|
"responses": {
|
|
531
669
|
"200": {
|
|
532
|
-
"description": "Generated thumbnail image
|
|
670
|
+
"description": "Generated thumbnail image",
|
|
533
671
|
"content": {
|
|
534
672
|
"image/png": {},
|
|
535
673
|
"image/jpeg": {}
|
|
536
674
|
}
|
|
537
675
|
}
|
|
538
676
|
}
|
|
539
|
-
}
|
|
540
|
-
},
|
|
541
|
-
"/v1/files:previewS3": {
|
|
677
|
+
},
|
|
542
678
|
"get": {
|
|
543
679
|
"operationId": "previewS3FileGet",
|
|
544
680
|
"summary": "previewS3FileGet",
|
|
545
681
|
"description": "Get thumbnail preview from an s3 reference for a file entity",
|
|
546
682
|
"tags": [
|
|
547
|
-
"
|
|
683
|
+
"Preview"
|
|
548
684
|
],
|
|
549
685
|
"parameters": [
|
|
550
686
|
{
|
|
@@ -591,15 +727,35 @@
|
|
|
591
727
|
}
|
|
592
728
|
}
|
|
593
729
|
}
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
"
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
"/v1/files/public/{id}/preview": {
|
|
733
|
+
"get": {
|
|
734
|
+
"operationId": "previewPublicFile",
|
|
735
|
+
"summary": "previewPublicFile",
|
|
736
|
+
"description": "Generate thumbnail preview for a public file entity",
|
|
737
|
+
"security": [],
|
|
599
738
|
"tags": [
|
|
600
|
-
"
|
|
739
|
+
"Preview"
|
|
601
740
|
],
|
|
602
741
|
"parameters": [
|
|
742
|
+
{
|
|
743
|
+
"name": "id",
|
|
744
|
+
"in": "path",
|
|
745
|
+
"required": true,
|
|
746
|
+
"schema": {
|
|
747
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"name": "version",
|
|
752
|
+
"in": "query",
|
|
753
|
+
"description": "index of file version",
|
|
754
|
+
"schema": {
|
|
755
|
+
"type": "integer",
|
|
756
|
+
"default": 0
|
|
757
|
+
}
|
|
758
|
+
},
|
|
603
759
|
{
|
|
604
760
|
"name": "w",
|
|
605
761
|
"in": "query",
|
|
@@ -615,20 +771,19 @@
|
|
|
615
771
|
"schema": {
|
|
616
772
|
"type": "integer"
|
|
617
773
|
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
"
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"name": "org_id",
|
|
777
|
+
"in": "query",
|
|
778
|
+
"description": "Org id",
|
|
779
|
+
"schema": {
|
|
780
|
+
"type": "string"
|
|
626
781
|
}
|
|
627
782
|
}
|
|
628
|
-
|
|
783
|
+
],
|
|
629
784
|
"responses": {
|
|
630
785
|
"200": {
|
|
631
|
-
"description": "Generated thumbnail image",
|
|
786
|
+
"description": "Generated thumbnail image for a public file",
|
|
632
787
|
"content": {
|
|
633
788
|
"image/png": {},
|
|
634
789
|
"image/jpeg": {}
|
|
@@ -637,37 +792,13 @@
|
|
|
637
792
|
}
|
|
638
793
|
}
|
|
639
794
|
},
|
|
640
|
-
"/v1/files/delete": {
|
|
641
|
-
"delete": {
|
|
642
|
-
"operationId": "deleteFile",
|
|
643
|
-
"summary": "deleteFile",
|
|
644
|
-
"description": "Delete file entity",
|
|
645
|
-
"tags": [
|
|
646
|
-
"files"
|
|
647
|
-
],
|
|
648
|
-
"requestBody": {
|
|
649
|
-
"content": {
|
|
650
|
-
"application/json": {
|
|
651
|
-
"schema": {
|
|
652
|
-
"$ref": "#/components/schemas/DeleteFilePayload"
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
},
|
|
657
|
-
"responses": {
|
|
658
|
-
"200": {
|
|
659
|
-
"description": "File delete response"
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
795
|
"/v1/files/session": {
|
|
665
796
|
"get": {
|
|
666
797
|
"operationId": "getSession",
|
|
667
798
|
"summary": "getSession",
|
|
668
799
|
"description": "Start a browser session by setting passed Authorization token in a server side cookie.\n\nAllows using preview urls directly in img src for private files using cookie authentication.\n",
|
|
669
800
|
"tags": [
|
|
670
|
-
"
|
|
801
|
+
"Session"
|
|
671
802
|
],
|
|
672
803
|
"responses": {
|
|
673
804
|
"200": {
|
|
@@ -680,7 +811,7 @@
|
|
|
680
811
|
"summary": "deleteSession",
|
|
681
812
|
"description": "End browser session by deleting token cookie",
|
|
682
813
|
"tags": [
|
|
683
|
-
"
|
|
814
|
+
"Session"
|
|
684
815
|
],
|
|
685
816
|
"responses": {
|
|
686
817
|
"200": {
|
|
@@ -693,9 +824,9 @@
|
|
|
693
824
|
"post": {
|
|
694
825
|
"operationId": "generatePublicLink",
|
|
695
826
|
"summary": "generatePublicLink",
|
|
696
|
-
"description": "Generates a public link to access
|
|
827
|
+
"description": "Generates a public link to access a private file\n",
|
|
697
828
|
"tags": [
|
|
698
|
-
"
|
|
829
|
+
"Public Links"
|
|
699
830
|
],
|
|
700
831
|
"parameters": [
|
|
701
832
|
{
|
|
@@ -722,9 +853,9 @@
|
|
|
722
853
|
}
|
|
723
854
|
},
|
|
724
855
|
"get": {
|
|
725
|
-
"operationId": "
|
|
726
|
-
"summary": "
|
|
727
|
-
"description": "Not yet implemented; This API would
|
|
856
|
+
"operationId": "listPublicLinksForFile",
|
|
857
|
+
"summary": "listPublicLinksForFile",
|
|
858
|
+
"description": "Not yet implemented; This API would fetch all the public links that are previously generated for a file",
|
|
728
859
|
"x-not-implemented": true,
|
|
729
860
|
"parameters": [
|
|
730
861
|
{
|
|
@@ -739,7 +870,7 @@
|
|
|
739
870
|
}
|
|
740
871
|
],
|
|
741
872
|
"tags": [
|
|
742
|
-
"
|
|
873
|
+
"Public Links"
|
|
743
874
|
],
|
|
744
875
|
"responses": {
|
|
745
876
|
"200": {
|
|
@@ -768,6 +899,9 @@
|
|
|
768
899
|
"operationId": "accessPublicLink",
|
|
769
900
|
"summary": "accessPublicLink",
|
|
770
901
|
"security": [],
|
|
902
|
+
"tags": [
|
|
903
|
+
"Public Links"
|
|
904
|
+
],
|
|
771
905
|
"description": "Redirects to a accessible signed url for the respective file associated to the public link",
|
|
772
906
|
"parameters": [
|
|
773
907
|
{
|
|
@@ -789,11 +923,17 @@
|
|
|
789
923
|
"description": "Name of the file",
|
|
790
924
|
"example": "invoice-2023-12.pdf"
|
|
791
925
|
}
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"name": "hash",
|
|
929
|
+
"in": "query",
|
|
930
|
+
"required": false,
|
|
931
|
+
"schema": {
|
|
932
|
+
"type": "string",
|
|
933
|
+
"description": "An optional cache-busting hash for the file"
|
|
934
|
+
}
|
|
792
935
|
}
|
|
793
936
|
],
|
|
794
|
-
"tags": [
|
|
795
|
-
"files"
|
|
796
|
-
],
|
|
797
937
|
"responses": {
|
|
798
938
|
"302": {
|
|
799
939
|
"description": "Redirect to signed URL where the caller can access the file"
|
|
@@ -805,8 +945,7 @@
|
|
|
805
945
|
"delete": {
|
|
806
946
|
"operationId": "revokePublicLink",
|
|
807
947
|
"summary": "revokePublicLink",
|
|
808
|
-
"
|
|
809
|
-
"description": "Not yet implemented; This operation would revokes a given public link by ID",
|
|
948
|
+
"description": "Not yet implemented; This operation would revoke a given public link by ID",
|
|
810
949
|
"x-not-implemented": true,
|
|
811
950
|
"parameters": [
|
|
812
951
|
{
|
|
@@ -821,7 +960,7 @@
|
|
|
821
960
|
}
|
|
822
961
|
],
|
|
823
962
|
"tags": [
|
|
824
|
-
"
|
|
963
|
+
"Public Links"
|
|
825
964
|
],
|
|
826
965
|
"responses": {
|
|
827
966
|
"204": {
|
|
@@ -838,111 +977,70 @@
|
|
|
838
977
|
}
|
|
839
978
|
}
|
|
840
979
|
},
|
|
841
|
-
"/
|
|
980
|
+
"/v1/files/download:verify": {
|
|
842
981
|
"post": {
|
|
843
|
-
"operationId": "
|
|
844
|
-
"summary": "
|
|
845
|
-
"description": "
|
|
982
|
+
"operationId": "verifyCustomDownloadUrl",
|
|
983
|
+
"summary": "verifyCustomDownloadUrl",
|
|
984
|
+
"description": "Verify a pre-signed custom download url for a file",
|
|
846
985
|
"tags": [
|
|
847
|
-
"
|
|
848
|
-
],
|
|
849
|
-
"parameters": [
|
|
850
|
-
{
|
|
851
|
-
"name": "file_entity_id",
|
|
852
|
-
"in": "query",
|
|
853
|
-
"description": "file entity id",
|
|
854
|
-
"schema": {
|
|
855
|
-
"$ref": "#/components/schemas/FileEntityId"
|
|
856
|
-
}
|
|
857
|
-
}
|
|
986
|
+
"File"
|
|
858
987
|
],
|
|
859
988
|
"requestBody": {
|
|
860
989
|
"content": {
|
|
861
990
|
"application/json": {
|
|
862
991
|
"schema": {
|
|
863
|
-
"$ref": "#/components/schemas/
|
|
864
|
-
"type": "object"
|
|
992
|
+
"$ref": "#/components/schemas/VerifyCustomDownloadUrlPayload"
|
|
865
993
|
}
|
|
866
994
|
}
|
|
867
995
|
}
|
|
868
996
|
},
|
|
869
997
|
"responses": {
|
|
870
|
-
"
|
|
871
|
-
"description": "
|
|
998
|
+
"200": {
|
|
999
|
+
"description": "Download Url matches signature and has not expired",
|
|
872
1000
|
"content": {
|
|
873
1001
|
"application/json": {
|
|
874
1002
|
"schema": {
|
|
875
|
-
"
|
|
876
|
-
|
|
877
|
-
|
|
1003
|
+
"type": "object",
|
|
1004
|
+
"properties": {
|
|
1005
|
+
"valid": {
|
|
1006
|
+
"type": "boolean"
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
878
1011
|
}
|
|
879
1012
|
}
|
|
880
1013
|
}
|
|
881
1014
|
}
|
|
882
1015
|
},
|
|
883
|
-
"/
|
|
1016
|
+
"/v1/files/public/upload": {
|
|
884
1017
|
"post": {
|
|
885
|
-
"operationId": "
|
|
886
|
-
"summary": "
|
|
887
|
-
"
|
|
1018
|
+
"operationId": "uploadFilePublic",
|
|
1019
|
+
"summary": "uploadFilePublic",
|
|
1020
|
+
"security": [],
|
|
1021
|
+
"description": "Create pre-signed S3 URL to upload a file to keep temporarily (one week).\n\nUse the saveFileV2 operation to store file file permanently.\n",
|
|
888
1022
|
"tags": [
|
|
889
|
-
"
|
|
1023
|
+
"File"
|
|
890
1024
|
],
|
|
891
1025
|
"requestBody": {
|
|
892
1026
|
"content": {
|
|
893
1027
|
"application/json": {
|
|
894
1028
|
"schema": {
|
|
895
|
-
"$ref": "#/components/schemas/
|
|
1029
|
+
"$ref": "#/components/schemas/UploadFilePayload"
|
|
896
1030
|
},
|
|
897
1031
|
"examples": {
|
|
898
|
-
"
|
|
899
|
-
"description": "
|
|
1032
|
+
"Upload an image file": {
|
|
1033
|
+
"description": "Upload an image file",
|
|
900
1034
|
"value": {
|
|
901
|
-
"
|
|
902
|
-
"
|
|
903
|
-
"filename": "document.pdf",
|
|
904
|
-
"_tags": [
|
|
905
|
-
"string"
|
|
906
|
-
],
|
|
907
|
-
"access_control": "private",
|
|
908
|
-
"s3ref": {
|
|
909
|
-
"bucket": "epilot-files-prod",
|
|
910
|
-
"key": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
911
|
-
}
|
|
1035
|
+
"filename": "image.png",
|
|
1036
|
+
"mime_type": "image/png"
|
|
912
1037
|
}
|
|
913
1038
|
},
|
|
914
|
-
"
|
|
915
|
-
"description": "
|
|
1039
|
+
"Upload a document": {
|
|
1040
|
+
"description": "Upload an image file",
|
|
916
1041
|
"value": {
|
|
917
|
-
"file_entity_id": "string",
|
|
918
|
-
"document_type": "document",
|
|
919
1042
|
"filename": "document.pdf",
|
|
920
|
-
"
|
|
921
|
-
"string"
|
|
922
|
-
],
|
|
923
|
-
"access_control": "private",
|
|
924
|
-
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
925
|
-
"shared_with_end_customer": true
|
|
926
|
-
}
|
|
927
|
-
},
|
|
928
|
-
"CustomFileWithRelations": {
|
|
929
|
-
"description": "Custom file entity with custom download url",
|
|
930
|
-
"value": {
|
|
931
|
-
"file_entity_id": "string",
|
|
932
|
-
"document_type": "document",
|
|
933
|
-
"filename": "document.pdf",
|
|
934
|
-
"_tags": [
|
|
935
|
-
"string"
|
|
936
|
-
],
|
|
937
|
-
"access_control": "private",
|
|
938
|
-
"custom_download_url": "https://some-api-url.com/download?file_id=123",
|
|
939
|
-
"shared_with_end_customer": true,
|
|
940
|
-
"relations": [
|
|
941
|
-
{
|
|
942
|
-
"entity_id": "77a1e0cc-7b92-4d41-8cce-eefd317ec004",
|
|
943
|
-
"_schema": "contact"
|
|
944
|
-
}
|
|
945
|
-
]
|
|
1043
|
+
"mime_type": "application/pdf"
|
|
946
1044
|
}
|
|
947
1045
|
}
|
|
948
1046
|
}
|
|
@@ -951,11 +1049,31 @@
|
|
|
951
1049
|
},
|
|
952
1050
|
"responses": {
|
|
953
1051
|
"201": {
|
|
954
|
-
"description": "
|
|
1052
|
+
"description": "Pre-signed URL for POST / PUT upload",
|
|
955
1053
|
"content": {
|
|
956
1054
|
"application/json": {
|
|
957
1055
|
"schema": {
|
|
958
|
-
"
|
|
1056
|
+
"type": "object",
|
|
1057
|
+
"properties": {
|
|
1058
|
+
"s3ref": {
|
|
1059
|
+
"allOf": [
|
|
1060
|
+
{
|
|
1061
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
"example": {
|
|
1065
|
+
"bucket": "epilot-prod-user-content",
|
|
1066
|
+
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
]
|
|
1070
|
+
},
|
|
1071
|
+
"upload_url": {
|
|
1072
|
+
"type": "string",
|
|
1073
|
+
"format": "url",
|
|
1074
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
959
1077
|
}
|
|
960
1078
|
}
|
|
961
1079
|
}
|
|
@@ -989,20 +1107,73 @@
|
|
|
989
1107
|
"type": "string",
|
|
990
1108
|
"example": "contact"
|
|
991
1109
|
},
|
|
1110
|
+
"ActivityId": {
|
|
1111
|
+
"type": "string",
|
|
1112
|
+
"format": "ulid",
|
|
1113
|
+
"description": "See https://github.com/ulid/spec",
|
|
1114
|
+
"example": "01F130Q52Q6MWSNS8N2AVXV4JN"
|
|
1115
|
+
},
|
|
992
1116
|
"FileEntityId": {
|
|
993
1117
|
"type": "string",
|
|
994
1118
|
"example": "ef7d985c-2385-44f4-9c71-ae06a52264f8"
|
|
995
1119
|
},
|
|
996
|
-
"
|
|
1120
|
+
"FileAttributes": {
|
|
997
1121
|
"type": "object",
|
|
998
1122
|
"properties": {
|
|
999
|
-
"
|
|
1000
|
-
"
|
|
1123
|
+
"_tags": {
|
|
1124
|
+
"type": "array",
|
|
1125
|
+
"items": {
|
|
1126
|
+
"type": "string"
|
|
1127
|
+
},
|
|
1128
|
+
"example": [
|
|
1129
|
+
"tag1",
|
|
1130
|
+
"tag2"
|
|
1131
|
+
]
|
|
1132
|
+
},
|
|
1133
|
+
"_purpose": {
|
|
1134
|
+
"type": "array",
|
|
1135
|
+
"items": {
|
|
1136
|
+
"type": "string"
|
|
1137
|
+
},
|
|
1138
|
+
"example": [
|
|
1139
|
+
"8d396871-95a0-4c9d-bb4d-9eda9c35776c",
|
|
1140
|
+
"da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8"
|
|
1141
|
+
]
|
|
1142
|
+
},
|
|
1143
|
+
"_manifest": {
|
|
1144
|
+
"type": "array",
|
|
1145
|
+
"description": "Manifest ID used to create/update the entity",
|
|
1146
|
+
"items": {
|
|
1147
|
+
"type": "string",
|
|
1148
|
+
"format": "uuid",
|
|
1149
|
+
"example": "123e4567-e89b-12d3-a456-426614174000"
|
|
1150
|
+
}
|
|
1001
1151
|
},
|
|
1002
1152
|
"filename": {
|
|
1003
1153
|
"type": "string",
|
|
1004
1154
|
"example": "document.pdf"
|
|
1005
1155
|
},
|
|
1156
|
+
"type": {
|
|
1157
|
+
"$ref": "#/components/schemas/FileType"
|
|
1158
|
+
},
|
|
1159
|
+
"mime_type": {
|
|
1160
|
+
"type": "string",
|
|
1161
|
+
"description": "MIME type of the file",
|
|
1162
|
+
"example": "application/pdf"
|
|
1163
|
+
},
|
|
1164
|
+
"size_bytes": {
|
|
1165
|
+
"type": "integer",
|
|
1166
|
+
"minimum": 0,
|
|
1167
|
+
"description": "File size in bytes",
|
|
1168
|
+
"example": 1234,
|
|
1169
|
+
"readOnly": true
|
|
1170
|
+
},
|
|
1171
|
+
"readable_size": {
|
|
1172
|
+
"type": "string",
|
|
1173
|
+
"example": "1.2 MB",
|
|
1174
|
+
"description": "Human readable file size",
|
|
1175
|
+
"readOnly": true
|
|
1176
|
+
},
|
|
1006
1177
|
"access_control": {
|
|
1007
1178
|
"type": "string",
|
|
1008
1179
|
"default": "private",
|
|
@@ -1015,48 +1186,232 @@
|
|
|
1015
1186
|
"description": "Direct URL for file (public only if file access control is public-read)",
|
|
1016
1187
|
"type": "string",
|
|
1017
1188
|
"format": "url",
|
|
1018
|
-
"example": "https://epilot-
|
|
1189
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf",
|
|
1190
|
+
"readOnly": true
|
|
1019
1191
|
},
|
|
1020
|
-
"
|
|
1021
|
-
"
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1192
|
+
"custom_download_url": {
|
|
1193
|
+
"$ref": "#/components/schemas/CustomDownloadUrl"
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
"FileType": {
|
|
1198
|
+
"type": "string",
|
|
1199
|
+
"enum": [
|
|
1200
|
+
"document",
|
|
1201
|
+
"document_template",
|
|
1202
|
+
"text",
|
|
1203
|
+
"image",
|
|
1204
|
+
"video",
|
|
1205
|
+
"audio",
|
|
1206
|
+
"spreadsheet",
|
|
1207
|
+
"presentation",
|
|
1208
|
+
"font",
|
|
1209
|
+
"archive",
|
|
1210
|
+
"application",
|
|
1211
|
+
"unknown"
|
|
1212
|
+
]
|
|
1213
|
+
},
|
|
1214
|
+
"CustomDownloadUrl": {
|
|
1215
|
+
"description": "Custom external download url used for the file",
|
|
1216
|
+
"type": "string",
|
|
1217
|
+
"format": "uri",
|
|
1218
|
+
"example": "https://some-api-url.com/download?file_id=123"
|
|
1219
|
+
},
|
|
1220
|
+
"FileEntity": {
|
|
1221
|
+
"allOf": [
|
|
1222
|
+
{
|
|
1223
|
+
"type": "object",
|
|
1224
|
+
"properties": {
|
|
1225
|
+
"_title": {
|
|
1226
|
+
"type": "string",
|
|
1227
|
+
"example": "document.pdf"
|
|
1228
|
+
},
|
|
1229
|
+
"_schema": {
|
|
1230
|
+
"type": "string",
|
|
1231
|
+
"enum": [
|
|
1232
|
+
"file"
|
|
1233
|
+
],
|
|
1234
|
+
"readOnly": true
|
|
1235
|
+
},
|
|
1236
|
+
"_org": {
|
|
1237
|
+
"type": "string",
|
|
1238
|
+
"example": "123",
|
|
1239
|
+
"readOnly": true
|
|
1240
|
+
},
|
|
1241
|
+
"_id": {
|
|
1242
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"$ref": "#/components/schemas/FileAttributes"
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
"type": "object",
|
|
1251
|
+
"properties": {
|
|
1252
|
+
"source_url": {
|
|
1253
|
+
"type": "string",
|
|
1254
|
+
"description": "Source URL for the file. Included if the entity was created from source_url, or when ?source_url=true",
|
|
1255
|
+
"example": "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf"
|
|
1256
|
+
},
|
|
1257
|
+
"s3ref": {
|
|
1258
|
+
"$ref": "#/components/schemas/S3Ref",
|
|
1259
|
+
"readOnly": true
|
|
1260
|
+
},
|
|
1261
|
+
"versions": {
|
|
1262
|
+
"type": "array",
|
|
1263
|
+
"items": {
|
|
1264
|
+
"$ref": "#/components/schemas/FileItem"
|
|
1265
|
+
},
|
|
1266
|
+
"readOnly": true
|
|
1267
|
+
},
|
|
1268
|
+
"_updated_at": {
|
|
1269
|
+
"type": "string",
|
|
1270
|
+
"format": "date-time",
|
|
1271
|
+
"readOnly": true
|
|
1272
|
+
},
|
|
1273
|
+
"_created_at": {
|
|
1274
|
+
"type": "string",
|
|
1275
|
+
"format": "date-time",
|
|
1276
|
+
"readOnly": true
|
|
1277
|
+
},
|
|
1278
|
+
"_acl": {
|
|
1279
|
+
"$ref": "#/components/schemas/BaseEntityAcl"
|
|
1280
|
+
},
|
|
1281
|
+
"_owners": {
|
|
1282
|
+
"type": "array",
|
|
1283
|
+
"readOnly": true,
|
|
1284
|
+
"items": {
|
|
1285
|
+
"$ref": "#/components/schemas/BaseEntityOwner"
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
"__additional": {
|
|
1289
|
+
"type": "object",
|
|
1290
|
+
"description": "Additional fields that are not part of the schema",
|
|
1291
|
+
"additionalProperties": true,
|
|
1292
|
+
"nullable": true
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
"required": [
|
|
1296
|
+
"_title",
|
|
1297
|
+
"_schema",
|
|
1298
|
+
"_org",
|
|
1299
|
+
"_id",
|
|
1300
|
+
"filename",
|
|
1301
|
+
"type",
|
|
1302
|
+
"access_control",
|
|
1303
|
+
"versions"
|
|
1304
|
+
]
|
|
1305
|
+
}
|
|
1306
|
+
]
|
|
1307
|
+
},
|
|
1308
|
+
"CommonSaveFilePayload": {
|
|
1309
|
+
"type": "object",
|
|
1310
|
+
"properties": {
|
|
1311
|
+
"_id": {
|
|
1312
|
+
"allOf": [
|
|
1313
|
+
{
|
|
1314
|
+
"$ref": "#/components/schemas/FileEntityId"
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
"description": "if passed, adds a new version to existing file entity"
|
|
1318
|
+
}
|
|
1036
1319
|
]
|
|
1037
1320
|
},
|
|
1038
|
-
"
|
|
1321
|
+
"file_entity_id": {
|
|
1039
1322
|
"type": "string",
|
|
1040
|
-
"description": "
|
|
1041
|
-
"
|
|
1323
|
+
"description": "Deprecated, use _id instead",
|
|
1324
|
+
"deprecated": true
|
|
1042
1325
|
},
|
|
1043
|
-
"
|
|
1044
|
-
"type": "integer",
|
|
1045
|
-
"minimum": 0,
|
|
1046
|
-
"description": "File size in bytes"
|
|
1047
|
-
},
|
|
1048
|
-
"versions": {
|
|
1326
|
+
"relations": {
|
|
1049
1327
|
"type": "array",
|
|
1328
|
+
"description": "List of entities to relate the file to",
|
|
1050
1329
|
"items": {
|
|
1051
|
-
"
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1330
|
+
"$ref": "#/components/schemas/FileRelationItem"
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
"additionalProperties": true
|
|
1335
|
+
},
|
|
1336
|
+
"SaveS3FilePayload": {
|
|
1337
|
+
"allOf": [
|
|
1338
|
+
{
|
|
1339
|
+
"$ref": "#/components/schemas/CommonSaveFilePayload"
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"$ref": "#/components/schemas/FileAttributes"
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
"type": "object",
|
|
1346
|
+
"properties": {
|
|
1347
|
+
"s3ref": {
|
|
1348
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
1056
1349
|
}
|
|
1057
1350
|
}
|
|
1058
1351
|
}
|
|
1059
|
-
|
|
1352
|
+
]
|
|
1353
|
+
},
|
|
1354
|
+
"SaveFileFromSourceURLPayload": {
|
|
1355
|
+
"allOf": [
|
|
1356
|
+
{
|
|
1357
|
+
"$ref": "#/components/schemas/CommonSaveFilePayload"
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
"$ref": "#/components/schemas/FileAttributes"
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"type": "object",
|
|
1364
|
+
"properties": {
|
|
1365
|
+
"source_url": {
|
|
1366
|
+
"$ref": "#/components/schemas/CustomDownloadUrl"
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
]
|
|
1371
|
+
},
|
|
1372
|
+
"SaveCustomFilePayload": {
|
|
1373
|
+
"allOf": [
|
|
1374
|
+
{
|
|
1375
|
+
"$ref": "#/components/schemas/CommonSaveFilePayload"
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
"$ref": "#/components/schemas/FileAttributes"
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
"type": "object",
|
|
1382
|
+
"properties": {
|
|
1383
|
+
"custom_download_url": {
|
|
1384
|
+
"$ref": "#/components/schemas/CustomDownloadUrl"
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
]
|
|
1389
|
+
},
|
|
1390
|
+
"SaveFilePayload": {
|
|
1391
|
+
"anyOf": [
|
|
1392
|
+
{
|
|
1393
|
+
"$ref": "#/components/schemas/SaveS3FilePayload"
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"$ref": "#/components/schemas/SaveFileFromSourceURLPayload"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
"$ref": "#/components/schemas/SaveCustomFilePayload"
|
|
1400
|
+
}
|
|
1401
|
+
]
|
|
1402
|
+
},
|
|
1403
|
+
"SaveFilePayloadV2": {
|
|
1404
|
+
"anyOf": [
|
|
1405
|
+
{
|
|
1406
|
+
"$ref": "#/components/schemas/SaveS3FilePayload"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"$ref": "#/components/schemas/SaveFileFromSourceURLPayload"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
"$ref": "#/components/schemas/SaveCustomFilePayload"
|
|
1413
|
+
}
|
|
1414
|
+
]
|
|
1060
1415
|
},
|
|
1061
1416
|
"UploadFilePayload": {
|
|
1062
1417
|
"type": "object",
|
|
@@ -1102,11 +1457,11 @@
|
|
|
1102
1457
|
"s3ref": {
|
|
1103
1458
|
"allOf": [
|
|
1104
1459
|
{
|
|
1105
|
-
"$ref": "#/components/schemas/
|
|
1460
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
1106
1461
|
},
|
|
1107
1462
|
{
|
|
1108
1463
|
"example": {
|
|
1109
|
-
"bucket": "epilot-
|
|
1464
|
+
"bucket": "epilot-prod-user-content",
|
|
1110
1465
|
"key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
1111
1466
|
}
|
|
1112
1467
|
}
|
|
@@ -1115,13 +1470,13 @@
|
|
|
1115
1470
|
"upload_url": {
|
|
1116
1471
|
"type": "string",
|
|
1117
1472
|
"format": "url",
|
|
1118
|
-
"example": "https://epilot-
|
|
1473
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123"
|
|
1119
1474
|
},
|
|
1120
1475
|
"public_url": {
|
|
1121
1476
|
"description": "Returned only if file is permanent i.e. file_entity_id is passed",
|
|
1122
1477
|
"type": "string",
|
|
1123
1478
|
"format": "url",
|
|
1124
|
-
"example": "https://epilot-
|
|
1479
|
+
"example": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
1125
1480
|
}
|
|
1126
1481
|
}
|
|
1127
1482
|
},
|
|
@@ -1144,195 +1499,12 @@
|
|
|
1144
1499
|
]
|
|
1145
1500
|
}
|
|
1146
1501
|
},
|
|
1147
|
-
"CommonSaveFilePayload": {
|
|
1148
|
-
"type": "object",
|
|
1149
|
-
"properties": {
|
|
1150
|
-
"file_entity_id": {
|
|
1151
|
-
"type": "string",
|
|
1152
|
-
"description": "if passed, adds a new version to existing file entity"
|
|
1153
|
-
},
|
|
1154
|
-
"document_type": {
|
|
1155
|
-
"type": "string",
|
|
1156
|
-
"enum": [
|
|
1157
|
-
"document",
|
|
1158
|
-
"document_template",
|
|
1159
|
-
"text",
|
|
1160
|
-
"image",
|
|
1161
|
-
"video",
|
|
1162
|
-
"audio",
|
|
1163
|
-
"spreadsheet",
|
|
1164
|
-
"presentation",
|
|
1165
|
-
"font",
|
|
1166
|
-
"archive",
|
|
1167
|
-
"application",
|
|
1168
|
-
"unknown"
|
|
1169
|
-
]
|
|
1170
|
-
},
|
|
1171
|
-
"filename": {
|
|
1172
|
-
"type": "string",
|
|
1173
|
-
"example": "document.pdf"
|
|
1174
|
-
},
|
|
1175
|
-
"_tags": {
|
|
1176
|
-
"type": "array",
|
|
1177
|
-
"items": {
|
|
1178
|
-
"type": "string"
|
|
1179
|
-
}
|
|
1180
|
-
},
|
|
1181
|
-
"access_control": {
|
|
1182
|
-
"type": "string",
|
|
1183
|
-
"default": "private",
|
|
1184
|
-
"enum": [
|
|
1185
|
-
"private",
|
|
1186
|
-
"public-read"
|
|
1187
|
-
]
|
|
1188
|
-
},
|
|
1189
|
-
"relations": {
|
|
1190
|
-
"type": "array",
|
|
1191
|
-
"description": "List of entities to relate the file to",
|
|
1192
|
-
"items": {
|
|
1193
|
-
"$ref": "#/components/schemas/FileRelationItem"
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
},
|
|
1197
|
-
"additionalProperties": true
|
|
1198
|
-
},
|
|
1199
|
-
"SaveS3FilePayload": {
|
|
1200
|
-
"allOf": [
|
|
1201
|
-
{
|
|
1202
|
-
"$ref": "#/components/schemas/CommonSaveFilePayload"
|
|
1203
|
-
},
|
|
1204
|
-
{
|
|
1205
|
-
"type": "object",
|
|
1206
|
-
"properties": {
|
|
1207
|
-
"s3ref": {
|
|
1208
|
-
"$ref": "#/components/schemas/S3Reference"
|
|
1209
|
-
}
|
|
1210
|
-
},
|
|
1211
|
-
"required": [
|
|
1212
|
-
"s3ref"
|
|
1213
|
-
]
|
|
1214
|
-
}
|
|
1215
|
-
]
|
|
1216
|
-
},
|
|
1217
|
-
"SaveCustomFilePayload": {
|
|
1218
|
-
"allOf": [
|
|
1219
|
-
{
|
|
1220
|
-
"$ref": "#/components/schemas/CommonSaveFilePayload"
|
|
1221
|
-
},
|
|
1222
|
-
{
|
|
1223
|
-
"type": "object",
|
|
1224
|
-
"properties": {
|
|
1225
|
-
"custom_download_url": {
|
|
1226
|
-
"description": "Custom external download url used for the file",
|
|
1227
|
-
"type": "string",
|
|
1228
|
-
"format": "uri"
|
|
1229
|
-
}
|
|
1230
|
-
},
|
|
1231
|
-
"required": [
|
|
1232
|
-
"custom_download_url"
|
|
1233
|
-
]
|
|
1234
|
-
}
|
|
1235
|
-
]
|
|
1236
|
-
},
|
|
1237
|
-
"SaveFilePayload": {
|
|
1238
|
-
"anyOf": [
|
|
1239
|
-
{
|
|
1240
|
-
"$ref": "#/components/schemas/SaveS3FilePayload"
|
|
1241
|
-
},
|
|
1242
|
-
{
|
|
1243
|
-
"$ref": "#/components/schemas/SaveCustomFilePayload"
|
|
1244
|
-
}
|
|
1245
|
-
]
|
|
1246
|
-
},
|
|
1247
|
-
"SaveFilePayloadV2": {
|
|
1248
|
-
"type": "object",
|
|
1249
|
-
"properties": {
|
|
1250
|
-
"s3ref": {
|
|
1251
|
-
"type": "object",
|
|
1252
|
-
"properties": {
|
|
1253
|
-
"bucket": {
|
|
1254
|
-
"type": "string",
|
|
1255
|
-
"example": "epilot-files-prod"
|
|
1256
|
-
},
|
|
1257
|
-
"key": {
|
|
1258
|
-
"type": "string",
|
|
1259
|
-
"example": "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
|
|
1260
|
-
}
|
|
1261
|
-
},
|
|
1262
|
-
"required": [
|
|
1263
|
-
"bucket",
|
|
1264
|
-
"key"
|
|
1265
|
-
]
|
|
1266
|
-
},
|
|
1267
|
-
"filename": {
|
|
1268
|
-
"type": "string",
|
|
1269
|
-
"example": "document.pdf"
|
|
1270
|
-
},
|
|
1271
|
-
"file_entity_id": {
|
|
1272
|
-
"type": "string",
|
|
1273
|
-
"description": "if passed, adds a new version to existing file entity"
|
|
1274
|
-
},
|
|
1275
|
-
"document_type": {
|
|
1276
|
-
"type": "string",
|
|
1277
|
-
"enum": [
|
|
1278
|
-
"document",
|
|
1279
|
-
"document_template",
|
|
1280
|
-
"text",
|
|
1281
|
-
"image",
|
|
1282
|
-
"video",
|
|
1283
|
-
"audio",
|
|
1284
|
-
"spreadsheet",
|
|
1285
|
-
"presentation",
|
|
1286
|
-
"font",
|
|
1287
|
-
"archive",
|
|
1288
|
-
"application",
|
|
1289
|
-
"unknown"
|
|
1290
|
-
]
|
|
1291
|
-
},
|
|
1292
|
-
"_tags": {
|
|
1293
|
-
"type": "array",
|
|
1294
|
-
"items": {
|
|
1295
|
-
"type": "string"
|
|
1296
|
-
}
|
|
1297
|
-
},
|
|
1298
|
-
"access_control": {
|
|
1299
|
-
"type": "string",
|
|
1300
|
-
"default": "private",
|
|
1301
|
-
"enum": [
|
|
1302
|
-
"private",
|
|
1303
|
-
"public-read"
|
|
1304
|
-
]
|
|
1305
|
-
},
|
|
1306
|
-
"custom_download_url": {
|
|
1307
|
-
"description": "Custom external download url used for the file",
|
|
1308
|
-
"type": "string",
|
|
1309
|
-
"format": "uri"
|
|
1310
|
-
}
|
|
1311
|
-
},
|
|
1312
|
-
"additionalProperties": true,
|
|
1313
|
-
"required": [
|
|
1314
|
-
"s3ref",
|
|
1315
|
-
"filename"
|
|
1316
|
-
]
|
|
1317
|
-
},
|
|
1318
|
-
"DeleteFilePayload": {
|
|
1319
|
-
"type": "object",
|
|
1320
|
-
"properties": {
|
|
1321
|
-
"s3ref": {
|
|
1322
|
-
"$ref": "#/components/schemas/S3Reference"
|
|
1323
|
-
}
|
|
1324
|
-
},
|
|
1325
|
-
"required": [
|
|
1326
|
-
"s3ref"
|
|
1327
|
-
]
|
|
1328
|
-
},
|
|
1329
1502
|
"VerifyCustomDownloadUrlPayload": {
|
|
1330
1503
|
"type": "object",
|
|
1331
1504
|
"properties": {
|
|
1332
1505
|
"custom_download_url": {
|
|
1333
1506
|
"description": "Custom external download url with signature and expiration time",
|
|
1334
1507
|
"type": "string",
|
|
1335
|
-
"format": "uri",
|
|
1336
1508
|
"example": "https://some-api-url.com?file_id=123&expires_at=1699273500029&signature=abcdefg"
|
|
1337
1509
|
}
|
|
1338
1510
|
},
|
|
@@ -1345,7 +1517,7 @@
|
|
|
1345
1517
|
"properties": {
|
|
1346
1518
|
"bucket": {
|
|
1347
1519
|
"type": "string",
|
|
1348
|
-
"example": "epilot-
|
|
1520
|
+
"example": "epilot-prod-user-content"
|
|
1349
1521
|
},
|
|
1350
1522
|
"key": {
|
|
1351
1523
|
"type": "string",
|
|
@@ -1357,29 +1529,32 @@
|
|
|
1357
1529
|
"key"
|
|
1358
1530
|
]
|
|
1359
1531
|
},
|
|
1532
|
+
"S3Ref": {
|
|
1533
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
1534
|
+
},
|
|
1360
1535
|
"FileItem": {
|
|
1361
|
-
"
|
|
1362
|
-
|
|
1363
|
-
|
|
1536
|
+
"type": "object",
|
|
1537
|
+
"properties": {
|
|
1538
|
+
"s3ref": {
|
|
1539
|
+
"$ref": "#/components/schemas/S3Ref"
|
|
1364
1540
|
},
|
|
1365
|
-
{
|
|
1366
|
-
"type": "
|
|
1367
|
-
"
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
}
|
|
1541
|
+
"filename": {
|
|
1542
|
+
"type": "string",
|
|
1543
|
+
"example": "document.pdf"
|
|
1544
|
+
},
|
|
1545
|
+
"size_bytes": {
|
|
1546
|
+
"type": "integer",
|
|
1547
|
+
"example": 1234
|
|
1548
|
+
},
|
|
1549
|
+
"readable_size": {
|
|
1550
|
+
"type": "string",
|
|
1551
|
+
"example": "1.2 MB"
|
|
1552
|
+
},
|
|
1553
|
+
"mime_type": {
|
|
1554
|
+
"type": "string",
|
|
1555
|
+
"example": "image/jpeg"
|
|
1381
1556
|
}
|
|
1382
|
-
|
|
1557
|
+
}
|
|
1383
1558
|
},
|
|
1384
1559
|
"FileRelationItem": {
|
|
1385
1560
|
"type": "object",
|
|
@@ -1419,6 +1594,91 @@
|
|
|
1419
1594
|
"description": "The most recent timestamp when the file was accessed"
|
|
1420
1595
|
}
|
|
1421
1596
|
}
|
|
1597
|
+
},
|
|
1598
|
+
"BaseEntityOwner": {
|
|
1599
|
+
"description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n",
|
|
1600
|
+
"type": "object",
|
|
1601
|
+
"properties": {
|
|
1602
|
+
"org_id": {
|
|
1603
|
+
"type": "string",
|
|
1604
|
+
"example": "123"
|
|
1605
|
+
},
|
|
1606
|
+
"user_id": {
|
|
1607
|
+
"type": "string",
|
|
1608
|
+
"example": "123"
|
|
1609
|
+
}
|
|
1610
|
+
},
|
|
1611
|
+
"required": [
|
|
1612
|
+
"org_id"
|
|
1613
|
+
]
|
|
1614
|
+
},
|
|
1615
|
+
"BaseEntityAcl": {
|
|
1616
|
+
"type": "object",
|
|
1617
|
+
"description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.",
|
|
1618
|
+
"properties": {
|
|
1619
|
+
"view": {
|
|
1620
|
+
"type": "array",
|
|
1621
|
+
"items": {
|
|
1622
|
+
"type": "string",
|
|
1623
|
+
"example": "org:456"
|
|
1624
|
+
}
|
|
1625
|
+
},
|
|
1626
|
+
"edit": {
|
|
1627
|
+
"type": "array",
|
|
1628
|
+
"items": {
|
|
1629
|
+
"type": "string",
|
|
1630
|
+
"example": "org:456"
|
|
1631
|
+
}
|
|
1632
|
+
},
|
|
1633
|
+
"delete": {
|
|
1634
|
+
"type": "array",
|
|
1635
|
+
"items": {
|
|
1636
|
+
"type": "string",
|
|
1637
|
+
"example": "org:456"
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1643
|
+
"parameters": {
|
|
1644
|
+
"StrictQueryParam": {
|
|
1645
|
+
"name": "strict",
|
|
1646
|
+
"in": "query",
|
|
1647
|
+
"required": false,
|
|
1648
|
+
"description": "When passed true, the response will contain only fields that match the schema, with non-matching fields included in `__additional`",
|
|
1649
|
+
"schema": {
|
|
1650
|
+
"type": "boolean",
|
|
1651
|
+
"default": false
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1654
|
+
"ActivityIdQueryParam": {
|
|
1655
|
+
"name": "activity_id",
|
|
1656
|
+
"description": "Activity to include in event feed",
|
|
1657
|
+
"in": "query",
|
|
1658
|
+
"required": false,
|
|
1659
|
+
"schema": {
|
|
1660
|
+
"$ref": "#/components/schemas/ActivityId"
|
|
1661
|
+
}
|
|
1662
|
+
},
|
|
1663
|
+
"FillActivityQueryParam": {
|
|
1664
|
+
"name": "fill_activity",
|
|
1665
|
+
"description": "Update the diff and entity for the custom activity included in the query.\nPending state on activity is automatically ended when activity is filled.\n",
|
|
1666
|
+
"in": "query",
|
|
1667
|
+
"required": false,
|
|
1668
|
+
"schema": {
|
|
1669
|
+
"type": "boolean",
|
|
1670
|
+
"default": false
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
"AsyncOperationQueryParam": {
|
|
1674
|
+
"name": "async",
|
|
1675
|
+
"description": "Don't wait for updated entity to become available in Search API. Useful for large migrations",
|
|
1676
|
+
"in": "query",
|
|
1677
|
+
"required": false,
|
|
1678
|
+
"schema": {
|
|
1679
|
+
"type": "boolean",
|
|
1680
|
+
"default": false
|
|
1681
|
+
}
|
|
1422
1682
|
}
|
|
1423
1683
|
}
|
|
1424
1684
|
},
|