@authsome/client 0.0.4 → 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 +49 -45
- package/dist/client.js +35 -21
- package/dist/index.d.ts +21 -21
- package/dist/index.js +65 -65
- package/dist/plugins/admin.d.ts +5 -5
- package/dist/plugins/admin.js +10 -20
- package/dist/plugins/anonymous.d.ts +1 -1
- package/dist/plugins/anonymous.js +4 -2
- package/dist/plugins/apikey.d.ts +7 -7
- package/dist/plugins/apikey.js +28 -14
- package/dist/plugins/backupauth.d.ts +28 -28
- package/dist/plugins/cms.d.ts +11 -11
- package/dist/plugins/cms.js +38 -28
- package/dist/plugins/compliance.d.ts +33 -33
- package/dist/plugins/compliance.js +4 -2
- package/dist/plugins/consent.d.ts +18 -18
- package/dist/plugins/emailverification.d.ts +2 -2
- package/dist/plugins/emailverification.js +4 -2
- package/dist/plugins/idverification.d.ts +11 -11
- package/dist/plugins/impersonation.d.ts +6 -6
- package/dist/plugins/impersonation.js +4 -8
- package/dist/plugins/jwt.d.ts +6 -5
- package/dist/plugins/jwt.js +16 -8
- package/dist/plugins/mfa.d.ts +9 -9
- package/dist/plugins/mfa.js +4 -8
- package/dist/plugins/multiapp.d.ts +19 -19
- package/dist/plugins/multiapp.js +16 -8
- package/dist/plugins/multisession.d.ts +5 -5
- package/dist/plugins/multisession.js +4 -2
- package/dist/plugins/notification.d.ts +15 -15
- package/dist/plugins/notification.js +12 -6
- package/dist/plugins/oidcprovider.d.ts +11 -11
- package/dist/plugins/oidcprovider.js +12 -6
- package/dist/plugins/organization.d.ts +5 -5
- package/dist/plugins/secrets.d.ts +10 -10
- package/dist/plugins/secrets.js +32 -16
- package/dist/plugins/social.js +1 -1
- package/dist/plugins/stepup.d.ts +13 -13
- 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 +3336 -2788
- package/package.json +1 -1
- package/src/client.ts +60 -45
- package/src/index.ts +21 -21
- package/src/plugins/admin.ts +10 -20
- package/src/plugins/anonymous.ts +4 -2
- package/src/plugins/apikey.ts +28 -14
- package/src/plugins/backupauth.ts +56 -56
- package/src/plugins/cms.ts +38 -28
- package/src/plugins/compliance.ts +68 -66
- package/src/plugins/consent.ts +36 -36
- package/src/plugins/emailverification.ts +6 -4
- package/src/plugins/idverification.ts +22 -22
- package/src/plugins/impersonation.ts +12 -16
- package/src/plugins/jwt.ts +18 -10
- package/src/plugins/mfa.ts +18 -22
- package/src/plugins/multiapp.ts +46 -38
- package/src/plugins/multisession.ts +11 -9
- package/src/plugins/notification.ts +36 -30
- package/src/plugins/oidcprovider.ts +28 -22
- package/src/plugins/organization.ts +10 -10
- package/src/plugins/secrets.ts +36 -20
- package/src/plugins/social.ts +1 -1
- package/src/plugins/stepup.ts +26 -26
- package/src/plugins/twofa.ts +12 -24
- package/src/plugins/username.ts +8 -4
- package/src/types.ts +3581 -2856
package/dist/plugins/jwt.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ClientPlugin } from '../plugin';
|
|
2
2
|
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
3
4
|
export declare class JwtPlugin implements ClientPlugin {
|
|
4
5
|
readonly id = "jwt";
|
|
5
6
|
private client;
|
|
6
7
|
init(client: AuthsomeClient): void;
|
|
7
|
-
createJWTKey(): Promise<
|
|
8
|
-
listJWTKeys(): Promise<
|
|
9
|
-
getJWKS(): Promise<
|
|
10
|
-
generateToken(): Promise<
|
|
11
|
-
verifyToken(): Promise<
|
|
8
|
+
createJWTKey(request: types.CreateJWTKeyRequest): Promise<types.JWTKey>;
|
|
9
|
+
listJWTKeys(request?: types.ListJWTKeysRequest): Promise<types.ListJWTKeysResponse>;
|
|
10
|
+
getJWKS(): Promise<types.JWKSResponse>;
|
|
11
|
+
generateToken(request: types.GenerateTokenRequest): Promise<types.GenerateTokenResponse>;
|
|
12
|
+
verifyToken(request: types.VerifyTokenRequest): Promise<types.VerifyTokenResponse>;
|
|
12
13
|
}
|
|
13
14
|
export declare function jwtClient(): JwtPlugin;
|
package/dist/plugins/jwt.js
CHANGED
|
@@ -10,25 +10,33 @@ class JwtPlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async createJWTKey() {
|
|
13
|
+
async createJWTKey(request) {
|
|
14
14
|
const path = '/createjwtkey';
|
|
15
|
-
return this.client.request('POST', path
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
16
18
|
}
|
|
17
|
-
async listJWTKeys() {
|
|
19
|
+
async listJWTKeys(request) {
|
|
18
20
|
const path = '/listjwtkeys';
|
|
19
|
-
return this.client.request('GET', path
|
|
21
|
+
return this.client.request('GET', path, {
|
|
22
|
+
query: this.client.toQueryParams(request),
|
|
23
|
+
});
|
|
20
24
|
}
|
|
21
25
|
async getJWKS() {
|
|
22
26
|
const path = '/jwks';
|
|
23
27
|
return this.client.request('GET', path);
|
|
24
28
|
}
|
|
25
|
-
async generateToken() {
|
|
29
|
+
async generateToken(request) {
|
|
26
30
|
const path = '/generate';
|
|
27
|
-
return this.client.request('POST', path
|
|
31
|
+
return this.client.request('POST', path, {
|
|
32
|
+
body: request,
|
|
33
|
+
});
|
|
28
34
|
}
|
|
29
|
-
async verifyToken() {
|
|
35
|
+
async verifyToken(request) {
|
|
30
36
|
const path = '/verify';
|
|
31
|
-
return this.client.request('POST', path
|
|
37
|
+
return this.client.request('POST', path, {
|
|
38
|
+
body: request,
|
|
39
|
+
});
|
|
32
40
|
}
|
|
33
41
|
}
|
|
34
42
|
exports.JwtPlugin = JwtPlugin;
|
package/dist/plugins/mfa.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare class MfaPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "mfa";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
enrollFactor(request: types.FactorEnrollmentRequest): Promise<
|
|
8
|
+
enrollFactor(request: types.FactorEnrollmentRequest): Promise<types.FactorEnrollmentResponse>;
|
|
9
9
|
listFactors(): Promise<types.FactorsResponse>;
|
|
10
10
|
getFactor(params: {
|
|
11
11
|
id: string;
|
|
12
|
-
}): Promise<
|
|
12
|
+
}): Promise<types.Factor>;
|
|
13
13
|
updateFactor(params: {
|
|
14
14
|
id: string;
|
|
15
15
|
}): Promise<types.MessageResponse>;
|
|
@@ -18,22 +18,22 @@ export declare class MfaPlugin implements ClientPlugin {
|
|
|
18
18
|
}): Promise<types.MessageResponse>;
|
|
19
19
|
verifyFactor(params: {
|
|
20
20
|
id: string;
|
|
21
|
-
}
|
|
22
|
-
initiateChallenge(request: types.ChallengeRequest): Promise<
|
|
23
|
-
verifyChallenge(request: types.VerificationRequest): Promise<
|
|
21
|
+
}): Promise<types.MessageResponse>;
|
|
22
|
+
initiateChallenge(request: types.ChallengeRequest): Promise<types.ChallengeResponse>;
|
|
23
|
+
verifyChallenge(request: types.VerificationRequest): Promise<types.VerificationResponse>;
|
|
24
24
|
getChallengeStatus(params: {
|
|
25
25
|
id: string;
|
|
26
|
-
}): Promise<
|
|
26
|
+
}): Promise<types.ChallengeStatusResponse>;
|
|
27
27
|
trustDevice(request: types.DeviceInfo): Promise<types.MessageResponse>;
|
|
28
28
|
listTrustedDevices(): Promise<types.DevicesResponse>;
|
|
29
29
|
revokeTrustedDevice(params: {
|
|
30
30
|
id: string;
|
|
31
31
|
}): Promise<types.MessageResponse>;
|
|
32
|
-
getStatus(): Promise<
|
|
32
|
+
getStatus(): Promise<types.MFAStatus>;
|
|
33
33
|
getPolicy(): Promise<types.MFAConfigResponse>;
|
|
34
|
-
adminUpdatePolicy(
|
|
34
|
+
adminUpdatePolicy(): Promise<types.StatusResponse>;
|
|
35
35
|
adminResetUserMFA(params: {
|
|
36
36
|
id: string;
|
|
37
|
-
}): Promise<
|
|
37
|
+
}): Promise<types.MessageResponse>;
|
|
38
38
|
}
|
|
39
39
|
export declare function mfaClient(): MfaPlugin;
|
package/dist/plugins/mfa.js
CHANGED
|
@@ -32,11 +32,9 @@ class MfaPlugin {
|
|
|
32
32
|
const path = `/mfa/factors/${params.id}`;
|
|
33
33
|
return this.client.request('DELETE', path);
|
|
34
34
|
}
|
|
35
|
-
async verifyFactor(params
|
|
35
|
+
async verifyFactor(params) {
|
|
36
36
|
const path = `/mfa/factors/${params.id}/verify`;
|
|
37
|
-
return this.client.request('POST', path
|
|
38
|
-
body: request,
|
|
39
|
-
});
|
|
37
|
+
return this.client.request('POST', path);
|
|
40
38
|
}
|
|
41
39
|
async initiateChallenge(request) {
|
|
42
40
|
const path = '/mfa/challenge';
|
|
@@ -76,11 +74,9 @@ 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
81
|
async adminResetUserMFA(params) {
|
|
86
82
|
const path = `/mfa/users/${params.id}/reset`;
|
|
@@ -5,51 +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<
|
|
8
|
+
createApp(): Promise<types.App>;
|
|
9
9
|
getApp(params: {
|
|
10
10
|
appId: string;
|
|
11
|
-
}): Promise<
|
|
11
|
+
}): Promise<types.App>;
|
|
12
12
|
updateApp(params: {
|
|
13
13
|
appId: string;
|
|
14
|
-
}): Promise<
|
|
14
|
+
}): Promise<types.App>;
|
|
15
15
|
deleteApp(params: {
|
|
16
16
|
appId: string;
|
|
17
|
-
}): Promise<
|
|
18
|
-
listApps(): Promise<
|
|
17
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
18
|
+
listApps(): Promise<types.AppsListResponse>;
|
|
19
19
|
removeMember(params: {
|
|
20
20
|
memberId: string;
|
|
21
|
-
}): Promise<
|
|
22
|
-
listMembers(): Promise<
|
|
23
|
-
inviteMember(): Promise<
|
|
21
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
22
|
+
listMembers(): Promise<types.MembersListResponse>;
|
|
23
|
+
inviteMember(request: types.InviteMemberRequest): Promise<types.Invitation>;
|
|
24
24
|
updateMember(params: {
|
|
25
25
|
memberId: string;
|
|
26
|
-
}): Promise<
|
|
26
|
+
}, request: types.UpdateMemberRequest): Promise<types.Member>;
|
|
27
27
|
getInvitation(params: {
|
|
28
28
|
token: string;
|
|
29
|
-
}): Promise<
|
|
29
|
+
}): Promise<types.Invitation>;
|
|
30
30
|
acceptInvitation(params: {
|
|
31
31
|
token: string;
|
|
32
|
-
}): Promise<
|
|
32
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
33
33
|
declineInvitation(params: {
|
|
34
34
|
token: string;
|
|
35
|
-
}): Promise<
|
|
36
|
-
createTeam(): Promise<
|
|
35
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
36
|
+
createTeam(request: types.CreateTeamRequest): Promise<types.Team>;
|
|
37
37
|
getTeam(params: {
|
|
38
38
|
teamId: string;
|
|
39
|
-
}): Promise<
|
|
39
|
+
}): Promise<types.Team>;
|
|
40
40
|
updateTeam(params: {
|
|
41
41
|
teamId: string;
|
|
42
|
-
}): Promise<
|
|
42
|
+
}, request: types.UpdateTeamRequest): Promise<types.Team>;
|
|
43
43
|
deleteTeam(params: {
|
|
44
44
|
teamId: string;
|
|
45
|
-
}): Promise<
|
|
46
|
-
listTeams(): Promise<
|
|
45
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
46
|
+
listTeams(): Promise<types.TeamsListResponse>;
|
|
47
47
|
addTeamMember(params: {
|
|
48
48
|
teamId: string;
|
|
49
|
-
}, request: types.AddTeamMember_req): Promise<
|
|
49
|
+
}, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse>;
|
|
50
50
|
removeTeamMember(params: {
|
|
51
51
|
teamId: string;
|
|
52
52
|
memberId: string;
|
|
53
|
-
}): Promise<
|
|
53
|
+
}): Promise<types.MultitenancyStatusResponse>;
|
|
54
54
|
}
|
|
55
55
|
export declare function multiappClient(): MultiappPlugin;
|
package/dist/plugins/multiapp.js
CHANGED
|
@@ -38,13 +38,17 @@ class MultiappPlugin {
|
|
|
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(params) {
|
|
47
|
+
async updateMember(params, request) {
|
|
46
48
|
const path = `/${params.memberId}`;
|
|
47
|
-
return this.client.request('PUT', path
|
|
49
|
+
return this.client.request('PUT', path, {
|
|
50
|
+
body: request,
|
|
51
|
+
});
|
|
48
52
|
}
|
|
49
53
|
async getInvitation(params) {
|
|
50
54
|
const path = `/${params.token}`;
|
|
@@ -58,17 +62,21 @@ class MultiappPlugin {
|
|
|
58
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
71
|
async getTeam(params) {
|
|
66
72
|
const path = `/${params.teamId}`;
|
|
67
73
|
return this.client.request('GET', path);
|
|
68
74
|
}
|
|
69
|
-
async updateTeam(params) {
|
|
75
|
+
async updateTeam(params, request) {
|
|
70
76
|
const path = `/${params.teamId}`;
|
|
71
|
-
return this.client.request('PUT', path
|
|
77
|
+
return this.client.request('PUT', path, {
|
|
78
|
+
body: request,
|
|
79
|
+
});
|
|
72
80
|
}
|
|
73
81
|
async deleteTeam(params) {
|
|
74
82
|
const path = `/${params.teamId}`;
|
|
@@ -5,8 +5,8 @@ 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.
|
|
8
|
+
list(request?: types.ListSessionsRequest): Promise<types.ListSessionsResponse>;
|
|
9
|
+
setActive(request: types.SetActiveRequest): Promise<types.SessionTokenResponse>;
|
|
10
10
|
delete(params: {
|
|
11
11
|
id: string;
|
|
12
12
|
}): Promise<types.StatusResponse>;
|
|
@@ -14,9 +14,9 @@ export declare class MultisessionPlugin implements ClientPlugin {
|
|
|
14
14
|
getByID(params: {
|
|
15
15
|
id: string;
|
|
16
16
|
}): Promise<types.SessionTokenResponse>;
|
|
17
|
-
revokeAll(request: types.
|
|
18
|
-
revokeOthers(): Promise<
|
|
17
|
+
revokeAll(request: types.RevokeAllRequest): Promise<types.RevokeResponse>;
|
|
18
|
+
revokeOthers(): Promise<types.RevokeResponse>;
|
|
19
19
|
refresh(): Promise<types.SessionTokenResponse>;
|
|
20
|
-
getStats(): Promise<
|
|
20
|
+
getStats(): Promise<types.SessionStatsResponse>;
|
|
21
21
|
}
|
|
22
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';
|
|
@@ -7,34 +7,34 @@ export declare class NotificationPlugin implements ClientPlugin {
|
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
8
|
previewTemplate(params: {
|
|
9
9
|
id: string;
|
|
10
|
-
}, request: types.PreviewTemplate_req): Promise<
|
|
11
|
-
createTemplate(): Promise<types.NotificationTemplateResponse>;
|
|
10
|
+
}, request: types.PreviewTemplate_req): Promise<types.NotificationPreviewResponse>;
|
|
11
|
+
createTemplate(request: types.CreateTemplateRequest): Promise<types.NotificationTemplateResponse>;
|
|
12
12
|
getTemplate(params: {
|
|
13
13
|
id: string;
|
|
14
|
-
}): Promise<
|
|
15
|
-
listTemplates(): Promise<
|
|
14
|
+
}): Promise<types.NotificationTemplateResponse>;
|
|
15
|
+
listTemplates(): Promise<types.NotificationTemplateListResponse>;
|
|
16
16
|
updateTemplate(params: {
|
|
17
17
|
id: string;
|
|
18
|
-
}): Promise<types.
|
|
18
|
+
}, request: types.UpdateTemplateRequest): Promise<types.NotificationTemplateResponse>;
|
|
19
19
|
deleteTemplate(params: {
|
|
20
20
|
id: string;
|
|
21
|
-
}): Promise<types.
|
|
21
|
+
}): Promise<types.NotificationStatusResponse>;
|
|
22
22
|
resetTemplate(params: {
|
|
23
23
|
id: string;
|
|
24
|
-
}): Promise<types.
|
|
25
|
-
resetAllTemplates(): Promise<types.
|
|
26
|
-
getTemplateDefaults(): Promise<
|
|
27
|
-
renderTemplate(request: types.RenderTemplate_req): Promise<
|
|
28
|
-
sendNotification(): Promise<
|
|
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
29
|
getNotification(params: {
|
|
30
30
|
id: string;
|
|
31
|
-
}): Promise<
|
|
32
|
-
listNotifications(): Promise<
|
|
31
|
+
}): Promise<types.NotificationResponse>;
|
|
32
|
+
listNotifications(): Promise<types.NotificationListResponse>;
|
|
33
33
|
resendNotification(params: {
|
|
34
34
|
id: string;
|
|
35
|
-
}): Promise<
|
|
35
|
+
}): Promise<types.NotificationResponse>;
|
|
36
36
|
handleWebhook(params: {
|
|
37
37
|
provider: string;
|
|
38
|
-
}): Promise<types.
|
|
38
|
+
}): Promise<types.NotificationWebhookResponse>;
|
|
39
39
|
}
|
|
40
40
|
export declare function notificationClient(): NotificationPlugin;
|
|
@@ -16,9 +16,11 @@ class NotificationPlugin {
|
|
|
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
25
|
async getTemplate(params) {
|
|
24
26
|
const path = `/${params.id}`;
|
|
@@ -28,9 +30,11 @@ class NotificationPlugin {
|
|
|
28
30
|
const path = '/listtemplates';
|
|
29
31
|
return this.client.request('GET', path);
|
|
30
32
|
}
|
|
31
|
-
async updateTemplate(params) {
|
|
33
|
+
async updateTemplate(params, request) {
|
|
32
34
|
const path = `/${params.id}`;
|
|
33
|
-
return this.client.request('PUT', path
|
|
35
|
+
return this.client.request('PUT', path, {
|
|
36
|
+
body: request,
|
|
37
|
+
});
|
|
34
38
|
}
|
|
35
39
|
async deleteTemplate(params) {
|
|
36
40
|
const path = `/${params.id}`;
|
|
@@ -54,9 +58,11 @@ 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
67
|
async getNotification(params) {
|
|
62
68
|
const path = `/${params.id}`;
|
|
@@ -5,24 +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<
|
|
8
|
+
registerClient(request: types.ClientRegistrationRequest): Promise<types.ClientRegistrationResponse>;
|
|
9
|
+
listClients(): Promise<types.ClientsListResponse>;
|
|
10
10
|
getClient(params: {
|
|
11
11
|
clientId: string;
|
|
12
|
-
}): Promise<
|
|
12
|
+
}): Promise<types.ClientDetailsResponse>;
|
|
13
13
|
updateClient(params: {
|
|
14
14
|
clientId: string;
|
|
15
|
-
}, request: types.ClientUpdateRequest): Promise<
|
|
15
|
+
}, request: types.ClientUpdateRequest): Promise<types.ClientDetailsResponse>;
|
|
16
16
|
deleteClient(params: {
|
|
17
17
|
clientId: string;
|
|
18
18
|
}): Promise<void>;
|
|
19
|
-
discovery(): Promise<
|
|
20
|
-
jWKS(): Promise<
|
|
19
|
+
discovery(): Promise<types.DiscoveryResponse>;
|
|
20
|
+
jWKS(): Promise<types.JWKSResponse>;
|
|
21
21
|
authorize(): Promise<void>;
|
|
22
|
-
handleConsent(): Promise<void>;
|
|
23
|
-
token(request: types.TokenRequest): Promise<
|
|
24
|
-
userInfo(): Promise<
|
|
25
|
-
introspectToken(): Promise<
|
|
26
|
-
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>;
|
|
27
27
|
}
|
|
28
28
|
export declare function oidcproviderClient(): OidcproviderPlugin;
|
|
@@ -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,10 +5,10 @@ export declare class OrganizationPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "organization";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
createOrganization(): Promise<
|
|
8
|
+
createOrganization(): Promise<types.Organization>;
|
|
9
9
|
updateOrganization(params: {
|
|
10
10
|
id: string;
|
|
11
|
-
}): Promise<
|
|
11
|
+
}): Promise<types.Organization>;
|
|
12
12
|
deleteOrganization(params: {
|
|
13
13
|
id: string;
|
|
14
14
|
}): Promise<void>;
|
|
@@ -25,11 +25,11 @@ export declare class OrganizationPlugin implements ClientPlugin {
|
|
|
25
25
|
}): Promise<void>;
|
|
26
26
|
getOrganization(params: {
|
|
27
27
|
id: string;
|
|
28
|
-
}): Promise<
|
|
29
|
-
listOrganizations(): Promise<
|
|
28
|
+
}): Promise<types.Organization>;
|
|
29
|
+
listOrganizations(): Promise<types.Organization>;
|
|
30
30
|
getOrganizationBySlug(params: {
|
|
31
31
|
slug: string;
|
|
32
|
-
}): Promise<
|
|
32
|
+
}): Promise<types.Organization>;
|
|
33
33
|
listMembers(): Promise<void>;
|
|
34
34
|
updateMember(params: {
|
|
35
35
|
memberId: string;
|
|
@@ -5,29 +5,29 @@ export declare class SecretsPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "secrets";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
list(): Promise<types.ListSecretsResponse>;
|
|
9
|
-
create(): Promise<types.
|
|
8
|
+
list(request?: types.ListSecretsRequest): Promise<types.ListSecretsResponse>;
|
|
9
|
+
create(request: types.CreateSecretRequest): Promise<types.SecretDTO>;
|
|
10
10
|
get(params: {
|
|
11
11
|
id: string;
|
|
12
|
-
}): Promise<types.
|
|
12
|
+
}, request?: types.GetSecretRequest): Promise<types.SecretDTO>;
|
|
13
13
|
getValue(params: {
|
|
14
14
|
id: string;
|
|
15
|
-
}): Promise<types.RevealValueResponse>;
|
|
15
|
+
}, request?: types.GetValueRequest): Promise<types.RevealValueResponse>;
|
|
16
16
|
update(params: {
|
|
17
17
|
id: string;
|
|
18
|
-
}): Promise<types.
|
|
18
|
+
}, request: types.UpdateSecretRequest): Promise<types.SecretDTO>;
|
|
19
19
|
delete(params: {
|
|
20
20
|
id: string;
|
|
21
|
-
}): Promise<types.SuccessResponse>;
|
|
21
|
+
}, request?: types.DeleteSecretRequest): Promise<types.SuccessResponse>;
|
|
22
22
|
getByPath(): Promise<types.ErrorResponse>;
|
|
23
23
|
getVersions(params: {
|
|
24
24
|
id: string;
|
|
25
|
-
}): Promise<types.ListVersionsResponse>;
|
|
25
|
+
}, request?: types.GetVersionsRequest): Promise<types.ListVersionsResponse>;
|
|
26
26
|
rollback(params: {
|
|
27
27
|
id: string;
|
|
28
28
|
version: number;
|
|
29
|
-
}, request: types.
|
|
30
|
-
getStats(): Promise<
|
|
31
|
-
getTree(): Promise<
|
|
29
|
+
}, request: types.RollbackRequest): Promise<types.SecretDTO>;
|
|
30
|
+
getStats(): Promise<types.StatsDTO>;
|
|
31
|
+
getTree(request?: types.GetTreeRequest): Promise<types.SecretTreeNode>;
|
|
32
32
|
}
|
|
33
33
|
export declare function secretsClient(): SecretsPlugin;
|
package/dist/plugins/secrets.js
CHANGED
|
@@ -10,37 +10,51 @@ class SecretsPlugin {
|
|
|
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
|
-
async create() {
|
|
19
|
+
async create(request) {
|
|
18
20
|
const path = '/create';
|
|
19
|
-
return this.client.request('POST', path
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
20
24
|
}
|
|
21
|
-
async get(params) {
|
|
25
|
+
async get(params, request) {
|
|
22
26
|
const path = `/${params.id}`;
|
|
23
|
-
return this.client.request('GET', path
|
|
27
|
+
return this.client.request('GET', path, {
|
|
28
|
+
query: this.client.toQueryParams(request),
|
|
29
|
+
});
|
|
24
30
|
}
|
|
25
|
-
async getValue(params) {
|
|
31
|
+
async getValue(params, request) {
|
|
26
32
|
const path = `/${params.id}/value`;
|
|
27
|
-
return this.client.request('GET', path
|
|
33
|
+
return this.client.request('GET', path, {
|
|
34
|
+
query: this.client.toQueryParams(request),
|
|
35
|
+
});
|
|
28
36
|
}
|
|
29
|
-
async update(params) {
|
|
37
|
+
async update(params, request) {
|
|
30
38
|
const path = `/${params.id}`;
|
|
31
|
-
return this.client.request('PUT', path
|
|
39
|
+
return this.client.request('PUT', path, {
|
|
40
|
+
body: request,
|
|
41
|
+
});
|
|
32
42
|
}
|
|
33
|
-
async delete(params) {
|
|
43
|
+
async delete(params, request) {
|
|
34
44
|
const path = `/${params.id}`;
|
|
35
|
-
return this.client.request('DELETE', path
|
|
45
|
+
return this.client.request('DELETE', path, {
|
|
46
|
+
query: this.client.toQueryParams(request),
|
|
47
|
+
});
|
|
36
48
|
}
|
|
37
49
|
async getByPath() {
|
|
38
50
|
const path = '/path/*path';
|
|
39
51
|
return this.client.request('GET', path);
|
|
40
52
|
}
|
|
41
|
-
async getVersions(params) {
|
|
53
|
+
async getVersions(params, request) {
|
|
42
54
|
const path = `/${params.id}/versions`;
|
|
43
|
-
return this.client.request('GET', path
|
|
55
|
+
return this.client.request('GET', path, {
|
|
56
|
+
query: this.client.toQueryParams(request),
|
|
57
|
+
});
|
|
44
58
|
}
|
|
45
59
|
async rollback(params, request) {
|
|
46
60
|
const path = `/${params.id}/rollback/${params.version}`;
|
|
@@ -52,9 +66,11 @@ class SecretsPlugin {
|
|
|
52
66
|
const path = '/stats';
|
|
53
67
|
return this.client.request('GET', path);
|
|
54
68
|
}
|
|
55
|
-
async getTree() {
|
|
69
|
+
async getTree(request) {
|
|
56
70
|
const path = '/tree';
|
|
57
|
-
return this.client.request('GET', path
|
|
71
|
+
return this.client.request('GET', path, {
|
|
72
|
+
query: this.client.toQueryParams(request),
|
|
73
|
+
});
|
|
58
74
|
}
|
|
59
75
|
}
|
|
60
76
|
exports.SecretsPlugin = SecretsPlugin;
|
package/dist/plugins/social.js
CHANGED