@3dverse/api 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.mjs CHANGED
@@ -4,8 +4,7 @@ import axiosRetry, { isNetworkError, isIdempotentRequestError } from "axios-retr
4
4
  // _prebuild/wrapper.ts
5
5
  import axios from "axios";
6
6
  var axiosInstance = axios.create({
7
- baseURL: "https://api.3dverse.com/app/v1",
8
- operationId: "3dverse"
7
+ baseURL: "https://api.3dverse.com/app/v1"
9
8
  });
10
9
  function setBaseURL(baseURL) {
11
10
  axiosInstance.defaults.baseURL = baseURL;
@@ -15,7 +14,6 @@ function listUsers({
15
14
  limit = 10
16
15
  }) {
17
16
  return axiosInstance({
18
- operationId: "listUsers",
19
17
  method: "get",
20
18
  url: "/users",
21
19
  params: {
@@ -28,7 +26,6 @@ function registerUser({
28
26
  username
29
27
  }) {
30
28
  return axiosInstance({
31
- operationId: "registerUser",
32
29
  method: "post",
33
30
  url: "/users",
34
31
  data: {
@@ -40,7 +37,6 @@ function getUser({
40
37
  user_id
41
38
  }) {
42
39
  return axiosInstance({
43
- operationId: "getUser",
44
40
  method: "get",
45
41
  url: "/users/" + user_id
46
42
  });
@@ -50,7 +46,6 @@ function updateUser({
50
46
  username
51
47
  }) {
52
48
  return axiosInstance({
53
- operationId: "updateUser",
54
49
  method: "patch",
55
50
  url: "/users/" + user_id,
56
51
  data: {
@@ -62,7 +57,6 @@ function deleteUser({
62
57
  user_id
63
58
  }) {
64
59
  return axiosInstance({
65
- operationId: "deleteUser",
66
60
  method: "delete",
67
61
  url: "/users/" + user_id
68
62
  });
@@ -73,7 +67,6 @@ function generateUserToken({
73
67
  ttl = "1h"
74
68
  }) {
75
69
  return axiosInstance({
76
- operationId: "generateUserToken",
77
70
  method: "post",
78
71
  url: "/users/" + user_id + "/tokens",
79
72
  data: {
@@ -86,7 +79,6 @@ function getUserGroups({
86
79
  user_id
87
80
  }) {
88
81
  return axiosInstance({
89
- operationId: "getUserGroups",
90
82
  method: "get",
91
83
  url: "/users/" + user_id + "/groups"
92
84
  });
@@ -97,7 +89,6 @@ function getUserUploadTasks({
97
89
  limit = 10
98
90
  }) {
99
91
  return axiosInstance({
100
- operationId: "getUserUploadTasks",
101
92
  method: "get",
102
93
  url: "/users/" + user_id + "/upload-tasks",
103
94
  params: {
@@ -112,7 +103,6 @@ function createGroup({
112
103
  members
113
104
  }) {
114
105
  return axiosInstance({
115
- operationId: "createGroup",
116
106
  method: "post",
117
107
  url: "/groups",
118
108
  data: {
@@ -126,7 +116,6 @@ function getGroup({
126
116
  group_id
127
117
  }) {
128
118
  return axiosInstance({
129
- operationId: "getGroup",
130
119
  method: "get",
131
120
  url: "/groups/" + group_id
132
121
  });
@@ -137,7 +126,6 @@ function updateGroupDescription({
137
126
  description
138
127
  }) {
139
128
  return axiosInstance({
140
- operationId: "updateGroupDescription",
141
129
  method: "patch",
142
130
  url: "/groups/" + group_id,
143
131
  data: {
@@ -150,7 +138,6 @@ function deleteGroup({
150
138
  group_id
151
139
  }) {
152
140
  return axiosInstance({
153
- operationId: "deleteGroup",
154
141
  method: "delete",
155
142
  url: "/groups/" + group_id
156
143
  });
@@ -163,7 +150,6 @@ function grantMemberAccessToGroup({
163
150
  folder_access
164
151
  }) {
165
152
  return axiosInstance({
166
- operationId: "grantMemberAccessToGroup",
167
153
  method: "put",
168
154
  url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id,
169
155
  data: {
@@ -178,7 +164,6 @@ function revokeMemberAccessToGroup({
178
164
  member_id
179
165
  }) {
180
166
  return axiosInstance({
181
- operationId: "revokeMemberAccessToGroup",
182
167
  method: "delete",
183
168
  url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id
184
169
  });
@@ -188,7 +173,6 @@ function listFolders({
188
173
  limit = 10
189
174
  }) {
190
175
  return axiosInstance({
191
- operationId: "listFolders",
192
176
  method: "get",
193
177
  url: "/folders",
194
178
  params: {
@@ -202,7 +186,6 @@ function createFolder({
202
186
  subfolders
203
187
  }) {
204
188
  return axiosInstance({
205
- operationId: "createFolder",
206
189
  method: "post",
207
190
  url: "/folders",
208
191
  data: {
@@ -215,20 +198,18 @@ function getFolderInfo({
215
198
  folder_id
216
199
  }) {
217
200
  return axiosInstance({
218
- operationId: "getFolderInfo",
219
201
  method: "get",
220
202
  url: "/folders/" + folder_id
221
203
  });
222
204
  }
223
205
  function moveFolders({
224
206
  folder_id,
225
- folderIds
207
+ folder_ids
226
208
  }) {
227
209
  return axiosInstance({
228
- operationId: "moveFolders",
229
210
  method: "put",
230
211
  url: "/folders/" + folder_id,
231
- data: folderIds
212
+ data: folder_ids
232
213
  });
233
214
  }
234
215
  function updateFolder({
@@ -236,7 +217,6 @@ function updateFolder({
236
217
  name
237
218
  }) {
238
219
  return axiosInstance({
239
- operationId: "updateFolder",
240
220
  method: "patch",
241
221
  url: "/folders/" + folder_id,
242
222
  data: {
@@ -248,7 +228,6 @@ function deleteFolder({
248
228
  folder_id
249
229
  }) {
250
230
  return axiosInstance({
251
- operationId: "deleteFolder",
252
231
  method: "delete",
253
232
  url: "/folders/" + folder_id
254
233
  });
@@ -257,7 +236,6 @@ function listFolderAccesses({
257
236
  folder_id
258
237
  }) {
259
238
  return axiosInstance({
260
- operationId: "listFolderAccesses",
261
239
  method: "get",
262
240
  url: "/folders/" + folder_id + "/access"
263
241
  });
@@ -269,7 +247,6 @@ function grantMemberAccessToFolder({
269
247
  access
270
248
  }) {
271
249
  return axiosInstance({
272
- operationId: "grantMemberAccessToFolder",
273
250
  method: "put",
274
251
  url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id,
275
252
  data: {
@@ -283,7 +260,6 @@ function revokeMemberAccessToFolder({
283
260
  member_id
284
261
  }) {
285
262
  return axiosInstance({
286
- operationId: "revokeMemberAccessToFolder",
287
263
  method: "delete",
288
264
  url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id
289
265
  });
@@ -294,7 +270,6 @@ function createSubfolder({
294
270
  subfolders
295
271
  }) {
296
272
  return axiosInstance({
297
- operationId: "createSubfolder",
298
273
  method: "post",
299
274
  url: "/folders/" + folder_id + "/folders",
300
275
  data: {
@@ -308,7 +283,6 @@ function listFolderSubFolders({
308
283
  depth = 0
309
284
  }) {
310
285
  return axiosInstance({
311
- operationId: "listFolderSubFolders",
312
286
  method: "get",
313
287
  url: "/folders/" + folder_id + "/folders",
314
288
  params: {
@@ -322,7 +296,6 @@ function getSourceFilesInFolder({
322
296
  limit = 10
323
297
  }) {
324
298
  return axiosInstance({
325
- operationId: "getSourceFilesInFolder",
326
299
  method: "get",
327
300
  url: "/folders/" + folder_id + "/source-files",
328
301
  params: {
@@ -333,13 +306,12 @@ function getSourceFilesInFolder({
333
306
  }
334
307
  function moveSourceFiles({
335
308
  folder_id,
336
- sourceFileIds
309
+ source_file_ids
337
310
  }) {
338
311
  return axiosInstance({
339
- operationId: "moveSourceFiles",
340
312
  method: "put",
341
313
  url: "/folders/" + folder_id + "/source-files",
342
- data: sourceFileIds
314
+ data: source_file_ids
343
315
  });
344
316
  }
345
317
  function getUploadTasksInFolder({
@@ -348,7 +320,6 @@ function getUploadTasksInFolder({
348
320
  limit = 10
349
321
  }) {
350
322
  return axiosInstance({
351
- operationId: "getUploadTasksInFolder",
352
323
  method: "get",
353
324
  url: "/folders/" + folder_id + "/upload-tasks",
354
325
  params: {
@@ -364,7 +335,6 @@ function getFolderAssets({
364
335
  filter
365
336
  }) {
366
337
  return axiosInstance({
367
- operationId: "getFolderAssets",
368
338
  method: "get",
369
339
  url: "/folders/" + folder_id + "/assets",
370
340
  params: {
@@ -374,34 +344,30 @@ function getFolderAssets({
374
344
  }
375
345
  });
376
346
  }
377
- function moveAssets({
347
+ function createAsset({
378
348
  folder_id,
379
- assetIds
349
+ asset_creation_options
380
350
  }) {
381
351
  return axiosInstance({
382
- operationId: "moveAssets",
383
- method: "put",
352
+ method: "post",
384
353
  url: "/folders/" + folder_id + "/assets",
385
- data: assetIds
354
+ data: asset_creation_options
386
355
  });
387
356
  }
388
- function createAsset({
357
+ function moveAssets({
389
358
  folder_id,
390
- asset_container_creatable,
391
- assetCreationOptions
359
+ asset_ids
392
360
  }) {
393
361
  return axiosInstance({
394
- operationId: "createAsset",
395
- method: "post",
396
- url: "/folders/" + folder_id + "/assets/" + asset_container_creatable,
397
- data: assetCreationOptions
362
+ method: "put",
363
+ url: "/folders/" + folder_id + "/assets",
364
+ data: asset_ids
398
365
  });
399
366
  }
400
367
  function getSessionsInFolder({
401
368
  folder_id
402
369
  }) {
403
370
  return axiosInstance({
404
- operationId: "getSessionsInFolder",
405
371
  method: "get",
406
372
  url: "/folders/" + folder_id + "/sessions"
407
373
  });
@@ -411,7 +377,6 @@ function listSourceFiles({
411
377
  limit = 10
412
378
  }) {
413
379
  return axiosInstance({
414
- operationId: "listSourceFiles",
415
380
  method: "get",
416
381
  url: "/source-files",
417
382
  params: {
@@ -421,20 +386,18 @@ function listSourceFiles({
421
386
  });
422
387
  }
423
388
  function deleteSourceFiles({
424
- sourceFileIds
389
+ source_file_ids
425
390
  }) {
426
391
  return axiosInstance({
427
- operationId: "deleteSourceFiles",
428
392
  method: "delete",
429
393
  url: "/source-files",
430
- data: sourceFileIds
394
+ data: source_file_ids
431
395
  });
432
396
  }
433
397
  function downloadSourceFile({
434
398
  source_file_id
435
399
  }) {
436
400
  return axiosInstance({
437
- operationId: "downloadSourceFile",
438
401
  method: "get",
439
402
  url: "/source-files/" + source_file_id,
440
403
  responseType: "arraybuffer"
@@ -444,7 +407,6 @@ function getSourceFileDetails({
444
407
  source_file_id
445
408
  }) {
446
409
  return axiosInstance({
447
- operationId: "getSourceFileDetails",
448
410
  method: "get",
449
411
  url: "/source-files/" + source_file_id + "/details"
450
412
  });
@@ -454,7 +416,6 @@ function updateSourceFileDetails({
454
416
  name
455
417
  }) {
456
418
  return axiosInstance({
457
- operationId: "updateSourceFileDetails",
458
419
  method: "patch",
459
420
  url: "/source-files/" + source_file_id + "/details",
460
421
  data: {
@@ -466,7 +427,6 @@ function getSourceFileAssets({
466
427
  source_file_id
467
428
  }) {
468
429
  return axiosInstance({
469
- operationId: "getSourceFileAssets",
470
430
  method: "get",
471
431
  url: "/source-files/" + source_file_id + "/assets"
472
432
  });
@@ -476,7 +436,6 @@ function getUploadTasks({
476
436
  limit = 10
477
437
  }) {
478
438
  return axiosInstance({
479
- operationId: "getUploadTasks",
480
439
  method: "get",
481
440
  url: "/upload-tasks",
482
441
  params: {
@@ -489,7 +448,6 @@ function getUploadTask({
489
448
  upload_task_id
490
449
  }) {
491
450
  return axiosInstance({
492
- operationId: "getUploadTask",
493
451
  method: "get",
494
452
  url: "/upload-tasks/" + upload_task_id
495
453
  });
@@ -499,7 +457,6 @@ function listAssets({
499
457
  limit = 10
500
458
  }) {
501
459
  return axiosInstance({
502
- operationId: "listAssets",
503
460
  method: "get",
504
461
  url: "/assets",
505
462
  params: {
@@ -509,13 +466,12 @@ function listAssets({
509
466
  });
510
467
  }
511
468
  function deleteAssets({
512
- assetIds
469
+ asset_ids
513
470
  }) {
514
471
  return axiosInstance({
515
- operationId: "deleteAssets",
516
472
  method: "delete",
517
473
  url: "/assets",
518
- data: assetIds
474
+ data: asset_ids
519
475
  });
520
476
  }
521
477
  function deleteAsset({
@@ -523,7 +479,6 @@ function deleteAsset({
523
479
  asset_id
524
480
  }) {
525
481
  return axiosInstance({
526
- operationId: "deleteAsset",
527
482
  method: "delete",
528
483
  url: "/assets/" + asset_container + "/" + asset_id
529
484
  });
@@ -533,7 +488,6 @@ function getAssetSourceFile({
533
488
  asset_id
534
489
  }) {
535
490
  return axiosInstance({
536
- operationId: "getAssetSourceFile",
537
491
  method: "get",
538
492
  url: "/assets/" + asset_container + "/" + asset_id + "/source-file"
539
493
  });
@@ -543,7 +497,6 @@ function getAssetDetails({
543
497
  asset_id
544
498
  }) {
545
499
  return axiosInstance({
546
- operationId: "getAssetDetails",
547
500
  method: "get",
548
501
  url: "/assets/" + asset_container + "/" + asset_id + "/details"
549
502
  });
@@ -553,7 +506,6 @@ function getAssetFolder({
553
506
  asset_id
554
507
  }) {
555
508
  return axiosInstance({
556
- operationId: "getAssetFolder",
557
509
  method: "get",
558
510
  url: "/assets/" + asset_container + "/" + asset_id + "/folder"
559
511
  });
@@ -566,7 +518,6 @@ function getAssetDependencies({
566
518
  filter
567
519
  }) {
568
520
  return axiosInstance({
569
- operationId: "getAssetDependencies",
570
521
  method: "get",
571
522
  url: "/assets/" + asset_container + "/" + asset_id + "/dependencies",
572
523
  params: {
@@ -581,7 +532,6 @@ function getAssetReferences({
581
532
  asset_id
582
533
  }) {
583
534
  return axiosInstance({
584
- operationId: "getAssetReferences",
585
535
  method: "get",
586
536
  url: "/assets/" + asset_container + "/" + asset_id + "/references"
587
537
  });
@@ -591,7 +541,6 @@ function getAssetDescription({
591
541
  asset_id
592
542
  }) {
593
543
  return axiosInstance({
594
- operationId: "getAssetDescription",
595
544
  method: "get",
596
545
  url: "/assets/" + asset_container + "/" + asset_id + "/description"
597
546
  });
@@ -602,7 +551,6 @@ function renameAsset({
602
551
  name
603
552
  }) {
604
553
  return axiosInstance({
605
- operationId: "renameAsset",
606
554
  method: "patch",
607
555
  url: "/assets/" + asset_container + "/" + asset_id + "/description",
608
556
  data: {
@@ -615,7 +563,6 @@ function getAssetPayload({
615
563
  asset_id
616
564
  }) {
617
565
  return axiosInstance({
618
- operationId: "getAssetPayload",
619
566
  method: "get",
620
567
  url: "/assets/" + asset_container_with_payload + "/" + asset_id + "/payload",
621
568
  responseType: "arraybuffer"
@@ -626,7 +573,6 @@ function getAssetHistory({
626
573
  asset_id
627
574
  }) {
628
575
  return axiosInstance({
629
- operationId: "getAssetHistory",
630
576
  method: "get",
631
577
  url: "/assets/" + asset_container + "/" + asset_id + "/history"
632
578
  });
@@ -636,7 +582,6 @@ function getAssetMeta({
636
582
  asset_id
637
583
  }) {
638
584
  return axiosInstance({
639
- operationId: "getAssetMeta",
640
585
  method: "get",
641
586
  url: "/assets/" + asset_container + "/" + asset_id + "/meta"
642
587
  });
@@ -646,7 +591,6 @@ function getAssetCode({
646
591
  asset_id
647
592
  }) {
648
593
  return axiosInstance({
649
- operationId: "getAssetCode",
650
594
  method: "get",
651
595
  url: "/assets/" + asset_container_with_code + "/" + asset_id + "/code"
652
596
  });
@@ -658,7 +602,6 @@ function getAssetThumbnail({
658
602
  default_url
659
603
  }) {
660
604
  return axiosInstance({
661
- operationId: "getAssetThumbnail",
662
605
  method: "get",
663
606
  url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
664
607
  responseType: "arraybuffer",
@@ -674,7 +617,6 @@ function setAssetThumbnail({
674
617
  body
675
618
  }, contentType) {
676
619
  return axiosInstance({
677
- operationId: "setAssetThumbnail",
678
620
  method: "put",
679
621
  url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
680
622
  headers: {
@@ -688,7 +630,6 @@ function getAssetCustomTypes({
688
630
  asset_id
689
631
  }) {
690
632
  return axiosInstance({
691
- operationId: "getAssetCustomTypes",
692
633
  method: "get",
693
634
  url: "/assets/" + asset_container_with_custom_types + "/" + asset_id + "/custom-types"
694
635
  });
@@ -698,7 +639,6 @@ function packageAsset({
698
639
  asset_id
699
640
  }) {
700
641
  return axiosInstance({
701
- operationId: "packageAsset",
702
642
  method: "get",
703
643
  url: "/assets/" + asset_container + "/" + asset_id + "/package",
704
644
  responseType: "arraybuffer"
@@ -711,7 +651,6 @@ function exportAsset({
711
651
  scale = 1
712
652
  }) {
713
653
  return axiosInstance({
714
- operationId: "exportAsset",
715
654
  method: "get",
716
655
  url: "/assets/" + asset_container_exportable + "/" + asset_id + "/exports/" + format,
717
656
  responseType: "arraybuffer",
@@ -724,7 +663,6 @@ function getSceneSessions({
724
663
  scene_id
725
664
  }) {
726
665
  return axiosInstance({
727
- operationId: "getSceneSessions",
728
666
  method: "get",
729
667
  url: "/assets/scenes/" + scene_id + "/sessions"
730
668
  });
@@ -733,7 +671,6 @@ function getSceneAABB({
733
671
  scene_id
734
672
  }) {
735
673
  return axiosInstance({
736
- operationId: "getSceneAABB",
737
674
  method: "get",
738
675
  url: "/assets/scenes/" + scene_id + "/aabb"
739
676
  });
@@ -744,7 +681,6 @@ function getEntity({
744
681
  compute_global_transform = false
745
682
  }) {
746
683
  return axiosInstance({
747
- operationId: "getEntity",
748
684
  method: "get",
749
685
  url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
750
686
  params: {
@@ -755,13 +691,12 @@ function getEntity({
755
691
  function updateEntity({
756
692
  scene_id,
757
693
  entity_id,
758
- entityComponents
694
+ entity_components
759
695
  }) {
760
696
  return axiosInstance({
761
- operationId: "updateEntity",
762
697
  method: "patch",
763
698
  url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
764
- data: entityComponents
699
+ data: entity_components
765
700
  });
766
701
  }
767
702
  function deleteEntity({
@@ -769,7 +704,6 @@ function deleteEntity({
769
704
  entity_id
770
705
  }) {
771
706
  return axiosInstance({
772
- operationId: "deleteEntity",
773
707
  method: "delete",
774
708
  url: "/assets/scenes/" + scene_id + "/entities/" + entity_id
775
709
  });
@@ -779,7 +713,6 @@ function createSession({
779
713
  renderer_version
780
714
  }) {
781
715
  return axiosInstance({
782
- operationId: "createSession",
783
716
  method: "post",
784
717
  url: "/sessions",
785
718
  data: {
@@ -792,7 +725,6 @@ function getSession({
792
725
  session_id
793
726
  }) {
794
727
  return axiosInstance({
795
- operationId: "getSession",
796
728
  method: "get",
797
729
  url: "/sessions/" + session_id
798
730
  });
@@ -801,7 +733,6 @@ function killSession({
801
733
  session_id
802
734
  }) {
803
735
  return axiosInstance({
804
- operationId: "killSession",
805
736
  method: "delete",
806
737
  url: "/sessions/" + session_id
807
738
  });
@@ -810,7 +741,6 @@ function joinSession({
810
741
  session_id
811
742
  }) {
812
743
  return axiosInstance({
813
- operationId: "joinSession",
814
744
  method: "post",
815
745
  url: "/sessions/" + session_id + "/clients"
816
746
  });
@@ -820,14 +750,12 @@ function kickClientFromSession({
820
750
  client_id
821
751
  }) {
822
752
  return axiosInstance({
823
- operationId: "kickClientFromSession",
824
753
  method: "delete",
825
754
  url: "/sessions/" + session_id + "/clients/" + client_id
826
755
  });
827
756
  }
828
757
  function joinSessionAsGuest() {
829
758
  return axiosInstance({
830
- operationId: "joinSessionAsGuest",
831
759
  method: "post",
832
760
  url: "/sessions/guests"
833
761
  });
@@ -836,7 +764,6 @@ function generateGuestToken({
836
764
  session_id
837
765
  }) {
838
766
  return axiosInstance({
839
- operationId: "generateGuestToken",
840
767
  method: "post",
841
768
  url: "/sessions/" + session_id + "/guests"
842
769
  });
@@ -927,7 +854,6 @@ function uploadSourceFiles({
927
854
  onUploadProgress
928
855
  }) {
929
856
  return axiosInstance({
930
- operationId: "uploadSourceFiles",
931
857
  method: "post",
932
858
  url: `/folders/${folder_id}/source-files`,
933
859
  headers: {