@3dverse/api 0.8.22 → 0.10.0

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/index.js CHANGED
@@ -30,10 +30,28 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
32
  ApiError: () => ApiError,
33
+ ConversionTaskNotFound: () => ConversionTaskNotFound,
34
+ EnvironmentMismatch: () => EnvironmentMismatch,
35
+ InsufficientPermissions: () => InsufficientPermissions,
36
+ InsufficientSecurityScope: () => InsufficientSecurityScope,
37
+ InvalidApiKey: () => InvalidApiKey,
38
+ InvalidAuthorization: () => InvalidAuthorization,
39
+ InvalidGuestToken: () => InvalidGuestToken,
40
+ InvalidMaterial: () => InvalidMaterial,
41
+ InvalidRequest: () => InvalidRequest,
42
+ MissingAuthorizationHeader: () => MissingAuthorizationHeader,
43
+ NoFileUploaded: () => NoFileUploaded,
44
+ ServiceErrorResponse: () => ServiceErrorResponse,
45
+ Unauthorized: () => Unauthorized,
33
46
  UnexpectedServiceError: () => UnexpectedServiceError,
47
+ UploadAborted: () => UploadAborted,
48
+ UploadTaskNotFound: () => UploadTaskNotFound,
49
+ UploadedPayloadTooLarge: () => UploadedPayloadTooLarge,
34
50
  axiosInstance: () => axiosInstance,
51
+ confirmDuplicationRequest: () => confirmDuplicationRequest,
35
52
  createAsset: () => createAsset,
36
53
  createCubemap: () => createCubemap,
54
+ createDuplicationRequest: () => createDuplicationRequest,
37
55
  createEntity: () => createEntity,
38
56
  createFolder: () => createFolder,
39
57
  createGroup: () => createGroup,
@@ -47,12 +65,12 @@ __export(index_exports, {
47
65
  deleteGroup: () => deleteGroup,
48
66
  deleteSourceFiles: () => deleteSourceFiles,
49
67
  deleteUser: () => deleteUser,
50
- downloadSourceFile: () => downloadSourceFile,
68
+ discardDuplicationRequest: () => discardDuplicationRequest,
69
+ errorOf: () => errorOf,
51
70
  exportAsset: () => exportAsset,
52
71
  generateGuestToken: () => generateGuestToken,
53
72
  generateUserToken: () => generateUserToken,
54
73
  getAssetCode: () => getAssetCode,
55
- getAssetCustomTypes: () => getAssetCustomTypes,
56
74
  getAssetDependencies: () => getAssetDependencies,
57
75
  getAssetDescription: () => getAssetDescription,
58
76
  getAssetDetails: () => getAssetDetails,
@@ -67,6 +85,7 @@ __export(index_exports, {
67
85
  getClient: () => getClient,
68
86
  getConversionTaskMetadata: () => getConversionTaskMetadata,
69
87
  getCurrentUser: () => getCurrentUser,
88
+ getDuplicationRequest: () => getDuplicationRequest,
70
89
  getEntity: () => getEntity,
71
90
  getFolderAssets: () => getFolderAssets,
72
91
  getFolderInfo: () => getFolderInfo,
@@ -90,12 +109,12 @@ __export(index_exports, {
90
109
  getUserUploadTasks: () => getUserUploadTasks,
91
110
  grantMemberAccessToFolder: () => grantMemberAccessToFolder,
92
111
  grantMemberAccessToGroup: () => grantMemberAccessToGroup,
93
- importAssets: () => importAssets,
94
112
  joinSession: () => joinSession,
95
113
  joinSessionAsGuest: () => joinSessionAsGuest,
96
114
  kickClientFromSession: () => kickClientFromSession,
97
115
  killSession: () => killSession,
98
116
  listAssets: () => listAssets,
117
+ listDuplicationRequests: () => listDuplicationRequests,
99
118
  listFolderAccesses: () => listFolderAccesses,
100
119
  listFolderSubFolders: () => listFolderSubFolders,
101
120
  listFolders: () => listFolders,
@@ -116,6 +135,7 @@ __export(index_exports, {
116
135
  setUserToken: () => setUserToken,
117
136
  updateAssetDescription: () => updateAssetDescription,
118
137
  updateAssetGraph: () => updateAssetGraph,
138
+ updateDuplicationRequest: () => updateDuplicationRequest,
119
139
  updateEntity: () => updateEntity,
120
140
  updateFolder: () => updateFolder,
121
141
  updateGroupDescription: () => updateGroupDescription,
@@ -129,12 +149,182 @@ var import_axios_retry = __toESM(require("axios-retry"));
129
149
 
130
150
  // _prebuild/wrapper.ts
131
151
  var import_axios = __toESM(require("axios"));
152
+ var ServiceErrorResponse = class extends Error {
153
+ errorCode;
154
+ httpCode;
155
+ serviceError;
156
+ constructor(errorCode, httpCode, message, serviceError) {
157
+ super(message);
158
+ Object.defineProperty(this, "message", {
159
+ value: message,
160
+ enumerable: true,
161
+ writable: true,
162
+ configurable: true
163
+ });
164
+ this.errorCode = errorCode;
165
+ this.httpCode = httpCode;
166
+ this.serviceError = serviceError;
167
+ }
168
+ };
169
+ function optionalBody(body) {
170
+ return Object.values(body).some((value) => value !== void 0) ? body : void 0;
171
+ }
172
+ function multipartBody(fields, files) {
173
+ const form = new FormData();
174
+ for (const [name, value] of Object.entries(fields)) {
175
+ if (value !== void 0) {
176
+ form.append(name, typeof value === "string" ? value : JSON.stringify(value));
177
+ }
178
+ }
179
+ for (const [name, value] of Object.entries(files)) {
180
+ for (const file of value === void 0 ? [] : Array.isArray(value) ? value : [value]) {
181
+ form.append(name, file);
182
+ }
183
+ }
184
+ return form;
185
+ }
186
+ function plainHeaders(headers) {
187
+ return headers instanceof import_axios.AxiosHeaders ? headers.toJSON() : { ...headers };
188
+ }
132
189
  var axiosInstance = import_axios.default.create({
133
- baseURL: "https://api.3dverse.com/app/v1"
190
+ baseURL: "https://api.3dverse.com/app/v1",
191
+ paramsSerializer: { indexes: null }
134
192
  });
135
193
  function setBaseURL(baseURL) {
136
194
  axiosInstance.defaults.baseURL = baseURL;
137
195
  }
196
+ var InsufficientPermissions = class extends ServiceErrorResponse {
197
+ static ERROR_CODE = 1002;
198
+ constructor(serviceError) {
199
+ super(1002, 403, "Insufficient permissions", serviceError);
200
+ Object.assign(this, serviceError);
201
+ }
202
+ };
203
+ var InvalidAuthorization = class extends ServiceErrorResponse {
204
+ static ERROR_CODE = 1003;
205
+ constructor(serviceError) {
206
+ super(1003, 403, "This operation is not allowed with this kind of token", serviceError);
207
+ Object.assign(this, serviceError);
208
+ }
209
+ };
210
+ var InsufficientSecurityScope = class extends ServiceErrorResponse {
211
+ static ERROR_CODE = 1004;
212
+ constructor(serviceError) {
213
+ super(1004, 403, "This operation is not permitted with the scope of this token", serviceError);
214
+ Object.assign(this, serviceError);
215
+ }
216
+ };
217
+ var Unauthorized = class extends ServiceErrorResponse {
218
+ static ERROR_CODE = 1005;
219
+ constructor(serviceError) {
220
+ super(1005, 401, "Invalid or expired token", serviceError);
221
+ Object.assign(this, serviceError);
222
+ }
223
+ };
224
+ var EnvironmentMismatch = class extends ServiceErrorResponse {
225
+ static ERROR_CODE = 1006;
226
+ constructor(serviceError) {
227
+ super(1006, 403, "User is not part of the current environment", serviceError);
228
+ Object.assign(this, serviceError);
229
+ }
230
+ };
231
+ var MissingAuthorizationHeader = class extends ServiceErrorResponse {
232
+ static ERROR_CODE = 1011;
233
+ constructor(serviceError) {
234
+ super(1011, 401, "Missing api key or user token", serviceError);
235
+ Object.assign(this, serviceError);
236
+ }
237
+ };
238
+ var InvalidApiKey = class extends ServiceErrorResponse {
239
+ static ERROR_CODE = 1012;
240
+ constructor(serviceError) {
241
+ super(1012, 401, "Invalid api key", serviceError);
242
+ Object.assign(this, serviceError);
243
+ }
244
+ };
245
+ var InvalidGuestToken = class extends ServiceErrorResponse {
246
+ static ERROR_CODE = 1016;
247
+ constructor(serviceError) {
248
+ super(1016, 403, "You are not allowed to use this guest token for this session", serviceError);
249
+ Object.assign(this, serviceError);
250
+ }
251
+ };
252
+ var UploadedPayloadTooLarge = class extends ServiceErrorResponse {
253
+ static ERROR_CODE = 1007;
254
+ constructor(serviceError) {
255
+ super(1007, 413, "Upload payload size exceeds the maximum allowed", serviceError);
256
+ Object.assign(this, serviceError);
257
+ }
258
+ };
259
+ var NoFileUploaded = class extends ServiceErrorResponse {
260
+ static ERROR_CODE = 1008;
261
+ constructor(serviceError) {
262
+ super(1008, 422, "No file uploaded", serviceError);
263
+ Object.assign(this, serviceError);
264
+ }
265
+ };
266
+ var UploadAborted = class extends ServiceErrorResponse {
267
+ static ERROR_CODE = 1009;
268
+ constructor(serviceError) {
269
+ super(1009, 422, "Upload aborted", serviceError);
270
+ Object.assign(this, serviceError);
271
+ }
272
+ };
273
+ var UploadTaskNotFound = class extends ServiceErrorResponse {
274
+ static ERROR_CODE = 1010;
275
+ constructor(serviceError) {
276
+ super(1010, 404, "Upload task not found", serviceError);
277
+ Object.assign(this, serviceError);
278
+ }
279
+ };
280
+ var InvalidMaterial = class extends ServiceErrorResponse {
281
+ static ERROR_CODE = 1013;
282
+ constructor(serviceError) {
283
+ super(1013, 400, "Some of the asset ids are not materials", serviceError);
284
+ Object.assign(this, serviceError);
285
+ }
286
+ };
287
+ var InvalidRequest = class extends ServiceErrorResponse {
288
+ static ERROR_CODE = 1014;
289
+ constructor(serviceError) {
290
+ super(1014, 400, "Invalid request", serviceError);
291
+ Object.assign(this, serviceError);
292
+ }
293
+ };
294
+ var ConversionTaskNotFound = class extends ServiceErrorResponse {
295
+ static ERROR_CODE = 1015;
296
+ constructor(serviceError) {
297
+ super(1015, 404, "Conversion task not found", serviceError);
298
+ Object.assign(this, serviceError);
299
+ }
300
+ };
301
+ var declaredErrors = {
302
+ 1002: InsufficientPermissions,
303
+ 1003: InvalidAuthorization,
304
+ 1004: InsufficientSecurityScope,
305
+ 1005: Unauthorized,
306
+ 1006: EnvironmentMismatch,
307
+ 1011: MissingAuthorizationHeader,
308
+ 1012: InvalidApiKey,
309
+ 1016: InvalidGuestToken,
310
+ 1007: UploadedPayloadTooLarge,
311
+ 1008: NoFileUploaded,
312
+ 1009: UploadAborted,
313
+ 1010: UploadTaskNotFound,
314
+ 1013: InvalidMaterial,
315
+ 1014: InvalidRequest,
316
+ 1015: ConversionTaskNotFound
317
+ };
318
+ function errorOf(error) {
319
+ if (Object.values(declaredErrors).some((declared2) => error instanceof declared2)) {
320
+ return error;
321
+ }
322
+ const failure = error;
323
+ const serviceError = failure?.serviceError ?? failure?.response?.data?.error;
324
+ const errorCode = serviceError?.errorCode;
325
+ const declared = typeof errorCode === "number" ? declaredErrors[errorCode] : void 0;
326
+ return declared ? new declared(serviceError) : void 0;
327
+ }
138
328
  function listUsers({
139
329
  offset = 0,
140
330
  limit = 10
@@ -173,7 +363,7 @@ function getUser({
173
363
  }, headers) {
174
364
  return axiosInstance({
175
365
  method: "get",
176
- url: "/users/" + user_id,
366
+ url: "/users/" + encodeURIComponent(user_id),
177
367
  headers
178
368
  });
179
369
  }
@@ -183,7 +373,7 @@ function updateUser({
183
373
  }, headers) {
184
374
  return axiosInstance({
185
375
  method: "patch",
186
- url: "/users/" + user_id,
376
+ url: "/users/" + encodeURIComponent(user_id),
187
377
  data: {
188
378
  username
189
379
  },
@@ -195,7 +385,7 @@ function deleteUser({
195
385
  }, headers) {
196
386
  return axiosInstance({
197
387
  method: "delete",
198
- url: "/users/" + user_id,
388
+ url: "/users/" + encodeURIComponent(user_id),
199
389
  headers
200
390
  });
201
391
  }
@@ -206,7 +396,7 @@ function generateUserToken({
206
396
  }, headers) {
207
397
  return axiosInstance({
208
398
  method: "post",
209
- url: "/users/" + user_id + "/tokens",
399
+ url: "/users/" + encodeURIComponent(user_id) + "/tokens",
210
400
  data: {
211
401
  scope,
212
402
  ttl
@@ -219,7 +409,7 @@ function getUserGroups({
219
409
  }, headers) {
220
410
  return axiosInstance({
221
411
  method: "get",
222
- url: "/users/" + user_id + "/groups",
412
+ url: "/users/" + encodeURIComponent(user_id) + "/groups",
223
413
  headers
224
414
  });
225
415
  }
@@ -230,7 +420,7 @@ function getUserUploadTasks({
230
420
  }, headers) {
231
421
  return axiosInstance({
232
422
  method: "get",
233
- url: "/users/" + user_id + "/upload-tasks",
423
+ url: "/users/" + encodeURIComponent(user_id) + "/upload-tasks",
234
424
  params: {
235
425
  offset,
236
426
  limit
@@ -259,7 +449,7 @@ function getGroup({
259
449
  }, headers) {
260
450
  return axiosInstance({
261
451
  method: "get",
262
- url: "/groups/" + group_id,
452
+ url: "/groups/" + encodeURIComponent(group_id),
263
453
  headers
264
454
  });
265
455
  }
@@ -270,7 +460,7 @@ function updateGroupDescription({
270
460
  }, headers) {
271
461
  return axiosInstance({
272
462
  method: "patch",
273
- url: "/groups/" + group_id,
463
+ url: "/groups/" + encodeURIComponent(group_id),
274
464
  data: {
275
465
  name,
276
466
  description
@@ -283,7 +473,7 @@ function deleteGroup({
283
473
  }, headers) {
284
474
  return axiosInstance({
285
475
  method: "delete",
286
- url: "/groups/" + group_id,
476
+ url: "/groups/" + encodeURIComponent(group_id),
287
477
  headers
288
478
  });
289
479
  }
@@ -296,7 +486,7 @@ function grantMemberAccessToGroup({
296
486
  }, headers) {
297
487
  return axiosInstance({
298
488
  method: "put",
299
- url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id,
489
+ url: "/groups/" + encodeURIComponent(group_id) + "/members/" + encodeURIComponent(member_type) + "/" + encodeURIComponent(member_id),
300
490
  data: {
301
491
  group_access,
302
492
  folder_access
@@ -311,7 +501,7 @@ function revokeMemberAccessToGroup({
311
501
  }, headers) {
312
502
  return axiosInstance({
313
503
  method: "delete",
314
- url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id,
504
+ url: "/groups/" + encodeURIComponent(group_id) + "/members/" + encodeURIComponent(member_type) + "/" + encodeURIComponent(member_id),
315
505
  headers
316
506
  });
317
507
  }
@@ -348,7 +538,7 @@ function getFolderInfo({
348
538
  }, headers) {
349
539
  return axiosInstance({
350
540
  method: "get",
351
- url: "/folders/" + folder_id,
541
+ url: "/folders/" + encodeURIComponent(folder_id),
352
542
  headers
353
543
  });
354
544
  }
@@ -358,7 +548,7 @@ function moveFolders({
358
548
  }, headers) {
359
549
  return axiosInstance({
360
550
  method: "put",
361
- url: "/folders/" + folder_id,
551
+ url: "/folders/" + encodeURIComponent(folder_id),
362
552
  data: folder_ids,
363
553
  headers
364
554
  });
@@ -369,7 +559,7 @@ function updateFolder({
369
559
  }, headers) {
370
560
  return axiosInstance({
371
561
  method: "patch",
372
- url: "/folders/" + folder_id,
562
+ url: "/folders/" + encodeURIComponent(folder_id),
373
563
  data: {
374
564
  name
375
565
  },
@@ -381,7 +571,7 @@ function deleteFolder({
381
571
  }, headers) {
382
572
  return axiosInstance({
383
573
  method: "delete",
384
- url: "/folders/" + folder_id,
574
+ url: "/folders/" + encodeURIComponent(folder_id),
385
575
  headers
386
576
  });
387
577
  }
@@ -390,7 +580,7 @@ function listFolderAccesses({
390
580
  }, headers) {
391
581
  return axiosInstance({
392
582
  method: "get",
393
- url: "/folders/" + folder_id + "/access",
583
+ url: "/folders/" + encodeURIComponent(folder_id) + "/access",
394
584
  headers
395
585
  });
396
586
  }
@@ -402,7 +592,7 @@ function grantMemberAccessToFolder({
402
592
  }, headers) {
403
593
  return axiosInstance({
404
594
  method: "put",
405
- url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id,
595
+ url: "/folders/" + encodeURIComponent(folder_id) + "/access/" + encodeURIComponent(member_type) + "/" + encodeURIComponent(member_id),
406
596
  data: {
407
597
  access
408
598
  },
@@ -416,7 +606,7 @@ function revokeMemberAccessToFolder({
416
606
  }, headers) {
417
607
  return axiosInstance({
418
608
  method: "delete",
419
- url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id,
609
+ url: "/folders/" + encodeURIComponent(folder_id) + "/access/" + encodeURIComponent(member_type) + "/" + encodeURIComponent(member_id),
420
610
  headers
421
611
  });
422
612
  }
@@ -427,7 +617,7 @@ function createSubfolder({
427
617
  }, headers) {
428
618
  return axiosInstance({
429
619
  method: "post",
430
- url: "/folders/" + folder_id + "/folders",
620
+ url: "/folders/" + encodeURIComponent(folder_id) + "/folders",
431
621
  data: {
432
622
  name,
433
623
  subfolders
@@ -440,22 +630,36 @@ function listFolderSubFolders({
440
630
  }, headers) {
441
631
  return axiosInstance({
442
632
  method: "get",
443
- url: "/folders/" + folder_id + "/folders",
633
+ url: "/folders/" + encodeURIComponent(folder_id) + "/folders",
444
634
  headers
445
635
  });
446
636
  }
447
637
  function uploadSourceFiles({
448
638
  folder_id,
449
- body
639
+ files,
640
+ task_name,
641
+ conversion_pipeline = "auto-detect",
642
+ source_files,
643
+ options
450
644
  }, onUploadProgress, headers) {
451
645
  return axiosInstance({
452
646
  method: "post",
453
- url: "/folders/" + folder_id + "/source-files",
454
- data: body,
647
+ url: "/folders/" + encodeURIComponent(folder_id) + "/source-files",
648
+ data: multipartBody(
649
+ {
650
+ task_name,
651
+ conversion_pipeline,
652
+ source_files,
653
+ options
654
+ },
655
+ {
656
+ files
657
+ }
658
+ ),
455
659
  onUploadProgress,
456
660
  headers: {
457
661
  "Content-Type": "multipart/form-data",
458
- ...headers?.toJSON()
662
+ ...plainHeaders(headers)
459
663
  }
460
664
  });
461
665
  }
@@ -467,7 +671,7 @@ function getSourceFilesInFolder({
467
671
  }, headers) {
468
672
  return axiosInstance({
469
673
  method: "get",
470
- url: "/folders/" + folder_id + "/source-files",
674
+ url: "/folders/" + encodeURIComponent(folder_id) + "/source-files",
471
675
  params: {
472
676
  offset,
473
677
  limit,
@@ -485,7 +689,7 @@ function moveSourceFiles({
485
689
  }, headers) {
486
690
  return axiosInstance({
487
691
  method: "put",
488
- url: "/folders/" + folder_id + "/source-files",
692
+ url: "/folders/" + encodeURIComponent(folder_id) + "/source-files",
489
693
  data: source_file_ids,
490
694
  headers
491
695
  });
@@ -497,7 +701,7 @@ function getUploadTasksInFolder({
497
701
  }, headers) {
498
702
  return axiosInstance({
499
703
  method: "get",
500
- url: "/folders/" + folder_id + "/upload-tasks",
704
+ url: "/folders/" + encodeURIComponent(folder_id) + "/upload-tasks",
501
705
  params: {
502
706
  offset,
503
707
  limit
@@ -514,7 +718,7 @@ function getFolderAssets({
514
718
  }, headers) {
515
719
  return axiosInstance({
516
720
  method: "get",
517
- url: "/folders/" + folder_id + "/assets",
721
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets",
518
722
  params: {
519
723
  offset,
520
724
  limit,
@@ -523,9 +727,7 @@ function getFolderAssets({
523
727
  },
524
728
  headers
525
729
  }).then((response) => {
526
- response.headers["x-assets-count"] = JSON.parse(
527
- response.headers["x-assets-count"]
528
- );
730
+ response.headers["x-assets-count"] = JSON.parse(response.headers["x-assets-count"]);
529
731
  return response;
530
732
  });
531
733
  }
@@ -535,7 +737,7 @@ function createAsset({
535
737
  }, headers) {
536
738
  return axiosInstance({
537
739
  method: "post",
538
- url: "/folders/" + folder_id + "/assets",
740
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets",
539
741
  data: asset_creation_options,
540
742
  headers
541
743
  });
@@ -546,21 +748,21 @@ function moveAssets({
546
748
  }, headers) {
547
749
  return axiosInstance({
548
750
  method: "put",
549
- url: "/folders/" + folder_id + "/assets",
751
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets",
550
752
  data: asset_ids,
551
753
  headers
552
754
  });
553
755
  }
554
756
  function createMaterial({
555
757
  folder_id,
556
- dataJson,
557
- isDoubleSided,
758
+ dataJson = {},
759
+ isDoubleSided = false,
558
760
  name,
559
- shaderRef
761
+ shaderRef = "00000000-0000-0000-0000-000000000000"
560
762
  }, headers) {
561
763
  return axiosInstance({
562
764
  method: "post",
563
- url: "/folders/" + folder_id + "/assets/materials",
765
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets/materials",
564
766
  data: {
565
767
  dataJson,
566
768
  isDoubleSided,
@@ -572,12 +774,19 @@ function createMaterial({
572
774
  }
573
775
  function createCubemap({
574
776
  folder_id,
575
- faces,
777
+ faces = [
778
+ "00000000-0000-0000-0000-000000000000",
779
+ "00000000-0000-0000-0000-000000000000",
780
+ "00000000-0000-0000-0000-000000000000",
781
+ "00000000-0000-0000-0000-000000000000",
782
+ "00000000-0000-0000-0000-000000000000",
783
+ "00000000-0000-0000-0000-000000000000"
784
+ ],
576
785
  name
577
786
  }, headers) {
578
787
  return axiosInstance({
579
788
  method: "post",
580
- url: "/folders/" + folder_id + "/assets/cubemaps",
789
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets/cubemaps",
581
790
  data: {
582
791
  faces,
583
792
  name
@@ -585,32 +794,88 @@ function createCubemap({
585
794
  headers
586
795
  });
587
796
  }
588
- function importAssets({
589
- folder_id,
590
- overwrite = "never",
591
- body
592
- }, onUploadProgress, headers) {
797
+ function getSessionsInFolder({
798
+ folder_id
799
+ }, headers) {
593
800
  return axiosInstance({
594
- method: "put",
595
- url: "/folders/" + folder_id + "/packages",
801
+ method: "get",
802
+ url: "/folders/" + encodeURIComponent(folder_id) + "/sessions",
803
+ headers
804
+ });
805
+ }
806
+ function createDuplicationRequest({
807
+ assets,
808
+ options
809
+ }, headers) {
810
+ return axiosInstance({
811
+ method: "post",
812
+ url: "/duplication-requests",
813
+ data: {
814
+ assets,
815
+ options
816
+ },
817
+ headers
818
+ });
819
+ }
820
+ function listDuplicationRequests({
821
+ offset = 0,
822
+ limit = 10,
823
+ states,
824
+ mine = false
825
+ }, headers) {
826
+ return axiosInstance({
827
+ method: "get",
828
+ url: "/duplication-requests",
596
829
  params: {
597
- overwrite
830
+ offset,
831
+ limit,
832
+ states,
833
+ mine
598
834
  },
599
- data: body,
600
- maxRedirects: 0,
601
- onUploadProgress,
602
- headers: {
603
- "Content-Type": "application/zip",
604
- ...headers?.toJSON()
605
- }
835
+ headers
606
836
  });
607
837
  }
608
- function getSessionsInFolder({
609
- folder_id
838
+ function getDuplicationRequest({
839
+ duplication_request_id
610
840
  }, headers) {
611
841
  return axiosInstance({
612
842
  method: "get",
613
- url: "/folders/" + folder_id + "/sessions",
843
+ url: "/duplication-requests/" + encodeURIComponent(duplication_request_id),
844
+ headers
845
+ });
846
+ }
847
+ function updateDuplicationRequest({
848
+ duplication_request_id,
849
+ assets,
850
+ folders_by_type,
851
+ dependencies_folders
852
+ }, headers) {
853
+ return axiosInstance({
854
+ method: "patch",
855
+ url: "/duplication-requests/" + encodeURIComponent(duplication_request_id),
856
+ data: {
857
+ assets,
858
+ folders_by_type,
859
+ dependencies_folders
860
+ },
861
+ headers
862
+ });
863
+ }
864
+ function discardDuplicationRequest({
865
+ duplication_request_id
866
+ }, headers) {
867
+ return axiosInstance({
868
+ method: "delete",
869
+ url: "/duplication-requests/" + encodeURIComponent(duplication_request_id),
870
+ headers
871
+ });
872
+ }
873
+ function confirmDuplicationRequest({
874
+ duplication_request_id
875
+ }, headers) {
876
+ return axiosInstance({
877
+ method: "post",
878
+ url: "/duplication-requests/" + encodeURIComponent(duplication_request_id) + "/confirm",
614
879
  headers
615
880
  });
616
881
  }
@@ -654,22 +919,12 @@ function getSupportedSourceFileFormats(headers) {
654
919
  headers
655
920
  });
656
921
  }
657
- function downloadSourceFile({
658
- source_file_id
659
- }, headers, responseType) {
660
- return axiosInstance({
661
- method: "get",
662
- url: "/source-files/" + source_file_id,
663
- headers,
664
- responseType: responseType || "arraybuffer"
665
- });
666
- }
667
922
  function getSourceFileDetails({
668
923
  source_file_id
669
924
  }, headers) {
670
925
  return axiosInstance({
671
926
  method: "get",
672
- url: "/source-files/" + source_file_id + "/details",
927
+ url: "/source-files/" + encodeURIComponent(source_file_id) + "/details",
673
928
  headers
674
929
  });
675
930
  }
@@ -679,7 +934,7 @@ function updateSourceFileDetails({
679
934
  }, headers) {
680
935
  return axiosInstance({
681
936
  method: "patch",
682
- url: "/source-files/" + source_file_id + "/details",
937
+ url: "/source-files/" + encodeURIComponent(source_file_id) + "/details",
683
938
  data: {
684
939
  name
685
940
  },
@@ -691,7 +946,7 @@ function getSourceFileAssets({
691
946
  }, headers) {
692
947
  return axiosInstance({
693
948
  method: "get",
694
- url: "/source-files/" + source_file_id + "/assets",
949
+ url: "/source-files/" + encodeURIComponent(source_file_id) + "/assets",
695
950
  headers
696
951
  });
697
952
  }
@@ -714,7 +969,7 @@ function getUploadTask({
714
969
  }, headers) {
715
970
  return axiosInstance({
716
971
  method: "get",
717
- url: "/upload-tasks/" + upload_task_id,
972
+ url: "/upload-tasks/" + encodeURIComponent(upload_task_id),
718
973
  headers
719
974
  });
720
975
  }
@@ -724,7 +979,7 @@ function getConversionTaskMetadata({
724
979
  }, headers, responseType) {
725
980
  return axiosInstance({
726
981
  method: "get",
727
- url: "/conversion_tasks/" + conversion_task_id + "/metadata/" + filename,
982
+ url: "/conversion_tasks/" + encodeURIComponent(conversion_task_id) + "/metadata/" + encodeURIComponent(filename),
728
983
  headers,
729
984
  responseType: responseType || "arraybuffer"
730
985
  });
@@ -754,7 +1009,7 @@ function getPipeline({
754
1009
  }, headers) {
755
1010
  return axiosInstance({
756
1011
  method: "get",
757
- url: "/pipelines/" + pipeline_id,
1012
+ url: "/pipelines/" + encodeURIComponent(pipeline_id),
758
1013
  headers
759
1014
  });
760
1015
  }
@@ -790,7 +1045,7 @@ function deleteAsset({
790
1045
  }, headers) {
791
1046
  return axiosInstance({
792
1047
  method: "delete",
793
- url: "/assets/" + asset_container + "/" + asset_id,
1048
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id),
794
1049
  headers
795
1050
  });
796
1051
  }
@@ -800,7 +1055,7 @@ function getAssetSourceFile({
800
1055
  }, headers) {
801
1056
  return axiosInstance({
802
1057
  method: "get",
803
- url: "/assets/" + asset_container + "/" + asset_id + "/source-file",
1058
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/source-file",
804
1059
  headers
805
1060
  });
806
1061
  }
@@ -810,7 +1065,7 @@ function getAssetDetails({
810
1065
  }, headers) {
811
1066
  return axiosInstance({
812
1067
  method: "get",
813
- url: "/assets/" + asset_container + "/" + asset_id + "/details",
1068
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/details",
814
1069
  headers
815
1070
  });
816
1071
  }
@@ -820,7 +1075,7 @@ function getAssetFolder({
820
1075
  }, headers) {
821
1076
  return axiosInstance({
822
1077
  method: "get",
823
- url: "/assets/" + asset_container + "/" + asset_id + "/folder",
1078
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/folder",
824
1079
  headers
825
1080
  });
826
1081
  }
@@ -835,7 +1090,7 @@ function getAssetDependencies({
835
1090
  }, headers) {
836
1091
  return axiosInstance({
837
1092
  method: "get",
838
- url: "/assets/" + asset_container + "/" + asset_id + "/dependencies",
1093
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/dependencies",
839
1094
  params: {
840
1095
  offset,
841
1096
  limit,
@@ -855,7 +1110,7 @@ function getAssetReferences({
855
1110
  }, headers) {
856
1111
  return axiosInstance({
857
1112
  method: "get",
858
- url: "/assets/" + asset_container + "/" + asset_id + "/references",
1113
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/references",
859
1114
  params: {
860
1115
  offset,
861
1116
  limit,
@@ -870,7 +1125,7 @@ function getAssetDescription({
870
1125
  }, headers) {
871
1126
  return axiosInstance({
872
1127
  method: "get",
873
- url: "/assets/" + asset_container + "/" + asset_id + "/description",
1128
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/description",
874
1129
  headers
875
1130
  });
876
1131
  }
@@ -881,7 +1136,7 @@ function updateAssetDescription({
881
1136
  }, headers) {
882
1137
  return axiosInstance({
883
1138
  method: "put",
884
- url: "/assets/" + asset_container + "/" + asset_id + "/description",
1139
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/description",
885
1140
  data: asset_description,
886
1141
  headers
887
1142
  });
@@ -893,7 +1148,7 @@ function renameAsset({
893
1148
  }, headers) {
894
1149
  return axiosInstance({
895
1150
  method: "patch",
896
- url: "/assets/" + asset_container + "/" + asset_id + "/description",
1151
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/description",
897
1152
  data: {
898
1153
  name
899
1154
  },
@@ -907,7 +1162,7 @@ function getAssetPayload({
907
1162
  }, headers, responseType) {
908
1163
  return axiosInstance({
909
1164
  method: "get",
910
- url: "/assets/" + asset_container_with_payload + "/" + asset_id + "/payload",
1165
+ url: "/assets/" + encodeURIComponent(asset_container_with_payload) + "/" + encodeURIComponent(asset_id) + "/payload",
911
1166
  params: {
912
1167
  sub_resource
913
1168
  },
@@ -921,7 +1176,7 @@ function getAssetGraph({
921
1176
  }, headers) {
922
1177
  return axiosInstance({
923
1178
  method: "get",
924
- url: "/assets/" + asset_container_with_graph + "/" + asset_id + "/graph",
1179
+ url: "/assets/" + encodeURIComponent(asset_container_with_graph) + "/" + encodeURIComponent(asset_id) + "/graph",
925
1180
  headers
926
1181
  });
927
1182
  }
@@ -932,7 +1187,7 @@ function updateAssetGraph({
932
1187
  }, headers) {
933
1188
  return axiosInstance({
934
1189
  method: "put",
935
- url: "/assets/" + asset_container_with_graph + "/" + asset_id + "/graph",
1190
+ url: "/assets/" + encodeURIComponent(asset_container_with_graph) + "/" + encodeURIComponent(asset_id) + "/graph",
936
1191
  data: asset_graph,
937
1192
  headers
938
1193
  });
@@ -943,7 +1198,7 @@ function getAssetHistory({
943
1198
  }, headers) {
944
1199
  return axiosInstance({
945
1200
  method: "get",
946
- url: "/assets/" + asset_container + "/" + asset_id + "/history",
1201
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/history",
947
1202
  headers
948
1203
  });
949
1204
  }
@@ -953,7 +1208,7 @@ function getAssetMeta({
953
1208
  }, headers) {
954
1209
  return axiosInstance({
955
1210
  method: "get",
956
- url: "/assets/" + asset_container + "/" + asset_id + "/meta",
1211
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/meta",
957
1212
  headers
958
1213
  });
959
1214
  }
@@ -963,7 +1218,7 @@ function getAssetCode({
963
1218
  }, headers) {
964
1219
  return axiosInstance({
965
1220
  method: "get",
966
- url: "/assets/" + asset_container_with_code + "/" + asset_id + "/code",
1221
+ url: "/assets/" + encodeURIComponent(asset_container_with_code) + "/" + encodeURIComponent(asset_id) + "/code",
967
1222
  headers,
968
1223
  responseType: "text"
969
1224
  });
@@ -976,7 +1231,7 @@ function getAssetThumbnail({
976
1231
  }, headers, responseType) {
977
1232
  return axiosInstance({
978
1233
  method: "get",
979
- url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
1234
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/thumbnail",
980
1235
  params: {
981
1236
  size,
982
1237
  default_url
@@ -992,32 +1247,22 @@ function setAssetThumbnail({
992
1247
  }, contentType, headers) {
993
1248
  return axiosInstance({
994
1249
  method: "put",
995
- url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
1250
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/thumbnail",
996
1251
  data: body,
997
1252
  maxRedirects: 0,
998
1253
  headers: {
999
1254
  "Content-Type": contentType,
1000
- ...headers?.toJSON()
1255
+ ...plainHeaders(headers)
1001
1256
  }
1002
1257
  });
1003
1258
  }
1004
- function getAssetCustomTypes({
1005
- asset_container_with_custom_types,
1006
- asset_id
1007
- }, headers) {
1008
- return axiosInstance({
1009
- method: "get",
1010
- url: "/assets/" + asset_container_with_custom_types + "/" + asset_id + "/custom-types",
1011
- headers
1012
- });
1013
- }
1014
1259
  function packageAsset({
1015
1260
  asset_container,
1016
1261
  asset_id
1017
1262
  }, headers, responseType) {
1018
1263
  return axiosInstance({
1019
1264
  method: "get",
1020
- url: "/assets/" + asset_container + "/" + asset_id + "/package",
1265
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/package",
1021
1266
  headers,
1022
1267
  responseType: responseType || "arraybuffer"
1023
1268
  });
@@ -1031,7 +1276,7 @@ function exportAsset({
1031
1276
  }, headers, responseType) {
1032
1277
  return axiosInstance({
1033
1278
  method: "get",
1034
- url: "/assets/" + asset_container_exportable + "/" + asset_id + "/exports/" + format,
1279
+ url: "/assets/" + encodeURIComponent(asset_container_exportable) + "/" + encodeURIComponent(asset_id) + "/exports/" + encodeURIComponent(format),
1035
1280
  params: {
1036
1281
  scale,
1037
1282
  sub_mesh_index
@@ -1045,7 +1290,7 @@ function getSceneSessions({
1045
1290
  }, headers) {
1046
1291
  return axiosInstance({
1047
1292
  method: "get",
1048
- url: "/assets/scenes/" + scene_id + "/sessions",
1293
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/sessions",
1049
1294
  headers
1050
1295
  });
1051
1296
  }
@@ -1054,18 +1299,116 @@ function getSceneAABB({
1054
1299
  }, headers) {
1055
1300
  return axiosInstance({
1056
1301
  method: "get",
1057
- url: "/assets/scenes/" + scene_id + "/aabb",
1302
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/aabb",
1058
1303
  headers
1059
1304
  });
1060
1305
  }
1061
1306
  function createEntity({
1062
1307
  scene_id,
1063
- entity_components
1308
+ animation_controller,
1309
+ animation_sequence_controller,
1310
+ bone,
1311
+ box_geometry,
1312
+ camera,
1313
+ capsule_geometry,
1314
+ character_controller,
1315
+ collision_geometry_ref,
1316
+ constraint,
1317
+ constraint_actuator,
1318
+ culling_geometry,
1319
+ custom_lens,
1320
+ cylinder_geometry,
1321
+ debug_name,
1322
+ decal_projector,
1323
+ environment,
1324
+ joint,
1325
+ label,
1326
+ lineage,
1327
+ local_aabb,
1328
+ local_transform,
1329
+ material,
1330
+ material_ref,
1331
+ measure,
1332
+ mesh_ref,
1333
+ morph_targets,
1334
+ orthographic_lens,
1335
+ overrider,
1336
+ perspective_lens,
1337
+ physics_material,
1338
+ plane_geometry,
1339
+ point_cloud_ref,
1340
+ point_light,
1341
+ reflection_probe,
1342
+ rigid_body,
1343
+ scene_ref,
1344
+ script_element,
1345
+ script_map,
1346
+ shadow_caster,
1347
+ skeleton_ref,
1348
+ sound_ref,
1349
+ sphere_geometry,
1350
+ spline,
1351
+ spot_light,
1352
+ tags,
1353
+ vehicle_controller,
1354
+ volume_filter,
1355
+ volume_material_ref,
1356
+ volume_ref
1064
1357
  }, headers) {
1065
1358
  return axiosInstance({
1066
1359
  method: "post",
1067
- url: "/assets/scenes/" + scene_id + "/entities",
1068
- data: entity_components,
1360
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/entities",
1361
+ data: {
1362
+ animation_controller,
1363
+ animation_sequence_controller,
1364
+ bone,
1365
+ box_geometry,
1366
+ camera,
1367
+ capsule_geometry,
1368
+ character_controller,
1369
+ collision_geometry_ref,
1370
+ constraint,
1371
+ constraint_actuator,
1372
+ culling_geometry,
1373
+ custom_lens,
1374
+ cylinder_geometry,
1375
+ debug_name,
1376
+ decal_projector,
1377
+ environment,
1378
+ joint,
1379
+ label,
1380
+ lineage,
1381
+ local_aabb,
1382
+ local_transform,
1383
+ material,
1384
+ material_ref,
1385
+ measure,
1386
+ mesh_ref,
1387
+ morph_targets,
1388
+ orthographic_lens,
1389
+ overrider,
1390
+ perspective_lens,
1391
+ physics_material,
1392
+ plane_geometry,
1393
+ point_cloud_ref,
1394
+ point_light,
1395
+ reflection_probe,
1396
+ rigid_body,
1397
+ scene_ref,
1398
+ script_element,
1399
+ script_map,
1400
+ shadow_caster,
1401
+ skeleton_ref,
1402
+ sound_ref,
1403
+ sphere_geometry,
1404
+ spline,
1405
+ spot_light,
1406
+ tags,
1407
+ vehicle_controller,
1408
+ volume_filter,
1409
+ volume_material_ref,
1410
+ volume_ref
1411
+ },
1069
1412
  headers
1070
1413
  });
1071
1414
  }
@@ -1076,7 +1419,7 @@ function getEntity({
1076
1419
  }, headers) {
1077
1420
  return axiosInstance({
1078
1421
  method: "get",
1079
- url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
1422
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/entities/" + encodeURIComponent(entity_id),
1080
1423
  params: {
1081
1424
  compute_global_transform
1082
1425
  },
@@ -1086,12 +1429,110 @@ function getEntity({
1086
1429
  function updateEntity({
1087
1430
  scene_id,
1088
1431
  entity_id,
1089
- entity_components
1432
+ animation_controller,
1433
+ animation_sequence_controller,
1434
+ bone,
1435
+ box_geometry,
1436
+ camera,
1437
+ capsule_geometry,
1438
+ character_controller,
1439
+ collision_geometry_ref,
1440
+ constraint,
1441
+ constraint_actuator,
1442
+ culling_geometry,
1443
+ custom_lens,
1444
+ cylinder_geometry,
1445
+ debug_name,
1446
+ decal_projector,
1447
+ environment,
1448
+ joint,
1449
+ label,
1450
+ lineage,
1451
+ local_aabb,
1452
+ local_transform,
1453
+ material,
1454
+ material_ref,
1455
+ measure,
1456
+ mesh_ref,
1457
+ morph_targets,
1458
+ orthographic_lens,
1459
+ overrider,
1460
+ perspective_lens,
1461
+ physics_material,
1462
+ plane_geometry,
1463
+ point_cloud_ref,
1464
+ point_light,
1465
+ reflection_probe,
1466
+ rigid_body,
1467
+ scene_ref,
1468
+ script_element,
1469
+ script_map,
1470
+ shadow_caster,
1471
+ skeleton_ref,
1472
+ sound_ref,
1473
+ sphere_geometry,
1474
+ spline,
1475
+ spot_light,
1476
+ tags,
1477
+ vehicle_controller,
1478
+ volume_filter,
1479
+ volume_material_ref,
1480
+ volume_ref
1090
1481
  }, headers) {
1091
1482
  return axiosInstance({
1092
1483
  method: "patch",
1093
- url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
1094
- data: entity_components,
1484
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/entities/" + encodeURIComponent(entity_id),
1485
+ data: {
1486
+ animation_controller,
1487
+ animation_sequence_controller,
1488
+ bone,
1489
+ box_geometry,
1490
+ camera,
1491
+ capsule_geometry,
1492
+ character_controller,
1493
+ collision_geometry_ref,
1494
+ constraint,
1495
+ constraint_actuator,
1496
+ culling_geometry,
1497
+ custom_lens,
1498
+ cylinder_geometry,
1499
+ debug_name,
1500
+ decal_projector,
1501
+ environment,
1502
+ joint,
1503
+ label,
1504
+ lineage,
1505
+ local_aabb,
1506
+ local_transform,
1507
+ material,
1508
+ material_ref,
1509
+ measure,
1510
+ mesh_ref,
1511
+ morph_targets,
1512
+ orthographic_lens,
1513
+ overrider,
1514
+ perspective_lens,
1515
+ physics_material,
1516
+ plane_geometry,
1517
+ point_cloud_ref,
1518
+ point_light,
1519
+ reflection_probe,
1520
+ rigid_body,
1521
+ scene_ref,
1522
+ script_element,
1523
+ script_map,
1524
+ shadow_caster,
1525
+ skeleton_ref,
1526
+ sound_ref,
1527
+ sphere_geometry,
1528
+ spline,
1529
+ spot_light,
1530
+ tags,
1531
+ vehicle_controller,
1532
+ volume_filter,
1533
+ volume_material_ref,
1534
+ volume_ref
1535
+ },
1095
1536
  headers
1096
1537
  });
1097
1538
  }
@@ -1101,7 +1542,7 @@ function deleteEntity({
1101
1542
  }, headers) {
1102
1543
  return axiosInstance({
1103
1544
  method: "delete",
1104
- url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
1545
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/entities/" + encodeURIComponent(entity_id),
1105
1546
  headers
1106
1547
  });
1107
1548
  }
@@ -1110,7 +1551,7 @@ function getSceneSettings({
1110
1551
  }, headers) {
1111
1552
  return axiosInstance({
1112
1553
  method: "get",
1113
- url: "/assets/scenes/" + scene_id + "/settings",
1554
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/settings",
1114
1555
  headers
1115
1556
  });
1116
1557
  }
@@ -1120,7 +1561,7 @@ function updateSceneSettings({
1120
1561
  }, headers) {
1121
1562
  return axiosInstance({
1122
1563
  method: "patch",
1123
- url: "/assets/scenes/" + scene_id + "/settings",
1564
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/settings",
1124
1565
  data: body,
1125
1566
  headers
1126
1567
  });
@@ -1160,7 +1601,7 @@ function getSession({
1160
1601
  }, headers) {
1161
1602
  return axiosInstance({
1162
1603
  method: "get",
1163
- url: "/sessions/" + session_id,
1604
+ url: "/sessions/" + encodeURIComponent(session_id),
1164
1605
  headers
1165
1606
  });
1166
1607
  }
@@ -1169,7 +1610,7 @@ function killSession({
1169
1610
  }, headers) {
1170
1611
  return axiosInstance({
1171
1612
  method: "delete",
1172
- url: "/sessions/" + session_id,
1613
+ url: "/sessions/" + encodeURIComponent(session_id),
1173
1614
  headers
1174
1615
  });
1175
1616
  }
@@ -1179,10 +1620,10 @@ function joinSession({
1179
1620
  }, headers) {
1180
1621
  return axiosInstance({
1181
1622
  method: "post",
1182
- url: "/sessions/" + session_id + "/clients",
1183
- data: {
1623
+ url: "/sessions/" + encodeURIComponent(session_id) + "/clients",
1624
+ data: optionalBody({
1184
1625
  is_headless
1185
- },
1626
+ }),
1186
1627
  headers
1187
1628
  });
1188
1629
  }
@@ -1192,7 +1633,7 @@ function getClient({
1192
1633
  }, headers) {
1193
1634
  return axiosInstance({
1194
1635
  method: "get",
1195
- url: "/sessions/" + session_id + "/clients/" + client_id,
1636
+ url: "/sessions/" + encodeURIComponent(session_id) + "/clients/" + encodeURIComponent(client_id),
1196
1637
  headers
1197
1638
  });
1198
1639
  }
@@ -1202,7 +1643,7 @@ function kickClientFromSession({
1202
1643
  }, headers) {
1203
1644
  return axiosInstance({
1204
1645
  method: "delete",
1205
- url: "/sessions/" + session_id + "/clients/" + client_id,
1646
+ url: "/sessions/" + encodeURIComponent(session_id) + "/clients/" + encodeURIComponent(client_id),
1206
1647
  headers
1207
1648
  });
1208
1649
  }
@@ -1218,7 +1659,7 @@ function generateGuestToken({
1218
1659
  }, headers) {
1219
1660
  return axiosInstance({
1220
1661
  method: "post",
1221
- url: "/sessions/" + session_id + "/guests",
1662
+ url: "/sessions/" + encodeURIComponent(session_id) + "/guests",
1222
1663
  headers
1223
1664
  });
1224
1665
  }
@@ -1305,10 +1746,28 @@ installInterceptors();
1305
1746
  // Annotate the CommonJS export names for ESM import in node:
1306
1747
  0 && (module.exports = {
1307
1748
  ApiError,
1749
+ ConversionTaskNotFound,
1750
+ EnvironmentMismatch,
1751
+ InsufficientPermissions,
1752
+ InsufficientSecurityScope,
1753
+ InvalidApiKey,
1754
+ InvalidAuthorization,
1755
+ InvalidGuestToken,
1756
+ InvalidMaterial,
1757
+ InvalidRequest,
1758
+ MissingAuthorizationHeader,
1759
+ NoFileUploaded,
1760
+ ServiceErrorResponse,
1761
+ Unauthorized,
1308
1762
  UnexpectedServiceError,
1763
+ UploadAborted,
1764
+ UploadTaskNotFound,
1765
+ UploadedPayloadTooLarge,
1309
1766
  axiosInstance,
1767
+ confirmDuplicationRequest,
1310
1768
  createAsset,
1311
1769
  createCubemap,
1770
+ createDuplicationRequest,
1312
1771
  createEntity,
1313
1772
  createFolder,
1314
1773
  createGroup,
@@ -1322,12 +1781,12 @@ installInterceptors();
1322
1781
  deleteGroup,
1323
1782
  deleteSourceFiles,
1324
1783
  deleteUser,
1325
- downloadSourceFile,
1784
+ discardDuplicationRequest,
1785
+ errorOf,
1326
1786
  exportAsset,
1327
1787
  generateGuestToken,
1328
1788
  generateUserToken,
1329
1789
  getAssetCode,
1330
- getAssetCustomTypes,
1331
1790
  getAssetDependencies,
1332
1791
  getAssetDescription,
1333
1792
  getAssetDetails,
@@ -1342,6 +1801,7 @@ installInterceptors();
1342
1801
  getClient,
1343
1802
  getConversionTaskMetadata,
1344
1803
  getCurrentUser,
1804
+ getDuplicationRequest,
1345
1805
  getEntity,
1346
1806
  getFolderAssets,
1347
1807
  getFolderInfo,
@@ -1365,12 +1825,12 @@ installInterceptors();
1365
1825
  getUserUploadTasks,
1366
1826
  grantMemberAccessToFolder,
1367
1827
  grantMemberAccessToGroup,
1368
- importAssets,
1369
1828
  joinSession,
1370
1829
  joinSessionAsGuest,
1371
1830
  kickClientFromSession,
1372
1831
  killSession,
1373
1832
  listAssets,
1833
+ listDuplicationRequests,
1374
1834
  listFolderAccesses,
1375
1835
  listFolderSubFolders,
1376
1836
  listFolders,
@@ -1391,6 +1851,7 @@ installInterceptors();
1391
1851
  setUserToken,
1392
1852
  updateAssetDescription,
1393
1853
  updateAssetGraph,
1854
+ updateDuplicationRequest,
1394
1855
  updateEntity,
1395
1856
  updateFolder,
1396
1857
  updateGroupDescription,