@3dverse/api 0.6.1 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -5
- package/dist/_prebuild/wrapper.d.ts +23 -6
- package/dist/index.js +4 -2
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
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 {
|
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,
|
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
|
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
|
-
* #
|
2
|
+
* 3dverse Asset API v1.0
|
3
|
+
* # Getting Started
|
4
4
|
*
|
5
|
-
* Welcome to the 3dverse
|
6
|
-
*
|
7
|
-
*
|
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
|
}
|