@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,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated impersonation plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ImpersonationPlugin = void 0;
|
|
5
|
+
exports.impersonationClient = impersonationClient;
|
|
6
|
+
class ImpersonationPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'impersonation';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async startImpersonation(request) {
|
|
14
|
+
const path = '/start';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async endImpersonation(request) {
|
|
20
|
+
const path = '/end';
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async getImpersonation() {
|
|
26
|
+
const path = '/:id';
|
|
27
|
+
return this.client.request('GET', path);
|
|
28
|
+
}
|
|
29
|
+
async listImpersonations() {
|
|
30
|
+
const path = '/';
|
|
31
|
+
return this.client.request('GET', path);
|
|
32
|
+
}
|
|
33
|
+
async listAuditEvents() {
|
|
34
|
+
const path = '/audit';
|
|
35
|
+
return this.client.request('GET', path);
|
|
36
|
+
}
|
|
37
|
+
async verifyImpersonation() {
|
|
38
|
+
const path = '/verify';
|
|
39
|
+
return this.client.request('POST', path);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.ImpersonationPlugin = ImpersonationPlugin;
|
|
43
|
+
function impersonationClient() {
|
|
44
|
+
return new ImpersonationPlugin();
|
|
45
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
export declare class JwtPlugin implements ClientPlugin {
|
|
4
|
+
readonly id = "jwt";
|
|
5
|
+
private client;
|
|
6
|
+
init(client: AuthsomeClient): void;
|
|
7
|
+
createJWTKey(): Promise<void>;
|
|
8
|
+
listJWTKeys(): Promise<void>;
|
|
9
|
+
getJWKS(): Promise<void>;
|
|
10
|
+
generateToken(): Promise<void>;
|
|
11
|
+
verifyToken(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export declare function jwtClient(): JwtPlugin;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated jwt plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.JwtPlugin = void 0;
|
|
5
|
+
exports.jwtClient = jwtClient;
|
|
6
|
+
class JwtPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'jwt';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async createJWTKey() {
|
|
14
|
+
const path = '/createjwtkey';
|
|
15
|
+
return this.client.request('POST', path);
|
|
16
|
+
}
|
|
17
|
+
async listJWTKeys() {
|
|
18
|
+
const path = '/listjwtkeys';
|
|
19
|
+
return this.client.request('GET', path);
|
|
20
|
+
}
|
|
21
|
+
async getJWKS() {
|
|
22
|
+
const path = '/jwks';
|
|
23
|
+
return this.client.request('GET', path);
|
|
24
|
+
}
|
|
25
|
+
async generateToken() {
|
|
26
|
+
const path = '/generate';
|
|
27
|
+
return this.client.request('POST', path);
|
|
28
|
+
}
|
|
29
|
+
async verifyToken() {
|
|
30
|
+
const path = '/verify';
|
|
31
|
+
return this.client.request('POST', path);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.JwtPlugin = JwtPlugin;
|
|
35
|
+
function jwtClient() {
|
|
36
|
+
return new JwtPlugin();
|
|
37
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class MagiclinkPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "magiclink";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
send(request: types.SendRequest): Promise<void>;
|
|
9
|
+
verify(): Promise<types.VerifyResponse>;
|
|
10
|
+
}
|
|
11
|
+
export declare function magiclinkClient(): MagiclinkPlugin;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated magiclink plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MagiclinkPlugin = void 0;
|
|
5
|
+
exports.magiclinkClient = magiclinkClient;
|
|
6
|
+
class MagiclinkPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'magiclink';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async send(request) {
|
|
14
|
+
const path = '/magic-link/send';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async verify() {
|
|
20
|
+
const path = '/magic-link/verify';
|
|
21
|
+
return this.client.request('GET', path);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.MagiclinkPlugin = MagiclinkPlugin;
|
|
25
|
+
function magiclinkClient() {
|
|
26
|
+
return new MagiclinkPlugin();
|
|
27
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class MfaPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "mfa";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
enrollFactor(request: types.FactorEnrollmentRequest): Promise<void>;
|
|
9
|
+
listFactors(): Promise<types.FactorsResponse>;
|
|
10
|
+
getFactor(): Promise<void>;
|
|
11
|
+
updateFactor(): Promise<types.MessageResponse>;
|
|
12
|
+
deleteFactor(): Promise<types.MessageResponse>;
|
|
13
|
+
verifyFactor(request: types.VerifyFactor_req): Promise<types.MessageResponse>;
|
|
14
|
+
initiateChallenge(request: types.ChallengeRequest): Promise<void>;
|
|
15
|
+
verifyChallenge(request: types.VerificationRequest): Promise<void>;
|
|
16
|
+
getChallengeStatus(): Promise<void>;
|
|
17
|
+
trustDevice(request: types.DeviceInfo): Promise<types.MessageResponse>;
|
|
18
|
+
listTrustedDevices(): Promise<types.DevicesResponse>;
|
|
19
|
+
revokeTrustedDevice(): Promise<types.MessageResponse>;
|
|
20
|
+
getStatus(): Promise<void>;
|
|
21
|
+
getPolicy(): Promise<types.MFAConfigResponse>;
|
|
22
|
+
adminUpdatePolicy(request: types.AdminPolicyRequest): Promise<void>;
|
|
23
|
+
adminResetUserMFA(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export declare function mfaClient(): MfaPlugin;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated mfa plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MfaPlugin = void 0;
|
|
5
|
+
exports.mfaClient = mfaClient;
|
|
6
|
+
class MfaPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'mfa';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async enrollFactor(request) {
|
|
14
|
+
const path = '/mfa/factors/enroll';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async listFactors() {
|
|
20
|
+
const path = '/mfa/factors';
|
|
21
|
+
return this.client.request('GET', path);
|
|
22
|
+
}
|
|
23
|
+
async getFactor() {
|
|
24
|
+
const path = '/mfa/factors/:id';
|
|
25
|
+
return this.client.request('GET', path);
|
|
26
|
+
}
|
|
27
|
+
async updateFactor() {
|
|
28
|
+
const path = '/mfa/factors/:id';
|
|
29
|
+
return this.client.request('PUT', path);
|
|
30
|
+
}
|
|
31
|
+
async deleteFactor() {
|
|
32
|
+
const path = '/mfa/factors/:id';
|
|
33
|
+
return this.client.request('DELETE', path);
|
|
34
|
+
}
|
|
35
|
+
async verifyFactor(request) {
|
|
36
|
+
const path = '/mfa/factors/:id/verify';
|
|
37
|
+
return this.client.request('POST', path, {
|
|
38
|
+
body: request,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async initiateChallenge(request) {
|
|
42
|
+
const path = '/mfa/challenge';
|
|
43
|
+
return this.client.request('POST', path, {
|
|
44
|
+
body: request,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async verifyChallenge(request) {
|
|
48
|
+
const path = '/mfa/verify';
|
|
49
|
+
return this.client.request('POST', path, {
|
|
50
|
+
body: request,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
async getChallengeStatus() {
|
|
54
|
+
const path = '/mfa/challenge/:id';
|
|
55
|
+
return this.client.request('GET', path);
|
|
56
|
+
}
|
|
57
|
+
async trustDevice(request) {
|
|
58
|
+
const path = '/mfa/devices/trust';
|
|
59
|
+
return this.client.request('POST', path, {
|
|
60
|
+
body: request,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
async listTrustedDevices() {
|
|
64
|
+
const path = '/mfa/devices';
|
|
65
|
+
return this.client.request('GET', path);
|
|
66
|
+
}
|
|
67
|
+
async revokeTrustedDevice() {
|
|
68
|
+
const path = '/mfa/devices/:id';
|
|
69
|
+
return this.client.request('DELETE', path);
|
|
70
|
+
}
|
|
71
|
+
async getStatus() {
|
|
72
|
+
const path = '/mfa/status';
|
|
73
|
+
return this.client.request('GET', path);
|
|
74
|
+
}
|
|
75
|
+
async getPolicy() {
|
|
76
|
+
const path = '/mfa/policy';
|
|
77
|
+
return this.client.request('GET', path);
|
|
78
|
+
}
|
|
79
|
+
async adminUpdatePolicy(request) {
|
|
80
|
+
const path = '/mfa/policy';
|
|
81
|
+
return this.client.request('PUT', path, {
|
|
82
|
+
body: request,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async adminResetUserMFA() {
|
|
86
|
+
const path = '/mfa/users/:id/reset';
|
|
87
|
+
return this.client.request('POST', path);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.MfaPlugin = MfaPlugin;
|
|
91
|
+
function mfaClient() {
|
|
92
|
+
return new MfaPlugin();
|
|
93
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class MultiappPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "multiapp";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
createApp(): Promise<void>;
|
|
9
|
+
getApp(): Promise<void>;
|
|
10
|
+
updateApp(): Promise<void>;
|
|
11
|
+
deleteApp(): Promise<void>;
|
|
12
|
+
listApps(): Promise<void>;
|
|
13
|
+
removeMember(): Promise<void>;
|
|
14
|
+
listMembers(): Promise<void>;
|
|
15
|
+
inviteMember(): Promise<void>;
|
|
16
|
+
updateMember(): Promise<void>;
|
|
17
|
+
getInvitation(): Promise<void>;
|
|
18
|
+
acceptInvitation(): Promise<void>;
|
|
19
|
+
declineInvitation(): Promise<void>;
|
|
20
|
+
createTeam(): Promise<void>;
|
|
21
|
+
getTeam(): Promise<void>;
|
|
22
|
+
updateTeam(): Promise<void>;
|
|
23
|
+
deleteTeam(): Promise<void>;
|
|
24
|
+
listTeams(): Promise<void>;
|
|
25
|
+
addTeamMember(request: types.AddTeamMember_req): Promise<void>;
|
|
26
|
+
removeTeamMember(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export declare function multiappClient(): MultiappPlugin;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated multiapp plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MultiappPlugin = void 0;
|
|
5
|
+
exports.multiappClient = multiappClient;
|
|
6
|
+
class MultiappPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'multiapp';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async createApp() {
|
|
14
|
+
const path = '/createapp';
|
|
15
|
+
return this.client.request('POST', path);
|
|
16
|
+
}
|
|
17
|
+
async getApp() {
|
|
18
|
+
const path = '/:appId';
|
|
19
|
+
return this.client.request('GET', path);
|
|
20
|
+
}
|
|
21
|
+
async updateApp() {
|
|
22
|
+
const path = '/:appId';
|
|
23
|
+
return this.client.request('PUT', path);
|
|
24
|
+
}
|
|
25
|
+
async deleteApp() {
|
|
26
|
+
const path = '/:appId';
|
|
27
|
+
return this.client.request('DELETE', path);
|
|
28
|
+
}
|
|
29
|
+
async listApps() {
|
|
30
|
+
const path = '/listapps';
|
|
31
|
+
return this.client.request('GET', path);
|
|
32
|
+
}
|
|
33
|
+
async removeMember() {
|
|
34
|
+
const path = '/:memberId';
|
|
35
|
+
return this.client.request('DELETE', path);
|
|
36
|
+
}
|
|
37
|
+
async listMembers() {
|
|
38
|
+
const path = '/listmembers';
|
|
39
|
+
return this.client.request('GET', path);
|
|
40
|
+
}
|
|
41
|
+
async inviteMember() {
|
|
42
|
+
const path = '/invite';
|
|
43
|
+
return this.client.request('POST', path);
|
|
44
|
+
}
|
|
45
|
+
async updateMember() {
|
|
46
|
+
const path = '/:memberId';
|
|
47
|
+
return this.client.request('PUT', path);
|
|
48
|
+
}
|
|
49
|
+
async getInvitation() {
|
|
50
|
+
const path = '/:token';
|
|
51
|
+
return this.client.request('GET', path);
|
|
52
|
+
}
|
|
53
|
+
async acceptInvitation() {
|
|
54
|
+
const path = '/:token/accept';
|
|
55
|
+
return this.client.request('POST', path);
|
|
56
|
+
}
|
|
57
|
+
async declineInvitation() {
|
|
58
|
+
const path = '/:token/decline';
|
|
59
|
+
return this.client.request('POST', path);
|
|
60
|
+
}
|
|
61
|
+
async createTeam() {
|
|
62
|
+
const path = '/createteam';
|
|
63
|
+
return this.client.request('POST', path);
|
|
64
|
+
}
|
|
65
|
+
async getTeam() {
|
|
66
|
+
const path = '/:teamId';
|
|
67
|
+
return this.client.request('GET', path);
|
|
68
|
+
}
|
|
69
|
+
async updateTeam() {
|
|
70
|
+
const path = '/:teamId';
|
|
71
|
+
return this.client.request('PUT', path);
|
|
72
|
+
}
|
|
73
|
+
async deleteTeam() {
|
|
74
|
+
const path = '/:teamId';
|
|
75
|
+
return this.client.request('DELETE', path);
|
|
76
|
+
}
|
|
77
|
+
async listTeams() {
|
|
78
|
+
const path = '/listteams';
|
|
79
|
+
return this.client.request('GET', path);
|
|
80
|
+
}
|
|
81
|
+
async addTeamMember(request) {
|
|
82
|
+
const path = '/:teamId/members';
|
|
83
|
+
return this.client.request('POST', path, {
|
|
84
|
+
body: request,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
async removeTeamMember() {
|
|
88
|
+
const path = '/:teamId/members/:memberId';
|
|
89
|
+
return this.client.request('DELETE', path);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.MultiappPlugin = MultiappPlugin;
|
|
93
|
+
function multiappClient() {
|
|
94
|
+
return new MultiappPlugin();
|
|
95
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class MultisessionPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "multisession";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
list(): Promise<types.SessionsResponse>;
|
|
9
|
+
setActive(request: types.SetActive_body): Promise<types.SessionTokenResponse>;
|
|
10
|
+
delete(): Promise<types.StatusResponse>;
|
|
11
|
+
}
|
|
12
|
+
export declare function multisessionClient(): MultisessionPlugin;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated multisession plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MultisessionPlugin = void 0;
|
|
5
|
+
exports.multisessionClient = multisessionClient;
|
|
6
|
+
class MultisessionPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'multisession';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async list() {
|
|
14
|
+
const path = '/list';
|
|
15
|
+
return this.client.request('GET', path);
|
|
16
|
+
}
|
|
17
|
+
async setActive(request) {
|
|
18
|
+
const path = '/set-active';
|
|
19
|
+
return this.client.request('POST', path, {
|
|
20
|
+
body: request,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
async delete() {
|
|
24
|
+
const path = '/delete/{id}';
|
|
25
|
+
return this.client.request('POST', path);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.MultisessionPlugin = MultisessionPlugin;
|
|
29
|
+
function multisessionClient() {
|
|
30
|
+
return new MultisessionPlugin();
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class NotificationPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "notification";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
previewTemplate(request: types.PreviewTemplate_req): Promise<void>;
|
|
9
|
+
createTemplate(): Promise<void>;
|
|
10
|
+
getTemplate(): Promise<void>;
|
|
11
|
+
listTemplates(): Promise<void>;
|
|
12
|
+
updateTemplate(): Promise<types.MessageResponse>;
|
|
13
|
+
deleteTemplate(): Promise<types.MessageResponse>;
|
|
14
|
+
resetTemplate(): Promise<types.MessageResponse>;
|
|
15
|
+
resetAllTemplates(): Promise<types.MessageResponse>;
|
|
16
|
+
getTemplateDefaults(): Promise<void>;
|
|
17
|
+
renderTemplate(request: types.RenderTemplate_req): Promise<void>;
|
|
18
|
+
sendNotification(): Promise<void>;
|
|
19
|
+
getNotification(): Promise<void>;
|
|
20
|
+
listNotifications(): Promise<void>;
|
|
21
|
+
resendNotification(): Promise<void>;
|
|
22
|
+
handleWebhook(): Promise<types.StatusResponse>;
|
|
23
|
+
}
|
|
24
|
+
export declare function notificationClient(): NotificationPlugin;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated notification plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.NotificationPlugin = void 0;
|
|
5
|
+
exports.notificationClient = notificationClient;
|
|
6
|
+
class NotificationPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'notification';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async previewTemplate(request) {
|
|
14
|
+
const path = '/:id/preview';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async createTemplate() {
|
|
20
|
+
const path = '/createtemplate';
|
|
21
|
+
return this.client.request('POST', path);
|
|
22
|
+
}
|
|
23
|
+
async getTemplate() {
|
|
24
|
+
const path = '/:id';
|
|
25
|
+
return this.client.request('GET', path);
|
|
26
|
+
}
|
|
27
|
+
async listTemplates() {
|
|
28
|
+
const path = '/listtemplates';
|
|
29
|
+
return this.client.request('GET', path);
|
|
30
|
+
}
|
|
31
|
+
async updateTemplate() {
|
|
32
|
+
const path = '/:id';
|
|
33
|
+
return this.client.request('PUT', path);
|
|
34
|
+
}
|
|
35
|
+
async deleteTemplate() {
|
|
36
|
+
const path = '/:id';
|
|
37
|
+
return this.client.request('DELETE', path);
|
|
38
|
+
}
|
|
39
|
+
async resetTemplate() {
|
|
40
|
+
const path = '/:id/reset';
|
|
41
|
+
return this.client.request('POST', path);
|
|
42
|
+
}
|
|
43
|
+
async resetAllTemplates() {
|
|
44
|
+
const path = '/reset-all';
|
|
45
|
+
return this.client.request('POST', path);
|
|
46
|
+
}
|
|
47
|
+
async getTemplateDefaults() {
|
|
48
|
+
const path = '/defaults';
|
|
49
|
+
return this.client.request('GET', path);
|
|
50
|
+
}
|
|
51
|
+
async renderTemplate(request) {
|
|
52
|
+
const path = '/render';
|
|
53
|
+
return this.client.request('POST', path, {
|
|
54
|
+
body: request,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async sendNotification() {
|
|
58
|
+
const path = '/send';
|
|
59
|
+
return this.client.request('POST', path);
|
|
60
|
+
}
|
|
61
|
+
async getNotification() {
|
|
62
|
+
const path = '/:id';
|
|
63
|
+
return this.client.request('GET', path);
|
|
64
|
+
}
|
|
65
|
+
async listNotifications() {
|
|
66
|
+
const path = '/listnotifications';
|
|
67
|
+
return this.client.request('GET', path);
|
|
68
|
+
}
|
|
69
|
+
async resendNotification() {
|
|
70
|
+
const path = '/:id/resend';
|
|
71
|
+
return this.client.request('POST', path);
|
|
72
|
+
}
|
|
73
|
+
async handleWebhook() {
|
|
74
|
+
const path = '/notifications/webhook/:provider';
|
|
75
|
+
return this.client.request('POST', path);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.NotificationPlugin = NotificationPlugin;
|
|
79
|
+
function notificationClient() {
|
|
80
|
+
return new NotificationPlugin();
|
|
81
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class OidcproviderPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "oidcprovider";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
registerClient(request: types.ClientRegistrationRequest): Promise<void>;
|
|
9
|
+
listClients(): Promise<void>;
|
|
10
|
+
getClient(): Promise<void>;
|
|
11
|
+
updateClient(request: types.ClientUpdateRequest): Promise<void>;
|
|
12
|
+
deleteClient(): Promise<void>;
|
|
13
|
+
discovery(): Promise<void>;
|
|
14
|
+
jWKS(): Promise<void>;
|
|
15
|
+
authorize(): Promise<void>;
|
|
16
|
+
handleConsent(): Promise<void>;
|
|
17
|
+
token(request: types.TokenRequest): Promise<void>;
|
|
18
|
+
userInfo(): Promise<void>;
|
|
19
|
+
introspectToken(): Promise<void>;
|
|
20
|
+
revokeToken(): Promise<types.responses.StatusResponse>;
|
|
21
|
+
}
|
|
22
|
+
export declare function oidcproviderClient(): OidcproviderPlugin;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated oidcprovider plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OidcproviderPlugin = void 0;
|
|
5
|
+
exports.oidcproviderClient = oidcproviderClient;
|
|
6
|
+
class OidcproviderPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'oidcprovider';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async registerClient(request) {
|
|
14
|
+
const path = '/register';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async listClients() {
|
|
20
|
+
const path = '/listclients';
|
|
21
|
+
return this.client.request('GET', path);
|
|
22
|
+
}
|
|
23
|
+
async getClient() {
|
|
24
|
+
const path = '/:clientId';
|
|
25
|
+
return this.client.request('GET', path);
|
|
26
|
+
}
|
|
27
|
+
async updateClient(request) {
|
|
28
|
+
const path = '/:clientId';
|
|
29
|
+
return this.client.request('PUT', path, {
|
|
30
|
+
body: request,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async deleteClient() {
|
|
34
|
+
const path = '/:clientId';
|
|
35
|
+
return this.client.request('DELETE', path);
|
|
36
|
+
}
|
|
37
|
+
async discovery() {
|
|
38
|
+
const path = '/.well-known/openid-configuration';
|
|
39
|
+
return this.client.request('GET', path);
|
|
40
|
+
}
|
|
41
|
+
async jWKS() {
|
|
42
|
+
const path = '/jwks';
|
|
43
|
+
return this.client.request('GET', path);
|
|
44
|
+
}
|
|
45
|
+
async authorize() {
|
|
46
|
+
const path = '/authorize';
|
|
47
|
+
return this.client.request('GET', path);
|
|
48
|
+
}
|
|
49
|
+
async handleConsent() {
|
|
50
|
+
const path = '/consent';
|
|
51
|
+
return this.client.request('POST', path);
|
|
52
|
+
}
|
|
53
|
+
async token(request) {
|
|
54
|
+
const path = '/token';
|
|
55
|
+
return this.client.request('POST', path, {
|
|
56
|
+
body: request,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async userInfo() {
|
|
60
|
+
const path = '/userinfo';
|
|
61
|
+
return this.client.request('GET', path);
|
|
62
|
+
}
|
|
63
|
+
async introspectToken() {
|
|
64
|
+
const path = '/introspect';
|
|
65
|
+
return this.client.request('POST', path);
|
|
66
|
+
}
|
|
67
|
+
async revokeToken() {
|
|
68
|
+
const path = '/revoke';
|
|
69
|
+
return this.client.request('POST', path);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.OidcproviderPlugin = OidcproviderPlugin;
|
|
73
|
+
function oidcproviderClient() {
|
|
74
|
+
return new OidcproviderPlugin();
|
|
75
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class OrganizationPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "organization";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
createOrganization(): Promise<void>;
|
|
9
|
+
updateOrganization(): Promise<void>;
|
|
10
|
+
deleteOrganization(): Promise<void>;
|
|
11
|
+
inviteMember(): Promise<void>;
|
|
12
|
+
removeMember(): Promise<void>;
|
|
13
|
+
createTeam(): Promise<void>;
|
|
14
|
+
updateTeam(): Promise<void>;
|
|
15
|
+
deleteTeam(): Promise<void>;
|
|
16
|
+
getOrganization(): Promise<void>;
|
|
17
|
+
listOrganizations(): Promise<void>;
|
|
18
|
+
getOrganizationBySlug(): Promise<void>;
|
|
19
|
+
listMembers(): Promise<void>;
|
|
20
|
+
updateMember(): Promise<void>;
|
|
21
|
+
acceptInvitation(): Promise<void>;
|
|
22
|
+
declineInvitation(): Promise<types.StatusResponse>;
|
|
23
|
+
listTeams(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export declare function organizationClient(): OrganizationPlugin;
|