@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.
Files changed (235) hide show
  1. package/.openapi-generator/FILES +16 -6
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +5 -4
  4. package/dist/apis/AdminApi.d.ts +26 -0
  5. package/dist/apis/AdminApi.js +128 -0
  6. package/dist/apis/GeneralApi.d.ts +25 -16
  7. package/dist/apis/GeneralApi.js +72 -23
  8. package/dist/apis/RoleApi.d.ts +99 -76
  9. package/dist/apis/RoleApi.js +540 -340
  10. package/dist/apis/ShareApi.d.ts +110 -0
  11. package/dist/apis/ShareApi.js +469 -0
  12. package/dist/apis/UserApi.d.ts +84 -126
  13. package/dist/apis/UserApi.js +467 -538
  14. package/dist/apis/VaultApi.d.ts +52 -49
  15. package/dist/apis/VaultApi.js +413 -341
  16. package/dist/apis/index.d.ts +2 -0
  17. package/dist/apis/index.js +20 -7
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +17 -6
  20. package/dist/models/Options.d.ts +8 -3
  21. package/dist/models/Options.js +23 -15
  22. package/dist/models/ReqAddChildRole.d.ts +11 -6
  23. package/dist/models/ReqAddChildRole.js +33 -19
  24. package/dist/models/ReqAddRolePermission.d.ts +18 -6
  25. package/dist/models/ReqAddRolePermission.js +36 -19
  26. package/dist/models/ReqCreateRole.d.ts +18 -6
  27. package/dist/models/ReqCreateRole.js +36 -19
  28. package/dist/models/ReqGrantRole.d.ts +51 -0
  29. package/dist/models/ReqGrantRole.js +62 -0
  30. package/dist/models/ReqGrantRoleWithPermission.d.ts +57 -0
  31. package/dist/models/ReqGrantRoleWithPermission.js +66 -0
  32. package/dist/models/ReqGrantUserPermission.d.ts +11 -6
  33. package/dist/models/ReqGrantUserPermission.js +33 -19
  34. package/dist/models/ReqPreviewPathPrefix.d.ts +19 -7
  35. package/dist/models/ReqPreviewPathPrefix.js +46 -27
  36. package/dist/models/ReqRemoveChildRole.d.ts +11 -6
  37. package/dist/models/ReqRemoveChildRole.js +33 -19
  38. package/dist/models/ReqRemovePermissionFromAllRoles.d.ts +38 -0
  39. package/dist/models/ReqRemovePermissionFromAllRoles.js +55 -0
  40. package/dist/models/ReqRemoveRolePermission.d.ts +18 -6
  41. package/dist/models/ReqRemoveRolePermission.js +36 -19
  42. package/dist/models/ReqReplacePathPrefix.d.ts +19 -7
  43. package/dist/models/ReqReplacePathPrefix.js +46 -27
  44. package/dist/models/ReqRevokeRole.d.ts +51 -0
  45. package/dist/models/ReqRevokeRole.js +62 -0
  46. package/dist/models/ReqRevokeUserPermission.d.ts +11 -6
  47. package/dist/models/ReqRevokeUserPermission.js +33 -19
  48. package/dist/models/ReqRolePermits.d.ts +45 -0
  49. package/dist/models/ReqRolePermits.js +60 -0
  50. package/dist/models/ReqShareResource.d.ts +68 -0
  51. package/dist/models/ReqShareResource.js +73 -0
  52. package/dist/models/ReqUpdateRoleDescription.d.ts +17 -5
  53. package/dist/models/ReqUpdateRoleDescription.js +32 -17
  54. package/dist/models/ReqUpdateRoleName.d.ts +17 -5
  55. package/dist/models/ReqUpdateRoleName.js +32 -17
  56. package/dist/models/ReqUpdateRoleOwner.d.ts +17 -5
  57. package/dist/models/ReqUpdateRoleOwner.js +34 -19
  58. package/dist/models/ReqUserHasRole.d.ts +18 -6
  59. package/dist/models/ReqUserHasRole.js +38 -21
  60. package/dist/models/ReqUserHasRoleMulti.d.ts +11 -6
  61. package/dist/models/ReqUserHasRoleMulti.js +35 -21
  62. package/dist/models/ReqUserIsAdmin.d.ts +10 -5
  63. package/dist/models/ReqUserIsAdmin.js +29 -17
  64. package/dist/models/ReqUserIsPermitted.d.ts +11 -6
  65. package/dist/models/ReqUserIsPermitted.js +35 -21
  66. package/dist/models/ReqUserIsPermittedMulti.d.ts +11 -6
  67. package/dist/models/ReqUserIsPermittedMulti.js +35 -21
  68. package/dist/models/ReqValidatePwd.d.ts +44 -0
  69. package/dist/models/ReqValidatePwd.js +59 -0
  70. package/dist/models/ReqVersions.d.ts +11 -6
  71. package/dist/models/ReqVersions.js +33 -19
  72. package/dist/models/ReqWriteSecret.d.ts +12 -7
  73. package/dist/models/ReqWriteSecret.js +36 -22
  74. package/dist/models/RespAuthorized.d.ts +27 -4
  75. package/dist/models/RespAuthorized.js +36 -22
  76. package/dist/models/RespBasic.d.ts +26 -3
  77. package/dist/models/RespBasic.js +35 -21
  78. package/dist/models/RespBoolean.d.ts +69 -0
  79. package/dist/models/RespBoolean.js +62 -0
  80. package/dist/models/RespChangeCount.d.ts +27 -4
  81. package/dist/models/RespChangeCount.js +36 -22
  82. package/dist/models/RespName.d.ts +27 -4
  83. package/dist/models/RespName.js +36 -22
  84. package/dist/models/RespNameArray.d.ts +27 -4
  85. package/dist/models/RespNameArray.js +36 -22
  86. package/dist/models/RespPathPrefixes.d.ts +27 -4
  87. package/dist/models/RespPathPrefixes.js +36 -22
  88. package/dist/models/RespProbe.d.ts +27 -4
  89. package/dist/models/RespProbe.js +36 -22
  90. package/dist/models/RespResourceUrl.d.ts +27 -4
  91. package/dist/models/RespResourceUrl.js +36 -22
  92. package/dist/models/RespRole.d.ts +27 -4
  93. package/dist/models/RespRole.js +36 -22
  94. package/dist/models/RespSecret.d.ts +27 -4
  95. package/dist/models/RespSecret.js +36 -22
  96. package/dist/models/RespSecretList.d.ts +27 -4
  97. package/dist/models/RespSecretList.js +36 -22
  98. package/dist/models/RespSecretMeta.d.ts +27 -4
  99. package/dist/models/RespSecretMeta.js +36 -22
  100. package/dist/models/RespSecretVersionMetadata.d.ts +27 -4
  101. package/dist/models/RespSecretVersionMetadata.js +36 -22
  102. package/dist/models/RespShare.d.ts +69 -0
  103. package/dist/models/RespShare.js +62 -0
  104. package/dist/models/RespShareList.d.ts +69 -0
  105. package/dist/models/RespShareList.js +62 -0
  106. package/dist/models/RespVersions.d.ts +26 -3
  107. package/dist/models/RespVersions.js +35 -21
  108. package/dist/models/ResultAuthorized.d.ts +8 -3
  109. package/dist/models/ResultAuthorized.js +23 -15
  110. package/dist/models/ResultBoolean.d.ts +32 -0
  111. package/dist/models/ResultBoolean.js +49 -0
  112. package/dist/models/ResultChangeCount.d.ts +8 -3
  113. package/dist/models/ResultChangeCount.js +23 -15
  114. package/dist/models/ResultName.d.ts +8 -3
  115. package/dist/models/ResultName.js +23 -15
  116. package/dist/models/ResultNameArray.d.ts +8 -3
  117. package/dist/models/ResultNameArray.js +23 -15
  118. package/dist/models/ResultResourceUrl.d.ts +8 -3
  119. package/dist/models/ResultResourceUrl.js +23 -15
  120. package/dist/models/RoleTypeEnum.d.ts +28 -0
  121. package/dist/models/RoleTypeEnum.js +54 -0
  122. package/dist/models/SkProbe.d.ts +8 -21
  123. package/dist/models/SkProbe.js +23 -21
  124. package/dist/models/SkRole.d.ts +19 -7
  125. package/dist/models/SkRole.js +48 -37
  126. package/dist/models/SkSecret.d.ts +9 -4
  127. package/dist/models/SkSecret.js +26 -18
  128. package/dist/models/SkSecretList.d.ts +8 -3
  129. package/dist/models/SkSecretList.js +25 -17
  130. package/dist/models/SkSecretMetadata.d.ts +8 -3
  131. package/dist/models/SkSecretMetadata.js +29 -21
  132. package/dist/models/SkSecretVersion.d.ts +8 -3
  133. package/dist/models/SkSecretVersion.js +29 -21
  134. package/dist/models/SkSecretVersionMetadata.d.ts +9 -4
  135. package/dist/models/SkSecretVersionMetadata.js +34 -26
  136. package/dist/models/SkShare.d.ts +92 -0
  137. package/dist/models/SkShare.js +69 -0
  138. package/dist/models/SkShareList.d.ts +33 -0
  139. package/dist/models/SkShareList.js +50 -0
  140. package/dist/models/Transformation.d.ts +8 -3
  141. package/dist/models/Transformation.js +27 -19
  142. package/dist/models/index.d.ts +14 -6
  143. package/dist/models/index.js +75 -56
  144. package/dist/runtime.d.ts +80 -38
  145. package/dist/runtime.js +313 -171
  146. package/package.json +6 -2
  147. package/src/apis/AdminApi.ts +63 -0
  148. package/src/apis/GeneralApi.ts +48 -24
  149. package/src/apis/RoleApi.ts +374 -220
  150. package/src/apis/ShareApi.ts +418 -0
  151. package/src/apis/UserApi.ts +258 -383
  152. package/src/apis/VaultApi.ts +347 -275
  153. package/src/apis/index.ts +2 -0
  154. package/src/index.ts +2 -2
  155. package/src/models/Options.ts +21 -12
  156. package/src/models/ReqAddChildRole.ts +31 -19
  157. package/src/models/ReqAddRolePermission.ts +49 -19
  158. package/src/models/ReqCreateRole.ts +49 -19
  159. package/src/models/ReqGrantRole.ts +102 -0
  160. package/src/models/ReqGrantRoleWithPermission.ts +111 -0
  161. package/src/models/ReqGrantUserPermission.ts +31 -19
  162. package/src/models/ReqPreviewPathPrefix.ts +59 -28
  163. package/src/models/ReqRemoveChildRole.ts +31 -19
  164. package/src/models/ReqRemovePermissionFromAllRoles.ts +75 -0
  165. package/src/models/ReqRemoveRolePermission.ts +49 -19
  166. package/src/models/ReqReplacePathPrefix.ts +59 -28
  167. package/src/models/ReqRevokeRole.ts +102 -0
  168. package/src/models/ReqRevokeUserPermission.ts +31 -19
  169. package/src/models/ReqRolePermits.ts +94 -0
  170. package/src/models/ReqShareResource.ts +119 -0
  171. package/src/models/ReqUpdateRoleDescription.ts +45 -16
  172. package/src/models/ReqUpdateRoleName.ts +45 -16
  173. package/src/models/ReqUpdateRoleOwner.ts +47 -18
  174. package/src/models/ReqUserHasRole.ts +51 -21
  175. package/src/models/ReqUserHasRoleMulti.ts +33 -21
  176. package/src/models/ReqUserIsAdmin.ts +27 -16
  177. package/src/models/ReqUserIsPermitted.ts +33 -21
  178. package/src/models/ReqUserIsPermittedMulti.ts +33 -21
  179. package/src/models/ReqValidatePwd.ts +84 -0
  180. package/src/models/ReqVersions.ts +31 -19
  181. package/src/models/ReqWriteSecret.ts +36 -23
  182. package/src/models/RespAuthorized.ts +54 -20
  183. package/src/models/RespBasic.ts +51 -18
  184. package/src/models/RespBoolean.ts +121 -0
  185. package/src/models/RespChangeCount.ts +54 -20
  186. package/src/models/RespName.ts +54 -20
  187. package/src/models/RespNameArray.ts +54 -20
  188. package/src/models/RespPathPrefixes.ts +54 -20
  189. package/src/models/RespProbe.ts +54 -20
  190. package/src/models/RespResourceUrl.ts +54 -20
  191. package/src/models/RespRole.ts +54 -20
  192. package/src/models/RespSecret.ts +54 -20
  193. package/src/models/RespSecretList.ts +54 -20
  194. package/src/models/RespSecretMeta.ts +54 -20
  195. package/src/models/RespSecretVersionMetadata.ts +54 -20
  196. package/src/models/RespShare.ts +121 -0
  197. package/src/models/RespShareList.ts +121 -0
  198. package/src/models/RespVersions.ts +51 -18
  199. package/src/models/ResultAuthorized.ts +21 -12
  200. package/src/models/ResultBoolean.ts +65 -0
  201. package/src/models/ResultChangeCount.ts +21 -12
  202. package/src/models/ResultName.ts +21 -12
  203. package/src/models/ResultNameArray.ts +21 -12
  204. package/src/models/ResultResourceUrl.ts +21 -12
  205. package/src/models/RoleTypeEnum.ts +56 -0
  206. package/src/models/SkProbe.ts +21 -36
  207. package/src/models/SkRole.ts +65 -38
  208. package/src/models/SkSecret.ts +26 -16
  209. package/src/models/SkSecretList.ts +23 -14
  210. package/src/models/SkSecretMetadata.ts +27 -18
  211. package/src/models/SkSecretVersion.ts +27 -18
  212. package/src/models/SkSecretVersionMetadata.ts +34 -24
  213. package/src/models/SkShare.ts +145 -0
  214. package/src/models/SkShareList.ts +73 -0
  215. package/src/models/Transformation.ts +25 -16
  216. package/src/models/index.ts +14 -6
  217. package/src/runtime.ts +219 -108
  218. package/dist/models/ReqGrantAdminRole.d.ts +0 -33
  219. package/dist/models/ReqGrantAdminRole.js +0 -43
  220. package/dist/models/ReqGrantUserRole.d.ts +0 -39
  221. package/dist/models/ReqGrantUserRole.js +0 -45
  222. package/dist/models/ReqGrantUserRoleWithPermission.d.ts +0 -45
  223. package/dist/models/ReqGrantUserRoleWithPermission.js +0 -47
  224. package/dist/models/ReqRevokeAdminRole.d.ts +0 -33
  225. package/dist/models/ReqRevokeAdminRole.js +0 -43
  226. package/dist/models/ReqRevokeUserRole.d.ts +0 -39
  227. package/dist/models/ReqRevokeUserRole.js +0 -45
  228. package/dist/models/ReqValidateServicePwd.d.ts +0 -39
  229. package/dist/models/ReqValidateServicePwd.js +0 -45
  230. package/src/models/ReqGrantAdminRole.ts +0 -64
  231. package/src/models/ReqGrantUserRole.ts +0 -72
  232. package/src/models/ReqGrantUserRoleWithPermission.ts +0 -80
  233. package/src/models/ReqRevokeAdminRole.ts +0 -64
  234. package/src/models/ReqRevokeUserRole.ts +0 -72
  235. package/src/models/ReqValidateServicePwd.ts +0 -72
@@ -2,9 +2,9 @@
2
2
  /* eslint-disable */
3
3
  /**
4
4
  * Tapis Security API
5
- * The Tapis Security API provides access to the Tapis Security Kernel authorization and secrets facilities.
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: 0.1
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,140 +14,156 @@
14
14
 
15
15
 
16
16
  import * as runtime from '../runtime';
17
+ import type {
18
+ ReqAddChildRole,
19
+ ReqAddRolePermission,
20
+ ReqCreateRole,
21
+ ReqPreviewPathPrefix,
22
+ ReqRemoveChildRole,
23
+ ReqRemovePermissionFromAllRoles,
24
+ ReqRemoveRolePermission,
25
+ ReqReplacePathPrefix,
26
+ ReqRolePermits,
27
+ ReqUpdateRoleDescription,
28
+ ReqUpdateRoleName,
29
+ ReqUpdateRoleOwner,
30
+ RespAuthorized,
31
+ RespBasic,
32
+ RespChangeCount,
33
+ RespName,
34
+ RespNameArray,
35
+ RespPathPrefixes,
36
+ RespResourceUrl,
37
+ RespRole,
38
+ RoleTypeEnum,
39
+ } from '../models/index';
17
40
  import {
18
- ReqAddChildRole,
19
41
  ReqAddChildRoleFromJSON,
20
42
  ReqAddChildRoleToJSON,
21
- ReqAddRolePermission,
22
43
  ReqAddRolePermissionFromJSON,
23
44
  ReqAddRolePermissionToJSON,
24
- ReqCreateRole,
25
45
  ReqCreateRoleFromJSON,
26
46
  ReqCreateRoleToJSON,
27
- ReqPreviewPathPrefix,
28
47
  ReqPreviewPathPrefixFromJSON,
29
48
  ReqPreviewPathPrefixToJSON,
30
- ReqRemoveChildRole,
31
49
  ReqRemoveChildRoleFromJSON,
32
50
  ReqRemoveChildRoleToJSON,
33
- ReqRemoveRolePermission,
51
+ ReqRemovePermissionFromAllRolesFromJSON,
52
+ ReqRemovePermissionFromAllRolesToJSON,
34
53
  ReqRemoveRolePermissionFromJSON,
35
54
  ReqRemoveRolePermissionToJSON,
36
- ReqReplacePathPrefix,
37
55
  ReqReplacePathPrefixFromJSON,
38
56
  ReqReplacePathPrefixToJSON,
39
- ReqUpdateRoleDescription,
57
+ ReqRolePermitsFromJSON,
58
+ ReqRolePermitsToJSON,
40
59
  ReqUpdateRoleDescriptionFromJSON,
41
60
  ReqUpdateRoleDescriptionToJSON,
42
- ReqUpdateRoleName,
43
61
  ReqUpdateRoleNameFromJSON,
44
62
  ReqUpdateRoleNameToJSON,
45
- ReqUpdateRoleOwner,
46
63
  ReqUpdateRoleOwnerFromJSON,
47
64
  ReqUpdateRoleOwnerToJSON,
48
- RespBasic,
65
+ RespAuthorizedFromJSON,
66
+ RespAuthorizedToJSON,
49
67
  RespBasicFromJSON,
50
68
  RespBasicToJSON,
51
- RespChangeCount,
52
69
  RespChangeCountFromJSON,
53
70
  RespChangeCountToJSON,
54
- RespName,
55
71
  RespNameFromJSON,
56
72
  RespNameToJSON,
57
- RespNameArray,
58
73
  RespNameArrayFromJSON,
59
74
  RespNameArrayToJSON,
60
- RespPathPrefixes,
61
75
  RespPathPrefixesFromJSON,
62
76
  RespPathPrefixesToJSON,
63
- RespResourceUrl,
64
77
  RespResourceUrlFromJSON,
65
78
  RespResourceUrlToJSON,
66
- RespRole,
67
79
  RespRoleFromJSON,
68
80
  RespRoleToJSON,
69
- } from '../models';
81
+ RoleTypeEnumFromJSON,
82
+ RoleTypeEnumToJSON,
83
+ } from '../models/index';
70
84
 
71
85
  export interface AddChildRoleRequest {
72
86
  reqAddChildRole: ReqAddChildRole;
73
- pretty?: boolean;
74
87
  }
75
88
 
76
89
  export interface AddRolePermissionRequest {
77
90
  reqAddRolePermission: ReqAddRolePermission;
78
- pretty?: boolean;
79
91
  }
80
92
 
81
93
  export interface CreateRoleRequest {
82
94
  reqCreateRole: ReqCreateRole;
83
- pretty?: boolean;
84
95
  }
85
96
 
86
97
  export interface DeleteRoleByNameRequest {
87
98
  roleName: string;
88
99
  tenant?: string;
89
- pretty?: boolean;
100
+ roleType?: RoleTypeEnum;
90
101
  }
91
102
 
92
103
  export interface GetDefaultUserRoleRequest {
93
104
  user: string;
94
- pretty?: boolean;
95
105
  }
96
106
 
97
107
  export interface GetRoleByNameRequest {
98
108
  roleName: string;
99
109
  tenant?: string;
100
- pretty?: boolean;
110
+ roleType?: RoleTypeEnum;
101
111
  }
102
112
 
103
113
  export interface GetRoleNamesRequest {
104
114
  tenant?: string;
105
- pretty?: boolean;
115
+ roleType?: RoleTypeEnum;
106
116
  }
107
117
 
108
118
  export interface GetRolePermissionsRequest {
109
119
  roleName: string;
110
120
  tenant?: string;
111
121
  immediate?: boolean;
112
- pretty?: boolean;
113
122
  }
114
123
 
115
124
  export interface PreviewPathPrefixRequest {
116
125
  reqPreviewPathPrefix: ReqPreviewPathPrefix;
117
- pretty?: boolean;
118
126
  }
119
127
 
120
128
  export interface RemoveChildRoleRequest {
121
129
  reqRemoveChildRole: ReqRemoveChildRole;
122
- pretty?: boolean;
130
+ }
131
+
132
+ export interface RemovePathPermissionFromAllRolesRequest {
133
+ reqRemovePermissionFromAllRoles: ReqRemovePermissionFromAllRoles;
134
+ }
135
+
136
+ export interface RemovePermissionFromAllRolesRequest {
137
+ reqRemovePermissionFromAllRoles: ReqRemovePermissionFromAllRoles;
123
138
  }
124
139
 
125
140
  export interface RemoveRolePermissionRequest {
126
141
  reqRemoveRolePermission: ReqRemoveRolePermission;
127
- pretty?: boolean;
128
142
  }
129
143
 
130
144
  export interface ReplacePathPrefixRequest {
131
145
  reqReplacePathPrefix: ReqReplacePathPrefix;
132
- pretty?: boolean;
146
+ }
147
+
148
+ export interface RolePermitsRequest {
149
+ roleName: string;
150
+ reqRolePermits: ReqRolePermits;
151
+ immediate?: boolean;
133
152
  }
134
153
 
135
154
  export interface UpdateRoleDescriptionRequest {
136
155
  roleName: string;
137
156
  reqUpdateRoleDescription: ReqUpdateRoleDescription;
138
- pretty?: boolean;
139
157
  }
140
158
 
141
159
  export interface UpdateRoleNameRequest {
142
160
  roleName: string;
143
161
  reqUpdateRoleName: ReqUpdateRoleName;
144
- pretty?: boolean;
145
162
  }
146
163
 
147
164
  export interface UpdateRoleOwnerRequest {
148
165
  roleName: string;
149
166
  reqUpdateRoleOwner: ReqUpdateRoleOwner;
150
- pretty?: boolean;
151
167
  }
152
168
 
153
169
  /**
@@ -156,25 +172,24 @@ export interface UpdateRoleOwnerRequest {
156
172
  export class RoleApi extends runtime.BaseAPI {
157
173
 
158
174
  /**
159
- * Add a child role to another role using a request body. If the child already exists, then the request has no effect and the change count returned is zero. Otherwise, the child is added and the change count is one. The user@tenant identity specified in JWT is authorized to make this request only if that user is an administrator or if the user owns both the parent and child roles.
175
+ * Add a child role to another role using a request body. If the child already exists, then the request has no effect and the change count returned is zero. Otherwise, the child is added and the change count is one. Supported only for roles of type *USER*. The user@tenant identity specified in JWT is authorized to make this request only if that user is an administrator or if the user owns both the parent and child roles.
160
176
  */
161
- async addChildRoleRaw(requestParameters: AddChildRoleRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
162
- if (requestParameters.reqAddChildRole === null || requestParameters.reqAddChildRole === undefined) {
163
- throw new runtime.RequiredError('reqAddChildRole','Required parameter requestParameters.reqAddChildRole was null or undefined when calling addChildRole.');
177
+ async addChildRoleRaw(requestParameters: AddChildRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
178
+ if (requestParameters['reqAddChildRole'] == null) {
179
+ throw new runtime.RequiredError(
180
+ 'reqAddChildRole',
181
+ 'Required parameter "reqAddChildRole" was null or undefined when calling addChildRole().'
182
+ );
164
183
  }
165
184
 
166
185
  const queryParameters: any = {};
167
186
 
168
- if (requestParameters.pretty !== undefined) {
169
- queryParameters['pretty'] = requestParameters.pretty;
170
- }
171
-
172
187
  const headerParameters: runtime.HTTPHeaders = {};
173
188
 
174
189
  headerParameters['Content-Type'] = 'application/json';
175
190
 
176
191
  if (this.configuration && this.configuration.apiKey) {
177
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
192
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
178
193
  }
179
194
 
180
195
  const response = await this.request({
@@ -182,40 +197,39 @@ export class RoleApi extends runtime.BaseAPI {
182
197
  method: 'POST',
183
198
  headers: headerParameters,
184
199
  query: queryParameters,
185
- body: ReqAddChildRoleToJSON(requestParameters.reqAddChildRole),
200
+ body: ReqAddChildRoleToJSON(requestParameters['reqAddChildRole']),
186
201
  }, initOverrides);
187
202
 
188
203
  return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
189
204
  }
190
205
 
191
206
  /**
192
- * Add a child role to another role using a request body. If the child already exists, then the request has no effect and the change count returned is zero. Otherwise, the child is added and the change count is one. The user@tenant identity specified in JWT is authorized to make this request only if that user is an administrator or if the user owns both the parent and child roles.
207
+ * Add a child role to another role using a request body. If the child already exists, then the request has no effect and the change count returned is zero. Otherwise, the child is added and the change count is one. Supported only for roles of type *USER*. The user@tenant identity specified in JWT is authorized to make this request only if that user is an administrator or if the user owns both the parent and child roles.
193
208
  */
194
- async addChildRole(requestParameters: AddChildRoleRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
209
+ async addChildRole(requestParameters: AddChildRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
195
210
  const response = await this.addChildRoleRaw(requestParameters, initOverrides);
196
211
  return await response.value();
197
212
  }
198
213
 
199
214
  /**
200
- * Add a permission to an existing role using a request body. If the permission already exists, then the request has no effect and the change count returned is zero. Otherwise, the permission is added and the change count is one. Permissions are case-sensitive strings that follow the format defined by Apache Shiro (https://shiro.apache.org/permissions.html). This format defines any number of colon-separated (:) parts, with the possible use of asterisks (*) as wildcards and commas (,) as aggregators. Here are two example permission strings: system:MyTenant:read,write:system1 system:MyTenant:create,read,write,delete:* See the Shiro documentation for further details. Note that the three reserved characters, [: * ,], cannot appear in the text of any part. It\'s the application\'s responsibility to escape those characters in a manner that is safe in the application\'s domain. This request is authorized only if the authenticated user is either the role owner or an administrator.
215
+ * Add a permission to an existing role using a request body. If the permission already exists, then the request has no effect and the change count returned is zero. Otherwise, the permission is added and the change count is one. Permissions are case-sensitive strings that follow the format defined by Apache Shiro (https://shiro.apache.org/permissions.html). This format defines any number of colon-separated (:) parts, with the possible use of asterisks (*) as wildcards and commas (,) as aggregators. Here are two example permission strings: system:MyTenant:read,write:system1 system:MyTenant:create,read,write,delete:* See the Shiro documentation for further details. Note that the three reserved characters, [: * ,], cannot appear in the text of any part. It\'s the application\'s responsibility to escape those characters in a manner that is safe in the application\'s domain. ### Extended Permissions Tapis extends Shiro permission checking with *path semantics*. Path semantics allows the last part of pre-configured permissions to be treated as hierarchical path names, such as the paths used in POSIX file systems. Currently, only permissions that start with *files:* have their last (5th) component configured with path semantics. Path semantics treat the extended permission part as the root of the subtree to which the permission is applied recursively. Grantees assigned the permission will have the permission on the path itself and on all its children. As an example, consider a role that\'s assigned the following permission: files:iplantc.org:read:stampede2:/home/bud Users granted the role have read permission on the following file system resources on stampede2: /home/bud /home/bud/ /home/bud/myfile /home/bud/mydir/myfile Those users, however, will not have access to /home. When an extended permission part ends with a slash, such as /home/bud/, then that part is interpreted as a directory or, more generally, some type of container. In such cases, the permission applies to the children of the path and to the path as written with a slash. For instance, for the file permission path /home/bud/, the permission allows access to /home/bud/ and /home/bud/myfile, but not to /home/bud. When an extended permission part does not end with a slash, such as /home/bud, then the permission applies to the children of the path and to the path written with or without a trailing slash. For instance, for the file permission path /home/bud, the permission allows access to /home/bud, /home/bud/ and /home/bud/myfile. In the previous examples, we assumed /home/bud was a directory. If /home/bud is a file (or more generally a leaf), then specifying the permission path /home/bud/ will not work as intended. Permissions with paths that have trailing slashes should only be used for directories, and they require a trailing slash whenever refering to the root directory. Permissions that don\'t have a trailing slash can represent directories or files, and thus are more general. Extended permission checking avoids *false capture*. Whether a path has a trailing slash or not, permission checking will not capture similarly named sibling paths. For example, using the file permission path /home/bud, grantees are allowed access to /home/bud and all its children (if it\'s a directory), but not to the file /home/buddy.txt nor the directory /home/bud2. 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.
201
216
  */
202
- async addRolePermissionRaw(requestParameters: AddRolePermissionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
203
- if (requestParameters.reqAddRolePermission === null || requestParameters.reqAddRolePermission === undefined) {
204
- throw new runtime.RequiredError('reqAddRolePermission','Required parameter requestParameters.reqAddRolePermission was null or undefined when calling addRolePermission.');
217
+ async addRolePermissionRaw(requestParameters: AddRolePermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
218
+ if (requestParameters['reqAddRolePermission'] == null) {
219
+ throw new runtime.RequiredError(
220
+ 'reqAddRolePermission',
221
+ 'Required parameter "reqAddRolePermission" was null or undefined when calling addRolePermission().'
222
+ );
205
223
  }
206
224
 
207
225
  const queryParameters: any = {};
208
226
 
209
- if (requestParameters.pretty !== undefined) {
210
- queryParameters['pretty'] = requestParameters.pretty;
211
- }
212
-
213
227
  const headerParameters: runtime.HTTPHeaders = {};
214
228
 
215
229
  headerParameters['Content-Type'] = 'application/json';
216
230
 
217
231
  if (this.configuration && this.configuration.apiKey) {
218
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
232
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
219
233
  }
220
234
 
221
235
  const response = await this.request({
@@ -223,40 +237,39 @@ export class RoleApi extends runtime.BaseAPI {
223
237
  method: 'POST',
224
238
  headers: headerParameters,
225
239
  query: queryParameters,
226
- body: ReqAddRolePermissionToJSON(requestParameters.reqAddRolePermission),
240
+ body: ReqAddRolePermissionToJSON(requestParameters['reqAddRolePermission']),
227
241
  }, initOverrides);
228
242
 
229
243
  return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
230
244
  }
231
245
 
232
246
  /**
233
- * Add a permission to an existing role using a request body. If the permission already exists, then the request has no effect and the change count returned is zero. Otherwise, the permission is added and the change count is one. Permissions are case-sensitive strings that follow the format defined by Apache Shiro (https://shiro.apache.org/permissions.html). This format defines any number of colon-separated (:) parts, with the possible use of asterisks (*) as wildcards and commas (,) as aggregators. Here are two example permission strings: system:MyTenant:read,write:system1 system:MyTenant:create,read,write,delete:* See the Shiro documentation for further details. Note that the three reserved characters, [: * ,], cannot appear in the text of any part. It\'s the application\'s responsibility to escape those characters in a manner that is safe in the application\'s domain. This request is authorized only if the authenticated user is either the role owner or an administrator.
247
+ * Add a permission to an existing role using a request body. If the permission already exists, then the request has no effect and the change count returned is zero. Otherwise, the permission is added and the change count is one. Permissions are case-sensitive strings that follow the format defined by Apache Shiro (https://shiro.apache.org/permissions.html). This format defines any number of colon-separated (:) parts, with the possible use of asterisks (*) as wildcards and commas (,) as aggregators. Here are two example permission strings: system:MyTenant:read,write:system1 system:MyTenant:create,read,write,delete:* See the Shiro documentation for further details. Note that the three reserved characters, [: * ,], cannot appear in the text of any part. It\'s the application\'s responsibility to escape those characters in a manner that is safe in the application\'s domain. ### Extended Permissions Tapis extends Shiro permission checking with *path semantics*. Path semantics allows the last part of pre-configured permissions to be treated as hierarchical path names, such as the paths used in POSIX file systems. Currently, only permissions that start with *files:* have their last (5th) component configured with path semantics. Path semantics treat the extended permission part as the root of the subtree to which the permission is applied recursively. Grantees assigned the permission will have the permission on the path itself and on all its children. As an example, consider a role that\'s assigned the following permission: files:iplantc.org:read:stampede2:/home/bud Users granted the role have read permission on the following file system resources on stampede2: /home/bud /home/bud/ /home/bud/myfile /home/bud/mydir/myfile Those users, however, will not have access to /home. When an extended permission part ends with a slash, such as /home/bud/, then that part is interpreted as a directory or, more generally, some type of container. In such cases, the permission applies to the children of the path and to the path as written with a slash. For instance, for the file permission path /home/bud/, the permission allows access to /home/bud/ and /home/bud/myfile, but not to /home/bud. When an extended permission part does not end with a slash, such as /home/bud, then the permission applies to the children of the path and to the path written with or without a trailing slash. For instance, for the file permission path /home/bud, the permission allows access to /home/bud, /home/bud/ and /home/bud/myfile. In the previous examples, we assumed /home/bud was a directory. If /home/bud is a file (or more generally a leaf), then specifying the permission path /home/bud/ will not work as intended. Permissions with paths that have trailing slashes should only be used for directories, and they require a trailing slash whenever refering to the root directory. Permissions that don\'t have a trailing slash can represent directories or files, and thus are more general. Extended permission checking avoids *false capture*. Whether a path has a trailing slash or not, permission checking will not capture similarly named sibling paths. For example, using the file permission path /home/bud, grantees are allowed access to /home/bud and all its children (if it\'s a directory), but not to the file /home/buddy.txt nor the directory /home/bud2. 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.
234
248
  */
235
- async addRolePermission(requestParameters: AddRolePermissionRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
249
+ async addRolePermission(requestParameters: AddRolePermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
236
250
  const response = await this.addRolePermissionRaw(requestParameters, initOverrides);
237
251
  return await response.value();
238
252
  }
239
253
 
240
254
  /**
241
- * Create a role using a request body. Role names are case sensitive, alpha-numeric strings that can also contain underscores. Role names must start with an alphbetic character and can be no more than 58 characters in length. The desciption can be no more than 2048 characters long. If the role already exists, this request has no effect. For the request to be authorized, the requestor must be either an administrator or a service allowed to perform updates in the new role\'s tenant.
255
+ * Create a role using a request body. Role names are case sensitive, alpha-numeric strings that can also contain underscores. Role names must start with an alphbetic character and can be no more than 58 characters in length. The desciption can be no more than 2048 characters long. If the role already exists, this request has no effect. For the request to be authorized, the requestor must be either an administrator or a service allowed to perform updates in the new role\'s tenant.
242
256
  */
243
- async createRoleRaw(requestParameters: CreateRoleRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespResourceUrl>> {
244
- if (requestParameters.reqCreateRole === null || requestParameters.reqCreateRole === undefined) {
245
- throw new runtime.RequiredError('reqCreateRole','Required parameter requestParameters.reqCreateRole was null or undefined when calling createRole.');
257
+ async createRoleRaw(requestParameters: CreateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespResourceUrl>> {
258
+ if (requestParameters['reqCreateRole'] == null) {
259
+ throw new runtime.RequiredError(
260
+ 'reqCreateRole',
261
+ 'Required parameter "reqCreateRole" was null or undefined when calling createRole().'
262
+ );
246
263
  }
247
264
 
248
265
  const queryParameters: any = {};
249
266
 
250
- if (requestParameters.pretty !== undefined) {
251
- queryParameters['pretty'] = requestParameters.pretty;
252
- }
253
-
254
267
  const headerParameters: runtime.HTTPHeaders = {};
255
268
 
256
269
  headerParameters['Content-Type'] = 'application/json';
257
270
 
258
271
  if (this.configuration && this.configuration.apiKey) {
259
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
272
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
260
273
  }
261
274
 
262
275
  const response = await this.request({
@@ -264,46 +277,49 @@ export class RoleApi extends runtime.BaseAPI {
264
277
  method: 'POST',
265
278
  headers: headerParameters,
266
279
  query: queryParameters,
267
- body: ReqCreateRoleToJSON(requestParameters.reqCreateRole),
280
+ body: ReqCreateRoleToJSON(requestParameters['reqCreateRole']),
268
281
  }, initOverrides);
269
282
 
270
283
  return new runtime.JSONApiResponse(response, (jsonValue) => RespResourceUrlFromJSON(jsonValue));
271
284
  }
272
285
 
273
286
  /**
274
- * Create a role using a request body. Role names are case sensitive, alpha-numeric strings that can also contain underscores. Role names must start with an alphbetic character and can be no more than 58 characters in length. The desciption can be no more than 2048 characters long. If the role already exists, this request has no effect. For the request to be authorized, the requestor must be either an administrator or a service allowed to perform updates in the new role\'s tenant.
287
+ * Create a role using a request body. Role names are case sensitive, alpha-numeric strings that can also contain underscores. Role names must start with an alphbetic character and can be no more than 58 characters in length. The desciption can be no more than 2048 characters long. If the role already exists, this request has no effect. For the request to be authorized, the requestor must be either an administrator or a service allowed to perform updates in the new role\'s tenant.
275
288
  */
276
- async createRole(requestParameters: CreateRoleRequest, initOverrides?: RequestInit): Promise<RespResourceUrl> {
289
+ async createRole(requestParameters: CreateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespResourceUrl> {
277
290
  const response = await this.createRoleRaw(requestParameters, initOverrides);
278
291
  return await response.value();
279
292
  }
280
293
 
281
294
  /**
282
- * Delete the named role. A valid tenant and user must be specified as query parameters. This request is authorized only if the authenticated user is either the role owner or an administrator.
295
+ * Delete the named role. A valid tenant and user must be specified as query parameters. 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.
283
296
  */
284
- async deleteRoleByNameRaw(requestParameters: DeleteRoleByNameRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
285
- if (requestParameters.roleName === null || requestParameters.roleName === undefined) {
286
- throw new runtime.RequiredError('roleName','Required parameter requestParameters.roleName was null or undefined when calling deleteRoleByName.');
297
+ async deleteRoleByNameRaw(requestParameters: DeleteRoleByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
298
+ if (requestParameters['roleName'] == null) {
299
+ throw new runtime.RequiredError(
300
+ 'roleName',
301
+ 'Required parameter "roleName" was null or undefined when calling deleteRoleByName().'
302
+ );
287
303
  }
288
304
 
289
305
  const queryParameters: any = {};
290
306
 
291
- if (requestParameters.tenant !== undefined) {
292
- queryParameters['tenant'] = requestParameters.tenant;
307
+ if (requestParameters['tenant'] != null) {
308
+ queryParameters['tenant'] = requestParameters['tenant'];
293
309
  }
294
310
 
295
- if (requestParameters.pretty !== undefined) {
296
- queryParameters['pretty'] = requestParameters.pretty;
311
+ if (requestParameters['roleType'] != null) {
312
+ queryParameters['roleType'] = requestParameters['roleType'];
297
313
  }
298
314
 
299
315
  const headerParameters: runtime.HTTPHeaders = {};
300
316
 
301
317
  if (this.configuration && this.configuration.apiKey) {
302
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
318
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
303
319
  }
304
320
 
305
321
  const response = await this.request({
306
- path: `/security/role/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters.roleName))),
322
+ path: `/security/role/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters['roleName']))),
307
323
  method: 'DELETE',
308
324
  headers: headerParameters,
309
325
  query: queryParameters,
@@ -313,31 +329,34 @@ export class RoleApi extends runtime.BaseAPI {
313
329
  }
314
330
 
315
331
  /**
316
- * Delete the named role. A valid tenant and user must be specified as query parameters. This request is authorized only if the authenticated user is either the role owner or an administrator.
332
+ * Delete the named role. A valid tenant and user must be specified as query parameters. 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.
317
333
  */
318
- async deleteRoleByName(requestParameters: DeleteRoleByNameRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
334
+ async deleteRoleByName(requestParameters: DeleteRoleByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
319
335
  const response = await this.deleteRoleByNameRaw(requestParameters, initOverrides);
320
336
  return await response.value();
321
337
  }
322
338
 
323
339
  /**
324
- * 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.
340
+ * 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.
325
341
  */
326
- async getDefaultUserRoleRaw(requestParameters: GetDefaultUserRoleRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespName>> {
327
- if (requestParameters.user === null || requestParameters.user === undefined) {
328
- throw new runtime.RequiredError('user','Required parameter requestParameters.user was null or undefined when calling getDefaultUserRole.');
342
+ async getDefaultUserRoleRaw(requestParameters: GetDefaultUserRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespName>> {
343
+ if (requestParameters['user'] == null) {
344
+ throw new runtime.RequiredError(
345
+ 'user',
346
+ 'Required parameter "user" was null or undefined when calling getDefaultUserRole().'
347
+ );
329
348
  }
330
349
 
331
350
  const queryParameters: any = {};
332
351
 
333
- if (requestParameters.pretty !== undefined) {
334
- queryParameters['pretty'] = requestParameters.pretty;
335
- }
336
-
337
352
  const headerParameters: runtime.HTTPHeaders = {};
338
353
 
354
+ if (this.configuration && this.configuration.apiKey) {
355
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
356
+ }
357
+
339
358
  const response = await this.request({
340
- path: `/security/role/defaultRole/{user}`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters.user))),
359
+ path: `/security/role/defaultRole/{user}`.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters['user']))),
341
360
  method: 'GET',
342
361
  headers: headerParameters,
343
362
  query: queryParameters,
@@ -347,39 +366,42 @@ export class RoleApi extends runtime.BaseAPI {
347
366
  }
348
367
 
349
368
  /**
350
- * 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.
369
+ * 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.
351
370
  */
352
- async getDefaultUserRole(requestParameters: GetDefaultUserRoleRequest, initOverrides?: RequestInit): Promise<RespName> {
371
+ async getDefaultUserRole(requestParameters: GetDefaultUserRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespName> {
353
372
  const response = await this.getDefaultUserRoleRaw(requestParameters, initOverrides);
354
373
  return await response.value();
355
374
  }
356
375
 
357
376
  /**
358
- * Get the named role\'s definition. A valid tenant must be specified as a query parameter. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
377
+ * Get the named role\'s definition. A valid tenant must be specified as a query parameter. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
359
378
  */
360
- async getRoleByNameRaw(requestParameters: GetRoleByNameRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespRole>> {
361
- if (requestParameters.roleName === null || requestParameters.roleName === undefined) {
362
- throw new runtime.RequiredError('roleName','Required parameter requestParameters.roleName was null or undefined when calling getRoleByName.');
379
+ async getRoleByNameRaw(requestParameters: GetRoleByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespRole>> {
380
+ if (requestParameters['roleName'] == null) {
381
+ throw new runtime.RequiredError(
382
+ 'roleName',
383
+ 'Required parameter "roleName" was null or undefined when calling getRoleByName().'
384
+ );
363
385
  }
364
386
 
365
387
  const queryParameters: any = {};
366
388
 
367
- if (requestParameters.tenant !== undefined) {
368
- queryParameters['tenant'] = requestParameters.tenant;
389
+ if (requestParameters['tenant'] != null) {
390
+ queryParameters['tenant'] = requestParameters['tenant'];
369
391
  }
370
392
 
371
- if (requestParameters.pretty !== undefined) {
372
- queryParameters['pretty'] = requestParameters.pretty;
393
+ if (requestParameters['roleType'] != null) {
394
+ queryParameters['roleType'] = requestParameters['roleType'];
373
395
  }
374
396
 
375
397
  const headerParameters: runtime.HTTPHeaders = {};
376
398
 
377
399
  if (this.configuration && this.configuration.apiKey) {
378
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
400
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
379
401
  }
380
402
 
381
403
  const response = await this.request({
382
- path: `/security/role/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters.roleName))),
404
+ path: `/security/role/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters['roleName']))),
383
405
  method: 'GET',
384
406
  headers: headerParameters,
385
407
  query: queryParameters,
@@ -389,31 +411,31 @@ export class RoleApi extends runtime.BaseAPI {
389
411
  }
390
412
 
391
413
  /**
392
- * Get the named role\'s definition. A valid tenant must be specified as a query parameter. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
414
+ * Get the named role\'s definition. A valid tenant must be specified as a query parameter. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
393
415
  */
394
- async getRoleByName(requestParameters: GetRoleByNameRequest, initOverrides?: RequestInit): Promise<RespRole> {
416
+ async getRoleByName(requestParameters: GetRoleByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespRole> {
395
417
  const response = await this.getRoleByNameRaw(requestParameters, initOverrides);
396
418
  return await response.value();
397
419
  }
398
420
 
399
421
  /**
400
- * Get the names of all roles in the tenant in alphabetic order. Future enhancements will include search filtering. A valid tenant must be specified as a query parameter. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
422
+ * Get the names of all roles in the tenant in alphabetic order. Future enhancements will include search filtering. A valid tenant must be specified as a query parameter. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
401
423
  */
402
- async getRoleNamesRaw(requestParameters: GetRoleNamesRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespNameArray>> {
424
+ async getRoleNamesRaw(requestParameters: GetRoleNamesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespNameArray>> {
403
425
  const queryParameters: any = {};
404
426
 
405
- if (requestParameters.tenant !== undefined) {
406
- queryParameters['tenant'] = requestParameters.tenant;
427
+ if (requestParameters['tenant'] != null) {
428
+ queryParameters['tenant'] = requestParameters['tenant'];
407
429
  }
408
430
 
409
- if (requestParameters.pretty !== undefined) {
410
- queryParameters['pretty'] = requestParameters.pretty;
431
+ if (requestParameters['roleType'] != null) {
432
+ queryParameters['roleType'] = requestParameters['roleType'];
411
433
  }
412
434
 
413
435
  const headerParameters: runtime.HTTPHeaders = {};
414
436
 
415
437
  if (this.configuration && this.configuration.apiKey) {
416
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
438
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
417
439
  }
418
440
 
419
441
  const response = await this.request({
@@ -427,43 +449,42 @@ export class RoleApi extends runtime.BaseAPI {
427
449
  }
428
450
 
429
451
  /**
430
- * Get the names of all roles in the tenant in alphabetic order. Future enhancements will include search filtering. A valid tenant must be specified as a query parameter. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
452
+ * Get the names of all roles in the tenant in alphabetic order. Future enhancements will include search filtering. A valid tenant must be specified as a query parameter. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
431
453
  */
432
- async getRoleNames(requestParameters: GetRoleNamesRequest, initOverrides?: RequestInit): Promise<RespNameArray> {
454
+ async getRoleNames(requestParameters: GetRoleNamesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespNameArray> {
433
455
  const response = await this.getRoleNamesRaw(requestParameters, initOverrides);
434
456
  return await response.value();
435
457
  }
436
458
 
437
459
  /**
438
- * Get the named role\'s permissions. By default, all permissions assigned to the role, whether directly and transitively through child roles, are returned. Set the immediate query parameter to only retrieve permissions directly assigned to the role. A valid tenant must be specified. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
460
+ * Get the named role\'s permissions. By default, all permissions assigned to the role, whether directly and transitively through child roles, are returned. Set the immediate query parameter to only retrieve permissions directly assigned to the role. A valid tenant must be specified. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
439
461
  */
440
- async getRolePermissionsRaw(requestParameters: GetRolePermissionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespNameArray>> {
441
- if (requestParameters.roleName === null || requestParameters.roleName === undefined) {
442
- throw new runtime.RequiredError('roleName','Required parameter requestParameters.roleName was null or undefined when calling getRolePermissions.');
462
+ async getRolePermissionsRaw(requestParameters: GetRolePermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespNameArray>> {
463
+ if (requestParameters['roleName'] == null) {
464
+ throw new runtime.RequiredError(
465
+ 'roleName',
466
+ 'Required parameter "roleName" was null or undefined when calling getRolePermissions().'
467
+ );
443
468
  }
444
469
 
445
470
  const queryParameters: any = {};
446
471
 
447
- if (requestParameters.tenant !== undefined) {
448
- queryParameters['tenant'] = requestParameters.tenant;
449
- }
450
-
451
- if (requestParameters.immediate !== undefined) {
452
- queryParameters['immediate'] = requestParameters.immediate;
472
+ if (requestParameters['tenant'] != null) {
473
+ queryParameters['tenant'] = requestParameters['tenant'];
453
474
  }
454
475
 
455
- if (requestParameters.pretty !== undefined) {
456
- queryParameters['pretty'] = requestParameters.pretty;
476
+ if (requestParameters['immediate'] != null) {
477
+ queryParameters['immediate'] = requestParameters['immediate'];
457
478
  }
458
479
 
459
480
  const headerParameters: runtime.HTTPHeaders = {};
460
481
 
461
482
  if (this.configuration && this.configuration.apiKey) {
462
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
483
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
463
484
  }
464
485
 
465
486
  const response = await this.request({
466
- path: `/security/role/{roleName}/perms`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters.roleName))),
487
+ path: `/security/role/{roleName}/perms`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters['roleName']))),
467
488
  method: 'GET',
468
489
  headers: headerParameters,
469
490
  query: queryParameters,
@@ -473,33 +494,32 @@ export class RoleApi extends runtime.BaseAPI {
473
494
  }
474
495
 
475
496
  /**
476
- * Get the named role\'s permissions. By default, all permissions assigned to the role, whether directly and transitively through child roles, are returned. Set the immediate query parameter to only retrieve permissions directly assigned to the role. A valid tenant must be specified. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
497
+ * Get the named role\'s permissions. By default, all permissions assigned to the role, whether directly and transitively through child roles, are returned. Set the immediate query parameter to only retrieve permissions directly assigned to the role. A valid tenant must be specified. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
477
498
  */
478
- async getRolePermissions(requestParameters: GetRolePermissionsRequest, initOverrides?: RequestInit): Promise<RespNameArray> {
499
+ async getRolePermissions(requestParameters: GetRolePermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespNameArray> {
479
500
  const response = await this.getRolePermissionsRaw(requestParameters, initOverrides);
480
501
  return await response.value();
481
502
  }
482
503
 
483
504
  /**
484
- * This read-only endpoint previews the transformations that would take place if the same input was used on a replacePathPrefix POST call. This call is also implemented as a POST so that the same input as used on replacePathPrefix can be used here, but this call changes nothing. This endpoint can be used to get an accounting of existing system/path combinations that match the input specification. Such information is useful when trying to duplicate a set of permissions. For example, one may want to copy a file subtree to another location and assign the same permissions to the new subtree as currently exist on the original subtree. One could use this call to calculate the users that should be granted permission on the new subtree. The optional parameters are roleName, oldPrefix and newPrefix. No wildcards are defined for the path prefix parameters. When roleName is specified then only permissions assigned to that role are considered. When the oldPrefix parameter is provided, it\'s used to filter out permissions whose paths do not begin with the specified string; when not provided, no path prefix filtering occurs. When the newPrefix parameter is not provided no new characters are prepended to the new path, effectively just removing the oldPrefix from the new path. When neither oldPrefix nor newPrefix are provided, no path transformation occurs, though system IDs can still be transformed. The result object contains an array of transformation objects, each of which contains the unique permission sequence number, the existing permission that matched the search criteria and the new permission if the specified transformations were applied. A valid tenant and user must be specified in the request body. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
505
+ * This read-only endpoint previews the transformations that would take place if the same input was used on a replacePathPrefix POST call. This call is also implemented as a POST so that the same input as used on replacePathPrefix can be used here, but this call changes nothing. This endpoint can be used to get an accounting of existing system/path combinations that match the input specification. Such information is useful when trying to duplicate a set of permissions. For example, one may want to copy a file subtree to another location and assign the same permissions to the new subtree as currently exist on the original subtree. One could use this call to calculate the users that should be granted permission on the new subtree. The optional parameters are roleName, oldPrefix and newPrefix. No wildcards are defined for the path prefix parameters. When roleName is specified then only permissions assigned to that role are considered. When the oldPrefix parameter is provided, it\'s used to filter out permissions whose paths do not begin with the specified string; when not provided, no path prefix filtering occurs. When the newPrefix parameter is not provided no new characters are prepended to the new path, effectively just removing the oldPrefix from the new path. When neither oldPrefix nor newPrefix are provided, no path transformation occurs, though system IDs can still be transformed. The result object contains an array of transformation objects, each of which contains the unique permission sequence number, the existing permission that matched the search criteria and the new permission if the specified transformations were applied. A valid tenant and user must be specified in the request body. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
485
506
  */
486
- async previewPathPrefixRaw(requestParameters: PreviewPathPrefixRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespPathPrefixes>> {
487
- if (requestParameters.reqPreviewPathPrefix === null || requestParameters.reqPreviewPathPrefix === undefined) {
488
- throw new runtime.RequiredError('reqPreviewPathPrefix','Required parameter requestParameters.reqPreviewPathPrefix was null or undefined when calling previewPathPrefix.');
507
+ async previewPathPrefixRaw(requestParameters: PreviewPathPrefixRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespPathPrefixes>> {
508
+ if (requestParameters['reqPreviewPathPrefix'] == null) {
509
+ throw new runtime.RequiredError(
510
+ 'reqPreviewPathPrefix',
511
+ 'Required parameter "reqPreviewPathPrefix" was null or undefined when calling previewPathPrefix().'
512
+ );
489
513
  }
490
514
 
491
515
  const queryParameters: any = {};
492
516
 
493
- if (requestParameters.pretty !== undefined) {
494
- queryParameters['pretty'] = requestParameters.pretty;
495
- }
496
-
497
517
  const headerParameters: runtime.HTTPHeaders = {};
498
518
 
499
519
  headerParameters['Content-Type'] = 'application/json';
500
520
 
501
521
  if (this.configuration && this.configuration.apiKey) {
502
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
522
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
503
523
  }
504
524
 
505
525
  const response = await this.request({
@@ -507,40 +527,39 @@ export class RoleApi extends runtime.BaseAPI {
507
527
  method: 'POST',
508
528
  headers: headerParameters,
509
529
  query: queryParameters,
510
- body: ReqPreviewPathPrefixToJSON(requestParameters.reqPreviewPathPrefix),
530
+ body: ReqPreviewPathPrefixToJSON(requestParameters['reqPreviewPathPrefix']),
511
531
  }, initOverrides);
512
532
 
513
533
  return new runtime.JSONApiResponse(response, (jsonValue) => RespPathPrefixesFromJSON(jsonValue));
514
534
  }
515
535
 
516
536
  /**
517
- * This read-only endpoint previews the transformations that would take place if the same input was used on a replacePathPrefix POST call. This call is also implemented as a POST so that the same input as used on replacePathPrefix can be used here, but this call changes nothing. This endpoint can be used to get an accounting of existing system/path combinations that match the input specification. Such information is useful when trying to duplicate a set of permissions. For example, one may want to copy a file subtree to another location and assign the same permissions to the new subtree as currently exist on the original subtree. One could use this call to calculate the users that should be granted permission on the new subtree. The optional parameters are roleName, oldPrefix and newPrefix. No wildcards are defined for the path prefix parameters. When roleName is specified then only permissions assigned to that role are considered. When the oldPrefix parameter is provided, it\'s used to filter out permissions whose paths do not begin with the specified string; when not provided, no path prefix filtering occurs. When the newPrefix parameter is not provided no new characters are prepended to the new path, effectively just removing the oldPrefix from the new path. When neither oldPrefix nor newPrefix are provided, no path transformation occurs, though system IDs can still be transformed. The result object contains an array of transformation objects, each of which contains the unique permission sequence number, the existing permission that matched the search criteria and the new permission if the specified transformations were applied. A valid tenant and user must be specified in the request body. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
537
+ * This read-only endpoint previews the transformations that would take place if the same input was used on a replacePathPrefix POST call. This call is also implemented as a POST so that the same input as used on replacePathPrefix can be used here, but this call changes nothing. This endpoint can be used to get an accounting of existing system/path combinations that match the input specification. Such information is useful when trying to duplicate a set of permissions. For example, one may want to copy a file subtree to another location and assign the same permissions to the new subtree as currently exist on the original subtree. One could use this call to calculate the users that should be granted permission on the new subtree. The optional parameters are roleName, oldPrefix and newPrefix. No wildcards are defined for the path prefix parameters. When roleName is specified then only permissions assigned to that role are considered. When the oldPrefix parameter is provided, it\'s used to filter out permissions whose paths do not begin with the specified string; when not provided, no path prefix filtering occurs. When the newPrefix parameter is not provided no new characters are prepended to the new path, effectively just removing the oldPrefix from the new path. When neither oldPrefix nor newPrefix are provided, no path transformation occurs, though system IDs can still be transformed. The result object contains an array of transformation objects, each of which contains the unique permission sequence number, the existing permission that matched the search criteria and the new permission if the specified transformations were applied. A valid tenant and user must be specified in the request body. This request is authorized if the requestor is a user that has access to the specified tenant or if the requestor is a service.
518
538
  */
519
- async previewPathPrefix(requestParameters: PreviewPathPrefixRequest, initOverrides?: RequestInit): Promise<RespPathPrefixes> {
539
+ async previewPathPrefix(requestParameters: PreviewPathPrefixRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespPathPrefixes> {
520
540
  const response = await this.previewPathPrefixRaw(requestParameters, initOverrides);
521
541
  return await response.value();
522
542
  }
523
543
 
524
544
  /**
525
- * Remove a child role from a parent role using a request body. A valid tenant and user must be specified in the request body. The user@tenant identity specified in JWT is authorized to make this request only if that user is an administrator or if they own the parent role.
545
+ * Remove a child role from a parent role using a request body. A valid tenant and user must be specified in the request body. Supported only for roles of type *USER*. The user@tenant identity specified in JWT is authorized to make this request only if that user is an administrator or if they own the parent role.
526
546
  */
527
- async removeChildRoleRaw(requestParameters: RemoveChildRoleRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
528
- if (requestParameters.reqRemoveChildRole === null || requestParameters.reqRemoveChildRole === undefined) {
529
- throw new runtime.RequiredError('reqRemoveChildRole','Required parameter requestParameters.reqRemoveChildRole was null or undefined when calling removeChildRole.');
547
+ async removeChildRoleRaw(requestParameters: RemoveChildRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
548
+ if (requestParameters['reqRemoveChildRole'] == null) {
549
+ throw new runtime.RequiredError(
550
+ 'reqRemoveChildRole',
551
+ 'Required parameter "reqRemoveChildRole" was null or undefined when calling removeChildRole().'
552
+ );
530
553
  }
531
554
 
532
555
  const queryParameters: any = {};
533
556
 
534
- if (requestParameters.pretty !== undefined) {
535
- queryParameters['pretty'] = requestParameters.pretty;
536
- }
537
-
538
557
  const headerParameters: runtime.HTTPHeaders = {};
539
558
 
540
559
  headerParameters['Content-Type'] = 'application/json';
541
560
 
542
561
  if (this.configuration && this.configuration.apiKey) {
543
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
562
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
544
563
  }
545
564
 
546
565
  const response = await this.request({
@@ -548,81 +567,159 @@ export class RoleApi extends runtime.BaseAPI {
548
567
  method: 'POST',
549
568
  headers: headerParameters,
550
569
  query: queryParameters,
551
- body: ReqRemoveChildRoleToJSON(requestParameters.reqRemoveChildRole),
570
+ body: ReqRemoveChildRoleToJSON(requestParameters['reqRemoveChildRole']),
552
571
  }, initOverrides);
553
572
 
554
573
  return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
555
574
  }
556
575
 
557
576
  /**
558
- * Remove a child role from a parent role using a request body. A valid tenant and user must be specified in the request body. The user@tenant identity specified in JWT is authorized to make this request only if that user is an administrator or if they own the parent role.
577
+ * Remove a child role from a parent role using a request body. A valid tenant and user must be specified in the request body. Supported only for roles of type *USER*. The user@tenant identity specified in JWT is authorized to make this request only if that user is an administrator or if they own the parent role.
559
578
  */
560
- async removeChildRole(requestParameters: RemoveChildRoleRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
579
+ async removeChildRole(requestParameters: RemoveChildRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
561
580
  const response = await this.removeChildRoleRaw(requestParameters, initOverrides);
562
581
  return await response.value();
563
582
  }
564
583
 
565
584
  /**
566
- * Remove a permission from a role using a request body. A valid role, roleTenant and permission must be specified in the request body. Only the role owner or administrators are authorized to make this call.
585
+ * Remove an extended permission from all roles in a tenant using a request body. The tenant and permission must be specified in the request body. Each role in the tenant is searched for the extended permission string and, where found, that permission is removed. The matching algorithm is string comparison with wildcard semantics on the path component. This is the same as an exact string match for all parts of the permission specification up to the path part. A match on the path part, however, occurs when its path is a prefix of a role permission\'s path. Consider the following permission specification: files:mytenant:read:mysystem:/my/dir which will match both of the following role permissions: files:mytenant:read:mysystem:/my/dir/subdir/myfile files:mytenant:read:mysystem:/my/dir33/yourfile Note that a match to the second role permission might be a *false capture* if the intension was to remove all permissions to resources in the /my/dir subtree, but not those in other directories. To avoid this potential problem, callers can make two calls, one to this endpoint with a permSpec that ends with a slash (\"/\") and one to the removePermissionFromeAllRoles endpoint with no trailing slash. The former removes all children from the directory subtree, the latter removes the directory itself. Only the Files service is authorized to make this call.
567
586
  */
568
- async removeRolePermissionRaw(requestParameters: RemoveRolePermissionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
569
- if (requestParameters.reqRemoveRolePermission === null || requestParameters.reqRemoveRolePermission === undefined) {
570
- throw new runtime.RequiredError('reqRemoveRolePermission','Required parameter requestParameters.reqRemoveRolePermission was null or undefined when calling removeRolePermission.');
587
+ async removePathPermissionFromAllRolesRaw(requestParameters: RemovePathPermissionFromAllRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
588
+ if (requestParameters['reqRemovePermissionFromAllRoles'] == null) {
589
+ throw new runtime.RequiredError(
590
+ 'reqRemovePermissionFromAllRoles',
591
+ 'Required parameter "reqRemovePermissionFromAllRoles" was null or undefined when calling removePathPermissionFromAllRoles().'
592
+ );
571
593
  }
572
594
 
573
595
  const queryParameters: any = {};
574
596
 
575
- if (requestParameters.pretty !== undefined) {
576
- queryParameters['pretty'] = requestParameters.pretty;
597
+ const headerParameters: runtime.HTTPHeaders = {};
598
+
599
+ headerParameters['Content-Type'] = 'application/json';
600
+
601
+ if (this.configuration && this.configuration.apiKey) {
602
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
603
+ }
604
+
605
+ const response = await this.request({
606
+ path: `/security/role/removePathPermFromAllRoles`,
607
+ method: 'POST',
608
+ headers: headerParameters,
609
+ query: queryParameters,
610
+ body: ReqRemovePermissionFromAllRolesToJSON(requestParameters['reqRemovePermissionFromAllRoles']),
611
+ }, initOverrides);
612
+
613
+ return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
614
+ }
615
+
616
+ /**
617
+ * Remove an extended permission from all roles in a tenant using a request body. The tenant and permission must be specified in the request body. Each role in the tenant is searched for the extended permission string and, where found, that permission is removed. The matching algorithm is string comparison with wildcard semantics on the path component. This is the same as an exact string match for all parts of the permission specification up to the path part. A match on the path part, however, occurs when its path is a prefix of a role permission\'s path. Consider the following permission specification: files:mytenant:read:mysystem:/my/dir which will match both of the following role permissions: files:mytenant:read:mysystem:/my/dir/subdir/myfile files:mytenant:read:mysystem:/my/dir33/yourfile Note that a match to the second role permission might be a *false capture* if the intension was to remove all permissions to resources in the /my/dir subtree, but not those in other directories. To avoid this potential problem, callers can make two calls, one to this endpoint with a permSpec that ends with a slash (\"/\") and one to the removePermissionFromeAllRoles endpoint with no trailing slash. The former removes all children from the directory subtree, the latter removes the directory itself. Only the Files service is authorized to make this call.
618
+ */
619
+ async removePathPermissionFromAllRoles(requestParameters: RemovePathPermissionFromAllRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
620
+ const response = await this.removePathPermissionFromAllRolesRaw(requestParameters, initOverrides);
621
+ return await response.value();
622
+ }
623
+
624
+ /**
625
+ * Remove a permission from all roles in a tenant using a request body. The tenant and permission must be specified in the request body. Each role in the tenant is searched for the *exact* permission string and, where found, that permission is removed. The matching algorithm is simple, character by character, string comparison. Permissions are not interpreted. For example, a permission that contains a wildcard (*) will only match a role\'s permission when the same wildcard is found in the exact same position. The same rule applies to permission segments with multiple, comma separated components: a match requires the exact same ordering and spacing of components. Only services are authorized to make this call.
626
+ */
627
+ async removePermissionFromAllRolesRaw(requestParameters: RemovePermissionFromAllRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
628
+ if (requestParameters['reqRemovePermissionFromAllRoles'] == null) {
629
+ throw new runtime.RequiredError(
630
+ 'reqRemovePermissionFromAllRoles',
631
+ 'Required parameter "reqRemovePermissionFromAllRoles" was null or undefined when calling removePermissionFromAllRoles().'
632
+ );
577
633
  }
578
634
 
635
+ const queryParameters: any = {};
636
+
579
637
  const headerParameters: runtime.HTTPHeaders = {};
580
638
 
581
639
  headerParameters['Content-Type'] = 'application/json';
582
640
 
583
641
  if (this.configuration && this.configuration.apiKey) {
584
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
642
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
585
643
  }
586
644
 
587
645
  const response = await this.request({
588
- path: `/security/role/removePerm`,
646
+ path: `/security/role/removePermFromAllRoles`,
589
647
  method: 'POST',
590
648
  headers: headerParameters,
591
649
  query: queryParameters,
592
- body: ReqRemoveRolePermissionToJSON(requestParameters.reqRemoveRolePermission),
650
+ body: ReqRemovePermissionFromAllRolesToJSON(requestParameters['reqRemovePermissionFromAllRoles']),
593
651
  }, initOverrides);
594
652
 
595
653
  return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
596
654
  }
597
655
 
598
656
  /**
599
- * Remove a permission from a role using a request body. A valid role, roleTenant and permission must be specified in the request body. Only the role owner or administrators are authorized to make this call.
657
+ * Remove a permission from all roles in a tenant using a request body. The tenant and permission must be specified in the request body. Each role in the tenant is searched for the *exact* permission string and, where found, that permission is removed. The matching algorithm is simple, character by character, string comparison. Permissions are not interpreted. For example, a permission that contains a wildcard (*) will only match a role\'s permission when the same wildcard is found in the exact same position. The same rule applies to permission segments with multiple, comma separated components: a match requires the exact same ordering and spacing of components. Only services are authorized to make this call.
600
658
  */
601
- async removeRolePermission(requestParameters: RemoveRolePermissionRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
602
- const response = await this.removeRolePermissionRaw(requestParameters, initOverrides);
659
+ async removePermissionFromAllRoles(requestParameters: RemovePermissionFromAllRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
660
+ const response = await this.removePermissionFromAllRolesRaw(requestParameters, initOverrides);
603
661
  return await response.value();
604
662
  }
605
663
 
606
664
  /**
607
- * Replace the text in a permission specification when its last component defines an *extended path attribute*. Extended path attributes enhance the standard Shiro matching algorithm with one that treats designated components in a permission specification as a path name, such as a posix file or directory path name. This request is useful when files or directories have been renamed or moved and their authorizations need to be adjusted. Consider, for example, permissions that conform to the following specification: files:tenantId:op:systemId:path By definition, the last component is an extended path attribute whose content can be changed by replacePathPrefix requests. Specifically, paths that begin with the oldPrefix will have that prefix replaced with the newPrefix value. Replacement only occurs on permissions that also match the schema and oldSystemId parameter values. The systemId attribute is required to immediately precede the path attribute, which must be the last attribute. Additionally, the oldSystemId is replaced with the newSystemId when a match is found. If a roleName is provided, then replacement is limited to permissions defined only in that role. Otherwise, permissions in all roles that meet the other matching criteria will be considered. The optional parameters are roleName, oldPrefix and newPrefix. No wildcards are defined for the path prefix parameters. When roleName is specified then only permissions assigned to that role are considered. When the oldPrefix parameter is provided, it\'s used to filter out permissions whose paths do not begin with the specified string; when not provided, no path prefix filtering occurs. When the newPrefix parameter is not provided no new characters are prepended to the new path, effectively just removing the oldPrefix from the new path. When neither oldPrefix nor newPrefix are provided, no path transformation occurs, though system IDs can still be transformed. The previewPathPrefix request provides a way to do a dry run using the same input as this request. The preview call calculates the permissions that would change and what their new values would be, but it does not actually change those permissions as replacePathPrefix does. The input parameters are passed in the payload of this request. The response indicates the number of changed permission specifications. The path prefix replacement operation is authorized if the user@tenant in the JWT represents a tenant administrator or the Files service.
665
+ * Remove a permission from a role using a request body. A valid role, roleTenant and permission must be specified in the request body. 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.
608
666
  */
609
- async replacePathPrefixRaw(requestParameters: ReplacePathPrefixRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespChangeCount>> {
610
- if (requestParameters.reqReplacePathPrefix === null || requestParameters.reqReplacePathPrefix === undefined) {
611
- throw new runtime.RequiredError('reqReplacePathPrefix','Required parameter requestParameters.reqReplacePathPrefix was null or undefined when calling replacePathPrefix.');
667
+ async removeRolePermissionRaw(requestParameters: RemoveRolePermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
668
+ if (requestParameters['reqRemoveRolePermission'] == null) {
669
+ throw new runtime.RequiredError(
670
+ 'reqRemoveRolePermission',
671
+ 'Required parameter "reqRemoveRolePermission" was null or undefined when calling removeRolePermission().'
672
+ );
612
673
  }
613
674
 
614
675
  const queryParameters: any = {};
615
676
 
616
- if (requestParameters.pretty !== undefined) {
617
- queryParameters['pretty'] = requestParameters.pretty;
677
+ const headerParameters: runtime.HTTPHeaders = {};
678
+
679
+ headerParameters['Content-Type'] = 'application/json';
680
+
681
+ if (this.configuration && this.configuration.apiKey) {
682
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
683
+ }
684
+
685
+ const response = await this.request({
686
+ path: `/security/role/removePerm`,
687
+ method: 'POST',
688
+ headers: headerParameters,
689
+ query: queryParameters,
690
+ body: ReqRemoveRolePermissionToJSON(requestParameters['reqRemoveRolePermission']),
691
+ }, initOverrides);
692
+
693
+ return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
694
+ }
695
+
696
+ /**
697
+ * Remove a permission from a role using a request body. A valid role, roleTenant and permission must be specified in the request body. 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.
698
+ */
699
+ async removeRolePermission(requestParameters: RemoveRolePermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
700
+ const response = await this.removeRolePermissionRaw(requestParameters, initOverrides);
701
+ return await response.value();
702
+ }
703
+
704
+ /**
705
+ * Replace the text in a permission specification when its last component defines an *extended path attribute*. Extended path attributes enhance the standard Shiro matching algorithm with one that treats designated components in a permission specification as a path name, such as a posix file or directory path name. This request is useful when files or directories have been renamed or moved and their authorizations need to be adjusted. Consider, for example, permissions that conform to the following specification: files:tenantId:op:systemId:path By definition, the last component is an extended path attribute whose content can be changed by replacePathPrefix requests. Specifically, paths that begin with the oldPrefix will have that prefix replaced with the newPrefix value. Replacement only occurs on permissions that also match the schema and oldSystemId parameter values. The systemId attribute is required to immediately precede the path attribute, which must be the last attribute. Additionally, the oldSystemId is replaced with the newSystemId when a match is found. If a roleName is provided, then replacement is limited to permissions defined only in that role. Otherwise, permissions in all roles that meet the other matching criteria will be considered. The optional parameters are roleName, oldPrefix and newPrefix. No wildcards are defined for the path prefix parameters. When roleName is specified then only permissions assigned to that role are considered. When the oldPrefix parameter is provided, it\'s used to filter out permissions whose paths do not begin with the specified string; when not provided, no path prefix filtering occurs. When the newPrefix parameter is not provided no new characters are prepended to the new path, effectively just removing the oldPrefix from the new path. When neither oldPrefix nor newPrefix are provided, no path transformation occurs, though system IDs can still be transformed. The previewPathPrefix request provides a way to do a dry run using the same input as this request. The preview call calculates the permissions that would change and what their new values would be, but it does not actually change those permissions as replacePathPrefix does. The input parameters are passed in the payload of this request. The response indicates the number of changed permission specifications. The path prefix replacement operation is authorized if the user@tenant in the JWT represents a tenant administrator or the Files service.
706
+ */
707
+ async replacePathPrefixRaw(requestParameters: ReplacePathPrefixRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeCount>> {
708
+ if (requestParameters['reqReplacePathPrefix'] == null) {
709
+ throw new runtime.RequiredError(
710
+ 'reqReplacePathPrefix',
711
+ 'Required parameter "reqReplacePathPrefix" was null or undefined when calling replacePathPrefix().'
712
+ );
618
713
  }
619
714
 
715
+ const queryParameters: any = {};
716
+
620
717
  const headerParameters: runtime.HTTPHeaders = {};
621
718
 
622
719
  headerParameters['Content-Type'] = 'application/json';
623
720
 
624
721
  if (this.configuration && this.configuration.apiKey) {
625
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
722
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
626
723
  }
627
724
 
628
725
  const response = await this.request({
@@ -630,36 +727,42 @@ export class RoleApi extends runtime.BaseAPI {
630
727
  method: 'POST',
631
728
  headers: headerParameters,
632
729
  query: queryParameters,
633
- body: ReqReplacePathPrefixToJSON(requestParameters.reqReplacePathPrefix),
730
+ body: ReqReplacePathPrefixToJSON(requestParameters['reqReplacePathPrefix']),
634
731
  }, initOverrides);
635
732
 
636
733
  return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeCountFromJSON(jsonValue));
637
734
  }
638
735
 
639
736
  /**
640
- * Replace the text in a permission specification when its last component defines an *extended path attribute*. Extended path attributes enhance the standard Shiro matching algorithm with one that treats designated components in a permission specification as a path name, such as a posix file or directory path name. This request is useful when files or directories have been renamed or moved and their authorizations need to be adjusted. Consider, for example, permissions that conform to the following specification: files:tenantId:op:systemId:path By definition, the last component is an extended path attribute whose content can be changed by replacePathPrefix requests. Specifically, paths that begin with the oldPrefix will have that prefix replaced with the newPrefix value. Replacement only occurs on permissions that also match the schema and oldSystemId parameter values. The systemId attribute is required to immediately precede the path attribute, which must be the last attribute. Additionally, the oldSystemId is replaced with the newSystemId when a match is found. If a roleName is provided, then replacement is limited to permissions defined only in that role. Otherwise, permissions in all roles that meet the other matching criteria will be considered. The optional parameters are roleName, oldPrefix and newPrefix. No wildcards are defined for the path prefix parameters. When roleName is specified then only permissions assigned to that role are considered. When the oldPrefix parameter is provided, it\'s used to filter out permissions whose paths do not begin with the specified string; when not provided, no path prefix filtering occurs. When the newPrefix parameter is not provided no new characters are prepended to the new path, effectively just removing the oldPrefix from the new path. When neither oldPrefix nor newPrefix are provided, no path transformation occurs, though system IDs can still be transformed. The previewPathPrefix request provides a way to do a dry run using the same input as this request. The preview call calculates the permissions that would change and what their new values would be, but it does not actually change those permissions as replacePathPrefix does. The input parameters are passed in the payload of this request. The response indicates the number of changed permission specifications. The path prefix replacement operation is authorized if the user@tenant in the JWT represents a tenant administrator or the Files service.
737
+ * Replace the text in a permission specification when its last component defines an *extended path attribute*. Extended path attributes enhance the standard Shiro matching algorithm with one that treats designated components in a permission specification as a path name, such as a posix file or directory path name. This request is useful when files or directories have been renamed or moved and their authorizations need to be adjusted. Consider, for example, permissions that conform to the following specification: files:tenantId:op:systemId:path By definition, the last component is an extended path attribute whose content can be changed by replacePathPrefix requests. Specifically, paths that begin with the oldPrefix will have that prefix replaced with the newPrefix value. Replacement only occurs on permissions that also match the schema and oldSystemId parameter values. The systemId attribute is required to immediately precede the path attribute, which must be the last attribute. Additionally, the oldSystemId is replaced with the newSystemId when a match is found. If a roleName is provided, then replacement is limited to permissions defined only in that role. Otherwise, permissions in all roles that meet the other matching criteria will be considered. The optional parameters are roleName, oldPrefix and newPrefix. No wildcards are defined for the path prefix parameters. When roleName is specified then only permissions assigned to that role are considered. When the oldPrefix parameter is provided, it\'s used to filter out permissions whose paths do not begin with the specified string; when not provided, no path prefix filtering occurs. When the newPrefix parameter is not provided no new characters are prepended to the new path, effectively just removing the oldPrefix from the new path. When neither oldPrefix nor newPrefix are provided, no path transformation occurs, though system IDs can still be transformed. The previewPathPrefix request provides a way to do a dry run using the same input as this request. The preview call calculates the permissions that would change and what their new values would be, but it does not actually change those permissions as replacePathPrefix does. The input parameters are passed in the payload of this request. The response indicates the number of changed permission specifications. The path prefix replacement operation is authorized if the user@tenant in the JWT represents a tenant administrator or the Files service.
641
738
  */
642
- async replacePathPrefix(requestParameters: ReplacePathPrefixRequest, initOverrides?: RequestInit): Promise<RespChangeCount> {
739
+ async replacePathPrefix(requestParameters: ReplacePathPrefixRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeCount> {
643
740
  const response = await this.replacePathPrefixRaw(requestParameters, initOverrides);
644
741
  return await response.value();
645
742
  }
646
743
 
647
744
  /**
648
- * Update an existing role\'s decription using a request body. The size limit on a description is 2048 characters. This request is authorized if the requestor is the role owner or an administrator.
745
+ * Check to see if the specified role allows the specified permission. Any authenticated user may make this request.
649
746
  */
650
- async updateRoleDescriptionRaw(requestParameters: UpdateRoleDescriptionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespBasic>> {
651
- if (requestParameters.roleName === null || requestParameters.roleName === undefined) {
652
- throw new runtime.RequiredError('roleName','Required parameter requestParameters.roleName was null or undefined when calling updateRoleDescription.');
747
+ async rolePermitsRaw(requestParameters: RolePermitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
748
+ if (requestParameters['roleName'] == null) {
749
+ throw new runtime.RequiredError(
750
+ 'roleName',
751
+ 'Required parameter "roleName" was null or undefined when calling rolePermits().'
752
+ );
653
753
  }
654
754
 
655
- if (requestParameters.reqUpdateRoleDescription === null || requestParameters.reqUpdateRoleDescription === undefined) {
656
- throw new runtime.RequiredError('reqUpdateRoleDescription','Required parameter requestParameters.reqUpdateRoleDescription was null or undefined when calling updateRoleDescription.');
755
+ if (requestParameters['reqRolePermits'] == null) {
756
+ throw new runtime.RequiredError(
757
+ 'reqRolePermits',
758
+ 'Required parameter "reqRolePermits" was null or undefined when calling rolePermits().'
759
+ );
657
760
  }
658
761
 
659
762
  const queryParameters: any = {};
660
763
 
661
- if (requestParameters.pretty !== undefined) {
662
- queryParameters['pretty'] = requestParameters.pretty;
764
+ if (requestParameters['immediate'] != null) {
765
+ queryParameters['immediate'] = requestParameters['immediate'];
663
766
  }
664
767
 
665
768
  const headerParameters: runtime.HTTPHeaders = {};
@@ -667,114 +770,165 @@ export class RoleApi extends runtime.BaseAPI {
667
770
  headerParameters['Content-Type'] = 'application/json';
668
771
 
669
772
  if (this.configuration && this.configuration.apiKey) {
670
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
773
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
671
774
  }
672
775
 
673
776
  const response = await this.request({
674
- path: `/security/role/updateDesc/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters.roleName))),
777
+ path: `/security/role/{roleName}/permits`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters['roleName']))),
675
778
  method: 'POST',
676
779
  headers: headerParameters,
677
780
  query: queryParameters,
678
- body: ReqUpdateRoleDescriptionToJSON(requestParameters.reqUpdateRoleDescription),
781
+ body: ReqRolePermitsToJSON(requestParameters['reqRolePermits']),
679
782
  }, initOverrides);
680
783
 
681
- return new runtime.JSONApiResponse(response, (jsonValue) => RespBasicFromJSON(jsonValue));
784
+ return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
682
785
  }
683
786
 
684
787
  /**
685
- * Update an existing role\'s decription using a request body. The size limit on a description is 2048 characters. This request is authorized if the requestor is the role owner or an administrator.
788
+ * Check to see if the specified role allows the specified permission. Any authenticated user may make this request.
686
789
  */
687
- async updateRoleDescription(requestParameters: UpdateRoleDescriptionRequest, initOverrides?: RequestInit): Promise<RespBasic> {
688
- const response = await this.updateRoleDescriptionRaw(requestParameters, initOverrides);
790
+ async rolePermits(requestParameters: RolePermitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
791
+ const response = await this.rolePermitsRaw(requestParameters, initOverrides);
689
792
  return await response.value();
690
793
  }
691
794
 
692
795
  /**
693
- * Update an existing role\'s name using a request body. Role names are case sensitive, alphanumeric strings that can contain underscores but must begin with an alphabetic character. The limit on role name is 58 characters. This request is authorized if the requestor is the role owner or an administrator.
796
+ * Update an existing role\'s decription using a request body. The size limit on a description is 2048 characters. This request is authorized if the requestor is the role owner or an administrator.
694
797
  */
695
- async updateRoleNameRaw(requestParameters: UpdateRoleNameRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespBasic>> {
696
- if (requestParameters.roleName === null || requestParameters.roleName === undefined) {
697
- throw new runtime.RequiredError('roleName','Required parameter requestParameters.roleName was null or undefined when calling updateRoleName.');
798
+ async updateRoleDescriptionRaw(requestParameters: UpdateRoleDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespBasic>> {
799
+ if (requestParameters['roleName'] == null) {
800
+ throw new runtime.RequiredError(
801
+ 'roleName',
802
+ 'Required parameter "roleName" was null or undefined when calling updateRoleDescription().'
803
+ );
698
804
  }
699
805
 
700
- if (requestParameters.reqUpdateRoleName === null || requestParameters.reqUpdateRoleName === undefined) {
701
- throw new runtime.RequiredError('reqUpdateRoleName','Required parameter requestParameters.reqUpdateRoleName was null or undefined when calling updateRoleName.');
806
+ if (requestParameters['reqUpdateRoleDescription'] == null) {
807
+ throw new runtime.RequiredError(
808
+ 'reqUpdateRoleDescription',
809
+ 'Required parameter "reqUpdateRoleDescription" was null or undefined when calling updateRoleDescription().'
810
+ );
702
811
  }
703
812
 
704
813
  const queryParameters: any = {};
705
814
 
706
- if (requestParameters.pretty !== undefined) {
707
- queryParameters['pretty'] = requestParameters.pretty;
815
+ const headerParameters: runtime.HTTPHeaders = {};
816
+
817
+ headerParameters['Content-Type'] = 'application/json';
818
+
819
+ if (this.configuration && this.configuration.apiKey) {
820
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
708
821
  }
709
822
 
823
+ const response = await this.request({
824
+ path: `/security/role/updateDesc/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters['roleName']))),
825
+ method: 'POST',
826
+ headers: headerParameters,
827
+ query: queryParameters,
828
+ body: ReqUpdateRoleDescriptionToJSON(requestParameters['reqUpdateRoleDescription']),
829
+ }, initOverrides);
830
+
831
+ return new runtime.JSONApiResponse(response, (jsonValue) => RespBasicFromJSON(jsonValue));
832
+ }
833
+
834
+ /**
835
+ * Update an existing role\'s decription using a request body. The size limit on a description is 2048 characters. This request is authorized if the requestor is the role owner or an administrator.
836
+ */
837
+ async updateRoleDescription(requestParameters: UpdateRoleDescriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespBasic> {
838
+ const response = await this.updateRoleDescriptionRaw(requestParameters, initOverrides);
839
+ return await response.value();
840
+ }
841
+
842
+ /**
843
+ * Update an existing role\'s name using a request body. Role names are case sensitive, alphanumeric strings that can contain underscores but must begin with an alphabetic character. The limit on role name is 58 characters. This request is authorized if the requestor is the role owner or an administrator.
844
+ */
845
+ async updateRoleNameRaw(requestParameters: UpdateRoleNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespBasic>> {
846
+ if (requestParameters['roleName'] == null) {
847
+ throw new runtime.RequiredError(
848
+ 'roleName',
849
+ 'Required parameter "roleName" was null or undefined when calling updateRoleName().'
850
+ );
851
+ }
852
+
853
+ if (requestParameters['reqUpdateRoleName'] == null) {
854
+ throw new runtime.RequiredError(
855
+ 'reqUpdateRoleName',
856
+ 'Required parameter "reqUpdateRoleName" was null or undefined when calling updateRoleName().'
857
+ );
858
+ }
859
+
860
+ const queryParameters: any = {};
861
+
710
862
  const headerParameters: runtime.HTTPHeaders = {};
711
863
 
712
864
  headerParameters['Content-Type'] = 'application/json';
713
865
 
714
866
  if (this.configuration && this.configuration.apiKey) {
715
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
867
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
716
868
  }
717
869
 
718
870
  const response = await this.request({
719
- path: `/security/role/updateName/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters.roleName))),
871
+ path: `/security/role/updateName/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters['roleName']))),
720
872
  method: 'POST',
721
873
  headers: headerParameters,
722
874
  query: queryParameters,
723
- body: ReqUpdateRoleNameToJSON(requestParameters.reqUpdateRoleName),
875
+ body: ReqUpdateRoleNameToJSON(requestParameters['reqUpdateRoleName']),
724
876
  }, initOverrides);
725
877
 
726
878
  return new runtime.JSONApiResponse(response, (jsonValue) => RespBasicFromJSON(jsonValue));
727
879
  }
728
880
 
729
881
  /**
730
- * Update an existing role\'s name using a request body. Role names are case sensitive, alphanumeric strings that can contain underscores but must begin with an alphabetic character. The limit on role name is 58 characters. This request is authorized if the requestor is the role owner or an administrator.
882
+ * Update an existing role\'s name using a request body. Role names are case sensitive, alphanumeric strings that can contain underscores but must begin with an alphabetic character. The limit on role name is 58 characters. This request is authorized if the requestor is the role owner or an administrator.
731
883
  */
732
- async updateRoleName(requestParameters: UpdateRoleNameRequest, initOverrides?: RequestInit): Promise<RespBasic> {
884
+ async updateRoleName(requestParameters: UpdateRoleNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespBasic> {
733
885
  const response = await this.updateRoleNameRaw(requestParameters, initOverrides);
734
886
  return await response.value();
735
887
  }
736
888
 
737
889
  /**
738
- * Update an existing role\'s owner using a request body. Required parameters in the payload are the *roleTenant*, which is the tenant of named role, and *newOwner*, which is the user to which role ownership is being transferred. The *newTenant* payload parameter is optional and only needed when the new owner resides in a different tenant than that of the current owner. This request is authorized if the requestor is the role owner or an administrator. If a new tenant is specified, then the requestor must also be allowed to act in the new tenant.
890
+ * Update an existing role\'s owner using a request body. Required parameters in the payload are the *roleTenant*, which is the tenant of named role, and *newOwner*, which is the user to which role ownership is being transferred. The *newTenant* payload parameter is optional and only needed when the new owner resides in a different tenant than that of the current owner. This request is authorized if the requestor is the role owner or an administrator. If a new tenant is specified, then the requestor must also be allowed to act in the new tenant.
739
891
  */
740
- async updateRoleOwnerRaw(requestParameters: UpdateRoleOwnerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespBasic>> {
741
- if (requestParameters.roleName === null || requestParameters.roleName === undefined) {
742
- throw new runtime.RequiredError('roleName','Required parameter requestParameters.roleName was null or undefined when calling updateRoleOwner.');
892
+ async updateRoleOwnerRaw(requestParameters: UpdateRoleOwnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespBasic>> {
893
+ if (requestParameters['roleName'] == null) {
894
+ throw new runtime.RequiredError(
895
+ 'roleName',
896
+ 'Required parameter "roleName" was null or undefined when calling updateRoleOwner().'
897
+ );
743
898
  }
744
899
 
745
- if (requestParameters.reqUpdateRoleOwner === null || requestParameters.reqUpdateRoleOwner === undefined) {
746
- throw new runtime.RequiredError('reqUpdateRoleOwner','Required parameter requestParameters.reqUpdateRoleOwner was null or undefined when calling updateRoleOwner.');
900
+ if (requestParameters['reqUpdateRoleOwner'] == null) {
901
+ throw new runtime.RequiredError(
902
+ 'reqUpdateRoleOwner',
903
+ 'Required parameter "reqUpdateRoleOwner" was null or undefined when calling updateRoleOwner().'
904
+ );
747
905
  }
748
906
 
749
907
  const queryParameters: any = {};
750
908
 
751
- if (requestParameters.pretty !== undefined) {
752
- queryParameters['pretty'] = requestParameters.pretty;
753
- }
754
-
755
909
  const headerParameters: runtime.HTTPHeaders = {};
756
910
 
757
911
  headerParameters['Content-Type'] = 'application/json';
758
912
 
759
913
  if (this.configuration && this.configuration.apiKey) {
760
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
914
+ headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
761
915
  }
762
916
 
763
917
  const response = await this.request({
764
- path: `/security/role/updateOwner/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters.roleName))),
918
+ path: `/security/role/updateOwner/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters['roleName']))),
765
919
  method: 'POST',
766
920
  headers: headerParameters,
767
921
  query: queryParameters,
768
- body: ReqUpdateRoleOwnerToJSON(requestParameters.reqUpdateRoleOwner),
922
+ body: ReqUpdateRoleOwnerToJSON(requestParameters['reqUpdateRoleOwner']),
769
923
  }, initOverrides);
770
924
 
771
925
  return new runtime.JSONApiResponse(response, (jsonValue) => RespBasicFromJSON(jsonValue));
772
926
  }
773
927
 
774
928
  /**
775
- * Update an existing role\'s owner using a request body. Required parameters in the payload are the *roleTenant*, which is the tenant of named role, and *newOwner*, which is the user to which role ownership is being transferred. The *newTenant* payload parameter is optional and only needed when the new owner resides in a different tenant than that of the current owner. This request is authorized if the requestor is the role owner or an administrator. If a new tenant is specified, then the requestor must also be allowed to act in the new tenant.
929
+ * Update an existing role\'s owner using a request body. Required parameters in the payload are the *roleTenant*, which is the tenant of named role, and *newOwner*, which is the user to which role ownership is being transferred. The *newTenant* payload parameter is optional and only needed when the new owner resides in a different tenant than that of the current owner. This request is authorized if the requestor is the role owner or an administrator. If a new tenant is specified, then the requestor must also be allowed to act in the new tenant.
776
930
  */
777
- async updateRoleOwner(requestParameters: UpdateRoleOwnerRequest, initOverrides?: RequestInit): Promise<RespBasic> {
931
+ async updateRoleOwner(requestParameters: UpdateRoleOwnerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespBasic> {
778
932
  const response = await this.updateRoleOwnerRaw(requestParameters, initOverrides);
779
933
  return await response.value();
780
934
  }