@3dverse/api 0.13.0 → 0.13.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 +152 -20
- package/dist/index.js +3 -23
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +3 -23
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -39,13 +39,6 @@ function multipartBody(fields, files) {
|
|
|
39
39
|
}
|
|
40
40
|
return form;
|
|
41
41
|
}
|
|
42
|
-
function jsonOrMultipartBody(fields, files) {
|
|
43
|
-
const hasFile = Object.values(files).some((value) => Array.isArray(value) ? value.length > 0 : value !== void 0);
|
|
44
|
-
if (hasFile) {
|
|
45
|
-
return multipartBody(fields, files);
|
|
46
|
-
}
|
|
47
|
-
return Object.fromEntries(Object.entries(fields).filter(([, value]) => value !== void 0));
|
|
48
|
-
}
|
|
49
42
|
function plainHeaders(headers) {
|
|
50
43
|
return headers instanceof AxiosHeaders ? headers.toJSON() : { ...headers };
|
|
51
44
|
}
|
|
@@ -753,28 +746,15 @@ function listSourceFileAssets({
|
|
|
753
746
|
}
|
|
754
747
|
function createImport({
|
|
755
748
|
folder_id,
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
remote_files,
|
|
759
|
-
options
|
|
760
|
-
}, onUploadProgress, headers) {
|
|
749
|
+
body
|
|
750
|
+
}, headers) {
|
|
761
751
|
return axiosInstance({
|
|
762
752
|
method: "post",
|
|
763
753
|
url: "/imports",
|
|
764
754
|
params: {
|
|
765
755
|
folder_id
|
|
766
756
|
},
|
|
767
|
-
data:
|
|
768
|
-
{
|
|
769
|
-
conversion_pipeline,
|
|
770
|
-
remote_files,
|
|
771
|
-
options
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
files
|
|
775
|
-
}
|
|
776
|
-
),
|
|
777
|
-
onUploadProgress,
|
|
757
|
+
data: body,
|
|
778
758
|
headers
|
|
779
759
|
});
|
|
780
760
|
}
|