@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.
Files changed (85) hide show
  1. package/dist/client.d.ts +90 -37
  2. package/dist/client.js +79 -17
  3. package/dist/index.d.ts +21 -17
  4. package/dist/index.js +65 -53
  5. package/dist/plugins/admin.d.ts +19 -7
  6. package/dist/plugins/admin.js +18 -28
  7. package/dist/plugins/anonymous.d.ts +1 -1
  8. package/dist/plugins/anonymous.js +4 -2
  9. package/dist/plugins/apikey.d.ts +15 -7
  10. package/dist/plugins/apikey.js +29 -17
  11. package/dist/plugins/backupauth.d.ts +38 -28
  12. package/dist/plugins/backupauth.js +10 -10
  13. package/dist/plugins/cms.d.ts +54 -0
  14. package/dist/plugins/cms.js +149 -0
  15. package/dist/plugins/compliance.d.ts +93 -33
  16. package/dist/plugins/compliance.js +63 -61
  17. package/dist/plugins/consent.d.ts +34 -18
  18. package/dist/plugins/consent.js +16 -16
  19. package/dist/plugins/emailverification.d.ts +12 -0
  20. package/dist/plugins/emailverification.js +35 -0
  21. package/dist/plugins/idverification.d.ts +25 -11
  22. package/dist/plugins/idverification.js +14 -14
  23. package/dist/plugins/impersonation.d.ts +8 -6
  24. package/dist/plugins/impersonation.js +6 -10
  25. package/dist/plugins/jwt.d.ts +6 -5
  26. package/dist/plugins/jwt.js +16 -8
  27. package/dist/plugins/mfa.d.ts +26 -12
  28. package/dist/plugins/mfa.js +17 -21
  29. package/dist/plugins/multiapp.d.ts +46 -19
  30. package/dist/plugins/multiapp.js +40 -32
  31. package/dist/plugins/multisession.d.ts +13 -3
  32. package/dist/plugins/multisession.js +32 -4
  33. package/dist/plugins/notification.d.ts +31 -15
  34. package/dist/plugins/notification.js +27 -21
  35. package/dist/plugins/oidcprovider.d.ts +18 -12
  36. package/dist/plugins/oidcprovider.js +18 -12
  37. package/dist/plugins/organization.d.ts +32 -12
  38. package/dist/plugins/organization.js +20 -20
  39. package/dist/plugins/passkey.d.ts +6 -2
  40. package/dist/plugins/passkey.js +4 -4
  41. package/dist/plugins/permissions.d.ts +12 -0
  42. package/dist/plugins/permissions.js +33 -0
  43. package/dist/plugins/secrets.d.ts +33 -0
  44. package/dist/plugins/secrets.js +79 -0
  45. package/dist/plugins/social.d.ts +11 -2
  46. package/dist/plugins/social.js +7 -5
  47. package/dist/plugins/sso.d.ts +12 -4
  48. package/dist/plugins/sso.js +8 -8
  49. package/dist/plugins/stepup.d.ts +23 -13
  50. package/dist/plugins/stepup.js +10 -10
  51. package/dist/plugins/twofa.d.ts +6 -6
  52. package/dist/plugins/twofa.js +12 -24
  53. package/dist/plugins/username.d.ts +2 -2
  54. package/dist/plugins/username.js +8 -4
  55. package/dist/types.d.ts +3443 -2470
  56. package/package.json +2 -1
  57. package/src/client.ts +111 -37
  58. package/src/index.ts +21 -17
  59. package/src/plugins/admin.ts +18 -28
  60. package/src/plugins/anonymous.ts +4 -2
  61. package/src/plugins/apikey.ts +30 -18
  62. package/src/plugins/backupauth.ts +61 -61
  63. package/src/plugins/cms.ts +180 -0
  64. package/src/plugins/compliance.ts +98 -96
  65. package/src/plugins/consent.ts +44 -44
  66. package/src/plugins/emailverification.ts +40 -0
  67. package/src/plugins/idverification.ts +29 -29
  68. package/src/plugins/impersonation.ts +13 -17
  69. package/src/plugins/jwt.ts +18 -10
  70. package/src/plugins/mfa.ts +28 -32
  71. package/src/plugins/multiapp.ts +59 -51
  72. package/src/plugins/multisession.ts +39 -5
  73. package/src/plugins/notification.ts +44 -38
  74. package/src/plugins/oidcprovider.ts +32 -26
  75. package/src/plugins/organization.ts +27 -27
  76. package/src/plugins/passkey.ts +4 -4
  77. package/src/plugins/permissions.ts +38 -0
  78. package/src/plugins/secrets.ts +92 -0
  79. package/src/plugins/social.ts +7 -5
  80. package/src/plugins/sso.ts +8 -8
  81. package/src/plugins/stepup.ts +31 -31
  82. package/src/plugins/twofa.ts +12 -24
  83. package/src/plugins/username.ts +8 -4
  84. package/src/types.ts +3773 -2545
  85. package/authsome-client-0.0.2.tgz +0 -0
@@ -12,189 +12,191 @@ export class CompliancePlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async createProfile(request: types.CreateProfileRequest): Promise<void> {
15
+ async createProfile(request: types.CreateProfileRequest): Promise<types.ComplianceProfileResponse> {
16
16
  const path = '/profiles';
17
- return this.client.request<void>('POST', path, {
17
+ return this.client.request<types.ComplianceProfileResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
- async createProfileFromTemplate(request: types.CreateProfileFromTemplate_req): Promise<void> {
22
+ async createProfileFromTemplate(request: types.CreateProfileFromTemplateRequest): Promise<types.ComplianceProfileResponse> {
23
23
  const path = '/profiles/from-template';
24
- return this.client.request<void>('POST', path, {
24
+ return this.client.request<types.ComplianceProfileResponse>('POST', path, {
25
25
  body: request,
26
26
  });
27
27
  }
28
28
 
29
- async getProfile(): Promise<void> {
30
- const path = '/profiles/:id';
31
- return this.client.request<void>('GET', path);
29
+ async getProfile(params: { id: string }): Promise<types.ComplianceProfileResponse> {
30
+ const path = `/profiles/${params.id}`;
31
+ return this.client.request<types.ComplianceProfileResponse>('GET', path);
32
32
  }
33
33
 
34
- async getAppProfile(): Promise<void> {
35
- const path = '/apps/:appId/profile';
36
- return this.client.request<void>('GET', path);
34
+ async getAppProfile(params: { appId: string }): Promise<types.ComplianceProfileResponse> {
35
+ const path = `/apps/${params.appId}/profile`;
36
+ return this.client.request<types.ComplianceProfileResponse>('GET', path);
37
37
  }
38
38
 
39
- async updateProfile(request: types.UpdateProfileRequest): Promise<void> {
40
- const path = '/profiles/:id';
41
- return this.client.request<void>('PUT', path, {
39
+ async updateProfile(params: { id: string }, request: types.UpdateProfileRequest): Promise<types.ComplianceProfileResponse> {
40
+ const path = `/profiles/${params.id}`;
41
+ return this.client.request<types.ComplianceProfileResponse>('PUT', path, {
42
42
  body: request,
43
43
  });
44
44
  }
45
45
 
46
- async deleteProfile(): Promise<void> {
47
- const path = '/profiles/:id';
48
- return this.client.request<void>('DELETE', path);
46
+ async deleteProfile(params: { id: string }): Promise<types.ComplianceStatusResponse> {
47
+ const path = `/profiles/${params.id}`;
48
+ return this.client.request<types.ComplianceStatusResponse>('DELETE', path);
49
49
  }
50
50
 
51
- async getComplianceStatus(): Promise<void> {
52
- const path = '/apps/:appId/status';
53
- return this.client.request<void>('GET', path);
51
+ async getComplianceStatus(params: { appId: string }): Promise<types.ComplianceStatusDetailsResponse> {
52
+ const path = `/apps/${params.appId}/status`;
53
+ return this.client.request<types.ComplianceStatusDetailsResponse>('GET', path);
54
54
  }
55
55
 
56
- async getDashboard(): Promise<void> {
57
- const path = '/apps/:appId/dashboard';
58
- return this.client.request<void>('GET', path);
56
+ async getDashboard(params: { appId: string }): Promise<types.ComplianceDashboardResponse> {
57
+ const path = `/apps/${params.appId}/dashboard`;
58
+ return this.client.request<types.ComplianceDashboardResponse>('GET', path);
59
59
  }
60
60
 
61
- async runCheck(request: types.RunCheck_req): Promise<void> {
62
- const path = '/profiles/:profileId/checks';
63
- return this.client.request<void>('POST', path, {
61
+ async runCheck(params: { profileId: string }, request: types.RunCheckRequest): Promise<types.ComplianceCheckResponse> {
62
+ const path = `/profiles/${params.profileId}/checks`;
63
+ return this.client.request<types.ComplianceCheckResponse>('POST', path, {
64
64
  body: request,
65
65
  });
66
66
  }
67
67
 
68
- async listChecks(): Promise<void> {
69
- const path = '/profiles/:profileId/checks';
70
- return this.client.request<void>('GET', path);
68
+ async listChecks(params: { profileId: string }): Promise<types.ComplianceChecksResponse> {
69
+ const path = `/profiles/${params.profileId}/checks`;
70
+ return this.client.request<types.ComplianceChecksResponse>('GET', path);
71
71
  }
72
72
 
73
- async getCheck(): Promise<void> {
74
- const path = '/checks/:id';
75
- return this.client.request<void>('GET', path);
73
+ async getCheck(params: { id: string }): Promise<types.ComplianceCheckResponse> {
74
+ const path = `/checks/${params.id}`;
75
+ return this.client.request<types.ComplianceCheckResponse>('GET', path);
76
76
  }
77
77
 
78
- async listViolations(): Promise<void> {
79
- const path = '/apps/:appId/violations';
80
- return this.client.request<void>('GET', path);
78
+ async listViolations(params: { appId: string }): Promise<types.ComplianceViolationsResponse> {
79
+ const path = `/apps/${params.appId}/violations`;
80
+ return this.client.request<types.ComplianceViolationsResponse>('GET', path);
81
81
  }
82
82
 
83
- async getViolation(): Promise<void> {
84
- const path = '/violations/:id';
85
- return this.client.request<void>('GET', path);
83
+ async getViolation(params: { id: string }): Promise<types.ComplianceViolationResponse> {
84
+ const path = `/violations/${params.id}`;
85
+ return this.client.request<types.ComplianceViolationResponse>('GET', path);
86
86
  }
87
87
 
88
- async resolveViolation(): Promise<void> {
89
- const path = '/violations/:id/resolve';
90
- return this.client.request<void>('PUT', path);
88
+ async resolveViolation(params: { id: string }, request: types.ResolveViolationRequest): Promise<types.ComplianceStatusResponse> {
89
+ const path = `/violations/${params.id}/resolve`;
90
+ return this.client.request<types.ComplianceStatusResponse>('PUT', path, {
91
+ body: request,
92
+ });
91
93
  }
92
94
 
93
- async generateReport(request: types.GenerateReport_req): Promise<void> {
94
- const path = '/apps/:appId/reports';
95
- return this.client.request<void>('POST', path, {
95
+ async generateReport(params: { appId: string }, request: types.GenerateReportRequest): Promise<types.ComplianceReportResponse> {
96
+ const path = `/apps/${params.appId}/reports`;
97
+ return this.client.request<types.ComplianceReportResponse>('POST', path, {
96
98
  body: request,
97
99
  });
98
100
  }
99
101
 
100
- async listReports(): Promise<void> {
101
- const path = '/apps/:appId/reports';
102
- return this.client.request<void>('GET', path);
102
+ async listReports(params: { appId: string }): Promise<types.ComplianceReportsResponse> {
103
+ const path = `/apps/${params.appId}/reports`;
104
+ return this.client.request<types.ComplianceReportsResponse>('GET', path);
103
105
  }
104
106
 
105
- async getReport(): Promise<void> {
106
- const path = '/reports/:id';
107
- return this.client.request<void>('GET', path);
107
+ async getReport(params: { id: string }): Promise<types.ComplianceReportResponse> {
108
+ const path = `/reports/${params.id}`;
109
+ return this.client.request<types.ComplianceReportResponse>('GET', path);
108
110
  }
109
111
 
110
- async downloadReport(): Promise<void> {
111
- const path = '/reports/:id/download';
112
- return this.client.request<void>('GET', path);
112
+ async downloadReport(params: { id: string }): Promise<types.ComplianceReportFileResponse> {
113
+ const path = `/reports/${params.id}/download`;
114
+ return this.client.request<types.ComplianceReportFileResponse>('GET', path);
113
115
  }
114
116
 
115
- async createEvidence(request: types.CreateEvidence_req): Promise<void> {
116
- const path = '/apps/:appId/evidence';
117
- return this.client.request<void>('POST', path, {
117
+ async createEvidence(params: { appId: string }, request: types.CreateEvidenceRequest): Promise<types.ComplianceEvidenceResponse> {
118
+ const path = `/apps/${params.appId}/evidence`;
119
+ return this.client.request<types.ComplianceEvidenceResponse>('POST', path, {
118
120
  body: request,
119
121
  });
120
122
  }
121
123
 
122
- async listEvidence(): Promise<void> {
123
- const path = '/apps/:appId/evidence';
124
- return this.client.request<void>('GET', path);
124
+ async listEvidence(params: { appId: string }): Promise<types.ComplianceEvidencesResponse> {
125
+ const path = `/apps/${params.appId}/evidence`;
126
+ return this.client.request<types.ComplianceEvidencesResponse>('GET', path);
125
127
  }
126
128
 
127
- async getEvidence(): Promise<void> {
128
- const path = '/evidence/:id';
129
- return this.client.request<void>('GET', path);
129
+ async getEvidence(params: { id: string }): Promise<types.ComplianceEvidenceResponse> {
130
+ const path = `/evidence/${params.id}`;
131
+ return this.client.request<types.ComplianceEvidenceResponse>('GET', path);
130
132
  }
131
133
 
132
- async deleteEvidence(): Promise<void> {
133
- const path = '/evidence/:id';
134
- return this.client.request<void>('DELETE', path);
134
+ async deleteEvidence(params: { id: string }): Promise<types.ComplianceStatusResponse> {
135
+ const path = `/evidence/${params.id}`;
136
+ return this.client.request<types.ComplianceStatusResponse>('DELETE', path);
135
137
  }
136
138
 
137
- async createPolicy(request: types.CreatePolicy_req): Promise<void> {
138
- const path = '/apps/:appId/policies';
139
- return this.client.request<void>('POST', path, {
139
+ async createPolicy(params: { appId: string }, request: types.CreatePolicyRequest): Promise<types.CompliancePolicyResponse> {
140
+ const path = `/apps/${params.appId}/policies`;
141
+ return this.client.request<types.CompliancePolicyResponse>('POST', path, {
140
142
  body: request,
141
143
  });
142
144
  }
143
145
 
144
- async listPolicies(): Promise<void> {
145
- const path = '/apps/:appId/policies';
146
- return this.client.request<void>('GET', path);
146
+ async listPolicies(params: { appId: string }): Promise<types.CompliancePoliciesResponse> {
147
+ const path = `/apps/${params.appId}/policies`;
148
+ return this.client.request<types.CompliancePoliciesResponse>('GET', path);
147
149
  }
148
150
 
149
- async getPolicy(): Promise<void> {
150
- const path = '/policies/:id';
151
- return this.client.request<void>('GET', path);
151
+ async getPolicy(params: { id: string }): Promise<types.CompliancePolicyResponse> {
152
+ const path = `/policies/${params.id}`;
153
+ return this.client.request<types.CompliancePolicyResponse>('GET', path);
152
154
  }
153
155
 
154
- async updatePolicy(request: types.UpdatePolicy_req): Promise<void> {
155
- const path = '/policies/:id';
156
- return this.client.request<void>('PUT', path, {
156
+ async updatePolicy(params: { id: string }, request: types.UpdatePolicyRequest): Promise<types.CompliancePolicyResponse> {
157
+ const path = `/policies/${params.id}`;
158
+ return this.client.request<types.CompliancePolicyResponse>('PUT', path, {
157
159
  body: request,
158
160
  });
159
161
  }
160
162
 
161
- async deletePolicy(): Promise<void> {
162
- const path = '/policies/:id';
163
- return this.client.request<void>('DELETE', path);
163
+ async deletePolicy(params: { id: string }): Promise<types.ComplianceStatusResponse> {
164
+ const path = `/policies/${params.id}`;
165
+ return this.client.request<types.ComplianceStatusResponse>('DELETE', path);
164
166
  }
165
167
 
166
- async createTraining(request: types.CreateTraining_req): Promise<void> {
167
- const path = '/apps/:appId/training';
168
- return this.client.request<void>('POST', path, {
168
+ async createTraining(params: { appId: string }, request: types.CreateTrainingRequest): Promise<types.ComplianceTrainingResponse> {
169
+ const path = `/apps/${params.appId}/training`;
170
+ return this.client.request<types.ComplianceTrainingResponse>('POST', path, {
169
171
  body: request,
170
172
  });
171
173
  }
172
174
 
173
- async listTraining(): Promise<void> {
174
- const path = '/apps/:appId/training';
175
- return this.client.request<void>('GET', path);
175
+ async listTraining(params: { appId: string }): Promise<types.ComplianceTrainingsResponse> {
176
+ const path = `/apps/${params.appId}/training`;
177
+ return this.client.request<types.ComplianceTrainingsResponse>('GET', path);
176
178
  }
177
179
 
178
- async getUserTraining(): Promise<void> {
179
- const path = '/users/:userId/training';
180
- return this.client.request<void>('GET', path);
180
+ async getUserTraining(params: { userId: string }): Promise<types.ComplianceUserTrainingResponse> {
181
+ const path = `/users/${params.userId}/training`;
182
+ return this.client.request<types.ComplianceUserTrainingResponse>('GET', path);
181
183
  }
182
184
 
183
- async completeTraining(request: types.CompleteTraining_req): Promise<void> {
184
- const path = '/training/:id/complete';
185
- return this.client.request<void>('PUT', path, {
185
+ async completeTraining(params: { id: string }, request: types.CompleteTrainingRequest): Promise<types.ComplianceStatusResponse> {
186
+ const path = `/training/${params.id}/complete`;
187
+ return this.client.request<types.ComplianceStatusResponse>('PUT', path, {
186
188
  body: request,
187
189
  });
188
190
  }
189
191
 
190
- async listTemplates(): Promise<void> {
192
+ async listTemplates(): Promise<types.ComplianceTemplatesResponse> {
191
193
  const path = '/templates';
192
- return this.client.request<void>('GET', path);
194
+ return this.client.request<types.ComplianceTemplatesResponse>('GET', path);
193
195
  }
194
196
 
195
- async getTemplate(): Promise<void> {
196
- const path = '/templates/:standard';
197
- return this.client.request<void>('GET', path);
197
+ async getTemplate(params: { standard: string }): Promise<types.ComplianceTemplateResponse> {
198
+ const path = `/templates/${params.standard}`;
199
+ return this.client.request<types.ComplianceTemplateResponse>('GET', path);
198
200
  }
199
201
 
200
202
  }
@@ -12,110 +12,110 @@ export class ConsentPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async createConsent(request: types.CreateConsentRequest): Promise<void> {
15
+ async createConsent(request: types.CreateConsentRequest): Promise<types.ConsentRecordResponse> {
16
16
  const path = '/records';
17
- return this.client.request<void>('POST', path, {
17
+ return this.client.request<types.ConsentRecordResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
- async getConsent(): Promise<void> {
23
- const path = '/records/:id';
24
- return this.client.request<void>('GET', path);
22
+ async getConsent(params: { id: string }): Promise<types.ConsentRecordResponse> {
23
+ const path = `/records/${params.id}`;
24
+ return this.client.request<types.ConsentRecordResponse>('GET', path);
25
25
  }
26
26
 
27
- async updateConsent(request: types.UpdateConsentRequest): Promise<void> {
28
- const path = '/records/:id';
29
- return this.client.request<void>('PUT', path, {
27
+ async updateConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<types.ConsentRecordResponse> {
28
+ const path = `/records/${params.id}`;
29
+ return this.client.request<types.ConsentRecordResponse>('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';
36
- return this.client.request<types.MessageResponse>('POST', path, {
34
+ async revokeConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<types.ConsentStatusResponse> {
35
+ const path = `/revoke/${params.id}`;
36
+ return this.client.request<types.ConsentStatusResponse>('POST', path, {
37
37
  body: request,
38
38
  });
39
39
  }
40
40
 
41
- async createConsentPolicy(request: types.CreatePolicyRequest): Promise<void> {
41
+ async createConsentPolicy(request: types.CreatePolicyRequest): Promise<types.ConsentPolicyResponse> {
42
42
  const path = '/policies';
43
- return this.client.request<void>('POST', path, {
43
+ return this.client.request<types.ConsentPolicyResponse>('POST', path, {
44
44
  body: request,
45
45
  });
46
46
  }
47
47
 
48
- async getConsentPolicy(): Promise<void> {
49
- const path = '/policies/:id';
50
- return this.client.request<void>('GET', path);
48
+ async getConsentPolicy(params: { id: string }): Promise<types.ConsentPolicyResponse> {
49
+ const path = `/policies/${params.id}`;
50
+ return this.client.request<types.ConsentPolicyResponse>('GET', path);
51
51
  }
52
52
 
53
- async recordCookieConsent(request: types.CookieConsentRequest): Promise<void> {
53
+ async recordCookieConsent(request: types.CookieConsentRequest): Promise<types.ConsentCookieResponse> {
54
54
  const path = '/cookies';
55
- return this.client.request<void>('POST', path, {
55
+ return this.client.request<types.ConsentCookieResponse>('POST', path, {
56
56
  body: request,
57
57
  });
58
58
  }
59
59
 
60
- async getCookieConsent(): Promise<void> {
60
+ async getCookieConsent(): Promise<types.ConsentCookieResponse> {
61
61
  const path = '/cookies';
62
- return this.client.request<void>('GET', path);
62
+ return this.client.request<types.ConsentCookieResponse>('GET', path);
63
63
  }
64
64
 
65
- async requestDataExport(request: types.DataExportRequestInput): Promise<void> {
65
+ async requestDataExport(request: types.DataExportRequestInput): Promise<types.ConsentExportResponse> {
66
66
  const path = '/export';
67
- return this.client.request<void>('POST', path, {
67
+ return this.client.request<types.ConsentExportResponse>('POST', path, {
68
68
  body: request,
69
69
  });
70
70
  }
71
71
 
72
- async getDataExport(): Promise<void> {
73
- const path = '/export/:id';
74
- return this.client.request<void>('GET', path);
72
+ async getDataExport(params: { id: string }): Promise<types.ConsentExportResponse> {
73
+ const path = `/export/${params.id}`;
74
+ return this.client.request<types.ConsentExportResponse>('GET', path);
75
75
  }
76
76
 
77
- async downloadDataExport(): Promise<void> {
78
- const path = '/export/:id/download';
79
- return this.client.request<void>('GET', path);
77
+ async downloadDataExport(params: { id: string }): Promise<types.ConsentExportFileResponse> {
78
+ const path = `/export/${params.id}/download`;
79
+ return this.client.request<types.ConsentExportFileResponse>('GET', path);
80
80
  }
81
81
 
82
- async requestDataDeletion(request: types.DataDeletionRequestInput): Promise<void> {
82
+ async requestDataDeletion(request: types.DataDeletionRequestInput): Promise<types.ConsentDeletionResponse> {
83
83
  const path = '/deletion';
84
- return this.client.request<void>('POST', path, {
84
+ return this.client.request<types.ConsentDeletionResponse>('POST', path, {
85
85
  body: request,
86
86
  });
87
87
  }
88
88
 
89
- async getDataDeletion(): Promise<void> {
90
- const path = '/deletion/:id';
91
- return this.client.request<void>('GET', path);
89
+ async getDataDeletion(params: { id: string }): Promise<types.ConsentDeletionResponse> {
90
+ const path = `/deletion/${params.id}`;
91
+ return this.client.request<types.ConsentDeletionResponse>('GET', path);
92
92
  }
93
93
 
94
- async approveDeletionRequest(): Promise<types.MessageResponse> {
95
- const path = '/deletion/:id/approve';
96
- return this.client.request<types.MessageResponse>('POST', path);
94
+ async approveDeletionRequest(params: { id: string }): Promise<types.ConsentStatusResponse> {
95
+ const path = `/deletion/${params.id}/approve`;
96
+ return this.client.request<types.ConsentStatusResponse>('POST', path);
97
97
  }
98
98
 
99
- async getPrivacySettings(): Promise<void> {
99
+ async getPrivacySettings(): Promise<types.ConsentSettingsResponse> {
100
100
  const path = '/settings';
101
- return this.client.request<void>('GET', path);
101
+ return this.client.request<types.ConsentSettingsResponse>('GET', path);
102
102
  }
103
103
 
104
- async updatePrivacySettings(request: types.PrivacySettingsRequest): Promise<void> {
104
+ async updatePrivacySettings(request: types.PrivacySettingsRequest): Promise<types.ConsentSettingsResponse> {
105
105
  const path = '/settings';
106
- return this.client.request<void>('PUT', path, {
106
+ return this.client.request<types.ConsentSettingsResponse>('PUT', path, {
107
107
  body: request,
108
108
  });
109
109
  }
110
110
 
111
- async getConsentAuditLogs(): Promise<void> {
111
+ async getConsentAuditLogs(): Promise<types.ConsentAuditLogsResponse> {
112
112
  const path = '/audit';
113
- return this.client.request<void>('GET', path);
113
+ return this.client.request<types.ConsentAuditLogsResponse>('GET', path);
114
114
  }
115
115
 
116
- async generateConsentReport(): Promise<void> {
116
+ async generateConsentReport(): Promise<types.ConsentReportResponse> {
117
117
  const path = '/reports';
118
- return this.client.request<void>('POST', path);
118
+ return this.client.request<types.ConsentReportResponse>('POST', path);
119
119
  }
120
120
 
121
121
  }
@@ -0,0 +1,40 @@
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<types.SendResponse> {
16
+ const path = '/email-verification/send';
17
+ return this.client.request<types.SendResponse>('POST', path, {
18
+ body: request,
19
+ });
20
+ }
21
+
22
+ async verify(request?: types.VerifyRequest): Promise<types.VerifyResponse> {
23
+ const path = '/email-verification/verify';
24
+ return this.client.request<types.VerifyResponse>('GET', path, {
25
+ query: this.client.toQueryParams(request),
26
+ });
27
+ }
28
+
29
+ async resend(request: types.ResendRequest): Promise<types.ResendResponse> {
30
+ const path = '/email-verification/resend';
31
+ return this.client.request<types.ResendResponse>('POST', path, {
32
+ body: request,
33
+ });
34
+ }
35
+
36
+ }
37
+
38
+ export function emailverificationClient(): EmailverificationPlugin {
39
+ return new EmailverificationPlugin();
40
+ }
@@ -12,65 +12,65 @@ export class IdverificationPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.VerificationSessionResponse> {
15
+ async createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.IDVerificationSessionResponse> {
16
16
  const path = '/sessions';
17
- return this.client.request<types.VerificationSessionResponse>('POST', path, {
17
+ return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
- async getVerificationSession(): Promise<types.VerificationSessionResponse> {
23
- const path = '/sessions/:id';
24
- return this.client.request<types.VerificationSessionResponse>('GET', path);
22
+ async getVerificationSession(params: { id: string }): Promise<types.IDVerificationSessionResponse> {
23
+ const path = `/sessions/${params.id}`;
24
+ return this.client.request<types.IDVerificationSessionResponse>('GET', path);
25
25
  }
26
26
 
27
- async getVerification(): Promise<types.VerificationResponse> {
28
- const path = '/:id';
29
- return this.client.request<types.VerificationResponse>('GET', path);
27
+ async getVerification(params: { id: string }): Promise<types.IDVerificationResponse> {
28
+ const path = `/${params.id}`;
29
+ return this.client.request<types.IDVerificationResponse>('GET', path);
30
30
  }
31
31
 
32
- async getUserVerifications(): Promise<types.VerificationListResponse> {
32
+ async getUserVerifications(): Promise<types.IDVerificationListResponse> {
33
33
  const path = '/me';
34
- return this.client.request<types.VerificationListResponse>('GET', path);
34
+ return this.client.request<types.IDVerificationListResponse>('GET', path);
35
35
  }
36
36
 
37
- async getUserVerificationStatus(): Promise<types.UserVerificationStatusResponse> {
37
+ async getUserVerificationStatus(): Promise<types.IDVerificationStatusResponse> {
38
38
  const path = '/me/status';
39
- return this.client.request<types.UserVerificationStatusResponse>('GET', path);
39
+ return this.client.request<types.IDVerificationStatusResponse>('GET', path);
40
40
  }
41
41
 
42
- async requestReverification(request: types.RequestReverification_req): Promise<types.MessageResponse> {
42
+ async requestReverification(request: types.RequestReverification_req): Promise<types.IDVerificationSessionResponse> {
43
43
  const path = '/me/reverify';
44
- return this.client.request<types.MessageResponse>('POST', path, {
44
+ return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
45
45
  body: request,
46
46
  });
47
47
  }
48
48
 
49
- async handleWebhook(): Promise<void> {
50
- const path = '/webhook/:provider';
51
- return this.client.request<void>('POST', path);
49
+ async handleWebhook(params: { provider: string }): Promise<types.IDVerificationWebhookResponse> {
50
+ const path = `/webhook/${params.provider}`;
51
+ return this.client.request<types.IDVerificationWebhookResponse>('POST', path);
52
52
  }
53
53
 
54
- async adminBlockUser(request: types.AdminBlockUser_req): Promise<types.MessageResponse> {
55
- const path = '/users/:userId/block';
56
- return this.client.request<types.MessageResponse>('POST', path, {
54
+ async adminBlockUser(params: { userId: string }, request: types.AdminBlockUser_req): Promise<types.IDVerificationStatusResponse> {
55
+ const path = `/users/${params.userId}/block`;
56
+ return this.client.request<types.IDVerificationStatusResponse>('POST', path, {
57
57
  body: request,
58
58
  });
59
59
  }
60
60
 
61
- async adminUnblockUser(): Promise<types.MessageResponse> {
62
- const path = '/users/:userId/unblock';
63
- return this.client.request<types.MessageResponse>('POST', path);
61
+ async adminUnblockUser(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
62
+ const path = `/users/${params.userId}/unblock`;
63
+ return this.client.request<types.IDVerificationStatusResponse>('POST', path);
64
64
  }
65
65
 
66
- async adminGetUserVerificationStatus(): Promise<types.UserVerificationStatusResponse> {
67
- const path = '/users/:userId/status';
68
- return this.client.request<types.UserVerificationStatusResponse>('GET', path);
66
+ async adminGetUserVerificationStatus(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
67
+ const path = `/users/${params.userId}/status`;
68
+ return this.client.request<types.IDVerificationStatusResponse>('GET', path);
69
69
  }
70
70
 
71
- async adminGetUserVerifications(): Promise<types.VerificationListResponse> {
72
- const path = '/users/:userId/verifications';
73
- return this.client.request<types.VerificationListResponse>('GET', path);
71
+ async adminGetUserVerifications(params: { userId: string }): Promise<types.IDVerificationListResponse> {
72
+ const path = `/users/${params.userId}/verifications`;
73
+ return this.client.request<types.IDVerificationListResponse>('GET', path);
74
74
  }
75
75
 
76
76
  }
@@ -12,38 +12,34 @@ export class ImpersonationPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async startImpersonation(request: types.StartImpersonation_reqBody): Promise<void> {
15
+ async startImpersonation(): Promise<types.ImpersonationStartResponse> {
16
16
  const path = '/start';
17
- return this.client.request<void>('POST', path, {
18
- body: request,
19
- });
17
+ return this.client.request<types.ImpersonationStartResponse>('POST', path);
20
18
  }
21
19
 
22
- async endImpersonation(request: types.EndImpersonation_reqBody): Promise<void> {
20
+ async endImpersonation(): Promise<types.ImpersonationEndResponse> {
23
21
  const path = '/end';
24
- return this.client.request<void>('POST', path, {
25
- body: request,
26
- });
22
+ return this.client.request<types.ImpersonationEndResponse>('POST', path);
27
23
  }
28
24
 
29
- async getImpersonation(): Promise<void> {
30
- const path = '/:id';
31
- return this.client.request<void>('GET', path);
25
+ async getImpersonation(params: { id: string }): Promise<types.ImpersonationSession> {
26
+ const path = `/${params.id}`;
27
+ return this.client.request<types.ImpersonationSession>('GET', path);
32
28
  }
33
29
 
34
- async listImpersonations(): Promise<void> {
30
+ async listImpersonations(): Promise<types.ImpersonationListResponse> {
35
31
  const path = '/';
36
- return this.client.request<void>('GET', path);
32
+ return this.client.request<types.ImpersonationListResponse>('GET', path);
37
33
  }
38
34
 
39
- async listAuditEvents(): Promise<void> {
35
+ async listAuditEvents(): Promise<types.ImpersonationAuditResponse> {
40
36
  const path = '/audit';
41
- return this.client.request<void>('GET', path);
37
+ return this.client.request<types.ImpersonationAuditResponse>('GET', path);
42
38
  }
43
39
 
44
- async verifyImpersonation(): Promise<void> {
40
+ async verifyImpersonation(): Promise<types.ImpersonationVerifyResponse> {
45
41
  const path = '/verify';
46
- return this.client.request<void>('POST', path);
42
+ return this.client.request<types.ImpersonationVerifyResponse>('POST', path);
47
43
  }
48
44
 
49
45
  }