@3dverse/api 0.5.0 → 0.5.2
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 +7 -6
- package/dist/index.d.ts +6 -0
- package/dist/index.js +27 -26
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +27 -26
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
|
@@ -402,14 +402,12 @@ export declare function getFolderAssets({ folder_id, offset, limit, filter }: {
|
|
|
402
402
|
limit?: number;
|
|
403
403
|
filter?: GetFolderAssets_Filter;
|
|
404
404
|
}): AxiosPromise<GetFolderAssets__index_AssetList_AssetList>;
|
|
405
|
-
export declare function moveAssets({ folder_id, assetIds }: {
|
|
406
|
-
folder_id: string;
|
|
407
|
-
assetIds: Array<string>;
|
|
408
|
-
}): Promise<import("axios").AxiosResponse<any, any>>;
|
|
409
405
|
export type CreateAsset_NewAsset = {
|
|
406
|
+
asset_type: "action_map" | "algorithm" | "animation_graph" | "animation_sequence" | "cubemap" | "event_map" | "material" | "module" | "render_graph" | "scene" | "script" | "shader" | "volume_material";
|
|
410
407
|
name: string;
|
|
411
408
|
};
|
|
412
409
|
export type CreateAsset_AssetDuplication = {
|
|
410
|
+
asset_type: "action_map" | "algorithm" | "animation" | "animation_graph" | "animation_sequence" | "animation_set" | "collision_geometry" | "cubemap" | "event_map" | "material" | "mesh" | "module" | "point_cloud" | "render_graph" | "scene" | "script" | "shader" | "skeleton" | "sound" | "texture" | "texture_1d" | "texture_3d" | "volume_material";
|
|
413
411
|
copy_from_asset_id: string;
|
|
414
412
|
new_asset_name?: string;
|
|
415
413
|
options?: CreateAsset_DuplicationOptions;
|
|
@@ -426,11 +424,14 @@ export type CreateAsset_AssetDuplicationResult = {
|
|
|
426
424
|
export type CreateAsset_SourceToCopyAssetIdMap = {
|
|
427
425
|
[source_asset_id: string]: string;
|
|
428
426
|
};
|
|
429
|
-
export declare function createAsset({ folder_id,
|
|
427
|
+
export declare function createAsset({ folder_id, assetCreationOptions }: {
|
|
430
428
|
folder_id: string;
|
|
431
|
-
asset_container_creatable: "action_maps" | "algorithms" | "animation_graphs" | "animation_sequences" | "cubemaps" | "event_maps" | "materials" | "modules" | "render_graphs" | "scenes" | "scripts" | "shaders" | "volume_materials";
|
|
432
429
|
assetCreationOptions: StrictUnion<CreateAsset_NewAsset | CreateAsset_AssetDuplication>;
|
|
433
430
|
}): AxiosPromise<CreateAsset_AssetDuplicationResult>;
|
|
431
|
+
export declare function moveAssets({ folder_id, assetIds }: {
|
|
432
|
+
folder_id: string;
|
|
433
|
+
assetIds: Array<string>;
|
|
434
|
+
}): Promise<import("axios").AxiosResponse<any, any>>;
|
|
434
435
|
export type GetSessionsInFolder_Session = {
|
|
435
436
|
session_id: string;
|
|
436
437
|
scene_id: string;
|
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,
|
|
@@ -498,27 +484,26 @@ function getFolderAssets({
|
|
|
498
484
|
}
|
|
499
485
|
});
|
|
500
486
|
}
|
|
501
|
-
function
|
|
487
|
+
function createAsset({
|
|
502
488
|
folder_id,
|
|
503
|
-
|
|
489
|
+
assetCreationOptions
|
|
504
490
|
}) {
|
|
505
491
|
return axiosInstance({
|
|
506
|
-
operationId: "
|
|
507
|
-
method: "
|
|
492
|
+
operationId: "createAsset",
|
|
493
|
+
method: "post",
|
|
508
494
|
url: "/folders/" + folder_id + "/assets",
|
|
509
|
-
data:
|
|
495
|
+
data: assetCreationOptions
|
|
510
496
|
});
|
|
511
497
|
}
|
|
512
|
-
function
|
|
498
|
+
function moveAssets({
|
|
513
499
|
folder_id,
|
|
514
|
-
|
|
515
|
-
assetCreationOptions
|
|
500
|
+
assetIds
|
|
516
501
|
}) {
|
|
517
502
|
return axiosInstance({
|
|
518
|
-
operationId: "
|
|
519
|
-
method: "
|
|
520
|
-
url: "/folders/" + folder_id + "/assets
|
|
521
|
-
data:
|
|
503
|
+
operationId: "moveAssets",
|
|
504
|
+
method: "put",
|
|
505
|
+
url: "/folders/" + folder_id + "/assets",
|
|
506
|
+
data: assetIds
|
|
522
507
|
});
|
|
523
508
|
}
|
|
524
509
|
function getSessionsInFolder({
|
|
@@ -1045,6 +1030,22 @@ function shouldRetryRequest(error) {
|
|
|
1045
1030
|
}
|
|
1046
1031
|
}
|
|
1047
1032
|
installInterceptors();
|
|
1033
|
+
function uploadSourceFiles({
|
|
1034
|
+
folder_id,
|
|
1035
|
+
body,
|
|
1036
|
+
onUploadProgress
|
|
1037
|
+
}) {
|
|
1038
|
+
return axiosInstance({
|
|
1039
|
+
operationId: "uploadSourceFiles",
|
|
1040
|
+
method: "post",
|
|
1041
|
+
url: `/folders/${folder_id}/source-files`,
|
|
1042
|
+
headers: {
|
|
1043
|
+
"Content-Type": "multipart/form-data"
|
|
1044
|
+
},
|
|
1045
|
+
data: body,
|
|
1046
|
+
onUploadProgress
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1048
1049
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1049
1050
|
0 && (module.exports = {
|
|
1050
1051
|
ApiError,
|