@authsome/client 0.0.3 → 0.0.4
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 +86 -37
- package/dist/client.js +65 -17
- package/dist/index.d.ts +21 -17
- package/dist/index.js +65 -53
- package/dist/plugins/admin.d.ts +18 -6
- package/dist/plugins/admin.js +12 -12
- package/dist/plugins/apikey.d.ts +13 -5
- package/dist/plugins/apikey.js +12 -14
- package/dist/plugins/backupauth.d.ts +15 -5
- package/dist/plugins/backupauth.js +10 -10
- package/dist/plugins/cms.d.ts +54 -0
- package/dist/plugins/cms.js +139 -0
- package/dist/plugins/compliance.d.ts +90 -30
- package/dist/plugins/compliance.js +60 -60
- package/dist/plugins/consent.d.ts +24 -8
- package/dist/plugins/consent.js +16 -16
- package/dist/plugins/emailverification.d.ts +12 -0
- package/dist/plugins/emailverification.js +33 -0
- package/dist/plugins/idverification.d.ts +21 -7
- package/dist/plugins/idverification.js +14 -14
- package/dist/plugins/impersonation.d.ts +3 -1
- package/dist/plugins/impersonation.js +2 -2
- package/dist/plugins/mfa.d.ts +21 -7
- package/dist/plugins/mfa.js +14 -14
- package/dist/plugins/multiapp.d.ts +40 -13
- package/dist/plugins/multiapp.js +26 -26
- package/dist/plugins/multisession.d.ts +11 -1
- package/dist/plugins/multisession.js +28 -2
- package/dist/plugins/notification.d.ts +25 -9
- package/dist/plugins/notification.js +16 -16
- package/dist/plugins/oidcprovider.d.ts +9 -3
- package/dist/plugins/oidcprovider.js +6 -6
- package/dist/plugins/organization.d.ts +30 -10
- 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 +63 -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 +15 -5
- package/dist/plugins/stepup.js +10 -10
- package/dist/types.d.ts +2878 -2453
- package/package.json +2 -1
- package/src/client.ts +96 -37
- package/src/index.ts +21 -17
- package/src/plugins/admin.ts +12 -12
- package/src/plugins/apikey.ts +13 -15
- package/src/plugins/backupauth.ts +10 -10
- package/src/plugins/cms.ts +170 -0
- package/src/plugins/compliance.ts +60 -60
- package/src/plugins/consent.ts +16 -16
- package/src/plugins/emailverification.ts +38 -0
- package/src/plugins/idverification.ts +14 -14
- package/src/plugins/impersonation.ts +2 -2
- package/src/plugins/mfa.ts +14 -14
- package/src/plugins/multiapp.ts +26 -26
- package/src/plugins/multisession.ts +34 -2
- package/src/plugins/notification.ts +18 -18
- package/src/plugins/oidcprovider.ts +6 -6
- package/src/plugins/organization.ts +20 -20
- package/src/plugins/passkey.ts +4 -4
- package/src/plugins/permissions.ts +38 -0
- package/src/plugins/secrets.ts +76 -0
- package/src/plugins/social.ts +7 -5
- package/src/plugins/sso.ts +8 -8
- package/src/plugins/stepup.ts +10 -10
- package/src/types.ts +2989 -2486
- package/authsome-client-0.0.2.tgz +0 -0
|
@@ -12,20 +12,20 @@ export class NotificationPlugin implements ClientPlugin {
|
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async previewTemplate(request: types.PreviewTemplate_req): Promise<void> {
|
|
16
|
-
const path =
|
|
15
|
+
async previewTemplate(params: { id: string }, request: types.PreviewTemplate_req): Promise<void> {
|
|
16
|
+
const path = `/${params.id}/preview`;
|
|
17
17
|
return this.client.request<void>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async createTemplate(): Promise<
|
|
22
|
+
async createTemplate(): Promise<types.NotificationTemplateResponse> {
|
|
23
23
|
const path = '/createtemplate';
|
|
24
|
-
return this.client.request<
|
|
24
|
+
return this.client.request<types.NotificationTemplateResponse>('POST', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async getTemplate(): Promise<void> {
|
|
28
|
-
const path =
|
|
27
|
+
async getTemplate(params: { id: string }): Promise<void> {
|
|
28
|
+
const path = `/${params.id}`;
|
|
29
29
|
return this.client.request<void>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -34,18 +34,18 @@ export class NotificationPlugin implements ClientPlugin {
|
|
|
34
34
|
return this.client.request<void>('GET', path);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
async updateTemplate(): Promise<types.MessageResponse> {
|
|
38
|
-
const path =
|
|
37
|
+
async updateTemplate(params: { id: string }): Promise<types.MessageResponse> {
|
|
38
|
+
const path = `/${params.id}`;
|
|
39
39
|
return this.client.request<types.MessageResponse>('PUT', path);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
async deleteTemplate(): Promise<types.MessageResponse> {
|
|
43
|
-
const path =
|
|
42
|
+
async deleteTemplate(params: { id: string }): Promise<types.MessageResponse> {
|
|
43
|
+
const path = `/${params.id}`;
|
|
44
44
|
return this.client.request<types.MessageResponse>('DELETE', path);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
async resetTemplate(): Promise<types.MessageResponse> {
|
|
48
|
-
const path =
|
|
47
|
+
async resetTemplate(params: { id: string }): Promise<types.MessageResponse> {
|
|
48
|
+
const path = `/${params.id}/reset`;
|
|
49
49
|
return this.client.request<types.MessageResponse>('POST', path);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -71,8 +71,8 @@ export class NotificationPlugin implements ClientPlugin {
|
|
|
71
71
|
return this.client.request<void>('POST', path);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
async getNotification(): Promise<void> {
|
|
75
|
-
const path =
|
|
74
|
+
async getNotification(params: { id: string }): Promise<void> {
|
|
75
|
+
const path = `/${params.id}`;
|
|
76
76
|
return this.client.request<void>('GET', path);
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -81,13 +81,13 @@ export class NotificationPlugin implements ClientPlugin {
|
|
|
81
81
|
return this.client.request<void>('GET', path);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
async resendNotification(): Promise<void> {
|
|
85
|
-
const path =
|
|
84
|
+
async resendNotification(params: { id: string }): Promise<void> {
|
|
85
|
+
const path = `/${params.id}/resend`;
|
|
86
86
|
return this.client.request<void>('POST', path);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
async handleWebhook(): Promise<types.StatusResponse> {
|
|
90
|
-
const path =
|
|
89
|
+
async handleWebhook(params: { provider: string }): Promise<types.StatusResponse> {
|
|
90
|
+
const path = `/notifications/webhook/${params.provider}`;
|
|
91
91
|
return this.client.request<types.StatusResponse>('POST', path);
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -24,20 +24,20 @@ export class OidcproviderPlugin implements ClientPlugin {
|
|
|
24
24
|
return this.client.request<void>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async getClient(): Promise<void> {
|
|
28
|
-
const path =
|
|
27
|
+
async getClient(params: { clientId: string }): Promise<void> {
|
|
28
|
+
const path = `/${params.clientId}`;
|
|
29
29
|
return this.client.request<void>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
async updateClient(request: types.ClientUpdateRequest): Promise<void> {
|
|
33
|
-
const path =
|
|
32
|
+
async updateClient(params: { clientId: string }, request: types.ClientUpdateRequest): Promise<void> {
|
|
33
|
+
const path = `/${params.clientId}`;
|
|
34
34
|
return this.client.request<void>('PUT', path, {
|
|
35
35
|
body: request,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
async deleteClient(): Promise<void> {
|
|
40
|
-
const path =
|
|
39
|
+
async deleteClient(params: { clientId: string }): Promise<void> {
|
|
40
|
+
const path = `/${params.clientId}`;
|
|
41
41
|
return this.client.request<void>('DELETE', path);
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -17,13 +17,13 @@ export class OrganizationPlugin implements ClientPlugin {
|
|
|
17
17
|
return this.client.request<void>('POST', path);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
async updateOrganization(): Promise<void> {
|
|
21
|
-
const path =
|
|
20
|
+
async updateOrganization(params: { id: string }): Promise<void> {
|
|
21
|
+
const path = `/${params.id}`;
|
|
22
22
|
return this.client.request<void>('PATCH', path);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
async deleteOrganization(): Promise<void> {
|
|
26
|
-
const path =
|
|
25
|
+
async deleteOrganization(params: { id: string }): Promise<void> {
|
|
26
|
+
const path = `/${params.id}`;
|
|
27
27
|
return this.client.request<void>('DELETE', path);
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -32,8 +32,8 @@ export class OrganizationPlugin implements ClientPlugin {
|
|
|
32
32
|
return this.client.request<void>('POST', path);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
async removeMember(): Promise<void> {
|
|
36
|
-
const path =
|
|
35
|
+
async removeMember(params: { memberId: string }): Promise<void> {
|
|
36
|
+
const path = `/${params.memberId}`;
|
|
37
37
|
return this.client.request<void>('DELETE', path);
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -42,18 +42,18 @@ export class OrganizationPlugin implements ClientPlugin {
|
|
|
42
42
|
return this.client.request<void>('POST', path);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
async updateTeam(): Promise<void> {
|
|
46
|
-
const path =
|
|
45
|
+
async updateTeam(params: { teamId: string }): Promise<void> {
|
|
46
|
+
const path = `/${params.teamId}`;
|
|
47
47
|
return this.client.request<void>('PATCH', path);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
async deleteTeam(): Promise<void> {
|
|
51
|
-
const path =
|
|
50
|
+
async deleteTeam(params: { teamId: string }): Promise<void> {
|
|
51
|
+
const path = `/${params.teamId}`;
|
|
52
52
|
return this.client.request<void>('DELETE', path);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
async getOrganization(): Promise<void> {
|
|
56
|
-
const path =
|
|
55
|
+
async getOrganization(params: { id: string }): Promise<void> {
|
|
56
|
+
const path = `/${params.id}`;
|
|
57
57
|
return this.client.request<void>('GET', path);
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -62,8 +62,8 @@ export class OrganizationPlugin implements ClientPlugin {
|
|
|
62
62
|
return this.client.request<void>('GET', path);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
async getOrganizationBySlug(): Promise<void> {
|
|
66
|
-
const path =
|
|
65
|
+
async getOrganizationBySlug(params: { slug: string }): Promise<void> {
|
|
66
|
+
const path = `/slug/${params.slug}`;
|
|
67
67
|
return this.client.request<void>('GET', path);
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -72,18 +72,18 @@ export class OrganizationPlugin implements ClientPlugin {
|
|
|
72
72
|
return this.client.request<void>('GET', path);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
async updateMember(): Promise<void> {
|
|
76
|
-
const path =
|
|
75
|
+
async updateMember(params: { memberId: string }): Promise<void> {
|
|
76
|
+
const path = `/${params.memberId}`;
|
|
77
77
|
return this.client.request<void>('PATCH', path);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
async acceptInvitation(): Promise<void> {
|
|
81
|
-
const path =
|
|
80
|
+
async acceptInvitation(params: { token: string }): Promise<void> {
|
|
81
|
+
const path = `/${params.token}/accept`;
|
|
82
82
|
return this.client.request<void>('POST', path);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
async declineInvitation(): Promise<types.StatusResponse> {
|
|
86
|
-
const path =
|
|
85
|
+
async declineInvitation(params: { token: string }): Promise<types.StatusResponse> {
|
|
86
|
+
const path = `/${params.token}/decline`;
|
|
87
87
|
return this.client.request<types.StatusResponse>('POST', path);
|
|
88
88
|
}
|
|
89
89
|
|
package/src/plugins/passkey.ts
CHANGED
|
@@ -37,13 +37,13 @@ export class PasskeyPlugin implements ClientPlugin {
|
|
|
37
37
|
return this.client.request<void>('GET', path);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
async update(): Promise<void> {
|
|
41
|
-
const path =
|
|
40
|
+
async update(params: { id: string }): Promise<void> {
|
|
41
|
+
const path = `/${params.id}`;
|
|
42
42
|
return this.client.request<void>('PUT', path);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
async delete(): Promise<types.StatusResponse> {
|
|
46
|
-
const path =
|
|
45
|
+
async delete(params: { id: string }): Promise<types.StatusResponse> {
|
|
46
|
+
const path = `/${params.id}`;
|
|
47
47
|
return this.client.request<types.StatusResponse>('DELETE', path);
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Auto-generated permissions plugin
|
|
2
|
+
|
|
3
|
+
import { ClientPlugin } from '../plugin';
|
|
4
|
+
import { AuthsomeClient } from '../client';
|
|
5
|
+
import * as types from '../types';
|
|
6
|
+
|
|
7
|
+
export class PermissionsPlugin implements ClientPlugin {
|
|
8
|
+
readonly id = 'permissions';
|
|
9
|
+
private client!: AuthsomeClient;
|
|
10
|
+
|
|
11
|
+
init(client: AuthsomeClient): void {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async migrateAll(request: types.MigrateAllRequest): Promise<types.ErrorResponse> {
|
|
16
|
+
const path = '/migrate/all';
|
|
17
|
+
return this.client.request<types.ErrorResponse>('POST', path, {
|
|
18
|
+
body: request,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async migrateRoles(): Promise<types.ErrorResponse> {
|
|
23
|
+
const path = '/migrate/roles';
|
|
24
|
+
return this.client.request<types.ErrorResponse>('POST', path);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async previewConversion(request: types.PreviewConversionRequest): Promise<types.ErrorResponse> {
|
|
28
|
+
const path = '/migrate/preview';
|
|
29
|
+
return this.client.request<types.ErrorResponse>('POST', path, {
|
|
30
|
+
body: request,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function permissionsClient(): PermissionsPlugin {
|
|
37
|
+
return new PermissionsPlugin();
|
|
38
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Auto-generated secrets plugin
|
|
2
|
+
|
|
3
|
+
import { ClientPlugin } from '../plugin';
|
|
4
|
+
import { AuthsomeClient } from '../client';
|
|
5
|
+
import * as types from '../types';
|
|
6
|
+
|
|
7
|
+
export class SecretsPlugin implements ClientPlugin {
|
|
8
|
+
readonly id = 'secrets';
|
|
9
|
+
private client!: AuthsomeClient;
|
|
10
|
+
|
|
11
|
+
init(client: AuthsomeClient): void {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async list(): Promise<types.ListSecretsResponse> {
|
|
16
|
+
const path = '/list';
|
|
17
|
+
return this.client.request<types.ListSecretsResponse>('GET', path);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async create(): Promise<types.ErrorResponse> {
|
|
21
|
+
const path = '/create';
|
|
22
|
+
return this.client.request<types.ErrorResponse>('POST', path);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async get(params: { id: string }): Promise<types.ErrorResponse> {
|
|
26
|
+
const path = `/${params.id}`;
|
|
27
|
+
return this.client.request<types.ErrorResponse>('GET', path);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async getValue(params: { id: string }): Promise<types.RevealValueResponse> {
|
|
31
|
+
const path = `/${params.id}/value`;
|
|
32
|
+
return this.client.request<types.RevealValueResponse>('GET', path);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async update(params: { id: string }): Promise<types.ErrorResponse> {
|
|
36
|
+
const path = `/${params.id}`;
|
|
37
|
+
return this.client.request<types.ErrorResponse>('PUT', path);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async delete(params: { id: string }): Promise<types.SuccessResponse> {
|
|
41
|
+
const path = `/${params.id}`;
|
|
42
|
+
return this.client.request<types.SuccessResponse>('DELETE', path);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async getByPath(): Promise<types.ErrorResponse> {
|
|
46
|
+
const path = '/path/*path';
|
|
47
|
+
return this.client.request<types.ErrorResponse>('GET', path);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async getVersions(params: { id: string }): Promise<types.ListVersionsResponse> {
|
|
51
|
+
const path = `/${params.id}/versions`;
|
|
52
|
+
return this.client.request<types.ListVersionsResponse>('GET', path);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async rollback(params: { id: string; version: number }, request: types.Rollback_req): Promise<types.ErrorResponse> {
|
|
56
|
+
const path = `/${params.id}/rollback/${params.version}`;
|
|
57
|
+
return this.client.request<types.ErrorResponse>('POST', path, {
|
|
58
|
+
body: request,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async getStats(): Promise<void> {
|
|
63
|
+
const path = '/stats';
|
|
64
|
+
return this.client.request<void>('GET', path);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async getTree(): Promise<void> {
|
|
68
|
+
const path = '/tree';
|
|
69
|
+
return this.client.request<void>('GET', path);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function secretsClient(): SecretsPlugin {
|
|
75
|
+
return new SecretsPlugin();
|
|
76
|
+
}
|
package/src/plugins/social.ts
CHANGED
|
@@ -19,9 +19,11 @@ export class SocialPlugin implements ClientPlugin {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async callback(): Promise<types.CallbackDataResponse> {
|
|
23
|
-
const path =
|
|
24
|
-
return this.client.request<types.CallbackDataResponse>('GET', path
|
|
22
|
+
async callback(params: { provider: string }, query?: { state?: string; code?: string; error?: string; errorDescription?: string }): Promise<types.CallbackDataResponse> {
|
|
23
|
+
const path = `/callback/${params.provider}`;
|
|
24
|
+
return this.client.request<types.CallbackDataResponse>('GET', path, {
|
|
25
|
+
query,
|
|
26
|
+
});
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
async linkAccount(request: types.LinkAccountRequest): Promise<types.AuthURLResponse> {
|
|
@@ -31,8 +33,8 @@ export class SocialPlugin implements ClientPlugin {
|
|
|
31
33
|
});
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
async unlinkAccount(): Promise<types.MessageResponse> {
|
|
35
|
-
const path =
|
|
36
|
+
async unlinkAccount(params: { provider: string }): Promise<types.MessageResponse> {
|
|
37
|
+
const path = `/account/unlink/${params.provider}`;
|
|
36
38
|
return this.client.request<types.MessageResponse>('DELETE', path);
|
|
37
39
|
}
|
|
38
40
|
|
package/src/plugins/sso.ts
CHANGED
|
@@ -24,27 +24,27 @@ export class SsoPlugin implements ClientPlugin {
|
|
|
24
24
|
return this.client.request<types.MetadataResponse>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async sAMLLogin(request: types.SAMLLoginRequest): Promise<types.SAMLLoginResponse> {
|
|
28
|
-
const path =
|
|
27
|
+
async sAMLLogin(params: { providerId: string }, request: types.SAMLLoginRequest): Promise<types.SAMLLoginResponse> {
|
|
28
|
+
const path = `/saml2/login/${params.providerId}`;
|
|
29
29
|
return this.client.request<types.SAMLLoginResponse>('POST', path, {
|
|
30
30
|
body: request,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
async sAMLCallback(): Promise<types.SSOAuthResponse> {
|
|
35
|
-
const path =
|
|
34
|
+
async sAMLCallback(params: { providerId: string }): Promise<types.SSOAuthResponse> {
|
|
35
|
+
const path = `/saml2/callback/${params.providerId}`;
|
|
36
36
|
return this.client.request<types.SSOAuthResponse>('POST', path);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
async oIDCLogin(request: types.OIDCLoginRequest): Promise<types.OIDCLoginResponse> {
|
|
40
|
-
const path =
|
|
39
|
+
async oIDCLogin(params: { providerId: string }, request: types.OIDCLoginRequest): Promise<types.OIDCLoginResponse> {
|
|
40
|
+
const path = `/oidc/login/${params.providerId}`;
|
|
41
41
|
return this.client.request<types.OIDCLoginResponse>('POST', path, {
|
|
42
42
|
body: request,
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
async oIDCCallback(): Promise<types.SSOAuthResponse> {
|
|
47
|
-
const path =
|
|
46
|
+
async oIDCCallback(params: { providerId: string }): Promise<types.SSOAuthResponse> {
|
|
47
|
+
const path = `/oidc/callback/${params.providerId}`;
|
|
48
48
|
return this.client.request<types.SSOAuthResponse>('GET', path);
|
|
49
49
|
}
|
|
50
50
|
|
package/src/plugins/stepup.ts
CHANGED
|
@@ -26,8 +26,8 @@ export class StepupPlugin implements ClientPlugin {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
async getRequirement(): Promise<void> {
|
|
30
|
-
const path =
|
|
29
|
+
async getRequirement(params: { id: string }): Promise<void> {
|
|
30
|
+
const path = `/requirements/${params.id}`;
|
|
31
31
|
return this.client.request<void>('GET', path);
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -46,8 +46,8 @@ export class StepupPlugin implements ClientPlugin {
|
|
|
46
46
|
return this.client.request<types.StepUpDevicesResponse>('GET', path);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
async forgetDevice(): Promise<types.ForgetDeviceResponse> {
|
|
50
|
-
const path =
|
|
49
|
+
async forgetDevice(params: { id: string }): Promise<types.ForgetDeviceResponse> {
|
|
50
|
+
const path = `/devices/${params.id}`;
|
|
51
51
|
return this.client.request<types.ForgetDeviceResponse>('DELETE', path);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -63,20 +63,20 @@ export class StepupPlugin implements ClientPlugin {
|
|
|
63
63
|
return this.client.request<void>('GET', path);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
async getPolicy(): Promise<void> {
|
|
67
|
-
const path =
|
|
66
|
+
async getPolicy(params: { id: string }): Promise<void> {
|
|
67
|
+
const path = `/policies/${params.id}`;
|
|
68
68
|
return this.client.request<void>('GET', path);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
async updatePolicy(request: types.StepUpPolicy): Promise<types.StepUpPolicy> {
|
|
72
|
-
const path =
|
|
71
|
+
async updatePolicy(params: { id: string }, request: types.StepUpPolicy): Promise<types.StepUpPolicy> {
|
|
72
|
+
const path = `/policies/${params.id}`;
|
|
73
73
|
return this.client.request<types.StepUpPolicy>('PUT', path, {
|
|
74
74
|
body: request,
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
async deletePolicy(): Promise<void> {
|
|
79
|
-
const path =
|
|
78
|
+
async deletePolicy(params: { id: string }): Promise<void> {
|
|
79
|
+
const path = `/policies/${params.id}`;
|
|
80
80
|
return this.client.request<void>('DELETE', path);
|
|
81
81
|
}
|
|
82
82
|
|