@keycloak/keycloak-admin-client 16.0.0-dev.9 → 17.0.0-dev.1

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 (80) hide show
  1. package/README.md +32 -1
  2. package/lib/client.d.ts +8 -6
  3. package/lib/client.js +14 -6
  4. package/lib/client.js.map +1 -1
  5. package/lib/defs/clientPoliciesRepresentation.d.ts +4 -0
  6. package/lib/defs/clientPoliciesRepresentation.js +3 -0
  7. package/lib/defs/clientPoliciesRepresentation.js.map +1 -0
  8. package/lib/defs/clientPolicyConditionRepresentation.d.ts +4 -0
  9. package/lib/defs/clientPolicyConditionRepresentation.js +3 -0
  10. package/lib/defs/clientPolicyConditionRepresentation.js.map +1 -0
  11. package/lib/defs/clientPolicyExecutorRepresentation.d.ts +4 -0
  12. package/lib/defs/clientPolicyExecutorRepresentation.js +3 -0
  13. package/lib/defs/clientPolicyExecutorRepresentation.js.map +1 -0
  14. package/lib/defs/clientPolicyRepresentation.d.ts +8 -0
  15. package/lib/defs/clientPolicyRepresentation.js +3 -0
  16. package/lib/defs/clientPolicyRepresentation.js.map +1 -0
  17. package/lib/defs/clientProfileRepresentation.d.ts +6 -0
  18. package/lib/defs/clientProfileRepresentation.js +3 -0
  19. package/lib/defs/clientProfileRepresentation.js.map +1 -0
  20. package/lib/defs/clientProfilesRepresentation.d.ts +5 -0
  21. package/lib/defs/clientProfilesRepresentation.js +3 -0
  22. package/lib/defs/clientProfilesRepresentation.js.map +1 -0
  23. package/lib/defs/credentialRepresentation.d.ts +5 -9
  24. package/lib/defs/identityProviderMapperTypeRepresentation.d.ts +8 -0
  25. package/lib/defs/identityProviderMapperTypeRepresentation.js +3 -0
  26. package/lib/defs/identityProviderMapperTypeRepresentation.js.map +1 -0
  27. package/lib/defs/realmRepresentation.d.ts +21 -0
  28. package/lib/defs/requiredActionProviderRepresentation.d.ts +1 -1
  29. package/lib/defs/requiredActionProviderSimpleRepresentation.d.ts +5 -0
  30. package/lib/defs/requiredActionProviderSimpleRepresentation.js +3 -0
  31. package/lib/defs/requiredActionProviderSimpleRepresentation.js.map +1 -0
  32. package/lib/defs/resourceRepresentation.d.ts +10 -6
  33. package/lib/defs/resourceServerRepresentation.d.ts +25 -8
  34. package/lib/defs/resourceServerRepresentation.js +0 -7
  35. package/lib/defs/resourceServerRepresentation.js.map +1 -1
  36. package/lib/defs/userProfileConfig.d.ts +31 -0
  37. package/lib/defs/userProfileConfig.js +3 -0
  38. package/lib/defs/userProfileConfig.js.map +1 -0
  39. package/lib/resources/agent.d.ts +4 -3
  40. package/lib/resources/agent.js +33 -28
  41. package/lib/resources/agent.js.map +1 -1
  42. package/lib/resources/attackDetection.d.ts +8 -8
  43. package/lib/resources/attackDetection.js.map +1 -1
  44. package/lib/resources/authenticationManagement.d.ts +28 -27
  45. package/lib/resources/authenticationManagement.js.map +1 -1
  46. package/lib/resources/cache.d.ts +2 -2
  47. package/lib/resources/clientPolicies.d.ts +23 -0
  48. package/lib/resources/clientPolicies.js +58 -0
  49. package/lib/resources/clientPolicies.js.map +1 -0
  50. package/lib/resources/clientScopes.d.ts +72 -72
  51. package/lib/resources/clientScopes.js +4 -6
  52. package/lib/resources/clientScopes.js.map +1 -1
  53. package/lib/resources/clients.d.ts +260 -195
  54. package/lib/resources/clients.js +52 -3
  55. package/lib/resources/clients.js.map +1 -1
  56. package/lib/resources/components.d.ts +20 -13
  57. package/lib/resources/components.js +6 -0
  58. package/lib/resources/components.js.map +1 -1
  59. package/lib/resources/groups.d.ts +64 -53
  60. package/lib/resources/groups.js +10 -0
  61. package/lib/resources/groups.js.map +1 -1
  62. package/lib/resources/identityProviders.d.ts +36 -35
  63. package/lib/resources/identityProviders.js.map +1 -1
  64. package/lib/resources/realms.d.ts +55 -47
  65. package/lib/resources/realms.js +8 -1
  66. package/lib/resources/realms.js.map +1 -1
  67. package/lib/resources/resource.d.ts +1 -1
  68. package/lib/resources/roles.d.ts +44 -36
  69. package/lib/resources/roles.js.map +1 -1
  70. package/lib/resources/serverInfo.d.ts +1 -1
  71. package/lib/resources/sessions.d.ts +2 -2
  72. package/lib/resources/userStorageProvider.d.ts +17 -17
  73. package/lib/resources/users.d.ts +146 -107
  74. package/lib/resources/users.js +34 -0
  75. package/lib/resources/users.js.map +1 -1
  76. package/lib/resources/whoAmI.d.ts +2 -2
  77. package/lib/utils/auth.d.ts +10 -0
  78. package/lib/utils/auth.js +3 -3
  79. package/lib/utils/auth.js.map +1 -1
  80. package/package.json +6 -5
@@ -14,11 +14,14 @@ import GlobalRequestResult from '../defs/globalRequestResult';
14
14
  import Resource from './resource';
15
15
  import CertificateRepresentation from '../defs/certificateRepresentation';
16
16
  import KeyStoreConfig from '../defs/keystoreConfig';
17
+ import ResourceServerRepresentation from '../defs/resourceServerRepresentation';
18
+ import ScopeRepresentation from '../defs/scopeRepresentation';
17
19
  export interface ClientQuery {
18
20
  first?: number;
19
21
  max?: number;
20
22
  clientId?: string;
21
23
  viewableOnly?: boolean;
24
+ search?: boolean;
22
25
  }
23
26
  export interface PolicyQuery {
24
27
  id?: string;
@@ -35,460 +38,522 @@ export interface PolicyQuery {
35
38
  export declare class Clients extends Resource<{
36
39
  realm?: string;
37
40
  }> {
38
- find: (payload?: ClientQuery & {
39
- realm?: string;
40
- }) => Promise<ClientRepresentation[]>;
41
- create: (payload?: ClientRepresentation & {
42
- realm?: string;
43
- }) => Promise<{
41
+ find: (payload?: (ClientQuery & {
42
+ realm?: string | undefined;
43
+ }) | undefined) => Promise<ClientRepresentation[]>;
44
+ create: (payload?: (ClientRepresentation & {
45
+ realm?: string | undefined;
46
+ }) | undefined) => Promise<{
44
47
  id: string;
45
48
  }>;
46
- findOne: (payload?: {
49
+ findOne: (payload?: ({
47
50
  id: string;
48
51
  } & {
49
- realm?: string;
50
- }) => Promise<ClientRepresentation>;
52
+ realm?: string | undefined;
53
+ }) | undefined) => Promise<ClientRepresentation | undefined>;
51
54
  update: (query: {
52
55
  id: string;
53
56
  } & {
54
- realm?: string;
57
+ realm?: string | undefined;
55
58
  }, payload: ClientRepresentation) => Promise<void>;
56
- del: (payload?: {
59
+ del: (payload?: ({
57
60
  id: string;
58
61
  } & {
59
- realm?: string;
60
- }) => Promise<void>;
61
- createRole: (payload?: RoleRepresentation & {
62
- realm?: string;
63
- }) => Promise<{
62
+ realm?: string | undefined;
63
+ }) | undefined) => Promise<void>;
64
+ createRole: (payload?: (RoleRepresentation & {
65
+ realm?: string | undefined;
66
+ }) | undefined) => Promise<{
64
67
  roleName: string;
65
68
  }>;
66
- listRoles: (payload?: {
69
+ listRoles: (payload?: ({
67
70
  id: string;
68
71
  } & {
69
- realm?: string;
70
- }) => Promise<RoleRepresentation[]>;
71
- findRole: (payload?: {
72
+ realm?: string | undefined;
73
+ }) | undefined) => Promise<RoleRepresentation[]>;
74
+ findRole: (payload?: ({
72
75
  id: string;
73
76
  roleName: string;
74
77
  } & {
75
- realm?: string;
76
- }) => Promise<RoleRepresentation>;
78
+ realm?: string | undefined;
79
+ }) | undefined) => Promise<RoleRepresentation>;
77
80
  updateRole: (query: {
78
81
  id: string;
79
82
  roleName: string;
80
83
  } & {
81
- realm?: string;
84
+ realm?: string | undefined;
82
85
  }, payload: RoleRepresentation) => Promise<void>;
83
- delRole: (payload?: {
86
+ delRole: (payload?: ({
84
87
  id: string;
85
88
  roleName: string;
86
89
  } & {
87
- realm?: string;
88
- }) => Promise<void>;
89
- findUsersWithRole: (payload?: {
90
+ realm?: string | undefined;
91
+ }) | undefined) => Promise<void>;
92
+ findUsersWithRole: (payload?: ({
90
93
  id: string;
91
94
  roleName: string;
92
- first?: number;
93
- max?: number;
95
+ first?: number | undefined;
96
+ max?: number | undefined;
94
97
  } & {
95
- realm?: string;
96
- }) => Promise<UserRepresentation[]>;
97
- getServiceAccountUser: (payload?: {
98
+ realm?: string | undefined;
99
+ }) | undefined) => Promise<UserRepresentation[]>;
100
+ getServiceAccountUser: (payload?: ({
98
101
  id: string;
99
102
  } & {
100
- realm?: string;
101
- }) => Promise<UserRepresentation>;
102
- generateNewClientSecret: (payload?: {
103
+ realm?: string | undefined;
104
+ }) | undefined) => Promise<UserRepresentation>;
105
+ generateNewClientSecret: (payload?: ({
103
106
  id: string;
104
107
  } & {
105
- realm?: string;
106
- }) => Promise<CredentialRepresentation>;
107
- generateRegistrationAccessToken: (payload?: {
108
+ realm?: string | undefined;
109
+ }) | undefined) => Promise<CredentialRepresentation>;
110
+ generateRegistrationAccessToken: (payload?: ({
108
111
  id: string;
109
112
  } & {
110
- realm?: string;
111
- }) => Promise<{
113
+ realm?: string | undefined;
114
+ }) | undefined) => Promise<{
112
115
  registrationAccessToken: string;
113
116
  }>;
114
- getClientSecret: (payload?: {
117
+ getClientSecret: (payload?: ({
115
118
  id: string;
116
119
  } & {
117
- realm?: string;
118
- }) => Promise<CredentialRepresentation>;
119
- listDefaultClientScopes: (payload?: {
120
+ realm?: string | undefined;
121
+ }) | undefined) => Promise<CredentialRepresentation>;
122
+ listDefaultClientScopes: (payload?: ({
120
123
  id: string;
121
124
  } & {
122
- realm?: string;
123
- }) => Promise<ClientScopeRepresentation[]>;
124
- addDefaultClientScope: (payload?: {
125
+ realm?: string | undefined;
126
+ }) | undefined) => Promise<ClientScopeRepresentation[]>;
127
+ addDefaultClientScope: (payload?: ({
125
128
  id: string;
126
129
  clientScopeId: string;
127
130
  } & {
128
- realm?: string;
129
- }) => Promise<void>;
130
- delDefaultClientScope: (payload?: {
131
+ realm?: string | undefined;
132
+ }) | undefined) => Promise<void>;
133
+ delDefaultClientScope: (payload?: ({
131
134
  id: string;
132
135
  clientScopeId: string;
133
136
  } & {
134
- realm?: string;
135
- }) => Promise<void>;
136
- listOptionalClientScopes: (payload?: {
137
+ realm?: string | undefined;
138
+ }) | undefined) => Promise<void>;
139
+ listOptionalClientScopes: (payload?: ({
137
140
  id: string;
138
141
  } & {
139
- realm?: string;
140
- }) => Promise<ClientScopeRepresentation[]>;
141
- addOptionalClientScope: (payload?: {
142
+ realm?: string | undefined;
143
+ }) | undefined) => Promise<ClientScopeRepresentation[]>;
144
+ addOptionalClientScope: (payload?: ({
142
145
  id: string;
143
146
  clientScopeId: string;
144
147
  } & {
145
- realm?: string;
146
- }) => Promise<void>;
147
- delOptionalClientScope: (payload?: {
148
+ realm?: string | undefined;
149
+ }) | undefined) => Promise<void>;
150
+ delOptionalClientScope: (payload?: ({
148
151
  id: string;
149
152
  clientScopeId: string;
150
153
  } & {
151
- realm?: string;
152
- }) => Promise<void>;
154
+ realm?: string | undefined;
155
+ }) | undefined) => Promise<void>;
153
156
  addMultipleProtocolMappers: (query: {
154
157
  id: string;
155
158
  } & {
156
- realm?: string;
159
+ realm?: string | undefined;
157
160
  }, payload: ProtocolMapperRepresentation[]) => Promise<void>;
158
161
  addProtocolMapper: (query: {
159
162
  id: string;
160
163
  } & {
161
- realm?: string;
164
+ realm?: string | undefined;
162
165
  }, payload: ProtocolMapperRepresentation) => Promise<void>;
163
- listProtocolMappers: (payload?: {
166
+ listProtocolMappers: (payload?: ({
164
167
  id: string;
165
168
  } & {
166
- realm?: string;
167
- }) => Promise<ProtocolMapperRepresentation[]>;
168
- findProtocolMapperById: (payload?: {
169
+ realm?: string | undefined;
170
+ }) | undefined) => Promise<ProtocolMapperRepresentation[]>;
171
+ findProtocolMapperById: (payload?: ({
169
172
  id: string;
170
173
  mapperId: string;
171
174
  } & {
172
- realm?: string;
173
- }) => Promise<ProtocolMapperRepresentation>;
174
- findProtocolMappersByProtocol: (payload?: {
175
+ realm?: string | undefined;
176
+ }) | undefined) => Promise<ProtocolMapperRepresentation>;
177
+ findProtocolMappersByProtocol: (payload?: ({
175
178
  id: string;
176
179
  protocol: string;
177
180
  } & {
178
- realm?: string;
179
- }) => Promise<ProtocolMapperRepresentation[]>;
181
+ realm?: string | undefined;
182
+ }) | undefined) => Promise<ProtocolMapperRepresentation[]>;
180
183
  updateProtocolMapper: (query: {
181
184
  id: string;
182
185
  mapperId: string;
183
186
  } & {
184
- realm?: string;
187
+ realm?: string | undefined;
185
188
  }, payload: ProtocolMapperRepresentation) => Promise<void>;
186
- delProtocolMapper: (payload?: {
189
+ delProtocolMapper: (payload?: ({
187
190
  id: string;
188
191
  mapperId: string;
189
192
  } & {
190
- realm?: string;
191
- }) => Promise<void>;
192
- listScopeMappings: (payload?: {
193
+ realm?: string | undefined;
194
+ }) | undefined) => Promise<void>;
195
+ listScopeMappings: (payload?: ({
193
196
  id: string;
194
197
  } & {
195
- realm?: string;
196
- }) => Promise<MappingsRepresentation>;
198
+ realm?: string | undefined;
199
+ }) | undefined) => Promise<MappingsRepresentation>;
197
200
  addClientScopeMappings: (query: {
198
201
  id: string;
199
202
  client: string;
200
203
  } & {
201
- realm?: string;
204
+ realm?: string | undefined;
202
205
  }, payload: RoleRepresentation[]) => Promise<void>;
203
- listClientScopeMappings: (payload?: {
206
+ listClientScopeMappings: (payload?: ({
204
207
  id: string;
205
208
  client: string;
206
209
  } & {
207
- realm?: string;
208
- }) => Promise<RoleRepresentation[]>;
209
- listAvailableClientScopeMappings: (payload?: {
210
+ realm?: string | undefined;
211
+ }) | undefined) => Promise<RoleRepresentation[]>;
212
+ listAvailableClientScopeMappings: (payload?: ({
210
213
  id: string;
211
214
  client: string;
212
215
  } & {
213
- realm?: string;
214
- }) => Promise<RoleRepresentation[]>;
215
- listCompositeClientScopeMappings: (payload?: {
216
+ realm?: string | undefined;
217
+ }) | undefined) => Promise<RoleRepresentation[]>;
218
+ listCompositeClientScopeMappings: (payload?: ({
216
219
  id: string;
217
220
  client: string;
218
221
  } & {
219
- realm?: string;
220
- }) => Promise<RoleRepresentation[]>;
222
+ realm?: string | undefined;
223
+ }) | undefined) => Promise<RoleRepresentation[]>;
221
224
  delClientScopeMappings: (query: {
222
225
  id: string;
223
226
  client: string;
224
227
  } & {
225
- realm?: string;
228
+ realm?: string | undefined;
226
229
  }, payload: RoleRepresentation[]) => Promise<void>;
227
- evaluatePermission: (payload?: {
230
+ evaluatePermission: (payload?: ({
228
231
  id: string;
229
232
  roleContainer: string;
230
233
  type: 'granted' | 'not-granted';
231
234
  scope: string;
232
235
  } & {
233
- realm?: string;
234
- }) => Promise<RoleRepresentation[]>;
235
- evaluateListProtocolMapper: (payload?: {
236
+ realm?: string | undefined;
237
+ }) | undefined) => Promise<RoleRepresentation[]>;
238
+ evaluateListProtocolMapper: (payload?: ({
236
239
  id: string;
237
240
  scope: string;
238
241
  } & {
239
- realm?: string;
240
- }) => Promise<ProtocolMapperRepresentation[]>;
241
- evaluateGenerateAccessToken: (payload?: {
242
+ realm?: string | undefined;
243
+ }) | undefined) => Promise<ProtocolMapperRepresentation[]>;
244
+ evaluateGenerateAccessToken: (payload?: ({
242
245
  id: string;
243
246
  scope: string;
244
247
  userId: string;
245
248
  } & {
246
- realm?: string;
247
- }) => Promise<object>;
249
+ realm?: string | undefined;
250
+ }) | undefined) => Promise<object>;
248
251
  addRealmScopeMappings: (query: {
249
252
  id: string;
250
253
  } & {
251
- realm?: string;
254
+ realm?: string | undefined;
252
255
  }, payload: RoleRepresentation[]) => Promise<void>;
253
- listRealmScopeMappings: (payload?: {
256
+ listRealmScopeMappings: (payload?: ({
254
257
  id: string;
255
258
  } & {
256
- realm?: string;
257
- }) => Promise<RoleRepresentation[]>;
258
- listAvailableRealmScopeMappings: (payload?: {
259
+ realm?: string | undefined;
260
+ }) | undefined) => Promise<RoleRepresentation[]>;
261
+ listAvailableRealmScopeMappings: (payload?: ({
259
262
  id: string;
260
263
  } & {
261
- realm?: string;
262
- }) => Promise<RoleRepresentation[]>;
263
- listCompositeRealmScopeMappings: (payload?: {
264
+ realm?: string | undefined;
265
+ }) | undefined) => Promise<RoleRepresentation[]>;
266
+ listCompositeRealmScopeMappings: (payload?: ({
264
267
  id: string;
265
268
  } & {
266
- realm?: string;
267
- }) => Promise<RoleRepresentation[]>;
269
+ realm?: string | undefined;
270
+ }) | undefined) => Promise<RoleRepresentation[]>;
268
271
  delRealmScopeMappings: (query: {
269
272
  id: string;
270
273
  } & {
271
- realm?: string;
274
+ realm?: string | undefined;
272
275
  }, payload: RoleRepresentation[]) => Promise<void>;
273
- listSessions: (payload?: {
276
+ listSessions: (payload?: ({
274
277
  id: string;
275
- first?: number;
276
- max?: number;
278
+ first?: number | undefined;
279
+ max?: number | undefined;
277
280
  } & {
278
- realm?: string;
279
- }) => Promise<UserSessionRepresentation[]>;
280
- listOfflineSessions: (payload?: {
281
+ realm?: string | undefined;
282
+ }) | undefined) => Promise<UserSessionRepresentation[]>;
283
+ listOfflineSessions: (payload?: ({
281
284
  id: string;
282
- first?: number;
283
- max?: number;
285
+ first?: number | undefined;
286
+ max?: number | undefined;
284
287
  } & {
285
- realm?: string;
286
- }) => Promise<UserSessionRepresentation[]>;
287
- getSessionCount: (payload?: {
288
+ realm?: string | undefined;
289
+ }) | undefined) => Promise<UserSessionRepresentation[]>;
290
+ getSessionCount: (payload?: ({
288
291
  id: string;
289
292
  } & {
290
- realm?: string;
291
- }) => Promise<{
293
+ realm?: string | undefined;
294
+ }) | undefined) => Promise<{
292
295
  count: number;
293
296
  }>;
294
- listResources: (payload?: {
297
+ getResourceServer: (payload?: ({
295
298
  id: string;
296
299
  } & {
297
- realm?: string;
298
- }) => Promise<ResourceRepresentation[]>;
300
+ realm?: string | undefined;
301
+ }) | undefined) => Promise<ResourceServerRepresentation>;
302
+ updateResourceServer: (query: {
303
+ id: string;
304
+ } & {
305
+ realm?: string | undefined;
306
+ }, payload: ResourceServerRepresentation) => Promise<void>;
307
+ listResources: (payload?: ({
308
+ id: string;
309
+ } & {
310
+ realm?: string | undefined;
311
+ }) | undefined) => Promise<ResourceRepresentation[]>;
299
312
  createResource: (query: {
300
313
  id: string;
301
314
  } & {
302
- realm?: string;
315
+ realm?: string | undefined;
303
316
  }, payload: ResourceRepresentation) => Promise<ResourceRepresentation>;
317
+ getResource: (payload?: ({
318
+ id: string;
319
+ resourceId: string;
320
+ } & {
321
+ realm?: string | undefined;
322
+ }) | undefined) => Promise<ResourceRepresentation>;
304
323
  updateResource: (query: {
305
324
  id: string;
306
325
  resourceId: string;
307
326
  } & {
308
- realm?: string;
327
+ realm?: string | undefined;
309
328
  }, payload: ResourceRepresentation) => Promise<void>;
310
- delResource: (payload?: {
329
+ delResource: (payload?: ({
311
330
  id: string;
312
331
  resourceId: string;
313
332
  } & {
314
- realm?: string;
315
- }) => Promise<void>;
333
+ realm?: string | undefined;
334
+ }) | undefined) => Promise<void>;
335
+ importResource: (query: {
336
+ id: string;
337
+ } & {
338
+ realm?: string | undefined;
339
+ }, payload: ResourceServerRepresentation) => Promise<any>;
340
+ exportResource: (payload?: ({
341
+ id: string;
342
+ } & {
343
+ realm?: string | undefined;
344
+ }) | undefined) => Promise<any>;
316
345
  evaluateResource: (query: {
317
346
  id: string;
318
347
  } & {
319
- realm?: string;
348
+ realm?: string | undefined;
320
349
  }, payload: ResourceEvaluation) => Promise<any>;
321
- listPolicies: (payload?: PolicyQuery & {
322
- realm?: string;
323
- }) => Promise<PolicyRepresentation[]>;
324
- findPolicyByName: (payload?: {
350
+ listPolicies: (payload?: (PolicyQuery & {
351
+ realm?: string | undefined;
352
+ }) | undefined) => Promise<PolicyRepresentation[]>;
353
+ findPolicyByName: (payload?: ({
325
354
  id: string;
326
355
  name: string;
327
356
  } & {
328
- realm?: string;
329
- }) => Promise<PolicyRepresentation>;
357
+ realm?: string | undefined;
358
+ }) | undefined) => Promise<PolicyRepresentation>;
330
359
  updatePolicy: (query: {
331
360
  id: string;
332
361
  type: string;
333
362
  policyId: string;
334
363
  } & {
335
- realm?: string;
364
+ realm?: string | undefined;
336
365
  }, payload: PolicyRepresentation) => Promise<void>;
337
366
  createPolicy: (query: {
338
367
  id: string;
339
368
  type: string;
340
369
  } & {
341
- realm?: string;
370
+ realm?: string | undefined;
342
371
  }, payload: PolicyRepresentation) => Promise<PolicyRepresentation>;
343
- findOnePolicy: (payload?: {
372
+ findOnePolicy: (payload?: ({
344
373
  id: string;
345
374
  type: string;
346
375
  policyId: string;
347
376
  } & {
348
- realm?: string;
349
- }) => Promise<void>;
350
- delPolicy: (payload?: {
377
+ realm?: string | undefined;
378
+ }) | undefined) => Promise<void>;
379
+ delPolicy: (payload?: ({
351
380
  id: string;
352
381
  policyId: string;
353
382
  } & {
354
- realm?: string;
355
- }) => Promise<void>;
383
+ realm?: string | undefined;
384
+ }) | undefined) => Promise<void>;
356
385
  createOrUpdatePolicy(payload: {
357
386
  id: string;
358
387
  policyName: string;
359
388
  policy: PolicyRepresentation;
360
389
  }): Promise<PolicyRepresentation>;
361
- listAllScopes: (payload?: {
390
+ listAllScopes: (payload?: ({
362
391
  id: string;
363
392
  } & {
364
- realm?: string;
365
- }) => Promise<any>;
366
- listScopesByResource: (payload?: {
393
+ realm?: string | undefined;
394
+ }) | undefined) => Promise<ScopeRepresentation[]>;
395
+ listAllResourcesByScope: (payload?: ({
396
+ id: string;
397
+ scopeId: string;
398
+ } & {
399
+ realm?: string | undefined;
400
+ }) | undefined) => Promise<ResourceRepresentation[]>;
401
+ listAllPermissionsByScope: (payload?: ({
402
+ id: string;
403
+ scopeId: string;
404
+ } & {
405
+ realm?: string | undefined;
406
+ }) | undefined) => Promise<PolicyRepresentation[]>;
407
+ listPermissionsByResource: (payload?: ({
408
+ id: string;
409
+ resourceId: string;
410
+ } & {
411
+ realm?: string | undefined;
412
+ }) | undefined) => Promise<ResourceServerRepresentation[]>;
413
+ listScopesByResource: (payload?: ({
367
414
  id: string;
368
415
  resourceName: string;
369
416
  } & {
370
- realm?: string;
371
- }) => Promise<{
417
+ realm?: string | undefined;
418
+ }) | undefined) => Promise<{
372
419
  id: string;
373
420
  name: string;
374
421
  }[]>;
375
422
  createAuthorizationScope: (query: {
376
423
  id: string;
377
424
  } & {
378
- realm?: string;
425
+ realm?: string | undefined;
379
426
  }, payload: {
380
427
  name: string;
381
- displayName?: string;
382
- iconUri?: string;
428
+ displayName?: string | undefined;
429
+ iconUri?: string | undefined;
383
430
  }) => Promise<any>;
384
- findPermissions: (payload?: {
431
+ findPermissions: (payload?: ({
385
432
  id: string;
386
433
  name: string;
387
434
  } & {
388
- realm?: string;
389
- }) => Promise<PolicyRepresentation[]>;
435
+ realm?: string | undefined;
436
+ }) | undefined) => Promise<PolicyRepresentation[]>;
390
437
  createPermission: (query: {
391
438
  id: string;
392
439
  type: string;
393
440
  } & {
394
- realm?: string;
441
+ realm?: string | undefined;
395
442
  }, payload: PolicyRepresentation) => Promise<PolicyRepresentation>;
396
443
  updatePermission: (query: {
397
444
  id: string;
398
445
  type: string;
399
446
  permissionId: string;
400
447
  } & {
401
- realm?: string;
448
+ realm?: string | undefined;
402
449
  }, payload: PolicyRepresentation) => Promise<void>;
403
- delPermission: (payload?: {
450
+ delPermission: (payload?: ({
404
451
  id: string;
405
452
  type: string;
406
453
  permissionId: string;
407
454
  } & {
408
- realm?: string;
409
- }) => Promise<void>;
410
- findOnePermission: (payload?: {
455
+ realm?: string | undefined;
456
+ }) | undefined) => Promise<void>;
457
+ findOnePermission: (payload?: ({
411
458
  id: string;
412
459
  type: string;
413
460
  permissionId: string;
414
461
  } & {
415
- realm?: string;
416
- }) => Promise<PolicyRepresentation>;
417
- getOfflineSessionCount: (payload?: {
462
+ realm?: string | undefined;
463
+ }) | undefined) => Promise<PolicyRepresentation | undefined>;
464
+ getAssociatedScopes: (payload?: ({
418
465
  id: string;
466
+ permissionId: string;
419
467
  } & {
420
- realm?: string;
421
- }) => Promise<{
468
+ realm?: string | undefined;
469
+ }) | undefined) => Promise<{
470
+ id: string;
471
+ name: string;
472
+ }[]>;
473
+ getAssociatedResources: (payload?: ({
474
+ id: string;
475
+ permissionId: string;
476
+ } & {
477
+ realm?: string | undefined;
478
+ }) | undefined) => Promise<{
479
+ _id: string;
480
+ name: string;
481
+ }[]>;
482
+ getOfflineSessionCount: (payload?: ({
483
+ id: string;
484
+ } & {
485
+ realm?: string | undefined;
486
+ }) | undefined) => Promise<{
422
487
  count: number;
423
488
  }>;
424
- getInstallationProviders: (payload?: {
489
+ getInstallationProviders: (payload?: ({
425
490
  id: string;
426
491
  providerId: string;
427
492
  } & {
428
- realm?: string;
429
- }) => Promise<string>;
430
- pushRevocation: (payload?: {
493
+ realm?: string | undefined;
494
+ }) | undefined) => Promise<string>;
495
+ pushRevocation: (payload?: ({
431
496
  id: string;
432
497
  } & {
433
- realm?: string;
434
- }) => Promise<GlobalRequestResult>;
435
- addClusterNode: (payload?: {
498
+ realm?: string | undefined;
499
+ }) | undefined) => Promise<GlobalRequestResult>;
500
+ addClusterNode: (payload?: ({
436
501
  id: string;
437
502
  node: string;
438
503
  } & {
439
- realm?: string;
440
- }) => Promise<void>;
441
- deleteClusterNode: (payload?: {
504
+ realm?: string | undefined;
505
+ }) | undefined) => Promise<void>;
506
+ deleteClusterNode: (payload?: ({
442
507
  id: string;
443
508
  node: string;
444
509
  } & {
445
- realm?: string;
446
- }) => Promise<void>;
447
- testNodesAvailable: (payload?: {
510
+ realm?: string | undefined;
511
+ }) | undefined) => Promise<void>;
512
+ testNodesAvailable: (payload?: ({
448
513
  id: string;
449
514
  } & {
450
- realm?: string;
451
- }) => Promise<GlobalRequestResult>;
452
- getKeyInfo: (payload?: {
515
+ realm?: string | undefined;
516
+ }) | undefined) => Promise<GlobalRequestResult>;
517
+ getKeyInfo: (payload?: ({
453
518
  id: string;
454
519
  attr: string;
455
520
  } & {
456
- realm?: string;
457
- }) => Promise<CertificateRepresentation>;
458
- generateKey: (payload?: {
521
+ realm?: string | undefined;
522
+ }) | undefined) => Promise<CertificateRepresentation>;
523
+ generateKey: (payload?: ({
459
524
  id: string;
460
525
  attr: string;
461
526
  } & {
462
- realm?: string;
463
- }) => Promise<CertificateRepresentation>;
527
+ realm?: string | undefined;
528
+ }) | undefined) => Promise<CertificateRepresentation>;
464
529
  downloadKey: (query: {
465
530
  id: string;
466
531
  attr: string;
467
532
  } & {
468
- realm?: string;
533
+ realm?: string | undefined;
469
534
  }, payload: KeyStoreConfig) => Promise<string>;
470
535
  generateAndDownloadKey: (query: {
471
536
  id: string;
472
537
  attr: string;
473
538
  } & {
474
- realm?: string;
539
+ realm?: string | undefined;
475
540
  }, payload: KeyStoreConfig) => Promise<string>;
476
541
  uploadKey: (query: {
477
542
  id: string;
478
543
  attr: string;
479
544
  } & {
480
- realm?: string;
545
+ realm?: string | undefined;
481
546
  }, payload: any) => Promise<any>;
482
547
  uploadCertificate: (query: {
483
548
  id: string;
484
549
  attr: string;
485
550
  } & {
486
- realm?: string;
551
+ realm?: string | undefined;
487
552
  }, payload: any) => Promise<any>;
488
553
  constructor(client: KeycloakAdminClient);
489
554
  findProtocolMapperByName(payload: {
490
555
  realm?: string;
491
556
  id: string;
492
557
  name: string;
493
- }): Promise<ProtocolMapperRepresentation>;
558
+ }): Promise<ProtocolMapperRepresentation | undefined>;
494
559
  }