better-auth 1.4.20 → 1.4.22
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/adapters/memory-adapter/memory-adapter.d.mts +2 -2
- package/dist/api/index.d.mts +99 -99
- package/dist/api/routes/account.d.mts +11 -11
- package/dist/api/routes/callback.d.mts +2 -2
- package/dist/api/routes/email-verification.d.mts +4 -4
- package/dist/api/routes/error.d.mts +2 -2
- package/dist/api/routes/ok.d.mts +2 -2
- package/dist/api/routes/password.d.mts +7 -7
- package/dist/api/routes/session.d.mts +14 -14
- package/dist/api/routes/sign-in.d.mts +4 -4
- package/dist/api/routes/sign-out.d.mts +2 -2
- package/dist/api/routes/sign-up.d.mts +3 -3
- package/dist/api/routes/update-user.d.mts +13 -13
- package/dist/client/lynx/index.d.mts +13 -13
- package/dist/client/react/index.d.mts +13 -13
- package/dist/client/solid/index.d.mts +13 -13
- package/dist/client/svelte/index.d.mts +15 -15
- package/dist/client/vanilla.d.mts +15 -15
- package/dist/client/vue/index.d.mts +15 -15
- package/dist/db/field.d.mts +3 -3
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/tanstack-start-solid.d.mts +4 -4
- package/dist/integrations/tanstack-start.d.mts +4 -4
- package/dist/plugins/admin/admin.d.mts +3 -3
- package/dist/plugins/anonymous/index.d.mts +7 -7
- package/dist/plugins/api-key/index.d.mts +36 -36
- package/dist/plugins/bearer/index.d.mts +6 -6
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/custom-session/index.d.mts +5 -5
- package/dist/plugins/device-authorization/index.d.mts +6 -6
- package/dist/plugins/email-otp/index.d.mts +14 -14
- package/dist/plugins/generic-oauth/index.d.mts +5 -5
- package/dist/plugins/haveibeenpwned/index.d.mts +3 -3
- package/dist/plugins/jwt/client.d.mts +2 -2
- package/dist/plugins/jwt/index.d.mts +9 -9
- package/dist/plugins/last-login-method/index.d.mts +4 -4
- package/dist/plugins/magic-link/index.d.mts +4 -4
- package/dist/plugins/mcp/index.d.mts +10 -10
- package/dist/plugins/multi-session/index.d.mts +9 -9
- package/dist/plugins/oauth-proxy/index.d.mts +8 -8
- package/dist/plugins/oidc-provider/index.d.mts +13 -13
- package/dist/plugins/one-tap/client.d.mts +5 -5
- package/dist/plugins/one-tap/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.d.mts +5 -5
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/organization/adapter.d.mts +24 -24
- package/dist/plugins/organization/client.d.mts +9 -9
- package/dist/plugins/organization/organization.d.mts +3 -3
- package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
- package/dist/plugins/organization/routes/crud-invites.d.mts +69 -69
- package/dist/plugins/organization/routes/crud-members.d.mts +67 -67
- package/dist/plugins/organization/routes/crud-org.d.mts +59 -59
- package/dist/plugins/organization/routes/crud-team.d.mts +79 -79
- package/dist/plugins/phone-number/index.d.mts +9 -9
- package/dist/plugins/siwe/index.d.mts +3 -3
- package/dist/plugins/two-factor/client.d.mts +2 -2
- package/dist/plugins/two-factor/index.d.mts +18 -18
- package/dist/plugins/username/index.d.mts +4 -4
- package/dist/plugins/username/schema.d.mts +3 -3
- package/dist/test-utils/test-instance.d.mts +312 -312
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ import { DeepPartial, Expand, HasRequiredKeys, LiteralNumber, LiteralUnion, Omit
|
|
|
2
2
|
import { InferActions, InferClientAPI, InferErrorCodes, IsSignal, SessionQueryParams } from "../types.mjs";
|
|
3
3
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
4
4
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
5
|
-
import * as
|
|
5
|
+
import * as _better_fetch_fetch15 from "@better-fetch/fetch";
|
|
6
6
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
7
7
|
import { Accessor } from "solid-js";
|
|
8
8
|
export * from "nanostores";
|
|
@@ -49,21 +49,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
49
49
|
error: null;
|
|
50
50
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
51
51
|
};
|
|
52
|
-
$fetch:
|
|
53
|
-
plugins: (
|
|
52
|
+
$fetch: _better_fetch_fetch15.BetterFetch<{
|
|
53
|
+
plugins: (_better_fetch_fetch15.BetterFetchPlugin<Record<string, any>> | {
|
|
54
54
|
id: string;
|
|
55
55
|
name: string;
|
|
56
56
|
hooks: {
|
|
57
|
-
onSuccess(context:
|
|
57
|
+
onSuccess(context: _better_fetch_fetch15.SuccessContext<any>): void;
|
|
58
58
|
};
|
|
59
59
|
} | {
|
|
60
60
|
id: string;
|
|
61
61
|
name: string;
|
|
62
62
|
hooks: {
|
|
63
|
-
onSuccess: ((context:
|
|
64
|
-
onError: ((context:
|
|
65
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
66
|
-
onResponse: ((context:
|
|
63
|
+
onSuccess: ((context: _better_fetch_fetch15.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
64
|
+
onError: ((context: _better_fetch_fetch15.ErrorContext) => Promise<void> | void) | undefined;
|
|
65
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch15.RequestContext<T>) => Promise<_better_fetch_fetch15.RequestContext | void> | _better_fetch_fetch15.RequestContext | void) | undefined;
|
|
66
|
+
onResponse: ((context: _better_fetch_fetch15.ResponseContext) => Promise<Response | void | _better_fetch_fetch15.ResponseContext> | Response | _better_fetch_fetch15.ResponseContext | void) | undefined;
|
|
67
67
|
};
|
|
68
68
|
})[];
|
|
69
69
|
cache?: RequestCache | undefined;
|
|
@@ -83,12 +83,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
83
83
|
referrer?: string | undefined;
|
|
84
84
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
85
85
|
signal?: (AbortSignal | null) | undefined;
|
|
86
|
-
onRetry?: ((response:
|
|
86
|
+
onRetry?: ((response: _better_fetch_fetch15.ResponseContext) => Promise<void> | void) | undefined;
|
|
87
87
|
hookOptions?: {
|
|
88
88
|
cloneResponse?: boolean;
|
|
89
89
|
} | undefined;
|
|
90
90
|
timeout?: number | undefined;
|
|
91
|
-
customFetchImpl:
|
|
91
|
+
customFetchImpl: _better_fetch_fetch15.FetchEsque;
|
|
92
92
|
baseURL: string;
|
|
93
93
|
throw?: boolean | undefined;
|
|
94
94
|
auth?: ({
|
|
@@ -108,10 +108,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
108
108
|
params?: any;
|
|
109
109
|
duplex?: "full" | "half" | undefined;
|
|
110
110
|
jsonParser: (text: string) => Promise<any> | any;
|
|
111
|
-
retry?:
|
|
111
|
+
retry?: _better_fetch_fetch15.RetryOptions | undefined;
|
|
112
112
|
retryAttempt?: number | undefined;
|
|
113
|
-
output?: (
|
|
114
|
-
errorSchema?:
|
|
113
|
+
output?: (_better_fetch_fetch15.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
114
|
+
errorSchema?: _better_fetch_fetch15.StandardSchemaV1 | undefined;
|
|
115
115
|
disableValidation?: boolean | undefined;
|
|
116
116
|
disableSignal?: boolean | undefined;
|
|
117
117
|
}, unknown, unknown, {}>;
|
|
@@ -2,9 +2,9 @@ import { DeepPartial, Expand, HasRequiredKeys, LiteralNumber, LiteralUnion, Omit
|
|
|
2
2
|
import { InferActions, InferClientAPI, InferErrorCodes, IsSignal, SessionQueryParams } from "../types.mjs";
|
|
3
3
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
4
4
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
5
|
-
import * as
|
|
5
|
+
import * as nanostores0 from "nanostores";
|
|
6
6
|
import { Atom } from "nanostores";
|
|
7
|
-
import * as
|
|
7
|
+
import * as _better_fetch_fetch0 from "@better-fetch/fetch";
|
|
8
8
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
9
9
|
export * from "nanostores";
|
|
10
10
|
export * from "@better-fetch/fetch";
|
|
@@ -35,21 +35,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
35
35
|
query?: SessionQueryParams;
|
|
36
36
|
} | undefined) => Promise<void>;
|
|
37
37
|
}>;
|
|
38
|
-
$fetch:
|
|
39
|
-
plugins: (
|
|
38
|
+
$fetch: _better_fetch_fetch0.BetterFetch<{
|
|
39
|
+
plugins: (_better_fetch_fetch0.BetterFetchPlugin<Record<string, any>> | {
|
|
40
40
|
id: string;
|
|
41
41
|
name: string;
|
|
42
42
|
hooks: {
|
|
43
|
-
onSuccess(context:
|
|
43
|
+
onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
|
|
44
44
|
};
|
|
45
45
|
} | {
|
|
46
46
|
id: string;
|
|
47
47
|
name: string;
|
|
48
48
|
hooks: {
|
|
49
|
-
onSuccess: ((context:
|
|
50
|
-
onError: ((context:
|
|
51
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
52
|
-
onResponse: ((context:
|
|
49
|
+
onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
50
|
+
onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
|
|
51
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
|
|
52
|
+
onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
|
|
53
53
|
};
|
|
54
54
|
})[];
|
|
55
55
|
cache?: RequestCache | undefined;
|
|
@@ -69,12 +69,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
69
69
|
referrer?: string | undefined;
|
|
70
70
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
71
71
|
signal?: (AbortSignal | null) | undefined;
|
|
72
|
-
onRetry?: ((response:
|
|
72
|
+
onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
|
|
73
73
|
hookOptions?: {
|
|
74
74
|
cloneResponse?: boolean;
|
|
75
75
|
} | undefined;
|
|
76
76
|
timeout?: number | undefined;
|
|
77
|
-
customFetchImpl:
|
|
77
|
+
customFetchImpl: _better_fetch_fetch0.FetchEsque;
|
|
78
78
|
baseURL: string;
|
|
79
79
|
throw?: boolean | undefined;
|
|
80
80
|
auth?: ({
|
|
@@ -94,17 +94,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
94
94
|
params?: any;
|
|
95
95
|
duplex?: "full" | "half" | undefined;
|
|
96
96
|
jsonParser: (text: string) => Promise<any> | any;
|
|
97
|
-
retry?:
|
|
97
|
+
retry?: _better_fetch_fetch0.RetryOptions | undefined;
|
|
98
98
|
retryAttempt?: number | undefined;
|
|
99
|
-
output?: (
|
|
100
|
-
errorSchema?:
|
|
99
|
+
output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
100
|
+
errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
|
|
101
101
|
disableValidation?: boolean | undefined;
|
|
102
102
|
disableSignal?: boolean | undefined;
|
|
103
103
|
}, unknown, unknown, {}>;
|
|
104
104
|
$store: {
|
|
105
105
|
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
106
106
|
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
107
|
-
atoms: Record<string,
|
|
107
|
+
atoms: Record<string, nanostores0.WritableAtom<any>>;
|
|
108
108
|
};
|
|
109
109
|
$Infer: {
|
|
110
110
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
@@ -2,9 +2,9 @@ import { PrettifyDeep, UnionToIntersection } from "../types/helper.mjs";
|
|
|
2
2
|
import { InferActions, InferClientAPI, InferErrorCodes, IsSignal, SessionQueryParams } from "./types.mjs";
|
|
3
3
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
4
4
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
5
|
-
import * as
|
|
5
|
+
import * as nanostores5 from "nanostores";
|
|
6
6
|
import { Atom } from "nanostores";
|
|
7
|
-
import * as
|
|
7
|
+
import * as _better_fetch_fetch95 from "@better-fetch/fetch";
|
|
8
8
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
9
9
|
|
|
10
10
|
//#region src/client/vanilla.d.ts
|
|
@@ -33,21 +33,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
33
33
|
query?: SessionQueryParams;
|
|
34
34
|
} | undefined) => Promise<void>;
|
|
35
35
|
}>;
|
|
36
|
-
$fetch:
|
|
37
|
-
plugins: (
|
|
36
|
+
$fetch: _better_fetch_fetch95.BetterFetch<{
|
|
37
|
+
plugins: (_better_fetch_fetch95.BetterFetchPlugin<Record<string, any>> | {
|
|
38
38
|
id: string;
|
|
39
39
|
name: string;
|
|
40
40
|
hooks: {
|
|
41
|
-
onSuccess(context:
|
|
41
|
+
onSuccess(context: _better_fetch_fetch95.SuccessContext<any>): void;
|
|
42
42
|
};
|
|
43
43
|
} | {
|
|
44
44
|
id: string;
|
|
45
45
|
name: string;
|
|
46
46
|
hooks: {
|
|
47
|
-
onSuccess: ((context:
|
|
48
|
-
onError: ((context:
|
|
49
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
50
|
-
onResponse: ((context:
|
|
47
|
+
onSuccess: ((context: _better_fetch_fetch95.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
48
|
+
onError: ((context: _better_fetch_fetch95.ErrorContext) => Promise<void> | void) | undefined;
|
|
49
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch95.RequestContext<T>) => Promise<_better_fetch_fetch95.RequestContext | void> | _better_fetch_fetch95.RequestContext | void) | undefined;
|
|
50
|
+
onResponse: ((context: _better_fetch_fetch95.ResponseContext) => Promise<Response | void | _better_fetch_fetch95.ResponseContext> | Response | _better_fetch_fetch95.ResponseContext | void) | undefined;
|
|
51
51
|
};
|
|
52
52
|
})[];
|
|
53
53
|
cache?: RequestCache | undefined;
|
|
@@ -67,12 +67,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
67
67
|
referrer?: string | undefined;
|
|
68
68
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
69
69
|
signal?: (AbortSignal | null) | undefined;
|
|
70
|
-
onRetry?: ((response:
|
|
70
|
+
onRetry?: ((response: _better_fetch_fetch95.ResponseContext) => Promise<void> | void) | undefined;
|
|
71
71
|
hookOptions?: {
|
|
72
72
|
cloneResponse?: boolean;
|
|
73
73
|
} | undefined;
|
|
74
74
|
timeout?: number | undefined;
|
|
75
|
-
customFetchImpl:
|
|
75
|
+
customFetchImpl: _better_fetch_fetch95.FetchEsque;
|
|
76
76
|
baseURL: string;
|
|
77
77
|
throw?: boolean | undefined;
|
|
78
78
|
auth?: ({
|
|
@@ -92,17 +92,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
92
92
|
params?: any;
|
|
93
93
|
duplex?: "full" | "half" | undefined;
|
|
94
94
|
jsonParser: (text: string) => Promise<any> | any;
|
|
95
|
-
retry?:
|
|
95
|
+
retry?: _better_fetch_fetch95.RetryOptions | undefined;
|
|
96
96
|
retryAttempt?: number | undefined;
|
|
97
|
-
output?: (
|
|
98
|
-
errorSchema?:
|
|
97
|
+
output?: (_better_fetch_fetch95.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
98
|
+
errorSchema?: _better_fetch_fetch95.StandardSchemaV1 | undefined;
|
|
99
99
|
disableValidation?: boolean | undefined;
|
|
100
100
|
disableSignal?: boolean | undefined;
|
|
101
101
|
}, unknown, unknown, {}>;
|
|
102
102
|
$store: {
|
|
103
103
|
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
104
104
|
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
105
|
-
atoms: Record<string,
|
|
105
|
+
atoms: Record<string, nanostores5.WritableAtom<any>>;
|
|
106
106
|
};
|
|
107
107
|
$Infer: {
|
|
108
108
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
@@ -2,8 +2,8 @@ import { DeepPartial, Expand, HasRequiredKeys, LiteralNumber, LiteralUnion, Omit
|
|
|
2
2
|
import { InferActions, InferClientAPI, InferErrorCodes, IsSignal, SessionQueryParams } from "../types.mjs";
|
|
3
3
|
import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
|
|
4
4
|
import { BASE_ERROR_CODES } from "@better-auth/core/error";
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
5
|
+
import * as nanostores2 from "nanostores";
|
|
6
|
+
import * as _better_fetch_fetch63 from "@better-fetch/fetch";
|
|
7
7
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
8
8
|
import { DeepReadonly, Ref } from "vue";
|
|
9
9
|
export * from "nanostores";
|
|
@@ -73,21 +73,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
73
73
|
error: null;
|
|
74
74
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
75
75
|
};
|
|
76
|
-
$fetch:
|
|
77
|
-
plugins: (
|
|
76
|
+
$fetch: _better_fetch_fetch63.BetterFetch<{
|
|
77
|
+
plugins: (_better_fetch_fetch63.BetterFetchPlugin<Record<string, any>> | {
|
|
78
78
|
id: string;
|
|
79
79
|
name: string;
|
|
80
80
|
hooks: {
|
|
81
|
-
onSuccess(context:
|
|
81
|
+
onSuccess(context: _better_fetch_fetch63.SuccessContext<any>): void;
|
|
82
82
|
};
|
|
83
83
|
} | {
|
|
84
84
|
id: string;
|
|
85
85
|
name: string;
|
|
86
86
|
hooks: {
|
|
87
|
-
onSuccess: ((context:
|
|
88
|
-
onError: ((context:
|
|
89
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
90
|
-
onResponse: ((context:
|
|
87
|
+
onSuccess: ((context: _better_fetch_fetch63.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
88
|
+
onError: ((context: _better_fetch_fetch63.ErrorContext) => Promise<void> | void) | undefined;
|
|
89
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch63.RequestContext<T>) => Promise<_better_fetch_fetch63.RequestContext | void> | _better_fetch_fetch63.RequestContext | void) | undefined;
|
|
90
|
+
onResponse: ((context: _better_fetch_fetch63.ResponseContext) => Promise<Response | void | _better_fetch_fetch63.ResponseContext> | Response | _better_fetch_fetch63.ResponseContext | void) | undefined;
|
|
91
91
|
};
|
|
92
92
|
})[];
|
|
93
93
|
cache?: RequestCache | undefined;
|
|
@@ -107,12 +107,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
107
107
|
referrer?: string | undefined;
|
|
108
108
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
109
109
|
signal?: (AbortSignal | null) | undefined;
|
|
110
|
-
onRetry?: ((response:
|
|
110
|
+
onRetry?: ((response: _better_fetch_fetch63.ResponseContext) => Promise<void> | void) | undefined;
|
|
111
111
|
hookOptions?: {
|
|
112
112
|
cloneResponse?: boolean;
|
|
113
113
|
} | undefined;
|
|
114
114
|
timeout?: number | undefined;
|
|
115
|
-
customFetchImpl:
|
|
115
|
+
customFetchImpl: _better_fetch_fetch63.FetchEsque;
|
|
116
116
|
baseURL: string;
|
|
117
117
|
throw?: boolean | undefined;
|
|
118
118
|
auth?: ({
|
|
@@ -132,17 +132,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
|
|
|
132
132
|
params?: any;
|
|
133
133
|
duplex?: "full" | "half" | undefined;
|
|
134
134
|
jsonParser: (text: string) => Promise<any> | any;
|
|
135
|
-
retry?:
|
|
135
|
+
retry?: _better_fetch_fetch63.RetryOptions | undefined;
|
|
136
136
|
retryAttempt?: number | undefined;
|
|
137
|
-
output?: (
|
|
138
|
-
errorSchema?:
|
|
137
|
+
output?: (_better_fetch_fetch63.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
138
|
+
errorSchema?: _better_fetch_fetch63.StandardSchemaV1 | undefined;
|
|
139
139
|
disableValidation?: boolean | undefined;
|
|
140
140
|
disableSignal?: boolean | undefined;
|
|
141
141
|
}, unknown, unknown, {}>;
|
|
142
142
|
$store: {
|
|
143
143
|
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
144
144
|
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
145
|
-
atoms: Record<string,
|
|
145
|
+
atoms: Record<string, nanostores2.WritableAtom<any>>;
|
|
146
146
|
};
|
|
147
147
|
$ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
148
148
|
};
|
package/dist/db/field.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _better_auth_core38 from "@better-auth/core";
|
|
2
2
|
import { BetterAuthOptions } from "@better-auth/core";
|
|
3
3
|
import * as _better_auth_core_db16 from "@better-auth/core/db";
|
|
4
4
|
import { DBFieldAttribute, DBFieldAttributeConfig, DBFieldType } from "@better-auth/core/db";
|
|
@@ -12,8 +12,8 @@ declare const createFieldAttribute: <T extends DBFieldType, C extends DBFieldAtt
|
|
|
12
12
|
defaultValue?: (_better_auth_core_db16.DBPrimitive | (() => _better_auth_core_db16.DBPrimitive)) | undefined;
|
|
13
13
|
onUpdate?: (() => _better_auth_core_db16.DBPrimitive) | undefined;
|
|
14
14
|
transform?: {
|
|
15
|
-
input?: (value: _better_auth_core_db16.DBPrimitive) =>
|
|
16
|
-
output?: (value: _better_auth_core_db16.DBPrimitive) =>
|
|
15
|
+
input?: (value: _better_auth_core_db16.DBPrimitive) => _better_auth_core38.Awaitable<_better_auth_core_db16.DBPrimitive>;
|
|
16
|
+
output?: (value: _better_auth_core_db16.DBPrimitive) => _better_auth_core38.Awaitable<_better_auth_core_db16.DBPrimitive>;
|
|
17
17
|
} | undefined;
|
|
18
18
|
references?: {
|
|
19
19
|
model: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BetterAuthOptions } from "../types/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as better_call254 from "better-call";
|
|
3
3
|
import { RequestEvent } from "@sveltejs/kit";
|
|
4
4
|
|
|
5
5
|
//#region src/integrations/svelte-kit.d.ts
|
|
@@ -29,7 +29,7 @@ declare const sveltekitCookies: (getRequestEvent: () => RequestEvent<any, any>)
|
|
|
29
29
|
hooks: {
|
|
30
30
|
after: {
|
|
31
31
|
matcher(): true;
|
|
32
|
-
handler: (inputContext:
|
|
32
|
+
handler: (inputContext: better_call254.MiddlewareInputContext<better_call254.MiddlewareOptions>) => Promise<void>;
|
|
33
33
|
}[];
|
|
34
34
|
};
|
|
35
35
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _better_auth_core20 from "@better-auth/core";
|
|
2
|
+
import * as better_call258 from "better-call";
|
|
3
3
|
|
|
4
4
|
//#region src/integrations/tanstack-start-solid.d.ts
|
|
5
5
|
|
|
@@ -24,8 +24,8 @@ declare const tanstackStartCookies: () => {
|
|
|
24
24
|
id: "tanstack-start-cookies-solid";
|
|
25
25
|
hooks: {
|
|
26
26
|
after: {
|
|
27
|
-
matcher(ctx:
|
|
28
|
-
handler: (inputContext:
|
|
27
|
+
matcher(ctx: _better_auth_core20.HookEndpointContext): true;
|
|
28
|
+
handler: (inputContext: better_call258.MiddlewareInputContext<better_call258.MiddlewareOptions>) => Promise<void>;
|
|
29
29
|
}[];
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _better_auth_core19 from "@better-auth/core";
|
|
2
|
+
import * as better_call256 from "better-call";
|
|
3
3
|
|
|
4
4
|
//#region src/integrations/tanstack-start.d.ts
|
|
5
5
|
|
|
@@ -24,8 +24,8 @@ declare const tanstackStartCookies: () => {
|
|
|
24
24
|
id: "tanstack-start-cookies";
|
|
25
25
|
hooks: {
|
|
26
26
|
after: {
|
|
27
|
-
matcher(ctx:
|
|
28
|
-
handler: (inputContext:
|
|
27
|
+
matcher(ctx: _better_auth_core19.HookEndpointContext): true;
|
|
28
|
+
handler: (inputContext: better_call256.MiddlewareInputContext<better_call256.MiddlewareOptions>) => Promise<void>;
|
|
29
29
|
}[];
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccessControl, Statements } from "../access/types.mjs";
|
|
2
2
|
import { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole } from "./types.mjs";
|
|
3
3
|
import "../index.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _better_auth_core40 from "@better-auth/core";
|
|
5
5
|
import * as _better_auth_core_db23 from "@better-auth/core/db";
|
|
6
6
|
import * as better_call701 from "better-call";
|
|
7
7
|
import * as zod1930 from "zod";
|
|
@@ -48,7 +48,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
48
48
|
token: string;
|
|
49
49
|
ipAddress?: string | null | undefined;
|
|
50
50
|
userAgent?: string | null | undefined;
|
|
51
|
-
} & Record<string, unknown>, ctx:
|
|
51
|
+
} & Record<string, unknown>, ctx: _better_auth_core40.GenericEndpointContext | null): Promise<void>;
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
};
|
|
@@ -56,7 +56,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
56
56
|
};
|
|
57
57
|
hooks: {
|
|
58
58
|
after: {
|
|
59
|
-
matcher(context:
|
|
59
|
+
matcher(context: _better_auth_core40.HookEndpointContext): boolean;
|
|
60
60
|
handler: (inputContext: better_call701.MiddlewareInputContext<better_call701.MiddlewareOptions>) => Promise<SessionWithImpersonatedBy[] | undefined>;
|
|
61
61
|
}[];
|
|
62
62
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AnonymousOptions, AnonymousSession, UserWithAnonymous } from "./types.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _better_auth_core0 from "@better-auth/core";
|
|
3
|
+
import * as better_call1 from "better-call";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/anonymous/index.d.ts
|
|
6
6
|
declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
7
7
|
id: "anonymous";
|
|
8
8
|
endpoints: {
|
|
9
|
-
signInAnonymous:
|
|
9
|
+
signInAnonymous: better_call1.StrictEndpoint<"/sign-in/anonymous", {
|
|
10
10
|
method: "POST";
|
|
11
11
|
metadata: {
|
|
12
12
|
openapi: {
|
|
@@ -45,9 +45,9 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
45
45
|
image?: string | null | undefined;
|
|
46
46
|
};
|
|
47
47
|
} | null>;
|
|
48
|
-
deleteAnonymousUser:
|
|
48
|
+
deleteAnonymousUser: better_call1.StrictEndpoint<"/delete-anonymous-user", {
|
|
49
49
|
method: "POST";
|
|
50
|
-
use: ((inputContext:
|
|
50
|
+
use: ((inputContext: better_call1.MiddlewareInputContext<better_call1.MiddlewareOptions>) => Promise<{
|
|
51
51
|
session: {
|
|
52
52
|
session: Record<string, any> & {
|
|
53
53
|
id: string;
|
|
@@ -130,8 +130,8 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
130
130
|
};
|
|
131
131
|
hooks: {
|
|
132
132
|
after: {
|
|
133
|
-
matcher(ctx:
|
|
134
|
-
handler: (inputContext:
|
|
133
|
+
matcher(ctx: _better_auth_core0.HookEndpointContext): boolean;
|
|
134
|
+
handler: (inputContext: better_call1.MiddlewareInputContext<better_call1.MiddlewareOptions>) => Promise<void>;
|
|
135
135
|
}[];
|
|
136
136
|
};
|
|
137
137
|
options: AnonymousOptions | undefined;
|