@authsome/client 0.0.1
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 +91 -0
- package/dist/client.js +129 -0
- package/dist/errors.d.ts +31 -0
- package/dist/errors.js +94 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +47 -0
- package/dist/plugin.d.ts +6 -0
- package/dist/plugin.js +3 -0
- package/dist/plugins/admin.d.ts +20 -0
- package/dist/plugins/admin.js +71 -0
- package/dist/plugins/anonymous.d.ts +11 -0
- package/dist/plugins/anonymous.js +27 -0
- package/dist/plugins/apikey.d.ts +16 -0
- package/dist/plugins/apikey.js +47 -0
- package/dist/plugins/backupauth.d.ts +38 -0
- package/dist/plugins/backupauth.js +177 -0
- package/dist/plugins/compliance.d.ts +42 -0
- package/dist/plugins/compliance.js +169 -0
- package/dist/plugins/consent.d.ts +27 -0
- package/dist/plugins/consent.js +105 -0
- package/dist/plugins/emailotp.d.ts +11 -0
- package/dist/plugins/emailotp.js +29 -0
- package/dist/plugins/idverification.d.ts +20 -0
- package/dist/plugins/idverification.js +67 -0
- package/dist/plugins/impersonation.d.ts +15 -0
- package/dist/plugins/impersonation.js +45 -0
- package/dist/plugins/jwt.d.ts +13 -0
- package/dist/plugins/jwt.js +37 -0
- package/dist/plugins/magiclink.d.ts +11 -0
- package/dist/plugins/magiclink.js +27 -0
- package/dist/plugins/mfa.d.ts +25 -0
- package/dist/plugins/mfa.js +93 -0
- package/dist/plugins/multiapp.d.ts +28 -0
- package/dist/plugins/multiapp.js +95 -0
- package/dist/plugins/multisession.d.ts +12 -0
- package/dist/plugins/multisession.js +31 -0
- package/dist/plugins/notification.d.ts +24 -0
- package/dist/plugins/notification.js +81 -0
- package/dist/plugins/oidcprovider.d.ts +22 -0
- package/dist/plugins/oidcprovider.js +75 -0
- package/dist/plugins/organization.d.ts +25 -0
- package/dist/plugins/organization.js +81 -0
- package/dist/plugins/passkey.d.ts +16 -0
- package/dist/plugins/passkey.js +45 -0
- package/dist/plugins/phone.d.ts +12 -0
- package/dist/plugins/phone.js +35 -0
- package/dist/plugins/social.d.ts +14 -0
- package/dist/plugins/social.js +41 -0
- package/dist/plugins/sso.d.ts +15 -0
- package/dist/plugins/sso.js +47 -0
- package/dist/plugins/stepup.d.ts +23 -0
- package/dist/plugins/stepup.js +81 -0
- package/dist/plugins/twofa.d.ts +15 -0
- package/dist/plugins/twofa.js +53 -0
- package/dist/plugins/username.d.ts +11 -0
- package/dist/plugins/username.js +25 -0
- package/dist/plugins/webhook.d.ts +32 -0
- package/dist/plugins/webhook.js +44 -0
- package/dist/types.d.ts +3175 -0
- package/dist/types.js +3 -0
- package/package.json +38 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated backupauth plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.BackupauthPlugin = void 0;
|
|
5
|
+
exports.backupauthClient = backupauthClient;
|
|
6
|
+
class BackupauthPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'backupauth';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async startRecovery(request) {
|
|
14
|
+
const path = '/recovery/start';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async continueRecovery(request) {
|
|
20
|
+
const path = '/recovery/continue';
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async completeRecovery(request) {
|
|
26
|
+
const path = '/recovery/complete';
|
|
27
|
+
return this.client.request('POST', path, {
|
|
28
|
+
body: request,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async cancelRecovery(request) {
|
|
32
|
+
const path = '/recovery/cancel';
|
|
33
|
+
return this.client.request('POST', path, {
|
|
34
|
+
body: request,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
async generateRecoveryCodes(request) {
|
|
38
|
+
const path = '/recovery-codes/generate';
|
|
39
|
+
return this.client.request('POST', path, {
|
|
40
|
+
body: request,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async verifyRecoveryCode(request) {
|
|
44
|
+
const path = '/recovery-codes/verify';
|
|
45
|
+
return this.client.request('POST', path, {
|
|
46
|
+
body: request,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
async setupSecurityQuestions(request) {
|
|
50
|
+
const path = '/security-questions/setup';
|
|
51
|
+
return this.client.request('POST', path, {
|
|
52
|
+
body: request,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
async getSecurityQuestions(request) {
|
|
56
|
+
const path = '/security-questions/get';
|
|
57
|
+
return this.client.request('POST', path, {
|
|
58
|
+
body: request,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async verifySecurityAnswers(request) {
|
|
62
|
+
const path = '/security-questions/verify';
|
|
63
|
+
return this.client.request('POST', path, {
|
|
64
|
+
body: request,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
async addTrustedContact(request) {
|
|
68
|
+
const path = '/trusted-contacts/add';
|
|
69
|
+
return this.client.request('POST', path, {
|
|
70
|
+
body: request,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
async listTrustedContacts() {
|
|
74
|
+
const path = '/trusted-contacts';
|
|
75
|
+
return this.client.request('GET', path);
|
|
76
|
+
}
|
|
77
|
+
async verifyTrustedContact(request) {
|
|
78
|
+
const path = '/trusted-contacts/verify';
|
|
79
|
+
return this.client.request('POST', path, {
|
|
80
|
+
body: request,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async requestTrustedContactVerification(request) {
|
|
84
|
+
const path = '/trusted-contacts/request-verification';
|
|
85
|
+
return this.client.request('POST', path, {
|
|
86
|
+
body: request,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
async removeTrustedContact() {
|
|
90
|
+
const path = '/trusted-contacts/:id';
|
|
91
|
+
return this.client.request('DELETE', path);
|
|
92
|
+
}
|
|
93
|
+
async sendVerificationCode(request) {
|
|
94
|
+
const path = '/verification/send';
|
|
95
|
+
return this.client.request('POST', path, {
|
|
96
|
+
body: request,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
async verifyCode(request) {
|
|
100
|
+
const path = '/verification/verify';
|
|
101
|
+
return this.client.request('POST', path, {
|
|
102
|
+
body: request,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
async scheduleVideoSession(request) {
|
|
106
|
+
const path = '/video/schedule';
|
|
107
|
+
return this.client.request('POST', path, {
|
|
108
|
+
body: request,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async startVideoSession(request) {
|
|
112
|
+
const path = '/video/start';
|
|
113
|
+
return this.client.request('POST', path, {
|
|
114
|
+
body: request,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
async completeVideoSession(request) {
|
|
118
|
+
const path = '/video/complete';
|
|
119
|
+
return this.client.request('POST', path, {
|
|
120
|
+
body: request,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
async uploadDocument(request) {
|
|
124
|
+
const path = '/documents/upload';
|
|
125
|
+
return this.client.request('POST', path, {
|
|
126
|
+
body: request,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
async getDocumentVerification() {
|
|
130
|
+
const path = '/documents/:id';
|
|
131
|
+
return this.client.request('GET', path);
|
|
132
|
+
}
|
|
133
|
+
async reviewDocument(request) {
|
|
134
|
+
const path = '/documents/:id/review';
|
|
135
|
+
return this.client.request('POST', path, {
|
|
136
|
+
body: request,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
async listRecoverySessions() {
|
|
140
|
+
const path = '/sessions';
|
|
141
|
+
return this.client.request('GET', path);
|
|
142
|
+
}
|
|
143
|
+
async approveRecovery(request) {
|
|
144
|
+
const path = '/sessions/:id/approve';
|
|
145
|
+
return this.client.request('POST', path, {
|
|
146
|
+
body: request,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
async rejectRecovery(request) {
|
|
150
|
+
const path = '/sessions/:id/reject';
|
|
151
|
+
return this.client.request('POST', path, {
|
|
152
|
+
body: request,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
async getRecoveryStats() {
|
|
156
|
+
const path = '/stats';
|
|
157
|
+
return this.client.request('GET', path);
|
|
158
|
+
}
|
|
159
|
+
async getRecoveryConfig() {
|
|
160
|
+
const path = '/config';
|
|
161
|
+
return this.client.request('GET', path);
|
|
162
|
+
}
|
|
163
|
+
async updateRecoveryConfig(request) {
|
|
164
|
+
const path = '/config';
|
|
165
|
+
return this.client.request('PUT', path, {
|
|
166
|
+
body: request,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
async healthCheck() {
|
|
170
|
+
const path = '/health';
|
|
171
|
+
return this.client.request('GET', path);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.BackupauthPlugin = BackupauthPlugin;
|
|
175
|
+
function backupauthClient() {
|
|
176
|
+
return new BackupauthPlugin();
|
|
177
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class CompliancePlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "compliance";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
createProfile(request: types.CreateProfileRequest): Promise<void>;
|
|
9
|
+
createProfileFromTemplate(request: types.CreateProfileFromTemplate_req): Promise<void>;
|
|
10
|
+
getProfile(): Promise<void>;
|
|
11
|
+
getAppProfile(): Promise<void>;
|
|
12
|
+
updateProfile(request: types.UpdateProfileRequest): Promise<void>;
|
|
13
|
+
deleteProfile(): Promise<void>;
|
|
14
|
+
getComplianceStatus(): Promise<void>;
|
|
15
|
+
getDashboard(): Promise<void>;
|
|
16
|
+
runCheck(request: types.RunCheck_req): Promise<void>;
|
|
17
|
+
listChecks(): Promise<void>;
|
|
18
|
+
getCheck(): Promise<void>;
|
|
19
|
+
listViolations(): Promise<void>;
|
|
20
|
+
getViolation(): Promise<void>;
|
|
21
|
+
resolveViolation(): Promise<void>;
|
|
22
|
+
generateReport(request: types.GenerateReport_req): Promise<void>;
|
|
23
|
+
listReports(): Promise<void>;
|
|
24
|
+
getReport(): Promise<void>;
|
|
25
|
+
downloadReport(): Promise<void>;
|
|
26
|
+
createEvidence(request: types.CreateEvidence_req): Promise<void>;
|
|
27
|
+
listEvidence(): Promise<void>;
|
|
28
|
+
getEvidence(): Promise<void>;
|
|
29
|
+
deleteEvidence(): Promise<void>;
|
|
30
|
+
createPolicy(request: types.CreatePolicy_req): Promise<void>;
|
|
31
|
+
listPolicies(): Promise<void>;
|
|
32
|
+
getPolicy(): Promise<void>;
|
|
33
|
+
updatePolicy(request: types.UpdatePolicy_req): Promise<void>;
|
|
34
|
+
deletePolicy(): Promise<void>;
|
|
35
|
+
createTraining(request: types.CreateTraining_req): Promise<void>;
|
|
36
|
+
listTraining(): Promise<void>;
|
|
37
|
+
getUserTraining(): Promise<void>;
|
|
38
|
+
completeTraining(request: types.CompleteTraining_req): Promise<void>;
|
|
39
|
+
listTemplates(): Promise<void>;
|
|
40
|
+
getTemplate(): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
export declare function complianceClient(): CompliancePlugin;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated compliance plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CompliancePlugin = void 0;
|
|
5
|
+
exports.complianceClient = complianceClient;
|
|
6
|
+
class CompliancePlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'compliance';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async createProfile(request) {
|
|
14
|
+
const path = '/profiles';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async createProfileFromTemplate(request) {
|
|
20
|
+
const path = '/profiles/from-template';
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async getProfile() {
|
|
26
|
+
const path = '/profiles/:id';
|
|
27
|
+
return this.client.request('GET', path);
|
|
28
|
+
}
|
|
29
|
+
async getAppProfile() {
|
|
30
|
+
const path = '/apps/:appId/profile';
|
|
31
|
+
return this.client.request('GET', path);
|
|
32
|
+
}
|
|
33
|
+
async updateProfile(request) {
|
|
34
|
+
const path = '/profiles/:id';
|
|
35
|
+
return this.client.request('PUT', path, {
|
|
36
|
+
body: request,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
async deleteProfile() {
|
|
40
|
+
const path = '/profiles/:id';
|
|
41
|
+
return this.client.request('DELETE', path);
|
|
42
|
+
}
|
|
43
|
+
async getComplianceStatus() {
|
|
44
|
+
const path = '/apps/:appId/status';
|
|
45
|
+
return this.client.request('GET', path);
|
|
46
|
+
}
|
|
47
|
+
async getDashboard() {
|
|
48
|
+
const path = '/apps/:appId/dashboard';
|
|
49
|
+
return this.client.request('GET', path);
|
|
50
|
+
}
|
|
51
|
+
async runCheck(request) {
|
|
52
|
+
const path = '/profiles/:profileId/checks';
|
|
53
|
+
return this.client.request('POST', path, {
|
|
54
|
+
body: request,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async listChecks() {
|
|
58
|
+
const path = '/profiles/:profileId/checks';
|
|
59
|
+
return this.client.request('GET', path);
|
|
60
|
+
}
|
|
61
|
+
async getCheck() {
|
|
62
|
+
const path = '/checks/:id';
|
|
63
|
+
return this.client.request('GET', path);
|
|
64
|
+
}
|
|
65
|
+
async listViolations() {
|
|
66
|
+
const path = '/apps/:appId/violations';
|
|
67
|
+
return this.client.request('GET', path);
|
|
68
|
+
}
|
|
69
|
+
async getViolation() {
|
|
70
|
+
const path = '/violations/:id';
|
|
71
|
+
return this.client.request('GET', path);
|
|
72
|
+
}
|
|
73
|
+
async resolveViolation() {
|
|
74
|
+
const path = '/violations/:id/resolve';
|
|
75
|
+
return this.client.request('PUT', path);
|
|
76
|
+
}
|
|
77
|
+
async generateReport(request) {
|
|
78
|
+
const path = '/apps/:appId/reports';
|
|
79
|
+
return this.client.request('POST', path, {
|
|
80
|
+
body: request,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async listReports() {
|
|
84
|
+
const path = '/apps/:appId/reports';
|
|
85
|
+
return this.client.request('GET', path);
|
|
86
|
+
}
|
|
87
|
+
async getReport() {
|
|
88
|
+
const path = '/reports/:id';
|
|
89
|
+
return this.client.request('GET', path);
|
|
90
|
+
}
|
|
91
|
+
async downloadReport() {
|
|
92
|
+
const path = '/reports/:id/download';
|
|
93
|
+
return this.client.request('GET', path);
|
|
94
|
+
}
|
|
95
|
+
async createEvidence(request) {
|
|
96
|
+
const path = '/apps/:appId/evidence';
|
|
97
|
+
return this.client.request('POST', path, {
|
|
98
|
+
body: request,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
async listEvidence() {
|
|
102
|
+
const path = '/apps/:appId/evidence';
|
|
103
|
+
return this.client.request('GET', path);
|
|
104
|
+
}
|
|
105
|
+
async getEvidence() {
|
|
106
|
+
const path = '/evidence/:id';
|
|
107
|
+
return this.client.request('GET', path);
|
|
108
|
+
}
|
|
109
|
+
async deleteEvidence() {
|
|
110
|
+
const path = '/evidence/:id';
|
|
111
|
+
return this.client.request('DELETE', path);
|
|
112
|
+
}
|
|
113
|
+
async createPolicy(request) {
|
|
114
|
+
const path = '/apps/:appId/policies';
|
|
115
|
+
return this.client.request('POST', path, {
|
|
116
|
+
body: request,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
async listPolicies() {
|
|
120
|
+
const path = '/apps/:appId/policies';
|
|
121
|
+
return this.client.request('GET', path);
|
|
122
|
+
}
|
|
123
|
+
async getPolicy() {
|
|
124
|
+
const path = '/policies/:id';
|
|
125
|
+
return this.client.request('GET', path);
|
|
126
|
+
}
|
|
127
|
+
async updatePolicy(request) {
|
|
128
|
+
const path = '/policies/:id';
|
|
129
|
+
return this.client.request('PUT', path, {
|
|
130
|
+
body: request,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
async deletePolicy() {
|
|
134
|
+
const path = '/policies/:id';
|
|
135
|
+
return this.client.request('DELETE', path);
|
|
136
|
+
}
|
|
137
|
+
async createTraining(request) {
|
|
138
|
+
const path = '/apps/:appId/training';
|
|
139
|
+
return this.client.request('POST', path, {
|
|
140
|
+
body: request,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
async listTraining() {
|
|
144
|
+
const path = '/apps/:appId/training';
|
|
145
|
+
return this.client.request('GET', path);
|
|
146
|
+
}
|
|
147
|
+
async getUserTraining() {
|
|
148
|
+
const path = '/users/:userId/training';
|
|
149
|
+
return this.client.request('GET', path);
|
|
150
|
+
}
|
|
151
|
+
async completeTraining(request) {
|
|
152
|
+
const path = '/training/:id/complete';
|
|
153
|
+
return this.client.request('PUT', path, {
|
|
154
|
+
body: request,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
async listTemplates() {
|
|
158
|
+
const path = '/templates';
|
|
159
|
+
return this.client.request('GET', path);
|
|
160
|
+
}
|
|
161
|
+
async getTemplate() {
|
|
162
|
+
const path = '/templates/:standard';
|
|
163
|
+
return this.client.request('GET', path);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
exports.CompliancePlugin = CompliancePlugin;
|
|
167
|
+
function complianceClient() {
|
|
168
|
+
return new CompliancePlugin();
|
|
169
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class ConsentPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "consent";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
createConsent(request: types.CreateConsentRequest): Promise<void>;
|
|
9
|
+
getConsent(): Promise<void>;
|
|
10
|
+
updateConsent(request: types.UpdateConsentRequest): Promise<void>;
|
|
11
|
+
revokeConsent(request: types.UpdateConsentRequest): Promise<types.MessageResponse>;
|
|
12
|
+
createConsentPolicy(request: types.CreatePolicyRequest): Promise<void>;
|
|
13
|
+
getConsentPolicy(): Promise<void>;
|
|
14
|
+
recordCookieConsent(request: types.CookieConsentRequest): Promise<void>;
|
|
15
|
+
getCookieConsent(): Promise<void>;
|
|
16
|
+
requestDataExport(request: types.DataExportRequestInput): Promise<void>;
|
|
17
|
+
getDataExport(): Promise<void>;
|
|
18
|
+
downloadDataExport(): Promise<void>;
|
|
19
|
+
requestDataDeletion(request: types.DataDeletionRequestInput): Promise<void>;
|
|
20
|
+
getDataDeletion(): Promise<void>;
|
|
21
|
+
approveDeletionRequest(): Promise<types.MessageResponse>;
|
|
22
|
+
getPrivacySettings(): Promise<void>;
|
|
23
|
+
updatePrivacySettings(request: types.PrivacySettingsRequest): Promise<void>;
|
|
24
|
+
getConsentAuditLogs(): Promise<void>;
|
|
25
|
+
generateConsentReport(): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export declare function consentClient(): ConsentPlugin;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated consent plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ConsentPlugin = void 0;
|
|
5
|
+
exports.consentClient = consentClient;
|
|
6
|
+
class ConsentPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'consent';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async createConsent(request) {
|
|
14
|
+
const path = '/records';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async getConsent() {
|
|
20
|
+
const path = '/records/:id';
|
|
21
|
+
return this.client.request('GET', path);
|
|
22
|
+
}
|
|
23
|
+
async updateConsent(request) {
|
|
24
|
+
const path = '/records/:id';
|
|
25
|
+
return this.client.request('PUT', path, {
|
|
26
|
+
body: request,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
async revokeConsent(request) {
|
|
30
|
+
const path = '/revoke/:id';
|
|
31
|
+
return this.client.request('POST', path, {
|
|
32
|
+
body: request,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
async createConsentPolicy(request) {
|
|
36
|
+
const path = '/policies';
|
|
37
|
+
return this.client.request('POST', path, {
|
|
38
|
+
body: request,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async getConsentPolicy() {
|
|
42
|
+
const path = '/policies/:id';
|
|
43
|
+
return this.client.request('GET', path);
|
|
44
|
+
}
|
|
45
|
+
async recordCookieConsent(request) {
|
|
46
|
+
const path = '/cookies';
|
|
47
|
+
return this.client.request('POST', path, {
|
|
48
|
+
body: request,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
async getCookieConsent() {
|
|
52
|
+
const path = '/cookies';
|
|
53
|
+
return this.client.request('GET', path);
|
|
54
|
+
}
|
|
55
|
+
async requestDataExport(request) {
|
|
56
|
+
const path = '/export';
|
|
57
|
+
return this.client.request('POST', path, {
|
|
58
|
+
body: request,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async getDataExport() {
|
|
62
|
+
const path = '/export/:id';
|
|
63
|
+
return this.client.request('GET', path);
|
|
64
|
+
}
|
|
65
|
+
async downloadDataExport() {
|
|
66
|
+
const path = '/export/:id/download';
|
|
67
|
+
return this.client.request('GET', path);
|
|
68
|
+
}
|
|
69
|
+
async requestDataDeletion(request) {
|
|
70
|
+
const path = '/deletion';
|
|
71
|
+
return this.client.request('POST', path, {
|
|
72
|
+
body: request,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
async getDataDeletion() {
|
|
76
|
+
const path = '/deletion/:id';
|
|
77
|
+
return this.client.request('GET', path);
|
|
78
|
+
}
|
|
79
|
+
async approveDeletionRequest() {
|
|
80
|
+
const path = '/deletion/:id/approve';
|
|
81
|
+
return this.client.request('POST', path);
|
|
82
|
+
}
|
|
83
|
+
async getPrivacySettings() {
|
|
84
|
+
const path = '/settings';
|
|
85
|
+
return this.client.request('GET', path);
|
|
86
|
+
}
|
|
87
|
+
async updatePrivacySettings(request) {
|
|
88
|
+
const path = '/settings';
|
|
89
|
+
return this.client.request('PUT', path, {
|
|
90
|
+
body: request,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
async getConsentAuditLogs() {
|
|
94
|
+
const path = '/audit';
|
|
95
|
+
return this.client.request('GET', path);
|
|
96
|
+
}
|
|
97
|
+
async generateConsentReport() {
|
|
98
|
+
const path = '/reports';
|
|
99
|
+
return this.client.request('POST', path);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.ConsentPlugin = ConsentPlugin;
|
|
103
|
+
function consentClient() {
|
|
104
|
+
return new ConsentPlugin();
|
|
105
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class EmailotpPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "emailotp";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
send(request: types.SendRequest): Promise<void>;
|
|
9
|
+
verify(request: types.VerifyRequest): Promise<types.VerifyResponse>;
|
|
10
|
+
}
|
|
11
|
+
export declare function emailotpClient(): EmailotpPlugin;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated emailotp plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.EmailotpPlugin = void 0;
|
|
5
|
+
exports.emailotpClient = emailotpClient;
|
|
6
|
+
class EmailotpPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'emailotp';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async send(request) {
|
|
14
|
+
const path = '/email-otp/send';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async verify(request) {
|
|
20
|
+
const path = '/email-otp/verify';
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.EmailotpPlugin = EmailotpPlugin;
|
|
27
|
+
function emailotpClient() {
|
|
28
|
+
return new EmailotpPlugin();
|
|
29
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class IdverificationPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "idverification";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.VerificationSessionResponse>;
|
|
9
|
+
getVerificationSession(): Promise<types.VerificationSessionResponse>;
|
|
10
|
+
getVerification(): Promise<types.VerificationResponse>;
|
|
11
|
+
getUserVerifications(): Promise<types.VerificationListResponse>;
|
|
12
|
+
getUserVerificationStatus(): Promise<types.UserVerificationStatusResponse>;
|
|
13
|
+
requestReverification(request: types.RequestReverification_req): Promise<types.MessageResponse>;
|
|
14
|
+
handleWebhook(): Promise<void>;
|
|
15
|
+
adminBlockUser(request: types.AdminBlockUser_req): Promise<types.MessageResponse>;
|
|
16
|
+
adminUnblockUser(): Promise<types.MessageResponse>;
|
|
17
|
+
adminGetUserVerificationStatus(): Promise<types.UserVerificationStatusResponse>;
|
|
18
|
+
adminGetUserVerifications(): Promise<types.VerificationListResponse>;
|
|
19
|
+
}
|
|
20
|
+
export declare function idverificationClient(): IdverificationPlugin;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated idverification plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.IdverificationPlugin = void 0;
|
|
5
|
+
exports.idverificationClient = idverificationClient;
|
|
6
|
+
class IdverificationPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'idverification';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async createVerificationSession(request) {
|
|
14
|
+
const path = '/sessions';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async getVerificationSession() {
|
|
20
|
+
const path = '/sessions/:id';
|
|
21
|
+
return this.client.request('GET', path);
|
|
22
|
+
}
|
|
23
|
+
async getVerification() {
|
|
24
|
+
const path = '/:id';
|
|
25
|
+
return this.client.request('GET', path);
|
|
26
|
+
}
|
|
27
|
+
async getUserVerifications() {
|
|
28
|
+
const path = '/me';
|
|
29
|
+
return this.client.request('GET', path);
|
|
30
|
+
}
|
|
31
|
+
async getUserVerificationStatus() {
|
|
32
|
+
const path = '/me/status';
|
|
33
|
+
return this.client.request('GET', path);
|
|
34
|
+
}
|
|
35
|
+
async requestReverification(request) {
|
|
36
|
+
const path = '/me/reverify';
|
|
37
|
+
return this.client.request('POST', path, {
|
|
38
|
+
body: request,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async handleWebhook() {
|
|
42
|
+
const path = '/webhook/:provider';
|
|
43
|
+
return this.client.request('POST', path);
|
|
44
|
+
}
|
|
45
|
+
async adminBlockUser(request) {
|
|
46
|
+
const path = '/users/:userId/block';
|
|
47
|
+
return this.client.request('POST', path, {
|
|
48
|
+
body: request,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
async adminUnblockUser() {
|
|
52
|
+
const path = '/users/:userId/unblock';
|
|
53
|
+
return this.client.request('POST', path);
|
|
54
|
+
}
|
|
55
|
+
async adminGetUserVerificationStatus() {
|
|
56
|
+
const path = '/users/:userId/status';
|
|
57
|
+
return this.client.request('GET', path);
|
|
58
|
+
}
|
|
59
|
+
async adminGetUserVerifications() {
|
|
60
|
+
const path = '/users/:userId/verifications';
|
|
61
|
+
return this.client.request('GET', path);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.IdverificationPlugin = IdverificationPlugin;
|
|
65
|
+
function idverificationClient() {
|
|
66
|
+
return new IdverificationPlugin();
|
|
67
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class ImpersonationPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "impersonation";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
startImpersonation(request: types.StartImpersonation_reqBody): Promise<void>;
|
|
9
|
+
endImpersonation(request: types.EndImpersonation_reqBody): Promise<void>;
|
|
10
|
+
getImpersonation(): Promise<void>;
|
|
11
|
+
listImpersonations(): Promise<void>;
|
|
12
|
+
listAuditEvents(): Promise<void>;
|
|
13
|
+
verifyImpersonation(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare function impersonationClient(): ImpersonationPlugin;
|