@3dverse/api 0.10.2 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/_prebuild/wrapper.d.ts +4238 -965
- package/dist/index.js +201 -354
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +182 -324
- package/dist/index.mjs.map +2 -2
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -49,20 +49,6 @@ var axiosInstance = axios.create({
|
|
|
49
49
|
function setBaseURL(baseURL) {
|
|
50
50
|
axiosInstance.defaults.baseURL = baseURL;
|
|
51
51
|
}
|
|
52
|
-
var AssetSourceFileNotFound = class extends ServiceErrorResponse {
|
|
53
|
-
static ERROR_CODE = 1018;
|
|
54
|
-
constructor(serviceError) {
|
|
55
|
-
super(1018, 404, "The asset was imported from no source file", serviceError);
|
|
56
|
-
Object.assign(this, serviceError);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
var InsufficientPermissions = class extends ServiceErrorResponse {
|
|
60
|
-
static ERROR_CODE = 1002;
|
|
61
|
-
constructor(serviceError) {
|
|
62
|
-
super(1002, 403, "Insufficient permissions", serviceError);
|
|
63
|
-
Object.assign(this, serviceError);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
52
|
var InvalidAuthorization = class extends ServiceErrorResponse {
|
|
67
53
|
static ERROR_CODE = 1003;
|
|
68
54
|
constructor(serviceError) {
|
|
@@ -77,45 +63,45 @@ var InsufficientSecurityScope = class extends ServiceErrorResponse {
|
|
|
77
63
|
Object.assign(this, serviceError);
|
|
78
64
|
}
|
|
79
65
|
};
|
|
80
|
-
var
|
|
81
|
-
static ERROR_CODE =
|
|
66
|
+
var InsufficientPermissions = class extends ServiceErrorResponse {
|
|
67
|
+
static ERROR_CODE = 1002;
|
|
82
68
|
constructor(serviceError) {
|
|
83
|
-
super(
|
|
69
|
+
super(1002, 403, "Insufficient permissions", serviceError);
|
|
84
70
|
Object.assign(this, serviceError);
|
|
85
71
|
}
|
|
86
72
|
};
|
|
87
|
-
var
|
|
88
|
-
static ERROR_CODE =
|
|
73
|
+
var InvalidTokenTtl = class extends ServiceErrorResponse {
|
|
74
|
+
static ERROR_CODE = 1017;
|
|
89
75
|
constructor(serviceError) {
|
|
90
|
-
super(
|
|
76
|
+
super(1017, 400, "The time to live of a user token is a duration from 1 minute to 14 days", serviceError);
|
|
91
77
|
Object.assign(this, serviceError);
|
|
92
78
|
}
|
|
93
79
|
};
|
|
94
|
-
var
|
|
95
|
-
static ERROR_CODE =
|
|
80
|
+
var InvalidParameter = class extends ServiceErrorResponse {
|
|
81
|
+
static ERROR_CODE = 1;
|
|
96
82
|
constructor(serviceError) {
|
|
97
|
-
super(
|
|
83
|
+
super(1, 400, "Invalid parameter", serviceError);
|
|
98
84
|
Object.assign(this, serviceError);
|
|
99
85
|
}
|
|
100
86
|
};
|
|
101
|
-
var
|
|
102
|
-
static ERROR_CODE =
|
|
87
|
+
var MemberAccessesDiffer = class extends ServiceErrorResponse {
|
|
88
|
+
static ERROR_CODE = 1020;
|
|
103
89
|
constructor(serviceError) {
|
|
104
|
-
super(
|
|
90
|
+
super(1020, 422, "A member's group and folder accesses differ, while it holds a single role", serviceError);
|
|
105
91
|
Object.assign(this, serviceError);
|
|
106
92
|
}
|
|
107
93
|
};
|
|
108
|
-
var
|
|
109
|
-
static ERROR_CODE =
|
|
94
|
+
var InvalidMaterial = class extends ServiceErrorResponse {
|
|
95
|
+
static ERROR_CODE = 1013;
|
|
110
96
|
constructor(serviceError) {
|
|
111
|
-
super(
|
|
97
|
+
super(1013, 400, "Some of the asset ids are not materials", serviceError);
|
|
112
98
|
Object.assign(this, serviceError);
|
|
113
99
|
}
|
|
114
100
|
};
|
|
115
|
-
var
|
|
116
|
-
static ERROR_CODE =
|
|
101
|
+
var InvalidRequest = class extends ServiceErrorResponse {
|
|
102
|
+
static ERROR_CODE = 1014;
|
|
117
103
|
constructor(serviceError) {
|
|
118
|
-
super(
|
|
104
|
+
super(1014, 400, "Invalid request", serviceError);
|
|
119
105
|
Object.assign(this, serviceError);
|
|
120
106
|
}
|
|
121
107
|
};
|
|
@@ -147,45 +133,75 @@ var UploadTaskNotFound = class extends ServiceErrorResponse {
|
|
|
147
133
|
Object.assign(this, serviceError);
|
|
148
134
|
}
|
|
149
135
|
};
|
|
150
|
-
var
|
|
151
|
-
static ERROR_CODE =
|
|
136
|
+
var ConversionTaskNotFound = class extends ServiceErrorResponse {
|
|
137
|
+
static ERROR_CODE = 1015;
|
|
152
138
|
constructor(serviceError) {
|
|
153
|
-
super(
|
|
139
|
+
super(1015, 404, "Conversion task not found", serviceError);
|
|
154
140
|
Object.assign(this, serviceError);
|
|
155
141
|
}
|
|
156
142
|
};
|
|
157
|
-
var
|
|
158
|
-
static ERROR_CODE =
|
|
143
|
+
var LogsUnavailable = class extends ServiceErrorResponse {
|
|
144
|
+
static ERROR_CODE = 1019;
|
|
159
145
|
constructor(serviceError) {
|
|
160
|
-
super(
|
|
146
|
+
super(1019, 502, "Logs unavailable", serviceError);
|
|
161
147
|
Object.assign(this, serviceError);
|
|
162
148
|
}
|
|
163
149
|
};
|
|
164
|
-
var
|
|
165
|
-
static ERROR_CODE =
|
|
150
|
+
var InvalidGuestToken = class extends ServiceErrorResponse {
|
|
151
|
+
static ERROR_CODE = 1016;
|
|
166
152
|
constructor(serviceError) {
|
|
167
|
-
super(
|
|
153
|
+
super(1016, 403, "You are not allowed to use this guest token for this session", serviceError);
|
|
154
|
+
Object.assign(this, serviceError);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
var Unauthorized = class extends ServiceErrorResponse {
|
|
158
|
+
static ERROR_CODE = 1005;
|
|
159
|
+
constructor(serviceError) {
|
|
160
|
+
super(1005, 401, "Invalid or expired token", serviceError);
|
|
161
|
+
Object.assign(this, serviceError);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
var MissingAuthorizationHeader = class extends ServiceErrorResponse {
|
|
165
|
+
static ERROR_CODE = 1011;
|
|
166
|
+
constructor(serviceError) {
|
|
167
|
+
super(1011, 401, "Missing api key or user token", serviceError);
|
|
168
|
+
Object.assign(this, serviceError);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
var InvalidApiKey = class extends ServiceErrorResponse {
|
|
172
|
+
static ERROR_CODE = 1012;
|
|
173
|
+
constructor(serviceError) {
|
|
174
|
+
super(1012, 401, "Invalid api key", serviceError);
|
|
175
|
+
Object.assign(this, serviceError);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
var TooManyRequests = class extends ServiceErrorResponse {
|
|
179
|
+
static ERROR_CODE = 1021;
|
|
180
|
+
constructor(serviceError) {
|
|
181
|
+
super(1021, 429, "Too many requests", serviceError);
|
|
168
182
|
Object.assign(this, serviceError);
|
|
169
183
|
}
|
|
170
184
|
};
|
|
171
185
|
var declaredErrors = {
|
|
172
|
-
1018: AssetSourceFileNotFound,
|
|
173
|
-
1002: InsufficientPermissions,
|
|
174
186
|
1003: InvalidAuthorization,
|
|
175
187
|
1004: InsufficientSecurityScope,
|
|
176
|
-
|
|
177
|
-
1006: EnvironmentMismatch,
|
|
178
|
-
1011: MissingAuthorizationHeader,
|
|
179
|
-
1012: InvalidApiKey,
|
|
180
|
-
1016: InvalidGuestToken,
|
|
188
|
+
1002: InsufficientPermissions,
|
|
181
189
|
1017: InvalidTokenTtl,
|
|
190
|
+
1: InvalidParameter,
|
|
191
|
+
1020: MemberAccessesDiffer,
|
|
192
|
+
1013: InvalidMaterial,
|
|
193
|
+
1014: InvalidRequest,
|
|
182
194
|
1007: UploadedPayloadTooLarge,
|
|
183
195
|
1008: NoFileUploaded,
|
|
184
196
|
1009: UploadAborted,
|
|
185
197
|
1010: UploadTaskNotFound,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
198
|
+
1015: ConversionTaskNotFound,
|
|
199
|
+
1019: LogsUnavailable,
|
|
200
|
+
1016: InvalidGuestToken,
|
|
201
|
+
1005: Unauthorized,
|
|
202
|
+
1011: MissingAuthorizationHeader,
|
|
203
|
+
1012: InvalidApiKey,
|
|
204
|
+
1021: TooManyRequests
|
|
189
205
|
};
|
|
190
206
|
function errorOf(error) {
|
|
191
207
|
if (Object.values(declaredErrors).some((declared2) => error instanceof declared2)) {
|
|
@@ -209,6 +225,11 @@ function listUsers({
|
|
|
209
225
|
limit
|
|
210
226
|
},
|
|
211
227
|
headers
|
|
228
|
+
}).then((response) => {
|
|
229
|
+
if ("x-total-count" in response.headers) {
|
|
230
|
+
response.headers["x-total-count"] = JSON.parse(response.headers["x-total-count"]);
|
|
231
|
+
}
|
|
232
|
+
return response;
|
|
212
233
|
});
|
|
213
234
|
}
|
|
214
235
|
function registerUser({
|
|
@@ -276,7 +297,7 @@ function generateUserToken({
|
|
|
276
297
|
headers
|
|
277
298
|
});
|
|
278
299
|
}
|
|
279
|
-
function
|
|
300
|
+
function listUserGroups({
|
|
280
301
|
user_id
|
|
281
302
|
}, headers) {
|
|
282
303
|
return axiosInstance({
|
|
@@ -285,21 +306,6 @@ function getUserGroups({
|
|
|
285
306
|
headers
|
|
286
307
|
});
|
|
287
308
|
}
|
|
288
|
-
function getUserUploadTasks({
|
|
289
|
-
user_id,
|
|
290
|
-
offset = 0,
|
|
291
|
-
limit = 10
|
|
292
|
-
}, headers) {
|
|
293
|
-
return axiosInstance({
|
|
294
|
-
method: "get",
|
|
295
|
-
url: "/users/" + encodeURIComponent(user_id) + "/upload-tasks",
|
|
296
|
-
params: {
|
|
297
|
-
offset,
|
|
298
|
-
limit
|
|
299
|
-
},
|
|
300
|
-
headers
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
309
|
function createGroup({
|
|
304
310
|
name,
|
|
305
311
|
description,
|
|
@@ -325,7 +331,7 @@ function getGroup({
|
|
|
325
331
|
headers
|
|
326
332
|
});
|
|
327
333
|
}
|
|
328
|
-
function
|
|
334
|
+
function updateGroup({
|
|
329
335
|
group_id,
|
|
330
336
|
name,
|
|
331
337
|
description
|
|
@@ -405,7 +411,7 @@ function createFolder({
|
|
|
405
411
|
headers
|
|
406
412
|
});
|
|
407
413
|
}
|
|
408
|
-
function
|
|
414
|
+
function getFolder({
|
|
409
415
|
folder_id
|
|
410
416
|
}, headers) {
|
|
411
417
|
return axiosInstance({
|
|
@@ -414,17 +420,6 @@ function getFolderInfo({
|
|
|
414
420
|
headers
|
|
415
421
|
});
|
|
416
422
|
}
|
|
417
|
-
function moveFolders({
|
|
418
|
-
folder_id,
|
|
419
|
-
folder_ids
|
|
420
|
-
}, headers) {
|
|
421
|
-
return axiosInstance({
|
|
422
|
-
method: "put",
|
|
423
|
-
url: "/folders/" + encodeURIComponent(folder_id),
|
|
424
|
-
data: folder_ids,
|
|
425
|
-
headers
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
423
|
function updateFolder({
|
|
429
424
|
folder_id,
|
|
430
425
|
name
|
|
@@ -497,7 +492,7 @@ function createSubfolder({
|
|
|
497
492
|
headers
|
|
498
493
|
});
|
|
499
494
|
}
|
|
500
|
-
function
|
|
495
|
+
function listFolderSubfolders({
|
|
501
496
|
folder_id
|
|
502
497
|
}, headers) {
|
|
503
498
|
return axiosInstance({
|
|
@@ -506,10 +501,22 @@ function listFolderSubFolders({
|
|
|
506
501
|
headers
|
|
507
502
|
});
|
|
508
503
|
}
|
|
504
|
+
function moveFolders({
|
|
505
|
+
folder_id,
|
|
506
|
+
folder_ids
|
|
507
|
+
}, headers) {
|
|
508
|
+
return axiosInstance({
|
|
509
|
+
method: "patch",
|
|
510
|
+
url: "/folders/" + encodeURIComponent(folder_id) + "/folders",
|
|
511
|
+
data: {
|
|
512
|
+
folder_ids
|
|
513
|
+
},
|
|
514
|
+
headers
|
|
515
|
+
});
|
|
516
|
+
}
|
|
509
517
|
function uploadSourceFiles({
|
|
510
518
|
folder_id,
|
|
511
519
|
files,
|
|
512
|
-
task_name,
|
|
513
520
|
conversion_pipeline = "auto-detect",
|
|
514
521
|
source_files,
|
|
515
522
|
options
|
|
@@ -519,7 +526,6 @@ function uploadSourceFiles({
|
|
|
519
526
|
url: "/folders/" + encodeURIComponent(folder_id) + "/source-files",
|
|
520
527
|
data: multipartBody(
|
|
521
528
|
{
|
|
522
|
-
task_name,
|
|
523
529
|
conversion_pipeline,
|
|
524
530
|
source_files,
|
|
525
531
|
options
|
|
@@ -535,7 +541,7 @@ function uploadSourceFiles({
|
|
|
535
541
|
}
|
|
536
542
|
});
|
|
537
543
|
}
|
|
538
|
-
function
|
|
544
|
+
function listFolderSourceFiles({
|
|
539
545
|
folder_id,
|
|
540
546
|
offset = 0,
|
|
541
547
|
limit = 10,
|
|
@@ -551,7 +557,12 @@ function getSourceFilesInFolder({
|
|
|
551
557
|
},
|
|
552
558
|
headers
|
|
553
559
|
}).then((response) => {
|
|
554
|
-
response.headers["x-source-files-count"] = JSON.parse(
|
|
560
|
+
response.headers["x-source-files-count"] = JSON.parse(
|
|
561
|
+
response.headers["x-source-files-count"]
|
|
562
|
+
);
|
|
563
|
+
if ("x-total-count" in response.headers) {
|
|
564
|
+
response.headers["x-total-count"] = JSON.parse(response.headers["x-total-count"]);
|
|
565
|
+
}
|
|
555
566
|
return response;
|
|
556
567
|
});
|
|
557
568
|
}
|
|
@@ -560,13 +571,15 @@ function moveSourceFiles({
|
|
|
560
571
|
source_file_ids
|
|
561
572
|
}, headers) {
|
|
562
573
|
return axiosInstance({
|
|
563
|
-
method: "
|
|
574
|
+
method: "patch",
|
|
564
575
|
url: "/folders/" + encodeURIComponent(folder_id) + "/source-files",
|
|
565
|
-
data:
|
|
576
|
+
data: {
|
|
577
|
+
source_file_ids
|
|
578
|
+
},
|
|
566
579
|
headers
|
|
567
580
|
});
|
|
568
581
|
}
|
|
569
|
-
function
|
|
582
|
+
function listFolderUploadTasks({
|
|
570
583
|
folder_id,
|
|
571
584
|
offset = 0,
|
|
572
585
|
limit = 10
|
|
@@ -581,11 +594,11 @@ function getUploadTasksInFolder({
|
|
|
581
594
|
headers
|
|
582
595
|
});
|
|
583
596
|
}
|
|
584
|
-
function
|
|
597
|
+
function listFolderAssets({
|
|
585
598
|
folder_id,
|
|
586
599
|
offset = 0,
|
|
587
600
|
limit = 10,
|
|
588
|
-
|
|
601
|
+
filters,
|
|
589
602
|
recursive = false
|
|
590
603
|
}, headers) {
|
|
591
604
|
return axiosInstance({
|
|
@@ -594,12 +607,15 @@ function getFolderAssets({
|
|
|
594
607
|
params: {
|
|
595
608
|
offset,
|
|
596
609
|
limit,
|
|
597
|
-
|
|
610
|
+
filters,
|
|
598
611
|
recursive
|
|
599
612
|
},
|
|
600
613
|
headers
|
|
601
614
|
}).then((response) => {
|
|
602
615
|
response.headers["x-assets-count"] = JSON.parse(response.headers["x-assets-count"]);
|
|
616
|
+
if ("x-total-count" in response.headers) {
|
|
617
|
+
response.headers["x-total-count"] = JSON.parse(response.headers["x-total-count"]);
|
|
618
|
+
}
|
|
603
619
|
return response;
|
|
604
620
|
});
|
|
605
621
|
}
|
|
@@ -619,90 +635,10 @@ function moveAssets({
|
|
|
619
635
|
asset_ids
|
|
620
636
|
}, headers) {
|
|
621
637
|
return axiosInstance({
|
|
622
|
-
method: "
|
|
638
|
+
method: "patch",
|
|
623
639
|
url: "/folders/" + encodeURIComponent(folder_id) + "/assets",
|
|
624
|
-
data: asset_ids,
|
|
625
|
-
headers
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
function createMaterial({
|
|
629
|
-
folder_id,
|
|
630
|
-
dataJson = {},
|
|
631
|
-
isDoubleSided = false,
|
|
632
|
-
name,
|
|
633
|
-
shaderRef = "00000000-0000-0000-0000-000000000000"
|
|
634
|
-
}, headers) {
|
|
635
|
-
return axiosInstance({
|
|
636
|
-
method: "post",
|
|
637
|
-
url: "/folders/" + encodeURIComponent(folder_id) + "/assets/materials",
|
|
638
|
-
data: {
|
|
639
|
-
dataJson,
|
|
640
|
-
isDoubleSided,
|
|
641
|
-
name,
|
|
642
|
-
shaderRef
|
|
643
|
-
},
|
|
644
|
-
headers
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
function createCubemap({
|
|
648
|
-
folder_id,
|
|
649
|
-
faces = [
|
|
650
|
-
"00000000-0000-0000-0000-000000000000",
|
|
651
|
-
"00000000-0000-0000-0000-000000000000",
|
|
652
|
-
"00000000-0000-0000-0000-000000000000",
|
|
653
|
-
"00000000-0000-0000-0000-000000000000",
|
|
654
|
-
"00000000-0000-0000-0000-000000000000",
|
|
655
|
-
"00000000-0000-0000-0000-000000000000"
|
|
656
|
-
],
|
|
657
|
-
name
|
|
658
|
-
}, headers) {
|
|
659
|
-
return axiosInstance({
|
|
660
|
-
method: "post",
|
|
661
|
-
url: "/folders/" + encodeURIComponent(folder_id) + "/assets/cubemaps",
|
|
662
|
-
data: {
|
|
663
|
-
faces,
|
|
664
|
-
name
|
|
665
|
-
},
|
|
666
|
-
headers
|
|
667
|
-
});
|
|
668
|
-
}
|
|
669
|
-
function getSessionsInFolder({
|
|
670
|
-
folder_id
|
|
671
|
-
}, headers) {
|
|
672
|
-
return axiosInstance({
|
|
673
|
-
method: "get",
|
|
674
|
-
url: "/folders/" + encodeURIComponent(folder_id) + "/sessions",
|
|
675
|
-
headers
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
function createDuplicationRequest({
|
|
679
|
-
assets,
|
|
680
|
-
options
|
|
681
|
-
}, headers) {
|
|
682
|
-
return axiosInstance({
|
|
683
|
-
method: "post",
|
|
684
|
-
url: "/duplication-requests",
|
|
685
640
|
data: {
|
|
686
|
-
|
|
687
|
-
options
|
|
688
|
-
},
|
|
689
|
-
headers
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
function listDuplicationRequests({
|
|
693
|
-
offset = 0,
|
|
694
|
-
limit = 10,
|
|
695
|
-
states,
|
|
696
|
-
mine = false
|
|
697
|
-
}, headers) {
|
|
698
|
-
return axiosInstance({
|
|
699
|
-
method: "get",
|
|
700
|
-
url: "/duplication-requests",
|
|
701
|
-
params: {
|
|
702
|
-
offset,
|
|
703
|
-
limit,
|
|
704
|
-
states,
|
|
705
|
-
mine
|
|
641
|
+
asset_ids
|
|
706
642
|
},
|
|
707
643
|
headers
|
|
708
644
|
});
|
|
@@ -716,41 +652,6 @@ function getDuplicationRequest({
|
|
|
716
652
|
headers
|
|
717
653
|
});
|
|
718
654
|
}
|
|
719
|
-
function updateDuplicationRequest({
|
|
720
|
-
duplication_request_id,
|
|
721
|
-
assets,
|
|
722
|
-
folders_by_type,
|
|
723
|
-
dependencies_folders
|
|
724
|
-
}, headers) {
|
|
725
|
-
return axiosInstance({
|
|
726
|
-
method: "patch",
|
|
727
|
-
url: "/duplication-requests/" + encodeURIComponent(duplication_request_id),
|
|
728
|
-
data: {
|
|
729
|
-
assets,
|
|
730
|
-
folders_by_type,
|
|
731
|
-
dependencies_folders
|
|
732
|
-
},
|
|
733
|
-
headers
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
function discardDuplicationRequest({
|
|
737
|
-
duplication_request_id
|
|
738
|
-
}, headers) {
|
|
739
|
-
return axiosInstance({
|
|
740
|
-
method: "delete",
|
|
741
|
-
url: "/duplication-requests/" + encodeURIComponent(duplication_request_id),
|
|
742
|
-
headers
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
function confirmDuplicationRequest({
|
|
746
|
-
duplication_request_id
|
|
747
|
-
}, headers) {
|
|
748
|
-
return axiosInstance({
|
|
749
|
-
method: "post",
|
|
750
|
-
url: "/duplication-requests/" + encodeURIComponent(duplication_request_id) + "/confirm",
|
|
751
|
-
headers
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
655
|
function listSourceFiles({
|
|
755
656
|
offset = 0,
|
|
756
657
|
limit = 10,
|
|
@@ -766,7 +667,12 @@ function listSourceFiles({
|
|
|
766
667
|
},
|
|
767
668
|
headers
|
|
768
669
|
}).then((response) => {
|
|
769
|
-
response.headers["x-source-files-count"] = JSON.parse(
|
|
670
|
+
response.headers["x-source-files-count"] = JSON.parse(
|
|
671
|
+
response.headers["x-source-files-count"]
|
|
672
|
+
);
|
|
673
|
+
if ("x-total-count" in response.headers) {
|
|
674
|
+
response.headers["x-total-count"] = JSON.parse(response.headers["x-total-count"]);
|
|
675
|
+
}
|
|
770
676
|
return response;
|
|
771
677
|
});
|
|
772
678
|
}
|
|
@@ -791,29 +697,29 @@ function getSupportedSourceFileFormats(headers) {
|
|
|
791
697
|
headers
|
|
792
698
|
});
|
|
793
699
|
}
|
|
794
|
-
function
|
|
700
|
+
function getSourceFile({
|
|
795
701
|
source_file_id
|
|
796
702
|
}, headers) {
|
|
797
703
|
return axiosInstance({
|
|
798
704
|
method: "get",
|
|
799
|
-
url: "/source-files/" + encodeURIComponent(source_file_id)
|
|
705
|
+
url: "/source-files/" + encodeURIComponent(source_file_id),
|
|
800
706
|
headers
|
|
801
707
|
});
|
|
802
708
|
}
|
|
803
|
-
function
|
|
709
|
+
function updateSourceFile({
|
|
804
710
|
source_file_id,
|
|
805
711
|
name
|
|
806
712
|
}, headers) {
|
|
807
713
|
return axiosInstance({
|
|
808
714
|
method: "patch",
|
|
809
|
-
url: "/source-files/" + encodeURIComponent(source_file_id)
|
|
715
|
+
url: "/source-files/" + encodeURIComponent(source_file_id),
|
|
810
716
|
data: {
|
|
811
717
|
name
|
|
812
718
|
},
|
|
813
719
|
headers
|
|
814
720
|
});
|
|
815
721
|
}
|
|
816
|
-
function
|
|
722
|
+
function listSourceFileAssets({
|
|
817
723
|
source_file_id
|
|
818
724
|
}, headers) {
|
|
819
725
|
return axiosInstance({
|
|
@@ -822,16 +728,18 @@ function getSourceFileAssets({
|
|
|
822
728
|
headers
|
|
823
729
|
});
|
|
824
730
|
}
|
|
825
|
-
function
|
|
731
|
+
function listUploadTasks({
|
|
826
732
|
offset = 0,
|
|
827
|
-
limit = 10
|
|
733
|
+
limit = 10,
|
|
734
|
+
filters
|
|
828
735
|
}, headers) {
|
|
829
736
|
return axiosInstance({
|
|
830
737
|
method: "get",
|
|
831
738
|
url: "/upload-tasks",
|
|
832
739
|
params: {
|
|
833
740
|
offset,
|
|
834
|
-
limit
|
|
741
|
+
limit,
|
|
742
|
+
filters
|
|
835
743
|
},
|
|
836
744
|
headers
|
|
837
745
|
});
|
|
@@ -851,27 +759,24 @@ function getConversionTaskMetadata({
|
|
|
851
759
|
}, headers, responseType) {
|
|
852
760
|
return axiosInstance({
|
|
853
761
|
method: "get",
|
|
854
|
-
url: "/
|
|
762
|
+
url: "/conversion-tasks/" + encodeURIComponent(conversion_task_id) + "/metadata/" + encodeURIComponent(filename),
|
|
855
763
|
headers,
|
|
856
764
|
responseType: responseType || "arraybuffer"
|
|
857
765
|
});
|
|
858
766
|
}
|
|
859
|
-
function
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
asset_refs
|
|
767
|
+
function getConversionTaskLogs({
|
|
768
|
+
conversion_task_id,
|
|
769
|
+
from,
|
|
770
|
+
to,
|
|
771
|
+
limit
|
|
865
772
|
}, headers) {
|
|
866
773
|
return axiosInstance({
|
|
867
|
-
method: "
|
|
868
|
-
url: "/
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
inputs,
|
|
874
|
-
asset_refs
|
|
774
|
+
method: "get",
|
|
775
|
+
url: "/conversion-tasks/" + encodeURIComponent(conversion_task_id) + "/logs",
|
|
776
|
+
params: {
|
|
777
|
+
from,
|
|
778
|
+
to,
|
|
779
|
+
limit
|
|
875
780
|
},
|
|
876
781
|
headers
|
|
877
782
|
});
|
|
@@ -879,7 +784,7 @@ function schedulePipeline({
|
|
|
879
784
|
function listAssets({
|
|
880
785
|
offset = 0,
|
|
881
786
|
limit = 10,
|
|
882
|
-
|
|
787
|
+
filters
|
|
883
788
|
}, headers) {
|
|
884
789
|
return axiosInstance({
|
|
885
790
|
method: "get",
|
|
@@ -887,9 +792,14 @@ function listAssets({
|
|
|
887
792
|
params: {
|
|
888
793
|
offset,
|
|
889
794
|
limit,
|
|
890
|
-
|
|
795
|
+
filters
|
|
891
796
|
},
|
|
892
797
|
headers
|
|
798
|
+
}).then((response) => {
|
|
799
|
+
if ("x-total-count" in response.headers) {
|
|
800
|
+
response.headers["x-total-count"] = JSON.parse(response.headers["x-total-count"]);
|
|
801
|
+
}
|
|
802
|
+
return response;
|
|
893
803
|
});
|
|
894
804
|
}
|
|
895
805
|
function deleteAssets({
|
|
@@ -912,13 +822,17 @@ function deleteAsset({
|
|
|
912
822
|
headers
|
|
913
823
|
});
|
|
914
824
|
}
|
|
915
|
-
function
|
|
825
|
+
function renameAsset({
|
|
916
826
|
asset_container,
|
|
917
|
-
asset_id
|
|
827
|
+
asset_id,
|
|
828
|
+
name
|
|
918
829
|
}, headers) {
|
|
919
830
|
return axiosInstance({
|
|
920
|
-
method: "
|
|
921
|
-
url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id)
|
|
831
|
+
method: "patch",
|
|
832
|
+
url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id),
|
|
833
|
+
data: {
|
|
834
|
+
name
|
|
835
|
+
},
|
|
922
836
|
headers
|
|
923
837
|
});
|
|
924
838
|
}
|
|
@@ -932,17 +846,7 @@ function getAssetDetails({
|
|
|
932
846
|
headers
|
|
933
847
|
});
|
|
934
848
|
}
|
|
935
|
-
function
|
|
936
|
-
asset_container,
|
|
937
|
-
asset_id
|
|
938
|
-
}, headers) {
|
|
939
|
-
return axiosInstance({
|
|
940
|
-
method: "get",
|
|
941
|
-
url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/folder",
|
|
942
|
-
headers
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
function getAssetDependencies({
|
|
849
|
+
function listAssetDependencies({
|
|
946
850
|
asset_container,
|
|
947
851
|
asset_id,
|
|
948
852
|
offset = 0,
|
|
@@ -964,7 +868,7 @@ function getAssetDependencies({
|
|
|
964
868
|
headers
|
|
965
869
|
});
|
|
966
870
|
}
|
|
967
|
-
function
|
|
871
|
+
function listAssetReferences({
|
|
968
872
|
asset_container,
|
|
969
873
|
asset_id,
|
|
970
874
|
offset = 0,
|
|
@@ -1004,20 +908,6 @@ function updateAssetDescription({
|
|
|
1004
908
|
headers
|
|
1005
909
|
});
|
|
1006
910
|
}
|
|
1007
|
-
function renameAsset({
|
|
1008
|
-
asset_id,
|
|
1009
|
-
asset_container,
|
|
1010
|
-
name
|
|
1011
|
-
}, headers) {
|
|
1012
|
-
return axiosInstance({
|
|
1013
|
-
method: "patch",
|
|
1014
|
-
url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/description",
|
|
1015
|
-
data: {
|
|
1016
|
-
name
|
|
1017
|
-
},
|
|
1018
|
-
headers
|
|
1019
|
-
});
|
|
1020
|
-
}
|
|
1021
911
|
function getAssetPayload({
|
|
1022
912
|
asset_container_with_payload,
|
|
1023
913
|
asset_id,
|
|
@@ -1065,16 +955,6 @@ function getAssetHistory({
|
|
|
1065
955
|
headers
|
|
1066
956
|
});
|
|
1067
957
|
}
|
|
1068
|
-
function getAssetMeta({
|
|
1069
|
-
asset_container,
|
|
1070
|
-
asset_id
|
|
1071
|
-
}, headers) {
|
|
1072
|
-
return axiosInstance({
|
|
1073
|
-
method: "get",
|
|
1074
|
-
url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/meta",
|
|
1075
|
-
headers
|
|
1076
|
-
});
|
|
1077
|
-
}
|
|
1078
958
|
function getAssetCode({
|
|
1079
959
|
asset_container_with_code,
|
|
1080
960
|
asset_id
|
|
@@ -1136,7 +1016,7 @@ function exportAsset({
|
|
|
1136
1016
|
format,
|
|
1137
1017
|
scale = 1,
|
|
1138
1018
|
sub_mesh_index
|
|
1139
|
-
}, headers) {
|
|
1019
|
+
}, headers, responseType) {
|
|
1140
1020
|
return axiosInstance({
|
|
1141
1021
|
method: "get",
|
|
1142
1022
|
url: "/assets/" + encodeURIComponent(asset_container_exportable) + "/" + encodeURIComponent(asset_id) + "/exports/" + encodeURIComponent(format),
|
|
@@ -1144,16 +1024,8 @@ function exportAsset({
|
|
|
1144
1024
|
scale,
|
|
1145
1025
|
sub_mesh_index
|
|
1146
1026
|
},
|
|
1147
|
-
headers
|
|
1148
|
-
|
|
1149
|
-
}
|
|
1150
|
-
function getSceneSessions({
|
|
1151
|
-
scene_id
|
|
1152
|
-
}, headers) {
|
|
1153
|
-
return axiosInstance({
|
|
1154
|
-
method: "get",
|
|
1155
|
-
url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/sessions",
|
|
1156
|
-
headers
|
|
1027
|
+
headers,
|
|
1028
|
+
responseType: responseType || "arraybuffer"
|
|
1157
1029
|
});
|
|
1158
1030
|
}
|
|
1159
1031
|
function getSceneAABB({
|
|
@@ -1193,6 +1065,7 @@ function createEntity({
|
|
|
1193
1065
|
measure,
|
|
1194
1066
|
mesh_ref,
|
|
1195
1067
|
morph_targets,
|
|
1068
|
+
navmesh_ref,
|
|
1196
1069
|
orthographic_lens,
|
|
1197
1070
|
overrider,
|
|
1198
1071
|
perspective_lens,
|
|
@@ -1247,6 +1120,7 @@ function createEntity({
|
|
|
1247
1120
|
measure,
|
|
1248
1121
|
mesh_ref,
|
|
1249
1122
|
morph_targets,
|
|
1123
|
+
navmesh_ref,
|
|
1250
1124
|
orthographic_lens,
|
|
1251
1125
|
overrider,
|
|
1252
1126
|
perspective_lens,
|
|
@@ -1317,6 +1191,7 @@ function updateEntity({
|
|
|
1317
1191
|
measure,
|
|
1318
1192
|
mesh_ref,
|
|
1319
1193
|
morph_targets,
|
|
1194
|
+
navmesh_ref,
|
|
1320
1195
|
orthographic_lens,
|
|
1321
1196
|
overrider,
|
|
1322
1197
|
perspective_lens,
|
|
@@ -1371,6 +1246,7 @@ function updateEntity({
|
|
|
1371
1246
|
measure,
|
|
1372
1247
|
mesh_ref,
|
|
1373
1248
|
morph_targets,
|
|
1249
|
+
navmesh_ref,
|
|
1374
1250
|
orthographic_lens,
|
|
1375
1251
|
overrider,
|
|
1376
1252
|
perspective_lens,
|
|
@@ -1428,7 +1304,7 @@ function updateSceneSettings({
|
|
|
1428
1304
|
headers
|
|
1429
1305
|
});
|
|
1430
1306
|
}
|
|
1431
|
-
function
|
|
1307
|
+
function listRunningSessions({
|
|
1432
1308
|
filters
|
|
1433
1309
|
}, headers) {
|
|
1434
1310
|
return axiosInstance({
|
|
@@ -1604,46 +1480,37 @@ function installInterceptors() {
|
|
|
1604
1480
|
);
|
|
1605
1481
|
}
|
|
1606
1482
|
function shouldRetryRequest(error) {
|
|
1607
|
-
|
|
1608
|
-
switch (status) {
|
|
1609
|
-
case 403:
|
|
1610
|
-
case 404:
|
|
1611
|
-
return true;
|
|
1612
|
-
default:
|
|
1613
|
-
return isNetworkError(error) || isIdempotentRequestError(error);
|
|
1614
|
-
}
|
|
1483
|
+
return isNetworkError(error) || isIdempotentRequestError(error);
|
|
1615
1484
|
}
|
|
1616
1485
|
installInterceptors();
|
|
1617
1486
|
export {
|
|
1618
1487
|
ApiError,
|
|
1619
|
-
AssetSourceFileNotFound,
|
|
1620
1488
|
ConversionTaskNotFound,
|
|
1621
|
-
EnvironmentMismatch,
|
|
1622
1489
|
InsufficientPermissions,
|
|
1623
1490
|
InsufficientSecurityScope,
|
|
1624
1491
|
InvalidApiKey,
|
|
1625
1492
|
InvalidAuthorization,
|
|
1626
1493
|
InvalidGuestToken,
|
|
1627
1494
|
InvalidMaterial,
|
|
1495
|
+
InvalidParameter,
|
|
1628
1496
|
InvalidRequest,
|
|
1629
1497
|
InvalidTokenTtl,
|
|
1498
|
+
LogsUnavailable,
|
|
1499
|
+
MemberAccessesDiffer,
|
|
1630
1500
|
MissingAuthorizationHeader,
|
|
1631
1501
|
NoFileUploaded,
|
|
1632
1502
|
ServiceErrorResponse,
|
|
1503
|
+
TooManyRequests,
|
|
1633
1504
|
Unauthorized,
|
|
1634
1505
|
UnexpectedServiceError,
|
|
1635
1506
|
UploadAborted,
|
|
1636
1507
|
UploadTaskNotFound,
|
|
1637
1508
|
UploadedPayloadTooLarge,
|
|
1638
1509
|
axiosInstance,
|
|
1639
|
-
confirmDuplicationRequest,
|
|
1640
1510
|
createAsset,
|
|
1641
|
-
createCubemap,
|
|
1642
|
-
createDuplicationRequest,
|
|
1643
1511
|
createEntity,
|
|
1644
1512
|
createFolder,
|
|
1645
1513
|
createGroup,
|
|
1646
|
-
createMaterial,
|
|
1647
1514
|
createSession,
|
|
1648
1515
|
createSubfolder,
|
|
1649
1516
|
deleteAsset,
|
|
@@ -1653,59 +1520,52 @@ export {
|
|
|
1653
1520
|
deleteGroup,
|
|
1654
1521
|
deleteSourceFiles,
|
|
1655
1522
|
deleteUser,
|
|
1656
|
-
discardDuplicationRequest,
|
|
1657
1523
|
errorOf,
|
|
1658
1524
|
exportAsset,
|
|
1659
1525
|
generateGuestToken,
|
|
1660
1526
|
generateUserToken,
|
|
1661
1527
|
getAssetCode,
|
|
1662
|
-
getAssetDependencies,
|
|
1663
1528
|
getAssetDescription,
|
|
1664
1529
|
getAssetDetails,
|
|
1665
|
-
getAssetFolder,
|
|
1666
1530
|
getAssetGraph,
|
|
1667
1531
|
getAssetHistory,
|
|
1668
|
-
getAssetMeta,
|
|
1669
1532
|
getAssetPayload,
|
|
1670
|
-
getAssetReferences,
|
|
1671
|
-
getAssetSourceFile,
|
|
1672
1533
|
getAssetThumbnail,
|
|
1673
1534
|
getClient,
|
|
1535
|
+
getConversionTaskLogs,
|
|
1674
1536
|
getConversionTaskMetadata,
|
|
1675
1537
|
getCurrentUser,
|
|
1676
1538
|
getDuplicationRequest,
|
|
1677
1539
|
getEntity,
|
|
1678
|
-
|
|
1679
|
-
getFolderInfo,
|
|
1540
|
+
getFolder,
|
|
1680
1541
|
getGroup,
|
|
1681
|
-
getRunningSessions,
|
|
1682
1542
|
getSceneAABB,
|
|
1683
|
-
getSceneSessions,
|
|
1684
1543
|
getSceneSettings,
|
|
1685
1544
|
getSession,
|
|
1686
|
-
|
|
1687
|
-
getSourceFileAssets,
|
|
1688
|
-
getSourceFileDetails,
|
|
1689
|
-
getSourceFilesInFolder,
|
|
1545
|
+
getSourceFile,
|
|
1690
1546
|
getSupportedSourceFileFormats,
|
|
1691
1547
|
getUploadTask,
|
|
1692
|
-
getUploadTasks,
|
|
1693
|
-
getUploadTasksInFolder,
|
|
1694
1548
|
getUser,
|
|
1695
|
-
getUserGroups,
|
|
1696
|
-
getUserUploadTasks,
|
|
1697
1549
|
grantMemberAccessToFolder,
|
|
1698
1550
|
grantMemberAccessToGroup,
|
|
1699
1551
|
joinSession,
|
|
1700
1552
|
joinSessionAsGuest,
|
|
1701
1553
|
kickClientFromSession,
|
|
1702
1554
|
killSession,
|
|
1555
|
+
listAssetDependencies,
|
|
1556
|
+
listAssetReferences,
|
|
1703
1557
|
listAssets,
|
|
1704
|
-
listDuplicationRequests,
|
|
1705
1558
|
listFolderAccesses,
|
|
1706
|
-
|
|
1559
|
+
listFolderAssets,
|
|
1560
|
+
listFolderSourceFiles,
|
|
1561
|
+
listFolderSubfolders,
|
|
1562
|
+
listFolderUploadTasks,
|
|
1707
1563
|
listFolders,
|
|
1564
|
+
listRunningSessions,
|
|
1565
|
+
listSourceFileAssets,
|
|
1708
1566
|
listSourceFiles,
|
|
1567
|
+
listUploadTasks,
|
|
1568
|
+
listUserGroups,
|
|
1709
1569
|
listUsers,
|
|
1710
1570
|
moveAssets,
|
|
1711
1571
|
moveFolders,
|
|
@@ -1715,19 +1575,17 @@ export {
|
|
|
1715
1575
|
renameAsset,
|
|
1716
1576
|
revokeMemberAccessToFolder,
|
|
1717
1577
|
revokeMemberAccessToGroup,
|
|
1718
|
-
schedulePipeline,
|
|
1719
1578
|
setApiKey,
|
|
1720
1579
|
setAssetThumbnail,
|
|
1721
1580
|
setBaseURL,
|
|
1722
1581
|
setUserToken,
|
|
1723
1582
|
updateAssetDescription,
|
|
1724
1583
|
updateAssetGraph,
|
|
1725
|
-
updateDuplicationRequest,
|
|
1726
1584
|
updateEntity,
|
|
1727
1585
|
updateFolder,
|
|
1728
|
-
|
|
1586
|
+
updateGroup,
|
|
1729
1587
|
updateSceneSettings,
|
|
1730
|
-
|
|
1588
|
+
updateSourceFile,
|
|
1731
1589
|
updateUser,
|
|
1732
1590
|
uploadSourceFiles
|
|
1733
1591
|
};
|