@authsome/client 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/client.d.ts +86 -37
  2. package/dist/client.js +65 -17
  3. package/dist/index.d.ts +21 -17
  4. package/dist/index.js +65 -53
  5. package/dist/plugins/admin.d.ts +18 -6
  6. package/dist/plugins/admin.js +12 -12
  7. package/dist/plugins/apikey.d.ts +13 -5
  8. package/dist/plugins/apikey.js +12 -14
  9. package/dist/plugins/backupauth.d.ts +15 -5
  10. package/dist/plugins/backupauth.js +10 -10
  11. package/dist/plugins/cms.d.ts +54 -0
  12. package/dist/plugins/cms.js +139 -0
  13. package/dist/plugins/compliance.d.ts +90 -30
  14. package/dist/plugins/compliance.js +60 -60
  15. package/dist/plugins/consent.d.ts +24 -8
  16. package/dist/plugins/consent.js +16 -16
  17. package/dist/plugins/emailverification.d.ts +12 -0
  18. package/dist/plugins/emailverification.js +33 -0
  19. package/dist/plugins/idverification.d.ts +21 -7
  20. package/dist/plugins/idverification.js +14 -14
  21. package/dist/plugins/impersonation.d.ts +3 -1
  22. package/dist/plugins/impersonation.js +2 -2
  23. package/dist/plugins/mfa.d.ts +21 -7
  24. package/dist/plugins/mfa.js +14 -14
  25. package/dist/plugins/multiapp.d.ts +40 -13
  26. package/dist/plugins/multiapp.js +26 -26
  27. package/dist/plugins/multisession.d.ts +11 -1
  28. package/dist/plugins/multisession.js +28 -2
  29. package/dist/plugins/notification.d.ts +25 -9
  30. package/dist/plugins/notification.js +16 -16
  31. package/dist/plugins/oidcprovider.d.ts +9 -3
  32. package/dist/plugins/oidcprovider.js +6 -6
  33. package/dist/plugins/organization.d.ts +30 -10
  34. package/dist/plugins/organization.js +20 -20
  35. package/dist/plugins/passkey.d.ts +6 -2
  36. package/dist/plugins/passkey.js +4 -4
  37. package/dist/plugins/permissions.d.ts +12 -0
  38. package/dist/plugins/permissions.js +33 -0
  39. package/dist/plugins/secrets.d.ts +33 -0
  40. package/dist/plugins/secrets.js +63 -0
  41. package/dist/plugins/social.d.ts +11 -2
  42. package/dist/plugins/social.js +7 -5
  43. package/dist/plugins/sso.d.ts +12 -4
  44. package/dist/plugins/sso.js +8 -8
  45. package/dist/plugins/stepup.d.ts +15 -5
  46. package/dist/plugins/stepup.js +10 -10
  47. package/dist/types.d.ts +2878 -2453
  48. package/package.json +2 -1
  49. package/src/client.ts +96 -37
  50. package/src/index.ts +21 -17
  51. package/src/plugins/admin.ts +12 -12
  52. package/src/plugins/apikey.ts +13 -15
  53. package/src/plugins/backupauth.ts +10 -10
  54. package/src/plugins/cms.ts +170 -0
  55. package/src/plugins/compliance.ts +60 -60
  56. package/src/plugins/consent.ts +16 -16
  57. package/src/plugins/emailverification.ts +38 -0
  58. package/src/plugins/idverification.ts +14 -14
  59. package/src/plugins/impersonation.ts +2 -2
  60. package/src/plugins/mfa.ts +14 -14
  61. package/src/plugins/multiapp.ts +26 -26
  62. package/src/plugins/multisession.ts +34 -2
  63. package/src/plugins/notification.ts +18 -18
  64. package/src/plugins/oidcprovider.ts +6 -6
  65. package/src/plugins/organization.ts +20 -20
  66. package/src/plugins/passkey.ts +4 -4
  67. package/src/plugins/permissions.ts +38 -0
  68. package/src/plugins/secrets.ts +76 -0
  69. package/src/plugins/social.ts +7 -5
  70. package/src/plugins/sso.ts +8 -8
  71. package/src/plugins/stepup.ts +10 -10
  72. package/src/types.ts +2989 -2486
  73. package/authsome-client-0.0.2.tgz +0 -0
@@ -16,18 +16,18 @@ class ConsentPlugin {
16
16
  body: request,
17
17
  });
18
18
  }
19
- async getConsent() {
20
- const path = '/records/:id';
19
+ async getConsent(params) {
20
+ const path = `/records/${params.id}`;
21
21
  return this.client.request('GET', path);
22
22
  }
23
- async updateConsent(request) {
24
- const path = '/records/:id';
23
+ async updateConsent(params, request) {
24
+ const path = `/records/${params.id}`;
25
25
  return this.client.request('PUT', path, {
26
26
  body: request,
27
27
  });
28
28
  }
29
- async revokeConsent(request) {
30
- const path = '/revoke/:id';
29
+ async revokeConsent(params, request) {
30
+ const path = `/revoke/${params.id}`;
31
31
  return this.client.request('POST', path, {
32
32
  body: request,
33
33
  });
@@ -38,8 +38,8 @@ class ConsentPlugin {
38
38
  body: request,
39
39
  });
40
40
  }
41
- async getConsentPolicy() {
42
- const path = '/policies/:id';
41
+ async getConsentPolicy(params) {
42
+ const path = `/policies/${params.id}`;
43
43
  return this.client.request('GET', path);
44
44
  }
45
45
  async recordCookieConsent(request) {
@@ -58,12 +58,12 @@ class ConsentPlugin {
58
58
  body: request,
59
59
  });
60
60
  }
61
- async getDataExport() {
62
- const path = '/export/:id';
61
+ async getDataExport(params) {
62
+ const path = `/export/${params.id}`;
63
63
  return this.client.request('GET', path);
64
64
  }
65
- async downloadDataExport() {
66
- const path = '/export/:id/download';
65
+ async downloadDataExport(params) {
66
+ const path = `/export/${params.id}/download`;
67
67
  return this.client.request('GET', path);
68
68
  }
69
69
  async requestDataDeletion(request) {
@@ -72,12 +72,12 @@ class ConsentPlugin {
72
72
  body: request,
73
73
  });
74
74
  }
75
- async getDataDeletion() {
76
- const path = '/deletion/:id';
75
+ async getDataDeletion(params) {
76
+ const path = `/deletion/${params.id}`;
77
77
  return this.client.request('GET', path);
78
78
  }
79
- async approveDeletionRequest() {
80
- const path = '/deletion/:id/approve';
79
+ async approveDeletionRequest(params) {
80
+ const path = `/deletion/${params.id}/approve`;
81
81
  return this.client.request('POST', path);
82
82
  }
83
83
  async getPrivacySettings() {
@@ -0,0 +1,12 @@
1
+ import { ClientPlugin } from '../plugin';
2
+ import { AuthsomeClient } from '../client';
3
+ import * as types from '../types';
4
+ export declare class EmailverificationPlugin implements ClientPlugin {
5
+ readonly id = "emailverification";
6
+ private client;
7
+ init(client: AuthsomeClient): void;
8
+ send(request: types.SendRequest): Promise<void>;
9
+ verify(): Promise<void>;
10
+ resend(request: types.ResendRequest): Promise<types.ResendResponse>;
11
+ }
12
+ export declare function emailverificationClient(): EmailverificationPlugin;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // Auto-generated emailverification plugin
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.EmailverificationPlugin = void 0;
5
+ exports.emailverificationClient = emailverificationClient;
6
+ class EmailverificationPlugin {
7
+ constructor() {
8
+ this.id = 'emailverification';
9
+ }
10
+ init(client) {
11
+ this.client = client;
12
+ }
13
+ async send(request) {
14
+ const path = '/email-verification/send';
15
+ return this.client.request('POST', path, {
16
+ body: request,
17
+ });
18
+ }
19
+ async verify() {
20
+ const path = '/email-verification/verify';
21
+ return this.client.request('GET', path);
22
+ }
23
+ async resend(request) {
24
+ const path = '/email-verification/resend';
25
+ return this.client.request('POST', path, {
26
+ body: request,
27
+ });
28
+ }
29
+ }
30
+ exports.EmailverificationPlugin = EmailverificationPlugin;
31
+ function emailverificationClient() {
32
+ return new EmailverificationPlugin();
33
+ }
@@ -6,15 +6,29 @@ export declare class IdverificationPlugin implements ClientPlugin {
6
6
  private client;
7
7
  init(client: AuthsomeClient): void;
8
8
  createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.VerificationSessionResponse>;
9
- getVerificationSession(): Promise<types.VerificationSessionResponse>;
10
- getVerification(): Promise<types.VerificationResponse>;
9
+ getVerificationSession(params: {
10
+ id: string;
11
+ }): Promise<types.VerificationSessionResponse>;
12
+ getVerification(params: {
13
+ id: string;
14
+ }): Promise<types.VerificationResponse>;
11
15
  getUserVerifications(): Promise<types.VerificationListResponse>;
12
16
  getUserVerificationStatus(): Promise<types.UserVerificationStatusResponse>;
13
17
  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>;
18
+ handleWebhook(params: {
19
+ provider: string;
20
+ }): Promise<void>;
21
+ adminBlockUser(params: {
22
+ userId: string;
23
+ }, request: types.AdminBlockUser_req): Promise<types.MessageResponse>;
24
+ adminUnblockUser(params: {
25
+ userId: string;
26
+ }): Promise<types.MessageResponse>;
27
+ adminGetUserVerificationStatus(params: {
28
+ userId: string;
29
+ }): Promise<types.UserVerificationStatusResponse>;
30
+ adminGetUserVerifications(params: {
31
+ userId: string;
32
+ }): Promise<types.VerificationListResponse>;
19
33
  }
20
34
  export declare function idverificationClient(): IdverificationPlugin;
@@ -16,12 +16,12 @@ class IdverificationPlugin {
16
16
  body: request,
17
17
  });
18
18
  }
19
- async getVerificationSession() {
20
- const path = '/sessions/:id';
19
+ async getVerificationSession(params) {
20
+ const path = `/sessions/${params.id}`;
21
21
  return this.client.request('GET', path);
22
22
  }
23
- async getVerification() {
24
- const path = '/:id';
23
+ async getVerification(params) {
24
+ const path = `/${params.id}`;
25
25
  return this.client.request('GET', path);
26
26
  }
27
27
  async getUserVerifications() {
@@ -38,26 +38,26 @@ class IdverificationPlugin {
38
38
  body: request,
39
39
  });
40
40
  }
41
- async handleWebhook() {
42
- const path = '/webhook/:provider';
41
+ async handleWebhook(params) {
42
+ const path = `/webhook/${params.provider}`;
43
43
  return this.client.request('POST', path);
44
44
  }
45
- async adminBlockUser(request) {
46
- const path = '/users/:userId/block';
45
+ async adminBlockUser(params, request) {
46
+ const path = `/users/${params.userId}/block`;
47
47
  return this.client.request('POST', path, {
48
48
  body: request,
49
49
  });
50
50
  }
51
- async adminUnblockUser() {
52
- const path = '/users/:userId/unblock';
51
+ async adminUnblockUser(params) {
52
+ const path = `/users/${params.userId}/unblock`;
53
53
  return this.client.request('POST', path);
54
54
  }
55
- async adminGetUserVerificationStatus() {
56
- const path = '/users/:userId/status';
55
+ async adminGetUserVerificationStatus(params) {
56
+ const path = `/users/${params.userId}/status`;
57
57
  return this.client.request('GET', path);
58
58
  }
59
- async adminGetUserVerifications() {
60
- const path = '/users/:userId/verifications';
59
+ async adminGetUserVerifications(params) {
60
+ const path = `/users/${params.userId}/verifications`;
61
61
  return this.client.request('GET', path);
62
62
  }
63
63
  }
@@ -7,7 +7,9 @@ export declare class ImpersonationPlugin implements ClientPlugin {
7
7
  init(client: AuthsomeClient): void;
8
8
  startImpersonation(request: types.StartImpersonation_reqBody): Promise<void>;
9
9
  endImpersonation(request: types.EndImpersonation_reqBody): Promise<void>;
10
- getImpersonation(): Promise<void>;
10
+ getImpersonation(params: {
11
+ id: string;
12
+ }): Promise<void>;
11
13
  listImpersonations(): Promise<void>;
12
14
  listAuditEvents(): Promise<void>;
13
15
  verifyImpersonation(): Promise<void>;
@@ -22,8 +22,8 @@ class ImpersonationPlugin {
22
22
  body: request,
23
23
  });
24
24
  }
25
- async getImpersonation() {
26
- const path = '/:id';
25
+ async getImpersonation(params) {
26
+ const path = `/${params.id}`;
27
27
  return this.client.request('GET', path);
28
28
  }
29
29
  async listImpersonations() {
@@ -7,19 +7,33 @@ export declare class MfaPlugin implements ClientPlugin {
7
7
  init(client: AuthsomeClient): void;
8
8
  enrollFactor(request: types.FactorEnrollmentRequest): Promise<void>;
9
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>;
10
+ getFactor(params: {
11
+ id: string;
12
+ }): Promise<void>;
13
+ updateFactor(params: {
14
+ id: string;
15
+ }): Promise<types.MessageResponse>;
16
+ deleteFactor(params: {
17
+ id: string;
18
+ }): Promise<types.MessageResponse>;
19
+ verifyFactor(params: {
20
+ id: string;
21
+ }, request: types.VerifyFactor_req): Promise<types.MessageResponse>;
14
22
  initiateChallenge(request: types.ChallengeRequest): Promise<void>;
15
23
  verifyChallenge(request: types.VerificationRequest): Promise<void>;
16
- getChallengeStatus(): Promise<void>;
24
+ getChallengeStatus(params: {
25
+ id: string;
26
+ }): Promise<void>;
17
27
  trustDevice(request: types.DeviceInfo): Promise<types.MessageResponse>;
18
28
  listTrustedDevices(): Promise<types.DevicesResponse>;
19
- revokeTrustedDevice(): Promise<types.MessageResponse>;
29
+ revokeTrustedDevice(params: {
30
+ id: string;
31
+ }): Promise<types.MessageResponse>;
20
32
  getStatus(): Promise<void>;
21
33
  getPolicy(): Promise<types.MFAConfigResponse>;
22
34
  adminUpdatePolicy(request: types.AdminPolicyRequest): Promise<void>;
23
- adminResetUserMFA(): Promise<void>;
35
+ adminResetUserMFA(params: {
36
+ id: string;
37
+ }): Promise<void>;
24
38
  }
25
39
  export declare function mfaClient(): MfaPlugin;
@@ -20,20 +20,20 @@ class MfaPlugin {
20
20
  const path = '/mfa/factors';
21
21
  return this.client.request('GET', path);
22
22
  }
23
- async getFactor() {
24
- const path = '/mfa/factors/:id';
23
+ async getFactor(params) {
24
+ const path = `/mfa/factors/${params.id}`;
25
25
  return this.client.request('GET', path);
26
26
  }
27
- async updateFactor() {
28
- const path = '/mfa/factors/:id';
27
+ async updateFactor(params) {
28
+ const path = `/mfa/factors/${params.id}`;
29
29
  return this.client.request('PUT', path);
30
30
  }
31
- async deleteFactor() {
32
- const path = '/mfa/factors/:id';
31
+ async deleteFactor(params) {
32
+ const path = `/mfa/factors/${params.id}`;
33
33
  return this.client.request('DELETE', path);
34
34
  }
35
- async verifyFactor(request) {
36
- const path = '/mfa/factors/:id/verify';
35
+ async verifyFactor(params, request) {
36
+ const path = `/mfa/factors/${params.id}/verify`;
37
37
  return this.client.request('POST', path, {
38
38
  body: request,
39
39
  });
@@ -50,8 +50,8 @@ class MfaPlugin {
50
50
  body: request,
51
51
  });
52
52
  }
53
- async getChallengeStatus() {
54
- const path = '/mfa/challenge/:id';
53
+ async getChallengeStatus(params) {
54
+ const path = `/mfa/challenge/${params.id}`;
55
55
  return this.client.request('GET', path);
56
56
  }
57
57
  async trustDevice(request) {
@@ -64,8 +64,8 @@ class MfaPlugin {
64
64
  const path = '/mfa/devices';
65
65
  return this.client.request('GET', path);
66
66
  }
67
- async revokeTrustedDevice() {
68
- const path = '/mfa/devices/:id';
67
+ async revokeTrustedDevice(params) {
68
+ const path = `/mfa/devices/${params.id}`;
69
69
  return this.client.request('DELETE', path);
70
70
  }
71
71
  async getStatus() {
@@ -82,8 +82,8 @@ class MfaPlugin {
82
82
  body: request,
83
83
  });
84
84
  }
85
- async adminResetUserMFA() {
86
- const path = '/mfa/users/:id/reset';
85
+ async adminResetUserMFA(params) {
86
+ const path = `/mfa/users/${params.id}/reset`;
87
87
  return this.client.request('POST', path);
88
88
  }
89
89
  }
@@ -6,23 +6,50 @@ export declare class MultiappPlugin implements ClientPlugin {
6
6
  private client;
7
7
  init(client: AuthsomeClient): void;
8
8
  createApp(): Promise<void>;
9
- getApp(): Promise<void>;
10
- updateApp(): Promise<void>;
11
- deleteApp(): Promise<void>;
9
+ getApp(params: {
10
+ appId: string;
11
+ }): Promise<void>;
12
+ updateApp(params: {
13
+ appId: string;
14
+ }): Promise<void>;
15
+ deleteApp(params: {
16
+ appId: string;
17
+ }): Promise<void>;
12
18
  listApps(): Promise<void>;
13
- removeMember(): Promise<void>;
19
+ removeMember(params: {
20
+ memberId: string;
21
+ }): Promise<void>;
14
22
  listMembers(): Promise<void>;
15
23
  inviteMember(): Promise<void>;
16
- updateMember(): Promise<void>;
17
- getInvitation(): Promise<void>;
18
- acceptInvitation(): Promise<void>;
19
- declineInvitation(): Promise<void>;
24
+ updateMember(params: {
25
+ memberId: string;
26
+ }): Promise<void>;
27
+ getInvitation(params: {
28
+ token: string;
29
+ }): Promise<void>;
30
+ acceptInvitation(params: {
31
+ token: string;
32
+ }): Promise<void>;
33
+ declineInvitation(params: {
34
+ token: string;
35
+ }): Promise<void>;
20
36
  createTeam(): Promise<void>;
21
- getTeam(): Promise<void>;
22
- updateTeam(): Promise<void>;
23
- deleteTeam(): Promise<void>;
37
+ getTeam(params: {
38
+ teamId: string;
39
+ }): Promise<void>;
40
+ updateTeam(params: {
41
+ teamId: string;
42
+ }): Promise<void>;
43
+ deleteTeam(params: {
44
+ teamId: string;
45
+ }): Promise<void>;
24
46
  listTeams(): Promise<void>;
25
- addTeamMember(request: types.AddTeamMember_req): Promise<void>;
26
- removeTeamMember(): Promise<void>;
47
+ addTeamMember(params: {
48
+ teamId: string;
49
+ }, request: types.AddTeamMember_req): Promise<void>;
50
+ removeTeamMember(params: {
51
+ teamId: string;
52
+ memberId: string;
53
+ }): Promise<void>;
27
54
  }
28
55
  export declare function multiappClient(): MultiappPlugin;
@@ -14,24 +14,24 @@ class MultiappPlugin {
14
14
  const path = '/createapp';
15
15
  return this.client.request('POST', path);
16
16
  }
17
- async getApp() {
18
- const path = '/:appId';
17
+ async getApp(params) {
18
+ const path = `/${params.appId}`;
19
19
  return this.client.request('GET', path);
20
20
  }
21
- async updateApp() {
22
- const path = '/:appId';
21
+ async updateApp(params) {
22
+ const path = `/${params.appId}`;
23
23
  return this.client.request('PUT', path);
24
24
  }
25
- async deleteApp() {
26
- const path = '/:appId';
25
+ async deleteApp(params) {
26
+ const path = `/${params.appId}`;
27
27
  return this.client.request('DELETE', path);
28
28
  }
29
29
  async listApps() {
30
30
  const path = '/listapps';
31
31
  return this.client.request('GET', path);
32
32
  }
33
- async removeMember() {
34
- const path = '/:memberId';
33
+ async removeMember(params) {
34
+ const path = `/${params.memberId}`;
35
35
  return this.client.request('DELETE', path);
36
36
  }
37
37
  async listMembers() {
@@ -42,50 +42,50 @@ class MultiappPlugin {
42
42
  const path = '/invite';
43
43
  return this.client.request('POST', path);
44
44
  }
45
- async updateMember() {
46
- const path = '/:memberId';
45
+ async updateMember(params) {
46
+ const path = `/${params.memberId}`;
47
47
  return this.client.request('PUT', path);
48
48
  }
49
- async getInvitation() {
50
- const path = '/:token';
49
+ async getInvitation(params) {
50
+ const path = `/${params.token}`;
51
51
  return this.client.request('GET', path);
52
52
  }
53
- async acceptInvitation() {
54
- const path = '/:token/accept';
53
+ async acceptInvitation(params) {
54
+ const path = `/${params.token}/accept`;
55
55
  return this.client.request('POST', path);
56
56
  }
57
- async declineInvitation() {
58
- const path = '/:token/decline';
57
+ async declineInvitation(params) {
58
+ const path = `/${params.token}/decline`;
59
59
  return this.client.request('POST', path);
60
60
  }
61
61
  async createTeam() {
62
62
  const path = '/createteam';
63
63
  return this.client.request('POST', path);
64
64
  }
65
- async getTeam() {
66
- const path = '/:teamId';
65
+ async getTeam(params) {
66
+ const path = `/${params.teamId}`;
67
67
  return this.client.request('GET', path);
68
68
  }
69
- async updateTeam() {
70
- const path = '/:teamId';
69
+ async updateTeam(params) {
70
+ const path = `/${params.teamId}`;
71
71
  return this.client.request('PUT', path);
72
72
  }
73
- async deleteTeam() {
74
- const path = '/:teamId';
73
+ async deleteTeam(params) {
74
+ const path = `/${params.teamId}`;
75
75
  return this.client.request('DELETE', path);
76
76
  }
77
77
  async listTeams() {
78
78
  const path = '/listteams';
79
79
  return this.client.request('GET', path);
80
80
  }
81
- async addTeamMember(request) {
82
- const path = '/:teamId/members';
81
+ async addTeamMember(params, request) {
82
+ const path = `/${params.teamId}/members`;
83
83
  return this.client.request('POST', path, {
84
84
  body: request,
85
85
  });
86
86
  }
87
- async removeTeamMember() {
88
- const path = '/:teamId/members/:memberId';
87
+ async removeTeamMember(params) {
88
+ const path = `/${params.teamId}/members/${params.memberId}`;
89
89
  return this.client.request('DELETE', path);
90
90
  }
91
91
  }
@@ -7,6 +7,16 @@ export declare class MultisessionPlugin implements ClientPlugin {
7
7
  init(client: AuthsomeClient): void;
8
8
  list(): Promise<types.SessionsResponse>;
9
9
  setActive(request: types.SetActive_body): Promise<types.SessionTokenResponse>;
10
- delete(): Promise<types.StatusResponse>;
10
+ delete(params: {
11
+ id: string;
12
+ }): Promise<types.StatusResponse>;
13
+ getCurrent(): Promise<types.SessionTokenResponse>;
14
+ getByID(params: {
15
+ id: string;
16
+ }): Promise<types.SessionTokenResponse>;
17
+ revokeAll(request: types.RevokeAll_body): Promise<void>;
18
+ revokeOthers(): Promise<void>;
19
+ refresh(): Promise<types.SessionTokenResponse>;
20
+ getStats(): Promise<void>;
11
21
  }
12
22
  export declare function multisessionClient(): MultisessionPlugin;
@@ -20,10 +20,36 @@ class MultisessionPlugin {
20
20
  body: request,
21
21
  });
22
22
  }
23
- async delete() {
24
- const path = '/delete/{id}';
23
+ async delete(params) {
24
+ const path = `/delete/${params.id}`;
25
25
  return this.client.request('POST', path);
26
26
  }
27
+ async getCurrent() {
28
+ const path = '/current';
29
+ return this.client.request('GET', path);
30
+ }
31
+ async getByID(params) {
32
+ const path = `/${params.id}`;
33
+ return this.client.request('GET', path);
34
+ }
35
+ async revokeAll(request) {
36
+ const path = '/revoke-all';
37
+ return this.client.request('POST', path, {
38
+ body: request,
39
+ });
40
+ }
41
+ async revokeOthers() {
42
+ const path = '/revoke-others';
43
+ return this.client.request('POST', path);
44
+ }
45
+ async refresh() {
46
+ const path = '/refresh';
47
+ return this.client.request('POST', path);
48
+ }
49
+ async getStats() {
50
+ const path = '/stats';
51
+ return this.client.request('GET', path);
52
+ }
27
53
  }
28
54
  exports.MultisessionPlugin = MultisessionPlugin;
29
55
  function multisessionClient() {
@@ -5,20 +5,36 @@ export declare class NotificationPlugin implements ClientPlugin {
5
5
  readonly id = "notification";
6
6
  private client;
7
7
  init(client: AuthsomeClient): void;
8
- previewTemplate(request: types.PreviewTemplate_req): Promise<void>;
9
- createTemplate(): Promise<void>;
10
- getTemplate(): Promise<void>;
8
+ previewTemplate(params: {
9
+ id: string;
10
+ }, request: types.PreviewTemplate_req): Promise<void>;
11
+ createTemplate(): Promise<types.NotificationTemplateResponse>;
12
+ getTemplate(params: {
13
+ id: string;
14
+ }): Promise<void>;
11
15
  listTemplates(): Promise<void>;
12
- updateTemplate(): Promise<types.MessageResponse>;
13
- deleteTemplate(): Promise<types.MessageResponse>;
14
- resetTemplate(): Promise<types.MessageResponse>;
16
+ updateTemplate(params: {
17
+ id: string;
18
+ }): Promise<types.MessageResponse>;
19
+ deleteTemplate(params: {
20
+ id: string;
21
+ }): Promise<types.MessageResponse>;
22
+ resetTemplate(params: {
23
+ id: string;
24
+ }): Promise<types.MessageResponse>;
15
25
  resetAllTemplates(): Promise<types.MessageResponse>;
16
26
  getTemplateDefaults(): Promise<void>;
17
27
  renderTemplate(request: types.RenderTemplate_req): Promise<void>;
18
28
  sendNotification(): Promise<void>;
19
- getNotification(): Promise<void>;
29
+ getNotification(params: {
30
+ id: string;
31
+ }): Promise<void>;
20
32
  listNotifications(): Promise<void>;
21
- resendNotification(): Promise<void>;
22
- handleWebhook(): Promise<types.StatusResponse>;
33
+ resendNotification(params: {
34
+ id: string;
35
+ }): Promise<void>;
36
+ handleWebhook(params: {
37
+ provider: string;
38
+ }): Promise<types.StatusResponse>;
23
39
  }
24
40
  export declare function notificationClient(): NotificationPlugin;