@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.
- package/dist/client.d.ts +90 -37
- package/dist/client.js +79 -17
- package/dist/index.d.ts +21 -17
- package/dist/index.js +65 -53
- package/dist/plugins/admin.d.ts +19 -7
- package/dist/plugins/admin.js +18 -28
- package/dist/plugins/anonymous.d.ts +1 -1
- package/dist/plugins/anonymous.js +4 -2
- package/dist/plugins/apikey.d.ts +15 -7
- package/dist/plugins/apikey.js +29 -17
- package/dist/plugins/backupauth.d.ts +38 -28
- package/dist/plugins/backupauth.js +10 -10
- package/dist/plugins/cms.d.ts +54 -0
- package/dist/plugins/cms.js +149 -0
- package/dist/plugins/compliance.d.ts +93 -33
- package/dist/plugins/compliance.js +63 -61
- package/dist/plugins/consent.d.ts +34 -18
- package/dist/plugins/consent.js +16 -16
- package/dist/plugins/emailverification.d.ts +12 -0
- package/dist/plugins/emailverification.js +35 -0
- package/dist/plugins/idverification.d.ts +25 -11
- package/dist/plugins/idverification.js +14 -14
- package/dist/plugins/impersonation.d.ts +8 -6
- package/dist/plugins/impersonation.js +6 -10
- package/dist/plugins/jwt.d.ts +6 -5
- package/dist/plugins/jwt.js +16 -8
- package/dist/plugins/mfa.d.ts +26 -12
- package/dist/plugins/mfa.js +17 -21
- package/dist/plugins/multiapp.d.ts +46 -19
- package/dist/plugins/multiapp.js +40 -32
- package/dist/plugins/multisession.d.ts +13 -3
- package/dist/plugins/multisession.js +32 -4
- package/dist/plugins/notification.d.ts +31 -15
- package/dist/plugins/notification.js +27 -21
- package/dist/plugins/oidcprovider.d.ts +18 -12
- package/dist/plugins/oidcprovider.js +18 -12
- package/dist/plugins/organization.d.ts +32 -12
- package/dist/plugins/organization.js +20 -20
- package/dist/plugins/passkey.d.ts +6 -2
- package/dist/plugins/passkey.js +4 -4
- package/dist/plugins/permissions.d.ts +12 -0
- package/dist/plugins/permissions.js +33 -0
- package/dist/plugins/secrets.d.ts +33 -0
- package/dist/plugins/secrets.js +79 -0
- package/dist/plugins/social.d.ts +11 -2
- package/dist/plugins/social.js +7 -5
- package/dist/plugins/sso.d.ts +12 -4
- package/dist/plugins/sso.js +8 -8
- package/dist/plugins/stepup.d.ts +23 -13
- package/dist/plugins/stepup.js +10 -10
- package/dist/plugins/twofa.d.ts +6 -6
- package/dist/plugins/twofa.js +12 -24
- package/dist/plugins/username.d.ts +2 -2
- package/dist/plugins/username.js +8 -4
- package/dist/types.d.ts +3443 -2470
- package/package.json +2 -1
- package/src/client.ts +111 -37
- package/src/index.ts +21 -17
- package/src/plugins/admin.ts +18 -28
- package/src/plugins/anonymous.ts +4 -2
- package/src/plugins/apikey.ts +30 -18
- package/src/plugins/backupauth.ts +61 -61
- package/src/plugins/cms.ts +180 -0
- package/src/plugins/compliance.ts +98 -96
- package/src/plugins/consent.ts +44 -44
- package/src/plugins/emailverification.ts +40 -0
- package/src/plugins/idverification.ts +29 -29
- package/src/plugins/impersonation.ts +13 -17
- package/src/plugins/jwt.ts +18 -10
- package/src/plugins/mfa.ts +28 -32
- package/src/plugins/multiapp.ts +59 -51
- package/src/plugins/multisession.ts +39 -5
- package/src/plugins/notification.ts +44 -38
- package/src/plugins/oidcprovider.ts +32 -26
- package/src/plugins/organization.ts +27 -27
- package/src/plugins/passkey.ts +4 -4
- package/src/plugins/permissions.ts +38 -0
- package/src/plugins/secrets.ts +92 -0
- package/src/plugins/social.ts +7 -5
- package/src/plugins/sso.ts +8 -8
- package/src/plugins/stepup.ts +31 -31
- package/src/plugins/twofa.ts +12 -24
- package/src/plugins/username.ts +8 -4
- package/src/types.ts +3773 -2545
- 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<
|
|
15
|
+
async createProfile(request: types.CreateProfileRequest): Promise<types.ComplianceProfileResponse> {
|
|
16
16
|
const path = '/profiles';
|
|
17
|
-
return this.client.request<
|
|
17
|
+
return this.client.request<types.ComplianceProfileResponse>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async createProfileFromTemplate(request: types.
|
|
22
|
+
async createProfileFromTemplate(request: types.CreateProfileFromTemplateRequest): Promise<types.ComplianceProfileResponse> {
|
|
23
23
|
const path = '/profiles/from-template';
|
|
24
|
-
return this.client.request<
|
|
24
|
+
return this.client.request<types.ComplianceProfileResponse>('POST', path, {
|
|
25
25
|
body: request,
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
async getProfile(): Promise<
|
|
30
|
-
const path =
|
|
31
|
-
return this.client.request<
|
|
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<
|
|
35
|
-
const path =
|
|
36
|
-
return this.client.request<
|
|
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<
|
|
40
|
-
const path =
|
|
41
|
-
return this.client.request<
|
|
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<
|
|
47
|
-
const path =
|
|
48
|
-
return this.client.request<
|
|
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<
|
|
52
|
-
const path =
|
|
53
|
-
return this.client.request<
|
|
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<
|
|
57
|
-
const path =
|
|
58
|
-
return this.client.request<
|
|
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.
|
|
62
|
-
const path =
|
|
63
|
-
return this.client.request<
|
|
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<
|
|
69
|
-
const path =
|
|
70
|
-
return this.client.request<
|
|
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<
|
|
74
|
-
const path =
|
|
75
|
-
return this.client.request<
|
|
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<
|
|
79
|
-
const path =
|
|
80
|
-
return this.client.request<
|
|
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<
|
|
84
|
-
const path =
|
|
85
|
-
return this.client.request<
|
|
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<
|
|
89
|
-
const path =
|
|
90
|
-
return this.client.request<
|
|
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.
|
|
94
|
-
const path =
|
|
95
|
-
return this.client.request<
|
|
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<
|
|
101
|
-
const path =
|
|
102
|
-
return this.client.request<
|
|
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<
|
|
106
|
-
const path =
|
|
107
|
-
return this.client.request<
|
|
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<
|
|
111
|
-
const path =
|
|
112
|
-
return this.client.request<
|
|
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.
|
|
116
|
-
const path =
|
|
117
|
-
return this.client.request<
|
|
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<
|
|
123
|
-
const path =
|
|
124
|
-
return this.client.request<
|
|
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<
|
|
128
|
-
const path =
|
|
129
|
-
return this.client.request<
|
|
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<
|
|
133
|
-
const path =
|
|
134
|
-
return this.client.request<
|
|
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.
|
|
138
|
-
const path =
|
|
139
|
-
return this.client.request<
|
|
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<
|
|
145
|
-
const path =
|
|
146
|
-
return this.client.request<
|
|
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<
|
|
150
|
-
const path =
|
|
151
|
-
return this.client.request<
|
|
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.
|
|
155
|
-
const path =
|
|
156
|
-
return this.client.request<
|
|
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<
|
|
162
|
-
const path =
|
|
163
|
-
return this.client.request<
|
|
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.
|
|
167
|
-
const path =
|
|
168
|
-
return this.client.request<
|
|
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<
|
|
174
|
-
const path =
|
|
175
|
-
return this.client.request<
|
|
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<
|
|
179
|
-
const path =
|
|
180
|
-
return this.client.request<
|
|
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.
|
|
184
|
-
const path =
|
|
185
|
-
return this.client.request<
|
|
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<
|
|
192
|
+
async listTemplates(): Promise<types.ComplianceTemplatesResponse> {
|
|
191
193
|
const path = '/templates';
|
|
192
|
-
return this.client.request<
|
|
194
|
+
return this.client.request<types.ComplianceTemplatesResponse>('GET', path);
|
|
193
195
|
}
|
|
194
196
|
|
|
195
|
-
async getTemplate(): Promise<
|
|
196
|
-
const path =
|
|
197
|
-
return this.client.request<
|
|
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
|
}
|
package/src/plugins/consent.ts
CHANGED
|
@@ -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<
|
|
15
|
+
async createConsent(request: types.CreateConsentRequest): Promise<types.ConsentRecordResponse> {
|
|
16
16
|
const path = '/records';
|
|
17
|
-
return this.client.request<
|
|
17
|
+
return this.client.request<types.ConsentRecordResponse>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async getConsent(): Promise<
|
|
23
|
-
const path =
|
|
24
|
-
return this.client.request<
|
|
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<
|
|
28
|
-
const path =
|
|
29
|
-
return this.client.request<
|
|
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.
|
|
35
|
-
const path =
|
|
36
|
-
return this.client.request<types.
|
|
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<
|
|
41
|
+
async createConsentPolicy(request: types.CreatePolicyRequest): Promise<types.ConsentPolicyResponse> {
|
|
42
42
|
const path = '/policies';
|
|
43
|
-
return this.client.request<
|
|
43
|
+
return this.client.request<types.ConsentPolicyResponse>('POST', path, {
|
|
44
44
|
body: request,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
async getConsentPolicy(): Promise<
|
|
49
|
-
const path =
|
|
50
|
-
return this.client.request<
|
|
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<
|
|
53
|
+
async recordCookieConsent(request: types.CookieConsentRequest): Promise<types.ConsentCookieResponse> {
|
|
54
54
|
const path = '/cookies';
|
|
55
|
-
return this.client.request<
|
|
55
|
+
return this.client.request<types.ConsentCookieResponse>('POST', path, {
|
|
56
56
|
body: request,
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
async getCookieConsent(): Promise<
|
|
60
|
+
async getCookieConsent(): Promise<types.ConsentCookieResponse> {
|
|
61
61
|
const path = '/cookies';
|
|
62
|
-
return this.client.request<
|
|
62
|
+
return this.client.request<types.ConsentCookieResponse>('GET', path);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
async requestDataExport(request: types.DataExportRequestInput): Promise<
|
|
65
|
+
async requestDataExport(request: types.DataExportRequestInput): Promise<types.ConsentExportResponse> {
|
|
66
66
|
const path = '/export';
|
|
67
|
-
return this.client.request<
|
|
67
|
+
return this.client.request<types.ConsentExportResponse>('POST', path, {
|
|
68
68
|
body: request,
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
async getDataExport(): Promise<
|
|
73
|
-
const path =
|
|
74
|
-
return this.client.request<
|
|
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<
|
|
78
|
-
const path =
|
|
79
|
-
return this.client.request<
|
|
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<
|
|
82
|
+
async requestDataDeletion(request: types.DataDeletionRequestInput): Promise<types.ConsentDeletionResponse> {
|
|
83
83
|
const path = '/deletion';
|
|
84
|
-
return this.client.request<
|
|
84
|
+
return this.client.request<types.ConsentDeletionResponse>('POST', path, {
|
|
85
85
|
body: request,
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
async getDataDeletion(): Promise<
|
|
90
|
-
const path =
|
|
91
|
-
return this.client.request<
|
|
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.
|
|
95
|
-
const path =
|
|
96
|
-
return this.client.request<types.
|
|
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<
|
|
99
|
+
async getPrivacySettings(): Promise<types.ConsentSettingsResponse> {
|
|
100
100
|
const path = '/settings';
|
|
101
|
-
return this.client.request<
|
|
101
|
+
return this.client.request<types.ConsentSettingsResponse>('GET', path);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
async updatePrivacySettings(request: types.PrivacySettingsRequest): Promise<
|
|
104
|
+
async updatePrivacySettings(request: types.PrivacySettingsRequest): Promise<types.ConsentSettingsResponse> {
|
|
105
105
|
const path = '/settings';
|
|
106
|
-
return this.client.request<
|
|
106
|
+
return this.client.request<types.ConsentSettingsResponse>('PUT', path, {
|
|
107
107
|
body: request,
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
async getConsentAuditLogs(): Promise<
|
|
111
|
+
async getConsentAuditLogs(): Promise<types.ConsentAuditLogsResponse> {
|
|
112
112
|
const path = '/audit';
|
|
113
|
-
return this.client.request<
|
|
113
|
+
return this.client.request<types.ConsentAuditLogsResponse>('GET', path);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
async generateConsentReport(): Promise<
|
|
116
|
+
async generateConsentReport(): Promise<types.ConsentReportResponse> {
|
|
117
117
|
const path = '/reports';
|
|
118
|
-
return this.client.request<
|
|
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.
|
|
15
|
+
async createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.IDVerificationSessionResponse> {
|
|
16
16
|
const path = '/sessions';
|
|
17
|
-
return this.client.request<types.
|
|
17
|
+
return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async getVerificationSession(): Promise<types.
|
|
23
|
-
const path =
|
|
24
|
-
return this.client.request<types.
|
|
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.
|
|
28
|
-
const path =
|
|
29
|
-
return this.client.request<types.
|
|
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.
|
|
32
|
+
async getUserVerifications(): Promise<types.IDVerificationListResponse> {
|
|
33
33
|
const path = '/me';
|
|
34
|
-
return this.client.request<types.
|
|
34
|
+
return this.client.request<types.IDVerificationListResponse>('GET', path);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
async getUserVerificationStatus(): Promise<types.
|
|
37
|
+
async getUserVerificationStatus(): Promise<types.IDVerificationStatusResponse> {
|
|
38
38
|
const path = '/me/status';
|
|
39
|
-
return this.client.request<types.
|
|
39
|
+
return this.client.request<types.IDVerificationStatusResponse>('GET', path);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
async requestReverification(request: types.RequestReverification_req): Promise<types.
|
|
42
|
+
async requestReverification(request: types.RequestReverification_req): Promise<types.IDVerificationSessionResponse> {
|
|
43
43
|
const path = '/me/reverify';
|
|
44
|
-
return this.client.request<types.
|
|
44
|
+
return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
|
|
45
45
|
body: request,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
async handleWebhook(): Promise<
|
|
50
|
-
const path =
|
|
51
|
-
return this.client.request<
|
|
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.
|
|
55
|
-
const path =
|
|
56
|
-
return this.client.request<types.
|
|
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.
|
|
62
|
-
const path =
|
|
63
|
-
return this.client.request<types.
|
|
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.
|
|
67
|
-
const path =
|
|
68
|
-
return this.client.request<types.
|
|
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.
|
|
72
|
-
const path =
|
|
73
|
-
return this.client.request<types.
|
|
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(
|
|
15
|
+
async startImpersonation(): Promise<types.ImpersonationStartResponse> {
|
|
16
16
|
const path = '/start';
|
|
17
|
-
return this.client.request<
|
|
18
|
-
body: request,
|
|
19
|
-
});
|
|
17
|
+
return this.client.request<types.ImpersonationStartResponse>('POST', path);
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
async endImpersonation(
|
|
20
|
+
async endImpersonation(): Promise<types.ImpersonationEndResponse> {
|
|
23
21
|
const path = '/end';
|
|
24
|
-
return this.client.request<
|
|
25
|
-
body: request,
|
|
26
|
-
});
|
|
22
|
+
return this.client.request<types.ImpersonationEndResponse>('POST', path);
|
|
27
23
|
}
|
|
28
24
|
|
|
29
|
-
async getImpersonation(): Promise<
|
|
30
|
-
const path =
|
|
31
|
-
return this.client.request<
|
|
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<
|
|
30
|
+
async listImpersonations(): Promise<types.ImpersonationListResponse> {
|
|
35
31
|
const path = '/';
|
|
36
|
-
return this.client.request<
|
|
32
|
+
return this.client.request<types.ImpersonationListResponse>('GET', path);
|
|
37
33
|
}
|
|
38
34
|
|
|
39
|
-
async listAuditEvents(): Promise<
|
|
35
|
+
async listAuditEvents(): Promise<types.ImpersonationAuditResponse> {
|
|
40
36
|
const path = '/audit';
|
|
41
|
-
return this.client.request<
|
|
37
|
+
return this.client.request<types.ImpersonationAuditResponse>('GET', path);
|
|
42
38
|
}
|
|
43
39
|
|
|
44
|
-
async verifyImpersonation(): Promise<
|
|
40
|
+
async verifyImpersonation(): Promise<types.ImpersonationVerifyResponse> {
|
|
45
41
|
const path = '/verify';
|
|
46
|
-
return this.client.request<
|
|
42
|
+
return this.client.request<types.ImpersonationVerifyResponse>('POST', path);
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
}
|