@authsome/client 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/client.d.ts +49 -45
  2. package/dist/client.js +35 -21
  3. package/dist/index.d.ts +21 -21
  4. package/dist/index.js +65 -65
  5. package/dist/plugins/admin.d.ts +5 -5
  6. package/dist/plugins/admin.js +10 -20
  7. package/dist/plugins/anonymous.d.ts +1 -1
  8. package/dist/plugins/anonymous.js +4 -2
  9. package/dist/plugins/apikey.d.ts +7 -7
  10. package/dist/plugins/apikey.js +28 -14
  11. package/dist/plugins/backupauth.d.ts +28 -28
  12. package/dist/plugins/cms.d.ts +11 -11
  13. package/dist/plugins/cms.js +38 -28
  14. package/dist/plugins/compliance.d.ts +33 -33
  15. package/dist/plugins/compliance.js +4 -2
  16. package/dist/plugins/consent.d.ts +18 -18
  17. package/dist/plugins/emailverification.d.ts +2 -2
  18. package/dist/plugins/emailverification.js +4 -2
  19. package/dist/plugins/idverification.d.ts +11 -11
  20. package/dist/plugins/impersonation.d.ts +6 -6
  21. package/dist/plugins/impersonation.js +4 -8
  22. package/dist/plugins/jwt.d.ts +6 -5
  23. package/dist/plugins/jwt.js +16 -8
  24. package/dist/plugins/mfa.d.ts +9 -9
  25. package/dist/plugins/mfa.js +4 -8
  26. package/dist/plugins/multiapp.d.ts +19 -19
  27. package/dist/plugins/multiapp.js +16 -8
  28. package/dist/plugins/multisession.d.ts +5 -5
  29. package/dist/plugins/multisession.js +4 -2
  30. package/dist/plugins/notification.d.ts +15 -15
  31. package/dist/plugins/notification.js +12 -6
  32. package/dist/plugins/oidcprovider.d.ts +11 -11
  33. package/dist/plugins/oidcprovider.js +12 -6
  34. package/dist/plugins/organization.d.ts +5 -5
  35. package/dist/plugins/secrets.d.ts +10 -10
  36. package/dist/plugins/secrets.js +32 -16
  37. package/dist/plugins/social.js +1 -1
  38. package/dist/plugins/stepup.d.ts +13 -13
  39. package/dist/plugins/twofa.d.ts +6 -6
  40. package/dist/plugins/twofa.js +12 -24
  41. package/dist/plugins/username.d.ts +2 -2
  42. package/dist/plugins/username.js +8 -4
  43. package/dist/types.d.ts +3336 -2788
  44. package/package.json +1 -1
  45. package/src/client.ts +60 -45
  46. package/src/index.ts +21 -21
  47. package/src/plugins/admin.ts +10 -20
  48. package/src/plugins/anonymous.ts +4 -2
  49. package/src/plugins/apikey.ts +28 -14
  50. package/src/plugins/backupauth.ts +56 -56
  51. package/src/plugins/cms.ts +38 -28
  52. package/src/plugins/compliance.ts +68 -66
  53. package/src/plugins/consent.ts +36 -36
  54. package/src/plugins/emailverification.ts +6 -4
  55. package/src/plugins/idverification.ts +22 -22
  56. package/src/plugins/impersonation.ts +12 -16
  57. package/src/plugins/jwt.ts +18 -10
  58. package/src/plugins/mfa.ts +18 -22
  59. package/src/plugins/multiapp.ts +46 -38
  60. package/src/plugins/multisession.ts +11 -9
  61. package/src/plugins/notification.ts +36 -30
  62. package/src/plugins/oidcprovider.ts +28 -22
  63. package/src/plugins/organization.ts +10 -10
  64. package/src/plugins/secrets.ts +36 -20
  65. package/src/plugins/social.ts +1 -1
  66. package/src/plugins/stepup.ts +26 -26
  67. package/src/plugins/twofa.ts +12 -24
  68. package/src/plugins/username.ts +8 -4
  69. package/src/types.ts +3581 -2856
@@ -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.VerificationSessionResponse> {
15
+ async createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.IDVerificationSessionResponse> {
16
16
  const path = '/sessions';
17
- return this.client.request<types.VerificationSessionResponse>('POST', path, {
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.VerificationSessionResponse> {
22
+ async getVerificationSession(params: { id: string }): Promise<types.IDVerificationSessionResponse> {
23
23
  const path = `/sessions/${params.id}`;
24
- return this.client.request<types.VerificationSessionResponse>('GET', path);
24
+ return this.client.request<types.IDVerificationSessionResponse>('GET', path);
25
25
  }
26
26
 
27
- async getVerification(params: { id: string }): Promise<types.VerificationResponse> {
27
+ async getVerification(params: { id: string }): Promise<types.IDVerificationResponse> {
28
28
  const path = `/${params.id}`;
29
- return this.client.request<types.VerificationResponse>('GET', path);
29
+ return this.client.request<types.IDVerificationResponse>('GET', path);
30
30
  }
31
31
 
32
- async getUserVerifications(): Promise<types.VerificationListResponse> {
32
+ async getUserVerifications(): Promise<types.IDVerificationListResponse> {
33
33
  const path = '/me';
34
- return this.client.request<types.VerificationListResponse>('GET', path);
34
+ return this.client.request<types.IDVerificationListResponse>('GET', path);
35
35
  }
36
36
 
37
- async getUserVerificationStatus(): Promise<types.UserVerificationStatusResponse> {
37
+ async getUserVerificationStatus(): Promise<types.IDVerificationStatusResponse> {
38
38
  const path = '/me/status';
39
- return this.client.request<types.UserVerificationStatusResponse>('GET', path);
39
+ return this.client.request<types.IDVerificationStatusResponse>('GET', path);
40
40
  }
41
41
 
42
- async requestReverification(request: types.RequestReverification_req): Promise<types.MessageResponse> {
42
+ async requestReverification(request: types.RequestReverification_req): Promise<types.IDVerificationSessionResponse> {
43
43
  const path = '/me/reverify';
44
- return this.client.request<types.MessageResponse>('POST', path, {
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<void> {
49
+ async handleWebhook(params: { provider: string }): Promise<types.IDVerificationWebhookResponse> {
50
50
  const path = `/webhook/${params.provider}`;
51
- return this.client.request<void>('POST', path);
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.MessageResponse> {
54
+ async adminBlockUser(params: { userId: string }, request: types.AdminBlockUser_req): Promise<types.IDVerificationStatusResponse> {
55
55
  const path = `/users/${params.userId}/block`;
56
- return this.client.request<types.MessageResponse>('POST', path, {
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.MessageResponse> {
61
+ async adminUnblockUser(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
62
62
  const path = `/users/${params.userId}/unblock`;
63
- return this.client.request<types.MessageResponse>('POST', path);
63
+ return this.client.request<types.IDVerificationStatusResponse>('POST', path);
64
64
  }
65
65
 
66
- async adminGetUserVerificationStatus(params: { userId: string }): Promise<types.UserVerificationStatusResponse> {
66
+ async adminGetUserVerificationStatus(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
67
67
  const path = `/users/${params.userId}/status`;
68
- return this.client.request<types.UserVerificationStatusResponse>('GET', path);
68
+ return this.client.request<types.IDVerificationStatusResponse>('GET', path);
69
69
  }
70
70
 
71
- async adminGetUserVerifications(params: { userId: string }): Promise<types.VerificationListResponse> {
71
+ async adminGetUserVerifications(params: { userId: string }): Promise<types.IDVerificationListResponse> {
72
72
  const path = `/users/${params.userId}/verifications`;
73
- return this.client.request<types.VerificationListResponse>('GET', path);
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(request: types.StartImpersonation_reqBody): Promise<void> {
15
+ async startImpersonation(): Promise<types.ImpersonationStartResponse> {
16
16
  const path = '/start';
17
- return this.client.request<void>('POST', path, {
18
- body: request,
19
- });
17
+ return this.client.request<types.ImpersonationStartResponse>('POST', path);
20
18
  }
21
19
 
22
- async endImpersonation(request: types.EndImpersonation_reqBody): Promise<void> {
20
+ async endImpersonation(): Promise<types.ImpersonationEndResponse> {
23
21
  const path = '/end';
24
- return this.client.request<void>('POST', path, {
25
- body: request,
26
- });
22
+ return this.client.request<types.ImpersonationEndResponse>('POST', path);
27
23
  }
28
24
 
29
- async getImpersonation(params: { id: string }): Promise<void> {
25
+ async getImpersonation(params: { id: string }): Promise<types.ImpersonationSession> {
30
26
  const path = `/${params.id}`;
31
- return this.client.request<void>('GET', path);
27
+ return this.client.request<types.ImpersonationSession>('GET', path);
32
28
  }
33
29
 
34
- async listImpersonations(): Promise<void> {
30
+ async listImpersonations(): Promise<types.ImpersonationListResponse> {
35
31
  const path = '/';
36
- return this.client.request<void>('GET', path);
32
+ return this.client.request<types.ImpersonationListResponse>('GET', path);
37
33
  }
38
34
 
39
- async listAuditEvents(): Promise<void> {
35
+ async listAuditEvents(): Promise<types.ImpersonationAuditResponse> {
40
36
  const path = '/audit';
41
- return this.client.request<void>('GET', path);
37
+ return this.client.request<types.ImpersonationAuditResponse>('GET', path);
42
38
  }
43
39
 
44
- async verifyImpersonation(): Promise<void> {
40
+ async verifyImpersonation(): Promise<types.ImpersonationVerifyResponse> {
45
41
  const path = '/verify';
46
- return this.client.request<void>('POST', path);
42
+ return this.client.request<types.ImpersonationVerifyResponse>('POST', path);
47
43
  }
48
44
 
49
45
  }
@@ -12,29 +12,37 @@ export class JwtPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async createJWTKey(): Promise<void> {
15
+ async createJWTKey(request: types.CreateJWTKeyRequest): Promise<types.JWTKey> {
16
16
  const path = '/createjwtkey';
17
- return this.client.request<void>('POST', path);
17
+ return this.client.request<types.JWTKey>('POST', path, {
18
+ body: request,
19
+ });
18
20
  }
19
21
 
20
- async listJWTKeys(): Promise<void> {
22
+ async listJWTKeys(request?: types.ListJWTKeysRequest): Promise<types.ListJWTKeysResponse> {
21
23
  const path = '/listjwtkeys';
22
- return this.client.request<void>('GET', path);
24
+ return this.client.request<types.ListJWTKeysResponse>('GET', path, {
25
+ query: this.client.toQueryParams(request),
26
+ });
23
27
  }
24
28
 
25
- async getJWKS(): Promise<void> {
29
+ async getJWKS(): Promise<types.JWKSResponse> {
26
30
  const path = '/jwks';
27
- return this.client.request<void>('GET', path);
31
+ return this.client.request<types.JWKSResponse>('GET', path);
28
32
  }
29
33
 
30
- async generateToken(): Promise<void> {
34
+ async generateToken(request: types.GenerateTokenRequest): Promise<types.GenerateTokenResponse> {
31
35
  const path = '/generate';
32
- return this.client.request<void>('POST', path);
36
+ return this.client.request<types.GenerateTokenResponse>('POST', path, {
37
+ body: request,
38
+ });
33
39
  }
34
40
 
35
- async verifyToken(): Promise<void> {
41
+ async verifyToken(request: types.VerifyTokenRequest): Promise<types.VerifyTokenResponse> {
36
42
  const path = '/verify';
37
- return this.client.request<void>('POST', path);
43
+ return this.client.request<types.VerifyTokenResponse>('POST', path, {
44
+ body: request,
45
+ });
38
46
  }
39
47
 
40
48
  }
@@ -12,9 +12,9 @@ export class MfaPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async enrollFactor(request: types.FactorEnrollmentRequest): Promise<void> {
15
+ async enrollFactor(request: types.FactorEnrollmentRequest): Promise<types.FactorEnrollmentResponse> {
16
16
  const path = '/mfa/factors/enroll';
17
- return this.client.request<void>('POST', path, {
17
+ return this.client.request<types.FactorEnrollmentResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
@@ -24,9 +24,9 @@ export class MfaPlugin implements ClientPlugin {
24
24
  return this.client.request<types.FactorsResponse>('GET', path);
25
25
  }
26
26
 
27
- async getFactor(params: { id: string }): Promise<void> {
27
+ async getFactor(params: { id: string }): Promise<types.Factor> {
28
28
  const path = `/mfa/factors/${params.id}`;
29
- return this.client.request<void>('GET', path);
29
+ return this.client.request<types.Factor>('GET', path);
30
30
  }
31
31
 
32
32
  async updateFactor(params: { id: string }): Promise<types.MessageResponse> {
@@ -39,30 +39,28 @@ export class MfaPlugin implements ClientPlugin {
39
39
  return this.client.request<types.MessageResponse>('DELETE', path);
40
40
  }
41
41
 
42
- async verifyFactor(params: { id: string }, request: types.VerifyFactor_req): Promise<types.MessageResponse> {
42
+ async verifyFactor(params: { id: string }): Promise<types.MessageResponse> {
43
43
  const path = `/mfa/factors/${params.id}/verify`;
44
- return this.client.request<types.MessageResponse>('POST', path, {
45
- body: request,
46
- });
44
+ return this.client.request<types.MessageResponse>('POST', path);
47
45
  }
48
46
 
49
- async initiateChallenge(request: types.ChallengeRequest): Promise<void> {
47
+ async initiateChallenge(request: types.ChallengeRequest): Promise<types.ChallengeResponse> {
50
48
  const path = '/mfa/challenge';
51
- return this.client.request<void>('POST', path, {
49
+ return this.client.request<types.ChallengeResponse>('POST', path, {
52
50
  body: request,
53
51
  });
54
52
  }
55
53
 
56
- async verifyChallenge(request: types.VerificationRequest): Promise<void> {
54
+ async verifyChallenge(request: types.VerificationRequest): Promise<types.VerificationResponse> {
57
55
  const path = '/mfa/verify';
58
- return this.client.request<void>('POST', path, {
56
+ return this.client.request<types.VerificationResponse>('POST', path, {
59
57
  body: request,
60
58
  });
61
59
  }
62
60
 
63
- async getChallengeStatus(params: { id: string }): Promise<void> {
61
+ async getChallengeStatus(params: { id: string }): Promise<types.ChallengeStatusResponse> {
64
62
  const path = `/mfa/challenge/${params.id}`;
65
- return this.client.request<void>('GET', path);
63
+ return this.client.request<types.ChallengeStatusResponse>('GET', path);
66
64
  }
67
65
 
68
66
  async trustDevice(request: types.DeviceInfo): Promise<types.MessageResponse> {
@@ -82,9 +80,9 @@ export class MfaPlugin implements ClientPlugin {
82
80
  return this.client.request<types.MessageResponse>('DELETE', path);
83
81
  }
84
82
 
85
- async getStatus(): Promise<void> {
83
+ async getStatus(): Promise<types.MFAStatus> {
86
84
  const path = '/mfa/status';
87
- return this.client.request<void>('GET', path);
85
+ return this.client.request<types.MFAStatus>('GET', path);
88
86
  }
89
87
 
90
88
  async getPolicy(): Promise<types.MFAConfigResponse> {
@@ -92,16 +90,14 @@ export class MfaPlugin implements ClientPlugin {
92
90
  return this.client.request<types.MFAConfigResponse>('GET', path);
93
91
  }
94
92
 
95
- async adminUpdatePolicy(request: types.AdminPolicyRequest): Promise<void> {
93
+ async adminUpdatePolicy(): Promise<types.StatusResponse> {
96
94
  const path = '/mfa/policy';
97
- return this.client.request<void>('PUT', path, {
98
- body: request,
99
- });
95
+ return this.client.request<types.StatusResponse>('PUT', path);
100
96
  }
101
97
 
102
- async adminResetUserMFA(params: { id: string }): Promise<void> {
98
+ async adminResetUserMFA(params: { id: string }): Promise<types.MessageResponse> {
103
99
  const path = `/mfa/users/${params.id}/reset`;
104
- return this.client.request<void>('POST', path);
100
+ return this.client.request<types.MessageResponse>('POST', path);
105
101
  }
106
102
 
107
103
  }
@@ -12,101 +12,109 @@ export class MultiappPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async createApp(): Promise<void> {
15
+ async createApp(): Promise<types.App> {
16
16
  const path = '/createapp';
17
- return this.client.request<void>('POST', path);
17
+ return this.client.request<types.App>('POST', path);
18
18
  }
19
19
 
20
- async getApp(params: { appId: string }): Promise<void> {
20
+ async getApp(params: { appId: string }): Promise<types.App> {
21
21
  const path = `/${params.appId}`;
22
- return this.client.request<void>('GET', path);
22
+ return this.client.request<types.App>('GET', path);
23
23
  }
24
24
 
25
- async updateApp(params: { appId: string }): Promise<void> {
25
+ async updateApp(params: { appId: string }): Promise<types.App> {
26
26
  const path = `/${params.appId}`;
27
- return this.client.request<void>('PUT', path);
27
+ return this.client.request<types.App>('PUT', path);
28
28
  }
29
29
 
30
- async deleteApp(params: { appId: string }): Promise<void> {
30
+ async deleteApp(params: { appId: string }): Promise<types.MultitenancyStatusResponse> {
31
31
  const path = `/${params.appId}`;
32
- return this.client.request<void>('DELETE', path);
32
+ return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
33
33
  }
34
34
 
35
- async listApps(): Promise<void> {
35
+ async listApps(): Promise<types.AppsListResponse> {
36
36
  const path = '/listapps';
37
- return this.client.request<void>('GET', path);
37
+ return this.client.request<types.AppsListResponse>('GET', path);
38
38
  }
39
39
 
40
- async removeMember(params: { memberId: string }): Promise<void> {
40
+ async removeMember(params: { memberId: string }): Promise<types.MultitenancyStatusResponse> {
41
41
  const path = `/${params.memberId}`;
42
- return this.client.request<void>('DELETE', path);
42
+ return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
43
43
  }
44
44
 
45
- async listMembers(): Promise<void> {
45
+ async listMembers(): Promise<types.MembersListResponse> {
46
46
  const path = '/listmembers';
47
- return this.client.request<void>('GET', path);
47
+ return this.client.request<types.MembersListResponse>('GET', path);
48
48
  }
49
49
 
50
- async inviteMember(): Promise<void> {
50
+ async inviteMember(request: types.InviteMemberRequest): Promise<types.Invitation> {
51
51
  const path = '/invite';
52
- return this.client.request<void>('POST', path);
52
+ return this.client.request<types.Invitation>('POST', path, {
53
+ body: request,
54
+ });
53
55
  }
54
56
 
55
- async updateMember(params: { memberId: string }): Promise<void> {
57
+ async updateMember(params: { memberId: string }, request: types.UpdateMemberRequest): Promise<types.Member> {
56
58
  const path = `/${params.memberId}`;
57
- return this.client.request<void>('PUT', path);
59
+ return this.client.request<types.Member>('PUT', path, {
60
+ body: request,
61
+ });
58
62
  }
59
63
 
60
- async getInvitation(params: { token: string }): Promise<void> {
64
+ async getInvitation(params: { token: string }): Promise<types.Invitation> {
61
65
  const path = `/${params.token}`;
62
- return this.client.request<void>('GET', path);
66
+ return this.client.request<types.Invitation>('GET', path);
63
67
  }
64
68
 
65
- async acceptInvitation(params: { token: string }): Promise<void> {
69
+ async acceptInvitation(params: { token: string }): Promise<types.MultitenancyStatusResponse> {
66
70
  const path = `/${params.token}/accept`;
67
- return this.client.request<void>('POST', path);
71
+ return this.client.request<types.MultitenancyStatusResponse>('POST', path);
68
72
  }
69
73
 
70
- async declineInvitation(params: { token: string }): Promise<void> {
74
+ async declineInvitation(params: { token: string }): Promise<types.MultitenancyStatusResponse> {
71
75
  const path = `/${params.token}/decline`;
72
- return this.client.request<void>('POST', path);
76
+ return this.client.request<types.MultitenancyStatusResponse>('POST', path);
73
77
  }
74
78
 
75
- async createTeam(): Promise<void> {
79
+ async createTeam(request: types.CreateTeamRequest): Promise<types.Team> {
76
80
  const path = '/createteam';
77
- return this.client.request<void>('POST', path);
81
+ return this.client.request<types.Team>('POST', path, {
82
+ body: request,
83
+ });
78
84
  }
79
85
 
80
- async getTeam(params: { teamId: string }): Promise<void> {
86
+ async getTeam(params: { teamId: string }): Promise<types.Team> {
81
87
  const path = `/${params.teamId}`;
82
- return this.client.request<void>('GET', path);
88
+ return this.client.request<types.Team>('GET', path);
83
89
  }
84
90
 
85
- async updateTeam(params: { teamId: string }): Promise<void> {
91
+ async updateTeam(params: { teamId: string }, request: types.UpdateTeamRequest): Promise<types.Team> {
86
92
  const path = `/${params.teamId}`;
87
- return this.client.request<void>('PUT', path);
93
+ return this.client.request<types.Team>('PUT', path, {
94
+ body: request,
95
+ });
88
96
  }
89
97
 
90
- async deleteTeam(params: { teamId: string }): Promise<void> {
98
+ async deleteTeam(params: { teamId: string }): Promise<types.MultitenancyStatusResponse> {
91
99
  const path = `/${params.teamId}`;
92
- return this.client.request<void>('DELETE', path);
100
+ return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
93
101
  }
94
102
 
95
- async listTeams(): Promise<void> {
103
+ async listTeams(): Promise<types.TeamsListResponse> {
96
104
  const path = '/listteams';
97
- return this.client.request<void>('GET', path);
105
+ return this.client.request<types.TeamsListResponse>('GET', path);
98
106
  }
99
107
 
100
- async addTeamMember(params: { teamId: string }, request: types.AddTeamMember_req): Promise<void> {
108
+ async addTeamMember(params: { teamId: string }, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse> {
101
109
  const path = `/${params.teamId}/members`;
102
- return this.client.request<void>('POST', path, {
110
+ return this.client.request<types.MultitenancyStatusResponse>('POST', path, {
103
111
  body: request,
104
112
  });
105
113
  }
106
114
 
107
- async removeTeamMember(params: { teamId: string; memberId: string }): Promise<void> {
115
+ async removeTeamMember(params: { teamId: string; memberId: string }): Promise<types.MultitenancyStatusResponse> {
108
116
  const path = `/${params.teamId}/members/${params.memberId}`;
109
- return this.client.request<void>('DELETE', path);
117
+ return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
110
118
  }
111
119
 
112
120
  }
@@ -12,12 +12,14 @@ export class MultisessionPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async list(): Promise<types.SessionsResponse> {
15
+ async list(request?: types.ListSessionsRequest): Promise<types.ListSessionsResponse> {
16
16
  const path = '/list';
17
- return this.client.request<types.SessionsResponse>('GET', path);
17
+ return this.client.request<types.ListSessionsResponse>('GET', path, {
18
+ query: this.client.toQueryParams(request),
19
+ });
18
20
  }
19
21
 
20
- async setActive(request: types.SetActive_body): Promise<types.SessionTokenResponse> {
22
+ async setActive(request: types.SetActiveRequest): Promise<types.SessionTokenResponse> {
21
23
  const path = '/set-active';
22
24
  return this.client.request<types.SessionTokenResponse>('POST', path, {
23
25
  body: request,
@@ -39,16 +41,16 @@ export class MultisessionPlugin implements ClientPlugin {
39
41
  return this.client.request<types.SessionTokenResponse>('GET', path);
40
42
  }
41
43
 
42
- async revokeAll(request: types.RevokeAll_body): Promise<void> {
44
+ async revokeAll(request: types.RevokeAllRequest): Promise<types.RevokeResponse> {
43
45
  const path = '/revoke-all';
44
- return this.client.request<void>('POST', path, {
46
+ return this.client.request<types.RevokeResponse>('POST', path, {
45
47
  body: request,
46
48
  });
47
49
  }
48
50
 
49
- async revokeOthers(): Promise<void> {
51
+ async revokeOthers(): Promise<types.RevokeResponse> {
50
52
  const path = '/revoke-others';
51
- return this.client.request<void>('POST', path);
53
+ return this.client.request<types.RevokeResponse>('POST', path);
52
54
  }
53
55
 
54
56
  async refresh(): Promise<types.SessionTokenResponse> {
@@ -56,9 +58,9 @@ export class MultisessionPlugin implements ClientPlugin {
56
58
  return this.client.request<types.SessionTokenResponse>('POST', path);
57
59
  }
58
60
 
59
- async getStats(): Promise<void> {
61
+ async getStats(): Promise<types.SessionStatsResponse> {
60
62
  const path = '/stats';
61
- return this.client.request<void>('GET', path);
63
+ return this.client.request<types.SessionStatsResponse>('GET', path);
62
64
  }
63
65
 
64
66
  }
@@ -12,83 +12,89 @@ export class NotificationPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async previewTemplate(params: { id: string }, request: types.PreviewTemplate_req): Promise<void> {
15
+ async previewTemplate(params: { id: string }, request: types.PreviewTemplate_req): Promise<types.NotificationPreviewResponse> {
16
16
  const path = `/${params.id}/preview`;
17
- return this.client.request<void>('POST', path, {
17
+ return this.client.request<types.NotificationPreviewResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
- async createTemplate(): Promise<types.NotificationTemplateResponse> {
22
+ async createTemplate(request: types.CreateTemplateRequest): Promise<types.NotificationTemplateResponse> {
23
23
  const path = '/createtemplate';
24
- return this.client.request<types.NotificationTemplateResponse>('POST', path);
24
+ return this.client.request<types.NotificationTemplateResponse>('POST', path, {
25
+ body: request,
26
+ });
25
27
  }
26
28
 
27
- async getTemplate(params: { id: string }): Promise<void> {
29
+ async getTemplate(params: { id: string }): Promise<types.NotificationTemplateResponse> {
28
30
  const path = `/${params.id}`;
29
- return this.client.request<void>('GET', path);
31
+ return this.client.request<types.NotificationTemplateResponse>('GET', path);
30
32
  }
31
33
 
32
- async listTemplates(): Promise<void> {
34
+ async listTemplates(): Promise<types.NotificationTemplateListResponse> {
33
35
  const path = '/listtemplates';
34
- return this.client.request<void>('GET', path);
36
+ return this.client.request<types.NotificationTemplateListResponse>('GET', path);
35
37
  }
36
38
 
37
- async updateTemplate(params: { id: string }): Promise<types.MessageResponse> {
39
+ async updateTemplate(params: { id: string }, request: types.UpdateTemplateRequest): Promise<types.NotificationTemplateResponse> {
38
40
  const path = `/${params.id}`;
39
- return this.client.request<types.MessageResponse>('PUT', path);
41
+ return this.client.request<types.NotificationTemplateResponse>('PUT', path, {
42
+ body: request,
43
+ });
40
44
  }
41
45
 
42
- async deleteTemplate(params: { id: string }): Promise<types.MessageResponse> {
46
+ async deleteTemplate(params: { id: string }): Promise<types.NotificationStatusResponse> {
43
47
  const path = `/${params.id}`;
44
- return this.client.request<types.MessageResponse>('DELETE', path);
48
+ return this.client.request<types.NotificationStatusResponse>('DELETE', path);
45
49
  }
46
50
 
47
- async resetTemplate(params: { id: string }): Promise<types.MessageResponse> {
51
+ async resetTemplate(params: { id: string }): Promise<types.NotificationStatusResponse> {
48
52
  const path = `/${params.id}/reset`;
49
- return this.client.request<types.MessageResponse>('POST', path);
53
+ return this.client.request<types.NotificationStatusResponse>('POST', path);
50
54
  }
51
55
 
52
- async resetAllTemplates(): Promise<types.MessageResponse> {
56
+ async resetAllTemplates(): Promise<types.NotificationStatusResponse> {
53
57
  const path = '/reset-all';
54
- return this.client.request<types.MessageResponse>('POST', path);
58
+ return this.client.request<types.NotificationStatusResponse>('POST', path);
55
59
  }
56
60
 
57
- async getTemplateDefaults(): Promise<void> {
61
+ async getTemplateDefaults(): Promise<types.NotificationTemplateListResponse> {
58
62
  const path = '/defaults';
59
- return this.client.request<void>('GET', path);
63
+ return this.client.request<types.NotificationTemplateListResponse>('GET', path);
60
64
  }
61
65
 
62
- async renderTemplate(request: types.RenderTemplate_req): Promise<void> {
66
+ async renderTemplate(request: types.RenderTemplate_req): Promise<types.NotificationPreviewResponse> {
63
67
  const path = '/render';
64
- return this.client.request<void>('POST', path, {
68
+ return this.client.request<types.NotificationPreviewResponse>('POST', path, {
65
69
  body: request,
66
70
  });
67
71
  }
68
72
 
69
- async sendNotification(): Promise<void> {
73
+ async sendNotification(request: types.SendRequest): Promise<types.NotificationResponse> {
70
74
  const path = '/send';
71
- return this.client.request<void>('POST', path);
75
+ return this.client.request<types.NotificationResponse>('POST', path, {
76
+ body: request,
77
+ });
72
78
  }
73
79
 
74
- async getNotification(params: { id: string }): Promise<void> {
80
+ async getNotification(params: { id: string }): Promise<types.NotificationResponse> {
75
81
  const path = `/${params.id}`;
76
- return this.client.request<void>('GET', path);
82
+ return this.client.request<types.NotificationResponse>('GET', path);
77
83
  }
78
84
 
79
- async listNotifications(): Promise<void> {
85
+ async listNotifications(): Promise<types.NotificationListResponse> {
80
86
  const path = '/listnotifications';
81
- return this.client.request<void>('GET', path);
87
+ return this.client.request<types.NotificationListResponse>('GET', path);
82
88
  }
83
89
 
84
- async resendNotification(params: { id: string }): Promise<void> {
90
+ async resendNotification(params: { id: string }): Promise<types.NotificationResponse> {
85
91
  const path = `/${params.id}/resend`;
86
- return this.client.request<void>('POST', path);
92
+ return this.client.request<types.NotificationResponse>('POST', path);
87
93
  }
88
94
 
89
- async handleWebhook(params: { provider: string }): Promise<types.StatusResponse> {
95
+ async handleWebhook(params: { provider: string }): Promise<types.NotificationWebhookResponse> {
90
96
  const path = `/notifications/webhook/${params.provider}`;
91
- return this.client.request<types.StatusResponse>('POST', path);
97
+ return this.client.request<types.NotificationWebhookResponse>('POST', path);
92
98
  }
93
99
 
94
100
  }