@3dverse/api 0.8.9 → 0.8.10
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 +55 -41
- package/dist/index.js +8 -4
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +2 -2
- package/package.json +6 -6
@@ -1,14 +1,14 @@
|
|
1
1
|
/**
|
2
|
-
*
|
3
|
-
*
|
2
|
+
* Asset API v1.0
|
3
|
+
* ## Getting Started
|
4
4
|
*
|
5
|
-
*
|
5
|
+
*This is the reference for the REST API endpoints.
|
6
6
|
*
|
7
|
-
|
7
|
+
*### NPM package
|
8
8
|
*
|
9
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
10
|
*
|
11
|
-
|
11
|
+
*### Authentication
|
12
12
|
*
|
13
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
14
|
*Alternatively, you can create a user, generate a token for the user and authenticate with a `user_token`.
|
@@ -69,7 +69,7 @@ export declare function getUser({ user_id, }: {
|
|
69
69
|
export declare function updateUser({ user_id, username, }: {
|
70
70
|
user_id: string;
|
71
71
|
username: string;
|
72
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
72
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
73
73
|
export type DeleteUser_Object = {
|
74
74
|
deleted_assets?: DeleteUser_Object;
|
75
75
|
};
|
@@ -193,13 +193,13 @@ export declare function updateGroupDescription({ group_id, name, description, }:
|
|
193
193
|
group_id: string;
|
194
194
|
name: string;
|
195
195
|
description: string;
|
196
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
196
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
197
197
|
/**
|
198
198
|
* Deletes a group and all its access rights.
|
199
199
|
*/
|
200
200
|
export declare function deleteGroup({ group_id, }: {
|
201
201
|
group_id: string;
|
202
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
202
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
203
203
|
/**
|
204
204
|
* Grants member access to the group.
|
205
205
|
*/
|
@@ -209,7 +209,7 @@ export declare function grantMemberAccessToGroup({ group_id, member_type, member
|
|
209
209
|
member_id: string;
|
210
210
|
group_access: 'read' | 'write' | 'manage';
|
211
211
|
folder_access: 'read' | 'write' | 'manage';
|
212
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
212
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
213
213
|
/**
|
214
214
|
* Revoke requested user access to group.
|
215
215
|
*/
|
@@ -217,7 +217,7 @@ export declare function revokeMemberAccessToGroup({ group_id, member_type, membe
|
|
217
217
|
group_id: string;
|
218
218
|
member_type: 'users' | 'groups';
|
219
219
|
member_id: string;
|
220
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
220
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
221
221
|
export type ListFolders_Folder = {
|
222
222
|
folder_id: string;
|
223
223
|
parent_folder_id?: string;
|
@@ -293,20 +293,20 @@ export declare function getFolderInfo({ folder_id, }: {
|
|
293
293
|
export declare function moveFolders({ folder_id, folder_ids, }: {
|
294
294
|
folder_id: string;
|
295
295
|
folder_ids: Array<string>;
|
296
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
296
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
297
297
|
/**
|
298
298
|
* Updates the folder details.
|
299
299
|
*/
|
300
300
|
export declare function updateFolder({ folder_id, name, }: {
|
301
301
|
folder_id: string;
|
302
302
|
name?: string;
|
303
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
303
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
304
304
|
/**
|
305
305
|
* Deletes the requested folder. The target folder must be empty.
|
306
306
|
*/
|
307
307
|
export declare function deleteFolder({ folder_id, }: {
|
308
308
|
folder_id: string;
|
309
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
309
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
310
310
|
export type ListFolderAccesses_Object = {
|
311
311
|
users?: Array<ListFolderAccesses_UserInfo_FolderAccess>;
|
312
312
|
groups?: Array<ListFolderAccesses_GroupInfo_FolderAccess>;
|
@@ -335,7 +335,7 @@ export declare function grantMemberAccessToFolder({ folder_id, member_type, memb
|
|
335
335
|
member_type: 'users' | 'groups';
|
336
336
|
member_id: string;
|
337
337
|
access: 'read' | 'write' | 'manage';
|
338
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
338
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
339
339
|
/**
|
340
340
|
* Revokes member access to a target folder.
|
341
341
|
*/
|
@@ -343,7 +343,7 @@ export declare function revokeMemberAccessToFolder({ folder_id, member_type, mem
|
|
343
343
|
folder_id: string;
|
344
344
|
member_type: 'users' | 'groups';
|
345
345
|
member_id: string;
|
346
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
346
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
347
347
|
export type CreateSubfolder_Folder = {
|
348
348
|
name: string;
|
349
349
|
subfolders?: Array<CreateSubfolder_Folder>;
|
@@ -397,6 +397,14 @@ export type UploadSourceFiles_Object = {
|
|
397
397
|
};
|
398
398
|
/**
|
399
399
|
* Uploads the specified source file(s).
|
400
|
+
* The supported file formats are:
|
401
|
+
* - Scene :
|
402
|
+
* - Mesh : `fbx, obj/mtl, stl, ply, ifc, usd, usda, usdc, usdz, skp, ptf, 3ds, 3mf, ac, ac3d, acc, amj, ase, ask, b3d, blend, bvh, cms, cob, dae, dxf, gltf/bin, glb, enff, hmb, irr, irrmesh, lwo, lws, lxo, m3d, md2, md3, md5, mdc, mdl, xml, mot, ms3d, ndo, nff, off, ogex, pmx, prj, q3o, q3s, raw, scn, sib, smd, ter, uc, vta, wrl, x, x3d, xgl, zgl`
|
403
|
+
* - Point cloud : `e57, ptx, xyz, las, laz`
|
404
|
+
* - Volume : `dcm`
|
405
|
+
* - Texture : `jpg, jpeg, png, tga, dds, tif, tiff, bmp, rgbe`
|
406
|
+
* - Cubemap : `hdr`
|
407
|
+
* - Sound : `wav, mp3, ogg, flac`.
|
400
408
|
*/
|
401
409
|
export declare function uploadSourceFiles({ folder_id, body, }: {
|
402
410
|
folder_id: string;
|
@@ -426,7 +434,7 @@ export declare function getSourceFilesInFolder({ folder_id, offset, limit, filte
|
|
426
434
|
export declare function moveSourceFiles({ folder_id, source_file_ids, }: {
|
427
435
|
folder_id: string;
|
428
436
|
source_file_ids: Array<string>;
|
429
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
437
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
430
438
|
export type GetUploadTasksInFolder_UploadTask = {
|
431
439
|
upload_task_id: string;
|
432
440
|
folder_id: string;
|
@@ -540,7 +548,7 @@ export declare function createAsset({ folder_id, asset_creation_options, }: {
|
|
540
548
|
export declare function moveAssets({ folder_id, asset_ids, }: {
|
541
549
|
folder_id: string;
|
542
550
|
asset_ids: Array<string>;
|
543
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
551
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
544
552
|
export type CreateMaterial_Object = {
|
545
553
|
asset_id: string;
|
546
554
|
};
|
@@ -610,7 +618,7 @@ export type ImportAssets_AssetIds = {
|
|
610
618
|
*/
|
611
619
|
export declare function importAssets({ folder_id, overwrite, body, }: {
|
612
620
|
folder_id: string;
|
613
|
-
overwrite?:
|
621
|
+
overwrite?: 'never' | 'only-specified' | 'always';
|
614
622
|
body: ArrayBuffer | ReadableStream;
|
615
623
|
}, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void, headers?: AxiosRequestHeaders): AxiosPromise<ImportAssets__index_ImportAssetsResponse_ImportAssetsResponse>;
|
616
624
|
export type GetSessionsInFolder_Session = {
|
@@ -628,7 +636,7 @@ export type GetSessionsInFolder_Session = {
|
|
628
636
|
};
|
629
637
|
export type GetSessionsInFolder_Client_UserInfo = {
|
630
638
|
client_id?: string;
|
631
|
-
client_type?:
|
639
|
+
client_type?: 'user' | 'guest';
|
632
640
|
user_id: string;
|
633
641
|
username: string;
|
634
642
|
};
|
@@ -661,7 +669,7 @@ export declare function listSourceFiles({ offset, limit, filters, }: {
|
|
661
669
|
export declare function deleteSourceFiles({ source_file_ids, delete_assets, }: {
|
662
670
|
source_file_ids: Array<string>;
|
663
671
|
delete_assets?: boolean;
|
664
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
672
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
665
673
|
/**
|
666
674
|
* Downloads the target source file.
|
667
675
|
*/
|
@@ -686,7 +694,7 @@ export declare function getSourceFileDetails({ source_file_id, }: {
|
|
686
694
|
export declare function updateSourceFileDetails({ source_file_id, name, }: {
|
687
695
|
source_file_id: string;
|
688
696
|
name: string;
|
689
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
697
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
690
698
|
export type GetSourceFileAssets__index_AssetList_AssetList = {
|
691
699
|
action_maps?: Array<GetSourceFileAssets_Object>;
|
692
700
|
algorithms?: Array<GetSourceFileAssets_Object>;
|
@@ -811,14 +819,14 @@ export declare function listAssets({ offset, limit, filter, }: {
|
|
811
819
|
*/
|
812
820
|
export declare function deleteAssets({ asset_ids, }: {
|
813
821
|
asset_ids: Array<string>;
|
814
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
822
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
815
823
|
/**
|
816
824
|
* Deletes the asset.
|
817
825
|
*/
|
818
826
|
export declare function deleteAsset({ asset_container, asset_id, }: {
|
819
827
|
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';
|
820
828
|
asset_id: string;
|
821
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
829
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
822
830
|
export type GetAssetSourceFile_SourceFile = {
|
823
831
|
source_file_id: string;
|
824
832
|
source_file_original_name: string;
|
@@ -888,7 +896,7 @@ export declare function getAssetFolder({ asset_container, asset_id, }: {
|
|
888
896
|
export type GetAssetDependencies_Filter = {
|
889
897
|
with_asset_types?: 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'>;
|
890
898
|
without_asset_types?: 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'>;
|
891
|
-
public?:
|
899
|
+
public?: 'include' | 'exclude' | 'restrict-to';
|
892
900
|
};
|
893
901
|
export type GetAssetDependencies_Asset = {
|
894
902
|
asset_id: string;
|
@@ -922,7 +930,7 @@ export declare function getAssetDependencies({ asset_container, asset_id, offset
|
|
922
930
|
limit?: number;
|
923
931
|
depth?: 'all' | 'direct' | number;
|
924
932
|
filters?: GetAssetDependencies_Filter;
|
925
|
-
properties?: Array<
|
933
|
+
properties?: Array<'name' | 'dependencies' | 'count' | 'public' | 'accessible' | 'payload_info'>;
|
926
934
|
}, headers?: AxiosRequestHeaders): AxiosPromise<Array<GetAssetDependencies_Asset>>;
|
927
935
|
export type GetAssetReferences_Asset = {
|
928
936
|
asset_id: string;
|
@@ -942,7 +950,7 @@ export declare function getAssetReferences({ asset_container, asset_id, offset,
|
|
942
950
|
asset_id: string;
|
943
951
|
offset?: number;
|
944
952
|
limit?: number;
|
945
|
-
properties?: Array<
|
953
|
+
properties?: Array<'name' | 'count' | 'public'>;
|
946
954
|
}, headers?: AxiosRequestHeaders): AxiosPromise<Array<GetAssetReferences_Asset>>;
|
947
955
|
export type GetAssetDescription_ActionMap = {
|
948
956
|
actions: GetAssetDescription_Object;
|
@@ -1017,6 +1025,7 @@ export type GetAssetDescription_Submesh = {
|
|
1017
1025
|
aabb: GetAssetDescription_BoundingBox;
|
1018
1026
|
channels: Array<GetAssetDescription_Channel>;
|
1019
1027
|
indexCount: number;
|
1028
|
+
morphTargets?: Array<GetAssetDescription_MorphTarget>;
|
1020
1029
|
vertexCount: number;
|
1021
1030
|
};
|
1022
1031
|
export type GetAssetDescription_BoundingBox = {
|
@@ -1031,6 +1040,14 @@ export type GetAssetDescription_Channel = {
|
|
1031
1040
|
elementType: StrictUnion<0 | 1 | 2> & number;
|
1032
1041
|
semantic: StrictUnion<'index' | 'position' | 'normal' | 'uv' | 'color' | 'bone_id' | 'weight'>;
|
1033
1042
|
};
|
1043
|
+
export type GetAssetDescription_MorphTarget = {
|
1044
|
+
aabb: GetAssetDescription_Aabb;
|
1045
|
+
channels: Array<GetAssetDescription_Channel>;
|
1046
|
+
};
|
1047
|
+
export type GetAssetDescription_Aabb = {
|
1048
|
+
max: Array<number>;
|
1049
|
+
min: Array<number>;
|
1050
|
+
};
|
1034
1051
|
export type GetAssetDescription_Module = {
|
1035
1052
|
functions: GetAssetDescription_Object;
|
1036
1053
|
name: string;
|
@@ -1066,10 +1083,6 @@ export type GetAssetDescription_Scene = {
|
|
1066
1083
|
triangleCount?: number;
|
1067
1084
|
uuid: string;
|
1068
1085
|
};
|
1069
|
-
export type GetAssetDescription_Aabb = {
|
1070
|
-
max: Array<number>;
|
1071
|
-
min: Array<number>;
|
1072
|
-
};
|
1073
1086
|
export type GetAssetDescription_Script = {
|
1074
1087
|
eventNames: Array<string>;
|
1075
1088
|
inputDescriptor?: Array<GetAssetDescription_Object>;
|
@@ -1153,7 +1166,7 @@ export declare function renameAsset({ asset_container, asset_id, name, }: {
|
|
1153
1166
|
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';
|
1154
1167
|
asset_id: string;
|
1155
1168
|
name?: string;
|
1156
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
1169
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
1157
1170
|
/**
|
1158
1171
|
* Gets the asset payload from the specified asset.
|
1159
1172
|
*/
|
@@ -1199,7 +1212,7 @@ export declare function setAssetThumbnail({ asset_container, asset_id, body, }:
|
|
1199
1212
|
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';
|
1200
1213
|
asset_id: string;
|
1201
1214
|
body: ArrayBuffer | ReadableStream;
|
1202
|
-
}, contentType: 'image/jpg' | 'image/png', headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
1215
|
+
}, contentType: 'image/jpg' | 'image/png', headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
1203
1216
|
/**
|
1204
1217
|
* Gets the asset custom types from the specified asset recursively.
|
1205
1218
|
*/
|
@@ -1239,7 +1252,7 @@ export type GetSceneSessions_Session = {
|
|
1239
1252
|
};
|
1240
1253
|
export type GetSceneSessions_Client_UserInfo = {
|
1241
1254
|
client_id?: string;
|
1242
|
-
client_type?:
|
1255
|
+
client_type?: 'user' | 'guest';
|
1243
1256
|
user_id: string;
|
1244
1257
|
username: string;
|
1245
1258
|
};
|
@@ -2313,14 +2326,14 @@ export declare function updateEntity({ scene_id, entity_id, entity_components, }
|
|
2313
2326
|
scene_id: string;
|
2314
2327
|
entity_id: string;
|
2315
2328
|
entity_components: UpdateEntity_animation_controller | UpdateEntity_bone | UpdateEntity_box_geometry | UpdateEntity_camera | UpdateEntity_capsule_geometry | UpdateEntity_character_controller | UpdateEntity_collision_geometry_ref | UpdateEntity_cylinder_geometry | UpdateEntity_debug_name | UpdateEntity_decal_projector | UpdateEntity_environment | UpdateEntity_joint | UpdateEntity_lineage | UpdateEntity_local_aabb | UpdateEntity_local_transform | UpdateEntity_material | UpdateEntity_material_ref | UpdateEntity_mesh_ref | UpdateEntity_orthographic_lens | UpdateEntity_overrider | UpdateEntity_perspective_lens | UpdateEntity_physics_material | UpdateEntity_plane_geometry | UpdateEntity_point_cloud_ref | UpdateEntity_point_light | UpdateEntity_reflection_probe | UpdateEntity_revolute_joint | UpdateEntity_rigid_body | UpdateEntity_scene_ref | UpdateEntity_script_element | UpdateEntity_script_map | UpdateEntity_shadow_caster | UpdateEntity_skeleton_ref | UpdateEntity_sound_ref | UpdateEntity_sphere_geometry | UpdateEntity_spot_light | UpdateEntity_stereoscopic_lens | UpdateEntity_tags | UpdateEntity_volume_filter | UpdateEntity_volume_material_ref | UpdateEntity_volume_ref;
|
2316
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
2329
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
2317
2330
|
/**
|
2318
2331
|
* Delete a specific entity from a scene.
|
2319
2332
|
*/
|
2320
2333
|
export declare function deleteEntity({ scene_id, entity_id, }: {
|
2321
2334
|
scene_id: string;
|
2322
2335
|
entity_id: string;
|
2323
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
2336
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
2324
2337
|
/**
|
2325
2338
|
* Get the settings of a scene.
|
2326
2339
|
*/
|
@@ -2347,7 +2360,7 @@ export type GetRunningSessions_Session = {
|
|
2347
2360
|
};
|
2348
2361
|
export type GetRunningSessions_Client_UserInfo = {
|
2349
2362
|
client_id?: string;
|
2350
|
-
client_type?:
|
2363
|
+
client_type?: 'user' | 'guest';
|
2351
2364
|
user_id: string;
|
2352
2365
|
username: string;
|
2353
2366
|
};
|
@@ -2384,7 +2397,7 @@ export type GetSession_Session = {
|
|
2384
2397
|
};
|
2385
2398
|
export type GetSession_Client_UserInfo = {
|
2386
2399
|
client_id?: string;
|
2387
|
-
client_type?:
|
2400
|
+
client_type?: 'user' | 'guest';
|
2388
2401
|
user_id: string;
|
2389
2402
|
username: string;
|
2390
2403
|
};
|
@@ -2399,7 +2412,7 @@ export declare function getSession({ session_id, }: {
|
|
2399
2412
|
*/
|
2400
2413
|
export declare function killSession({ session_id, }: {
|
2401
2414
|
session_id: string;
|
2402
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
2415
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
2403
2416
|
export type JoinSession_SessionToken = {
|
2404
2417
|
session_token: string;
|
2405
2418
|
endpoint_info: JoinSession_Object;
|
@@ -2412,12 +2425,13 @@ export type JoinSession_Object = {
|
|
2412
2425
|
/**
|
2413
2426
|
* Creates a new client for the user and returns a token to join the session.
|
2414
2427
|
*/
|
2415
|
-
export declare function joinSession({ session_id, }: {
|
2428
|
+
export declare function joinSession({ session_id, is_headless, }: {
|
2416
2429
|
session_id: string;
|
2430
|
+
is_headless?: boolean;
|
2417
2431
|
}, headers?: AxiosRequestHeaders): AxiosPromise<JoinSession_SessionToken>;
|
2418
2432
|
export type GetClient_Client_UserInfo = {
|
2419
2433
|
client_id?: string;
|
2420
|
-
client_type?:
|
2434
|
+
client_type?: 'user' | 'guest';
|
2421
2435
|
user_id: string;
|
2422
2436
|
username: string;
|
2423
2437
|
};
|
@@ -2434,7 +2448,7 @@ export declare function getClient({ session_id, client_id, }: {
|
|
2434
2448
|
export declare function kickClientFromSession({ session_id, client_id, }: {
|
2435
2449
|
session_id: string;
|
2436
2450
|
client_id: string;
|
2437
|
-
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any>>;
|
2451
|
+
}, headers?: AxiosRequestHeaders): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
2438
2452
|
export type JoinSessionAsGuest_SessionToken = {
|
2439
2453
|
session_token: string;
|
2440
2454
|
endpoint_info: JoinSessionAsGuest_Object;
|
package/dist/index.js
CHANGED
@@ -27,8 +27,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
28
|
|
29
29
|
// index.ts
|
30
|
-
var
|
31
|
-
__export(
|
30
|
+
var index_exports = {};
|
31
|
+
__export(index_exports, {
|
32
32
|
ApiError: () => ApiError,
|
33
33
|
UnexpectedServiceError: () => UnexpectedServiceError,
|
34
34
|
axiosInstance: () => axiosInstance,
|
@@ -116,7 +116,7 @@ __export(library_exports, {
|
|
116
116
|
updateUser: () => updateUser,
|
117
117
|
uploadSourceFiles: () => uploadSourceFiles
|
118
118
|
});
|
119
|
-
module.exports = __toCommonJS(
|
119
|
+
module.exports = __toCommonJS(index_exports);
|
120
120
|
var import_axios_retry = __toESM(require("axios-retry"));
|
121
121
|
|
122
122
|
// _prebuild/wrapper.ts
|
@@ -1078,11 +1078,15 @@ function killSession({
|
|
1078
1078
|
});
|
1079
1079
|
}
|
1080
1080
|
function joinSession({
|
1081
|
-
session_id
|
1081
|
+
session_id,
|
1082
|
+
is_headless = false
|
1082
1083
|
}, headers) {
|
1083
1084
|
return axiosInstance({
|
1084
1085
|
method: "post",
|
1085
1086
|
url: "/sessions/" + session_id + "/clients",
|
1087
|
+
data: {
|
1088
|
+
is_headless
|
1089
|
+
},
|
1086
1090
|
headers
|
1087
1091
|
});
|
1088
1092
|
}
|