better-auth 1.4.4-beta.3 → 1.4.6-beta.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.
- package/dist/{adapter-factory-CXEYdBBi.mjs → adapter-factory-HF3JB9cT.mjs} +2 -0
- package/dist/adapters/drizzle-adapter/index.mjs +1 -1
- package/dist/adapters/index.d.mts +6 -7
- package/dist/adapters/index.mjs +1 -1
- package/dist/adapters/kysely-adapter/index.mjs +1 -1
- package/dist/adapters/memory-adapter/index.mjs +1 -1
- package/dist/adapters/mongodb-adapter/index.mjs +1 -1
- package/dist/adapters/prisma-adapter/index.mjs +1 -1
- package/dist/api/index.d.mts +2 -3
- package/dist/auth/minimal.d.mts +2 -3
- package/dist/client/index.d.mts +201 -4
- package/dist/client/lynx/index.d.mts +17 -18
- package/dist/client/plugins/index.d.mts +44 -44
- package/dist/client/react/index.d.mts +15 -16
- package/dist/client/solid/index.d.mts +2 -3
- package/dist/client/svelte/index.d.mts +17 -18
- package/dist/client/vue/index.d.mts +17 -18
- package/dist/cookies/index.d.mts +3 -4
- package/dist/db/index.d.mts +2 -3
- package/dist/{index-BsRgjUAv.d.mts → index--dkKT2P2.d.mts} +5 -5
- package/dist/{index-BVJL9NCo.d.mts → index-73Iin-Jq.d.mts} +6 -6
- package/dist/{index-B_1KAoYv.d.mts → index-BVpFCwyn.d.mts} +4 -4
- package/dist/{index-CL-QZ1hb.d.mts → index-BcnaxwZM.d.mts} +9 -9
- package/dist/{index-CnSDnpiK.d.mts → index-Be0syNaw.d.mts} +13 -13
- package/dist/{index-CJ4w3OzO.d.mts → index-BevOkArW.d.mts} +155 -347
- package/dist/{index-Br01_oSy.d.mts → index-BfHctM9K.d.mts} +7 -7
- package/dist/{index-Hid3pW0N.d.mts → index-Bqj2Kztr.d.mts} +9 -9
- package/dist/{index-DAPxdOKi.d.mts → index-Bt92FfJd.d.mts} +32 -32
- package/dist/{index-Dy2g8XKv.d.mts → index-BvZWUEoC.d.mts} +6 -6
- package/dist/{index-0xgBgtem.d.mts → index-CGKooORC.d.mts} +3 -3
- package/dist/{index-BkD9iyuk.d.mts → index-CLll1XPI.d.mts} +8 -8
- package/dist/{index-WXoTnrFA.d.mts → index-CWcnHbjn.d.mts} +2 -2
- package/dist/{index-DrEnqtuQ.d.mts → index-CfdutUAu.d.mts} +6 -6
- package/dist/{index-COEqRbac.d.mts → index-D0UwTS5_.d.mts} +15 -15
- package/dist/{index-BGKXL3Av.d.mts → index-DA5jLHwS.d.mts} +1 -1
- package/dist/{index-CGBSkAO7.d.mts → index-DlOKn_yt.d.mts} +11 -11
- package/dist/{index-CujXvEf8.d.mts → index-Dqjfj0PE.d.mts} +344 -344
- package/dist/{index-wHdZCXFM.d.mts → index-RbmRVtaI.d.mts} +3 -3
- package/dist/{index-DgwGZQ6M.d.mts → index-akAuJUJt.d.mts} +8 -8
- package/dist/{index-DqkPFN8B.d.mts → index-hBQ1qSDX.d.mts} +4 -4
- package/dist/{index-K2ZMxFny.d.mts → index-pQ7I9EOb.d.mts} +2 -2
- package/dist/index.d.mts +4 -5
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/node.d.mts +2 -3
- package/dist/integrations/svelte-kit.d.mts +4 -5
- package/dist/integrations/tanstack-start.d.mts +2 -2
- package/dist/oauth2/index.d.mts +2 -3
- package/dist/plugins/access/index.d.mts +1 -1
- package/dist/plugins/admin/access/index.d.mts +23 -23
- package/dist/plugins/admin/index.d.mts +23 -23
- package/dist/plugins/anonymous/index.d.mts +3 -4
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/custom-session/index.d.mts +3 -4
- package/dist/plugins/device-authorization/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +3 -4
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/index.d.mts +23 -23
- package/dist/plugins/jwt/index.d.mts +3 -4
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oidc-provider/index.d.mts +23 -23
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-time-token/index.d.mts +3 -4
- package/dist/plugins/open-api/index.d.mts +1 -1
- package/dist/plugins/organization/access/index.d.mts +23 -23
- package/dist/plugins/organization/index.d.mts +23 -23
- package/dist/plugins/phone-number/index.d.mts +3 -4
- package/dist/plugins/siwe/index.d.mts +3 -4
- package/dist/plugins/two-factor/index.d.mts +3 -4
- package/dist/plugins/username/index.d.mts +2 -2
- package/dist/test-utils/index.d.mts +1152 -1153
- package/dist/types/index.d.mts +4 -5
- package/package.json +3 -3
- /package/dist/{index-D8MBzSjs.d.mts → index-rnNTrfA7.d.mts} +0 -0
- /package/dist/{plugins-SfZpwDiz.d.mts → plugins-Dmw3tk5H.d.mts} +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Xt as InferErrorCodes, Yt as InferClientAPI, en as IsSignal, qt as InferActions, tn as SessionQueryParams } from "../../index-BevOkArW.mjs";
|
|
2
2
|
import "../../types-CEepZ-RG.mjs";
|
|
3
3
|
import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-DFzV6jvx.mjs";
|
|
4
|
-
import "../../
|
|
5
|
-
import "../../plugins-SfZpwDiz.mjs";
|
|
4
|
+
import "../../plugins-Dmw3tk5H.mjs";
|
|
6
5
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
7
6
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
8
7
|
import * as nanostores0 from "nanostores";
|
|
9
8
|
import { Store, StoreValue } from "nanostores";
|
|
10
|
-
import * as
|
|
9
|
+
import * as _better_fetch_fetch15 from "@better-fetch/fetch";
|
|
11
10
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
12
11
|
import { DependencyList } from "react";
|
|
13
12
|
export * from "nanostores";
|
|
@@ -97,21 +96,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
97
96
|
error: null;
|
|
98
97
|
} ? S : Res : never>;
|
|
99
98
|
};
|
|
100
|
-
$fetch:
|
|
101
|
-
plugins: (
|
|
99
|
+
$fetch: _better_fetch_fetch15.BetterFetch<{
|
|
100
|
+
plugins: (_better_fetch_fetch15.BetterFetchPlugin | {
|
|
102
101
|
id: string;
|
|
103
102
|
name: string;
|
|
104
103
|
hooks: {
|
|
105
|
-
onSuccess(context:
|
|
104
|
+
onSuccess(context: _better_fetch_fetch15.SuccessContext<any>): void;
|
|
106
105
|
};
|
|
107
106
|
} | {
|
|
108
107
|
id: string;
|
|
109
108
|
name: string;
|
|
110
109
|
hooks: {
|
|
111
|
-
onSuccess: ((context:
|
|
112
|
-
onError: ((context:
|
|
113
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
114
|
-
onResponse: ((context:
|
|
110
|
+
onSuccess: ((context: _better_fetch_fetch15.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
111
|
+
onError: ((context: _better_fetch_fetch15.ErrorContext) => Promise<void> | void) | undefined;
|
|
112
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch15.RequestContext<T>) => Promise<_better_fetch_fetch15.RequestContext | void> | _better_fetch_fetch15.RequestContext | void) | undefined;
|
|
113
|
+
onResponse: ((context: _better_fetch_fetch15.ResponseContext) => Promise<Response | void | _better_fetch_fetch15.ResponseContext> | Response | _better_fetch_fetch15.ResponseContext | void) | undefined;
|
|
115
114
|
};
|
|
116
115
|
})[];
|
|
117
116
|
cache?: RequestCache | undefined;
|
|
@@ -131,12 +130,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
131
130
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
132
131
|
signal?: (AbortSignal | null) | undefined;
|
|
133
132
|
window?: null | undefined;
|
|
134
|
-
onRetry?: ((response:
|
|
133
|
+
onRetry?: ((response: _better_fetch_fetch15.ResponseContext) => Promise<void> | void) | undefined;
|
|
135
134
|
hookOptions?: {
|
|
136
135
|
cloneResponse?: boolean;
|
|
137
136
|
} | undefined;
|
|
138
137
|
timeout?: number | undefined;
|
|
139
|
-
customFetchImpl:
|
|
138
|
+
customFetchImpl: _better_fetch_fetch15.FetchEsque;
|
|
140
139
|
baseURL: string;
|
|
141
140
|
throw?: boolean | undefined;
|
|
142
141
|
auth?: ({
|
|
@@ -156,10 +155,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
156
155
|
params?: any;
|
|
157
156
|
duplex?: "full" | "half" | undefined;
|
|
158
157
|
jsonParser: (text: string) => Promise<any> | any;
|
|
159
|
-
retry?:
|
|
158
|
+
retry?: _better_fetch_fetch15.RetryOptions | undefined;
|
|
160
159
|
retryAttempt?: number | undefined;
|
|
161
|
-
output?: (
|
|
162
|
-
errorSchema?:
|
|
160
|
+
output?: (_better_fetch_fetch15.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
161
|
+
errorSchema?: _better_fetch_fetch15.StandardSchemaV1 | undefined;
|
|
163
162
|
disableValidation?: boolean | undefined;
|
|
164
163
|
disableSignal?: boolean | undefined;
|
|
165
164
|
}, unknown, unknown, {}>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Xt as InferErrorCodes, Yt as InferClientAPI, en as IsSignal, qt as InferActions } from "../../index-BevOkArW.mjs";
|
|
2
2
|
import "../../types-CEepZ-RG.mjs";
|
|
3
3
|
import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-DFzV6jvx.mjs";
|
|
4
|
-
import "../../
|
|
5
|
-
import "../../plugins-SfZpwDiz.mjs";
|
|
4
|
+
import "../../plugins-Dmw3tk5H.mjs";
|
|
6
5
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
7
6
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
8
7
|
import * as _better_fetch_fetch31 from "@better-fetch/fetch";
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Xt as InferErrorCodes, Yt as InferClientAPI, en as IsSignal, qt as InferActions } from "../../index-BevOkArW.mjs";
|
|
2
2
|
import "../../types-CEepZ-RG.mjs";
|
|
3
3
|
import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-DFzV6jvx.mjs";
|
|
4
|
-
import "../../
|
|
5
|
-
import "../../plugins-SfZpwDiz.mjs";
|
|
4
|
+
import "../../plugins-Dmw3tk5H.mjs";
|
|
6
5
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
7
6
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
8
|
-
import * as
|
|
7
|
+
import * as nanostores2 from "nanostores";
|
|
9
8
|
import { Atom } from "nanostores";
|
|
10
|
-
import * as
|
|
9
|
+
import * as _better_fetch_fetch63 from "@better-fetch/fetch";
|
|
11
10
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
12
11
|
export * from "nanostores";
|
|
13
12
|
export * from "@better-fetch/fetch";
|
|
@@ -35,21 +34,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
35
34
|
isPending: boolean;
|
|
36
35
|
isRefetching: boolean;
|
|
37
36
|
}>;
|
|
38
|
-
$fetch:
|
|
39
|
-
plugins: (
|
|
37
|
+
$fetch: _better_fetch_fetch63.BetterFetch<{
|
|
38
|
+
plugins: (_better_fetch_fetch63.BetterFetchPlugin | {
|
|
40
39
|
id: string;
|
|
41
40
|
name: string;
|
|
42
41
|
hooks: {
|
|
43
|
-
onSuccess(context:
|
|
42
|
+
onSuccess(context: _better_fetch_fetch63.SuccessContext<any>): void;
|
|
44
43
|
};
|
|
45
44
|
} | {
|
|
46
45
|
id: string;
|
|
47
46
|
name: string;
|
|
48
47
|
hooks: {
|
|
49
|
-
onSuccess: ((context:
|
|
50
|
-
onError: ((context:
|
|
51
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
52
|
-
onResponse: ((context:
|
|
48
|
+
onSuccess: ((context: _better_fetch_fetch63.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
49
|
+
onError: ((context: _better_fetch_fetch63.ErrorContext) => Promise<void> | void) | undefined;
|
|
50
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch63.RequestContext<T>) => Promise<_better_fetch_fetch63.RequestContext | void> | _better_fetch_fetch63.RequestContext | void) | undefined;
|
|
51
|
+
onResponse: ((context: _better_fetch_fetch63.ResponseContext) => Promise<Response | void | _better_fetch_fetch63.ResponseContext> | Response | _better_fetch_fetch63.ResponseContext | void) | undefined;
|
|
53
52
|
};
|
|
54
53
|
})[];
|
|
55
54
|
cache?: RequestCache | undefined;
|
|
@@ -69,12 +68,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
69
68
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
70
69
|
signal?: (AbortSignal | null) | undefined;
|
|
71
70
|
window?: null | undefined;
|
|
72
|
-
onRetry?: ((response:
|
|
71
|
+
onRetry?: ((response: _better_fetch_fetch63.ResponseContext) => Promise<void> | void) | undefined;
|
|
73
72
|
hookOptions?: {
|
|
74
73
|
cloneResponse?: boolean;
|
|
75
74
|
} | undefined;
|
|
76
75
|
timeout?: number | undefined;
|
|
77
|
-
customFetchImpl:
|
|
76
|
+
customFetchImpl: _better_fetch_fetch63.FetchEsque;
|
|
78
77
|
baseURL: string;
|
|
79
78
|
throw?: boolean | undefined;
|
|
80
79
|
auth?: ({
|
|
@@ -94,17 +93,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
94
93
|
params?: any;
|
|
95
94
|
duplex?: "full" | "half" | undefined;
|
|
96
95
|
jsonParser: (text: string) => Promise<any> | any;
|
|
97
|
-
retry?:
|
|
96
|
+
retry?: _better_fetch_fetch63.RetryOptions | undefined;
|
|
98
97
|
retryAttempt?: number | undefined;
|
|
99
|
-
output?: (
|
|
100
|
-
errorSchema?:
|
|
98
|
+
output?: (_better_fetch_fetch63.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
99
|
+
errorSchema?: _better_fetch_fetch63.StandardSchemaV1 | undefined;
|
|
101
100
|
disableValidation?: boolean | undefined;
|
|
102
101
|
disableSignal?: boolean | undefined;
|
|
103
102
|
}, unknown, unknown, {}>;
|
|
104
103
|
$store: {
|
|
105
104
|
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
106
105
|
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
107
|
-
atoms: Record<string,
|
|
106
|
+
atoms: Record<string, nanostores2.WritableAtom<any>>;
|
|
108
107
|
};
|
|
109
108
|
$Infer: {
|
|
110
109
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Xt as InferErrorCodes, Yt as InferClientAPI, en as IsSignal, qt as InferActions } from "../../index-BevOkArW.mjs";
|
|
2
2
|
import "../../types-CEepZ-RG.mjs";
|
|
3
3
|
import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-DFzV6jvx.mjs";
|
|
4
|
-
import "../../
|
|
5
|
-
import "../../plugins-SfZpwDiz.mjs";
|
|
4
|
+
import "../../plugins-Dmw3tk5H.mjs";
|
|
6
5
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
7
6
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
7
|
+
import * as nanostores0 from "nanostores";
|
|
8
|
+
import * as _better_fetch_fetch0 from "@better-fetch/fetch";
|
|
10
9
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
11
10
|
import { DeepReadonly, Ref } from "vue";
|
|
12
11
|
export * from "nanostores";
|
|
@@ -73,21 +72,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
73
72
|
error: null;
|
|
74
73
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
75
74
|
};
|
|
76
|
-
$fetch:
|
|
77
|
-
plugins: (
|
|
75
|
+
$fetch: _better_fetch_fetch0.BetterFetch<{
|
|
76
|
+
plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
|
|
78
77
|
id: string;
|
|
79
78
|
name: string;
|
|
80
79
|
hooks: {
|
|
81
|
-
onSuccess(context:
|
|
80
|
+
onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
|
|
82
81
|
};
|
|
83
82
|
} | {
|
|
84
83
|
id: string;
|
|
85
84
|
name: string;
|
|
86
85
|
hooks: {
|
|
87
|
-
onSuccess: ((context:
|
|
88
|
-
onError: ((context:
|
|
89
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
90
|
-
onResponse: ((context:
|
|
86
|
+
onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
87
|
+
onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
|
|
88
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
|
|
89
|
+
onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
|
|
91
90
|
};
|
|
92
91
|
})[];
|
|
93
92
|
cache?: RequestCache | undefined;
|
|
@@ -107,12 +106,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
107
106
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
108
107
|
signal?: (AbortSignal | null) | undefined;
|
|
109
108
|
window?: null | undefined;
|
|
110
|
-
onRetry?: ((response:
|
|
109
|
+
onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
|
|
111
110
|
hookOptions?: {
|
|
112
111
|
cloneResponse?: boolean;
|
|
113
112
|
} | undefined;
|
|
114
113
|
timeout?: number | undefined;
|
|
115
|
-
customFetchImpl:
|
|
114
|
+
customFetchImpl: _better_fetch_fetch0.FetchEsque;
|
|
116
115
|
baseURL: string;
|
|
117
116
|
throw?: boolean | undefined;
|
|
118
117
|
auth?: ({
|
|
@@ -132,17 +131,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
132
131
|
params?: any;
|
|
133
132
|
duplex?: "full" | "half" | undefined;
|
|
134
133
|
jsonParser: (text: string) => Promise<any> | any;
|
|
135
|
-
retry?:
|
|
134
|
+
retry?: _better_fetch_fetch0.RetryOptions | undefined;
|
|
136
135
|
retryAttempt?: number | undefined;
|
|
137
|
-
output?: (
|
|
138
|
-
errorSchema?:
|
|
136
|
+
output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
137
|
+
errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
|
|
139
138
|
disableValidation?: boolean | undefined;
|
|
140
139
|
disableSignal?: boolean | undefined;
|
|
141
140
|
}, unknown, unknown, {}>;
|
|
142
141
|
$store: {
|
|
143
142
|
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
144
143
|
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
145
|
-
atoms: Record<string,
|
|
144
|
+
atoms: Record<string, nanostores0.WritableAtom<any>>;
|
|
146
145
|
};
|
|
147
146
|
$ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
148
147
|
};
|
package/dist/cookies/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../index-
|
|
1
|
+
import "../index-BevOkArW.mjs";
|
|
2
2
|
import "../types-CEepZ-RG.mjs";
|
|
3
3
|
import "../helper-DFzV6jvx.mjs";
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import { a as getCookies, c as setCookieCache, d as getChunkedCookie, f as parseSetCookieHeader, i as getCookieCache, l as setSessionCookie, n as createCookieGetter, o as getSessionCookie, p as setCookieToHeader, r as deleteSessionCookie, s as parseCookies, t as EligibleCookies, u as createSessionStore } from "../index-BGKXL3Av.mjs";
|
|
4
|
+
import "../plugins-Dmw3tk5H.mjs";
|
|
5
|
+
import { a as getCookies, c as setCookieCache, d as getChunkedCookie, f as parseSetCookieHeader, i as getCookieCache, l as setSessionCookie, n as createCookieGetter, o as getSessionCookie, p as setCookieToHeader, r as deleteSessionCookie, s as parseCookies, t as EligibleCookies, u as createSessionStore } from "../index-DA5jLHwS.mjs";
|
|
7
6
|
export { EligibleCookies, createCookieGetter, createSessionStore, deleteSessionCookie, getChunkedCookie, getCookieCache, getCookies, getSessionCookie, parseCookies, parseSetCookieHeader, setCookieCache, setCookieToHeader, setSessionCookie };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as InferValueType, Cn as FieldAttributeToObject, Dn as InferFieldsInput, En as InferFieldsFromPlugins, Mn as createFieldAttribute, Nn as getAdapter, On as InferFieldsInputClient, Pn as getBaseAdapter, Sn as convertToDB, Tn as InferFieldsFromOptions, _n as getAuthTables, an as FieldAttributeToSchema, bn as matchType, cn as parseAccountInput, dn as parseInputData, fn as parseSessionInput, gn as createInternalAdapter, hn as parseUserOutput, in as getWithHooks, jn as PluginFieldAttribute, kn as InferFieldsOutput, ln as parseAccountOutput, mn as parseUserInput, on as toZodSchema, pn as parseSessionOutput, sn as mergeSchema, un as parseAdditionalUserInput, vn as getSchema, wn as InferAdditionalFieldsFromPluginOptions, xn as convertFromDB, yn as getMigrations } from "../index-BevOkArW.mjs";
|
|
2
2
|
import "../types-CEepZ-RG.mjs";
|
|
3
3
|
import "../helper-DFzV6jvx.mjs";
|
|
4
|
-
import "../
|
|
5
|
-
import "../plugins-SfZpwDiz.mjs";
|
|
4
|
+
import "../plugins-Dmw3tk5H.mjs";
|
|
6
5
|
export * from "@better-auth/core/db";
|
|
7
6
|
export { FieldAttributeToObject, FieldAttributeToSchema, InferAdditionalFieldsFromPluginOptions, InferFieldsFromOptions, InferFieldsFromPlugins, InferFieldsInput, InferFieldsInputClient, InferFieldsOutput, InferValueType, PluginFieldAttribute, convertFromDB, convertToDB, createFieldAttribute, createInternalAdapter, getAdapter, getAuthTables, getBaseAdapter, getMigrations, getSchema, getWithHooks, matchType, mergeSchema, parseAccountInput, parseAccountOutput, parseAdditionalUserInput, parseInputData, parseSessionInput, parseSessionOutput, parseUserInput, parseUserOutput, toZodSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as User, g as Session } from "./index-
|
|
1
|
+
import { _ as User, g as Session } from "./index-BevOkArW.mjs";
|
|
2
2
|
import { GenericEndpointContext } from "@better-auth/core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as better_call203 from "better-call";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/one-time-token/index.d.ts
|
|
@@ -51,9 +51,9 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
51
51
|
*
|
|
52
52
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/one-time-token#api-method-one-time-token-generate)
|
|
53
53
|
*/
|
|
54
|
-
generateOneTimeToken:
|
|
54
|
+
generateOneTimeToken: better_call203.StrictEndpoint<"/one-time-token/generate", {
|
|
55
55
|
method: "GET";
|
|
56
|
-
use: ((inputContext:
|
|
56
|
+
use: ((inputContext: better_call203.MiddlewareInputContext<better_call203.MiddlewareOptions>) => Promise<{
|
|
57
57
|
session: {
|
|
58
58
|
session: Record<string, any> & {
|
|
59
59
|
id: string;
|
|
@@ -96,7 +96,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
96
96
|
*
|
|
97
97
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/one-time-token#api-method-one-time-token-verify)
|
|
98
98
|
*/
|
|
99
|
-
verifyOneTimeToken:
|
|
99
|
+
verifyOneTimeToken: better_call203.StrictEndpoint<"/one-time-token/verify", {
|
|
100
100
|
method: "POST";
|
|
101
101
|
body: z.ZodObject<{
|
|
102
102
|
token: z.ZodString;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_call20 from "better-call";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
import { StringValue } from "ms";
|
|
4
4
|
|
|
@@ -91,7 +91,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
93
|
endpoints: {
|
|
94
|
-
deviceCode:
|
|
94
|
+
deviceCode: better_call20.StrictEndpoint<"/device/code", {
|
|
95
95
|
method: "POST";
|
|
96
96
|
body: z.ZodObject<{
|
|
97
97
|
client_id: z.ZodString;
|
|
@@ -178,7 +178,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
178
178
|
expires_in: number;
|
|
179
179
|
interval: number;
|
|
180
180
|
}>;
|
|
181
|
-
deviceToken:
|
|
181
|
+
deviceToken: better_call20.StrictEndpoint<"/device/token", {
|
|
182
182
|
method: "POST";
|
|
183
183
|
body: z.ZodObject<{
|
|
184
184
|
grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:device_code">;
|
|
@@ -248,7 +248,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
248
248
|
expires_in: number;
|
|
249
249
|
scope: string;
|
|
250
250
|
}>;
|
|
251
|
-
deviceVerify:
|
|
251
|
+
deviceVerify: better_call20.StrictEndpoint<"/device", {
|
|
252
252
|
method: "GET";
|
|
253
253
|
query: z.ZodObject<{
|
|
254
254
|
user_code: z.ZodString;
|
|
@@ -293,7 +293,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
293
293
|
user_code: string;
|
|
294
294
|
status: string;
|
|
295
295
|
}>;
|
|
296
|
-
deviceApprove:
|
|
296
|
+
deviceApprove: better_call20.StrictEndpoint<"/device/approve", {
|
|
297
297
|
method: "POST";
|
|
298
298
|
body: z.ZodObject<{
|
|
299
299
|
userCode: z.ZodString;
|
|
@@ -334,7 +334,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
334
334
|
}, {
|
|
335
335
|
success: boolean;
|
|
336
336
|
}>;
|
|
337
|
-
deviceDeny:
|
|
337
|
+
deviceDeny: better_call20.StrictEndpoint<"/device/deny", {
|
|
338
338
|
method: "POST";
|
|
339
339
|
body: z.ZodObject<{
|
|
340
340
|
userCode: z.ZodString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenericEndpointContext } from "@better-auth/core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as better_call40 from "better-call";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/magic-link/index.d.ts
|
|
@@ -68,7 +68,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
|
|
|
68
68
|
*
|
|
69
69
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/sign-in#api-method-sign-in-magic-link)
|
|
70
70
|
*/
|
|
71
|
-
signInMagicLink:
|
|
71
|
+
signInMagicLink: better_call40.StrictEndpoint<"/sign-in/magic-link", {
|
|
72
72
|
method: "POST";
|
|
73
73
|
requireHeaders: true;
|
|
74
74
|
body: z.ZodObject<{
|
|
@@ -121,7 +121,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
|
|
|
121
121
|
*
|
|
122
122
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/magic-link#api-method-magic-link-verify)
|
|
123
123
|
*/
|
|
124
|
-
magicLinkVerify:
|
|
124
|
+
magicLinkVerify: better_call40.StrictEndpoint<"/magic-link/verify", {
|
|
125
125
|
method: "GET";
|
|
126
126
|
query: z.ZodObject<{
|
|
127
127
|
token: z.ZodString;
|
|
@@ -129,7 +129,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
|
|
|
129
129
|
errorCallbackURL: z.ZodOptional<z.ZodString>;
|
|
130
130
|
newUserCallbackURL: z.ZodOptional<z.ZodString>;
|
|
131
131
|
}, z.core.$strip>;
|
|
132
|
-
use: ((inputContext:
|
|
132
|
+
use: ((inputContext: better_call40.MiddlewareInputContext<better_call40.MiddlewareOptions>) => Promise<void>)[];
|
|
133
133
|
requireHeaders: true;
|
|
134
134
|
metadata: {
|
|
135
135
|
openapi: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as User } from "./index-
|
|
1
|
+
import { _ as User } from "./index-BevOkArW.mjs";
|
|
2
2
|
import { t as Awaitable } from "./helper-DFzV6jvx.mjs";
|
|
3
|
-
import { t as InferOptionSchema } from "./plugins-
|
|
3
|
+
import { t as InferOptionSchema } from "./plugins-Dmw3tk5H.mjs";
|
|
4
4
|
import * as _better_auth_core10 from "@better-auth/core";
|
|
5
5
|
import { GenericEndpointContext } from "@better-auth/core";
|
|
6
|
-
import * as
|
|
6
|
+
import * as better_call179 from "better-call";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
|
|
9
9
|
//#region src/plugins/phone-number/schema.d.ts
|
|
@@ -143,7 +143,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
|
|
|
143
143
|
hooks: {
|
|
144
144
|
before: {
|
|
145
145
|
matcher: (ctx: _better_auth_core10.HookEndpointContext) => boolean;
|
|
146
|
-
handler: (inputContext:
|
|
146
|
+
handler: (inputContext: better_call179.MiddlewareInputContext<better_call179.MiddlewareOptions>) => Promise<never>;
|
|
147
147
|
}[];
|
|
148
148
|
};
|
|
149
149
|
endpoints: {
|
|
@@ -162,7 +162,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
|
|
|
162
162
|
*
|
|
163
163
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/phone-number#api-method-sign-in-phone-number)
|
|
164
164
|
*/
|
|
165
|
-
signInPhoneNumber:
|
|
165
|
+
signInPhoneNumber: better_call179.StrictEndpoint<"/sign-in/phone-number", {
|
|
166
166
|
method: "POST";
|
|
167
167
|
body: z.ZodObject<{
|
|
168
168
|
phoneNumber: z.ZodString;
|
|
@@ -219,7 +219,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
|
|
|
219
219
|
*
|
|
220
220
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/phone-number#api-method-phone-number-send-otp)
|
|
221
221
|
*/
|
|
222
|
-
sendPhoneNumberOTP:
|
|
222
|
+
sendPhoneNumberOTP: better_call179.StrictEndpoint<"/phone-number/send-otp", {
|
|
223
223
|
method: "POST";
|
|
224
224
|
body: z.ZodObject<{
|
|
225
225
|
phoneNumber: z.ZodString;
|
|
@@ -267,7 +267,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
|
|
|
267
267
|
*
|
|
268
268
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/phone-number#api-method-phone-number-verify)
|
|
269
269
|
*/
|
|
270
|
-
verifyPhoneNumber:
|
|
270
|
+
verifyPhoneNumber: better_call179.StrictEndpoint<"/phone-number/verify", {
|
|
271
271
|
method: "POST";
|
|
272
272
|
body: z.ZodObject<{
|
|
273
273
|
phoneNumber: z.ZodString;
|
|
@@ -372,7 +372,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
|
|
|
372
372
|
token: null;
|
|
373
373
|
user: UserWithPhoneNumber;
|
|
374
374
|
}>;
|
|
375
|
-
requestPasswordResetPhoneNumber:
|
|
375
|
+
requestPasswordResetPhoneNumber: better_call179.StrictEndpoint<"/phone-number/request-password-reset", {
|
|
376
376
|
method: "POST";
|
|
377
377
|
body: z.ZodObject<{
|
|
378
378
|
phoneNumber: z.ZodString;
|
|
@@ -407,7 +407,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
|
|
|
407
407
|
}, {
|
|
408
408
|
status: boolean;
|
|
409
409
|
}>;
|
|
410
|
-
resetPasswordPhoneNumber:
|
|
410
|
+
resetPasswordPhoneNumber: better_call179.StrictEndpoint<"/phone-number/reset-password", {
|
|
411
411
|
method: "POST";
|
|
412
412
|
body: z.ZodObject<{
|
|
413
413
|
otp: z.ZodString;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _better_auth_core6 from "@better-auth/core";
|
|
2
2
|
import { GenericEndpointContext } from "@better-auth/core";
|
|
3
3
|
import * as _better_auth_core_db0 from "@better-auth/core/db";
|
|
4
|
-
import * as
|
|
4
|
+
import * as better_call30 from "better-call";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/email-otp/index.d.ts
|
|
@@ -75,7 +75,7 @@ interface EmailOTPOptions {
|
|
|
75
75
|
}
|
|
76
76
|
declare const emailOTP: (options: EmailOTPOptions) => {
|
|
77
77
|
id: "email-otp";
|
|
78
|
-
init(ctx:
|
|
78
|
+
init(ctx: _better_auth_core6.AuthContext): {
|
|
79
79
|
options: {
|
|
80
80
|
emailVerification: {
|
|
81
81
|
sendVerificationEmail(data: {
|
|
@@ -87,7 +87,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
87
87
|
};
|
|
88
88
|
} | undefined;
|
|
89
89
|
endpoints: {
|
|
90
|
-
createVerificationOTP:
|
|
90
|
+
createVerificationOTP: better_call30.StrictEndpoint<"/email-otp/create-verification-otp", {
|
|
91
91
|
method: "POST";
|
|
92
92
|
body: z.ZodObject<{
|
|
93
93
|
email: z.ZodString;
|
|
@@ -131,7 +131,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
131
131
|
*
|
|
132
132
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-get-verification-otp)
|
|
133
133
|
*/
|
|
134
|
-
getVerificationOTP:
|
|
134
|
+
getVerificationOTP: better_call30.StrictEndpoint<"/email-otp/get-verification-otp", {
|
|
135
135
|
method: "GET";
|
|
136
136
|
query: z.ZodObject<{
|
|
137
137
|
email: z.ZodString;
|
|
@@ -187,7 +187,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
187
187
|
*
|
|
188
188
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-check-verification-otp)
|
|
189
189
|
*/
|
|
190
|
-
checkVerificationOTP:
|
|
190
|
+
checkVerificationOTP: better_call30.StrictEndpoint<"/email-otp/check-verification-otp", {
|
|
191
191
|
method: "POST";
|
|
192
192
|
body: z.ZodObject<{
|
|
193
193
|
email: z.ZodString;
|
|
@@ -241,7 +241,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
241
241
|
*
|
|
242
242
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-verify-email)
|
|
243
243
|
*/
|
|
244
|
-
verifyEmailOTP:
|
|
244
|
+
verifyEmailOTP: better_call30.StrictEndpoint<"/email-otp/verify-email", {
|
|
245
245
|
method: "POST";
|
|
246
246
|
body: z.ZodObject<{
|
|
247
247
|
email: z.ZodString;
|
|
@@ -322,7 +322,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
322
322
|
*
|
|
323
323
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-sign-in-email-otp)
|
|
324
324
|
*/
|
|
325
|
-
signInEmailOTP:
|
|
325
|
+
signInEmailOTP: better_call30.StrictEndpoint<"/sign-in/email-otp", {
|
|
326
326
|
method: "POST";
|
|
327
327
|
body: z.ZodObject<{
|
|
328
328
|
email: z.ZodString;
|
|
@@ -385,7 +385,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
385
385
|
*
|
|
386
386
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-forget-password-email-otp)
|
|
387
387
|
*/
|
|
388
|
-
forgetPasswordEmailOTP:
|
|
388
|
+
forgetPasswordEmailOTP: better_call30.StrictEndpoint<"/forget-password/email-otp", {
|
|
389
389
|
method: "POST";
|
|
390
390
|
body: z.ZodObject<{
|
|
391
391
|
email: z.ZodString;
|
|
@@ -434,7 +434,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
434
434
|
*
|
|
435
435
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-reset-password)
|
|
436
436
|
*/
|
|
437
|
-
resetPasswordEmailOTP:
|
|
437
|
+
resetPasswordEmailOTP: better_call30.StrictEndpoint<"/email-otp/reset-password", {
|
|
438
438
|
method: "POST";
|
|
439
439
|
body: z.ZodObject<{
|
|
440
440
|
email: z.ZodString;
|
|
@@ -484,7 +484,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
484
484
|
*
|
|
485
485
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/email-otp#api-method-email-otp-send-verification-otp)
|
|
486
486
|
*/
|
|
487
|
-
sendVerificationOTP:
|
|
487
|
+
sendVerificationOTP: better_call30.StrictEndpoint<"/email-otp/send-verification-otp", {
|
|
488
488
|
method: "POST";
|
|
489
489
|
body: z.ZodObject<{
|
|
490
490
|
email: z.ZodString;
|
|
@@ -525,8 +525,8 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
525
525
|
};
|
|
526
526
|
hooks: {
|
|
527
527
|
after: {
|
|
528
|
-
matcher(context:
|
|
529
|
-
handler: (inputContext:
|
|
528
|
+
matcher(context: _better_auth_core6.HookEndpointContext): boolean;
|
|
529
|
+
handler: (inputContext: better_call30.MiddlewareInputContext<better_call30.MiddlewareOptions>) => Promise<void>;
|
|
530
530
|
}[];
|
|
531
531
|
};
|
|
532
532
|
$ERROR_CODES: {
|