@tapis/tapis-typescript-sk 0.0.2 → 0.0.3
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/.openapi-generator/FILES +16 -6
- package/.openapi-generator/VERSION +1 -1
- package/README.md +5 -4
- package/dist/apis/AdminApi.d.ts +26 -0
- package/dist/apis/AdminApi.js +128 -0
- package/dist/apis/GeneralApi.d.ts +25 -16
- package/dist/apis/GeneralApi.js +72 -23
- package/dist/apis/RoleApi.d.ts +99 -76
- package/dist/apis/RoleApi.js +540 -340
- package/dist/apis/ShareApi.d.ts +110 -0
- package/dist/apis/ShareApi.js +469 -0
- package/dist/apis/UserApi.d.ts +84 -126
- package/dist/apis/UserApi.js +467 -538
- package/dist/apis/VaultApi.d.ts +52 -49
- package/dist/apis/VaultApi.js +413 -341
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +20 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -6
- package/dist/models/Options.d.ts +8 -3
- package/dist/models/Options.js +23 -15
- package/dist/models/ReqAddChildRole.d.ts +11 -6
- package/dist/models/ReqAddChildRole.js +33 -19
- package/dist/models/ReqAddRolePermission.d.ts +18 -6
- package/dist/models/ReqAddRolePermission.js +36 -19
- package/dist/models/ReqCreateRole.d.ts +18 -6
- package/dist/models/ReqCreateRole.js +36 -19
- package/dist/models/ReqGrantRole.d.ts +51 -0
- package/dist/models/ReqGrantRole.js +62 -0
- package/dist/models/ReqGrantRoleWithPermission.d.ts +57 -0
- package/dist/models/ReqGrantRoleWithPermission.js +66 -0
- package/dist/models/ReqGrantUserPermission.d.ts +11 -6
- package/dist/models/ReqGrantUserPermission.js +33 -19
- package/dist/models/ReqPreviewPathPrefix.d.ts +19 -7
- package/dist/models/ReqPreviewPathPrefix.js +46 -27
- package/dist/models/ReqRemoveChildRole.d.ts +11 -6
- package/dist/models/ReqRemoveChildRole.js +33 -19
- package/dist/models/ReqRemovePermissionFromAllRoles.d.ts +38 -0
- package/dist/models/ReqRemovePermissionFromAllRoles.js +55 -0
- package/dist/models/ReqRemoveRolePermission.d.ts +18 -6
- package/dist/models/ReqRemoveRolePermission.js +36 -19
- package/dist/models/ReqReplacePathPrefix.d.ts +19 -7
- package/dist/models/ReqReplacePathPrefix.js +46 -27
- package/dist/models/ReqRevokeRole.d.ts +51 -0
- package/dist/models/ReqRevokeRole.js +62 -0
- package/dist/models/ReqRevokeUserPermission.d.ts +11 -6
- package/dist/models/ReqRevokeUserPermission.js +33 -19
- package/dist/models/ReqRolePermits.d.ts +45 -0
- package/dist/models/ReqRolePermits.js +60 -0
- package/dist/models/ReqShareResource.d.ts +68 -0
- package/dist/models/ReqShareResource.js +73 -0
- package/dist/models/ReqUpdateRoleDescription.d.ts +17 -5
- package/dist/models/ReqUpdateRoleDescription.js +32 -17
- package/dist/models/ReqUpdateRoleName.d.ts +17 -5
- package/dist/models/ReqUpdateRoleName.js +32 -17
- package/dist/models/ReqUpdateRoleOwner.d.ts +17 -5
- package/dist/models/ReqUpdateRoleOwner.js +34 -19
- package/dist/models/ReqUserHasRole.d.ts +18 -6
- package/dist/models/ReqUserHasRole.js +38 -21
- package/dist/models/ReqUserHasRoleMulti.d.ts +11 -6
- package/dist/models/ReqUserHasRoleMulti.js +35 -21
- package/dist/models/ReqUserIsAdmin.d.ts +10 -5
- package/dist/models/ReqUserIsAdmin.js +29 -17
- package/dist/models/ReqUserIsPermitted.d.ts +11 -6
- package/dist/models/ReqUserIsPermitted.js +35 -21
- package/dist/models/ReqUserIsPermittedMulti.d.ts +11 -6
- package/dist/models/ReqUserIsPermittedMulti.js +35 -21
- package/dist/models/ReqValidatePwd.d.ts +44 -0
- package/dist/models/ReqValidatePwd.js +59 -0
- package/dist/models/ReqVersions.d.ts +11 -6
- package/dist/models/ReqVersions.js +33 -19
- package/dist/models/ReqWriteSecret.d.ts +12 -7
- package/dist/models/ReqWriteSecret.js +36 -22
- package/dist/models/RespAuthorized.d.ts +27 -4
- package/dist/models/RespAuthorized.js +36 -22
- package/dist/models/RespBasic.d.ts +26 -3
- package/dist/models/RespBasic.js +35 -21
- package/dist/models/RespBoolean.d.ts +69 -0
- package/dist/models/RespBoolean.js +62 -0
- package/dist/models/RespChangeCount.d.ts +27 -4
- package/dist/models/RespChangeCount.js +36 -22
- package/dist/models/RespName.d.ts +27 -4
- package/dist/models/RespName.js +36 -22
- package/dist/models/RespNameArray.d.ts +27 -4
- package/dist/models/RespNameArray.js +36 -22
- package/dist/models/RespPathPrefixes.d.ts +27 -4
- package/dist/models/RespPathPrefixes.js +36 -22
- package/dist/models/RespProbe.d.ts +27 -4
- package/dist/models/RespProbe.js +36 -22
- package/dist/models/RespResourceUrl.d.ts +27 -4
- package/dist/models/RespResourceUrl.js +36 -22
- package/dist/models/RespRole.d.ts +27 -4
- package/dist/models/RespRole.js +36 -22
- package/dist/models/RespSecret.d.ts +27 -4
- package/dist/models/RespSecret.js +36 -22
- package/dist/models/RespSecretList.d.ts +27 -4
- package/dist/models/RespSecretList.js +36 -22
- package/dist/models/RespSecretMeta.d.ts +27 -4
- package/dist/models/RespSecretMeta.js +36 -22
- package/dist/models/RespSecretVersionMetadata.d.ts +27 -4
- package/dist/models/RespSecretVersionMetadata.js +36 -22
- package/dist/models/RespShare.d.ts +69 -0
- package/dist/models/RespShare.js +62 -0
- package/dist/models/RespShareList.d.ts +69 -0
- package/dist/models/RespShareList.js +62 -0
- package/dist/models/RespVersions.d.ts +26 -3
- package/dist/models/RespVersions.js +35 -21
- package/dist/models/ResultAuthorized.d.ts +8 -3
- package/dist/models/ResultAuthorized.js +23 -15
- package/dist/models/ResultBoolean.d.ts +32 -0
- package/dist/models/ResultBoolean.js +49 -0
- package/dist/models/ResultChangeCount.d.ts +8 -3
- package/dist/models/ResultChangeCount.js +23 -15
- package/dist/models/ResultName.d.ts +8 -3
- package/dist/models/ResultName.js +23 -15
- package/dist/models/ResultNameArray.d.ts +8 -3
- package/dist/models/ResultNameArray.js +23 -15
- package/dist/models/ResultResourceUrl.d.ts +8 -3
- package/dist/models/ResultResourceUrl.js +23 -15
- package/dist/models/RoleTypeEnum.d.ts +28 -0
- package/dist/models/RoleTypeEnum.js +54 -0
- package/dist/models/SkProbe.d.ts +8 -21
- package/dist/models/SkProbe.js +23 -21
- package/dist/models/SkRole.d.ts +19 -7
- package/dist/models/SkRole.js +48 -37
- package/dist/models/SkSecret.d.ts +9 -4
- package/dist/models/SkSecret.js +26 -18
- package/dist/models/SkSecretList.d.ts +8 -3
- package/dist/models/SkSecretList.js +25 -17
- package/dist/models/SkSecretMetadata.d.ts +8 -3
- package/dist/models/SkSecretMetadata.js +29 -21
- package/dist/models/SkSecretVersion.d.ts +8 -3
- package/dist/models/SkSecretVersion.js +29 -21
- package/dist/models/SkSecretVersionMetadata.d.ts +9 -4
- package/dist/models/SkSecretVersionMetadata.js +34 -26
- package/dist/models/SkShare.d.ts +92 -0
- package/dist/models/SkShare.js +69 -0
- package/dist/models/SkShareList.d.ts +33 -0
- package/dist/models/SkShareList.js +50 -0
- package/dist/models/Transformation.d.ts +8 -3
- package/dist/models/Transformation.js +27 -19
- package/dist/models/index.d.ts +14 -6
- package/dist/models/index.js +75 -56
- package/dist/runtime.d.ts +80 -38
- package/dist/runtime.js +313 -171
- package/package.json +6 -2
- package/src/apis/AdminApi.ts +63 -0
- package/src/apis/GeneralApi.ts +48 -24
- package/src/apis/RoleApi.ts +374 -220
- package/src/apis/ShareApi.ts +418 -0
- package/src/apis/UserApi.ts +258 -383
- package/src/apis/VaultApi.ts +347 -275
- package/src/apis/index.ts +2 -0
- package/src/index.ts +2 -2
- package/src/models/Options.ts +21 -12
- package/src/models/ReqAddChildRole.ts +31 -19
- package/src/models/ReqAddRolePermission.ts +49 -19
- package/src/models/ReqCreateRole.ts +49 -19
- package/src/models/ReqGrantRole.ts +102 -0
- package/src/models/ReqGrantRoleWithPermission.ts +111 -0
- package/src/models/ReqGrantUserPermission.ts +31 -19
- package/src/models/ReqPreviewPathPrefix.ts +59 -28
- package/src/models/ReqRemoveChildRole.ts +31 -19
- package/src/models/ReqRemovePermissionFromAllRoles.ts +75 -0
- package/src/models/ReqRemoveRolePermission.ts +49 -19
- package/src/models/ReqReplacePathPrefix.ts +59 -28
- package/src/models/ReqRevokeRole.ts +102 -0
- package/src/models/ReqRevokeUserPermission.ts +31 -19
- package/src/models/ReqRolePermits.ts +94 -0
- package/src/models/ReqShareResource.ts +119 -0
- package/src/models/ReqUpdateRoleDescription.ts +45 -16
- package/src/models/ReqUpdateRoleName.ts +45 -16
- package/src/models/ReqUpdateRoleOwner.ts +47 -18
- package/src/models/ReqUserHasRole.ts +51 -21
- package/src/models/ReqUserHasRoleMulti.ts +33 -21
- package/src/models/ReqUserIsAdmin.ts +27 -16
- package/src/models/ReqUserIsPermitted.ts +33 -21
- package/src/models/ReqUserIsPermittedMulti.ts +33 -21
- package/src/models/ReqValidatePwd.ts +84 -0
- package/src/models/ReqVersions.ts +31 -19
- package/src/models/ReqWriteSecret.ts +36 -23
- package/src/models/RespAuthorized.ts +54 -20
- package/src/models/RespBasic.ts +51 -18
- package/src/models/RespBoolean.ts +121 -0
- package/src/models/RespChangeCount.ts +54 -20
- package/src/models/RespName.ts +54 -20
- package/src/models/RespNameArray.ts +54 -20
- package/src/models/RespPathPrefixes.ts +54 -20
- package/src/models/RespProbe.ts +54 -20
- package/src/models/RespResourceUrl.ts +54 -20
- package/src/models/RespRole.ts +54 -20
- package/src/models/RespSecret.ts +54 -20
- package/src/models/RespSecretList.ts +54 -20
- package/src/models/RespSecretMeta.ts +54 -20
- package/src/models/RespSecretVersionMetadata.ts +54 -20
- package/src/models/RespShare.ts +121 -0
- package/src/models/RespShareList.ts +121 -0
- package/src/models/RespVersions.ts +51 -18
- package/src/models/ResultAuthorized.ts +21 -12
- package/src/models/ResultBoolean.ts +65 -0
- package/src/models/ResultChangeCount.ts +21 -12
- package/src/models/ResultName.ts +21 -12
- package/src/models/ResultNameArray.ts +21 -12
- package/src/models/ResultResourceUrl.ts +21 -12
- package/src/models/RoleTypeEnum.ts +56 -0
- package/src/models/SkProbe.ts +21 -36
- package/src/models/SkRole.ts +65 -38
- package/src/models/SkSecret.ts +26 -16
- package/src/models/SkSecretList.ts +23 -14
- package/src/models/SkSecretMetadata.ts +27 -18
- package/src/models/SkSecretVersion.ts +27 -18
- package/src/models/SkSecretVersionMetadata.ts +34 -24
- package/src/models/SkShare.ts +145 -0
- package/src/models/SkShareList.ts +73 -0
- package/src/models/Transformation.ts +25 -16
- package/src/models/index.ts +14 -6
- package/src/runtime.ts +219 -108
- package/dist/models/ReqGrantAdminRole.d.ts +0 -33
- package/dist/models/ReqGrantAdminRole.js +0 -43
- package/dist/models/ReqGrantUserRole.d.ts +0 -39
- package/dist/models/ReqGrantUserRole.js +0 -45
- package/dist/models/ReqGrantUserRoleWithPermission.d.ts +0 -45
- package/dist/models/ReqGrantUserRoleWithPermission.js +0 -47
- package/dist/models/ReqRevokeAdminRole.d.ts +0 -33
- package/dist/models/ReqRevokeAdminRole.js +0 -43
- package/dist/models/ReqRevokeUserRole.d.ts +0 -39
- package/dist/models/ReqRevokeUserRole.js +0 -45
- package/dist/models/ReqValidateServicePwd.d.ts +0 -39
- package/dist/models/ReqValidateServicePwd.js +0 -45
- package/src/models/ReqGrantAdminRole.ts +0 -64
- package/src/models/ReqGrantUserRole.ts +0 -72
- package/src/models/ReqGrantUserRoleWithPermission.ts +0 -80
- package/src/models/ReqRevokeAdminRole.ts +0 -64
- package/src/models/ReqRevokeUserRole.ts +0 -72
- package/src/models/ReqValidateServicePwd.ts +0 -72
package/src/apis/UserApi.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Tapis Security API
|
|
5
|
-
* The Tapis Security API provides
|
|
5
|
+
* The Tapis Security API provides for management of Security Kernel (SK) role-based authorization and secrets resources.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: 1.8.2
|
|
8
8
|
* Contact: cicsupport@tacc.utexas.edu
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,73 +14,69 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ReqGrantRole,
|
|
19
|
+
ReqGrantRoleWithPermission,
|
|
20
|
+
ReqGrantUserPermission,
|
|
21
|
+
ReqRevokeRole,
|
|
22
|
+
ReqRevokeUserPermission,
|
|
23
|
+
ReqUserHasRole,
|
|
24
|
+
ReqUserHasRoleMulti,
|
|
25
|
+
ReqUserIsAdmin,
|
|
26
|
+
ReqUserIsPermitted,
|
|
27
|
+
ReqUserIsPermittedMulti,
|
|
28
|
+
RespAuthorized,
|
|
29
|
+
RespBasic,
|
|
30
|
+
RespChangeCount,
|
|
31
|
+
RespName,
|
|
32
|
+
RespNameArray,
|
|
33
|
+
RoleTypeEnum,
|
|
34
|
+
} from '../models/index';
|
|
17
35
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
36
|
+
ReqGrantRoleFromJSON,
|
|
37
|
+
ReqGrantRoleToJSON,
|
|
38
|
+
ReqGrantRoleWithPermissionFromJSON,
|
|
39
|
+
ReqGrantRoleWithPermissionToJSON,
|
|
22
40
|
ReqGrantUserPermissionFromJSON,
|
|
23
41
|
ReqGrantUserPermissionToJSON,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
ReqGrantUserRoleToJSON,
|
|
27
|
-
ReqGrantUserRoleWithPermission,
|
|
28
|
-
ReqGrantUserRoleWithPermissionFromJSON,
|
|
29
|
-
ReqGrantUserRoleWithPermissionToJSON,
|
|
30
|
-
ReqRevokeAdminRole,
|
|
31
|
-
ReqRevokeAdminRoleFromJSON,
|
|
32
|
-
ReqRevokeAdminRoleToJSON,
|
|
33
|
-
ReqRevokeUserPermission,
|
|
42
|
+
ReqRevokeRoleFromJSON,
|
|
43
|
+
ReqRevokeRoleToJSON,
|
|
34
44
|
ReqRevokeUserPermissionFromJSON,
|
|
35
45
|
ReqRevokeUserPermissionToJSON,
|
|
36
|
-
ReqRevokeUserRole,
|
|
37
|
-
ReqRevokeUserRoleFromJSON,
|
|
38
|
-
ReqRevokeUserRoleToJSON,
|
|
39
|
-
ReqUserHasRole,
|
|
40
46
|
ReqUserHasRoleFromJSON,
|
|
41
47
|
ReqUserHasRoleToJSON,
|
|
42
|
-
ReqUserHasRoleMulti,
|
|
43
48
|
ReqUserHasRoleMultiFromJSON,
|
|
44
49
|
ReqUserHasRoleMultiToJSON,
|
|
45
|
-
ReqUserIsAdmin,
|
|
46
50
|
ReqUserIsAdminFromJSON,
|
|
47
51
|
ReqUserIsAdminToJSON,
|
|
48
|
-
ReqUserIsPermitted,
|
|
49
52
|
ReqUserIsPermittedFromJSON,
|
|
50
53
|
ReqUserIsPermittedToJSON,
|
|
51
|
-
ReqUserIsPermittedMulti,
|
|
52
54
|
ReqUserIsPermittedMultiFromJSON,
|
|
53
55
|
ReqUserIsPermittedMultiToJSON,
|
|
54
|
-
RespAuthorized,
|
|
55
56
|
RespAuthorizedFromJSON,
|
|
56
57
|
RespAuthorizedToJSON,
|
|
57
|
-
RespBasic,
|
|
58
58
|
RespBasicFromJSON,
|
|
59
59
|
RespBasicToJSON,
|
|
60
|
-
RespChangeCount,
|
|
61
60
|
RespChangeCountFromJSON,
|
|
62
61
|
RespChangeCountToJSON,
|
|
63
|
-
RespName,
|
|
64
62
|
RespNameFromJSON,
|
|
65
63
|
RespNameToJSON,
|
|
66
|
-
RespNameArray,
|
|
67
64
|
RespNameArrayFromJSON,
|
|
68
65
|
RespNameArrayToJSON,
|
|
69
|
-
|
|
66
|
+
RoleTypeEnumFromJSON,
|
|
67
|
+
RoleTypeEnumToJSON,
|
|
68
|
+
} from '../models/index';
|
|
70
69
|
|
|
71
70
|
export interface GetAdminsRequest {
|
|
72
71
|
tenant: string;
|
|
73
|
-
pretty?: boolean;
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
export interface GetDefaultUserRole1Request {
|
|
77
75
|
user: string;
|
|
78
|
-
pretty?: boolean;
|
|
79
76
|
}
|
|
80
77
|
|
|
81
78
|
export interface GetUserNamesRequest {
|
|
82
79
|
tenant?: string;
|
|
83
|
-
pretty?: boolean;
|
|
84
80
|
}
|
|
85
81
|
|
|
86
82
|
export interface GetUserPermsRequest {
|
|
@@ -88,95 +84,70 @@ export interface GetUserPermsRequest {
|
|
|
88
84
|
tenant?: string;
|
|
89
85
|
implies?: string;
|
|
90
86
|
impliedBy?: string;
|
|
91
|
-
pretty?: boolean;
|
|
92
87
|
}
|
|
93
88
|
|
|
94
89
|
export interface GetUserRolesRequest {
|
|
95
90
|
user: string;
|
|
96
91
|
tenant?: string;
|
|
97
|
-
pretty?: boolean;
|
|
98
92
|
}
|
|
99
93
|
|
|
100
94
|
export interface GetUsersWithPermissionRequest {
|
|
101
95
|
permSpec: string;
|
|
102
96
|
tenant?: string;
|
|
103
|
-
pretty?: boolean;
|
|
104
97
|
}
|
|
105
98
|
|
|
106
99
|
export interface GetUsersWithRoleRequest {
|
|
107
100
|
roleName: string;
|
|
108
101
|
tenant?: string;
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export interface GrantAdminRoleRequest {
|
|
113
|
-
reqGrantAdminRole: ReqGrantAdminRole;
|
|
114
|
-
pretty?: boolean;
|
|
102
|
+
roleType?: RoleTypeEnum;
|
|
115
103
|
}
|
|
116
104
|
|
|
117
105
|
export interface GrantRoleRequest {
|
|
118
|
-
|
|
119
|
-
pretty?: boolean;
|
|
106
|
+
reqGrantRole: ReqGrantRole;
|
|
120
107
|
}
|
|
121
108
|
|
|
122
109
|
export interface GrantRoleWithPermissionRequest {
|
|
123
|
-
|
|
124
|
-
pretty?: boolean;
|
|
110
|
+
reqGrantRoleWithPermission: ReqGrantRoleWithPermission;
|
|
125
111
|
}
|
|
126
112
|
|
|
127
113
|
export interface GrantUserPermissionRequest {
|
|
128
114
|
reqGrantUserPermission: ReqGrantUserPermission;
|
|
129
|
-
pretty?: boolean;
|
|
130
115
|
}
|
|
131
116
|
|
|
132
117
|
export interface HasRoleRequest {
|
|
133
118
|
reqUserHasRole: ReqUserHasRole;
|
|
134
|
-
pretty?: boolean;
|
|
135
119
|
}
|
|
136
120
|
|
|
137
121
|
export interface HasRoleAllRequest {
|
|
138
122
|
reqUserHasRoleMulti: ReqUserHasRoleMulti;
|
|
139
|
-
pretty?: boolean;
|
|
140
123
|
}
|
|
141
124
|
|
|
142
125
|
export interface HasRoleAnyRequest {
|
|
143
126
|
reqUserHasRoleMulti: ReqUserHasRoleMulti;
|
|
144
|
-
pretty?: boolean;
|
|
145
127
|
}
|
|
146
128
|
|
|
147
129
|
export interface IsAdminRequest {
|
|
148
130
|
reqUserIsAdmin: ReqUserIsAdmin;
|
|
149
|
-
pretty?: boolean;
|
|
150
131
|
}
|
|
151
132
|
|
|
152
133
|
export interface IsPermittedRequest {
|
|
153
134
|
reqUserIsPermitted: ReqUserIsPermitted;
|
|
154
|
-
pretty?: boolean;
|
|
155
135
|
}
|
|
156
136
|
|
|
157
137
|
export interface IsPermittedAllRequest {
|
|
158
138
|
reqUserIsPermittedMulti: ReqUserIsPermittedMulti;
|
|
159
|
-
pretty?: boolean;
|
|
160
139
|
}
|
|
161
140
|
|
|
162
141
|
export interface IsPermittedAnyRequest {
|
|
163
142
|
reqUserIsPermittedMulti: ReqUserIsPermittedMulti;
|
|
164
|
-
pretty?: boolean;
|
|
165
143
|
}
|
|
166
144
|
|
|
167
|
-
export interface
|
|
168
|
-
|
|
169
|
-
pretty?: boolean;
|
|
145
|
+
export interface RevokeRoleRequest {
|
|
146
|
+
reqRevokeRole: ReqRevokeRole;
|
|
170
147
|
}
|
|
171
148
|
|
|
172
149
|
export interface RevokeUserPermissionRequest {
|
|
173
150
|
reqRevokeUserPermission: ReqRevokeUserPermission;
|
|
174
|
-
pretty?: boolean;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export interface RevokeUserRoleRequest {
|
|
178
|
-
reqRevokeUserRole: ReqRevokeUserRole;
|
|
179
|
-
pretty?: boolean;
|
|
180
151
|
}
|
|
181
152
|
|
|
182
153
|
/**
|
|
@@ -185,27 +156,26 @@ export interface RevokeUserRoleRequest {
|
|
|
185
156
|
export class UserApi extends runtime.BaseAPI {
|
|
186
157
|
|
|
187
158
|
/**
|
|
188
|
-
* Get all users assigned the tenant administrator role ($!tenant_admin). This request is authorized if the requestor is a user that has access to the specified tenant
|
|
159
|
+
* Get all users assigned the tenant administrator role ($!tenant_admin). This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
189
160
|
*/
|
|
190
|
-
async getAdminsRaw(requestParameters: GetAdminsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
191
|
-
if (requestParameters
|
|
192
|
-
throw new runtime.RequiredError(
|
|
161
|
+
async getAdminsRaw(requestParameters: GetAdminsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
162
|
+
if (requestParameters['tenant'] == null) {
|
|
163
|
+
throw new runtime.RequiredError(
|
|
164
|
+
'tenant',
|
|
165
|
+
'Required parameter "tenant" was null or undefined when calling getAdmins().'
|
|
166
|
+
);
|
|
193
167
|
}
|
|
194
168
|
|
|
195
169
|
const queryParameters: any = {};
|
|
196
170
|
|
|
197
|
-
if (requestParameters.pretty !== undefined) {
|
|
198
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
171
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
202
172
|
|
|
203
173
|
if (this.configuration && this.configuration.apiKey) {
|
|
204
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
174
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
205
175
|
}
|
|
206
176
|
|
|
207
177
|
const response = await this.request({
|
|
208
|
-
path: `/security/user/admins/{tenant}`.replace(`{${"tenant"}}`, encodeURIComponent(String(requestParameters
|
|
178
|
+
path: `/security/user/admins/{tenant}`.replace(`{${"tenant"}}`, encodeURIComponent(String(requestParameters['tenant']))),
|
|
209
179
|
method: 'GET',
|
|
210
180
|
headers: headerParameters,
|
|
211
181
|
query: queryParameters,
|
|
@@ -215,31 +185,34 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
215
185
|
}
|
|
216
186
|
|
|
217
187
|
/**
|
|
218
|
-
* Get all users assigned the tenant administrator role ($!tenant_admin). This request is authorized if the requestor is a user that has access to the specified tenant
|
|
188
|
+
* Get all users assigned the tenant administrator role ($!tenant_admin). This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
219
189
|
*/
|
|
220
|
-
async getAdmins(requestParameters: GetAdminsRequest, initOverrides?: RequestInit): Promise<RespNameArray> {
|
|
190
|
+
async getAdmins(requestParameters: GetAdminsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespNameArray> {
|
|
221
191
|
const response = await this.getAdminsRaw(requestParameters, initOverrides);
|
|
222
192
|
return await response.value();
|
|
223
193
|
}
|
|
224
194
|
|
|
225
195
|
/**
|
|
226
|
-
* Get a user\'s default role. The default role is implicitly created by the system when needed if it doesn\'t already exist. No authorization required. A user\'s default role is constructed by prepending \'$$\' to the user\'s name.
|
|
196
|
+
* Get a user\'s default role. The default role is implicitly created by the system when needed if it doesn\'t already exist. No authorization required. A user\'s default role is constructed by prepending \'$$\' to the user\'s name. This implies the maximum length of a user name is 58 since role names are limited to 60 characters.
|
|
227
197
|
*/
|
|
228
|
-
async getDefaultUserRole1Raw(requestParameters: GetDefaultUserRole1Request, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespName>> {
|
|
229
|
-
if (requestParameters
|
|
230
|
-
throw new runtime.RequiredError(
|
|
198
|
+
async getDefaultUserRole1Raw(requestParameters: GetDefaultUserRole1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespName>> {
|
|
199
|
+
if (requestParameters['user'] == null) {
|
|
200
|
+
throw new runtime.RequiredError(
|
|
201
|
+
'user',
|
|
202
|
+
'Required parameter "user" was null or undefined when calling getDefaultUserRole1().'
|
|
203
|
+
);
|
|
231
204
|
}
|
|
232
205
|
|
|
233
206
|
const queryParameters: any = {};
|
|
234
207
|
|
|
235
|
-
if (requestParameters.pretty !== undefined) {
|
|
236
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
208
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
240
209
|
|
|
210
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
211
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
212
|
+
}
|
|
213
|
+
|
|
241
214
|
const response = await this.request({
|
|
242
|
-
path: `/security/user/defaultRole/{user}`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters
|
|
215
|
+
path: `/security/user/defaultRole/{user}`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters['user']))),
|
|
243
216
|
method: 'GET',
|
|
244
217
|
headers: headerParameters,
|
|
245
218
|
query: queryParameters,
|
|
@@ -249,31 +222,27 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
249
222
|
}
|
|
250
223
|
|
|
251
224
|
/**
|
|
252
|
-
* Get a user\'s default role. The default role is implicitly created by the system when needed if it doesn\'t already exist. No authorization required. A user\'s default role is constructed by prepending \'$$\' to the user\'s name.
|
|
225
|
+
* Get a user\'s default role. The default role is implicitly created by the system when needed if it doesn\'t already exist. No authorization required. A user\'s default role is constructed by prepending \'$$\' to the user\'s name. This implies the maximum length of a user name is 58 since role names are limited to 60 characters.
|
|
253
226
|
*/
|
|
254
|
-
async getDefaultUserRole1(requestParameters: GetDefaultUserRole1Request, initOverrides?: RequestInit): Promise<RespName> {
|
|
227
|
+
async getDefaultUserRole1(requestParameters: GetDefaultUserRole1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespName> {
|
|
255
228
|
const response = await this.getDefaultUserRole1Raw(requestParameters, initOverrides);
|
|
256
229
|
return await response.value();
|
|
257
230
|
}
|
|
258
231
|
|
|
259
232
|
/**
|
|
260
|
-
* Get the names of all users in the tenant that have been granted a role or permission. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
233
|
+
* Get the names of all users in the tenant that have been granted a role or permission. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
261
234
|
*/
|
|
262
|
-
async getUserNamesRaw(requestParameters: GetUserNamesRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
235
|
+
async getUserNamesRaw(requestParameters: GetUserNamesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
263
236
|
const queryParameters: any = {};
|
|
264
237
|
|
|
265
|
-
if (requestParameters
|
|
266
|
-
queryParameters['tenant'] = requestParameters
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
if (requestParameters.pretty !== undefined) {
|
|
270
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
238
|
+
if (requestParameters['tenant'] != null) {
|
|
239
|
+
queryParameters['tenant'] = requestParameters['tenant'];
|
|
271
240
|
}
|
|
272
241
|
|
|
273
242
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
274
243
|
|
|
275
244
|
if (this.configuration && this.configuration.apiKey) {
|
|
276
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
245
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
277
246
|
}
|
|
278
247
|
|
|
279
248
|
const response = await this.request({
|
|
@@ -287,47 +256,46 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
287
256
|
}
|
|
288
257
|
|
|
289
258
|
/**
|
|
290
|
-
* Get the names of all users in the tenant that have been granted a role or permission. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
259
|
+
* Get the names of all users in the tenant that have been granted a role or permission. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
291
260
|
*/
|
|
292
|
-
async getUserNames(requestParameters: GetUserNamesRequest, initOverrides?: RequestInit): Promise<RespNameArray> {
|
|
261
|
+
async getUserNames(requestParameters: GetUserNamesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespNameArray> {
|
|
293
262
|
const response = await this.getUserNamesRaw(requestParameters, initOverrides);
|
|
294
263
|
return await response.value();
|
|
295
264
|
}
|
|
296
265
|
|
|
297
266
|
/**
|
|
298
|
-
* Get the permissions assigned to a user in a tenant, including those assigned transively.
|
|
267
|
+
* Get the permissions assigned to a user in a tenant, including those assigned transively. The result list can be optionally filtered by the one or both of the query parameters: implies and impliedBy. When implies is set, the filter _implies_ each entry in the result set. When impliedBy is set, each entry in the result set is _implied by_ the filter. Below are some examples. Consider a user that is assigned these permissions: stream:dev:read:project1 stream:dev:read,write:project1 stream:dev:read,write,exec:project1 **Using the *implies* Query Parameter** When _implies=stream:dev:*:project1_, this endpoint returns: stream:dev:read:project1 stream:dev:read,write:project1 stream:dev:read,write,exec:project1 When _implies=stream:dev:write:project1_, this endpoint returns an empty list. **Using the *impliedBy* Query Parameter** When _impliedBy=stream:dev:*:project1_, this endpoint returns an empty list. When _impliedBy=stream:dev:write:project1_, this endpoint returns: stream:dev:read,write:project1 stream:dev:read,write,exec:project1 This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
299
268
|
*/
|
|
300
|
-
async getUserPermsRaw(requestParameters: GetUserPermsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
301
|
-
if (requestParameters
|
|
302
|
-
throw new runtime.RequiredError(
|
|
269
|
+
async getUserPermsRaw(requestParameters: GetUserPermsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
270
|
+
if (requestParameters['user'] == null) {
|
|
271
|
+
throw new runtime.RequiredError(
|
|
272
|
+
'user',
|
|
273
|
+
'Required parameter "user" was null or undefined when calling getUserPerms().'
|
|
274
|
+
);
|
|
303
275
|
}
|
|
304
276
|
|
|
305
277
|
const queryParameters: any = {};
|
|
306
278
|
|
|
307
|
-
if (requestParameters
|
|
308
|
-
queryParameters['tenant'] = requestParameters
|
|
279
|
+
if (requestParameters['tenant'] != null) {
|
|
280
|
+
queryParameters['tenant'] = requestParameters['tenant'];
|
|
309
281
|
}
|
|
310
282
|
|
|
311
|
-
if (requestParameters
|
|
312
|
-
queryParameters['implies'] = requestParameters
|
|
283
|
+
if (requestParameters['implies'] != null) {
|
|
284
|
+
queryParameters['implies'] = requestParameters['implies'];
|
|
313
285
|
}
|
|
314
286
|
|
|
315
|
-
if (requestParameters
|
|
316
|
-
queryParameters['impliedBy'] = requestParameters
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
if (requestParameters.pretty !== undefined) {
|
|
320
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
287
|
+
if (requestParameters['impliedBy'] != null) {
|
|
288
|
+
queryParameters['impliedBy'] = requestParameters['impliedBy'];
|
|
321
289
|
}
|
|
322
290
|
|
|
323
291
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
324
292
|
|
|
325
293
|
if (this.configuration && this.configuration.apiKey) {
|
|
326
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
294
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
327
295
|
}
|
|
328
296
|
|
|
329
297
|
const response = await this.request({
|
|
330
|
-
path: `/security/user/perms/{user}`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters
|
|
298
|
+
path: `/security/user/perms/{user}`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters['user']))),
|
|
331
299
|
method: 'GET',
|
|
332
300
|
headers: headerParameters,
|
|
333
301
|
query: queryParameters,
|
|
@@ -337,39 +305,38 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
337
305
|
}
|
|
338
306
|
|
|
339
307
|
/**
|
|
340
|
-
* Get the permissions assigned to a user in a tenant, including those assigned transively.
|
|
308
|
+
* Get the permissions assigned to a user in a tenant, including those assigned transively. The result list can be optionally filtered by the one or both of the query parameters: implies and impliedBy. When implies is set, the filter _implies_ each entry in the result set. When impliedBy is set, each entry in the result set is _implied by_ the filter. Below are some examples. Consider a user that is assigned these permissions: stream:dev:read:project1 stream:dev:read,write:project1 stream:dev:read,write,exec:project1 **Using the *implies* Query Parameter** When _implies=stream:dev:*:project1_, this endpoint returns: stream:dev:read:project1 stream:dev:read,write:project1 stream:dev:read,write,exec:project1 When _implies=stream:dev:write:project1_, this endpoint returns an empty list. **Using the *impliedBy* Query Parameter** When _impliedBy=stream:dev:*:project1_, this endpoint returns an empty list. When _impliedBy=stream:dev:write:project1_, this endpoint returns: stream:dev:read,write:project1 stream:dev:read,write,exec:project1 This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
341
309
|
*/
|
|
342
|
-
async getUserPerms(requestParameters: GetUserPermsRequest, initOverrides?: RequestInit): Promise<RespNameArray> {
|
|
310
|
+
async getUserPerms(requestParameters: GetUserPermsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespNameArray> {
|
|
343
311
|
const response = await this.getUserPermsRaw(requestParameters, initOverrides);
|
|
344
312
|
return await response.value();
|
|
345
313
|
}
|
|
346
314
|
|
|
347
315
|
/**
|
|
348
|
-
* Get the roles assigned to a user in the specified tenant, including those assigned transively. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
316
|
+
* Get the roles assigned to a user in the specified tenant, including those assigned transively. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
349
317
|
*/
|
|
350
|
-
async getUserRolesRaw(requestParameters: GetUserRolesRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
351
|
-
if (requestParameters
|
|
352
|
-
throw new runtime.RequiredError(
|
|
318
|
+
async getUserRolesRaw(requestParameters: GetUserRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
319
|
+
if (requestParameters['user'] == null) {
|
|
320
|
+
throw new runtime.RequiredError(
|
|
321
|
+
'user',
|
|
322
|
+
'Required parameter "user" was null or undefined when calling getUserRoles().'
|
|
323
|
+
);
|
|
353
324
|
}
|
|
354
325
|
|
|
355
326
|
const queryParameters: any = {};
|
|
356
327
|
|
|
357
|
-
if (requestParameters
|
|
358
|
-
queryParameters['tenant'] = requestParameters
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
if (requestParameters.pretty !== undefined) {
|
|
362
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
328
|
+
if (requestParameters['tenant'] != null) {
|
|
329
|
+
queryParameters['tenant'] = requestParameters['tenant'];
|
|
363
330
|
}
|
|
364
331
|
|
|
365
332
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
366
333
|
|
|
367
334
|
if (this.configuration && this.configuration.apiKey) {
|
|
368
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
335
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
369
336
|
}
|
|
370
337
|
|
|
371
338
|
const response = await this.request({
|
|
372
|
-
path: `/security/user/roles/{user}`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters
|
|
339
|
+
path: `/security/user/roles/{user}`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters['user']))),
|
|
373
340
|
method: 'GET',
|
|
374
341
|
headers: headerParameters,
|
|
375
342
|
query: queryParameters,
|
|
@@ -379,39 +346,38 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
379
346
|
}
|
|
380
347
|
|
|
381
348
|
/**
|
|
382
|
-
* Get the roles assigned to a user in the specified tenant, including those assigned transively. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
349
|
+
* Get the roles assigned to a user in the specified tenant, including those assigned transively. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
383
350
|
*/
|
|
384
|
-
async getUserRoles(requestParameters: GetUserRolesRequest, initOverrides?: RequestInit): Promise<RespNameArray> {
|
|
351
|
+
async getUserRoles(requestParameters: GetUserRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespNameArray> {
|
|
385
352
|
const response = await this.getUserRolesRaw(requestParameters, initOverrides);
|
|
386
353
|
return await response.value();
|
|
387
354
|
}
|
|
388
355
|
|
|
389
356
|
/**
|
|
390
|
-
* Get all users in a tenant assigned a permission.
|
|
357
|
+
* Get all users in a tenant assigned a permission. The permSpec parameter is a permission specification that uses colons as separators, the asterisk as a wildcard character and commas to define lists. Here are examples of permission specifications: system:mytenant:read:mysystem system:mytenant:*:mysystem system:mytenant files:mytenant:read,write:mysystems This method recognizes the percent sign (%) as a string wildcard only in the context of database searching. If a percent sign (%) appears in the permSpec it is interpreted as a zero or more character wildcard. For example, the following specification would match the first three of the above example specifications but not the fourth: system:mytenant:% The wildcard character cannot appear as the first character in the permSpec. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
391
358
|
*/
|
|
392
|
-
async getUsersWithPermissionRaw(requestParameters: GetUsersWithPermissionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
393
|
-
if (requestParameters
|
|
394
|
-
throw new runtime.RequiredError(
|
|
359
|
+
async getUsersWithPermissionRaw(requestParameters: GetUsersWithPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
360
|
+
if (requestParameters['permSpec'] == null) {
|
|
361
|
+
throw new runtime.RequiredError(
|
|
362
|
+
'permSpec',
|
|
363
|
+
'Required parameter "permSpec" was null or undefined when calling getUsersWithPermission().'
|
|
364
|
+
);
|
|
395
365
|
}
|
|
396
366
|
|
|
397
367
|
const queryParameters: any = {};
|
|
398
368
|
|
|
399
|
-
if (requestParameters
|
|
400
|
-
queryParameters['tenant'] = requestParameters
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
if (requestParameters.pretty !== undefined) {
|
|
404
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
369
|
+
if (requestParameters['tenant'] != null) {
|
|
370
|
+
queryParameters['tenant'] = requestParameters['tenant'];
|
|
405
371
|
}
|
|
406
372
|
|
|
407
373
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
408
374
|
|
|
409
375
|
if (this.configuration && this.configuration.apiKey) {
|
|
410
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
376
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
411
377
|
}
|
|
412
378
|
|
|
413
379
|
const response = await this.request({
|
|
414
|
-
path: `/security/user/withPermission/{permSpec}`.replace(`{${"permSpec"}}`, encodeURIComponent(String(requestParameters
|
|
380
|
+
path: `/security/user/withPermission/{permSpec}`.replace(`{${"permSpec"}}`, encodeURIComponent(String(requestParameters['permSpec']))),
|
|
415
381
|
method: 'GET',
|
|
416
382
|
headers: headerParameters,
|
|
417
383
|
query: queryParameters,
|
|
@@ -421,39 +387,42 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
421
387
|
}
|
|
422
388
|
|
|
423
389
|
/**
|
|
424
|
-
* Get all users in a tenant assigned a permission.
|
|
390
|
+
* Get all users in a tenant assigned a permission. The permSpec parameter is a permission specification that uses colons as separators, the asterisk as a wildcard character and commas to define lists. Here are examples of permission specifications: system:mytenant:read:mysystem system:mytenant:*:mysystem system:mytenant files:mytenant:read,write:mysystems This method recognizes the percent sign (%) as a string wildcard only in the context of database searching. If a percent sign (%) appears in the permSpec it is interpreted as a zero or more character wildcard. For example, the following specification would match the first three of the above example specifications but not the fourth: system:mytenant:% The wildcard character cannot appear as the first character in the permSpec. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
425
391
|
*/
|
|
426
|
-
async getUsersWithPermission(requestParameters: GetUsersWithPermissionRequest, initOverrides?: RequestInit): Promise<RespNameArray> {
|
|
392
|
+
async getUsersWithPermission(requestParameters: GetUsersWithPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespNameArray> {
|
|
427
393
|
const response = await this.getUsersWithPermissionRaw(requestParameters, initOverrides);
|
|
428
394
|
return await response.value();
|
|
429
395
|
}
|
|
430
396
|
|
|
431
397
|
/**
|
|
432
|
-
* Get all users assigned a role.
|
|
398
|
+
* Get all users assigned a role. The role must exist in the tenant. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
433
399
|
*/
|
|
434
|
-
async getUsersWithRoleRaw(requestParameters: GetUsersWithRoleRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
435
|
-
if (requestParameters
|
|
436
|
-
throw new runtime.RequiredError(
|
|
400
|
+
async getUsersWithRoleRaw(requestParameters: GetUsersWithRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespNameArray>> {
|
|
401
|
+
if (requestParameters['roleName'] == null) {
|
|
402
|
+
throw new runtime.RequiredError(
|
|
403
|
+
'roleName',
|
|
404
|
+
'Required parameter "roleName" was null or undefined when calling getUsersWithRole().'
|
|
405
|
+
);
|
|
437
406
|
}
|
|
438
407
|
|
|
439
408
|
const queryParameters: any = {};
|
|
440
409
|
|
|
441
|
-
if (requestParameters
|
|
442
|
-
queryParameters['tenant'] = requestParameters
|
|
410
|
+
if (requestParameters['tenant'] != null) {
|
|
411
|
+
queryParameters['tenant'] = requestParameters['tenant'];
|
|
443
412
|
}
|
|
444
413
|
|
|
445
|
-
if (requestParameters
|
|
446
|
-
queryParameters['
|
|
414
|
+
if (requestParameters['roleType'] != null) {
|
|
415
|
+
queryParameters['roleType'] = requestParameters['roleType'];
|
|
447
416
|
}
|
|
448
417
|
|
|
449
418
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
450
419
|
|
|
451
420
|
if (this.configuration && this.configuration.apiKey) {
|
|
452
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
421
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
453
422
|
}
|
|
454
423
|
|
|
455
424
|
const response = await this.request({
|
|
456
|
-
path: `/security/user/withRole/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters
|
|
425
|
+
path: `/security/user/withRole/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters['roleName']))),
|
|
457
426
|
method: 'GET',
|
|
458
427
|
headers: headerParameters,
|
|
459
428
|
query: queryParameters,
|
|
@@ -463,74 +432,32 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
463
432
|
}
|
|
464
433
|
|
|
465
434
|
/**
|
|
466
|
-
* Get all users assigned a role.
|
|
435
|
+
* Get all users assigned a role. The role must exist in the tenant. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
467
436
|
*/
|
|
468
|
-
async getUsersWithRole(requestParameters: GetUsersWithRoleRequest, initOverrides?: RequestInit): Promise<RespNameArray> {
|
|
437
|
+
async getUsersWithRole(requestParameters: GetUsersWithRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespNameArray> {
|
|
469
438
|
const response = await this.getUsersWithRoleRaw(requestParameters, initOverrides);
|
|
470
439
|
return await response.value();
|
|
471
440
|
}
|
|
472
441
|
|
|
473
442
|
/**
|
|
474
|
-
* Grant a user the
|
|
443
|
+
* Grant a user the specified role. A valid tenant and user must be specified in the request body. The type of role to grant may be specified in the request body. Allowed types are USER, TENANT_ADMIN and RESTRICTED_SVC. Default type is USER. The user and the role must be in the same tenant. For roles of type USER the request is authorized only if the requestor is the role owner, a tenant administrator or a site administrator. For roles of type TENANT_ADMIN the requestor must a tenant or site administrator. For roles of type RESTRICTED_SVC the requestor must a site administrator.
|
|
475
444
|
*/
|
|
476
|
-
async
|
|
477
|
-
if (requestParameters
|
|
478
|
-
throw new runtime.RequiredError(
|
|
445
|
+
async grantRoleRaw(requestParameters: GrantRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
446
|
+
if (requestParameters['reqGrantRole'] == null) {
|
|
447
|
+
throw new runtime.RequiredError(
|
|
448
|
+
'reqGrantRole',
|
|
449
|
+
'Required parameter "reqGrantRole" was null or undefined when calling grantRole().'
|
|
450
|
+
);
|
|
479
451
|
}
|
|
480
452
|
|
|
481
453
|
const queryParameters: any = {};
|
|
482
454
|
|
|
483
|
-
if (requestParameters.pretty !== undefined) {
|
|
484
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
455
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
488
456
|
|
|
489
457
|
headerParameters['Content-Type'] = 'application/json';
|
|
490
458
|
|
|
491
459
|
if (this.configuration && this.configuration.apiKey) {
|
|
492
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
const response = await this.request({
|
|
496
|
-
path: `/security/user/grantAdminRole`,
|
|
497
|
-
method: 'POST',
|
|
498
|
-
headers: headerParameters,
|
|
499
|
-
query: queryParameters,
|
|
500
|
-
body: ReqGrantAdminRoleToJSON(requestParameters.reqGrantAdminRole),
|
|
501
|
-
}, initOverrides);
|
|
502
|
-
|
|
503
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Grant a user the tenant administrator role. A valid tenant and user must be specified in the request body. The user specified in the JWT must be an administrator in the tenant specified in the request body.
|
|
508
|
-
*/
|
|
509
|
-
async grantAdminRole(requestParameters: GrantAdminRoleRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
|
|
510
|
-
const response = await this.grantAdminRoleRaw(requestParameters, initOverrides);
|
|
511
|
-
return await response.value();
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* Grant a user the specified role. A valid tenant and user must be specified in the request body. This request is authorized only if the requestor is the role owner or an administrator. The user and the role must be in the same tenant.
|
|
516
|
-
*/
|
|
517
|
-
async grantRoleRaw(requestParameters: GrantRoleRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
518
|
-
if (requestParameters.reqGrantUserRole === null || requestParameters.reqGrantUserRole === undefined) {
|
|
519
|
-
throw new runtime.RequiredError('reqGrantUserRole','Required parameter requestParameters.reqGrantUserRole was null or undefined when calling grantRole.');
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
const queryParameters: any = {};
|
|
523
|
-
|
|
524
|
-
if (requestParameters.pretty !== undefined) {
|
|
525
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
529
|
-
|
|
530
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
531
|
-
|
|
532
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
533
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
460
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
534
461
|
}
|
|
535
462
|
|
|
536
463
|
const response = await this.request({
|
|
@@ -538,40 +465,39 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
538
465
|
method: 'POST',
|
|
539
466
|
headers: headerParameters,
|
|
540
467
|
query: queryParameters,
|
|
541
|
-
body:
|
|
468
|
+
body: ReqGrantRoleToJSON(requestParameters['reqGrantRole']),
|
|
542
469
|
}, initOverrides);
|
|
543
470
|
|
|
544
471
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
|
|
545
472
|
}
|
|
546
473
|
|
|
547
474
|
/**
|
|
548
|
-
* Grant a user the specified role.
|
|
475
|
+
* Grant a user the specified role. A valid tenant and user must be specified in the request body. The type of role to grant may be specified in the request body. Allowed types are USER, TENANT_ADMIN and RESTRICTED_SVC. Default type is USER. The user and the role must be in the same tenant. For roles of type USER the request is authorized only if the requestor is the role owner, a tenant administrator or a site administrator. For roles of type TENANT_ADMIN the requestor must a tenant or site administrator. For roles of type RESTRICTED_SVC the requestor must a site administrator.
|
|
549
476
|
*/
|
|
550
|
-
async grantRole(requestParameters: GrantRoleRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
|
|
477
|
+
async grantRole(requestParameters: GrantRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
|
|
551
478
|
const response = await this.grantRoleRaw(requestParameters, initOverrides);
|
|
552
479
|
return await response.value();
|
|
553
480
|
}
|
|
554
481
|
|
|
555
482
|
/**
|
|
556
|
-
* Grant a user the specified role containing the specified permission.
|
|
483
|
+
* Grant a user the specified role containing the specified permission. This compound request first adds the permission to the role if it is not already a member of the role and then assigns the role to the user. The change count returned can range from zero to two depending on how many insertions were actually required. The user and the role must be in the same tenant. For roles of type USER the request is authorized only if the requestor is the role owner, a tenant administrator or a site administrator. For roles of type TENANT_ADMIN the requestor must a tenant or site administrator. For roles of type RESTRICTED_SVC the requestor must a site administrator.
|
|
557
484
|
*/
|
|
558
|
-
async grantRoleWithPermissionRaw(requestParameters: GrantRoleWithPermissionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
559
|
-
if (requestParameters
|
|
560
|
-
throw new runtime.RequiredError(
|
|
485
|
+
async grantRoleWithPermissionRaw(requestParameters: GrantRoleWithPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
486
|
+
if (requestParameters['reqGrantRoleWithPermission'] == null) {
|
|
487
|
+
throw new runtime.RequiredError(
|
|
488
|
+
'reqGrantRoleWithPermission',
|
|
489
|
+
'Required parameter "reqGrantRoleWithPermission" was null or undefined when calling grantRoleWithPermission().'
|
|
490
|
+
);
|
|
561
491
|
}
|
|
562
492
|
|
|
563
493
|
const queryParameters: any = {};
|
|
564
494
|
|
|
565
|
-
if (requestParameters.pretty !== undefined) {
|
|
566
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
495
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
570
496
|
|
|
571
497
|
headerParameters['Content-Type'] = 'application/json';
|
|
572
498
|
|
|
573
499
|
if (this.configuration && this.configuration.apiKey) {
|
|
574
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
500
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
575
501
|
}
|
|
576
502
|
|
|
577
503
|
const response = await this.request({
|
|
@@ -579,40 +505,39 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
579
505
|
method: 'POST',
|
|
580
506
|
headers: headerParameters,
|
|
581
507
|
query: queryParameters,
|
|
582
|
-
body:
|
|
508
|
+
body: ReqGrantRoleWithPermissionToJSON(requestParameters['reqGrantRoleWithPermission']),
|
|
583
509
|
}, initOverrides);
|
|
584
510
|
|
|
585
511
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
|
|
586
512
|
}
|
|
587
513
|
|
|
588
514
|
/**
|
|
589
|
-
* Grant a user the specified role containing the specified permission.
|
|
515
|
+
* Grant a user the specified role containing the specified permission. This compound request first adds the permission to the role if it is not already a member of the role and then assigns the role to the user. The change count returned can range from zero to two depending on how many insertions were actually required. The user and the role must be in the same tenant. For roles of type USER the request is authorized only if the requestor is the role owner, a tenant administrator or a site administrator. For roles of type TENANT_ADMIN the requestor must a tenant or site administrator. For roles of type RESTRICTED_SVC the requestor must a site administrator.
|
|
590
516
|
*/
|
|
591
|
-
async grantRoleWithPermission(requestParameters: GrantRoleWithPermissionRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
|
|
517
|
+
async grantRoleWithPermission(requestParameters: GrantRoleWithPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
|
|
592
518
|
const response = await this.grantRoleWithPermissionRaw(requestParameters, initOverrides);
|
|
593
519
|
return await response.value();
|
|
594
520
|
}
|
|
595
521
|
|
|
596
522
|
/**
|
|
597
|
-
* Grant a user the specified permission by assigning that permission to to the user\'s default role.
|
|
523
|
+
* Grant a user the specified permission by assigning that permission to to the user\'s default role. If the user\'s default role does not exist it will be created. A user\'s default role name is discoverable by calling either of the user/defaultRole or role/defaultRole endpoints. The change count returned can range from zero to three depending on how many insertions and updates were actually required. The caller must be an administrator or service allowed to perform updates in the user\'s tenant.
|
|
598
524
|
*/
|
|
599
|
-
async grantUserPermissionRaw(requestParameters: GrantUserPermissionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
600
|
-
if (requestParameters
|
|
601
|
-
throw new runtime.RequiredError(
|
|
525
|
+
async grantUserPermissionRaw(requestParameters: GrantUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
526
|
+
if (requestParameters['reqGrantUserPermission'] == null) {
|
|
527
|
+
throw new runtime.RequiredError(
|
|
528
|
+
'reqGrantUserPermission',
|
|
529
|
+
'Required parameter "reqGrantUserPermission" was null or undefined when calling grantUserPermission().'
|
|
530
|
+
);
|
|
602
531
|
}
|
|
603
532
|
|
|
604
533
|
const queryParameters: any = {};
|
|
605
534
|
|
|
606
|
-
if (requestParameters.pretty !== undefined) {
|
|
607
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
535
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
611
536
|
|
|
612
537
|
headerParameters['Content-Type'] = 'application/json';
|
|
613
538
|
|
|
614
539
|
if (this.configuration && this.configuration.apiKey) {
|
|
615
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
540
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
616
541
|
}
|
|
617
542
|
|
|
618
543
|
const response = await this.request({
|
|
@@ -620,40 +545,39 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
620
545
|
method: 'POST',
|
|
621
546
|
headers: headerParameters,
|
|
622
547
|
query: queryParameters,
|
|
623
|
-
body: ReqGrantUserPermissionToJSON(requestParameters
|
|
548
|
+
body: ReqGrantUserPermissionToJSON(requestParameters['reqGrantUserPermission']),
|
|
624
549
|
}, initOverrides);
|
|
625
550
|
|
|
626
551
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
|
|
627
552
|
}
|
|
628
553
|
|
|
629
554
|
/**
|
|
630
|
-
* Grant a user the specified permission by assigning that permission to to the user\'s default role.
|
|
555
|
+
* Grant a user the specified permission by assigning that permission to to the user\'s default role. If the user\'s default role does not exist it will be created. A user\'s default role name is discoverable by calling either of the user/defaultRole or role/defaultRole endpoints. The change count returned can range from zero to three depending on how many insertions and updates were actually required. The caller must be an administrator or service allowed to perform updates in the user\'s tenant.
|
|
631
556
|
*/
|
|
632
|
-
async grantUserPermission(requestParameters: GrantUserPermissionRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
|
|
557
|
+
async grantUserPermission(requestParameters: GrantUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
|
|
633
558
|
const response = await this.grantUserPermissionRaw(requestParameters, initOverrides);
|
|
634
559
|
return await response.value();
|
|
635
560
|
}
|
|
636
561
|
|
|
637
562
|
/**
|
|
638
|
-
* Check whether a user in a tenant has been assigned the specified role, either directly or transitively. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
563
|
+
* Check whether a user in a tenant has been assigned the specified role, either directly or transitively. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
639
564
|
*/
|
|
640
|
-
async hasRoleRaw(requestParameters: HasRoleRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
641
|
-
if (requestParameters
|
|
642
|
-
throw new runtime.RequiredError(
|
|
565
|
+
async hasRoleRaw(requestParameters: HasRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
566
|
+
if (requestParameters['reqUserHasRole'] == null) {
|
|
567
|
+
throw new runtime.RequiredError(
|
|
568
|
+
'reqUserHasRole',
|
|
569
|
+
'Required parameter "reqUserHasRole" was null or undefined when calling hasRole().'
|
|
570
|
+
);
|
|
643
571
|
}
|
|
644
572
|
|
|
645
573
|
const queryParameters: any = {};
|
|
646
574
|
|
|
647
|
-
if (requestParameters.pretty !== undefined) {
|
|
648
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
575
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
652
576
|
|
|
653
577
|
headerParameters['Content-Type'] = 'application/json';
|
|
654
578
|
|
|
655
579
|
if (this.configuration && this.configuration.apiKey) {
|
|
656
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
580
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
657
581
|
}
|
|
658
582
|
|
|
659
583
|
const response = await this.request({
|
|
@@ -661,40 +585,39 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
661
585
|
method: 'POST',
|
|
662
586
|
headers: headerParameters,
|
|
663
587
|
query: queryParameters,
|
|
664
|
-
body: ReqUserHasRoleToJSON(requestParameters
|
|
588
|
+
body: ReqUserHasRoleToJSON(requestParameters['reqUserHasRole']),
|
|
665
589
|
}, initOverrides);
|
|
666
590
|
|
|
667
591
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
|
|
668
592
|
}
|
|
669
593
|
|
|
670
594
|
/**
|
|
671
|
-
* Check whether a user in a tenant has been assigned the specified role, either directly or transitively. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
595
|
+
* Check whether a user in a tenant has been assigned the specified role, either directly or transitively. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
672
596
|
*/
|
|
673
|
-
async hasRole(requestParameters: HasRoleRequest, initOverrides?: RequestInit): Promise<RespAuthorized> {
|
|
597
|
+
async hasRole(requestParameters: HasRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
|
|
674
598
|
const response = await this.hasRoleRaw(requestParameters, initOverrides);
|
|
675
599
|
return await response.value();
|
|
676
600
|
}
|
|
677
601
|
|
|
678
602
|
/**
|
|
679
|
-
* Check whether a user in a tenant has been assigned all of the roles specified in the request body. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
603
|
+
* Check whether a user in a tenant has been assigned all of the roles specified in the request body. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
680
604
|
*/
|
|
681
|
-
async hasRoleAllRaw(requestParameters: HasRoleAllRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
682
|
-
if (requestParameters
|
|
683
|
-
throw new runtime.RequiredError(
|
|
605
|
+
async hasRoleAllRaw(requestParameters: HasRoleAllRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
606
|
+
if (requestParameters['reqUserHasRoleMulti'] == null) {
|
|
607
|
+
throw new runtime.RequiredError(
|
|
608
|
+
'reqUserHasRoleMulti',
|
|
609
|
+
'Required parameter "reqUserHasRoleMulti" was null or undefined when calling hasRoleAll().'
|
|
610
|
+
);
|
|
684
611
|
}
|
|
685
612
|
|
|
686
613
|
const queryParameters: any = {};
|
|
687
614
|
|
|
688
|
-
if (requestParameters.pretty !== undefined) {
|
|
689
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
615
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
693
616
|
|
|
694
617
|
headerParameters['Content-Type'] = 'application/json';
|
|
695
618
|
|
|
696
619
|
if (this.configuration && this.configuration.apiKey) {
|
|
697
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
620
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
698
621
|
}
|
|
699
622
|
|
|
700
623
|
const response = await this.request({
|
|
@@ -702,40 +625,39 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
702
625
|
method: 'POST',
|
|
703
626
|
headers: headerParameters,
|
|
704
627
|
query: queryParameters,
|
|
705
|
-
body: ReqUserHasRoleMultiToJSON(requestParameters
|
|
628
|
+
body: ReqUserHasRoleMultiToJSON(requestParameters['reqUserHasRoleMulti']),
|
|
706
629
|
}, initOverrides);
|
|
707
630
|
|
|
708
631
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
|
|
709
632
|
}
|
|
710
633
|
|
|
711
634
|
/**
|
|
712
|
-
* Check whether a user in a tenant has been assigned all of the roles specified in the request body. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
635
|
+
* Check whether a user in a tenant has been assigned all of the roles specified in the request body. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
713
636
|
*/
|
|
714
|
-
async hasRoleAll(requestParameters: HasRoleAllRequest, initOverrides?: RequestInit): Promise<RespAuthorized> {
|
|
637
|
+
async hasRoleAll(requestParameters: HasRoleAllRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
|
|
715
638
|
const response = await this.hasRoleAllRaw(requestParameters, initOverrides);
|
|
716
639
|
return await response.value();
|
|
717
640
|
}
|
|
718
641
|
|
|
719
642
|
/**
|
|
720
|
-
* Check whether a user in a tenant has been assigned any of the roles specified in the request body. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
643
|
+
* Check whether a user in a tenant has been assigned any of the roles specified in the request body. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
721
644
|
*/
|
|
722
|
-
async hasRoleAnyRaw(requestParameters: HasRoleAnyRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
723
|
-
if (requestParameters
|
|
724
|
-
throw new runtime.RequiredError(
|
|
645
|
+
async hasRoleAnyRaw(requestParameters: HasRoleAnyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
646
|
+
if (requestParameters['reqUserHasRoleMulti'] == null) {
|
|
647
|
+
throw new runtime.RequiredError(
|
|
648
|
+
'reqUserHasRoleMulti',
|
|
649
|
+
'Required parameter "reqUserHasRoleMulti" was null or undefined when calling hasRoleAny().'
|
|
650
|
+
);
|
|
725
651
|
}
|
|
726
652
|
|
|
727
653
|
const queryParameters: any = {};
|
|
728
654
|
|
|
729
|
-
if (requestParameters.pretty !== undefined) {
|
|
730
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
655
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
734
656
|
|
|
735
657
|
headerParameters['Content-Type'] = 'application/json';
|
|
736
658
|
|
|
737
659
|
if (this.configuration && this.configuration.apiKey) {
|
|
738
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
660
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
739
661
|
}
|
|
740
662
|
|
|
741
663
|
const response = await this.request({
|
|
@@ -743,40 +665,39 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
743
665
|
method: 'POST',
|
|
744
666
|
headers: headerParameters,
|
|
745
667
|
query: queryParameters,
|
|
746
|
-
body: ReqUserHasRoleMultiToJSON(requestParameters
|
|
668
|
+
body: ReqUserHasRoleMultiToJSON(requestParameters['reqUserHasRoleMulti']),
|
|
747
669
|
}, initOverrides);
|
|
748
670
|
|
|
749
671
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
|
|
750
672
|
}
|
|
751
673
|
|
|
752
674
|
/**
|
|
753
|
-
* Check whether a user in a tenant has been assigned any of the roles specified in the request body. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
675
|
+
* Check whether a user in a tenant has been assigned any of the roles specified in the request body. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
754
676
|
*/
|
|
755
|
-
async hasRoleAny(requestParameters: HasRoleAnyRequest, initOverrides?: RequestInit): Promise<RespAuthorized> {
|
|
677
|
+
async hasRoleAny(requestParameters: HasRoleAnyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
|
|
756
678
|
const response = await this.hasRoleAnyRaw(requestParameters, initOverrides);
|
|
757
679
|
return await response.value();
|
|
758
680
|
}
|
|
759
681
|
|
|
760
682
|
/**
|
|
761
|
-
* Check whether a user in a tenant has been assigned the tenant administrator role, either directly or transitively. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
683
|
+
* Check whether a user in a tenant has been assigned the tenant administrator role, either directly or transitively. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
762
684
|
*/
|
|
763
|
-
async isAdminRaw(requestParameters: IsAdminRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
764
|
-
if (requestParameters
|
|
765
|
-
throw new runtime.RequiredError(
|
|
685
|
+
async isAdminRaw(requestParameters: IsAdminRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
686
|
+
if (requestParameters['reqUserIsAdmin'] == null) {
|
|
687
|
+
throw new runtime.RequiredError(
|
|
688
|
+
'reqUserIsAdmin',
|
|
689
|
+
'Required parameter "reqUserIsAdmin" was null or undefined when calling isAdmin().'
|
|
690
|
+
);
|
|
766
691
|
}
|
|
767
692
|
|
|
768
693
|
const queryParameters: any = {};
|
|
769
694
|
|
|
770
|
-
if (requestParameters.pretty !== undefined) {
|
|
771
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
695
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
775
696
|
|
|
776
697
|
headerParameters['Content-Type'] = 'application/json';
|
|
777
698
|
|
|
778
699
|
if (this.configuration && this.configuration.apiKey) {
|
|
779
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
700
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
780
701
|
}
|
|
781
702
|
|
|
782
703
|
const response = await this.request({
|
|
@@ -784,40 +705,39 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
784
705
|
method: 'POST',
|
|
785
706
|
headers: headerParameters,
|
|
786
707
|
query: queryParameters,
|
|
787
|
-
body: ReqUserIsAdminToJSON(requestParameters
|
|
708
|
+
body: ReqUserIsAdminToJSON(requestParameters['reqUserIsAdmin']),
|
|
788
709
|
}, initOverrides);
|
|
789
710
|
|
|
790
711
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
|
|
791
712
|
}
|
|
792
713
|
|
|
793
714
|
/**
|
|
794
|
-
* Check whether a user in a tenant has been assigned the tenant administrator role, either directly or transitively. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
715
|
+
* Check whether a user in a tenant has been assigned the tenant administrator role, either directly or transitively. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
795
716
|
*/
|
|
796
|
-
async isAdmin(requestParameters: IsAdminRequest, initOverrides?: RequestInit): Promise<RespAuthorized> {
|
|
717
|
+
async isAdmin(requestParameters: IsAdminRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
|
|
797
718
|
const response = await this.isAdminRaw(requestParameters, initOverrides);
|
|
798
719
|
return await response.value();
|
|
799
720
|
}
|
|
800
721
|
|
|
801
722
|
/**
|
|
802
|
-
* Check whether specified permission matches a permission assigned to the user, either directly or transitively. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
723
|
+
* Check whether specified permission matches a permission assigned to the user, either directly or transitively. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
803
724
|
*/
|
|
804
|
-
async isPermittedRaw(requestParameters: IsPermittedRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
805
|
-
if (requestParameters
|
|
806
|
-
throw new runtime.RequiredError(
|
|
725
|
+
async isPermittedRaw(requestParameters: IsPermittedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
726
|
+
if (requestParameters['reqUserIsPermitted'] == null) {
|
|
727
|
+
throw new runtime.RequiredError(
|
|
728
|
+
'reqUserIsPermitted',
|
|
729
|
+
'Required parameter "reqUserIsPermitted" was null or undefined when calling isPermitted().'
|
|
730
|
+
);
|
|
807
731
|
}
|
|
808
732
|
|
|
809
733
|
const queryParameters: any = {};
|
|
810
734
|
|
|
811
|
-
if (requestParameters.pretty !== undefined) {
|
|
812
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
735
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
816
736
|
|
|
817
737
|
headerParameters['Content-Type'] = 'application/json';
|
|
818
738
|
|
|
819
739
|
if (this.configuration && this.configuration.apiKey) {
|
|
820
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
740
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
821
741
|
}
|
|
822
742
|
|
|
823
743
|
const response = await this.request({
|
|
@@ -825,40 +745,39 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
825
745
|
method: 'POST',
|
|
826
746
|
headers: headerParameters,
|
|
827
747
|
query: queryParameters,
|
|
828
|
-
body: ReqUserIsPermittedToJSON(requestParameters
|
|
748
|
+
body: ReqUserIsPermittedToJSON(requestParameters['reqUserIsPermitted']),
|
|
829
749
|
}, initOverrides);
|
|
830
750
|
|
|
831
751
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
|
|
832
752
|
}
|
|
833
753
|
|
|
834
754
|
/**
|
|
835
|
-
* Check whether specified permission matches a permission assigned to the user, either directly or transitively. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
755
|
+
* Check whether specified permission matches a permission assigned to the user, either directly or transitively. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
836
756
|
*/
|
|
837
|
-
async isPermitted(requestParameters: IsPermittedRequest, initOverrides?: RequestInit): Promise<RespAuthorized> {
|
|
757
|
+
async isPermitted(requestParameters: IsPermittedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
|
|
838
758
|
const response = await this.isPermittedRaw(requestParameters, initOverrides);
|
|
839
759
|
return await response.value();
|
|
840
760
|
}
|
|
841
761
|
|
|
842
762
|
/**
|
|
843
|
-
* Check whether a user\'s permissions satisfy all of the permission specifications contained in the request body. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
763
|
+
* Check whether a user\'s permissions satisfy all of the permission specifications contained in the request body. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
844
764
|
*/
|
|
845
|
-
async isPermittedAllRaw(requestParameters: IsPermittedAllRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
846
|
-
if (requestParameters
|
|
847
|
-
throw new runtime.RequiredError(
|
|
765
|
+
async isPermittedAllRaw(requestParameters: IsPermittedAllRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
766
|
+
if (requestParameters['reqUserIsPermittedMulti'] == null) {
|
|
767
|
+
throw new runtime.RequiredError(
|
|
768
|
+
'reqUserIsPermittedMulti',
|
|
769
|
+
'Required parameter "reqUserIsPermittedMulti" was null or undefined when calling isPermittedAll().'
|
|
770
|
+
);
|
|
848
771
|
}
|
|
849
772
|
|
|
850
773
|
const queryParameters: any = {};
|
|
851
774
|
|
|
852
|
-
if (requestParameters.pretty !== undefined) {
|
|
853
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
775
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
857
776
|
|
|
858
777
|
headerParameters['Content-Type'] = 'application/json';
|
|
859
778
|
|
|
860
779
|
if (this.configuration && this.configuration.apiKey) {
|
|
861
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
780
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
862
781
|
}
|
|
863
782
|
|
|
864
783
|
const response = await this.request({
|
|
@@ -866,40 +785,39 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
866
785
|
method: 'POST',
|
|
867
786
|
headers: headerParameters,
|
|
868
787
|
query: queryParameters,
|
|
869
|
-
body: ReqUserIsPermittedMultiToJSON(requestParameters
|
|
788
|
+
body: ReqUserIsPermittedMultiToJSON(requestParameters['reqUserIsPermittedMulti']),
|
|
870
789
|
}, initOverrides);
|
|
871
790
|
|
|
872
791
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
|
|
873
792
|
}
|
|
874
793
|
|
|
875
794
|
/**
|
|
876
|
-
* Check whether a user\'s permissions satisfy all of the permission specifications contained in the request body. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
795
|
+
* Check whether a user\'s permissions satisfy all of the permission specifications contained in the request body. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
877
796
|
*/
|
|
878
|
-
async isPermittedAll(requestParameters: IsPermittedAllRequest, initOverrides?: RequestInit): Promise<RespAuthorized> {
|
|
797
|
+
async isPermittedAll(requestParameters: IsPermittedAllRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
|
|
879
798
|
const response = await this.isPermittedAllRaw(requestParameters, initOverrides);
|
|
880
799
|
return await response.value();
|
|
881
800
|
}
|
|
882
801
|
|
|
883
802
|
/**
|
|
884
|
-
* Check whether a user\'s permissions satisfy any of the permission specifications contained in the request body. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
803
|
+
* Check whether a user\'s permissions satisfy any of the permission specifications contained in the request body. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
885
804
|
*/
|
|
886
|
-
async isPermittedAnyRaw(requestParameters: IsPermittedAnyRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
887
|
-
if (requestParameters
|
|
888
|
-
throw new runtime.RequiredError(
|
|
805
|
+
async isPermittedAnyRaw(requestParameters: IsPermittedAnyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
806
|
+
if (requestParameters['reqUserIsPermittedMulti'] == null) {
|
|
807
|
+
throw new runtime.RequiredError(
|
|
808
|
+
'reqUserIsPermittedMulti',
|
|
809
|
+
'Required parameter "reqUserIsPermittedMulti" was null or undefined when calling isPermittedAny().'
|
|
810
|
+
);
|
|
889
811
|
}
|
|
890
812
|
|
|
891
813
|
const queryParameters: any = {};
|
|
892
814
|
|
|
893
|
-
if (requestParameters.pretty !== undefined) {
|
|
894
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
815
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
898
816
|
|
|
899
817
|
headerParameters['Content-Type'] = 'application/json';
|
|
900
818
|
|
|
901
819
|
if (this.configuration && this.configuration.apiKey) {
|
|
902
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
820
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
903
821
|
}
|
|
904
822
|
|
|
905
823
|
const response = await this.request({
|
|
@@ -907,81 +825,79 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
907
825
|
method: 'POST',
|
|
908
826
|
headers: headerParameters,
|
|
909
827
|
query: queryParameters,
|
|
910
|
-
body: ReqUserIsPermittedMultiToJSON(requestParameters
|
|
828
|
+
body: ReqUserIsPermittedMultiToJSON(requestParameters['reqUserIsPermittedMulti']),
|
|
911
829
|
}, initOverrides);
|
|
912
830
|
|
|
913
831
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
|
|
914
832
|
}
|
|
915
833
|
|
|
916
834
|
/**
|
|
917
|
-
* Check whether a user\'s permissions satisfy any of the permission specifications contained in the request body. This request is authorized if the requestor is a user that has access to the specified tenant
|
|
835
|
+
* Check whether a user\'s permissions satisfy any of the permission specifications contained in the request body. This request is authorized if the requestor is a service or a user that has access to the specified tenant.
|
|
918
836
|
*/
|
|
919
|
-
async isPermittedAny(requestParameters: IsPermittedAnyRequest, initOverrides?: RequestInit): Promise<RespAuthorized> {
|
|
837
|
+
async isPermittedAny(requestParameters: IsPermittedAnyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
|
|
920
838
|
const response = await this.isPermittedAnyRaw(requestParameters, initOverrides);
|
|
921
839
|
return await response.value();
|
|
922
840
|
}
|
|
923
841
|
|
|
924
842
|
/**
|
|
925
|
-
* Revoke
|
|
843
|
+
* Revoke a previously granted role from a user. No action is taken if the user is not currently assigned the role. This request is idempotent. The type of role to grant may be specified in the request body. Allowed types are USER, TENANT_ADMIN and RESTRICTED_SVC. Default type is USER. The user and the role must be in the same tenant. For roles of type USER the request is authorized only if the requestor is the role owner, a tenant administrator or a site administrator. For roles of type TENANT_ADMIN the requestor must a tenant or site administrator. For roles of type RESTRICTED_SVC the requestor must a site administrator.
|
|
926
844
|
*/
|
|
927
|
-
async
|
|
928
|
-
if (requestParameters
|
|
929
|
-
throw new runtime.RequiredError(
|
|
845
|
+
async revokeRoleRaw(requestParameters: RevokeRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
846
|
+
if (requestParameters['reqRevokeRole'] == null) {
|
|
847
|
+
throw new runtime.RequiredError(
|
|
848
|
+
'reqRevokeRole',
|
|
849
|
+
'Required parameter "reqRevokeRole" was null or undefined when calling revokeRole().'
|
|
850
|
+
);
|
|
930
851
|
}
|
|
931
852
|
|
|
932
853
|
const queryParameters: any = {};
|
|
933
854
|
|
|
934
|
-
if (requestParameters.pretty !== undefined) {
|
|
935
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
855
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
939
856
|
|
|
940
857
|
headerParameters['Content-Type'] = 'application/json';
|
|
941
858
|
|
|
942
859
|
if (this.configuration && this.configuration.apiKey) {
|
|
943
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
860
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
944
861
|
}
|
|
945
862
|
|
|
946
863
|
const response = await this.request({
|
|
947
|
-
path: `/security/user/
|
|
864
|
+
path: `/security/user/revokeRole`,
|
|
948
865
|
method: 'POST',
|
|
949
866
|
headers: headerParameters,
|
|
950
867
|
query: queryParameters,
|
|
951
|
-
body:
|
|
868
|
+
body: ReqRevokeRoleToJSON(requestParameters['reqRevokeRole']),
|
|
952
869
|
}, initOverrides);
|
|
953
870
|
|
|
954
871
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
|
|
955
872
|
}
|
|
956
873
|
|
|
957
874
|
/**
|
|
958
|
-
* Revoke
|
|
875
|
+
* Revoke a previously granted role from a user. No action is taken if the user is not currently assigned the role. This request is idempotent. The type of role to grant may be specified in the request body. Allowed types are USER, TENANT_ADMIN and RESTRICTED_SVC. Default type is USER. The user and the role must be in the same tenant. For roles of type USER the request is authorized only if the requestor is the role owner, a tenant administrator or a site administrator. For roles of type TENANT_ADMIN the requestor must a tenant or site administrator. For roles of type RESTRICTED_SVC the requestor must a site administrator.
|
|
959
876
|
*/
|
|
960
|
-
async
|
|
961
|
-
const response = await this.
|
|
877
|
+
async revokeRole(requestParameters: RevokeRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
|
|
878
|
+
const response = await this.revokeRoleRaw(requestParameters, initOverrides);
|
|
962
879
|
return await response.value();
|
|
963
880
|
}
|
|
964
881
|
|
|
965
882
|
/**
|
|
966
|
-
* Revoke the specified permission from the user\'s default role. A user\'s default role is constructed by prepending \'$$\' to the user\'s name. Default roles are created on demand. If the role does not exist when this method is called no error is reported and no changes occur. The change count returned can be zero or one depending on how many permissions were revoked. A valid tenant and user must be specified in the request body.
|
|
883
|
+
* Revoke the specified permission from the user\'s default role. A user\'s default role is constructed by prepending \'$$\' to the user\'s name. Default roles are created on demand. If the role does not exist when this method is called no error is reported and no changes occur. The change count returned can be zero or one depending on how many permissions were revoked. A valid tenant and user must be specified in the request body. The caller must be an administrator, a service or the user themselves.
|
|
967
884
|
*/
|
|
968
|
-
async revokeUserPermissionRaw(requestParameters: RevokeUserPermissionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
969
|
-
if (requestParameters
|
|
970
|
-
throw new runtime.RequiredError(
|
|
885
|
+
async revokeUserPermissionRaw(requestParameters: RevokeUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
886
|
+
if (requestParameters['reqRevokeUserPermission'] == null) {
|
|
887
|
+
throw new runtime.RequiredError(
|
|
888
|
+
'reqRevokeUserPermission',
|
|
889
|
+
'Required parameter "reqRevokeUserPermission" was null or undefined when calling revokeUserPermission().'
|
|
890
|
+
);
|
|
971
891
|
}
|
|
972
892
|
|
|
973
893
|
const queryParameters: any = {};
|
|
974
894
|
|
|
975
|
-
if (requestParameters.pretty !== undefined) {
|
|
976
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
895
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
980
896
|
|
|
981
897
|
headerParameters['Content-Type'] = 'application/json';
|
|
982
898
|
|
|
983
899
|
if (this.configuration && this.configuration.apiKey) {
|
|
984
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
900
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
985
901
|
}
|
|
986
902
|
|
|
987
903
|
const response = await this.request({
|
|
@@ -989,59 +905,18 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
989
905
|
method: 'POST',
|
|
990
906
|
headers: headerParameters,
|
|
991
907
|
query: queryParameters,
|
|
992
|
-
body: ReqRevokeUserPermissionToJSON(requestParameters
|
|
908
|
+
body: ReqRevokeUserPermissionToJSON(requestParameters['reqRevokeUserPermission']),
|
|
993
909
|
}, initOverrides);
|
|
994
910
|
|
|
995
911
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
|
|
996
912
|
}
|
|
997
913
|
|
|
998
914
|
/**
|
|
999
|
-
* Revoke the specified permission from the user\'s default role. A user\'s default role is constructed by prepending \'$$\' to the user\'s name. Default roles are created on demand. If the role does not exist when this method is called no error is reported and no changes occur. The change count returned can be zero or one depending on how many permissions were revoked. A valid tenant and user must be specified in the request body.
|
|
915
|
+
* Revoke the specified permission from the user\'s default role. A user\'s default role is constructed by prepending \'$$\' to the user\'s name. Default roles are created on demand. If the role does not exist when this method is called no error is reported and no changes occur. The change count returned can be zero or one depending on how many permissions were revoked. A valid tenant and user must be specified in the request body. The caller must be an administrator, a service or the user themselves.
|
|
1000
916
|
*/
|
|
1001
|
-
async revokeUserPermission(requestParameters: RevokeUserPermissionRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
|
|
917
|
+
async revokeUserPermission(requestParameters: RevokeUserPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
|
|
1002
918
|
const response = await this.revokeUserPermissionRaw(requestParameters, initOverrides);
|
|
1003
919
|
return await response.value();
|
|
1004
920
|
}
|
|
1005
921
|
|
|
1006
|
-
/**
|
|
1007
|
-
* Revoke a previously granted role from a user. No action is taken if the user is not currently assigned the role. This request is idempotent. This request is authorized only if the requestor is the role owner or an administrator.
|
|
1008
|
-
*/
|
|
1009
|
-
async revokeUserRoleRaw(requestParameters: RevokeUserRoleRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
|
|
1010
|
-
if (requestParameters.reqRevokeUserRole === null || requestParameters.reqRevokeUserRole === undefined) {
|
|
1011
|
-
throw new runtime.RequiredError('reqRevokeUserRole','Required parameter requestParameters.reqRevokeUserRole was null or undefined when calling revokeUserRole.');
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
const queryParameters: any = {};
|
|
1015
|
-
|
|
1016
|
-
if (requestParameters.pretty !== undefined) {
|
|
1017
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1021
|
-
|
|
1022
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1023
|
-
|
|
1024
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
1025
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
const response = await this.request({
|
|
1029
|
-
path: `/security/user/revokeUserRole`,
|
|
1030
|
-
method: 'POST',
|
|
1031
|
-
headers: headerParameters,
|
|
1032
|
-
query: queryParameters,
|
|
1033
|
-
body: ReqRevokeUserRoleToJSON(requestParameters.reqRevokeUserRole),
|
|
1034
|
-
}, initOverrides);
|
|
1035
|
-
|
|
1036
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* Revoke a previously granted role from a user. No action is taken if the user is not currently assigned the role. This request is idempotent. This request is authorized only if the requestor is the role owner or an administrator.
|
|
1041
|
-
*/
|
|
1042
|
-
async revokeUserRole(requestParameters: RevokeUserRoleRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
|
|
1043
|
-
const response = await this.revokeUserRoleRaw(requestParameters, initOverrides);
|
|
1044
|
-
return await response.value();
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
922
|
}
|