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