@gatwech/auth 1.0.0-beta.19 → 1.0.0-beta.20

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 (61) hide show
  1. package/dist/client/index.d.mts +16 -16
  2. package/dist/client/plugins/index.d.mts +45 -45
  3. package/dist/client/react/index.d.mts +14 -14
  4. package/dist/{client-DZHNfxuR.d.mts → client-C_qmyez2.d.mts} +4 -4
  5. package/dist/{client-CSOs1YN7.d.mts → client-F67q-Lbi.d.mts} +1 -1
  6. package/dist/{index-Blmhq6eA.d.mts → index-4I1YhYhk.d.mts} +4 -4
  7. package/dist/{index-mxEUX2Gs.d.mts → index-BX7rl07Z.d.mts} +13 -13
  8. package/dist/{index-xoYsoOiR.d.mts → index-Bml-PCqP.d.mts} +20 -20
  9. package/dist/{index-DG-X1PK5.d.mts → index-BsSKcKgO.d.mts} +5 -5
  10. package/dist/{index-CP3FNbOZ.d.mts → index-CBiGsvDd.d.mts} +7 -7
  11. package/dist/{index-CUknVRZp.d.mts → index-CC920PPp.d.mts} +13 -13
  12. package/dist/{index-zBdYQGaS.d.mts → index-CNd5jqLl.d.mts} +5 -5
  13. package/dist/{index-DS-R7st3.d.mts → index-CP8x1TFq.d.mts} +6 -6
  14. package/dist/{index-CaqpCfE5.d.mts → index-CofuaNMl.d.mts} +6 -6
  15. package/dist/{index-Cv9iMevV.d.mts → index-CzpdkTdv.d.mts} +9 -9
  16. package/dist/{index-DRM35ir1.d.mts → index-D57DuhZR.d.mts} +110 -110
  17. package/dist/{index-DXVU0HGr.d.mts → index-D6ku0rUC.d.mts} +4 -4
  18. package/dist/{index-BAVzFqII.d.mts → index-DFSRYWFI.d.mts} +6 -6
  19. package/dist/{index-CgeC2eGC.d.mts → index-DGeoJ4gu.d.mts} +2 -2
  20. package/dist/{index-DyH_CgmX.d.mts → index-DTkcY7xH.d.mts} +10 -10
  21. package/dist/{index-COGe8UJx.d.mts → index-Dnd8S4S4.d.mts} +8 -8
  22. package/dist/{index-Df4SvZaE.d.mts → index-DwPAddfE.d.mts} +3 -3
  23. package/dist/{index-Db8jqUq2.d.mts → index-DyXi7S2M.d.mts} +9 -9
  24. package/dist/{index-CKnPAS5n.d.mts → index-KhbNmMmG.d.mts} +165 -165
  25. package/dist/{index-EABwA_BH.d.mts → index-XfE0WjTN.d.mts} +32 -32
  26. package/dist/{index-BNDRYfTF.d.mts → index-sb-UFLuo.d.mts} +2 -2
  27. package/dist/integrations/next-js.d.mts +4 -4
  28. package/dist/integrations/react-start.d.mts +4 -4
  29. package/dist/plugins/admin/index.d.mts +1 -1
  30. package/dist/plugins/anonymous/index.d.mts +1 -1
  31. package/dist/plugins/audit-log/client.d.mts +22 -22
  32. package/dist/plugins/audit-log/index.d.mts +21 -21
  33. package/dist/plugins/bearer/index.d.mts +1 -1
  34. package/dist/plugins/captcha/index.d.mts +1 -1
  35. package/dist/plugins/custom-session/index.d.mts +1 -1
  36. package/dist/plugins/device-authorization/index.d.mts +1 -1
  37. package/dist/plugins/email-otp/index.d.mts +1 -1
  38. package/dist/plugins/generic-oauth/index.d.mts +1 -1
  39. package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
  40. package/dist/plugins/index.d.mts +21 -21
  41. package/dist/plugins/index.mjs +1 -1
  42. package/dist/plugins/jwt/index.d.mts +1 -1
  43. package/dist/plugins/magic-link/index.d.mts +1 -1
  44. package/dist/plugins/multi-session/index.d.mts +1 -1
  45. package/dist/plugins/oauth-proxy/index.d.mts +1 -1
  46. package/dist/plugins/one-tap/index.d.mts +1 -1
  47. package/dist/plugins/one-time-token/index.d.mts +1 -1
  48. package/dist/plugins/one-time-token/index.mjs +1 -1
  49. package/dist/plugins/organization/index.d.mts +1 -1
  50. package/dist/plugins/passkey/index.d.mts +1 -1
  51. package/dist/plugins/phone-number/index.d.mts +1 -1
  52. package/dist/plugins/sentinel/client.d.mts +22 -22
  53. package/dist/plugins/sentinel/index.d.mts +21 -21
  54. package/dist/plugins/sentinel/index.mjs +1 -1
  55. package/dist/plugins/two-factor/index.d.mts +1 -1
  56. package/dist/plugins/username/index.d.mts +1 -1
  57. package/dist/{sentinel-C-D1IHJo.mjs → sentinel-DiPqydKG.mjs} +39 -8
  58. package/dist/src/plugins/sentinel/email.d.ts +9 -3
  59. package/dist/test-utils/index.d.mts +1042 -1042
  60. package/dist/test-utils/index.mjs +1 -1
  61. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
- import * as _gatwech_core42 from "@gatwech/core";
2
- import * as better_call198 from "better-call";
1
+ import * as _gatwech_core23 from "@gatwech/core";
2
+ import * as better_call60 from "better-call";
3
3
  import * as z$1 from "zod";
4
4
 
5
5
  //#region src/plugins/oauth-proxy/index.d.ts
@@ -48,7 +48,7 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
48
48
  } & {
49
49
  asResponse?: boolean;
50
50
  returnHeaders?: boolean;
51
- use?: better_call198.Middleware[];
51
+ use?: better_call60.Middleware[];
52
52
  path?: string;
53
53
  } & {
54
54
  asResponse?: AsResponse | undefined;
@@ -63,7 +63,7 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
63
63
  callbackURL: z$1.ZodString;
64
64
  cookies: z$1.ZodString;
65
65
  }, z$1.core.$strip>;
66
- use: ((inputContext: better_call198.MiddlewareInputContext<better_call198.MiddlewareOptions>) => Promise<void>)[];
66
+ use: ((inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<void>)[];
67
67
  metadata: {
68
68
  openapi: {
69
69
  description: string;
@@ -96,12 +96,12 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
96
96
  };
97
97
  hooks: {
98
98
  after: {
99
- matcher(context: _gatwech_core42.HookEndpointContext): boolean;
100
- handler: (inputContext: better_call198.MiddlewareInputContext<better_call198.MiddlewareOptions>) => Promise<void>;
99
+ matcher(context: _gatwech_core23.HookEndpointContext): boolean;
100
+ handler: (inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<void>;
101
101
  }[];
102
102
  before: ({
103
103
  matcher(): true;
104
- handler: (inputContext: better_call198.MiddlewareInputContext<better_call198.MiddlewareOptions>) => Promise<{
104
+ handler: (inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<{
105
105
  context: {
106
106
  context: {
107
107
  oauthConfig: {
@@ -111,9 +111,9 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
111
111
  };
112
112
  } | undefined>;
113
113
  } | {
114
- matcher(context: _gatwech_core42.HookEndpointContext): boolean;
115
- handler: (inputContext: better_call198.MiddlewareInputContext<better_call198.MiddlewareOptions>) => Promise<{
116
- context: better_call198.MiddlewareContext<better_call198.MiddlewareOptions, _gatwech_core42.AuthContext<_gatwech_core42.PayvoAuthOptions> & {
114
+ matcher(context: _gatwech_core23.HookEndpointContext): boolean;
115
+ handler: (inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<{
116
+ context: better_call60.MiddlewareContext<better_call60.MiddlewareOptions, _gatwech_core23.AuthContext<_gatwech_core23.PayvoAuthOptions> & {
117
117
  returned?: unknown | undefined;
118
118
  responseHeaders?: Headers | undefined;
119
119
  }>;
@@ -1,9 +1,9 @@
1
1
  import { t as Awaitable } from "./helper-BgOIGHsu.mjs";
2
2
  import { On as index_d_exports, g as User, h as Session } from "./index-BNhJglHC.mjs";
3
3
  import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
4
- import * as _gatwech_core0 from "@gatwech/core";
4
+ import * as _gatwech_core48 from "@gatwech/core";
5
5
  import { GenericEndpointContext } from "@gatwech/core";
6
- import * as better_call6 from "better-call";
6
+ import * as better_call114 from "better-call";
7
7
  import * as z$1 from "zod";
8
8
  import * as jose0 from "jose";
9
9
  import { JSONWebKeySet, JWTPayload } from "jose";
@@ -250,7 +250,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
250
250
  } & {
251
251
  asResponse?: boolean;
252
252
  returnHeaders?: boolean;
253
- use?: better_call6.Middleware[];
253
+ use?: better_call114.Middleware[];
254
254
  path?: string;
255
255
  } & {
256
256
  asResponse?: AsResponse | undefined;
@@ -355,7 +355,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
355
355
  } & {
356
356
  asResponse?: boolean;
357
357
  returnHeaders?: boolean;
358
- use?: better_call6.Middleware[];
358
+ use?: better_call114.Middleware[];
359
359
  path?: string;
360
360
  } & {
361
361
  asResponse?: AsResponse | undefined;
@@ -371,7 +371,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
371
371
  options: {
372
372
  method: "GET";
373
373
  requireHeaders: true;
374
- use: ((inputContext: better_call6.MiddlewareInputContext<better_call6.MiddlewareOptions>) => Promise<{
374
+ use: ((inputContext: better_call114.MiddlewareInputContext<better_call114.MiddlewareOptions>) => Promise<{
375
375
  session: {
376
376
  session: Record<string, any> & {
377
377
  id: string;
@@ -440,7 +440,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
440
440
  } & {
441
441
  asResponse?: boolean;
442
442
  returnHeaders?: boolean;
443
- use?: better_call6.Middleware[];
443
+ use?: better_call114.Middleware[];
444
444
  path?: string;
445
445
  } & {
446
446
  asResponse?: AsResponse | undefined;
@@ -476,8 +476,8 @@ declare const jwt: (options?: JwtOptions | undefined) => {
476
476
  };
477
477
  hooks: {
478
478
  after: {
479
- matcher(context: _gatwech_core0.HookEndpointContext): boolean;
480
- handler: (inputContext: better_call6.MiddlewareInputContext<better_call6.MiddlewareOptions>) => Promise<void>;
479
+ matcher(context: _gatwech_core48.HookEndpointContext): boolean;
480
+ handler: (inputContext: better_call114.MiddlewareInputContext<better_call114.MiddlewareOptions>) => Promise<void>;
481
481
  }[];
482
482
  };
483
483
  schema: {
@@ -1,4 +1,4 @@
1
- import * as _gatwech_core46 from "@gatwech/core";
1
+ import * as _gatwech_core11 from "@gatwech/core";
2
2
 
3
3
  //#region src/plugins/haveibeenpwned/index.d.ts
4
4
 
@@ -13,7 +13,7 @@ interface HaveIBeenPwnedOptions {
13
13
  }
14
14
  declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => {
15
15
  id: "haveIBeenPwned";
16
- init(ctx: _gatwech_core46.AuthContext<_gatwech_core46.PayvoAuthOptions>): {
16
+ init(ctx: _gatwech_core11.AuthContext<_gatwech_core11.PayvoAuthOptions>): {
17
17
  context: {
18
18
  password: {
19
19
  hash(password: string): Promise<string>;
@@ -25,7 +25,7 @@ declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => {
25
25
  minPasswordLength: number;
26
26
  maxPasswordLength: number;
27
27
  };
28
- checkPassword: (userId: string, ctx: _gatwech_core46.GenericEndpointContext<_gatwech_core46.PayvoAuthOptions>) => Promise<boolean>;
28
+ checkPassword: (userId: string, ctx: _gatwech_core11.GenericEndpointContext<_gatwech_core11.PayvoAuthOptions>) => Promise<boolean>;
29
29
  };
30
30
  };
31
31
  };
@@ -1,6 +1,6 @@
1
1
  import { o as Session, s as User } from "./index-Df0KhQRf-BEa5tdwJ.mjs";
2
- import * as _gatwech_core9 from "@gatwech/core";
3
- import * as better_call131 from "better-call";
2
+ import * as _gatwech_core30 from "@gatwech/core";
3
+ import * as better_call83 from "better-call";
4
4
  import * as z$1 from "zod";
5
5
 
6
6
  //#region src/plugins/multi-session/index.d.ts
@@ -46,7 +46,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
46
46
  } & {
47
47
  asResponse?: boolean;
48
48
  returnHeaders?: boolean;
49
- use?: better_call131.Middleware[];
49
+ use?: better_call83.Middleware[];
50
50
  path?: string;
51
51
  } & {
52
52
  asResponse?: AsResponse | undefined;
@@ -102,7 +102,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
102
102
  } & {
103
103
  asResponse?: boolean;
104
104
  returnHeaders?: boolean;
105
- use?: better_call131.Middleware[];
105
+ use?: better_call83.Middleware[];
106
106
  path?: string;
107
107
  } & {
108
108
  asResponse?: AsResponse | undefined;
@@ -123,7 +123,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
123
123
  sessionToken: z$1.ZodString;
124
124
  }, z$1.core.$strip>;
125
125
  requireHeaders: true;
126
- use: ((inputContext: better_call131.MiddlewareInputContext<better_call131.MiddlewareOptions>) => Promise<{
126
+ use: ((inputContext: better_call83.MiddlewareInputContext<better_call83.MiddlewareOptions>) => Promise<{
127
127
  session: {
128
128
  session: Record<string, any> & {
129
129
  id: string;
@@ -206,7 +206,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
206
206
  } & {
207
207
  asResponse?: boolean;
208
208
  returnHeaders?: boolean;
209
- use?: better_call131.Middleware[];
209
+ use?: better_call83.Middleware[];
210
210
  path?: string;
211
211
  } & {
212
212
  asResponse?: AsResponse | undefined;
@@ -225,7 +225,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
225
225
  sessionToken: z$1.ZodString;
226
226
  }, z$1.core.$strip>;
227
227
  requireHeaders: true;
228
- use: ((inputContext: better_call131.MiddlewareInputContext<better_call131.MiddlewareOptions>) => Promise<{
228
+ use: ((inputContext: better_call83.MiddlewareInputContext<better_call83.MiddlewareOptions>) => Promise<{
229
229
  session: {
230
230
  session: Record<string, any> & {
231
231
  id: string;
@@ -278,8 +278,8 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
278
278
  };
279
279
  hooks: {
280
280
  after: {
281
- matcher: (context: _gatwech_core9.HookEndpointContext) => boolean;
282
- handler: (inputContext: better_call131.MiddlewareInputContext<better_call131.MiddlewareOptions>) => Promise<void>;
281
+ matcher: (context: _gatwech_core30.HookEndpointContext) => boolean;
282
+ handler: (inputContext: better_call83.MiddlewareInputContext<better_call83.MiddlewareOptions>) => Promise<void>;
283
283
  }[];
284
284
  };
285
285
  $ERROR_CODES: {