@authsome/client 0.0.4 → 0.0.6
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 +41 -37
- package/dist/client.js +32 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +56 -56
- package/dist/plugins/admin.d.ts +5 -5
- package/dist/plugins/admin.js +21 -31
- package/dist/plugins/anonymous.d.ts +1 -1
- package/dist/plugins/anonymous.js +4 -2
- package/dist/plugins/apikey.d.ts +7 -7
- package/dist/plugins/apikey.js +41 -27
- package/dist/plugins/backupauth.d.ts +28 -28
- package/dist/plugins/backupauth.js +29 -29
- package/dist/plugins/cms.d.ts +11 -11
- package/dist/plugins/cms.js +67 -57
- package/dist/plugins/compliance.d.ts +33 -33
- package/dist/plugins/compliance.js +4 -2
- package/dist/plugins/consent.d.ts +18 -18
- package/dist/plugins/emailverification.d.ts +2 -2
- package/dist/plugins/emailverification.js +4 -2
- package/dist/plugins/idverification.d.ts +11 -11
- package/dist/plugins/idverification.js +11 -11
- package/dist/plugins/impersonation.d.ts +6 -6
- package/dist/plugins/impersonation.js +11 -15
- package/dist/plugins/jwt.d.ts +6 -5
- package/dist/plugins/jwt.js +21 -13
- package/dist/plugins/mfa.d.ts +9 -9
- package/dist/plugins/mfa.js +4 -8
- package/dist/plugins/multiapp.d.ts +19 -19
- package/dist/plugins/multiapp.js +35 -27
- package/dist/plugins/multisession.d.ts +5 -5
- package/dist/plugins/multisession.js +13 -11
- package/dist/plugins/notification.d.ts +15 -15
- package/dist/plugins/notification.js +12 -6
- package/dist/plugins/oidcprovider.d.ts +11 -11
- package/dist/plugins/oidcprovider.js +25 -19
- package/dist/plugins/organization.d.ts +5 -5
- package/dist/plugins/organization.js +16 -16
- package/dist/plugins/passkey.js +7 -7
- package/dist/plugins/permissions.js +3 -3
- package/dist/plugins/secrets.d.ts +10 -10
- package/dist/plugins/secrets.js +43 -27
- package/dist/plugins/social.js +1 -1
- package/dist/plugins/sso.js +6 -6
- package/dist/plugins/stepup.d.ts +13 -13
- package/dist/plugins/stepup.js +14 -14
- 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/plugins/webhook.js +4 -4
- package/dist/types.d.ts +3316 -2791
- package/package.json +3 -3
- package/src/client.ts +52 -37
- package/src/index.ts +18 -18
- package/src/plugins/admin.ts +21 -31
- package/src/plugins/anonymous.ts +4 -2
- package/src/plugins/apikey.ts +35 -21
- package/src/plugins/backupauth.ts +85 -85
- package/src/plugins/cms.ts +67 -57
- package/src/plugins/compliance.ts +68 -66
- package/src/plugins/consent.ts +36 -36
- package/src/plugins/emailverification.ts +6 -4
- package/src/plugins/idverification.ts +33 -33
- package/src/plugins/impersonation.ts +18 -22
- package/src/plugins/jwt.ts +23 -15
- package/src/plugins/mfa.ts +18 -22
- package/src/plugins/multiapp.ts +65 -57
- package/src/plugins/multisession.ts +20 -18
- package/src/plugins/notification.ts +36 -30
- package/src/plugins/oidcprovider.ts +41 -35
- package/src/plugins/organization.ts +26 -26
- package/src/plugins/passkey.ts +7 -7
- package/src/plugins/permissions.ts +3 -3
- package/src/plugins/secrets.ts +47 -31
- package/src/plugins/social.ts +1 -1
- package/src/plugins/sso.ts +6 -6
- package/src/plugins/stepup.ts +40 -40
- package/src/plugins/twofa.ts +12 -24
- package/src/plugins/username.ts +8 -4
- package/src/plugins/webhook.ts +4 -4
- package/src/types.ts +3576 -2874
|
@@ -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(params: { id: string }): Promise<
|
|
29
|
+
async getProfile(params: { id: string }): Promise<types.ComplianceProfileResponse> {
|
|
30
30
|
const path = `/profiles/${params.id}`;
|
|
31
|
-
return this.client.request<
|
|
31
|
+
return this.client.request<types.ComplianceProfileResponse>('GET', path);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
async getAppProfile(params: { appId: string }): Promise<
|
|
34
|
+
async getAppProfile(params: { appId: string }): Promise<types.ComplianceProfileResponse> {
|
|
35
35
|
const path = `/apps/${params.appId}/profile`;
|
|
36
|
-
return this.client.request<
|
|
36
|
+
return this.client.request<types.ComplianceProfileResponse>('GET', path);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
async updateProfile(params: { id: string }, request: types.UpdateProfileRequest): Promise<
|
|
39
|
+
async updateProfile(params: { id: string }, request: types.UpdateProfileRequest): Promise<types.ComplianceProfileResponse> {
|
|
40
40
|
const path = `/profiles/${params.id}`;
|
|
41
|
-
return this.client.request<
|
|
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<
|
|
46
|
+
async deleteProfile(params: { id: string }): Promise<types.ComplianceStatusResponse> {
|
|
47
47
|
const path = `/profiles/${params.id}`;
|
|
48
|
-
return this.client.request<
|
|
48
|
+
return this.client.request<types.ComplianceStatusResponse>('DELETE', path);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
async getComplianceStatus(params: { appId: string }): Promise<
|
|
51
|
+
async getComplianceStatus(params: { appId: string }): Promise<types.ComplianceStatusDetailsResponse> {
|
|
52
52
|
const path = `/apps/${params.appId}/status`;
|
|
53
|
-
return this.client.request<
|
|
53
|
+
return this.client.request<types.ComplianceStatusDetailsResponse>('GET', path);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
async getDashboard(params: { appId: string }): Promise<
|
|
56
|
+
async getDashboard(params: { appId: string }): Promise<types.ComplianceDashboardResponse> {
|
|
57
57
|
const path = `/apps/${params.appId}/dashboard`;
|
|
58
|
-
return this.client.request<
|
|
58
|
+
return this.client.request<types.ComplianceDashboardResponse>('GET', path);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
async runCheck(params: { profileId: string }, request: types.
|
|
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<
|
|
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<
|
|
68
|
+
async listChecks(params: { profileId: string }): Promise<types.ComplianceChecksResponse> {
|
|
69
69
|
const path = `/profiles/${params.profileId}/checks`;
|
|
70
|
-
return this.client.request<
|
|
70
|
+
return this.client.request<types.ComplianceChecksResponse>('GET', path);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
async getCheck(params: { id: string }): Promise<
|
|
73
|
+
async getCheck(params: { id: string }): Promise<types.ComplianceCheckResponse> {
|
|
74
74
|
const path = `/checks/${params.id}`;
|
|
75
|
-
return this.client.request<
|
|
75
|
+
return this.client.request<types.ComplianceCheckResponse>('GET', path);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
async listViolations(params: { appId: string }): Promise<
|
|
78
|
+
async listViolations(params: { appId: string }): Promise<types.ComplianceViolationsResponse> {
|
|
79
79
|
const path = `/apps/${params.appId}/violations`;
|
|
80
|
-
return this.client.request<
|
|
80
|
+
return this.client.request<types.ComplianceViolationsResponse>('GET', path);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
async getViolation(params: { id: string }): Promise<
|
|
83
|
+
async getViolation(params: { id: string }): Promise<types.ComplianceViolationResponse> {
|
|
84
84
|
const path = `/violations/${params.id}`;
|
|
85
|
-
return this.client.request<
|
|
85
|
+
return this.client.request<types.ComplianceViolationResponse>('GET', path);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
async resolveViolation(params: { id: string }): Promise<
|
|
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<
|
|
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.
|
|
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<
|
|
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<
|
|
102
|
+
async listReports(params: { appId: string }): Promise<types.ComplianceReportsResponse> {
|
|
101
103
|
const path = `/apps/${params.appId}/reports`;
|
|
102
|
-
return this.client.request<
|
|
104
|
+
return this.client.request<types.ComplianceReportsResponse>('GET', path);
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
async getReport(params: { id: string }): Promise<
|
|
107
|
+
async getReport(params: { id: string }): Promise<types.ComplianceReportResponse> {
|
|
106
108
|
const path = `/reports/${params.id}`;
|
|
107
|
-
return this.client.request<
|
|
109
|
+
return this.client.request<types.ComplianceReportResponse>('GET', path);
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
async downloadReport(params: { id: string }): Promise<
|
|
112
|
+
async downloadReport(params: { id: string }): Promise<types.ComplianceReportFileResponse> {
|
|
111
113
|
const path = `/reports/${params.id}/download`;
|
|
112
|
-
return this.client.request<
|
|
114
|
+
return this.client.request<types.ComplianceReportFileResponse>('GET', path);
|
|
113
115
|
}
|
|
114
116
|
|
|
115
|
-
async createEvidence(params: { appId: string }, request: types.
|
|
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<
|
|
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<
|
|
124
|
+
async listEvidence(params: { appId: string }): Promise<types.ComplianceEvidencesResponse> {
|
|
123
125
|
const path = `/apps/${params.appId}/evidence`;
|
|
124
|
-
return this.client.request<
|
|
126
|
+
return this.client.request<types.ComplianceEvidencesResponse>('GET', path);
|
|
125
127
|
}
|
|
126
128
|
|
|
127
|
-
async getEvidence(params: { id: string }): Promise<
|
|
129
|
+
async getEvidence(params: { id: string }): Promise<types.ComplianceEvidenceResponse> {
|
|
128
130
|
const path = `/evidence/${params.id}`;
|
|
129
|
-
return this.client.request<
|
|
131
|
+
return this.client.request<types.ComplianceEvidenceResponse>('GET', path);
|
|
130
132
|
}
|
|
131
133
|
|
|
132
|
-
async deleteEvidence(params: { id: string }): Promise<
|
|
134
|
+
async deleteEvidence(params: { id: string }): Promise<types.ComplianceStatusResponse> {
|
|
133
135
|
const path = `/evidence/${params.id}`;
|
|
134
|
-
return this.client.request<
|
|
136
|
+
return this.client.request<types.ComplianceStatusResponse>('DELETE', path);
|
|
135
137
|
}
|
|
136
138
|
|
|
137
|
-
async createPolicy(params: { appId: string }, request: types.
|
|
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<
|
|
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<
|
|
146
|
+
async listPolicies(params: { appId: string }): Promise<types.CompliancePoliciesResponse> {
|
|
145
147
|
const path = `/apps/${params.appId}/policies`;
|
|
146
|
-
return this.client.request<
|
|
148
|
+
return this.client.request<types.CompliancePoliciesResponse>('GET', path);
|
|
147
149
|
}
|
|
148
150
|
|
|
149
|
-
async getPolicy(params: { id: string }): Promise<
|
|
151
|
+
async getPolicy(params: { id: string }): Promise<types.CompliancePolicyResponse> {
|
|
150
152
|
const path = `/policies/${params.id}`;
|
|
151
|
-
return this.client.request<
|
|
153
|
+
return this.client.request<types.CompliancePolicyResponse>('GET', path);
|
|
152
154
|
}
|
|
153
155
|
|
|
154
|
-
async updatePolicy(params: { id: string }, request: types.
|
|
156
|
+
async updatePolicy(params: { id: string }, request: types.UpdatePolicyRequest): Promise<types.CompliancePolicyResponse> {
|
|
155
157
|
const path = `/policies/${params.id}`;
|
|
156
|
-
return this.client.request<
|
|
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<
|
|
163
|
+
async deletePolicy(params: { id: string }): Promise<types.ComplianceStatusResponse> {
|
|
162
164
|
const path = `/policies/${params.id}`;
|
|
163
|
-
return this.client.request<
|
|
165
|
+
return this.client.request<types.ComplianceStatusResponse>('DELETE', path);
|
|
164
166
|
}
|
|
165
167
|
|
|
166
|
-
async createTraining(params: { appId: string }, request: types.
|
|
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<
|
|
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<
|
|
175
|
+
async listTraining(params: { appId: string }): Promise<types.ComplianceTrainingsResponse> {
|
|
174
176
|
const path = `/apps/${params.appId}/training`;
|
|
175
|
-
return this.client.request<
|
|
177
|
+
return this.client.request<types.ComplianceTrainingsResponse>('GET', path);
|
|
176
178
|
}
|
|
177
179
|
|
|
178
|
-
async getUserTraining(params: { userId: string }): Promise<
|
|
180
|
+
async getUserTraining(params: { userId: string }): Promise<types.ComplianceUserTrainingResponse> {
|
|
179
181
|
const path = `/users/${params.userId}/training`;
|
|
180
|
-
return this.client.request<
|
|
182
|
+
return this.client.request<types.ComplianceUserTrainingResponse>('GET', path);
|
|
181
183
|
}
|
|
182
184
|
|
|
183
|
-
async completeTraining(params: { id: string }, request: types.
|
|
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<
|
|
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(params: { standard: string }): Promise<
|
|
197
|
+
async getTemplate(params: { standard: string }): Promise<types.ComplianceTemplateResponse> {
|
|
196
198
|
const path = `/templates/${params.standard}`;
|
|
197
|
-
return this.client.request<
|
|
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(params: { id: string }): Promise<
|
|
22
|
+
async getConsent(params: { id: string }): Promise<types.ConsentRecordResponse> {
|
|
23
23
|
const path = `/records/${params.id}`;
|
|
24
|
-
return this.client.request<
|
|
24
|
+
return this.client.request<types.ConsentRecordResponse>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async updateConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<
|
|
27
|
+
async updateConsent(params: { id: string }, request: types.UpdateConsentRequest): Promise<types.ConsentRecordResponse> {
|
|
28
28
|
const path = `/records/${params.id}`;
|
|
29
|
-
return this.client.request<
|
|
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.
|
|
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.
|
|
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(params: { id: string }): Promise<
|
|
48
|
+
async getConsentPolicy(params: { id: string }): Promise<types.ConsentPolicyResponse> {
|
|
49
49
|
const path = `/policies/${params.id}`;
|
|
50
|
-
return this.client.request<
|
|
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(params: { id: string }): Promise<
|
|
72
|
+
async getDataExport(params: { id: string }): Promise<types.ConsentExportResponse> {
|
|
73
73
|
const path = `/export/${params.id}`;
|
|
74
|
-
return this.client.request<
|
|
74
|
+
return this.client.request<types.ConsentExportResponse>('GET', path);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
async downloadDataExport(params: { id: string }): Promise<
|
|
77
|
+
async downloadDataExport(params: { id: string }): Promise<types.ConsentExportFileResponse> {
|
|
78
78
|
const path = `/export/${params.id}/download`;
|
|
79
|
-
return this.client.request<
|
|
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(params: { id: string }): Promise<
|
|
89
|
+
async getDataDeletion(params: { id: string }): Promise<types.ConsentDeletionResponse> {
|
|
90
90
|
const path = `/deletion/${params.id}`;
|
|
91
|
-
return this.client.request<
|
|
91
|
+
return this.client.request<types.ConsentDeletionResponse>('GET', path);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
async approveDeletionRequest(params: { id: string }): Promise<types.
|
|
94
|
+
async approveDeletionRequest(params: { id: string }): Promise<types.ConsentStatusResponse> {
|
|
95
95
|
const path = `/deletion/${params.id}/approve`;
|
|
96
|
-
return this.client.request<types.
|
|
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
|
}
|
|
@@ -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<
|
|
15
|
+
async send(request: types.SendRequest): Promise<types.SendResponse> {
|
|
16
16
|
const path = '/email-verification/send';
|
|
17
|
-
return this.client.request<
|
|
17
|
+
return this.client.request<types.SendResponse>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async verify(): Promise<
|
|
22
|
+
async verify(request?: types.VerifyRequest): Promise<types.VerifyResponse> {
|
|
23
23
|
const path = '/email-verification/verify';
|
|
24
|
-
return this.client.request<
|
|
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> {
|
|
@@ -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.
|
|
16
|
-
const path = '/sessions';
|
|
17
|
-
return this.client.request<types.
|
|
15
|
+
async createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.IDVerificationSessionResponse> {
|
|
16
|
+
const path = '/verification/sessions';
|
|
17
|
+
return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async getVerificationSession(params: { id: string }): Promise<types.
|
|
23
|
-
const path = `/sessions/${params.id}`;
|
|
24
|
-
return this.client.request<types.
|
|
22
|
+
async getVerificationSession(params: { id: string }): Promise<types.IDVerificationSessionResponse> {
|
|
23
|
+
const path = `/verification/sessions/${params.id}`;
|
|
24
|
+
return this.client.request<types.IDVerificationSessionResponse>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
async getVerification(params: { id: string }): Promise<types.
|
|
28
|
-
const path =
|
|
29
|
-
return this.client.request<types.
|
|
27
|
+
async getVerification(params: { id: string }): Promise<types.IDVerificationResponse> {
|
|
28
|
+
const path = `/verification/${params.id}`;
|
|
29
|
+
return this.client.request<types.IDVerificationResponse>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
async getUserVerifications(): Promise<types.
|
|
33
|
-
const path = '/me';
|
|
34
|
-
return this.client.request<types.
|
|
32
|
+
async getUserVerifications(): Promise<types.IDVerificationListResponse> {
|
|
33
|
+
const path = '/verification/me';
|
|
34
|
+
return this.client.request<types.IDVerificationListResponse>('GET', path);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
async getUserVerificationStatus(): Promise<types.
|
|
38
|
-
const path = '/me/status';
|
|
39
|
-
return this.client.request<types.
|
|
37
|
+
async getUserVerificationStatus(): Promise<types.IDVerificationStatusResponse> {
|
|
38
|
+
const path = '/verification/me/status';
|
|
39
|
+
return this.client.request<types.IDVerificationStatusResponse>('GET', path);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
async requestReverification(request: types.RequestReverification_req): Promise<types.
|
|
43
|
-
const path = '/me/reverify';
|
|
44
|
-
return this.client.request<types.
|
|
42
|
+
async requestReverification(request: types.RequestReverification_req): Promise<types.IDVerificationSessionResponse> {
|
|
43
|
+
const path = '/verification/me/reverify';
|
|
44
|
+
return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
|
|
45
45
|
body: request,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
async handleWebhook(params: { provider: string }): Promise<
|
|
50
|
-
const path = `/webhook/${params.provider}`;
|
|
51
|
-
return this.client.request<
|
|
49
|
+
async handleWebhook(params: { provider: string }): Promise<types.IDVerificationWebhookResponse> {
|
|
50
|
+
const path = `/verification/webhook/${params.provider}`;
|
|
51
|
+
return this.client.request<types.IDVerificationWebhookResponse>('POST', path);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
async adminBlockUser(params: { userId: string }, request: types.AdminBlockUser_req): Promise<types.
|
|
55
|
-
const path = `/users/${params.userId}/block`;
|
|
56
|
-
return this.client.request<types.
|
|
54
|
+
async adminBlockUser(params: { userId: string }, request: types.AdminBlockUser_req): Promise<types.IDVerificationStatusResponse> {
|
|
55
|
+
const path = `/verification/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(params: { userId: string }): Promise<types.
|
|
62
|
-
const path = `/users/${params.userId}/unblock`;
|
|
63
|
-
return this.client.request<types.
|
|
61
|
+
async adminUnblockUser(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
|
|
62
|
+
const path = `/verification/users/${params.userId}/unblock`;
|
|
63
|
+
return this.client.request<types.IDVerificationStatusResponse>('POST', path);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
async adminGetUserVerificationStatus(params: { userId: string }): Promise<types.
|
|
67
|
-
const path = `/users/${params.userId}/status`;
|
|
68
|
-
return this.client.request<types.
|
|
66
|
+
async adminGetUserVerificationStatus(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
|
|
67
|
+
const path = `/verification/users/${params.userId}/status`;
|
|
68
|
+
return this.client.request<types.IDVerificationStatusResponse>('GET', path);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
async adminGetUserVerifications(params: { userId: string }): Promise<types.
|
|
72
|
-
const path = `/users/${params.userId}/verifications`;
|
|
73
|
-
return this.client.request<types.
|
|
71
|
+
async adminGetUserVerifications(params: { userId: string }): Promise<types.IDVerificationListResponse> {
|
|
72
|
+
const path = `/verification/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(
|
|
16
|
-
const path = '/start';
|
|
17
|
-
return this.client.request<
|
|
18
|
-
body: request,
|
|
19
|
-
});
|
|
15
|
+
async startImpersonation(): Promise<types.ImpersonationStartResponse> {
|
|
16
|
+
const path = '/impersonation/start';
|
|
17
|
+
return this.client.request<types.ImpersonationStartResponse>('POST', path);
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
async endImpersonation(
|
|
23
|
-
const path = '/end';
|
|
24
|
-
return this.client.request<
|
|
25
|
-
body: request,
|
|
26
|
-
});
|
|
20
|
+
async endImpersonation(): Promise<types.ImpersonationEndResponse> {
|
|
21
|
+
const path = '/impersonation/end';
|
|
22
|
+
return this.client.request<types.ImpersonationEndResponse>('POST', path);
|
|
27
23
|
}
|
|
28
24
|
|
|
29
|
-
async getImpersonation(params: { id: string }): Promise<
|
|
30
|
-
const path =
|
|
31
|
-
return this.client.request<
|
|
25
|
+
async getImpersonation(params: { id: string }): Promise<types.ImpersonationSession> {
|
|
26
|
+
const path = `/impersonation/${params.id}`;
|
|
27
|
+
return this.client.request<types.ImpersonationSession>('GET', path);
|
|
32
28
|
}
|
|
33
29
|
|
|
34
|
-
async listImpersonations(): Promise<
|
|
35
|
-
const path = '/';
|
|
36
|
-
return this.client.request<
|
|
30
|
+
async listImpersonations(): Promise<types.ImpersonationListResponse> {
|
|
31
|
+
const path = '/impersonation/';
|
|
32
|
+
return this.client.request<types.ImpersonationListResponse>('GET', path);
|
|
37
33
|
}
|
|
38
34
|
|
|
39
|
-
async listAuditEvents(): Promise<
|
|
40
|
-
const path = '/audit';
|
|
41
|
-
return this.client.request<
|
|
35
|
+
async listAuditEvents(): Promise<types.ImpersonationAuditResponse> {
|
|
36
|
+
const path = '/impersonation/audit';
|
|
37
|
+
return this.client.request<types.ImpersonationAuditResponse>('GET', path);
|
|
42
38
|
}
|
|
43
39
|
|
|
44
|
-
async verifyImpersonation(): Promise<
|
|
45
|
-
const path = '/verify';
|
|
46
|
-
return this.client.request<
|
|
40
|
+
async verifyImpersonation(): Promise<types.ImpersonationVerifyResponse> {
|
|
41
|
+
const path = '/impersonation/verify';
|
|
42
|
+
return this.client.request<types.ImpersonationVerifyResponse>('POST', path);
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
}
|
package/src/plugins/jwt.ts
CHANGED
|
@@ -12,29 +12,37 @@ export class JwtPlugin implements ClientPlugin {
|
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async createJWTKey(): Promise<
|
|
16
|
-
const path = '/createjwtkey';
|
|
17
|
-
return this.client.request<
|
|
15
|
+
async createJWTKey(request: types.CreateJWTKeyRequest): Promise<types.JWTKey> {
|
|
16
|
+
const path = '/jwt/createjwtkey';
|
|
17
|
+
return this.client.request<types.JWTKey>('POST', path, {
|
|
18
|
+
body: request,
|
|
19
|
+
});
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
async listJWTKeys(): Promise<
|
|
21
|
-
const path = '/listjwtkeys';
|
|
22
|
-
return this.client.request<
|
|
22
|
+
async listJWTKeys(request?: types.ListJWTKeysRequest): Promise<types.ListJWTKeysResponse> {
|
|
23
|
+
const path = '/jwt/listjwtkeys';
|
|
24
|
+
return this.client.request<types.ListJWTKeysResponse>('GET', path, {
|
|
25
|
+
query: this.client.toQueryParams(request),
|
|
26
|
+
});
|
|
23
27
|
}
|
|
24
28
|
|
|
25
|
-
async getJWKS(): Promise<
|
|
26
|
-
const path = '/jwks';
|
|
27
|
-
return this.client.request<
|
|
29
|
+
async getJWKS(): Promise<types.JWKSResponse> {
|
|
30
|
+
const path = '/jwt/jwks';
|
|
31
|
+
return this.client.request<types.JWKSResponse>('GET', path);
|
|
28
32
|
}
|
|
29
33
|
|
|
30
|
-
async generateToken(): Promise<
|
|
31
|
-
const path = '/generate';
|
|
32
|
-
return this.client.request<
|
|
34
|
+
async generateToken(request: types.GenerateTokenRequest): Promise<types.GenerateTokenResponse> {
|
|
35
|
+
const path = '/jwt/generate';
|
|
36
|
+
return this.client.request<types.GenerateTokenResponse>('POST', path, {
|
|
37
|
+
body: request,
|
|
38
|
+
});
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
async verifyToken(): Promise<
|
|
36
|
-
const path = '/verify';
|
|
37
|
-
return this.client.request<
|
|
41
|
+
async verifyToken(request: types.VerifyTokenRequest): Promise<types.VerifyTokenResponse> {
|
|
42
|
+
const path = '/jwt/verify';
|
|
43
|
+
return this.client.request<types.VerifyTokenResponse>('POST', path, {
|
|
44
|
+
body: request,
|
|
45
|
+
});
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
}
|