@authsome/client 0.0.6 → 0.0.8

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 (39) hide show
  1. package/dist/client.d.ts +36 -36
  2. package/dist/client.js +16 -16
  3. package/dist/index.d.ts +16 -16
  4. package/dist/index.js +50 -50
  5. package/dist/plugins/apikey.d.ts +3 -3
  6. package/dist/plugins/apikey.js +8 -8
  7. package/dist/plugins/backupauth.js +23 -23
  8. package/dist/plugins/cms.d.ts +69 -18
  9. package/dist/plugins/cms.js +46 -46
  10. package/dist/plugins/idverification.js +4 -4
  11. package/dist/plugins/jwt.js +2 -2
  12. package/dist/plugins/multiapp.d.ts +19 -4
  13. package/dist/plugins/multiapp.js +20 -20
  14. package/dist/plugins/notification.d.ts +3 -3
  15. package/dist/plugins/notification.js +19 -19
  16. package/dist/plugins/oidcprovider.d.ts +4 -0
  17. package/dist/plugins/oidcprovider.js +26 -4
  18. package/dist/plugins/organization.d.ts +29 -17
  19. package/dist/plugins/organization.js +36 -36
  20. package/dist/plugins/permissions.js +3 -3
  21. package/dist/plugins/secrets.js +2 -2
  22. package/dist/plugins/webhook.d.ts +1 -1
  23. package/dist/types.d.ts +3941 -3113
  24. package/package.json +2 -3
  25. package/src/client.ts +36 -36
  26. package/src/index.ts +16 -16
  27. package/src/plugins/apikey.ts +9 -9
  28. package/src/plugins/backupauth.ts +23 -23
  29. package/src/plugins/cms.ts +51 -51
  30. package/src/plugins/idverification.ts +4 -4
  31. package/src/plugins/jwt.ts +2 -2
  32. package/src/plugins/multiapp.ts +27 -27
  33. package/src/plugins/notification.ts +20 -20
  34. package/src/plugins/oidcprovider.ts +30 -4
  35. package/src/plugins/organization.ts +39 -39
  36. package/src/plugins/permissions.ts +3 -3
  37. package/src/plugins/secrets.ts +2 -2
  38. package/src/plugins/webhook.ts +1 -1
  39. package/src/types.ts +4164 -3201
@@ -52,24 +52,24 @@ export class IdverificationPlugin implements ClientPlugin {
52
52
  }
53
53
 
54
54
  async adminBlockUser(params: { userId: string }, request: types.AdminBlockUser_req): Promise<types.IDVerificationStatusResponse> {
55
- const path = `/verification/users/${params.userId}/block`;
55
+ const path = `/verification/admin/users/${params.userId}/block`;
56
56
  return this.client.request<types.IDVerificationStatusResponse>('POST', path, {
57
57
  body: request,
58
58
  });
59
59
  }
60
60
 
61
61
  async adminUnblockUser(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
62
- const path = `/verification/users/${params.userId}/unblock`;
62
+ const path = `/verification/admin/users/${params.userId}/unblock`;
63
63
  return this.client.request<types.IDVerificationStatusResponse>('POST', path);
64
64
  }
65
65
 
66
66
  async adminGetUserVerificationStatus(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
67
- const path = `/verification/users/${params.userId}/status`;
67
+ const path = `/verification/admin/users/${params.userId}/status`;
68
68
  return this.client.request<types.IDVerificationStatusResponse>('GET', path);
69
69
  }
70
70
 
71
71
  async adminGetUserVerifications(params: { userId: string }): Promise<types.IDVerificationListResponse> {
72
- const path = `/verification/users/${params.userId}/verifications`;
72
+ const path = `/verification/admin/users/${params.userId}/verifications`;
73
73
  return this.client.request<types.IDVerificationListResponse>('GET', path);
74
74
  }
75
75
 
@@ -13,14 +13,14 @@ export class JwtPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async createJWTKey(request: types.CreateJWTKeyRequest): Promise<types.JWTKey> {
16
- const path = '/jwt/createjwtkey';
16
+ const path = '/jwt/keys';
17
17
  return this.client.request<types.JWTKey>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
22
  async listJWTKeys(request?: types.ListJWTKeysRequest): Promise<types.ListJWTKeysResponse> {
23
- const path = '/jwt/listjwtkeys';
23
+ const path = '/jwt/keys';
24
24
  return this.client.request<types.ListJWTKeysResponse>('GET', path, {
25
25
  query: this.client.toQueryParams(request),
26
26
  });
@@ -13,7 +13,7 @@ export class MultiappPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async createApp(): Promise<types.App> {
16
- const path = '/apps/createapp';
16
+ const path = '/apps';
17
17
  return this.client.request<types.App>('POST', path);
18
18
  }
19
19
 
@@ -33,87 +33,87 @@ export class MultiappPlugin implements ClientPlugin {
33
33
  }
34
34
 
35
35
  async listApps(): Promise<types.AppsListResponse> {
36
- const path = '/apps/listapps';
36
+ const path = '/apps';
37
37
  return this.client.request<types.AppsListResponse>('GET', path);
38
38
  }
39
39
 
40
- async removeMember(params: { memberId: string }): Promise<types.MultitenancyStatusResponse> {
41
- const path = `/apps/${params.memberId}`;
40
+ async removeMember(params: { appId: string; memberId: string }): Promise<types.MultitenancyStatusResponse> {
41
+ const path = `/apps/${params.appId}/members/${params.memberId}`;
42
42
  return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
43
43
  }
44
44
 
45
- async listMembers(): Promise<types.MembersListResponse> {
46
- const path = '/apps/listmembers';
45
+ async listMembers(params: { appId: string }): Promise<types.MembersListResponse> {
46
+ const path = `/apps/${params.appId}/members`;
47
47
  return this.client.request<types.MembersListResponse>('GET', path);
48
48
  }
49
49
 
50
- async inviteMember(request: types.InviteMemberRequest): Promise<types.Invitation> {
51
- const path = '/apps/invite';
50
+ async inviteMember(params: { appId: string }, request: types.InviteMemberRequest): Promise<types.Invitation> {
51
+ const path = `/apps/${params.appId}/members/invite`;
52
52
  return this.client.request<types.Invitation>('POST', path, {
53
53
  body: request,
54
54
  });
55
55
  }
56
56
 
57
- async updateMember(params: { memberId: string }, request: types.UpdateMemberRequest): Promise<types.Member> {
58
- const path = `/apps/${params.memberId}`;
57
+ async updateMember(params: { appId: string; memberId: string }, request: types.UpdateMemberRequest): Promise<types.Member> {
58
+ const path = `/apps/${params.appId}/members/${params.memberId}`;
59
59
  return this.client.request<types.Member>('PUT', path, {
60
60
  body: request,
61
61
  });
62
62
  }
63
63
 
64
64
  async getInvitation(params: { token: string }): Promise<types.Invitation> {
65
- const path = `/apps/${params.token}`;
65
+ const path = `/invitations/${params.token}`;
66
66
  return this.client.request<types.Invitation>('GET', path);
67
67
  }
68
68
 
69
69
  async acceptInvitation(params: { token: string }): Promise<types.MultitenancyStatusResponse> {
70
- const path = `/apps/${params.token}/accept`;
70
+ const path = `/invitations/${params.token}/accept`;
71
71
  return this.client.request<types.MultitenancyStatusResponse>('POST', path);
72
72
  }
73
73
 
74
74
  async declineInvitation(params: { token: string }): Promise<types.MultitenancyStatusResponse> {
75
- const path = `/apps/${params.token}/decline`;
75
+ const path = `/invitations/${params.token}/decline`;
76
76
  return this.client.request<types.MultitenancyStatusResponse>('POST', path);
77
77
  }
78
78
 
79
- async createTeam(request: types.CreateTeamRequest): Promise<types.Team> {
80
- const path = '/apps/createteam';
79
+ async createTeam(params: { appId: string }, request: types.CreateTeamRequest): Promise<types.Team> {
80
+ const path = `/apps/${params.appId}/teams`;
81
81
  return this.client.request<types.Team>('POST', path, {
82
82
  body: request,
83
83
  });
84
84
  }
85
85
 
86
- async getTeam(params: { teamId: string }): Promise<types.Team> {
87
- const path = `/apps/${params.teamId}`;
86
+ async getTeam(params: { appId: string; teamId: string }): Promise<types.Team> {
87
+ const path = `/apps/${params.appId}/teams/${params.teamId}`;
88
88
  return this.client.request<types.Team>('GET', path);
89
89
  }
90
90
 
91
- async updateTeam(params: { teamId: string }, request: types.UpdateTeamRequest): Promise<types.Team> {
92
- const path = `/apps/${params.teamId}`;
91
+ async updateTeam(params: { appId: string; teamId: string }, request: types.UpdateTeamRequest): Promise<types.Team> {
92
+ const path = `/apps/${params.appId}/teams/${params.teamId}`;
93
93
  return this.client.request<types.Team>('PUT', path, {
94
94
  body: request,
95
95
  });
96
96
  }
97
97
 
98
- async deleteTeam(params: { teamId: string }): Promise<types.MultitenancyStatusResponse> {
99
- const path = `/apps/${params.teamId}`;
98
+ async deleteTeam(params: { appId: string; teamId: string }): Promise<types.MultitenancyStatusResponse> {
99
+ const path = `/apps/${params.appId}/teams/${params.teamId}`;
100
100
  return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
101
101
  }
102
102
 
103
- async listTeams(): Promise<types.TeamsListResponse> {
104
- const path = '/apps/listteams';
103
+ async listTeams(params: { appId: string }): Promise<types.TeamsListResponse> {
104
+ const path = `/apps/${params.appId}/teams`;
105
105
  return this.client.request<types.TeamsListResponse>('GET', path);
106
106
  }
107
107
 
108
- async addTeamMember(params: { teamId: string }, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse> {
109
- const path = `/apps/${params.teamId}/members`;
108
+ async addTeamMember(params: { appId: string; teamId: string }, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse> {
109
+ const path = `/apps/${params.appId}/teams/${params.teamId}/members`;
110
110
  return this.client.request<types.MultitenancyStatusResponse>('POST', path, {
111
111
  body: request,
112
112
  });
113
113
  }
114
114
 
115
- async removeTeamMember(params: { teamId: string; memberId: string }): Promise<types.MultitenancyStatusResponse> {
116
- const path = `/apps/${params.teamId}/members/${params.memberId}`;
115
+ async removeTeamMember(params: { teamId: string; memberId: string; appId: string }): Promise<types.MultitenancyStatusResponse> {
116
+ const path = `/apps/${params.appId}/teams/${params.teamId}/members/${params.memberId}`;
117
117
  return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
118
118
  }
119
119
 
@@ -12,83 +12,83 @@ 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<types.NotificationPreviewResponse> {
16
- const path = `/${params.id}/preview`;
17
- return this.client.request<types.NotificationPreviewResponse>('POST', path, {
18
- body: request,
19
- });
20
- }
21
-
22
15
  async createTemplate(request: types.CreateTemplateRequest): Promise<types.NotificationTemplateResponse> {
23
- const path = '/createtemplate';
16
+ const path = '/templates';
24
17
  return this.client.request<types.NotificationTemplateResponse>('POST', path, {
25
18
  body: request,
26
19
  });
27
20
  }
28
21
 
29
22
  async getTemplate(params: { id: string }): Promise<types.NotificationTemplateResponse> {
30
- const path = `/${params.id}`;
23
+ const path = `/templates/${params.id}`;
31
24
  return this.client.request<types.NotificationTemplateResponse>('GET', path);
32
25
  }
33
26
 
34
27
  async listTemplates(): Promise<types.NotificationTemplateListResponse> {
35
- const path = '/listtemplates';
28
+ const path = '/templates';
36
29
  return this.client.request<types.NotificationTemplateListResponse>('GET', path);
37
30
  }
38
31
 
39
32
  async updateTemplate(params: { id: string }, request: types.UpdateTemplateRequest): Promise<types.NotificationTemplateResponse> {
40
- const path = `/${params.id}`;
33
+ const path = `/templates/${params.id}`;
41
34
  return this.client.request<types.NotificationTemplateResponse>('PUT', path, {
42
35
  body: request,
43
36
  });
44
37
  }
45
38
 
46
39
  async deleteTemplate(params: { id: string }): Promise<types.NotificationStatusResponse> {
47
- const path = `/${params.id}`;
40
+ const path = `/templates/${params.id}`;
48
41
  return this.client.request<types.NotificationStatusResponse>('DELETE', path);
49
42
  }
50
43
 
51
44
  async resetTemplate(params: { id: string }): Promise<types.NotificationStatusResponse> {
52
- const path = `/${params.id}/reset`;
45
+ const path = `/templates/${params.id}/reset`;
53
46
  return this.client.request<types.NotificationStatusResponse>('POST', path);
54
47
  }
55
48
 
56
49
  async resetAllTemplates(): Promise<types.NotificationStatusResponse> {
57
- const path = '/reset-all';
50
+ const path = '/templates/reset-all';
58
51
  return this.client.request<types.NotificationStatusResponse>('POST', path);
59
52
  }
60
53
 
61
54
  async getTemplateDefaults(): Promise<types.NotificationTemplateListResponse> {
62
- const path = '/defaults';
55
+ const path = '/templates/defaults';
63
56
  return this.client.request<types.NotificationTemplateListResponse>('GET', path);
64
57
  }
65
58
 
59
+ async previewTemplate(params: { id: string }, request: types.PreviewTemplate_req): Promise<types.NotificationPreviewResponse> {
60
+ const path = `/templates/${params.id}/preview`;
61
+ return this.client.request<types.NotificationPreviewResponse>('POST', path, {
62
+ body: request,
63
+ });
64
+ }
65
+
66
66
  async renderTemplate(request: types.RenderTemplate_req): Promise<types.NotificationPreviewResponse> {
67
- const path = '/render';
67
+ const path = '/templates/render';
68
68
  return this.client.request<types.NotificationPreviewResponse>('POST', path, {
69
69
  body: request,
70
70
  });
71
71
  }
72
72
 
73
73
  async sendNotification(request: types.SendRequest): Promise<types.NotificationResponse> {
74
- const path = '/send';
74
+ const path = '/notifications/send';
75
75
  return this.client.request<types.NotificationResponse>('POST', path, {
76
76
  body: request,
77
77
  });
78
78
  }
79
79
 
80
80
  async getNotification(params: { id: string }): Promise<types.NotificationResponse> {
81
- const path = `/${params.id}`;
81
+ const path = `/notifications/${params.id}`;
82
82
  return this.client.request<types.NotificationResponse>('GET', path);
83
83
  }
84
84
 
85
85
  async listNotifications(): Promise<types.NotificationListResponse> {
86
- const path = '/listnotifications';
86
+ const path = '/notifications';
87
87
  return this.client.request<types.NotificationListResponse>('GET', path);
88
88
  }
89
89
 
90
90
  async resendNotification(params: { id: string }): Promise<types.NotificationResponse> {
91
- const path = `/${params.id}/resend`;
91
+ const path = `/notifications/${params.id}/resend`;
92
92
  return this.client.request<types.NotificationResponse>('POST', path);
93
93
  }
94
94
 
@@ -20,24 +20,24 @@ export class OidcproviderPlugin implements ClientPlugin {
20
20
  }
21
21
 
22
22
  async listClients(): Promise<types.ClientsListResponse> {
23
- const path = '/oauth2/listclients';
23
+ const path = '/oauth2/clients';
24
24
  return this.client.request<types.ClientsListResponse>('GET', path);
25
25
  }
26
26
 
27
27
  async getClient(params: { clientId: string }): Promise<types.ClientDetailsResponse> {
28
- const path = `/oauth2/${params.clientId}`;
28
+ const path = `/oauth2/clients/${params.clientId}`;
29
29
  return this.client.request<types.ClientDetailsResponse>('GET', path);
30
30
  }
31
31
 
32
32
  async updateClient(params: { clientId: string }, request: types.ClientUpdateRequest): Promise<types.ClientDetailsResponse> {
33
- const path = `/oauth2/${params.clientId}`;
33
+ const path = `/oauth2/clients/${params.clientId}`;
34
34
  return this.client.request<types.ClientDetailsResponse>('PUT', path, {
35
35
  body: request,
36
36
  });
37
37
  }
38
38
 
39
39
  async deleteClient(params: { clientId: string }): Promise<void> {
40
- const path = `/oauth2/${params.clientId}`;
40
+ const path = `/oauth2/clients/${params.clientId}`;
41
41
  return this.client.request<void>('DELETE', path);
42
42
  }
43
43
 
@@ -89,6 +89,32 @@ export class OidcproviderPlugin implements ClientPlugin {
89
89
  });
90
90
  }
91
91
 
92
+ async deviceAuthorize(request: types.DeviceAuthorizationRequest): Promise<types.DeviceAuthorizationResponse> {
93
+ const path = '/oauth2/device_authorization';
94
+ return this.client.request<types.DeviceAuthorizationResponse>('POST', path, {
95
+ body: request,
96
+ });
97
+ }
98
+
99
+ async deviceCodeEntry(): Promise<void> {
100
+ const path = '/oauth2/device';
101
+ return this.client.request<void>('GET', path);
102
+ }
103
+
104
+ async deviceVerify(request: types.DeviceVerificationRequest): Promise<void> {
105
+ const path = '/oauth2/device/verify';
106
+ return this.client.request<void>('POST', path, {
107
+ body: request,
108
+ });
109
+ }
110
+
111
+ async deviceAuthorizeDecision(request: types.DeviceAuthorizationDecisionRequest): Promise<void> {
112
+ const path = '/oauth2/device/authorize';
113
+ return this.client.request<void>('POST', path, {
114
+ body: request,
115
+ });
116
+ }
117
+
92
118
  }
93
119
 
94
120
  export function oidcproviderClient(): OidcproviderPlugin {
@@ -13,10 +13,20 @@ export class OrganizationPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async createOrganization(): Promise<types.Organization> {
16
- const path = '/organizations/createorganization';
16
+ const path = '/organizations';
17
17
  return this.client.request<types.Organization>('POST', path);
18
18
  }
19
19
 
20
+ async getOrganization(params: { id: string }): Promise<types.Organization> {
21
+ const path = `/organizations/${params.id}`;
22
+ return this.client.request<types.Organization>('GET', path);
23
+ }
24
+
25
+ async listOrganizations(): Promise<types.Organization> {
26
+ const path = '/organizations';
27
+ return this.client.request<types.Organization>('GET', path);
28
+ }
29
+
20
30
  async updateOrganization(params: { id: string }): Promise<types.Organization> {
21
31
  const path = `/organizations/${params.id}`;
22
32
  return this.client.request<types.Organization>('PATCH', path);
@@ -27,69 +37,59 @@ export class OrganizationPlugin implements ClientPlugin {
27
37
  return this.client.request<void>('DELETE', path);
28
38
  }
29
39
 
30
- async inviteMember(): Promise<void> {
31
- const path = '/organizations/invite';
32
- return this.client.request<void>('POST', path);
40
+ async getOrganizationBySlug(params: { slug: string }): Promise<types.Organization> {
41
+ const path = `/organizations/slug/${params.slug}`;
42
+ return this.client.request<types.Organization>('GET', path);
33
43
  }
34
44
 
35
- async removeMember(params: { memberId: string }): Promise<void> {
36
- const path = `/organizations/${params.memberId}`;
37
- return this.client.request<void>('DELETE', path);
45
+ async listMembers(params: { id: string }): Promise<void> {
46
+ const path = `/organizations/${params.id}/members`;
47
+ return this.client.request<void>('GET', path);
38
48
  }
39
49
 
40
- async createTeam(): Promise<void> {
41
- const path = '/organizations/createteam';
50
+ async inviteMember(params: { id: string }): Promise<void> {
51
+ const path = `/organizations/${params.id}/members/invite`;
42
52
  return this.client.request<void>('POST', path);
43
53
  }
44
54
 
45
- async updateTeam(params: { teamId: string }): Promise<void> {
46
- const path = `/organizations/${params.teamId}`;
55
+ async updateMember(params: { id: string; memberId: string }): Promise<void> {
56
+ const path = `/organizations/${params.id}/members/${params.memberId}`;
47
57
  return this.client.request<void>('PATCH', path);
48
58
  }
49
59
 
50
- async deleteTeam(params: { teamId: string }): Promise<void> {
51
- const path = `/organizations/${params.teamId}`;
60
+ async removeMember(params: { id: string; memberId: string }): Promise<void> {
61
+ const path = `/organizations/${params.id}/members/${params.memberId}`;
52
62
  return this.client.request<void>('DELETE', path);
53
63
  }
54
64
 
55
- async getOrganization(params: { id: string }): Promise<types.Organization> {
56
- const path = `/organizations/${params.id}`;
57
- return this.client.request<types.Organization>('GET', path);
58
- }
59
-
60
- async listOrganizations(): Promise<types.Organization> {
61
- const path = '/organizations/listorganizations';
62
- return this.client.request<types.Organization>('GET', path);
65
+ async acceptInvitation(params: { token: string }): Promise<void> {
66
+ const path = `/organization-invitations/${params.token}/accept`;
67
+ return this.client.request<void>('POST', path);
63
68
  }
64
69
 
65
- async getOrganizationBySlug(params: { slug: string }): Promise<types.Organization> {
66
- const path = `/organizations/slug/${params.slug}`;
67
- return this.client.request<types.Organization>('GET', path);
70
+ async declineInvitation(params: { token: string }): Promise<types.StatusResponse> {
71
+ const path = `/organization-invitations/${params.token}/decline`;
72
+ return this.client.request<types.StatusResponse>('POST', path);
68
73
  }
69
74
 
70
- async listMembers(): Promise<void> {
71
- const path = '/organizations/listmembers';
75
+ async listTeams(params: { id: string }): Promise<void> {
76
+ const path = `/organizations/${params.id}/teams`;
72
77
  return this.client.request<void>('GET', path);
73
78
  }
74
79
 
75
- async updateMember(params: { memberId: string }): Promise<void> {
76
- const path = `/organizations/${params.memberId}`;
77
- return this.client.request<void>('PATCH', path);
78
- }
79
-
80
- async acceptInvitation(params: { token: string }): Promise<void> {
81
- const path = `/organizations/${params.token}/accept`;
80
+ async createTeam(params: { id: string }): Promise<void> {
81
+ const path = `/organizations/${params.id}/teams`;
82
82
  return this.client.request<void>('POST', path);
83
83
  }
84
84
 
85
- async declineInvitation(params: { token: string }): Promise<types.StatusResponse> {
86
- const path = `/organizations/${params.token}/decline`;
87
- return this.client.request<types.StatusResponse>('POST', path);
85
+ async updateTeam(params: { id: string; teamId: string }): Promise<void> {
86
+ const path = `/organizations/${params.id}/teams/${params.teamId}`;
87
+ return this.client.request<void>('PATCH', path);
88
88
  }
89
89
 
90
- async listTeams(): Promise<void> {
91
- const path = '/organizations/listteams';
92
- return this.client.request<void>('GET', path);
90
+ async deleteTeam(params: { id: string; teamId: string }): Promise<void> {
91
+ const path = `/organizations/${params.id}/teams/${params.teamId}`;
92
+ return this.client.request<void>('DELETE', path);
93
93
  }
94
94
 
95
95
  }
@@ -13,19 +13,19 @@ export class PermissionsPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async migrateAll(request: types.MigrateAllRequest): Promise<types.ErrorResponse> {
16
- const path = '/api/permissions/migrate/all';
16
+ const path = '/permissions/migrate/all';
17
17
  return this.client.request<types.ErrorResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
22
  async migrateRoles(): Promise<types.ErrorResponse> {
23
- const path = '/api/permissions/migrate/roles';
23
+ const path = '/permissions/migrate/roles';
24
24
  return this.client.request<types.ErrorResponse>('POST', path);
25
25
  }
26
26
 
27
27
  async previewConversion(request: types.PreviewConversionRequest): Promise<types.ErrorResponse> {
28
- const path = '/api/permissions/migrate/preview';
28
+ const path = '/permissions/migrate/preview';
29
29
  return this.client.request<types.ErrorResponse>('POST', path, {
30
30
  body: request,
31
31
  });
@@ -13,14 +13,14 @@ export class SecretsPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async list(request?: types.ListSecretsRequest): Promise<types.ListSecretsResponse> {
16
- const path = '/secrets/list';
16
+ const path = '/secrets';
17
17
  return this.client.request<types.ListSecretsResponse>('GET', path, {
18
18
  query: this.client.toQueryParams(request),
19
19
  });
20
20
  }
21
21
 
22
22
  async create(request: types.CreateSecretRequest): Promise<types.SecretDTO> {
23
- const path = '/secrets/create';
23
+ const path = '/secrets';
24
24
  return this.client.request<types.SecretDTO>('POST', path, {
25
25
  body: request,
26
26
  });
@@ -12,7 +12,7 @@ export class WebhookPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async create(request: { url: string; events: string[]; secret?: string }): Promise<{ webhook: types.Webhook }> {
15
+ async create(request: { secret?: string; url: string; events: string[] }): Promise<{ webhook: types.Webhook }> {
16
16
  const path = '/api/auth/webhooks';
17
17
  return this.client.request<{ webhook: types.Webhook }>('POST', path, {
18
18
  body: request,