@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
|
@@ -14,60 +14,60 @@ class OrganizationPlugin {
|
|
|
14
14
|
const path = '/createorganization';
|
|
15
15
|
return this.client.request('POST', path);
|
|
16
16
|
}
|
|
17
|
-
async updateOrganization() {
|
|
18
|
-
const path =
|
|
17
|
+
async updateOrganization(params) {
|
|
18
|
+
const path = `/${params.id}`;
|
|
19
19
|
return this.client.request('PATCH', path);
|
|
20
20
|
}
|
|
21
|
-
async deleteOrganization() {
|
|
22
|
-
const path =
|
|
21
|
+
async deleteOrganization(params) {
|
|
22
|
+
const path = `/${params.id}`;
|
|
23
23
|
return this.client.request('DELETE', path);
|
|
24
24
|
}
|
|
25
25
|
async inviteMember() {
|
|
26
26
|
const path = '/invite';
|
|
27
27
|
return this.client.request('POST', path);
|
|
28
28
|
}
|
|
29
|
-
async removeMember() {
|
|
30
|
-
const path =
|
|
29
|
+
async removeMember(params) {
|
|
30
|
+
const path = `/${params.memberId}`;
|
|
31
31
|
return this.client.request('DELETE', path);
|
|
32
32
|
}
|
|
33
33
|
async createTeam() {
|
|
34
34
|
const path = '/createteam';
|
|
35
35
|
return this.client.request('POST', path);
|
|
36
36
|
}
|
|
37
|
-
async updateTeam() {
|
|
38
|
-
const path =
|
|
37
|
+
async updateTeam(params) {
|
|
38
|
+
const path = `/${params.teamId}`;
|
|
39
39
|
return this.client.request('PATCH', path);
|
|
40
40
|
}
|
|
41
|
-
async deleteTeam() {
|
|
42
|
-
const path =
|
|
41
|
+
async deleteTeam(params) {
|
|
42
|
+
const path = `/${params.teamId}`;
|
|
43
43
|
return this.client.request('DELETE', path);
|
|
44
44
|
}
|
|
45
|
-
async getOrganization() {
|
|
46
|
-
const path =
|
|
45
|
+
async getOrganization(params) {
|
|
46
|
+
const path = `/${params.id}`;
|
|
47
47
|
return this.client.request('GET', path);
|
|
48
48
|
}
|
|
49
49
|
async listOrganizations() {
|
|
50
50
|
const path = '/listorganizations';
|
|
51
51
|
return this.client.request('GET', path);
|
|
52
52
|
}
|
|
53
|
-
async getOrganizationBySlug() {
|
|
54
|
-
const path =
|
|
53
|
+
async getOrganizationBySlug(params) {
|
|
54
|
+
const path = `/slug/${params.slug}`;
|
|
55
55
|
return this.client.request('GET', path);
|
|
56
56
|
}
|
|
57
57
|
async listMembers() {
|
|
58
58
|
const path = '/listmembers';
|
|
59
59
|
return this.client.request('GET', path);
|
|
60
60
|
}
|
|
61
|
-
async updateMember() {
|
|
62
|
-
const path =
|
|
61
|
+
async updateMember(params) {
|
|
62
|
+
const path = `/${params.memberId}`;
|
|
63
63
|
return this.client.request('PATCH', path);
|
|
64
64
|
}
|
|
65
|
-
async acceptInvitation() {
|
|
66
|
-
const path =
|
|
65
|
+
async acceptInvitation(params) {
|
|
66
|
+
const path = `/${params.token}/accept`;
|
|
67
67
|
return this.client.request('POST', path);
|
|
68
68
|
}
|
|
69
|
-
async declineInvitation() {
|
|
70
|
-
const path =
|
|
69
|
+
async declineInvitation(params) {
|
|
70
|
+
const path = `/${params.token}/decline`;
|
|
71
71
|
return this.client.request('POST', path);
|
|
72
72
|
}
|
|
73
73
|
async listTeams() {
|
|
@@ -10,7 +10,11 @@ export declare class PasskeyPlugin implements ClientPlugin {
|
|
|
10
10
|
beginLogin(): Promise<void>;
|
|
11
11
|
finishLogin(): Promise<void>;
|
|
12
12
|
list(): Promise<void>;
|
|
13
|
-
update(
|
|
14
|
-
|
|
13
|
+
update(params: {
|
|
14
|
+
id: string;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
delete(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}): Promise<types.StatusResponse>;
|
|
15
19
|
}
|
|
16
20
|
export declare function passkeyClient(): PasskeyPlugin;
|
package/dist/plugins/passkey.js
CHANGED
|
@@ -30,12 +30,12 @@ class PasskeyPlugin {
|
|
|
30
30
|
const path = '/list';
|
|
31
31
|
return this.client.request('GET', path);
|
|
32
32
|
}
|
|
33
|
-
async update() {
|
|
34
|
-
const path =
|
|
33
|
+
async update(params) {
|
|
34
|
+
const path = `/${params.id}`;
|
|
35
35
|
return this.client.request('PUT', path);
|
|
36
36
|
}
|
|
37
|
-
async delete() {
|
|
38
|
-
const path =
|
|
37
|
+
async delete(params) {
|
|
38
|
+
const path = `/${params.id}`;
|
|
39
39
|
return this.client.request('DELETE', path);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class PermissionsPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "permissions";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
migrateAll(request: types.MigrateAllRequest): Promise<types.ErrorResponse>;
|
|
9
|
+
migrateRoles(): Promise<types.ErrorResponse>;
|
|
10
|
+
previewConversion(request: types.PreviewConversionRequest): Promise<types.ErrorResponse>;
|
|
11
|
+
}
|
|
12
|
+
export declare function permissionsClient(): PermissionsPlugin;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated permissions plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PermissionsPlugin = void 0;
|
|
5
|
+
exports.permissionsClient = permissionsClient;
|
|
6
|
+
class PermissionsPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'permissions';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async migrateAll(request) {
|
|
14
|
+
const path = '/migrate/all';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async migrateRoles() {
|
|
20
|
+
const path = '/migrate/roles';
|
|
21
|
+
return this.client.request('POST', path);
|
|
22
|
+
}
|
|
23
|
+
async previewConversion(request) {
|
|
24
|
+
const path = '/migrate/preview';
|
|
25
|
+
return this.client.request('POST', path, {
|
|
26
|
+
body: request,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.PermissionsPlugin = PermissionsPlugin;
|
|
31
|
+
function permissionsClient() {
|
|
32
|
+
return new PermissionsPlugin();
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class SecretsPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "secrets";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
list(request?: types.ListSecretsRequest): Promise<types.ListSecretsResponse>;
|
|
9
|
+
create(request: types.CreateSecretRequest): Promise<types.SecretDTO>;
|
|
10
|
+
get(params: {
|
|
11
|
+
id: string;
|
|
12
|
+
}, request?: types.GetSecretRequest): Promise<types.SecretDTO>;
|
|
13
|
+
getValue(params: {
|
|
14
|
+
id: string;
|
|
15
|
+
}, request?: types.GetValueRequest): Promise<types.RevealValueResponse>;
|
|
16
|
+
update(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}, request: types.UpdateSecretRequest): Promise<types.SecretDTO>;
|
|
19
|
+
delete(params: {
|
|
20
|
+
id: string;
|
|
21
|
+
}, request?: types.DeleteSecretRequest): Promise<types.SuccessResponse>;
|
|
22
|
+
getByPath(): Promise<types.ErrorResponse>;
|
|
23
|
+
getVersions(params: {
|
|
24
|
+
id: string;
|
|
25
|
+
}, request?: types.GetVersionsRequest): Promise<types.ListVersionsResponse>;
|
|
26
|
+
rollback(params: {
|
|
27
|
+
id: string;
|
|
28
|
+
version: number;
|
|
29
|
+
}, request: types.RollbackRequest): Promise<types.SecretDTO>;
|
|
30
|
+
getStats(): Promise<types.StatsDTO>;
|
|
31
|
+
getTree(request?: types.GetTreeRequest): Promise<types.SecretTreeNode>;
|
|
32
|
+
}
|
|
33
|
+
export declare function secretsClient(): SecretsPlugin;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated secrets plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SecretsPlugin = void 0;
|
|
5
|
+
exports.secretsClient = secretsClient;
|
|
6
|
+
class SecretsPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'secrets';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async list(request) {
|
|
14
|
+
const path = '/list';
|
|
15
|
+
return this.client.request('GET', path, {
|
|
16
|
+
query: this.client.toQueryParams(request),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async create(request) {
|
|
20
|
+
const path = '/create';
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async get(params, request) {
|
|
26
|
+
const path = `/${params.id}`;
|
|
27
|
+
return this.client.request('GET', path, {
|
|
28
|
+
query: this.client.toQueryParams(request),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async getValue(params, request) {
|
|
32
|
+
const path = `/${params.id}/value`;
|
|
33
|
+
return this.client.request('GET', path, {
|
|
34
|
+
query: this.client.toQueryParams(request),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
async update(params, request) {
|
|
38
|
+
const path = `/${params.id}`;
|
|
39
|
+
return this.client.request('PUT', path, {
|
|
40
|
+
body: request,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async delete(params, request) {
|
|
44
|
+
const path = `/${params.id}`;
|
|
45
|
+
return this.client.request('DELETE', path, {
|
|
46
|
+
query: this.client.toQueryParams(request),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
async getByPath() {
|
|
50
|
+
const path = '/path/*path';
|
|
51
|
+
return this.client.request('GET', path);
|
|
52
|
+
}
|
|
53
|
+
async getVersions(params, request) {
|
|
54
|
+
const path = `/${params.id}/versions`;
|
|
55
|
+
return this.client.request('GET', path, {
|
|
56
|
+
query: this.client.toQueryParams(request),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async rollback(params, request) {
|
|
60
|
+
const path = `/${params.id}/rollback/${params.version}`;
|
|
61
|
+
return this.client.request('POST', path, {
|
|
62
|
+
body: request,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async getStats() {
|
|
66
|
+
const path = '/stats';
|
|
67
|
+
return this.client.request('GET', path);
|
|
68
|
+
}
|
|
69
|
+
async getTree(request) {
|
|
70
|
+
const path = '/tree';
|
|
71
|
+
return this.client.request('GET', path, {
|
|
72
|
+
query: this.client.toQueryParams(request),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.SecretsPlugin = SecretsPlugin;
|
|
77
|
+
function secretsClient() {
|
|
78
|
+
return new SecretsPlugin();
|
|
79
|
+
}
|
package/dist/plugins/social.d.ts
CHANGED
|
@@ -6,9 +6,18 @@ export declare class SocialPlugin implements ClientPlugin {
|
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
8
|
signIn(request: types.SignInRequest): Promise<types.AuthURLResponse>;
|
|
9
|
-
callback(
|
|
9
|
+
callback(params: {
|
|
10
|
+
provider: string;
|
|
11
|
+
}, query?: {
|
|
12
|
+
state?: string;
|
|
13
|
+
code?: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
errorDescription?: string;
|
|
16
|
+
}): Promise<types.CallbackDataResponse>;
|
|
10
17
|
linkAccount(request: types.LinkAccountRequest): Promise<types.AuthURLResponse>;
|
|
11
|
-
unlinkAccount(
|
|
18
|
+
unlinkAccount(params: {
|
|
19
|
+
provider: string;
|
|
20
|
+
}): Promise<types.MessageResponse>;
|
|
12
21
|
listProviders(): Promise<types.ProvidersResponse>;
|
|
13
22
|
}
|
|
14
23
|
export declare function socialClient(): SocialPlugin;
|
package/dist/plugins/social.js
CHANGED
|
@@ -16,9 +16,11 @@ class SocialPlugin {
|
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
async callback() {
|
|
20
|
-
const path =
|
|
21
|
-
return this.client.request('GET', path
|
|
19
|
+
async callback(params, query) {
|
|
20
|
+
const path = `/callback/${params.provider}`;
|
|
21
|
+
return this.client.request('GET', path, {
|
|
22
|
+
query: this.client.toQueryParams(query),
|
|
23
|
+
});
|
|
22
24
|
}
|
|
23
25
|
async linkAccount(request) {
|
|
24
26
|
const path = '/account/link';
|
|
@@ -26,8 +28,8 @@ class SocialPlugin {
|
|
|
26
28
|
body: request,
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
|
-
async unlinkAccount() {
|
|
30
|
-
const path =
|
|
31
|
+
async unlinkAccount(params) {
|
|
32
|
+
const path = `/account/unlink/${params.provider}`;
|
|
31
33
|
return this.client.request('DELETE', path);
|
|
32
34
|
}
|
|
33
35
|
async listProviders() {
|
package/dist/plugins/sso.d.ts
CHANGED
|
@@ -7,9 +7,17 @@ export declare class SsoPlugin implements ClientPlugin {
|
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
8
|
registerProvider(request: types.RegisterProviderRequest): Promise<types.ProviderRegisteredResponse>;
|
|
9
9
|
sAMLSPMetadata(): Promise<types.MetadataResponse>;
|
|
10
|
-
sAMLLogin(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
sAMLLogin(params: {
|
|
11
|
+
providerId: string;
|
|
12
|
+
}, request: types.SAMLLoginRequest): Promise<types.SAMLLoginResponse>;
|
|
13
|
+
sAMLCallback(params: {
|
|
14
|
+
providerId: string;
|
|
15
|
+
}): Promise<types.SSOAuthResponse>;
|
|
16
|
+
oIDCLogin(params: {
|
|
17
|
+
providerId: string;
|
|
18
|
+
}, request: types.OIDCLoginRequest): Promise<types.OIDCLoginResponse>;
|
|
19
|
+
oIDCCallback(params: {
|
|
20
|
+
providerId: string;
|
|
21
|
+
}): Promise<types.SSOAuthResponse>;
|
|
14
22
|
}
|
|
15
23
|
export declare function ssoClient(): SsoPlugin;
|
package/dist/plugins/sso.js
CHANGED
|
@@ -20,24 +20,24 @@ class SsoPlugin {
|
|
|
20
20
|
const path = '/saml2/sp/metadata';
|
|
21
21
|
return this.client.request('GET', path);
|
|
22
22
|
}
|
|
23
|
-
async sAMLLogin(request) {
|
|
24
|
-
const path =
|
|
23
|
+
async sAMLLogin(params, request) {
|
|
24
|
+
const path = `/saml2/login/${params.providerId}`;
|
|
25
25
|
return this.client.request('POST', path, {
|
|
26
26
|
body: request,
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
async sAMLCallback() {
|
|
30
|
-
const path =
|
|
29
|
+
async sAMLCallback(params) {
|
|
30
|
+
const path = `/saml2/callback/${params.providerId}`;
|
|
31
31
|
return this.client.request('POST', path);
|
|
32
32
|
}
|
|
33
|
-
async oIDCLogin(request) {
|
|
34
|
-
const path =
|
|
33
|
+
async oIDCLogin(params, request) {
|
|
34
|
+
const path = `/oidc/login/${params.providerId}`;
|
|
35
35
|
return this.client.request('POST', path, {
|
|
36
36
|
body: request,
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
async oIDCCallback() {
|
|
40
|
-
const path =
|
|
39
|
+
async oIDCCallback(params) {
|
|
40
|
+
const path = `/oidc/callback/${params.providerId}`;
|
|
41
41
|
return this.client.request('GET', path);
|
|
42
42
|
}
|
|
43
43
|
}
|
package/dist/plugins/stepup.d.ts
CHANGED
|
@@ -5,19 +5,29 @@ export declare class StepupPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "stepup";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
evaluate(request: types.EvaluateRequest): Promise<
|
|
9
|
-
verify(request: types.VerifyRequest): Promise<
|
|
10
|
-
getRequirement(
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
evaluate(request: types.EvaluateRequest): Promise<types.StepUpEvaluationResponse>;
|
|
9
|
+
verify(request: types.VerifyRequest): Promise<types.StepUpVerificationResponse>;
|
|
10
|
+
getRequirement(params: {
|
|
11
|
+
id: string;
|
|
12
|
+
}): Promise<types.StepUpRequirementResponse>;
|
|
13
|
+
listPendingRequirements(): Promise<types.StepUpRequirementsResponse>;
|
|
14
|
+
listVerifications(): Promise<types.StepUpVerificationsResponse>;
|
|
13
15
|
listRememberedDevices(): Promise<types.StepUpDevicesResponse>;
|
|
14
|
-
forgetDevice(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
forgetDevice(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}): Promise<types.StepUpStatusResponse>;
|
|
19
|
+
createPolicy(request: types.StepUpPolicy): Promise<types.StepUpPolicyResponse>;
|
|
20
|
+
listPolicies(): Promise<types.StepUpPoliciesResponse>;
|
|
21
|
+
getPolicy(params: {
|
|
22
|
+
id: string;
|
|
23
|
+
}): Promise<types.StepUpPolicyResponse>;
|
|
24
|
+
updatePolicy(params: {
|
|
25
|
+
id: string;
|
|
26
|
+
}, request: types.StepUpPolicy): Promise<types.StepUpPolicyResponse>;
|
|
27
|
+
deletePolicy(params: {
|
|
28
|
+
id: string;
|
|
29
|
+
}): Promise<types.StepUpStatusResponse>;
|
|
30
|
+
getAuditLogs(): Promise<types.StepUpAuditLogsResponse>;
|
|
31
|
+
status(): Promise<types.StepUpStatusResponse>;
|
|
22
32
|
}
|
|
23
33
|
export declare function stepupClient(): StepupPlugin;
|
package/dist/plugins/stepup.js
CHANGED
|
@@ -22,8 +22,8 @@ class StepupPlugin {
|
|
|
22
22
|
body: request,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
async getRequirement() {
|
|
26
|
-
const path =
|
|
25
|
+
async getRequirement(params) {
|
|
26
|
+
const path = `/requirements/${params.id}`;
|
|
27
27
|
return this.client.request('GET', path);
|
|
28
28
|
}
|
|
29
29
|
async listPendingRequirements() {
|
|
@@ -38,8 +38,8 @@ class StepupPlugin {
|
|
|
38
38
|
const path = '/devices';
|
|
39
39
|
return this.client.request('GET', path);
|
|
40
40
|
}
|
|
41
|
-
async forgetDevice() {
|
|
42
|
-
const path =
|
|
41
|
+
async forgetDevice(params) {
|
|
42
|
+
const path = `/devices/${params.id}`;
|
|
43
43
|
return this.client.request('DELETE', path);
|
|
44
44
|
}
|
|
45
45
|
async createPolicy(request) {
|
|
@@ -52,18 +52,18 @@ class StepupPlugin {
|
|
|
52
52
|
const path = '/policies';
|
|
53
53
|
return this.client.request('GET', path);
|
|
54
54
|
}
|
|
55
|
-
async getPolicy() {
|
|
56
|
-
const path =
|
|
55
|
+
async getPolicy(params) {
|
|
56
|
+
const path = `/policies/${params.id}`;
|
|
57
57
|
return this.client.request('GET', path);
|
|
58
58
|
}
|
|
59
|
-
async updatePolicy(request) {
|
|
60
|
-
const path =
|
|
59
|
+
async updatePolicy(params, request) {
|
|
60
|
+
const path = `/policies/${params.id}`;
|
|
61
61
|
return this.client.request('PUT', path, {
|
|
62
62
|
body: request,
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
async deletePolicy() {
|
|
66
|
-
const path =
|
|
65
|
+
async deletePolicy(params) {
|
|
66
|
+
const path = `/policies/${params.id}`;
|
|
67
67
|
return this.client.request('DELETE', path);
|
|
68
68
|
}
|
|
69
69
|
async getAuditLogs() {
|
package/dist/plugins/twofa.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare class TwofaPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "twofa";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
enable(
|
|
9
|
-
verify(
|
|
10
|
-
disable(
|
|
11
|
-
generateBackupCodes(
|
|
12
|
-
sendOTP(
|
|
13
|
-
status(
|
|
8
|
+
enable(): Promise<void>;
|
|
9
|
+
verify(): Promise<types.StatusResponse>;
|
|
10
|
+
disable(): Promise<types.StatusResponse>;
|
|
11
|
+
generateBackupCodes(): Promise<types.CodesResponse>;
|
|
12
|
+
sendOTP(): Promise<types.OTPSentResponse>;
|
|
13
|
+
status(): Promise<types.TwoFAStatusResponse>;
|
|
14
14
|
}
|
|
15
15
|
export declare function twofaClient(): TwofaPlugin;
|
package/dist/plugins/twofa.js
CHANGED
|
@@ -10,41 +10,29 @@ class TwofaPlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async enable(
|
|
13
|
+
async enable() {
|
|
14
14
|
const path = '/2fa/enable';
|
|
15
|
-
return this.client.request('POST', path
|
|
16
|
-
body: request,
|
|
17
|
-
});
|
|
15
|
+
return this.client.request('POST', path);
|
|
18
16
|
}
|
|
19
|
-
async verify(
|
|
17
|
+
async verify() {
|
|
20
18
|
const path = '/2fa/verify';
|
|
21
|
-
return this.client.request('POST', path
|
|
22
|
-
body: request,
|
|
23
|
-
});
|
|
19
|
+
return this.client.request('POST', path);
|
|
24
20
|
}
|
|
25
|
-
async disable(
|
|
21
|
+
async disable() {
|
|
26
22
|
const path = '/2fa/disable';
|
|
27
|
-
return this.client.request('POST', path
|
|
28
|
-
body: request,
|
|
29
|
-
});
|
|
23
|
+
return this.client.request('POST', path);
|
|
30
24
|
}
|
|
31
|
-
async generateBackupCodes(
|
|
25
|
+
async generateBackupCodes() {
|
|
32
26
|
const path = '/2fa/generate-backup-codes';
|
|
33
|
-
return this.client.request('POST', path
|
|
34
|
-
body: request,
|
|
35
|
-
});
|
|
27
|
+
return this.client.request('POST', path);
|
|
36
28
|
}
|
|
37
|
-
async sendOTP(
|
|
29
|
+
async sendOTP() {
|
|
38
30
|
const path = '/2fa/send-otp';
|
|
39
|
-
return this.client.request('POST', path
|
|
40
|
-
body: request,
|
|
41
|
-
});
|
|
31
|
+
return this.client.request('POST', path);
|
|
42
32
|
}
|
|
43
|
-
async status(
|
|
33
|
+
async status() {
|
|
44
34
|
const path = '/2fa/status';
|
|
45
|
-
return this.client.request('POST', path
|
|
46
|
-
body: request,
|
|
47
|
-
});
|
|
35
|
+
return this.client.request('POST', path);
|
|
48
36
|
}
|
|
49
37
|
}
|
|
50
38
|
exports.TwofaPlugin = TwofaPlugin;
|
|
@@ -5,7 +5,7 @@ export declare class UsernamePlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "username";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
signUp(): Promise<types.SignUpResponse>;
|
|
9
|
-
signIn(): Promise<types.
|
|
8
|
+
signUp(request: types.SignUpRequest): Promise<types.SignUpResponse>;
|
|
9
|
+
signIn(request: types.SignInRequest): Promise<types.TwoFARequiredResponse>;
|
|
10
10
|
}
|
|
11
11
|
export declare function usernameClient(): UsernamePlugin;
|
package/dist/plugins/username.js
CHANGED
|
@@ -10,13 +10,17 @@ class UsernamePlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async signUp() {
|
|
13
|
+
async signUp(request) {
|
|
14
14
|
const path = '/username/signup';
|
|
15
|
-
return this.client.request('POST', path
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
16
18
|
}
|
|
17
|
-
async signIn() {
|
|
19
|
+
async signIn(request) {
|
|
18
20
|
const path = '/username/signin';
|
|
19
|
-
return this.client.request('POST', path
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
exports.UsernamePlugin = UsernamePlugin;
|