@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
|
@@ -5,98 +5,98 @@ export declare class CompliancePlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "compliance";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
createProfile(request: types.CreateProfileRequest): Promise<
|
|
9
|
-
createProfileFromTemplate(request: types.
|
|
8
|
+
createProfile(request: types.CreateProfileRequest): Promise<types.ComplianceProfileResponse>;
|
|
9
|
+
createProfileFromTemplate(request: types.CreateProfileFromTemplateRequest): Promise<types.ComplianceProfileResponse>;
|
|
10
10
|
getProfile(params: {
|
|
11
11
|
id: string;
|
|
12
|
-
}): Promise<
|
|
12
|
+
}): Promise<types.ComplianceProfileResponse>;
|
|
13
13
|
getAppProfile(params: {
|
|
14
14
|
appId: string;
|
|
15
|
-
}): Promise<
|
|
15
|
+
}): Promise<types.ComplianceProfileResponse>;
|
|
16
16
|
updateProfile(params: {
|
|
17
17
|
id: string;
|
|
18
|
-
}, request: types.UpdateProfileRequest): Promise<
|
|
18
|
+
}, request: types.UpdateProfileRequest): Promise<types.ComplianceProfileResponse>;
|
|
19
19
|
deleteProfile(params: {
|
|
20
20
|
id: string;
|
|
21
|
-
}): Promise<
|
|
21
|
+
}): Promise<types.ComplianceStatusResponse>;
|
|
22
22
|
getComplianceStatus(params: {
|
|
23
23
|
appId: string;
|
|
24
|
-
}): Promise<
|
|
24
|
+
}): Promise<types.ComplianceStatusDetailsResponse>;
|
|
25
25
|
getDashboard(params: {
|
|
26
26
|
appId: string;
|
|
27
|
-
}): Promise<
|
|
27
|
+
}): Promise<types.ComplianceDashboardResponse>;
|
|
28
28
|
runCheck(params: {
|
|
29
29
|
profileId: string;
|
|
30
|
-
}, request: types.
|
|
30
|
+
}, request: types.RunCheckRequest): Promise<types.ComplianceCheckResponse>;
|
|
31
31
|
listChecks(params: {
|
|
32
32
|
profileId: string;
|
|
33
|
-
}): Promise<
|
|
33
|
+
}): Promise<types.ComplianceChecksResponse>;
|
|
34
34
|
getCheck(params: {
|
|
35
35
|
id: string;
|
|
36
|
-
}): Promise<
|
|
36
|
+
}): Promise<types.ComplianceCheckResponse>;
|
|
37
37
|
listViolations(params: {
|
|
38
38
|
appId: string;
|
|
39
|
-
}): Promise<
|
|
39
|
+
}): Promise<types.ComplianceViolationsResponse>;
|
|
40
40
|
getViolation(params: {
|
|
41
41
|
id: string;
|
|
42
|
-
}): Promise<
|
|
42
|
+
}): Promise<types.ComplianceViolationResponse>;
|
|
43
43
|
resolveViolation(params: {
|
|
44
44
|
id: string;
|
|
45
|
-
}): Promise<
|
|
45
|
+
}, request: types.ResolveViolationRequest): Promise<types.ComplianceStatusResponse>;
|
|
46
46
|
generateReport(params: {
|
|
47
47
|
appId: string;
|
|
48
|
-
}, request: types.
|
|
48
|
+
}, request: types.GenerateReportRequest): Promise<types.ComplianceReportResponse>;
|
|
49
49
|
listReports(params: {
|
|
50
50
|
appId: string;
|
|
51
|
-
}): Promise<
|
|
51
|
+
}): Promise<types.ComplianceReportsResponse>;
|
|
52
52
|
getReport(params: {
|
|
53
53
|
id: string;
|
|
54
|
-
}): Promise<
|
|
54
|
+
}): Promise<types.ComplianceReportResponse>;
|
|
55
55
|
downloadReport(params: {
|
|
56
56
|
id: string;
|
|
57
|
-
}): Promise<
|
|
57
|
+
}): Promise<types.ComplianceReportFileResponse>;
|
|
58
58
|
createEvidence(params: {
|
|
59
59
|
appId: string;
|
|
60
|
-
}, request: types.
|
|
60
|
+
}, request: types.CreateEvidenceRequest): Promise<types.ComplianceEvidenceResponse>;
|
|
61
61
|
listEvidence(params: {
|
|
62
62
|
appId: string;
|
|
63
|
-
}): Promise<
|
|
63
|
+
}): Promise<types.ComplianceEvidencesResponse>;
|
|
64
64
|
getEvidence(params: {
|
|
65
65
|
id: string;
|
|
66
|
-
}): Promise<
|
|
66
|
+
}): Promise<types.ComplianceEvidenceResponse>;
|
|
67
67
|
deleteEvidence(params: {
|
|
68
68
|
id: string;
|
|
69
|
-
}): Promise<
|
|
69
|
+
}): Promise<types.ComplianceStatusResponse>;
|
|
70
70
|
createPolicy(params: {
|
|
71
71
|
appId: string;
|
|
72
|
-
}, request: types.
|
|
72
|
+
}, request: types.CreatePolicyRequest): Promise<types.CompliancePolicyResponse>;
|
|
73
73
|
listPolicies(params: {
|
|
74
74
|
appId: string;
|
|
75
|
-
}): Promise<
|
|
75
|
+
}): Promise<types.CompliancePoliciesResponse>;
|
|
76
76
|
getPolicy(params: {
|
|
77
77
|
id: string;
|
|
78
|
-
}): Promise<
|
|
78
|
+
}): Promise<types.CompliancePolicyResponse>;
|
|
79
79
|
updatePolicy(params: {
|
|
80
80
|
id: string;
|
|
81
|
-
}, request: types.
|
|
81
|
+
}, request: types.UpdatePolicyRequest): Promise<types.CompliancePolicyResponse>;
|
|
82
82
|
deletePolicy(params: {
|
|
83
83
|
id: string;
|
|
84
|
-
}): Promise<
|
|
84
|
+
}): Promise<types.ComplianceStatusResponse>;
|
|
85
85
|
createTraining(params: {
|
|
86
86
|
appId: string;
|
|
87
|
-
}, request: types.
|
|
87
|
+
}, request: types.CreateTrainingRequest): Promise<types.ComplianceTrainingResponse>;
|
|
88
88
|
listTraining(params: {
|
|
89
89
|
appId: string;
|
|
90
|
-
}): Promise<
|
|
90
|
+
}): Promise<types.ComplianceTrainingsResponse>;
|
|
91
91
|
getUserTraining(params: {
|
|
92
92
|
userId: string;
|
|
93
|
-
}): Promise<
|
|
93
|
+
}): Promise<types.ComplianceUserTrainingResponse>;
|
|
94
94
|
completeTraining(params: {
|
|
95
95
|
id: string;
|
|
96
|
-
}, request: types.
|
|
97
|
-
listTemplates(): Promise<
|
|
96
|
+
}, request: types.CompleteTrainingRequest): Promise<types.ComplianceStatusResponse>;
|
|
97
|
+
listTemplates(): Promise<types.ComplianceTemplatesResponse>;
|
|
98
98
|
getTemplate(params: {
|
|
99
99
|
standard: string;
|
|
100
|
-
}): Promise<
|
|
100
|
+
}): Promise<types.ComplianceTemplateResponse>;
|
|
101
101
|
}
|
|
102
102
|
export declare function complianceClient(): CompliancePlugin;
|
|
@@ -70,9 +70,11 @@ class CompliancePlugin {
|
|
|
70
70
|
const path = `/violations/${params.id}`;
|
|
71
71
|
return this.client.request('GET', path);
|
|
72
72
|
}
|
|
73
|
-
async resolveViolation(params) {
|
|
73
|
+
async resolveViolation(params, request) {
|
|
74
74
|
const path = `/violations/${params.id}/resolve`;
|
|
75
|
-
return this.client.request('PUT', path
|
|
75
|
+
return this.client.request('PUT', path, {
|
|
76
|
+
body: request,
|
|
77
|
+
});
|
|
76
78
|
}
|
|
77
79
|
async generateReport(params, request) {
|
|
78
80
|
const path = `/apps/${params.appId}/reports`;
|
|
@@ -5,39 +5,39 @@ export declare class ConsentPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "consent";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
createConsent(request: types.CreateConsentRequest): Promise<
|
|
8
|
+
createConsent(request: types.CreateConsentRequest): Promise<types.ConsentRecordResponse>;
|
|
9
9
|
getConsent(params: {
|
|
10
10
|
id: string;
|
|
11
|
-
}): Promise<
|
|
11
|
+
}): Promise<types.ConsentRecordResponse>;
|
|
12
12
|
updateConsent(params: {
|
|
13
13
|
id: string;
|
|
14
|
-
}, request: types.UpdateConsentRequest): Promise<
|
|
14
|
+
}, request: types.UpdateConsentRequest): Promise<types.ConsentRecordResponse>;
|
|
15
15
|
revokeConsent(params: {
|
|
16
16
|
id: string;
|
|
17
|
-
}, request: types.UpdateConsentRequest): Promise<types.
|
|
18
|
-
createConsentPolicy(request: types.CreatePolicyRequest): Promise<
|
|
17
|
+
}, request: types.UpdateConsentRequest): Promise<types.ConsentStatusResponse>;
|
|
18
|
+
createConsentPolicy(request: types.CreatePolicyRequest): Promise<types.ConsentPolicyResponse>;
|
|
19
19
|
getConsentPolicy(params: {
|
|
20
20
|
id: string;
|
|
21
|
-
}): Promise<
|
|
22
|
-
recordCookieConsent(request: types.CookieConsentRequest): Promise<
|
|
23
|
-
getCookieConsent(): Promise<
|
|
24
|
-
requestDataExport(request: types.DataExportRequestInput): Promise<
|
|
21
|
+
}): Promise<types.ConsentPolicyResponse>;
|
|
22
|
+
recordCookieConsent(request: types.CookieConsentRequest): Promise<types.ConsentCookieResponse>;
|
|
23
|
+
getCookieConsent(): Promise<types.ConsentCookieResponse>;
|
|
24
|
+
requestDataExport(request: types.DataExportRequestInput): Promise<types.ConsentExportResponse>;
|
|
25
25
|
getDataExport(params: {
|
|
26
26
|
id: string;
|
|
27
|
-
}): Promise<
|
|
27
|
+
}): Promise<types.ConsentExportResponse>;
|
|
28
28
|
downloadDataExport(params: {
|
|
29
29
|
id: string;
|
|
30
|
-
}): Promise<
|
|
31
|
-
requestDataDeletion(request: types.DataDeletionRequestInput): Promise<
|
|
30
|
+
}): Promise<types.ConsentExportFileResponse>;
|
|
31
|
+
requestDataDeletion(request: types.DataDeletionRequestInput): Promise<types.ConsentDeletionResponse>;
|
|
32
32
|
getDataDeletion(params: {
|
|
33
33
|
id: string;
|
|
34
|
-
}): Promise<
|
|
34
|
+
}): Promise<types.ConsentDeletionResponse>;
|
|
35
35
|
approveDeletionRequest(params: {
|
|
36
36
|
id: string;
|
|
37
|
-
}): Promise<types.
|
|
38
|
-
getPrivacySettings(): Promise<
|
|
39
|
-
updatePrivacySettings(request: types.PrivacySettingsRequest): Promise<
|
|
40
|
-
getConsentAuditLogs(): Promise<
|
|
41
|
-
generateConsentReport(): Promise<
|
|
37
|
+
}): Promise<types.ConsentStatusResponse>;
|
|
38
|
+
getPrivacySettings(): Promise<types.ConsentSettingsResponse>;
|
|
39
|
+
updatePrivacySettings(request: types.PrivacySettingsRequest): Promise<types.ConsentSettingsResponse>;
|
|
40
|
+
getConsentAuditLogs(): Promise<types.ConsentAuditLogsResponse>;
|
|
41
|
+
generateConsentReport(): Promise<types.ConsentReportResponse>;
|
|
42
42
|
}
|
|
43
43
|
export declare function consentClient(): ConsentPlugin;
|
|
@@ -5,8 +5,8 @@ export declare class EmailverificationPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "emailverification";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
send(request: types.SendRequest): Promise<
|
|
9
|
-
verify(): Promise<
|
|
8
|
+
send(request: types.SendRequest): Promise<types.SendResponse>;
|
|
9
|
+
verify(request?: types.VerifyRequest): Promise<types.VerifyResponse>;
|
|
10
10
|
resend(request: types.ResendRequest): Promise<types.ResendResponse>;
|
|
11
11
|
}
|
|
12
12
|
export declare function emailverificationClient(): EmailverificationPlugin;
|
|
@@ -16,9 +16,11 @@ class EmailverificationPlugin {
|
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
async verify() {
|
|
19
|
+
async verify(request) {
|
|
20
20
|
const path = '/email-verification/verify';
|
|
21
|
-
return this.client.request('GET', path
|
|
21
|
+
return this.client.request('GET', path, {
|
|
22
|
+
query: this.client.toQueryParams(request),
|
|
23
|
+
});
|
|
22
24
|
}
|
|
23
25
|
async resend(request) {
|
|
24
26
|
const path = '/email-verification/resend';
|
|
@@ -5,30 +5,30 @@ export declare class IdverificationPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "idverification";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.
|
|
8
|
+
createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.IDVerificationSessionResponse>;
|
|
9
9
|
getVerificationSession(params: {
|
|
10
10
|
id: string;
|
|
11
|
-
}): Promise<types.
|
|
11
|
+
}): Promise<types.IDVerificationSessionResponse>;
|
|
12
12
|
getVerification(params: {
|
|
13
13
|
id: string;
|
|
14
|
-
}): Promise<types.
|
|
15
|
-
getUserVerifications(): Promise<types.
|
|
16
|
-
getUserVerificationStatus(): Promise<types.
|
|
17
|
-
requestReverification(request: types.RequestReverification_req): Promise<types.
|
|
14
|
+
}): Promise<types.IDVerificationResponse>;
|
|
15
|
+
getUserVerifications(): Promise<types.IDVerificationListResponse>;
|
|
16
|
+
getUserVerificationStatus(): Promise<types.IDVerificationStatusResponse>;
|
|
17
|
+
requestReverification(request: types.RequestReverification_req): Promise<types.IDVerificationSessionResponse>;
|
|
18
18
|
handleWebhook(params: {
|
|
19
19
|
provider: string;
|
|
20
|
-
}): Promise<
|
|
20
|
+
}): Promise<types.IDVerificationWebhookResponse>;
|
|
21
21
|
adminBlockUser(params: {
|
|
22
22
|
userId: string;
|
|
23
|
-
}, request: types.AdminBlockUser_req): Promise<types.
|
|
23
|
+
}, request: types.AdminBlockUser_req): Promise<types.IDVerificationStatusResponse>;
|
|
24
24
|
adminUnblockUser(params: {
|
|
25
25
|
userId: string;
|
|
26
|
-
}): Promise<types.
|
|
26
|
+
}): Promise<types.IDVerificationStatusResponse>;
|
|
27
27
|
adminGetUserVerificationStatus(params: {
|
|
28
28
|
userId: string;
|
|
29
|
-
}): Promise<types.
|
|
29
|
+
}): Promise<types.IDVerificationStatusResponse>;
|
|
30
30
|
adminGetUserVerifications(params: {
|
|
31
31
|
userId: string;
|
|
32
|
-
}): Promise<types.
|
|
32
|
+
}): Promise<types.IDVerificationListResponse>;
|
|
33
33
|
}
|
|
34
34
|
export declare function idverificationClient(): IdverificationPlugin;
|
|
@@ -11,53 +11,53 @@ class IdverificationPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async createVerificationSession(request) {
|
|
14
|
-
const path = '/sessions';
|
|
14
|
+
const path = '/verification/sessions';
|
|
15
15
|
return this.client.request('POST', path, {
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
async getVerificationSession(params) {
|
|
20
|
-
const path = `/sessions/${params.id}`;
|
|
20
|
+
const path = `/verification/sessions/${params.id}`;
|
|
21
21
|
return this.client.request('GET', path);
|
|
22
22
|
}
|
|
23
23
|
async getVerification(params) {
|
|
24
|
-
const path =
|
|
24
|
+
const path = `/verification/${params.id}`;
|
|
25
25
|
return this.client.request('GET', path);
|
|
26
26
|
}
|
|
27
27
|
async getUserVerifications() {
|
|
28
|
-
const path = '/me';
|
|
28
|
+
const path = '/verification/me';
|
|
29
29
|
return this.client.request('GET', path);
|
|
30
30
|
}
|
|
31
31
|
async getUserVerificationStatus() {
|
|
32
|
-
const path = '/me/status';
|
|
32
|
+
const path = '/verification/me/status';
|
|
33
33
|
return this.client.request('GET', path);
|
|
34
34
|
}
|
|
35
35
|
async requestReverification(request) {
|
|
36
|
-
const path = '/me/reverify';
|
|
36
|
+
const path = '/verification/me/reverify';
|
|
37
37
|
return this.client.request('POST', path, {
|
|
38
38
|
body: request,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
async handleWebhook(params) {
|
|
42
|
-
const path = `/webhook/${params.provider}`;
|
|
42
|
+
const path = `/verification/webhook/${params.provider}`;
|
|
43
43
|
return this.client.request('POST', path);
|
|
44
44
|
}
|
|
45
45
|
async adminBlockUser(params, request) {
|
|
46
|
-
const path = `/users/${params.userId}/block`;
|
|
46
|
+
const path = `/verification/users/${params.userId}/block`;
|
|
47
47
|
return this.client.request('POST', path, {
|
|
48
48
|
body: request,
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
async adminUnblockUser(params) {
|
|
52
|
-
const path = `/users/${params.userId}/unblock`;
|
|
52
|
+
const path = `/verification/users/${params.userId}/unblock`;
|
|
53
53
|
return this.client.request('POST', path);
|
|
54
54
|
}
|
|
55
55
|
async adminGetUserVerificationStatus(params) {
|
|
56
|
-
const path = `/users/${params.userId}/status`;
|
|
56
|
+
const path = `/verification/users/${params.userId}/status`;
|
|
57
57
|
return this.client.request('GET', path);
|
|
58
58
|
}
|
|
59
59
|
async adminGetUserVerifications(params) {
|
|
60
|
-
const path = `/users/${params.userId}/verifications`;
|
|
60
|
+
const path = `/verification/users/${params.userId}/verifications`;
|
|
61
61
|
return this.client.request('GET', path);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -5,13 +5,13 @@ export declare class ImpersonationPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "impersonation";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
startImpersonation(
|
|
9
|
-
endImpersonation(
|
|
8
|
+
startImpersonation(): Promise<types.ImpersonationStartResponse>;
|
|
9
|
+
endImpersonation(): Promise<types.ImpersonationEndResponse>;
|
|
10
10
|
getImpersonation(params: {
|
|
11
11
|
id: string;
|
|
12
|
-
}): Promise<
|
|
13
|
-
listImpersonations(): Promise<
|
|
14
|
-
listAuditEvents(): Promise<
|
|
15
|
-
verifyImpersonation(): Promise<
|
|
12
|
+
}): Promise<types.ImpersonationSession>;
|
|
13
|
+
listImpersonations(): Promise<types.ImpersonationListResponse>;
|
|
14
|
+
listAuditEvents(): Promise<types.ImpersonationAuditResponse>;
|
|
15
|
+
verifyImpersonation(): Promise<types.ImpersonationVerifyResponse>;
|
|
16
16
|
}
|
|
17
17
|
export declare function impersonationClient(): ImpersonationPlugin;
|
|
@@ -10,32 +10,28 @@ class ImpersonationPlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async startImpersonation(
|
|
14
|
-
const path = '/start';
|
|
15
|
-
return this.client.request('POST', path
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const path = '/end';
|
|
21
|
-
return this.client.request('POST', path, {
|
|
22
|
-
body: request,
|
|
23
|
-
});
|
|
13
|
+
async startImpersonation() {
|
|
14
|
+
const path = '/impersonation/start';
|
|
15
|
+
return this.client.request('POST', path);
|
|
16
|
+
}
|
|
17
|
+
async endImpersonation() {
|
|
18
|
+
const path = '/impersonation/end';
|
|
19
|
+
return this.client.request('POST', path);
|
|
24
20
|
}
|
|
25
21
|
async getImpersonation(params) {
|
|
26
|
-
const path =
|
|
22
|
+
const path = `/impersonation/${params.id}`;
|
|
27
23
|
return this.client.request('GET', path);
|
|
28
24
|
}
|
|
29
25
|
async listImpersonations() {
|
|
30
|
-
const path = '/';
|
|
26
|
+
const path = '/impersonation/';
|
|
31
27
|
return this.client.request('GET', path);
|
|
32
28
|
}
|
|
33
29
|
async listAuditEvents() {
|
|
34
|
-
const path = '/audit';
|
|
30
|
+
const path = '/impersonation/audit';
|
|
35
31
|
return this.client.request('GET', path);
|
|
36
32
|
}
|
|
37
33
|
async verifyImpersonation() {
|
|
38
|
-
const path = '/verify';
|
|
34
|
+
const path = '/impersonation/verify';
|
|
39
35
|
return this.client.request('POST', path);
|
|
40
36
|
}
|
|
41
37
|
}
|
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() {
|
|
14
|
-
const path = '/createjwtkey';
|
|
15
|
-
return this.client.request('POST', path
|
|
13
|
+
async createJWTKey(request) {
|
|
14
|
+
const path = '/jwt/createjwtkey';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
16
18
|
}
|
|
17
|
-
async listJWTKeys() {
|
|
18
|
-
const path = '/listjwtkeys';
|
|
19
|
-
return this.client.request('GET', path
|
|
19
|
+
async listJWTKeys(request) {
|
|
20
|
+
const path = '/jwt/listjwtkeys';
|
|
21
|
+
return this.client.request('GET', path, {
|
|
22
|
+
query: this.client.toQueryParams(request),
|
|
23
|
+
});
|
|
20
24
|
}
|
|
21
25
|
async getJWKS() {
|
|
22
|
-
const path = '/jwks';
|
|
26
|
+
const path = '/jwt/jwks';
|
|
23
27
|
return this.client.request('GET', path);
|
|
24
28
|
}
|
|
25
|
-
async generateToken() {
|
|
26
|
-
const path = '/generate';
|
|
27
|
-
return this.client.request('POST', path
|
|
29
|
+
async generateToken(request) {
|
|
30
|
+
const path = '/jwt/generate';
|
|
31
|
+
return this.client.request('POST', path, {
|
|
32
|
+
body: request,
|
|
33
|
+
});
|
|
28
34
|
}
|
|
29
|
-
async verifyToken() {
|
|
30
|
-
const path = '/verify';
|
|
31
|
-
return this.client.request('POST', path
|
|
35
|
+
async verifyToken(request) {
|
|
36
|
+
const path = '/jwt/verify';
|
|
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;
|