@3dverse/api 0.9.0 → 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,
@@ -95,6 +114,7 @@ __export(index_exports, {
95
114
  kickClientFromSession: () => kickClientFromSession,
96
115
  killSession: () => killSession,
97
116
  listAssets: () => listAssets,
117
+ listDuplicationRequests: () => listDuplicationRequests,
98
118
  listFolderAccesses: () => listFolderAccesses,
99
119
  listFolderSubFolders: () => listFolderSubFolders,
100
120
  listFolders: () => listFolders,
@@ -115,6 +135,7 @@ __export(index_exports, {
115
135
  setUserToken: () => setUserToken,
116
136
  updateAssetDescription: () => updateAssetDescription,
117
137
  updateAssetGraph: () => updateAssetGraph,
138
+ updateDuplicationRequest: () => updateDuplicationRequest,
118
139
  updateEntity: () => updateEntity,
119
140
  updateFolder: () => updateFolder,
120
141
  updateGroupDescription: () => updateGroupDescription,
@@ -128,12 +149,182 @@ var import_axios_retry = __toESM(require("axios-retry"));
128
149
 
129
150
  // _prebuild/wrapper.ts
130
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
+ }
131
189
  var axiosInstance = import_axios.default.create({
132
- baseURL: "https://api.3dverse.com/app/v1"
190
+ baseURL: "https://api.3dverse.com/app/v1",
191
+ paramsSerializer: { indexes: null }
133
192
  });
134
193
  function setBaseURL(baseURL) {
135
194
  axiosInstance.defaults.baseURL = baseURL;
136
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
+ }
137
328
  function listUsers({
138
329
  offset = 0,
139
330
  limit = 10
@@ -172,7 +363,7 @@ function getUser({
172
363
  }, headers) {
173
364
  return axiosInstance({
174
365
  method: "get",
175
- url: "/users/" + user_id,
366
+ url: "/users/" + encodeURIComponent(user_id),
176
367
  headers
177
368
  });
178
369
  }
@@ -182,7 +373,7 @@ function updateUser({
182
373
  }, headers) {
183
374
  return axiosInstance({
184
375
  method: "patch",
185
- url: "/users/" + user_id,
376
+ url: "/users/" + encodeURIComponent(user_id),
186
377
  data: {
187
378
  username
188
379
  },
@@ -194,7 +385,7 @@ function deleteUser({
194
385
  }, headers) {
195
386
  return axiosInstance({
196
387
  method: "delete",
197
- url: "/users/" + user_id,
388
+ url: "/users/" + encodeURIComponent(user_id),
198
389
  headers
199
390
  });
200
391
  }
@@ -205,7 +396,7 @@ function generateUserToken({
205
396
  }, headers) {
206
397
  return axiosInstance({
207
398
  method: "post",
208
- url: "/users/" + user_id + "/tokens",
399
+ url: "/users/" + encodeURIComponent(user_id) + "/tokens",
209
400
  data: {
210
401
  scope,
211
402
  ttl
@@ -218,7 +409,7 @@ function getUserGroups({
218
409
  }, headers) {
219
410
  return axiosInstance({
220
411
  method: "get",
221
- url: "/users/" + user_id + "/groups",
412
+ url: "/users/" + encodeURIComponent(user_id) + "/groups",
222
413
  headers
223
414
  });
224
415
  }
@@ -229,7 +420,7 @@ function getUserUploadTasks({
229
420
  }, headers) {
230
421
  return axiosInstance({
231
422
  method: "get",
232
- url: "/users/" + user_id + "/upload-tasks",
423
+ url: "/users/" + encodeURIComponent(user_id) + "/upload-tasks",
233
424
  params: {
234
425
  offset,
235
426
  limit
@@ -258,7 +449,7 @@ function getGroup({
258
449
  }, headers) {
259
450
  return axiosInstance({
260
451
  method: "get",
261
- url: "/groups/" + group_id,
452
+ url: "/groups/" + encodeURIComponent(group_id),
262
453
  headers
263
454
  });
264
455
  }
@@ -269,7 +460,7 @@ function updateGroupDescription({
269
460
  }, headers) {
270
461
  return axiosInstance({
271
462
  method: "patch",
272
- url: "/groups/" + group_id,
463
+ url: "/groups/" + encodeURIComponent(group_id),
273
464
  data: {
274
465
  name,
275
466
  description
@@ -282,7 +473,7 @@ function deleteGroup({
282
473
  }, headers) {
283
474
  return axiosInstance({
284
475
  method: "delete",
285
- url: "/groups/" + group_id,
476
+ url: "/groups/" + encodeURIComponent(group_id),
286
477
  headers
287
478
  });
288
479
  }
@@ -295,7 +486,7 @@ function grantMemberAccessToGroup({
295
486
  }, headers) {
296
487
  return axiosInstance({
297
488
  method: "put",
298
- url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id,
489
+ url: "/groups/" + encodeURIComponent(group_id) + "/members/" + encodeURIComponent(member_type) + "/" + encodeURIComponent(member_id),
299
490
  data: {
300
491
  group_access,
301
492
  folder_access
@@ -310,7 +501,7 @@ function revokeMemberAccessToGroup({
310
501
  }, headers) {
311
502
  return axiosInstance({
312
503
  method: "delete",
313
- url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id,
504
+ url: "/groups/" + encodeURIComponent(group_id) + "/members/" + encodeURIComponent(member_type) + "/" + encodeURIComponent(member_id),
314
505
  headers
315
506
  });
316
507
  }
@@ -347,7 +538,7 @@ function getFolderInfo({
347
538
  }, headers) {
348
539
  return axiosInstance({
349
540
  method: "get",
350
- url: "/folders/" + folder_id,
541
+ url: "/folders/" + encodeURIComponent(folder_id),
351
542
  headers
352
543
  });
353
544
  }
@@ -357,7 +548,7 @@ function moveFolders({
357
548
  }, headers) {
358
549
  return axiosInstance({
359
550
  method: "put",
360
- url: "/folders/" + folder_id,
551
+ url: "/folders/" + encodeURIComponent(folder_id),
361
552
  data: folder_ids,
362
553
  headers
363
554
  });
@@ -368,7 +559,7 @@ function updateFolder({
368
559
  }, headers) {
369
560
  return axiosInstance({
370
561
  method: "patch",
371
- url: "/folders/" + folder_id,
562
+ url: "/folders/" + encodeURIComponent(folder_id),
372
563
  data: {
373
564
  name
374
565
  },
@@ -380,7 +571,7 @@ function deleteFolder({
380
571
  }, headers) {
381
572
  return axiosInstance({
382
573
  method: "delete",
383
- url: "/folders/" + folder_id,
574
+ url: "/folders/" + encodeURIComponent(folder_id),
384
575
  headers
385
576
  });
386
577
  }
@@ -389,7 +580,7 @@ function listFolderAccesses({
389
580
  }, headers) {
390
581
  return axiosInstance({
391
582
  method: "get",
392
- url: "/folders/" + folder_id + "/access",
583
+ url: "/folders/" + encodeURIComponent(folder_id) + "/access",
393
584
  headers
394
585
  });
395
586
  }
@@ -401,7 +592,7 @@ function grantMemberAccessToFolder({
401
592
  }, headers) {
402
593
  return axiosInstance({
403
594
  method: "put",
404
- url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id,
595
+ url: "/folders/" + encodeURIComponent(folder_id) + "/access/" + encodeURIComponent(member_type) + "/" + encodeURIComponent(member_id),
405
596
  data: {
406
597
  access
407
598
  },
@@ -415,7 +606,7 @@ function revokeMemberAccessToFolder({
415
606
  }, headers) {
416
607
  return axiosInstance({
417
608
  method: "delete",
418
- url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id,
609
+ url: "/folders/" + encodeURIComponent(folder_id) + "/access/" + encodeURIComponent(member_type) + "/" + encodeURIComponent(member_id),
419
610
  headers
420
611
  });
421
612
  }
@@ -426,7 +617,7 @@ function createSubfolder({
426
617
  }, headers) {
427
618
  return axiosInstance({
428
619
  method: "post",
429
- url: "/folders/" + folder_id + "/folders",
620
+ url: "/folders/" + encodeURIComponent(folder_id) + "/folders",
430
621
  data: {
431
622
  name,
432
623
  subfolders
@@ -439,22 +630,36 @@ function listFolderSubFolders({
439
630
  }, headers) {
440
631
  return axiosInstance({
441
632
  method: "get",
442
- url: "/folders/" + folder_id + "/folders",
633
+ url: "/folders/" + encodeURIComponent(folder_id) + "/folders",
443
634
  headers
444
635
  });
445
636
  }
446
637
  function uploadSourceFiles({
447
638
  folder_id,
448
- body
639
+ files,
640
+ task_name,
641
+ conversion_pipeline = "auto-detect",
642
+ source_files,
643
+ options
449
644
  }, onUploadProgress, headers) {
450
645
  return axiosInstance({
451
646
  method: "post",
452
- url: "/folders/" + folder_id + "/source-files",
453
- 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
+ ),
454
659
  onUploadProgress,
455
660
  headers: {
456
661
  "Content-Type": "multipart/form-data",
457
- ...headers?.toJSON()
662
+ ...plainHeaders(headers)
458
663
  }
459
664
  });
460
665
  }
@@ -466,7 +671,7 @@ function getSourceFilesInFolder({
466
671
  }, headers) {
467
672
  return axiosInstance({
468
673
  method: "get",
469
- url: "/folders/" + folder_id + "/source-files",
674
+ url: "/folders/" + encodeURIComponent(folder_id) + "/source-files",
470
675
  params: {
471
676
  offset,
472
677
  limit,
@@ -484,7 +689,7 @@ function moveSourceFiles({
484
689
  }, headers) {
485
690
  return axiosInstance({
486
691
  method: "put",
487
- url: "/folders/" + folder_id + "/source-files",
692
+ url: "/folders/" + encodeURIComponent(folder_id) + "/source-files",
488
693
  data: source_file_ids,
489
694
  headers
490
695
  });
@@ -496,7 +701,7 @@ function getUploadTasksInFolder({
496
701
  }, headers) {
497
702
  return axiosInstance({
498
703
  method: "get",
499
- url: "/folders/" + folder_id + "/upload-tasks",
704
+ url: "/folders/" + encodeURIComponent(folder_id) + "/upload-tasks",
500
705
  params: {
501
706
  offset,
502
707
  limit
@@ -513,7 +718,7 @@ function getFolderAssets({
513
718
  }, headers) {
514
719
  return axiosInstance({
515
720
  method: "get",
516
- url: "/folders/" + folder_id + "/assets",
721
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets",
517
722
  params: {
518
723
  offset,
519
724
  limit,
@@ -522,9 +727,7 @@ function getFolderAssets({
522
727
  },
523
728
  headers
524
729
  }).then((response) => {
525
- response.headers["x-assets-count"] = JSON.parse(
526
- response.headers["x-assets-count"]
527
- );
730
+ response.headers["x-assets-count"] = JSON.parse(response.headers["x-assets-count"]);
528
731
  return response;
529
732
  });
530
733
  }
@@ -534,7 +737,7 @@ function createAsset({
534
737
  }, headers) {
535
738
  return axiosInstance({
536
739
  method: "post",
537
- url: "/folders/" + folder_id + "/assets",
740
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets",
538
741
  data: asset_creation_options,
539
742
  headers
540
743
  });
@@ -545,21 +748,21 @@ function moveAssets({
545
748
  }, headers) {
546
749
  return axiosInstance({
547
750
  method: "put",
548
- url: "/folders/" + folder_id + "/assets",
751
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets",
549
752
  data: asset_ids,
550
753
  headers
551
754
  });
552
755
  }
553
756
  function createMaterial({
554
757
  folder_id,
555
- dataJson,
556
- isDoubleSided,
758
+ dataJson = {},
759
+ isDoubleSided = false,
557
760
  name,
558
- shaderRef
761
+ shaderRef = "00000000-0000-0000-0000-000000000000"
559
762
  }, headers) {
560
763
  return axiosInstance({
561
764
  method: "post",
562
- url: "/folders/" + folder_id + "/assets/materials",
765
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets/materials",
563
766
  data: {
564
767
  dataJson,
565
768
  isDoubleSided,
@@ -571,12 +774,19 @@ function createMaterial({
571
774
  }
572
775
  function createCubemap({
573
776
  folder_id,
574
- 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
+ ],
575
785
  name
576
786
  }, headers) {
577
787
  return axiosInstance({
578
788
  method: "post",
579
- url: "/folders/" + folder_id + "/assets/cubemaps",
789
+ url: "/folders/" + encodeURIComponent(folder_id) + "/assets/cubemaps",
580
790
  data: {
581
791
  faces,
582
792
  name
@@ -589,7 +799,83 @@ function getSessionsInFolder({
589
799
  }, headers) {
590
800
  return axiosInstance({
591
801
  method: "get",
592
- url: "/folders/" + folder_id + "/sessions",
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",
829
+ params: {
830
+ offset,
831
+ limit,
832
+ states,
833
+ mine
834
+ },
835
+ headers
836
+ });
837
+ }
838
+ function getDuplicationRequest({
839
+ duplication_request_id
840
+ }, headers) {
841
+ return axiosInstance({
842
+ method: "get",
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",
593
879
  headers
594
880
  });
595
881
  }
@@ -633,22 +919,12 @@ function getSupportedSourceFileFormats(headers) {
633
919
  headers
634
920
  });
635
921
  }
636
- function downloadSourceFile({
637
- source_file_id
638
- }, headers, responseType) {
639
- return axiosInstance({
640
- method: "get",
641
- url: "/source-files/" + source_file_id,
642
- headers,
643
- responseType: responseType || "arraybuffer"
644
- });
645
- }
646
922
  function getSourceFileDetails({
647
923
  source_file_id
648
924
  }, headers) {
649
925
  return axiosInstance({
650
926
  method: "get",
651
- url: "/source-files/" + source_file_id + "/details",
927
+ url: "/source-files/" + encodeURIComponent(source_file_id) + "/details",
652
928
  headers
653
929
  });
654
930
  }
@@ -658,7 +934,7 @@ function updateSourceFileDetails({
658
934
  }, headers) {
659
935
  return axiosInstance({
660
936
  method: "patch",
661
- url: "/source-files/" + source_file_id + "/details",
937
+ url: "/source-files/" + encodeURIComponent(source_file_id) + "/details",
662
938
  data: {
663
939
  name
664
940
  },
@@ -670,7 +946,7 @@ function getSourceFileAssets({
670
946
  }, headers) {
671
947
  return axiosInstance({
672
948
  method: "get",
673
- url: "/source-files/" + source_file_id + "/assets",
949
+ url: "/source-files/" + encodeURIComponent(source_file_id) + "/assets",
674
950
  headers
675
951
  });
676
952
  }
@@ -693,7 +969,7 @@ function getUploadTask({
693
969
  }, headers) {
694
970
  return axiosInstance({
695
971
  method: "get",
696
- url: "/upload-tasks/" + upload_task_id,
972
+ url: "/upload-tasks/" + encodeURIComponent(upload_task_id),
697
973
  headers
698
974
  });
699
975
  }
@@ -703,7 +979,7 @@ function getConversionTaskMetadata({
703
979
  }, headers, responseType) {
704
980
  return axiosInstance({
705
981
  method: "get",
706
- url: "/conversion_tasks/" + conversion_task_id + "/metadata/" + filename,
982
+ url: "/conversion_tasks/" + encodeURIComponent(conversion_task_id) + "/metadata/" + encodeURIComponent(filename),
707
983
  headers,
708
984
  responseType: responseType || "arraybuffer"
709
985
  });
@@ -733,7 +1009,7 @@ function getPipeline({
733
1009
  }, headers) {
734
1010
  return axiosInstance({
735
1011
  method: "get",
736
- url: "/pipelines/" + pipeline_id,
1012
+ url: "/pipelines/" + encodeURIComponent(pipeline_id),
737
1013
  headers
738
1014
  });
739
1015
  }
@@ -769,7 +1045,7 @@ function deleteAsset({
769
1045
  }, headers) {
770
1046
  return axiosInstance({
771
1047
  method: "delete",
772
- url: "/assets/" + asset_container + "/" + asset_id,
1048
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id),
773
1049
  headers
774
1050
  });
775
1051
  }
@@ -779,7 +1055,7 @@ function getAssetSourceFile({
779
1055
  }, headers) {
780
1056
  return axiosInstance({
781
1057
  method: "get",
782
- url: "/assets/" + asset_container + "/" + asset_id + "/source-file",
1058
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/source-file",
783
1059
  headers
784
1060
  });
785
1061
  }
@@ -789,7 +1065,7 @@ function getAssetDetails({
789
1065
  }, headers) {
790
1066
  return axiosInstance({
791
1067
  method: "get",
792
- url: "/assets/" + asset_container + "/" + asset_id + "/details",
1068
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/details",
793
1069
  headers
794
1070
  });
795
1071
  }
@@ -799,7 +1075,7 @@ function getAssetFolder({
799
1075
  }, headers) {
800
1076
  return axiosInstance({
801
1077
  method: "get",
802
- url: "/assets/" + asset_container + "/" + asset_id + "/folder",
1078
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/folder",
803
1079
  headers
804
1080
  });
805
1081
  }
@@ -814,7 +1090,7 @@ function getAssetDependencies({
814
1090
  }, headers) {
815
1091
  return axiosInstance({
816
1092
  method: "get",
817
- url: "/assets/" + asset_container + "/" + asset_id + "/dependencies",
1093
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/dependencies",
818
1094
  params: {
819
1095
  offset,
820
1096
  limit,
@@ -834,7 +1110,7 @@ function getAssetReferences({
834
1110
  }, headers) {
835
1111
  return axiosInstance({
836
1112
  method: "get",
837
- url: "/assets/" + asset_container + "/" + asset_id + "/references",
1113
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/references",
838
1114
  params: {
839
1115
  offset,
840
1116
  limit,
@@ -849,7 +1125,7 @@ function getAssetDescription({
849
1125
  }, headers) {
850
1126
  return axiosInstance({
851
1127
  method: "get",
852
- url: "/assets/" + asset_container + "/" + asset_id + "/description",
1128
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/description",
853
1129
  headers
854
1130
  });
855
1131
  }
@@ -860,7 +1136,7 @@ function updateAssetDescription({
860
1136
  }, headers) {
861
1137
  return axiosInstance({
862
1138
  method: "put",
863
- url: "/assets/" + asset_container + "/" + asset_id + "/description",
1139
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/description",
864
1140
  data: asset_description,
865
1141
  headers
866
1142
  });
@@ -872,7 +1148,7 @@ function renameAsset({
872
1148
  }, headers) {
873
1149
  return axiosInstance({
874
1150
  method: "patch",
875
- url: "/assets/" + asset_container + "/" + asset_id + "/description",
1151
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/description",
876
1152
  data: {
877
1153
  name
878
1154
  },
@@ -886,7 +1162,7 @@ function getAssetPayload({
886
1162
  }, headers, responseType) {
887
1163
  return axiosInstance({
888
1164
  method: "get",
889
- url: "/assets/" + asset_container_with_payload + "/" + asset_id + "/payload",
1165
+ url: "/assets/" + encodeURIComponent(asset_container_with_payload) + "/" + encodeURIComponent(asset_id) + "/payload",
890
1166
  params: {
891
1167
  sub_resource
892
1168
  },
@@ -900,7 +1176,7 @@ function getAssetGraph({
900
1176
  }, headers) {
901
1177
  return axiosInstance({
902
1178
  method: "get",
903
- url: "/assets/" + asset_container_with_graph + "/" + asset_id + "/graph",
1179
+ url: "/assets/" + encodeURIComponent(asset_container_with_graph) + "/" + encodeURIComponent(asset_id) + "/graph",
904
1180
  headers
905
1181
  });
906
1182
  }
@@ -911,7 +1187,7 @@ function updateAssetGraph({
911
1187
  }, headers) {
912
1188
  return axiosInstance({
913
1189
  method: "put",
914
- url: "/assets/" + asset_container_with_graph + "/" + asset_id + "/graph",
1190
+ url: "/assets/" + encodeURIComponent(asset_container_with_graph) + "/" + encodeURIComponent(asset_id) + "/graph",
915
1191
  data: asset_graph,
916
1192
  headers
917
1193
  });
@@ -922,7 +1198,7 @@ function getAssetHistory({
922
1198
  }, headers) {
923
1199
  return axiosInstance({
924
1200
  method: "get",
925
- url: "/assets/" + asset_container + "/" + asset_id + "/history",
1201
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/history",
926
1202
  headers
927
1203
  });
928
1204
  }
@@ -932,7 +1208,7 @@ function getAssetMeta({
932
1208
  }, headers) {
933
1209
  return axiosInstance({
934
1210
  method: "get",
935
- url: "/assets/" + asset_container + "/" + asset_id + "/meta",
1211
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/meta",
936
1212
  headers
937
1213
  });
938
1214
  }
@@ -942,7 +1218,7 @@ function getAssetCode({
942
1218
  }, headers) {
943
1219
  return axiosInstance({
944
1220
  method: "get",
945
- url: "/assets/" + asset_container_with_code + "/" + asset_id + "/code",
1221
+ url: "/assets/" + encodeURIComponent(asset_container_with_code) + "/" + encodeURIComponent(asset_id) + "/code",
946
1222
  headers,
947
1223
  responseType: "text"
948
1224
  });
@@ -955,7 +1231,7 @@ function getAssetThumbnail({
955
1231
  }, headers, responseType) {
956
1232
  return axiosInstance({
957
1233
  method: "get",
958
- url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
1234
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/thumbnail",
959
1235
  params: {
960
1236
  size,
961
1237
  default_url
@@ -971,32 +1247,22 @@ function setAssetThumbnail({
971
1247
  }, contentType, headers) {
972
1248
  return axiosInstance({
973
1249
  method: "put",
974
- url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
1250
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/thumbnail",
975
1251
  data: body,
976
1252
  maxRedirects: 0,
977
1253
  headers: {
978
1254
  "Content-Type": contentType,
979
- ...headers?.toJSON()
1255
+ ...plainHeaders(headers)
980
1256
  }
981
1257
  });
982
1258
  }
983
- function getAssetCustomTypes({
984
- asset_container_with_custom_types,
985
- asset_id
986
- }, headers) {
987
- return axiosInstance({
988
- method: "get",
989
- url: "/assets/" + asset_container_with_custom_types + "/" + asset_id + "/custom-types",
990
- headers
991
- });
992
- }
993
1259
  function packageAsset({
994
1260
  asset_container,
995
1261
  asset_id
996
1262
  }, headers, responseType) {
997
1263
  return axiosInstance({
998
1264
  method: "get",
999
- url: "/assets/" + asset_container + "/" + asset_id + "/package",
1265
+ url: "/assets/" + encodeURIComponent(asset_container) + "/" + encodeURIComponent(asset_id) + "/package",
1000
1266
  headers,
1001
1267
  responseType: responseType || "arraybuffer"
1002
1268
  });
@@ -1010,7 +1276,7 @@ function exportAsset({
1010
1276
  }, headers, responseType) {
1011
1277
  return axiosInstance({
1012
1278
  method: "get",
1013
- url: "/assets/" + asset_container_exportable + "/" + asset_id + "/exports/" + format,
1279
+ url: "/assets/" + encodeURIComponent(asset_container_exportable) + "/" + encodeURIComponent(asset_id) + "/exports/" + encodeURIComponent(format),
1014
1280
  params: {
1015
1281
  scale,
1016
1282
  sub_mesh_index
@@ -1024,7 +1290,7 @@ function getSceneSessions({
1024
1290
  }, headers) {
1025
1291
  return axiosInstance({
1026
1292
  method: "get",
1027
- url: "/assets/scenes/" + scene_id + "/sessions",
1293
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/sessions",
1028
1294
  headers
1029
1295
  });
1030
1296
  }
@@ -1033,18 +1299,116 @@ function getSceneAABB({
1033
1299
  }, headers) {
1034
1300
  return axiosInstance({
1035
1301
  method: "get",
1036
- url: "/assets/scenes/" + scene_id + "/aabb",
1302
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/aabb",
1037
1303
  headers
1038
1304
  });
1039
1305
  }
1040
1306
  function createEntity({
1041
1307
  scene_id,
1042
- 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
1043
1357
  }, headers) {
1044
1358
  return axiosInstance({
1045
1359
  method: "post",
1046
- url: "/assets/scenes/" + scene_id + "/entities",
1047
- 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
+ },
1048
1412
  headers
1049
1413
  });
1050
1414
  }
@@ -1055,7 +1419,7 @@ function getEntity({
1055
1419
  }, headers) {
1056
1420
  return axiosInstance({
1057
1421
  method: "get",
1058
- url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
1422
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/entities/" + encodeURIComponent(entity_id),
1059
1423
  params: {
1060
1424
  compute_global_transform
1061
1425
  },
@@ -1065,12 +1429,110 @@ function getEntity({
1065
1429
  function updateEntity({
1066
1430
  scene_id,
1067
1431
  entity_id,
1068
- 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
1069
1481
  }, headers) {
1070
1482
  return axiosInstance({
1071
1483
  method: "patch",
1072
- url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
1073
- 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
+ },
1074
1536
  headers
1075
1537
  });
1076
1538
  }
@@ -1080,7 +1542,7 @@ function deleteEntity({
1080
1542
  }, headers) {
1081
1543
  return axiosInstance({
1082
1544
  method: "delete",
1083
- url: "/assets/scenes/" + scene_id + "/entities/" + entity_id,
1545
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/entities/" + encodeURIComponent(entity_id),
1084
1546
  headers
1085
1547
  });
1086
1548
  }
@@ -1089,7 +1551,7 @@ function getSceneSettings({
1089
1551
  }, headers) {
1090
1552
  return axiosInstance({
1091
1553
  method: "get",
1092
- url: "/assets/scenes/" + scene_id + "/settings",
1554
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/settings",
1093
1555
  headers
1094
1556
  });
1095
1557
  }
@@ -1099,7 +1561,7 @@ function updateSceneSettings({
1099
1561
  }, headers) {
1100
1562
  return axiosInstance({
1101
1563
  method: "patch",
1102
- url: "/assets/scenes/" + scene_id + "/settings",
1564
+ url: "/assets/scenes/" + encodeURIComponent(scene_id) + "/settings",
1103
1565
  data: body,
1104
1566
  headers
1105
1567
  });
@@ -1139,7 +1601,7 @@ function getSession({
1139
1601
  }, headers) {
1140
1602
  return axiosInstance({
1141
1603
  method: "get",
1142
- url: "/sessions/" + session_id,
1604
+ url: "/sessions/" + encodeURIComponent(session_id),
1143
1605
  headers
1144
1606
  });
1145
1607
  }
@@ -1148,7 +1610,7 @@ function killSession({
1148
1610
  }, headers) {
1149
1611
  return axiosInstance({
1150
1612
  method: "delete",
1151
- url: "/sessions/" + session_id,
1613
+ url: "/sessions/" + encodeURIComponent(session_id),
1152
1614
  headers
1153
1615
  });
1154
1616
  }
@@ -1158,10 +1620,10 @@ function joinSession({
1158
1620
  }, headers) {
1159
1621
  return axiosInstance({
1160
1622
  method: "post",
1161
- url: "/sessions/" + session_id + "/clients",
1162
- data: {
1623
+ url: "/sessions/" + encodeURIComponent(session_id) + "/clients",
1624
+ data: optionalBody({
1163
1625
  is_headless
1164
- },
1626
+ }),
1165
1627
  headers
1166
1628
  });
1167
1629
  }
@@ -1171,7 +1633,7 @@ function getClient({
1171
1633
  }, headers) {
1172
1634
  return axiosInstance({
1173
1635
  method: "get",
1174
- url: "/sessions/" + session_id + "/clients/" + client_id,
1636
+ url: "/sessions/" + encodeURIComponent(session_id) + "/clients/" + encodeURIComponent(client_id),
1175
1637
  headers
1176
1638
  });
1177
1639
  }
@@ -1181,7 +1643,7 @@ function kickClientFromSession({
1181
1643
  }, headers) {
1182
1644
  return axiosInstance({
1183
1645
  method: "delete",
1184
- url: "/sessions/" + session_id + "/clients/" + client_id,
1646
+ url: "/sessions/" + encodeURIComponent(session_id) + "/clients/" + encodeURIComponent(client_id),
1185
1647
  headers
1186
1648
  });
1187
1649
  }
@@ -1197,7 +1659,7 @@ function generateGuestToken({
1197
1659
  }, headers) {
1198
1660
  return axiosInstance({
1199
1661
  method: "post",
1200
- url: "/sessions/" + session_id + "/guests",
1662
+ url: "/sessions/" + encodeURIComponent(session_id) + "/guests",
1201
1663
  headers
1202
1664
  });
1203
1665
  }
@@ -1284,10 +1746,28 @@ installInterceptors();
1284
1746
  // Annotate the CommonJS export names for ESM import in node:
1285
1747
  0 && (module.exports = {
1286
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,
1287
1762
  UnexpectedServiceError,
1763
+ UploadAborted,
1764
+ UploadTaskNotFound,
1765
+ UploadedPayloadTooLarge,
1288
1766
  axiosInstance,
1767
+ confirmDuplicationRequest,
1289
1768
  createAsset,
1290
1769
  createCubemap,
1770
+ createDuplicationRequest,
1291
1771
  createEntity,
1292
1772
  createFolder,
1293
1773
  createGroup,
@@ -1301,12 +1781,12 @@ installInterceptors();
1301
1781
  deleteGroup,
1302
1782
  deleteSourceFiles,
1303
1783
  deleteUser,
1304
- downloadSourceFile,
1784
+ discardDuplicationRequest,
1785
+ errorOf,
1305
1786
  exportAsset,
1306
1787
  generateGuestToken,
1307
1788
  generateUserToken,
1308
1789
  getAssetCode,
1309
- getAssetCustomTypes,
1310
1790
  getAssetDependencies,
1311
1791
  getAssetDescription,
1312
1792
  getAssetDetails,
@@ -1321,6 +1801,7 @@ installInterceptors();
1321
1801
  getClient,
1322
1802
  getConversionTaskMetadata,
1323
1803
  getCurrentUser,
1804
+ getDuplicationRequest,
1324
1805
  getEntity,
1325
1806
  getFolderAssets,
1326
1807
  getFolderInfo,
@@ -1349,6 +1830,7 @@ installInterceptors();
1349
1830
  kickClientFromSession,
1350
1831
  killSession,
1351
1832
  listAssets,
1833
+ listDuplicationRequests,
1352
1834
  listFolderAccesses,
1353
1835
  listFolderSubFolders,
1354
1836
  listFolders,
@@ -1369,6 +1851,7 @@ installInterceptors();
1369
1851
  setUserToken,
1370
1852
  updateAssetDescription,
1371
1853
  updateAssetGraph,
1854
+ updateDuplicationRequest,
1372
1855
  updateEntity,
1373
1856
  updateFolder,
1374
1857
  updateGroupDescription,