@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.
Files changed (73) hide show
  1. package/dist/client.d.ts +86 -37
  2. package/dist/client.js +65 -17
  3. package/dist/index.d.ts +21 -17
  4. package/dist/index.js +65 -53
  5. package/dist/plugins/admin.d.ts +18 -6
  6. package/dist/plugins/admin.js +12 -12
  7. package/dist/plugins/apikey.d.ts +13 -5
  8. package/dist/plugins/apikey.js +12 -14
  9. package/dist/plugins/backupauth.d.ts +15 -5
  10. package/dist/plugins/backupauth.js +10 -10
  11. package/dist/plugins/cms.d.ts +54 -0
  12. package/dist/plugins/cms.js +139 -0
  13. package/dist/plugins/compliance.d.ts +90 -30
  14. package/dist/plugins/compliance.js +60 -60
  15. package/dist/plugins/consent.d.ts +24 -8
  16. package/dist/plugins/consent.js +16 -16
  17. package/dist/plugins/emailverification.d.ts +12 -0
  18. package/dist/plugins/emailverification.js +33 -0
  19. package/dist/plugins/idverification.d.ts +21 -7
  20. package/dist/plugins/idverification.js +14 -14
  21. package/dist/plugins/impersonation.d.ts +3 -1
  22. package/dist/plugins/impersonation.js +2 -2
  23. package/dist/plugins/mfa.d.ts +21 -7
  24. package/dist/plugins/mfa.js +14 -14
  25. package/dist/plugins/multiapp.d.ts +40 -13
  26. package/dist/plugins/multiapp.js +26 -26
  27. package/dist/plugins/multisession.d.ts +11 -1
  28. package/dist/plugins/multisession.js +28 -2
  29. package/dist/plugins/notification.d.ts +25 -9
  30. package/dist/plugins/notification.js +16 -16
  31. package/dist/plugins/oidcprovider.d.ts +9 -3
  32. package/dist/plugins/oidcprovider.js +6 -6
  33. package/dist/plugins/organization.d.ts +30 -10
  34. package/dist/plugins/organization.js +20 -20
  35. package/dist/plugins/passkey.d.ts +6 -2
  36. package/dist/plugins/passkey.js +4 -4
  37. package/dist/plugins/permissions.d.ts +12 -0
  38. package/dist/plugins/permissions.js +33 -0
  39. package/dist/plugins/secrets.d.ts +33 -0
  40. package/dist/plugins/secrets.js +63 -0
  41. package/dist/plugins/social.d.ts +11 -2
  42. package/dist/plugins/social.js +7 -5
  43. package/dist/plugins/sso.d.ts +12 -4
  44. package/dist/plugins/sso.js +8 -8
  45. package/dist/plugins/stepup.d.ts +15 -5
  46. package/dist/plugins/stepup.js +10 -10
  47. package/dist/types.d.ts +2878 -2453
  48. package/package.json +2 -1
  49. package/src/client.ts +96 -37
  50. package/src/index.ts +21 -17
  51. package/src/plugins/admin.ts +12 -12
  52. package/src/plugins/apikey.ts +13 -15
  53. package/src/plugins/backupauth.ts +10 -10
  54. package/src/plugins/cms.ts +170 -0
  55. package/src/plugins/compliance.ts +60 -60
  56. package/src/plugins/consent.ts +16 -16
  57. package/src/plugins/emailverification.ts +38 -0
  58. package/src/plugins/idverification.ts +14 -14
  59. package/src/plugins/impersonation.ts +2 -2
  60. package/src/plugins/mfa.ts +14 -14
  61. package/src/plugins/multiapp.ts +26 -26
  62. package/src/plugins/multisession.ts +34 -2
  63. package/src/plugins/notification.ts +18 -18
  64. package/src/plugins/oidcprovider.ts +6 -6
  65. package/src/plugins/organization.ts +20 -20
  66. package/src/plugins/passkey.ts +4 -4
  67. package/src/plugins/permissions.ts +38 -0
  68. package/src/plugins/secrets.ts +76 -0
  69. package/src/plugins/social.ts +7 -5
  70. package/src/plugins/sso.ts +8 -8
  71. package/src/plugins/stepup.ts +10 -10
  72. package/src/types.ts +2989 -2486
  73. 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 = '/profiles/:id';
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 = '/apps/:appId/profile';
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 = '/profiles/:id';
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 = '/profiles/:id';
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 = '/apps/:appId/status';
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 = '/apps/:appId/dashboard';
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 = '/profiles/:profileId/checks';
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 = '/profiles/:profileId/checks';
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 = '/checks/:id';
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 = '/apps/:appId/violations';
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 = '/violations/:id';
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 = '/violations/:id/resolve';
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 = '/apps/:appId/reports';
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 = '/apps/:appId/reports';
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 = '/reports/:id';
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 = '/reports/:id/download';
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 = '/apps/:appId/evidence';
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 = '/apps/:appId/evidence';
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 = '/evidence/:id';
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 = '/evidence/:id';
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 = '/apps/:appId/policies';
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 = '/apps/:appId/policies';
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 = '/policies/:id';
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 = '/policies/:id';
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 = '/policies/:id';
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 = '/apps/:appId/training';
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 = '/apps/:appId/training';
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 = '/users/:userId/training';
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 = '/training/:id/complete';
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 = '/templates/:standard';
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
 
@@ -19,20 +19,20 @@ export class ConsentPlugin implements ClientPlugin {
19
19
  });
20
20
  }
21
21
 
22
- async getConsent(): Promise<void> {
23
- const path = '/records/:id';
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 = '/records/:id';
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 = '/revoke/:id';
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 = '/policies/:id';
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 = '/export/:id';
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 = '/export/:id/download';
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 = '/deletion/:id';
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 = '/deletion/:id/approve';
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 = '/sessions/:id';
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 = '/:id';
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 = '/webhook/:provider';
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 = '/users/:userId/block';
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 = '/users/:userId/unblock';
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 = '/users/:userId/status';
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 = '/users/:userId/verifications';
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 = '/:id';
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
 
@@ -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 = '/mfa/factors/:id';
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 = '/mfa/factors/:id';
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 = '/mfa/factors/:id';
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 = '/mfa/factors/:id/verify';
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 = '/mfa/challenge/:id';
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 = '/mfa/devices/:id';
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 = '/mfa/users/:id/reset';
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
 
@@ -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 = '/:appId';
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 = '/:appId';
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 = '/:appId';
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 = '/:memberId';
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 = '/:memberId';
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 = '/:token';
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 = '/:token/accept';
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 = '/:token/decline';
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 = '/:teamId';
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 = '/:teamId';
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 = '/:teamId';
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 = '/:teamId/members';
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 = '/:teamId/members/:memberId';
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 = '/delete/{id}';
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 {