@3dverse/api 0.6.1 → 0.6.3

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/README.md CHANGED
@@ -17,10 +17,10 @@ npm i @3dverse/api
17
17
  import * as api3dverse from '@3dverse/api';
18
18
  ```
19
19
 
20
- or
20
+ or
21
21
 
22
22
  ```
23
- import { createUser } from '3dverse/api';
23
+ import { registerUser } from '@3dverse/api';
24
24
  ```
25
25
 
26
26
  ### Authentication
@@ -28,13 +28,13 @@ import { createUser } from '3dverse/api';
28
28
  Only use the API key on the server.
29
29
 
30
30
  ```
31
- import { setApiKey, createUser } from '3dverse/api';
31
+ import { setApiKey, registerUser } from '@3dverse/api';
32
32
 
33
33
 
34
34
  setApiKey(MY_3DVERSE_API_KEY);
35
35
 
36
36
  async () => {
37
- const { user_id } = await createUser({ username: 'my_username' });
37
+ const { user_id } = await registerUser({ username: 'my_username' });
38
38
  }
39
39
  ```
40
40
 
@@ -52,4 +52,3 @@ async () => {
52
52
  });
53
53
  }
54
54
  ```
55
-
@@ -1,10 +1,20 @@
1
1
  /**
2
- * 3dverse v1.0
3
- * # 3dverse API
2
+ * 3dverse Asset API v1.0
3
+ * # Getting Started
4
4
  *
5
- * Welcome to the 3dverse API. The 3dverse API scopes to an API key. Each development environment of an application requires a separate API key.
6
- * Through the API key, you can manage ownership, access, and permissions for each environment.
7
- * Each environment has its own set of users, groups, folders, and assets.
5
+ * Welcome to the 3dverse Asset API. This is the reference for the REST API endpoints.
6
+ *
7
+ * ## NPM package
8
+ *
9
+ * We provide a TypeScript wrapper library to make typesafe API requests and get typed responses: [https://www.npmjs.com/package/@3dverse/api](https://www.npmjs.com/package/@3dverse/api).
10
+ *
11
+ * ## Authentication
12
+ *
13
+ * To authenticate your API calls, you'll need to generate an API key via the [3dverse Console](https://console.3dverse.com) and send an `api_key` header with your API requests.
14
+ * Alternatively, you can create a user, generate a token for the user and authenticate with a `user_token`.
15
+ *
16
+ *
17
+ * ---
8
18
  *
9
19
  *
10
20
  * Contact: 3dverse Support (support@3dverse.com)
@@ -361,6 +371,7 @@ export declare function getUploadTasksInFolder({ folder_id, offset, limit }: {
361
371
  export type GetFolderAssets_Filter = {
362
372
  asset_type?: (Array<"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"> | "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");
363
373
  asset_name?: string;
374
+ include_public_assets?: boolean;
364
375
  };
365
376
  export type GetFolderAssets__index_AssetList_AssetList = {
366
377
  action_maps?: Array<GetFolderAssets_Object>;
@@ -540,6 +551,11 @@ export type GetUploadTask_ConversionTask = {
540
551
  export declare function getUploadTask({ upload_task_id }: {
541
552
  upload_task_id: string;
542
553
  }): AxiosPromise<GetUploadTask_UploadTask>;
554
+ export type ListAssets_Filter = {
555
+ asset_type?: (Array<"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"> | "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");
556
+ asset_name?: string;
557
+ include_public_assets?: boolean;
558
+ };
543
559
  export type ListAssets__index_AssetList_AssetList = {
544
560
  action_maps?: Array<ListAssets_Object>;
545
561
  algorithms?: Array<ListAssets_Object>;
@@ -569,9 +585,10 @@ export type ListAssets_Object = {
569
585
  asset_id: string;
570
586
  name: string;
571
587
  };
572
- export declare function listAssets({ offset, limit }: {
588
+ export declare function listAssets({ offset, limit, filter }: {
573
589
  offset?: number;
574
590
  limit?: number;
591
+ filter?: ListAssets_Filter;
575
592
  }): AxiosPromise<ListAssets__index_AssetList_AssetList>;
576
593
  export declare function deleteAssets({ asset_ids }: {
577
594
  asset_ids: Array<string>;
package/dist/index.js CHANGED
@@ -564,14 +564,16 @@ function getUploadTask({
564
564
  }
565
565
  function listAssets({
566
566
  offset = 0,
567
- limit = 10
567
+ limit = 10,
568
+ filter
568
569
  }) {
569
570
  return axiosInstance({
570
571
  method: "get",
571
572
  url: "/assets",
572
573
  params: {
573
574
  offset,
574
- limit
575
+ limit,
576
+ filter
575
577
  }
576
578
  });
577
579
  }