@authsome/client 0.0.5 → 0.0.6

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 (43) hide show
  1. package/dist/client.d.ts +40 -40
  2. package/dist/client.js +19 -19
  3. package/dist/index.d.ts +19 -19
  4. package/dist/index.js +59 -59
  5. package/dist/plugins/admin.js +11 -11
  6. package/dist/plugins/apikey.js +7 -7
  7. package/dist/plugins/backupauth.js +29 -29
  8. package/dist/plugins/cms.js +29 -29
  9. package/dist/plugins/idverification.js +11 -11
  10. package/dist/plugins/impersonation.js +6 -6
  11. package/dist/plugins/jwt.js +5 -5
  12. package/dist/plugins/multiapp.js +19 -19
  13. package/dist/plugins/multisession.js +9 -9
  14. package/dist/plugins/oidcprovider.js +13 -13
  15. package/dist/plugins/organization.js +16 -16
  16. package/dist/plugins/passkey.js +7 -7
  17. package/dist/plugins/permissions.js +3 -3
  18. package/dist/plugins/secrets.js +11 -11
  19. package/dist/plugins/sso.js +6 -6
  20. package/dist/plugins/stepup.js +14 -14
  21. package/dist/plugins/webhook.js +4 -4
  22. package/dist/types.d.ts +3183 -3206
  23. package/package.json +3 -3
  24. package/src/client.ts +40 -40
  25. package/src/index.ts +19 -19
  26. package/src/plugins/admin.ts +11 -11
  27. package/src/plugins/apikey.ts +7 -7
  28. package/src/plugins/backupauth.ts +29 -29
  29. package/src/plugins/cms.ts +29 -29
  30. package/src/plugins/idverification.ts +11 -11
  31. package/src/plugins/impersonation.ts +6 -6
  32. package/src/plugins/jwt.ts +5 -5
  33. package/src/plugins/multiapp.ts +19 -19
  34. package/src/plugins/multisession.ts +9 -9
  35. package/src/plugins/oidcprovider.ts +13 -13
  36. package/src/plugins/organization.ts +16 -16
  37. package/src/plugins/passkey.ts +7 -7
  38. package/src/plugins/permissions.ts +3 -3
  39. package/src/plugins/secrets.ts +11 -11
  40. package/src/plugins/sso.ts +6 -6
  41. package/src/plugins/stepup.ts +14 -14
  42. package/src/plugins/webhook.ts +4 -4
  43. package/src/types.ts +3185 -3208
@@ -13,163 +13,163 @@ export class CmsPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async listEntries(): Promise<void> {
16
- const path = '/listentries';
16
+ const path = '/cms/listentries';
17
17
  return this.client.request<void>('GET', path);
18
18
  }
19
19
 
20
20
  async createEntry(request: types.CreateEntryRequest): Promise<void> {
21
- const path = '/createentry';
21
+ const path = '/cms/createentry';
22
22
  return this.client.request<void>('POST', path, {
23
23
  body: request,
24
24
  });
25
25
  }
26
26
 
27
27
  async getEntry(): Promise<void> {
28
- const path = '/getentry';
28
+ const path = '/cms/getentry';
29
29
  return this.client.request<void>('GET', path);
30
30
  }
31
31
 
32
32
  async updateEntry(request: types.UpdateEntryRequest): Promise<void> {
33
- const path = '/updateentry';
33
+ const path = '/cms/updateentry';
34
34
  return this.client.request<void>('PUT', path, {
35
35
  body: request,
36
36
  });
37
37
  }
38
38
 
39
39
  async deleteEntry(): Promise<void> {
40
- const path = '/deleteentry';
40
+ const path = '/cms/deleteentry';
41
41
  return this.client.request<void>('DELETE', path);
42
42
  }
43
43
 
44
44
  async publishEntry(request: types.PublishEntryRequest): Promise<void> {
45
- const path = '/publish';
45
+ const path = '/cms/publish';
46
46
  return this.client.request<void>('POST', path, {
47
47
  body: request,
48
48
  });
49
49
  }
50
50
 
51
51
  async unpublishEntry(): Promise<void> {
52
- const path = '/unpublish';
52
+ const path = '/cms/unpublish';
53
53
  return this.client.request<void>('POST', path);
54
54
  }
55
55
 
56
56
  async archiveEntry(): Promise<void> {
57
- const path = '/archive';
57
+ const path = '/cms/archive';
58
58
  return this.client.request<void>('POST', path);
59
59
  }
60
60
 
61
61
  async queryEntries(): Promise<void> {
62
- const path = '/query';
62
+ const path = '/cms/query';
63
63
  return this.client.request<void>('POST', path);
64
64
  }
65
65
 
66
66
  async bulkPublish(): Promise<void> {
67
- const path = '/publish';
67
+ const path = '/cms/publish';
68
68
  return this.client.request<void>('POST', path);
69
69
  }
70
70
 
71
71
  async bulkUnpublish(): Promise<void> {
72
- const path = '/unpublish';
72
+ const path = '/cms/unpublish';
73
73
  return this.client.request<void>('POST', path);
74
74
  }
75
75
 
76
76
  async bulkDelete(): Promise<void> {
77
- const path = '/delete';
77
+ const path = '/cms/delete';
78
78
  return this.client.request<void>('POST', path);
79
79
  }
80
80
 
81
81
  async getEntryStats(): Promise<void> {
82
- const path = '/stats';
82
+ const path = '/cms/stats';
83
83
  return this.client.request<void>('GET', path);
84
84
  }
85
85
 
86
86
  async listContentTypes(): Promise<void> {
87
- const path = '/listcontenttypes';
87
+ const path = '/cms/listcontenttypes';
88
88
  return this.client.request<void>('GET', path);
89
89
  }
90
90
 
91
91
  async createContentType(request: types.CreateContentTypeRequest): Promise<void> {
92
- const path = '/createcontenttype';
92
+ const path = '/cms/createcontenttype';
93
93
  return this.client.request<void>('POST', path, {
94
94
  body: request,
95
95
  });
96
96
  }
97
97
 
98
98
  async getContentType(params: { slug: string }): Promise<void> {
99
- const path = `/${params.slug}`;
99
+ const path = `/cms/${params.slug}`;
100
100
  return this.client.request<void>('GET', path);
101
101
  }
102
102
 
103
103
  async updateContentType(params: { slug: string }, request: types.UpdateContentTypeRequest): Promise<void> {
104
- const path = `/${params.slug}`;
104
+ const path = `/cms/${params.slug}`;
105
105
  return this.client.request<void>('PUT', path, {
106
106
  body: request,
107
107
  });
108
108
  }
109
109
 
110
110
  async deleteContentType(params: { slug: string }): Promise<void> {
111
- const path = `/${params.slug}`;
111
+ const path = `/cms/${params.slug}`;
112
112
  return this.client.request<void>('DELETE', path);
113
113
  }
114
114
 
115
115
  async listFields(): Promise<void> {
116
- const path = '/listfields';
116
+ const path = '/cms/listfields';
117
117
  return this.client.request<void>('GET', path);
118
118
  }
119
119
 
120
120
  async addField(request: types.CreateFieldRequest): Promise<void> {
121
- const path = '/addfield';
121
+ const path = '/cms/addfield';
122
122
  return this.client.request<void>('POST', path, {
123
123
  body: request,
124
124
  });
125
125
  }
126
126
 
127
127
  async getField(params: { fieldSlug: string }): Promise<void> {
128
- const path = `/${params.fieldSlug}`;
128
+ const path = `/cms/${params.fieldSlug}`;
129
129
  return this.client.request<void>('GET', path);
130
130
  }
131
131
 
132
132
  async updateField(params: { fieldSlug: string }, request: types.UpdateFieldRequest): Promise<void> {
133
- const path = `/${params.fieldSlug}`;
133
+ const path = `/cms/${params.fieldSlug}`;
134
134
  return this.client.request<void>('PUT', path, {
135
135
  body: request,
136
136
  });
137
137
  }
138
138
 
139
139
  async deleteField(params: { fieldSlug: string }): Promise<void> {
140
- const path = `/${params.fieldSlug}`;
140
+ const path = `/cms/${params.fieldSlug}`;
141
141
  return this.client.request<void>('DELETE', path);
142
142
  }
143
143
 
144
144
  async reorderFields(request: types.ReorderFieldsRequest): Promise<void> {
145
- const path = '/reorder';
145
+ const path = '/cms/reorder';
146
146
  return this.client.request<void>('POST', path, {
147
147
  body: request,
148
148
  });
149
149
  }
150
150
 
151
151
  async getFieldTypes(): Promise<void> {
152
- const path = '/field-types';
152
+ const path = '/cms/field-types';
153
153
  return this.client.request<void>('GET', path);
154
154
  }
155
155
 
156
156
  async listRevisions(): Promise<void> {
157
- const path = '/listrevisions';
157
+ const path = '/cms/listrevisions';
158
158
  return this.client.request<void>('GET', path);
159
159
  }
160
160
 
161
161
  async getRevision(params: { version: number }): Promise<void> {
162
- const path = `/${params.version}`;
162
+ const path = `/cms/${params.version}`;
163
163
  return this.client.request<void>('GET', path);
164
164
  }
165
165
 
166
166
  async restoreRevision(params: { version: number }): Promise<void> {
167
- const path = `/${params.version}/restore`;
167
+ const path = `/cms/${params.version}/restore`;
168
168
  return this.client.request<void>('POST', path);
169
169
  }
170
170
 
171
171
  async compareRevisions(): Promise<void> {
172
- const path = '/compare';
172
+ const path = '/cms/compare';
173
173
  return this.client.request<void>('GET', path);
174
174
  }
175
175
 
@@ -13,63 +13,63 @@ export class IdverificationPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.IDVerificationSessionResponse> {
16
- const path = '/sessions';
16
+ const path = '/verification/sessions';
17
17
  return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
22
  async getVerificationSession(params: { id: string }): Promise<types.IDVerificationSessionResponse> {
23
- const path = `/sessions/${params.id}`;
23
+ const path = `/verification/sessions/${params.id}`;
24
24
  return this.client.request<types.IDVerificationSessionResponse>('GET', path);
25
25
  }
26
26
 
27
27
  async getVerification(params: { id: string }): Promise<types.IDVerificationResponse> {
28
- const path = `/${params.id}`;
28
+ const path = `/verification/${params.id}`;
29
29
  return this.client.request<types.IDVerificationResponse>('GET', path);
30
30
  }
31
31
 
32
32
  async getUserVerifications(): Promise<types.IDVerificationListResponse> {
33
- const path = '/me';
33
+ const path = '/verification/me';
34
34
  return this.client.request<types.IDVerificationListResponse>('GET', path);
35
35
  }
36
36
 
37
37
  async getUserVerificationStatus(): Promise<types.IDVerificationStatusResponse> {
38
- const path = '/me/status';
38
+ const path = '/verification/me/status';
39
39
  return this.client.request<types.IDVerificationStatusResponse>('GET', path);
40
40
  }
41
41
 
42
42
  async requestReverification(request: types.RequestReverification_req): Promise<types.IDVerificationSessionResponse> {
43
- const path = '/me/reverify';
43
+ const path = '/verification/me/reverify';
44
44
  return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
45
45
  body: request,
46
46
  });
47
47
  }
48
48
 
49
49
  async handleWebhook(params: { provider: string }): Promise<types.IDVerificationWebhookResponse> {
50
- const path = `/webhook/${params.provider}`;
50
+ const path = `/verification/webhook/${params.provider}`;
51
51
  return this.client.request<types.IDVerificationWebhookResponse>('POST', path);
52
52
  }
53
53
 
54
54
  async adminBlockUser(params: { userId: string }, request: types.AdminBlockUser_req): Promise<types.IDVerificationStatusResponse> {
55
- const path = `/users/${params.userId}/block`;
55
+ const path = `/verification/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 = `/users/${params.userId}/unblock`;
62
+ const path = `/verification/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 = `/users/${params.userId}/status`;
67
+ const path = `/verification/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 = `/users/${params.userId}/verifications`;
72
+ const path = `/verification/users/${params.userId}/verifications`;
73
73
  return this.client.request<types.IDVerificationListResponse>('GET', path);
74
74
  }
75
75
 
@@ -13,32 +13,32 @@ export class ImpersonationPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async startImpersonation(): Promise<types.ImpersonationStartResponse> {
16
- const path = '/start';
16
+ const path = '/impersonation/start';
17
17
  return this.client.request<types.ImpersonationStartResponse>('POST', path);
18
18
  }
19
19
 
20
20
  async endImpersonation(): Promise<types.ImpersonationEndResponse> {
21
- const path = '/end';
21
+ const path = '/impersonation/end';
22
22
  return this.client.request<types.ImpersonationEndResponse>('POST', path);
23
23
  }
24
24
 
25
25
  async getImpersonation(params: { id: string }): Promise<types.ImpersonationSession> {
26
- const path = `/${params.id}`;
26
+ const path = `/impersonation/${params.id}`;
27
27
  return this.client.request<types.ImpersonationSession>('GET', path);
28
28
  }
29
29
 
30
30
  async listImpersonations(): Promise<types.ImpersonationListResponse> {
31
- const path = '/';
31
+ const path = '/impersonation/';
32
32
  return this.client.request<types.ImpersonationListResponse>('GET', path);
33
33
  }
34
34
 
35
35
  async listAuditEvents(): Promise<types.ImpersonationAuditResponse> {
36
- const path = '/audit';
36
+ const path = '/impersonation/audit';
37
37
  return this.client.request<types.ImpersonationAuditResponse>('GET', path);
38
38
  }
39
39
 
40
40
  async verifyImpersonation(): Promise<types.ImpersonationVerifyResponse> {
41
- const path = '/verify';
41
+ const path = '/impersonation/verify';
42
42
  return this.client.request<types.ImpersonationVerifyResponse>('POST', path);
43
43
  }
44
44
 
@@ -13,33 +13,33 @@ export class JwtPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async createJWTKey(request: types.CreateJWTKeyRequest): Promise<types.JWTKey> {
16
- const path = '/createjwtkey';
16
+ const path = '/jwt/createjwtkey';
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 = '/listjwtkeys';
23
+ const path = '/jwt/listjwtkeys';
24
24
  return this.client.request<types.ListJWTKeysResponse>('GET', path, {
25
25
  query: this.client.toQueryParams(request),
26
26
  });
27
27
  }
28
28
 
29
29
  async getJWKS(): Promise<types.JWKSResponse> {
30
- const path = '/jwks';
30
+ const path = '/jwt/jwks';
31
31
  return this.client.request<types.JWKSResponse>('GET', path);
32
32
  }
33
33
 
34
34
  async generateToken(request: types.GenerateTokenRequest): Promise<types.GenerateTokenResponse> {
35
- const path = '/generate';
35
+ const path = '/jwt/generate';
36
36
  return this.client.request<types.GenerateTokenResponse>('POST', path, {
37
37
  body: request,
38
38
  });
39
39
  }
40
40
 
41
41
  async verifyToken(request: types.VerifyTokenRequest): Promise<types.VerifyTokenResponse> {
42
- const path = '/verify';
42
+ const path = '/jwt/verify';
43
43
  return this.client.request<types.VerifyTokenResponse>('POST', path, {
44
44
  body: request,
45
45
  });
@@ -13,107 +13,107 @@ export class MultiappPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async createApp(): Promise<types.App> {
16
- const path = '/createapp';
16
+ const path = '/apps/createapp';
17
17
  return this.client.request<types.App>('POST', path);
18
18
  }
19
19
 
20
20
  async getApp(params: { appId: string }): Promise<types.App> {
21
- const path = `/${params.appId}`;
21
+ const path = `/apps/${params.appId}`;
22
22
  return this.client.request<types.App>('GET', path);
23
23
  }
24
24
 
25
25
  async updateApp(params: { appId: string }): Promise<types.App> {
26
- const path = `/${params.appId}`;
26
+ const path = `/apps/${params.appId}`;
27
27
  return this.client.request<types.App>('PUT', path);
28
28
  }
29
29
 
30
30
  async deleteApp(params: { appId: string }): Promise<types.MultitenancyStatusResponse> {
31
- const path = `/${params.appId}`;
31
+ const path = `/apps/${params.appId}`;
32
32
  return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
33
33
  }
34
34
 
35
35
  async listApps(): Promise<types.AppsListResponse> {
36
- const path = '/listapps';
36
+ const path = '/apps/listapps';
37
37
  return this.client.request<types.AppsListResponse>('GET', path);
38
38
  }
39
39
 
40
40
  async removeMember(params: { memberId: string }): Promise<types.MultitenancyStatusResponse> {
41
- const path = `/${params.memberId}`;
41
+ const path = `/apps/${params.memberId}`;
42
42
  return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
43
43
  }
44
44
 
45
45
  async listMembers(): Promise<types.MembersListResponse> {
46
- const path = '/listmembers';
46
+ const path = '/apps/listmembers';
47
47
  return this.client.request<types.MembersListResponse>('GET', path);
48
48
  }
49
49
 
50
50
  async inviteMember(request: types.InviteMemberRequest): Promise<types.Invitation> {
51
- const path = '/invite';
51
+ const path = '/apps/invite';
52
52
  return this.client.request<types.Invitation>('POST', path, {
53
53
  body: request,
54
54
  });
55
55
  }
56
56
 
57
57
  async updateMember(params: { memberId: string }, request: types.UpdateMemberRequest): Promise<types.Member> {
58
- const path = `/${params.memberId}`;
58
+ const path = `/apps/${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 = `/${params.token}`;
65
+ const path = `/apps/${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 = `/${params.token}/accept`;
70
+ const path = `/apps/${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 = `/${params.token}/decline`;
75
+ const path = `/apps/${params.token}/decline`;
76
76
  return this.client.request<types.MultitenancyStatusResponse>('POST', path);
77
77
  }
78
78
 
79
79
  async createTeam(request: types.CreateTeamRequest): Promise<types.Team> {
80
- const path = '/createteam';
80
+ const path = '/apps/createteam';
81
81
  return this.client.request<types.Team>('POST', path, {
82
82
  body: request,
83
83
  });
84
84
  }
85
85
 
86
86
  async getTeam(params: { teamId: string }): Promise<types.Team> {
87
- const path = `/${params.teamId}`;
87
+ const path = `/apps/${params.teamId}`;
88
88
  return this.client.request<types.Team>('GET', path);
89
89
  }
90
90
 
91
91
  async updateTeam(params: { teamId: string }, request: types.UpdateTeamRequest): Promise<types.Team> {
92
- const path = `/${params.teamId}`;
92
+ const path = `/apps/${params.teamId}`;
93
93
  return this.client.request<types.Team>('PUT', path, {
94
94
  body: request,
95
95
  });
96
96
  }
97
97
 
98
98
  async deleteTeam(params: { teamId: string }): Promise<types.MultitenancyStatusResponse> {
99
- const path = `/${params.teamId}`;
99
+ const path = `/apps/${params.teamId}`;
100
100
  return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
101
101
  }
102
102
 
103
103
  async listTeams(): Promise<types.TeamsListResponse> {
104
- const path = '/listteams';
104
+ const path = '/apps/listteams';
105
105
  return this.client.request<types.TeamsListResponse>('GET', path);
106
106
  }
107
107
 
108
108
  async addTeamMember(params: { teamId: string }, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse> {
109
- const path = `/${params.teamId}/members`;
109
+ const path = `/apps/${params.teamId}/members`;
110
110
  return this.client.request<types.MultitenancyStatusResponse>('POST', path, {
111
111
  body: request,
112
112
  });
113
113
  }
114
114
 
115
115
  async removeTeamMember(params: { teamId: string; memberId: string }): Promise<types.MultitenancyStatusResponse> {
116
- const path = `/${params.teamId}/members/${params.memberId}`;
116
+ const path = `/apps/${params.teamId}/members/${params.memberId}`;
117
117
  return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
118
118
  }
119
119
 
@@ -13,53 +13,53 @@ export class MultisessionPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async list(request?: types.ListSessionsRequest): Promise<types.ListSessionsResponse> {
16
- const path = '/list';
16
+ const path = '/multi-session/list';
17
17
  return this.client.request<types.ListSessionsResponse>('GET', path, {
18
18
  query: this.client.toQueryParams(request),
19
19
  });
20
20
  }
21
21
 
22
22
  async setActive(request: types.SetActiveRequest): Promise<types.SessionTokenResponse> {
23
- const path = '/set-active';
23
+ const path = '/multi-session/set-active';
24
24
  return this.client.request<types.SessionTokenResponse>('POST', path, {
25
25
  body: request,
26
26
  });
27
27
  }
28
28
 
29
29
  async delete(params: { id: string }): Promise<types.StatusResponse> {
30
- const path = `/delete/${params.id}`;
30
+ const path = `/multi-session/delete/${params.id}`;
31
31
  return this.client.request<types.StatusResponse>('POST', path);
32
32
  }
33
33
 
34
34
  async getCurrent(): Promise<types.SessionTokenResponse> {
35
- const path = '/current';
35
+ const path = '/multi-session/current';
36
36
  return this.client.request<types.SessionTokenResponse>('GET', path);
37
37
  }
38
38
 
39
39
  async getByID(params: { id: string }): Promise<types.SessionTokenResponse> {
40
- const path = `/${params.id}`;
40
+ const path = `/multi-session/${params.id}`;
41
41
  return this.client.request<types.SessionTokenResponse>('GET', path);
42
42
  }
43
43
 
44
44
  async revokeAll(request: types.RevokeAllRequest): Promise<types.RevokeResponse> {
45
- const path = '/revoke-all';
45
+ const path = '/multi-session/revoke-all';
46
46
  return this.client.request<types.RevokeResponse>('POST', path, {
47
47
  body: request,
48
48
  });
49
49
  }
50
50
 
51
51
  async revokeOthers(): Promise<types.RevokeResponse> {
52
- const path = '/revoke-others';
52
+ const path = '/multi-session/revoke-others';
53
53
  return this.client.request<types.RevokeResponse>('POST', path);
54
54
  }
55
55
 
56
56
  async refresh(): Promise<types.SessionTokenResponse> {
57
- const path = '/refresh';
57
+ const path = '/multi-session/refresh';
58
58
  return this.client.request<types.SessionTokenResponse>('POST', path);
59
59
  }
60
60
 
61
61
  async getStats(): Promise<types.SessionStatsResponse> {
62
- const path = '/stats';
62
+ const path = '/multi-session/stats';
63
63
  return this.client.request<types.SessionStatsResponse>('GET', path);
64
64
  }
65
65
 
@@ -13,77 +13,77 @@ export class OidcproviderPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async registerClient(request: types.ClientRegistrationRequest): Promise<types.ClientRegistrationResponse> {
16
- const path = '/register';
16
+ const path = '/oauth2/register';
17
17
  return this.client.request<types.ClientRegistrationResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
22
  async listClients(): Promise<types.ClientsListResponse> {
23
- const path = '/listclients';
23
+ const path = '/oauth2/listclients';
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 = `/${params.clientId}`;
28
+ const path = `/oauth2/${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 = `/${params.clientId}`;
33
+ const path = `/oauth2/${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 = `/${params.clientId}`;
40
+ const path = `/oauth2/${params.clientId}`;
41
41
  return this.client.request<void>('DELETE', path);
42
42
  }
43
43
 
44
44
  async discovery(): Promise<types.DiscoveryResponse> {
45
- const path = '/.well-known/openid-configuration';
45
+ const path = '/oauth2/.well-known/openid-configuration';
46
46
  return this.client.request<types.DiscoveryResponse>('GET', path);
47
47
  }
48
48
 
49
49
  async jWKS(): Promise<types.JWKSResponse> {
50
- const path = '/jwks';
50
+ const path = '/oauth2/jwks';
51
51
  return this.client.request<types.JWKSResponse>('GET', path);
52
52
  }
53
53
 
54
54
  async authorize(): Promise<void> {
55
- const path = '/authorize';
55
+ const path = '/oauth2/authorize';
56
56
  return this.client.request<void>('GET', path);
57
57
  }
58
58
 
59
59
  async handleConsent(request: types.ConsentRequest): Promise<void> {
60
- const path = '/consent';
60
+ const path = '/oauth2/consent';
61
61
  return this.client.request<void>('POST', path, {
62
62
  body: request,
63
63
  });
64
64
  }
65
65
 
66
66
  async token(request: types.TokenRequest): Promise<types.TokenResponse> {
67
- const path = '/token';
67
+ const path = '/oauth2/token';
68
68
  return this.client.request<types.TokenResponse>('POST', path, {
69
69
  body: request,
70
70
  });
71
71
  }
72
72
 
73
73
  async userInfo(): Promise<types.UserInfoResponse> {
74
- const path = '/userinfo';
74
+ const path = '/oauth2/userinfo';
75
75
  return this.client.request<types.UserInfoResponse>('GET', path);
76
76
  }
77
77
 
78
78
  async introspectToken(request: types.TokenIntrospectionRequest): Promise<types.TokenIntrospectionResponse> {
79
- const path = '/introspect';
79
+ const path = '/oauth2/introspect';
80
80
  return this.client.request<types.TokenIntrospectionResponse>('POST', path, {
81
81
  body: request,
82
82
  });
83
83
  }
84
84
 
85
85
  async revokeToken(request: types.TokenRevocationRequest): Promise<types.StatusResponse> {
86
- const path = '/revoke';
86
+ const path = '/oauth2/revoke';
87
87
  return this.client.request<types.StatusResponse>('POST', path, {
88
88
  body: request,
89
89
  });