@3dverse/api 0.8.2 → 0.8.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/_prebuild/wrapper.d.ts +490 -222
- package/dist/index.js +248 -165
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +248 -165
- package/dist/index.mjs.map +2 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
@@ -12,96 +12,104 @@ function setBaseURL(baseURL) {
|
|
12
12
|
function listUsers({
|
13
13
|
offset = 0,
|
14
14
|
limit = 10
|
15
|
-
}) {
|
15
|
+
}, headers) {
|
16
16
|
return axiosInstance({
|
17
17
|
method: "get",
|
18
18
|
url: "/users",
|
19
19
|
params: {
|
20
20
|
offset,
|
21
21
|
limit
|
22
|
-
}
|
22
|
+
},
|
23
|
+
headers
|
23
24
|
});
|
24
25
|
}
|
25
26
|
function registerUser({
|
26
27
|
username
|
27
|
-
}) {
|
28
|
+
}, headers) {
|
28
29
|
return axiosInstance({
|
29
30
|
method: "post",
|
30
31
|
url: "/users",
|
31
32
|
data: {
|
32
33
|
username
|
33
|
-
}
|
34
|
+
},
|
35
|
+
headers
|
34
36
|
});
|
35
37
|
}
|
36
38
|
function getUser({
|
37
39
|
user_id
|
38
|
-
}) {
|
40
|
+
}, headers) {
|
39
41
|
return axiosInstance({
|
40
42
|
method: "get",
|
41
|
-
url: "/users/" + user_id
|
43
|
+
url: "/users/" + user_id,
|
44
|
+
headers
|
42
45
|
});
|
43
46
|
}
|
44
47
|
function updateUser({
|
45
48
|
user_id,
|
46
49
|
username
|
47
|
-
}) {
|
50
|
+
}, headers) {
|
48
51
|
return axiosInstance({
|
49
52
|
method: "patch",
|
50
53
|
url: "/users/" + user_id,
|
51
54
|
data: {
|
52
55
|
username
|
53
|
-
}
|
56
|
+
},
|
57
|
+
headers
|
54
58
|
});
|
55
59
|
}
|
56
60
|
function deleteUser({
|
57
61
|
user_id
|
58
|
-
}) {
|
62
|
+
}, headers) {
|
59
63
|
return axiosInstance({
|
60
64
|
method: "delete",
|
61
|
-
url: "/users/" + user_id
|
65
|
+
url: "/users/" + user_id,
|
66
|
+
headers
|
62
67
|
});
|
63
68
|
}
|
64
69
|
function generateUserToken({
|
65
70
|
user_id,
|
66
71
|
scope,
|
67
72
|
ttl = "1h"
|
68
|
-
}) {
|
73
|
+
}, headers) {
|
69
74
|
return axiosInstance({
|
70
75
|
method: "post",
|
71
76
|
url: "/users/" + user_id + "/tokens",
|
72
77
|
data: {
|
73
78
|
scope,
|
74
79
|
ttl
|
75
|
-
}
|
80
|
+
},
|
81
|
+
headers
|
76
82
|
});
|
77
83
|
}
|
78
84
|
function getUserGroups({
|
79
85
|
user_id
|
80
|
-
}) {
|
86
|
+
}, headers) {
|
81
87
|
return axiosInstance({
|
82
88
|
method: "get",
|
83
|
-
url: "/users/" + user_id + "/groups"
|
89
|
+
url: "/users/" + user_id + "/groups",
|
90
|
+
headers
|
84
91
|
});
|
85
92
|
}
|
86
93
|
function getUserUploadTasks({
|
87
94
|
user_id,
|
88
95
|
offset = 0,
|
89
96
|
limit = 10
|
90
|
-
}) {
|
97
|
+
}, headers) {
|
91
98
|
return axiosInstance({
|
92
99
|
method: "get",
|
93
100
|
url: "/users/" + user_id + "/upload-tasks",
|
94
101
|
params: {
|
95
102
|
offset,
|
96
103
|
limit
|
97
|
-
}
|
104
|
+
},
|
105
|
+
headers
|
98
106
|
});
|
99
107
|
}
|
100
108
|
function createGroup({
|
101
109
|
name,
|
102
110
|
description,
|
103
111
|
members
|
104
|
-
}) {
|
112
|
+
}, headers) {
|
105
113
|
return axiosInstance({
|
106
114
|
method: "post",
|
107
115
|
url: "/groups",
|
@@ -109,37 +117,41 @@ function createGroup({
|
|
109
117
|
name,
|
110
118
|
description,
|
111
119
|
members
|
112
|
-
}
|
120
|
+
},
|
121
|
+
headers
|
113
122
|
});
|
114
123
|
}
|
115
124
|
function getGroup({
|
116
125
|
group_id
|
117
|
-
}) {
|
126
|
+
}, headers) {
|
118
127
|
return axiosInstance({
|
119
128
|
method: "get",
|
120
|
-
url: "/groups/" + group_id
|
129
|
+
url: "/groups/" + group_id,
|
130
|
+
headers
|
121
131
|
});
|
122
132
|
}
|
123
133
|
function updateGroupDescription({
|
124
134
|
group_id,
|
125
135
|
name,
|
126
136
|
description
|
127
|
-
}) {
|
137
|
+
}, headers) {
|
128
138
|
return axiosInstance({
|
129
139
|
method: "patch",
|
130
140
|
url: "/groups/" + group_id,
|
131
141
|
data: {
|
132
142
|
name,
|
133
143
|
description
|
134
|
-
}
|
144
|
+
},
|
145
|
+
headers
|
135
146
|
});
|
136
147
|
}
|
137
148
|
function deleteGroup({
|
138
149
|
group_id
|
139
|
-
}) {
|
150
|
+
}, headers) {
|
140
151
|
return axiosInstance({
|
141
152
|
method: "delete",
|
142
|
-
url: "/groups/" + group_id
|
153
|
+
url: "/groups/" + group_id,
|
154
|
+
headers
|
143
155
|
});
|
144
156
|
}
|
145
157
|
function grantMemberAccessToGroup({
|
@@ -148,96 +160,105 @@ function grantMemberAccessToGroup({
|
|
148
160
|
member_id,
|
149
161
|
group_access,
|
150
162
|
folder_access
|
151
|
-
}) {
|
163
|
+
}, headers) {
|
152
164
|
return axiosInstance({
|
153
165
|
method: "put",
|
154
166
|
url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id,
|
155
167
|
data: {
|
156
168
|
group_access,
|
157
169
|
folder_access
|
158
|
-
}
|
170
|
+
},
|
171
|
+
headers
|
159
172
|
});
|
160
173
|
}
|
161
174
|
function revokeMemberAccessToGroup({
|
162
175
|
group_id,
|
163
176
|
member_type,
|
164
177
|
member_id
|
165
|
-
}) {
|
178
|
+
}, headers) {
|
166
179
|
return axiosInstance({
|
167
180
|
method: "delete",
|
168
|
-
url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id
|
181
|
+
url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id,
|
182
|
+
headers
|
169
183
|
});
|
170
184
|
}
|
171
185
|
function listFolders({
|
172
186
|
offset = 0,
|
173
187
|
limit = 10
|
174
|
-
}) {
|
188
|
+
}, headers) {
|
175
189
|
return axiosInstance({
|
176
190
|
method: "get",
|
177
191
|
url: "/folders",
|
178
192
|
params: {
|
179
193
|
offset,
|
180
194
|
limit
|
181
|
-
}
|
195
|
+
},
|
196
|
+
headers
|
182
197
|
});
|
183
198
|
}
|
184
199
|
function createFolder({
|
185
200
|
name,
|
186
201
|
subfolders
|
187
|
-
}) {
|
202
|
+
}, headers) {
|
188
203
|
return axiosInstance({
|
189
204
|
method: "post",
|
190
205
|
url: "/folders",
|
191
206
|
data: {
|
192
207
|
name,
|
193
208
|
subfolders
|
194
|
-
}
|
209
|
+
},
|
210
|
+
headers
|
195
211
|
});
|
196
212
|
}
|
197
213
|
function getFolderInfo({
|
198
214
|
folder_id
|
199
|
-
}) {
|
215
|
+
}, headers) {
|
200
216
|
return axiosInstance({
|
201
217
|
method: "get",
|
202
|
-
url: "/folders/" + folder_id
|
218
|
+
url: "/folders/" + folder_id,
|
219
|
+
headers
|
203
220
|
});
|
204
221
|
}
|
205
222
|
function moveFolders({
|
206
223
|
folder_id,
|
207
224
|
folder_ids
|
208
|
-
}) {
|
225
|
+
}, headers) {
|
209
226
|
return axiosInstance({
|
210
227
|
method: "put",
|
211
228
|
url: "/folders/" + folder_id,
|
212
|
-
data: folder_ids
|
229
|
+
data: folder_ids,
|
230
|
+
headers
|
213
231
|
});
|
214
232
|
}
|
215
233
|
function updateFolder({
|
216
234
|
folder_id,
|
217
235
|
name
|
218
|
-
}) {
|
236
|
+
}, headers) {
|
219
237
|
return axiosInstance({
|
220
238
|
method: "patch",
|
221
239
|
url: "/folders/" + folder_id,
|
222
240
|
data: {
|
223
241
|
name
|
224
|
-
}
|
242
|
+
},
|
243
|
+
headers
|
225
244
|
});
|
226
245
|
}
|
227
246
|
function deleteFolder({
|
228
247
|
folder_id
|
229
|
-
}) {
|
248
|
+
}, headers) {
|
230
249
|
return axiosInstance({
|
231
250
|
method: "delete",
|
232
|
-
url: "/folders/" + folder_id
|
251
|
+
url: "/folders/" + folder_id,
|
252
|
+
headers
|
233
253
|
});
|
234
254
|
}
|
235
255
|
function listFolderAccesses({
|
236
256
|
folder_id
|
237
|
-
}) {
|
257
|
+
}, headers) {
|
238
258
|
return axiosInstance({
|
239
259
|
method: "get",
|
240
|
-
url: "/folders/" + folder_id + "/access"
|
260
|
+
url: "/folders/" + folder_id + "/access",
|
261
|
+
headers
|
241
262
|
});
|
242
263
|
}
|
243
264
|
function grantMemberAccessToFolder({
|
@@ -245,45 +266,49 @@ function grantMemberAccessToFolder({
|
|
245
266
|
member_type,
|
246
267
|
member_id,
|
247
268
|
access
|
248
|
-
}) {
|
269
|
+
}, headers) {
|
249
270
|
return axiosInstance({
|
250
271
|
method: "put",
|
251
272
|
url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id,
|
252
273
|
data: {
|
253
274
|
access
|
254
|
-
}
|
275
|
+
},
|
276
|
+
headers
|
255
277
|
});
|
256
278
|
}
|
257
279
|
function revokeMemberAccessToFolder({
|
258
280
|
folder_id,
|
259
281
|
member_type,
|
260
282
|
member_id
|
261
|
-
}) {
|
283
|
+
}, headers) {
|
262
284
|
return axiosInstance({
|
263
285
|
method: "delete",
|
264
|
-
url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id
|
286
|
+
url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id,
|
287
|
+
headers
|
265
288
|
});
|
266
289
|
}
|
267
290
|
function createSubfolder({
|
268
291
|
folder_id,
|
269
292
|
name,
|
270
293
|
subfolders
|
271
|
-
}) {
|
294
|
+
}, headers) {
|
272
295
|
return axiosInstance({
|
273
296
|
method: "post",
|
274
297
|
url: "/folders/" + folder_id + "/folders",
|
275
298
|
data: {
|
276
299
|
name,
|
277
300
|
subfolders
|
278
|
-
}
|
301
|
+
},
|
302
|
+
headers
|
279
303
|
});
|
280
304
|
}
|
281
305
|
function listFolderSubFolders({
|
282
306
|
folder_id
|
283
|
-
}) {
|
307
|
+
}, headers) {
|
284
308
|
return axiosInstance({
|
285
309
|
method: "get",
|
286
|
-
url: "/folders/" + folder_id + "/folders"
|
310
|
+
url: "/folders/" + folder_id + "/folders",
|
311
|
+
headers
|
287
312
|
});
|
288
313
|
}
|
289
314
|
function getSourceFilesInFolder({
|
@@ -291,7 +316,7 @@ function getSourceFilesInFolder({
|
|
291
316
|
offset = 0,
|
292
317
|
limit = 10,
|
293
318
|
filters
|
294
|
-
}) {
|
319
|
+
}, headers) {
|
295
320
|
return axiosInstance({
|
296
321
|
method: "get",
|
297
322
|
url: "/folders/" + folder_id + "/source-files",
|
@@ -299,7 +324,8 @@ function getSourceFilesInFolder({
|
|
299
324
|
offset,
|
300
325
|
limit,
|
301
326
|
filters
|
302
|
-
}
|
327
|
+
},
|
328
|
+
headers
|
303
329
|
}).then((response) => {
|
304
330
|
response.headers["x-source-files-count"] = JSON.parse(response.headers["x-source-files-count"]);
|
305
331
|
return response;
|
@@ -308,25 +334,27 @@ function getSourceFilesInFolder({
|
|
308
334
|
function moveSourceFiles({
|
309
335
|
folder_id,
|
310
336
|
source_file_ids
|
311
|
-
}) {
|
337
|
+
}, headers) {
|
312
338
|
return axiosInstance({
|
313
339
|
method: "put",
|
314
340
|
url: "/folders/" + folder_id + "/source-files",
|
315
|
-
data: source_file_ids
|
341
|
+
data: source_file_ids,
|
342
|
+
headers
|
316
343
|
});
|
317
344
|
}
|
318
345
|
function getUploadTasksInFolder({
|
319
346
|
folder_id,
|
320
347
|
offset = 0,
|
321
348
|
limit = 10
|
322
|
-
}) {
|
349
|
+
}, headers) {
|
323
350
|
return axiosInstance({
|
324
351
|
method: "get",
|
325
352
|
url: "/folders/" + folder_id + "/upload-tasks",
|
326
353
|
params: {
|
327
354
|
offset,
|
328
355
|
limit
|
329
|
-
}
|
356
|
+
},
|
357
|
+
headers
|
330
358
|
});
|
331
359
|
}
|
332
360
|
function getFolderAssets({
|
@@ -335,7 +363,7 @@ function getFolderAssets({
|
|
335
363
|
limit = 10,
|
336
364
|
filter,
|
337
365
|
recursive = false
|
338
|
-
}) {
|
366
|
+
}, headers) {
|
339
367
|
return axiosInstance({
|
340
368
|
method: "get",
|
341
369
|
url: "/folders/" + folder_id + "/assets",
|
@@ -344,30 +372,35 @@ function getFolderAssets({
|
|
344
372
|
limit,
|
345
373
|
filter,
|
346
374
|
recursive
|
347
|
-
}
|
375
|
+
},
|
376
|
+
headers
|
348
377
|
}).then((response) => {
|
349
|
-
response.headers["x-assets-count"] = JSON.parse(
|
378
|
+
response.headers["x-assets-count"] = JSON.parse(
|
379
|
+
response.headers["x-assets-count"]
|
380
|
+
);
|
350
381
|
return response;
|
351
382
|
});
|
352
383
|
}
|
353
384
|
function createAsset({
|
354
385
|
folder_id,
|
355
386
|
asset_creation_options
|
356
|
-
}) {
|
387
|
+
}, headers) {
|
357
388
|
return axiosInstance({
|
358
389
|
method: "post",
|
359
390
|
url: "/folders/" + folder_id + "/assets",
|
360
|
-
data: asset_creation_options
|
391
|
+
data: asset_creation_options,
|
392
|
+
headers
|
361
393
|
});
|
362
394
|
}
|
363
395
|
function moveAssets({
|
364
396
|
folder_id,
|
365
397
|
asset_ids
|
366
|
-
}) {
|
398
|
+
}, headers) {
|
367
399
|
return axiosInstance({
|
368
400
|
method: "put",
|
369
401
|
url: "/folders/" + folder_id + "/assets",
|
370
|
-
data: asset_ids
|
402
|
+
data: asset_ids,
|
403
|
+
headers
|
371
404
|
});
|
372
405
|
}
|
373
406
|
function createMaterial({
|
@@ -376,7 +409,7 @@ function createMaterial({
|
|
376
409
|
isDoubleSided,
|
377
410
|
name,
|
378
411
|
shaderRef
|
379
|
-
}) {
|
412
|
+
}, headers) {
|
380
413
|
return axiosInstance({
|
381
414
|
method: "post",
|
382
415
|
url: "/folders/" + folder_id + "/assets/materials",
|
@@ -385,53 +418,58 @@ function createMaterial({
|
|
385
418
|
isDoubleSided,
|
386
419
|
name,
|
387
420
|
shaderRef
|
388
|
-
}
|
421
|
+
},
|
422
|
+
headers
|
389
423
|
});
|
390
424
|
}
|
391
425
|
function createCubemap({
|
392
426
|
folder_id,
|
393
427
|
faces,
|
394
428
|
name
|
395
|
-
}) {
|
429
|
+
}, headers) {
|
396
430
|
return axiosInstance({
|
397
431
|
method: "post",
|
398
432
|
url: "/folders/" + folder_id + "/assets/cubemaps",
|
399
433
|
data: {
|
400
434
|
faces,
|
401
435
|
name
|
402
|
-
}
|
436
|
+
},
|
437
|
+
headers
|
403
438
|
});
|
404
439
|
}
|
405
440
|
function importAssets({
|
406
441
|
folder_id,
|
407
442
|
overwrite = "never",
|
408
443
|
body
|
409
|
-
}) {
|
444
|
+
}, headers) {
|
410
445
|
return axiosInstance({
|
411
446
|
method: "put",
|
412
447
|
url: "/folders/" + folder_id + "/packages",
|
413
|
-
headers: {
|
414
|
-
"Content-Type": "application/zip"
|
415
|
-
},
|
416
448
|
params: {
|
417
449
|
overwrite
|
418
450
|
},
|
419
|
-
data: body
|
451
|
+
data: body,
|
452
|
+
maxRedirects: 0,
|
453
|
+
headers: {
|
454
|
+
"Content-Type": "application/zip",
|
455
|
+
...headers
|
456
|
+
}
|
420
457
|
});
|
421
458
|
}
|
422
459
|
function getSessionsInFolder({
|
423
460
|
folder_id
|
424
|
-
}) {
|
461
|
+
}, headers) {
|
425
462
|
return axiosInstance({
|
426
463
|
method: "get",
|
427
|
-
url: "/folders/" + folder_id + "/sessions"
|
464
|
+
url: "/folders/" + folder_id + "/sessions",
|
465
|
+
headers
|
428
466
|
});
|
429
467
|
}
|
430
468
|
function listSourceFiles({
|
431
469
|
offset = 0,
|
432
470
|
limit = 10,
|
433
471
|
filters
|
434
|
-
}) {
|
472
|
+
}, headers) {
|
435
473
|
return axiosInstance({
|
436
474
|
method: "get",
|
437
475
|
url: "/source-files",
|
@@ -439,7 +477,8 @@ function listSourceFiles({
|
|
439
477
|
offset,
|
440
478
|
limit,
|
441
479
|
filters
|
442
|
-
}
|
480
|
+
},
|
481
|
+
headers
|
443
482
|
}).then((response) => {
|
444
483
|
response.headers["x-source-files-count"] = JSON.parse(response.headers["x-source-files-count"]);
|
445
484
|
return response;
|
@@ -448,89 +487,97 @@ function listSourceFiles({
|
|
448
487
|
function deleteSourceFiles({
|
449
488
|
source_file_ids,
|
450
489
|
delete_assets = false
|
451
|
-
}) {
|
490
|
+
}, headers) {
|
452
491
|
return axiosInstance({
|
453
492
|
method: "delete",
|
454
493
|
url: "/source-files",
|
455
494
|
data: {
|
456
495
|
source_file_ids,
|
457
496
|
delete_assets
|
458
|
-
}
|
497
|
+
},
|
498
|
+
headers
|
459
499
|
});
|
460
500
|
}
|
461
501
|
function downloadSourceFile({
|
462
502
|
source_file_id
|
463
|
-
}) {
|
503
|
+
}, headers, responseType) {
|
464
504
|
return axiosInstance({
|
465
505
|
method: "get",
|
466
506
|
url: "/source-files/" + source_file_id,
|
467
|
-
|
507
|
+
headers,
|
508
|
+
responseType: responseType || "arraybuffer"
|
468
509
|
});
|
469
510
|
}
|
470
511
|
function getSourceFileDetails({
|
471
512
|
source_file_id
|
472
|
-
}) {
|
513
|
+
}, headers) {
|
473
514
|
return axiosInstance({
|
474
515
|
method: "get",
|
475
|
-
url: "/source-files/" + source_file_id + "/details"
|
516
|
+
url: "/source-files/" + source_file_id + "/details",
|
517
|
+
headers
|
476
518
|
});
|
477
519
|
}
|
478
520
|
function updateSourceFileDetails({
|
479
521
|
source_file_id,
|
480
522
|
name
|
481
|
-
}) {
|
523
|
+
}, headers) {
|
482
524
|
return axiosInstance({
|
483
525
|
method: "patch",
|
484
526
|
url: "/source-files/" + source_file_id + "/details",
|
485
527
|
data: {
|
486
528
|
name
|
487
|
-
}
|
529
|
+
},
|
530
|
+
headers
|
488
531
|
});
|
489
532
|
}
|
490
533
|
function getSourceFileAssets({
|
491
534
|
source_file_id
|
492
|
-
}) {
|
535
|
+
}, headers) {
|
493
536
|
return axiosInstance({
|
494
537
|
method: "get",
|
495
|
-
url: "/source-files/" + source_file_id + "/assets"
|
538
|
+
url: "/source-files/" + source_file_id + "/assets",
|
539
|
+
headers
|
496
540
|
});
|
497
541
|
}
|
498
542
|
function getUploadTasks({
|
499
543
|
offset = 0,
|
500
544
|
limit = 10
|
501
|
-
}) {
|
545
|
+
}, headers) {
|
502
546
|
return axiosInstance({
|
503
547
|
method: "get",
|
504
548
|
url: "/upload-tasks",
|
505
549
|
params: {
|
506
550
|
offset,
|
507
551
|
limit
|
508
|
-
}
|
552
|
+
},
|
553
|
+
headers
|
509
554
|
});
|
510
555
|
}
|
511
556
|
function getUploadTask({
|
512
557
|
upload_task_id
|
513
|
-
}) {
|
558
|
+
}, headers) {
|
514
559
|
return axiosInstance({
|
515
560
|
method: "get",
|
516
|
-
url: "/upload-tasks/" + upload_task_id
|
561
|
+
url: "/upload-tasks/" + upload_task_id,
|
562
|
+
headers
|
517
563
|
});
|
518
564
|
}
|
519
565
|
function getConversionTaskMetadata({
|
520
566
|
asset_id,
|
521
567
|
filename
|
522
|
-
}) {
|
568
|
+
}, headers, responseType) {
|
523
569
|
return axiosInstance({
|
524
570
|
method: "get",
|
525
571
|
url: "/conversion_tasks/" + asset_id + "/metadata/" + filename,
|
526
|
-
|
572
|
+
headers,
|
573
|
+
responseType: responseType || "arraybuffer"
|
527
574
|
});
|
528
575
|
}
|
529
576
|
function listAssets({
|
530
577
|
offset = 0,
|
531
578
|
limit = 10,
|
532
579
|
filter
|
533
|
-
}) {
|
580
|
+
}, headers) {
|
534
581
|
return axiosInstance({
|
535
582
|
method: "get",
|
536
583
|
url: "/assets",
|
@@ -538,52 +585,58 @@ function listAssets({
|
|
538
585
|
offset,
|
539
586
|
limit,
|
540
587
|
filter
|
541
|
-
}
|
588
|
+
},
|
589
|
+
headers
|
542
590
|
});
|
543
591
|
}
|
544
592
|
function deleteAssets({
|
545
593
|
asset_ids
|
546
|
-
}) {
|
594
|
+
}, headers) {
|
547
595
|
return axiosInstance({
|
548
596
|
method: "delete",
|
549
597
|
url: "/assets",
|
550
|
-
data: asset_ids
|
598
|
+
data: asset_ids,
|
599
|
+
headers
|
551
600
|
});
|
552
601
|
}
|
553
602
|
function deleteAsset({
|
554
603
|
asset_container,
|
555
604
|
asset_id
|
556
|
-
}) {
|
605
|
+
}, headers) {
|
557
606
|
return axiosInstance({
|
558
607
|
method: "delete",
|
559
|
-
url: "/assets/" + asset_container + "/" + asset_id
|
608
|
+
url: "/assets/" + asset_container + "/" + asset_id,
|
609
|
+
headers
|
560
610
|
});
|
561
611
|
}
|
562
612
|
function getAssetSourceFile({
|
563
613
|
asset_container,
|
564
614
|
asset_id
|
565
|
-
}) {
|
615
|
+
}, headers) {
|
566
616
|
return axiosInstance({
|
567
617
|
method: "get",
|
568
|
-
url: "/assets/" + asset_container + "/" + asset_id + "/source-file"
|
618
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/source-file",
|
619
|
+
headers
|
569
620
|
});
|
570
621
|
}
|
571
622
|
function getAssetDetails({
|
572
623
|
asset_container,
|
573
624
|
asset_id
|
574
|
-
}) {
|
625
|
+
}, headers) {
|
575
626
|
return axiosInstance({
|
576
627
|
method: "get",
|
577
|
-
url: "/assets/" + asset_container + "/" + asset_id + "/details"
|
628
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/details",
|
629
|
+
headers
|
578
630
|
});
|
579
631
|
}
|
580
632
|
function getAssetFolder({
|
581
633
|
asset_container,
|
582
634
|
asset_id
|
583
|
-
}) {
|
635
|
+
}, headers) {
|
584
636
|
return axiosInstance({
|
585
637
|
method: "get",
|
586
|
-
url: "/assets/" + asset_container + "/" + asset_id + "/folder"
|
638
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/folder",
|
639
|
+
headers
|
587
640
|
});
|
588
641
|
}
|
589
642
|
function getAssetDependencies({
|
@@ -594,7 +647,7 @@ function getAssetDependencies({
|
|
594
647
|
depth = "all",
|
595
648
|
filters,
|
596
649
|
properties
|
597
|
-
}) {
|
650
|
+
}, headers) {
|
598
651
|
return axiosInstance({
|
599
652
|
method: "get",
|
600
653
|
url: "/assets/" + asset_container + "/" + asset_id + "/dependencies",
|
@@ -604,7 +657,8 @@ function getAssetDependencies({
|
|
604
657
|
depth,
|
605
658
|
filters,
|
606
659
|
properties
|
607
|
-
}
|
660
|
+
},
|
661
|
+
headers
|
608
662
|
});
|
609
663
|
}
|
610
664
|
function getAssetReferences({
|
@@ -613,7 +667,7 @@ function getAssetReferences({
|
|
613
667
|
offset = 0,
|
614
668
|
limit = 10,
|
615
669
|
properties
|
616
|
-
}) {
|
670
|
+
}, headers) {
|
617
671
|
return axiosInstance({
|
618
672
|
method: "get",
|
619
673
|
url: "/assets/" + asset_container + "/" + asset_id + "/references",
|
@@ -621,70 +675,78 @@ function getAssetReferences({
|
|
621
675
|
offset,
|
622
676
|
limit,
|
623
677
|
properties
|
624
|
-
}
|
678
|
+
},
|
679
|
+
headers
|
625
680
|
});
|
626
681
|
}
|
627
682
|
function getAssetDescription({
|
628
683
|
asset_container,
|
629
684
|
asset_id
|
630
|
-
}) {
|
685
|
+
}, headers) {
|
631
686
|
return axiosInstance({
|
632
687
|
method: "get",
|
633
|
-
url: "/assets/" + asset_container + "/" + asset_id + "/description"
|
688
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/description",
|
689
|
+
headers
|
634
690
|
});
|
635
691
|
}
|
636
692
|
function renameAsset({
|
637
693
|
asset_container,
|
638
694
|
asset_id,
|
639
695
|
name
|
640
|
-
}) {
|
696
|
+
}, headers) {
|
641
697
|
return axiosInstance({
|
642
698
|
method: "patch",
|
643
699
|
url: "/assets/" + asset_container + "/" + asset_id + "/description",
|
644
700
|
data: {
|
645
701
|
name
|
646
|
-
}
|
702
|
+
},
|
703
|
+
headers
|
647
704
|
});
|
648
705
|
}
|
649
706
|
function getAssetPayload({
|
650
707
|
asset_container_with_payload,
|
651
708
|
asset_id,
|
652
709
|
sub_resource
|
653
|
-
}) {
|
710
|
+
}, headers, responseType) {
|
654
711
|
return axiosInstance({
|
655
712
|
method: "get",
|
656
713
|
url: "/assets/" + asset_container_with_payload + "/" + asset_id + "/payload",
|
657
|
-
responseType: "arraybuffer",
|
658
714
|
params: {
|
659
715
|
sub_resource
|
660
|
-
}
|
716
|
+
},
|
717
|
+
headers,
|
718
|
+
responseType: responseType || "arraybuffer"
|
661
719
|
});
|
662
720
|
}
|
663
721
|
function getAssetHistory({
|
664
722
|
asset_container,
|
665
723
|
asset_id
|
666
|
-
}) {
|
724
|
+
}, headers) {
|
667
725
|
return axiosInstance({
|
668
726
|
method: "get",
|
669
|
-
url: "/assets/" + asset_container + "/" + asset_id + "/history"
|
727
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/history",
|
728
|
+
headers
|
670
729
|
});
|
671
730
|
}
|
672
731
|
function getAssetMeta({
|
673
732
|
asset_container,
|
674
733
|
asset_id
|
675
|
-
}) {
|
734
|
+
}, headers) {
|
676
735
|
return axiosInstance({
|
677
736
|
method: "get",
|
678
|
-
url: "/assets/" + asset_container + "/" + asset_id + "/meta"
|
737
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/meta",
|
738
|
+
headers
|
679
739
|
});
|
680
740
|
}
|
681
741
|
function getAssetCode({
|
682
742
|
asset_container_with_code,
|
683
743
|
asset_id
|
684
|
-
}) {
|
744
|
+
}, headers) {
|
685
745
|
return axiosInstance({
|
686
746
|
method: "get",
|
687
|
-
url: "/assets/" + asset_container_with_code + "/" + asset_id + "/code"
|
747
|
+
url: "/assets/" + asset_container_with_code + "/" + asset_id + "/code",
|
748
|
+
headers,
|
749
|
+
responseType: "text"
|
688
750
|
});
|
689
751
|
}
|
690
752
|
function getAssetThumbnail({
|
@@ -692,48 +754,53 @@ function getAssetThumbnail({
|
|
692
754
|
asset_id,
|
693
755
|
size,
|
694
756
|
default_url
|
695
|
-
}) {
|
757
|
+
}, headers, responseType) {
|
696
758
|
return axiosInstance({
|
697
759
|
method: "get",
|
698
760
|
url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
|
699
|
-
responseType: "arraybuffer",
|
700
761
|
params: {
|
701
762
|
size,
|
702
763
|
default_url
|
703
|
-
}
|
764
|
+
},
|
765
|
+
headers,
|
766
|
+
responseType: responseType || "arraybuffer"
|
704
767
|
});
|
705
768
|
}
|
706
769
|
function setAssetThumbnail({
|
707
770
|
asset_container,
|
708
771
|
asset_id,
|
709
772
|
body
|
710
|
-
}, contentType) {
|
773
|
+
}, contentType, headers) {
|
711
774
|
return axiosInstance({
|
712
775
|
method: "put",
|
713
776
|
url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
|
777
|
+
data: body,
|
778
|
+
maxRedirects: 0,
|
714
779
|
headers: {
|
715
|
-
"Content-Type": contentType
|
716
|
-
|
717
|
-
|
780
|
+
"Content-Type": contentType,
|
781
|
+
...headers
|
782
|
+
}
|
718
783
|
});
|
719
784
|
}
|
720
785
|
function getAssetCustomTypes({
|
721
786
|
asset_container_with_custom_types,
|
722
787
|
asset_id
|
723
|
-
}) {
|
788
|
+
}, headers) {
|
724
789
|
return axiosInstance({
|
725
790
|
method: "get",
|
726
|
-
url: "/assets/" + asset_container_with_custom_types + "/" + asset_id + "/custom-types"
|
791
|
+
url: "/assets/" + asset_container_with_custom_types + "/" + asset_id + "/custom-types",
|
792
|
+
headers
|
727
793
|
});
|
728
794
|
}
|
729
795
|
function packageAsset({
|
730
796
|
asset_container,
|
731
797
|
asset_id
|
732
|
-
}) {
|
798
|
+
}, headers, responseType) {
|
733
799
|
return axiosInstance({
|
734
800
|
method: "get",
|
735
801
|
url: "/assets/" + asset_container + "/" + asset_id + "/package",
|
736
|
-
|
802
|
+
headers,
|
803
|
+
responseType: responseType || "arraybuffer"
|
737
804
|
});
|
738
805
|
}
|
739
806
|
function exportAsset({
|
@@ -742,100 +809,109 @@ function exportAsset({
|
|
742
809
|
format,
|
743
810
|
scale = 1,
|
744
811
|
sub_mesh_index
|
745
|
-
}) {
|
812
|
+
}, headers, responseType) {
|
746
813
|
return axiosInstance({
|
747
814
|
method: "get",
|
748
815
|
url: "/assets/" + asset_container_exportable + "/" + asset_id + "/exports/" + format,
|
749
|
-
responseType: "arraybuffer",
|
750
816
|
params: {
|
751
817
|
scale,
|
752
818
|
sub_mesh_index
|
753
|
-
}
|
819
|
+
},
|
820
|
+
headers,
|
821
|
+
responseType: responseType || "arraybuffer"
|
754
822
|
});
|
755
823
|
}
|
756
824
|
function getSceneSessions({
|
757
825
|
scene_id
|
758
|
-
}) {
|
826
|
+
}, headers) {
|
759
827
|
return axiosInstance({
|
760
828
|
method: "get",
|
761
|
-
url: "/assets/scenes/" + scene_id + "/sessions"
|
829
|
+
url: "/assets/scenes/" + scene_id + "/sessions",
|
830
|
+
headers
|
762
831
|
});
|
763
832
|
}
|
764
833
|
function getSceneAABB({
|
765
834
|
scene_id
|
766
|
-
}) {
|
835
|
+
}, headers) {
|
767
836
|
return axiosInstance({
|
768
837
|
method: "get",
|
769
|
-
url: "/assets/scenes/" + scene_id + "/aabb"
|
838
|
+
url: "/assets/scenes/" + scene_id + "/aabb",
|
839
|
+
headers
|
770
840
|
});
|
771
841
|
}
|
772
842
|
function createEntity({
|
773
843
|
scene_id,
|
774
844
|
entity_components
|
775
|
-
}) {
|
845
|
+
}, headers) {
|
776
846
|
return axiosInstance({
|
777
847
|
method: "post",
|
778
848
|
url: "/assets/scenes/" + scene_id + "/entities",
|
779
|
-
data: entity_components
|
849
|
+
data: entity_components,
|
850
|
+
headers
|
780
851
|
});
|
781
852
|
}
|
782
853
|
function getEntity({
|
783
854
|
scene_id,
|
784
855
|
entity_id,
|
785
856
|
compute_global_transform = false
|
786
|
-
}) {
|
857
|
+
}, headers) {
|
787
858
|
return axiosInstance({
|
788
859
|
method: "get",
|
789
860
|
url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
|
790
861
|
params: {
|
791
862
|
compute_global_transform
|
792
|
-
}
|
863
|
+
},
|
864
|
+
headers
|
793
865
|
});
|
794
866
|
}
|
795
867
|
function updateEntity({
|
796
868
|
scene_id,
|
797
869
|
entity_id,
|
798
870
|
entity_components
|
799
|
-
}) {
|
871
|
+
}, headers) {
|
800
872
|
return axiosInstance({
|
801
873
|
method: "patch",
|
802
874
|
url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
|
803
|
-
data: entity_components
|
875
|
+
data: entity_components,
|
876
|
+
headers
|
804
877
|
});
|
805
878
|
}
|
806
879
|
function deleteEntity({
|
807
880
|
scene_id,
|
808
881
|
entity_id
|
809
|
-
}) {
|
882
|
+
}, headers) {
|
810
883
|
return axiosInstance({
|
811
884
|
method: "delete",
|
812
|
-
url: "/assets/scenes/" + scene_id + "/entities/" + entity_id
|
885
|
+
url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
|
886
|
+
headers
|
813
887
|
});
|
814
888
|
}
|
815
889
|
function getSceneSettings({
|
816
890
|
scene_id
|
817
|
-
}) {
|
891
|
+
}, headers) {
|
818
892
|
return axiosInstance({
|
819
893
|
method: "get",
|
820
|
-
url: "/assets/scenes/" + scene_id + "/settings"
|
894
|
+
url: "/assets/scenes/" + scene_id + "/settings",
|
895
|
+
headers
|
821
896
|
});
|
822
897
|
}
|
823
898
|
function getRunningSessions({
|
824
899
|
filters
|
825
|
-
}) {
|
900
|
+
}, headers) {
|
826
901
|
return axiosInstance({
|
827
902
|
method: "get",
|
828
903
|
url: "/sessions",
|
829
904
|
params: {
|
830
905
|
filters
|
831
|
-
}
|
906
|
+
},
|
907
|
+
headers
|
832
908
|
});
|
833
909
|
}
|
834
910
|
function createSession({
|
835
911
|
scene_id,
|
836
912
|
renderer_version,
|
837
913
|
is_transient = false
|
838
|
-
}) {
|
914
|
+
}, headers) {
|
839
915
|
return axiosInstance({
|
840
916
|
method: "post",
|
841
917
|
url: "/sessions",
|
@@ -843,54 +919,61 @@ function createSession({
|
|
843
919
|
scene_id,
|
844
920
|
renderer_version,
|
845
921
|
is_transient
|
846
|
-
}
|
922
|
+
},
|
923
|
+
headers
|
847
924
|
});
|
848
925
|
}
|
849
926
|
function getSession({
|
850
927
|
session_id
|
851
|
-
}) {
|
928
|
+
}, headers) {
|
852
929
|
return axiosInstance({
|
853
930
|
method: "get",
|
854
|
-
url: "/sessions/" + session_id
|
931
|
+
url: "/sessions/" + session_id,
|
932
|
+
headers
|
855
933
|
});
|
856
934
|
}
|
857
935
|
function killSession({
|
858
936
|
session_id
|
859
|
-
}) {
|
937
|
+
}, headers) {
|
860
938
|
return axiosInstance({
|
861
939
|
method: "delete",
|
862
|
-
url: "/sessions/" + session_id
|
940
|
+
url: "/sessions/" + session_id,
|
941
|
+
headers
|
863
942
|
});
|
864
943
|
}
|
865
944
|
function joinSession({
|
866
945
|
session_id
|
867
|
-
}) {
|
946
|
+
}, headers) {
|
868
947
|
return axiosInstance({
|
869
948
|
method: "post",
|
870
|
-
url: "/sessions/" + session_id + "/clients"
|
949
|
+
url: "/sessions/" + session_id + "/clients",
|
950
|
+
headers
|
871
951
|
});
|
872
952
|
}
|
873
953
|
function kickClientFromSession({
|
874
954
|
session_id,
|
875
955
|
client_id
|
876
|
-
}) {
|
956
|
+
}, headers) {
|
877
957
|
return axiosInstance({
|
878
958
|
method: "delete",
|
879
|
-
url: "/sessions/" + session_id + "/clients/" + client_id
|
959
|
+
url: "/sessions/" + session_id + "/clients/" + client_id,
|
960
|
+
headers
|
880
961
|
});
|
881
962
|
}
|
882
|
-
function joinSessionAsGuest() {
|
963
|
+
function joinSessionAsGuest(headers) {
|
883
964
|
return axiosInstance({
|
884
965
|
method: "post",
|
885
|
-
url: "/sessions/guests"
|
966
|
+
url: "/sessions/guests",
|
967
|
+
headers
|
886
968
|
});
|
887
969
|
}
|
888
970
|
function generateGuestToken({
|
889
971
|
session_id
|
890
|
-
}) {
|
972
|
+
}, headers) {
|
891
973
|
return axiosInstance({
|
892
974
|
method: "post",
|
893
|
-
url: "/sessions/" + session_id + "/guests"
|
975
|
+
url: "/sessions/" + session_id + "/guests",
|
976
|
+
headers
|
894
977
|
});
|
895
978
|
}
|
896
979
|
|