jazz-tools 0.17.14 → 0.18.1
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/.svelte-kit/__package__/jazz.class.svelte.js +1 -1
- package/.svelte-kit/__package__/media/image.svelte +3 -9
- package/.svelte-kit/__package__/media/image.svelte.d.ts +1 -6
- package/.svelte-kit/__package__/media/image.svelte.d.ts.map +1 -1
- package/.svelte-kit/__package__/media/image.types.d.ts +7 -0
- package/.svelte-kit/__package__/media/image.types.d.ts.map +1 -0
- package/.svelte-kit/__package__/media/image.types.js +1 -0
- package/.svelte-kit/__package__/tests/media/image.svelte.test.js +31 -31
- package/.turbo/turbo-build.log +60 -46
- package/CHANGELOG.md +41 -0
- package/dist/better-auth/auth/client.d.ts +29 -0
- package/dist/better-auth/auth/client.d.ts.map +1 -0
- package/dist/better-auth/auth/client.js +127 -0
- package/dist/better-auth/auth/client.js.map +1 -0
- package/dist/better-auth/auth/react.d.ts +2170 -0
- package/dist/better-auth/auth/react.d.ts.map +1 -0
- package/dist/better-auth/auth/react.js +40 -0
- package/dist/better-auth/auth/react.js.map +1 -0
- package/dist/better-auth/auth/server.d.ts +14 -0
- package/dist/better-auth/auth/server.d.ts.map +1 -0
- package/dist/better-auth/auth/server.js +198 -0
- package/dist/better-auth/auth/server.js.map +1 -0
- package/dist/better-auth/auth/tests/client.test.d.ts +2 -0
- package/dist/better-auth/auth/tests/client.test.d.ts.map +1 -0
- package/dist/better-auth/auth/tests/server.test.d.ts +2 -0
- package/dist/better-auth/auth/tests/server.test.d.ts.map +1 -0
- package/dist/browser/index.js +2 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/{chunk-LZOF6WP5.js → chunk-IERUTUXB.js} +1336 -1017
- package/dist/chunk-IERUTUXB.js.map +1 -0
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/inspector/{custom-element-ZSNTCECD.js → custom-element-WCY6D3QJ.js} +3 -3
- package/dist/inspector/{custom-element-ZSNTCECD.js.map → custom-element-WCY6D3QJ.js.map} +1 -1
- package/dist/inspector/index.js +1 -1
- package/dist/inspector/index.js.map +1 -1
- package/dist/inspector/register-custom-element.js +1 -1
- package/dist/media/{chunk-E5J3WLQW.js → chunk-KR2V6X2N.js} +14 -9
- package/dist/media/chunk-KR2V6X2N.js.map +1 -0
- package/dist/media/create-image.d.ts +6 -6
- package/dist/media/index.browser.d.ts +6 -6
- package/dist/media/index.browser.js +1 -1
- package/dist/media/index.d.ts +1 -1
- package/dist/media/index.js +1 -1
- package/dist/media/index.native.d.ts +6 -6
- package/dist/media/index.native.js +1 -1
- package/dist/media/utils.d.ts.map +1 -1
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.js.map +1 -1
- package/dist/react/index.js +7 -5
- package/dist/react/index.js.map +1 -1
- package/dist/react-core/hooks.d.ts.map +1 -1
- package/dist/react-core/index.js +4675 -23
- package/dist/react-core/index.js.map +1 -1
- package/dist/react-native-core/index.js +1 -1
- package/dist/react-native-core/index.js.map +1 -1
- package/dist/svelte/jazz.class.svelte.js +1 -1
- package/dist/svelte/media/image.svelte +3 -9
- package/dist/svelte/media/image.svelte.d.ts +1 -6
- package/dist/svelte/media/image.svelte.d.ts.map +1 -1
- package/dist/svelte/media/image.types.d.ts +7 -0
- package/dist/svelte/media/image.types.d.ts.map +1 -0
- package/dist/svelte/media/image.types.js +1 -0
- package/dist/svelte/tests/media/image.svelte.test.js +31 -31
- package/dist/testing.js +18 -14
- package/dist/testing.js.map +1 -1
- package/dist/tools/coValues/CoFieldInit.d.ts +13 -0
- package/dist/tools/coValues/CoFieldInit.d.ts.map +1 -0
- package/dist/tools/coValues/CoValueBase.d.ts +18 -15
- package/dist/tools/coValues/CoValueBase.d.ts.map +1 -1
- package/dist/tools/coValues/account.d.ts +101 -46
- package/dist/tools/coValues/account.d.ts.map +1 -1
- package/dist/tools/coValues/coFeed.d.ts +78 -62
- package/dist/tools/coValues/coFeed.d.ts.map +1 -1
- package/dist/tools/coValues/coList.d.ts +212 -99
- package/dist/tools/coValues/coList.d.ts.map +1 -1
- package/dist/tools/coValues/coMap.d.ts +210 -192
- package/dist/tools/coValues/coMap.d.ts.map +1 -1
- package/dist/tools/coValues/coPlainText.d.ts +30 -22
- package/dist/tools/coValues/coPlainText.d.ts.map +1 -1
- package/dist/tools/coValues/deepLoading.d.ts +13 -13
- package/dist/tools/coValues/deepLoading.d.ts.map +1 -1
- package/dist/tools/coValues/extensions/imageDef.d.ts +1 -1
- package/dist/tools/coValues/group.d.ts +32 -32
- package/dist/tools/coValues/group.d.ts.map +1 -1
- package/dist/tools/coValues/inbox.d.ts.map +1 -1
- package/dist/tools/coValues/interfaces.d.ts +18 -17
- package/dist/tools/coValues/interfaces.d.ts.map +1 -1
- package/dist/tools/coValues/profile.d.ts +6 -5
- package/dist/tools/coValues/profile.d.ts.map +1 -1
- package/dist/tools/coValues/schemaUnion.d.ts +3 -3
- package/dist/tools/coValues/schemaUnion.d.ts.map +1 -1
- package/dist/tools/exports.d.ts +1 -1
- package/dist/tools/exports.d.ts.map +1 -1
- package/dist/tools/implementation/anonymousJazzAgent.d.ts +2 -1
- package/dist/tools/implementation/anonymousJazzAgent.d.ts.map +1 -1
- package/dist/tools/implementation/schema.d.ts +5 -5
- package/dist/tools/implementation/schema.d.ts.map +1 -1
- package/dist/tools/implementation/symbols.d.ts +2 -0
- package/dist/tools/implementation/symbols.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/AccountSchema.d.ts +2 -2
- package/dist/tools/implementation/zodSchema/schemaTypes/AccountSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/CoFeedSchema.d.ts +6 -2
- package/dist/tools/implementation/zodSchema/schemaTypes/CoFeedSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/CoListSchema.d.ts +8 -3
- package/dist/tools/implementation/zodSchema/schemaTypes/CoListSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts +12 -7
- package/dist/tools/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/CoRecordSchema.d.ts +13 -7
- package/dist/tools/implementation/zodSchema/schemaTypes/CoRecordSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/FileStreamSchema.d.ts +11 -2
- package/dist/tools/implementation/zodSchema/schemaTypes/FileStreamSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/PlainTextSchema.d.ts +4 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/PlainTextSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/schemaTypes/RichTextSchema.d.ts +4 -0
- package/dist/tools/implementation/zodSchema/schemaTypes/RichTextSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/typeConverters/{CoFieldInit.d.ts → CoFieldSchemaInit.d.ts} +7 -7
- package/dist/tools/implementation/zodSchema/typeConverters/CoFieldSchemaInit.d.ts.map +1 -0
- package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchema.d.ts +4 -4
- package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchema.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.d.ts +4 -4
- package/dist/tools/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/zodCo.d.ts +3 -3
- package/dist/tools/implementation/zodSchema/zodCo.d.ts.map +1 -1
- package/dist/tools/internal.d.ts +2 -1
- package/dist/tools/internal.d.ts.map +1 -1
- package/dist/tools/lib/migration.d.ts +1 -1
- package/dist/tools/lib/migration.d.ts.map +1 -1
- package/dist/tools/subscribe/SubscriptionScope.d.ts.map +1 -1
- package/dist/tools/subscribe/index.d.ts +1 -1
- package/dist/tools/subscribe/index.d.ts.map +1 -1
- package/dist/tools/subscribe/utils.d.ts +2 -2
- package/dist/tools/subscribe/utils.d.ts.map +1 -1
- package/dist/tools/testing.d.ts.map +1 -1
- package/dist/tools/tests/utils.d.ts +2 -6
- package/dist/tools/tests/utils.d.ts.map +1 -1
- package/dist/worker/index.js +3 -3
- package/dist/worker/index.js.map +1 -1
- package/package.json +23 -4
- package/src/better-auth/auth/client.ts +169 -0
- package/src/better-auth/auth/react.tsx +105 -0
- package/src/better-auth/auth/server.ts +250 -0
- package/src/better-auth/auth/tests/client.test.ts +249 -0
- package/src/better-auth/auth/tests/server.test.ts +226 -0
- package/src/browser/auth/PasskeyAuth.ts +2 -2
- package/src/browser/createBrowserContext.ts +2 -2
- package/src/browser/tests/PasskeyAuth.test.ts +2 -2
- package/src/inspector/custom-element.tsx +2 -2
- package/src/inspector/viewer/new-app.tsx +1 -1
- package/src/media/create-image.test.ts +7 -7
- package/src/media/create-image.ts +5 -3
- package/src/media/index.ts +1 -1
- package/src/media/utils.test.ts +72 -66
- package/src/media/utils.ts +9 -6
- package/src/prosemirror/lib/plugin.ts +1 -1
- package/src/prosemirror/lib/sync.ts +1 -1
- package/src/prosemirror/tests/plugin.test.ts +4 -4
- package/src/react/media/image.tsx +2 -2
- package/src/react/tests/media/image.test.tsx +52 -32
- package/src/react-core/hooks.ts +11 -5
- package/src/react-core/tests/useAccount.test.ts +16 -22
- package/src/react-core/tests/useCoState.test.ts +19 -19
- package/src/react-core/tests/useInboxSender.test.ts +5 -2
- package/src/react-core/tests/usePassPhraseAuth.test.ts +6 -6
- package/src/react-native-core/media/image.tsx +1 -1
- package/src/svelte/jazz.class.svelte.ts +1 -1
- package/src/svelte/media/image.svelte +3 -9
- package/src/svelte/media/image.types.ts +7 -0
- package/src/svelte/tests/media/image.svelte.test.ts +34 -32
- package/src/tools/auth/DemoAuth.ts +2 -2
- package/src/tools/auth/PassphraseAuth.ts +2 -2
- package/src/tools/auth/clerk/index.ts +2 -2
- package/src/tools/auth/clerk/tests/JazzClerkAuth.test.ts +1 -1
- package/src/tools/coValues/CoFieldInit.ts +20 -0
- package/src/tools/coValues/CoValueBase.ts +40 -60
- package/src/tools/coValues/account.ts +311 -232
- package/src/tools/coValues/coFeed.ts +185 -153
- package/src/tools/coValues/coList.ts +507 -334
- package/src/tools/coValues/coMap.ts +434 -286
- package/src/tools/coValues/coPlainText.ts +94 -110
- package/src/tools/coValues/deepLoading.ts +13 -13
- package/src/tools/coValues/group.ts +100 -114
- package/src/tools/coValues/inbox.ts +16 -14
- package/src/tools/coValues/interfaces.ts +49 -31
- package/src/tools/coValues/profile.ts +8 -6
- package/src/tools/coValues/request.ts +9 -9
- package/src/tools/coValues/schemaUnion.ts +11 -5
- package/src/tools/exports.ts +1 -1
- package/src/tools/implementation/ContextManager.ts +4 -4
- package/src/tools/implementation/anonymousJazzAgent.ts +2 -1
- package/src/tools/implementation/createContext.ts +1 -1
- package/src/tools/implementation/devtoolsFormatters.ts +9 -9
- package/src/tools/implementation/invites.ts +2 -2
- package/src/tools/implementation/schema.ts +7 -7
- package/src/tools/implementation/symbols.ts +3 -0
- package/src/tools/implementation/zodSchema/schemaTypes/AccountSchema.ts +2 -2
- package/src/tools/implementation/zodSchema/schemaTypes/CoFeedSchema.ts +11 -2
- package/src/tools/implementation/zodSchema/schemaTypes/CoListSchema.ts +18 -7
- package/src/tools/implementation/zodSchema/schemaTypes/CoMapSchema.ts +17 -7
- package/src/tools/implementation/zodSchema/schemaTypes/CoRecordSchema.ts +20 -11
- package/src/tools/implementation/zodSchema/schemaTypes/FileStreamSchema.ts +19 -2
- package/src/tools/implementation/zodSchema/schemaTypes/PlainTextSchema.ts +6 -0
- package/src/tools/implementation/zodSchema/schemaTypes/RichTextSchema.ts +6 -0
- package/src/tools/implementation/zodSchema/typeConverters/{CoFieldInit.ts → CoFieldSchemaInit.ts} +11 -11
- package/src/tools/implementation/zodSchema/typeConverters/InstanceOfSchema.ts +4 -4
- package/src/tools/implementation/zodSchema/typeConverters/InstanceOfSchemaCoValuesNullable.ts +4 -4
- package/src/tools/implementation/zodSchema/zodCo.ts +3 -3
- package/src/tools/internal.ts +2 -1
- package/src/tools/lib/migration.ts +5 -5
- package/src/tools/subscribe/SubscriptionScope.ts +32 -24
- package/src/tools/subscribe/index.ts +4 -4
- package/src/tools/subscribe/utils.ts +11 -11
- package/src/tools/testing.ts +17 -13
- package/src/tools/tests/ContextManager.test.ts +70 -59
- package/src/tools/tests/PassphraseAuth.test.ts +2 -2
- package/src/tools/tests/account.test.ts +188 -67
- package/src/tools/tests/coDiscriminatedUnion.test-d.ts +12 -6
- package/src/tools/tests/coDiscriminatedUnion.test.ts +26 -17
- package/src/tools/tests/coFeed.test-d.ts +18 -17
- package/src/tools/tests/coFeed.test.ts +108 -97
- package/src/tools/tests/coList.test-d.ts +18 -23
- package/src/tools/tests/coList.test.ts +350 -165
- package/src/tools/tests/coMap.record.test-d.ts +9 -13
- package/src/tools/tests/coMap.record.test.ts +37 -23
- package/src/tools/tests/coMap.test-d.ts +43 -21
- package/src/tools/tests/coMap.test.ts +459 -182
- package/src/tools/tests/coOptional.test.ts +28 -13
- package/src/tools/tests/coPlainText.test.ts +15 -15
- package/src/tools/tests/createContext.test.ts +14 -14
- package/src/tools/tests/deepLoading.test.ts +95 -94
- package/src/tools/tests/exportImport.test.ts +61 -41
- package/src/tools/tests/groupsAndAccounts.test.ts +333 -116
- package/src/tools/tests/inbox.test.ts +22 -17
- package/src/tools/tests/interfaces.test.ts +12 -11
- package/src/tools/tests/invites.test.ts +6 -4
- package/src/tools/tests/load.test.ts +20 -18
- package/src/tools/tests/patterns/notifications.test.ts +7 -7
- package/src/tools/tests/patterns/quest.test.ts +3 -3
- package/src/tools/tests/patterns/requestToJoin.test.ts +22 -22
- package/src/tools/tests/request.test.ts +38 -39
- package/src/tools/tests/schemaUnion.test.ts +64 -10
- package/src/tools/tests/subscribe.test.ts +64 -64
- package/src/tools/tests/testing.test.ts +7 -11
- package/src/tools/tests/utils.ts +3 -3
- package/src/tools/tests/zod.test.ts +3 -3
- package/src/worker/index.ts +3 -3
- package/tsup.config.ts +9 -0
- package/dist/chunk-LZOF6WP5.js.map +0 -1
- package/dist/media/chunk-E5J3WLQW.js.map +0 -1
- package/dist/tools/implementation/zodSchema/typeConverters/CoFieldInit.d.ts.map +0 -1
@@ -0,0 +1,2170 @@
|
|
1
|
+
import { createAuthClient } from "better-auth/client";
|
2
|
+
import type { Account, AccountClass, AnyAccountSchema, CoValueFromRaw } from "jazz-tools";
|
3
|
+
import { type JazzProviderProps } from "jazz-tools/react";
|
4
|
+
import { type PropsWithChildren } from "react";
|
5
|
+
import { jazzPluginClient } from "./client.js";
|
6
|
+
type AuthClient = ReturnType<typeof createAuthClient<{
|
7
|
+
plugins: [ReturnType<typeof jazzPluginClient>];
|
8
|
+
}>>;
|
9
|
+
export declare const AuthContext: import("react").Context<({
|
10
|
+
signIn: {
|
11
|
+
social: <FetchOptions extends {
|
12
|
+
credentials?: RequestCredentials | undefined;
|
13
|
+
priority?: RequestPriority | undefined;
|
14
|
+
method?: string | undefined;
|
15
|
+
headers?: (HeadersInit & (HeadersInit | {
|
16
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
17
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
18
|
+
authorization: "Bearer" | "Basic";
|
19
|
+
})) | undefined;
|
20
|
+
cache?: RequestCache | undefined;
|
21
|
+
integrity?: string | undefined;
|
22
|
+
keepalive?: boolean | undefined;
|
23
|
+
mode?: RequestMode | undefined;
|
24
|
+
redirect?: RequestRedirect | undefined;
|
25
|
+
referrer?: string | undefined;
|
26
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
27
|
+
signal?: (AbortSignal | null) | undefined;
|
28
|
+
window?: null | undefined;
|
29
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
30
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
31
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
32
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
33
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
34
|
+
hookOptions?: {
|
35
|
+
cloneResponse?: boolean;
|
36
|
+
} | undefined;
|
37
|
+
timeout?: number | undefined;
|
38
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
39
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
40
|
+
baseURL?: string | undefined;
|
41
|
+
throw?: boolean | undefined;
|
42
|
+
auth?: ({
|
43
|
+
type: "Bearer";
|
44
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
45
|
+
} | {
|
46
|
+
type: "Basic";
|
47
|
+
username: string | (() => string | undefined) | undefined;
|
48
|
+
password: string | (() => string | undefined) | undefined;
|
49
|
+
} | {
|
50
|
+
type: "Custom";
|
51
|
+
prefix: string | (() => string | undefined) | undefined;
|
52
|
+
value: string | (() => string | undefined) | undefined;
|
53
|
+
}) | undefined;
|
54
|
+
body?: (Partial<{
|
55
|
+
provider: unknown;
|
56
|
+
callbackURL?: string | undefined;
|
57
|
+
newUserCallbackURL?: string | undefined;
|
58
|
+
errorCallbackURL?: string | undefined;
|
59
|
+
disableRedirect?: boolean | undefined;
|
60
|
+
idToken?: {
|
61
|
+
token: string;
|
62
|
+
nonce?: string | undefined;
|
63
|
+
accessToken?: string | undefined;
|
64
|
+
refreshToken?: string | undefined;
|
65
|
+
expiresAt?: number | undefined;
|
66
|
+
} | undefined;
|
67
|
+
scopes?: string[] | undefined;
|
68
|
+
requestSignUp?: boolean | undefined;
|
69
|
+
loginHint?: string | undefined;
|
70
|
+
}> & Record<string, any>) | undefined;
|
71
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
72
|
+
params?: Record<string, any> | undefined;
|
73
|
+
duplex?: ("full" | "half") | undefined;
|
74
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
75
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
76
|
+
retryAttempt?: number | undefined;
|
77
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
78
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
79
|
+
disableValidation?: boolean | undefined;
|
80
|
+
}>(data_0: import("better-auth").Prettify<{
|
81
|
+
provider: unknown;
|
82
|
+
callbackURL?: string | undefined;
|
83
|
+
newUserCallbackURL?: string | undefined;
|
84
|
+
errorCallbackURL?: string | undefined;
|
85
|
+
disableRedirect?: boolean | undefined;
|
86
|
+
idToken?: {
|
87
|
+
token: string;
|
88
|
+
nonce?: string | undefined;
|
89
|
+
accessToken?: string | undefined;
|
90
|
+
refreshToken?: string | undefined;
|
91
|
+
expiresAt?: number | undefined;
|
92
|
+
} | undefined;
|
93
|
+
scopes?: string[] | undefined;
|
94
|
+
requestSignUp?: boolean | undefined;
|
95
|
+
loginHint?: string | undefined;
|
96
|
+
} & {
|
97
|
+
fetchOptions?: FetchOptions | undefined;
|
98
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<{
|
99
|
+
redirect: boolean;
|
100
|
+
token: string;
|
101
|
+
url: undefined;
|
102
|
+
user: {
|
103
|
+
id: string;
|
104
|
+
email: string;
|
105
|
+
name: string;
|
106
|
+
image: string | null | undefined;
|
107
|
+
emailVerified: boolean;
|
108
|
+
createdAt: Date;
|
109
|
+
updatedAt: Date;
|
110
|
+
};
|
111
|
+
} | {
|
112
|
+
url: string;
|
113
|
+
redirect: boolean;
|
114
|
+
}>, {
|
115
|
+
code?: string;
|
116
|
+
message?: string;
|
117
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
118
|
+
};
|
119
|
+
} & {
|
120
|
+
getSession: <FetchOptions extends {
|
121
|
+
credentials?: RequestCredentials | undefined;
|
122
|
+
priority?: RequestPriority | undefined;
|
123
|
+
method?: string | undefined;
|
124
|
+
headers?: (HeadersInit & (HeadersInit | {
|
125
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
126
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
127
|
+
authorization: "Bearer" | "Basic";
|
128
|
+
})) | undefined;
|
129
|
+
cache?: RequestCache | undefined;
|
130
|
+
integrity?: string | undefined;
|
131
|
+
keepalive?: boolean | undefined;
|
132
|
+
mode?: RequestMode | undefined;
|
133
|
+
redirect?: RequestRedirect | undefined;
|
134
|
+
referrer?: string | undefined;
|
135
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
136
|
+
signal?: (AbortSignal | null) | undefined;
|
137
|
+
window?: null | undefined;
|
138
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
139
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
140
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
141
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
142
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
143
|
+
hookOptions?: {
|
144
|
+
cloneResponse?: boolean;
|
145
|
+
} | undefined;
|
146
|
+
timeout?: number | undefined;
|
147
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
148
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
149
|
+
baseURL?: string | undefined;
|
150
|
+
throw?: boolean | undefined;
|
151
|
+
auth?: ({
|
152
|
+
type: "Bearer";
|
153
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
154
|
+
} | {
|
155
|
+
type: "Basic";
|
156
|
+
username: string | (() => string | undefined) | undefined;
|
157
|
+
password: string | (() => string | undefined) | undefined;
|
158
|
+
} | {
|
159
|
+
type: "Custom";
|
160
|
+
prefix: string | (() => string | undefined) | undefined;
|
161
|
+
value: string | (() => string | undefined) | undefined;
|
162
|
+
}) | undefined;
|
163
|
+
body?: undefined;
|
164
|
+
query?: (Partial<{
|
165
|
+
disableCookieCache?: unknown;
|
166
|
+
disableRefresh?: unknown;
|
167
|
+
}> & Record<string, any>) | undefined;
|
168
|
+
params?: Record<string, any> | undefined;
|
169
|
+
duplex?: ("full" | "half") | undefined;
|
170
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
171
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
172
|
+
retryAttempt?: number | undefined;
|
173
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
174
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
175
|
+
disableValidation?: boolean | undefined;
|
176
|
+
}>(data_0?: import("better-auth").Prettify<{
|
177
|
+
query?: {
|
178
|
+
disableCookieCache?: unknown;
|
179
|
+
disableRefresh?: unknown;
|
180
|
+
} | undefined;
|
181
|
+
fetchOptions?: FetchOptions | undefined;
|
182
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
183
|
+
user: {
|
184
|
+
id: string;
|
185
|
+
email: string;
|
186
|
+
emailVerified: boolean;
|
187
|
+
name: string;
|
188
|
+
createdAt: Date;
|
189
|
+
updatedAt: Date;
|
190
|
+
image?: string | null | undefined;
|
191
|
+
};
|
192
|
+
session: {
|
193
|
+
id: string;
|
194
|
+
userId: string;
|
195
|
+
expiresAt: Date;
|
196
|
+
createdAt: Date;
|
197
|
+
updatedAt: Date;
|
198
|
+
token: string;
|
199
|
+
ipAddress?: string | null | undefined;
|
200
|
+
userAgent?: string | null | undefined;
|
201
|
+
};
|
202
|
+
} | null, {
|
203
|
+
code?: string;
|
204
|
+
message?: string;
|
205
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
206
|
+
} & {
|
207
|
+
signOut: <FetchOptions extends {
|
208
|
+
credentials?: RequestCredentials | undefined;
|
209
|
+
priority?: RequestPriority | undefined;
|
210
|
+
method?: string | undefined;
|
211
|
+
headers?: (HeadersInit & (HeadersInit | {
|
212
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
213
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
214
|
+
authorization: "Bearer" | "Basic";
|
215
|
+
})) | undefined;
|
216
|
+
cache?: RequestCache | undefined;
|
217
|
+
integrity?: string | undefined;
|
218
|
+
keepalive?: boolean | undefined;
|
219
|
+
mode?: RequestMode | undefined;
|
220
|
+
redirect?: RequestRedirect | undefined;
|
221
|
+
referrer?: string | undefined;
|
222
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
223
|
+
signal?: (AbortSignal | null) | undefined;
|
224
|
+
window?: null | undefined;
|
225
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
226
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
227
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
228
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
229
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
230
|
+
hookOptions?: {
|
231
|
+
cloneResponse?: boolean;
|
232
|
+
} | undefined;
|
233
|
+
timeout?: number | undefined;
|
234
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
235
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
236
|
+
baseURL?: string | undefined;
|
237
|
+
throw?: boolean | undefined;
|
238
|
+
auth?: ({
|
239
|
+
type: "Bearer";
|
240
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
241
|
+
} | {
|
242
|
+
type: "Basic";
|
243
|
+
username: string | (() => string | undefined) | undefined;
|
244
|
+
password: string | (() => string | undefined) | undefined;
|
245
|
+
} | {
|
246
|
+
type: "Custom";
|
247
|
+
prefix: string | (() => string | undefined) | undefined;
|
248
|
+
value: string | (() => string | undefined) | undefined;
|
249
|
+
}) | undefined;
|
250
|
+
body?: undefined;
|
251
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
252
|
+
params?: Record<string, any> | undefined;
|
253
|
+
duplex?: ("full" | "half") | undefined;
|
254
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
255
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
256
|
+
retryAttempt?: number | undefined;
|
257
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
258
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
259
|
+
disableValidation?: boolean | undefined;
|
260
|
+
}>(data_0?: import("better-auth").Prettify<{
|
261
|
+
query?: Record<string, any> | undefined;
|
262
|
+
fetchOptions?: FetchOptions | undefined;
|
263
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
264
|
+
success: boolean;
|
265
|
+
}, {
|
266
|
+
code?: string;
|
267
|
+
message?: string;
|
268
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
269
|
+
} & {
|
270
|
+
signIn: {
|
271
|
+
email: <FetchOptions extends {
|
272
|
+
credentials?: RequestCredentials | undefined;
|
273
|
+
priority?: RequestPriority | undefined;
|
274
|
+
method?: string | undefined;
|
275
|
+
headers?: (HeadersInit & (HeadersInit | {
|
276
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
277
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
278
|
+
authorization: "Bearer" | "Basic";
|
279
|
+
})) | undefined;
|
280
|
+
cache?: RequestCache | undefined;
|
281
|
+
integrity?: string | undefined;
|
282
|
+
keepalive?: boolean | undefined;
|
283
|
+
mode?: RequestMode | undefined;
|
284
|
+
redirect?: RequestRedirect | undefined;
|
285
|
+
referrer?: string | undefined;
|
286
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
287
|
+
signal?: (AbortSignal | null) | undefined;
|
288
|
+
window?: null | undefined;
|
289
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
290
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
291
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
292
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
293
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
294
|
+
hookOptions?: {
|
295
|
+
cloneResponse?: boolean;
|
296
|
+
} | undefined;
|
297
|
+
timeout?: number | undefined;
|
298
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
299
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
300
|
+
baseURL?: string | undefined;
|
301
|
+
throw?: boolean | undefined;
|
302
|
+
auth?: ({
|
303
|
+
type: "Bearer";
|
304
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
305
|
+
} | {
|
306
|
+
type: "Basic";
|
307
|
+
username: string | (() => string | undefined) | undefined;
|
308
|
+
password: string | (() => string | undefined) | undefined;
|
309
|
+
} | {
|
310
|
+
type: "Custom";
|
311
|
+
prefix: string | (() => string | undefined) | undefined;
|
312
|
+
value: string | (() => string | undefined) | undefined;
|
313
|
+
}) | undefined;
|
314
|
+
body?: (Partial<{
|
315
|
+
email: string;
|
316
|
+
password: string;
|
317
|
+
callbackURL?: string | undefined;
|
318
|
+
rememberMe?: boolean | undefined;
|
319
|
+
}> & Record<string, any>) | undefined;
|
320
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
321
|
+
params?: Record<string, any> | undefined;
|
322
|
+
duplex?: ("full" | "half") | undefined;
|
323
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
324
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
325
|
+
retryAttempt?: number | undefined;
|
326
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
327
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
328
|
+
disableValidation?: boolean | undefined;
|
329
|
+
}>(data_0: import("better-auth").Prettify<{
|
330
|
+
email: string;
|
331
|
+
password: string;
|
332
|
+
callbackURL?: string | undefined;
|
333
|
+
rememberMe?: boolean | undefined;
|
334
|
+
} & {
|
335
|
+
fetchOptions?: FetchOptions | undefined;
|
336
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
337
|
+
redirect: boolean;
|
338
|
+
token: string;
|
339
|
+
url: string | undefined;
|
340
|
+
user: {
|
341
|
+
id: string;
|
342
|
+
email: string;
|
343
|
+
name: string;
|
344
|
+
image: string | null | undefined;
|
345
|
+
emailVerified: boolean;
|
346
|
+
createdAt: Date;
|
347
|
+
updatedAt: Date;
|
348
|
+
};
|
349
|
+
}, {
|
350
|
+
code?: string;
|
351
|
+
message?: string;
|
352
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
353
|
+
};
|
354
|
+
} & {
|
355
|
+
forgetPassword: <FetchOptions extends {
|
356
|
+
credentials?: RequestCredentials | undefined;
|
357
|
+
priority?: RequestPriority | undefined;
|
358
|
+
method?: string | undefined;
|
359
|
+
headers?: (HeadersInit & (HeadersInit | {
|
360
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
361
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
362
|
+
authorization: "Bearer" | "Basic";
|
363
|
+
})) | undefined;
|
364
|
+
cache?: RequestCache | undefined;
|
365
|
+
integrity?: string | undefined;
|
366
|
+
keepalive?: boolean | undefined;
|
367
|
+
mode?: RequestMode | undefined;
|
368
|
+
redirect?: RequestRedirect | undefined;
|
369
|
+
referrer?: string | undefined;
|
370
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
371
|
+
signal?: (AbortSignal | null) | undefined;
|
372
|
+
window?: null | undefined;
|
373
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
374
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
375
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
376
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
377
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
378
|
+
hookOptions?: {
|
379
|
+
cloneResponse?: boolean;
|
380
|
+
} | undefined;
|
381
|
+
timeout?: number | undefined;
|
382
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
383
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
384
|
+
baseURL?: string | undefined;
|
385
|
+
throw?: boolean | undefined;
|
386
|
+
auth?: ({
|
387
|
+
type: "Bearer";
|
388
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
389
|
+
} | {
|
390
|
+
type: "Basic";
|
391
|
+
username: string | (() => string | undefined) | undefined;
|
392
|
+
password: string | (() => string | undefined) | undefined;
|
393
|
+
} | {
|
394
|
+
type: "Custom";
|
395
|
+
prefix: string | (() => string | undefined) | undefined;
|
396
|
+
value: string | (() => string | undefined) | undefined;
|
397
|
+
}) | undefined;
|
398
|
+
body?: (Partial<{
|
399
|
+
email: string;
|
400
|
+
redirectTo?: string | undefined;
|
401
|
+
}> & Record<string, any>) | undefined;
|
402
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
403
|
+
params?: Record<string, any> | undefined;
|
404
|
+
duplex?: ("full" | "half") | undefined;
|
405
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
406
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
407
|
+
retryAttempt?: number | undefined;
|
408
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
409
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
410
|
+
disableValidation?: boolean | undefined;
|
411
|
+
}>(data_0: import("better-auth").Prettify<{
|
412
|
+
email: string;
|
413
|
+
redirectTo?: string | undefined;
|
414
|
+
} & {
|
415
|
+
fetchOptions?: FetchOptions | undefined;
|
416
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
417
|
+
status: boolean;
|
418
|
+
}, {
|
419
|
+
code?: string;
|
420
|
+
message?: string;
|
421
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
422
|
+
} & {
|
423
|
+
resetPassword: <FetchOptions extends {
|
424
|
+
credentials?: RequestCredentials | undefined;
|
425
|
+
priority?: RequestPriority | undefined;
|
426
|
+
method?: string | undefined;
|
427
|
+
headers?: (HeadersInit & (HeadersInit | {
|
428
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
429
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
430
|
+
authorization: "Bearer" | "Basic";
|
431
|
+
})) | undefined;
|
432
|
+
cache?: RequestCache | undefined;
|
433
|
+
integrity?: string | undefined;
|
434
|
+
keepalive?: boolean | undefined;
|
435
|
+
mode?: RequestMode | undefined;
|
436
|
+
redirect?: RequestRedirect | undefined;
|
437
|
+
referrer?: string | undefined;
|
438
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
439
|
+
signal?: (AbortSignal | null) | undefined;
|
440
|
+
window?: null | undefined;
|
441
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
442
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
443
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
444
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
445
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
446
|
+
hookOptions?: {
|
447
|
+
cloneResponse?: boolean;
|
448
|
+
} | undefined;
|
449
|
+
timeout?: number | undefined;
|
450
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
451
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
452
|
+
baseURL?: string | undefined;
|
453
|
+
throw?: boolean | undefined;
|
454
|
+
auth?: ({
|
455
|
+
type: "Bearer";
|
456
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
457
|
+
} | {
|
458
|
+
type: "Basic";
|
459
|
+
username: string | (() => string | undefined) | undefined;
|
460
|
+
password: string | (() => string | undefined) | undefined;
|
461
|
+
} | {
|
462
|
+
type: "Custom";
|
463
|
+
prefix: string | (() => string | undefined) | undefined;
|
464
|
+
value: string | (() => string | undefined) | undefined;
|
465
|
+
}) | undefined;
|
466
|
+
body?: (Partial<{
|
467
|
+
newPassword: string;
|
468
|
+
token?: string | undefined;
|
469
|
+
}> & Record<string, any>) | undefined;
|
470
|
+
query?: (Partial<{
|
471
|
+
token?: string | undefined;
|
472
|
+
}> & Record<string, any>) | undefined;
|
473
|
+
params?: Record<string, any> | undefined;
|
474
|
+
duplex?: ("full" | "half") | undefined;
|
475
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
476
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
477
|
+
retryAttempt?: number | undefined;
|
478
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
479
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
480
|
+
disableValidation?: boolean | undefined;
|
481
|
+
}>(data_0: import("better-auth").Prettify<{
|
482
|
+
newPassword: string;
|
483
|
+
token?: string | undefined;
|
484
|
+
} & {
|
485
|
+
fetchOptions?: FetchOptions | undefined;
|
486
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
487
|
+
status: boolean;
|
488
|
+
}, {
|
489
|
+
code?: string;
|
490
|
+
message?: string;
|
491
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
492
|
+
} & {
|
493
|
+
verifyEmail: <FetchOptions extends {
|
494
|
+
credentials?: RequestCredentials | undefined;
|
495
|
+
priority?: RequestPriority | undefined;
|
496
|
+
method?: string | undefined;
|
497
|
+
headers?: (HeadersInit & (HeadersInit | {
|
498
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
499
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
500
|
+
authorization: "Bearer" | "Basic";
|
501
|
+
})) | undefined;
|
502
|
+
cache?: RequestCache | undefined;
|
503
|
+
integrity?: string | undefined;
|
504
|
+
keepalive?: boolean | undefined;
|
505
|
+
mode?: RequestMode | undefined;
|
506
|
+
redirect?: RequestRedirect | undefined;
|
507
|
+
referrer?: string | undefined;
|
508
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
509
|
+
signal?: (AbortSignal | null) | undefined;
|
510
|
+
window?: null | undefined;
|
511
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
512
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
513
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
514
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
515
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
516
|
+
hookOptions?: {
|
517
|
+
cloneResponse?: boolean;
|
518
|
+
} | undefined;
|
519
|
+
timeout?: number | undefined;
|
520
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
521
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
522
|
+
baseURL?: string | undefined;
|
523
|
+
throw?: boolean | undefined;
|
524
|
+
auth?: ({
|
525
|
+
type: "Bearer";
|
526
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
527
|
+
} | {
|
528
|
+
type: "Basic";
|
529
|
+
username: string | (() => string | undefined) | undefined;
|
530
|
+
password: string | (() => string | undefined) | undefined;
|
531
|
+
} | {
|
532
|
+
type: "Custom";
|
533
|
+
prefix: string | (() => string | undefined) | undefined;
|
534
|
+
value: string | (() => string | undefined) | undefined;
|
535
|
+
}) | undefined;
|
536
|
+
body?: undefined;
|
537
|
+
query?: (Partial<{
|
538
|
+
token: string;
|
539
|
+
callbackURL?: string | undefined;
|
540
|
+
}> & Record<string, any>) | undefined;
|
541
|
+
params?: Record<string, any> | undefined;
|
542
|
+
duplex?: ("full" | "half") | undefined;
|
543
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
544
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
545
|
+
retryAttempt?: number | undefined;
|
546
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
547
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
548
|
+
disableValidation?: boolean | undefined;
|
549
|
+
}>(data_0: import("better-auth").Prettify<{
|
550
|
+
query: {
|
551
|
+
token: string;
|
552
|
+
callbackURL?: string | undefined;
|
553
|
+
};
|
554
|
+
fetchOptions?: FetchOptions | undefined;
|
555
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<void | {
|
556
|
+
status: boolean;
|
557
|
+
user: {
|
558
|
+
id: any;
|
559
|
+
email: any;
|
560
|
+
name: any;
|
561
|
+
image: any;
|
562
|
+
emailVerified: any;
|
563
|
+
createdAt: any;
|
564
|
+
updatedAt: any;
|
565
|
+
};
|
566
|
+
} | {
|
567
|
+
status: boolean;
|
568
|
+
user: null;
|
569
|
+
}>, {
|
570
|
+
code?: string;
|
571
|
+
message?: string;
|
572
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
573
|
+
} & {
|
574
|
+
sendVerificationEmail: <FetchOptions extends {
|
575
|
+
credentials?: RequestCredentials | undefined;
|
576
|
+
priority?: RequestPriority | undefined;
|
577
|
+
method?: string | undefined;
|
578
|
+
headers?: (HeadersInit & (HeadersInit | {
|
579
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
580
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
581
|
+
authorization: "Bearer" | "Basic";
|
582
|
+
})) | undefined;
|
583
|
+
cache?: RequestCache | undefined;
|
584
|
+
integrity?: string | undefined;
|
585
|
+
keepalive?: boolean | undefined;
|
586
|
+
mode?: RequestMode | undefined;
|
587
|
+
redirect?: RequestRedirect | undefined;
|
588
|
+
referrer?: string | undefined;
|
589
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
590
|
+
signal?: (AbortSignal | null) | undefined;
|
591
|
+
window?: null | undefined;
|
592
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
593
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
594
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
595
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
596
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
597
|
+
hookOptions?: {
|
598
|
+
cloneResponse?: boolean;
|
599
|
+
} | undefined;
|
600
|
+
timeout?: number | undefined;
|
601
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
602
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
603
|
+
baseURL?: string | undefined;
|
604
|
+
throw?: boolean | undefined;
|
605
|
+
auth?: ({
|
606
|
+
type: "Bearer";
|
607
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
608
|
+
} | {
|
609
|
+
type: "Basic";
|
610
|
+
username: string | (() => string | undefined) | undefined;
|
611
|
+
password: string | (() => string | undefined) | undefined;
|
612
|
+
} | {
|
613
|
+
type: "Custom";
|
614
|
+
prefix: string | (() => string | undefined) | undefined;
|
615
|
+
value: string | (() => string | undefined) | undefined;
|
616
|
+
}) | undefined;
|
617
|
+
body?: (Partial<{
|
618
|
+
email: string;
|
619
|
+
callbackURL?: string | undefined;
|
620
|
+
}> & Record<string, any>) | undefined;
|
621
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
622
|
+
params?: Record<string, any> | undefined;
|
623
|
+
duplex?: ("full" | "half") | undefined;
|
624
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
625
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
626
|
+
retryAttempt?: number | undefined;
|
627
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
628
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
629
|
+
disableValidation?: boolean | undefined;
|
630
|
+
}>(data_0: import("better-auth").Prettify<{
|
631
|
+
email: string;
|
632
|
+
callbackURL?: string | undefined;
|
633
|
+
} & {
|
634
|
+
fetchOptions?: FetchOptions | undefined;
|
635
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
636
|
+
status: boolean;
|
637
|
+
}, {
|
638
|
+
code?: string;
|
639
|
+
message?: string;
|
640
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
641
|
+
} & {
|
642
|
+
changeEmail: <FetchOptions extends {
|
643
|
+
credentials?: RequestCredentials | undefined;
|
644
|
+
priority?: RequestPriority | undefined;
|
645
|
+
method?: string | undefined;
|
646
|
+
headers?: (HeadersInit & (HeadersInit | {
|
647
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
648
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
649
|
+
authorization: "Bearer" | "Basic";
|
650
|
+
})) | undefined;
|
651
|
+
cache?: RequestCache | undefined;
|
652
|
+
integrity?: string | undefined;
|
653
|
+
keepalive?: boolean | undefined;
|
654
|
+
mode?: RequestMode | undefined;
|
655
|
+
redirect?: RequestRedirect | undefined;
|
656
|
+
referrer?: string | undefined;
|
657
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
658
|
+
signal?: (AbortSignal | null) | undefined;
|
659
|
+
window?: null | undefined;
|
660
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
661
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
662
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
663
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
664
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
665
|
+
hookOptions?: {
|
666
|
+
cloneResponse?: boolean;
|
667
|
+
} | undefined;
|
668
|
+
timeout?: number | undefined;
|
669
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
670
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
671
|
+
baseURL?: string | undefined;
|
672
|
+
throw?: boolean | undefined;
|
673
|
+
auth?: ({
|
674
|
+
type: "Bearer";
|
675
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
676
|
+
} | {
|
677
|
+
type: "Basic";
|
678
|
+
username: string | (() => string | undefined) | undefined;
|
679
|
+
password: string | (() => string | undefined) | undefined;
|
680
|
+
} | {
|
681
|
+
type: "Custom";
|
682
|
+
prefix: string | (() => string | undefined) | undefined;
|
683
|
+
value: string | (() => string | undefined) | undefined;
|
684
|
+
}) | undefined;
|
685
|
+
body?: (Partial<{
|
686
|
+
newEmail: string;
|
687
|
+
callbackURL?: string | undefined;
|
688
|
+
}> & Record<string, any>) | undefined;
|
689
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
690
|
+
params?: Record<string, any> | undefined;
|
691
|
+
duplex?: ("full" | "half") | undefined;
|
692
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
693
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
694
|
+
retryAttempt?: number | undefined;
|
695
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
696
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
697
|
+
disableValidation?: boolean | undefined;
|
698
|
+
}>(data_0: import("better-auth").Prettify<{
|
699
|
+
newEmail: string;
|
700
|
+
callbackURL?: string | undefined;
|
701
|
+
} & {
|
702
|
+
fetchOptions?: FetchOptions | undefined;
|
703
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
704
|
+
status: boolean;
|
705
|
+
}, {
|
706
|
+
code?: string;
|
707
|
+
message?: string;
|
708
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
709
|
+
} & {
|
710
|
+
changePassword: <FetchOptions extends {
|
711
|
+
credentials?: RequestCredentials | undefined;
|
712
|
+
priority?: RequestPriority | undefined;
|
713
|
+
method?: string | undefined;
|
714
|
+
headers?: (HeadersInit & (HeadersInit | {
|
715
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
716
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
717
|
+
authorization: "Bearer" | "Basic";
|
718
|
+
})) | undefined;
|
719
|
+
cache?: RequestCache | undefined;
|
720
|
+
integrity?: string | undefined;
|
721
|
+
keepalive?: boolean | undefined;
|
722
|
+
mode?: RequestMode | undefined;
|
723
|
+
redirect?: RequestRedirect | undefined;
|
724
|
+
referrer?: string | undefined;
|
725
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
726
|
+
signal?: (AbortSignal | null) | undefined;
|
727
|
+
window?: null | undefined;
|
728
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
729
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
730
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
731
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
732
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
733
|
+
hookOptions?: {
|
734
|
+
cloneResponse?: boolean;
|
735
|
+
} | undefined;
|
736
|
+
timeout?: number | undefined;
|
737
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
738
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
739
|
+
baseURL?: string | undefined;
|
740
|
+
throw?: boolean | undefined;
|
741
|
+
auth?: ({
|
742
|
+
type: "Bearer";
|
743
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
744
|
+
} | {
|
745
|
+
type: "Basic";
|
746
|
+
username: string | (() => string | undefined) | undefined;
|
747
|
+
password: string | (() => string | undefined) | undefined;
|
748
|
+
} | {
|
749
|
+
type: "Custom";
|
750
|
+
prefix: string | (() => string | undefined) | undefined;
|
751
|
+
value: string | (() => string | undefined) | undefined;
|
752
|
+
}) | undefined;
|
753
|
+
body?: (Partial<{
|
754
|
+
newPassword: string;
|
755
|
+
currentPassword: string;
|
756
|
+
revokeOtherSessions?: boolean | undefined;
|
757
|
+
}> & Record<string, any>) | undefined;
|
758
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
759
|
+
params?: Record<string, any> | undefined;
|
760
|
+
duplex?: ("full" | "half") | undefined;
|
761
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
762
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
763
|
+
retryAttempt?: number | undefined;
|
764
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
765
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
766
|
+
disableValidation?: boolean | undefined;
|
767
|
+
}>(data_0: import("better-auth").Prettify<{
|
768
|
+
newPassword: string;
|
769
|
+
currentPassword: string;
|
770
|
+
revokeOtherSessions?: boolean | undefined;
|
771
|
+
} & {
|
772
|
+
fetchOptions?: FetchOptions | undefined;
|
773
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
774
|
+
token: string | null;
|
775
|
+
user: {
|
776
|
+
id: string;
|
777
|
+
email: string;
|
778
|
+
name: string;
|
779
|
+
image: string | null | undefined;
|
780
|
+
emailVerified: boolean;
|
781
|
+
createdAt: Date;
|
782
|
+
updatedAt: Date;
|
783
|
+
};
|
784
|
+
}, {
|
785
|
+
code?: string;
|
786
|
+
message?: string;
|
787
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
788
|
+
} & {
|
789
|
+
deleteUser: <FetchOptions extends {
|
790
|
+
credentials?: RequestCredentials | undefined;
|
791
|
+
priority?: RequestPriority | undefined;
|
792
|
+
method?: string | undefined;
|
793
|
+
headers?: (HeadersInit & (HeadersInit | {
|
794
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
795
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
796
|
+
authorization: "Bearer" | "Basic";
|
797
|
+
})) | undefined;
|
798
|
+
cache?: RequestCache | undefined;
|
799
|
+
integrity?: string | undefined;
|
800
|
+
keepalive?: boolean | undefined;
|
801
|
+
mode?: RequestMode | undefined;
|
802
|
+
redirect?: RequestRedirect | undefined;
|
803
|
+
referrer?: string | undefined;
|
804
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
805
|
+
signal?: (AbortSignal | null) | undefined;
|
806
|
+
window?: null | undefined;
|
807
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
808
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
809
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
810
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
811
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
812
|
+
hookOptions?: {
|
813
|
+
cloneResponse?: boolean;
|
814
|
+
} | undefined;
|
815
|
+
timeout?: number | undefined;
|
816
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
817
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
818
|
+
baseURL?: string | undefined;
|
819
|
+
throw?: boolean | undefined;
|
820
|
+
auth?: ({
|
821
|
+
type: "Bearer";
|
822
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
823
|
+
} | {
|
824
|
+
type: "Basic";
|
825
|
+
username: string | (() => string | undefined) | undefined;
|
826
|
+
password: string | (() => string | undefined) | undefined;
|
827
|
+
} | {
|
828
|
+
type: "Custom";
|
829
|
+
prefix: string | (() => string | undefined) | undefined;
|
830
|
+
value: string | (() => string | undefined) | undefined;
|
831
|
+
}) | undefined;
|
832
|
+
body?: (Partial<{
|
833
|
+
callbackURL?: string | undefined;
|
834
|
+
password?: string | undefined;
|
835
|
+
token?: string | undefined;
|
836
|
+
}> & Record<string, any>) | undefined;
|
837
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
838
|
+
params?: Record<string, any> | undefined;
|
839
|
+
duplex?: ("full" | "half") | undefined;
|
840
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
841
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
842
|
+
retryAttempt?: number | undefined;
|
843
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
844
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
845
|
+
disableValidation?: boolean | undefined;
|
846
|
+
}>(data_0?: import("better-auth").Prettify<{
|
847
|
+
callbackURL?: string | undefined;
|
848
|
+
password?: string | undefined;
|
849
|
+
token?: string | undefined;
|
850
|
+
} & {
|
851
|
+
fetchOptions?: FetchOptions | undefined;
|
852
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
853
|
+
success: boolean;
|
854
|
+
message: string;
|
855
|
+
}, {
|
856
|
+
code?: string;
|
857
|
+
message?: string;
|
858
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
859
|
+
} & {
|
860
|
+
resetPassword: {
|
861
|
+
":token": <FetchOptions extends {
|
862
|
+
credentials?: RequestCredentials | undefined;
|
863
|
+
priority?: RequestPriority | undefined;
|
864
|
+
method?: string | undefined;
|
865
|
+
headers?: (HeadersInit & (HeadersInit | {
|
866
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
867
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
868
|
+
authorization: "Bearer" | "Basic";
|
869
|
+
})) | undefined;
|
870
|
+
cache?: RequestCache | undefined;
|
871
|
+
integrity?: string | undefined;
|
872
|
+
keepalive?: boolean | undefined;
|
873
|
+
mode?: RequestMode | undefined;
|
874
|
+
redirect?: RequestRedirect | undefined;
|
875
|
+
referrer?: string | undefined;
|
876
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
877
|
+
signal?: (AbortSignal | null) | undefined;
|
878
|
+
window?: null | undefined;
|
879
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
880
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
881
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
882
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
883
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
884
|
+
hookOptions?: {
|
885
|
+
cloneResponse?: boolean;
|
886
|
+
} | undefined;
|
887
|
+
timeout?: number | undefined;
|
888
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
889
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
890
|
+
baseURL?: string | undefined;
|
891
|
+
throw?: boolean | undefined;
|
892
|
+
auth?: ({
|
893
|
+
type: "Bearer";
|
894
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
895
|
+
} | {
|
896
|
+
type: "Basic";
|
897
|
+
username: string | (() => string | undefined) | undefined;
|
898
|
+
password: string | (() => string | undefined) | undefined;
|
899
|
+
} | {
|
900
|
+
type: "Custom";
|
901
|
+
prefix: string | (() => string | undefined) | undefined;
|
902
|
+
value: string | (() => string | undefined) | undefined;
|
903
|
+
}) | undefined;
|
904
|
+
body?: undefined;
|
905
|
+
query?: (Partial<{
|
906
|
+
callbackURL: string;
|
907
|
+
}> & Record<string, any>) | undefined;
|
908
|
+
params?: {
|
909
|
+
token: string;
|
910
|
+
} | undefined;
|
911
|
+
duplex?: ("full" | "half") | undefined;
|
912
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
913
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
914
|
+
retryAttempt?: number | undefined;
|
915
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
916
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
917
|
+
disableValidation?: boolean | undefined;
|
918
|
+
}>(data_0: import("better-auth").Prettify<{
|
919
|
+
query: {
|
920
|
+
callbackURL: string;
|
921
|
+
};
|
922
|
+
fetchOptions?: FetchOptions | undefined;
|
923
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<never, {
|
924
|
+
code?: string;
|
925
|
+
message?: string;
|
926
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
927
|
+
};
|
928
|
+
} & {
|
929
|
+
requestPasswordReset: <FetchOptions extends {
|
930
|
+
credentials?: RequestCredentials | undefined;
|
931
|
+
priority?: RequestPriority | undefined;
|
932
|
+
method?: string | undefined;
|
933
|
+
headers?: (HeadersInit & (HeadersInit | {
|
934
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
935
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
936
|
+
authorization: "Bearer" | "Basic";
|
937
|
+
})) | undefined;
|
938
|
+
cache?: RequestCache | undefined;
|
939
|
+
integrity?: string | undefined;
|
940
|
+
keepalive?: boolean | undefined;
|
941
|
+
mode?: RequestMode | undefined;
|
942
|
+
redirect?: RequestRedirect | undefined;
|
943
|
+
referrer?: string | undefined;
|
944
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
945
|
+
signal?: (AbortSignal | null) | undefined;
|
946
|
+
window?: null | undefined;
|
947
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
948
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
949
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
950
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
951
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
952
|
+
hookOptions?: {
|
953
|
+
cloneResponse?: boolean;
|
954
|
+
} | undefined;
|
955
|
+
timeout?: number | undefined;
|
956
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
957
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
958
|
+
baseURL?: string | undefined;
|
959
|
+
throw?: boolean | undefined;
|
960
|
+
auth?: ({
|
961
|
+
type: "Bearer";
|
962
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
963
|
+
} | {
|
964
|
+
type: "Basic";
|
965
|
+
username: string | (() => string | undefined) | undefined;
|
966
|
+
password: string | (() => string | undefined) | undefined;
|
967
|
+
} | {
|
968
|
+
type: "Custom";
|
969
|
+
prefix: string | (() => string | undefined) | undefined;
|
970
|
+
value: string | (() => string | undefined) | undefined;
|
971
|
+
}) | undefined;
|
972
|
+
body?: (Partial<{
|
973
|
+
email: string;
|
974
|
+
redirectTo?: string | undefined;
|
975
|
+
}> & Record<string, any>) | undefined;
|
976
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
977
|
+
params?: Record<string, any> | undefined;
|
978
|
+
duplex?: ("full" | "half") | undefined;
|
979
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
980
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
981
|
+
retryAttempt?: number | undefined;
|
982
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
983
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
984
|
+
disableValidation?: boolean | undefined;
|
985
|
+
}>(data_0: import("better-auth").Prettify<{
|
986
|
+
email: string;
|
987
|
+
redirectTo?: string | undefined;
|
988
|
+
} & {
|
989
|
+
fetchOptions?: FetchOptions | undefined;
|
990
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
991
|
+
status: boolean;
|
992
|
+
}, {
|
993
|
+
code?: string;
|
994
|
+
message?: string;
|
995
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
996
|
+
} & {
|
997
|
+
resetPassword: {
|
998
|
+
":token": <FetchOptions extends {
|
999
|
+
credentials?: RequestCredentials | undefined;
|
1000
|
+
priority?: RequestPriority | undefined;
|
1001
|
+
method?: string | undefined;
|
1002
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1003
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1004
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1005
|
+
authorization: "Bearer" | "Basic";
|
1006
|
+
})) | undefined;
|
1007
|
+
cache?: RequestCache | undefined;
|
1008
|
+
integrity?: string | undefined;
|
1009
|
+
keepalive?: boolean | undefined;
|
1010
|
+
mode?: RequestMode | undefined;
|
1011
|
+
redirect?: RequestRedirect | undefined;
|
1012
|
+
referrer?: string | undefined;
|
1013
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1014
|
+
signal?: (AbortSignal | null) | undefined;
|
1015
|
+
window?: null | undefined;
|
1016
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1017
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1018
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1019
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1020
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1021
|
+
hookOptions?: {
|
1022
|
+
cloneResponse?: boolean;
|
1023
|
+
} | undefined;
|
1024
|
+
timeout?: number | undefined;
|
1025
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1026
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1027
|
+
baseURL?: string | undefined;
|
1028
|
+
throw?: boolean | undefined;
|
1029
|
+
auth?: ({
|
1030
|
+
type: "Bearer";
|
1031
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1032
|
+
} | {
|
1033
|
+
type: "Basic";
|
1034
|
+
username: string | (() => string | undefined) | undefined;
|
1035
|
+
password: string | (() => string | undefined) | undefined;
|
1036
|
+
} | {
|
1037
|
+
type: "Custom";
|
1038
|
+
prefix: string | (() => string | undefined) | undefined;
|
1039
|
+
value: string | (() => string | undefined) | undefined;
|
1040
|
+
}) | undefined;
|
1041
|
+
body?: undefined;
|
1042
|
+
query?: (Partial<{
|
1043
|
+
callbackURL: string;
|
1044
|
+
}> & Record<string, any>) | undefined;
|
1045
|
+
params?: {
|
1046
|
+
token: string;
|
1047
|
+
} | undefined;
|
1048
|
+
duplex?: ("full" | "half") | undefined;
|
1049
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1050
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1051
|
+
retryAttempt?: number | undefined;
|
1052
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1053
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1054
|
+
disableValidation?: boolean | undefined;
|
1055
|
+
}>(data_0: import("better-auth").Prettify<{
|
1056
|
+
query: {
|
1057
|
+
callbackURL: string;
|
1058
|
+
};
|
1059
|
+
fetchOptions?: FetchOptions | undefined;
|
1060
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<never, {
|
1061
|
+
code?: string;
|
1062
|
+
message?: string;
|
1063
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1064
|
+
};
|
1065
|
+
} & {
|
1066
|
+
revokeSession: <FetchOptions extends {
|
1067
|
+
credentials?: RequestCredentials | undefined;
|
1068
|
+
priority?: RequestPriority | undefined;
|
1069
|
+
method?: string | undefined;
|
1070
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1071
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1072
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1073
|
+
authorization: "Bearer" | "Basic";
|
1074
|
+
})) | undefined;
|
1075
|
+
cache?: RequestCache | undefined;
|
1076
|
+
integrity?: string | undefined;
|
1077
|
+
keepalive?: boolean | undefined;
|
1078
|
+
mode?: RequestMode | undefined;
|
1079
|
+
redirect?: RequestRedirect | undefined;
|
1080
|
+
referrer?: string | undefined;
|
1081
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1082
|
+
signal?: (AbortSignal | null) | undefined;
|
1083
|
+
window?: null | undefined;
|
1084
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1085
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1086
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1087
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1088
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1089
|
+
hookOptions?: {
|
1090
|
+
cloneResponse?: boolean;
|
1091
|
+
} | undefined;
|
1092
|
+
timeout?: number | undefined;
|
1093
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1094
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1095
|
+
baseURL?: string | undefined;
|
1096
|
+
throw?: boolean | undefined;
|
1097
|
+
auth?: ({
|
1098
|
+
type: "Bearer";
|
1099
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1100
|
+
} | {
|
1101
|
+
type: "Basic";
|
1102
|
+
username: string | (() => string | undefined) | undefined;
|
1103
|
+
password: string | (() => string | undefined) | undefined;
|
1104
|
+
} | {
|
1105
|
+
type: "Custom";
|
1106
|
+
prefix: string | (() => string | undefined) | undefined;
|
1107
|
+
value: string | (() => string | undefined) | undefined;
|
1108
|
+
}) | undefined;
|
1109
|
+
body?: (Partial<{
|
1110
|
+
token: string;
|
1111
|
+
}> & Record<string, any>) | undefined;
|
1112
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1113
|
+
params?: Record<string, any> | undefined;
|
1114
|
+
duplex?: ("full" | "half") | undefined;
|
1115
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1116
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1117
|
+
retryAttempt?: number | undefined;
|
1118
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1119
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1120
|
+
disableValidation?: boolean | undefined;
|
1121
|
+
}>(data_0: import("better-auth").Prettify<{
|
1122
|
+
token: string;
|
1123
|
+
} & {
|
1124
|
+
fetchOptions?: FetchOptions | undefined;
|
1125
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1126
|
+
status: boolean;
|
1127
|
+
}, {
|
1128
|
+
code?: string;
|
1129
|
+
message?: string;
|
1130
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1131
|
+
} & {
|
1132
|
+
revokeSessions: <FetchOptions extends {
|
1133
|
+
credentials?: RequestCredentials | undefined;
|
1134
|
+
priority?: RequestPriority | undefined;
|
1135
|
+
method?: string | undefined;
|
1136
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1137
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1138
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1139
|
+
authorization: "Bearer" | "Basic";
|
1140
|
+
})) | undefined;
|
1141
|
+
cache?: RequestCache | undefined;
|
1142
|
+
integrity?: string | undefined;
|
1143
|
+
keepalive?: boolean | undefined;
|
1144
|
+
mode?: RequestMode | undefined;
|
1145
|
+
redirect?: RequestRedirect | undefined;
|
1146
|
+
referrer?: string | undefined;
|
1147
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1148
|
+
signal?: (AbortSignal | null) | undefined;
|
1149
|
+
window?: null | undefined;
|
1150
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1151
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1152
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1153
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1154
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1155
|
+
hookOptions?: {
|
1156
|
+
cloneResponse?: boolean;
|
1157
|
+
} | undefined;
|
1158
|
+
timeout?: number | undefined;
|
1159
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1160
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1161
|
+
baseURL?: string | undefined;
|
1162
|
+
throw?: boolean | undefined;
|
1163
|
+
auth?: ({
|
1164
|
+
type: "Bearer";
|
1165
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1166
|
+
} | {
|
1167
|
+
type: "Basic";
|
1168
|
+
username: string | (() => string | undefined) | undefined;
|
1169
|
+
password: string | (() => string | undefined) | undefined;
|
1170
|
+
} | {
|
1171
|
+
type: "Custom";
|
1172
|
+
prefix: string | (() => string | undefined) | undefined;
|
1173
|
+
value: string | (() => string | undefined) | undefined;
|
1174
|
+
}) | undefined;
|
1175
|
+
body?: undefined;
|
1176
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1177
|
+
params?: Record<string, any> | undefined;
|
1178
|
+
duplex?: ("full" | "half") | undefined;
|
1179
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1180
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1181
|
+
retryAttempt?: number | undefined;
|
1182
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1183
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1184
|
+
disableValidation?: boolean | undefined;
|
1185
|
+
}>(data_0?: import("better-auth").Prettify<{
|
1186
|
+
query?: Record<string, any> | undefined;
|
1187
|
+
fetchOptions?: FetchOptions | undefined;
|
1188
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1189
|
+
status: boolean;
|
1190
|
+
}, {
|
1191
|
+
code?: string;
|
1192
|
+
message?: string;
|
1193
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1194
|
+
} & {
|
1195
|
+
revokeOtherSessions: <FetchOptions extends {
|
1196
|
+
credentials?: RequestCredentials | undefined;
|
1197
|
+
priority?: RequestPriority | undefined;
|
1198
|
+
method?: string | undefined;
|
1199
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1200
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1201
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1202
|
+
authorization: "Bearer" | "Basic";
|
1203
|
+
})) | undefined;
|
1204
|
+
cache?: RequestCache | undefined;
|
1205
|
+
integrity?: string | undefined;
|
1206
|
+
keepalive?: boolean | undefined;
|
1207
|
+
mode?: RequestMode | undefined;
|
1208
|
+
redirect?: RequestRedirect | undefined;
|
1209
|
+
referrer?: string | undefined;
|
1210
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1211
|
+
signal?: (AbortSignal | null) | undefined;
|
1212
|
+
window?: null | undefined;
|
1213
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1214
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1215
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1216
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1217
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1218
|
+
hookOptions?: {
|
1219
|
+
cloneResponse?: boolean;
|
1220
|
+
} | undefined;
|
1221
|
+
timeout?: number | undefined;
|
1222
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1223
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1224
|
+
baseURL?: string | undefined;
|
1225
|
+
throw?: boolean | undefined;
|
1226
|
+
auth?: ({
|
1227
|
+
type: "Bearer";
|
1228
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1229
|
+
} | {
|
1230
|
+
type: "Basic";
|
1231
|
+
username: string | (() => string | undefined) | undefined;
|
1232
|
+
password: string | (() => string | undefined) | undefined;
|
1233
|
+
} | {
|
1234
|
+
type: "Custom";
|
1235
|
+
prefix: string | (() => string | undefined) | undefined;
|
1236
|
+
value: string | (() => string | undefined) | undefined;
|
1237
|
+
}) | undefined;
|
1238
|
+
body?: undefined;
|
1239
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1240
|
+
params?: Record<string, any> | undefined;
|
1241
|
+
duplex?: ("full" | "half") | undefined;
|
1242
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1243
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1244
|
+
retryAttempt?: number | undefined;
|
1245
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1246
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1247
|
+
disableValidation?: boolean | undefined;
|
1248
|
+
}>(data_0?: import("better-auth").Prettify<{
|
1249
|
+
query?: Record<string, any> | undefined;
|
1250
|
+
fetchOptions?: FetchOptions | undefined;
|
1251
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1252
|
+
status: boolean;
|
1253
|
+
}, {
|
1254
|
+
code?: string;
|
1255
|
+
message?: string;
|
1256
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1257
|
+
} & {
|
1258
|
+
linkSocial: <FetchOptions extends {
|
1259
|
+
credentials?: RequestCredentials | undefined;
|
1260
|
+
priority?: RequestPriority | undefined;
|
1261
|
+
method?: string | undefined;
|
1262
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1263
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1264
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1265
|
+
authorization: "Bearer" | "Basic";
|
1266
|
+
})) | undefined;
|
1267
|
+
cache?: RequestCache | undefined;
|
1268
|
+
integrity?: string | undefined;
|
1269
|
+
keepalive?: boolean | undefined;
|
1270
|
+
mode?: RequestMode | undefined;
|
1271
|
+
redirect?: RequestRedirect | undefined;
|
1272
|
+
referrer?: string | undefined;
|
1273
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1274
|
+
signal?: (AbortSignal | null) | undefined;
|
1275
|
+
window?: null | undefined;
|
1276
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1277
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1278
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1279
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1280
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1281
|
+
hookOptions?: {
|
1282
|
+
cloneResponse?: boolean;
|
1283
|
+
} | undefined;
|
1284
|
+
timeout?: number | undefined;
|
1285
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1286
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1287
|
+
baseURL?: string | undefined;
|
1288
|
+
throw?: boolean | undefined;
|
1289
|
+
auth?: ({
|
1290
|
+
type: "Bearer";
|
1291
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1292
|
+
} | {
|
1293
|
+
type: "Basic";
|
1294
|
+
username: string | (() => string | undefined) | undefined;
|
1295
|
+
password: string | (() => string | undefined) | undefined;
|
1296
|
+
} | {
|
1297
|
+
type: "Custom";
|
1298
|
+
prefix: string | (() => string | undefined) | undefined;
|
1299
|
+
value: string | (() => string | undefined) | undefined;
|
1300
|
+
}) | undefined;
|
1301
|
+
body?: (Partial<{
|
1302
|
+
provider: unknown;
|
1303
|
+
callbackURL?: string | undefined;
|
1304
|
+
idToken?: {
|
1305
|
+
token: string;
|
1306
|
+
nonce?: string | undefined;
|
1307
|
+
accessToken?: string | undefined;
|
1308
|
+
refreshToken?: string | undefined;
|
1309
|
+
scopes?: string[] | undefined;
|
1310
|
+
} | undefined;
|
1311
|
+
requestSignUp?: boolean | undefined;
|
1312
|
+
scopes?: string[] | undefined;
|
1313
|
+
errorCallbackURL?: string | undefined;
|
1314
|
+
}> & Record<string, any>) | undefined;
|
1315
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1316
|
+
params?: Record<string, any> | undefined;
|
1317
|
+
duplex?: ("full" | "half") | undefined;
|
1318
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1319
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1320
|
+
retryAttempt?: number | undefined;
|
1321
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1322
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1323
|
+
disableValidation?: boolean | undefined;
|
1324
|
+
}>(data_0: import("better-auth").Prettify<{
|
1325
|
+
provider: unknown;
|
1326
|
+
callbackURL?: string | undefined;
|
1327
|
+
idToken?: {
|
1328
|
+
token: string;
|
1329
|
+
nonce?: string | undefined;
|
1330
|
+
accessToken?: string | undefined;
|
1331
|
+
refreshToken?: string | undefined;
|
1332
|
+
scopes?: string[] | undefined;
|
1333
|
+
} | undefined;
|
1334
|
+
requestSignUp?: boolean | undefined;
|
1335
|
+
scopes?: string[] | undefined;
|
1336
|
+
errorCallbackURL?: string | undefined;
|
1337
|
+
} & {
|
1338
|
+
fetchOptions?: FetchOptions | undefined;
|
1339
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1340
|
+
url: string;
|
1341
|
+
redirect: boolean;
|
1342
|
+
}, {
|
1343
|
+
code?: string;
|
1344
|
+
message?: string;
|
1345
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1346
|
+
} & {
|
1347
|
+
listAccounts: <FetchOptions extends {
|
1348
|
+
credentials?: RequestCredentials | undefined;
|
1349
|
+
priority?: RequestPriority | undefined;
|
1350
|
+
method?: string | undefined;
|
1351
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1352
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1353
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1354
|
+
authorization: "Bearer" | "Basic";
|
1355
|
+
})) | undefined;
|
1356
|
+
cache?: RequestCache | undefined;
|
1357
|
+
integrity?: string | undefined;
|
1358
|
+
keepalive?: boolean | undefined;
|
1359
|
+
mode?: RequestMode | undefined;
|
1360
|
+
redirect?: RequestRedirect | undefined;
|
1361
|
+
referrer?: string | undefined;
|
1362
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1363
|
+
signal?: (AbortSignal | null) | undefined;
|
1364
|
+
window?: null | undefined;
|
1365
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1366
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1367
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1368
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1369
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1370
|
+
hookOptions?: {
|
1371
|
+
cloneResponse?: boolean;
|
1372
|
+
} | undefined;
|
1373
|
+
timeout?: number | undefined;
|
1374
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1375
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1376
|
+
baseURL?: string | undefined;
|
1377
|
+
throw?: boolean | undefined;
|
1378
|
+
auth?: ({
|
1379
|
+
type: "Bearer";
|
1380
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1381
|
+
} | {
|
1382
|
+
type: "Basic";
|
1383
|
+
username: string | (() => string | undefined) | undefined;
|
1384
|
+
password: string | (() => string | undefined) | undefined;
|
1385
|
+
} | {
|
1386
|
+
type: "Custom";
|
1387
|
+
prefix: string | (() => string | undefined) | undefined;
|
1388
|
+
value: string | (() => string | undefined) | undefined;
|
1389
|
+
}) | undefined;
|
1390
|
+
body?: undefined;
|
1391
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1392
|
+
params?: Record<string, any> | undefined;
|
1393
|
+
duplex?: ("full" | "half") | undefined;
|
1394
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1395
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1396
|
+
retryAttempt?: number | undefined;
|
1397
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1398
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1399
|
+
disableValidation?: boolean | undefined;
|
1400
|
+
}>(data_0?: import("better-auth").Prettify<{
|
1401
|
+
query?: Record<string, any> | undefined;
|
1402
|
+
fetchOptions?: FetchOptions | undefined;
|
1403
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1404
|
+
id: string;
|
1405
|
+
provider: string;
|
1406
|
+
createdAt: Date;
|
1407
|
+
updatedAt: Date;
|
1408
|
+
accountId: string;
|
1409
|
+
scopes: string[];
|
1410
|
+
}[], {
|
1411
|
+
code?: string;
|
1412
|
+
message?: string;
|
1413
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1414
|
+
} & {
|
1415
|
+
deleteUser: {
|
1416
|
+
callback: <FetchOptions extends {
|
1417
|
+
credentials?: RequestCredentials | undefined;
|
1418
|
+
priority?: RequestPriority | undefined;
|
1419
|
+
method?: string | undefined;
|
1420
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1421
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1422
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1423
|
+
authorization: "Bearer" | "Basic";
|
1424
|
+
})) | undefined;
|
1425
|
+
cache?: RequestCache | undefined;
|
1426
|
+
integrity?: string | undefined;
|
1427
|
+
keepalive?: boolean | undefined;
|
1428
|
+
mode?: RequestMode | undefined;
|
1429
|
+
redirect?: RequestRedirect | undefined;
|
1430
|
+
referrer?: string | undefined;
|
1431
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1432
|
+
signal?: (AbortSignal | null) | undefined;
|
1433
|
+
window?: null | undefined;
|
1434
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1435
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1436
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1437
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1438
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1439
|
+
hookOptions?: {
|
1440
|
+
cloneResponse?: boolean;
|
1441
|
+
} | undefined;
|
1442
|
+
timeout?: number | undefined;
|
1443
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1444
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1445
|
+
baseURL?: string | undefined;
|
1446
|
+
throw?: boolean | undefined;
|
1447
|
+
auth?: ({
|
1448
|
+
type: "Bearer";
|
1449
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1450
|
+
} | {
|
1451
|
+
type: "Basic";
|
1452
|
+
username: string | (() => string | undefined) | undefined;
|
1453
|
+
password: string | (() => string | undefined) | undefined;
|
1454
|
+
} | {
|
1455
|
+
type: "Custom";
|
1456
|
+
prefix: string | (() => string | undefined) | undefined;
|
1457
|
+
value: string | (() => string | undefined) | undefined;
|
1458
|
+
}) | undefined;
|
1459
|
+
body?: undefined;
|
1460
|
+
query?: (Partial<{
|
1461
|
+
token: string;
|
1462
|
+
callbackURL?: string | undefined;
|
1463
|
+
}> & Record<string, any>) | undefined;
|
1464
|
+
params?: Record<string, any> | undefined;
|
1465
|
+
duplex?: ("full" | "half") | undefined;
|
1466
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1467
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1468
|
+
retryAttempt?: number | undefined;
|
1469
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1470
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1471
|
+
disableValidation?: boolean | undefined;
|
1472
|
+
}>(data_0: import("better-auth").Prettify<{
|
1473
|
+
query: {
|
1474
|
+
token: string;
|
1475
|
+
callbackURL?: string | undefined;
|
1476
|
+
};
|
1477
|
+
fetchOptions?: FetchOptions | undefined;
|
1478
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1479
|
+
success: boolean;
|
1480
|
+
message: string;
|
1481
|
+
}, {
|
1482
|
+
code?: string;
|
1483
|
+
message?: string;
|
1484
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1485
|
+
};
|
1486
|
+
} & {
|
1487
|
+
unlinkAccount: <FetchOptions extends {
|
1488
|
+
credentials?: RequestCredentials | undefined;
|
1489
|
+
priority?: RequestPriority | undefined;
|
1490
|
+
method?: string | undefined;
|
1491
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1492
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1493
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1494
|
+
authorization: "Bearer" | "Basic";
|
1495
|
+
})) | undefined;
|
1496
|
+
cache?: RequestCache | undefined;
|
1497
|
+
integrity?: string | undefined;
|
1498
|
+
keepalive?: boolean | undefined;
|
1499
|
+
mode?: RequestMode | undefined;
|
1500
|
+
redirect?: RequestRedirect | undefined;
|
1501
|
+
referrer?: string | undefined;
|
1502
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1503
|
+
signal?: (AbortSignal | null) | undefined;
|
1504
|
+
window?: null | undefined;
|
1505
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1506
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1507
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1508
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1509
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1510
|
+
hookOptions?: {
|
1511
|
+
cloneResponse?: boolean;
|
1512
|
+
} | undefined;
|
1513
|
+
timeout?: number | undefined;
|
1514
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1515
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1516
|
+
baseURL?: string | undefined;
|
1517
|
+
throw?: boolean | undefined;
|
1518
|
+
auth?: ({
|
1519
|
+
type: "Bearer";
|
1520
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1521
|
+
} | {
|
1522
|
+
type: "Basic";
|
1523
|
+
username: string | (() => string | undefined) | undefined;
|
1524
|
+
password: string | (() => string | undefined) | undefined;
|
1525
|
+
} | {
|
1526
|
+
type: "Custom";
|
1527
|
+
prefix: string | (() => string | undefined) | undefined;
|
1528
|
+
value: string | (() => string | undefined) | undefined;
|
1529
|
+
}) | undefined;
|
1530
|
+
body?: (Partial<{
|
1531
|
+
providerId: string;
|
1532
|
+
accountId?: string | undefined;
|
1533
|
+
}> & Record<string, any>) | undefined;
|
1534
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1535
|
+
params?: Record<string, any> | undefined;
|
1536
|
+
duplex?: ("full" | "half") | undefined;
|
1537
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1538
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1539
|
+
retryAttempt?: number | undefined;
|
1540
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1541
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1542
|
+
disableValidation?: boolean | undefined;
|
1543
|
+
}>(data_0: import("better-auth").Prettify<{
|
1544
|
+
providerId: string;
|
1545
|
+
accountId?: string | undefined;
|
1546
|
+
} & {
|
1547
|
+
fetchOptions?: FetchOptions | undefined;
|
1548
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1549
|
+
status: boolean;
|
1550
|
+
}, {
|
1551
|
+
code?: string;
|
1552
|
+
message?: string;
|
1553
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1554
|
+
} & {
|
1555
|
+
refreshToken: <FetchOptions extends {
|
1556
|
+
credentials?: RequestCredentials | undefined;
|
1557
|
+
priority?: RequestPriority | undefined;
|
1558
|
+
method?: string | undefined;
|
1559
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1560
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1561
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1562
|
+
authorization: "Bearer" | "Basic";
|
1563
|
+
})) | undefined;
|
1564
|
+
cache?: RequestCache | undefined;
|
1565
|
+
integrity?: string | undefined;
|
1566
|
+
keepalive?: boolean | undefined;
|
1567
|
+
mode?: RequestMode | undefined;
|
1568
|
+
redirect?: RequestRedirect | undefined;
|
1569
|
+
referrer?: string | undefined;
|
1570
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1571
|
+
signal?: (AbortSignal | null) | undefined;
|
1572
|
+
window?: null | undefined;
|
1573
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1574
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1575
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1576
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1577
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1578
|
+
hookOptions?: {
|
1579
|
+
cloneResponse?: boolean;
|
1580
|
+
} | undefined;
|
1581
|
+
timeout?: number | undefined;
|
1582
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1583
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1584
|
+
baseURL?: string | undefined;
|
1585
|
+
throw?: boolean | undefined;
|
1586
|
+
auth?: ({
|
1587
|
+
type: "Bearer";
|
1588
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1589
|
+
} | {
|
1590
|
+
type: "Basic";
|
1591
|
+
username: string | (() => string | undefined) | undefined;
|
1592
|
+
password: string | (() => string | undefined) | undefined;
|
1593
|
+
} | {
|
1594
|
+
type: "Custom";
|
1595
|
+
prefix: string | (() => string | undefined) | undefined;
|
1596
|
+
value: string | (() => string | undefined) | undefined;
|
1597
|
+
}) | undefined;
|
1598
|
+
body?: (Partial<{
|
1599
|
+
providerId: string;
|
1600
|
+
accountId?: string | undefined;
|
1601
|
+
userId?: string | undefined;
|
1602
|
+
}> & Record<string, any>) | undefined;
|
1603
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1604
|
+
params?: Record<string, any> | undefined;
|
1605
|
+
duplex?: ("full" | "half") | undefined;
|
1606
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1607
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1608
|
+
retryAttempt?: number | undefined;
|
1609
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1610
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1611
|
+
disableValidation?: boolean | undefined;
|
1612
|
+
}>(data_0: import("better-auth").Prettify<{
|
1613
|
+
providerId: string;
|
1614
|
+
accountId?: string | undefined;
|
1615
|
+
userId?: string | undefined;
|
1616
|
+
} & {
|
1617
|
+
fetchOptions?: FetchOptions | undefined;
|
1618
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth").OAuth2Tokens, {
|
1619
|
+
code?: string;
|
1620
|
+
message?: string;
|
1621
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1622
|
+
} & {
|
1623
|
+
getAccessToken: <FetchOptions extends {
|
1624
|
+
credentials?: RequestCredentials | undefined;
|
1625
|
+
priority?: RequestPriority | undefined;
|
1626
|
+
method?: string | undefined;
|
1627
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1628
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1629
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1630
|
+
authorization: "Bearer" | "Basic";
|
1631
|
+
})) | undefined;
|
1632
|
+
cache?: RequestCache | undefined;
|
1633
|
+
integrity?: string | undefined;
|
1634
|
+
keepalive?: boolean | undefined;
|
1635
|
+
mode?: RequestMode | undefined;
|
1636
|
+
redirect?: RequestRedirect | undefined;
|
1637
|
+
referrer?: string | undefined;
|
1638
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1639
|
+
signal?: (AbortSignal | null) | undefined;
|
1640
|
+
window?: null | undefined;
|
1641
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1642
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1643
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1644
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1645
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1646
|
+
hookOptions?: {
|
1647
|
+
cloneResponse?: boolean;
|
1648
|
+
} | undefined;
|
1649
|
+
timeout?: number | undefined;
|
1650
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1651
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1652
|
+
baseURL?: string | undefined;
|
1653
|
+
throw?: boolean | undefined;
|
1654
|
+
auth?: ({
|
1655
|
+
type: "Bearer";
|
1656
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1657
|
+
} | {
|
1658
|
+
type: "Basic";
|
1659
|
+
username: string | (() => string | undefined) | undefined;
|
1660
|
+
password: string | (() => string | undefined) | undefined;
|
1661
|
+
} | {
|
1662
|
+
type: "Custom";
|
1663
|
+
prefix: string | (() => string | undefined) | undefined;
|
1664
|
+
value: string | (() => string | undefined) | undefined;
|
1665
|
+
}) | undefined;
|
1666
|
+
body?: (Partial<{
|
1667
|
+
providerId: string;
|
1668
|
+
accountId?: string | undefined;
|
1669
|
+
userId?: string | undefined;
|
1670
|
+
}> & Record<string, any>) | undefined;
|
1671
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1672
|
+
params?: Record<string, any> | undefined;
|
1673
|
+
duplex?: ("full" | "half") | undefined;
|
1674
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1675
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1676
|
+
retryAttempt?: number | undefined;
|
1677
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1678
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1679
|
+
disableValidation?: boolean | undefined;
|
1680
|
+
}>(data_0: import("better-auth").Prettify<{
|
1681
|
+
providerId: string;
|
1682
|
+
accountId?: string | undefined;
|
1683
|
+
userId?: string | undefined;
|
1684
|
+
} & {
|
1685
|
+
fetchOptions?: FetchOptions | undefined;
|
1686
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1687
|
+
accessToken: string;
|
1688
|
+
accessTokenExpiresAt: Date | undefined;
|
1689
|
+
scopes: string[];
|
1690
|
+
idToken: string | undefined;
|
1691
|
+
}, {
|
1692
|
+
code?: string;
|
1693
|
+
message?: string;
|
1694
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1695
|
+
} & {
|
1696
|
+
accountInfo: <FetchOptions extends {
|
1697
|
+
credentials?: RequestCredentials | undefined;
|
1698
|
+
priority?: RequestPriority | undefined;
|
1699
|
+
method?: string | undefined;
|
1700
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1701
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1702
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1703
|
+
authorization: "Bearer" | "Basic";
|
1704
|
+
})) | undefined;
|
1705
|
+
cache?: RequestCache | undefined;
|
1706
|
+
integrity?: string | undefined;
|
1707
|
+
keepalive?: boolean | undefined;
|
1708
|
+
mode?: RequestMode | undefined;
|
1709
|
+
redirect?: RequestRedirect | undefined;
|
1710
|
+
referrer?: string | undefined;
|
1711
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1712
|
+
signal?: (AbortSignal | null) | undefined;
|
1713
|
+
window?: null | undefined;
|
1714
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1715
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1716
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1717
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1718
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1719
|
+
hookOptions?: {
|
1720
|
+
cloneResponse?: boolean;
|
1721
|
+
} | undefined;
|
1722
|
+
timeout?: number | undefined;
|
1723
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1724
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1725
|
+
baseURL?: string | undefined;
|
1726
|
+
throw?: boolean | undefined;
|
1727
|
+
auth?: ({
|
1728
|
+
type: "Bearer";
|
1729
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1730
|
+
} | {
|
1731
|
+
type: "Basic";
|
1732
|
+
username: string | (() => string | undefined) | undefined;
|
1733
|
+
password: string | (() => string | undefined) | undefined;
|
1734
|
+
} | {
|
1735
|
+
type: "Custom";
|
1736
|
+
prefix: string | (() => string | undefined) | undefined;
|
1737
|
+
value: string | (() => string | undefined) | undefined;
|
1738
|
+
}) | undefined;
|
1739
|
+
body?: (Partial<{
|
1740
|
+
accountId: string;
|
1741
|
+
}> & Record<string, any>) | undefined;
|
1742
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1743
|
+
params?: Record<string, any> | undefined;
|
1744
|
+
duplex?: ("full" | "half") | undefined;
|
1745
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1746
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1747
|
+
retryAttempt?: number | undefined;
|
1748
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1749
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1750
|
+
disableValidation?: boolean | undefined;
|
1751
|
+
}>(data_0: import("better-auth").Prettify<{
|
1752
|
+
accountId: string;
|
1753
|
+
} & {
|
1754
|
+
fetchOptions?: FetchOptions | undefined;
|
1755
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1756
|
+
user: {
|
1757
|
+
id: string | number;
|
1758
|
+
name?: string;
|
1759
|
+
email?: string | null;
|
1760
|
+
image?: string;
|
1761
|
+
emailVerified: boolean;
|
1762
|
+
};
|
1763
|
+
data: Record<string, any>;
|
1764
|
+
}, {
|
1765
|
+
code?: string;
|
1766
|
+
message?: string;
|
1767
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1768
|
+
} & {
|
1769
|
+
signUp: {
|
1770
|
+
email: <FetchOptions extends {
|
1771
|
+
credentials?: RequestCredentials | undefined;
|
1772
|
+
priority?: RequestPriority | undefined;
|
1773
|
+
method?: string | undefined;
|
1774
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1775
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1776
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1777
|
+
authorization: "Bearer" | "Basic";
|
1778
|
+
})) | undefined;
|
1779
|
+
cache?: RequestCache | undefined;
|
1780
|
+
integrity?: string | undefined;
|
1781
|
+
keepalive?: boolean | undefined;
|
1782
|
+
mode?: RequestMode | undefined;
|
1783
|
+
redirect?: RequestRedirect | undefined;
|
1784
|
+
referrer?: string | undefined;
|
1785
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1786
|
+
signal?: (AbortSignal | null) | undefined;
|
1787
|
+
window?: null | undefined;
|
1788
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1789
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1790
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1791
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1792
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1793
|
+
hookOptions?: {
|
1794
|
+
cloneResponse?: boolean;
|
1795
|
+
} | undefined;
|
1796
|
+
timeout?: number | undefined;
|
1797
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1798
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1799
|
+
baseURL?: string | undefined;
|
1800
|
+
throw?: boolean | undefined;
|
1801
|
+
auth?: ({
|
1802
|
+
type: "Bearer";
|
1803
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1804
|
+
} | {
|
1805
|
+
type: "Basic";
|
1806
|
+
username: string | (() => string | undefined) | undefined;
|
1807
|
+
password: string | (() => string | undefined) | undefined;
|
1808
|
+
} | {
|
1809
|
+
type: "Custom";
|
1810
|
+
prefix: string | (() => string | undefined) | undefined;
|
1811
|
+
value: string | (() => string | undefined) | undefined;
|
1812
|
+
}) | undefined;
|
1813
|
+
body?: (Partial<{
|
1814
|
+
name: string;
|
1815
|
+
email: string;
|
1816
|
+
password: string;
|
1817
|
+
image?: string;
|
1818
|
+
callbackURL?: string;
|
1819
|
+
rememberMe?: boolean;
|
1820
|
+
}> & Record<string, any>) | undefined;
|
1821
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1822
|
+
params?: Record<string, any> | undefined;
|
1823
|
+
duplex?: ("full" | "half") | undefined;
|
1824
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1825
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1826
|
+
retryAttempt?: number | undefined;
|
1827
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1828
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1829
|
+
disableValidation?: boolean | undefined;
|
1830
|
+
}>(data_0: import("better-auth").Prettify<{
|
1831
|
+
email: string;
|
1832
|
+
name: string;
|
1833
|
+
password: string;
|
1834
|
+
image?: string;
|
1835
|
+
callbackURL?: string;
|
1836
|
+
fetchOptions?: FetchOptions | undefined;
|
1837
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<{
|
1838
|
+
token: null;
|
1839
|
+
user: {
|
1840
|
+
id: string;
|
1841
|
+
email: string;
|
1842
|
+
name: string;
|
1843
|
+
image: string | null | undefined;
|
1844
|
+
emailVerified: boolean;
|
1845
|
+
createdAt: Date;
|
1846
|
+
updatedAt: Date;
|
1847
|
+
};
|
1848
|
+
} | {
|
1849
|
+
token: string;
|
1850
|
+
user: {
|
1851
|
+
id: string;
|
1852
|
+
email: string;
|
1853
|
+
name: string;
|
1854
|
+
image: string | null | undefined;
|
1855
|
+
emailVerified: boolean;
|
1856
|
+
createdAt: Date;
|
1857
|
+
updatedAt: Date;
|
1858
|
+
};
|
1859
|
+
}>, {
|
1860
|
+
code?: string;
|
1861
|
+
message?: string;
|
1862
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1863
|
+
};
|
1864
|
+
} & {
|
1865
|
+
updateUser: <FetchOptions extends {
|
1866
|
+
credentials?: RequestCredentials | undefined;
|
1867
|
+
priority?: RequestPriority | undefined;
|
1868
|
+
method?: string | undefined;
|
1869
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1870
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1871
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1872
|
+
authorization: "Bearer" | "Basic";
|
1873
|
+
})) | undefined;
|
1874
|
+
cache?: RequestCache | undefined;
|
1875
|
+
integrity?: string | undefined;
|
1876
|
+
keepalive?: boolean | undefined;
|
1877
|
+
mode?: RequestMode | undefined;
|
1878
|
+
redirect?: RequestRedirect | undefined;
|
1879
|
+
referrer?: string | undefined;
|
1880
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1881
|
+
signal?: (AbortSignal | null) | undefined;
|
1882
|
+
window?: null | undefined;
|
1883
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1884
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1885
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1886
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1887
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1888
|
+
hookOptions?: {
|
1889
|
+
cloneResponse?: boolean;
|
1890
|
+
} | undefined;
|
1891
|
+
timeout?: number | undefined;
|
1892
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1893
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1894
|
+
baseURL?: string | undefined;
|
1895
|
+
throw?: boolean | undefined;
|
1896
|
+
auth?: ({
|
1897
|
+
type: "Bearer";
|
1898
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1899
|
+
} | {
|
1900
|
+
type: "Basic";
|
1901
|
+
username: string | (() => string | undefined) | undefined;
|
1902
|
+
password: string | (() => string | undefined) | undefined;
|
1903
|
+
} | {
|
1904
|
+
type: "Custom";
|
1905
|
+
prefix: string | (() => string | undefined) | undefined;
|
1906
|
+
value: string | (() => string | undefined) | undefined;
|
1907
|
+
}) | undefined;
|
1908
|
+
body?: (Partial<Partial<{}> & {
|
1909
|
+
name?: string;
|
1910
|
+
image?: string;
|
1911
|
+
}> & Record<string, any>) | undefined;
|
1912
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1913
|
+
params?: Record<string, any> | undefined;
|
1914
|
+
duplex?: ("full" | "half") | undefined;
|
1915
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1916
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1917
|
+
retryAttempt?: number | undefined;
|
1918
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1919
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1920
|
+
disableValidation?: boolean | undefined;
|
1921
|
+
}>(data_0?: import("better-auth").Prettify<{
|
1922
|
+
image?: string | null;
|
1923
|
+
name?: string;
|
1924
|
+
fetchOptions?: FetchOptions | undefined;
|
1925
|
+
} & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
1926
|
+
status: boolean;
|
1927
|
+
}, {
|
1928
|
+
code?: string;
|
1929
|
+
message?: string;
|
1930
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
1931
|
+
} & {
|
1932
|
+
listSessions: <FetchOptions extends {
|
1933
|
+
credentials?: RequestCredentials | undefined;
|
1934
|
+
priority?: RequestPriority | undefined;
|
1935
|
+
method?: string | undefined;
|
1936
|
+
headers?: (HeadersInit & (HeadersInit | {
|
1937
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
1938
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
1939
|
+
authorization: "Bearer" | "Basic";
|
1940
|
+
})) | undefined;
|
1941
|
+
cache?: RequestCache | undefined;
|
1942
|
+
integrity?: string | undefined;
|
1943
|
+
keepalive?: boolean | undefined;
|
1944
|
+
mode?: RequestMode | undefined;
|
1945
|
+
redirect?: RequestRedirect | undefined;
|
1946
|
+
referrer?: string | undefined;
|
1947
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
1948
|
+
signal?: (AbortSignal | null) | undefined;
|
1949
|
+
window?: null | undefined;
|
1950
|
+
onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
1951
|
+
onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
1952
|
+
onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
1953
|
+
onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
1954
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
1955
|
+
hookOptions?: {
|
1956
|
+
cloneResponse?: boolean;
|
1957
|
+
} | undefined;
|
1958
|
+
timeout?: number | undefined;
|
1959
|
+
customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
|
1960
|
+
plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
|
1961
|
+
baseURL?: string | undefined;
|
1962
|
+
throw?: boolean | undefined;
|
1963
|
+
auth?: ({
|
1964
|
+
type: "Bearer";
|
1965
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
1966
|
+
} | {
|
1967
|
+
type: "Basic";
|
1968
|
+
username: string | (() => string | undefined) | undefined;
|
1969
|
+
password: string | (() => string | undefined) | undefined;
|
1970
|
+
} | {
|
1971
|
+
type: "Custom";
|
1972
|
+
prefix: string | (() => string | undefined) | undefined;
|
1973
|
+
value: string | (() => string | undefined) | undefined;
|
1974
|
+
}) | undefined;
|
1975
|
+
body?: undefined;
|
1976
|
+
query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
|
1977
|
+
params?: Record<string, any> | undefined;
|
1978
|
+
duplex?: ("full" | "half") | undefined;
|
1979
|
+
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
1980
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
1981
|
+
retryAttempt?: number | undefined;
|
1982
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
1983
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
1984
|
+
disableValidation?: boolean | undefined;
|
1985
|
+
}>(data_0?: import("better-auth").Prettify<{
|
1986
|
+
query?: Record<string, any> | undefined;
|
1987
|
+
fetchOptions?: FetchOptions | undefined;
|
1988
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth").Prettify<{
|
1989
|
+
id: string;
|
1990
|
+
userId: string;
|
1991
|
+
expiresAt: Date;
|
1992
|
+
createdAt: Date;
|
1993
|
+
updatedAt: Date;
|
1994
|
+
token: string;
|
1995
|
+
ipAddress?: string | null | undefined;
|
1996
|
+
userAgent?: string | null | undefined;
|
1997
|
+
}>[], {
|
1998
|
+
code?: string;
|
1999
|
+
message?: string;
|
2000
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
2001
|
+
} & {
|
2002
|
+
jazz: {
|
2003
|
+
setJazzContext: (context: import("jazz-tools").JazzContextType<Account>) => void;
|
2004
|
+
setAuthSecretStorage: (storage: import("jazz-tools").AuthSecretStorage) => void;
|
2005
|
+
};
|
2006
|
+
} & {
|
2007
|
+
useSession: import("nanostores").Atom<{
|
2008
|
+
data: {
|
2009
|
+
user: {
|
2010
|
+
id: string;
|
2011
|
+
email: string;
|
2012
|
+
emailVerified: boolean;
|
2013
|
+
name: string;
|
2014
|
+
createdAt: Date;
|
2015
|
+
updatedAt: Date;
|
2016
|
+
image?: string | null | undefined;
|
2017
|
+
};
|
2018
|
+
session: {
|
2019
|
+
id: string;
|
2020
|
+
userId: string;
|
2021
|
+
expiresAt: Date;
|
2022
|
+
createdAt: Date;
|
2023
|
+
updatedAt: Date;
|
2024
|
+
token: string;
|
2025
|
+
ipAddress?: string | null | undefined;
|
2026
|
+
userAgent?: string | null | undefined;
|
2027
|
+
};
|
2028
|
+
} | null;
|
2029
|
+
error: import("@better-fetch/fetch").BetterFetchError | null;
|
2030
|
+
isPending: boolean;
|
2031
|
+
}>;
|
2032
|
+
$fetch: import("@better-fetch/fetch").BetterFetch<{
|
2033
|
+
plugins: (import("@better-fetch/fetch").BetterFetchPlugin | {
|
2034
|
+
id: string;
|
2035
|
+
name: string;
|
2036
|
+
hooks: {
|
2037
|
+
onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
2038
|
+
onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
2039
|
+
onRequest: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
2040
|
+
onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
2041
|
+
};
|
2042
|
+
} | {
|
2043
|
+
id: string;
|
2044
|
+
name: string;
|
2045
|
+
hooks: {
|
2046
|
+
onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
|
2047
|
+
};
|
2048
|
+
})[];
|
2049
|
+
cache?: RequestCache | undefined;
|
2050
|
+
credentials?: RequestCredentials;
|
2051
|
+
headers?: (HeadersInit & (HeadersInit | {
|
2052
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
2053
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
2054
|
+
authorization: "Bearer" | "Basic";
|
2055
|
+
})) | undefined;
|
2056
|
+
integrity?: string | undefined;
|
2057
|
+
keepalive?: boolean | undefined;
|
2058
|
+
method: string;
|
2059
|
+
mode?: RequestMode | undefined;
|
2060
|
+
priority?: RequestPriority | undefined;
|
2061
|
+
redirect?: RequestRedirect | undefined;
|
2062
|
+
referrer?: string | undefined;
|
2063
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
2064
|
+
signal?: (AbortSignal | null) | undefined;
|
2065
|
+
window?: null | undefined;
|
2066
|
+
onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
|
2067
|
+
hookOptions?: {
|
2068
|
+
cloneResponse?: boolean;
|
2069
|
+
} | undefined;
|
2070
|
+
timeout?: number | undefined;
|
2071
|
+
customFetchImpl: import("@better-fetch/fetch").FetchEsque;
|
2072
|
+
baseURL: string;
|
2073
|
+
throw?: boolean | undefined;
|
2074
|
+
auth?: ({
|
2075
|
+
type: "Bearer";
|
2076
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
2077
|
+
} | {
|
2078
|
+
type: "Basic";
|
2079
|
+
username: string | (() => string | undefined) | undefined;
|
2080
|
+
password: string | (() => string | undefined) | undefined;
|
2081
|
+
} | {
|
2082
|
+
type: "Custom";
|
2083
|
+
prefix: string | (() => string | undefined) | undefined;
|
2084
|
+
value: string | (() => string | undefined) | undefined;
|
2085
|
+
}) | undefined;
|
2086
|
+
body?: any;
|
2087
|
+
query?: any;
|
2088
|
+
params?: any;
|
2089
|
+
duplex?: "full" | "half" | undefined;
|
2090
|
+
jsonParser: (text: string) => Promise<any> | any;
|
2091
|
+
retry?: import("@better-fetch/fetch").RetryOptions | undefined;
|
2092
|
+
retryAttempt?: number | undefined;
|
2093
|
+
output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
2094
|
+
errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
|
2095
|
+
disableValidation?: boolean | undefined;
|
2096
|
+
}, unknown, unknown, {}>;
|
2097
|
+
$store: {
|
2098
|
+
notify: (signal?: Omit<string, "$sessionSignal"> | "$sessionSignal") => void;
|
2099
|
+
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
2100
|
+
atoms: Record<string, import("nanostores").WritableAtom<any>>;
|
2101
|
+
};
|
2102
|
+
$Infer: {
|
2103
|
+
Session: {
|
2104
|
+
user: {
|
2105
|
+
id: string;
|
2106
|
+
email: string;
|
2107
|
+
emailVerified: boolean;
|
2108
|
+
name: string;
|
2109
|
+
createdAt: Date;
|
2110
|
+
updatedAt: Date;
|
2111
|
+
image?: string | null | undefined;
|
2112
|
+
};
|
2113
|
+
session: {
|
2114
|
+
id: string;
|
2115
|
+
userId: string;
|
2116
|
+
expiresAt: Date;
|
2117
|
+
createdAt: Date;
|
2118
|
+
updatedAt: Date;
|
2119
|
+
token: string;
|
2120
|
+
ipAddress?: string | null | undefined;
|
2121
|
+
userAgent?: string | null | undefined;
|
2122
|
+
};
|
2123
|
+
};
|
2124
|
+
};
|
2125
|
+
$ERROR_CODES: never;
|
2126
|
+
}) | null>;
|
2127
|
+
/**
|
2128
|
+
* @param props.children - The children to render.
|
2129
|
+
* @param props.betterAuthClient - The BetterAuth client with the Jazz plugin.
|
2130
|
+
*
|
2131
|
+
* @example
|
2132
|
+
* ```ts
|
2133
|
+
* const betterAuthClient = createAuthClient({
|
2134
|
+
* plugins: [
|
2135
|
+
* jazzPluginClient(),
|
2136
|
+
* ],
|
2137
|
+
* });
|
2138
|
+
*
|
2139
|
+
* <AuthProvider betterAuthClient={betterAuthClient}>
|
2140
|
+
* <App />
|
2141
|
+
* </AuthProvider>
|
2142
|
+
* ```
|
2143
|
+
*/
|
2144
|
+
export declare function AuthProvider({ children, betterAuthClient, }: PropsWithChildren<{
|
2145
|
+
betterAuthClient: AuthClient;
|
2146
|
+
}>): import("react").ReactNode;
|
2147
|
+
/**
|
2148
|
+
* @param props - The props for the JazzReactProvider.
|
2149
|
+
* @param props.betterAuth - The options for the BetterAuth client.
|
2150
|
+
* @returns The JazzReactProvider with the BetterAuth plugin.
|
2151
|
+
*
|
2152
|
+
* @example
|
2153
|
+
* ```ts
|
2154
|
+
* <JazzReactProviderWithBetterAuth
|
2155
|
+
* betterAuth={{
|
2156
|
+
* baseURL: "http://localhost:3000",
|
2157
|
+
* }}
|
2158
|
+
* sync={{
|
2159
|
+
* peer: "ws://localhost:4200",
|
2160
|
+
* }}
|
2161
|
+
* >
|
2162
|
+
* <App />
|
2163
|
+
* </JazzReactProviderWithBetterAuth>
|
2164
|
+
* ```
|
2165
|
+
*/
|
2166
|
+
export declare const JazzReactProviderWithBetterAuth: <S extends (AccountClass<Account> & CoValueFromRaw<Account>) | AnyAccountSchema>(props: {
|
2167
|
+
betterAuthClient: AuthClient;
|
2168
|
+
} & JazzProviderProps<S>) => import("react/jsx-runtime").JSX.Element;
|
2169
|
+
export {};
|
2170
|
+
//# sourceMappingURL=react.d.ts.map
|