@flipdish/authorization 0.2.32 → 0.2.33
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 +431 -0
- package/configuration.ts +1 -1
- package/dist/api.d.ts +293 -0
- package/dist/api.js +318 -1
- package/dist/configuration.js +1 -1
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -1009,6 +1009,61 @@ export type GetUserPermissionsSuccessResponseResourcesValueResourceTypeEnum = ty
|
|
|
1009
1009
|
*/
|
|
1010
1010
|
export interface GetUserPermissionsSuccessResponseResourcesValueResourceId {
|
|
1011
1011
|
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Grant teammate app access to a user being assigned within a brand for the first time.
|
|
1014
|
+
* @export
|
|
1015
|
+
* @interface GrantTeammateAccessRequestBody
|
|
1016
|
+
*/
|
|
1017
|
+
export interface GrantTeammateAccessRequestBody {
|
|
1018
|
+
/**
|
|
1019
|
+
* Teammate app access level (role)
|
|
1020
|
+
* @type {string}
|
|
1021
|
+
* @memberof GrantTeammateAccessRequestBody
|
|
1022
|
+
*/
|
|
1023
|
+
'appAccessLevel': GrantTeammateAccessRequestBodyAppAccessLevelEnum;
|
|
1024
|
+
/**
|
|
1025
|
+
* Brand identifier (AppId); normalized to lowercase when stored
|
|
1026
|
+
* @type {string}
|
|
1027
|
+
* @memberof GrantTeammateAccessRequestBody
|
|
1028
|
+
*/
|
|
1029
|
+
'brandId': string;
|
|
1030
|
+
/**
|
|
1031
|
+
* Org-wide store access; when false, propertyIds are required for property-scoped roles
|
|
1032
|
+
* @type {boolean}
|
|
1033
|
+
* @memberof GrantTeammateAccessRequestBody
|
|
1034
|
+
*/
|
|
1035
|
+
'hasAccessToAllStores': boolean;
|
|
1036
|
+
/**
|
|
1037
|
+
* Property resource ids (e.g. p123) when scoped to properties
|
|
1038
|
+
* @type {Array<string>}
|
|
1039
|
+
* @memberof GrantTeammateAccessRequestBody
|
|
1040
|
+
*/
|
|
1041
|
+
'propertyIds'?: Array<string>;
|
|
1042
|
+
/**
|
|
1043
|
+
* Target user email; persisted on first assignment only
|
|
1044
|
+
* @type {string}
|
|
1045
|
+
* @memberof GrantTeammateAccessRequestBody
|
|
1046
|
+
*/
|
|
1047
|
+
'userEmail': string;
|
|
1048
|
+
/**
|
|
1049
|
+
* Target user display name; persisted on first assignment only
|
|
1050
|
+
* @type {string}
|
|
1051
|
+
* @memberof GrantTeammateAccessRequestBody
|
|
1052
|
+
*/
|
|
1053
|
+
'userName'?: string;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
export const GrantTeammateAccessRequestBodyAppAccessLevelEnum = {
|
|
1057
|
+
Owner: 'Owner',
|
|
1058
|
+
ManagedOwner: 'ManagedOwner',
|
|
1059
|
+
PropertyOwner: 'PropertyOwner',
|
|
1060
|
+
PropertyManager: 'PropertyManager',
|
|
1061
|
+
FinanceManager: 'FinanceManager',
|
|
1062
|
+
Integrator: 'Integrator'
|
|
1063
|
+
} as const;
|
|
1064
|
+
|
|
1065
|
+
export type GrantTeammateAccessRequestBodyAppAccessLevelEnum = typeof GrantTeammateAccessRequestBodyAppAccessLevelEnum[keyof typeof GrantTeammateAccessRequestBodyAppAccessLevelEnum];
|
|
1066
|
+
|
|
1012
1067
|
/**
|
|
1013
1068
|
*
|
|
1014
1069
|
* @export
|
|
@@ -1446,6 +1501,63 @@ export const Permissions = {
|
|
|
1446
1501
|
export type Permissions = typeof Permissions[keyof typeof Permissions];
|
|
1447
1502
|
|
|
1448
1503
|
|
|
1504
|
+
/**
|
|
1505
|
+
* Principal with teammate permission summary
|
|
1506
|
+
* @export
|
|
1507
|
+
* @interface PrincipalInOrgWithTeammatePermissionSummary
|
|
1508
|
+
*/
|
|
1509
|
+
export interface PrincipalInOrgWithTeammatePermissionSummary {
|
|
1510
|
+
/**
|
|
1511
|
+
*
|
|
1512
|
+
* @type {string}
|
|
1513
|
+
* @memberof PrincipalInOrgWithTeammatePermissionSummary
|
|
1514
|
+
*/
|
|
1515
|
+
'type': PrincipalInOrgWithTeammatePermissionSummaryTypeEnum;
|
|
1516
|
+
/**
|
|
1517
|
+
*
|
|
1518
|
+
* @type {string}
|
|
1519
|
+
* @memberof PrincipalInOrgWithTeammatePermissionSummary
|
|
1520
|
+
*/
|
|
1521
|
+
'id': string;
|
|
1522
|
+
/**
|
|
1523
|
+
*
|
|
1524
|
+
* @type {string}
|
|
1525
|
+
* @memberof PrincipalInOrgWithTeammatePermissionSummary
|
|
1526
|
+
*/
|
|
1527
|
+
'name'?: string;
|
|
1528
|
+
/**
|
|
1529
|
+
*
|
|
1530
|
+
* @type {string}
|
|
1531
|
+
* @memberof PrincipalInOrgWithTeammatePermissionSummary
|
|
1532
|
+
*/
|
|
1533
|
+
'email'?: string;
|
|
1534
|
+
/**
|
|
1535
|
+
*
|
|
1536
|
+
* @type {string}
|
|
1537
|
+
* @memberof PrincipalInOrgWithTeammatePermissionSummary
|
|
1538
|
+
*/
|
|
1539
|
+
'phone'?: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* Teammate role label; null when no compensating role or unknown
|
|
1542
|
+
* @type {string}
|
|
1543
|
+
* @memberof PrincipalInOrgWithTeammatePermissionSummary
|
|
1544
|
+
*/
|
|
1545
|
+
'roleDisplay': string;
|
|
1546
|
+
/**
|
|
1547
|
+
* True when granular roles differ from default for the compensating role
|
|
1548
|
+
* @type {boolean}
|
|
1549
|
+
* @memberof PrincipalInOrgWithTeammatePermissionSummary
|
|
1550
|
+
*/
|
|
1551
|
+
'isCustomised': boolean;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
export const PrincipalInOrgWithTeammatePermissionSummaryTypeEnum = {
|
|
1555
|
+
User: 'User',
|
|
1556
|
+
Automation: 'Automation'
|
|
1557
|
+
} as const;
|
|
1558
|
+
|
|
1559
|
+
export type PrincipalInOrgWithTeammatePermissionSummaryTypeEnum = typeof PrincipalInOrgWithTeammatePermissionSummaryTypeEnum[keyof typeof PrincipalInOrgWithTeammatePermissionSummaryTypeEnum];
|
|
1560
|
+
|
|
1449
1561
|
/**
|
|
1450
1562
|
* Principals in org
|
|
1451
1563
|
* @export
|
|
@@ -1465,6 +1577,25 @@ export interface PrincipalsInOrgResponse {
|
|
|
1465
1577
|
*/
|
|
1466
1578
|
'principals': Array<AuthorizationRequestPrincipal>;
|
|
1467
1579
|
}
|
|
1580
|
+
/**
|
|
1581
|
+
* Principals in org including teammate permission summary per principal
|
|
1582
|
+
* @export
|
|
1583
|
+
* @interface PrincipalsInOrgWithTeammatePermissionSummaryResponse
|
|
1584
|
+
*/
|
|
1585
|
+
export interface PrincipalsInOrgWithTeammatePermissionSummaryResponse {
|
|
1586
|
+
/**
|
|
1587
|
+
*
|
|
1588
|
+
* @type {string}
|
|
1589
|
+
* @memberof PrincipalsInOrgWithTeammatePermissionSummaryResponse
|
|
1590
|
+
*/
|
|
1591
|
+
'orgId': string;
|
|
1592
|
+
/**
|
|
1593
|
+
* List of principals with roleDisplay and isCustomised
|
|
1594
|
+
* @type {Array<PrincipalInOrgWithTeammatePermissionSummary>}
|
|
1595
|
+
* @memberof PrincipalsInOrgWithTeammatePermissionSummaryResponse
|
|
1596
|
+
*/
|
|
1597
|
+
'principals': Array<PrincipalInOrgWithTeammatePermissionSummary>;
|
|
1598
|
+
}
|
|
1468
1599
|
/**
|
|
1469
1600
|
* Details for revoking a forbidden role from a principal
|
|
1470
1601
|
* @export
|
|
@@ -1639,6 +1770,62 @@ export const RoleNames = {
|
|
|
1639
1770
|
export type RoleNames = typeof RoleNames[keyof typeof RoleNames];
|
|
1640
1771
|
|
|
1641
1772
|
|
|
1773
|
+
/**
|
|
1774
|
+
* Teammate access applied
|
|
1775
|
+
* @export
|
|
1776
|
+
* @interface TeammateAccessSuccessResponse
|
|
1777
|
+
*/
|
|
1778
|
+
export interface TeammateAccessSuccessResponse {
|
|
1779
|
+
/**
|
|
1780
|
+
*
|
|
1781
|
+
* @type {string}
|
|
1782
|
+
* @memberof TeammateAccessSuccessResponse
|
|
1783
|
+
*/
|
|
1784
|
+
'message': string;
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* Update teammate app access for an existing teammate. Email and name are not accepted on update; the existing values stored against the user id are reused.
|
|
1788
|
+
* @export
|
|
1789
|
+
* @interface UpdateTeammateAccessRequestBody
|
|
1790
|
+
*/
|
|
1791
|
+
export interface UpdateTeammateAccessRequestBody {
|
|
1792
|
+
/**
|
|
1793
|
+
* Teammate app access level (role)
|
|
1794
|
+
* @type {string}
|
|
1795
|
+
* @memberof UpdateTeammateAccessRequestBody
|
|
1796
|
+
*/
|
|
1797
|
+
'appAccessLevel': UpdateTeammateAccessRequestBodyAppAccessLevelEnum;
|
|
1798
|
+
/**
|
|
1799
|
+
* Brand identifier (AppId); normalized to lowercase when stored
|
|
1800
|
+
* @type {string}
|
|
1801
|
+
* @memberof UpdateTeammateAccessRequestBody
|
|
1802
|
+
*/
|
|
1803
|
+
'brandId': string;
|
|
1804
|
+
/**
|
|
1805
|
+
* Org-wide store access; when false, propertyIds are required for property-scoped roles
|
|
1806
|
+
* @type {boolean}
|
|
1807
|
+
* @memberof UpdateTeammateAccessRequestBody
|
|
1808
|
+
*/
|
|
1809
|
+
'hasAccessToAllStores': boolean;
|
|
1810
|
+
/**
|
|
1811
|
+
* Property resource ids (e.g. p123) when scoped to properties
|
|
1812
|
+
* @type {Array<string>}
|
|
1813
|
+
* @memberof UpdateTeammateAccessRequestBody
|
|
1814
|
+
*/
|
|
1815
|
+
'propertyIds'?: Array<string>;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
export const UpdateTeammateAccessRequestBodyAppAccessLevelEnum = {
|
|
1819
|
+
Owner: 'Owner',
|
|
1820
|
+
ManagedOwner: 'ManagedOwner',
|
|
1821
|
+
PropertyOwner: 'PropertyOwner',
|
|
1822
|
+
PropertyManager: 'PropertyManager',
|
|
1823
|
+
FinanceManager: 'FinanceManager',
|
|
1824
|
+
Integrator: 'Integrator'
|
|
1825
|
+
} as const;
|
|
1826
|
+
|
|
1827
|
+
export type UpdateTeammateAccessRequestBodyAppAccessLevelEnum = typeof UpdateTeammateAccessRequestBodyAppAccessLevelEnum[keyof typeof UpdateTeammateAccessRequestBodyAppAccessLevelEnum];
|
|
1828
|
+
|
|
1642
1829
|
/**
|
|
1643
1830
|
*
|
|
1644
1831
|
* @export
|
|
@@ -2966,6 +3153,51 @@ export const RoleAssignmentApiAxiosParamCreator = function (configuration?: Conf
|
|
|
2966
3153
|
options: localVarRequestOptions,
|
|
2967
3154
|
};
|
|
2968
3155
|
},
|
|
3156
|
+
/**
|
|
3157
|
+
* Grant teammate app access and underlying permissions for a user being assigned within a brand for the first time. Email and name are persisted on first assignment only and must be supplied here.
|
|
3158
|
+
* @summary Grant teammate access to a new user
|
|
3159
|
+
* @param {string} orgId
|
|
3160
|
+
* @param {string} userId Target Flipdish user id (numeric string)
|
|
3161
|
+
* @param {GrantTeammateAccessRequestBody} [grantTeammateAccessRequestBody]
|
|
3162
|
+
* @param {*} [options] Override http request option.
|
|
3163
|
+
* @throws {RequiredError}
|
|
3164
|
+
*/
|
|
3165
|
+
grantTeammateAccess: async (orgId: string, userId: string, grantTeammateAccessRequestBody?: GrantTeammateAccessRequestBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3166
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
3167
|
+
assertParamExists('grantTeammateAccess', 'orgId', orgId)
|
|
3168
|
+
// verify required parameter 'userId' is not null or undefined
|
|
3169
|
+
assertParamExists('grantTeammateAccess', 'userId', userId)
|
|
3170
|
+
const localVarPath = `/orgs/{orgId}/users/{userId}/grantTeammateAccess`
|
|
3171
|
+
.replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)))
|
|
3172
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
|
3173
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3174
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3175
|
+
let baseOptions;
|
|
3176
|
+
if (configuration) {
|
|
3177
|
+
baseOptions = configuration.baseOptions;
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3180
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3181
|
+
const localVarHeaderParameter = {} as any;
|
|
3182
|
+
const localVarQueryParameter = {} as any;
|
|
3183
|
+
|
|
3184
|
+
// authentication ApiKeyAuth required
|
|
3185
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
3186
|
+
|
|
3187
|
+
|
|
3188
|
+
|
|
3189
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3190
|
+
|
|
3191
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3192
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3193
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3194
|
+
localVarRequestOptions.data = serializeDataIfNeeded(grantTeammateAccessRequestBody, localVarRequestOptions, configuration)
|
|
3195
|
+
|
|
3196
|
+
return {
|
|
3197
|
+
url: toPathString(localVarUrlObj),
|
|
3198
|
+
options: localVarRequestOptions,
|
|
3199
|
+
};
|
|
3200
|
+
},
|
|
2969
3201
|
/**
|
|
2970
3202
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
2971
3203
|
* @summary Revoke Forbidden Role from Principal
|
|
@@ -3043,6 +3275,51 @@ export const RoleAssignmentApiAxiosParamCreator = function (configuration?: Conf
|
|
|
3043
3275
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3044
3276
|
localVarRequestOptions.data = serializeDataIfNeeded(revokeRoleRequestBody, localVarRequestOptions, configuration)
|
|
3045
3277
|
|
|
3278
|
+
return {
|
|
3279
|
+
url: toPathString(localVarUrlObj),
|
|
3280
|
+
options: localVarRequestOptions,
|
|
3281
|
+
};
|
|
3282
|
+
},
|
|
3283
|
+
/**
|
|
3284
|
+
* Update teammate app access and underlying permissions for an existing teammate. The user must already have been granted access for this brand. Email and name are not accepted on update; existing values are reused. Returns 404 if no existing assignment is found.
|
|
3285
|
+
* @summary Update teammate access for an existing user
|
|
3286
|
+
* @param {string} orgId
|
|
3287
|
+
* @param {string} userId Target Flipdish user id (numeric string)
|
|
3288
|
+
* @param {UpdateTeammateAccessRequestBody} [updateTeammateAccessRequestBody]
|
|
3289
|
+
* @param {*} [options] Override http request option.
|
|
3290
|
+
* @throws {RequiredError}
|
|
3291
|
+
*/
|
|
3292
|
+
updateTeammateAccess: async (orgId: string, userId: string, updateTeammateAccessRequestBody?: UpdateTeammateAccessRequestBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3293
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
3294
|
+
assertParamExists('updateTeammateAccess', 'orgId', orgId)
|
|
3295
|
+
// verify required parameter 'userId' is not null or undefined
|
|
3296
|
+
assertParamExists('updateTeammateAccess', 'userId', userId)
|
|
3297
|
+
const localVarPath = `/orgs/{orgId}/users/{userId}/updateTeammateAccess`
|
|
3298
|
+
.replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)))
|
|
3299
|
+
.replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
|
|
3300
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3301
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3302
|
+
let baseOptions;
|
|
3303
|
+
if (configuration) {
|
|
3304
|
+
baseOptions = configuration.baseOptions;
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3307
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3308
|
+
const localVarHeaderParameter = {} as any;
|
|
3309
|
+
const localVarQueryParameter = {} as any;
|
|
3310
|
+
|
|
3311
|
+
// authentication ApiKeyAuth required
|
|
3312
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
3313
|
+
|
|
3314
|
+
|
|
3315
|
+
|
|
3316
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3317
|
+
|
|
3318
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3319
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3320
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3321
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateTeammateAccessRequestBody, localVarRequestOptions, configuration)
|
|
3322
|
+
|
|
3046
3323
|
return {
|
|
3047
3324
|
url: toPathString(localVarUrlObj),
|
|
3048
3325
|
options: localVarRequestOptions,
|
|
@@ -3086,6 +3363,21 @@ export const RoleAssignmentApiFp = function(configuration?: Configuration) {
|
|
|
3086
3363
|
const localVarOperationServerBasePath = operationServerMap['RoleAssignmentApi.getPrincipalRoles']?.[localVarOperationServerIndex]?.url;
|
|
3087
3364
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3088
3365
|
},
|
|
3366
|
+
/**
|
|
3367
|
+
* Grant teammate app access and underlying permissions for a user being assigned within a brand for the first time. Email and name are persisted on first assignment only and must be supplied here.
|
|
3368
|
+
* @summary Grant teammate access to a new user
|
|
3369
|
+
* @param {string} orgId
|
|
3370
|
+
* @param {string} userId Target Flipdish user id (numeric string)
|
|
3371
|
+
* @param {GrantTeammateAccessRequestBody} [grantTeammateAccessRequestBody]
|
|
3372
|
+
* @param {*} [options] Override http request option.
|
|
3373
|
+
* @throws {RequiredError}
|
|
3374
|
+
*/
|
|
3375
|
+
async grantTeammateAccess(orgId: string, userId: string, grantTeammateAccessRequestBody?: GrantTeammateAccessRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TeammateAccessSuccessResponse>> {
|
|
3376
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.grantTeammateAccess(orgId, userId, grantTeammateAccessRequestBody, options);
|
|
3377
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3378
|
+
const localVarOperationServerBasePath = operationServerMap['RoleAssignmentApi.grantTeammateAccess']?.[localVarOperationServerIndex]?.url;
|
|
3379
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3380
|
+
},
|
|
3089
3381
|
/**
|
|
3090
3382
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
3091
3383
|
* @summary Revoke Forbidden Role from Principal
|
|
@@ -3114,6 +3406,21 @@ export const RoleAssignmentApiFp = function(configuration?: Configuration) {
|
|
|
3114
3406
|
const localVarOperationServerBasePath = operationServerMap['RoleAssignmentApi.revokeRoleFromPrincipal']?.[localVarOperationServerIndex]?.url;
|
|
3115
3407
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3116
3408
|
},
|
|
3409
|
+
/**
|
|
3410
|
+
* Update teammate app access and underlying permissions for an existing teammate. The user must already have been granted access for this brand. Email and name are not accepted on update; existing values are reused. Returns 404 if no existing assignment is found.
|
|
3411
|
+
* @summary Update teammate access for an existing user
|
|
3412
|
+
* @param {string} orgId
|
|
3413
|
+
* @param {string} userId Target Flipdish user id (numeric string)
|
|
3414
|
+
* @param {UpdateTeammateAccessRequestBody} [updateTeammateAccessRequestBody]
|
|
3415
|
+
* @param {*} [options] Override http request option.
|
|
3416
|
+
* @throws {RequiredError}
|
|
3417
|
+
*/
|
|
3418
|
+
async updateTeammateAccess(orgId: string, userId: string, updateTeammateAccessRequestBody?: UpdateTeammateAccessRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TeammateAccessSuccessResponse>> {
|
|
3419
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateTeammateAccess(orgId, userId, updateTeammateAccessRequestBody, options);
|
|
3420
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3421
|
+
const localVarOperationServerBasePath = operationServerMap['RoleAssignmentApi.updateTeammateAccess']?.[localVarOperationServerIndex]?.url;
|
|
3422
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3423
|
+
},
|
|
3117
3424
|
}
|
|
3118
3425
|
};
|
|
3119
3426
|
|
|
@@ -3146,6 +3453,18 @@ export const RoleAssignmentApiFactory = function (configuration?: Configuration,
|
|
|
3146
3453
|
getPrincipalRoles(orgId: string, getPrincipalRolesRequestBody?: GetPrincipalRolesRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<GetPrincipalRolesSuccessResponse> {
|
|
3147
3454
|
return localVarFp.getPrincipalRoles(orgId, getPrincipalRolesRequestBody, options).then((request) => request(axios, basePath));
|
|
3148
3455
|
},
|
|
3456
|
+
/**
|
|
3457
|
+
* Grant teammate app access and underlying permissions for a user being assigned within a brand for the first time. Email and name are persisted on first assignment only and must be supplied here.
|
|
3458
|
+
* @summary Grant teammate access to a new user
|
|
3459
|
+
* @param {string} orgId
|
|
3460
|
+
* @param {string} userId Target Flipdish user id (numeric string)
|
|
3461
|
+
* @param {GrantTeammateAccessRequestBody} [grantTeammateAccessRequestBody]
|
|
3462
|
+
* @param {*} [options] Override http request option.
|
|
3463
|
+
* @throws {RequiredError}
|
|
3464
|
+
*/
|
|
3465
|
+
grantTeammateAccess(orgId: string, userId: string, grantTeammateAccessRequestBody?: GrantTeammateAccessRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<TeammateAccessSuccessResponse> {
|
|
3466
|
+
return localVarFp.grantTeammateAccess(orgId, userId, grantTeammateAccessRequestBody, options).then((request) => request(axios, basePath));
|
|
3467
|
+
},
|
|
3149
3468
|
/**
|
|
3150
3469
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
3151
3470
|
* @summary Revoke Forbidden Role from Principal
|
|
@@ -3168,6 +3487,18 @@ export const RoleAssignmentApiFactory = function (configuration?: Configuration,
|
|
|
3168
3487
|
revokeRoleFromPrincipal(orgId: string, revokeRoleRequestBody?: RevokeRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<RevokeRoleSuccessResponse> {
|
|
3169
3488
|
return localVarFp.revokeRoleFromPrincipal(orgId, revokeRoleRequestBody, options).then((request) => request(axios, basePath));
|
|
3170
3489
|
},
|
|
3490
|
+
/**
|
|
3491
|
+
* Update teammate app access and underlying permissions for an existing teammate. The user must already have been granted access for this brand. Email and name are not accepted on update; existing values are reused. Returns 404 if no existing assignment is found.
|
|
3492
|
+
* @summary Update teammate access for an existing user
|
|
3493
|
+
* @param {string} orgId
|
|
3494
|
+
* @param {string} userId Target Flipdish user id (numeric string)
|
|
3495
|
+
* @param {UpdateTeammateAccessRequestBody} [updateTeammateAccessRequestBody]
|
|
3496
|
+
* @param {*} [options] Override http request option.
|
|
3497
|
+
* @throws {RequiredError}
|
|
3498
|
+
*/
|
|
3499
|
+
updateTeammateAccess(orgId: string, userId: string, updateTeammateAccessRequestBody?: UpdateTeammateAccessRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<TeammateAccessSuccessResponse> {
|
|
3500
|
+
return localVarFp.updateTeammateAccess(orgId, userId, updateTeammateAccessRequestBody, options).then((request) => request(axios, basePath));
|
|
3501
|
+
},
|
|
3171
3502
|
};
|
|
3172
3503
|
};
|
|
3173
3504
|
|
|
@@ -3204,6 +3535,20 @@ export class RoleAssignmentApi extends BaseAPI {
|
|
|
3204
3535
|
return RoleAssignmentApiFp(this.configuration).getPrincipalRoles(orgId, getPrincipalRolesRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
3205
3536
|
}
|
|
3206
3537
|
|
|
3538
|
+
/**
|
|
3539
|
+
* Grant teammate app access and underlying permissions for a user being assigned within a brand for the first time. Email and name are persisted on first assignment only and must be supplied here.
|
|
3540
|
+
* @summary Grant teammate access to a new user
|
|
3541
|
+
* @param {string} orgId
|
|
3542
|
+
* @param {string} userId Target Flipdish user id (numeric string)
|
|
3543
|
+
* @param {GrantTeammateAccessRequestBody} [grantTeammateAccessRequestBody]
|
|
3544
|
+
* @param {*} [options] Override http request option.
|
|
3545
|
+
* @throws {RequiredError}
|
|
3546
|
+
* @memberof RoleAssignmentApi
|
|
3547
|
+
*/
|
|
3548
|
+
public grantTeammateAccess(orgId: string, userId: string, grantTeammateAccessRequestBody?: GrantTeammateAccessRequestBody, options?: RawAxiosRequestConfig) {
|
|
3549
|
+
return RoleAssignmentApiFp(this.configuration).grantTeammateAccess(orgId, userId, grantTeammateAccessRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
3550
|
+
}
|
|
3551
|
+
|
|
3207
3552
|
/**
|
|
3208
3553
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
3209
3554
|
* @summary Revoke Forbidden Role from Principal
|
|
@@ -3229,6 +3574,20 @@ export class RoleAssignmentApi extends BaseAPI {
|
|
|
3229
3574
|
public revokeRoleFromPrincipal(orgId: string, revokeRoleRequestBody?: RevokeRoleRequestBody, options?: RawAxiosRequestConfig) {
|
|
3230
3575
|
return RoleAssignmentApiFp(this.configuration).revokeRoleFromPrincipal(orgId, revokeRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
3231
3576
|
}
|
|
3577
|
+
|
|
3578
|
+
/**
|
|
3579
|
+
* Update teammate app access and underlying permissions for an existing teammate. The user must already have been granted access for this brand. Email and name are not accepted on update; existing values are reused. Returns 404 if no existing assignment is found.
|
|
3580
|
+
* @summary Update teammate access for an existing user
|
|
3581
|
+
* @param {string} orgId
|
|
3582
|
+
* @param {string} userId Target Flipdish user id (numeric string)
|
|
3583
|
+
* @param {UpdateTeammateAccessRequestBody} [updateTeammateAccessRequestBody]
|
|
3584
|
+
* @param {*} [options] Override http request option.
|
|
3585
|
+
* @throws {RequiredError}
|
|
3586
|
+
* @memberof RoleAssignmentApi
|
|
3587
|
+
*/
|
|
3588
|
+
public updateTeammateAccess(orgId: string, userId: string, updateTeammateAccessRequestBody?: UpdateTeammateAccessRequestBody, options?: RawAxiosRequestConfig) {
|
|
3589
|
+
return RoleAssignmentApiFp(this.configuration).updateTeammateAccess(orgId, userId, updateTeammateAccessRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
3590
|
+
}
|
|
3232
3591
|
}
|
|
3233
3592
|
|
|
3234
3593
|
|
|
@@ -3267,6 +3626,43 @@ export const UserManagementApiAxiosParamCreator = function (configuration?: Conf
|
|
|
3267
3626
|
|
|
3268
3627
|
|
|
3269
3628
|
|
|
3629
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3630
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3631
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3632
|
+
|
|
3633
|
+
return {
|
|
3634
|
+
url: toPathString(localVarUrlObj),
|
|
3635
|
+
options: localVarRequestOptions,
|
|
3636
|
+
};
|
|
3637
|
+
},
|
|
3638
|
+
/**
|
|
3639
|
+
* Same principals as list users, plus roleDisplay and isCustomised per principal (extra Dynamo reads for compensating roles and granular assignments).
|
|
3640
|
+
* @summary List Users in Org with teammate permission summary
|
|
3641
|
+
* @param {string} orgId
|
|
3642
|
+
* @param {*} [options] Override http request option.
|
|
3643
|
+
* @throws {RequiredError}
|
|
3644
|
+
*/
|
|
3645
|
+
listUsersInOrgWithTeammatePermissionSummary: async (orgId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3646
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
3647
|
+
assertParamExists('listUsersInOrgWithTeammatePermissionSummary', 'orgId', orgId)
|
|
3648
|
+
const localVarPath = `/orgs/{orgId}/users/teammatePermissionSummary`
|
|
3649
|
+
.replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)));
|
|
3650
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3651
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3652
|
+
let baseOptions;
|
|
3653
|
+
if (configuration) {
|
|
3654
|
+
baseOptions = configuration.baseOptions;
|
|
3655
|
+
}
|
|
3656
|
+
|
|
3657
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
3658
|
+
const localVarHeaderParameter = {} as any;
|
|
3659
|
+
const localVarQueryParameter = {} as any;
|
|
3660
|
+
|
|
3661
|
+
// authentication ApiKeyAuth required
|
|
3662
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
3663
|
+
|
|
3664
|
+
|
|
3665
|
+
|
|
3270
3666
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3271
3667
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3272
3668
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -3299,6 +3695,19 @@ export const UserManagementApiFp = function(configuration?: Configuration) {
|
|
|
3299
3695
|
const localVarOperationServerBasePath = operationServerMap['UserManagementApi.listUsersInOrg']?.[localVarOperationServerIndex]?.url;
|
|
3300
3696
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3301
3697
|
},
|
|
3698
|
+
/**
|
|
3699
|
+
* Same principals as list users, plus roleDisplay and isCustomised per principal (extra Dynamo reads for compensating roles and granular assignments).
|
|
3700
|
+
* @summary List Users in Org with teammate permission summary
|
|
3701
|
+
* @param {string} orgId
|
|
3702
|
+
* @param {*} [options] Override http request option.
|
|
3703
|
+
* @throws {RequiredError}
|
|
3704
|
+
*/
|
|
3705
|
+
async listUsersInOrgWithTeammatePermissionSummary(orgId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PrincipalsInOrgWithTeammatePermissionSummaryResponse>> {
|
|
3706
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listUsersInOrgWithTeammatePermissionSummary(orgId, options);
|
|
3707
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3708
|
+
const localVarOperationServerBasePath = operationServerMap['UserManagementApi.listUsersInOrgWithTeammatePermissionSummary']?.[localVarOperationServerIndex]?.url;
|
|
3709
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3710
|
+
},
|
|
3302
3711
|
}
|
|
3303
3712
|
};
|
|
3304
3713
|
|
|
@@ -3319,6 +3728,16 @@ export const UserManagementApiFactory = function (configuration?: Configuration,
|
|
|
3319
3728
|
listUsersInOrg(orgId: string, options?: RawAxiosRequestConfig): AxiosPromise<PrincipalsInOrgResponse> {
|
|
3320
3729
|
return localVarFp.listUsersInOrg(orgId, options).then((request) => request(axios, basePath));
|
|
3321
3730
|
},
|
|
3731
|
+
/**
|
|
3732
|
+
* Same principals as list users, plus roleDisplay and isCustomised per principal (extra Dynamo reads for compensating roles and granular assignments).
|
|
3733
|
+
* @summary List Users in Org with teammate permission summary
|
|
3734
|
+
* @param {string} orgId
|
|
3735
|
+
* @param {*} [options] Override http request option.
|
|
3736
|
+
* @throws {RequiredError}
|
|
3737
|
+
*/
|
|
3738
|
+
listUsersInOrgWithTeammatePermissionSummary(orgId: string, options?: RawAxiosRequestConfig): AxiosPromise<PrincipalsInOrgWithTeammatePermissionSummaryResponse> {
|
|
3739
|
+
return localVarFp.listUsersInOrgWithTeammatePermissionSummary(orgId, options).then((request) => request(axios, basePath));
|
|
3740
|
+
},
|
|
3322
3741
|
};
|
|
3323
3742
|
};
|
|
3324
3743
|
|
|
@@ -3340,6 +3759,18 @@ export class UserManagementApi extends BaseAPI {
|
|
|
3340
3759
|
public listUsersInOrg(orgId: string, options?: RawAxiosRequestConfig) {
|
|
3341
3760
|
return UserManagementApiFp(this.configuration).listUsersInOrg(orgId, options).then((request) => request(this.axios, this.basePath));
|
|
3342
3761
|
}
|
|
3762
|
+
|
|
3763
|
+
/**
|
|
3764
|
+
* Same principals as list users, plus roleDisplay and isCustomised per principal (extra Dynamo reads for compensating roles and granular assignments).
|
|
3765
|
+
* @summary List Users in Org with teammate permission summary
|
|
3766
|
+
* @param {string} orgId
|
|
3767
|
+
* @param {*} [options] Override http request option.
|
|
3768
|
+
* @throws {RequiredError}
|
|
3769
|
+
* @memberof UserManagementApi
|
|
3770
|
+
*/
|
|
3771
|
+
public listUsersInOrgWithTeammatePermissionSummary(orgId: string, options?: RawAxiosRequestConfig) {
|
|
3772
|
+
return UserManagementApiFp(this.configuration).listUsersInOrgWithTeammatePermissionSummary(orgId, options).then((request) => request(this.axios, this.basePath));
|
|
3773
|
+
}
|
|
3343
3774
|
}
|
|
3344
3775
|
|
|
3345
3776
|
|
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.33"
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
|