@authsome/client 0.0.7 → 0.0.9
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/dist/client.d.ts +42 -42
- package/dist/client.js +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +62 -62
- package/dist/plugins/admin.js +11 -11
- package/dist/plugins/apikey.js +7 -7
- package/dist/plugins/backupauth.js +6 -6
- package/dist/plugins/cms.d.ts +69 -18
- package/dist/plugins/cms.js +47 -47
- package/dist/plugins/idverification.js +11 -11
- package/dist/plugins/impersonation.js +6 -6
- package/dist/plugins/jwt.js +5 -5
- package/dist/plugins/multiapp.d.ts +19 -4
- package/dist/plugins/multiapp.js +23 -23
- package/dist/plugins/multisession.js +9 -9
- package/dist/plugins/notification.js +14 -14
- package/dist/plugins/oidcprovider.d.ts +3 -3
- package/dist/plugins/oidcprovider.js +17 -17
- package/dist/plugins/organization.d.ts +16 -4
- package/dist/plugins/organization.js +20 -20
- package/dist/plugins/permissions.js +3 -3
- package/dist/plugins/secrets.d.ts +1 -1
- package/dist/plugins/secrets.js +11 -11
- package/dist/plugins/sso.js +6 -6
- package/dist/plugins/stepup.js +14 -14
- package/dist/plugins/webhook.d.ts +1 -1
- package/dist/types.d.ts +3837 -3787
- package/package.json +1 -2
- package/src/client.ts +42 -42
- package/src/index.ts +20 -20
- package/src/plugins/admin.ts +11 -11
- package/src/plugins/apikey.ts +7 -7
- package/src/plugins/backupauth.ts +6 -6
- package/src/plugins/cms.ts +52 -52
- package/src/plugins/idverification.ts +11 -11
- package/src/plugins/impersonation.ts +6 -6
- package/src/plugins/jwt.ts +5 -5
- package/src/plugins/multiapp.ts +30 -30
- package/src/plugins/multisession.ts +9 -9
- package/src/plugins/notification.ts +14 -14
- package/src/plugins/oidcprovider.ts +23 -23
- package/src/plugins/organization.ts +24 -24
- package/src/plugins/permissions.ts +3 -3
- package/src/plugins/secrets.ts +12 -12
- package/src/plugins/sso.ts +6 -6
- package/src/plugins/stepup.ts +14 -14
- package/src/plugins/webhook.ts +1 -1
- package/src/types.ts +3928 -3877
|
@@ -13,63 +13,63 @@ export class IdverificationPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.IDVerificationSessionResponse> {
|
|
16
|
-
const path = '/sessions';
|
|
16
|
+
const path = '/verification/sessions';
|
|
17
17
|
return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async getVerificationSession(params: { id: string }): Promise<types.IDVerificationSessionResponse> {
|
|
23
|
-
const path = `/sessions/${params.id}`;
|
|
23
|
+
const path = `/verification/sessions/${params.id}`;
|
|
24
24
|
return this.client.request<types.IDVerificationSessionResponse>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
async getVerification(params: { id: string }): Promise<types.IDVerificationResponse> {
|
|
28
|
-
const path =
|
|
28
|
+
const path = `/verification/${params.id}`;
|
|
29
29
|
return this.client.request<types.IDVerificationResponse>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
async getUserVerifications(): Promise<types.IDVerificationListResponse> {
|
|
33
|
-
const path = '/me';
|
|
33
|
+
const path = '/verification/me';
|
|
34
34
|
return this.client.request<types.IDVerificationListResponse>('GET', path);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
async getUserVerificationStatus(): Promise<types.IDVerificationStatusResponse> {
|
|
38
|
-
const path = '/me/status';
|
|
38
|
+
const path = '/verification/me/status';
|
|
39
39
|
return this.client.request<types.IDVerificationStatusResponse>('GET', path);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
async requestReverification(request: types.RequestReverification_req): Promise<types.IDVerificationSessionResponse> {
|
|
43
|
-
const path = '/me/reverify';
|
|
43
|
+
const path = '/verification/me/reverify';
|
|
44
44
|
return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
|
|
45
45
|
body: request,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
async handleWebhook(params: { provider: string }): Promise<types.IDVerificationWebhookResponse> {
|
|
50
|
-
const path = `/webhook/${params.provider}`;
|
|
50
|
+
const path = `/verification/webhook/${params.provider}`;
|
|
51
51
|
return this.client.request<types.IDVerificationWebhookResponse>('POST', path);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
async adminBlockUser(params: { userId: string }, request: types.AdminBlockUser_req): Promise<types.IDVerificationStatusResponse> {
|
|
55
|
-
const path = `/users/${params.userId}/block`;
|
|
55
|
+
const path = `/verification/admin/users/${params.userId}/block`;
|
|
56
56
|
return this.client.request<types.IDVerificationStatusResponse>('POST', path, {
|
|
57
57
|
body: request,
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
async adminUnblockUser(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
|
|
62
|
-
const path = `/users/${params.userId}/unblock`;
|
|
62
|
+
const path = `/verification/admin/users/${params.userId}/unblock`;
|
|
63
63
|
return this.client.request<types.IDVerificationStatusResponse>('POST', path);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
async adminGetUserVerificationStatus(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
|
|
67
|
-
const path = `/users/${params.userId}/status`;
|
|
67
|
+
const path = `/verification/admin/users/${params.userId}/status`;
|
|
68
68
|
return this.client.request<types.IDVerificationStatusResponse>('GET', path);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
async adminGetUserVerifications(params: { userId: string }): Promise<types.IDVerificationListResponse> {
|
|
72
|
-
const path = `/users/${params.userId}/verifications`;
|
|
72
|
+
const path = `/verification/admin/users/${params.userId}/verifications`;
|
|
73
73
|
return this.client.request<types.IDVerificationListResponse>('GET', path);
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -13,32 +13,32 @@ export class ImpersonationPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async startImpersonation(): Promise<types.ImpersonationStartResponse> {
|
|
16
|
-
const path = '/start';
|
|
16
|
+
const path = '/impersonation/start';
|
|
17
17
|
return this.client.request<types.ImpersonationStartResponse>('POST', path);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async endImpersonation(): Promise<types.ImpersonationEndResponse> {
|
|
21
|
-
const path = '/end';
|
|
21
|
+
const path = '/impersonation/end';
|
|
22
22
|
return this.client.request<types.ImpersonationEndResponse>('POST', path);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
async getImpersonation(params: { id: string }): Promise<types.ImpersonationSession> {
|
|
26
|
-
const path =
|
|
26
|
+
const path = `/impersonation/${params.id}`;
|
|
27
27
|
return this.client.request<types.ImpersonationSession>('GET', path);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
async listImpersonations(): Promise<types.ImpersonationListResponse> {
|
|
31
|
-
const path = '/';
|
|
31
|
+
const path = '/impersonation/';
|
|
32
32
|
return this.client.request<types.ImpersonationListResponse>('GET', path);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
async listAuditEvents(): Promise<types.ImpersonationAuditResponse> {
|
|
36
|
-
const path = '/audit';
|
|
36
|
+
const path = '/impersonation/audit';
|
|
37
37
|
return this.client.request<types.ImpersonationAuditResponse>('GET', path);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
async verifyImpersonation(): Promise<types.ImpersonationVerifyResponse> {
|
|
41
|
-
const path = '/verify';
|
|
41
|
+
const path = '/impersonation/verify';
|
|
42
42
|
return this.client.request<types.ImpersonationVerifyResponse>('POST', path);
|
|
43
43
|
}
|
|
44
44
|
|
package/src/plugins/jwt.ts
CHANGED
|
@@ -13,33 +13,33 @@ export class JwtPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async createJWTKey(request: types.CreateJWTKeyRequest): Promise<types.JWTKey> {
|
|
16
|
-
const path = '/
|
|
16
|
+
const path = '/jwt/keys';
|
|
17
17
|
return this.client.request<types.JWTKey>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async listJWTKeys(request?: types.ListJWTKeysRequest): Promise<types.ListJWTKeysResponse> {
|
|
23
|
-
const path = '/
|
|
23
|
+
const path = '/jwt/keys';
|
|
24
24
|
return this.client.request<types.ListJWTKeysResponse>('GET', path, {
|
|
25
25
|
query: this.client.toQueryParams(request),
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
async getJWKS(): Promise<types.JWKSResponse> {
|
|
30
|
-
const path = '/jwks';
|
|
30
|
+
const path = '/jwt/jwks';
|
|
31
31
|
return this.client.request<types.JWKSResponse>('GET', path);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
async generateToken(request: types.GenerateTokenRequest): Promise<types.GenerateTokenResponse> {
|
|
35
|
-
const path = '/generate';
|
|
35
|
+
const path = '/jwt/generate';
|
|
36
36
|
return this.client.request<types.GenerateTokenResponse>('POST', path, {
|
|
37
37
|
body: request,
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
async verifyToken(request: types.VerifyTokenRequest): Promise<types.VerifyTokenResponse> {
|
|
42
|
-
const path = '/verify';
|
|
42
|
+
const path = '/jwt/verify';
|
|
43
43
|
return this.client.request<types.VerifyTokenResponse>('POST', path, {
|
|
44
44
|
body: request,
|
|
45
45
|
});
|
package/src/plugins/multiapp.ts
CHANGED
|
@@ -13,107 +13,107 @@ export class MultiappPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async createApp(): Promise<types.App> {
|
|
16
|
-
const path = '/
|
|
16
|
+
const path = '/apps';
|
|
17
17
|
return this.client.request<types.App>('POST', path);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async getApp(params: { appId: string }): Promise<types.App> {
|
|
21
|
-
const path =
|
|
21
|
+
const path = `/apps/${params.appId}`;
|
|
22
22
|
return this.client.request<types.App>('GET', path);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
async updateApp(params: { appId: string }): Promise<types.App> {
|
|
26
|
-
const path =
|
|
26
|
+
const path = `/apps/${params.appId}`;
|
|
27
27
|
return this.client.request<types.App>('PUT', path);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
async deleteApp(params: { appId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
31
|
-
const path =
|
|
31
|
+
const path = `/apps/${params.appId}`;
|
|
32
32
|
return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
async listApps(): Promise<types.AppsListResponse> {
|
|
36
|
-
const path = '/
|
|
36
|
+
const path = '/apps';
|
|
37
37
|
return this.client.request<types.AppsListResponse>('GET', path);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
async removeMember(params: { memberId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
41
|
-
const path =
|
|
40
|
+
async removeMember(params: { appId: string; memberId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
41
|
+
const path = `/apps/${params.appId}/members/${params.memberId}`;
|
|
42
42
|
return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
async listMembers(): Promise<types.MembersListResponse> {
|
|
46
|
-
const path =
|
|
45
|
+
async listMembers(params: { appId: string }): Promise<types.MembersListResponse> {
|
|
46
|
+
const path = `/apps/${params.appId}/members`;
|
|
47
47
|
return this.client.request<types.MembersListResponse>('GET', path);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
async inviteMember(request: types.InviteMemberRequest): Promise<types.Invitation> {
|
|
51
|
-
const path =
|
|
50
|
+
async inviteMember(params: { appId: string }, request: types.InviteMemberRequest): Promise<types.Invitation> {
|
|
51
|
+
const path = `/apps/${params.appId}/members/invite`;
|
|
52
52
|
return this.client.request<types.Invitation>('POST', path, {
|
|
53
53
|
body: request,
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
async updateMember(params: { memberId: string }, request: types.UpdateMemberRequest): Promise<types.Member> {
|
|
58
|
-
const path =
|
|
57
|
+
async updateMember(params: { appId: string; memberId: string }, request: types.UpdateMemberRequest): Promise<types.Member> {
|
|
58
|
+
const path = `/apps/${params.appId}/members/${params.memberId}`;
|
|
59
59
|
return this.client.request<types.Member>('PUT', path, {
|
|
60
60
|
body: request,
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
async getInvitation(params: { token: string }): Promise<types.Invitation> {
|
|
65
|
-
const path =
|
|
65
|
+
const path = `/invitations/${params.token}`;
|
|
66
66
|
return this.client.request<types.Invitation>('GET', path);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
async acceptInvitation(params: { token: string }): Promise<types.MultitenancyStatusResponse> {
|
|
70
|
-
const path =
|
|
70
|
+
const path = `/invitations/${params.token}/accept`;
|
|
71
71
|
return this.client.request<types.MultitenancyStatusResponse>('POST', path);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
async declineInvitation(params: { token: string }): Promise<types.MultitenancyStatusResponse> {
|
|
75
|
-
const path =
|
|
75
|
+
const path = `/invitations/${params.token}/decline`;
|
|
76
76
|
return this.client.request<types.MultitenancyStatusResponse>('POST', path);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
async createTeam(request: types.CreateTeamRequest): Promise<types.Team> {
|
|
80
|
-
const path =
|
|
79
|
+
async createTeam(params: { appId: string }, request: types.CreateTeamRequest): Promise<types.Team> {
|
|
80
|
+
const path = `/apps/${params.appId}/teams`;
|
|
81
81
|
return this.client.request<types.Team>('POST', path, {
|
|
82
82
|
body: request,
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
async getTeam(params: { teamId: string }): Promise<types.Team> {
|
|
87
|
-
const path =
|
|
86
|
+
async getTeam(params: { appId: string; teamId: string }): Promise<types.Team> {
|
|
87
|
+
const path = `/apps/${params.appId}/teams/${params.teamId}`;
|
|
88
88
|
return this.client.request<types.Team>('GET', path);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
async updateTeam(params: { teamId: string }, request: types.UpdateTeamRequest): Promise<types.Team> {
|
|
92
|
-
const path =
|
|
91
|
+
async updateTeam(params: { appId: string; teamId: string }, request: types.UpdateTeamRequest): Promise<types.Team> {
|
|
92
|
+
const path = `/apps/${params.appId}/teams/${params.teamId}`;
|
|
93
93
|
return this.client.request<types.Team>('PUT', path, {
|
|
94
94
|
body: request,
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
async deleteTeam(params: { teamId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
99
|
-
const path =
|
|
98
|
+
async deleteTeam(params: { appId: string; teamId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
99
|
+
const path = `/apps/${params.appId}/teams/${params.teamId}`;
|
|
100
100
|
return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
async listTeams(): Promise<types.TeamsListResponse> {
|
|
104
|
-
const path =
|
|
103
|
+
async listTeams(params: { appId: string }): Promise<types.TeamsListResponse> {
|
|
104
|
+
const path = `/apps/${params.appId}/teams`;
|
|
105
105
|
return this.client.request<types.TeamsListResponse>('GET', path);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
async addTeamMember(params: { teamId: string }, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse> {
|
|
109
|
-
const path =
|
|
108
|
+
async addTeamMember(params: { teamId: string; appId: string }, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse> {
|
|
109
|
+
const path = `/apps/${params.appId}/teams/${params.teamId}/members`;
|
|
110
110
|
return this.client.request<types.MultitenancyStatusResponse>('POST', path, {
|
|
111
111
|
body: request,
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
async removeTeamMember(params: { teamId: string; memberId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
116
|
-
const path =
|
|
115
|
+
async removeTeamMember(params: { appId: string; teamId: string; memberId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
116
|
+
const path = `/apps/${params.appId}/teams/${params.teamId}/members/${params.memberId}`;
|
|
117
117
|
return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -13,53 +13,53 @@ export class MultisessionPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async list(request?: types.ListSessionsRequest): Promise<types.ListSessionsResponse> {
|
|
16
|
-
const path = '/list';
|
|
16
|
+
const path = '/multi-session/list';
|
|
17
17
|
return this.client.request<types.ListSessionsResponse>('GET', path, {
|
|
18
18
|
query: this.client.toQueryParams(request),
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async setActive(request: types.SetActiveRequest): Promise<types.SessionTokenResponse> {
|
|
23
|
-
const path = '/set-active';
|
|
23
|
+
const path = '/multi-session/set-active';
|
|
24
24
|
return this.client.request<types.SessionTokenResponse>('POST', path, {
|
|
25
25
|
body: request,
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
async delete(params: { id: string }): Promise<types.StatusResponse> {
|
|
30
|
-
const path = `/delete/${params.id}`;
|
|
30
|
+
const path = `/multi-session/delete/${params.id}`;
|
|
31
31
|
return this.client.request<types.StatusResponse>('POST', path);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
async getCurrent(): Promise<types.SessionTokenResponse> {
|
|
35
|
-
const path = '/current';
|
|
35
|
+
const path = '/multi-session/current';
|
|
36
36
|
return this.client.request<types.SessionTokenResponse>('GET', path);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
async getByID(params: { id: string }): Promise<types.SessionTokenResponse> {
|
|
40
|
-
const path =
|
|
40
|
+
const path = `/multi-session/${params.id}`;
|
|
41
41
|
return this.client.request<types.SessionTokenResponse>('GET', path);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
async revokeAll(request: types.RevokeAllRequest): Promise<types.RevokeResponse> {
|
|
45
|
-
const path = '/revoke-all';
|
|
45
|
+
const path = '/multi-session/revoke-all';
|
|
46
46
|
return this.client.request<types.RevokeResponse>('POST', path, {
|
|
47
47
|
body: request,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
async revokeOthers(): Promise<types.RevokeResponse> {
|
|
52
|
-
const path = '/revoke-others';
|
|
52
|
+
const path = '/multi-session/revoke-others';
|
|
53
53
|
return this.client.request<types.RevokeResponse>('POST', path);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
async refresh(): Promise<types.SessionTokenResponse> {
|
|
57
|
-
const path = '/refresh';
|
|
57
|
+
const path = '/multi-session/refresh';
|
|
58
58
|
return this.client.request<types.SessionTokenResponse>('POST', path);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
async getStats(): Promise<types.SessionStatsResponse> {
|
|
62
|
-
const path = '/stats';
|
|
62
|
+
const path = '/multi-session/stats';
|
|
63
63
|
return this.client.request<types.SessionStatsResponse>('GET', path);
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -13,82 +13,82 @@ export class NotificationPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async createTemplate(request: types.CreateTemplateRequest): Promise<types.NotificationTemplateResponse> {
|
|
16
|
-
const path = '/
|
|
16
|
+
const path = '/templates';
|
|
17
17
|
return this.client.request<types.NotificationTemplateResponse>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async getTemplate(params: { id: string }): Promise<types.NotificationTemplateResponse> {
|
|
23
|
-
const path =
|
|
23
|
+
const path = `/templates/${params.id}`;
|
|
24
24
|
return this.client.request<types.NotificationTemplateResponse>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
async listTemplates(): Promise<types.NotificationTemplateListResponse> {
|
|
28
|
-
const path = '/
|
|
28
|
+
const path = '/templates';
|
|
29
29
|
return this.client.request<types.NotificationTemplateListResponse>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
async updateTemplate(params: { id: string }, request: types.UpdateTemplateRequest): Promise<types.NotificationTemplateResponse> {
|
|
33
|
-
const path =
|
|
33
|
+
const path = `/templates/${params.id}`;
|
|
34
34
|
return this.client.request<types.NotificationTemplateResponse>('PUT', path, {
|
|
35
35
|
body: request,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
async deleteTemplate(params: { id: string }): Promise<types.NotificationStatusResponse> {
|
|
40
|
-
const path =
|
|
40
|
+
const path = `/templates/${params.id}`;
|
|
41
41
|
return this.client.request<types.NotificationStatusResponse>('DELETE', path);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
async resetTemplate(params: { id: string }): Promise<types.NotificationStatusResponse> {
|
|
45
|
-
const path =
|
|
45
|
+
const path = `/templates/${params.id}/reset`;
|
|
46
46
|
return this.client.request<types.NotificationStatusResponse>('POST', path);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
async resetAllTemplates(): Promise<types.NotificationStatusResponse> {
|
|
50
|
-
const path = '/reset-all';
|
|
50
|
+
const path = '/templates/reset-all';
|
|
51
51
|
return this.client.request<types.NotificationStatusResponse>('POST', path);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
async getTemplateDefaults(): Promise<types.NotificationTemplateListResponse> {
|
|
55
|
-
const path = '/defaults';
|
|
55
|
+
const path = '/templates/defaults';
|
|
56
56
|
return this.client.request<types.NotificationTemplateListResponse>('GET', path);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
async previewTemplate(params: { id: string }, request: types.PreviewTemplate_req): Promise<types.NotificationPreviewResponse> {
|
|
60
|
-
const path =
|
|
60
|
+
const path = `/templates/${params.id}/preview`;
|
|
61
61
|
return this.client.request<types.NotificationPreviewResponse>('POST', path, {
|
|
62
62
|
body: request,
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
async renderTemplate(request: types.RenderTemplate_req): Promise<types.NotificationPreviewResponse> {
|
|
67
|
-
const path = '/render';
|
|
67
|
+
const path = '/templates/render';
|
|
68
68
|
return this.client.request<types.NotificationPreviewResponse>('POST', path, {
|
|
69
69
|
body: request,
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
async sendNotification(request: types.SendRequest): Promise<types.NotificationResponse> {
|
|
74
|
-
const path = '/send';
|
|
74
|
+
const path = '/notifications/send';
|
|
75
75
|
return this.client.request<types.NotificationResponse>('POST', path, {
|
|
76
76
|
body: request,
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
async getNotification(params: { id: string }): Promise<types.NotificationResponse> {
|
|
81
|
-
const path =
|
|
81
|
+
const path = `/notifications/${params.id}`;
|
|
82
82
|
return this.client.request<types.NotificationResponse>('GET', path);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
async listNotifications(): Promise<types.NotificationListResponse> {
|
|
86
|
-
const path = '/
|
|
86
|
+
const path = '/notifications';
|
|
87
87
|
return this.client.request<types.NotificationListResponse>('GET', path);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
async resendNotification(params: { id: string }): Promise<types.NotificationResponse> {
|
|
91
|
-
const path =
|
|
91
|
+
const path = `/notifications/${params.id}/resend`;
|
|
92
92
|
return this.client.request<types.NotificationResponse>('POST', path);
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -13,104 +13,104 @@ export class OidcproviderPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async registerClient(request: types.ClientRegistrationRequest): Promise<types.ClientRegistrationResponse> {
|
|
16
|
-
const path = '/register';
|
|
16
|
+
const path = '/oauth2/register';
|
|
17
17
|
return this.client.request<types.ClientRegistrationResponse>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async listClients(): Promise<types.ClientsListResponse> {
|
|
23
|
-
const path = '/
|
|
23
|
+
const path = '/oauth2/clients';
|
|
24
24
|
return this.client.request<types.ClientsListResponse>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
async getClient(params: { clientId: string }): Promise<types.ClientDetailsResponse> {
|
|
28
|
-
const path =
|
|
28
|
+
const path = `/oauth2/clients/${params.clientId}`;
|
|
29
29
|
return this.client.request<types.ClientDetailsResponse>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
async updateClient(params: { clientId: string }, request: types.ClientUpdateRequest): Promise<types.ClientDetailsResponse> {
|
|
33
|
-
const path =
|
|
33
|
+
const path = `/oauth2/clients/${params.clientId}`;
|
|
34
34
|
return this.client.request<types.ClientDetailsResponse>('PUT', path, {
|
|
35
35
|
body: request,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
async deleteClient(params: { clientId: string }): Promise<void> {
|
|
40
|
-
const path =
|
|
40
|
+
const path = `/oauth2/clients/${params.clientId}`;
|
|
41
41
|
return this.client.request<void>('DELETE', path);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
async discovery(): Promise<types.DiscoveryResponse> {
|
|
45
|
-
const path = '/.well-known/openid-configuration';
|
|
45
|
+
const path = '/oauth2/.well-known/openid-configuration';
|
|
46
46
|
return this.client.request<types.DiscoveryResponse>('GET', path);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
async jWKS(): Promise<types.JWKSResponse> {
|
|
50
|
-
const path = '/jwks';
|
|
50
|
+
const path = '/oauth2/jwks';
|
|
51
51
|
return this.client.request<types.JWKSResponse>('GET', path);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
async authorize(): Promise<void> {
|
|
55
|
-
const path = '/authorize';
|
|
55
|
+
const path = '/oauth2/authorize';
|
|
56
56
|
return this.client.request<void>('GET', path);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
async handleConsent(request: types.ConsentRequest): Promise<void> {
|
|
60
|
-
const path = '/consent';
|
|
60
|
+
const path = '/oauth2/consent';
|
|
61
61
|
return this.client.request<void>('POST', path, {
|
|
62
62
|
body: request,
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
async token(request: types.TokenRequest): Promise<types.TokenResponse> {
|
|
67
|
-
const path = '/token';
|
|
67
|
+
const path = '/oauth2/token';
|
|
68
68
|
return this.client.request<types.TokenResponse>('POST', path, {
|
|
69
69
|
body: request,
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
async userInfo(): Promise<types.UserInfoResponse> {
|
|
74
|
-
const path = '/userinfo';
|
|
74
|
+
const path = '/oauth2/userinfo';
|
|
75
75
|
return this.client.request<types.UserInfoResponse>('GET', path);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
async introspectToken(request: types.TokenIntrospectionRequest): Promise<types.TokenIntrospectionResponse> {
|
|
79
|
-
const path = '/introspect';
|
|
79
|
+
const path = '/oauth2/introspect';
|
|
80
80
|
return this.client.request<types.TokenIntrospectionResponse>('POST', path, {
|
|
81
81
|
body: request,
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
async revokeToken(request: types.TokenRevocationRequest): Promise<types.StatusResponse> {
|
|
86
|
-
const path = '/revoke';
|
|
86
|
+
const path = '/oauth2/revoke';
|
|
87
87
|
return this.client.request<types.StatusResponse>('POST', path, {
|
|
88
88
|
body: request,
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
async deviceAuthorize(request: types.DeviceAuthorizationRequest): Promise<types.DeviceAuthorizationResponse> {
|
|
93
|
-
const path = '/device_authorization';
|
|
93
|
+
const path = '/oauth2/device_authorization';
|
|
94
94
|
return this.client.request<types.DeviceAuthorizationResponse>('POST', path, {
|
|
95
95
|
body: request,
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
async deviceCodeEntry(): Promise<
|
|
100
|
-
const path = '/
|
|
101
|
-
return this.client.request<
|
|
99
|
+
async deviceCodeEntry(): Promise<types.DeviceCodeEntryResponse> {
|
|
100
|
+
const path = '/oauth2/device';
|
|
101
|
+
return this.client.request<types.DeviceCodeEntryResponse>('GET', path);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
async deviceVerify(request: types.DeviceVerificationRequest): Promise<
|
|
105
|
-
const path = '/verify';
|
|
106
|
-
return this.client.request<
|
|
104
|
+
async deviceVerify(request: types.DeviceVerificationRequest): Promise<types.DeviceVerifyResponse> {
|
|
105
|
+
const path = '/oauth2/device/verify';
|
|
106
|
+
return this.client.request<types.DeviceVerifyResponse>('POST', path, {
|
|
107
107
|
body: request,
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
async deviceAuthorizeDecision(request: types.DeviceAuthorizationDecisionRequest): Promise<
|
|
112
|
-
const path = '/authorize';
|
|
113
|
-
return this.client.request<
|
|
111
|
+
async deviceAuthorizeDecision(request: types.DeviceAuthorizationDecisionRequest): Promise<types.DeviceDecisionResponse> {
|
|
112
|
+
const path = '/oauth2/device/authorize';
|
|
113
|
+
return this.client.request<types.DeviceDecisionResponse>('POST', path, {
|
|
114
114
|
body: request,
|
|
115
115
|
});
|
|
116
116
|
}
|