@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
|
@@ -26,162 +26,162 @@ export class CompliancePlugin implements ClientPlugin {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
async getProfile(): Promise<void> {
|
|
30
|
-
const path =
|
|
29
|
+
async getProfile(params: { id: string }): Promise<void> {
|
|
30
|
+
const path = `/profiles/${params.id}`;
|
|
31
31
|
return this.client.request<void>('GET', path);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
async getAppProfile(): Promise<void> {
|
|
35
|
-
const path =
|
|
34
|
+
async getAppProfile(params: { appId: string }): Promise<void> {
|
|
35
|
+
const path = `/apps/${params.appId}/profile`;
|
|
36
36
|
return this.client.request<void>('GET', path);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
async updateProfile(request: types.UpdateProfileRequest): Promise<void> {
|
|
40
|
-
const path =
|
|
39
|
+
async updateProfile(params: { id: string }, request: types.UpdateProfileRequest): Promise<void> {
|
|
40
|
+
const path = `/profiles/${params.id}`;
|
|
41
41
|
return this.client.request<void>('PUT', path, {
|
|
42
42
|
body: request,
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
async deleteProfile(): Promise<void> {
|
|
47
|
-
const path =
|
|
46
|
+
async deleteProfile(params: { id: string }): Promise<void> {
|
|
47
|
+
const path = `/profiles/${params.id}`;
|
|
48
48
|
return this.client.request<void>('DELETE', path);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
async getComplianceStatus(): Promise<void> {
|
|
52
|
-
const path =
|
|
51
|
+
async getComplianceStatus(params: { appId: string }): Promise<void> {
|
|
52
|
+
const path = `/apps/${params.appId}/status`;
|
|
53
53
|
return this.client.request<void>('GET', path);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
async getDashboard(): Promise<void> {
|
|
57
|
-
const path =
|
|
56
|
+
async getDashboard(params: { appId: string }): Promise<void> {
|
|
57
|
+
const path = `/apps/${params.appId}/dashboard`;
|
|
58
58
|
return this.client.request<void>('GET', path);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
async runCheck(request: types.RunCheck_req): Promise<void> {
|
|
62
|
-
const path =
|
|
61
|
+
async runCheck(params: { profileId: string }, request: types.RunCheck_req): Promise<void> {
|
|
62
|
+
const path = `/profiles/${params.profileId}/checks`;
|
|
63
63
|
return this.client.request<void>('POST', path, {
|
|
64
64
|
body: request,
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
async listChecks(): Promise<void> {
|
|
69
|
-
const path =
|
|
68
|
+
async listChecks(params: { profileId: string }): Promise<void> {
|
|
69
|
+
const path = `/profiles/${params.profileId}/checks`;
|
|
70
70
|
return this.client.request<void>('GET', path);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
async getCheck(): Promise<void> {
|
|
74
|
-
const path =
|
|
73
|
+
async getCheck(params: { id: string }): Promise<void> {
|
|
74
|
+
const path = `/checks/${params.id}`;
|
|
75
75
|
return this.client.request<void>('GET', path);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
async listViolations(): Promise<void> {
|
|
79
|
-
const path =
|
|
78
|
+
async listViolations(params: { appId: string }): Promise<void> {
|
|
79
|
+
const path = `/apps/${params.appId}/violations`;
|
|
80
80
|
return this.client.request<void>('GET', path);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
async getViolation(): Promise<void> {
|
|
84
|
-
const path =
|
|
83
|
+
async getViolation(params: { id: string }): Promise<void> {
|
|
84
|
+
const path = `/violations/${params.id}`;
|
|
85
85
|
return this.client.request<void>('GET', path);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
async resolveViolation(): Promise<void> {
|
|
89
|
-
const path =
|
|
88
|
+
async resolveViolation(params: { id: string }): Promise<void> {
|
|
89
|
+
const path = `/violations/${params.id}/resolve`;
|
|
90
90
|
return this.client.request<void>('PUT', path);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
async generateReport(request: types.GenerateReport_req): Promise<void> {
|
|
94
|
-
const path =
|
|
93
|
+
async generateReport(params: { appId: string }, request: types.GenerateReport_req): Promise<void> {
|
|
94
|
+
const path = `/apps/${params.appId}/reports`;
|
|
95
95
|
return this.client.request<void>('POST', path, {
|
|
96
96
|
body: request,
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
async listReports(): Promise<void> {
|
|
101
|
-
const path =
|
|
100
|
+
async listReports(params: { appId: string }): Promise<void> {
|
|
101
|
+
const path = `/apps/${params.appId}/reports`;
|
|
102
102
|
return this.client.request<void>('GET', path);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
async getReport(): Promise<void> {
|
|
106
|
-
const path =
|
|
105
|
+
async getReport(params: { id: string }): Promise<void> {
|
|
106
|
+
const path = `/reports/${params.id}`;
|
|
107
107
|
return this.client.request<void>('GET', path);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
async downloadReport(): Promise<void> {
|
|
111
|
-
const path =
|
|
110
|
+
async downloadReport(params: { id: string }): Promise<void> {
|
|
111
|
+
const path = `/reports/${params.id}/download`;
|
|
112
112
|
return this.client.request<void>('GET', path);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
async createEvidence(request: types.CreateEvidence_req): Promise<void> {
|
|
116
|
-
const path =
|
|
115
|
+
async createEvidence(params: { appId: string }, request: types.CreateEvidence_req): Promise<void> {
|
|
116
|
+
const path = `/apps/${params.appId}/evidence`;
|
|
117
117
|
return this.client.request<void>('POST', path, {
|
|
118
118
|
body: request,
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
async listEvidence(): Promise<void> {
|
|
123
|
-
const path =
|
|
122
|
+
async listEvidence(params: { appId: string }): Promise<void> {
|
|
123
|
+
const path = `/apps/${params.appId}/evidence`;
|
|
124
124
|
return this.client.request<void>('GET', path);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
async getEvidence(): Promise<void> {
|
|
128
|
-
const path =
|
|
127
|
+
async getEvidence(params: { id: string }): Promise<void> {
|
|
128
|
+
const path = `/evidence/${params.id}`;
|
|
129
129
|
return this.client.request<void>('GET', path);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
async deleteEvidence(): Promise<void> {
|
|
133
|
-
const path =
|
|
132
|
+
async deleteEvidence(params: { id: string }): Promise<void> {
|
|
133
|
+
const path = `/evidence/${params.id}`;
|
|
134
134
|
return this.client.request<void>('DELETE', path);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
async createPolicy(request: types.CreatePolicy_req): Promise<void> {
|
|
138
|
-
const path =
|
|
137
|
+
async createPolicy(params: { appId: string }, request: types.CreatePolicy_req): Promise<void> {
|
|
138
|
+
const path = `/apps/${params.appId}/policies`;
|
|
139
139
|
return this.client.request<void>('POST', path, {
|
|
140
140
|
body: request,
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
async listPolicies(): Promise<void> {
|
|
145
|
-
const path =
|
|
144
|
+
async listPolicies(params: { appId: string }): Promise<void> {
|
|
145
|
+
const path = `/apps/${params.appId}/policies`;
|
|
146
146
|
return this.client.request<void>('GET', path);
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
async getPolicy(): Promise<void> {
|
|
150
|
-
const path =
|
|
149
|
+
async getPolicy(params: { id: string }): Promise<void> {
|
|
150
|
+
const path = `/policies/${params.id}`;
|
|
151
151
|
return this.client.request<void>('GET', path);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
async updatePolicy(request: types.UpdatePolicy_req): Promise<void> {
|
|
155
|
-
const path =
|
|
154
|
+
async updatePolicy(params: { id: string }, request: types.UpdatePolicy_req): Promise<void> {
|
|
155
|
+
const path = `/policies/${params.id}`;
|
|
156
156
|
return this.client.request<void>('PUT', path, {
|
|
157
157
|
body: request,
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
async deletePolicy(): Promise<void> {
|
|
162
|
-
const path =
|
|
161
|
+
async deletePolicy(params: { id: string }): Promise<void> {
|
|
162
|
+
const path = `/policies/${params.id}`;
|
|
163
163
|
return this.client.request<void>('DELETE', path);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
async createTraining(request: types.CreateTraining_req): Promise<void> {
|
|
167
|
-
const path =
|
|
166
|
+
async createTraining(params: { appId: string }, request: types.CreateTraining_req): Promise<void> {
|
|
167
|
+
const path = `/apps/${params.appId}/training`;
|
|
168
168
|
return this.client.request<void>('POST', path, {
|
|
169
169
|
body: request,
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
async listTraining(): Promise<void> {
|
|
174
|
-
const path =
|
|
173
|
+
async listTraining(params: { appId: string }): Promise<void> {
|
|
174
|
+
const path = `/apps/${params.appId}/training`;
|
|
175
175
|
return this.client.request<void>('GET', path);
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
async getUserTraining(): Promise<void> {
|
|
179
|
-
const path =
|
|
178
|
+
async getUserTraining(params: { userId: string }): Promise<void> {
|
|
179
|
+
const path = `/users/${params.userId}/training`;
|
|
180
180
|
return this.client.request<void>('GET', path);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
async completeTraining(request: types.CompleteTraining_req): Promise<void> {
|
|
184
|
-
const path =
|
|
183
|
+
async completeTraining(params: { id: string }, request: types.CompleteTraining_req): Promise<void> {
|
|
184
|
+
const path = `/training/${params.id}/complete`;
|
|
185
185
|
return this.client.request<void>('PUT', path, {
|
|
186
186
|
body: request,
|
|
187
187
|
});
|
|
@@ -192,8 +192,8 @@ export class CompliancePlugin implements ClientPlugin {
|
|
|
192
192
|
return this.client.request<void>('GET', path);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
async getTemplate(): Promise<void> {
|
|
196
|
-
const path =
|
|
195
|
+
async getTemplate(params: { standard: string }): Promise<void> {
|
|
196
|
+
const path = `/templates/${params.standard}`;
|
|
197
197
|
return this.client.request<void>('GET', path);
|
|
198
198
|
}
|
|
199
199
|
|
package/src/plugins/consent.ts
CHANGED
|
@@ -19,20 +19,20 @@ export class ConsentPlugin implements ClientPlugin {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async getConsent(): Promise<void> {
|
|
23
|
-
const path =
|
|
22
|
+
async getConsent(params: { id: string }): Promise<void> {
|
|
23
|
+
const path = `/records/${params.id}`;
|
|
24
24
|
return this.client.request<void>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async updateConsent(request: types.UpdateConsentRequest): Promise<void> {
|
|
28
|
-
const path =
|
|
27
|
+
async updateConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<void> {
|
|
28
|
+
const path = `/records/${params.id}`;
|
|
29
29
|
return this.client.request<void>('PUT', path, {
|
|
30
30
|
body: request,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
async revokeConsent(request: types.UpdateConsentRequest): Promise<types.MessageResponse> {
|
|
35
|
-
const path =
|
|
34
|
+
async revokeConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<types.MessageResponse> {
|
|
35
|
+
const path = `/revoke/${params.id}`;
|
|
36
36
|
return this.client.request<types.MessageResponse>('POST', path, {
|
|
37
37
|
body: request,
|
|
38
38
|
});
|
|
@@ -45,8 +45,8 @@ export class ConsentPlugin implements ClientPlugin {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
async getConsentPolicy(): Promise<void> {
|
|
49
|
-
const path =
|
|
48
|
+
async getConsentPolicy(params: { id: string }): Promise<void> {
|
|
49
|
+
const path = `/policies/${params.id}`;
|
|
50
50
|
return this.client.request<void>('GET', path);
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -69,13 +69,13 @@ export class ConsentPlugin implements ClientPlugin {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
async getDataExport(): Promise<void> {
|
|
73
|
-
const path =
|
|
72
|
+
async getDataExport(params: { id: string }): Promise<void> {
|
|
73
|
+
const path = `/export/${params.id}`;
|
|
74
74
|
return this.client.request<void>('GET', path);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
async downloadDataExport(): Promise<void> {
|
|
78
|
-
const path =
|
|
77
|
+
async downloadDataExport(params: { id: string }): Promise<void> {
|
|
78
|
+
const path = `/export/${params.id}/download`;
|
|
79
79
|
return this.client.request<void>('GET', path);
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -86,13 +86,13 @@ export class ConsentPlugin implements ClientPlugin {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
async getDataDeletion(): Promise<void> {
|
|
90
|
-
const path =
|
|
89
|
+
async getDataDeletion(params: { id: string }): Promise<void> {
|
|
90
|
+
const path = `/deletion/${params.id}`;
|
|
91
91
|
return this.client.request<void>('GET', path);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
async approveDeletionRequest(): Promise<types.MessageResponse> {
|
|
95
|
-
const path =
|
|
94
|
+
async approveDeletionRequest(params: { id: string }): Promise<types.MessageResponse> {
|
|
95
|
+
const path = `/deletion/${params.id}/approve`;
|
|
96
96
|
return this.client.request<types.MessageResponse>('POST', path);
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Auto-generated emailverification plugin
|
|
2
|
+
|
|
3
|
+
import { ClientPlugin } from '../plugin';
|
|
4
|
+
import { AuthsomeClient } from '../client';
|
|
5
|
+
import * as types from '../types';
|
|
6
|
+
|
|
7
|
+
export class EmailverificationPlugin implements ClientPlugin {
|
|
8
|
+
readonly id = 'emailverification';
|
|
9
|
+
private client!: AuthsomeClient;
|
|
10
|
+
|
|
11
|
+
init(client: AuthsomeClient): void {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async send(request: types.SendRequest): Promise<void> {
|
|
16
|
+
const path = '/email-verification/send';
|
|
17
|
+
return this.client.request<void>('POST', path, {
|
|
18
|
+
body: request,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async verify(): Promise<void> {
|
|
23
|
+
const path = '/email-verification/verify';
|
|
24
|
+
return this.client.request<void>('GET', path);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async resend(request: types.ResendRequest): Promise<types.ResendResponse> {
|
|
28
|
+
const path = '/email-verification/resend';
|
|
29
|
+
return this.client.request<types.ResendResponse>('POST', path, {
|
|
30
|
+
body: request,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function emailverificationClient(): EmailverificationPlugin {
|
|
37
|
+
return new EmailverificationPlugin();
|
|
38
|
+
}
|
|
@@ -19,13 +19,13 @@ export class IdverificationPlugin implements ClientPlugin {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async getVerificationSession(): Promise<types.VerificationSessionResponse> {
|
|
23
|
-
const path =
|
|
22
|
+
async getVerificationSession(params: { id: string }): Promise<types.VerificationSessionResponse> {
|
|
23
|
+
const path = `/sessions/${params.id}`;
|
|
24
24
|
return this.client.request<types.VerificationSessionResponse>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async getVerification(): Promise<types.VerificationResponse> {
|
|
28
|
-
const path =
|
|
27
|
+
async getVerification(params: { id: string }): Promise<types.VerificationResponse> {
|
|
28
|
+
const path = `/${params.id}`;
|
|
29
29
|
return this.client.request<types.VerificationResponse>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -46,30 +46,30 @@ export class IdverificationPlugin implements ClientPlugin {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
async handleWebhook(): Promise<void> {
|
|
50
|
-
const path =
|
|
49
|
+
async handleWebhook(params: { provider: string }): Promise<void> {
|
|
50
|
+
const path = `/webhook/${params.provider}`;
|
|
51
51
|
return this.client.request<void>('POST', path);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
async adminBlockUser(request: types.AdminBlockUser_req): Promise<types.MessageResponse> {
|
|
55
|
-
const path =
|
|
54
|
+
async adminBlockUser(params: { userId: string }, request: types.AdminBlockUser_req): Promise<types.MessageResponse> {
|
|
55
|
+
const path = `/users/${params.userId}/block`;
|
|
56
56
|
return this.client.request<types.MessageResponse>('POST', path, {
|
|
57
57
|
body: request,
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
async adminUnblockUser(): Promise<types.MessageResponse> {
|
|
62
|
-
const path =
|
|
61
|
+
async adminUnblockUser(params: { userId: string }): Promise<types.MessageResponse> {
|
|
62
|
+
const path = `/users/${params.userId}/unblock`;
|
|
63
63
|
return this.client.request<types.MessageResponse>('POST', path);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
async adminGetUserVerificationStatus(): Promise<types.UserVerificationStatusResponse> {
|
|
67
|
-
const path =
|
|
66
|
+
async adminGetUserVerificationStatus(params: { userId: string }): Promise<types.UserVerificationStatusResponse> {
|
|
67
|
+
const path = `/users/${params.userId}/status`;
|
|
68
68
|
return this.client.request<types.UserVerificationStatusResponse>('GET', path);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
async adminGetUserVerifications(): Promise<types.VerificationListResponse> {
|
|
72
|
-
const path =
|
|
71
|
+
async adminGetUserVerifications(params: { userId: string }): Promise<types.VerificationListResponse> {
|
|
72
|
+
const path = `/users/${params.userId}/verifications`;
|
|
73
73
|
return this.client.request<types.VerificationListResponse>('GET', path);
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -26,8 +26,8 @@ export class ImpersonationPlugin implements ClientPlugin {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
async getImpersonation(): Promise<void> {
|
|
30
|
-
const path =
|
|
29
|
+
async getImpersonation(params: { id: string }): Promise<void> {
|
|
30
|
+
const path = `/${params.id}`;
|
|
31
31
|
return this.client.request<void>('GET', path);
|
|
32
32
|
}
|
|
33
33
|
|
package/src/plugins/mfa.ts
CHANGED
|
@@ -24,23 +24,23 @@ export class MfaPlugin implements ClientPlugin {
|
|
|
24
24
|
return this.client.request<types.FactorsResponse>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async getFactor(): Promise<void> {
|
|
28
|
-
const path =
|
|
27
|
+
async getFactor(params: { id: string }): Promise<void> {
|
|
28
|
+
const path = `/mfa/factors/${params.id}`;
|
|
29
29
|
return this.client.request<void>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
async updateFactor(): Promise<types.MessageResponse> {
|
|
33
|
-
const path =
|
|
32
|
+
async updateFactor(params: { id: string }): Promise<types.MessageResponse> {
|
|
33
|
+
const path = `/mfa/factors/${params.id}`;
|
|
34
34
|
return this.client.request<types.MessageResponse>('PUT', path);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
async deleteFactor(): Promise<types.MessageResponse> {
|
|
38
|
-
const path =
|
|
37
|
+
async deleteFactor(params: { id: string }): Promise<types.MessageResponse> {
|
|
38
|
+
const path = `/mfa/factors/${params.id}`;
|
|
39
39
|
return this.client.request<types.MessageResponse>('DELETE', path);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
async verifyFactor(request: types.VerifyFactor_req): Promise<types.MessageResponse> {
|
|
43
|
-
const path =
|
|
42
|
+
async verifyFactor(params: { id: string }, request: types.VerifyFactor_req): Promise<types.MessageResponse> {
|
|
43
|
+
const path = `/mfa/factors/${params.id}/verify`;
|
|
44
44
|
return this.client.request<types.MessageResponse>('POST', path, {
|
|
45
45
|
body: request,
|
|
46
46
|
});
|
|
@@ -60,8 +60,8 @@ export class MfaPlugin implements ClientPlugin {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
async getChallengeStatus(): Promise<void> {
|
|
64
|
-
const path =
|
|
63
|
+
async getChallengeStatus(params: { id: string }): Promise<void> {
|
|
64
|
+
const path = `/mfa/challenge/${params.id}`;
|
|
65
65
|
return this.client.request<void>('GET', path);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -77,8 +77,8 @@ export class MfaPlugin implements ClientPlugin {
|
|
|
77
77
|
return this.client.request<types.DevicesResponse>('GET', path);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
async revokeTrustedDevice(): Promise<types.MessageResponse> {
|
|
81
|
-
const path =
|
|
80
|
+
async revokeTrustedDevice(params: { id: string }): Promise<types.MessageResponse> {
|
|
81
|
+
const path = `/mfa/devices/${params.id}`;
|
|
82
82
|
return this.client.request<types.MessageResponse>('DELETE', path);
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -99,8 +99,8 @@ export class MfaPlugin implements ClientPlugin {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
async adminResetUserMFA(): Promise<void> {
|
|
103
|
-
const path =
|
|
102
|
+
async adminResetUserMFA(params: { id: string }): Promise<void> {
|
|
103
|
+
const path = `/mfa/users/${params.id}/reset`;
|
|
104
104
|
return this.client.request<void>('POST', path);
|
|
105
105
|
}
|
|
106
106
|
|
package/src/plugins/multiapp.ts
CHANGED
|
@@ -17,18 +17,18 @@ export class MultiappPlugin implements ClientPlugin {
|
|
|
17
17
|
return this.client.request<void>('POST', path);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
async getApp(): Promise<void> {
|
|
21
|
-
const path =
|
|
20
|
+
async getApp(params: { appId: string }): Promise<void> {
|
|
21
|
+
const path = `/${params.appId}`;
|
|
22
22
|
return this.client.request<void>('GET', path);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
async updateApp(): Promise<void> {
|
|
26
|
-
const path =
|
|
25
|
+
async updateApp(params: { appId: string }): Promise<void> {
|
|
26
|
+
const path = `/${params.appId}`;
|
|
27
27
|
return this.client.request<void>('PUT', path);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
async deleteApp(): Promise<void> {
|
|
31
|
-
const path =
|
|
30
|
+
async deleteApp(params: { appId: string }): Promise<void> {
|
|
31
|
+
const path = `/${params.appId}`;
|
|
32
32
|
return this.client.request<void>('DELETE', path);
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -37,8 +37,8 @@ export class MultiappPlugin implements ClientPlugin {
|
|
|
37
37
|
return this.client.request<void>('GET', path);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
async removeMember(): Promise<void> {
|
|
41
|
-
const path =
|
|
40
|
+
async removeMember(params: { memberId: string }): Promise<void> {
|
|
41
|
+
const path = `/${params.memberId}`;
|
|
42
42
|
return this.client.request<void>('DELETE', path);
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -52,23 +52,23 @@ export class MultiappPlugin implements ClientPlugin {
|
|
|
52
52
|
return this.client.request<void>('POST', path);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
async updateMember(): Promise<void> {
|
|
56
|
-
const path =
|
|
55
|
+
async updateMember(params: { memberId: string }): Promise<void> {
|
|
56
|
+
const path = `/${params.memberId}`;
|
|
57
57
|
return this.client.request<void>('PUT', path);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
async getInvitation(): Promise<void> {
|
|
61
|
-
const path =
|
|
60
|
+
async getInvitation(params: { token: string }): Promise<void> {
|
|
61
|
+
const path = `/${params.token}`;
|
|
62
62
|
return this.client.request<void>('GET', path);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
async acceptInvitation(): Promise<void> {
|
|
66
|
-
const path =
|
|
65
|
+
async acceptInvitation(params: { token: string }): Promise<void> {
|
|
66
|
+
const path = `/${params.token}/accept`;
|
|
67
67
|
return this.client.request<void>('POST', path);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
async declineInvitation(): Promise<void> {
|
|
71
|
-
const path =
|
|
70
|
+
async declineInvitation(params: { token: string }): Promise<void> {
|
|
71
|
+
const path = `/${params.token}/decline`;
|
|
72
72
|
return this.client.request<void>('POST', path);
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -77,18 +77,18 @@ export class MultiappPlugin implements ClientPlugin {
|
|
|
77
77
|
return this.client.request<void>('POST', path);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
async getTeam(): Promise<void> {
|
|
81
|
-
const path =
|
|
80
|
+
async getTeam(params: { teamId: string }): Promise<void> {
|
|
81
|
+
const path = `/${params.teamId}`;
|
|
82
82
|
return this.client.request<void>('GET', path);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
async updateTeam(): Promise<void> {
|
|
86
|
-
const path =
|
|
85
|
+
async updateTeam(params: { teamId: string }): Promise<void> {
|
|
86
|
+
const path = `/${params.teamId}`;
|
|
87
87
|
return this.client.request<void>('PUT', path);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
async deleteTeam(): Promise<void> {
|
|
91
|
-
const path =
|
|
90
|
+
async deleteTeam(params: { teamId: string }): Promise<void> {
|
|
91
|
+
const path = `/${params.teamId}`;
|
|
92
92
|
return this.client.request<void>('DELETE', path);
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -97,15 +97,15 @@ export class MultiappPlugin implements ClientPlugin {
|
|
|
97
97
|
return this.client.request<void>('GET', path);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
async addTeamMember(request: types.AddTeamMember_req): Promise<void> {
|
|
101
|
-
const path =
|
|
100
|
+
async addTeamMember(params: { teamId: string }, request: types.AddTeamMember_req): Promise<void> {
|
|
101
|
+
const path = `/${params.teamId}/members`;
|
|
102
102
|
return this.client.request<void>('POST', path, {
|
|
103
103
|
body: request,
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
async removeTeamMember(): Promise<void> {
|
|
108
|
-
const path =
|
|
107
|
+
async removeTeamMember(params: { teamId: string; memberId: string }): Promise<void> {
|
|
108
|
+
const path = `/${params.teamId}/members/${params.memberId}`;
|
|
109
109
|
return this.client.request<void>('DELETE', path);
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -24,11 +24,43 @@ export class MultisessionPlugin implements ClientPlugin {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async delete(): Promise<types.StatusResponse> {
|
|
28
|
-
const path =
|
|
27
|
+
async delete(params: { id: string }): Promise<types.StatusResponse> {
|
|
28
|
+
const path = `/delete/${params.id}`;
|
|
29
29
|
return this.client.request<types.StatusResponse>('POST', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
async getCurrent(): Promise<types.SessionTokenResponse> {
|
|
33
|
+
const path = '/current';
|
|
34
|
+
return this.client.request<types.SessionTokenResponse>('GET', path);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async getByID(params: { id: string }): Promise<types.SessionTokenResponse> {
|
|
38
|
+
const path = `/${params.id}`;
|
|
39
|
+
return this.client.request<types.SessionTokenResponse>('GET', path);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async revokeAll(request: types.RevokeAll_body): Promise<void> {
|
|
43
|
+
const path = '/revoke-all';
|
|
44
|
+
return this.client.request<void>('POST', path, {
|
|
45
|
+
body: request,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async revokeOthers(): Promise<void> {
|
|
50
|
+
const path = '/revoke-others';
|
|
51
|
+
return this.client.request<void>('POST', path);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async refresh(): Promise<types.SessionTokenResponse> {
|
|
55
|
+
const path = '/refresh';
|
|
56
|
+
return this.client.request<types.SessionTokenResponse>('POST', path);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async getStats(): Promise<void> {
|
|
60
|
+
const path = '/stats';
|
|
61
|
+
return this.client.request<void>('GET', path);
|
|
62
|
+
}
|
|
63
|
+
|
|
32
64
|
}
|
|
33
65
|
|
|
34
66
|
export function multisessionClient(): MultisessionPlugin {
|