better-auth 1.2.0-beta.5 → 1.2.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/adapters/drizzle.cjs +3 -3
  2. package/dist/adapters/drizzle.d.cts +1 -1
  3. package/dist/adapters/drizzle.d.ts +1 -1
  4. package/dist/adapters/drizzle.js +1 -1
  5. package/dist/adapters/kysely.cjs +3 -3
  6. package/dist/adapters/kysely.d.cts +1 -1
  7. package/dist/adapters/kysely.d.ts +1 -1
  8. package/dist/adapters/kysely.js +1 -1
  9. package/dist/adapters/memory.cjs +2 -2
  10. package/dist/adapters/memory.d.cts +1 -1
  11. package/dist/adapters/memory.d.ts +1 -1
  12. package/dist/adapters/memory.js +1 -1
  13. package/dist/adapters/mongodb.cjs +3 -3
  14. package/dist/adapters/mongodb.d.cts +1 -1
  15. package/dist/adapters/mongodb.d.ts +1 -1
  16. package/dist/adapters/mongodb.js +1 -1
  17. package/dist/adapters/prisma.cjs +3 -3
  18. package/dist/adapters/prisma.d.cts +1 -1
  19. package/dist/adapters/prisma.d.ts +1 -1
  20. package/dist/adapters/prisma.js +1 -1
  21. package/dist/adapters/test.d.cts +1 -1
  22. package/dist/adapters/test.d.ts +1 -1
  23. package/dist/api.cjs +41 -41
  24. package/dist/api.d.cts +2 -2
  25. package/dist/api.d.ts +2 -2
  26. package/dist/api.js +1 -1
  27. package/dist/{auth-DYJ8ix3G.d.cts → auth-BLwS7t0V.d.cts} +7271 -3015
  28. package/dist/{auth-BIKkqX3w.d.ts → auth-C42JqOR9.d.ts} +7271 -3015
  29. package/dist/{chunk-7P2P7Y35.js → chunk-2F3IX7O2.js} +1 -1
  30. package/dist/{chunk-VG5Y5QXC.js → chunk-4KMR5H5T.js} +1 -1
  31. package/dist/{chunk-XXGFGD3E.js → chunk-52TDJNDX.js} +11 -10
  32. package/dist/{chunk-YTMPZIP7.js → chunk-5AOJMBJI.js} +25 -3
  33. package/dist/{chunk-HQFWDJO3.cjs → chunk-5ECP2UE2.cjs} +5 -5
  34. package/dist/{chunk-VLA6IUW4.js → chunk-5G6XUCMS.js} +51 -2
  35. package/dist/{chunk-7H42DKFN.cjs → chunk-5KTUVZ3H.cjs} +5 -5
  36. package/dist/{chunk-QBBUTLKA.cjs → chunk-5RR5WN52.cjs} +5 -5
  37. package/dist/{chunk-XWK7ZOPU.cjs → chunk-75SPUXMY.cjs} +8 -8
  38. package/dist/{chunk-5LTLUS6A.js → chunk-BZOIXJ2Q.js} +1 -1
  39. package/dist/{chunk-SOFKSYNA.js → chunk-CG2CK6HR.js} +1 -1
  40. package/dist/{chunk-YZFX73MG.cjs → chunk-DURU7ZRA.cjs} +20 -20
  41. package/dist/{chunk-CLHJAEU2.js → chunk-EQYRCOOF.js} +5 -2
  42. package/dist/{chunk-IBIVHEIM.js → chunk-FX2ZHENM.js} +1 -1
  43. package/dist/{chunk-G6W6UQWJ.js → chunk-GWJDRQJ3.js} +2 -2
  44. package/dist/{chunk-C5LREWPU.cjs → chunk-HUDPJXOF.cjs} +24 -24
  45. package/dist/{chunk-DSB4P3WF.cjs → chunk-IUGQVFPG.cjs} +6 -6
  46. package/dist/{chunk-K46S33M5.cjs → chunk-K6WRBJAV.cjs} +3 -3
  47. package/dist/{chunk-C37NPGBI.cjs → chunk-KAEQXMEV.cjs} +46 -46
  48. package/dist/{chunk-CV5JTF37.cjs → chunk-KAR56MJZ.cjs} +5 -2
  49. package/dist/{chunk-6FRITF4C.cjs → chunk-LIGJVOZ4.cjs} +4 -4
  50. package/dist/{chunk-WKBV4PRW.cjs → chunk-MKNDCNWD.cjs} +3 -3
  51. package/dist/{chunk-WKXM7XUV.cjs → chunk-N7UWN6ND.cjs} +16 -4
  52. package/dist/{chunk-TV24P5IW.cjs → chunk-OALLKKNX.cjs} +52 -30
  53. package/dist/{chunk-3BXU3Z5H.js → chunk-QKCLO6S5.js} +1 -1
  54. package/dist/{chunk-E3CHTKRP.js → chunk-QLKU77BF.js} +1 -1
  55. package/dist/{chunk-CYI7H6T2.js → chunk-RMPI2YZ3.js} +1 -1
  56. package/dist/{chunk-R62AOMGV.js → chunk-SCXZXQTZ.js} +16 -4
  57. package/dist/{chunk-G365UCY7.js → chunk-ST2CQ4A2.js} +2 -2
  58. package/dist/{chunk-5RIBF22K.cjs → chunk-U44XLDNH.cjs} +22 -21
  59. package/dist/{chunk-OLGASOBP.cjs → chunk-UZNKBUDH.cjs} +11 -11
  60. package/dist/{chunk-7S7YLBK4.js → chunk-V56HFQQX.js} +1 -1
  61. package/dist/{chunk-HCHSHY7R.cjs → chunk-WD65CNWK.cjs} +77 -28
  62. package/dist/{chunk-H4A3GCFC.cjs → chunk-XKCN2VRG.cjs} +5 -5
  63. package/dist/{chunk-QG2HKEKG.js → chunk-XREMX2NV.js} +1 -1
  64. package/dist/{chunk-MHZNWING.js → chunk-ZDYKAJ67.js} +110 -2
  65. package/dist/{chunk-6QI5735F.js → chunk-ZKMUJOIP.js} +1 -1
  66. package/dist/{chunk-LHWLPZ6K.cjs → chunk-ZUUQ3FFY.cjs} +113 -5
  67. package/dist/client/plugins.d.cts +2 -2
  68. package/dist/client/plugins.d.ts +2 -2
  69. package/dist/client.d.cts +1 -1
  70. package/dist/client.d.ts +1 -1
  71. package/dist/cookies.d.cts +1 -1
  72. package/dist/cookies.d.ts +1 -1
  73. package/dist/db.cjs +12 -12
  74. package/dist/db.d.cts +2 -2
  75. package/dist/db.d.ts +2 -2
  76. package/dist/db.js +1 -1
  77. package/dist/index-Bszx4yMW.d.cts +7755 -0
  78. package/dist/index-DbIhOM3X.d.ts +7755 -0
  79. package/dist/index.cjs +11 -11
  80. package/dist/index.d.cts +2 -2
  81. package/dist/index.d.ts +2 -2
  82. package/dist/index.js +4 -4
  83. package/dist/next-js.cjs +20 -20
  84. package/dist/next-js.d.cts +1 -1
  85. package/dist/next-js.d.ts +1 -1
  86. package/dist/next-js.js +19 -19
  87. package/dist/node.d.cts +1 -1
  88. package/dist/node.d.ts +1 -1
  89. package/dist/oauth2.d.cts +2 -2
  90. package/dist/oauth2.d.ts +2 -2
  91. package/dist/plugins/admin.cjs +3 -3
  92. package/dist/plugins/admin.d.cts +134 -30
  93. package/dist/plugins/admin.d.ts +134 -30
  94. package/dist/plugins/admin.js +2 -2
  95. package/dist/plugins/anonymous.cjs +3 -3
  96. package/dist/plugins/anonymous.d.cts +7 -3
  97. package/dist/plugins/anonymous.d.ts +7 -3
  98. package/dist/plugins/anonymous.js +2 -2
  99. package/dist/plugins/bearer.cjs +3 -3
  100. package/dist/plugins/bearer.d.cts +1 -1
  101. package/dist/plugins/bearer.d.ts +1 -1
  102. package/dist/plugins/bearer.js +2 -2
  103. package/dist/plugins/custom-session.cjs +3 -3
  104. package/dist/plugins/custom-session.d.cts +7 -3
  105. package/dist/plugins/custom-session.d.ts +7 -3
  106. package/dist/plugins/custom-session.js +2 -2
  107. package/dist/plugins/email-otp.cjs +3 -3
  108. package/dist/plugins/email-otp.d.cts +43 -15
  109. package/dist/plugins/email-otp.d.ts +43 -15
  110. package/dist/plugins/email-otp.js +2 -2
  111. package/dist/plugins/generic-oauth.cjs +3 -3
  112. package/dist/plugins/generic-oauth.d.cts +90 -5
  113. package/dist/plugins/generic-oauth.d.ts +90 -5
  114. package/dist/plugins/generic-oauth.js +2 -2
  115. package/dist/plugins/jwt.cjs +3 -3
  116. package/dist/plugins/jwt.d.cts +13 -5
  117. package/dist/plugins/jwt.d.ts +13 -5
  118. package/dist/plugins/jwt.js +2 -2
  119. package/dist/plugins/magic-link.cjs +3 -3
  120. package/dist/plugins/magic-link.d.cts +16 -4
  121. package/dist/plugins/magic-link.d.ts +16 -4
  122. package/dist/plugins/magic-link.js +2 -2
  123. package/dist/plugins/multi-session.cjs +3 -3
  124. package/dist/plugins/multi-session.d.cts +19 -7
  125. package/dist/plugins/multi-session.d.ts +19 -7
  126. package/dist/plugins/multi-session.js +2 -2
  127. package/dist/plugins/oidc-provider.cjs +3 -3
  128. package/dist/plugins/oidc-provider.d.cts +42 -14
  129. package/dist/plugins/oidc-provider.d.ts +42 -14
  130. package/dist/plugins/oidc-provider.js +2 -2
  131. package/dist/plugins/one-tap.cjs +3 -3
  132. package/dist/plugins/one-tap.d.cts +6 -2
  133. package/dist/plugins/one-tap.d.ts +6 -2
  134. package/dist/plugins/one-tap.js +2 -2
  135. package/dist/plugins/open-api.cjs +4 -4
  136. package/dist/plugins/open-api.d.cts +13 -5
  137. package/dist/plugins/open-api.d.ts +13 -5
  138. package/dist/plugins/open-api.js +3 -3
  139. package/dist/plugins/organization.cjs +3 -3
  140. package/dist/plugins/organization.d.cts +2 -2
  141. package/dist/plugins/organization.d.ts +2 -2
  142. package/dist/plugins/organization.js +2 -2
  143. package/dist/plugins/passkey.cjs +14 -14
  144. package/dist/plugins/passkey.d.cts +43 -15
  145. package/dist/plugins/passkey.d.ts +43 -15
  146. package/dist/plugins/passkey.js +1 -1
  147. package/dist/plugins/phone-number.cjs +3 -3
  148. package/dist/plugins/phone-number.d.cts +32 -12
  149. package/dist/plugins/phone-number.d.ts +32 -12
  150. package/dist/plugins/phone-number.js +2 -2
  151. package/dist/plugins/sso.cjs +9 -9
  152. package/dist/plugins/sso.d.cts +19 -7
  153. package/dist/plugins/sso.d.ts +19 -7
  154. package/dist/plugins/sso.js +1 -1
  155. package/dist/plugins/two-factor.cjs +3 -3
  156. package/dist/plugins/two-factor.d.cts +61 -21
  157. package/dist/plugins/two-factor.d.ts +61 -21
  158. package/dist/plugins/two-factor.js +2 -2
  159. package/dist/plugins/username.cjs +3 -3
  160. package/dist/plugins/username.d.cts +7 -3
  161. package/dist/plugins/username.d.ts +7 -3
  162. package/dist/plugins/username.js +2 -2
  163. package/dist/plugins.cjs +39 -39
  164. package/dist/plugins.d.cts +9 -5
  165. package/dist/plugins.d.ts +9 -5
  166. package/dist/plugins.js +19 -19
  167. package/dist/react.d.cts +2 -3
  168. package/dist/react.d.ts +2 -3
  169. package/dist/solid.d.cts +1 -1
  170. package/dist/solid.d.ts +1 -1
  171. package/dist/{state-DXzHe8jb.d.ts → state-BlQHfd32.d.ts} +1 -1
  172. package/dist/{state-CEqdZ_y_.d.cts → state-lA7cG1Em.d.cts} +1 -1
  173. package/dist/svelte-kit.d.cts +1 -1
  174. package/dist/svelte-kit.d.ts +1 -1
  175. package/dist/svelte.d.cts +1 -1
  176. package/dist/svelte.d.ts +1 -1
  177. package/dist/types.d.cts +3 -3
  178. package/dist/types.d.ts +3 -3
  179. package/dist/vue.d.cts +1 -1
  180. package/dist/vue.d.ts +1 -1
  181. package/package.json +3 -3
  182. package/dist/index-BL6paKGE.d.cts +0 -4105
  183. package/dist/index-DOB91DVD.d.ts +0 -4105
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkHQFWDJO3_cjs = require('../chunk-HQFWDJO3.cjs');
4
- require('../chunk-WKXM7XUV.cjs');
3
+ var chunk5ECP2UE2_cjs = require('../chunk-5ECP2UE2.cjs');
4
+ require('../chunk-N7UWN6ND.cjs');
5
5
  require('../chunk-JDAHD767.cjs');
6
6
  require('../chunk-SVC7H7K4.cjs');
7
7
  require('../chunk-S5UORXJH.cjs');
@@ -20,5 +20,5 @@ require('../chunk-PEZRSDZS.cjs');
20
20
 
21
21
  Object.defineProperty(exports, "anonymous", {
22
22
  enumerable: true,
23
- get: function () { return chunkHQFWDJO3_cjs.anonymous; }
23
+ get: function () { return chunk5ECP2UE2_cjs.anonymous; }
24
24
  });
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../auth-DYJ8ix3G.cjs';
2
+ import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../auth-BLwS7t0V.cjs';
3
3
  import 'zod';
4
4
  import 'kysely';
5
5
  import '../helper-Bi8FQwDD.cjs';
@@ -54,7 +54,7 @@ declare const anonymous: (options?: AnonymousOptions) => {
54
54
  id: "anonymous";
55
55
  endpoints: {
56
56
  signInAnonymous: {
57
- <Context extends {
57
+ <C extends [({
58
58
  body?: undefined;
59
59
  method?: "POST" | undefined;
60
60
  query?: Record<string, any> | undefined;
@@ -65,7 +65,11 @@ declare const anonymous: (options?: AnonymousOptions) => {
65
65
  returnHeaders?: boolean | undefined;
66
66
  use?: better_call.Middleware[] | undefined;
67
67
  path?: string | undefined;
68
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
68
+ } | undefined)?]>(...inputCtx: C): Promise<C extends [{
69
+ asResponse: true;
70
+ }] ? Response : C extends [{
71
+ returnHeaders: true;
72
+ }] ? {
69
73
  headers: Headers;
70
74
  response: {
71
75
  token: string;
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../auth-BIKkqX3w.js';
2
+ import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../auth-C42JqOR9.js';
3
3
  import 'zod';
4
4
  import 'kysely';
5
5
  import '../helper-Bi8FQwDD.js';
@@ -54,7 +54,7 @@ declare const anonymous: (options?: AnonymousOptions) => {
54
54
  id: "anonymous";
55
55
  endpoints: {
56
56
  signInAnonymous: {
57
- <Context extends {
57
+ <C extends [({
58
58
  body?: undefined;
59
59
  method?: "POST" | undefined;
60
60
  query?: Record<string, any> | undefined;
@@ -65,7 +65,11 @@ declare const anonymous: (options?: AnonymousOptions) => {
65
65
  returnHeaders?: boolean | undefined;
66
66
  use?: better_call.Middleware[] | undefined;
67
67
  path?: string | undefined;
68
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
68
+ } | undefined)?]>(...inputCtx: C): Promise<C extends [{
69
+ asResponse: true;
70
+ }] ? Response : C extends [{
71
+ returnHeaders: true;
72
+ }] ? {
69
73
  headers: Headers;
70
74
  response: {
71
75
  token: string;
@@ -1,5 +1,5 @@
1
- export { anonymous } from '../chunk-6QI5735F.js';
2
- import '../chunk-R62AOMGV.js';
1
+ export { anonymous } from '../chunk-ZKMUJOIP.js';
2
+ import '../chunk-SCXZXQTZ.js';
3
3
  import '../chunk-TODG5RSV.js';
4
4
  import '../chunk-R42K7GPF.js';
5
5
  import '../chunk-XFCIANZX.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkWKBV4PRW_cjs = require('../chunk-WKBV4PRW.cjs');
4
- require('../chunk-WKXM7XUV.cjs');
3
+ var chunkMKNDCNWD_cjs = require('../chunk-MKNDCNWD.cjs');
4
+ require('../chunk-N7UWN6ND.cjs');
5
5
  require('../chunk-JDAHD767.cjs');
6
6
  require('../chunk-SVC7H7K4.cjs');
7
7
  require('../chunk-S5UORXJH.cjs');
@@ -20,5 +20,5 @@ require('../chunk-PEZRSDZS.cjs');
20
20
 
21
21
  Object.defineProperty(exports, "bearer", {
22
22
  enumerable: true,
23
- get: function () { return chunkWKBV4PRW_cjs.bearer; }
23
+ get: function () { return chunkMKNDCNWD_cjs.bearer; }
24
24
  });
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { H as HookEndpointContext } from '../auth-DYJ8ix3G.cjs';
2
+ import { H as HookEndpointContext } from '../auth-BLwS7t0V.cjs';
3
3
  import 'zod';
4
4
  import 'kysely';
5
5
  import '../helper-Bi8FQwDD.cjs';
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { H as HookEndpointContext } from '../auth-BIKkqX3w.js';
2
+ import { H as HookEndpointContext } from '../auth-C42JqOR9.js';
3
3
  import 'zod';
4
4
  import 'kysely';
5
5
  import '../helper-Bi8FQwDD.js';
@@ -1,5 +1,5 @@
1
- export { bearer } from '../chunk-5LTLUS6A.js';
2
- import '../chunk-R62AOMGV.js';
1
+ export { bearer } from '../chunk-BZOIXJ2Q.js';
2
+ import '../chunk-SCXZXQTZ.js';
3
3
  import '../chunk-TODG5RSV.js';
4
4
  import '../chunk-R42K7GPF.js';
5
5
  import '../chunk-XFCIANZX.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkK46S33M5_cjs = require('../chunk-K46S33M5.cjs');
4
- require('../chunk-WKXM7XUV.cjs');
3
+ var chunkK6WRBJAV_cjs = require('../chunk-K6WRBJAV.cjs');
4
+ require('../chunk-N7UWN6ND.cjs');
5
5
  require('../chunk-JDAHD767.cjs');
6
6
  require('../chunk-SVC7H7K4.cjs');
7
7
  require('../chunk-S5UORXJH.cjs');
@@ -20,5 +20,5 @@ require('../chunk-PEZRSDZS.cjs');
20
20
 
21
21
  Object.defineProperty(exports, "customSession", {
22
22
  enumerable: true,
23
- get: function () { return chunkK46S33M5_cjs.customSession; }
23
+ get: function () { return chunkK6WRBJAV_cjs.customSession; }
24
24
  });
@@ -1,6 +1,6 @@
1
1
  import * as better_call from 'better-call';
2
2
  import { z } from 'zod';
3
- import { B as BetterAuthOptions, k as InferUser, l as InferSession } from '../auth-DYJ8ix3G.cjs';
3
+ import { B as BetterAuthOptions, k as InferUser, l as InferSession } from '../auth-BLwS7t0V.cjs';
4
4
  import 'kysely';
5
5
  import '../helper-Bi8FQwDD.cjs';
6
6
  import '../index-BuRgaJZR.cjs';
@@ -14,7 +14,7 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
14
14
  id: "custom-session";
15
15
  endpoints: {
16
16
  getSession: {
17
- <Context extends {
17
+ <C extends [({
18
18
  body?: undefined;
19
19
  method?: "GET" | undefined;
20
20
  query?: {
@@ -28,7 +28,11 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
28
28
  returnHeaders?: boolean | undefined;
29
29
  use?: better_call.Middleware[] | undefined;
30
30
  path?: string | undefined;
31
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
31
+ } | undefined)?]>(...inputCtx: C): Promise<C extends [{
32
+ asResponse: true;
33
+ }] ? Response : C extends [{
34
+ returnHeaders: true;
35
+ }] ? {
32
36
  headers: Headers;
33
37
  response: Returns | null;
34
38
  } : Returns | null>;
@@ -1,6 +1,6 @@
1
1
  import * as better_call from 'better-call';
2
2
  import { z } from 'zod';
3
- import { B as BetterAuthOptions, k as InferUser, l as InferSession } from '../auth-BIKkqX3w.js';
3
+ import { B as BetterAuthOptions, k as InferUser, l as InferSession } from '../auth-C42JqOR9.js';
4
4
  import 'kysely';
5
5
  import '../helper-Bi8FQwDD.js';
6
6
  import '../index-moQjyfmm.js';
@@ -14,7 +14,7 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
14
14
  id: "custom-session";
15
15
  endpoints: {
16
16
  getSession: {
17
- <Context extends {
17
+ <C extends [({
18
18
  body?: undefined;
19
19
  method?: "GET" | undefined;
20
20
  query?: {
@@ -28,7 +28,11 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
28
28
  returnHeaders?: boolean | undefined;
29
29
  use?: better_call.Middleware[] | undefined;
30
30
  path?: string | undefined;
31
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
31
+ } | undefined)?]>(...inputCtx: C): Promise<C extends [{
32
+ asResponse: true;
33
+ }] ? Response : C extends [{
34
+ returnHeaders: true;
35
+ }] ? {
32
36
  headers: Headers;
33
37
  response: Returns | null;
34
38
  } : Returns | null>;
@@ -1,5 +1,5 @@
1
- export { customSession } from '../chunk-VG5Y5QXC.js';
2
- import '../chunk-R62AOMGV.js';
1
+ export { customSession } from '../chunk-4KMR5H5T.js';
2
+ import '../chunk-SCXZXQTZ.js';
3
3
  import '../chunk-TODG5RSV.js';
4
4
  import '../chunk-R42K7GPF.js';
5
5
  import '../chunk-XFCIANZX.js';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkC5LREWPU_cjs = require('../chunk-C5LREWPU.cjs');
3
+ var chunkHUDPJXOF_cjs = require('../chunk-HUDPJXOF.cjs');
4
4
  require('../chunk-JUPDDQC4.cjs');
5
- require('../chunk-WKXM7XUV.cjs');
5
+ require('../chunk-N7UWN6ND.cjs');
6
6
  require('../chunk-JDAHD767.cjs');
7
7
  require('../chunk-SVC7H7K4.cjs');
8
8
  require('../chunk-S5UORXJH.cjs');
@@ -21,5 +21,5 @@ require('../chunk-PEZRSDZS.cjs');
21
21
 
22
22
  Object.defineProperty(exports, "emailOTP", {
23
23
  enumerable: true,
24
- get: function () { return chunkC5LREWPU_cjs.emailOTP; }
24
+ get: function () { return chunkHUDPJXOF_cjs.emailOTP; }
25
25
  });
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import * as better_call from 'better-call';
3
- import { H as HookEndpointContext } from '../auth-DYJ8ix3G.cjs';
3
+ import { H as HookEndpointContext } from '../auth-BLwS7t0V.cjs';
4
4
  import 'kysely';
5
5
  import '../helper-Bi8FQwDD.cjs';
6
6
  import '../index-BuRgaJZR.cjs';
@@ -46,7 +46,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
46
46
  id: "email-otp";
47
47
  endpoints: {
48
48
  sendVerificationOTP: {
49
- <Context extends {
49
+ <C extends [{
50
50
  body: {
51
51
  email: string;
52
52
  type: "sign-in" | "forget-password" | "email-verification";
@@ -60,7 +60,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
60
60
  returnHeaders?: boolean | undefined;
61
61
  use?: better_call.Middleware[] | undefined;
62
62
  path?: string | undefined;
63
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
63
+ }]>(...inputCtx: C): Promise<C extends [{
64
+ asResponse: true;
65
+ }] ? Response : C extends [{
66
+ returnHeaders: true;
67
+ }] ? {
64
68
  headers: Headers;
65
69
  response: {
66
70
  success: boolean;
@@ -108,7 +112,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
108
112
  path: "/email-otp/send-verification-otp";
109
113
  };
110
114
  createVerificationOTP: {
111
- <Context extends {
115
+ <C extends [{
112
116
  body: {
113
117
  email: string;
114
118
  type: "sign-in" | "forget-password" | "email-verification";
@@ -122,7 +126,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
122
126
  returnHeaders?: boolean | undefined;
123
127
  use?: better_call.Middleware[] | undefined;
124
128
  path?: string | undefined;
125
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
129
+ }]>(...inputCtx: C): Promise<C extends [{
130
+ asResponse: true;
131
+ }] ? Response : C extends [{
132
+ returnHeaders: true;
133
+ }] ? {
126
134
  headers: Headers;
127
135
  response: string;
128
136
  } : string>;
@@ -162,7 +170,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
162
170
  path: "/email-otp/create-verification-otp";
163
171
  };
164
172
  getVerificationOTP: {
165
- <Context extends {
173
+ <C extends [{
166
174
  query: {
167
175
  email: string;
168
176
  type: "sign-in" | "forget-password" | "email-verification";
@@ -176,7 +184,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
176
184
  returnHeaders?: boolean | undefined;
177
185
  use?: better_call.Middleware[] | undefined;
178
186
  path?: string | undefined;
179
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
187
+ }]>(...inputCtx: C): Promise<C extends [{
188
+ asResponse: true;
189
+ }] ? Response : C extends [{
190
+ returnHeaders: true;
191
+ }] ? {
180
192
  headers: Headers;
181
193
  response: {
182
194
  otp: null;
@@ -229,7 +241,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
229
241
  path: "/email-otp/get-verification-otp";
230
242
  };
231
243
  verifyEmailOTP: {
232
- <Context extends {
244
+ <C extends [{
233
245
  body: {
234
246
  email: string;
235
247
  otp: string;
@@ -243,7 +255,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
243
255
  returnHeaders?: boolean | undefined;
244
256
  use?: better_call.Middleware[] | undefined;
245
257
  path?: string | undefined;
246
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
258
+ }]>(...inputCtx: C): Promise<C extends [{
259
+ asResponse: true;
260
+ }] ? Response : C extends [{
261
+ returnHeaders: true;
262
+ }] ? {
247
263
  headers: Headers;
248
264
  response: {
249
265
  status: boolean;
@@ -335,7 +351,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
335
351
  path: "/email-otp/verify-email";
336
352
  };
337
353
  signInEmailOTP: {
338
- <Context extends {
354
+ <C extends [{
339
355
  body: {
340
356
  email: string;
341
357
  otp: string;
@@ -349,7 +365,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
349
365
  returnHeaders?: boolean | undefined;
350
366
  use?: better_call.Middleware[] | undefined;
351
367
  path?: string | undefined;
352
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
368
+ }]>(...inputCtx: C): Promise<C extends [{
369
+ asResponse: true;
370
+ }] ? Response : C extends [{
371
+ returnHeaders: true;
372
+ }] ? {
353
373
  headers: Headers;
354
374
  response: {
355
375
  token: string;
@@ -418,7 +438,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
418
438
  path: "/sign-in/email-otp";
419
439
  };
420
440
  forgetPasswordEmailOTP: {
421
- <Context extends {
441
+ <C extends [{
422
442
  body: {
423
443
  email: string;
424
444
  };
@@ -431,7 +451,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
431
451
  returnHeaders?: boolean | undefined;
432
452
  use?: better_call.Middleware[] | undefined;
433
453
  path?: string | undefined;
434
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
454
+ }]>(...inputCtx: C): Promise<C extends [{
455
+ asResponse: true;
456
+ }] ? Response : C extends [{
457
+ returnHeaders: true;
458
+ }] ? {
435
459
  headers: Headers;
436
460
  response: {
437
461
  success: boolean;
@@ -476,7 +500,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
476
500
  path: "/forget-password/email-otp";
477
501
  };
478
502
  resetPasswordEmailOTP: {
479
- <Context extends {
503
+ <C extends [{
480
504
  body: {
481
505
  password: string;
482
506
  email: string;
@@ -491,7 +515,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
491
515
  returnHeaders?: boolean | undefined;
492
516
  use?: better_call.Middleware[] | undefined;
493
517
  path?: string | undefined;
494
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
518
+ }]>(...inputCtx: C): Promise<C extends [{
519
+ asResponse: true;
520
+ }] ? Response : C extends [{
521
+ returnHeaders: true;
522
+ }] ? {
495
523
  headers: Headers;
496
524
  response: {
497
525
  success: boolean;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import * as better_call from 'better-call';
3
- import { H as HookEndpointContext } from '../auth-BIKkqX3w.js';
3
+ import { H as HookEndpointContext } from '../auth-C42JqOR9.js';
4
4
  import 'kysely';
5
5
  import '../helper-Bi8FQwDD.js';
6
6
  import '../index-moQjyfmm.js';
@@ -46,7 +46,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
46
46
  id: "email-otp";
47
47
  endpoints: {
48
48
  sendVerificationOTP: {
49
- <Context extends {
49
+ <C extends [{
50
50
  body: {
51
51
  email: string;
52
52
  type: "sign-in" | "forget-password" | "email-verification";
@@ -60,7 +60,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
60
60
  returnHeaders?: boolean | undefined;
61
61
  use?: better_call.Middleware[] | undefined;
62
62
  path?: string | undefined;
63
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
63
+ }]>(...inputCtx: C): Promise<C extends [{
64
+ asResponse: true;
65
+ }] ? Response : C extends [{
66
+ returnHeaders: true;
67
+ }] ? {
64
68
  headers: Headers;
65
69
  response: {
66
70
  success: boolean;
@@ -108,7 +112,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
108
112
  path: "/email-otp/send-verification-otp";
109
113
  };
110
114
  createVerificationOTP: {
111
- <Context extends {
115
+ <C extends [{
112
116
  body: {
113
117
  email: string;
114
118
  type: "sign-in" | "forget-password" | "email-verification";
@@ -122,7 +126,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
122
126
  returnHeaders?: boolean | undefined;
123
127
  use?: better_call.Middleware[] | undefined;
124
128
  path?: string | undefined;
125
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
129
+ }]>(...inputCtx: C): Promise<C extends [{
130
+ asResponse: true;
131
+ }] ? Response : C extends [{
132
+ returnHeaders: true;
133
+ }] ? {
126
134
  headers: Headers;
127
135
  response: string;
128
136
  } : string>;
@@ -162,7 +170,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
162
170
  path: "/email-otp/create-verification-otp";
163
171
  };
164
172
  getVerificationOTP: {
165
- <Context extends {
173
+ <C extends [{
166
174
  query: {
167
175
  email: string;
168
176
  type: "sign-in" | "forget-password" | "email-verification";
@@ -176,7 +184,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
176
184
  returnHeaders?: boolean | undefined;
177
185
  use?: better_call.Middleware[] | undefined;
178
186
  path?: string | undefined;
179
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
187
+ }]>(...inputCtx: C): Promise<C extends [{
188
+ asResponse: true;
189
+ }] ? Response : C extends [{
190
+ returnHeaders: true;
191
+ }] ? {
180
192
  headers: Headers;
181
193
  response: {
182
194
  otp: null;
@@ -229,7 +241,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
229
241
  path: "/email-otp/get-verification-otp";
230
242
  };
231
243
  verifyEmailOTP: {
232
- <Context extends {
244
+ <C extends [{
233
245
  body: {
234
246
  email: string;
235
247
  otp: string;
@@ -243,7 +255,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
243
255
  returnHeaders?: boolean | undefined;
244
256
  use?: better_call.Middleware[] | undefined;
245
257
  path?: string | undefined;
246
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
258
+ }]>(...inputCtx: C): Promise<C extends [{
259
+ asResponse: true;
260
+ }] ? Response : C extends [{
261
+ returnHeaders: true;
262
+ }] ? {
247
263
  headers: Headers;
248
264
  response: {
249
265
  status: boolean;
@@ -335,7 +351,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
335
351
  path: "/email-otp/verify-email";
336
352
  };
337
353
  signInEmailOTP: {
338
- <Context extends {
354
+ <C extends [{
339
355
  body: {
340
356
  email: string;
341
357
  otp: string;
@@ -349,7 +365,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
349
365
  returnHeaders?: boolean | undefined;
350
366
  use?: better_call.Middleware[] | undefined;
351
367
  path?: string | undefined;
352
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
368
+ }]>(...inputCtx: C): Promise<C extends [{
369
+ asResponse: true;
370
+ }] ? Response : C extends [{
371
+ returnHeaders: true;
372
+ }] ? {
353
373
  headers: Headers;
354
374
  response: {
355
375
  token: string;
@@ -418,7 +438,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
418
438
  path: "/sign-in/email-otp";
419
439
  };
420
440
  forgetPasswordEmailOTP: {
421
- <Context extends {
441
+ <C extends [{
422
442
  body: {
423
443
  email: string;
424
444
  };
@@ -431,7 +451,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
431
451
  returnHeaders?: boolean | undefined;
432
452
  use?: better_call.Middleware[] | undefined;
433
453
  path?: string | undefined;
434
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
454
+ }]>(...inputCtx: C): Promise<C extends [{
455
+ asResponse: true;
456
+ }] ? Response : C extends [{
457
+ returnHeaders: true;
458
+ }] ? {
435
459
  headers: Headers;
436
460
  response: {
437
461
  success: boolean;
@@ -476,7 +500,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
476
500
  path: "/forget-password/email-otp";
477
501
  };
478
502
  resetPasswordEmailOTP: {
479
- <Context extends {
503
+ <C extends [{
480
504
  body: {
481
505
  password: string;
482
506
  email: string;
@@ -491,7 +515,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
491
515
  returnHeaders?: boolean | undefined;
492
516
  use?: better_call.Middleware[] | undefined;
493
517
  path?: string | undefined;
494
- }>(...inputCtx: better_call.HasRequiredKeys<Context> extends true ? [Context] : [(Context | undefined)?]): Promise<Context["asResponse"] extends true ? Response : Context["returnHeaders"] extends true ? {
518
+ }]>(...inputCtx: C): Promise<C extends [{
519
+ asResponse: true;
520
+ }] ? Response : C extends [{
521
+ returnHeaders: true;
522
+ }] ? {
495
523
  headers: Headers;
496
524
  response: {
497
525
  success: boolean;
@@ -1,6 +1,6 @@
1
- export { emailOTP } from '../chunk-E3CHTKRP.js';
1
+ export { emailOTP } from '../chunk-QLKU77BF.js';
2
2
  import '../chunk-JEYF2ARX.js';
3
- import '../chunk-R62AOMGV.js';
3
+ import '../chunk-SCXZXQTZ.js';
4
4
  import '../chunk-TODG5RSV.js';
5
5
  import '../chunk-R42K7GPF.js';
6
6
  import '../chunk-XFCIANZX.js';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkLHWLPZ6K_cjs = require('../chunk-LHWLPZ6K.cjs');
4
- require('../chunk-WKXM7XUV.cjs');
3
+ var chunkZUUQ3FFY_cjs = require('../chunk-ZUUQ3FFY.cjs');
4
+ require('../chunk-N7UWN6ND.cjs');
5
5
  require('../chunk-JDAHD767.cjs');
6
6
  require('../chunk-SVC7H7K4.cjs');
7
7
  require('../chunk-S5UORXJH.cjs');
@@ -20,5 +20,5 @@ require('../chunk-PEZRSDZS.cjs');
20
20
 
21
21
  Object.defineProperty(exports, "genericOAuth", {
22
22
  enumerable: true,
23
- get: function () { return chunkLHWLPZ6K_cjs.genericOAuth; }
23
+ get: function () { return chunkZUUQ3FFY_cjs.genericOAuth; }
24
24
  });