@authsome/client 0.0.4 → 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 (69) hide show
  1. package/dist/client.d.ts +49 -45
  2. package/dist/client.js +35 -21
  3. package/dist/index.d.ts +21 -21
  4. package/dist/index.js +65 -65
  5. package/dist/plugins/admin.d.ts +5 -5
  6. package/dist/plugins/admin.js +10 -20
  7. package/dist/plugins/anonymous.d.ts +1 -1
  8. package/dist/plugins/anonymous.js +4 -2
  9. package/dist/plugins/apikey.d.ts +7 -7
  10. package/dist/plugins/apikey.js +28 -14
  11. package/dist/plugins/backupauth.d.ts +28 -28
  12. package/dist/plugins/cms.d.ts +11 -11
  13. package/dist/plugins/cms.js +38 -28
  14. package/dist/plugins/compliance.d.ts +33 -33
  15. package/dist/plugins/compliance.js +4 -2
  16. package/dist/plugins/consent.d.ts +18 -18
  17. package/dist/plugins/emailverification.d.ts +2 -2
  18. package/dist/plugins/emailverification.js +4 -2
  19. package/dist/plugins/idverification.d.ts +11 -11
  20. package/dist/plugins/impersonation.d.ts +6 -6
  21. package/dist/plugins/impersonation.js +4 -8
  22. package/dist/plugins/jwt.d.ts +6 -5
  23. package/dist/plugins/jwt.js +16 -8
  24. package/dist/plugins/mfa.d.ts +9 -9
  25. package/dist/plugins/mfa.js +4 -8
  26. package/dist/plugins/multiapp.d.ts +19 -19
  27. package/dist/plugins/multiapp.js +16 -8
  28. package/dist/plugins/multisession.d.ts +5 -5
  29. package/dist/plugins/multisession.js +4 -2
  30. package/dist/plugins/notification.d.ts +15 -15
  31. package/dist/plugins/notification.js +12 -6
  32. package/dist/plugins/oidcprovider.d.ts +11 -11
  33. package/dist/plugins/oidcprovider.js +12 -6
  34. package/dist/plugins/organization.d.ts +5 -5
  35. package/dist/plugins/secrets.d.ts +10 -10
  36. package/dist/plugins/secrets.js +32 -16
  37. package/dist/plugins/social.js +1 -1
  38. package/dist/plugins/stepup.d.ts +13 -13
  39. package/dist/plugins/twofa.d.ts +6 -6
  40. package/dist/plugins/twofa.js +12 -24
  41. package/dist/plugins/username.d.ts +2 -2
  42. package/dist/plugins/username.js +8 -4
  43. package/dist/types.d.ts +3336 -2788
  44. package/package.json +1 -1
  45. package/src/client.ts +60 -45
  46. package/src/index.ts +21 -21
  47. package/src/plugins/admin.ts +10 -20
  48. package/src/plugins/anonymous.ts +4 -2
  49. package/src/plugins/apikey.ts +28 -14
  50. package/src/plugins/backupauth.ts +56 -56
  51. package/src/plugins/cms.ts +38 -28
  52. package/src/plugins/compliance.ts +68 -66
  53. package/src/plugins/consent.ts +36 -36
  54. package/src/plugins/emailverification.ts +6 -4
  55. package/src/plugins/idverification.ts +22 -22
  56. package/src/plugins/impersonation.ts +12 -16
  57. package/src/plugins/jwt.ts +18 -10
  58. package/src/plugins/mfa.ts +18 -22
  59. package/src/plugins/multiapp.ts +46 -38
  60. package/src/plugins/multisession.ts +11 -9
  61. package/src/plugins/notification.ts +36 -30
  62. package/src/plugins/oidcprovider.ts +28 -22
  63. package/src/plugins/organization.ts +10 -10
  64. package/src/plugins/secrets.ts +36 -20
  65. package/src/plugins/social.ts +1 -1
  66. package/src/plugins/stepup.ts +26 -26
  67. package/src/plugins/twofa.ts +12 -24
  68. package/src/plugins/username.ts +8 -4
  69. package/src/types.ts +3581 -2856
@@ -17,9 +17,11 @@ export class CmsPlugin implements ClientPlugin {
17
17
  return this.client.request<void>('GET', path);
18
18
  }
19
19
 
20
- async createEntry(): Promise<void> {
20
+ async createEntry(request: types.CreateEntryRequest): Promise<void> {
21
21
  const path = '/createentry';
22
- return this.client.request<void>('POST', path);
22
+ return this.client.request<void>('POST', path, {
23
+ body: request,
24
+ });
23
25
  }
24
26
 
25
27
  async getEntry(): Promise<void> {
@@ -27,9 +29,11 @@ export class CmsPlugin implements ClientPlugin {
27
29
  return this.client.request<void>('GET', path);
28
30
  }
29
31
 
30
- async updateEntry(): Promise<void> {
32
+ async updateEntry(request: types.UpdateEntryRequest): Promise<void> {
31
33
  const path = '/updateentry';
32
- return this.client.request<void>('PUT', path);
34
+ return this.client.request<void>('PUT', path, {
35
+ body: request,
36
+ });
33
37
  }
34
38
 
35
39
  async deleteEntry(): Promise<void> {
@@ -37,9 +41,11 @@ export class CmsPlugin implements ClientPlugin {
37
41
  return this.client.request<void>('DELETE', path);
38
42
  }
39
43
 
40
- async publishEntry(): Promise<void> {
44
+ async publishEntry(request: types.PublishEntryRequest): Promise<void> {
41
45
  const path = '/publish';
42
- return this.client.request<void>('POST', path);
46
+ return this.client.request<void>('POST', path, {
47
+ body: request,
48
+ });
43
49
  }
44
50
 
45
51
  async unpublishEntry(): Promise<void> {
@@ -57,25 +63,19 @@ export class CmsPlugin implements ClientPlugin {
57
63
  return this.client.request<void>('POST', path);
58
64
  }
59
65
 
60
- async bulkPublish(request: types.BulkRequest): Promise<void> {
66
+ async bulkPublish(): Promise<void> {
61
67
  const path = '/publish';
62
- return this.client.request<void>('POST', path, {
63
- body: request,
64
- });
68
+ return this.client.request<void>('POST', path);
65
69
  }
66
70
 
67
- async bulkUnpublish(request: types.BulkRequest): Promise<void> {
71
+ async bulkUnpublish(): Promise<void> {
68
72
  const path = '/unpublish';
69
- return this.client.request<void>('POST', path, {
70
- body: request,
71
- });
73
+ return this.client.request<void>('POST', path);
72
74
  }
73
75
 
74
- async bulkDelete(request: types.BulkRequest): Promise<void> {
76
+ async bulkDelete(): Promise<void> {
75
77
  const path = '/delete';
76
- return this.client.request<void>('POST', path, {
77
- body: request,
78
- });
78
+ return this.client.request<void>('POST', path);
79
79
  }
80
80
 
81
81
  async getEntryStats(): Promise<void> {
@@ -88,9 +88,11 @@ export class CmsPlugin implements ClientPlugin {
88
88
  return this.client.request<void>('GET', path);
89
89
  }
90
90
 
91
- async createContentType(): Promise<void> {
91
+ async createContentType(request: types.CreateContentTypeRequest): Promise<void> {
92
92
  const path = '/createcontenttype';
93
- return this.client.request<void>('POST', path);
93
+ return this.client.request<void>('POST', path, {
94
+ body: request,
95
+ });
94
96
  }
95
97
 
96
98
  async getContentType(params: { slug: string }): Promise<void> {
@@ -98,9 +100,11 @@ export class CmsPlugin implements ClientPlugin {
98
100
  return this.client.request<void>('GET', path);
99
101
  }
100
102
 
101
- async updateContentType(params: { slug: string }): Promise<void> {
103
+ async updateContentType(params: { slug: string }, request: types.UpdateContentTypeRequest): Promise<void> {
102
104
  const path = `/${params.slug}`;
103
- return this.client.request<void>('PUT', path);
105
+ return this.client.request<void>('PUT', path, {
106
+ body: request,
107
+ });
104
108
  }
105
109
 
106
110
  async deleteContentType(params: { slug: string }): Promise<void> {
@@ -113,9 +117,11 @@ export class CmsPlugin implements ClientPlugin {
113
117
  return this.client.request<void>('GET', path);
114
118
  }
115
119
 
116
- async addField(): Promise<void> {
120
+ async addField(request: types.CreateFieldRequest): Promise<void> {
117
121
  const path = '/addfield';
118
- return this.client.request<void>('POST', path);
122
+ return this.client.request<void>('POST', path, {
123
+ body: request,
124
+ });
119
125
  }
120
126
 
121
127
  async getField(params: { fieldSlug: string }): Promise<void> {
@@ -123,9 +129,11 @@ export class CmsPlugin implements ClientPlugin {
123
129
  return this.client.request<void>('GET', path);
124
130
  }
125
131
 
126
- async updateField(params: { fieldSlug: string }): Promise<void> {
132
+ async updateField(params: { fieldSlug: string }, request: types.UpdateFieldRequest): Promise<void> {
127
133
  const path = `/${params.fieldSlug}`;
128
- return this.client.request<void>('PUT', path);
134
+ return this.client.request<void>('PUT', path, {
135
+ body: request,
136
+ });
129
137
  }
130
138
 
131
139
  async deleteField(params: { fieldSlug: string }): Promise<void> {
@@ -133,9 +141,11 @@ export class CmsPlugin implements ClientPlugin {
133
141
  return this.client.request<void>('DELETE', path);
134
142
  }
135
143
 
136
- async reorderFields(): Promise<void> {
144
+ async reorderFields(request: types.ReorderFieldsRequest): Promise<void> {
137
145
  const path = '/reorder';
138
- return this.client.request<void>('POST', path);
146
+ return this.client.request<void>('POST', path, {
147
+ body: request,
148
+ });
139
149
  }
140
150
 
141
151
  async getFieldTypes(): Promise<void> {
@@ -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(params: { id: string }): Promise<void> {
29
+ async getProfile(params: { id: string }): Promise<types.ComplianceProfileResponse> {
30
30
  const path = `/profiles/${params.id}`;
31
- return this.client.request<void>('GET', path);
31
+ return this.client.request<types.ComplianceProfileResponse>('GET', path);
32
32
  }
33
33
 
34
- async getAppProfile(params: { appId: string }): Promise<void> {
34
+ async getAppProfile(params: { appId: string }): Promise<types.ComplianceProfileResponse> {
35
35
  const path = `/apps/${params.appId}/profile`;
36
- return this.client.request<void>('GET', path);
36
+ return this.client.request<types.ComplianceProfileResponse>('GET', path);
37
37
  }
38
38
 
39
- async updateProfile(params: { id: string }, request: types.UpdateProfileRequest): Promise<void> {
39
+ async updateProfile(params: { id: string }, request: types.UpdateProfileRequest): Promise<types.ComplianceProfileResponse> {
40
40
  const path = `/profiles/${params.id}`;
41
- return this.client.request<void>('PUT', path, {
41
+ return this.client.request<types.ComplianceProfileResponse>('PUT', path, {
42
42
  body: request,
43
43
  });
44
44
  }
45
45
 
46
- async deleteProfile(params: { id: string }): Promise<void> {
46
+ async deleteProfile(params: { id: string }): Promise<types.ComplianceStatusResponse> {
47
47
  const path = `/profiles/${params.id}`;
48
- return this.client.request<void>('DELETE', path);
48
+ return this.client.request<types.ComplianceStatusResponse>('DELETE', path);
49
49
  }
50
50
 
51
- async getComplianceStatus(params: { appId: string }): Promise<void> {
51
+ async getComplianceStatus(params: { appId: string }): Promise<types.ComplianceStatusDetailsResponse> {
52
52
  const path = `/apps/${params.appId}/status`;
53
- return this.client.request<void>('GET', path);
53
+ return this.client.request<types.ComplianceStatusDetailsResponse>('GET', path);
54
54
  }
55
55
 
56
- async getDashboard(params: { appId: string }): Promise<void> {
56
+ async getDashboard(params: { appId: string }): Promise<types.ComplianceDashboardResponse> {
57
57
  const path = `/apps/${params.appId}/dashboard`;
58
- return this.client.request<void>('GET', path);
58
+ return this.client.request<types.ComplianceDashboardResponse>('GET', path);
59
59
  }
60
60
 
61
- async runCheck(params: { profileId: string }, request: types.RunCheck_req): Promise<void> {
61
+ async runCheck(params: { profileId: string }, request: types.RunCheckRequest): Promise<types.ComplianceCheckResponse> {
62
62
  const path = `/profiles/${params.profileId}/checks`;
63
- return this.client.request<void>('POST', path, {
63
+ return this.client.request<types.ComplianceCheckResponse>('POST', path, {
64
64
  body: request,
65
65
  });
66
66
  }
67
67
 
68
- async listChecks(params: { profileId: string }): Promise<void> {
68
+ async listChecks(params: { profileId: string }): Promise<types.ComplianceChecksResponse> {
69
69
  const path = `/profiles/${params.profileId}/checks`;
70
- return this.client.request<void>('GET', path);
70
+ return this.client.request<types.ComplianceChecksResponse>('GET', path);
71
71
  }
72
72
 
73
- async getCheck(params: { id: string }): Promise<void> {
73
+ async getCheck(params: { id: string }): Promise<types.ComplianceCheckResponse> {
74
74
  const path = `/checks/${params.id}`;
75
- return this.client.request<void>('GET', path);
75
+ return this.client.request<types.ComplianceCheckResponse>('GET', path);
76
76
  }
77
77
 
78
- async listViolations(params: { appId: string }): Promise<void> {
78
+ async listViolations(params: { appId: string }): Promise<types.ComplianceViolationsResponse> {
79
79
  const path = `/apps/${params.appId}/violations`;
80
- return this.client.request<void>('GET', path);
80
+ return this.client.request<types.ComplianceViolationsResponse>('GET', path);
81
81
  }
82
82
 
83
- async getViolation(params: { id: string }): Promise<void> {
83
+ async getViolation(params: { id: string }): Promise<types.ComplianceViolationResponse> {
84
84
  const path = `/violations/${params.id}`;
85
- return this.client.request<void>('GET', path);
85
+ return this.client.request<types.ComplianceViolationResponse>('GET', path);
86
86
  }
87
87
 
88
- async resolveViolation(params: { id: string }): Promise<void> {
88
+ async resolveViolation(params: { id: string }, request: types.ResolveViolationRequest): Promise<types.ComplianceStatusResponse> {
89
89
  const path = `/violations/${params.id}/resolve`;
90
- return this.client.request<void>('PUT', path);
90
+ return this.client.request<types.ComplianceStatusResponse>('PUT', path, {
91
+ body: request,
92
+ });
91
93
  }
92
94
 
93
- async generateReport(params: { appId: string }, request: types.GenerateReport_req): Promise<void> {
95
+ async generateReport(params: { appId: string }, request: types.GenerateReportRequest): Promise<types.ComplianceReportResponse> {
94
96
  const path = `/apps/${params.appId}/reports`;
95
- return this.client.request<void>('POST', path, {
97
+ return this.client.request<types.ComplianceReportResponse>('POST', path, {
96
98
  body: request,
97
99
  });
98
100
  }
99
101
 
100
- async listReports(params: { appId: string }): Promise<void> {
102
+ async listReports(params: { appId: string }): Promise<types.ComplianceReportsResponse> {
101
103
  const path = `/apps/${params.appId}/reports`;
102
- return this.client.request<void>('GET', path);
104
+ return this.client.request<types.ComplianceReportsResponse>('GET', path);
103
105
  }
104
106
 
105
- async getReport(params: { id: string }): Promise<void> {
107
+ async getReport(params: { id: string }): Promise<types.ComplianceReportResponse> {
106
108
  const path = `/reports/${params.id}`;
107
- return this.client.request<void>('GET', path);
109
+ return this.client.request<types.ComplianceReportResponse>('GET', path);
108
110
  }
109
111
 
110
- async downloadReport(params: { id: string }): Promise<void> {
112
+ async downloadReport(params: { id: string }): Promise<types.ComplianceReportFileResponse> {
111
113
  const path = `/reports/${params.id}/download`;
112
- return this.client.request<void>('GET', path);
114
+ return this.client.request<types.ComplianceReportFileResponse>('GET', path);
113
115
  }
114
116
 
115
- async createEvidence(params: { appId: string }, request: types.CreateEvidence_req): Promise<void> {
117
+ async createEvidence(params: { appId: string }, request: types.CreateEvidenceRequest): Promise<types.ComplianceEvidenceResponse> {
116
118
  const path = `/apps/${params.appId}/evidence`;
117
- return this.client.request<void>('POST', path, {
119
+ return this.client.request<types.ComplianceEvidenceResponse>('POST', path, {
118
120
  body: request,
119
121
  });
120
122
  }
121
123
 
122
- async listEvidence(params: { appId: string }): Promise<void> {
124
+ async listEvidence(params: { appId: string }): Promise<types.ComplianceEvidencesResponse> {
123
125
  const path = `/apps/${params.appId}/evidence`;
124
- return this.client.request<void>('GET', path);
126
+ return this.client.request<types.ComplianceEvidencesResponse>('GET', path);
125
127
  }
126
128
 
127
- async getEvidence(params: { id: string }): Promise<void> {
129
+ async getEvidence(params: { id: string }): Promise<types.ComplianceEvidenceResponse> {
128
130
  const path = `/evidence/${params.id}`;
129
- return this.client.request<void>('GET', path);
131
+ return this.client.request<types.ComplianceEvidenceResponse>('GET', path);
130
132
  }
131
133
 
132
- async deleteEvidence(params: { id: string }): Promise<void> {
134
+ async deleteEvidence(params: { id: string }): Promise<types.ComplianceStatusResponse> {
133
135
  const path = `/evidence/${params.id}`;
134
- return this.client.request<void>('DELETE', path);
136
+ return this.client.request<types.ComplianceStatusResponse>('DELETE', path);
135
137
  }
136
138
 
137
- async createPolicy(params: { appId: string }, request: types.CreatePolicy_req): Promise<void> {
139
+ async createPolicy(params: { appId: string }, request: types.CreatePolicyRequest): Promise<types.CompliancePolicyResponse> {
138
140
  const path = `/apps/${params.appId}/policies`;
139
- return this.client.request<void>('POST', path, {
141
+ return this.client.request<types.CompliancePolicyResponse>('POST', path, {
140
142
  body: request,
141
143
  });
142
144
  }
143
145
 
144
- async listPolicies(params: { appId: string }): Promise<void> {
146
+ async listPolicies(params: { appId: string }): Promise<types.CompliancePoliciesResponse> {
145
147
  const path = `/apps/${params.appId}/policies`;
146
- return this.client.request<void>('GET', path);
148
+ return this.client.request<types.CompliancePoliciesResponse>('GET', path);
147
149
  }
148
150
 
149
- async getPolicy(params: { id: string }): Promise<void> {
151
+ async getPolicy(params: { id: string }): Promise<types.CompliancePolicyResponse> {
150
152
  const path = `/policies/${params.id}`;
151
- return this.client.request<void>('GET', path);
153
+ return this.client.request<types.CompliancePolicyResponse>('GET', path);
152
154
  }
153
155
 
154
- async updatePolicy(params: { id: string }, request: types.UpdatePolicy_req): Promise<void> {
156
+ async updatePolicy(params: { id: string }, request: types.UpdatePolicyRequest): Promise<types.CompliancePolicyResponse> {
155
157
  const path = `/policies/${params.id}`;
156
- return this.client.request<void>('PUT', path, {
158
+ return this.client.request<types.CompliancePolicyResponse>('PUT', path, {
157
159
  body: request,
158
160
  });
159
161
  }
160
162
 
161
- async deletePolicy(params: { id: string }): Promise<void> {
163
+ async deletePolicy(params: { id: string }): Promise<types.ComplianceStatusResponse> {
162
164
  const path = `/policies/${params.id}`;
163
- return this.client.request<void>('DELETE', path);
165
+ return this.client.request<types.ComplianceStatusResponse>('DELETE', path);
164
166
  }
165
167
 
166
- async createTraining(params: { appId: string }, request: types.CreateTraining_req): Promise<void> {
168
+ async createTraining(params: { appId: string }, request: types.CreateTrainingRequest): Promise<types.ComplianceTrainingResponse> {
167
169
  const path = `/apps/${params.appId}/training`;
168
- return this.client.request<void>('POST', path, {
170
+ return this.client.request<types.ComplianceTrainingResponse>('POST', path, {
169
171
  body: request,
170
172
  });
171
173
  }
172
174
 
173
- async listTraining(params: { appId: string }): Promise<void> {
175
+ async listTraining(params: { appId: string }): Promise<types.ComplianceTrainingsResponse> {
174
176
  const path = `/apps/${params.appId}/training`;
175
- return this.client.request<void>('GET', path);
177
+ return this.client.request<types.ComplianceTrainingsResponse>('GET', path);
176
178
  }
177
179
 
178
- async getUserTraining(params: { userId: string }): Promise<void> {
180
+ async getUserTraining(params: { userId: string }): Promise<types.ComplianceUserTrainingResponse> {
179
181
  const path = `/users/${params.userId}/training`;
180
- return this.client.request<void>('GET', path);
182
+ return this.client.request<types.ComplianceUserTrainingResponse>('GET', path);
181
183
  }
182
184
 
183
- async completeTraining(params: { id: string }, request: types.CompleteTraining_req): Promise<void> {
185
+ async completeTraining(params: { id: string }, request: types.CompleteTrainingRequest): Promise<types.ComplianceStatusResponse> {
184
186
  const path = `/training/${params.id}/complete`;
185
- return this.client.request<void>('PUT', path, {
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(params: { standard: string }): Promise<void> {
197
+ async getTemplate(params: { standard: string }): Promise<types.ComplianceTemplateResponse> {
196
198
  const path = `/templates/${params.standard}`;
197
- return this.client.request<void>('GET', path);
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(params: { id: string }): Promise<void> {
22
+ async getConsent(params: { id: string }): Promise<types.ConsentRecordResponse> {
23
23
  const path = `/records/${params.id}`;
24
- return this.client.request<void>('GET', path);
24
+ return this.client.request<types.ConsentRecordResponse>('GET', path);
25
25
  }
26
26
 
27
- async updateConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<void> {
27
+ async updateConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<types.ConsentRecordResponse> {
28
28
  const path = `/records/${params.id}`;
29
- return this.client.request<void>('PUT', path, {
29
+ return this.client.request<types.ConsentRecordResponse>('PUT', path, {
30
30
  body: request,
31
31
  });
32
32
  }
33
33
 
34
- async revokeConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<types.MessageResponse> {
34
+ async revokeConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<types.ConsentStatusResponse> {
35
35
  const path = `/revoke/${params.id}`;
36
- return this.client.request<types.MessageResponse>('POST', path, {
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(params: { id: string }): Promise<void> {
48
+ async getConsentPolicy(params: { id: string }): Promise<types.ConsentPolicyResponse> {
49
49
  const path = `/policies/${params.id}`;
50
- return this.client.request<void>('GET', path);
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(params: { id: string }): Promise<void> {
72
+ async getDataExport(params: { id: string }): Promise<types.ConsentExportResponse> {
73
73
  const path = `/export/${params.id}`;
74
- return this.client.request<void>('GET', path);
74
+ return this.client.request<types.ConsentExportResponse>('GET', path);
75
75
  }
76
76
 
77
- async downloadDataExport(params: { id: string }): Promise<void> {
77
+ async downloadDataExport(params: { id: string }): Promise<types.ConsentExportFileResponse> {
78
78
  const path = `/export/${params.id}/download`;
79
- return this.client.request<void>('GET', path);
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(params: { id: string }): Promise<void> {
89
+ async getDataDeletion(params: { id: string }): Promise<types.ConsentDeletionResponse> {
90
90
  const path = `/deletion/${params.id}`;
91
- return this.client.request<void>('GET', path);
91
+ return this.client.request<types.ConsentDeletionResponse>('GET', path);
92
92
  }
93
93
 
94
- async approveDeletionRequest(params: { id: string }): Promise<types.MessageResponse> {
94
+ async approveDeletionRequest(params: { id: string }): Promise<types.ConsentStatusResponse> {
95
95
  const path = `/deletion/${params.id}/approve`;
96
- return this.client.request<types.MessageResponse>('POST', path);
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
  }
@@ -12,16 +12,18 @@ export class EmailverificationPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async send(request: types.SendRequest): Promise<void> {
15
+ async send(request: types.SendRequest): Promise<types.SendResponse> {
16
16
  const path = '/email-verification/send';
17
- return this.client.request<void>('POST', path, {
17
+ return this.client.request<types.SendResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
- async verify(): Promise<void> {
22
+ async verify(request?: types.VerifyRequest): Promise<types.VerifyResponse> {
23
23
  const path = '/email-verification/verify';
24
- return this.client.request<void>('GET', path);
24
+ return this.client.request<types.VerifyResponse>('GET', path, {
25
+ query: this.client.toQueryParams(request),
26
+ });
25
27
  }
26
28
 
27
29
  async resend(request: types.ResendRequest): Promise<types.ResendResponse> {