@flipdish/authorization 0.2.50 → 0.2.51
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/api.ts +248 -28
- package/configuration.ts +1 -1
- package/dist/api.d.ts +200 -26
- package/dist/api.js +101 -4
- package/dist/configuration.js +1 -1
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -342,13 +342,74 @@ export interface AuthorizationBatchResponseAllowedResourcesInner {
|
|
|
342
342
|
* @memberof AuthorizationBatchResponseAllowedResourcesInner
|
|
343
343
|
*/
|
|
344
344
|
'policyIds': Array<string>;
|
|
345
|
+
/**
|
|
346
|
+
*
|
|
347
|
+
* @type {AuthorizationBatchResponseAllowedResourcesInnerPrincipal}
|
|
348
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInner
|
|
349
|
+
*/
|
|
350
|
+
'principal': AuthorizationBatchResponseAllowedResourcesInnerPrincipal;
|
|
345
351
|
/**
|
|
346
352
|
*
|
|
347
353
|
* @type {AuthorizationBatchResponseAllowedResourcesInnerResource}
|
|
348
354
|
* @memberof AuthorizationBatchResponseAllowedResourcesInner
|
|
349
355
|
*/
|
|
350
356
|
'resource': AuthorizationBatchResponseAllowedResourcesInnerResource;
|
|
357
|
+
/**
|
|
358
|
+
*
|
|
359
|
+
* @type {Permissions}
|
|
360
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInner
|
|
361
|
+
*/
|
|
362
|
+
'action': Permissions;
|
|
351
363
|
}
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Principal that the action was checked for
|
|
368
|
+
* @export
|
|
369
|
+
* @interface AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
370
|
+
*/
|
|
371
|
+
export interface AuthorizationBatchResponseAllowedResourcesInnerPrincipal {
|
|
372
|
+
/**
|
|
373
|
+
*
|
|
374
|
+
* @type {string}
|
|
375
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
376
|
+
*/
|
|
377
|
+
'type': AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum;
|
|
378
|
+
/**
|
|
379
|
+
*
|
|
380
|
+
* @type {string}
|
|
381
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
382
|
+
*/
|
|
383
|
+
'id': string;
|
|
384
|
+
/**
|
|
385
|
+
*
|
|
386
|
+
* @type {string}
|
|
387
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
388
|
+
*/
|
|
389
|
+
'name'?: string;
|
|
390
|
+
/**
|
|
391
|
+
*
|
|
392
|
+
* @type {string}
|
|
393
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
394
|
+
*/
|
|
395
|
+
'email'?: string;
|
|
396
|
+
/**
|
|
397
|
+
*
|
|
398
|
+
* @type {string}
|
|
399
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
400
|
+
*/
|
|
401
|
+
'phone'?: string;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export const AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum = {
|
|
405
|
+
User: 'User',
|
|
406
|
+
Automation: 'Automation',
|
|
407
|
+
Kiosk: 'Kiosk',
|
|
408
|
+
Terminal: 'Terminal'
|
|
409
|
+
} as const;
|
|
410
|
+
|
|
411
|
+
export type AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum = typeof AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum[keyof typeof AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum];
|
|
412
|
+
|
|
352
413
|
/**
|
|
353
414
|
* @type AuthorizationBatchResponseAllowedResourcesInnerResource
|
|
354
415
|
* Resource that the action was checked for
|
|
@@ -356,6 +417,65 @@ export interface AuthorizationBatchResponseAllowedResourcesInner {
|
|
|
356
417
|
*/
|
|
357
418
|
export type AuthorizationBatchResponseAllowedResourcesInnerResource = AuthorizationRequestResourceOneOf | AuthorizationRequestResourceOneOf1 | AuthorizationRequestResourceOneOf2 | AuthorizationRequestResourceOneOf3;
|
|
358
419
|
|
|
420
|
+
/**
|
|
421
|
+
*
|
|
422
|
+
* @export
|
|
423
|
+
* @interface AuthorizationChecksBatchRequest
|
|
424
|
+
*/
|
|
425
|
+
export interface AuthorizationChecksBatchRequest {
|
|
426
|
+
/**
|
|
427
|
+
* Principal/resource/action tuples to check authorisation for
|
|
428
|
+
* @type {Array<AuthorizationChecksBatchRequestChecksInner>}
|
|
429
|
+
* @memberof AuthorizationChecksBatchRequest
|
|
430
|
+
*/
|
|
431
|
+
'checks': Array<AuthorizationChecksBatchRequestChecksInner>;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
*
|
|
435
|
+
* @export
|
|
436
|
+
* @interface AuthorizationChecksBatchRequestChecksInner
|
|
437
|
+
*/
|
|
438
|
+
export interface AuthorizationChecksBatchRequestChecksInner {
|
|
439
|
+
/**
|
|
440
|
+
*
|
|
441
|
+
* @type {AuthorizationRequestPrincipal}
|
|
442
|
+
* @memberof AuthorizationChecksBatchRequestChecksInner
|
|
443
|
+
*/
|
|
444
|
+
'principal': AuthorizationRequestPrincipal;
|
|
445
|
+
/**
|
|
446
|
+
*
|
|
447
|
+
* @type {AuthorizationRequestResource}
|
|
448
|
+
* @memberof AuthorizationChecksBatchRequestChecksInner
|
|
449
|
+
*/
|
|
450
|
+
'resource': AuthorizationRequestResource;
|
|
451
|
+
/**
|
|
452
|
+
*
|
|
453
|
+
* @type {Permissions}
|
|
454
|
+
* @memberof AuthorizationChecksBatchRequestChecksInner
|
|
455
|
+
*/
|
|
456
|
+
'action': Permissions;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
*
|
|
462
|
+
* @export
|
|
463
|
+
* @interface AuthorizationChecksBatchResponse
|
|
464
|
+
*/
|
|
465
|
+
export interface AuthorizationChecksBatchResponse {
|
|
466
|
+
/**
|
|
467
|
+
* Allowed principal/resource checks
|
|
468
|
+
* @type {Array<AuthorizationBatchResponseAllowedResourcesInner>}
|
|
469
|
+
* @memberof AuthorizationChecksBatchResponse
|
|
470
|
+
*/
|
|
471
|
+
'allowedResources': Array<AuthorizationBatchResponseAllowedResourcesInner>;
|
|
472
|
+
/**
|
|
473
|
+
* Denied principal/resource checks
|
|
474
|
+
* @type {Array<AuthorizationBatchResponseAllowedResourcesInner>}
|
|
475
|
+
* @memberof AuthorizationChecksBatchResponse
|
|
476
|
+
*/
|
|
477
|
+
'deniedResources': Array<AuthorizationBatchResponseAllowedResourcesInner>;
|
|
478
|
+
}
|
|
359
479
|
/**
|
|
360
480
|
* Request to check if a user is authorized to perform an action(s). If you pass in an array of permissions, you will receive a single allow / deny response (based on the checkMode - any or all of the permissions must be allowed).
|
|
361
481
|
* @export
|
|
@@ -584,6 +704,58 @@ export interface AuthorizationResponse {
|
|
|
584
704
|
*/
|
|
585
705
|
'policyIds': Array<string>;
|
|
586
706
|
}
|
|
707
|
+
/**
|
|
708
|
+
*
|
|
709
|
+
* @export
|
|
710
|
+
* @interface AuthorizeBatchChecks400Response
|
|
711
|
+
*/
|
|
712
|
+
export interface AuthorizeBatchChecks400Response {
|
|
713
|
+
/**
|
|
714
|
+
*
|
|
715
|
+
* @type {string}
|
|
716
|
+
* @memberof AuthorizeBatchChecks400Response
|
|
717
|
+
*/
|
|
718
|
+
'message': string;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
*
|
|
722
|
+
* @export
|
|
723
|
+
* @interface AuthorizeBatchChecks400ResponseAnyOf
|
|
724
|
+
*/
|
|
725
|
+
export interface AuthorizeBatchChecks400ResponseAnyOf {
|
|
726
|
+
/**
|
|
727
|
+
*
|
|
728
|
+
* @type {string}
|
|
729
|
+
* @memberof AuthorizeBatchChecks400ResponseAnyOf
|
|
730
|
+
*/
|
|
731
|
+
'message': string;
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
*
|
|
735
|
+
* @export
|
|
736
|
+
* @interface AuthorizeBatchChecks400ResponseAnyOfInner
|
|
737
|
+
*/
|
|
738
|
+
export interface AuthorizeBatchChecks400ResponseAnyOfInner {
|
|
739
|
+
/**
|
|
740
|
+
*
|
|
741
|
+
* @type {Array<AuthorizeBatchChecks400ResponseAnyOfInnerPathInner>}
|
|
742
|
+
* @memberof AuthorizeBatchChecks400ResponseAnyOfInner
|
|
743
|
+
*/
|
|
744
|
+
'path'?: Array<AuthorizeBatchChecks400ResponseAnyOfInnerPathInner>;
|
|
745
|
+
/**
|
|
746
|
+
*
|
|
747
|
+
* @type {string}
|
|
748
|
+
* @memberof AuthorizeBatchChecks400ResponseAnyOfInner
|
|
749
|
+
*/
|
|
750
|
+
'message': string;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
*
|
|
754
|
+
* @export
|
|
755
|
+
* @interface AuthorizeBatchChecks400ResponseAnyOfInnerPathInner
|
|
756
|
+
*/
|
|
757
|
+
export interface AuthorizeBatchChecks400ResponseAnyOfInnerPathInner {
|
|
758
|
+
}
|
|
587
759
|
/**
|
|
588
760
|
*
|
|
589
761
|
* @export
|
|
@@ -1845,7 +2017,8 @@ export const Permissions = {
|
|
|
1845
2017
|
ViewOwnPermissions: 'ViewOwnPermissions',
|
|
1846
2018
|
RoleAdmin: 'RoleAdmin',
|
|
1847
2019
|
RoleFactory: 'RoleFactory',
|
|
1848
|
-
RoleAuthDeveloper: 'RoleAuthDeveloper'
|
|
2020
|
+
RoleAuthDeveloper: 'RoleAuthDeveloper',
|
|
2021
|
+
RoleFlipdishStaff: 'RoleFlipdishStaff'
|
|
1849
2022
|
} as const;
|
|
1850
2023
|
|
|
1851
2024
|
export type Permissions = typeof Permissions[keyof typeof Permissions];
|
|
@@ -2329,7 +2502,8 @@ export interface RoleAssignmentSuccessResponse {
|
|
|
2329
2502
|
export const RoleNames = {
|
|
2330
2503
|
Admin: 'Admin',
|
|
2331
2504
|
Factory: 'Factory',
|
|
2332
|
-
AuthDeveloper: 'AuthDeveloper'
|
|
2505
|
+
AuthDeveloper: 'AuthDeveloper',
|
|
2506
|
+
FlipdishStaff: 'FlipdishStaff'
|
|
2333
2507
|
} as const;
|
|
2334
2508
|
|
|
2335
2509
|
export type RoleNames = typeof RoleNames[keyof typeof RoleNames];
|
|
@@ -2372,32 +2546,6 @@ export interface UpdateGlobalApiKeyRequest {
|
|
|
2372
2546
|
*/
|
|
2373
2547
|
'expiresAt'?: string;
|
|
2374
2548
|
}
|
|
2375
|
-
/**
|
|
2376
|
-
*
|
|
2377
|
-
* @export
|
|
2378
|
-
* @interface ValidationErrorsInner
|
|
2379
|
-
*/
|
|
2380
|
-
export interface ValidationErrorsInner {
|
|
2381
|
-
/**
|
|
2382
|
-
*
|
|
2383
|
-
* @type {Array<ValidationErrorsInnerPathInner>}
|
|
2384
|
-
* @memberof ValidationErrorsInner
|
|
2385
|
-
*/
|
|
2386
|
-
'path'?: Array<ValidationErrorsInnerPathInner>;
|
|
2387
|
-
/**
|
|
2388
|
-
*
|
|
2389
|
-
* @type {string}
|
|
2390
|
-
* @memberof ValidationErrorsInner
|
|
2391
|
-
*/
|
|
2392
|
-
'message': string;
|
|
2393
|
-
}
|
|
2394
|
-
/**
|
|
2395
|
-
*
|
|
2396
|
-
* @export
|
|
2397
|
-
* @interface ValidationErrorsInnerPathInner
|
|
2398
|
-
*/
|
|
2399
|
-
export interface ValidationErrorsInnerPathInner {
|
|
2400
|
-
}
|
|
2401
2549
|
|
|
2402
2550
|
/**
|
|
2403
2551
|
* APIKeysApi - axios parameter creator
|
|
@@ -3076,6 +3224,43 @@ export const AuthorizationApiAxiosParamCreator = function (configuration?: Confi
|
|
|
3076
3224
|
options: localVarRequestOptions,
|
|
3077
3225
|
};
|
|
3078
3226
|
},
|
|
3227
|
+
/**
|
|
3228
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
3229
|
+
* @summary Authorize Batch Checks Request
|
|
3230
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
3231
|
+
* @param {*} [options] Override http request option.
|
|
3232
|
+
* @throws {RequiredError}
|
|
3233
|
+
*/
|
|
3234
|
+
authorizeBatchChecks: async (authorizationChecksBatchRequest?: AuthorizationChecksBatchRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3235
|
+
const localVarPath = `/authorize/batch/checks`;
|
|
3236
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3237
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3238
|
+
let baseOptions;
|
|
3239
|
+
if (configuration) {
|
|
3240
|
+
baseOptions = configuration.baseOptions;
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3244
|
+
const localVarHeaderParameter = {} as any;
|
|
3245
|
+
const localVarQueryParameter = {} as any;
|
|
3246
|
+
|
|
3247
|
+
// authentication ApiKeyAuth required
|
|
3248
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
3249
|
+
|
|
3250
|
+
|
|
3251
|
+
|
|
3252
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3253
|
+
|
|
3254
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3255
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3256
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3257
|
+
localVarRequestOptions.data = serializeDataIfNeeded(authorizationChecksBatchRequest, localVarRequestOptions, configuration)
|
|
3258
|
+
|
|
3259
|
+
return {
|
|
3260
|
+
url: toPathString(localVarUrlObj),
|
|
3261
|
+
options: localVarRequestOptions,
|
|
3262
|
+
};
|
|
3263
|
+
},
|
|
3079
3264
|
/**
|
|
3080
3265
|
* Check if a user is in any/all of the roles
|
|
3081
3266
|
* @summary Check Is In Role
|
|
@@ -3175,6 +3360,19 @@ export const AuthorizationApiFp = function(configuration?: Configuration) {
|
|
|
3175
3360
|
const localVarOperationServerBasePath = operationServerMap['AuthorizationApi.authorizeBatch']?.[localVarOperationServerIndex]?.url;
|
|
3176
3361
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3177
3362
|
},
|
|
3363
|
+
/**
|
|
3364
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
3365
|
+
* @summary Authorize Batch Checks Request
|
|
3366
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
3367
|
+
* @param {*} [options] Override http request option.
|
|
3368
|
+
* @throws {RequiredError}
|
|
3369
|
+
*/
|
|
3370
|
+
async authorizeBatchChecks(authorizationChecksBatchRequest?: AuthorizationChecksBatchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthorizationChecksBatchResponse>> {
|
|
3371
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.authorizeBatchChecks(authorizationChecksBatchRequest, options);
|
|
3372
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3373
|
+
const localVarOperationServerBasePath = operationServerMap['AuthorizationApi.authorizeBatchChecks']?.[localVarOperationServerIndex]?.url;
|
|
3374
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3375
|
+
},
|
|
3178
3376
|
/**
|
|
3179
3377
|
* Check if a user is in any/all of the roles
|
|
3180
3378
|
* @summary Check Is In Role
|
|
@@ -3238,6 +3436,16 @@ export const AuthorizationApiFactory = function (configuration?: Configuration,
|
|
|
3238
3436
|
authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationBatchResponse> {
|
|
3239
3437
|
return localVarFp.authorizeBatch(authorizationBatchRequest, options).then((request) => request(axios, basePath));
|
|
3240
3438
|
},
|
|
3439
|
+
/**
|
|
3440
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
3441
|
+
* @summary Authorize Batch Checks Request
|
|
3442
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
3443
|
+
* @param {*} [options] Override http request option.
|
|
3444
|
+
* @throws {RequiredError}
|
|
3445
|
+
*/
|
|
3446
|
+
authorizeBatchChecks(authorizationChecksBatchRequest?: AuthorizationChecksBatchRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationChecksBatchResponse> {
|
|
3447
|
+
return localVarFp.authorizeBatchChecks(authorizationChecksBatchRequest, options).then((request) => request(axios, basePath));
|
|
3448
|
+
},
|
|
3241
3449
|
/**
|
|
3242
3450
|
* Check if a user is in any/all of the roles
|
|
3243
3451
|
* @summary Check Is In Role
|
|
@@ -3306,6 +3514,18 @@ export class AuthorizationApi extends BaseAPI {
|
|
|
3306
3514
|
return AuthorizationApiFp(this.configuration).authorizeBatch(authorizationBatchRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3307
3515
|
}
|
|
3308
3516
|
|
|
3517
|
+
/**
|
|
3518
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
3519
|
+
* @summary Authorize Batch Checks Request
|
|
3520
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
3521
|
+
* @param {*} [options] Override http request option.
|
|
3522
|
+
* @throws {RequiredError}
|
|
3523
|
+
* @memberof AuthorizationApi
|
|
3524
|
+
*/
|
|
3525
|
+
public authorizeBatchChecks(authorizationChecksBatchRequest?: AuthorizationChecksBatchRequest, options?: RawAxiosRequestConfig) {
|
|
3526
|
+
return AuthorizationApiFp(this.configuration).authorizeBatchChecks(authorizationChecksBatchRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3309
3529
|
/**
|
|
3310
3530
|
* Check if a user is in any/all of the roles
|
|
3311
3531
|
* @summary Check Is In Role
|
package/configuration.ts
CHANGED
|
@@ -100,7 +100,7 @@ export class Configuration {
|
|
|
100
100
|
|
|
101
101
|
const extraHeaders = param.useDefaultUserAgent ? {} : {
|
|
102
102
|
headers: {
|
|
103
|
-
"user-agent": "Flipdish authorization typescript SDK / 0.2.
|
|
103
|
+
"user-agent": "Flipdish authorization typescript SDK / 0.2.51"
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
|
package/dist/api.d.ts
CHANGED
|
@@ -324,19 +324,132 @@ export interface AuthorizationBatchResponseAllowedResourcesInner {
|
|
|
324
324
|
* @memberof AuthorizationBatchResponseAllowedResourcesInner
|
|
325
325
|
*/
|
|
326
326
|
'policyIds': Array<string>;
|
|
327
|
+
/**
|
|
328
|
+
*
|
|
329
|
+
* @type {AuthorizationBatchResponseAllowedResourcesInnerPrincipal}
|
|
330
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInner
|
|
331
|
+
*/
|
|
332
|
+
'principal': AuthorizationBatchResponseAllowedResourcesInnerPrincipal;
|
|
327
333
|
/**
|
|
328
334
|
*
|
|
329
335
|
* @type {AuthorizationBatchResponseAllowedResourcesInnerResource}
|
|
330
336
|
* @memberof AuthorizationBatchResponseAllowedResourcesInner
|
|
331
337
|
*/
|
|
332
338
|
'resource': AuthorizationBatchResponseAllowedResourcesInnerResource;
|
|
339
|
+
/**
|
|
340
|
+
*
|
|
341
|
+
* @type {Permissions}
|
|
342
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInner
|
|
343
|
+
*/
|
|
344
|
+
'action': Permissions;
|
|
333
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Principal that the action was checked for
|
|
348
|
+
* @export
|
|
349
|
+
* @interface AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
350
|
+
*/
|
|
351
|
+
export interface AuthorizationBatchResponseAllowedResourcesInnerPrincipal {
|
|
352
|
+
/**
|
|
353
|
+
*
|
|
354
|
+
* @type {string}
|
|
355
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
356
|
+
*/
|
|
357
|
+
'type': AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum;
|
|
358
|
+
/**
|
|
359
|
+
*
|
|
360
|
+
* @type {string}
|
|
361
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
362
|
+
*/
|
|
363
|
+
'id': string;
|
|
364
|
+
/**
|
|
365
|
+
*
|
|
366
|
+
* @type {string}
|
|
367
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
368
|
+
*/
|
|
369
|
+
'name'?: string;
|
|
370
|
+
/**
|
|
371
|
+
*
|
|
372
|
+
* @type {string}
|
|
373
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
374
|
+
*/
|
|
375
|
+
'email'?: string;
|
|
376
|
+
/**
|
|
377
|
+
*
|
|
378
|
+
* @type {string}
|
|
379
|
+
* @memberof AuthorizationBatchResponseAllowedResourcesInnerPrincipal
|
|
380
|
+
*/
|
|
381
|
+
'phone'?: string;
|
|
382
|
+
}
|
|
383
|
+
export declare const AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum: {
|
|
384
|
+
readonly User: "User";
|
|
385
|
+
readonly Automation: "Automation";
|
|
386
|
+
readonly Kiosk: "Kiosk";
|
|
387
|
+
readonly Terminal: "Terminal";
|
|
388
|
+
};
|
|
389
|
+
export type AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum = typeof AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum[keyof typeof AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum];
|
|
334
390
|
/**
|
|
335
391
|
* @type AuthorizationBatchResponseAllowedResourcesInnerResource
|
|
336
392
|
* Resource that the action was checked for
|
|
337
393
|
* @export
|
|
338
394
|
*/
|
|
339
395
|
export type AuthorizationBatchResponseAllowedResourcesInnerResource = AuthorizationRequestResourceOneOf | AuthorizationRequestResourceOneOf1 | AuthorizationRequestResourceOneOf2 | AuthorizationRequestResourceOneOf3;
|
|
396
|
+
/**
|
|
397
|
+
*
|
|
398
|
+
* @export
|
|
399
|
+
* @interface AuthorizationChecksBatchRequest
|
|
400
|
+
*/
|
|
401
|
+
export interface AuthorizationChecksBatchRequest {
|
|
402
|
+
/**
|
|
403
|
+
* Principal/resource/action tuples to check authorisation for
|
|
404
|
+
* @type {Array<AuthorizationChecksBatchRequestChecksInner>}
|
|
405
|
+
* @memberof AuthorizationChecksBatchRequest
|
|
406
|
+
*/
|
|
407
|
+
'checks': Array<AuthorizationChecksBatchRequestChecksInner>;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
*
|
|
411
|
+
* @export
|
|
412
|
+
* @interface AuthorizationChecksBatchRequestChecksInner
|
|
413
|
+
*/
|
|
414
|
+
export interface AuthorizationChecksBatchRequestChecksInner {
|
|
415
|
+
/**
|
|
416
|
+
*
|
|
417
|
+
* @type {AuthorizationRequestPrincipal}
|
|
418
|
+
* @memberof AuthorizationChecksBatchRequestChecksInner
|
|
419
|
+
*/
|
|
420
|
+
'principal': AuthorizationRequestPrincipal;
|
|
421
|
+
/**
|
|
422
|
+
*
|
|
423
|
+
* @type {AuthorizationRequestResource}
|
|
424
|
+
* @memberof AuthorizationChecksBatchRequestChecksInner
|
|
425
|
+
*/
|
|
426
|
+
'resource': AuthorizationRequestResource;
|
|
427
|
+
/**
|
|
428
|
+
*
|
|
429
|
+
* @type {Permissions}
|
|
430
|
+
* @memberof AuthorizationChecksBatchRequestChecksInner
|
|
431
|
+
*/
|
|
432
|
+
'action': Permissions;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
*
|
|
436
|
+
* @export
|
|
437
|
+
* @interface AuthorizationChecksBatchResponse
|
|
438
|
+
*/
|
|
439
|
+
export interface AuthorizationChecksBatchResponse {
|
|
440
|
+
/**
|
|
441
|
+
* Allowed principal/resource checks
|
|
442
|
+
* @type {Array<AuthorizationBatchResponseAllowedResourcesInner>}
|
|
443
|
+
* @memberof AuthorizationChecksBatchResponse
|
|
444
|
+
*/
|
|
445
|
+
'allowedResources': Array<AuthorizationBatchResponseAllowedResourcesInner>;
|
|
446
|
+
/**
|
|
447
|
+
* Denied principal/resource checks
|
|
448
|
+
* @type {Array<AuthorizationBatchResponseAllowedResourcesInner>}
|
|
449
|
+
* @memberof AuthorizationChecksBatchResponse
|
|
450
|
+
*/
|
|
451
|
+
'deniedResources': Array<AuthorizationBatchResponseAllowedResourcesInner>;
|
|
452
|
+
}
|
|
340
453
|
/**
|
|
341
454
|
* Request to check if a user is authorized to perform an action(s). If you pass in an array of permissions, you will receive a single allow / deny response (based on the checkMode - any or all of the permissions must be allowed).
|
|
342
455
|
* @export
|
|
@@ -546,6 +659,58 @@ export interface AuthorizationResponse {
|
|
|
546
659
|
*/
|
|
547
660
|
'policyIds': Array<string>;
|
|
548
661
|
}
|
|
662
|
+
/**
|
|
663
|
+
*
|
|
664
|
+
* @export
|
|
665
|
+
* @interface AuthorizeBatchChecks400Response
|
|
666
|
+
*/
|
|
667
|
+
export interface AuthorizeBatchChecks400Response {
|
|
668
|
+
/**
|
|
669
|
+
*
|
|
670
|
+
* @type {string}
|
|
671
|
+
* @memberof AuthorizeBatchChecks400Response
|
|
672
|
+
*/
|
|
673
|
+
'message': string;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
*
|
|
677
|
+
* @export
|
|
678
|
+
* @interface AuthorizeBatchChecks400ResponseAnyOf
|
|
679
|
+
*/
|
|
680
|
+
export interface AuthorizeBatchChecks400ResponseAnyOf {
|
|
681
|
+
/**
|
|
682
|
+
*
|
|
683
|
+
* @type {string}
|
|
684
|
+
* @memberof AuthorizeBatchChecks400ResponseAnyOf
|
|
685
|
+
*/
|
|
686
|
+
'message': string;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
*
|
|
690
|
+
* @export
|
|
691
|
+
* @interface AuthorizeBatchChecks400ResponseAnyOfInner
|
|
692
|
+
*/
|
|
693
|
+
export interface AuthorizeBatchChecks400ResponseAnyOfInner {
|
|
694
|
+
/**
|
|
695
|
+
*
|
|
696
|
+
* @type {Array<AuthorizeBatchChecks400ResponseAnyOfInnerPathInner>}
|
|
697
|
+
* @memberof AuthorizeBatchChecks400ResponseAnyOfInner
|
|
698
|
+
*/
|
|
699
|
+
'path'?: Array<AuthorizeBatchChecks400ResponseAnyOfInnerPathInner>;
|
|
700
|
+
/**
|
|
701
|
+
*
|
|
702
|
+
* @type {string}
|
|
703
|
+
* @memberof AuthorizeBatchChecks400ResponseAnyOfInner
|
|
704
|
+
*/
|
|
705
|
+
'message': string;
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
*
|
|
709
|
+
* @export
|
|
710
|
+
* @interface AuthorizeBatchChecks400ResponseAnyOfInnerPathInner
|
|
711
|
+
*/
|
|
712
|
+
export interface AuthorizeBatchChecks400ResponseAnyOfInnerPathInner {
|
|
713
|
+
}
|
|
549
714
|
/**
|
|
550
715
|
*
|
|
551
716
|
* @export
|
|
@@ -1778,6 +1943,7 @@ export declare const Permissions: {
|
|
|
1778
1943
|
readonly RoleAdmin: "RoleAdmin";
|
|
1779
1944
|
readonly RoleFactory: "RoleFactory";
|
|
1780
1945
|
readonly RoleAuthDeveloper: "RoleAuthDeveloper";
|
|
1946
|
+
readonly RoleFlipdishStaff: "RoleFlipdishStaff";
|
|
1781
1947
|
};
|
|
1782
1948
|
export type Permissions = typeof Permissions[keyof typeof Permissions];
|
|
1783
1949
|
/**
|
|
@@ -2240,6 +2406,7 @@ export declare const RoleNames: {
|
|
|
2240
2406
|
readonly Admin: "Admin";
|
|
2241
2407
|
readonly Factory: "Factory";
|
|
2242
2408
|
readonly AuthDeveloper: "AuthDeveloper";
|
|
2409
|
+
readonly FlipdishStaff: "FlipdishStaff";
|
|
2243
2410
|
};
|
|
2244
2411
|
export type RoleNames = typeof RoleNames[keyof typeof RoleNames];
|
|
2245
2412
|
/**
|
|
@@ -2279,32 +2446,6 @@ export interface UpdateGlobalApiKeyRequest {
|
|
|
2279
2446
|
*/
|
|
2280
2447
|
'expiresAt'?: string;
|
|
2281
2448
|
}
|
|
2282
|
-
/**
|
|
2283
|
-
*
|
|
2284
|
-
* @export
|
|
2285
|
-
* @interface ValidationErrorsInner
|
|
2286
|
-
*/
|
|
2287
|
-
export interface ValidationErrorsInner {
|
|
2288
|
-
/**
|
|
2289
|
-
*
|
|
2290
|
-
* @type {Array<ValidationErrorsInnerPathInner>}
|
|
2291
|
-
* @memberof ValidationErrorsInner
|
|
2292
|
-
*/
|
|
2293
|
-
'path'?: Array<ValidationErrorsInnerPathInner>;
|
|
2294
|
-
/**
|
|
2295
|
-
*
|
|
2296
|
-
* @type {string}
|
|
2297
|
-
* @memberof ValidationErrorsInner
|
|
2298
|
-
*/
|
|
2299
|
-
'message': string;
|
|
2300
|
-
}
|
|
2301
|
-
/**
|
|
2302
|
-
*
|
|
2303
|
-
* @export
|
|
2304
|
-
* @interface ValidationErrorsInnerPathInner
|
|
2305
|
-
*/
|
|
2306
|
-
export interface ValidationErrorsInnerPathInner {
|
|
2307
|
-
}
|
|
2308
2449
|
/**
|
|
2309
2450
|
* APIKeysApi - axios parameter creator
|
|
2310
2451
|
* @export
|
|
@@ -2600,6 +2741,14 @@ export declare const AuthorizationApiAxiosParamCreator: (configuration?: Configu
|
|
|
2600
2741
|
* @throws {RequiredError}
|
|
2601
2742
|
*/
|
|
2602
2743
|
authorizeBatch: (authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2744
|
+
/**
|
|
2745
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
2746
|
+
* @summary Authorize Batch Checks Request
|
|
2747
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
2748
|
+
* @param {*} [options] Override http request option.
|
|
2749
|
+
* @throws {RequiredError}
|
|
2750
|
+
*/
|
|
2751
|
+
authorizeBatchChecks: (authorizationChecksBatchRequest?: AuthorizationChecksBatchRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2603
2752
|
/**
|
|
2604
2753
|
* Check if a user is in any/all of the roles
|
|
2605
2754
|
* @summary Check Is In Role
|
|
@@ -2646,6 +2795,14 @@ export declare const AuthorizationApiFp: (configuration?: Configuration) => {
|
|
|
2646
2795
|
* @throws {RequiredError}
|
|
2647
2796
|
*/
|
|
2648
2797
|
authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthorizationBatchResponse>>;
|
|
2798
|
+
/**
|
|
2799
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
2800
|
+
* @summary Authorize Batch Checks Request
|
|
2801
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
2802
|
+
* @param {*} [options] Override http request option.
|
|
2803
|
+
* @throws {RequiredError}
|
|
2804
|
+
*/
|
|
2805
|
+
authorizeBatchChecks(authorizationChecksBatchRequest?: AuthorizationChecksBatchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthorizationChecksBatchResponse>>;
|
|
2649
2806
|
/**
|
|
2650
2807
|
* Check if a user is in any/all of the roles
|
|
2651
2808
|
* @summary Check Is In Role
|
|
@@ -2692,6 +2849,14 @@ export declare const AuthorizationApiFactory: (configuration?: Configuration, ba
|
|
|
2692
2849
|
* @throws {RequiredError}
|
|
2693
2850
|
*/
|
|
2694
2851
|
authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationBatchResponse>;
|
|
2852
|
+
/**
|
|
2853
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
2854
|
+
* @summary Authorize Batch Checks Request
|
|
2855
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
2856
|
+
* @param {*} [options] Override http request option.
|
|
2857
|
+
* @throws {RequiredError}
|
|
2858
|
+
*/
|
|
2859
|
+
authorizeBatchChecks(authorizationChecksBatchRequest?: AuthorizationChecksBatchRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationChecksBatchResponse>;
|
|
2695
2860
|
/**
|
|
2696
2861
|
* Check if a user is in any/all of the roles
|
|
2697
2862
|
* @summary Check Is In Role
|
|
@@ -2744,6 +2909,15 @@ export declare class AuthorizationApi extends BaseAPI {
|
|
|
2744
2909
|
* @memberof AuthorizationApi
|
|
2745
2910
|
*/
|
|
2746
2911
|
authorizeBatch(authorizationBatchRequest?: AuthorizationBatchRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthorizationBatchResponse, any, {}, any>>;
|
|
2912
|
+
/**
|
|
2913
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
2914
|
+
* @summary Authorize Batch Checks Request
|
|
2915
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
2916
|
+
* @param {*} [options] Override http request option.
|
|
2917
|
+
* @throws {RequiredError}
|
|
2918
|
+
* @memberof AuthorizationApi
|
|
2919
|
+
*/
|
|
2920
|
+
authorizeBatchChecks(authorizationChecksBatchRequest?: AuthorizationChecksBatchRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthorizationChecksBatchResponse, any, {}, any>>;
|
|
2747
2921
|
/**
|
|
2748
2922
|
* Check if a user is in any/all of the roles
|
|
2749
2923
|
* @summary Check Is In Role
|
package/dist/api.js
CHANGED
|
@@ -84,8 +84,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
84
84
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
85
|
};
|
|
86
86
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
|
-
exports.
|
|
88
|
-
exports.UserPermissionsApi = exports.UserPermissionsApiFactory = exports.UserPermissionsApiFp = exports.UserPermissionsApiAxiosParamCreator = exports.UserManagementApi = exports.UserManagementApiFactory = exports.UserManagementApiFp = exports.UserManagementApiAxiosParamCreator = exports.RoleAssignmentApi = exports.RoleAssignmentApiFactory = exports.RoleAssignmentApiFp = exports.RoleAssignmentApiAxiosParamCreator = exports.JoinAccessApi = exports.JoinAccessApiFactory = exports.JoinAccessApiFp = exports.JoinAccessApiAxiosParamCreator = void 0;
|
|
87
|
+
exports.ConfigurationDataApiFactory = exports.ConfigurationDataApiFp = exports.ConfigurationDataApiAxiosParamCreator = exports.AuthorizedEntitiesApi = exports.AuthorizedEntitiesApiFactory = exports.AuthorizedEntitiesApiFp = exports.AuthorizedEntitiesApiAxiosParamCreator = exports.AuthorizationApi = exports.AuthorizationApiFactory = exports.AuthorizationApiFp = exports.AuthorizationApiAxiosParamCreator = exports.AuthenticationApi = exports.AuthenticationApiFactory = exports.AuthenticationApiFp = exports.AuthenticationApiAxiosParamCreator = exports.ListGlobalApiKeysStatusEnum = exports.APIKeysApi = exports.APIKeysApiFactory = exports.APIKeysApiFp = exports.APIKeysApiAxiosParamCreator = exports.RoleNames = exports.RoleAssignmentRequestBodyPrincipalTypeEnum = exports.RoleAssignmentRequestBodyActorTypeEnum = exports.RoleAssignmentRequestBodyRoleNameEnum = exports.RemoveTeammateRequestBodyPrincipalTypeEnum = exports.RemoveTeammateRequestBodyActorTypeEnum = exports.PrincipalInOrgTypeEnum = exports.Permissions = exports.ListOrgRolesSuccessResponseValueRolesEnum = exports.JoinAccessErrorResponseCodeEnum = exports.IsInRoleRequestCheckModeEnum = exports.InviteTokenResponseRoleNameEnum = exports.GlobalApiKeyStateResponseUpdatedStatusEnum = exports.GlobalApiKeyStateResponseRevokedStatusEnum = exports.GlobalApiKeyStateResponseStatusEnum = exports.GetUserPermissionsSuccessResponseResourcesValueResourceTypeEnum = exports.GetJoinAccessRequest200ResponseRoleNameEnum = exports.GetJoinAccessRequest200ResponseStateEnum = exports.GetAuthorizedOrgsRequestPrincipalTypeEnum = exports.AuthorizationRequestResourceOneOf3TypeEnum = exports.AuthorizationRequestResourceOneOf2TypeEnum = exports.AuthorizationRequestResourceOneOf1TypeEnum = exports.AuthorizationRequestResourceOneOfTypeEnum = exports.AuthorizationRequestPrincipalTypeEnum = exports.AuthorizationRequestCheckModeEnum = exports.AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum = exports.AuthenticateAndCheckIsInRoleRequestCheckModeEnum = exports.AuthenticateAndAuthorizeRequestCheckModeEnum = exports.AccessRequestResponseRoleNameEnum = exports.AccessRequestResponseStateEnum = void 0;
|
|
88
|
+
exports.UserPermissionsApi = exports.UserPermissionsApiFactory = exports.UserPermissionsApiFp = exports.UserPermissionsApiAxiosParamCreator = exports.UserManagementApi = exports.UserManagementApiFactory = exports.UserManagementApiFp = exports.UserManagementApiAxiosParamCreator = exports.RoleAssignmentApi = exports.RoleAssignmentApiFactory = exports.RoleAssignmentApiFp = exports.RoleAssignmentApiAxiosParamCreator = exports.JoinAccessApi = exports.JoinAccessApiFactory = exports.JoinAccessApiFp = exports.JoinAccessApiAxiosParamCreator = exports.ConfigurationDataApi = void 0;
|
|
89
89
|
var axios_1 = require("axios");
|
|
90
90
|
// Some imports not used depending on template conditions
|
|
91
91
|
// @ts-ignore
|
|
@@ -117,6 +117,12 @@ exports.AuthenticateAndCheckIsInRoleRequestCheckModeEnum = {
|
|
|
117
117
|
Any: 'any',
|
|
118
118
|
All: 'all'
|
|
119
119
|
};
|
|
120
|
+
exports.AuthorizationBatchResponseAllowedResourcesInnerPrincipalTypeEnum = {
|
|
121
|
+
User: 'User',
|
|
122
|
+
Automation: 'Automation',
|
|
123
|
+
Kiosk: 'Kiosk',
|
|
124
|
+
Terminal: 'Terminal'
|
|
125
|
+
};
|
|
120
126
|
exports.AuthorizationRequestCheckModeEnum = {
|
|
121
127
|
Any: 'any',
|
|
122
128
|
All: 'all'
|
|
@@ -449,7 +455,8 @@ exports.Permissions = {
|
|
|
449
455
|
ViewOwnPermissions: 'ViewOwnPermissions',
|
|
450
456
|
RoleAdmin: 'RoleAdmin',
|
|
451
457
|
RoleFactory: 'RoleFactory',
|
|
452
|
-
RoleAuthDeveloper: 'RoleAuthDeveloper'
|
|
458
|
+
RoleAuthDeveloper: 'RoleAuthDeveloper',
|
|
459
|
+
RoleFlipdishStaff: 'RoleFlipdishStaff'
|
|
453
460
|
};
|
|
454
461
|
exports.PrincipalInOrgTypeEnum = {
|
|
455
462
|
User: 'User',
|
|
@@ -500,7 +507,8 @@ exports.RoleAssignmentRequestBodyPrincipalTypeEnum = {
|
|
|
500
507
|
exports.RoleNames = {
|
|
501
508
|
Admin: 'Admin',
|
|
502
509
|
Factory: 'Factory',
|
|
503
|
-
AuthDeveloper: 'AuthDeveloper'
|
|
510
|
+
AuthDeveloper: 'AuthDeveloper',
|
|
511
|
+
FlipdishStaff: 'FlipdishStaff'
|
|
504
512
|
};
|
|
505
513
|
/**
|
|
506
514
|
* APIKeysApi - axios parameter creator
|
|
@@ -1321,6 +1329,50 @@ var AuthorizationApiAxiosParamCreator = function (configuration) {
|
|
|
1321
1329
|
});
|
|
1322
1330
|
});
|
|
1323
1331
|
},
|
|
1332
|
+
/**
|
|
1333
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
1334
|
+
* @summary Authorize Batch Checks Request
|
|
1335
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
1336
|
+
* @param {*} [options] Override http request option.
|
|
1337
|
+
* @throws {RequiredError}
|
|
1338
|
+
*/
|
|
1339
|
+
authorizeBatchChecks: function (authorizationChecksBatchRequest_1) {
|
|
1340
|
+
var args_1 = [];
|
|
1341
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1342
|
+
args_1[_i - 1] = arguments[_i];
|
|
1343
|
+
}
|
|
1344
|
+
return __awaiter(_this, __spreadArray([authorizationChecksBatchRequest_1], args_1, true), void 0, function (authorizationChecksBatchRequest, options) {
|
|
1345
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1346
|
+
if (options === void 0) { options = {}; }
|
|
1347
|
+
return __generator(this, function (_a) {
|
|
1348
|
+
switch (_a.label) {
|
|
1349
|
+
case 0:
|
|
1350
|
+
localVarPath = "/authorize/batch/checks";
|
|
1351
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1352
|
+
if (configuration) {
|
|
1353
|
+
baseOptions = configuration.baseOptions;
|
|
1354
|
+
}
|
|
1355
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
1356
|
+
localVarHeaderParameter = {};
|
|
1357
|
+
localVarQueryParameter = {};
|
|
1358
|
+
// authentication ApiKeyAuth required
|
|
1359
|
+
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
1360
|
+
case 1:
|
|
1361
|
+
// authentication ApiKeyAuth required
|
|
1362
|
+
_a.sent();
|
|
1363
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1364
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1365
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1366
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1367
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(authorizationChecksBatchRequest, localVarRequestOptions, configuration);
|
|
1368
|
+
return [2 /*return*/, {
|
|
1369
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1370
|
+
options: localVarRequestOptions,
|
|
1371
|
+
}];
|
|
1372
|
+
}
|
|
1373
|
+
});
|
|
1374
|
+
});
|
|
1375
|
+
},
|
|
1324
1376
|
/**
|
|
1325
1377
|
* Check if a user is in any/all of the roles
|
|
1326
1378
|
* @summary Check Is In Role
|
|
@@ -1467,6 +1519,29 @@ var AuthorizationApiFp = function (configuration) {
|
|
|
1467
1519
|
});
|
|
1468
1520
|
});
|
|
1469
1521
|
},
|
|
1522
|
+
/**
|
|
1523
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
1524
|
+
* @summary Authorize Batch Checks Request
|
|
1525
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
1526
|
+
* @param {*} [options] Override http request option.
|
|
1527
|
+
* @throws {RequiredError}
|
|
1528
|
+
*/
|
|
1529
|
+
authorizeBatchChecks: function (authorizationChecksBatchRequest, options) {
|
|
1530
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1531
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1532
|
+
var _a, _b, _c;
|
|
1533
|
+
return __generator(this, function (_d) {
|
|
1534
|
+
switch (_d.label) {
|
|
1535
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.authorizeBatchChecks(authorizationChecksBatchRequest, options)];
|
|
1536
|
+
case 1:
|
|
1537
|
+
localVarAxiosArgs = _d.sent();
|
|
1538
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1539
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthorizationApi.authorizeBatchChecks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1540
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1541
|
+
}
|
|
1542
|
+
});
|
|
1543
|
+
});
|
|
1544
|
+
},
|
|
1470
1545
|
/**
|
|
1471
1546
|
* Check if a user is in any/all of the roles
|
|
1472
1547
|
* @summary Check Is In Role
|
|
@@ -1540,6 +1615,16 @@ var AuthorizationApiFactory = function (configuration, basePath, axios) {
|
|
|
1540
1615
|
authorizeBatch: function (authorizationBatchRequest, options) {
|
|
1541
1616
|
return localVarFp.authorizeBatch(authorizationBatchRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1542
1617
|
},
|
|
1618
|
+
/**
|
|
1619
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
1620
|
+
* @summary Authorize Batch Checks Request
|
|
1621
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
1622
|
+
* @param {*} [options] Override http request option.
|
|
1623
|
+
* @throws {RequiredError}
|
|
1624
|
+
*/
|
|
1625
|
+
authorizeBatchChecks: function (authorizationChecksBatchRequest, options) {
|
|
1626
|
+
return localVarFp.authorizeBatchChecks(authorizationChecksBatchRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1627
|
+
},
|
|
1543
1628
|
/**
|
|
1544
1629
|
* Check if a user is in any/all of the roles
|
|
1545
1630
|
* @summary Check Is In Role
|
|
@@ -1612,6 +1697,18 @@ var AuthorizationApi = /** @class */ (function (_super) {
|
|
|
1612
1697
|
var _this = this;
|
|
1613
1698
|
return (0, exports.AuthorizationApiFp)(this.configuration).authorizeBatch(authorizationBatchRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1614
1699
|
};
|
|
1700
|
+
/**
|
|
1701
|
+
* Check whether each principal/resource/action tuple is authorized
|
|
1702
|
+
* @summary Authorize Batch Checks Request
|
|
1703
|
+
* @param {AuthorizationChecksBatchRequest} [authorizationChecksBatchRequest]
|
|
1704
|
+
* @param {*} [options] Override http request option.
|
|
1705
|
+
* @throws {RequiredError}
|
|
1706
|
+
* @memberof AuthorizationApi
|
|
1707
|
+
*/
|
|
1708
|
+
AuthorizationApi.prototype.authorizeBatchChecks = function (authorizationChecksBatchRequest, options) {
|
|
1709
|
+
var _this = this;
|
|
1710
|
+
return (0, exports.AuthorizationApiFp)(this.configuration).authorizeBatchChecks(authorizationChecksBatchRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1711
|
+
};
|
|
1615
1712
|
/**
|
|
1616
1713
|
* Check if a user is in any/all of the roles
|
|
1617
1714
|
* @summary Check Is In Role
|
package/dist/configuration.js
CHANGED
|
@@ -36,7 +36,7 @@ var Configuration = /** @class */ (function () {
|
|
|
36
36
|
this.serverIndex = param.serverIndex;
|
|
37
37
|
var extraHeaders = param.useDefaultUserAgent ? {} : {
|
|
38
38
|
headers: {
|
|
39
|
-
"user-agent": "Flipdish authorization typescript SDK / 0.2.
|
|
39
|
+
"user-agent": "Flipdish authorization typescript SDK / 0.2.51"
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
this.baseOptions = __assign(__assign({}, extraHeaders), param.baseOptions);
|