@3dverse/api 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_prebuild/wrapper.d.ts +349 -239
- package/dist/index.js +22 -3
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +20 -3
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -49,6 +49,13 @@ var axiosInstance = axios.create({
|
|
|
49
49
|
function setBaseURL(baseURL) {
|
|
50
50
|
axiosInstance.defaults.baseURL = baseURL;
|
|
51
51
|
}
|
|
52
|
+
var AssetSourceFileNotFound = class extends ServiceErrorResponse {
|
|
53
|
+
static ERROR_CODE = 1018;
|
|
54
|
+
constructor(serviceError) {
|
|
55
|
+
super(1018, 404, "The asset was imported from no source file", serviceError);
|
|
56
|
+
Object.assign(this, serviceError);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
52
59
|
var InsufficientPermissions = class extends ServiceErrorResponse {
|
|
53
60
|
static ERROR_CODE = 1002;
|
|
54
61
|
constructor(serviceError) {
|
|
@@ -105,6 +112,13 @@ var InvalidGuestToken = class extends ServiceErrorResponse {
|
|
|
105
112
|
Object.assign(this, serviceError);
|
|
106
113
|
}
|
|
107
114
|
};
|
|
115
|
+
var InvalidTokenTtl = class extends ServiceErrorResponse {
|
|
116
|
+
static ERROR_CODE = 1017;
|
|
117
|
+
constructor(serviceError) {
|
|
118
|
+
super(1017, 400, "The time to live of a user token is a duration from 1 minute to 14 days", serviceError);
|
|
119
|
+
Object.assign(this, serviceError);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
108
122
|
var UploadedPayloadTooLarge = class extends ServiceErrorResponse {
|
|
109
123
|
static ERROR_CODE = 1007;
|
|
110
124
|
constructor(serviceError) {
|
|
@@ -155,6 +169,7 @@ var ConversionTaskNotFound = class extends ServiceErrorResponse {
|
|
|
155
169
|
}
|
|
156
170
|
};
|
|
157
171
|
var declaredErrors = {
|
|
172
|
+
1018: AssetSourceFileNotFound,
|
|
158
173
|
1002: InsufficientPermissions,
|
|
159
174
|
1003: InvalidAuthorization,
|
|
160
175
|
1004: InsufficientSecurityScope,
|
|
@@ -163,6 +178,7 @@ var declaredErrors = {
|
|
|
163
178
|
1011: MissingAuthorizationHeader,
|
|
164
179
|
1012: InvalidApiKey,
|
|
165
180
|
1016: InvalidGuestToken,
|
|
181
|
+
1017: InvalidTokenTtl,
|
|
166
182
|
1007: UploadedPayloadTooLarge,
|
|
167
183
|
1008: NoFileUploaded,
|
|
168
184
|
1009: UploadAborted,
|
|
@@ -1129,7 +1145,7 @@ function exportAsset({
|
|
|
1129
1145
|
format,
|
|
1130
1146
|
scale = 1,
|
|
1131
1147
|
sub_mesh_index
|
|
1132
|
-
}, headers
|
|
1148
|
+
}, headers) {
|
|
1133
1149
|
return axiosInstance({
|
|
1134
1150
|
method: "get",
|
|
1135
1151
|
url: "/assets/" + encodeURIComponent(asset_container_exportable) + "/" + encodeURIComponent(asset_id) + "/exports/" + encodeURIComponent(format),
|
|
@@ -1137,8 +1153,7 @@ function exportAsset({
|
|
|
1137
1153
|
scale,
|
|
1138
1154
|
sub_mesh_index
|
|
1139
1155
|
},
|
|
1140
|
-
headers
|
|
1141
|
-
responseType: responseType || "arraybuffer"
|
|
1156
|
+
headers
|
|
1142
1157
|
});
|
|
1143
1158
|
}
|
|
1144
1159
|
function getSceneSessions({
|
|
@@ -1601,6 +1616,7 @@ function shouldRetryRequest(error) {
|
|
|
1601
1616
|
installInterceptors();
|
|
1602
1617
|
export {
|
|
1603
1618
|
ApiError,
|
|
1619
|
+
AssetSourceFileNotFound,
|
|
1604
1620
|
ConversionTaskNotFound,
|
|
1605
1621
|
EnvironmentMismatch,
|
|
1606
1622
|
InsufficientPermissions,
|
|
@@ -1610,6 +1626,7 @@ export {
|
|
|
1610
1626
|
InvalidGuestToken,
|
|
1611
1627
|
InvalidMaterial,
|
|
1612
1628
|
InvalidRequest,
|
|
1629
|
+
InvalidTokenTtl,
|
|
1613
1630
|
MissingAuthorizationHeader,
|
|
1614
1631
|
NoFileUploaded,
|
|
1615
1632
|
ServiceErrorResponse,
|