@3dverse/api 0.11.0 → 0.12.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.mjs CHANGED
@@ -126,17 +126,17 @@ var UploadAborted = class extends ServiceErrorResponse {
126
126
  Object.assign(this, serviceError);
127
127
  }
128
128
  };
129
- var UploadTaskNotFound = class extends ServiceErrorResponse {
130
- static ERROR_CODE = 1010;
129
+ var ImportNotFound = class extends ServiceErrorResponse {
130
+ static ERROR_CODE = 1022;
131
131
  constructor(serviceError) {
132
- super(1010, 404, "Upload task not found", serviceError);
132
+ super(1022, 404, "Import not found", serviceError);
133
133
  Object.assign(this, serviceError);
134
134
  }
135
135
  };
136
- var ConversionTaskNotFound = class extends ServiceErrorResponse {
137
- static ERROR_CODE = 1015;
136
+ var ConversionNotFound = class extends ServiceErrorResponse {
137
+ static ERROR_CODE = 1023;
138
138
  constructor(serviceError) {
139
- super(1015, 404, "Conversion task not found", serviceError);
139
+ super(1023, 404, "Conversion not found", serviceError);
140
140
  Object.assign(this, serviceError);
141
141
  }
142
142
  };
@@ -147,6 +147,20 @@ var LogsUnavailable = class extends ServiceErrorResponse {
147
147
  Object.assign(this, serviceError);
148
148
  }
149
149
  };
150
+ var UploadTaskNotFound = class extends ServiceErrorResponse {
151
+ static ERROR_CODE = 1010;
152
+ constructor(serviceError) {
153
+ super(1010, 404, "Upload task not found", serviceError);
154
+ Object.assign(this, serviceError);
155
+ }
156
+ };
157
+ var ConversionTaskNotFound = class extends ServiceErrorResponse {
158
+ static ERROR_CODE = 1015;
159
+ constructor(serviceError) {
160
+ super(1015, 404, "Conversion task not found", serviceError);
161
+ Object.assign(this, serviceError);
162
+ }
163
+ };
150
164
  var InvalidGuestToken = class extends ServiceErrorResponse {
151
165
  static ERROR_CODE = 1016;
152
166
  constructor(serviceError) {
@@ -194,9 +208,11 @@ var declaredErrors = {
194
208
  1007: UploadedPayloadTooLarge,
195
209
  1008: NoFileUploaded,
196
210
  1009: UploadAborted,
211
+ 1022: ImportNotFound,
212
+ 1023: ConversionNotFound,
213
+ 1019: LogsUnavailable,
197
214
  1010: UploadTaskNotFound,
198
215
  1015: ConversionTaskNotFound,
199
- 1019: LogsUnavailable,
200
216
  1016: InvalidGuestToken,
201
217
  1005: Unauthorized,
202
218
  1011: MissingAuthorizationHeader,
@@ -728,6 +744,89 @@ function listSourceFileAssets({
728
744
  headers
729
745
  });
730
746
  }
747
+ function createImport({
748
+ folder_id,
749
+ files,
750
+ conversion_pipeline = "auto-detect",
751
+ remote_files,
752
+ options
753
+ }, onUploadProgress, headers) {
754
+ return axiosInstance({
755
+ method: "post",
756
+ url: "/imports",
757
+ params: {
758
+ folder_id
759
+ },
760
+ data: multipartBody(
761
+ {
762
+ conversion_pipeline,
763
+ remote_files,
764
+ options
765
+ },
766
+ {
767
+ files
768
+ }
769
+ ),
770
+ onUploadProgress,
771
+ headers: {
772
+ "Content-Type": "multipart/form-data",
773
+ ...plainHeaders(headers)
774
+ }
775
+ });
776
+ }
777
+ function listImports({
778
+ offset = 0,
779
+ limit = 10,
780
+ filters
781
+ }, headers) {
782
+ return axiosInstance({
783
+ method: "get",
784
+ url: "/imports",
785
+ params: {
786
+ offset,
787
+ limit,
788
+ filters
789
+ },
790
+ headers
791
+ });
792
+ }
793
+ function getImport({
794
+ import_id
795
+ }, headers) {
796
+ return axiosInstance({
797
+ method: "get",
798
+ url: "/imports/" + encodeURIComponent(import_id),
799
+ headers
800
+ });
801
+ }
802
+ function getConversionLogs({
803
+ conversion_id,
804
+ from,
805
+ to,
806
+ limit
807
+ }, headers) {
808
+ return axiosInstance({
809
+ method: "get",
810
+ url: "/conversions/" + encodeURIComponent(conversion_id) + "/logs",
811
+ params: {
812
+ from,
813
+ to,
814
+ limit
815
+ },
816
+ headers
817
+ });
818
+ }
819
+ function getConversionMetadata({
820
+ conversion_id,
821
+ filename
822
+ }, headers, responseType) {
823
+ return axiosInstance({
824
+ method: "get",
825
+ url: "/conversions/" + encodeURIComponent(conversion_id) + "/metadata/" + encodeURIComponent(filename),
826
+ headers,
827
+ responseType: responseType || "arraybuffer"
828
+ });
829
+ }
731
830
  function listUploadTasks({
732
831
  offset = 0,
733
832
  limit = 10,
@@ -1065,6 +1164,7 @@ function createEntity({
1065
1164
  measure,
1066
1165
  mesh_ref,
1067
1166
  morph_targets,
1167
+ navmesh_ref,
1068
1168
  orthographic_lens,
1069
1169
  overrider,
1070
1170
  perspective_lens,
@@ -1119,6 +1219,7 @@ function createEntity({
1119
1219
  measure,
1120
1220
  mesh_ref,
1121
1221
  morph_targets,
1222
+ navmesh_ref,
1122
1223
  orthographic_lens,
1123
1224
  overrider,
1124
1225
  perspective_lens,
@@ -1189,6 +1290,7 @@ function updateEntity({
1189
1290
  measure,
1190
1291
  mesh_ref,
1191
1292
  morph_targets,
1293
+ navmesh_ref,
1192
1294
  orthographic_lens,
1193
1295
  overrider,
1194
1296
  perspective_lens,
@@ -1243,6 +1345,7 @@ function updateEntity({
1243
1345
  measure,
1244
1346
  mesh_ref,
1245
1347
  morph_targets,
1348
+ navmesh_ref,
1246
1349
  orthographic_lens,
1247
1350
  overrider,
1248
1351
  perspective_lens,
@@ -1481,7 +1584,9 @@ function shouldRetryRequest(error) {
1481
1584
  installInterceptors();
1482
1585
  export {
1483
1586
  ApiError,
1587
+ ConversionNotFound,
1484
1588
  ConversionTaskNotFound,
1589
+ ImportNotFound,
1485
1590
  InsufficientPermissions,
1486
1591
  InsufficientSecurityScope,
1487
1592
  InvalidApiKey,
@@ -1507,6 +1612,7 @@ export {
1507
1612
  createEntity,
1508
1613
  createFolder,
1509
1614
  createGroup,
1615
+ createImport,
1510
1616
  createSession,
1511
1617
  createSubfolder,
1512
1618
  deleteAsset,
@@ -1528,6 +1634,8 @@ export {
1528
1634
  getAssetPayload,
1529
1635
  getAssetThumbnail,
1530
1636
  getClient,
1637
+ getConversionLogs,
1638
+ getConversionMetadata,
1531
1639
  getConversionTaskLogs,
1532
1640
  getConversionTaskMetadata,
1533
1641
  getCurrentUser,
@@ -1535,6 +1643,7 @@ export {
1535
1643
  getEntity,
1536
1644
  getFolder,
1537
1645
  getGroup,
1646
+ getImport,
1538
1647
  getSceneAABB,
1539
1648
  getSceneSettings,
1540
1649
  getSession,
@@ -1557,6 +1666,7 @@ export {
1557
1666
  listFolderSubfolders,
1558
1667
  listFolderUploadTasks,
1559
1668
  listFolders,
1669
+ listImports,
1560
1670
  listRunningSessions,
1561
1671
  listSourceFileAssets,
1562
1672
  listSourceFiles,