@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/dist/client.d.ts CHANGED
@@ -1,34 +1,34 @@
1
1
  import { ClientPlugin } from './plugin';
2
2
  import * as types from './types';
3
- import { AdminPlugin } from './plugins/admin';
4
3
  import { PermissionsPlugin } from './plugins/permissions';
5
- import { WebhookPlugin } from './plugins/webhook';
6
- import { CmsPlugin } from './plugins/cms';
7
- import { EmailverificationPlugin } from './plugins/emailverification';
8
4
  import { IdverificationPlugin } from './plugins/idverification';
9
- import { MagiclinkPlugin } from './plugins/magiclink';
10
- import { NotificationPlugin } from './plugins/notification';
11
5
  import { TwofaPlugin } from './plugins/twofa';
6
+ import { JwtPlugin } from './plugins/jwt';
7
+ import { AdminPlugin } from './plugins/admin';
12
8
  import { ApikeyPlugin } from './plugins/apikey';
13
- import { EmailotpPlugin } from './plugins/emailotp';
9
+ import { EmailverificationPlugin } from './plugins/emailverification';
14
10
  import { BackupauthPlugin } from './plugins/backupauth';
15
- import { CompliancePlugin } from './plugins/compliance';
16
11
  import { StepupPlugin } from './plugins/stepup';
17
- import { MfaPlugin } from './plugins/mfa';
18
12
  import { MultiappPlugin } from './plugins/multiapp';
19
- import { PhonePlugin } from './plugins/phone';
20
13
  import { AnonymousPlugin } from './plugins/anonymous';
21
- import { PasskeyPlugin } from './plugins/passkey';
22
- import { UsernamePlugin } from './plugins/username';
23
14
  import { MultisessionPlugin } from './plugins/multisession';
24
- import { ConsentPlugin } from './plugins/consent';
25
- import { ImpersonationPlugin } from './plugins/impersonation';
15
+ import { NotificationPlugin } from './plugins/notification';
16
+ import { PasskeyPlugin } from './plugins/passkey';
17
+ import { PhonePlugin } from './plugins/phone';
18
+ import { WebhookPlugin } from './plugins/webhook';
19
+ import { SocialPlugin } from './plugins/social';
20
+ import { CmsPlugin } from './plugins/cms';
26
21
  import { OidcproviderPlugin } from './plugins/oidcprovider';
27
22
  import { OrganizationPlugin } from './plugins/organization';
28
23
  import { SsoPlugin } from './plugins/sso';
24
+ import { MagiclinkPlugin } from './plugins/magiclink';
25
+ import { UsernamePlugin } from './plugins/username';
26
+ import { ConsentPlugin } from './plugins/consent';
29
27
  import { SecretsPlugin } from './plugins/secrets';
30
- import { SocialPlugin } from './plugins/social';
31
- import { JwtPlugin } from './plugins/jwt';
28
+ import { ImpersonationPlugin } from './plugins/impersonation';
29
+ import { EmailotpPlugin } from './plugins/emailotp';
30
+ import { CompliancePlugin } from './plugins/compliance';
31
+ import { MfaPlugin } from './plugins/mfa';
32
32
  /**
33
33
  * AuthSome client configuration
34
34
  * Supports multiple authentication methods that can be used simultaneously:
@@ -90,35 +90,35 @@ export declare class AuthsomeClient {
90
90
  setGlobalHeaders(headers: Record<string, string>, replace?: boolean): void;
91
91
  getPlugin<T extends ClientPlugin>(id: string): T | undefined;
92
92
  readonly $plugins: {
93
- admin: () => AdminPlugin | undefined;
94
93
  permissions: () => PermissionsPlugin | undefined;
95
- webhook: () => WebhookPlugin | undefined;
96
- cms: () => CmsPlugin | undefined;
97
- emailverification: () => EmailverificationPlugin | undefined;
98
94
  idverification: () => IdverificationPlugin | undefined;
99
- magiclink: () => MagiclinkPlugin | undefined;
100
- notification: () => NotificationPlugin | undefined;
101
95
  twofa: () => TwofaPlugin | undefined;
96
+ jwt: () => JwtPlugin | undefined;
97
+ admin: () => AdminPlugin | undefined;
102
98
  apikey: () => ApikeyPlugin | undefined;
103
- emailotp: () => EmailotpPlugin | undefined;
99
+ emailverification: () => EmailverificationPlugin | undefined;
104
100
  backupauth: () => BackupauthPlugin | undefined;
105
- compliance: () => CompliancePlugin | undefined;
106
101
  stepup: () => StepupPlugin | undefined;
107
- mfa: () => MfaPlugin | undefined;
108
102
  multiapp: () => MultiappPlugin | undefined;
109
- phone: () => PhonePlugin | undefined;
110
103
  anonymous: () => AnonymousPlugin | undefined;
111
- passkey: () => PasskeyPlugin | undefined;
112
- username: () => UsernamePlugin | undefined;
113
104
  multisession: () => MultisessionPlugin | undefined;
114
- consent: () => ConsentPlugin | undefined;
115
- impersonation: () => ImpersonationPlugin | undefined;
105
+ notification: () => NotificationPlugin | undefined;
106
+ passkey: () => PasskeyPlugin | undefined;
107
+ phone: () => PhonePlugin | undefined;
108
+ webhook: () => WebhookPlugin | undefined;
109
+ social: () => SocialPlugin | undefined;
110
+ cms: () => CmsPlugin | undefined;
116
111
  oidcprovider: () => OidcproviderPlugin | undefined;
117
112
  organization: () => OrganizationPlugin | undefined;
118
113
  sso: () => SsoPlugin | undefined;
114
+ magiclink: () => MagiclinkPlugin | undefined;
115
+ username: () => UsernamePlugin | undefined;
116
+ consent: () => ConsentPlugin | undefined;
119
117
  secrets: () => SecretsPlugin | undefined;
120
- social: () => SocialPlugin | undefined;
121
- jwt: () => JwtPlugin | undefined;
118
+ impersonation: () => ImpersonationPlugin | undefined;
119
+ emailotp: () => EmailotpPlugin | undefined;
120
+ compliance: () => CompliancePlugin | undefined;
121
+ mfa: () => MfaPlugin | undefined;
122
122
  };
123
123
  request<T>(method: string, path: string, options?: {
124
124
  body?: any;
@@ -137,9 +137,9 @@ export declare class AuthsomeClient {
137
137
  email: string;
138
138
  password: string;
139
139
  }): Promise<{
140
+ requiresTwoFactor: boolean;
140
141
  user: types.User;
141
142
  session: types.Session;
142
- requiresTwoFactor: boolean;
143
143
  }>;
144
144
  signOut(): Promise<{
145
145
  success: boolean;
@@ -149,8 +149,8 @@ export declare class AuthsomeClient {
149
149
  session: types.Session;
150
150
  }>;
151
151
  updateUser(request: {
152
- email?: string;
153
152
  name?: string;
153
+ email?: string;
154
154
  }): Promise<{
155
155
  user: types.User;
156
156
  }>;
@@ -165,11 +165,11 @@ export declare class AuthsomeClient {
165
165
  refreshSession(request: {
166
166
  refreshToken: string;
167
167
  }): Promise<{
168
- expiresAt: string;
169
- refreshExpiresAt: string;
170
168
  session: any;
171
169
  accessToken: string;
172
170
  refreshToken: string;
171
+ expiresAt: string;
172
+ refreshExpiresAt: string;
173
173
  }>;
174
174
  requestPasswordReset(request: {
175
175
  email: string;
package/dist/client.js CHANGED
@@ -6,35 +6,35 @@ const errors_1 = require("./errors");
6
6
  class AuthsomeClient {
7
7
  constructor(config) {
8
8
  this.$plugins = {
9
- admin: () => this.getPlugin('admin'),
10
9
  permissions: () => this.getPlugin('permissions'),
11
- webhook: () => this.getPlugin('webhook'),
12
- cms: () => this.getPlugin('cms'),
13
- emailverification: () => this.getPlugin('emailverification'),
14
10
  idverification: () => this.getPlugin('idverification'),
15
- magiclink: () => this.getPlugin('magiclink'),
16
- notification: () => this.getPlugin('notification'),
17
11
  twofa: () => this.getPlugin('twofa'),
12
+ jwt: () => this.getPlugin('jwt'),
13
+ admin: () => this.getPlugin('admin'),
18
14
  apikey: () => this.getPlugin('apikey'),
19
- emailotp: () => this.getPlugin('emailotp'),
15
+ emailverification: () => this.getPlugin('emailverification'),
20
16
  backupauth: () => this.getPlugin('backupauth'),
21
- compliance: () => this.getPlugin('compliance'),
22
17
  stepup: () => this.getPlugin('stepup'),
23
- mfa: () => this.getPlugin('mfa'),
24
18
  multiapp: () => this.getPlugin('multiapp'),
25
- phone: () => this.getPlugin('phone'),
26
19
  anonymous: () => this.getPlugin('anonymous'),
27
- passkey: () => this.getPlugin('passkey'),
28
- username: () => this.getPlugin('username'),
29
20
  multisession: () => this.getPlugin('multisession'),
30
- consent: () => this.getPlugin('consent'),
31
- impersonation: () => this.getPlugin('impersonation'),
21
+ notification: () => this.getPlugin('notification'),
22
+ passkey: () => this.getPlugin('passkey'),
23
+ phone: () => this.getPlugin('phone'),
24
+ webhook: () => this.getPlugin('webhook'),
25
+ social: () => this.getPlugin('social'),
26
+ cms: () => this.getPlugin('cms'),
32
27
  oidcprovider: () => this.getPlugin('oidcprovider'),
33
28
  organization: () => this.getPlugin('organization'),
34
29
  sso: () => this.getPlugin('sso'),
30
+ magiclink: () => this.getPlugin('magiclink'),
31
+ username: () => this.getPlugin('username'),
32
+ consent: () => this.getPlugin('consent'),
35
33
  secrets: () => this.getPlugin('secrets'),
36
- social: () => this.getPlugin('social'),
37
- jwt: () => this.getPlugin('jwt'),
34
+ impersonation: () => this.getPlugin('impersonation'),
35
+ emailotp: () => this.getPlugin('emailotp'),
36
+ compliance: () => this.getPlugin('compliance'),
37
+ mfa: () => this.getPlugin('mfa'),
38
38
  };
39
39
  this.baseURL = config.baseURL;
40
40
  this.basePath = config.basePath || '';
package/dist/index.d.ts CHANGED
@@ -2,32 +2,32 @@ export { AuthsomeClient, AuthsomeClientConfig } from './client';
2
2
  export { ClientPlugin } from './plugin';
3
3
  export * from './types';
4
4
  export * from './errors';
5
- export { AdminPlugin, adminClient } from './plugins/admin';
6
5
  export { PermissionsPlugin, permissionsClient } from './plugins/permissions';
7
- export { WebhookPlugin, webhookClient } from './plugins/webhook';
8
- export { CmsPlugin, cmsClient } from './plugins/cms';
9
- export { EmailverificationPlugin, emailverificationClient } from './plugins/emailverification';
10
6
  export { IdverificationPlugin, idverificationClient } from './plugins/idverification';
11
- export { MagiclinkPlugin, magiclinkClient } from './plugins/magiclink';
12
- export { NotificationPlugin, notificationClient } from './plugins/notification';
13
7
  export { TwofaPlugin, twofaClient } from './plugins/twofa';
8
+ export { JwtPlugin, jwtClient } from './plugins/jwt';
9
+ export { AdminPlugin, adminClient } from './plugins/admin';
14
10
  export { ApikeyPlugin, apikeyClient } from './plugins/apikey';
15
- export { EmailotpPlugin, emailotpClient } from './plugins/emailotp';
11
+ export { EmailverificationPlugin, emailverificationClient } from './plugins/emailverification';
16
12
  export { BackupauthPlugin, backupauthClient } from './plugins/backupauth';
17
- export { CompliancePlugin, complianceClient } from './plugins/compliance';
18
13
  export { StepupPlugin, stepupClient } from './plugins/stepup';
19
- export { MfaPlugin, mfaClient } from './plugins/mfa';
20
14
  export { MultiappPlugin, multiappClient } from './plugins/multiapp';
21
- export { PhonePlugin, phoneClient } from './plugins/phone';
22
15
  export { AnonymousPlugin, anonymousClient } from './plugins/anonymous';
23
- export { PasskeyPlugin, passkeyClient } from './plugins/passkey';
24
- export { UsernamePlugin, usernameClient } from './plugins/username';
25
16
  export { MultisessionPlugin, multisessionClient } from './plugins/multisession';
26
- export { ConsentPlugin, consentClient } from './plugins/consent';
27
- export { ImpersonationPlugin, impersonationClient } from './plugins/impersonation';
17
+ export { NotificationPlugin, notificationClient } from './plugins/notification';
18
+ export { PasskeyPlugin, passkeyClient } from './plugins/passkey';
19
+ export { PhonePlugin, phoneClient } from './plugins/phone';
20
+ export { WebhookPlugin, webhookClient } from './plugins/webhook';
21
+ export { SocialPlugin, socialClient } from './plugins/social';
22
+ export { CmsPlugin, cmsClient } from './plugins/cms';
28
23
  export { OidcproviderPlugin, oidcproviderClient } from './plugins/oidcprovider';
29
24
  export { OrganizationPlugin, organizationClient } from './plugins/organization';
30
25
  export { SsoPlugin, ssoClient } from './plugins/sso';
26
+ export { MagiclinkPlugin, magiclinkClient } from './plugins/magiclink';
27
+ export { UsernamePlugin, usernameClient } from './plugins/username';
28
+ export { ConsentPlugin, consentClient } from './plugins/consent';
31
29
  export { SecretsPlugin, secretsClient } from './plugins/secrets';
32
- export { SocialPlugin, socialClient } from './plugins/social';
33
- export { JwtPlugin, jwtClient } from './plugins/jwt';
30
+ export { ImpersonationPlugin, impersonationClient } from './plugins/impersonation';
31
+ export { EmailotpPlugin, emailotpClient } from './plugins/emailotp';
32
+ export { CompliancePlugin, complianceClient } from './plugins/compliance';
33
+ export { MfaPlugin, mfaClient } from './plugins/mfa';
package/dist/index.js CHANGED
@@ -15,82 +15,67 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
16
  };
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.OrganizationPlugin = exports.oidcproviderClient = exports.OidcproviderPlugin = exports.impersonationClient = exports.ImpersonationPlugin = exports.consentClient = exports.ConsentPlugin = exports.multisessionClient = exports.MultisessionPlugin = exports.usernameClient = exports.UsernamePlugin = exports.passkeyClient = exports.PasskeyPlugin = exports.anonymousClient = exports.AnonymousPlugin = exports.phoneClient = exports.PhonePlugin = exports.multiappClient = exports.MultiappPlugin = exports.mfaClient = exports.MfaPlugin = exports.stepupClient = exports.StepupPlugin = exports.complianceClient = exports.CompliancePlugin = exports.backupauthClient = exports.BackupauthPlugin = exports.emailotpClient = exports.EmailotpPlugin = exports.apikeyClient = exports.ApikeyPlugin = exports.twofaClient = exports.TwofaPlugin = exports.notificationClient = exports.NotificationPlugin = exports.magiclinkClient = exports.MagiclinkPlugin = exports.idverificationClient = exports.IdverificationPlugin = exports.emailverificationClient = exports.EmailverificationPlugin = exports.cmsClient = exports.CmsPlugin = exports.webhookClient = exports.WebhookPlugin = exports.permissionsClient = exports.PermissionsPlugin = exports.adminClient = exports.AdminPlugin = exports.AuthsomeClient = void 0;
19
- exports.jwtClient = exports.JwtPlugin = exports.socialClient = exports.SocialPlugin = exports.secretsClient = exports.SecretsPlugin = exports.ssoClient = exports.SsoPlugin = exports.organizationClient = void 0;
18
+ exports.SecretsPlugin = exports.consentClient = exports.ConsentPlugin = exports.usernameClient = exports.UsernamePlugin = exports.magiclinkClient = exports.MagiclinkPlugin = exports.ssoClient = exports.SsoPlugin = exports.organizationClient = exports.OrganizationPlugin = exports.oidcproviderClient = exports.OidcproviderPlugin = exports.cmsClient = exports.CmsPlugin = exports.socialClient = exports.SocialPlugin = exports.webhookClient = exports.WebhookPlugin = exports.phoneClient = exports.PhonePlugin = exports.passkeyClient = exports.PasskeyPlugin = exports.notificationClient = exports.NotificationPlugin = exports.multisessionClient = exports.MultisessionPlugin = exports.anonymousClient = exports.AnonymousPlugin = exports.multiappClient = exports.MultiappPlugin = exports.stepupClient = exports.StepupPlugin = exports.backupauthClient = exports.BackupauthPlugin = exports.emailverificationClient = exports.EmailverificationPlugin = exports.apikeyClient = exports.ApikeyPlugin = exports.adminClient = exports.AdminPlugin = exports.jwtClient = exports.JwtPlugin = exports.twofaClient = exports.TwofaPlugin = exports.idverificationClient = exports.IdverificationPlugin = exports.permissionsClient = exports.PermissionsPlugin = exports.AuthsomeClient = void 0;
19
+ exports.mfaClient = exports.MfaPlugin = exports.complianceClient = exports.CompliancePlugin = exports.emailotpClient = exports.EmailotpPlugin = exports.impersonationClient = exports.ImpersonationPlugin = exports.secretsClient = void 0;
20
20
  var client_1 = require("./client");
21
21
  Object.defineProperty(exports, "AuthsomeClient", { enumerable: true, get: function () { return client_1.AuthsomeClient; } });
22
22
  __exportStar(require("./types"), exports);
23
23
  __exportStar(require("./errors"), exports);
24
24
  // Plugin exports
25
- var admin_1 = require("./plugins/admin");
26
- Object.defineProperty(exports, "AdminPlugin", { enumerable: true, get: function () { return admin_1.AdminPlugin; } });
27
- Object.defineProperty(exports, "adminClient", { enumerable: true, get: function () { return admin_1.adminClient; } });
28
25
  var permissions_1 = require("./plugins/permissions");
29
26
  Object.defineProperty(exports, "PermissionsPlugin", { enumerable: true, get: function () { return permissions_1.PermissionsPlugin; } });
30
27
  Object.defineProperty(exports, "permissionsClient", { enumerable: true, get: function () { return permissions_1.permissionsClient; } });
31
- var webhook_1 = require("./plugins/webhook");
32
- Object.defineProperty(exports, "WebhookPlugin", { enumerable: true, get: function () { return webhook_1.WebhookPlugin; } });
33
- Object.defineProperty(exports, "webhookClient", { enumerable: true, get: function () { return webhook_1.webhookClient; } });
34
- var cms_1 = require("./plugins/cms");
35
- Object.defineProperty(exports, "CmsPlugin", { enumerable: true, get: function () { return cms_1.CmsPlugin; } });
36
- Object.defineProperty(exports, "cmsClient", { enumerable: true, get: function () { return cms_1.cmsClient; } });
37
- var emailverification_1 = require("./plugins/emailverification");
38
- Object.defineProperty(exports, "EmailverificationPlugin", { enumerable: true, get: function () { return emailverification_1.EmailverificationPlugin; } });
39
- Object.defineProperty(exports, "emailverificationClient", { enumerable: true, get: function () { return emailverification_1.emailverificationClient; } });
40
28
  var idverification_1 = require("./plugins/idverification");
41
29
  Object.defineProperty(exports, "IdverificationPlugin", { enumerable: true, get: function () { return idverification_1.IdverificationPlugin; } });
42
30
  Object.defineProperty(exports, "idverificationClient", { enumerable: true, get: function () { return idverification_1.idverificationClient; } });
43
- var magiclink_1 = require("./plugins/magiclink");
44
- Object.defineProperty(exports, "MagiclinkPlugin", { enumerable: true, get: function () { return magiclink_1.MagiclinkPlugin; } });
45
- Object.defineProperty(exports, "magiclinkClient", { enumerable: true, get: function () { return magiclink_1.magiclinkClient; } });
46
- var notification_1 = require("./plugins/notification");
47
- Object.defineProperty(exports, "NotificationPlugin", { enumerable: true, get: function () { return notification_1.NotificationPlugin; } });
48
- Object.defineProperty(exports, "notificationClient", { enumerable: true, get: function () { return notification_1.notificationClient; } });
49
31
  var twofa_1 = require("./plugins/twofa");
50
32
  Object.defineProperty(exports, "TwofaPlugin", { enumerable: true, get: function () { return twofa_1.TwofaPlugin; } });
51
33
  Object.defineProperty(exports, "twofaClient", { enumerable: true, get: function () { return twofa_1.twofaClient; } });
34
+ var jwt_1 = require("./plugins/jwt");
35
+ Object.defineProperty(exports, "JwtPlugin", { enumerable: true, get: function () { return jwt_1.JwtPlugin; } });
36
+ Object.defineProperty(exports, "jwtClient", { enumerable: true, get: function () { return jwt_1.jwtClient; } });
37
+ var admin_1 = require("./plugins/admin");
38
+ Object.defineProperty(exports, "AdminPlugin", { enumerable: true, get: function () { return admin_1.AdminPlugin; } });
39
+ Object.defineProperty(exports, "adminClient", { enumerable: true, get: function () { return admin_1.adminClient; } });
52
40
  var apikey_1 = require("./plugins/apikey");
53
41
  Object.defineProperty(exports, "ApikeyPlugin", { enumerable: true, get: function () { return apikey_1.ApikeyPlugin; } });
54
42
  Object.defineProperty(exports, "apikeyClient", { enumerable: true, get: function () { return apikey_1.apikeyClient; } });
55
- var emailotp_1 = require("./plugins/emailotp");
56
- Object.defineProperty(exports, "EmailotpPlugin", { enumerable: true, get: function () { return emailotp_1.EmailotpPlugin; } });
57
- Object.defineProperty(exports, "emailotpClient", { enumerable: true, get: function () { return emailotp_1.emailotpClient; } });
43
+ var emailverification_1 = require("./plugins/emailverification");
44
+ Object.defineProperty(exports, "EmailverificationPlugin", { enumerable: true, get: function () { return emailverification_1.EmailverificationPlugin; } });
45
+ Object.defineProperty(exports, "emailverificationClient", { enumerable: true, get: function () { return emailverification_1.emailverificationClient; } });
58
46
  var backupauth_1 = require("./plugins/backupauth");
59
47
  Object.defineProperty(exports, "BackupauthPlugin", { enumerable: true, get: function () { return backupauth_1.BackupauthPlugin; } });
60
48
  Object.defineProperty(exports, "backupauthClient", { enumerable: true, get: function () { return backupauth_1.backupauthClient; } });
61
- var compliance_1 = require("./plugins/compliance");
62
- Object.defineProperty(exports, "CompliancePlugin", { enumerable: true, get: function () { return compliance_1.CompliancePlugin; } });
63
- Object.defineProperty(exports, "complianceClient", { enumerable: true, get: function () { return compliance_1.complianceClient; } });
64
49
  var stepup_1 = require("./plugins/stepup");
65
50
  Object.defineProperty(exports, "StepupPlugin", { enumerable: true, get: function () { return stepup_1.StepupPlugin; } });
66
51
  Object.defineProperty(exports, "stepupClient", { enumerable: true, get: function () { return stepup_1.stepupClient; } });
67
- var mfa_1 = require("./plugins/mfa");
68
- Object.defineProperty(exports, "MfaPlugin", { enumerable: true, get: function () { return mfa_1.MfaPlugin; } });
69
- Object.defineProperty(exports, "mfaClient", { enumerable: true, get: function () { return mfa_1.mfaClient; } });
70
52
  var multiapp_1 = require("./plugins/multiapp");
71
53
  Object.defineProperty(exports, "MultiappPlugin", { enumerable: true, get: function () { return multiapp_1.MultiappPlugin; } });
72
54
  Object.defineProperty(exports, "multiappClient", { enumerable: true, get: function () { return multiapp_1.multiappClient; } });
73
- var phone_1 = require("./plugins/phone");
74
- Object.defineProperty(exports, "PhonePlugin", { enumerable: true, get: function () { return phone_1.PhonePlugin; } });
75
- Object.defineProperty(exports, "phoneClient", { enumerable: true, get: function () { return phone_1.phoneClient; } });
76
55
  var anonymous_1 = require("./plugins/anonymous");
77
56
  Object.defineProperty(exports, "AnonymousPlugin", { enumerable: true, get: function () { return anonymous_1.AnonymousPlugin; } });
78
57
  Object.defineProperty(exports, "anonymousClient", { enumerable: true, get: function () { return anonymous_1.anonymousClient; } });
79
- var passkey_1 = require("./plugins/passkey");
80
- Object.defineProperty(exports, "PasskeyPlugin", { enumerable: true, get: function () { return passkey_1.PasskeyPlugin; } });
81
- Object.defineProperty(exports, "passkeyClient", { enumerable: true, get: function () { return passkey_1.passkeyClient; } });
82
- var username_1 = require("./plugins/username");
83
- Object.defineProperty(exports, "UsernamePlugin", { enumerable: true, get: function () { return username_1.UsernamePlugin; } });
84
- Object.defineProperty(exports, "usernameClient", { enumerable: true, get: function () { return username_1.usernameClient; } });
85
58
  var multisession_1 = require("./plugins/multisession");
86
59
  Object.defineProperty(exports, "MultisessionPlugin", { enumerable: true, get: function () { return multisession_1.MultisessionPlugin; } });
87
60
  Object.defineProperty(exports, "multisessionClient", { enumerable: true, get: function () { return multisession_1.multisessionClient; } });
88
- var consent_1 = require("./plugins/consent");
89
- Object.defineProperty(exports, "ConsentPlugin", { enumerable: true, get: function () { return consent_1.ConsentPlugin; } });
90
- Object.defineProperty(exports, "consentClient", { enumerable: true, get: function () { return consent_1.consentClient; } });
91
- var impersonation_1 = require("./plugins/impersonation");
92
- Object.defineProperty(exports, "ImpersonationPlugin", { enumerable: true, get: function () { return impersonation_1.ImpersonationPlugin; } });
93
- Object.defineProperty(exports, "impersonationClient", { enumerable: true, get: function () { return impersonation_1.impersonationClient; } });
61
+ var notification_1 = require("./plugins/notification");
62
+ Object.defineProperty(exports, "NotificationPlugin", { enumerable: true, get: function () { return notification_1.NotificationPlugin; } });
63
+ Object.defineProperty(exports, "notificationClient", { enumerable: true, get: function () { return notification_1.notificationClient; } });
64
+ var passkey_1 = require("./plugins/passkey");
65
+ Object.defineProperty(exports, "PasskeyPlugin", { enumerable: true, get: function () { return passkey_1.PasskeyPlugin; } });
66
+ Object.defineProperty(exports, "passkeyClient", { enumerable: true, get: function () { return passkey_1.passkeyClient; } });
67
+ var phone_1 = require("./plugins/phone");
68
+ Object.defineProperty(exports, "PhonePlugin", { enumerable: true, get: function () { return phone_1.PhonePlugin; } });
69
+ Object.defineProperty(exports, "phoneClient", { enumerable: true, get: function () { return phone_1.phoneClient; } });
70
+ var webhook_1 = require("./plugins/webhook");
71
+ Object.defineProperty(exports, "WebhookPlugin", { enumerable: true, get: function () { return webhook_1.WebhookPlugin; } });
72
+ Object.defineProperty(exports, "webhookClient", { enumerable: true, get: function () { return webhook_1.webhookClient; } });
73
+ var social_1 = require("./plugins/social");
74
+ Object.defineProperty(exports, "SocialPlugin", { enumerable: true, get: function () { return social_1.SocialPlugin; } });
75
+ Object.defineProperty(exports, "socialClient", { enumerable: true, get: function () { return social_1.socialClient; } });
76
+ var cms_1 = require("./plugins/cms");
77
+ Object.defineProperty(exports, "CmsPlugin", { enumerable: true, get: function () { return cms_1.CmsPlugin; } });
78
+ Object.defineProperty(exports, "cmsClient", { enumerable: true, get: function () { return cms_1.cmsClient; } });
94
79
  var oidcprovider_1 = require("./plugins/oidcprovider");
95
80
  Object.defineProperty(exports, "OidcproviderPlugin", { enumerable: true, get: function () { return oidcprovider_1.OidcproviderPlugin; } });
96
81
  Object.defineProperty(exports, "oidcproviderClient", { enumerable: true, get: function () { return oidcprovider_1.oidcproviderClient; } });
@@ -100,12 +85,27 @@ Object.defineProperty(exports, "organizationClient", { enumerable: true, get: fu
100
85
  var sso_1 = require("./plugins/sso");
101
86
  Object.defineProperty(exports, "SsoPlugin", { enumerable: true, get: function () { return sso_1.SsoPlugin; } });
102
87
  Object.defineProperty(exports, "ssoClient", { enumerable: true, get: function () { return sso_1.ssoClient; } });
88
+ var magiclink_1 = require("./plugins/magiclink");
89
+ Object.defineProperty(exports, "MagiclinkPlugin", { enumerable: true, get: function () { return magiclink_1.MagiclinkPlugin; } });
90
+ Object.defineProperty(exports, "magiclinkClient", { enumerable: true, get: function () { return magiclink_1.magiclinkClient; } });
91
+ var username_1 = require("./plugins/username");
92
+ Object.defineProperty(exports, "UsernamePlugin", { enumerable: true, get: function () { return username_1.UsernamePlugin; } });
93
+ Object.defineProperty(exports, "usernameClient", { enumerable: true, get: function () { return username_1.usernameClient; } });
94
+ var consent_1 = require("./plugins/consent");
95
+ Object.defineProperty(exports, "ConsentPlugin", { enumerable: true, get: function () { return consent_1.ConsentPlugin; } });
96
+ Object.defineProperty(exports, "consentClient", { enumerable: true, get: function () { return consent_1.consentClient; } });
103
97
  var secrets_1 = require("./plugins/secrets");
104
98
  Object.defineProperty(exports, "SecretsPlugin", { enumerable: true, get: function () { return secrets_1.SecretsPlugin; } });
105
99
  Object.defineProperty(exports, "secretsClient", { enumerable: true, get: function () { return secrets_1.secretsClient; } });
106
- var social_1 = require("./plugins/social");
107
- Object.defineProperty(exports, "SocialPlugin", { enumerable: true, get: function () { return social_1.SocialPlugin; } });
108
- Object.defineProperty(exports, "socialClient", { enumerable: true, get: function () { return social_1.socialClient; } });
109
- var jwt_1 = require("./plugins/jwt");
110
- Object.defineProperty(exports, "JwtPlugin", { enumerable: true, get: function () { return jwt_1.JwtPlugin; } });
111
- Object.defineProperty(exports, "jwtClient", { enumerable: true, get: function () { return jwt_1.jwtClient; } });
100
+ var impersonation_1 = require("./plugins/impersonation");
101
+ Object.defineProperty(exports, "ImpersonationPlugin", { enumerable: true, get: function () { return impersonation_1.ImpersonationPlugin; } });
102
+ Object.defineProperty(exports, "impersonationClient", { enumerable: true, get: function () { return impersonation_1.impersonationClient; } });
103
+ var emailotp_1 = require("./plugins/emailotp");
104
+ Object.defineProperty(exports, "EmailotpPlugin", { enumerable: true, get: function () { return emailotp_1.EmailotpPlugin; } });
105
+ Object.defineProperty(exports, "emailotpClient", { enumerable: true, get: function () { return emailotp_1.emailotpClient; } });
106
+ var compliance_1 = require("./plugins/compliance");
107
+ Object.defineProperty(exports, "CompliancePlugin", { enumerable: true, get: function () { return compliance_1.CompliancePlugin; } });
108
+ Object.defineProperty(exports, "complianceClient", { enumerable: true, get: function () { return compliance_1.complianceClient; } });
109
+ var mfa_1 = require("./plugins/mfa");
110
+ Object.defineProperty(exports, "MfaPlugin", { enumerable: true, get: function () { return mfa_1.MfaPlugin; } });
111
+ Object.defineProperty(exports, "mfaClient", { enumerable: true, get: function () { return mfa_1.mfaClient; } });
@@ -6,9 +6,6 @@ export declare class ApikeyPlugin implements ClientPlugin {
6
6
  private client;
7
7
  init(client: AuthsomeClient): void;
8
8
  createAPIKey(request: types.CreateAPIKeyRequest): Promise<types.CreateAPIKeyResponse>;
9
- rotateAPIKey(params: {
10
- id: string;
11
- }, request: types.RotateAPIKeyRequest): Promise<types.RotateAPIKeyResponse>;
12
9
  listAPIKeys(request?: types.ListAPIKeysRequest): Promise<types.ListAPIKeysResponse>;
13
10
  getAPIKey(params: {
14
11
  id: string;
@@ -19,6 +16,9 @@ export declare class ApikeyPlugin implements ClientPlugin {
19
16
  deleteAPIKey(params: {
20
17
  id: string;
21
18
  }, request?: types.DeleteAPIKeyRequest): Promise<types.MessageResponse>;
19
+ rotateAPIKey(params: {
20
+ id: string;
21
+ }, request: types.RotateAPIKeyRequest): Promise<types.RotateAPIKeyResponse>;
22
22
  verifyAPIKey(request: types.VerifyAPIKeyRequest): Promise<types.VerifyAPIKeyResponse>;
23
23
  }
24
24
  export declare function apikeyClient(): ApikeyPlugin;
@@ -11,19 +11,13 @@ class ApikeyPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async createAPIKey(request) {
14
- const path = '/api-keys/createapikey';
15
- return this.client.request('POST', path, {
16
- body: request,
17
- });
18
- }
19
- async rotateAPIKey(params, request) {
20
- const path = `/api-keys/${params.id}/rotate`;
14
+ const path = '/api-keys';
21
15
  return this.client.request('POST', path, {
22
16
  body: request,
23
17
  });
24
18
  }
25
19
  async listAPIKeys(request) {
26
- const path = '/api-keys/listapikeys';
20
+ const path = '/api-keys';
27
21
  return this.client.request('GET', path, {
28
22
  query: this.client.toQueryParams(request),
29
23
  });
@@ -46,6 +40,12 @@ class ApikeyPlugin {
46
40
  query: this.client.toQueryParams(request),
47
41
  });
48
42
  }
43
+ async rotateAPIKey(params, request) {
44
+ const path = `/api-keys/${params.id}/rotate`;
45
+ return this.client.request('POST', path, {
46
+ body: request,
47
+ });
48
+ }
49
49
  async verifyAPIKey(request) {
50
50
  const path = '/api-keys/verify';
51
51
  return this.client.request('POST', path, {
@@ -11,127 +11,127 @@ class BackupauthPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async startRecovery(request) {
14
- const path = '/admin/recovery/start';
14
+ const path = '/recovery/start';
15
15
  return this.client.request('POST', path, {
16
16
  body: request,
17
17
  });
18
18
  }
19
19
  async continueRecovery(request) {
20
- const path = '/admin/recovery/continue';
20
+ const path = '/recovery/continue';
21
21
  return this.client.request('POST', path, {
22
22
  body: request,
23
23
  });
24
24
  }
25
25
  async completeRecovery(request) {
26
- const path = '/admin/recovery/complete';
26
+ const path = '/recovery/complete';
27
27
  return this.client.request('POST', path, {
28
28
  body: request,
29
29
  });
30
30
  }
31
31
  async cancelRecovery(request) {
32
- const path = '/admin/recovery/cancel';
32
+ const path = '/recovery/cancel';
33
33
  return this.client.request('POST', path, {
34
34
  body: request,
35
35
  });
36
36
  }
37
37
  async generateRecoveryCodes(request) {
38
- const path = '/admin/recovery-codes/generate';
38
+ const path = '/recovery-codes/generate';
39
39
  return this.client.request('POST', path, {
40
40
  body: request,
41
41
  });
42
42
  }
43
43
  async verifyRecoveryCode(request) {
44
- const path = '/admin/recovery-codes/verify';
44
+ const path = '/recovery-codes/verify';
45
45
  return this.client.request('POST', path, {
46
46
  body: request,
47
47
  });
48
48
  }
49
49
  async setupSecurityQuestions(request) {
50
- const path = '/admin/security-questions/setup';
50
+ const path = '/security-questions/setup';
51
51
  return this.client.request('POST', path, {
52
52
  body: request,
53
53
  });
54
54
  }
55
55
  async getSecurityQuestions(request) {
56
- const path = '/admin/security-questions/get';
56
+ const path = '/security-questions/get';
57
57
  return this.client.request('POST', path, {
58
58
  body: request,
59
59
  });
60
60
  }
61
61
  async verifySecurityAnswers(request) {
62
- const path = '/admin/security-questions/verify';
62
+ const path = '/security-questions/verify';
63
63
  return this.client.request('POST', path, {
64
64
  body: request,
65
65
  });
66
66
  }
67
67
  async addTrustedContact(request) {
68
- const path = '/admin/trusted-contacts/add';
68
+ const path = '/trusted-contacts/add';
69
69
  return this.client.request('POST', path, {
70
70
  body: request,
71
71
  });
72
72
  }
73
73
  async listTrustedContacts() {
74
- const path = '/admin/trusted-contacts';
74
+ const path = '/trusted-contacts';
75
75
  return this.client.request('GET', path);
76
76
  }
77
77
  async verifyTrustedContact(request) {
78
- const path = '/admin/trusted-contacts/verify';
78
+ const path = '/trusted-contacts/verify';
79
79
  return this.client.request('POST', path, {
80
80
  body: request,
81
81
  });
82
82
  }
83
83
  async requestTrustedContactVerification(request) {
84
- const path = '/admin/trusted-contacts/request-verification';
84
+ const path = '/trusted-contacts/request-verification';
85
85
  return this.client.request('POST', path, {
86
86
  body: request,
87
87
  });
88
88
  }
89
89
  async removeTrustedContact(params) {
90
- const path = `/admin/trusted-contacts/${params.id}`;
90
+ const path = `/trusted-contacts/${params.id}`;
91
91
  return this.client.request('DELETE', path);
92
92
  }
93
93
  async sendVerificationCode(request) {
94
- const path = '/admin/verification/send';
94
+ const path = '/verification/send';
95
95
  return this.client.request('POST', path, {
96
96
  body: request,
97
97
  });
98
98
  }
99
99
  async verifyCode(request) {
100
- const path = '/admin/verification/verify';
100
+ const path = '/verification/verify';
101
101
  return this.client.request('POST', path, {
102
102
  body: request,
103
103
  });
104
104
  }
105
105
  async scheduleVideoSession(request) {
106
- const path = '/admin/video/schedule';
106
+ const path = '/video/schedule';
107
107
  return this.client.request('POST', path, {
108
108
  body: request,
109
109
  });
110
110
  }
111
111
  async startVideoSession(request) {
112
- const path = '/admin/video/start';
112
+ const path = '/video/start';
113
113
  return this.client.request('POST', path, {
114
114
  body: request,
115
115
  });
116
116
  }
117
117
  async completeVideoSession(request) {
118
- const path = '/admin/video/complete';
118
+ const path = '/video/complete';
119
119
  return this.client.request('POST', path, {
120
120
  body: request,
121
121
  });
122
122
  }
123
123
  async uploadDocument(request) {
124
- const path = '/admin/documents/upload';
124
+ const path = '/documents/upload';
125
125
  return this.client.request('POST', path, {
126
126
  body: request,
127
127
  });
128
128
  }
129
129
  async getDocumentVerification(params) {
130
- const path = `/admin/documents/${params.id}`;
130
+ const path = `/documents/${params.id}`;
131
131
  return this.client.request('GET', path);
132
132
  }
133
133
  async reviewDocument(params, request) {
134
- const path = `/admin/documents/${params.id}/review`;
134
+ const path = `/documents/${params.id}/review`;
135
135
  return this.client.request('POST', path, {
136
136
  body: request,
137
137
  });
@@ -167,7 +167,7 @@ class BackupauthPlugin {
167
167
  });
168
168
  }
169
169
  async healthCheck() {
170
- const path = '/admin/health';
170
+ const path = '/health';
171
171
  return this.client.request('GET', path);
172
172
  }
173
173
  }