@3dverse/api 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +55 -0
- package/dist/{_prebuild/wrapper.js → index.cjs.js} +158 -144
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +954 -3
- package/dist/index.esm.js +621 -0
- package/dist/index.esm.js.map +1 -0
- package/index.ts +5 -0
- package/package.json +12 -3
- package/dist/_prebuild/wrapper.d.ts +0 -946
- package/dist/_prebuild/wrapper.js.map +0 -1
- package/dist/index.js +0 -34
- package/dist/index.js.map +0 -1
- package/tsconfig.json +0 -9
@@ -0,0 +1,621 @@
|
|
1
|
+
import axios from 'axios';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* 3dverse v1.0
|
5
|
+
* # 3dverse API
|
6
|
+
*
|
7
|
+
* Welcome to the 3dverse API. The 3dverse API scopes to an API key. Each development environment of an application requires a separate API key.
|
8
|
+
* Through the API key, you can manage ownership, access, and permissions for each environment.
|
9
|
+
* Each environment has its own set of users, groups, folders, and assets.
|
10
|
+
*
|
11
|
+
*
|
12
|
+
* Contact: 3dverse Support (support@3dverse.com)
|
13
|
+
*
|
14
|
+
* NOTE: This file is auto generated by library-generator (https://gitlab.com/3dverse/libs/library-generator).
|
15
|
+
* Do not edit this file class manually.
|
16
|
+
*/
|
17
|
+
//--------------------------------------------------------------------------
|
18
|
+
const axiosInstance = createAxiosInstance();
|
19
|
+
//------------------------------------------------------------------------------
|
20
|
+
function createAxiosInstance() {
|
21
|
+
const axiosInstance = axios.create({
|
22
|
+
baseURL: "https://api.3dverse.com/v1"
|
23
|
+
});
|
24
|
+
axiosInstance.interceptors.response.use(successFulResponse => {
|
25
|
+
if (successFulResponse.config.responseType === 'stream') {
|
26
|
+
successFulResponse.data.pause();
|
27
|
+
successFulResponse.data.responseContentType = successFulResponse.headers['content-type'];
|
28
|
+
successFulResponse.data.responseContentLength = successFulResponse.headers['content-length'];
|
29
|
+
successFulResponse.data.responseStatus = successFulResponse.status;
|
30
|
+
}
|
31
|
+
return successFulResponse.data;
|
32
|
+
}, axiosError => {
|
33
|
+
if (!axiosError.response) {
|
34
|
+
return Promise.reject(axiosError);
|
35
|
+
}
|
36
|
+
const errorData = axiosError.response.data;
|
37
|
+
const error = {
|
38
|
+
errorCode: errorData.error?.errorNum,
|
39
|
+
status: axiosError.response.status,
|
40
|
+
error: errorData.error || errorData
|
41
|
+
};
|
42
|
+
return Promise.reject(error);
|
43
|
+
});
|
44
|
+
return axiosInstance;
|
45
|
+
}
|
46
|
+
function listUsers({ offset = 0, limit = 10 }) {
|
47
|
+
return axiosInstance({
|
48
|
+
method: "get",
|
49
|
+
url: "/users",
|
50
|
+
params: {
|
51
|
+
offset: offset,
|
52
|
+
limit: limit
|
53
|
+
}
|
54
|
+
});
|
55
|
+
}
|
56
|
+
function registerUser({ username }) {
|
57
|
+
return axiosInstance({
|
58
|
+
method: "post",
|
59
|
+
url: "/users",
|
60
|
+
data: {
|
61
|
+
username: username
|
62
|
+
}
|
63
|
+
});
|
64
|
+
}
|
65
|
+
function getUser({ user_id }) {
|
66
|
+
return axiosInstance({
|
67
|
+
method: "get",
|
68
|
+
url: "/users/" + user_id + ""
|
69
|
+
});
|
70
|
+
}
|
71
|
+
//--------------------------------------------------------------------------
|
72
|
+
// Updates the details of the target user.
|
73
|
+
function updateUser({ user_id, username }) {
|
74
|
+
return axiosInstance({
|
75
|
+
method: "patch",
|
76
|
+
url: "/users/" + user_id + "",
|
77
|
+
data: {
|
78
|
+
username: username
|
79
|
+
}
|
80
|
+
});
|
81
|
+
}
|
82
|
+
function deleteUser({ user_id }) {
|
83
|
+
return axiosInstance({
|
84
|
+
method: "delete",
|
85
|
+
url: "/users/" + user_id + ""
|
86
|
+
});
|
87
|
+
}
|
88
|
+
function generateUserToken({ user_id, scope, ttl = '1h' }) {
|
89
|
+
return axiosInstance({
|
90
|
+
method: "post",
|
91
|
+
url: "/users/" + user_id + "/tokens",
|
92
|
+
data: {
|
93
|
+
scope: scope,
|
94
|
+
ttl: ttl
|
95
|
+
}
|
96
|
+
});
|
97
|
+
}
|
98
|
+
function getUserGroups({ user_id }) {
|
99
|
+
return axiosInstance({
|
100
|
+
method: "get",
|
101
|
+
url: "/users/" + user_id + "/groups"
|
102
|
+
});
|
103
|
+
}
|
104
|
+
function getUserUploadTasks({ user_id, offset = 0, limit = 10 }) {
|
105
|
+
return axiosInstance({
|
106
|
+
method: "get",
|
107
|
+
url: "/users/" + user_id + "/upload-tasks",
|
108
|
+
params: {
|
109
|
+
offset: offset,
|
110
|
+
limit: limit
|
111
|
+
}
|
112
|
+
});
|
113
|
+
}
|
114
|
+
function createGroup({ group_name, group_description, members }) {
|
115
|
+
return axiosInstance({
|
116
|
+
method: "post",
|
117
|
+
url: "/groups",
|
118
|
+
data: {
|
119
|
+
group_name: group_name,
|
120
|
+
group_description: group_description,
|
121
|
+
members: members
|
122
|
+
}
|
123
|
+
});
|
124
|
+
}
|
125
|
+
function getGroup({ group_id }) {
|
126
|
+
return axiosInstance({
|
127
|
+
method: "get",
|
128
|
+
url: "/groups/" + group_id + ""
|
129
|
+
});
|
130
|
+
}
|
131
|
+
//--------------------------------------------------------------------------
|
132
|
+
// Updates a group details.
|
133
|
+
function updateGroupDescription({ group_id, group_name, group_description }) {
|
134
|
+
return axiosInstance({
|
135
|
+
method: "patch",
|
136
|
+
url: "/groups/" + group_id + "",
|
137
|
+
data: {
|
138
|
+
group_name: group_name,
|
139
|
+
group_description: group_description
|
140
|
+
}
|
141
|
+
});
|
142
|
+
}
|
143
|
+
//--------------------------------------------------------------------------
|
144
|
+
// Deletes a group and all its access rights.
|
145
|
+
function deleteGroup({ group_id }) {
|
146
|
+
return axiosInstance({
|
147
|
+
method: "delete",
|
148
|
+
url: "/groups/" + group_id + ""
|
149
|
+
});
|
150
|
+
}
|
151
|
+
//--------------------------------------------------------------------------
|
152
|
+
// Grants member access to the group.
|
153
|
+
function grantMemberAccessToGroup({ group_id, member_type, member_id, group_access, folder_access }) {
|
154
|
+
return axiosInstance({
|
155
|
+
method: "put",
|
156
|
+
url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id + "",
|
157
|
+
data: {
|
158
|
+
group_access: group_access,
|
159
|
+
folder_access: folder_access
|
160
|
+
}
|
161
|
+
});
|
162
|
+
}
|
163
|
+
//--------------------------------------------------------------------------
|
164
|
+
// Revoke requested user access to group.
|
165
|
+
function revokeMemberAccessToGroup({ group_id, member_type, member_id }) {
|
166
|
+
return axiosInstance({
|
167
|
+
method: "delete",
|
168
|
+
url: "/groups/" + group_id + "/members/" + member_type + "/" + member_id + ""
|
169
|
+
});
|
170
|
+
}
|
171
|
+
function listFolders({ offset = 0, limit = 10 }) {
|
172
|
+
return axiosInstance({
|
173
|
+
method: "get",
|
174
|
+
url: "/folders",
|
175
|
+
params: {
|
176
|
+
offset: offset,
|
177
|
+
limit: limit
|
178
|
+
}
|
179
|
+
});
|
180
|
+
}
|
181
|
+
function createFolder({ folder_name, subfolders }) {
|
182
|
+
return axiosInstance({
|
183
|
+
method: "post",
|
184
|
+
url: "/folders",
|
185
|
+
data: {
|
186
|
+
folder_name: folder_name,
|
187
|
+
subfolders: subfolders
|
188
|
+
}
|
189
|
+
});
|
190
|
+
}
|
191
|
+
function getFolderInfo({ folder_id }) {
|
192
|
+
return axiosInstance({
|
193
|
+
method: "get",
|
194
|
+
url: "/folders/" + folder_id + ""
|
195
|
+
});
|
196
|
+
}
|
197
|
+
//--------------------------------------------------------------------------
|
198
|
+
// Move folders inside the specified folder.
|
199
|
+
function moveFolders({ folder_id, folder_ids }) {
|
200
|
+
return axiosInstance({
|
201
|
+
method: "put",
|
202
|
+
url: "/folders/" + folder_id + "",
|
203
|
+
data: folder_ids
|
204
|
+
});
|
205
|
+
}
|
206
|
+
//--------------------------------------------------------------------------
|
207
|
+
// Updates the folder details.
|
208
|
+
function updateFolder({ folder_id, folder_name }) {
|
209
|
+
return axiosInstance({
|
210
|
+
method: "patch",
|
211
|
+
url: "/folders/" + folder_id + "",
|
212
|
+
data: {
|
213
|
+
folder_name: folder_name
|
214
|
+
}
|
215
|
+
});
|
216
|
+
}
|
217
|
+
//--------------------------------------------------------------------------
|
218
|
+
// Deletes the requested folder. The target folder must be empty.
|
219
|
+
function deleteFolder({ folder_id }) {
|
220
|
+
return axiosInstance({
|
221
|
+
method: "delete",
|
222
|
+
url: "/folders/" + folder_id + ""
|
223
|
+
});
|
224
|
+
}
|
225
|
+
function listFolderAccesses({ folder_id }) {
|
226
|
+
return axiosInstance({
|
227
|
+
method: "get",
|
228
|
+
url: "/folders/" + folder_id + "/access"
|
229
|
+
});
|
230
|
+
}
|
231
|
+
//--------------------------------------------------------------------------
|
232
|
+
// Grants member access to the targeted folder.
|
233
|
+
function grantMemberAccessToFolder({ folder_id, member_type, member_id, access }) {
|
234
|
+
return axiosInstance({
|
235
|
+
method: "put",
|
236
|
+
url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id + "",
|
237
|
+
data: {
|
238
|
+
access: access
|
239
|
+
}
|
240
|
+
});
|
241
|
+
}
|
242
|
+
//--------------------------------------------------------------------------
|
243
|
+
// Revokes member access to a target folder.
|
244
|
+
function revokeMemberAccessToFolder({ folder_id, member_type, member_id }) {
|
245
|
+
return axiosInstance({
|
246
|
+
method: "delete",
|
247
|
+
url: "/folders/" + folder_id + "/access/" + member_type + "/" + member_id + ""
|
248
|
+
});
|
249
|
+
}
|
250
|
+
function createSubfolder({ folder_id, folder_name, subfolders }) {
|
251
|
+
return axiosInstance({
|
252
|
+
method: "post",
|
253
|
+
url: "/folders/" + folder_id + "/folders",
|
254
|
+
data: {
|
255
|
+
folder_name: folder_name,
|
256
|
+
subfolders: subfolders
|
257
|
+
}
|
258
|
+
});
|
259
|
+
}
|
260
|
+
function listFolderSubFolders({ folder_id, depth = 0 }) {
|
261
|
+
return axiosInstance({
|
262
|
+
method: "get",
|
263
|
+
url: "/folders/" + folder_id + "/folders",
|
264
|
+
params: {
|
265
|
+
depth: depth
|
266
|
+
}
|
267
|
+
});
|
268
|
+
}
|
269
|
+
function uploadSourceFiles({ folder_id, body }) {
|
270
|
+
return axiosInstance({
|
271
|
+
method: "post",
|
272
|
+
url: "/folders/" + folder_id + "/source-files",
|
273
|
+
headers: {
|
274
|
+
"Content-Type": "multipart/form-data"
|
275
|
+
},
|
276
|
+
data: body
|
277
|
+
});
|
278
|
+
}
|
279
|
+
function getSourceFilesInFolder({ folder_id, offset = 0, limit = 10 }) {
|
280
|
+
return axiosInstance({
|
281
|
+
method: "get",
|
282
|
+
url: "/folders/" + folder_id + "/source-files",
|
283
|
+
params: {
|
284
|
+
offset: offset,
|
285
|
+
limit: limit
|
286
|
+
}
|
287
|
+
});
|
288
|
+
}
|
289
|
+
//--------------------------------------------------------------------------
|
290
|
+
// Move source files inside the specified folder.
|
291
|
+
function moveSourceFiles({ folder_id, source_file_ids }) {
|
292
|
+
return axiosInstance({
|
293
|
+
method: "put",
|
294
|
+
url: "/folders/" + folder_id + "/source-files",
|
295
|
+
data: source_file_ids
|
296
|
+
});
|
297
|
+
}
|
298
|
+
function getUploadTasksInFolder({ folder_id, offset = 0, limit = 10 }) {
|
299
|
+
return axiosInstance({
|
300
|
+
method: "get",
|
301
|
+
url: "/folders/" + folder_id + "/upload-tasks",
|
302
|
+
params: {
|
303
|
+
offset: offset,
|
304
|
+
limit: limit
|
305
|
+
}
|
306
|
+
});
|
307
|
+
}
|
308
|
+
function getFolderAssets({ folder_id }) {
|
309
|
+
return axiosInstance({
|
310
|
+
method: "get",
|
311
|
+
url: "/folders/" + folder_id + "/assets"
|
312
|
+
});
|
313
|
+
}
|
314
|
+
//--------------------------------------------------------------------------
|
315
|
+
// Move assets inside the specified folder.
|
316
|
+
function moveAssets({ folder_id, asset_ids }) {
|
317
|
+
return axiosInstance({
|
318
|
+
method: "put",
|
319
|
+
url: "/folders/" + folder_id + "/assets",
|
320
|
+
data: asset_ids
|
321
|
+
});
|
322
|
+
}
|
323
|
+
function createAsset({ folder_id, asset_container_creatable, body }) {
|
324
|
+
return axiosInstance({
|
325
|
+
method: "post",
|
326
|
+
url: "/folders/" + folder_id + "/assets/" + asset_container_creatable + "",
|
327
|
+
data: body
|
328
|
+
});
|
329
|
+
}
|
330
|
+
function getSessionsInFolder({ folder_id }) {
|
331
|
+
return axiosInstance({
|
332
|
+
method: "get",
|
333
|
+
url: "/folders/" + folder_id + "/sessions"
|
334
|
+
});
|
335
|
+
}
|
336
|
+
function listSourceFiles({ offset = 0, limit = 10 }) {
|
337
|
+
return axiosInstance({
|
338
|
+
method: "get",
|
339
|
+
url: "/source-files",
|
340
|
+
params: {
|
341
|
+
offset: offset,
|
342
|
+
limit: limit
|
343
|
+
}
|
344
|
+
});
|
345
|
+
}
|
346
|
+
//--------------------------------------------------------------------------
|
347
|
+
// Deletes the target source files. Deleting a source file is permanent.
|
348
|
+
function deleteSourceFiles({ source_file_ids }) {
|
349
|
+
return axiosInstance({
|
350
|
+
method: "delete",
|
351
|
+
url: "/source-files",
|
352
|
+
data: source_file_ids
|
353
|
+
});
|
354
|
+
}
|
355
|
+
//--------------------------------------------------------------------------
|
356
|
+
// Downloads the target source file.
|
357
|
+
function downloadSourceFile({ source_file_id }) {
|
358
|
+
return axiosInstance({
|
359
|
+
method: "get",
|
360
|
+
url: "/source-files/" + source_file_id + "",
|
361
|
+
responseType: "arraybuffer"
|
362
|
+
});
|
363
|
+
}
|
364
|
+
function getSourceFileDetails({ source_file_id }) {
|
365
|
+
return axiosInstance({
|
366
|
+
method: "get",
|
367
|
+
url: "/source-files/" + source_file_id + "/details"
|
368
|
+
});
|
369
|
+
}
|
370
|
+
//--------------------------------------------------------------------------
|
371
|
+
// Updates details for a specific source file.
|
372
|
+
function updateSourceFileDetails({ source_file_id, source_file_name }) {
|
373
|
+
return axiosInstance({
|
374
|
+
method: "patch",
|
375
|
+
url: "/source-files/" + source_file_id + "/details",
|
376
|
+
data: {
|
377
|
+
source_file_name: source_file_name
|
378
|
+
}
|
379
|
+
});
|
380
|
+
}
|
381
|
+
function getSourceFileAssets({ source_file_id }) {
|
382
|
+
return axiosInstance({
|
383
|
+
method: "get",
|
384
|
+
url: "/source-files/" + source_file_id + "/assets"
|
385
|
+
});
|
386
|
+
}
|
387
|
+
function getUploadTask({ upload_task_id }) {
|
388
|
+
return axiosInstance({
|
389
|
+
method: "get",
|
390
|
+
url: "/upload-tasks/" + upload_task_id + ""
|
391
|
+
});
|
392
|
+
}
|
393
|
+
function listAssets({ offset = 0, limit = 10 }) {
|
394
|
+
return axiosInstance({
|
395
|
+
method: "get",
|
396
|
+
url: "/assets",
|
397
|
+
params: {
|
398
|
+
offset: offset,
|
399
|
+
limit: limit
|
400
|
+
}
|
401
|
+
});
|
402
|
+
}
|
403
|
+
//--------------------------------------------------------------------------
|
404
|
+
// Batch delete assets. You **MUST NOT** reference assets.
|
405
|
+
function deleteAssets({ asset_ids }) {
|
406
|
+
return axiosInstance({
|
407
|
+
method: "delete",
|
408
|
+
url: "/assets",
|
409
|
+
data: asset_ids
|
410
|
+
});
|
411
|
+
}
|
412
|
+
//--------------------------------------------------------------------------
|
413
|
+
// Deletes the asset.
|
414
|
+
function deleteAsset({ asset_container, asset_id }) {
|
415
|
+
return axiosInstance({
|
416
|
+
method: "delete",
|
417
|
+
url: "/assets/" + asset_container + "/" + asset_id + ""
|
418
|
+
});
|
419
|
+
}
|
420
|
+
function getAssetSourceFile({ asset_container, asset_id }) {
|
421
|
+
return axiosInstance({
|
422
|
+
method: "get",
|
423
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/source-file"
|
424
|
+
});
|
425
|
+
}
|
426
|
+
function getAssetDetails({ asset_container, asset_id }) {
|
427
|
+
return axiosInstance({
|
428
|
+
method: "get",
|
429
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/details"
|
430
|
+
});
|
431
|
+
}
|
432
|
+
function getAssetFolder({ asset_container, asset_id }) {
|
433
|
+
return axiosInstance({
|
434
|
+
method: "get",
|
435
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/folder"
|
436
|
+
});
|
437
|
+
}
|
438
|
+
function getAssetDependencies({ asset_container, asset_id, format = 'flat', depth = 'all', filter }) {
|
439
|
+
return axiosInstance({
|
440
|
+
method: "get",
|
441
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/dependencies",
|
442
|
+
params: {
|
443
|
+
format: format,
|
444
|
+
depth: depth,
|
445
|
+
filter: filter
|
446
|
+
}
|
447
|
+
});
|
448
|
+
}
|
449
|
+
function getAssetReferences({ asset_container, asset_id }) {
|
450
|
+
return axiosInstance({
|
451
|
+
method: "get",
|
452
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/references"
|
453
|
+
});
|
454
|
+
}
|
455
|
+
function getAssetDescription({ asset_container, asset_id }) {
|
456
|
+
return axiosInstance({
|
457
|
+
method: "get",
|
458
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/description"
|
459
|
+
});
|
460
|
+
}
|
461
|
+
//--------------------------------------------------------------------------
|
462
|
+
// Updates asset description. Supports only updating name.
|
463
|
+
function updateAssetDescription({ asset_container, asset_id, name }) {
|
464
|
+
return axiosInstance({
|
465
|
+
method: "patch",
|
466
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/description",
|
467
|
+
data: {
|
468
|
+
name: name
|
469
|
+
}
|
470
|
+
});
|
471
|
+
}
|
472
|
+
//--------------------------------------------------------------------------
|
473
|
+
// Gets the asset payload from the specified asset.
|
474
|
+
function getAssetPayload({ asset_container_with_payload, asset_id }) {
|
475
|
+
return axiosInstance({
|
476
|
+
method: "get",
|
477
|
+
url: "/assets/" + asset_container_with_payload + "/" + asset_id + "/payload",
|
478
|
+
responseType: "arraybuffer"
|
479
|
+
});
|
480
|
+
}
|
481
|
+
function getAssetHistory({ asset_container, asset_id }) {
|
482
|
+
return axiosInstance({
|
483
|
+
method: "get",
|
484
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/history"
|
485
|
+
});
|
486
|
+
}
|
487
|
+
function getAssetMeta({ asset_container, asset_id }) {
|
488
|
+
return axiosInstance({
|
489
|
+
method: "get",
|
490
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/meta"
|
491
|
+
});
|
492
|
+
}
|
493
|
+
//--------------------------------------------------------------------------
|
494
|
+
// Gets the code of the specified asset.
|
495
|
+
function getAssetCode({ asset_container_with_code, asset_id }) {
|
496
|
+
return axiosInstance({
|
497
|
+
method: "get",
|
498
|
+
url: "/assets/" + asset_container_with_code + "/" + asset_id + "/code"
|
499
|
+
});
|
500
|
+
}
|
501
|
+
//--------------------------------------------------------------------------
|
502
|
+
// Gets the asset thumbnail from the specified asset.
|
503
|
+
function getAssetThumbnail({ asset_container, asset_id, size, default_url }) {
|
504
|
+
return axiosInstance({
|
505
|
+
method: "get",
|
506
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
|
507
|
+
params: {
|
508
|
+
size: size,
|
509
|
+
default_url: default_url
|
510
|
+
}
|
511
|
+
});
|
512
|
+
}
|
513
|
+
//--------------------------------------------------------------------------
|
514
|
+
// Assigns a thumbnail to the specified asset.
|
515
|
+
function setAssetThumbnail({ asset_container, asset_id, body }, contentType) {
|
516
|
+
return axiosInstance({
|
517
|
+
method: "put",
|
518
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/thumbnail",
|
519
|
+
headers: {
|
520
|
+
"Content-Type": contentType
|
521
|
+
},
|
522
|
+
data: body
|
523
|
+
});
|
524
|
+
}
|
525
|
+
function getAssetCustomTypes({ asset_container_with_custom_types, asset_id }) {
|
526
|
+
return axiosInstance({
|
527
|
+
method: "get",
|
528
|
+
url: "/assets/" + asset_container_with_custom_types + "/" + asset_id + "/custom-types"
|
529
|
+
});
|
530
|
+
}
|
531
|
+
//--------------------------------------------------------------------------
|
532
|
+
// Packages and downloads the target asset.
|
533
|
+
function packageAsset({ asset_container, asset_id }) {
|
534
|
+
return axiosInstance({
|
535
|
+
method: "get",
|
536
|
+
url: "/assets/" + asset_container + "/" + asset_id + "/package",
|
537
|
+
responseType: "arraybuffer"
|
538
|
+
});
|
539
|
+
}
|
540
|
+
//--------------------------------------------------------------------------
|
541
|
+
// Downloads an asset payload in a given format. Only mesh is supported for the moment. This endpoint requires special export permission.
|
542
|
+
function exportAsset({ asset_container_exportable, asset_id, format, scale = 1 }) {
|
543
|
+
return axiosInstance({
|
544
|
+
method: "get",
|
545
|
+
url: "/assets/" + asset_container_exportable + "/" + asset_id + "/exports/" + format + "",
|
546
|
+
responseType: "arraybuffer",
|
547
|
+
params: {
|
548
|
+
scale: scale
|
549
|
+
}
|
550
|
+
});
|
551
|
+
}
|
552
|
+
function getSceneSessions({ scene_id }) {
|
553
|
+
return axiosInstance({
|
554
|
+
method: "get",
|
555
|
+
url: "/assets/scenes/" + scene_id + "/sessions"
|
556
|
+
});
|
557
|
+
}
|
558
|
+
function getSceneAABB({ scene_id }) {
|
559
|
+
return axiosInstance({
|
560
|
+
method: "get",
|
561
|
+
url: "/assets/scenes/" + scene_id + "/aabb"
|
562
|
+
});
|
563
|
+
}
|
564
|
+
function getEntity({ scene_id, entity_id, compute_global_transform = false }) {
|
565
|
+
return axiosInstance({
|
566
|
+
method: "get",
|
567
|
+
url: "/assets/scenes/" + scene_id + "/entities/" + entity_id + "",
|
568
|
+
params: {
|
569
|
+
compute_global_transform: compute_global_transform
|
570
|
+
}
|
571
|
+
});
|
572
|
+
}
|
573
|
+
function createSession({ scene_id }) {
|
574
|
+
return axiosInstance({
|
575
|
+
method: "post",
|
576
|
+
url: "/sessions",
|
577
|
+
data: {
|
578
|
+
scene_id: scene_id
|
579
|
+
}
|
580
|
+
});
|
581
|
+
}
|
582
|
+
//--------------------------------------------------------------------------
|
583
|
+
// Forcefully terminates a session.
|
584
|
+
function killSession({ session_id }) {
|
585
|
+
return axiosInstance({
|
586
|
+
method: "delete",
|
587
|
+
url: "/sessions/" + session_id + ""
|
588
|
+
});
|
589
|
+
}
|
590
|
+
function joinSession({ session_id }) {
|
591
|
+
return axiosInstance({
|
592
|
+
method: "post",
|
593
|
+
url: "/sessions/" + session_id + "/clients"
|
594
|
+
});
|
595
|
+
}
|
596
|
+
//--------------------------------------------------------------------------
|
597
|
+
// Kick a client from a running session.
|
598
|
+
function kickClientFromSession({ session_id, client_id }) {
|
599
|
+
return axiosInstance({
|
600
|
+
method: "delete",
|
601
|
+
url: "/sessions/" + session_id + "/clients/" + client_id + ""
|
602
|
+
});
|
603
|
+
}
|
604
|
+
|
605
|
+
//--------------------------------------------------------------------------
|
606
|
+
//------------------------------------------------------------------------------
|
607
|
+
function setApiKey(apiKey) {
|
608
|
+
axiosInstance.defaults.headers.common['api_key'] = apiKey;
|
609
|
+
delete axiosInstance.defaults.headers.common['user_token'];
|
610
|
+
}
|
611
|
+
//------------------------------------------------------------------------------
|
612
|
+
function setUserToken(userToken) {
|
613
|
+
axiosInstance.defaults.headers.common['user_token'] = userToken;
|
614
|
+
delete axiosInstance.defaults.headers.common['api_key'];
|
615
|
+
}
|
616
|
+
function setBaseUrl(url) {
|
617
|
+
axiosInstance.defaults.baseURL = url;
|
618
|
+
}
|
619
|
+
|
620
|
+
export { axiosInstance, createAsset, createFolder, createGroup, createSession, createSubfolder, deleteAsset, deleteAssets, deleteFolder, deleteGroup, deleteSourceFiles, deleteUser, downloadSourceFile, exportAsset, generateUserToken, getAssetCode, getAssetCustomTypes, getAssetDependencies, getAssetDescription, getAssetDetails, getAssetFolder, getAssetHistory, getAssetMeta, getAssetPayload, getAssetReferences, getAssetSourceFile, getAssetThumbnail, getEntity, getFolderAssets, getFolderInfo, getGroup, getSceneAABB, getSceneSessions, getSessionsInFolder, getSourceFileAssets, getSourceFileDetails, getSourceFilesInFolder, getUploadTask, getUploadTasksInFolder, getUser, getUserGroups, getUserUploadTasks, grantMemberAccessToFolder, grantMemberAccessToGroup, joinSession, kickClientFromSession, killSession, listAssets, listFolderAccesses, listFolderSubFolders, listFolders, listSourceFiles, listUsers, moveAssets, moveFolders, moveSourceFiles, packageAsset, registerUser, revokeMemberAccessToFolder, revokeMemberAccessToGroup, setApiKey, setAssetThumbnail, setBaseUrl, setUserToken, updateAssetDescription, updateFolder, updateGroupDescription, updateSourceFileDetails, updateUser, uploadSourceFiles };
|
621
|
+
//# sourceMappingURL=index.esm.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../_prebuild/wrapper.ts","../../index.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;AAaG;AAKH;AACa,MAAA,aAAa,GAAG,mBAAmB,GAAG;AASnD;AACA,SAAS,mBAAmB,GAAA;AAExB,IAAA,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC;AAC/B,QAAA,OAAO,EAAE,4BAA4B;AACxC,KAAA,CAAC,CAAC;IAEH,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CACnC,kBAAkB,IAAG;AAEjB,QAAA,IAAG,kBAAkB,CAAC,MAAM,CAAC,YAAY,KAAK,QAAQ,EACtD;AACI,YAAA,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChC,kBAAkB,CAAC,IAAI,CAAC,mBAAmB,GAAO,kBAAkB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YAC7F,kBAAkB,CAAC,IAAI,CAAC,qBAAqB,GAAK,kBAAkB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;YAC/F,kBAAkB,CAAC,IAAI,CAAC,cAAc,GAAY,kBAAkB,CAAC,MAAM,CAAC;AAC/E,SAAA;QAED,OAAO,kBAAkB,CAAC,IAAI,CAAC;KAClC,EACD,UAAU,IAAG;AAET,QAAA,IAAG,CAAC,UAAU,CAAC,QAAQ,EACvB;AACI,YAAA,OAAO,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACrC,SAAA;AAED,QAAA,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;AAE3C,QAAA,MAAM,KAAK,GAAc;AACrB,YAAA,SAAS,EAAK,SAAS,CAAC,KAAK,EAAE,QAAQ;AACvC,YAAA,MAAM,EAAQ,UAAU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CAAC;AACP,CAAC;AAED;AACA;SACgB,qBAAqB,CACjC,EACI,UAAU,EACV,SAAS,EAIZ,EAAA;AAGD,IAAA,OAAO,aAAa,CAAC;AACjB,QAAA,MAAM,EAAE,QAAQ;QAChB,GAAG,EAAE,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,EAAE;AAChE,KAAA,CAAC,CAAC;AACP;;AC//DA;AAGA;AACM,SAAU,SAAS,CAAC,MAAe,EAAA;IAErC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;IAC1D,OAAO,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAC/D,CAAC;AAED;AACM,SAAU,YAAY,CAAC,SAAkB,EAAA;IAE3C,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;IAChE,OAAO,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAC5D,CAAC;AAEK,SAAU,UAAU,CAAC,GAAY,EAAA;AAEnC,IAAA,aAAa,CAAC,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC;AACzC;;;;"}
|
package/index.ts
CHANGED
@@ -15,5 +15,10 @@ export function setUserToken(userToken : string)
|
|
15
15
|
delete axiosInstance.defaults.headers.common['api_key'];
|
16
16
|
}
|
17
17
|
|
18
|
+
export function setBaseUrl(url : string)
|
19
|
+
{
|
20
|
+
axiosInstance.defaults.baseURL = url;
|
21
|
+
}
|
22
|
+
|
18
23
|
//------------------------------------------------------------------------------
|
19
24
|
export * from './_prebuild/wrapper';
|