@3dverse/api 0.4.5 → 0.5.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 +54 -10
- 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
@@ -89,18 +89,23 @@ export type GetUserUploadTasks_UploadTask = {
|
|
89
89
|
upload_task_id: string;
|
90
90
|
folder_id: string;
|
91
91
|
uploaded_at: string;
|
92
|
-
uploaded_by:
|
92
|
+
uploaded_by: GetUserUploadTasks_Object;
|
93
93
|
progress: number;
|
94
94
|
download_progress?: number;
|
95
|
-
status:
|
95
|
+
status: StrictUnion<'waiting' | 'downloading' | 'pending' | 'converting' | 'error' | 'success'> & string;
|
96
96
|
conversion_tasks: Array<GetUserUploadTasks_ConversionTask>;
|
97
97
|
};
|
98
|
+
export type GetUserUploadTasks_Object = {
|
99
|
+
user_id: string;
|
100
|
+
username: string;
|
101
|
+
};
|
98
102
|
export type GetUserUploadTasks_ConversionTask = {
|
99
103
|
asset_id: string;
|
100
104
|
source_file_id: string;
|
105
|
+
source_file_name: string;
|
101
106
|
conversion_pipeline: "auto-detect" | "volume" | "scene" | "texture" | "animation";
|
102
107
|
progress: number;
|
103
|
-
status:
|
108
|
+
status: StrictUnion<'pending' | 'converting' | 'error' | 'success'> & string;
|
104
109
|
};
|
105
110
|
export declare function getUserUploadTasks({ user_id, offset, limit }: {
|
106
111
|
user_id: string;
|
@@ -335,18 +340,23 @@ export type GetUploadTasksInFolder_UploadTask = {
|
|
335
340
|
upload_task_id: string;
|
336
341
|
folder_id: string;
|
337
342
|
uploaded_at: string;
|
338
|
-
uploaded_by:
|
343
|
+
uploaded_by: GetUploadTasksInFolder_Object;
|
339
344
|
progress: number;
|
340
345
|
download_progress?: number;
|
341
|
-
status:
|
346
|
+
status: StrictUnion<'waiting' | 'downloading' | 'pending' | 'converting' | 'error' | 'success'> & string;
|
342
347
|
conversion_tasks: Array<GetUploadTasksInFolder_ConversionTask>;
|
343
348
|
};
|
349
|
+
export type GetUploadTasksInFolder_Object = {
|
350
|
+
user_id: string;
|
351
|
+
username: string;
|
352
|
+
};
|
344
353
|
export type GetUploadTasksInFolder_ConversionTask = {
|
345
354
|
asset_id: string;
|
346
355
|
source_file_id: string;
|
356
|
+
source_file_name: string;
|
347
357
|
conversion_pipeline: "auto-detect" | "volume" | "scene" | "texture" | "animation";
|
348
358
|
progress: number;
|
349
|
-
status:
|
359
|
+
status: StrictUnion<'pending' | 'converting' | 'error' | 'success'> & string;
|
350
360
|
};
|
351
361
|
export declare function getUploadTasksInFolder({ folder_id, offset, limit }: {
|
352
362
|
folder_id: string;
|
@@ -513,18 +523,23 @@ export type GetUploadTask_UploadTask = {
|
|
513
523
|
upload_task_id: string;
|
514
524
|
folder_id: string;
|
515
525
|
uploaded_at: string;
|
516
|
-
uploaded_by:
|
526
|
+
uploaded_by: GetUploadTask_Object;
|
517
527
|
progress: number;
|
518
528
|
download_progress?: number;
|
519
|
-
status:
|
529
|
+
status: StrictUnion<'waiting' | 'downloading' | 'pending' | 'converting' | 'error' | 'success'> & string;
|
520
530
|
conversion_tasks: Array<GetUploadTask_ConversionTask>;
|
521
531
|
};
|
532
|
+
export type GetUploadTask_Object = {
|
533
|
+
user_id: string;
|
534
|
+
username: string;
|
535
|
+
};
|
522
536
|
export type GetUploadTask_ConversionTask = {
|
523
537
|
asset_id: string;
|
524
538
|
source_file_id: string;
|
539
|
+
source_file_name: string;
|
525
540
|
conversion_pipeline: "auto-detect" | "volume" | "scene" | "texture" | "animation";
|
526
541
|
progress: number;
|
527
|
-
status:
|
542
|
+
status: StrictUnion<'pending' | 'converting' | 'error' | 'success'> & string;
|
528
543
|
};
|
529
544
|
export declare function getUploadTask({ upload_task_id }: {
|
530
545
|
upload_task_id: string;
|
@@ -666,10 +681,39 @@ export declare function getAssetDependencies({ asset_container, asset_id, format
|
|
666
681
|
depth?: StrictUnion<'all' | 'direct'>;
|
667
682
|
filter?: GetAssetDependencies_Filter;
|
668
683
|
}): AxiosPromise<(GetAssetDependencies_Flat | Array<Array<GetAssetDependencies__index_AssetItem_AssetItem>>)>;
|
684
|
+
export type GetAssetReferences__index_AssetList_AssetList = {
|
685
|
+
action_maps?: Array<GetAssetReferences_Object>;
|
686
|
+
algorithms?: Array<GetAssetReferences_Object>;
|
687
|
+
animation_graphs?: Array<GetAssetReferences_Object>;
|
688
|
+
animation_sequences?: Array<GetAssetReferences_Object>;
|
689
|
+
animation_sets?: Array<GetAssetReferences_Object>;
|
690
|
+
animations?: Array<GetAssetReferences_Object>;
|
691
|
+
collision_geometries?: Array<GetAssetReferences_Object>;
|
692
|
+
cubemaps?: Array<GetAssetReferences_Object>;
|
693
|
+
event_maps?: Array<GetAssetReferences_Object>;
|
694
|
+
materials?: Array<GetAssetReferences_Object>;
|
695
|
+
meshes?: Array<GetAssetReferences_Object>;
|
696
|
+
modules?: Array<GetAssetReferences_Object>;
|
697
|
+
point_clouds?: Array<GetAssetReferences_Object>;
|
698
|
+
render_graphs?: Array<GetAssetReferences_Object>;
|
699
|
+
scenes?: Array<GetAssetReferences_Object>;
|
700
|
+
scripts?: Array<GetAssetReferences_Object>;
|
701
|
+
shaders?: Array<GetAssetReferences_Object>;
|
702
|
+
skeletons?: Array<GetAssetReferences_Object>;
|
703
|
+
sounds?: Array<GetAssetReferences_Object>;
|
704
|
+
textures?: Array<GetAssetReferences_Object>;
|
705
|
+
textures_1d?: Array<GetAssetReferences_Object>;
|
706
|
+
textures_3d?: Array<GetAssetReferences_Object>;
|
707
|
+
volume_materials?: Array<GetAssetReferences_Object>;
|
708
|
+
};
|
709
|
+
export type GetAssetReferences_Object = {
|
710
|
+
asset_id: string;
|
711
|
+
name: string;
|
712
|
+
};
|
669
713
|
export declare function getAssetReferences({ asset_container, asset_id }: {
|
670
714
|
asset_container: "action_maps" | "algorithms" | "animations" | "animation_graphs" | "animation_sequences" | "animation_sets" | "collision_geometries" | "cubemaps" | "event_maps" | "materials" | "meshes" | "modules" | "point_clouds" | "render_graphs" | "scenes" | "scripts" | "shaders" | "skeletons" | "sounds" | "textures" | "textures_1d" | "textures_3d" | "volume_materials";
|
671
715
|
asset_id: string;
|
672
|
-
}): AxiosPromise<
|
716
|
+
}): AxiosPromise<GetAssetReferences__index_AssetList_AssetList>;
|
673
717
|
export type GetAssetDescription_ActionMap = {
|
674
718
|
actions: GetAssetDescription_Object;
|
675
719
|
};
|
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,
|