@keycloak/keycloak-admin-client 16.0.0-dev.7 → 17.0.0-dev.0

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