@keycloak/keycloak-admin-client 16.0.0-dev.4 → 16.0.0-dev.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/lib/client.d.ts +8 -6
- package/lib/client.js +15 -7
- package/lib/client.js.map +1 -1
- package/lib/defs/clientPoliciesRepresentation.d.ts +4 -0
- package/lib/defs/clientPoliciesRepresentation.js +3 -0
- package/lib/defs/clientPoliciesRepresentation.js.map +1 -0
- package/lib/defs/clientPolicyConditionRepresentation.d.ts +4 -0
- package/lib/defs/clientPolicyConditionRepresentation.js +3 -0
- package/lib/defs/clientPolicyConditionRepresentation.js.map +1 -0
- package/lib/defs/clientPolicyExecutorRepresentation.d.ts +4 -0
- package/lib/defs/clientPolicyExecutorRepresentation.js +3 -0
- package/lib/defs/clientPolicyExecutorRepresentation.js.map +1 -0
- package/lib/defs/clientPolicyRepresentation.d.ts +8 -0
- package/lib/defs/clientPolicyRepresentation.js +3 -0
- package/lib/defs/clientPolicyRepresentation.js.map +1 -0
- package/lib/defs/clientProfileRepresentation.d.ts +6 -0
- package/lib/defs/clientProfileRepresentation.js +3 -0
- package/lib/defs/clientProfileRepresentation.js.map +1 -0
- package/lib/defs/clientProfilesRepresentation.d.ts +5 -0
- package/lib/defs/clientProfilesRepresentation.js +3 -0
- package/lib/defs/clientProfilesRepresentation.js.map +1 -0
- package/lib/defs/credentialRepresentation.d.ts +5 -9
- package/lib/defs/identityProviderMapperTypeRepresentation.d.ts +8 -0
- package/lib/defs/identityProviderMapperTypeRepresentation.js +3 -0
- package/lib/defs/identityProviderMapperTypeRepresentation.js.map +1 -0
- package/lib/defs/realmRepresentation.d.ts +5 -0
- package/lib/defs/requiredActionProviderRepresentation.d.ts +1 -1
- package/lib/defs/requiredActionProviderSimpleRepresentation.d.ts +5 -0
- package/lib/defs/requiredActionProviderSimpleRepresentation.js +3 -0
- package/lib/defs/requiredActionProviderSimpleRepresentation.js.map +1 -0
- package/lib/defs/resourceRepresentation.d.ts +1 -1
- package/lib/resources/agent.js +45 -38
- package/lib/resources/agent.js.map +1 -1
- package/lib/resources/attackDetection.d.ts +8 -8
- package/lib/resources/attackDetection.js.map +1 -1
- package/lib/resources/authenticationManagement.d.ts +28 -27
- package/lib/resources/authenticationManagement.js.map +1 -1
- package/lib/resources/cache.d.ts +2 -2
- package/lib/resources/clientPolicies.d.ts +23 -0
- package/lib/resources/clientPolicies.js +58 -0
- package/lib/resources/clientPolicies.js.map +1 -0
- package/lib/resources/clientScopes.d.ts +72 -72
- package/lib/resources/clientScopes.js +4 -6
- package/lib/resources/clientScopes.js.map +1 -1
- package/lib/resources/clients.d.ts +217 -195
- package/lib/resources/clients.js +12 -3
- package/lib/resources/clients.js.map +1 -1
- package/lib/resources/components.d.ts +13 -13
- package/lib/resources/components.js.map +1 -1
- package/lib/resources/groups.d.ts +53 -53
- package/lib/resources/groups.js.map +1 -1
- package/lib/resources/identityProviders.d.ts +36 -35
- package/lib/resources/identityProviders.js.map +1 -1
- package/lib/resources/realms.d.ts +46 -46
- package/lib/resources/realms.js.map +1 -1
- package/lib/resources/resource.d.ts +1 -1
- package/lib/resources/roles.d.ts +44 -36
- package/lib/resources/roles.js.map +1 -1
- package/lib/resources/serverInfo.d.ts +1 -1
- package/lib/resources/sessions.d.ts +2 -2
- package/lib/resources/userStorageProvider.d.ts +17 -17
- package/lib/resources/users.d.ts +117 -105
- package/lib/resources/users.js +10 -0
- package/lib/resources/users.js.map +1 -1
- package/lib/resources/whoAmI.d.ts +2 -2
- package/lib/utils/auth.d.ts +10 -0
- package/lib/utils/auth.js +2 -2
- package/lib/utils/auth.js.map +1 -1
- package/package.json +9 -4
|
@@ -7,6 +7,6 @@ export default class Resource<ParamType = {}> {
|
|
|
7
7
|
getUrlParams?: () => Record<string, any>;
|
|
8
8
|
getBaseUrl?: () => string;
|
|
9
9
|
});
|
|
10
|
-
makeRequest: <PayloadType = any, ResponseType_1 = any>(args: RequestArgs) => (payload?: PayloadType & ParamType) => Promise<ResponseType_1>;
|
|
10
|
+
makeRequest: <PayloadType = any, ResponseType_1 = any>(args: RequestArgs) => (payload?: (PayloadType & ParamType) | undefined) => Promise<ResponseType_1>;
|
|
11
11
|
makeUpdateRequest: <QueryType = any, PayloadType = any, ResponseType_1 = any>(args: RequestArgs) => (query: QueryType & ParamType, payload: PayloadType) => Promise<ResponseType_1>;
|
|
12
12
|
}
|
package/lib/resources/roles.d.ts
CHANGED
|
@@ -2,79 +2,87 @@ import Resource from './resource';
|
|
|
2
2
|
import RoleRepresentation from '../defs/roleRepresentation';
|
|
3
3
|
import UserRepresentation from '../defs/userRepresentation';
|
|
4
4
|
import { KeycloakAdminClient } from '../client';
|
|
5
|
+
export interface RoleQuery {
|
|
6
|
+
first?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
search?: string;
|
|
9
|
+
}
|
|
5
10
|
export declare class Roles extends Resource<{
|
|
6
11
|
realm?: string;
|
|
7
12
|
}> {
|
|
8
|
-
find: (payload?: {
|
|
9
|
-
realm?: string;
|
|
10
|
-
}) => Promise<RoleRepresentation[]>;
|
|
11
|
-
create: (payload?: RoleRepresentation & {
|
|
12
|
-
realm?: string;
|
|
13
|
-
}) => Promise<{
|
|
13
|
+
find: (payload?: (RoleQuery & {
|
|
14
|
+
realm?: string | undefined;
|
|
15
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
16
|
+
create: (payload?: (RoleRepresentation & {
|
|
17
|
+
realm?: string | undefined;
|
|
18
|
+
}) | undefined) => Promise<{
|
|
14
19
|
roleName: string;
|
|
15
20
|
}>;
|
|
16
|
-
findOneByName: (payload?: {
|
|
21
|
+
findOneByName: (payload?: ({
|
|
17
22
|
name: string;
|
|
18
23
|
} & {
|
|
19
|
-
realm?: string;
|
|
20
|
-
}) => Promise<RoleRepresentation>;
|
|
24
|
+
realm?: string | undefined;
|
|
25
|
+
}) | undefined) => Promise<RoleRepresentation | undefined>;
|
|
21
26
|
updateByName: (query: {
|
|
22
27
|
name: string;
|
|
23
28
|
} & {
|
|
24
|
-
realm?: string;
|
|
29
|
+
realm?: string | undefined;
|
|
25
30
|
}, payload: RoleRepresentation) => Promise<void>;
|
|
26
|
-
delByName: (payload?: {
|
|
31
|
+
delByName: (payload?: ({
|
|
27
32
|
name: string;
|
|
28
33
|
} & {
|
|
29
|
-
realm?: string;
|
|
30
|
-
}) => Promise<void>;
|
|
31
|
-
findUsersWithRole: (payload?: {
|
|
34
|
+
realm?: string | undefined;
|
|
35
|
+
}) | undefined) => Promise<void>;
|
|
36
|
+
findUsersWithRole: (payload?: ({
|
|
32
37
|
name: string;
|
|
33
|
-
first?: number;
|
|
34
|
-
max?: number;
|
|
38
|
+
first?: number | undefined;
|
|
39
|
+
max?: number | undefined;
|
|
35
40
|
} & {
|
|
36
|
-
realm?: string;
|
|
37
|
-
}) => Promise<UserRepresentation[]>;
|
|
38
|
-
findOneById: (payload?: {
|
|
41
|
+
realm?: string | undefined;
|
|
42
|
+
}) | undefined) => Promise<UserRepresentation[]>;
|
|
43
|
+
findOneById: (payload?: ({
|
|
39
44
|
id: string;
|
|
40
45
|
} & {
|
|
41
|
-
realm?: string;
|
|
42
|
-
}) => Promise<RoleRepresentation>;
|
|
46
|
+
realm?: string | undefined;
|
|
47
|
+
}) | undefined) => Promise<RoleRepresentation | undefined>;
|
|
43
48
|
createComposite: (query: {
|
|
44
49
|
roleId: string;
|
|
45
50
|
} & {
|
|
46
|
-
realm?: string;
|
|
51
|
+
realm?: string | undefined;
|
|
47
52
|
}, payload: RoleRepresentation[]) => Promise<void>;
|
|
48
|
-
getCompositeRoles: (payload?: {
|
|
53
|
+
getCompositeRoles: (payload?: ({
|
|
49
54
|
id: string;
|
|
55
|
+
search?: string | undefined;
|
|
56
|
+
first?: number | undefined;
|
|
57
|
+
max?: number | undefined;
|
|
50
58
|
} & {
|
|
51
|
-
realm?: string;
|
|
52
|
-
}) => Promise<RoleRepresentation[]>;
|
|
53
|
-
getCompositeRolesForRealm: (payload?: {
|
|
59
|
+
realm?: string | undefined;
|
|
60
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
61
|
+
getCompositeRolesForRealm: (payload?: ({
|
|
54
62
|
id: string;
|
|
55
63
|
} & {
|
|
56
|
-
realm?: string;
|
|
57
|
-
}) => Promise<RoleRepresentation[]>;
|
|
58
|
-
getCompositeRolesForClient: (payload?: {
|
|
64
|
+
realm?: string | undefined;
|
|
65
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
66
|
+
getCompositeRolesForClient: (payload?: ({
|
|
59
67
|
id: string;
|
|
60
68
|
clientId: string;
|
|
61
69
|
} & {
|
|
62
|
-
realm?: string;
|
|
63
|
-
}) => Promise<RoleRepresentation[]>;
|
|
70
|
+
realm?: string | undefined;
|
|
71
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
64
72
|
delCompositeRoles: (query: {
|
|
65
73
|
id: string;
|
|
66
74
|
} & {
|
|
67
|
-
realm?: string;
|
|
75
|
+
realm?: string | undefined;
|
|
68
76
|
}, payload: RoleRepresentation[]) => Promise<void>;
|
|
69
77
|
updateById: (query: {
|
|
70
78
|
id: string;
|
|
71
79
|
} & {
|
|
72
|
-
realm?: string;
|
|
80
|
+
realm?: string | undefined;
|
|
73
81
|
}, payload: RoleRepresentation) => Promise<void>;
|
|
74
|
-
delById: (payload?: {
|
|
82
|
+
delById: (payload?: ({
|
|
75
83
|
id: string;
|
|
76
84
|
} & {
|
|
77
|
-
realm?: string;
|
|
78
|
-
}) => Promise<void>;
|
|
85
|
+
realm?: string | undefined;
|
|
86
|
+
}) | undefined) => Promise<void>;
|
|
79
87
|
constructor(client: KeycloakAdminClient);
|
|
80
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/resources/roles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,wDAAkC;
|
|
1
|
+
{"version":3,"file":"roles.js","sourceRoot":"","s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;SACrB,CAAC,CAAC;;IAUH,CAAC;IACH,YAAC;AAAD,CAAC,AA9ID,CAA2B,qBAAQ,GA8IlC;AA9IY,sBAAK"}
|
|
@@ -3,5 +3,5 @@ import { ServerInfoRepresentation } from '../defs/serverInfoRepesentation';
|
|
|
3
3
|
import KeycloakAdminClient from '..';
|
|
4
4
|
export declare class ServerInfo extends Resource {
|
|
5
5
|
constructor(client: KeycloakAdminClient);
|
|
6
|
-
find: (payload?: {}) => Promise<ServerInfoRepresentation>;
|
|
6
|
+
find: (payload?: {} | undefined) => Promise<ServerInfoRepresentation>;
|
|
7
7
|
}
|
|
@@ -4,7 +4,7 @@ export declare class Sessions extends Resource<{
|
|
|
4
4
|
realm?: string;
|
|
5
5
|
}> {
|
|
6
6
|
find: (payload?: {
|
|
7
|
-
realm?: string;
|
|
8
|
-
}) => Promise<Record<string, any>[]>;
|
|
7
|
+
realm?: string | undefined;
|
|
8
|
+
} | undefined) => Promise<Record<string, any>[]>;
|
|
9
9
|
constructor(client: KeycloakAdminClient);
|
|
10
10
|
}
|
|
@@ -10,34 +10,34 @@ declare type NameResponse = {
|
|
|
10
10
|
export declare class UserStorageProvider extends Resource<{
|
|
11
11
|
realm?: string;
|
|
12
12
|
}> {
|
|
13
|
-
name: (payload?: {
|
|
13
|
+
name: (payload?: ({
|
|
14
14
|
id: string;
|
|
15
15
|
} & {
|
|
16
|
-
realm?: string;
|
|
17
|
-
}) => Promise<NameResponse>;
|
|
18
|
-
removeImportedUsers: (payload?: {
|
|
16
|
+
realm?: string | undefined;
|
|
17
|
+
}) | undefined) => Promise<NameResponse>;
|
|
18
|
+
removeImportedUsers: (payload?: ({
|
|
19
19
|
id: string;
|
|
20
20
|
} & {
|
|
21
|
-
realm?: string;
|
|
22
|
-
}) => Promise<void>;
|
|
23
|
-
sync: (payload?: {
|
|
21
|
+
realm?: string | undefined;
|
|
22
|
+
}) | undefined) => Promise<void>;
|
|
23
|
+
sync: (payload?: ({
|
|
24
24
|
id: string;
|
|
25
|
-
action?: ActionType;
|
|
25
|
+
action?: ActionType | undefined;
|
|
26
26
|
} & {
|
|
27
|
-
realm?: string;
|
|
28
|
-
}) => Promise<SynchronizationResultRepresentation>;
|
|
29
|
-
unlinkUsers: (payload?: {
|
|
27
|
+
realm?: string | undefined;
|
|
28
|
+
}) | undefined) => Promise<SynchronizationResultRepresentation>;
|
|
29
|
+
unlinkUsers: (payload?: ({
|
|
30
30
|
id: string;
|
|
31
31
|
} & {
|
|
32
|
-
realm?: string;
|
|
33
|
-
}) => Promise<void>;
|
|
34
|
-
mappersSync: (payload?: {
|
|
32
|
+
realm?: string | undefined;
|
|
33
|
+
}) | undefined) => Promise<void>;
|
|
34
|
+
mappersSync: (payload?: ({
|
|
35
35
|
id: string;
|
|
36
36
|
parentId: string;
|
|
37
|
-
direction?: DirectionType;
|
|
37
|
+
direction?: DirectionType | undefined;
|
|
38
38
|
} & {
|
|
39
|
-
realm?: string;
|
|
40
|
-
}) => Promise<SynchronizationResultRepresentation>;
|
|
39
|
+
realm?: string | undefined;
|
|
40
|
+
}) | undefined) => Promise<SynchronizationResultRepresentation>;
|
|
41
41
|
constructor(client: KeycloakAdminClient);
|
|
42
42
|
}
|
|
43
43
|
export {};
|
package/lib/resources/users.d.ts
CHANGED
|
@@ -22,200 +22,212 @@ export interface UserQuery {
|
|
|
22
22
|
export declare class Users extends Resource<{
|
|
23
23
|
realm?: string;
|
|
24
24
|
}> {
|
|
25
|
-
find: (payload?: UserQuery & {
|
|
26
|
-
realm?: string;
|
|
27
|
-
}) => Promise<UserRepresentation[]>;
|
|
28
|
-
create: (payload?: UserRepresentation & {
|
|
29
|
-
realm?: string;
|
|
30
|
-
}) => Promise<{
|
|
25
|
+
find: (payload?: (UserQuery & {
|
|
26
|
+
realm?: string | undefined;
|
|
27
|
+
}) | undefined) => Promise<UserRepresentation[]>;
|
|
28
|
+
create: (payload?: (UserRepresentation & {
|
|
29
|
+
realm?: string | undefined;
|
|
30
|
+
}) | undefined) => Promise<{
|
|
31
31
|
id: string;
|
|
32
32
|
}>;
|
|
33
|
-
findOne: (payload?: {
|
|
33
|
+
findOne: (payload?: ({
|
|
34
34
|
id: string;
|
|
35
35
|
} & {
|
|
36
|
-
realm?: string;
|
|
37
|
-
}) => Promise<UserRepresentation>;
|
|
36
|
+
realm?: string | undefined;
|
|
37
|
+
}) | undefined) => Promise<UserRepresentation | undefined>;
|
|
38
38
|
update: (query: {
|
|
39
39
|
id: string;
|
|
40
40
|
} & {
|
|
41
|
-
realm?: string;
|
|
41
|
+
realm?: string | undefined;
|
|
42
42
|
}, payload: UserRepresentation) => Promise<void>;
|
|
43
|
-
del: (payload?: {
|
|
43
|
+
del: (payload?: ({
|
|
44
44
|
id: string;
|
|
45
45
|
} & {
|
|
46
|
-
realm?: string;
|
|
47
|
-
}) => Promise<void>;
|
|
48
|
-
count: (payload?: UserQuery & {
|
|
49
|
-
realm?: string;
|
|
50
|
-
}) => Promise<number>;
|
|
51
|
-
listRoleMappings: (payload?: {
|
|
46
|
+
realm?: string | undefined;
|
|
47
|
+
}) | undefined) => Promise<void>;
|
|
48
|
+
count: (payload?: (UserQuery & {
|
|
49
|
+
realm?: string | undefined;
|
|
50
|
+
}) | undefined) => Promise<number>;
|
|
51
|
+
listRoleMappings: (payload?: ({
|
|
52
52
|
id: string;
|
|
53
53
|
} & {
|
|
54
|
-
realm?: string;
|
|
55
|
-
}) => Promise<MappingsRepresentation>;
|
|
56
|
-
addRealmRoleMappings: (payload?: {
|
|
54
|
+
realm?: string | undefined;
|
|
55
|
+
}) | undefined) => Promise<MappingsRepresentation>;
|
|
56
|
+
addRealmRoleMappings: (payload?: ({
|
|
57
57
|
id: string;
|
|
58
58
|
roles: RoleMappingPayload[];
|
|
59
59
|
} & {
|
|
60
|
-
realm?: string;
|
|
61
|
-
}) => Promise<void>;
|
|
62
|
-
listRealmRoleMappings: (payload?: {
|
|
60
|
+
realm?: string | undefined;
|
|
61
|
+
}) | undefined) => Promise<void>;
|
|
62
|
+
listRealmRoleMappings: (payload?: ({
|
|
63
63
|
id: string;
|
|
64
64
|
} & {
|
|
65
|
-
realm?: string;
|
|
66
|
-
}) => Promise<RoleRepresentation[]>;
|
|
67
|
-
delRealmRoleMappings: (payload?: {
|
|
65
|
+
realm?: string | undefined;
|
|
66
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
67
|
+
delRealmRoleMappings: (payload?: ({
|
|
68
68
|
id: string;
|
|
69
69
|
roles: RoleMappingPayload[];
|
|
70
70
|
} & {
|
|
71
|
-
realm?: string;
|
|
72
|
-
}) => Promise<void>;
|
|
73
|
-
listAvailableRealmRoleMappings: (payload?: {
|
|
71
|
+
realm?: string | undefined;
|
|
72
|
+
}) | undefined) => Promise<void>;
|
|
73
|
+
listAvailableRealmRoleMappings: (payload?: ({
|
|
74
74
|
id: string;
|
|
75
75
|
} & {
|
|
76
|
-
realm?: string;
|
|
77
|
-
}) => Promise<RoleRepresentation[]>;
|
|
78
|
-
listCompositeRealmRoleMappings: (payload?: {
|
|
76
|
+
realm?: string | undefined;
|
|
77
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
78
|
+
listCompositeRealmRoleMappings: (payload?: ({
|
|
79
79
|
id: string;
|
|
80
80
|
} & {
|
|
81
|
-
realm?: string;
|
|
82
|
-
}) => Promise<RoleRepresentation[]>;
|
|
83
|
-
listClientRoleMappings: (payload?: {
|
|
81
|
+
realm?: string | undefined;
|
|
82
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
83
|
+
listClientRoleMappings: (payload?: ({
|
|
84
84
|
id: string;
|
|
85
85
|
clientUniqueId: string;
|
|
86
86
|
} & {
|
|
87
|
-
realm?: string;
|
|
88
|
-
}) => Promise<RoleRepresentation[]>;
|
|
89
|
-
addClientRoleMappings: (payload?: {
|
|
87
|
+
realm?: string | undefined;
|
|
88
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
89
|
+
addClientRoleMappings: (payload?: ({
|
|
90
90
|
id: string;
|
|
91
91
|
clientUniqueId: string;
|
|
92
92
|
roles: RoleMappingPayload[];
|
|
93
93
|
} & {
|
|
94
|
-
realm?: string;
|
|
95
|
-
}) => Promise<void>;
|
|
96
|
-
delClientRoleMappings: (payload?: {
|
|
94
|
+
realm?: string | undefined;
|
|
95
|
+
}) | undefined) => Promise<void>;
|
|
96
|
+
delClientRoleMappings: (payload?: ({
|
|
97
97
|
id: string;
|
|
98
98
|
clientUniqueId: string;
|
|
99
99
|
roles: RoleMappingPayload[];
|
|
100
100
|
} & {
|
|
101
|
-
realm?: string;
|
|
102
|
-
}) => Promise<void>;
|
|
103
|
-
listAvailableClientRoleMappings: (payload?: {
|
|
101
|
+
realm?: string | undefined;
|
|
102
|
+
}) | undefined) => Promise<void>;
|
|
103
|
+
listAvailableClientRoleMappings: (payload?: ({
|
|
104
104
|
id: string;
|
|
105
105
|
clientUniqueId: string;
|
|
106
106
|
} & {
|
|
107
|
-
realm?: string;
|
|
108
|
-
}) => Promise<RoleRepresentation[]>;
|
|
109
|
-
listCompositeClientRoleMappings: (payload?: {
|
|
107
|
+
realm?: string | undefined;
|
|
108
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
109
|
+
listCompositeClientRoleMappings: (payload?: ({
|
|
110
110
|
id: string;
|
|
111
111
|
clientUniqueId: string;
|
|
112
112
|
} & {
|
|
113
|
-
realm?: string;
|
|
114
|
-
}) => Promise<RoleRepresentation[]>;
|
|
115
|
-
executeActionsEmail: (payload?: {
|
|
113
|
+
realm?: string | undefined;
|
|
114
|
+
}) | undefined) => Promise<RoleRepresentation[]>;
|
|
115
|
+
executeActionsEmail: (payload?: ({
|
|
116
116
|
id: string;
|
|
117
|
-
clientId?: string;
|
|
118
|
-
lifespan?: number;
|
|
119
|
-
redirectUri?: string;
|
|
120
|
-
actions?: RequiredActionAlias[];
|
|
117
|
+
clientId?: string | undefined;
|
|
118
|
+
lifespan?: number | undefined;
|
|
119
|
+
redirectUri?: string | undefined;
|
|
120
|
+
actions?: RequiredActionAlias[] | undefined;
|
|
121
121
|
} & {
|
|
122
|
-
realm?: string;
|
|
123
|
-
}) => Promise<void>;
|
|
124
|
-
listGroups: (payload?: {
|
|
122
|
+
realm?: string | undefined;
|
|
123
|
+
}) | undefined) => Promise<void>;
|
|
124
|
+
listGroups: (payload?: ({
|
|
125
125
|
id: string;
|
|
126
|
+
briefRepresentation?: boolean | undefined;
|
|
126
127
|
} & {
|
|
127
|
-
realm?: string;
|
|
128
|
-
}) => Promise<GroupRepresentation[]>;
|
|
129
|
-
addToGroup: (payload?: {
|
|
128
|
+
realm?: string | undefined;
|
|
129
|
+
}) | undefined) => Promise<GroupRepresentation[]>;
|
|
130
|
+
addToGroup: (payload?: ({
|
|
130
131
|
id: string;
|
|
131
132
|
groupId: string;
|
|
132
133
|
} & {
|
|
133
|
-
realm?: string;
|
|
134
|
-
}) => Promise<string>;
|
|
135
|
-
delFromGroup: (payload?: {
|
|
134
|
+
realm?: string | undefined;
|
|
135
|
+
}) | undefined) => Promise<string>;
|
|
136
|
+
delFromGroup: (payload?: ({
|
|
136
137
|
id: string;
|
|
137
138
|
groupId: string;
|
|
138
139
|
} & {
|
|
139
|
-
realm?: string;
|
|
140
|
-
}) => Promise<string>;
|
|
141
|
-
countGroups: (payload?: {
|
|
140
|
+
realm?: string | undefined;
|
|
141
|
+
}) | undefined) => Promise<string>;
|
|
142
|
+
countGroups: (payload?: ({
|
|
142
143
|
id: string;
|
|
143
|
-
search?: string;
|
|
144
|
+
search?: string | undefined;
|
|
144
145
|
} & {
|
|
145
|
-
realm?: string;
|
|
146
|
-
}) => Promise<{
|
|
146
|
+
realm?: string | undefined;
|
|
147
|
+
}) | undefined) => Promise<{
|
|
147
148
|
count: number;
|
|
148
149
|
}>;
|
|
149
|
-
listFederatedIdentities: (payload?: {
|
|
150
|
+
listFederatedIdentities: (payload?: ({
|
|
150
151
|
id: string;
|
|
151
152
|
} & {
|
|
152
|
-
realm?: string;
|
|
153
|
-
}) => Promise<FederatedIdentityRepresentation[]>;
|
|
154
|
-
addToFederatedIdentity: (payload?: {
|
|
153
|
+
realm?: string | undefined;
|
|
154
|
+
}) | undefined) => Promise<FederatedIdentityRepresentation[]>;
|
|
155
|
+
addToFederatedIdentity: (payload?: ({
|
|
155
156
|
id: string;
|
|
156
157
|
federatedIdentityId: string;
|
|
157
158
|
federatedIdentity: FederatedIdentityRepresentation;
|
|
158
159
|
} & {
|
|
159
|
-
realm?: string;
|
|
160
|
-
}) => Promise<void>;
|
|
161
|
-
delFromFederatedIdentity: (payload?: {
|
|
160
|
+
realm?: string | undefined;
|
|
161
|
+
}) | undefined) => Promise<void>;
|
|
162
|
+
delFromFederatedIdentity: (payload?: ({
|
|
162
163
|
id: string;
|
|
163
164
|
federatedIdentityId: string;
|
|
164
165
|
} & {
|
|
165
|
-
realm?: string;
|
|
166
|
-
}) => Promise<void>;
|
|
167
|
-
removeTotp: (payload?: {
|
|
166
|
+
realm?: string | undefined;
|
|
167
|
+
}) | undefined) => Promise<void>;
|
|
168
|
+
removeTotp: (payload?: ({
|
|
168
169
|
id: string;
|
|
169
170
|
} & {
|
|
170
|
-
realm?: string;
|
|
171
|
-
}) => Promise<void>;
|
|
172
|
-
resetPassword: (payload?: {
|
|
171
|
+
realm?: string | undefined;
|
|
172
|
+
}) | undefined) => Promise<void>;
|
|
173
|
+
resetPassword: (payload?: ({
|
|
173
174
|
id: string;
|
|
174
175
|
credential: CredentialRepresentation;
|
|
175
176
|
} & {
|
|
176
|
-
realm?: string;
|
|
177
|
-
}) => Promise<void>;
|
|
178
|
-
|
|
177
|
+
realm?: string | undefined;
|
|
178
|
+
}) | undefined) => Promise<void>;
|
|
179
|
+
getCredentials: (payload?: ({
|
|
179
180
|
id: string;
|
|
180
|
-
clientId?: string;
|
|
181
|
-
redirectUri?: string;
|
|
182
181
|
} & {
|
|
183
|
-
realm?: string;
|
|
184
|
-
}) => Promise<
|
|
185
|
-
|
|
182
|
+
realm?: string | undefined;
|
|
183
|
+
}) | undefined) => Promise<CredentialRepresentation[]>;
|
|
184
|
+
deleteCredential: (payload?: ({
|
|
186
185
|
id: string;
|
|
186
|
+
credentialId: string;
|
|
187
187
|
} & {
|
|
188
|
-
realm?: string;
|
|
189
|
-
}) => Promise<
|
|
190
|
-
|
|
188
|
+
realm?: string | undefined;
|
|
189
|
+
}) | undefined) => Promise<void>;
|
|
190
|
+
sendVerifyEmail: (payload?: ({
|
|
191
|
+
id: string;
|
|
192
|
+
clientId?: string | undefined;
|
|
193
|
+
redirectUri?: string | undefined;
|
|
194
|
+
} & {
|
|
195
|
+
realm?: string | undefined;
|
|
196
|
+
}) | undefined) => Promise<void>;
|
|
197
|
+
listSessions: (payload?: ({
|
|
198
|
+
id: string;
|
|
199
|
+
} & {
|
|
200
|
+
realm?: string | undefined;
|
|
201
|
+
}) | undefined) => Promise<UserSessionRepresentation[]>;
|
|
202
|
+
listOfflineSessions: (payload?: ({
|
|
191
203
|
id: string;
|
|
192
204
|
clientId: string;
|
|
193
205
|
} & {
|
|
194
|
-
realm?: string;
|
|
195
|
-
}) => Promise<UserSessionRepresentation[]>;
|
|
196
|
-
logout: (payload?: {
|
|
206
|
+
realm?: string | undefined;
|
|
207
|
+
}) | undefined) => Promise<UserSessionRepresentation[]>;
|
|
208
|
+
logout: (payload?: ({
|
|
197
209
|
id: string;
|
|
198
210
|
} & {
|
|
199
|
-
realm?: string;
|
|
200
|
-
}) => Promise<void>;
|
|
201
|
-
listConsents: (payload?: {
|
|
211
|
+
realm?: string | undefined;
|
|
212
|
+
}) | undefined) => Promise<void>;
|
|
213
|
+
listConsents: (payload?: ({
|
|
202
214
|
id: string;
|
|
203
215
|
} & {
|
|
204
|
-
realm?: string;
|
|
205
|
-
}) => Promise<UserConsentRepresentation[]>;
|
|
216
|
+
realm?: string | undefined;
|
|
217
|
+
}) | undefined) => Promise<UserConsentRepresentation[]>;
|
|
206
218
|
impersonation: (query: {
|
|
207
219
|
id: string;
|
|
208
220
|
} & {
|
|
209
|
-
realm?: string;
|
|
221
|
+
realm?: string | undefined;
|
|
210
222
|
}, payload: {
|
|
211
223
|
user: string;
|
|
212
224
|
realm: string;
|
|
213
225
|
}) => Promise<Record<string, any>>;
|
|
214
|
-
revokeConsent: (payload?: {
|
|
226
|
+
revokeConsent: (payload?: ({
|
|
215
227
|
id: string;
|
|
216
228
|
clientId: string;
|
|
217
229
|
} & {
|
|
218
|
-
realm?: string;
|
|
219
|
-
}) => Promise<void>;
|
|
230
|
+
realm?: string | undefined;
|
|
231
|
+
}) | undefined) => Promise<void>;
|
|
220
232
|
constructor(client: KeycloakAdminClient);
|
|
221
233
|
}
|
package/lib/resources/users.js
CHANGED
|
@@ -174,6 +174,16 @@ var Users = (function (_super) {
|
|
|
174
174
|
urlParamKeys: ['id'],
|
|
175
175
|
payloadKey: 'credential'
|
|
176
176
|
});
|
|
177
|
+
_this.getCredentials = _this.makeRequest({
|
|
178
|
+
method: 'GET',
|
|
179
|
+
path: '/{id}/credentials',
|
|
180
|
+
urlParamKeys: ['id']
|
|
181
|
+
});
|
|
182
|
+
_this.deleteCredential = _this.makeRequest({
|
|
183
|
+
method: 'DELETE',
|
|
184
|
+
path: '/{id}/credentials/{credentialId}',
|
|
185
|
+
urlParamKeys: ['id', 'credentialId']
|
|
186
|
+
});
|
|
177
187
|
_this.sendVerifyEmail = _this.makeRequest({
|
|
178
188
|
method: 'PUT',
|
|
179
189
|
path: '/{id}/send-verify-email',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/users.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,wDAAkC;AAyBlC;IAA2B,yBAA0B;
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/users.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,wDAAkC;AAyBlC;IAA2B,yBAA0B;IA8XnD,eAAY,MAA2B;QAAvC,YACE,kBAAM,MAAM,EAAE;YACZ,IAA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settings {
|
|
|
16
16
|
credentials: Credentials;
|
|
17
17
|
requestConfig?: AxiosRequestConfig;
|
|
18
18
|
}
|
|
19
|
+
export interface TokenResponseRaw {
|
|
20
|
+
access_token: string;
|
|
21
|
+
expires_in: string;
|
|
22
|
+
refresh_expires_in: number;
|
|
23
|
+
refresh_token: string;
|
|
24
|
+
token_type: string;
|
|
25
|
+
not_before_policy: number;
|
|
26
|
+
session_state: string;
|
|
27
|
+
scope: string;
|
|
28
|
+
}
|
|
19
29
|
export interface TokenResponse {
|
|
20
30
|
accessToken: string;
|
|
21
31
|
expiresIn: string;
|
package/lib/utils/auth.js
CHANGED
|
@@ -52,7 +52,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
52
52
|
exports.__esModule = true;
|
|
53
53
|
exports.getToken = void 0;
|
|
54
54
|
var axios_1 = __importDefault(require("axios"));
|
|
55
|
-
var
|
|
55
|
+
var camelize_ts_1 = __importDefault(require("camelize-ts"));
|
|
56
56
|
var query_string_1 = __importDefault(require("query-string"));
|
|
57
57
|
var constants_1 = require("./constants");
|
|
58
58
|
var getToken = function (settings) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -78,7 +78,7 @@ var getToken = function (settings) { return __awaiter(void 0, void 0, void 0, fu
|
|
|
78
78
|
return [4, axios_1["default"].post(url, payload, config)];
|
|
79
79
|
case 1:
|
|
80
80
|
data = (_a.sent()).data;
|
|
81
|
-
return [2,
|
|
81
|
+
return [2, (0, camelize_ts_1["default"])(data)];
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
}); };
|
package/lib/utils/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/utils/auth.ts"],"names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