@authsome/client 0.0.4 → 0.0.6
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 +41 -37
- package/dist/client.js +32 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +56 -56
- package/dist/plugins/admin.d.ts +5 -5
- package/dist/plugins/admin.js +21 -31
- 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 +41 -27
- package/dist/plugins/backupauth.d.ts +28 -28
- package/dist/plugins/backupauth.js +29 -29
- package/dist/plugins/cms.d.ts +11 -11
- package/dist/plugins/cms.js +67 -57
- 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/idverification.js +11 -11
- package/dist/plugins/impersonation.d.ts +6 -6
- package/dist/plugins/impersonation.js +11 -15
- package/dist/plugins/jwt.d.ts +6 -5
- package/dist/plugins/jwt.js +21 -13
- 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 +35 -27
- package/dist/plugins/multisession.d.ts +5 -5
- package/dist/plugins/multisession.js +13 -11
- 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 +25 -19
- package/dist/plugins/organization.d.ts +5 -5
- package/dist/plugins/organization.js +16 -16
- package/dist/plugins/passkey.js +7 -7
- package/dist/plugins/permissions.js +3 -3
- package/dist/plugins/secrets.d.ts +10 -10
- package/dist/plugins/secrets.js +43 -27
- package/dist/plugins/social.js +1 -1
- package/dist/plugins/sso.js +6 -6
- package/dist/plugins/stepup.d.ts +13 -13
- package/dist/plugins/stepup.js +14 -14
- 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/plugins/webhook.js +4 -4
- package/dist/types.d.ts +3316 -2791
- package/package.json +3 -3
- package/src/client.ts +52 -37
- package/src/index.ts +18 -18
- package/src/plugins/admin.ts +21 -31
- package/src/plugins/anonymous.ts +4 -2
- package/src/plugins/apikey.ts +35 -21
- package/src/plugins/backupauth.ts +85 -85
- package/src/plugins/cms.ts +67 -57
- 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 +33 -33
- package/src/plugins/impersonation.ts +18 -22
- package/src/plugins/jwt.ts +23 -15
- package/src/plugins/mfa.ts +18 -22
- package/src/plugins/multiapp.ts +65 -57
- package/src/plugins/multisession.ts +20 -18
- package/src/plugins/notification.ts +36 -30
- package/src/plugins/oidcprovider.ts +41 -35
- package/src/plugins/organization.ts +26 -26
- package/src/plugins/passkey.ts +7 -7
- package/src/plugins/permissions.ts +3 -3
- package/src/plugins/secrets.ts +47 -31
- package/src/plugins/social.ts +1 -1
- package/src/plugins/sso.ts +6 -6
- package/src/plugins/stepup.ts +40 -40
- package/src/plugins/twofa.ts +12 -24
- package/src/plugins/username.ts +8 -4
- package/src/plugins/webhook.ts +4 -4
- package/src/types.ts +3576 -2874
package/dist/plugins/multiapp.js
CHANGED
|
@@ -11,81 +11,89 @@ class MultiappPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async createApp() {
|
|
14
|
-
const path = '/createapp';
|
|
14
|
+
const path = '/apps/createapp';
|
|
15
15
|
return this.client.request('POST', path);
|
|
16
16
|
}
|
|
17
17
|
async getApp(params) {
|
|
18
|
-
const path =
|
|
18
|
+
const path = `/apps/${params.appId}`;
|
|
19
19
|
return this.client.request('GET', path);
|
|
20
20
|
}
|
|
21
21
|
async updateApp(params) {
|
|
22
|
-
const path =
|
|
22
|
+
const path = `/apps/${params.appId}`;
|
|
23
23
|
return this.client.request('PUT', path);
|
|
24
24
|
}
|
|
25
25
|
async deleteApp(params) {
|
|
26
|
-
const path =
|
|
26
|
+
const path = `/apps/${params.appId}`;
|
|
27
27
|
return this.client.request('DELETE', path);
|
|
28
28
|
}
|
|
29
29
|
async listApps() {
|
|
30
|
-
const path = '/listapps';
|
|
30
|
+
const path = '/apps/listapps';
|
|
31
31
|
return this.client.request('GET', path);
|
|
32
32
|
}
|
|
33
33
|
async removeMember(params) {
|
|
34
|
-
const path =
|
|
34
|
+
const path = `/apps/${params.memberId}`;
|
|
35
35
|
return this.client.request('DELETE', path);
|
|
36
36
|
}
|
|
37
37
|
async listMembers() {
|
|
38
|
-
const path = '/listmembers';
|
|
38
|
+
const path = '/apps/listmembers';
|
|
39
39
|
return this.client.request('GET', path);
|
|
40
40
|
}
|
|
41
|
-
async inviteMember() {
|
|
42
|
-
const path = '/invite';
|
|
43
|
-
return this.client.request('POST', path
|
|
41
|
+
async inviteMember(request) {
|
|
42
|
+
const path = '/apps/invite';
|
|
43
|
+
return this.client.request('POST', path, {
|
|
44
|
+
body: request,
|
|
45
|
+
});
|
|
44
46
|
}
|
|
45
|
-
async updateMember(params) {
|
|
46
|
-
const path =
|
|
47
|
-
return this.client.request('PUT', path
|
|
47
|
+
async updateMember(params, request) {
|
|
48
|
+
const path = `/apps/${params.memberId}`;
|
|
49
|
+
return this.client.request('PUT', path, {
|
|
50
|
+
body: request,
|
|
51
|
+
});
|
|
48
52
|
}
|
|
49
53
|
async getInvitation(params) {
|
|
50
|
-
const path =
|
|
54
|
+
const path = `/apps/${params.token}`;
|
|
51
55
|
return this.client.request('GET', path);
|
|
52
56
|
}
|
|
53
57
|
async acceptInvitation(params) {
|
|
54
|
-
const path =
|
|
58
|
+
const path = `/apps/${params.token}/accept`;
|
|
55
59
|
return this.client.request('POST', path);
|
|
56
60
|
}
|
|
57
61
|
async declineInvitation(params) {
|
|
58
|
-
const path =
|
|
62
|
+
const path = `/apps/${params.token}/decline`;
|
|
59
63
|
return this.client.request('POST', path);
|
|
60
64
|
}
|
|
61
|
-
async createTeam() {
|
|
62
|
-
const path = '/createteam';
|
|
63
|
-
return this.client.request('POST', path
|
|
65
|
+
async createTeam(request) {
|
|
66
|
+
const path = '/apps/createteam';
|
|
67
|
+
return this.client.request('POST', path, {
|
|
68
|
+
body: request,
|
|
69
|
+
});
|
|
64
70
|
}
|
|
65
71
|
async getTeam(params) {
|
|
66
|
-
const path =
|
|
72
|
+
const path = `/apps/${params.teamId}`;
|
|
67
73
|
return this.client.request('GET', path);
|
|
68
74
|
}
|
|
69
|
-
async updateTeam(params) {
|
|
70
|
-
const path =
|
|
71
|
-
return this.client.request('PUT', path
|
|
75
|
+
async updateTeam(params, request) {
|
|
76
|
+
const path = `/apps/${params.teamId}`;
|
|
77
|
+
return this.client.request('PUT', path, {
|
|
78
|
+
body: request,
|
|
79
|
+
});
|
|
72
80
|
}
|
|
73
81
|
async deleteTeam(params) {
|
|
74
|
-
const path =
|
|
82
|
+
const path = `/apps/${params.teamId}`;
|
|
75
83
|
return this.client.request('DELETE', path);
|
|
76
84
|
}
|
|
77
85
|
async listTeams() {
|
|
78
|
-
const path = '/listteams';
|
|
86
|
+
const path = '/apps/listteams';
|
|
79
87
|
return this.client.request('GET', path);
|
|
80
88
|
}
|
|
81
89
|
async addTeamMember(params, request) {
|
|
82
|
-
const path =
|
|
90
|
+
const path = `/apps/${params.teamId}/members`;
|
|
83
91
|
return this.client.request('POST', path, {
|
|
84
92
|
body: request,
|
|
85
93
|
});
|
|
86
94
|
}
|
|
87
95
|
async removeTeamMember(params) {
|
|
88
|
-
const path =
|
|
96
|
+
const path = `/apps/${params.teamId}/members/${params.memberId}`;
|
|
89
97
|
return this.client.request('DELETE', path);
|
|
90
98
|
}
|
|
91
99
|
}
|
|
@@ -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,44 +10,46 @@ class MultisessionPlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async list() {
|
|
14
|
-
const path = '/list';
|
|
15
|
-
return this.client.request('GET', path
|
|
13
|
+
async list(request) {
|
|
14
|
+
const path = '/multi-session/list';
|
|
15
|
+
return this.client.request('GET', path, {
|
|
16
|
+
query: this.client.toQueryParams(request),
|
|
17
|
+
});
|
|
16
18
|
}
|
|
17
19
|
async setActive(request) {
|
|
18
|
-
const path = '/set-active';
|
|
20
|
+
const path = '/multi-session/set-active';
|
|
19
21
|
return this.client.request('POST', path, {
|
|
20
22
|
body: request,
|
|
21
23
|
});
|
|
22
24
|
}
|
|
23
25
|
async delete(params) {
|
|
24
|
-
const path = `/delete/${params.id}`;
|
|
26
|
+
const path = `/multi-session/delete/${params.id}`;
|
|
25
27
|
return this.client.request('POST', path);
|
|
26
28
|
}
|
|
27
29
|
async getCurrent() {
|
|
28
|
-
const path = '/current';
|
|
30
|
+
const path = '/multi-session/current';
|
|
29
31
|
return this.client.request('GET', path);
|
|
30
32
|
}
|
|
31
33
|
async getByID(params) {
|
|
32
|
-
const path =
|
|
34
|
+
const path = `/multi-session/${params.id}`;
|
|
33
35
|
return this.client.request('GET', path);
|
|
34
36
|
}
|
|
35
37
|
async revokeAll(request) {
|
|
36
|
-
const path = '/revoke-all';
|
|
38
|
+
const path = '/multi-session/revoke-all';
|
|
37
39
|
return this.client.request('POST', path, {
|
|
38
40
|
body: request,
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
async revokeOthers() {
|
|
42
|
-
const path = '/revoke-others';
|
|
44
|
+
const path = '/multi-session/revoke-others';
|
|
43
45
|
return this.client.request('POST', path);
|
|
44
46
|
}
|
|
45
47
|
async refresh() {
|
|
46
|
-
const path = '/refresh';
|
|
48
|
+
const path = '/multi-session/refresh';
|
|
47
49
|
return this.client.request('POST', path);
|
|
48
50
|
}
|
|
49
51
|
async getStats() {
|
|
50
|
-
const path = '/stats';
|
|
52
|
+
const path = '/multi-session/stats';
|
|
51
53
|
return this.client.request('GET', path);
|
|
52
54
|
}
|
|
53
55
|
}
|
|
@@ -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;
|
|
@@ -11,62 +11,68 @@ class OidcproviderPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async registerClient(request) {
|
|
14
|
-
const path = '/register';
|
|
14
|
+
const path = '/oauth2/register';
|
|
15
15
|
return this.client.request('POST', path, {
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
async listClients() {
|
|
20
|
-
const path = '/listclients';
|
|
20
|
+
const path = '/oauth2/listclients';
|
|
21
21
|
return this.client.request('GET', path);
|
|
22
22
|
}
|
|
23
23
|
async getClient(params) {
|
|
24
|
-
const path =
|
|
24
|
+
const path = `/oauth2/${params.clientId}`;
|
|
25
25
|
return this.client.request('GET', path);
|
|
26
26
|
}
|
|
27
27
|
async updateClient(params, request) {
|
|
28
|
-
const path =
|
|
28
|
+
const path = `/oauth2/${params.clientId}`;
|
|
29
29
|
return this.client.request('PUT', path, {
|
|
30
30
|
body: request,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
async deleteClient(params) {
|
|
34
|
-
const path =
|
|
34
|
+
const path = `/oauth2/${params.clientId}`;
|
|
35
35
|
return this.client.request('DELETE', path);
|
|
36
36
|
}
|
|
37
37
|
async discovery() {
|
|
38
|
-
const path = '/.well-known/openid-configuration';
|
|
38
|
+
const path = '/oauth2/.well-known/openid-configuration';
|
|
39
39
|
return this.client.request('GET', path);
|
|
40
40
|
}
|
|
41
41
|
async jWKS() {
|
|
42
|
-
const path = '/jwks';
|
|
42
|
+
const path = '/oauth2/jwks';
|
|
43
43
|
return this.client.request('GET', path);
|
|
44
44
|
}
|
|
45
45
|
async authorize() {
|
|
46
|
-
const path = '/authorize';
|
|
46
|
+
const path = '/oauth2/authorize';
|
|
47
47
|
return this.client.request('GET', path);
|
|
48
48
|
}
|
|
49
|
-
async handleConsent() {
|
|
50
|
-
const path = '/consent';
|
|
51
|
-
return this.client.request('POST', path
|
|
49
|
+
async handleConsent(request) {
|
|
50
|
+
const path = '/oauth2/consent';
|
|
51
|
+
return this.client.request('POST', path, {
|
|
52
|
+
body: request,
|
|
53
|
+
});
|
|
52
54
|
}
|
|
53
55
|
async token(request) {
|
|
54
|
-
const path = '/token';
|
|
56
|
+
const path = '/oauth2/token';
|
|
55
57
|
return this.client.request('POST', path, {
|
|
56
58
|
body: request,
|
|
57
59
|
});
|
|
58
60
|
}
|
|
59
61
|
async userInfo() {
|
|
60
|
-
const path = '/userinfo';
|
|
62
|
+
const path = '/oauth2/userinfo';
|
|
61
63
|
return this.client.request('GET', path);
|
|
62
64
|
}
|
|
63
|
-
async introspectToken() {
|
|
64
|
-
const path = '/introspect';
|
|
65
|
-
return this.client.request('POST', path
|
|
65
|
+
async introspectToken(request) {
|
|
66
|
+
const path = '/oauth2/introspect';
|
|
67
|
+
return this.client.request('POST', path, {
|
|
68
|
+
body: request,
|
|
69
|
+
});
|
|
66
70
|
}
|
|
67
|
-
async revokeToken() {
|
|
68
|
-
const path = '/revoke';
|
|
69
|
-
return this.client.request('POST', path
|
|
71
|
+
async revokeToken(request) {
|
|
72
|
+
const path = '/oauth2/revoke';
|
|
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;
|
|
@@ -11,67 +11,67 @@ class OrganizationPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async createOrganization() {
|
|
14
|
-
const path = '/createorganization';
|
|
14
|
+
const path = '/organizations/createorganization';
|
|
15
15
|
return this.client.request('POST', path);
|
|
16
16
|
}
|
|
17
17
|
async updateOrganization(params) {
|
|
18
|
-
const path =
|
|
18
|
+
const path = `/organizations/${params.id}`;
|
|
19
19
|
return this.client.request('PATCH', path);
|
|
20
20
|
}
|
|
21
21
|
async deleteOrganization(params) {
|
|
22
|
-
const path =
|
|
22
|
+
const path = `/organizations/${params.id}`;
|
|
23
23
|
return this.client.request('DELETE', path);
|
|
24
24
|
}
|
|
25
25
|
async inviteMember() {
|
|
26
|
-
const path = '/invite';
|
|
26
|
+
const path = '/organizations/invite';
|
|
27
27
|
return this.client.request('POST', path);
|
|
28
28
|
}
|
|
29
29
|
async removeMember(params) {
|
|
30
|
-
const path =
|
|
30
|
+
const path = `/organizations/${params.memberId}`;
|
|
31
31
|
return this.client.request('DELETE', path);
|
|
32
32
|
}
|
|
33
33
|
async createTeam() {
|
|
34
|
-
const path = '/createteam';
|
|
34
|
+
const path = '/organizations/createteam';
|
|
35
35
|
return this.client.request('POST', path);
|
|
36
36
|
}
|
|
37
37
|
async updateTeam(params) {
|
|
38
|
-
const path =
|
|
38
|
+
const path = `/organizations/${params.teamId}`;
|
|
39
39
|
return this.client.request('PATCH', path);
|
|
40
40
|
}
|
|
41
41
|
async deleteTeam(params) {
|
|
42
|
-
const path =
|
|
42
|
+
const path = `/organizations/${params.teamId}`;
|
|
43
43
|
return this.client.request('DELETE', path);
|
|
44
44
|
}
|
|
45
45
|
async getOrganization(params) {
|
|
46
|
-
const path =
|
|
46
|
+
const path = `/organizations/${params.id}`;
|
|
47
47
|
return this.client.request('GET', path);
|
|
48
48
|
}
|
|
49
49
|
async listOrganizations() {
|
|
50
|
-
const path = '/listorganizations';
|
|
50
|
+
const path = '/organizations/listorganizations';
|
|
51
51
|
return this.client.request('GET', path);
|
|
52
52
|
}
|
|
53
53
|
async getOrganizationBySlug(params) {
|
|
54
|
-
const path = `/slug/${params.slug}`;
|
|
54
|
+
const path = `/organizations/slug/${params.slug}`;
|
|
55
55
|
return this.client.request('GET', path);
|
|
56
56
|
}
|
|
57
57
|
async listMembers() {
|
|
58
|
-
const path = '/listmembers';
|
|
58
|
+
const path = '/organizations/listmembers';
|
|
59
59
|
return this.client.request('GET', path);
|
|
60
60
|
}
|
|
61
61
|
async updateMember(params) {
|
|
62
|
-
const path =
|
|
62
|
+
const path = `/organizations/${params.memberId}`;
|
|
63
63
|
return this.client.request('PATCH', path);
|
|
64
64
|
}
|
|
65
65
|
async acceptInvitation(params) {
|
|
66
|
-
const path =
|
|
66
|
+
const path = `/organizations/${params.token}/accept`;
|
|
67
67
|
return this.client.request('POST', path);
|
|
68
68
|
}
|
|
69
69
|
async declineInvitation(params) {
|
|
70
|
-
const path =
|
|
70
|
+
const path = `/organizations/${params.token}/decline`;
|
|
71
71
|
return this.client.request('POST', path);
|
|
72
72
|
}
|
|
73
73
|
async listTeams() {
|
|
74
|
-
const path = '/listteams';
|
|
74
|
+
const path = '/organizations/listteams';
|
|
75
75
|
return this.client.request('GET', path);
|
|
76
76
|
}
|
|
77
77
|
}
|
package/dist/plugins/passkey.js
CHANGED
|
@@ -11,31 +11,31 @@ class PasskeyPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async beginRegister() {
|
|
14
|
-
const path = '/register/begin';
|
|
14
|
+
const path = '/passkey/register/begin';
|
|
15
15
|
return this.client.request('POST', path);
|
|
16
16
|
}
|
|
17
17
|
async finishRegister() {
|
|
18
|
-
const path = '/register/finish';
|
|
18
|
+
const path = '/passkey/register/finish';
|
|
19
19
|
return this.client.request('POST', path);
|
|
20
20
|
}
|
|
21
21
|
async beginLogin() {
|
|
22
|
-
const path = '/login/begin';
|
|
22
|
+
const path = '/passkey/login/begin';
|
|
23
23
|
return this.client.request('POST', path);
|
|
24
24
|
}
|
|
25
25
|
async finishLogin() {
|
|
26
|
-
const path = '/login/finish';
|
|
26
|
+
const path = '/passkey/login/finish';
|
|
27
27
|
return this.client.request('POST', path);
|
|
28
28
|
}
|
|
29
29
|
async list() {
|
|
30
|
-
const path = '/list';
|
|
30
|
+
const path = '/passkey/list';
|
|
31
31
|
return this.client.request('GET', path);
|
|
32
32
|
}
|
|
33
33
|
async update(params) {
|
|
34
|
-
const path =
|
|
34
|
+
const path = `/passkey/${params.id}`;
|
|
35
35
|
return this.client.request('PUT', path);
|
|
36
36
|
}
|
|
37
37
|
async delete(params) {
|
|
38
|
-
const path =
|
|
38
|
+
const path = `/passkey/${params.id}`;
|
|
39
39
|
return this.client.request('DELETE', path);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -11,17 +11,17 @@ class PermissionsPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async migrateAll(request) {
|
|
14
|
-
const path = '/migrate/all';
|
|
14
|
+
const path = '/api/permissions/migrate/all';
|
|
15
15
|
return this.client.request('POST', path, {
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
async migrateRoles() {
|
|
20
|
-
const path = '/migrate/roles';
|
|
20
|
+
const path = '/api/permissions/migrate/roles';
|
|
21
21
|
return this.client.request('POST', path);
|
|
22
22
|
}
|
|
23
23
|
async previewConversion(request) {
|
|
24
|
-
const path = '/migrate/preview';
|
|
24
|
+
const path = '/api/permissions/migrate/preview';
|
|
25
25
|
return this.client.request('POST', path, {
|
|
26
26
|
body: request,
|
|
27
27
|
});
|
|
@@ -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;
|