@authsome/client 0.0.6 → 0.0.7

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 (45) hide show
  1. package/dist/client.d.ts +39 -39
  2. package/dist/client.js +18 -18
  3. package/dist/index.d.ts +18 -18
  4. package/dist/index.js +56 -56
  5. package/dist/plugins/admin.js +11 -11
  6. package/dist/plugins/apikey.d.ts +3 -3
  7. package/dist/plugins/apikey.js +12 -12
  8. package/dist/plugins/backupauth.js +29 -29
  9. package/dist/plugins/cms.js +29 -29
  10. package/dist/plugins/idverification.js +11 -11
  11. package/dist/plugins/impersonation.js +6 -6
  12. package/dist/plugins/jwt.js +5 -5
  13. package/dist/plugins/multiapp.js +19 -19
  14. package/dist/plugins/multisession.js +9 -9
  15. package/dist/plugins/notification.d.ts +3 -3
  16. package/dist/plugins/notification.js +6 -6
  17. package/dist/plugins/oidcprovider.d.ts +4 -0
  18. package/dist/plugins/oidcprovider.js +35 -13
  19. package/dist/plugins/organization.d.ts +15 -15
  20. package/dist/plugins/organization.js +37 -37
  21. package/dist/plugins/permissions.js +3 -3
  22. package/dist/plugins/secrets.js +11 -11
  23. package/dist/plugins/sso.js +6 -6
  24. package/dist/plugins/stepup.js +14 -14
  25. package/dist/types.d.ts +3905 -3118
  26. package/package.json +3 -3
  27. package/src/client.ts +40 -40
  28. package/src/index.ts +18 -18
  29. package/src/plugins/admin.ts +11 -11
  30. package/src/plugins/apikey.ts +13 -13
  31. package/src/plugins/backupauth.ts +29 -29
  32. package/src/plugins/cms.ts +29 -29
  33. package/src/plugins/idverification.ts +11 -11
  34. package/src/plugins/impersonation.ts +6 -6
  35. package/src/plugins/jwt.ts +5 -5
  36. package/src/plugins/multiapp.ts +19 -19
  37. package/src/plugins/multisession.ts +9 -9
  38. package/src/plugins/notification.ts +7 -7
  39. package/src/plugins/oidcprovider.ts +39 -13
  40. package/src/plugins/organization.ts +41 -41
  41. package/src/plugins/permissions.ts +3 -3
  42. package/src/plugins/secrets.ts +11 -11
  43. package/src/plugins/sso.ts +6 -6
  44. package/src/plugins/stepup.ts +14 -14
  45. package/src/types.ts +4105 -3185
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
- import { PermissionsPlugin } from './plugins/permissions';
5
- import { WebhookPlugin } from './plugins/webhook';
6
- import { CmsPlugin } from './plugins/cms';
3
+ import { AnonymousPlugin } from './plugins/anonymous';
7
4
  import { EmailverificationPlugin } from './plugins/emailverification';
8
5
  import { IdverificationPlugin } from './plugins/idverification';
9
- import { MagiclinkPlugin } from './plugins/magiclink';
10
- import { NotificationPlugin } from './plugins/notification';
11
- import { TwofaPlugin } from './plugins/twofa';
12
- import { ApikeyPlugin } from './plugins/apikey';
13
- import { EmailotpPlugin } from './plugins/emailotp';
14
- import { BackupauthPlugin } from './plugins/backupauth';
15
- import { CompliancePlugin } from './plugins/compliance';
16
- import { StepupPlugin } from './plugins/stepup';
6
+ import { PasskeyPlugin } from './plugins/passkey';
7
+ import { PermissionsPlugin } from './plugins/permissions';
17
8
  import { MfaPlugin } from './plugins/mfa';
18
9
  import { MultiappPlugin } from './plugins/multiapp';
10
+ import { SsoPlugin } from './plugins/sso';
11
+ import { CompliancePlugin } from './plugins/compliance';
12
+ import { MagiclinkPlugin } from './plugins/magiclink';
19
13
  import { PhonePlugin } from './plugins/phone';
20
- import { AnonymousPlugin } from './plugins/anonymous';
21
- import { PasskeyPlugin } from './plugins/passkey';
14
+ import { WebhookPlugin } from './plugins/webhook';
15
+ import { AdminPlugin } from './plugins/admin';
16
+ import { StepupPlugin } from './plugins/stepup';
17
+ import { ImpersonationPlugin } from './plugins/impersonation';
18
+ import { JwtPlugin } from './plugins/jwt';
19
+ import { NotificationPlugin } from './plugins/notification';
22
20
  import { UsernamePlugin } from './plugins/username';
23
- import { MultisessionPlugin } from './plugins/multisession';
24
21
  import { ConsentPlugin } from './plugins/consent';
25
- import { ImpersonationPlugin } from './plugins/impersonation';
22
+ import { MultisessionPlugin } from './plugins/multisession';
26
23
  import { OidcproviderPlugin } from './plugins/oidcprovider';
24
+ import { ApikeyPlugin } from './plugins/apikey';
25
+ import { CmsPlugin } from './plugins/cms';
26
+ import { BackupauthPlugin } from './plugins/backupauth';
27
27
  import { OrganizationPlugin } from './plugins/organization';
28
- import { SsoPlugin } from './plugins/sso';
28
+ import { TwofaPlugin } from './plugins/twofa';
29
+ import { EmailotpPlugin } from './plugins/emailotp';
29
30
  import { SecretsPlugin } from './plugins/secrets';
30
31
  import { SocialPlugin } from './plugins/social';
31
- import { JwtPlugin } from './plugins/jwt';
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
- permissions: () => PermissionsPlugin | undefined;
95
- webhook: () => WebhookPlugin | undefined;
96
- cms: () => CmsPlugin | undefined;
93
+ anonymous: () => AnonymousPlugin | undefined;
97
94
  emailverification: () => EmailverificationPlugin | undefined;
98
95
  idverification: () => IdverificationPlugin | undefined;
99
- magiclink: () => MagiclinkPlugin | undefined;
100
- notification: () => NotificationPlugin | undefined;
101
- twofa: () => TwofaPlugin | undefined;
102
- apikey: () => ApikeyPlugin | undefined;
103
- emailotp: () => EmailotpPlugin | undefined;
104
- backupauth: () => BackupauthPlugin | undefined;
105
- compliance: () => CompliancePlugin | undefined;
106
- stepup: () => StepupPlugin | undefined;
96
+ passkey: () => PasskeyPlugin | undefined;
97
+ permissions: () => PermissionsPlugin | undefined;
107
98
  mfa: () => MfaPlugin | undefined;
108
99
  multiapp: () => MultiappPlugin | undefined;
100
+ sso: () => SsoPlugin | undefined;
101
+ compliance: () => CompliancePlugin | undefined;
102
+ magiclink: () => MagiclinkPlugin | undefined;
109
103
  phone: () => PhonePlugin | undefined;
110
- anonymous: () => AnonymousPlugin | undefined;
111
- passkey: () => PasskeyPlugin | undefined;
104
+ webhook: () => WebhookPlugin | undefined;
105
+ admin: () => AdminPlugin | undefined;
106
+ stepup: () => StepupPlugin | undefined;
107
+ impersonation: () => ImpersonationPlugin | undefined;
108
+ jwt: () => JwtPlugin | undefined;
109
+ notification: () => NotificationPlugin | undefined;
112
110
  username: () => UsernamePlugin | undefined;
113
- multisession: () => MultisessionPlugin | undefined;
114
111
  consent: () => ConsentPlugin | undefined;
115
- impersonation: () => ImpersonationPlugin | undefined;
112
+ multisession: () => MultisessionPlugin | undefined;
116
113
  oidcprovider: () => OidcproviderPlugin | undefined;
114
+ apikey: () => ApikeyPlugin | undefined;
115
+ cms: () => CmsPlugin | undefined;
116
+ backupauth: () => BackupauthPlugin | undefined;
117
117
  organization: () => OrganizationPlugin | undefined;
118
- sso: () => SsoPlugin | undefined;
118
+ twofa: () => TwofaPlugin | undefined;
119
+ emailotp: () => EmailotpPlugin | undefined;
119
120
  secrets: () => SecretsPlugin | undefined;
120
121
  social: () => SocialPlugin | undefined;
121
- jwt: () => JwtPlugin | undefined;
122
122
  };
123
123
  request<T>(method: string, path: string, options?: {
124
124
  body?: any;
@@ -126,9 +126,9 @@ export declare class AuthsomeClient {
126
126
  auth?: boolean;
127
127
  }): Promise<T>;
128
128
  signUp(request: {
129
+ name?: string;
129
130
  email: string;
130
131
  password: string;
131
- name?: string;
132
132
  }): Promise<{
133
133
  user: types.User;
134
134
  session: types.Session;
@@ -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
+ refreshToken: string;
168
169
  expiresAt: string;
169
170
  refreshExpiresAt: string;
170
171
  session: any;
171
172
  accessToken: string;
172
- refreshToken: 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
- permissions: () => this.getPlugin('permissions'),
11
- webhook: () => this.getPlugin('webhook'),
12
- cms: () => this.getPlugin('cms'),
9
+ anonymous: () => this.getPlugin('anonymous'),
13
10
  emailverification: () => this.getPlugin('emailverification'),
14
11
  idverification: () => this.getPlugin('idverification'),
15
- magiclink: () => this.getPlugin('magiclink'),
16
- notification: () => this.getPlugin('notification'),
17
- twofa: () => this.getPlugin('twofa'),
18
- apikey: () => this.getPlugin('apikey'),
19
- emailotp: () => this.getPlugin('emailotp'),
20
- backupauth: () => this.getPlugin('backupauth'),
21
- compliance: () => this.getPlugin('compliance'),
22
- stepup: () => this.getPlugin('stepup'),
12
+ passkey: () => this.getPlugin('passkey'),
13
+ permissions: () => this.getPlugin('permissions'),
23
14
  mfa: () => this.getPlugin('mfa'),
24
15
  multiapp: () => this.getPlugin('multiapp'),
16
+ sso: () => this.getPlugin('sso'),
17
+ compliance: () => this.getPlugin('compliance'),
18
+ magiclink: () => this.getPlugin('magiclink'),
25
19
  phone: () => this.getPlugin('phone'),
26
- anonymous: () => this.getPlugin('anonymous'),
27
- passkey: () => this.getPlugin('passkey'),
20
+ webhook: () => this.getPlugin('webhook'),
21
+ admin: () => this.getPlugin('admin'),
22
+ stepup: () => this.getPlugin('stepup'),
23
+ impersonation: () => this.getPlugin('impersonation'),
24
+ jwt: () => this.getPlugin('jwt'),
25
+ notification: () => this.getPlugin('notification'),
28
26
  username: () => this.getPlugin('username'),
29
- multisession: () => this.getPlugin('multisession'),
30
27
  consent: () => this.getPlugin('consent'),
31
- impersonation: () => this.getPlugin('impersonation'),
28
+ multisession: () => this.getPlugin('multisession'),
32
29
  oidcprovider: () => this.getPlugin('oidcprovider'),
30
+ apikey: () => this.getPlugin('apikey'),
31
+ cms: () => this.getPlugin('cms'),
32
+ backupauth: () => this.getPlugin('backupauth'),
33
33
  organization: () => this.getPlugin('organization'),
34
- sso: () => this.getPlugin('sso'),
34
+ twofa: () => this.getPlugin('twofa'),
35
+ emailotp: () => this.getPlugin('emailotp'),
35
36
  secrets: () => this.getPlugin('secrets'),
36
37
  social: () => this.getPlugin('social'),
37
- jwt: () => this.getPlugin('jwt'),
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
- export { PermissionsPlugin, permissionsClient } from './plugins/permissions';
7
- export { WebhookPlugin, webhookClient } from './plugins/webhook';
8
- export { CmsPlugin, cmsClient } from './plugins/cms';
5
+ export { AnonymousPlugin, anonymousClient } from './plugins/anonymous';
9
6
  export { EmailverificationPlugin, emailverificationClient } from './plugins/emailverification';
10
7
  export { IdverificationPlugin, idverificationClient } from './plugins/idverification';
11
- export { MagiclinkPlugin, magiclinkClient } from './plugins/magiclink';
12
- export { NotificationPlugin, notificationClient } from './plugins/notification';
13
- export { TwofaPlugin, twofaClient } from './plugins/twofa';
14
- export { ApikeyPlugin, apikeyClient } from './plugins/apikey';
15
- export { EmailotpPlugin, emailotpClient } from './plugins/emailotp';
16
- export { BackupauthPlugin, backupauthClient } from './plugins/backupauth';
17
- export { CompliancePlugin, complianceClient } from './plugins/compliance';
18
- export { StepupPlugin, stepupClient } from './plugins/stepup';
8
+ export { PasskeyPlugin, passkeyClient } from './plugins/passkey';
9
+ export { PermissionsPlugin, permissionsClient } from './plugins/permissions';
19
10
  export { MfaPlugin, mfaClient } from './plugins/mfa';
20
11
  export { MultiappPlugin, multiappClient } from './plugins/multiapp';
12
+ export { SsoPlugin, ssoClient } from './plugins/sso';
13
+ export { CompliancePlugin, complianceClient } from './plugins/compliance';
14
+ export { MagiclinkPlugin, magiclinkClient } from './plugins/magiclink';
21
15
  export { PhonePlugin, phoneClient } from './plugins/phone';
22
- export { AnonymousPlugin, anonymousClient } from './plugins/anonymous';
23
- export { PasskeyPlugin, passkeyClient } from './plugins/passkey';
16
+ export { WebhookPlugin, webhookClient } from './plugins/webhook';
17
+ export { AdminPlugin, adminClient } from './plugins/admin';
18
+ export { StepupPlugin, stepupClient } from './plugins/stepup';
19
+ export { ImpersonationPlugin, impersonationClient } from './plugins/impersonation';
20
+ export { JwtPlugin, jwtClient } from './plugins/jwt';
21
+ export { NotificationPlugin, notificationClient } from './plugins/notification';
24
22
  export { UsernamePlugin, usernameClient } from './plugins/username';
25
- export { MultisessionPlugin, multisessionClient } from './plugins/multisession';
26
23
  export { ConsentPlugin, consentClient } from './plugins/consent';
27
- export { ImpersonationPlugin, impersonationClient } from './plugins/impersonation';
24
+ export { MultisessionPlugin, multisessionClient } from './plugins/multisession';
28
25
  export { OidcproviderPlugin, oidcproviderClient } from './plugins/oidcprovider';
26
+ export { ApikeyPlugin, apikeyClient } from './plugins/apikey';
27
+ export { CmsPlugin, cmsClient } from './plugins/cms';
28
+ export { BackupauthPlugin, backupauthClient } from './plugins/backupauth';
29
29
  export { OrganizationPlugin, organizationClient } from './plugins/organization';
30
- export { SsoPlugin, ssoClient } from './plugins/sso';
30
+ export { TwofaPlugin, twofaClient } from './plugins/twofa';
31
+ export { EmailotpPlugin, emailotpClient } from './plugins/emailotp';
31
32
  export { SecretsPlugin, secretsClient } from './plugins/secrets';
32
33
  export { SocialPlugin, socialClient } from './plugins/social';
33
- export { JwtPlugin, jwtClient } from './plugins/jwt';
package/dist/index.js CHANGED
@@ -15,97 +15,97 @@ 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.OrganizationPlugin = exports.backupauthClient = exports.BackupauthPlugin = exports.cmsClient = exports.CmsPlugin = exports.apikeyClient = exports.ApikeyPlugin = exports.oidcproviderClient = exports.OidcproviderPlugin = exports.multisessionClient = exports.MultisessionPlugin = exports.consentClient = exports.ConsentPlugin = exports.usernameClient = exports.UsernamePlugin = exports.notificationClient = exports.NotificationPlugin = exports.jwtClient = exports.JwtPlugin = exports.impersonationClient = exports.ImpersonationPlugin = exports.stepupClient = exports.StepupPlugin = exports.adminClient = exports.AdminPlugin = exports.webhookClient = exports.WebhookPlugin = exports.phoneClient = exports.PhonePlugin = exports.magiclinkClient = exports.MagiclinkPlugin = exports.complianceClient = exports.CompliancePlugin = exports.ssoClient = exports.SsoPlugin = exports.multiappClient = exports.MultiappPlugin = exports.mfaClient = exports.MfaPlugin = exports.permissionsClient = exports.PermissionsPlugin = exports.passkeyClient = exports.PasskeyPlugin = exports.idverificationClient = exports.IdverificationPlugin = exports.emailverificationClient = exports.EmailverificationPlugin = exports.anonymousClient = exports.AnonymousPlugin = exports.AuthsomeClient = void 0;
19
+ exports.socialClient = exports.SocialPlugin = exports.secretsClient = exports.SecretsPlugin = exports.emailotpClient = exports.EmailotpPlugin = exports.twofaClient = exports.TwofaPlugin = exports.organizationClient = 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
- var permissions_1 = require("./plugins/permissions");
29
- Object.defineProperty(exports, "PermissionsPlugin", { enumerable: true, get: function () { return permissions_1.PermissionsPlugin; } });
30
- 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; } });
25
+ var anonymous_1 = require("./plugins/anonymous");
26
+ Object.defineProperty(exports, "AnonymousPlugin", { enumerable: true, get: function () { return anonymous_1.AnonymousPlugin; } });
27
+ Object.defineProperty(exports, "anonymousClient", { enumerable: true, get: function () { return anonymous_1.anonymousClient; } });
37
28
  var emailverification_1 = require("./plugins/emailverification");
38
29
  Object.defineProperty(exports, "EmailverificationPlugin", { enumerable: true, get: function () { return emailverification_1.EmailverificationPlugin; } });
39
30
  Object.defineProperty(exports, "emailverificationClient", { enumerable: true, get: function () { return emailverification_1.emailverificationClient; } });
40
31
  var idverification_1 = require("./plugins/idverification");
41
32
  Object.defineProperty(exports, "IdverificationPlugin", { enumerable: true, get: function () { return idverification_1.IdverificationPlugin; } });
42
33
  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
- var twofa_1 = require("./plugins/twofa");
50
- Object.defineProperty(exports, "TwofaPlugin", { enumerable: true, get: function () { return twofa_1.TwofaPlugin; } });
51
- Object.defineProperty(exports, "twofaClient", { enumerable: true, get: function () { return twofa_1.twofaClient; } });
52
- var apikey_1 = require("./plugins/apikey");
53
- Object.defineProperty(exports, "ApikeyPlugin", { enumerable: true, get: function () { return apikey_1.ApikeyPlugin; } });
54
- 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; } });
58
- var backupauth_1 = require("./plugins/backupauth");
59
- Object.defineProperty(exports, "BackupauthPlugin", { enumerable: true, get: function () { return backupauth_1.BackupauthPlugin; } });
60
- 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
- var stepup_1 = require("./plugins/stepup");
65
- Object.defineProperty(exports, "StepupPlugin", { enumerable: true, get: function () { return stepup_1.StepupPlugin; } });
66
- Object.defineProperty(exports, "stepupClient", { enumerable: true, get: function () { return stepup_1.stepupClient; } });
34
+ var passkey_1 = require("./plugins/passkey");
35
+ Object.defineProperty(exports, "PasskeyPlugin", { enumerable: true, get: function () { return passkey_1.PasskeyPlugin; } });
36
+ Object.defineProperty(exports, "passkeyClient", { enumerable: true, get: function () { return passkey_1.passkeyClient; } });
37
+ var permissions_1 = require("./plugins/permissions");
38
+ Object.defineProperty(exports, "PermissionsPlugin", { enumerable: true, get: function () { return permissions_1.PermissionsPlugin; } });
39
+ Object.defineProperty(exports, "permissionsClient", { enumerable: true, get: function () { return permissions_1.permissionsClient; } });
67
40
  var mfa_1 = require("./plugins/mfa");
68
41
  Object.defineProperty(exports, "MfaPlugin", { enumerable: true, get: function () { return mfa_1.MfaPlugin; } });
69
42
  Object.defineProperty(exports, "mfaClient", { enumerable: true, get: function () { return mfa_1.mfaClient; } });
70
43
  var multiapp_1 = require("./plugins/multiapp");
71
44
  Object.defineProperty(exports, "MultiappPlugin", { enumerable: true, get: function () { return multiapp_1.MultiappPlugin; } });
72
45
  Object.defineProperty(exports, "multiappClient", { enumerable: true, get: function () { return multiapp_1.multiappClient; } });
46
+ var sso_1 = require("./plugins/sso");
47
+ Object.defineProperty(exports, "SsoPlugin", { enumerable: true, get: function () { return sso_1.SsoPlugin; } });
48
+ Object.defineProperty(exports, "ssoClient", { enumerable: true, get: function () { return sso_1.ssoClient; } });
49
+ var compliance_1 = require("./plugins/compliance");
50
+ Object.defineProperty(exports, "CompliancePlugin", { enumerable: true, get: function () { return compliance_1.CompliancePlugin; } });
51
+ Object.defineProperty(exports, "complianceClient", { enumerable: true, get: function () { return compliance_1.complianceClient; } });
52
+ var magiclink_1 = require("./plugins/magiclink");
53
+ Object.defineProperty(exports, "MagiclinkPlugin", { enumerable: true, get: function () { return magiclink_1.MagiclinkPlugin; } });
54
+ Object.defineProperty(exports, "magiclinkClient", { enumerable: true, get: function () { return magiclink_1.magiclinkClient; } });
73
55
  var phone_1 = require("./plugins/phone");
74
56
  Object.defineProperty(exports, "PhonePlugin", { enumerable: true, get: function () { return phone_1.PhonePlugin; } });
75
57
  Object.defineProperty(exports, "phoneClient", { enumerable: true, get: function () { return phone_1.phoneClient; } });
76
- var anonymous_1 = require("./plugins/anonymous");
77
- Object.defineProperty(exports, "AnonymousPlugin", { enumerable: true, get: function () { return anonymous_1.AnonymousPlugin; } });
78
- 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; } });
58
+ var webhook_1 = require("./plugins/webhook");
59
+ Object.defineProperty(exports, "WebhookPlugin", { enumerable: true, get: function () { return webhook_1.WebhookPlugin; } });
60
+ Object.defineProperty(exports, "webhookClient", { enumerable: true, get: function () { return webhook_1.webhookClient; } });
61
+ var admin_1 = require("./plugins/admin");
62
+ Object.defineProperty(exports, "AdminPlugin", { enumerable: true, get: function () { return admin_1.AdminPlugin; } });
63
+ Object.defineProperty(exports, "adminClient", { enumerable: true, get: function () { return admin_1.adminClient; } });
64
+ var stepup_1 = require("./plugins/stepup");
65
+ Object.defineProperty(exports, "StepupPlugin", { enumerable: true, get: function () { return stepup_1.StepupPlugin; } });
66
+ Object.defineProperty(exports, "stepupClient", { enumerable: true, get: function () { return stepup_1.stepupClient; } });
67
+ var impersonation_1 = require("./plugins/impersonation");
68
+ Object.defineProperty(exports, "ImpersonationPlugin", { enumerable: true, get: function () { return impersonation_1.ImpersonationPlugin; } });
69
+ Object.defineProperty(exports, "impersonationClient", { enumerable: true, get: function () { return impersonation_1.impersonationClient; } });
70
+ var jwt_1 = require("./plugins/jwt");
71
+ Object.defineProperty(exports, "JwtPlugin", { enumerable: true, get: function () { return jwt_1.JwtPlugin; } });
72
+ Object.defineProperty(exports, "jwtClient", { enumerable: true, get: function () { return jwt_1.jwtClient; } });
73
+ var notification_1 = require("./plugins/notification");
74
+ Object.defineProperty(exports, "NotificationPlugin", { enumerable: true, get: function () { return notification_1.NotificationPlugin; } });
75
+ Object.defineProperty(exports, "notificationClient", { enumerable: true, get: function () { return notification_1.notificationClient; } });
82
76
  var username_1 = require("./plugins/username");
83
77
  Object.defineProperty(exports, "UsernamePlugin", { enumerable: true, get: function () { return username_1.UsernamePlugin; } });
84
78
  Object.defineProperty(exports, "usernameClient", { enumerable: true, get: function () { return username_1.usernameClient; } });
85
- var multisession_1 = require("./plugins/multisession");
86
- Object.defineProperty(exports, "MultisessionPlugin", { enumerable: true, get: function () { return multisession_1.MultisessionPlugin; } });
87
- Object.defineProperty(exports, "multisessionClient", { enumerable: true, get: function () { return multisession_1.multisessionClient; } });
88
79
  var consent_1 = require("./plugins/consent");
89
80
  Object.defineProperty(exports, "ConsentPlugin", { enumerable: true, get: function () { return consent_1.ConsentPlugin; } });
90
81
  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; } });
82
+ var multisession_1 = require("./plugins/multisession");
83
+ Object.defineProperty(exports, "MultisessionPlugin", { enumerable: true, get: function () { return multisession_1.MultisessionPlugin; } });
84
+ Object.defineProperty(exports, "multisessionClient", { enumerable: true, get: function () { return multisession_1.multisessionClient; } });
94
85
  var oidcprovider_1 = require("./plugins/oidcprovider");
95
86
  Object.defineProperty(exports, "OidcproviderPlugin", { enumerable: true, get: function () { return oidcprovider_1.OidcproviderPlugin; } });
96
87
  Object.defineProperty(exports, "oidcproviderClient", { enumerable: true, get: function () { return oidcprovider_1.oidcproviderClient; } });
88
+ var apikey_1 = require("./plugins/apikey");
89
+ Object.defineProperty(exports, "ApikeyPlugin", { enumerable: true, get: function () { return apikey_1.ApikeyPlugin; } });
90
+ Object.defineProperty(exports, "apikeyClient", { enumerable: true, get: function () { return apikey_1.apikeyClient; } });
91
+ var cms_1 = require("./plugins/cms");
92
+ Object.defineProperty(exports, "CmsPlugin", { enumerable: true, get: function () { return cms_1.CmsPlugin; } });
93
+ Object.defineProperty(exports, "cmsClient", { enumerable: true, get: function () { return cms_1.cmsClient; } });
94
+ var backupauth_1 = require("./plugins/backupauth");
95
+ Object.defineProperty(exports, "BackupauthPlugin", { enumerable: true, get: function () { return backupauth_1.BackupauthPlugin; } });
96
+ Object.defineProperty(exports, "backupauthClient", { enumerable: true, get: function () { return backupauth_1.backupauthClient; } });
97
97
  var organization_1 = require("./plugins/organization");
98
98
  Object.defineProperty(exports, "OrganizationPlugin", { enumerable: true, get: function () { return organization_1.OrganizationPlugin; } });
99
99
  Object.defineProperty(exports, "organizationClient", { enumerable: true, get: function () { return organization_1.organizationClient; } });
100
- var sso_1 = require("./plugins/sso");
101
- Object.defineProperty(exports, "SsoPlugin", { enumerable: true, get: function () { return sso_1.SsoPlugin; } });
102
- Object.defineProperty(exports, "ssoClient", { enumerable: true, get: function () { return sso_1.ssoClient; } });
100
+ var twofa_1 = require("./plugins/twofa");
101
+ Object.defineProperty(exports, "TwofaPlugin", { enumerable: true, get: function () { return twofa_1.TwofaPlugin; } });
102
+ Object.defineProperty(exports, "twofaClient", { enumerable: true, get: function () { return twofa_1.twofaClient; } });
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; } });
103
106
  var secrets_1 = require("./plugins/secrets");
104
107
  Object.defineProperty(exports, "SecretsPlugin", { enumerable: true, get: function () { return secrets_1.SecretsPlugin; } });
105
108
  Object.defineProperty(exports, "secretsClient", { enumerable: true, get: function () { return secrets_1.secretsClient; } });
106
109
  var social_1 = require("./plugins/social");
107
110
  Object.defineProperty(exports, "SocialPlugin", { enumerable: true, get: function () { return social_1.SocialPlugin; } });
108
111
  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; } });
@@ -11,47 +11,47 @@ class AdminPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async createUser() {
14
- const path = '/admin/users';
14
+ const path = '/users';
15
15
  return this.client.request('POST', path);
16
16
  }
17
17
  async listUsers() {
18
- const path = '/admin/users';
18
+ const path = '/users';
19
19
  return this.client.request('GET', path);
20
20
  }
21
21
  async deleteUser(params) {
22
- const path = `/admin/users/${params.id}`;
22
+ const path = `/users/${params.id}`;
23
23
  return this.client.request('DELETE', path);
24
24
  }
25
25
  async banUser(params) {
26
- const path = `/admin/users/${params.id}/ban`;
26
+ const path = `/users/${params.id}/ban`;
27
27
  return this.client.request('POST', path);
28
28
  }
29
29
  async unbanUser(params) {
30
- const path = `/admin/users/${params.id}/unban`;
30
+ const path = `/users/${params.id}/unban`;
31
31
  return this.client.request('POST', path);
32
32
  }
33
33
  async impersonateUser(params) {
34
- const path = `/admin/users/${params.id}/impersonate`;
34
+ const path = `/users/${params.id}/impersonate`;
35
35
  return this.client.request('POST', path);
36
36
  }
37
37
  async setUserRole(params) {
38
- const path = `/admin/users/${params.id}/role`;
38
+ const path = `/users/${params.id}/role`;
39
39
  return this.client.request('POST', path);
40
40
  }
41
41
  async listSessions() {
42
- const path = '/admin/sessions';
42
+ const path = '/sessions';
43
43
  return this.client.request('GET', path);
44
44
  }
45
45
  async revokeSession(params) {
46
- const path = `/admin/sessions/${params.id}`;
46
+ const path = `/sessions/${params.id}`;
47
47
  return this.client.request('DELETE', path);
48
48
  }
49
49
  async getStats() {
50
- const path = '/admin/stats';
50
+ const path = '/stats';
51
51
  return this.client.request('GET', path);
52
52
  }
53
53
  async getAuditLogs() {
54
- const path = '/admin/audit-logs';
54
+ const path = '/audit-logs';
55
55
  return this.client.request('GET', path);
56
56
  }
57
57
  }
@@ -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,43 +11,43 @@ 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 = '/createapikey';
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 = '/listapikeys';
27
21
  return this.client.request('GET', path, {
28
22
  query: this.client.toQueryParams(request),
29
23
  });
30
24
  }
31
25
  async getAPIKey(params, request) {
32
- const path = `/api-keys/${params.id}`;
26
+ const path = `/${params.id}`;
33
27
  return this.client.request('GET', path, {
34
28
  query: this.client.toQueryParams(request),
35
29
  });
36
30
  }
37
31
  async updateAPIKey(params, request) {
38
- const path = `/api-keys/${params.id}`;
32
+ const path = `/${params.id}`;
39
33
  return this.client.request('PUT', path, {
40
34
  body: request,
41
35
  });
42
36
  }
43
37
  async deleteAPIKey(params, request) {
44
- const path = `/api-keys/${params.id}`;
38
+ const path = `/${params.id}`;
45
39
  return this.client.request('DELETE', path, {
46
40
  query: this.client.toQueryParams(request),
47
41
  });
48
42
  }
43
+ async rotateAPIKey(params, request) {
44
+ const path = `/${params.id}/rotate`;
45
+ return this.client.request('POST', path, {
46
+ body: request,
47
+ });
48
+ }
49
49
  async verifyAPIKey(request) {
50
- const path = '/api-keys/verify';
50
+ const path = '/verify';
51
51
  return this.client.request('POST', path, {
52
52
  body: request,
53
53
  });