@3dverse/api 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +6 -0
- package/dist/index.js +16 -14
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +16 -14
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import { AxiosProgressEvent } from 'axios';
|
2
|
+
import { uploadSourceFiles as _uploadSourceFiles } from './_prebuild/wrapper';
|
1
3
|
export declare function setApiKey(apiKey: string): void;
|
2
4
|
export declare function setUserToken(userToken: string): void;
|
3
5
|
declare abstract class ServiceError extends Error {
|
@@ -15,3 +17,7 @@ export declare class UnexpectedServiceError extends ServiceError {
|
|
15
17
|
constructor(status: number, unexpectedError: unknown);
|
16
18
|
}
|
17
19
|
export * from './_prebuild/wrapper';
|
20
|
+
type UploadSourceFiles = typeof _uploadSourceFiles;
|
21
|
+
export declare function uploadSourceFiles({ folder_id, body, onUploadProgress, }: Parameters<UploadSourceFiles>[0] & {
|
22
|
+
onUploadProgress?: (e: AxiosProgressEvent) => void;
|
23
|
+
}): ReturnType<UploadSourceFiles>;
|
package/dist/index.js
CHANGED
@@ -426,20 +426,6 @@ function listFolderSubFolders({
|
|
426
426
|
}
|
427
427
|
});
|
428
428
|
}
|
429
|
-
function uploadSourceFiles({
|
430
|
-
folder_id,
|
431
|
-
body
|
432
|
-
}) {
|
433
|
-
return axiosInstance({
|
434
|
-
operationId: "uploadSourceFiles",
|
435
|
-
method: "post",
|
436
|
-
url: "/folders/" + folder_id + "/source-files",
|
437
|
-
headers: {
|
438
|
-
"Content-Type": "multipart/form-data"
|
439
|
-
},
|
440
|
-
data: body
|
441
|
-
});
|
442
|
-
}
|
443
429
|
function getSourceFilesInFolder({
|
444
430
|
folder_id,
|
445
431
|
offset = 0,
|
@@ -1045,6 +1031,22 @@ function shouldRetryRequest(error) {
|
|
1045
1031
|
}
|
1046
1032
|
}
|
1047
1033
|
installInterceptors();
|
1034
|
+
function uploadSourceFiles({
|
1035
|
+
folder_id,
|
1036
|
+
body,
|
1037
|
+
onUploadProgress
|
1038
|
+
}) {
|
1039
|
+
return axiosInstance({
|
1040
|
+
operationId: "uploadSourceFiles",
|
1041
|
+
method: "post",
|
1042
|
+
url: `/folders/${folder_id}/source-files`,
|
1043
|
+
headers: {
|
1044
|
+
"Content-Type": "multipart/form-data"
|
1045
|
+
},
|
1046
|
+
data: body,
|
1047
|
+
onUploadProgress
|
1048
|
+
});
|
1049
|
+
}
|
1048
1050
|
// Annotate the CommonJS export names for ESM import in node:
|
1049
1051
|
0 && (module.exports = {
|
1050
1052
|
ApiError,
|