@gatwech/auth 1.0.0-beta.22 → 1.0.0-beta.24

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 (81) hide show
  1. package/dist/adapters/index.d.mts +1 -1
  2. package/dist/api/index.d.mts +1 -1
  3. package/dist/{audit-log-DgqHJ-uv.mjs → audit-log-DhRRCMrv.mjs} +21 -6
  4. package/dist/client/index.d.mts +1 -1
  5. package/dist/client/plugins/index.d.mts +27 -27
  6. package/dist/client/react/index.d.mts +1 -1
  7. package/dist/{client-ukvqpcbI.d.mts → client-CGV_kj99.d.mts} +1 -1
  8. package/dist/{client-DO9MgP_0.d.mts → client-CT-acJeN.d.mts} +1 -1
  9. package/dist/cookies/index.d.mts +2 -2
  10. package/dist/db/index.d.mts +1 -1
  11. package/dist/{index-BfLofiXO.d.mts → index-B-i2ob-C.d.mts} +9 -9
  12. package/dist/{index-CTSeVJJB.d.mts → index-B6to9CaK.d.mts} +1 -1
  13. package/dist/{index-hP8gvyp-.d.mts → index-BRUQHEUF.d.mts} +5 -5
  14. package/dist/{index-D3uQsW8T.d.mts → index-BYxt8qOP.d.mts} +33 -33
  15. package/dist/{index-CRNh-5Tc.d.mts → index-CGGitykk.d.mts} +7 -7
  16. package/dist/{index-eOfQxlQV.d.mts → index-CHMYUshk.d.mts} +13 -13
  17. package/dist/{index-Dl0bD1_6.d.mts → index-CLhlur69.d.mts} +6 -6
  18. package/dist/{index-DngQlUSI.d.mts → index-CZtQ0rUe.d.mts} +113 -113
  19. package/dist/{index-Dkm27DLN.d.mts → index-Cl9ITXy1.d.mts} +10 -10
  20. package/dist/{index-SYRh5FW7.d.mts → index-Clwezlxm.d.mts} +8 -8
  21. package/dist/{index-BzzhaGLe.d.mts → index-Czr_eQFE.d.mts} +6 -6
  22. package/dist/{index-DKirx_GW.d.mts → index-D5cyFBEb.d.mts} +4 -4
  23. package/dist/{index-BC0aAKsT.d.mts → index-D85KXOKz.d.mts} +3 -3
  24. package/dist/{index-CxhQu1HM.d.mts → index-DGRGLg16.d.mts} +2 -2
  25. package/dist/{index-B4hJVVRn.d.mts → index-DWGj7du8.d.mts} +19 -19
  26. package/dist/{index-AiKdOFSd.d.mts → index-DWSbFJWU.d.mts} +387 -49
  27. package/dist/{index-Do8AV4PF.d.mts → index-DYqQWdEv.d.mts} +13 -13
  28. package/dist/{index-DlS-HqZR.d.mts → index-Dmjw6re9.d.mts} +2 -2
  29. package/dist/{index-CRiKKdkb.d.mts → index-Dt6JhAV4.d.mts} +6 -6
  30. package/dist/{index-pdl9MzQu.d.mts → index-Hoybqpnt.d.mts} +9 -9
  31. package/dist/{index-DSoiUc1C.d.mts → index-JzSy-vFn.d.mts} +166 -166
  32. package/dist/{index-D-rjuF7p.d.mts → index-UDzaYKxq.d.mts} +9 -9
  33. package/dist/{index-CBGNX7W1.d.mts → index-rcUKPBBy.d.mts} +6 -6
  34. package/dist/index.d.mts +1 -1
  35. package/dist/integrations/next-js.d.mts +4 -4
  36. package/dist/integrations/node.d.mts +1 -1
  37. package/dist/integrations/react-start.d.mts +4 -4
  38. package/dist/oauth2/index.d.mts +1 -1
  39. package/dist/plugins/admin/index.d.mts +2 -2
  40. package/dist/plugins/anonymous/index.d.mts +2 -2
  41. package/dist/plugins/audit-log/client.d.mts +23 -23
  42. package/dist/plugins/audit-log/index.d.mts +22 -22
  43. package/dist/plugins/audit-log/index.mjs +2 -2
  44. package/dist/plugins/bearer/index.d.mts +1 -1
  45. package/dist/plugins/captcha/index.d.mts +1 -1
  46. package/dist/plugins/custom-session/index.d.mts +2 -2
  47. package/dist/plugins/device-authorization/index.d.mts +1 -1
  48. package/dist/plugins/email-otp/index.d.mts +1 -1
  49. package/dist/plugins/generic-oauth/index.d.mts +2 -2
  50. package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
  51. package/dist/plugins/index.d.mts +22 -22
  52. package/dist/plugins/index.mjs +3 -3
  53. package/dist/plugins/jwt/index.d.mts +2 -2
  54. package/dist/plugins/magic-link/index.d.mts +1 -1
  55. package/dist/plugins/multi-session/index.d.mts +1 -1
  56. package/dist/plugins/oauth-proxy/index.d.mts +1 -1
  57. package/dist/plugins/one-tap/index.d.mts +1 -1
  58. package/dist/plugins/one-time-token/index.d.mts +2 -2
  59. package/dist/plugins/one-time-token/index.mjs +3 -3
  60. package/dist/plugins/organization/index.d.mts +2 -2
  61. package/dist/plugins/passkey/index.d.mts +2 -2
  62. package/dist/plugins/phone-number/index.d.mts +2 -2
  63. package/dist/plugins/sentinel/client.d.mts +23 -23
  64. package/dist/plugins/sentinel/index.d.mts +22 -22
  65. package/dist/plugins/sentinel/index.mjs +2 -2
  66. package/dist/plugins/two-factor/index.d.mts +2 -2
  67. package/dist/plugins/username/index.d.mts +1 -1
  68. package/dist/{registry-CqG_3Qnx.mjs → registry-GztLf62p.mjs} +14 -2
  69. package/dist/{sentinel-B-2jmmZh.mjs → sentinel-b8XEetew.mjs} +265 -9
  70. package/dist/src/plugins/audit-log/events.d.ts +1 -0
  71. package/dist/src/plugins/audit-log/index.d.ts +45 -0
  72. package/dist/src/plugins/sentinel/actions.d.ts +2 -0
  73. package/dist/src/plugins/sentinel/index.d.ts +247 -0
  74. package/dist/src/plugins/sentinel/schema.d.ts +37 -0
  75. package/dist/src/plugins/sentinel/store.d.ts +34 -0
  76. package/dist/src/plugins/sentinel/types.d.ts +7 -0
  77. package/dist/src/utils/has-role.d.ts +5 -0
  78. package/dist/test-utils/index.d.mts +273 -273
  79. package/dist/test-utils/index.mjs +3 -3
  80. package/dist/types/index.d.mts +1 -1
  81. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import { s as User } from "./index-BL_t8cRp-C4QYBsac.mjs";
2
- import * as _gatwech_core7 from "@gatwech/core";
3
- import * as better_call106 from "better-call";
2
+ import * as _gatwech_core18 from "@gatwech/core";
3
+ import * as better_call45 from "better-call";
4
4
  import * as z$1 from "zod";
5
5
 
6
6
  //#region src/plugins/email-otp/index.d.ts
@@ -71,7 +71,7 @@ interface EmailOTPOptions {
71
71
  }
72
72
  declare const emailOTP: (options: EmailOTPOptions) => {
73
73
  id: "email-otp";
74
- init(ctx: _gatwech_core7.AuthContext<_gatwech_core7.PayvoAuthOptions>): {
74
+ init(ctx: _gatwech_core18.AuthContext<_gatwech_core18.PayvoAuthOptions>): {
75
75
  options: {
76
76
  emailVerification: {
77
77
  sendVerificationEmail(data: {
@@ -102,7 +102,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
102
102
  } & {
103
103
  asResponse?: boolean;
104
104
  returnHeaders?: boolean;
105
- use?: better_call106.Middleware[];
105
+ use?: better_call45.Middleware[];
106
106
  path?: string;
107
107
  } & {
108
108
  asResponse?: AsResponse | undefined;
@@ -175,7 +175,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
175
175
  } & {
176
176
  asResponse?: boolean;
177
177
  returnHeaders?: boolean;
178
- use?: better_call106.Middleware[];
178
+ use?: better_call45.Middleware[];
179
179
  path?: string;
180
180
  } & {
181
181
  asResponse?: AsResponse | undefined;
@@ -265,7 +265,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
265
265
  } & {
266
266
  asResponse?: boolean;
267
267
  returnHeaders?: boolean;
268
- use?: better_call106.Middleware[];
268
+ use?: better_call45.Middleware[];
269
269
  path?: string;
270
270
  } & {
271
271
  asResponse?: AsResponse | undefined;
@@ -350,7 +350,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
350
350
  } & {
351
351
  asResponse?: boolean;
352
352
  returnHeaders?: boolean;
353
- use?: better_call106.Middleware[];
353
+ use?: better_call45.Middleware[];
354
354
  path?: string;
355
355
  } & {
356
356
  asResponse?: AsResponse | undefined;
@@ -485,7 +485,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
485
485
  } & {
486
486
  asResponse?: boolean;
487
487
  returnHeaders?: boolean;
488
- use?: better_call106.Middleware[];
488
+ use?: better_call45.Middleware[];
489
489
  path?: string;
490
490
  } & {
491
491
  asResponse?: AsResponse | undefined;
@@ -587,7 +587,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
587
587
  } & {
588
588
  asResponse?: boolean;
589
589
  returnHeaders?: boolean;
590
- use?: better_call106.Middleware[];
590
+ use?: better_call45.Middleware[];
591
591
  path?: string;
592
592
  } & {
593
593
  asResponse?: AsResponse | undefined;
@@ -668,7 +668,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
668
668
  } & {
669
669
  asResponse?: boolean;
670
670
  returnHeaders?: boolean;
671
- use?: better_call106.Middleware[];
671
+ use?: better_call45.Middleware[];
672
672
  path?: string;
673
673
  } & {
674
674
  asResponse?: AsResponse | undefined;
@@ -749,7 +749,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
749
749
  } & {
750
750
  asResponse?: boolean;
751
751
  returnHeaders?: boolean;
752
- use?: better_call106.Middleware[];
752
+ use?: better_call45.Middleware[];
753
753
  path?: string;
754
754
  } & {
755
755
  asResponse?: AsResponse | undefined;
@@ -802,8 +802,8 @@ declare const emailOTP: (options: EmailOTPOptions) => {
802
802
  };
803
803
  hooks: {
804
804
  after: {
805
- matcher(context: _gatwech_core7.HookEndpointContext): boolean;
806
- handler: (inputContext: better_call106.MiddlewareInputContext<better_call106.MiddlewareOptions>) => Promise<void>;
805
+ matcher(context: _gatwech_core18.HookEndpointContext): boolean;
806
+ handler: (inputContext: better_call45.MiddlewareInputContext<better_call45.MiddlewareOptions>) => Promise<void>;
807
807
  }[];
808
808
  };
809
809
  $ERROR_CODES: {
@@ -1,4 +1,4 @@
1
- import * as _gatwech_core27 from "@gatwech/core";
1
+ import * as _gatwech_core34 from "@gatwech/core";
2
2
 
3
3
  //#region src/plugins/captcha/constants.d.ts
4
4
  declare const Providers: {
@@ -34,7 +34,7 @@ type CaptchaOptions = GoogleRecaptchaOptions | CloudflareTurnstileOptions | HCap
34
34
  //#region src/plugins/captcha/index.d.ts
35
35
  declare const captcha: (options: CaptchaOptions) => {
36
36
  id: "captcha";
37
- onRequest: (request: Request, ctx: _gatwech_core27.AuthContext<_gatwech_core27.PayvoAuthOptions>) => Promise<{
37
+ onRequest: (request: Request, ctx: _gatwech_core34.AuthContext<_gatwech_core34.PayvoAuthOptions>) => Promise<{
38
38
  response: Response;
39
39
  } | undefined>;
40
40
  };
@@ -1,8 +1,8 @@
1
- import { g as User, h as Session } from "./index-DngQlUSI.mjs";
1
+ import { g as User, h as Session } from "./index-CZtQ0rUe.mjs";
2
2
  import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
3
- import * as _gatwech_core37 from "@gatwech/core";
3
+ import * as _gatwech_core21 from "@gatwech/core";
4
4
  import { AuthContext, GenericEndpointContext } from "@gatwech/core";
5
- import * as better_call163 from "better-call";
5
+ import * as better_call55 from "better-call";
6
6
  import { EndpointContext } from "better-call";
7
7
 
8
8
  //#region src/plugins/anonymous/index.d.ts
@@ -77,7 +77,7 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
77
77
  } & {
78
78
  asResponse?: boolean;
79
79
  returnHeaders?: boolean;
80
- use?: better_call163.Middleware[];
80
+ use?: better_call55.Middleware[];
81
81
  path?: string;
82
82
  } & {
83
83
  asResponse?: AsResponse | undefined;
@@ -141,8 +141,8 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
141
141
  };
142
142
  hooks: {
143
143
  after: {
144
- matcher(ctx: _gatwech_core37.HookEndpointContext): boolean;
145
- handler: (inputContext: better_call163.MiddlewareInputContext<better_call163.MiddlewareOptions>) => Promise<void>;
144
+ matcher(ctx: _gatwech_core21.HookEndpointContext): boolean;
145
+ handler: (inputContext: better_call55.MiddlewareInputContext<better_call55.MiddlewareOptions>) => Promise<void>;
146
146
  }[];
147
147
  };
148
148
  schema: {
@@ -1,6 +1,6 @@
1
1
  import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
2
- import * as _gatwech_core44 from "@gatwech/core";
3
- import * as better_call208 from "better-call";
2
+ import * as _gatwech_core22 from "@gatwech/core";
3
+ import * as better_call58 from "better-call";
4
4
  import * as z$1 from "zod";
5
5
  import * as _gatwech_core_db1 from "@gatwech/core/db";
6
6
 
@@ -106,7 +106,7 @@ type UsernameOptions = {
106
106
  };
107
107
  declare const username: (options?: UsernameOptions | undefined) => {
108
108
  id: "username";
109
- init(ctx: _gatwech_core44.AuthContext<_gatwech_core44.PayvoAuthOptions>): {
109
+ init(ctx: _gatwech_core22.AuthContext<_gatwech_core22.PayvoAuthOptions>): {
110
110
  options: {
111
111
  databaseHooks: {
112
112
  user: {
@@ -119,7 +119,7 @@ declare const username: (options?: UsernameOptions | undefined) => {
119
119
  emailVerified: boolean;
120
120
  name: string;
121
121
  image?: string | null | undefined;
122
- } & Record<string, unknown>, context: _gatwech_core44.GenericEndpointContext<_gatwech_core44.PayvoAuthOptions> | undefined): Promise<{
122
+ } & Record<string, unknown>, context: _gatwech_core22.GenericEndpointContext<_gatwech_core22.PayvoAuthOptions> | undefined): Promise<{
123
123
  data: {
124
124
  displayUsername?: string | undefined;
125
125
  username?: string | undefined;
@@ -142,7 +142,7 @@ declare const username: (options?: UsernameOptions | undefined) => {
142
142
  emailVerified: boolean;
143
143
  name: string;
144
144
  image?: string | null | undefined;
145
- }> & Record<string, unknown>, context: _gatwech_core44.GenericEndpointContext<_gatwech_core44.PayvoAuthOptions> | undefined): Promise<{
145
+ }> & Record<string, unknown>, context: _gatwech_core22.GenericEndpointContext<_gatwech_core22.PayvoAuthOptions> | undefined): Promise<{
146
146
  data: {
147
147
  displayUsername?: string | undefined;
148
148
  username?: string | undefined;
@@ -182,7 +182,7 @@ declare const username: (options?: UsernameOptions | undefined) => {
182
182
  } & {
183
183
  asResponse?: boolean;
184
184
  returnHeaders?: boolean;
185
- use?: better_call208.Middleware[];
185
+ use?: better_call58.Middleware[];
186
186
  path?: string;
187
187
  } & {
188
188
  asResponse?: AsResponse | undefined;
@@ -291,7 +291,7 @@ declare const username: (options?: UsernameOptions | undefined) => {
291
291
  } & {
292
292
  asResponse?: boolean;
293
293
  returnHeaders?: boolean;
294
- use?: better_call208.Middleware[];
294
+ use?: better_call58.Middleware[];
295
295
  path?: string;
296
296
  } & {
297
297
  asResponse?: AsResponse | undefined;
@@ -340,8 +340,8 @@ declare const username: (options?: UsernameOptions | undefined) => {
340
340
  };
341
341
  hooks: {
342
342
  before: {
343
- matcher(context: _gatwech_core44.HookEndpointContext): boolean;
344
- handler: (inputContext: better_call208.MiddlewareInputContext<better_call208.MiddlewareOptions>) => Promise<void>;
343
+ matcher(context: _gatwech_core22.HookEndpointContext): boolean;
344
+ handler: (inputContext: better_call58.MiddlewareInputContext<better_call58.MiddlewareOptions>) => Promise<void>;
345
345
  }[];
346
346
  };
347
347
  $ERROR_CODES: {