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