@authsome/client 0.0.3 → 0.0.5
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 +90 -37
- package/dist/client.js +79 -17
- package/dist/index.d.ts +21 -17
- package/dist/index.js +65 -53
- package/dist/plugins/admin.d.ts +19 -7
- package/dist/plugins/admin.js +18 -28
- package/dist/plugins/anonymous.d.ts +1 -1
- package/dist/plugins/anonymous.js +4 -2
- package/dist/plugins/apikey.d.ts +15 -7
- package/dist/plugins/apikey.js +29 -17
- package/dist/plugins/backupauth.d.ts +38 -28
- package/dist/plugins/backupauth.js +10 -10
- package/dist/plugins/cms.d.ts +54 -0
- package/dist/plugins/cms.js +149 -0
- package/dist/plugins/compliance.d.ts +93 -33
- package/dist/plugins/compliance.js +63 -61
- package/dist/plugins/consent.d.ts +34 -18
- package/dist/plugins/consent.js +16 -16
- package/dist/plugins/emailverification.d.ts +12 -0
- package/dist/plugins/emailverification.js +35 -0
- package/dist/plugins/idverification.d.ts +25 -11
- package/dist/plugins/idverification.js +14 -14
- package/dist/plugins/impersonation.d.ts +8 -6
- package/dist/plugins/impersonation.js +6 -10
- package/dist/plugins/jwt.d.ts +6 -5
- package/dist/plugins/jwt.js +16 -8
- package/dist/plugins/mfa.d.ts +26 -12
- package/dist/plugins/mfa.js +17 -21
- package/dist/plugins/multiapp.d.ts +46 -19
- package/dist/plugins/multiapp.js +40 -32
- package/dist/plugins/multisession.d.ts +13 -3
- package/dist/plugins/multisession.js +32 -4
- package/dist/plugins/notification.d.ts +31 -15
- package/dist/plugins/notification.js +27 -21
- package/dist/plugins/oidcprovider.d.ts +18 -12
- package/dist/plugins/oidcprovider.js +18 -12
- package/dist/plugins/organization.d.ts +32 -12
- package/dist/plugins/organization.js +20 -20
- package/dist/plugins/passkey.d.ts +6 -2
- package/dist/plugins/passkey.js +4 -4
- package/dist/plugins/permissions.d.ts +12 -0
- package/dist/plugins/permissions.js +33 -0
- package/dist/plugins/secrets.d.ts +33 -0
- package/dist/plugins/secrets.js +79 -0
- package/dist/plugins/social.d.ts +11 -2
- package/dist/plugins/social.js +7 -5
- package/dist/plugins/sso.d.ts +12 -4
- package/dist/plugins/sso.js +8 -8
- package/dist/plugins/stepup.d.ts +23 -13
- package/dist/plugins/stepup.js +10 -10
- package/dist/plugins/twofa.d.ts +6 -6
- package/dist/plugins/twofa.js +12 -24
- package/dist/plugins/username.d.ts +2 -2
- package/dist/plugins/username.js +8 -4
- package/dist/types.d.ts +3443 -2470
- package/package.json +2 -1
- package/src/client.ts +111 -37
- package/src/index.ts +21 -17
- package/src/plugins/admin.ts +18 -28
- package/src/plugins/anonymous.ts +4 -2
- package/src/plugins/apikey.ts +30 -18
- package/src/plugins/backupauth.ts +61 -61
- package/src/plugins/cms.ts +180 -0
- package/src/plugins/compliance.ts +98 -96
- package/src/plugins/consent.ts +44 -44
- package/src/plugins/emailverification.ts +40 -0
- package/src/plugins/idverification.ts +29 -29
- package/src/plugins/impersonation.ts +13 -17
- package/src/plugins/jwt.ts +18 -10
- package/src/plugins/mfa.ts +28 -32
- package/src/plugins/multiapp.ts +59 -51
- package/src/plugins/multisession.ts +39 -5
- package/src/plugins/notification.ts +44 -38
- package/src/plugins/oidcprovider.ts +32 -26
- package/src/plugins/organization.ts +27 -27
- package/src/plugins/passkey.ts +4 -4
- package/src/plugins/permissions.ts +38 -0
- package/src/plugins/secrets.ts +92 -0
- package/src/plugins/social.ts +7 -5
- package/src/plugins/sso.ts +8 -8
- package/src/plugins/stepup.ts +31 -31
- package/src/plugins/twofa.ts +12 -24
- package/src/plugins/username.ts +8 -4
- package/src/types.ts +3773 -2545
- package/authsome-client-0.0.2.tgz +0 -0
package/dist/plugins/mfa.js
CHANGED
|
@@ -20,23 +20,21 @@ class MfaPlugin {
|
|
|
20
20
|
const path = '/mfa/factors';
|
|
21
21
|
return this.client.request('GET', path);
|
|
22
22
|
}
|
|
23
|
-
async getFactor() {
|
|
24
|
-
const path =
|
|
23
|
+
async getFactor(params) {
|
|
24
|
+
const path = `/mfa/factors/${params.id}`;
|
|
25
25
|
return this.client.request('GET', path);
|
|
26
26
|
}
|
|
27
|
-
async updateFactor() {
|
|
28
|
-
const path =
|
|
27
|
+
async updateFactor(params) {
|
|
28
|
+
const path = `/mfa/factors/${params.id}`;
|
|
29
29
|
return this.client.request('PUT', path);
|
|
30
30
|
}
|
|
31
|
-
async deleteFactor() {
|
|
32
|
-
const path =
|
|
31
|
+
async deleteFactor(params) {
|
|
32
|
+
const path = `/mfa/factors/${params.id}`;
|
|
33
33
|
return this.client.request('DELETE', path);
|
|
34
34
|
}
|
|
35
|
-
async verifyFactor(
|
|
36
|
-
const path =
|
|
37
|
-
return this.client.request('POST', path
|
|
38
|
-
body: request,
|
|
39
|
-
});
|
|
35
|
+
async verifyFactor(params) {
|
|
36
|
+
const path = `/mfa/factors/${params.id}/verify`;
|
|
37
|
+
return this.client.request('POST', path);
|
|
40
38
|
}
|
|
41
39
|
async initiateChallenge(request) {
|
|
42
40
|
const path = '/mfa/challenge';
|
|
@@ -50,8 +48,8 @@ class MfaPlugin {
|
|
|
50
48
|
body: request,
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
|
-
async getChallengeStatus() {
|
|
54
|
-
const path =
|
|
51
|
+
async getChallengeStatus(params) {
|
|
52
|
+
const path = `/mfa/challenge/${params.id}`;
|
|
55
53
|
return this.client.request('GET', path);
|
|
56
54
|
}
|
|
57
55
|
async trustDevice(request) {
|
|
@@ -64,8 +62,8 @@ class MfaPlugin {
|
|
|
64
62
|
const path = '/mfa/devices';
|
|
65
63
|
return this.client.request('GET', path);
|
|
66
64
|
}
|
|
67
|
-
async revokeTrustedDevice() {
|
|
68
|
-
const path =
|
|
65
|
+
async revokeTrustedDevice(params) {
|
|
66
|
+
const path = `/mfa/devices/${params.id}`;
|
|
69
67
|
return this.client.request('DELETE', path);
|
|
70
68
|
}
|
|
71
69
|
async getStatus() {
|
|
@@ -76,14 +74,12 @@ class MfaPlugin {
|
|
|
76
74
|
const path = '/mfa/policy';
|
|
77
75
|
return this.client.request('GET', path);
|
|
78
76
|
}
|
|
79
|
-
async adminUpdatePolicy(
|
|
77
|
+
async adminUpdatePolicy() {
|
|
80
78
|
const path = '/mfa/policy';
|
|
81
|
-
return this.client.request('PUT', path
|
|
82
|
-
body: request,
|
|
83
|
-
});
|
|
79
|
+
return this.client.request('PUT', path);
|
|
84
80
|
}
|
|
85
|
-
async adminResetUserMFA() {
|
|
86
|
-
const path =
|
|
81
|
+
async adminResetUserMFA(params) {
|
|
82
|
+
const path = `/mfa/users/${params.id}/reset`;
|
|
87
83
|
return this.client.request('POST', path);
|
|
88
84
|
}
|
|
89
85
|
}
|
|
@@ -5,24 +5,51 @@ export declare class MultiappPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "multiapp";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
createApp(): Promise<
|
|
9
|
-
getApp(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
createApp(): Promise<types.App>;
|
|
9
|
+
getApp(params: {
|
|
10
|
+
appId: string;
|
|
11
|
+
}): Promise<types.App>;
|
|
12
|
+
updateApp(params: {
|
|
13
|
+
appId: string;
|
|
14
|
+
}): Promise<types.App>;
|
|
15
|
+
deleteApp(params: {
|
|
16
|
+
appId: string;
|
|
17
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
18
|
+
listApps(): Promise<types.AppsListResponse>;
|
|
19
|
+
removeMember(params: {
|
|
20
|
+
memberId: string;
|
|
21
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
22
|
+
listMembers(): Promise<types.MembersListResponse>;
|
|
23
|
+
inviteMember(request: types.InviteMemberRequest): Promise<types.Invitation>;
|
|
24
|
+
updateMember(params: {
|
|
25
|
+
memberId: string;
|
|
26
|
+
}, request: types.UpdateMemberRequest): Promise<types.Member>;
|
|
27
|
+
getInvitation(params: {
|
|
28
|
+
token: string;
|
|
29
|
+
}): Promise<types.Invitation>;
|
|
30
|
+
acceptInvitation(params: {
|
|
31
|
+
token: string;
|
|
32
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
33
|
+
declineInvitation(params: {
|
|
34
|
+
token: string;
|
|
35
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
36
|
+
createTeam(request: types.CreateTeamRequest): Promise<types.Team>;
|
|
37
|
+
getTeam(params: {
|
|
38
|
+
teamId: string;
|
|
39
|
+
}): Promise<types.Team>;
|
|
40
|
+
updateTeam(params: {
|
|
41
|
+
teamId: string;
|
|
42
|
+
}, request: types.UpdateTeamRequest): Promise<types.Team>;
|
|
43
|
+
deleteTeam(params: {
|
|
44
|
+
teamId: string;
|
|
45
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
46
|
+
listTeams(): Promise<types.TeamsListResponse>;
|
|
47
|
+
addTeamMember(params: {
|
|
48
|
+
teamId: string;
|
|
49
|
+
}, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse>;
|
|
50
|
+
removeTeamMember(params: {
|
|
51
|
+
teamId: string;
|
|
52
|
+
memberId: string;
|
|
53
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
27
54
|
}
|
|
28
55
|
export declare function multiappClient(): MultiappPlugin;
|
package/dist/plugins/multiapp.js
CHANGED
|
@@ -14,78 +14,86 @@ class MultiappPlugin {
|
|
|
14
14
|
const path = '/createapp';
|
|
15
15
|
return this.client.request('POST', path);
|
|
16
16
|
}
|
|
17
|
-
async getApp() {
|
|
18
|
-
const path =
|
|
17
|
+
async getApp(params) {
|
|
18
|
+
const path = `/${params.appId}`;
|
|
19
19
|
return this.client.request('GET', path);
|
|
20
20
|
}
|
|
21
|
-
async updateApp() {
|
|
22
|
-
const path =
|
|
21
|
+
async updateApp(params) {
|
|
22
|
+
const path = `/${params.appId}`;
|
|
23
23
|
return this.client.request('PUT', path);
|
|
24
24
|
}
|
|
25
|
-
async deleteApp() {
|
|
26
|
-
const path =
|
|
25
|
+
async deleteApp(params) {
|
|
26
|
+
const path = `/${params.appId}`;
|
|
27
27
|
return this.client.request('DELETE', path);
|
|
28
28
|
}
|
|
29
29
|
async listApps() {
|
|
30
30
|
const path = '/listapps';
|
|
31
31
|
return this.client.request('GET', path);
|
|
32
32
|
}
|
|
33
|
-
async removeMember() {
|
|
34
|
-
const path =
|
|
33
|
+
async removeMember(params) {
|
|
34
|
+
const path = `/${params.memberId}`;
|
|
35
35
|
return this.client.request('DELETE', path);
|
|
36
36
|
}
|
|
37
37
|
async listMembers() {
|
|
38
38
|
const path = '/listmembers';
|
|
39
39
|
return this.client.request('GET', path);
|
|
40
40
|
}
|
|
41
|
-
async inviteMember() {
|
|
41
|
+
async inviteMember(request) {
|
|
42
42
|
const path = '/invite';
|
|
43
|
-
return this.client.request('POST', path
|
|
43
|
+
return this.client.request('POST', path, {
|
|
44
|
+
body: request,
|
|
45
|
+
});
|
|
44
46
|
}
|
|
45
|
-
async updateMember() {
|
|
46
|
-
const path =
|
|
47
|
-
return this.client.request('PUT', path
|
|
47
|
+
async updateMember(params, request) {
|
|
48
|
+
const path = `/${params.memberId}`;
|
|
49
|
+
return this.client.request('PUT', path, {
|
|
50
|
+
body: request,
|
|
51
|
+
});
|
|
48
52
|
}
|
|
49
|
-
async getInvitation() {
|
|
50
|
-
const path =
|
|
53
|
+
async getInvitation(params) {
|
|
54
|
+
const path = `/${params.token}`;
|
|
51
55
|
return this.client.request('GET', path);
|
|
52
56
|
}
|
|
53
|
-
async acceptInvitation() {
|
|
54
|
-
const path =
|
|
57
|
+
async acceptInvitation(params) {
|
|
58
|
+
const path = `/${params.token}/accept`;
|
|
55
59
|
return this.client.request('POST', path);
|
|
56
60
|
}
|
|
57
|
-
async declineInvitation() {
|
|
58
|
-
const path =
|
|
61
|
+
async declineInvitation(params) {
|
|
62
|
+
const path = `/${params.token}/decline`;
|
|
59
63
|
return this.client.request('POST', path);
|
|
60
64
|
}
|
|
61
|
-
async createTeam() {
|
|
65
|
+
async createTeam(request) {
|
|
62
66
|
const path = '/createteam';
|
|
63
|
-
return this.client.request('POST', path
|
|
67
|
+
return this.client.request('POST', path, {
|
|
68
|
+
body: request,
|
|
69
|
+
});
|
|
64
70
|
}
|
|
65
|
-
async getTeam() {
|
|
66
|
-
const path =
|
|
71
|
+
async getTeam(params) {
|
|
72
|
+
const path = `/${params.teamId}`;
|
|
67
73
|
return this.client.request('GET', path);
|
|
68
74
|
}
|
|
69
|
-
async updateTeam() {
|
|
70
|
-
const path =
|
|
71
|
-
return this.client.request('PUT', path
|
|
75
|
+
async updateTeam(params, request) {
|
|
76
|
+
const path = `/${params.teamId}`;
|
|
77
|
+
return this.client.request('PUT', path, {
|
|
78
|
+
body: request,
|
|
79
|
+
});
|
|
72
80
|
}
|
|
73
|
-
async deleteTeam() {
|
|
74
|
-
const path =
|
|
81
|
+
async deleteTeam(params) {
|
|
82
|
+
const path = `/${params.teamId}`;
|
|
75
83
|
return this.client.request('DELETE', path);
|
|
76
84
|
}
|
|
77
85
|
async listTeams() {
|
|
78
86
|
const path = '/listteams';
|
|
79
87
|
return this.client.request('GET', path);
|
|
80
88
|
}
|
|
81
|
-
async addTeamMember(request) {
|
|
82
|
-
const path =
|
|
89
|
+
async addTeamMember(params, request) {
|
|
90
|
+
const path = `/${params.teamId}/members`;
|
|
83
91
|
return this.client.request('POST', path, {
|
|
84
92
|
body: request,
|
|
85
93
|
});
|
|
86
94
|
}
|
|
87
|
-
async removeTeamMember() {
|
|
88
|
-
const path =
|
|
95
|
+
async removeTeamMember(params) {
|
|
96
|
+
const path = `/${params.teamId}/members/${params.memberId}`;
|
|
89
97
|
return this.client.request('DELETE', path);
|
|
90
98
|
}
|
|
91
99
|
}
|
|
@@ -5,8 +5,18 @@ export declare class MultisessionPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "multisession";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
list(): Promise<types.
|
|
9
|
-
setActive(request: types.
|
|
10
|
-
delete(
|
|
8
|
+
list(request?: types.ListSessionsRequest): Promise<types.ListSessionsResponse>;
|
|
9
|
+
setActive(request: types.SetActiveRequest): Promise<types.SessionTokenResponse>;
|
|
10
|
+
delete(params: {
|
|
11
|
+
id: string;
|
|
12
|
+
}): Promise<types.StatusResponse>;
|
|
13
|
+
getCurrent(): Promise<types.SessionTokenResponse>;
|
|
14
|
+
getByID(params: {
|
|
15
|
+
id: string;
|
|
16
|
+
}): Promise<types.SessionTokenResponse>;
|
|
17
|
+
revokeAll(request: types.RevokeAllRequest): Promise<types.RevokeResponse>;
|
|
18
|
+
revokeOthers(): Promise<types.RevokeResponse>;
|
|
19
|
+
refresh(): Promise<types.SessionTokenResponse>;
|
|
20
|
+
getStats(): Promise<types.SessionStatsResponse>;
|
|
11
21
|
}
|
|
12
22
|
export declare function multisessionClient(): MultisessionPlugin;
|
|
@@ -10,9 +10,11 @@ class MultisessionPlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async list() {
|
|
13
|
+
async list(request) {
|
|
14
14
|
const path = '/list';
|
|
15
|
-
return this.client.request('GET', path
|
|
15
|
+
return this.client.request('GET', path, {
|
|
16
|
+
query: this.client.toQueryParams(request),
|
|
17
|
+
});
|
|
16
18
|
}
|
|
17
19
|
async setActive(request) {
|
|
18
20
|
const path = '/set-active';
|
|
@@ -20,10 +22,36 @@ class MultisessionPlugin {
|
|
|
20
22
|
body: request,
|
|
21
23
|
});
|
|
22
24
|
}
|
|
23
|
-
async delete() {
|
|
24
|
-
const path =
|
|
25
|
+
async delete(params) {
|
|
26
|
+
const path = `/delete/${params.id}`;
|
|
27
|
+
return this.client.request('POST', path);
|
|
28
|
+
}
|
|
29
|
+
async getCurrent() {
|
|
30
|
+
const path = '/current';
|
|
31
|
+
return this.client.request('GET', path);
|
|
32
|
+
}
|
|
33
|
+
async getByID(params) {
|
|
34
|
+
const path = `/${params.id}`;
|
|
35
|
+
return this.client.request('GET', path);
|
|
36
|
+
}
|
|
37
|
+
async revokeAll(request) {
|
|
38
|
+
const path = '/revoke-all';
|
|
39
|
+
return this.client.request('POST', path, {
|
|
40
|
+
body: request,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async revokeOthers() {
|
|
44
|
+
const path = '/revoke-others';
|
|
25
45
|
return this.client.request('POST', path);
|
|
26
46
|
}
|
|
47
|
+
async refresh() {
|
|
48
|
+
const path = '/refresh';
|
|
49
|
+
return this.client.request('POST', path);
|
|
50
|
+
}
|
|
51
|
+
async getStats() {
|
|
52
|
+
const path = '/stats';
|
|
53
|
+
return this.client.request('GET', path);
|
|
54
|
+
}
|
|
27
55
|
}
|
|
28
56
|
exports.MultisessionPlugin = MultisessionPlugin;
|
|
29
57
|
function multisessionClient() {
|
|
@@ -5,20 +5,36 @@ export declare class NotificationPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "notification";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
previewTemplate(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
previewTemplate(params: {
|
|
9
|
+
id: string;
|
|
10
|
+
}, request: types.PreviewTemplate_req): Promise<types.NotificationPreviewResponse>;
|
|
11
|
+
createTemplate(request: types.CreateTemplateRequest): Promise<types.NotificationTemplateResponse>;
|
|
12
|
+
getTemplate(params: {
|
|
13
|
+
id: string;
|
|
14
|
+
}): Promise<types.NotificationTemplateResponse>;
|
|
15
|
+
listTemplates(): Promise<types.NotificationTemplateListResponse>;
|
|
16
|
+
updateTemplate(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}, request: types.UpdateTemplateRequest): Promise<types.NotificationTemplateResponse>;
|
|
19
|
+
deleteTemplate(params: {
|
|
20
|
+
id: string;
|
|
21
|
+
}): Promise<types.NotificationStatusResponse>;
|
|
22
|
+
resetTemplate(params: {
|
|
23
|
+
id: string;
|
|
24
|
+
}): Promise<types.NotificationStatusResponse>;
|
|
25
|
+
resetAllTemplates(): Promise<types.NotificationStatusResponse>;
|
|
26
|
+
getTemplateDefaults(): Promise<types.NotificationTemplateListResponse>;
|
|
27
|
+
renderTemplate(request: types.RenderTemplate_req): Promise<types.NotificationPreviewResponse>;
|
|
28
|
+
sendNotification(request: types.SendRequest): Promise<types.NotificationResponse>;
|
|
29
|
+
getNotification(params: {
|
|
30
|
+
id: string;
|
|
31
|
+
}): Promise<types.NotificationResponse>;
|
|
32
|
+
listNotifications(): Promise<types.NotificationListResponse>;
|
|
33
|
+
resendNotification(params: {
|
|
34
|
+
id: string;
|
|
35
|
+
}): Promise<types.NotificationResponse>;
|
|
36
|
+
handleWebhook(params: {
|
|
37
|
+
provider: string;
|
|
38
|
+
}): Promise<types.NotificationWebhookResponse>;
|
|
23
39
|
}
|
|
24
40
|
export declare function notificationClient(): NotificationPlugin;
|
|
@@ -10,34 +10,38 @@ class NotificationPlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async previewTemplate(request) {
|
|
14
|
-
const path =
|
|
13
|
+
async previewTemplate(params, request) {
|
|
14
|
+
const path = `/${params.id}/preview`;
|
|
15
15
|
return this.client.request('POST', path, {
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
async createTemplate() {
|
|
19
|
+
async createTemplate(request) {
|
|
20
20
|
const path = '/createtemplate';
|
|
21
|
-
return this.client.request('POST', path
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
22
24
|
}
|
|
23
|
-
async getTemplate() {
|
|
24
|
-
const path =
|
|
25
|
+
async getTemplate(params) {
|
|
26
|
+
const path = `/${params.id}`;
|
|
25
27
|
return this.client.request('GET', path);
|
|
26
28
|
}
|
|
27
29
|
async listTemplates() {
|
|
28
30
|
const path = '/listtemplates';
|
|
29
31
|
return this.client.request('GET', path);
|
|
30
32
|
}
|
|
31
|
-
async updateTemplate() {
|
|
32
|
-
const path =
|
|
33
|
-
return this.client.request('PUT', path
|
|
33
|
+
async updateTemplate(params, request) {
|
|
34
|
+
const path = `/${params.id}`;
|
|
35
|
+
return this.client.request('PUT', path, {
|
|
36
|
+
body: request,
|
|
37
|
+
});
|
|
34
38
|
}
|
|
35
|
-
async deleteTemplate() {
|
|
36
|
-
const path =
|
|
39
|
+
async deleteTemplate(params) {
|
|
40
|
+
const path = `/${params.id}`;
|
|
37
41
|
return this.client.request('DELETE', path);
|
|
38
42
|
}
|
|
39
|
-
async resetTemplate() {
|
|
40
|
-
const path =
|
|
43
|
+
async resetTemplate(params) {
|
|
44
|
+
const path = `/${params.id}/reset`;
|
|
41
45
|
return this.client.request('POST', path);
|
|
42
46
|
}
|
|
43
47
|
async resetAllTemplates() {
|
|
@@ -54,24 +58,26 @@ class NotificationPlugin {
|
|
|
54
58
|
body: request,
|
|
55
59
|
});
|
|
56
60
|
}
|
|
57
|
-
async sendNotification() {
|
|
61
|
+
async sendNotification(request) {
|
|
58
62
|
const path = '/send';
|
|
59
|
-
return this.client.request('POST', path
|
|
63
|
+
return this.client.request('POST', path, {
|
|
64
|
+
body: request,
|
|
65
|
+
});
|
|
60
66
|
}
|
|
61
|
-
async getNotification() {
|
|
62
|
-
const path =
|
|
67
|
+
async getNotification(params) {
|
|
68
|
+
const path = `/${params.id}`;
|
|
63
69
|
return this.client.request('GET', path);
|
|
64
70
|
}
|
|
65
71
|
async listNotifications() {
|
|
66
72
|
const path = '/listnotifications';
|
|
67
73
|
return this.client.request('GET', path);
|
|
68
74
|
}
|
|
69
|
-
async resendNotification() {
|
|
70
|
-
const path =
|
|
75
|
+
async resendNotification(params) {
|
|
76
|
+
const path = `/${params.id}/resend`;
|
|
71
77
|
return this.client.request('POST', path);
|
|
72
78
|
}
|
|
73
|
-
async handleWebhook() {
|
|
74
|
-
const path =
|
|
79
|
+
async handleWebhook(params) {
|
|
80
|
+
const path = `/notifications/webhook/${params.provider}`;
|
|
75
81
|
return this.client.request('POST', path);
|
|
76
82
|
}
|
|
77
83
|
}
|
|
@@ -5,18 +5,24 @@ export declare class OidcproviderPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "oidcprovider";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
registerClient(request: types.ClientRegistrationRequest): Promise<
|
|
9
|
-
listClients(): Promise<
|
|
10
|
-
getClient(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
registerClient(request: types.ClientRegistrationRequest): Promise<types.ClientRegistrationResponse>;
|
|
9
|
+
listClients(): Promise<types.ClientsListResponse>;
|
|
10
|
+
getClient(params: {
|
|
11
|
+
clientId: string;
|
|
12
|
+
}): Promise<types.ClientDetailsResponse>;
|
|
13
|
+
updateClient(params: {
|
|
14
|
+
clientId: string;
|
|
15
|
+
}, request: types.ClientUpdateRequest): Promise<types.ClientDetailsResponse>;
|
|
16
|
+
deleteClient(params: {
|
|
17
|
+
clientId: string;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
discovery(): Promise<types.DiscoveryResponse>;
|
|
20
|
+
jWKS(): Promise<types.JWKSResponse>;
|
|
15
21
|
authorize(): Promise<void>;
|
|
16
|
-
handleConsent(): Promise<void>;
|
|
17
|
-
token(request: types.TokenRequest): Promise<
|
|
18
|
-
userInfo(): Promise<
|
|
19
|
-
introspectToken(): Promise<
|
|
20
|
-
revokeToken(): Promise<types.StatusResponse>;
|
|
22
|
+
handleConsent(request: types.ConsentRequest): Promise<void>;
|
|
23
|
+
token(request: types.TokenRequest): Promise<types.TokenResponse>;
|
|
24
|
+
userInfo(): Promise<types.UserInfoResponse>;
|
|
25
|
+
introspectToken(request: types.TokenIntrospectionRequest): Promise<types.TokenIntrospectionResponse>;
|
|
26
|
+
revokeToken(request: types.TokenRevocationRequest): Promise<types.StatusResponse>;
|
|
21
27
|
}
|
|
22
28
|
export declare function oidcproviderClient(): OidcproviderPlugin;
|
|
@@ -20,18 +20,18 @@ class OidcproviderPlugin {
|
|
|
20
20
|
const path = '/listclients';
|
|
21
21
|
return this.client.request('GET', path);
|
|
22
22
|
}
|
|
23
|
-
async getClient() {
|
|
24
|
-
const path =
|
|
23
|
+
async getClient(params) {
|
|
24
|
+
const path = `/${params.clientId}`;
|
|
25
25
|
return this.client.request('GET', path);
|
|
26
26
|
}
|
|
27
|
-
async updateClient(request) {
|
|
28
|
-
const path =
|
|
27
|
+
async updateClient(params, request) {
|
|
28
|
+
const path = `/${params.clientId}`;
|
|
29
29
|
return this.client.request('PUT', path, {
|
|
30
30
|
body: request,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
async deleteClient() {
|
|
34
|
-
const path =
|
|
33
|
+
async deleteClient(params) {
|
|
34
|
+
const path = `/${params.clientId}`;
|
|
35
35
|
return this.client.request('DELETE', path);
|
|
36
36
|
}
|
|
37
37
|
async discovery() {
|
|
@@ -46,9 +46,11 @@ class OidcproviderPlugin {
|
|
|
46
46
|
const path = '/authorize';
|
|
47
47
|
return this.client.request('GET', path);
|
|
48
48
|
}
|
|
49
|
-
async handleConsent() {
|
|
49
|
+
async handleConsent(request) {
|
|
50
50
|
const path = '/consent';
|
|
51
|
-
return this.client.request('POST', path
|
|
51
|
+
return this.client.request('POST', path, {
|
|
52
|
+
body: request,
|
|
53
|
+
});
|
|
52
54
|
}
|
|
53
55
|
async token(request) {
|
|
54
56
|
const path = '/token';
|
|
@@ -60,13 +62,17 @@ class OidcproviderPlugin {
|
|
|
60
62
|
const path = '/userinfo';
|
|
61
63
|
return this.client.request('GET', path);
|
|
62
64
|
}
|
|
63
|
-
async introspectToken() {
|
|
65
|
+
async introspectToken(request) {
|
|
64
66
|
const path = '/introspect';
|
|
65
|
-
return this.client.request('POST', path
|
|
67
|
+
return this.client.request('POST', path, {
|
|
68
|
+
body: request,
|
|
69
|
+
});
|
|
66
70
|
}
|
|
67
|
-
async revokeToken() {
|
|
71
|
+
async revokeToken(request) {
|
|
68
72
|
const path = '/revoke';
|
|
69
|
-
return this.client.request('POST', path
|
|
73
|
+
return this.client.request('POST', path, {
|
|
74
|
+
body: request,
|
|
75
|
+
});
|
|
70
76
|
}
|
|
71
77
|
}
|
|
72
78
|
exports.OidcproviderPlugin = OidcproviderPlugin;
|
|
@@ -5,21 +5,41 @@ export declare class OrganizationPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "organization";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
createOrganization(): Promise<
|
|
9
|
-
updateOrganization(
|
|
10
|
-
|
|
8
|
+
createOrganization(): Promise<types.Organization>;
|
|
9
|
+
updateOrganization(params: {
|
|
10
|
+
id: string;
|
|
11
|
+
}): Promise<types.Organization>;
|
|
12
|
+
deleteOrganization(params: {
|
|
13
|
+
id: string;
|
|
14
|
+
}): Promise<void>;
|
|
11
15
|
inviteMember(): Promise<void>;
|
|
12
|
-
removeMember(
|
|
16
|
+
removeMember(params: {
|
|
17
|
+
memberId: string;
|
|
18
|
+
}): Promise<void>;
|
|
13
19
|
createTeam(): Promise<void>;
|
|
14
|
-
updateTeam(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
updateTeam(params: {
|
|
21
|
+
teamId: string;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
deleteTeam(params: {
|
|
24
|
+
teamId: string;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
getOrganization(params: {
|
|
27
|
+
id: string;
|
|
28
|
+
}): Promise<types.Organization>;
|
|
29
|
+
listOrganizations(): Promise<types.Organization>;
|
|
30
|
+
getOrganizationBySlug(params: {
|
|
31
|
+
slug: string;
|
|
32
|
+
}): Promise<types.Organization>;
|
|
19
33
|
listMembers(): Promise<void>;
|
|
20
|
-
updateMember(
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
updateMember(params: {
|
|
35
|
+
memberId: string;
|
|
36
|
+
}): Promise<void>;
|
|
37
|
+
acceptInvitation(params: {
|
|
38
|
+
token: string;
|
|
39
|
+
}): Promise<void>;
|
|
40
|
+
declineInvitation(params: {
|
|
41
|
+
token: string;
|
|
42
|
+
}): Promise<types.StatusResponse>;
|
|
23
43
|
listTeams(): Promise<void>;
|
|
24
44
|
}
|
|
25
45
|
export declare function organizationClient(): OrganizationPlugin;
|