@3dverse/api 0.3.0 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -86,20 +86,21 @@ export declare function getUserGroups({ user_id }: {
86
86
  user_id: string;
87
87
  }): AxiosPromise<Array<GetUserGroups_Group_GroupInfo>>;
88
88
  export type GetUserUploadTasks_UploadTask = {
89
- upload_task_id?: string;
90
- folder_id?: string;
91
- uploaded_at?: string;
92
- uploaded_by?: string;
93
- progress?: number;
94
- status?: "waiting" | "pending" | "converting" | "error";
95
- conversion_tasks?: Array<GetUserUploadTasks_ConversionTask>;
89
+ upload_task_id: string;
90
+ folder_id: string;
91
+ uploaded_at: string;
92
+ uploaded_by: string;
93
+ progress: number;
94
+ downloadProgress?: number;
95
+ status: "waiting" | "downloading" | "pending" | "converting" | "error";
96
+ conversion_tasks: Array<GetUserUploadTasks_ConversionTask>;
96
97
  };
97
98
  export type GetUserUploadTasks_ConversionTask = {
98
99
  asset_id?: string;
99
100
  source_file_id?: string;
100
101
  conversion_pipeline?: "auto-detect" | "volume" | "scene" | "texture" | "animation";
101
102
  progress?: number;
102
- status?: "waiting" | "pending" | "converting" | "error";
103
+ status?: "waiting" | "downloading" | "pending" | "converting" | "error";
103
104
  };
104
105
  export declare function getUserUploadTasks({ user_id, offset, limit }: {
105
106
  user_id: string;
@@ -331,20 +332,21 @@ export declare function moveSourceFiles({ folder_id, sourceFileIds }: {
331
332
  sourceFileIds: Array<string>;
332
333
  }): Promise<import("axios").AxiosResponse<any, any>>;
333
334
  export type GetUploadTasksInFolder_UploadTask = {
334
- upload_task_id?: string;
335
- folder_id?: string;
336
- uploaded_at?: string;
337
- uploaded_by?: string;
338
- progress?: number;
339
- status?: "waiting" | "pending" | "converting" | "error";
340
- conversion_tasks?: Array<GetUploadTasksInFolder_ConversionTask>;
335
+ upload_task_id: string;
336
+ folder_id: string;
337
+ uploaded_at: string;
338
+ uploaded_by: string;
339
+ progress: number;
340
+ downloadProgress?: number;
341
+ status: "waiting" | "downloading" | "pending" | "converting" | "error";
342
+ conversion_tasks: Array<GetUploadTasksInFolder_ConversionTask>;
341
343
  };
342
344
  export type GetUploadTasksInFolder_ConversionTask = {
343
345
  asset_id?: string;
344
346
  source_file_id?: string;
345
347
  conversion_pipeline?: "auto-detect" | "volume" | "scene" | "texture" | "animation";
346
348
  progress?: number;
347
- status?: "waiting" | "pending" | "converting" | "error";
349
+ status?: "waiting" | "downloading" | "pending" | "converting" | "error";
348
350
  };
349
351
  export declare function getUploadTasksInFolder({ folder_id, offset, limit }: {
350
352
  folder_id: string;
@@ -388,12 +390,17 @@ export declare function moveAssets({ folder_id, assetIds }: {
388
390
  folder_id: string;
389
391
  assetIds: Array<string>;
390
392
  }): Promise<import("axios").AxiosResponse<any, any>>;
391
- export type CreateAsset_Object = {
393
+ export type CreateAsset_NewAsset = {
394
+ name: string;
395
+ };
396
+ export type CreateAsset_AssetDuplication = {
392
397
  copy_from_asset_id: string;
393
398
  new_asset_name?: string;
399
+ options?: CreateAsset_DuplicationOptions;
394
400
  };
395
- export type CreateAsset_AssetDescription = {
396
- name: string;
401
+ export type CreateAsset_DuplicationOptions = {
402
+ asset_types?: Array<"animation" | "animationGraph" | "animationSequence" | "animationSet" | "cubemap" | "eventMap" | "material" | "mesh" | "pointCloud" | "renderGraph" | "scene" | "script" | "shader" | "skeleton" | "sound" | "texture" | "volumeMaterial">;
403
+ max_depth?: number;
397
404
  };
398
405
  export type CreateAsset_asset_item = {
399
406
  asset_id: string;
@@ -402,7 +409,7 @@ export type CreateAsset_asset_item = {
402
409
  export declare function createAsset({ folder_id, asset_container_creatable, assetCreationOptions }: {
403
410
  folder_id: string;
404
411
  asset_container_creatable: "animationGraphs" | "animationSequences" | "cubemaps" | "eventMaps" | "materials" | "renderGraphs" | "scenes" | "scripts" | "shaders" | "volumeMaterials";
405
- assetCreationOptions: StrictUnion<CreateAsset_Object | CreateAsset_AssetDescription> & any;
412
+ assetCreationOptions: StrictUnion<CreateAsset_NewAsset | CreateAsset_AssetDuplication> & any;
406
413
  }): AxiosPromise<CreateAsset_asset_item>;
407
414
  export type GetSessionsInFolder_Session = {
408
415
  session_id: string;
@@ -483,20 +490,21 @@ export declare function getSourceFileAssets({ source_file_id }: {
483
490
  source_file_id: string;
484
491
  }): AxiosPromise<GetSourceFileAssets_asset_list>;
485
492
  export type GetUploadTask_UploadTask = {
486
- upload_task_id?: string;
487
- folder_id?: string;
488
- uploaded_at?: string;
489
- uploaded_by?: string;
490
- progress?: number;
491
- status?: "waiting" | "pending" | "converting" | "error";
492
- conversion_tasks?: Array<GetUploadTask_ConversionTask>;
493
+ upload_task_id: string;
494
+ folder_id: string;
495
+ uploaded_at: string;
496
+ uploaded_by: string;
497
+ progress: number;
498
+ downloadProgress?: number;
499
+ status: "waiting" | "downloading" | "pending" | "converting" | "error";
500
+ conversion_tasks: Array<GetUploadTask_ConversionTask>;
493
501
  };
494
502
  export type GetUploadTask_ConversionTask = {
495
503
  asset_id?: string;
496
504
  source_file_id?: string;
497
505
  conversion_pipeline?: "auto-detect" | "volume" | "scene" | "texture" | "animation";
498
506
  progress?: number;
499
- status?: "waiting" | "pending" | "converting" | "error";
507
+ status?: "waiting" | "downloading" | "pending" | "converting" | "error";
500
508
  };
501
509
  export declare function getUploadTask({ upload_task_id }: {
502
510
  upload_task_id: string;
@@ -863,12 +871,19 @@ export type GetAssetDescription_VkPipelineColorBlendAttachmentState = {
863
871
  colorWriteMask?: GetAssetDescription_Object;
864
872
  };
865
873
  export type GetAssetDescription_Scene = {
866
- boundingBox?: GetAssetDescription_Object;
867
- entities?: Array<GetAssetDescription_Object>;
868
- triangleCount?: number;
874
+ aabb: GetAssetDescription_Aabb;
875
+ entities: Array<GetAssetDescription_Entity>;
876
+ triangleCount: number;
869
877
  settings?: GetAssetDescription_Object;
870
878
  animationSequenceInstances?: Array<GetAssetDescription_animation_sequence_instance>;
871
879
  };
880
+ export type GetAssetDescription_Aabb = {
881
+ min: Array<number>;
882
+ max: Array<number>;
883
+ };
884
+ export type GetAssetDescription_Entity = {
885
+ entity: GetAssetDescription_Entity;
886
+ };
872
887
  export type GetAssetDescription_animation_sequence_instance = {
873
888
  ref?: string;
874
889
  entities?: Array<string>;
@@ -1190,12 +1205,19 @@ export type UpdateAssetDescription_VkPipelineColorBlendAttachmentState = {
1190
1205
  colorWriteMask?: UpdateAssetDescription_Object;
1191
1206
  };
1192
1207
  export type UpdateAssetDescription_Scene = {
1193
- boundingBox?: UpdateAssetDescription_Object;
1194
- entities?: Array<UpdateAssetDescription_Object>;
1195
- triangleCount?: number;
1208
+ aabb: UpdateAssetDescription_Aabb;
1209
+ entities: Array<UpdateAssetDescription_Entity>;
1210
+ triangleCount: number;
1196
1211
  settings?: UpdateAssetDescription_Object;
1197
1212
  animationSequenceInstances?: Array<UpdateAssetDescription_animation_sequence_instance>;
1198
1213
  };
1214
+ export type UpdateAssetDescription_Aabb = {
1215
+ min: Array<number>;
1216
+ max: Array<number>;
1217
+ };
1218
+ export type UpdateAssetDescription_Entity = {
1219
+ entity: UpdateAssetDescription_Entity;
1220
+ };
1199
1221
  export type UpdateAssetDescription_animation_sequence_instance = {
1200
1222
  ref?: string;
1201
1223
  entities?: Array<string>;
package/dist/index.js CHANGED
@@ -108,6 +108,7 @@ __export(library_exports, {
108
108
  uploadSourceFiles: () => uploadSourceFiles
109
109
  });
110
110
  module.exports = __toCommonJS(library_exports);
111
+ var import_axios_retry = __toESM(require("axios-retry"));
111
112
 
112
113
  // _prebuild/wrapper.ts
113
114
  var import_axios = __toESM(require("axios"));
@@ -947,7 +948,6 @@ function generateGuestToken({
947
948
  }
948
949
 
949
950
  // index.ts
950
- var import_axios_retry = __toESM(require("axios-retry"));
951
951
  function setApiKey(apiKey) {
952
952
  axiosInstance.defaults.headers.common["api_key"] = apiKey;
953
953
  delete axiosInstance.defaults.headers.common["user_token"];