@hautechai/sdk 0.0.8 → 0.0.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/.env.example +1 -2
- package/dist/autogenerated/api.d.ts +31 -44
- package/dist/autogenerated/api.js +35 -40
- package/dist/sdk/index.d.ts +3 -3
- package/dist/sdk/index.js +2 -2
- package/dist/sdk/stacks/index.d.ts +3 -3
- package/dist/sdk/stacks/index.js +3 -3
- package/dist/token/index.d.ts +2 -2
- package/dist/token/index.js +2 -1
- package/dist/token/permissions.js +2 -2
- package/dist/types.d.ts +1 -1
- package/package.json +2 -1
package/.env.example
CHANGED
|
@@ -91,15 +91,15 @@ export interface AddItemsToCollectionControllerParamsDto {
|
|
|
91
91
|
/**
|
|
92
92
|
*
|
|
93
93
|
* @export
|
|
94
|
-
* @interface
|
|
94
|
+
* @interface AddItemsToStackControllerParamsDto
|
|
95
95
|
*/
|
|
96
|
-
export interface
|
|
96
|
+
export interface AddItemsToStackControllerParamsDto {
|
|
97
97
|
/**
|
|
98
98
|
*
|
|
99
99
|
* @type {Array<string>}
|
|
100
|
-
* @memberof
|
|
100
|
+
* @memberof AddItemsToStackControllerParamsDto
|
|
101
101
|
*/
|
|
102
|
-
'
|
|
102
|
+
'itemIds': Array<string>;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
*
|
|
@@ -1264,19 +1264,6 @@ export interface RemoveItemsFromCollectionControllerParamsDto {
|
|
|
1264
1264
|
*/
|
|
1265
1265
|
'itemIds': Array<string>;
|
|
1266
1266
|
}
|
|
1267
|
-
/**
|
|
1268
|
-
*
|
|
1269
|
-
* @export
|
|
1270
|
-
* @interface RemoveOperationsFromStackControllerParamsDto
|
|
1271
|
-
*/
|
|
1272
|
-
export interface RemoveOperationsFromStackControllerParamsDto {
|
|
1273
|
-
/**
|
|
1274
|
-
*
|
|
1275
|
-
* @type {Array<string>}
|
|
1276
|
-
* @memberof RemoveOperationsFromStackControllerParamsDto
|
|
1277
|
-
*/
|
|
1278
|
-
'operationIds': Array<string>;
|
|
1279
|
-
}
|
|
1280
1267
|
/**
|
|
1281
1268
|
*
|
|
1282
1269
|
* @export
|
|
@@ -1373,6 +1360,12 @@ export interface StackEntity {
|
|
|
1373
1360
|
* @memberof StackEntity
|
|
1374
1361
|
*/
|
|
1375
1362
|
'kind': StackEntityKindEnum;
|
|
1363
|
+
/**
|
|
1364
|
+
*
|
|
1365
|
+
* @type {Array<StackEntityItemsInner>}
|
|
1366
|
+
* @memberof StackEntity
|
|
1367
|
+
*/
|
|
1368
|
+
'items': Array<StackEntityItemsInner>;
|
|
1376
1369
|
/**
|
|
1377
1370
|
*
|
|
1378
1371
|
* @type {string}
|
|
@@ -1403,22 +1396,16 @@ export interface StackEntity {
|
|
|
1403
1396
|
* @memberof StackEntity
|
|
1404
1397
|
*/
|
|
1405
1398
|
'updatedAt': string;
|
|
1406
|
-
/**
|
|
1407
|
-
*
|
|
1408
|
-
* @type {Array<OperationEntity>}
|
|
1409
|
-
* @memberof StackEntity
|
|
1410
|
-
*/
|
|
1411
|
-
'operations': Array<OperationEntity>;
|
|
1412
1399
|
}
|
|
1413
1400
|
export declare const StackEntityKindEnum: {
|
|
1414
|
-
readonly Collection: "collection";
|
|
1415
|
-
readonly Operation: "operation";
|
|
1416
1401
|
readonly Stack: "stack";
|
|
1417
|
-
readonly Image: "image";
|
|
1418
|
-
readonly Pose: "pose";
|
|
1419
|
-
readonly Storage: "storage";
|
|
1420
1402
|
};
|
|
1421
1403
|
export type StackEntityKindEnum = typeof StackEntityKindEnum[keyof typeof StackEntityKindEnum];
|
|
1404
|
+
/**
|
|
1405
|
+
* @type StackEntityItemsInner
|
|
1406
|
+
* @export
|
|
1407
|
+
*/
|
|
1408
|
+
export type StackEntityItemsInner = ImageEntity | OperationEntity;
|
|
1422
1409
|
/**
|
|
1423
1410
|
*
|
|
1424
1411
|
* @export
|
|
@@ -3182,11 +3169,11 @@ export declare const StacksApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
3182
3169
|
/**
|
|
3183
3170
|
*
|
|
3184
3171
|
* @param {string} id
|
|
3185
|
-
* @param {
|
|
3172
|
+
* @param {AddItemsToStackControllerParamsDto} addItemsToStackControllerParamsDto
|
|
3186
3173
|
* @param {*} [options] Override http request option.
|
|
3187
3174
|
* @throws {RequiredError}
|
|
3188
3175
|
*/
|
|
3189
|
-
|
|
3176
|
+
stacksControllerAddItemsV1: (id: string, addItemsToStackControllerParamsDto: AddItemsToStackControllerParamsDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3190
3177
|
/**
|
|
3191
3178
|
*
|
|
3192
3179
|
* @param {CreateStackParamsDto} createStackParamsDto
|
|
@@ -3213,11 +3200,11 @@ export declare const StacksApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
3213
3200
|
/**
|
|
3214
3201
|
*
|
|
3215
3202
|
* @param {string} id
|
|
3216
|
-
* @param {
|
|
3203
|
+
* @param {RemoveItemsFromCollectionControllerParamsDto} removeItemsFromCollectionControllerParamsDto
|
|
3217
3204
|
* @param {*} [options] Override http request option.
|
|
3218
3205
|
* @throws {RequiredError}
|
|
3219
3206
|
*/
|
|
3220
|
-
|
|
3207
|
+
stacksControllerRemoveItemsV1: (id: string, removeItemsFromCollectionControllerParamsDto: RemoveItemsFromCollectionControllerParamsDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3221
3208
|
/**
|
|
3222
3209
|
*
|
|
3223
3210
|
* @param {string} id
|
|
@@ -3235,11 +3222,11 @@ export declare const StacksApiFp: (configuration?: Configuration) => {
|
|
|
3235
3222
|
/**
|
|
3236
3223
|
*
|
|
3237
3224
|
* @param {string} id
|
|
3238
|
-
* @param {
|
|
3225
|
+
* @param {AddItemsToStackControllerParamsDto} addItemsToStackControllerParamsDto
|
|
3239
3226
|
* @param {*} [options] Override http request option.
|
|
3240
3227
|
* @throws {RequiredError}
|
|
3241
3228
|
*/
|
|
3242
|
-
|
|
3229
|
+
stacksControllerAddItemsV1(id: string, addItemsToStackControllerParamsDto: AddItemsToStackControllerParamsDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StackEntity>>;
|
|
3243
3230
|
/**
|
|
3244
3231
|
*
|
|
3245
3232
|
* @param {CreateStackParamsDto} createStackParamsDto
|
|
@@ -3266,11 +3253,11 @@ export declare const StacksApiFp: (configuration?: Configuration) => {
|
|
|
3266
3253
|
/**
|
|
3267
3254
|
*
|
|
3268
3255
|
* @param {string} id
|
|
3269
|
-
* @param {
|
|
3256
|
+
* @param {RemoveItemsFromCollectionControllerParamsDto} removeItemsFromCollectionControllerParamsDto
|
|
3270
3257
|
* @param {*} [options] Override http request option.
|
|
3271
3258
|
* @throws {RequiredError}
|
|
3272
3259
|
*/
|
|
3273
|
-
|
|
3260
|
+
stacksControllerRemoveItemsV1(id: string, removeItemsFromCollectionControllerParamsDto: RemoveItemsFromCollectionControllerParamsDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StackEntity>>;
|
|
3274
3261
|
/**
|
|
3275
3262
|
*
|
|
3276
3263
|
* @param {string} id
|
|
@@ -3288,11 +3275,11 @@ export declare const StacksApiFactory: (configuration?: Configuration, basePath?
|
|
|
3288
3275
|
/**
|
|
3289
3276
|
*
|
|
3290
3277
|
* @param {string} id
|
|
3291
|
-
* @param {
|
|
3278
|
+
* @param {AddItemsToStackControllerParamsDto} addItemsToStackControllerParamsDto
|
|
3292
3279
|
* @param {*} [options] Override http request option.
|
|
3293
3280
|
* @throws {RequiredError}
|
|
3294
3281
|
*/
|
|
3295
|
-
|
|
3282
|
+
stacksControllerAddItemsV1(id: string, addItemsToStackControllerParamsDto: AddItemsToStackControllerParamsDto, options?: RawAxiosRequestConfig): AxiosPromise<StackEntity>;
|
|
3296
3283
|
/**
|
|
3297
3284
|
*
|
|
3298
3285
|
* @param {CreateStackParamsDto} createStackParamsDto
|
|
@@ -3319,11 +3306,11 @@ export declare const StacksApiFactory: (configuration?: Configuration, basePath?
|
|
|
3319
3306
|
/**
|
|
3320
3307
|
*
|
|
3321
3308
|
* @param {string} id
|
|
3322
|
-
* @param {
|
|
3309
|
+
* @param {RemoveItemsFromCollectionControllerParamsDto} removeItemsFromCollectionControllerParamsDto
|
|
3323
3310
|
* @param {*} [options] Override http request option.
|
|
3324
3311
|
* @throws {RequiredError}
|
|
3325
3312
|
*/
|
|
3326
|
-
|
|
3313
|
+
stacksControllerRemoveItemsV1(id: string, removeItemsFromCollectionControllerParamsDto: RemoveItemsFromCollectionControllerParamsDto, options?: RawAxiosRequestConfig): AxiosPromise<StackEntity>;
|
|
3327
3314
|
/**
|
|
3328
3315
|
*
|
|
3329
3316
|
* @param {string} id
|
|
@@ -3343,12 +3330,12 @@ export declare class StacksApi extends BaseAPI {
|
|
|
3343
3330
|
/**
|
|
3344
3331
|
*
|
|
3345
3332
|
* @param {string} id
|
|
3346
|
-
* @param {
|
|
3333
|
+
* @param {AddItemsToStackControllerParamsDto} addItemsToStackControllerParamsDto
|
|
3347
3334
|
* @param {*} [options] Override http request option.
|
|
3348
3335
|
* @throws {RequiredError}
|
|
3349
3336
|
* @memberof StacksApi
|
|
3350
3337
|
*/
|
|
3351
|
-
|
|
3338
|
+
stacksControllerAddItemsV1(id: string, addItemsToStackControllerParamsDto: AddItemsToStackControllerParamsDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<StackEntity, any>>;
|
|
3352
3339
|
/**
|
|
3353
3340
|
*
|
|
3354
3341
|
* @param {CreateStackParamsDto} createStackParamsDto
|
|
@@ -3378,12 +3365,12 @@ export declare class StacksApi extends BaseAPI {
|
|
|
3378
3365
|
/**
|
|
3379
3366
|
*
|
|
3380
3367
|
* @param {string} id
|
|
3381
|
-
* @param {
|
|
3368
|
+
* @param {RemoveItemsFromCollectionControllerParamsDto} removeItemsFromCollectionControllerParamsDto
|
|
3382
3369
|
* @param {*} [options] Override http request option.
|
|
3383
3370
|
* @throws {RequiredError}
|
|
3384
3371
|
* @memberof StacksApi
|
|
3385
3372
|
*/
|
|
3386
|
-
|
|
3373
|
+
stacksControllerRemoveItemsV1(id: string, removeItemsFromCollectionControllerParamsDto: RemoveItemsFromCollectionControllerParamsDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<StackEntity, any>>;
|
|
3387
3374
|
/**
|
|
3388
3375
|
*
|
|
3389
3376
|
* @param {string} id
|
|
@@ -108,12 +108,7 @@ export const ResourceEntityKindEnum = {
|
|
|
108
108
|
Storage: 'storage'
|
|
109
109
|
};
|
|
110
110
|
export const StackEntityKindEnum = {
|
|
111
|
-
|
|
112
|
-
Operation: 'operation',
|
|
113
|
-
Stack: 'stack',
|
|
114
|
-
Image: 'image',
|
|
115
|
-
Pose: 'pose',
|
|
116
|
-
Storage: 'storage'
|
|
111
|
+
Stack: 'stack'
|
|
117
112
|
};
|
|
118
113
|
export const StorageEntityKindEnum = {
|
|
119
114
|
Collection: 'collection',
|
|
@@ -3317,16 +3312,16 @@ export const StacksApiAxiosParamCreator = function (configuration) {
|
|
|
3317
3312
|
/**
|
|
3318
3313
|
*
|
|
3319
3314
|
* @param {string} id
|
|
3320
|
-
* @param {
|
|
3315
|
+
* @param {AddItemsToStackControllerParamsDto} addItemsToStackControllerParamsDto
|
|
3321
3316
|
* @param {*} [options] Override http request option.
|
|
3322
3317
|
* @throws {RequiredError}
|
|
3323
3318
|
*/
|
|
3324
|
-
|
|
3319
|
+
stacksControllerAddItemsV1: async (id, addItemsToStackControllerParamsDto, options = {}) => {
|
|
3325
3320
|
// verify required parameter 'id' is not null or undefined
|
|
3326
|
-
assertParamExists('
|
|
3327
|
-
// verify required parameter '
|
|
3328
|
-
assertParamExists('
|
|
3329
|
-
const localVarPath = `/v1/stacks/{id}/
|
|
3321
|
+
assertParamExists('stacksControllerAddItemsV1', 'id', id);
|
|
3322
|
+
// verify required parameter 'addItemsToStackControllerParamsDto' is not null or undefined
|
|
3323
|
+
assertParamExists('stacksControllerAddItemsV1', 'addItemsToStackControllerParamsDto', addItemsToStackControllerParamsDto);
|
|
3324
|
+
const localVarPath = `/v1/stacks/{id}/items/add`
|
|
3330
3325
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3331
3326
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3332
3327
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -3344,7 +3339,7 @@ export const StacksApiAxiosParamCreator = function (configuration) {
|
|
|
3344
3339
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3345
3340
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3346
3341
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3347
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
3342
|
+
localVarRequestOptions.data = serializeDataIfNeeded(addItemsToStackControllerParamsDto, localVarRequestOptions, configuration);
|
|
3348
3343
|
return {
|
|
3349
3344
|
url: toPathString(localVarUrlObj),
|
|
3350
3345
|
options: localVarRequestOptions,
|
|
@@ -3455,16 +3450,16 @@ export const StacksApiAxiosParamCreator = function (configuration) {
|
|
|
3455
3450
|
/**
|
|
3456
3451
|
*
|
|
3457
3452
|
* @param {string} id
|
|
3458
|
-
* @param {
|
|
3453
|
+
* @param {RemoveItemsFromCollectionControllerParamsDto} removeItemsFromCollectionControllerParamsDto
|
|
3459
3454
|
* @param {*} [options] Override http request option.
|
|
3460
3455
|
* @throws {RequiredError}
|
|
3461
3456
|
*/
|
|
3462
|
-
|
|
3457
|
+
stacksControllerRemoveItemsV1: async (id, removeItemsFromCollectionControllerParamsDto, options = {}) => {
|
|
3463
3458
|
// verify required parameter 'id' is not null or undefined
|
|
3464
|
-
assertParamExists('
|
|
3465
|
-
// verify required parameter '
|
|
3466
|
-
assertParamExists('
|
|
3467
|
-
const localVarPath = `/v1/stacks/{id}/
|
|
3459
|
+
assertParamExists('stacksControllerRemoveItemsV1', 'id', id);
|
|
3460
|
+
// verify required parameter 'removeItemsFromCollectionControllerParamsDto' is not null or undefined
|
|
3461
|
+
assertParamExists('stacksControllerRemoveItemsV1', 'removeItemsFromCollectionControllerParamsDto', removeItemsFromCollectionControllerParamsDto);
|
|
3462
|
+
const localVarPath = `/v1/stacks/{id}/items/remove`
|
|
3468
3463
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3469
3464
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3470
3465
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -3482,7 +3477,7 @@ export const StacksApiAxiosParamCreator = function (configuration) {
|
|
|
3482
3477
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3483
3478
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3484
3479
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3485
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
3480
|
+
localVarRequestOptions.data = serializeDataIfNeeded(removeItemsFromCollectionControllerParamsDto, localVarRequestOptions, configuration);
|
|
3486
3481
|
return {
|
|
3487
3482
|
url: toPathString(localVarUrlObj),
|
|
3488
3483
|
options: localVarRequestOptions,
|
|
@@ -3536,14 +3531,14 @@ export const StacksApiFp = function (configuration) {
|
|
|
3536
3531
|
/**
|
|
3537
3532
|
*
|
|
3538
3533
|
* @param {string} id
|
|
3539
|
-
* @param {
|
|
3534
|
+
* @param {AddItemsToStackControllerParamsDto} addItemsToStackControllerParamsDto
|
|
3540
3535
|
* @param {*} [options] Override http request option.
|
|
3541
3536
|
* @throws {RequiredError}
|
|
3542
3537
|
*/
|
|
3543
|
-
async
|
|
3544
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
3538
|
+
async stacksControllerAddItemsV1(id, addItemsToStackControllerParamsDto, options) {
|
|
3539
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.stacksControllerAddItemsV1(id, addItemsToStackControllerParamsDto, options);
|
|
3545
3540
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3546
|
-
const localVarOperationServerBasePath = operationServerMap['StacksApi.
|
|
3541
|
+
const localVarOperationServerBasePath = operationServerMap['StacksApi.stacksControllerAddItemsV1']?.[localVarOperationServerIndex]?.url;
|
|
3547
3542
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3548
3543
|
},
|
|
3549
3544
|
/**
|
|
@@ -3587,14 +3582,14 @@ export const StacksApiFp = function (configuration) {
|
|
|
3587
3582
|
/**
|
|
3588
3583
|
*
|
|
3589
3584
|
* @param {string} id
|
|
3590
|
-
* @param {
|
|
3585
|
+
* @param {RemoveItemsFromCollectionControllerParamsDto} removeItemsFromCollectionControllerParamsDto
|
|
3591
3586
|
* @param {*} [options] Override http request option.
|
|
3592
3587
|
* @throws {RequiredError}
|
|
3593
3588
|
*/
|
|
3594
|
-
async
|
|
3595
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
3589
|
+
async stacksControllerRemoveItemsV1(id, removeItemsFromCollectionControllerParamsDto, options) {
|
|
3590
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.stacksControllerRemoveItemsV1(id, removeItemsFromCollectionControllerParamsDto, options);
|
|
3596
3591
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3597
|
-
const localVarOperationServerBasePath = operationServerMap['StacksApi.
|
|
3592
|
+
const localVarOperationServerBasePath = operationServerMap['StacksApi.stacksControllerRemoveItemsV1']?.[localVarOperationServerIndex]?.url;
|
|
3598
3593
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3599
3594
|
},
|
|
3600
3595
|
/**
|
|
@@ -3622,12 +3617,12 @@ export const StacksApiFactory = function (configuration, basePath, axios) {
|
|
|
3622
3617
|
/**
|
|
3623
3618
|
*
|
|
3624
3619
|
* @param {string} id
|
|
3625
|
-
* @param {
|
|
3620
|
+
* @param {AddItemsToStackControllerParamsDto} addItemsToStackControllerParamsDto
|
|
3626
3621
|
* @param {*} [options] Override http request option.
|
|
3627
3622
|
* @throws {RequiredError}
|
|
3628
3623
|
*/
|
|
3629
|
-
|
|
3630
|
-
return localVarFp.
|
|
3624
|
+
stacksControllerAddItemsV1(id, addItemsToStackControllerParamsDto, options) {
|
|
3625
|
+
return localVarFp.stacksControllerAddItemsV1(id, addItemsToStackControllerParamsDto, options).then((request) => request(axios, basePath));
|
|
3631
3626
|
},
|
|
3632
3627
|
/**
|
|
3633
3628
|
*
|
|
@@ -3661,12 +3656,12 @@ export const StacksApiFactory = function (configuration, basePath, axios) {
|
|
|
3661
3656
|
/**
|
|
3662
3657
|
*
|
|
3663
3658
|
* @param {string} id
|
|
3664
|
-
* @param {
|
|
3659
|
+
* @param {RemoveItemsFromCollectionControllerParamsDto} removeItemsFromCollectionControllerParamsDto
|
|
3665
3660
|
* @param {*} [options] Override http request option.
|
|
3666
3661
|
* @throws {RequiredError}
|
|
3667
3662
|
*/
|
|
3668
|
-
|
|
3669
|
-
return localVarFp.
|
|
3663
|
+
stacksControllerRemoveItemsV1(id, removeItemsFromCollectionControllerParamsDto, options) {
|
|
3664
|
+
return localVarFp.stacksControllerRemoveItemsV1(id, removeItemsFromCollectionControllerParamsDto, options).then((request) => request(axios, basePath));
|
|
3670
3665
|
},
|
|
3671
3666
|
/**
|
|
3672
3667
|
*
|
|
@@ -3690,13 +3685,13 @@ export class StacksApi extends BaseAPI {
|
|
|
3690
3685
|
/**
|
|
3691
3686
|
*
|
|
3692
3687
|
* @param {string} id
|
|
3693
|
-
* @param {
|
|
3688
|
+
* @param {AddItemsToStackControllerParamsDto} addItemsToStackControllerParamsDto
|
|
3694
3689
|
* @param {*} [options] Override http request option.
|
|
3695
3690
|
* @throws {RequiredError}
|
|
3696
3691
|
* @memberof StacksApi
|
|
3697
3692
|
*/
|
|
3698
|
-
|
|
3699
|
-
return StacksApiFp(this.configuration).
|
|
3693
|
+
stacksControllerAddItemsV1(id, addItemsToStackControllerParamsDto, options) {
|
|
3694
|
+
return StacksApiFp(this.configuration).stacksControllerAddItemsV1(id, addItemsToStackControllerParamsDto, options).then((request) => request(this.axios, this.basePath));
|
|
3700
3695
|
}
|
|
3701
3696
|
/**
|
|
3702
3697
|
*
|
|
@@ -3733,13 +3728,13 @@ export class StacksApi extends BaseAPI {
|
|
|
3733
3728
|
/**
|
|
3734
3729
|
*
|
|
3735
3730
|
* @param {string} id
|
|
3736
|
-
* @param {
|
|
3731
|
+
* @param {RemoveItemsFromCollectionControllerParamsDto} removeItemsFromCollectionControllerParamsDto
|
|
3737
3732
|
* @param {*} [options] Override http request option.
|
|
3738
3733
|
* @throws {RequiredError}
|
|
3739
3734
|
* @memberof StacksApi
|
|
3740
3735
|
*/
|
|
3741
|
-
|
|
3742
|
-
return StacksApiFp(this.configuration).
|
|
3736
|
+
stacksControllerRemoveItemsV1(id, removeItemsFromCollectionControllerParamsDto, options) {
|
|
3737
|
+
return StacksApiFp(this.configuration).stacksControllerRemoveItemsV1(id, removeItemsFromCollectionControllerParamsDto, options).then((request) => request(this.axios, this.basePath));
|
|
3743
3738
|
}
|
|
3744
3739
|
/**
|
|
3745
3740
|
*
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -170,13 +170,13 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
170
170
|
id: string;
|
|
171
171
|
}) => Promise<import("../types").StackEntity | undefined>;
|
|
172
172
|
list: (props?: import("../types").ListProps) => Promise<import("../types").ListResponse<import("../types").StackEntity>>;
|
|
173
|
-
|
|
173
|
+
items: {
|
|
174
174
|
add: (props: {
|
|
175
|
-
|
|
175
|
+
itemIds: string[];
|
|
176
176
|
stackId: string;
|
|
177
177
|
}) => Promise<void>;
|
|
178
178
|
remove: (props: {
|
|
179
|
-
|
|
179
|
+
itemIds: string[];
|
|
180
180
|
stackId: string;
|
|
181
181
|
}) => Promise<void>;
|
|
182
182
|
};
|
package/dist/sdk/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import balances from './balances';
|
|
|
3
3
|
import collections from './collections';
|
|
4
4
|
import groups from './groups';
|
|
5
5
|
import images from './images';
|
|
6
|
-
import
|
|
6
|
+
import { jwtDecode } from 'jwt-decode';
|
|
7
7
|
import operations from './operations';
|
|
8
8
|
import stacks from './stacks';
|
|
9
9
|
import storage from './storage';
|
|
@@ -12,7 +12,7 @@ export const createSDK = (options) => {
|
|
|
12
12
|
let token = undefined;
|
|
13
13
|
const authToken = async () => {
|
|
14
14
|
if (token) {
|
|
15
|
-
const decoded =
|
|
15
|
+
const decoded = jwtDecode(token);
|
|
16
16
|
const currentTime = Math.floor(Date.now() / 1000);
|
|
17
17
|
if (decoded.exp && decoded.exp > currentTime)
|
|
18
18
|
return token;
|
|
@@ -8,13 +8,13 @@ declare const stacks: (options: SDKOptions) => {
|
|
|
8
8
|
id: string;
|
|
9
9
|
}) => Promise<StackEntity | undefined>;
|
|
10
10
|
list: (props?: ListProps) => Promise<ListResponse<StackEntity>>;
|
|
11
|
-
|
|
11
|
+
items: {
|
|
12
12
|
add: (props: {
|
|
13
|
-
|
|
13
|
+
itemIds: string[];
|
|
14
14
|
stackId: string;
|
|
15
15
|
}) => Promise<void>;
|
|
16
16
|
remove: (props: {
|
|
17
|
-
|
|
17
|
+
itemIds: string[];
|
|
18
18
|
stackId: string;
|
|
19
19
|
}) => Promise<void>;
|
|
20
20
|
};
|
package/dist/sdk/stacks/index.js
CHANGED
|
@@ -16,12 +16,12 @@ const stacks = (options) => {
|
|
|
16
16
|
run: (methods) => methods.stacksControllerListStacksV1(props.orderBy, props.limit, props.cursor),
|
|
17
17
|
transform: transformToListResponse,
|
|
18
18
|
}),
|
|
19
|
-
|
|
19
|
+
items: {
|
|
20
20
|
add: async (props) => api.call({
|
|
21
|
-
run: (methods) => methods.
|
|
21
|
+
run: (methods) => methods.stacksControllerAddItemsV1(props.stackId, { itemIds: props.itemIds }),
|
|
22
22
|
}),
|
|
23
23
|
remove: async (props) => api.call({
|
|
24
|
-
run: (methods) => methods.
|
|
24
|
+
run: (methods) => methods.stacksControllerRemoveItemsV1(props.stackId, { itemIds: props.itemIds }),
|
|
25
25
|
}),
|
|
26
26
|
},
|
|
27
27
|
updateMetadata: async (props) => api.call({
|
package/dist/token/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export declare const createTokenSigner: (options: {
|
|
|
8
8
|
accountId: string;
|
|
9
9
|
expiresInSeconds: number;
|
|
10
10
|
permissions?: Partial<MethodsPermissions>;
|
|
11
|
-
}) =>
|
|
11
|
+
}) => any;
|
|
12
12
|
createRootToken: (props: {
|
|
13
13
|
expiresInSeconds: number;
|
|
14
|
-
}) =>
|
|
14
|
+
}) => any;
|
|
15
15
|
};
|
package/dist/token/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defaultPermissions, defaultRootPermissions } from './permissions';
|
|
2
|
-
import jwt from 'jsonwebtoken';
|
|
3
2
|
const createPrivateKey = (key) => {
|
|
4
3
|
const header = `-----BEGIN PRIVATE KEY-----\n`;
|
|
5
4
|
const footer = `\n-----END PRIVATE KEY-----`;
|
|
@@ -7,7 +6,9 @@ const createPrivateKey = (key) => {
|
|
|
7
6
|
const keyBody = key.match(/.{1,64}/g).join('\n');
|
|
8
7
|
return header + keyBody + footer;
|
|
9
8
|
};
|
|
9
|
+
// This function will not work in the browser
|
|
10
10
|
const createToken = (props) => {
|
|
11
|
+
const jwt = require('jsonwebtoken');
|
|
11
12
|
const privateKey = createPrivateKey(props.appKeySecret);
|
|
12
13
|
return jwt.sign(props.payload, privateKey, {
|
|
13
14
|
algorithm: 'RS256',
|
|
@@ -15,7 +15,7 @@ export const defaultPermissions = {
|
|
|
15
15
|
operations: { create: true, read: true, metadata: { update: true } },
|
|
16
16
|
pipelines: { create: true, read: true, update: true },
|
|
17
17
|
poses: { create: true, read: true },
|
|
18
|
-
stacks: { create: true,
|
|
18
|
+
stacks: { create: true, items: { add: true, remove: true }, read: true, metadata: { update: true } },
|
|
19
19
|
storage: { create: true, delete: true, read: true, update: true },
|
|
20
20
|
};
|
|
21
21
|
export const defaultRootPermissions = {
|
|
@@ -35,6 +35,6 @@ export const defaultRootPermissions = {
|
|
|
35
35
|
operations: { create: true, read: true, metadata: { update: true } },
|
|
36
36
|
pipelines: { create: true, read: true, update: true },
|
|
37
37
|
poses: { create: true, read: true },
|
|
38
|
-
stacks: { create: true,
|
|
38
|
+
stacks: { create: true, items: { add: true, remove: true }, read: true, metadata: { update: true } },
|
|
39
39
|
storage: { create: true, delete: true, read: true, update: true },
|
|
40
40
|
};
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hautechai/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"axios": "1.6.1",
|
|
21
21
|
"jsonwebtoken": "8.5.1",
|
|
22
|
+
"jwt-decode": "4.0.0",
|
|
22
23
|
"pusher-js": "8.4.0-rc2"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|