@authsome/client 0.0.1 → 0.0.2

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/CHANGELOG.md +38 -0
  2. package/README.md +392 -0
  3. package/RELEASE_CHECKLIST.md +162 -0
  4. package/RELEASE_v0.0.2.md +126 -0
  5. package/authsome-client-0.0.2.tgz +0 -0
  6. package/dist/client.d.ts +57 -1
  7. package/dist/client.js +39 -8
  8. package/dist/index.d.ts +25 -25
  9. package/dist/index.js +78 -26
  10. package/dist/plugins/oidcprovider.d.ts +1 -1
  11. package/dist/plugins/webhook.d.ts +3 -3
  12. package/dist/plugins/webhook.js +4 -4
  13. package/dist/types.d.ts +2471 -2531
  14. package/package.json +3 -24
  15. package/src/client.ts +257 -0
  16. package/src/errors.ts +92 -0
  17. package/src/index.ts +33 -0
  18. package/src/plugin.ts +13 -0
  19. package/src/plugins/admin.ts +84 -0
  20. package/src/plugins/anonymous.ts +31 -0
  21. package/src/plugins/apikey.ts +56 -0
  22. package/src/plugins/backupauth.ts +208 -0
  23. package/src/plugins/compliance.ts +204 -0
  24. package/src/plugins/consent.ts +125 -0
  25. package/src/plugins/emailotp.ts +33 -0
  26. package/src/plugins/idverification.ts +80 -0
  27. package/src/plugins/impersonation.ts +53 -0
  28. package/src/plugins/jwt.ts +44 -0
  29. package/src/plugins/magiclink.ts +31 -0
  30. package/src/plugins/mfa.ts +111 -0
  31. package/src/plugins/multiapp.ts +116 -0
  32. package/src/plugins/multisession.ts +36 -0
  33. package/src/plugins/notification.ts +98 -0
  34. package/src/plugins/oidcprovider.ts +90 -0
  35. package/src/plugins/organization.ts +99 -0
  36. package/src/plugins/passkey.ts +54 -0
  37. package/src/plugins/phone.ts +40 -0
  38. package/src/plugins/social.ts +48 -0
  39. package/src/plugins/sso.ts +55 -0
  40. package/src/plugins/stepup.ts +97 -0
  41. package/src/plugins/twofa.ts +61 -0
  42. package/src/plugins/username.ts +29 -0
  43. package/src/plugins/webhook.ts +50 -0
  44. package/src/types.ts +3677 -0
  45. package/tsconfig.json +16 -0
package/dist/client.d.ts CHANGED
@@ -1,5 +1,30 @@
1
1
  import { ClientPlugin } from './plugin';
2
2
  import * as types from './types';
3
+ import { SsoPlugin } from './plugins/sso';
4
+ import { TwofaPlugin } from './plugins/twofa';
5
+ import { WebhookPlugin } from './plugins/webhook';
6
+ import { AdminPlugin } from './plugins/admin';
7
+ import { ApikeyPlugin } from './plugins/apikey';
8
+ import { EmailotpPlugin } from './plugins/emailotp';
9
+ import { BackupauthPlugin } from './plugins/backupauth';
10
+ import { CompliancePlugin } from './plugins/compliance';
11
+ import { ImpersonationPlugin } from './plugins/impersonation';
12
+ import { MagiclinkPlugin } from './plugins/magiclink';
13
+ import { MultiappPlugin } from './plugins/multiapp';
14
+ import { AnonymousPlugin } from './plugins/anonymous';
15
+ import { JwtPlugin } from './plugins/jwt';
16
+ import { MfaPlugin } from './plugins/mfa';
17
+ import { MultisessionPlugin } from './plugins/multisession';
18
+ import { NotificationPlugin } from './plugins/notification';
19
+ import { OidcproviderPlugin } from './plugins/oidcprovider';
20
+ import { OrganizationPlugin } from './plugins/organization';
21
+ import { PasskeyPlugin } from './plugins/passkey';
22
+ import { SocialPlugin } from './plugins/social';
23
+ import { UsernamePlugin } from './plugins/username';
24
+ import { ConsentPlugin } from './plugins/consent';
25
+ import { IdverificationPlugin } from './plugins/idverification';
26
+ import { StepupPlugin } from './plugins/stepup';
27
+ import { PhonePlugin } from './plugins/phone';
3
28
  /**
4
29
  * AuthSome client configuration
5
30
  * Supports multiple authentication methods that can be used simultaneously:
@@ -22,9 +47,12 @@ export interface AuthsomeClientConfig {
22
47
  apiKeyHeader?: string;
23
48
  /** Custom headers to include with all requests */
24
49
  headers?: Record<string, string>;
50
+ /** Base path prefix for all API routes (default: '') */
51
+ basePath?: string;
25
52
  }
26
53
  export declare class AuthsomeClient {
27
54
  private baseURL;
55
+ private basePath;
28
56
  private token?;
29
57
  private apiKey?;
30
58
  private apiKeyHeader;
@@ -45,7 +73,35 @@ export declare class AuthsomeClient {
45
73
  * WARNING: Never expose secret keys in client-side code (browser, mobile apps)
46
74
  */
47
75
  setSecretKey(secretKey: string): void;
76
+ setBasePath(basePath: string): void;
48
77
  getPlugin<T extends ClientPlugin>(id: string): T | undefined;
78
+ readonly $plugins: {
79
+ sso: () => SsoPlugin | undefined;
80
+ twofa: () => TwofaPlugin | undefined;
81
+ webhook: () => WebhookPlugin | undefined;
82
+ admin: () => AdminPlugin | undefined;
83
+ apikey: () => ApikeyPlugin | undefined;
84
+ emailotp: () => EmailotpPlugin | undefined;
85
+ backupauth: () => BackupauthPlugin | undefined;
86
+ compliance: () => CompliancePlugin | undefined;
87
+ impersonation: () => ImpersonationPlugin | undefined;
88
+ magiclink: () => MagiclinkPlugin | undefined;
89
+ multiapp: () => MultiappPlugin | undefined;
90
+ anonymous: () => AnonymousPlugin | undefined;
91
+ jwt: () => JwtPlugin | undefined;
92
+ mfa: () => MfaPlugin | undefined;
93
+ multisession: () => MultisessionPlugin | undefined;
94
+ notification: () => NotificationPlugin | undefined;
95
+ oidcprovider: () => OidcproviderPlugin | undefined;
96
+ organization: () => OrganizationPlugin | undefined;
97
+ passkey: () => PasskeyPlugin | undefined;
98
+ social: () => SocialPlugin | undefined;
99
+ username: () => UsernamePlugin | undefined;
100
+ consent: () => ConsentPlugin | undefined;
101
+ idverification: () => IdverificationPlugin | undefined;
102
+ stepup: () => StepupPlugin | undefined;
103
+ phone: () => PhonePlugin | undefined;
104
+ };
49
105
  request<T>(method: string, path: string, options?: {
50
106
  body?: any;
51
107
  query?: Record<string, string>;
@@ -71,8 +127,8 @@ export declare class AuthsomeClient {
71
127
  success: boolean;
72
128
  }>;
73
129
  getSession(): Promise<{
74
- session: types.Session;
75
130
  user: types.User;
131
+ session: types.Session;
76
132
  }>;
77
133
  updateUser(request: {
78
134
  name?: string;
package/dist/client.js CHANGED
@@ -5,7 +5,35 @@ exports.AuthsomeClient = void 0;
5
5
  const errors_1 = require("./errors");
6
6
  class AuthsomeClient {
7
7
  constructor(config) {
8
+ this.$plugins = {
9
+ sso: () => this.getPlugin('sso'),
10
+ twofa: () => this.getPlugin('twofa'),
11
+ webhook: () => this.getPlugin('webhook'),
12
+ admin: () => this.getPlugin('admin'),
13
+ apikey: () => this.getPlugin('apikey'),
14
+ emailotp: () => this.getPlugin('emailotp'),
15
+ backupauth: () => this.getPlugin('backupauth'),
16
+ compliance: () => this.getPlugin('compliance'),
17
+ impersonation: () => this.getPlugin('impersonation'),
18
+ magiclink: () => this.getPlugin('magiclink'),
19
+ multiapp: () => this.getPlugin('multiapp'),
20
+ anonymous: () => this.getPlugin('anonymous'),
21
+ jwt: () => this.getPlugin('jwt'),
22
+ mfa: () => this.getPlugin('mfa'),
23
+ multisession: () => this.getPlugin('multisession'),
24
+ notification: () => this.getPlugin('notification'),
25
+ oidcprovider: () => this.getPlugin('oidcprovider'),
26
+ organization: () => this.getPlugin('organization'),
27
+ passkey: () => this.getPlugin('passkey'),
28
+ social: () => this.getPlugin('social'),
29
+ username: () => this.getPlugin('username'),
30
+ consent: () => this.getPlugin('consent'),
31
+ idverification: () => this.getPlugin('idverification'),
32
+ stepup: () => this.getPlugin('stepup'),
33
+ phone: () => this.getPlugin('phone'),
34
+ };
8
35
  this.baseURL = config.baseURL;
36
+ this.basePath = config.basePath || '';
9
37
  this.token = config.token;
10
38
  this.apiKey = config.apiKey;
11
39
  this.apiKeyHeader = config.apiKeyHeader || 'X-API-Key';
@@ -49,11 +77,14 @@ class AuthsomeClient {
49
77
  }
50
78
  this.setApiKey(secretKey);
51
79
  }
80
+ setBasePath(basePath) {
81
+ this.basePath = basePath;
82
+ }
52
83
  getPlugin(id) {
53
84
  return this.plugins.get(id);
54
85
  }
55
86
  async request(method, path, options) {
56
- const url = new URL(path, this.baseURL);
87
+ const url = new URL(this.basePath + path, this.baseURL);
57
88
  if (options?.query) {
58
89
  for (const [key, value] of Object.entries(options.query)) {
59
90
  url.searchParams.append(key, value);
@@ -82,44 +113,44 @@ class AuthsomeClient {
82
113
  return response.json();
83
114
  }
84
115
  async signUp(request) {
85
- const path = '/api/auth/signup';
116
+ const path = '/signup';
86
117
  return this.request('POST', path, {
87
118
  body: request,
88
119
  });
89
120
  }
90
121
  async signIn(request) {
91
- const path = '/api/auth/signin';
122
+ const path = '/signin';
92
123
  return this.request('POST', path, {
93
124
  body: request,
94
125
  });
95
126
  }
96
127
  async signOut() {
97
- const path = '/api/auth/signout';
128
+ const path = '/signout';
98
129
  return this.request('POST', path, {
99
130
  auth: true,
100
131
  });
101
132
  }
102
133
  async getSession() {
103
- const path = '/api/auth/session';
134
+ const path = '/session';
104
135
  return this.request('GET', path, {
105
136
  auth: true,
106
137
  });
107
138
  }
108
139
  async updateUser(request) {
109
- const path = '/api/auth/user/update';
140
+ const path = '/user/update';
110
141
  return this.request('POST', path, {
111
142
  body: request,
112
143
  auth: true,
113
144
  });
114
145
  }
115
146
  async listDevices() {
116
- const path = '/api/auth/devices';
147
+ const path = '/devices';
117
148
  return this.request('GET', path, {
118
149
  auth: true,
119
150
  });
120
151
  }
121
152
  async revokeDevice(request) {
122
- const path = '/api/auth/devices/revoke';
153
+ const path = '/devices/revoke';
123
154
  return this.request('POST', path, {
124
155
  body: request,
125
156
  auth: true,
package/dist/index.d.ts CHANGED
@@ -2,28 +2,28 @@ export { AuthsomeClient, AuthsomeClientConfig } from './client';
2
2
  export { ClientPlugin } from './plugin';
3
3
  export * from './types';
4
4
  export * from './errors';
5
- export * from './plugins/consent';
6
- export * from './plugins/idverification';
7
- export * from './plugins/stepup';
8
- export * from './plugins/organization';
9
- export * from './plugins/social';
10
- export * from './plugins/sso';
11
- export * from './plugins/backupauth';
12
- export * from './plugins/multiapp';
13
- export * from './plugins/twofa';
14
- export * from './plugins/username';
15
- export * from './plugins/webhook';
16
- export * from './plugins/apikey';
17
- export * from './plugins/impersonation';
18
- export * from './plugins/jwt';
19
- export * from './plugins/magiclink';
20
- export * from './plugins/multisession';
21
- export * from './plugins/notification';
22
- export * from './plugins/passkey';
23
- export * from './plugins/phone';
24
- export * from './plugins/emailotp';
25
- export * from './plugins/compliance';
26
- export * from './plugins/mfa';
27
- export * from './plugins/oidcprovider';
28
- export * from './plugins/admin';
29
- export * from './plugins/anonymous';
5
+ export { SsoPlugin, ssoClient } from './plugins/sso';
6
+ export { TwofaPlugin, twofaClient } from './plugins/twofa';
7
+ export { WebhookPlugin, webhookClient } from './plugins/webhook';
8
+ export { AdminPlugin, adminClient } from './plugins/admin';
9
+ export { ApikeyPlugin, apikeyClient } from './plugins/apikey';
10
+ export { EmailotpPlugin, emailotpClient } from './plugins/emailotp';
11
+ export { BackupauthPlugin, backupauthClient } from './plugins/backupauth';
12
+ export { CompliancePlugin, complianceClient } from './plugins/compliance';
13
+ export { ImpersonationPlugin, impersonationClient } from './plugins/impersonation';
14
+ export { MagiclinkPlugin, magiclinkClient } from './plugins/magiclink';
15
+ export { MultiappPlugin, multiappClient } from './plugins/multiapp';
16
+ export { AnonymousPlugin, anonymousClient } from './plugins/anonymous';
17
+ export { JwtPlugin, jwtClient } from './plugins/jwt';
18
+ export { MfaPlugin, mfaClient } from './plugins/mfa';
19
+ export { MultisessionPlugin, multisessionClient } from './plugins/multisession';
20
+ export { NotificationPlugin, notificationClient } from './plugins/notification';
21
+ export { OidcproviderPlugin, oidcproviderClient } from './plugins/oidcprovider';
22
+ export { OrganizationPlugin, organizationClient } from './plugins/organization';
23
+ export { PasskeyPlugin, passkeyClient } from './plugins/passkey';
24
+ export { SocialPlugin, socialClient } from './plugins/social';
25
+ export { UsernamePlugin, usernameClient } from './plugins/username';
26
+ export { ConsentPlugin, consentClient } from './plugins/consent';
27
+ export { IdverificationPlugin, idverificationClient } from './plugins/idverification';
28
+ export { StepupPlugin, stepupClient } from './plugins/stepup';
29
+ export { PhonePlugin, phoneClient } from './plugins/phone';
package/dist/index.js CHANGED
@@ -15,33 +15,85 @@ 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.AuthsomeClient = void 0;
18
+ exports.PhonePlugin = exports.stepupClient = exports.StepupPlugin = exports.idverificationClient = exports.IdverificationPlugin = exports.consentClient = exports.ConsentPlugin = exports.usernameClient = exports.UsernamePlugin = exports.socialClient = exports.SocialPlugin = exports.passkeyClient = exports.PasskeyPlugin = exports.organizationClient = exports.OrganizationPlugin = exports.oidcproviderClient = exports.OidcproviderPlugin = exports.notificationClient = exports.NotificationPlugin = exports.multisessionClient = exports.MultisessionPlugin = exports.mfaClient = exports.MfaPlugin = exports.jwtClient = exports.JwtPlugin = exports.anonymousClient = exports.AnonymousPlugin = exports.multiappClient = exports.MultiappPlugin = exports.magiclinkClient = exports.MagiclinkPlugin = exports.impersonationClient = exports.ImpersonationPlugin = exports.complianceClient = exports.CompliancePlugin = exports.backupauthClient = exports.BackupauthPlugin = exports.emailotpClient = exports.EmailotpPlugin = exports.apikeyClient = exports.ApikeyPlugin = exports.adminClient = exports.AdminPlugin = exports.webhookClient = exports.WebhookPlugin = exports.twofaClient = exports.TwofaPlugin = exports.ssoClient = exports.SsoPlugin = exports.AuthsomeClient = void 0;
19
+ exports.phoneClient = void 0;
19
20
  var client_1 = require("./client");
20
21
  Object.defineProperty(exports, "AuthsomeClient", { enumerable: true, get: function () { return client_1.AuthsomeClient; } });
21
22
  __exportStar(require("./types"), exports);
22
23
  __exportStar(require("./errors"), exports);
23
- __exportStar(require("./plugins/consent"), exports);
24
- __exportStar(require("./plugins/idverification"), exports);
25
- __exportStar(require("./plugins/stepup"), exports);
26
- __exportStar(require("./plugins/organization"), exports);
27
- __exportStar(require("./plugins/social"), exports);
28
- __exportStar(require("./plugins/sso"), exports);
29
- __exportStar(require("./plugins/backupauth"), exports);
30
- __exportStar(require("./plugins/multiapp"), exports);
31
- __exportStar(require("./plugins/twofa"), exports);
32
- __exportStar(require("./plugins/username"), exports);
33
- __exportStar(require("./plugins/webhook"), exports);
34
- __exportStar(require("./plugins/apikey"), exports);
35
- __exportStar(require("./plugins/impersonation"), exports);
36
- __exportStar(require("./plugins/jwt"), exports);
37
- __exportStar(require("./plugins/magiclink"), exports);
38
- __exportStar(require("./plugins/multisession"), exports);
39
- __exportStar(require("./plugins/notification"), exports);
40
- __exportStar(require("./plugins/passkey"), exports);
41
- __exportStar(require("./plugins/phone"), exports);
42
- __exportStar(require("./plugins/emailotp"), exports);
43
- __exportStar(require("./plugins/compliance"), exports);
44
- __exportStar(require("./plugins/mfa"), exports);
45
- __exportStar(require("./plugins/oidcprovider"), exports);
46
- __exportStar(require("./plugins/admin"), exports);
47
- __exportStar(require("./plugins/anonymous"), exports);
24
+ // Plugin exports
25
+ var sso_1 = require("./plugins/sso");
26
+ Object.defineProperty(exports, "SsoPlugin", { enumerable: true, get: function () { return sso_1.SsoPlugin; } });
27
+ Object.defineProperty(exports, "ssoClient", { enumerable: true, get: function () { return sso_1.ssoClient; } });
28
+ var twofa_1 = require("./plugins/twofa");
29
+ Object.defineProperty(exports, "TwofaPlugin", { enumerable: true, get: function () { return twofa_1.TwofaPlugin; } });
30
+ Object.defineProperty(exports, "twofaClient", { enumerable: true, get: function () { return twofa_1.twofaClient; } });
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 admin_1 = require("./plugins/admin");
35
+ Object.defineProperty(exports, "AdminPlugin", { enumerable: true, get: function () { return admin_1.AdminPlugin; } });
36
+ Object.defineProperty(exports, "adminClient", { enumerable: true, get: function () { return admin_1.adminClient; } });
37
+ var apikey_1 = require("./plugins/apikey");
38
+ Object.defineProperty(exports, "ApikeyPlugin", { enumerable: true, get: function () { return apikey_1.ApikeyPlugin; } });
39
+ Object.defineProperty(exports, "apikeyClient", { enumerable: true, get: function () { return apikey_1.apikeyClient; } });
40
+ var emailotp_1 = require("./plugins/emailotp");
41
+ Object.defineProperty(exports, "EmailotpPlugin", { enumerable: true, get: function () { return emailotp_1.EmailotpPlugin; } });
42
+ Object.defineProperty(exports, "emailotpClient", { enumerable: true, get: function () { return emailotp_1.emailotpClient; } });
43
+ var backupauth_1 = require("./plugins/backupauth");
44
+ Object.defineProperty(exports, "BackupauthPlugin", { enumerable: true, get: function () { return backupauth_1.BackupauthPlugin; } });
45
+ Object.defineProperty(exports, "backupauthClient", { enumerable: true, get: function () { return backupauth_1.backupauthClient; } });
46
+ var compliance_1 = require("./plugins/compliance");
47
+ Object.defineProperty(exports, "CompliancePlugin", { enumerable: true, get: function () { return compliance_1.CompliancePlugin; } });
48
+ Object.defineProperty(exports, "complianceClient", { enumerable: true, get: function () { return compliance_1.complianceClient; } });
49
+ var impersonation_1 = require("./plugins/impersonation");
50
+ Object.defineProperty(exports, "ImpersonationPlugin", { enumerable: true, get: function () { return impersonation_1.ImpersonationPlugin; } });
51
+ Object.defineProperty(exports, "impersonationClient", { enumerable: true, get: function () { return impersonation_1.impersonationClient; } });
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; } });
55
+ var multiapp_1 = require("./plugins/multiapp");
56
+ Object.defineProperty(exports, "MultiappPlugin", { enumerable: true, get: function () { return multiapp_1.MultiappPlugin; } });
57
+ Object.defineProperty(exports, "multiappClient", { enumerable: true, get: function () { return multiapp_1.multiappClient; } });
58
+ var anonymous_1 = require("./plugins/anonymous");
59
+ Object.defineProperty(exports, "AnonymousPlugin", { enumerable: true, get: function () { return anonymous_1.AnonymousPlugin; } });
60
+ Object.defineProperty(exports, "anonymousClient", { enumerable: true, get: function () { return anonymous_1.anonymousClient; } });
61
+ var jwt_1 = require("./plugins/jwt");
62
+ Object.defineProperty(exports, "JwtPlugin", { enumerable: true, get: function () { return jwt_1.JwtPlugin; } });
63
+ Object.defineProperty(exports, "jwtClient", { enumerable: true, get: function () { return jwt_1.jwtClient; } });
64
+ var mfa_1 = require("./plugins/mfa");
65
+ Object.defineProperty(exports, "MfaPlugin", { enumerable: true, get: function () { return mfa_1.MfaPlugin; } });
66
+ Object.defineProperty(exports, "mfaClient", { enumerable: true, get: function () { return mfa_1.mfaClient; } });
67
+ var multisession_1 = require("./plugins/multisession");
68
+ Object.defineProperty(exports, "MultisessionPlugin", { enumerable: true, get: function () { return multisession_1.MultisessionPlugin; } });
69
+ Object.defineProperty(exports, "multisessionClient", { enumerable: true, get: function () { return multisession_1.multisessionClient; } });
70
+ var notification_1 = require("./plugins/notification");
71
+ Object.defineProperty(exports, "NotificationPlugin", { enumerable: true, get: function () { return notification_1.NotificationPlugin; } });
72
+ Object.defineProperty(exports, "notificationClient", { enumerable: true, get: function () { return notification_1.notificationClient; } });
73
+ var oidcprovider_1 = require("./plugins/oidcprovider");
74
+ Object.defineProperty(exports, "OidcproviderPlugin", { enumerable: true, get: function () { return oidcprovider_1.OidcproviderPlugin; } });
75
+ Object.defineProperty(exports, "oidcproviderClient", { enumerable: true, get: function () { return oidcprovider_1.oidcproviderClient; } });
76
+ var organization_1 = require("./plugins/organization");
77
+ Object.defineProperty(exports, "OrganizationPlugin", { enumerable: true, get: function () { return organization_1.OrganizationPlugin; } });
78
+ Object.defineProperty(exports, "organizationClient", { enumerable: true, get: function () { return organization_1.organizationClient; } });
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 social_1 = require("./plugins/social");
83
+ Object.defineProperty(exports, "SocialPlugin", { enumerable: true, get: function () { return social_1.SocialPlugin; } });
84
+ Object.defineProperty(exports, "socialClient", { enumerable: true, get: function () { return social_1.socialClient; } });
85
+ var username_1 = require("./plugins/username");
86
+ Object.defineProperty(exports, "UsernamePlugin", { enumerable: true, get: function () { return username_1.UsernamePlugin; } });
87
+ Object.defineProperty(exports, "usernameClient", { enumerable: true, get: function () { return username_1.usernameClient; } });
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 idverification_1 = require("./plugins/idverification");
92
+ Object.defineProperty(exports, "IdverificationPlugin", { enumerable: true, get: function () { return idverification_1.IdverificationPlugin; } });
93
+ Object.defineProperty(exports, "idverificationClient", { enumerable: true, get: function () { return idverification_1.idverificationClient; } });
94
+ var stepup_1 = require("./plugins/stepup");
95
+ Object.defineProperty(exports, "StepupPlugin", { enumerable: true, get: function () { return stepup_1.StepupPlugin; } });
96
+ Object.defineProperty(exports, "stepupClient", { enumerable: true, get: function () { return stepup_1.stepupClient; } });
97
+ var phone_1 = require("./plugins/phone");
98
+ Object.defineProperty(exports, "PhonePlugin", { enumerable: true, get: function () { return phone_1.PhonePlugin; } });
99
+ Object.defineProperty(exports, "phoneClient", { enumerable: true, get: function () { return phone_1.phoneClient; } });
@@ -17,6 +17,6 @@ export declare class OidcproviderPlugin implements ClientPlugin {
17
17
  token(request: types.TokenRequest): Promise<void>;
18
18
  userInfo(): Promise<void>;
19
19
  introspectToken(): Promise<void>;
20
- revokeToken(): Promise<types.responses.StatusResponse>;
20
+ revokeToken(): Promise<types.StatusResponse>;
21
21
  }
22
22
  export declare function oidcproviderClient(): OidcproviderPlugin;
@@ -6,9 +6,9 @@ export declare class WebhookPlugin implements ClientPlugin {
6
6
  private client;
7
7
  init(client: AuthsomeClient): void;
8
8
  create(request: {
9
+ url: string;
9
10
  events: string[];
10
11
  secret?: string;
11
- url: string;
12
12
  }): Promise<{
13
13
  webhook: types.Webhook;
14
14
  }>;
@@ -16,10 +16,10 @@ export declare class WebhookPlugin implements ClientPlugin {
16
16
  webhooks: types.Webhook[];
17
17
  }>;
18
18
  update(request: {
19
- id: string;
20
- url?: string;
21
19
  events?: string[];
22
20
  enabled?: boolean;
21
+ id: string;
22
+ url?: string;
23
23
  }): Promise<{
24
24
  webhook: types.Webhook;
25
25
  }>;
@@ -11,27 +11,27 @@ class WebhookPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async create(request) {
14
- const path = '/api/auth/webhooks';
14
+ const path = '/webhooks';
15
15
  return this.client.request('POST', path, {
16
16
  body: request,
17
17
  auth: true,
18
18
  });
19
19
  }
20
20
  async list() {
21
- const path = '/api/auth/webhooks';
21
+ const path = '/webhooks';
22
22
  return this.client.request('GET', path, {
23
23
  auth: true,
24
24
  });
25
25
  }
26
26
  async update(request) {
27
- const path = '/api/auth/webhooks/update';
27
+ const path = '/webhooks/update';
28
28
  return this.client.request('POST', path, {
29
29
  body: request,
30
30
  auth: true,
31
31
  });
32
32
  }
33
33
  async delete(request) {
34
- const path = '/api/auth/webhooks/delete';
34
+ const path = '/webhooks/delete';
35
35
  return this.client.request('POST', path, {
36
36
  body: request,
37
37
  auth: true,