@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
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@authsome/client",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "TypeScript client for AuthSome authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
- "prepublishOnly": "npm run build",
10
- "publish": "npm publish --access public"
9
+ "prepublishOnly": "npm run build"
11
10
  },
12
11
  "keywords": ["authsome", "authentication", "client"],
13
12
  "author": "",
package/src/client.ts CHANGED
@@ -3,35 +3,35 @@
3
3
  import { ClientPlugin } from './plugin';
4
4
  import { createErrorFromResponse } from './errors';
5
5
  import * as types from './types';
6
- import { AdminPlugin } from './plugins/admin';
7
6
  import { PermissionsPlugin } from './plugins/permissions';
8
- import { WebhookPlugin } from './plugins/webhook';
9
- import { CmsPlugin } from './plugins/cms';
10
- import { EmailverificationPlugin } from './plugins/emailverification';
11
7
  import { IdverificationPlugin } from './plugins/idverification';
12
- import { MagiclinkPlugin } from './plugins/magiclink';
13
- import { NotificationPlugin } from './plugins/notification';
14
8
  import { TwofaPlugin } from './plugins/twofa';
9
+ import { JwtPlugin } from './plugins/jwt';
10
+ import { AdminPlugin } from './plugins/admin';
15
11
  import { ApikeyPlugin } from './plugins/apikey';
16
- import { EmailotpPlugin } from './plugins/emailotp';
12
+ import { EmailverificationPlugin } from './plugins/emailverification';
17
13
  import { BackupauthPlugin } from './plugins/backupauth';
18
- import { CompliancePlugin } from './plugins/compliance';
19
14
  import { StepupPlugin } from './plugins/stepup';
20
- import { MfaPlugin } from './plugins/mfa';
21
15
  import { MultiappPlugin } from './plugins/multiapp';
22
- import { PhonePlugin } from './plugins/phone';
23
16
  import { AnonymousPlugin } from './plugins/anonymous';
24
- import { PasskeyPlugin } from './plugins/passkey';
25
- import { UsernamePlugin } from './plugins/username';
26
17
  import { MultisessionPlugin } from './plugins/multisession';
27
- import { ConsentPlugin } from './plugins/consent';
28
- import { ImpersonationPlugin } from './plugins/impersonation';
18
+ import { NotificationPlugin } from './plugins/notification';
19
+ import { PasskeyPlugin } from './plugins/passkey';
20
+ import { PhonePlugin } from './plugins/phone';
21
+ import { WebhookPlugin } from './plugins/webhook';
22
+ import { SocialPlugin } from './plugins/social';
23
+ import { CmsPlugin } from './plugins/cms';
29
24
  import { OidcproviderPlugin } from './plugins/oidcprovider';
30
25
  import { OrganizationPlugin } from './plugins/organization';
31
26
  import { SsoPlugin } from './plugins/sso';
27
+ import { MagiclinkPlugin } from './plugins/magiclink';
28
+ import { UsernamePlugin } from './plugins/username';
29
+ import { ConsentPlugin } from './plugins/consent';
32
30
  import { SecretsPlugin } from './plugins/secrets';
33
- import { SocialPlugin } from './plugins/social';
34
- import { JwtPlugin } from './plugins/jwt';
31
+ import { ImpersonationPlugin } from './plugins/impersonation';
32
+ import { EmailotpPlugin } from './plugins/emailotp';
33
+ import { CompliancePlugin } from './plugins/compliance';
34
+ import { MfaPlugin } from './plugins/mfa';
35
35
 
36
36
  /**
37
37
  * AuthSome client configuration
@@ -163,35 +163,35 @@ export class AuthsomeClient {
163
163
  }
164
164
 
165
165
  public readonly $plugins = {
166
- admin: (): AdminPlugin | undefined => this.getPlugin<AdminPlugin>('admin'),
167
166
  permissions: (): PermissionsPlugin | undefined => this.getPlugin<PermissionsPlugin>('permissions'),
168
- webhook: (): WebhookPlugin | undefined => this.getPlugin<WebhookPlugin>('webhook'),
169
- cms: (): CmsPlugin | undefined => this.getPlugin<CmsPlugin>('cms'),
170
- emailverification: (): EmailverificationPlugin | undefined => this.getPlugin<EmailverificationPlugin>('emailverification'),
171
167
  idverification: (): IdverificationPlugin | undefined => this.getPlugin<IdverificationPlugin>('idverification'),
172
- magiclink: (): MagiclinkPlugin | undefined => this.getPlugin<MagiclinkPlugin>('magiclink'),
173
- notification: (): NotificationPlugin | undefined => this.getPlugin<NotificationPlugin>('notification'),
174
168
  twofa: (): TwofaPlugin | undefined => this.getPlugin<TwofaPlugin>('twofa'),
169
+ jwt: (): JwtPlugin | undefined => this.getPlugin<JwtPlugin>('jwt'),
170
+ admin: (): AdminPlugin | undefined => this.getPlugin<AdminPlugin>('admin'),
175
171
  apikey: (): ApikeyPlugin | undefined => this.getPlugin<ApikeyPlugin>('apikey'),
176
- emailotp: (): EmailotpPlugin | undefined => this.getPlugin<EmailotpPlugin>('emailotp'),
172
+ emailverification: (): EmailverificationPlugin | undefined => this.getPlugin<EmailverificationPlugin>('emailverification'),
177
173
  backupauth: (): BackupauthPlugin | undefined => this.getPlugin<BackupauthPlugin>('backupauth'),
178
- compliance: (): CompliancePlugin | undefined => this.getPlugin<CompliancePlugin>('compliance'),
179
174
  stepup: (): StepupPlugin | undefined => this.getPlugin<StepupPlugin>('stepup'),
180
- mfa: (): MfaPlugin | undefined => this.getPlugin<MfaPlugin>('mfa'),
181
175
  multiapp: (): MultiappPlugin | undefined => this.getPlugin<MultiappPlugin>('multiapp'),
182
- phone: (): PhonePlugin | undefined => this.getPlugin<PhonePlugin>('phone'),
183
176
  anonymous: (): AnonymousPlugin | undefined => this.getPlugin<AnonymousPlugin>('anonymous'),
184
- passkey: (): PasskeyPlugin | undefined => this.getPlugin<PasskeyPlugin>('passkey'),
185
- username: (): UsernamePlugin | undefined => this.getPlugin<UsernamePlugin>('username'),
186
177
  multisession: (): MultisessionPlugin | undefined => this.getPlugin<MultisessionPlugin>('multisession'),
187
- consent: (): ConsentPlugin | undefined => this.getPlugin<ConsentPlugin>('consent'),
188
- impersonation: (): ImpersonationPlugin | undefined => this.getPlugin<ImpersonationPlugin>('impersonation'),
178
+ notification: (): NotificationPlugin | undefined => this.getPlugin<NotificationPlugin>('notification'),
179
+ passkey: (): PasskeyPlugin | undefined => this.getPlugin<PasskeyPlugin>('passkey'),
180
+ phone: (): PhonePlugin | undefined => this.getPlugin<PhonePlugin>('phone'),
181
+ webhook: (): WebhookPlugin | undefined => this.getPlugin<WebhookPlugin>('webhook'),
182
+ social: (): SocialPlugin | undefined => this.getPlugin<SocialPlugin>('social'),
183
+ cms: (): CmsPlugin | undefined => this.getPlugin<CmsPlugin>('cms'),
189
184
  oidcprovider: (): OidcproviderPlugin | undefined => this.getPlugin<OidcproviderPlugin>('oidcprovider'),
190
185
  organization: (): OrganizationPlugin | undefined => this.getPlugin<OrganizationPlugin>('organization'),
191
186
  sso: (): SsoPlugin | undefined => this.getPlugin<SsoPlugin>('sso'),
187
+ magiclink: (): MagiclinkPlugin | undefined => this.getPlugin<MagiclinkPlugin>('magiclink'),
188
+ username: (): UsernamePlugin | undefined => this.getPlugin<UsernamePlugin>('username'),
189
+ consent: (): ConsentPlugin | undefined => this.getPlugin<ConsentPlugin>('consent'),
192
190
  secrets: (): SecretsPlugin | undefined => this.getPlugin<SecretsPlugin>('secrets'),
193
- social: (): SocialPlugin | undefined => this.getPlugin<SocialPlugin>('social'),
194
- jwt: (): JwtPlugin | undefined => this.getPlugin<JwtPlugin>('jwt'),
191
+ impersonation: (): ImpersonationPlugin | undefined => this.getPlugin<ImpersonationPlugin>('impersonation'),
192
+ emailotp: (): EmailotpPlugin | undefined => this.getPlugin<EmailotpPlugin>('emailotp'),
193
+ compliance: (): CompliancePlugin | undefined => this.getPlugin<CompliancePlugin>('compliance'),
194
+ mfa: (): MfaPlugin | undefined => this.getPlugin<MfaPlugin>('mfa'),
195
195
  };
196
196
 
197
197
  public async request<T>(
@@ -246,9 +246,9 @@ export class AuthsomeClient {
246
246
  });
247
247
  }
248
248
 
249
- async signIn(request: { email: string; password: string }): Promise<{ user: types.User; session: types.Session; requiresTwoFactor: boolean }> {
249
+ async signIn(request: { email: string; password: string }): Promise<{ requiresTwoFactor: boolean; user: types.User; session: types.Session }> {
250
250
  const path = '/signin';
251
- return this.request<{ user: types.User; session: types.Session; requiresTwoFactor: boolean }>('POST', path, {
251
+ return this.request<{ requiresTwoFactor: boolean; user: types.User; session: types.Session }>('POST', path, {
252
252
  body: request,
253
253
  });
254
254
  }
@@ -267,7 +267,7 @@ export class AuthsomeClient {
267
267
  });
268
268
  }
269
269
 
270
- async updateUser(request: { email?: string; name?: string }): Promise<{ user: types.User }> {
270
+ async updateUser(request: { name?: string; email?: string }): Promise<{ user: types.User }> {
271
271
  const path = '/user/update';
272
272
  return this.request<{ user: types.User }>('POST', path, {
273
273
  body: request,
@@ -290,7 +290,7 @@ export class AuthsomeClient {
290
290
  });
291
291
  }
292
292
 
293
- async refreshSession(request: { refreshToken: string }): Promise<{ expiresAt: string; refreshExpiresAt: string; session: any; accessToken: string; refreshToken: string }> {
293
+ async refreshSession(request: { refreshToken: string }): Promise<{ session: any; accessToken: string; refreshToken: string; expiresAt: string; refreshExpiresAt: string }> {
294
294
  const path = '/refresh';
295
295
  return this.request<{ session: any; accessToken: string; refreshToken: string; expiresAt: string; refreshExpiresAt: string }>('POST', path, {
296
296
  body: request,
package/src/index.ts CHANGED
@@ -6,32 +6,32 @@ export * from './types';
6
6
  export * from './errors';
7
7
 
8
8
  // Plugin exports
9
- export { AdminPlugin, adminClient } from './plugins/admin';
10
9
  export { PermissionsPlugin, permissionsClient } from './plugins/permissions';
11
- export { WebhookPlugin, webhookClient } from './plugins/webhook';
12
- export { CmsPlugin, cmsClient } from './plugins/cms';
13
- export { EmailverificationPlugin, emailverificationClient } from './plugins/emailverification';
14
10
  export { IdverificationPlugin, idverificationClient } from './plugins/idverification';
15
- export { MagiclinkPlugin, magiclinkClient } from './plugins/magiclink';
16
- export { NotificationPlugin, notificationClient } from './plugins/notification';
17
11
  export { TwofaPlugin, twofaClient } from './plugins/twofa';
12
+ export { JwtPlugin, jwtClient } from './plugins/jwt';
13
+ export { AdminPlugin, adminClient } from './plugins/admin';
18
14
  export { ApikeyPlugin, apikeyClient } from './plugins/apikey';
19
- export { EmailotpPlugin, emailotpClient } from './plugins/emailotp';
15
+ export { EmailverificationPlugin, emailverificationClient } from './plugins/emailverification';
20
16
  export { BackupauthPlugin, backupauthClient } from './plugins/backupauth';
21
- export { CompliancePlugin, complianceClient } from './plugins/compliance';
22
17
  export { StepupPlugin, stepupClient } from './plugins/stepup';
23
- export { MfaPlugin, mfaClient } from './plugins/mfa';
24
18
  export { MultiappPlugin, multiappClient } from './plugins/multiapp';
25
- export { PhonePlugin, phoneClient } from './plugins/phone';
26
19
  export { AnonymousPlugin, anonymousClient } from './plugins/anonymous';
27
- export { PasskeyPlugin, passkeyClient } from './plugins/passkey';
28
- export { UsernamePlugin, usernameClient } from './plugins/username';
29
20
  export { MultisessionPlugin, multisessionClient } from './plugins/multisession';
30
- export { ConsentPlugin, consentClient } from './plugins/consent';
31
- export { ImpersonationPlugin, impersonationClient } from './plugins/impersonation';
21
+ export { NotificationPlugin, notificationClient } from './plugins/notification';
22
+ export { PasskeyPlugin, passkeyClient } from './plugins/passkey';
23
+ export { PhonePlugin, phoneClient } from './plugins/phone';
24
+ export { WebhookPlugin, webhookClient } from './plugins/webhook';
25
+ export { SocialPlugin, socialClient } from './plugins/social';
26
+ export { CmsPlugin, cmsClient } from './plugins/cms';
32
27
  export { OidcproviderPlugin, oidcproviderClient } from './plugins/oidcprovider';
33
28
  export { OrganizationPlugin, organizationClient } from './plugins/organization';
34
29
  export { SsoPlugin, ssoClient } from './plugins/sso';
30
+ export { MagiclinkPlugin, magiclinkClient } from './plugins/magiclink';
31
+ export { UsernamePlugin, usernameClient } from './plugins/username';
32
+ export { ConsentPlugin, consentClient } from './plugins/consent';
35
33
  export { SecretsPlugin, secretsClient } from './plugins/secrets';
36
- export { SocialPlugin, socialClient } from './plugins/social';
37
- export { JwtPlugin, jwtClient } from './plugins/jwt';
34
+ export { ImpersonationPlugin, impersonationClient } from './plugins/impersonation';
35
+ export { EmailotpPlugin, emailotpClient } from './plugins/emailotp';
36
+ export { CompliancePlugin, complianceClient } from './plugins/compliance';
37
+ export { MfaPlugin, mfaClient } from './plugins/mfa';
@@ -13,21 +13,14 @@ export class ApikeyPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async createAPIKey(request: types.CreateAPIKeyRequest): Promise<types.CreateAPIKeyResponse> {
16
- const path = '/api-keys/createapikey';
16
+ const path = '/api-keys';
17
17
  return this.client.request<types.CreateAPIKeyResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
- async rotateAPIKey(params: { id: string }, request: types.RotateAPIKeyRequest): Promise<types.RotateAPIKeyResponse> {
23
- const path = `/api-keys/${params.id}/rotate`;
24
- return this.client.request<types.RotateAPIKeyResponse>('POST', path, {
25
- body: request,
26
- });
27
- }
28
-
29
22
  async listAPIKeys(request?: types.ListAPIKeysRequest): Promise<types.ListAPIKeysResponse> {
30
- const path = '/api-keys/listapikeys';
23
+ const path = '/api-keys';
31
24
  return this.client.request<types.ListAPIKeysResponse>('GET', path, {
32
25
  query: this.client.toQueryParams(request),
33
26
  });
@@ -54,6 +47,13 @@ export class ApikeyPlugin implements ClientPlugin {
54
47
  });
55
48
  }
56
49
 
50
+ async rotateAPIKey(params: { id: string }, request: types.RotateAPIKeyRequest): Promise<types.RotateAPIKeyResponse> {
51
+ const path = `/api-keys/${params.id}/rotate`;
52
+ return this.client.request<types.RotateAPIKeyResponse>('POST', path, {
53
+ body: request,
54
+ });
55
+ }
56
+
57
57
  async verifyAPIKey(request: types.VerifyAPIKeyRequest): Promise<types.VerifyAPIKeyResponse> {
58
58
  const path = '/api-keys/verify';
59
59
  return this.client.request<types.VerifyAPIKeyResponse>('POST', path, {
@@ -13,148 +13,148 @@ export class BackupauthPlugin implements ClientPlugin {
13
13
  }
14
14
 
15
15
  async startRecovery(request: types.StartRecoveryRequest): Promise<types.BackupAuthRecoveryResponse> {
16
- const path = '/admin/recovery/start';
16
+ const path = '/recovery/start';
17
17
  return this.client.request<types.BackupAuthRecoveryResponse>('POST', path, {
18
18
  body: request,
19
19
  });
20
20
  }
21
21
 
22
22
  async continueRecovery(request: types.ContinueRecoveryRequest): Promise<types.BackupAuthRecoveryResponse> {
23
- const path = '/admin/recovery/continue';
23
+ const path = '/recovery/continue';
24
24
  return this.client.request<types.BackupAuthRecoveryResponse>('POST', path, {
25
25
  body: request,
26
26
  });
27
27
  }
28
28
 
29
29
  async completeRecovery(request: types.CompleteRecoveryRequest): Promise<types.BackupAuthStatusResponse> {
30
- const path = '/admin/recovery/complete';
30
+ const path = '/recovery/complete';
31
31
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
32
32
  body: request,
33
33
  });
34
34
  }
35
35
 
36
36
  async cancelRecovery(request: types.CancelRecoveryRequest): Promise<types.BackupAuthStatusResponse> {
37
- const path = '/admin/recovery/cancel';
37
+ const path = '/recovery/cancel';
38
38
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
39
39
  body: request,
40
40
  });
41
41
  }
42
42
 
43
43
  async generateRecoveryCodes(request: types.GenerateRecoveryCodesRequest): Promise<types.BackupAuthCodesResponse> {
44
- const path = '/admin/recovery-codes/generate';
44
+ const path = '/recovery-codes/generate';
45
45
  return this.client.request<types.BackupAuthCodesResponse>('POST', path, {
46
46
  body: request,
47
47
  });
48
48
  }
49
49
 
50
50
  async verifyRecoveryCode(request: types.VerifyRecoveryCodeRequest): Promise<types.BackupAuthStatusResponse> {
51
- const path = '/admin/recovery-codes/verify';
51
+ const path = '/recovery-codes/verify';
52
52
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
53
53
  body: request,
54
54
  });
55
55
  }
56
56
 
57
57
  async setupSecurityQuestions(request: types.SetupSecurityQuestionsRequest): Promise<types.BackupAuthStatusResponse> {
58
- const path = '/admin/security-questions/setup';
58
+ const path = '/security-questions/setup';
59
59
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
60
60
  body: request,
61
61
  });
62
62
  }
63
63
 
64
64
  async getSecurityQuestions(request: types.GetSecurityQuestionsRequest): Promise<types.BackupAuthQuestionsResponse> {
65
- const path = '/admin/security-questions/get';
65
+ const path = '/security-questions/get';
66
66
  return this.client.request<types.BackupAuthQuestionsResponse>('POST', path, {
67
67
  body: request,
68
68
  });
69
69
  }
70
70
 
71
71
  async verifySecurityAnswers(request: types.VerifySecurityAnswersRequest): Promise<types.BackupAuthStatusResponse> {
72
- const path = '/admin/security-questions/verify';
72
+ const path = '/security-questions/verify';
73
73
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
74
74
  body: request,
75
75
  });
76
76
  }
77
77
 
78
78
  async addTrustedContact(request: types.AddTrustedContactRequest): Promise<types.BackupAuthContactResponse> {
79
- const path = '/admin/trusted-contacts/add';
79
+ const path = '/trusted-contacts/add';
80
80
  return this.client.request<types.BackupAuthContactResponse>('POST', path, {
81
81
  body: request,
82
82
  });
83
83
  }
84
84
 
85
85
  async listTrustedContacts(): Promise<types.BackupAuthContactsResponse> {
86
- const path = '/admin/trusted-contacts';
86
+ const path = '/trusted-contacts';
87
87
  return this.client.request<types.BackupAuthContactsResponse>('GET', path);
88
88
  }
89
89
 
90
90
  async verifyTrustedContact(request: types.VerifyTrustedContactRequest): Promise<types.BackupAuthStatusResponse> {
91
- const path = '/admin/trusted-contacts/verify';
91
+ const path = '/trusted-contacts/verify';
92
92
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
93
93
  body: request,
94
94
  });
95
95
  }
96
96
 
97
97
  async requestTrustedContactVerification(request: types.RequestTrustedContactVerificationRequest): Promise<types.BackupAuthStatusResponse> {
98
- const path = '/admin/trusted-contacts/request-verification';
98
+ const path = '/trusted-contacts/request-verification';
99
99
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
100
100
  body: request,
101
101
  });
102
102
  }
103
103
 
104
104
  async removeTrustedContact(params: { id: string }): Promise<types.BackupAuthStatusResponse> {
105
- const path = `/admin/trusted-contacts/${params.id}`;
105
+ const path = `/trusted-contacts/${params.id}`;
106
106
  return this.client.request<types.BackupAuthStatusResponse>('DELETE', path);
107
107
  }
108
108
 
109
109
  async sendVerificationCode(request: types.SendVerificationCodeRequest): Promise<types.BackupAuthStatusResponse> {
110
- const path = '/admin/verification/send';
110
+ const path = '/verification/send';
111
111
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
112
112
  body: request,
113
113
  });
114
114
  }
115
115
 
116
116
  async verifyCode(request: types.VerifyCodeRequest): Promise<types.BackupAuthStatusResponse> {
117
- const path = '/admin/verification/verify';
117
+ const path = '/verification/verify';
118
118
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
119
119
  body: request,
120
120
  });
121
121
  }
122
122
 
123
123
  async scheduleVideoSession(request: types.ScheduleVideoSessionRequest): Promise<types.BackupAuthVideoResponse> {
124
- const path = '/admin/video/schedule';
124
+ const path = '/video/schedule';
125
125
  return this.client.request<types.BackupAuthVideoResponse>('POST', path, {
126
126
  body: request,
127
127
  });
128
128
  }
129
129
 
130
130
  async startVideoSession(request: types.StartVideoSessionRequest): Promise<types.BackupAuthVideoResponse> {
131
- const path = '/admin/video/start';
131
+ const path = '/video/start';
132
132
  return this.client.request<types.BackupAuthVideoResponse>('POST', path, {
133
133
  body: request,
134
134
  });
135
135
  }
136
136
 
137
137
  async completeVideoSession(request: types.CompleteVideoSessionRequest): Promise<types.BackupAuthStatusResponse> {
138
- const path = '/admin/video/complete';
138
+ const path = '/video/complete';
139
139
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
140
140
  body: request,
141
141
  });
142
142
  }
143
143
 
144
144
  async uploadDocument(request: types.UploadDocumentRequest): Promise<types.BackupAuthDocumentResponse> {
145
- const path = '/admin/documents/upload';
145
+ const path = '/documents/upload';
146
146
  return this.client.request<types.BackupAuthDocumentResponse>('POST', path, {
147
147
  body: request,
148
148
  });
149
149
  }
150
150
 
151
151
  async getDocumentVerification(params: { id: string }): Promise<types.BackupAuthDocumentResponse> {
152
- const path = `/admin/documents/${params.id}`;
152
+ const path = `/documents/${params.id}`;
153
153
  return this.client.request<types.BackupAuthDocumentResponse>('GET', path);
154
154
  }
155
155
 
156
156
  async reviewDocument(params: { id: string }, request: types.ReviewDocumentRequest): Promise<types.BackupAuthStatusResponse> {
157
- const path = `/admin/documents/${params.id}/review`;
157
+ const path = `/documents/${params.id}/review`;
158
158
  return this.client.request<types.BackupAuthStatusResponse>('POST', path, {
159
159
  body: request,
160
160
  });
@@ -197,7 +197,7 @@ export class BackupauthPlugin implements ClientPlugin {
197
197
  }
198
198
 
199
199
  async healthCheck(): Promise<void> {
200
- const path = '/admin/health';
200
+ const path = '/health';
201
201
  return this.client.request<void>('GET', path);
202
202
  }
203
203
 
@@ -12,137 +12,137 @@ export class CmsPlugin implements ClientPlugin {
12
12
  this.client = client;
13
13
  }
14
14
 
15
- async listEntries(): Promise<void> {
16
- const path = '/cms/listentries';
15
+ async listEntries(params: { typeSlug: string }): Promise<void> {
16
+ const path = `/cms/${params.typeSlug}`;
17
17
  return this.client.request<void>('GET', path);
18
18
  }
19
19
 
20
- async createEntry(request: types.CreateEntryRequest): Promise<void> {
21
- const path = '/cms/createentry';
20
+ async createEntry(params: { typeSlug: string }, request: types.CreateEntryRequest): Promise<void> {
21
+ const path = `/cms/${params.typeSlug}`;
22
22
  return this.client.request<void>('POST', path, {
23
23
  body: request,
24
24
  });
25
25
  }
26
26
 
27
- async getEntry(): Promise<void> {
28
- const path = '/cms/getentry';
27
+ async getEntry(params: { entryId: string; typeSlug: string }): Promise<void> {
28
+ const path = `/cms/${params.typeSlug}/${params.entryId}`;
29
29
  return this.client.request<void>('GET', path);
30
30
  }
31
31
 
32
- async updateEntry(request: types.UpdateEntryRequest): Promise<void> {
33
- const path = '/cms/updateentry';
32
+ async updateEntry(params: { typeSlug: string; entryId: string }, request: types.UpdateEntryRequest): Promise<void> {
33
+ const path = `/cms/${params.typeSlug}/${params.entryId}`;
34
34
  return this.client.request<void>('PUT', path, {
35
35
  body: request,
36
36
  });
37
37
  }
38
38
 
39
- async deleteEntry(): Promise<void> {
40
- const path = '/cms/deleteentry';
39
+ async deleteEntry(params: { typeSlug: string; entryId: string }): Promise<void> {
40
+ const path = `/cms/${params.typeSlug}/${params.entryId}`;
41
41
  return this.client.request<void>('DELETE', path);
42
42
  }
43
43
 
44
- async publishEntry(request: types.PublishEntryRequest): Promise<void> {
45
- const path = '/cms/publish';
44
+ async publishEntry(params: { typeSlug: string; entryId: string }, request: types.PublishEntryRequest): Promise<void> {
45
+ const path = `/cms/${params.typeSlug}/${params.entryId}/publish`;
46
46
  return this.client.request<void>('POST', path, {
47
47
  body: request,
48
48
  });
49
49
  }
50
50
 
51
- async unpublishEntry(): Promise<void> {
52
- const path = '/cms/unpublish';
51
+ async unpublishEntry(params: { typeSlug: string; entryId: string }): Promise<void> {
52
+ const path = `/cms/${params.typeSlug}/${params.entryId}/unpublish`;
53
53
  return this.client.request<void>('POST', path);
54
54
  }
55
55
 
56
- async archiveEntry(): Promise<void> {
57
- const path = '/cms/archive';
56
+ async archiveEntry(params: { typeSlug: string; entryId: string }): Promise<void> {
57
+ const path = `/cms/${params.typeSlug}/${params.entryId}/archive`;
58
58
  return this.client.request<void>('POST', path);
59
59
  }
60
60
 
61
- async queryEntries(): Promise<void> {
62
- const path = '/cms/query';
61
+ async queryEntries(params: { typeSlug: string }): Promise<void> {
62
+ const path = `/cms/${params.typeSlug}/query`;
63
63
  return this.client.request<void>('POST', path);
64
64
  }
65
65
 
66
- async bulkPublish(): Promise<void> {
67
- const path = '/cms/publish';
66
+ async bulkPublish(params: { typeSlug: string }): Promise<void> {
67
+ const path = `/cms/${params.typeSlug}/bulk/publish`;
68
68
  return this.client.request<void>('POST', path);
69
69
  }
70
70
 
71
- async bulkUnpublish(): Promise<void> {
72
- const path = '/cms/unpublish';
71
+ async bulkUnpublish(params: { typeSlug: string }): Promise<void> {
72
+ const path = `/cms/${params.typeSlug}/bulk/unpublish`;
73
73
  return this.client.request<void>('POST', path);
74
74
  }
75
75
 
76
- async bulkDelete(): Promise<void> {
77
- const path = '/cms/delete';
76
+ async bulkDelete(params: { typeSlug: string }): Promise<void> {
77
+ const path = `/cms/${params.typeSlug}/bulk/delete`;
78
78
  return this.client.request<void>('POST', path);
79
79
  }
80
80
 
81
- async getEntryStats(): Promise<void> {
82
- const path = '/cms/stats';
81
+ async getEntryStats(params: { typeSlug: string }): Promise<void> {
82
+ const path = `/cms/${params.typeSlug}/stats`;
83
83
  return this.client.request<void>('GET', path);
84
84
  }
85
85
 
86
86
  async listContentTypes(): Promise<void> {
87
- const path = '/cms/listcontenttypes';
87
+ const path = '/cms/types';
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 = '/cms/createcontenttype';
92
+ const path = '/cms/types';
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 = `/cms/${params.slug}`;
99
+ const path = `/cms/types/${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 = `/cms/${params.slug}`;
104
+ const path = `/cms/types/${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 = `/cms/${params.slug}`;
111
+ const path = `/cms/types/${params.slug}`;
112
112
  return this.client.request<void>('DELETE', path);
113
113
  }
114
114
 
115
- async listFields(): Promise<void> {
116
- const path = '/cms/listfields';
115
+ async listFields(params: { slug: string }): Promise<void> {
116
+ const path = `/cms/types/${params.slug}/fields`;
117
117
  return this.client.request<void>('GET', path);
118
118
  }
119
119
 
120
- async addField(request: types.CreateFieldRequest): Promise<void> {
121
- const path = '/cms/addfield';
120
+ async addField(params: { slug: string }, request: types.CreateFieldRequest): Promise<void> {
121
+ const path = `/cms/types/${params.slug}/fields`;
122
122
  return this.client.request<void>('POST', path, {
123
123
  body: request,
124
124
  });
125
125
  }
126
126
 
127
- async getField(params: { fieldSlug: string }): Promise<void> {
128
- const path = `/cms/${params.fieldSlug}`;
127
+ async getField(params: { slug: string; fieldSlug: string }): Promise<void> {
128
+ const path = `/cms/types/${params.slug}/fields/${params.fieldSlug}`;
129
129
  return this.client.request<void>('GET', path);
130
130
  }
131
131
 
132
- async updateField(params: { fieldSlug: string }, request: types.UpdateFieldRequest): Promise<void> {
133
- const path = `/cms/${params.fieldSlug}`;
132
+ async updateField(params: { slug: string; fieldSlug: string }, request: types.UpdateFieldRequest): Promise<void> {
133
+ const path = `/cms/types/${params.slug}/fields/${params.fieldSlug}`;
134
134
  return this.client.request<void>('PUT', path, {
135
135
  body: request,
136
136
  });
137
137
  }
138
138
 
139
- async deleteField(params: { fieldSlug: string }): Promise<void> {
140
- const path = `/cms/${params.fieldSlug}`;
139
+ async deleteField(params: { slug: string; fieldSlug: string }): Promise<void> {
140
+ const path = `/cms/types/${params.slug}/fields/${params.fieldSlug}`;
141
141
  return this.client.request<void>('DELETE', path);
142
142
  }
143
143
 
144
- async reorderFields(request: types.ReorderFieldsRequest): Promise<void> {
145
- const path = '/cms/reorder';
144
+ async reorderFields(params: { slug: string }, request: types.ReorderFieldsRequest): Promise<void> {
145
+ const path = `/cms/types/${params.slug}/fields/reorder`;
146
146
  return this.client.request<void>('POST', path, {
147
147
  body: request,
148
148
  });
@@ -153,23 +153,23 @@ export class CmsPlugin implements ClientPlugin {
153
153
  return this.client.request<void>('GET', path);
154
154
  }
155
155
 
156
- async listRevisions(): Promise<void> {
157
- const path = '/cms/listrevisions';
156
+ async listRevisions(params: { typeSlug: string; entryId: string }): Promise<void> {
157
+ const path = `/cms/${params.typeSlug}/${params.entryId}/revisions`;
158
158
  return this.client.request<void>('GET', path);
159
159
  }
160
160
 
161
- async getRevision(params: { version: number }): Promise<void> {
162
- const path = `/cms/${params.version}`;
161
+ async getRevision(params: { typeSlug: string; entryId: string; version: number }): Promise<void> {
162
+ const path = `/cms/${params.typeSlug}/${params.entryId}/revisions/${params.version}`;
163
163
  return this.client.request<void>('GET', path);
164
164
  }
165
165
 
166
- async restoreRevision(params: { version: number }): Promise<void> {
167
- const path = `/cms/${params.version}/restore`;
166
+ async restoreRevision(params: { entryId: string; version: number; typeSlug: string }): Promise<void> {
167
+ const path = `/cms/${params.typeSlug}/${params.entryId}/revisions/${params.version}/restore`;
168
168
  return this.client.request<void>('POST', path);
169
169
  }
170
170
 
171
- async compareRevisions(): Promise<void> {
172
- const path = '/cms/compare';
171
+ async compareRevisions(params: { typeSlug: string; entryId: string }): Promise<void> {
172
+ const path = `/cms/${params.typeSlug}/${params.entryId}/revisions/compare`;
173
173
  return this.client.request<void>('GET', path);
174
174
  }
175
175