@neondatabase/auth 0.1.0-beta.5 → 0.1.0-beta.7
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/README.md +8 -8
- package/dist/{adapter-core-C12KoaiU.d.mts → adapter-core-Bw9mn_AS.d.mts} +95 -508
- package/dist/{adapter-core-BDOw-gBC.mjs → adapter-core-C_NEMs0b.mjs} +2 -4
- package/dist/{better-auth-react-adapter-FnBHa2nr.mjs → better-auth-react-adapter-BbM3jLLv.mjs} +1 -1
- package/dist/{better-auth-react-adapter-BXL48HIU.d.mts → better-auth-react-adapter-JoscqoDc.d.mts} +88 -88
- package/dist/better-auth-types-CE4hLv9E.d.mts +9 -0
- package/dist/chunk-5DLVHPZS-Bxj7snpZ-DoVNlsyk.mjs +533 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -4
- package/dist/{neon-auth-C9XTFffv.mjs → neon-auth-DdlToh7_.mjs} +1 -1
- package/dist/next/index.d.mts +18 -187
- package/dist/next/index.mjs +2 -4
- package/dist/react/adapters/index.d.mts +3 -3
- package/dist/react/adapters/index.mjs +1 -3
- package/dist/react/index.d.mts +4 -4
- package/dist/react/index.mjs +4 -94
- package/dist/react/ui/index.d.mts +1 -1
- package/dist/react/ui/index.mjs +3 -91
- package/dist/react/ui/server.mjs +1 -1
- package/dist/{supabase-adapter-ggmqWgPe.mjs → supabase-adapter-CAqbpOC7.mjs} +45 -123
- package/dist/{supabase-adapter-crabDnl2.d.mts → supabase-adapter-Clxlqg1x.d.mts} +1 -2
- package/dist/types/index.d.mts +8 -0
- package/dist/types/index.mjs +3 -0
- package/dist/ui/css.css +1 -1
- package/dist/ui/tailwind.css +0 -3
- package/dist/ui/theme.css +125 -49
- package/dist/ui-aMoA-9nq.mjs +9449 -0
- package/dist/vanilla/adapters/index.d.mts +3 -3
- package/dist/vanilla/adapters/index.mjs +1 -3
- package/dist/vanilla/index.d.mts +3 -3
- package/dist/vanilla/index.mjs +1 -3
- package/package.json +7 -3
- package/dist/ui-BQAaHqx4.mjs +0 -386
- /package/dist/{adapters-CivF9wql.mjs → adapters-D0mxG3F-.mjs} +0 -0
- /package/dist/{adapters-Dkx0zoMR.mjs → adapters-Df6Dd3KK.mjs} +0 -0
- /package/dist/{index-DuDD6cIY.d.mts → index-BXlAjlSt.d.mts} +0 -0
- /package/dist/{index-C-svZlpj.d.mts → index-ClXLQ1fw.d.mts} +0 -0
- /package/dist/{index-UW23fDSn.d.mts → index-DCQ5Y2ED.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getGlobalBroadcastChannel } from "better-auth/client";
|
|
2
|
-
import { adminClient, anonymousClient, emailOTPClient, jwtClient,
|
|
2
|
+
import { adminClient, anonymousClient, emailOTPClient, jwtClient, organizationClient } from "better-auth/client/plugins";
|
|
3
3
|
|
|
4
4
|
//#region src/core/in-flight-request-manager.ts
|
|
5
5
|
/**
|
|
@@ -416,9 +416,7 @@ const supportedBetterAuthClientPlugins = [
|
|
|
416
416
|
adminClient(),
|
|
417
417
|
organizationClient(),
|
|
418
418
|
emailOTPClient(),
|
|
419
|
-
anonymousClient()
|
|
420
|
-
phoneNumberClient(),
|
|
421
|
-
magicLinkClient()
|
|
419
|
+
anonymousClient()
|
|
422
420
|
];
|
|
423
421
|
var NeonAuthAdapterCore = class {
|
|
424
422
|
betterAuthOptions;
|
package/dist/{better-auth-react-adapter-FnBHa2nr.mjs → better-auth-react-adapter-BbM3jLLv.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as NeonAuthAdapterCore } from "./adapter-core-
|
|
1
|
+
import { t as NeonAuthAdapterCore } from "./adapter-core-C_NEMs0b.mjs";
|
|
2
2
|
import { createAuthClient } from "better-auth/react";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/better-auth-react/better-auth-react-adapter.ts
|
package/dist/{better-auth-react-adapter-BXL48HIU.d.mts → better-auth-react-adapter-JoscqoDc.d.mts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as NeonAuthAdapterCoreAuthOptions, t as NeonAuthAdapterCore } from "./adapter-core-
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import { n as NeonAuthAdapterCoreAuthOptions, t as NeonAuthAdapterCore } from "./adapter-core-Bw9mn_AS.mjs";
|
|
2
|
+
import * as better_auth153 from "better-auth";
|
|
3
|
+
import * as _better_fetch_fetch89 from "@better-fetch/fetch";
|
|
4
4
|
import * as nanostores0 from "nanostores";
|
|
5
5
|
|
|
6
6
|
//#region src/adapters/better-auth-react/better-auth-react-adapter.d.ts
|
|
@@ -13,7 +13,7 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
13
13
|
constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
|
|
14
14
|
getBetterAuthInstance(): {
|
|
15
15
|
signIn: {
|
|
16
|
-
social: <FetchOptions extends
|
|
16
|
+
social: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
17
17
|
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
18
18
|
callbackURL?: string | undefined;
|
|
19
19
|
newUserCallbackURL?: string | undefined;
|
|
@@ -30,7 +30,7 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
30
30
|
requestSignUp?: boolean | undefined;
|
|
31
31
|
loginHint?: string | undefined;
|
|
32
32
|
additionalData?: Record<string, any> | undefined;
|
|
33
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
33
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
34
34
|
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
35
35
|
callbackURL?: string | undefined;
|
|
36
36
|
newUserCallbackURL?: string | undefined;
|
|
@@ -49,7 +49,7 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
49
49
|
additionalData?: Record<string, any> | undefined;
|
|
50
50
|
} & {
|
|
51
51
|
fetchOptions?: FetchOptions | undefined;
|
|
52
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
52
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<NonNullable<{
|
|
53
53
|
redirect: boolean;
|
|
54
54
|
url: string;
|
|
55
55
|
} | {
|
|
@@ -71,10 +71,10 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
71
71
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
72
72
|
};
|
|
73
73
|
} & {
|
|
74
|
-
signOut: <FetchOptions extends
|
|
74
|
+
signOut: <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth153.Prettify<{
|
|
75
75
|
query?: Record<string, any> | undefined;
|
|
76
76
|
fetchOptions?: FetchOptions | undefined;
|
|
77
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<
|
|
77
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
78
78
|
success: boolean;
|
|
79
79
|
}, {
|
|
80
80
|
code?: string | undefined;
|
|
@@ -82,21 +82,21 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
82
82
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
83
83
|
} & {
|
|
84
84
|
signUp: {
|
|
85
|
-
email: <FetchOptions extends
|
|
85
|
+
email: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
86
86
|
name: string;
|
|
87
87
|
email: string;
|
|
88
88
|
password: string;
|
|
89
89
|
image?: string | undefined;
|
|
90
90
|
callbackURL?: string | undefined;
|
|
91
91
|
rememberMe?: boolean | undefined;
|
|
92
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
92
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
93
93
|
email: string;
|
|
94
94
|
name: string;
|
|
95
95
|
password: string;
|
|
96
96
|
image?: string | undefined;
|
|
97
97
|
callbackURL?: string | undefined;
|
|
98
98
|
fetchOptions?: FetchOptions | undefined;
|
|
99
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
99
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<NonNullable<{
|
|
100
100
|
token: null;
|
|
101
101
|
user: {
|
|
102
102
|
id: string;
|
|
@@ -125,19 +125,19 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
125
125
|
};
|
|
126
126
|
} & {
|
|
127
127
|
signIn: {
|
|
128
|
-
email: <FetchOptions extends
|
|
128
|
+
email: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
129
129
|
email: string;
|
|
130
130
|
password: string;
|
|
131
131
|
callbackURL?: string | undefined;
|
|
132
132
|
rememberMe?: boolean | undefined;
|
|
133
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
133
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
134
134
|
email: string;
|
|
135
135
|
password: string;
|
|
136
136
|
callbackURL?: string | undefined;
|
|
137
137
|
rememberMe?: boolean | undefined;
|
|
138
138
|
} & {
|
|
139
139
|
fetchOptions?: FetchOptions | undefined;
|
|
140
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
140
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
141
141
|
redirect: boolean;
|
|
142
142
|
token: string;
|
|
143
143
|
url?: string | undefined;
|
|
@@ -156,80 +156,80 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
156
156
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
157
157
|
};
|
|
158
158
|
} & {
|
|
159
|
-
resetPassword: <FetchOptions extends
|
|
159
|
+
resetPassword: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
160
160
|
newPassword: string;
|
|
161
161
|
token?: string | undefined;
|
|
162
162
|
}> & Record<string, any>, Partial<{
|
|
163
163
|
token?: string | undefined;
|
|
164
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
164
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
165
165
|
newPassword: string;
|
|
166
166
|
token?: string | undefined;
|
|
167
167
|
} & {
|
|
168
168
|
fetchOptions?: FetchOptions | undefined;
|
|
169
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
169
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
170
170
|
status: boolean;
|
|
171
171
|
}, {
|
|
172
172
|
code?: string | undefined;
|
|
173
173
|
message?: string | undefined;
|
|
174
174
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
175
175
|
} & {
|
|
176
|
-
verifyEmail: <FetchOptions extends
|
|
176
|
+
verifyEmail: <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<{
|
|
177
177
|
token: string;
|
|
178
178
|
callbackURL?: string | undefined;
|
|
179
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
179
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
180
180
|
query: {
|
|
181
181
|
token: string;
|
|
182
182
|
callbackURL?: string | undefined;
|
|
183
183
|
};
|
|
184
184
|
fetchOptions?: FetchOptions | undefined;
|
|
185
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
185
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<NonNullable<void | {
|
|
186
186
|
status: boolean;
|
|
187
187
|
}>, {
|
|
188
188
|
code?: string | undefined;
|
|
189
189
|
message?: string | undefined;
|
|
190
190
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
191
191
|
} & {
|
|
192
|
-
sendVerificationEmail: <FetchOptions extends
|
|
192
|
+
sendVerificationEmail: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
193
193
|
email: string;
|
|
194
194
|
callbackURL?: string | undefined;
|
|
195
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
195
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
196
196
|
email: string;
|
|
197
197
|
callbackURL?: string | undefined;
|
|
198
198
|
} & {
|
|
199
199
|
fetchOptions?: FetchOptions | undefined;
|
|
200
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
200
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
201
201
|
status: boolean;
|
|
202
202
|
}, {
|
|
203
203
|
code?: string | undefined;
|
|
204
204
|
message?: string | undefined;
|
|
205
205
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
206
206
|
} & {
|
|
207
|
-
changeEmail: <FetchOptions extends
|
|
207
|
+
changeEmail: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
208
208
|
newEmail: string;
|
|
209
209
|
callbackURL?: string | undefined;
|
|
210
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
210
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
211
211
|
newEmail: string;
|
|
212
212
|
callbackURL?: string | undefined;
|
|
213
213
|
} & {
|
|
214
214
|
fetchOptions?: FetchOptions | undefined;
|
|
215
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
215
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
216
216
|
status: boolean;
|
|
217
217
|
}, {
|
|
218
218
|
code?: string | undefined;
|
|
219
219
|
message?: string | undefined;
|
|
220
220
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
221
221
|
} & {
|
|
222
|
-
changePassword: <FetchOptions extends
|
|
222
|
+
changePassword: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
223
223
|
newPassword: string;
|
|
224
224
|
currentPassword: string;
|
|
225
225
|
revokeOtherSessions?: boolean | undefined;
|
|
226
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
226
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
227
227
|
newPassword: string;
|
|
228
228
|
currentPassword: string;
|
|
229
229
|
revokeOtherSessions?: boolean | undefined;
|
|
230
230
|
} & {
|
|
231
231
|
fetchOptions?: FetchOptions | undefined;
|
|
232
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
232
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
233
233
|
token: string | null;
|
|
234
234
|
user: {
|
|
235
235
|
id: string;
|
|
@@ -245,31 +245,31 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
245
245
|
message?: string | undefined;
|
|
246
246
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
247
247
|
} & {
|
|
248
|
-
updateUser: <FetchOptions extends
|
|
248
|
+
updateUser: <FetchOptions extends better_auth153.ClientFetchOption<Partial<Partial<{}> & {
|
|
249
249
|
name?: string | undefined;
|
|
250
250
|
image?: string | undefined | null;
|
|
251
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?:
|
|
251
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth153.Prettify<{
|
|
252
252
|
image?: (string | null) | undefined;
|
|
253
253
|
name?: string | undefined;
|
|
254
254
|
fetchOptions?: FetchOptions | undefined;
|
|
255
|
-
} & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<
|
|
255
|
+
} & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
256
256
|
status: boolean;
|
|
257
257
|
}, {
|
|
258
258
|
code?: string | undefined;
|
|
259
259
|
message?: string | undefined;
|
|
260
260
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
261
261
|
} & {
|
|
262
|
-
deleteUser: <FetchOptions extends
|
|
262
|
+
deleteUser: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
263
263
|
callbackURL?: string | undefined;
|
|
264
264
|
password?: string | undefined;
|
|
265
265
|
token?: string | undefined;
|
|
266
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?:
|
|
266
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth153.Prettify<{
|
|
267
267
|
callbackURL?: string | undefined;
|
|
268
268
|
password?: string | undefined;
|
|
269
269
|
token?: string | undefined;
|
|
270
270
|
} & {
|
|
271
271
|
fetchOptions?: FetchOptions | undefined;
|
|
272
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<
|
|
272
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
273
273
|
success: boolean;
|
|
274
274
|
message: string;
|
|
275
275
|
}, {
|
|
@@ -277,15 +277,15 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
277
277
|
message?: string | undefined;
|
|
278
278
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
279
279
|
} & {
|
|
280
|
-
requestPasswordReset: <FetchOptions extends
|
|
280
|
+
requestPasswordReset: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
281
281
|
email: string;
|
|
282
282
|
redirectTo?: string | undefined;
|
|
283
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
283
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
284
284
|
email: string;
|
|
285
285
|
redirectTo?: string | undefined;
|
|
286
286
|
} & {
|
|
287
287
|
fetchOptions?: FetchOptions | undefined;
|
|
288
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
288
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
289
289
|
status: boolean;
|
|
290
290
|
message: string;
|
|
291
291
|
}, {
|
|
@@ -294,25 +294,25 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
294
294
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
295
295
|
} & {
|
|
296
296
|
resetPassword: {
|
|
297
|
-
":token": <FetchOptions extends
|
|
297
|
+
":token": <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<{
|
|
298
298
|
callbackURL: string;
|
|
299
299
|
}> & Record<string, any>, {
|
|
300
300
|
token: string;
|
|
301
|
-
}>>(data_0:
|
|
301
|
+
}>>(data_0: better_auth153.Prettify<{
|
|
302
302
|
query: {
|
|
303
303
|
callbackURL: string;
|
|
304
304
|
};
|
|
305
305
|
fetchOptions?: FetchOptions | undefined;
|
|
306
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
306
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<never, {
|
|
307
307
|
code?: string | undefined;
|
|
308
308
|
message?: string | undefined;
|
|
309
309
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
310
310
|
};
|
|
311
311
|
} & {
|
|
312
|
-
listSessions: <FetchOptions extends
|
|
312
|
+
listSessions: <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth153.Prettify<{
|
|
313
313
|
query?: Record<string, any> | undefined;
|
|
314
314
|
fetchOptions?: FetchOptions | undefined;
|
|
315
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<
|
|
315
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<better_auth153.Prettify<{
|
|
316
316
|
id: string;
|
|
317
317
|
createdAt: Date;
|
|
318
318
|
updatedAt: Date;
|
|
@@ -326,40 +326,40 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
326
326
|
message?: string | undefined;
|
|
327
327
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
328
328
|
} & {
|
|
329
|
-
revokeSession: <FetchOptions extends
|
|
329
|
+
revokeSession: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
330
330
|
token: string;
|
|
331
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
331
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
332
332
|
token: string;
|
|
333
333
|
} & {
|
|
334
334
|
fetchOptions?: FetchOptions | undefined;
|
|
335
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
335
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
336
336
|
status: boolean;
|
|
337
337
|
}, {
|
|
338
338
|
code?: string | undefined;
|
|
339
339
|
message?: string | undefined;
|
|
340
340
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
341
341
|
} & {
|
|
342
|
-
revokeSessions: <FetchOptions extends
|
|
342
|
+
revokeSessions: <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth153.Prettify<{
|
|
343
343
|
query?: Record<string, any> | undefined;
|
|
344
344
|
fetchOptions?: FetchOptions | undefined;
|
|
345
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<
|
|
345
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
346
346
|
status: boolean;
|
|
347
347
|
}, {
|
|
348
348
|
code?: string | undefined;
|
|
349
349
|
message?: string | undefined;
|
|
350
350
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
351
351
|
} & {
|
|
352
|
-
revokeOtherSessions: <FetchOptions extends
|
|
352
|
+
revokeOtherSessions: <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth153.Prettify<{
|
|
353
353
|
query?: Record<string, any> | undefined;
|
|
354
354
|
fetchOptions?: FetchOptions | undefined;
|
|
355
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<
|
|
355
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
356
356
|
status: boolean;
|
|
357
357
|
}, {
|
|
358
358
|
code?: string | undefined;
|
|
359
359
|
message?: string | undefined;
|
|
360
360
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
361
361
|
} & {
|
|
362
|
-
linkSocial: <FetchOptions extends
|
|
362
|
+
linkSocial: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
363
363
|
provider: unknown;
|
|
364
364
|
callbackURL?: string | undefined;
|
|
365
365
|
idToken?: {
|
|
@@ -374,7 +374,7 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
374
374
|
errorCallbackURL?: string | undefined;
|
|
375
375
|
disableRedirect?: boolean | undefined;
|
|
376
376
|
additionalData?: Record<string, any> | undefined;
|
|
377
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
377
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
378
378
|
provider: unknown;
|
|
379
379
|
callbackURL?: string | undefined;
|
|
380
380
|
idToken?: {
|
|
@@ -391,7 +391,7 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
391
391
|
additionalData?: Record<string, any> | undefined;
|
|
392
392
|
} & {
|
|
393
393
|
fetchOptions?: FetchOptions | undefined;
|
|
394
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
394
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
395
395
|
url: string;
|
|
396
396
|
redirect: boolean;
|
|
397
397
|
}, {
|
|
@@ -399,10 +399,10 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
399
399
|
message?: string | undefined;
|
|
400
400
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
401
401
|
} & {
|
|
402
|
-
listAccounts: <FetchOptions extends
|
|
402
|
+
listAccounts: <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth153.Prettify<{
|
|
403
403
|
query?: Record<string, any> | undefined;
|
|
404
404
|
fetchOptions?: FetchOptions | undefined;
|
|
405
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<
|
|
405
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
406
406
|
id: string;
|
|
407
407
|
providerId: string;
|
|
408
408
|
createdAt: Date;
|
|
@@ -416,16 +416,16 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
416
416
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
417
417
|
} & {
|
|
418
418
|
deleteUser: {
|
|
419
|
-
callback: <FetchOptions extends
|
|
419
|
+
callback: <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<{
|
|
420
420
|
token: string;
|
|
421
421
|
callbackURL?: string | undefined;
|
|
422
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
422
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
423
423
|
query: {
|
|
424
424
|
token: string;
|
|
425
425
|
callbackURL?: string | undefined;
|
|
426
426
|
};
|
|
427
427
|
fetchOptions?: FetchOptions | undefined;
|
|
428
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
428
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
429
429
|
success: boolean;
|
|
430
430
|
message: string;
|
|
431
431
|
}, {
|
|
@@ -434,32 +434,32 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
434
434
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
435
435
|
};
|
|
436
436
|
} & {
|
|
437
|
-
unlinkAccount: <FetchOptions extends
|
|
437
|
+
unlinkAccount: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
438
438
|
providerId: string;
|
|
439
439
|
accountId?: string | undefined;
|
|
440
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
440
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
441
441
|
providerId: string;
|
|
442
442
|
accountId?: string | undefined;
|
|
443
443
|
} & {
|
|
444
444
|
fetchOptions?: FetchOptions | undefined;
|
|
445
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
445
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
446
446
|
status: boolean;
|
|
447
447
|
}, {
|
|
448
448
|
code?: string | undefined;
|
|
449
449
|
message?: string | undefined;
|
|
450
450
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
451
451
|
} & {
|
|
452
|
-
refreshToken: <FetchOptions extends
|
|
452
|
+
refreshToken: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
453
453
|
providerId: string;
|
|
454
454
|
accountId?: string | undefined;
|
|
455
455
|
userId?: string | undefined;
|
|
456
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
456
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
457
457
|
providerId: string;
|
|
458
458
|
accountId?: string | undefined;
|
|
459
459
|
userId?: string | undefined;
|
|
460
460
|
} & {
|
|
461
461
|
fetchOptions?: FetchOptions | undefined;
|
|
462
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
462
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
463
463
|
accessToken: string | undefined;
|
|
464
464
|
refreshToken: string | undefined;
|
|
465
465
|
accessTokenExpiresAt: Date | undefined;
|
|
@@ -473,17 +473,17 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
473
473
|
message?: string | undefined;
|
|
474
474
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
475
475
|
} & {
|
|
476
|
-
getAccessToken: <FetchOptions extends
|
|
476
|
+
getAccessToken: <FetchOptions extends better_auth153.ClientFetchOption<Partial<{
|
|
477
477
|
providerId: string;
|
|
478
478
|
accountId?: string | undefined;
|
|
479
479
|
userId?: string | undefined;
|
|
480
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0:
|
|
480
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth153.Prettify<{
|
|
481
481
|
providerId: string;
|
|
482
482
|
accountId?: string | undefined;
|
|
483
483
|
userId?: string | undefined;
|
|
484
484
|
} & {
|
|
485
485
|
fetchOptions?: FetchOptions | undefined;
|
|
486
|
-
}>, data_1?: FetchOptions | undefined) => Promise<
|
|
486
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
487
487
|
accessToken: string;
|
|
488
488
|
accessTokenExpiresAt: Date | undefined;
|
|
489
489
|
scopes: string[];
|
|
@@ -493,31 +493,31 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
493
493
|
message?: string | undefined;
|
|
494
494
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
495
495
|
} & {
|
|
496
|
-
accountInfo: <FetchOptions extends
|
|
496
|
+
accountInfo: <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<{
|
|
497
497
|
accountId?: string | undefined;
|
|
498
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?:
|
|
498
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth153.Prettify<{
|
|
499
499
|
query?: {
|
|
500
500
|
accountId?: string | undefined;
|
|
501
501
|
} | undefined;
|
|
502
502
|
fetchOptions?: FetchOptions | undefined;
|
|
503
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<
|
|
504
|
-
user:
|
|
503
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
504
|
+
user: better_auth153.OAuth2UserInfo;
|
|
505
505
|
data: Record<string, any>;
|
|
506
506
|
}, {
|
|
507
507
|
code?: string | undefined;
|
|
508
508
|
message?: string | undefined;
|
|
509
509
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
510
510
|
} & {
|
|
511
|
-
getSession: <FetchOptions extends
|
|
511
|
+
getSession: <FetchOptions extends better_auth153.ClientFetchOption<never, Partial<{
|
|
512
512
|
disableCookieCache?: unknown;
|
|
513
513
|
disableRefresh?: unknown;
|
|
514
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?:
|
|
514
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth153.Prettify<{
|
|
515
515
|
query?: {
|
|
516
516
|
disableCookieCache?: unknown;
|
|
517
517
|
disableRefresh?: unknown;
|
|
518
518
|
} | undefined;
|
|
519
519
|
fetchOptions?: FetchOptions | undefined;
|
|
520
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<
|
|
520
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch89.BetterFetchResponse<{
|
|
521
521
|
user: {
|
|
522
522
|
id: string;
|
|
523
523
|
createdAt: Date;
|
|
@@ -566,9 +566,9 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
566
566
|
} | null;
|
|
567
567
|
isPending: boolean;
|
|
568
568
|
isRefetching: boolean;
|
|
569
|
-
error:
|
|
569
|
+
error: _better_fetch_fetch89.BetterFetchError | null;
|
|
570
570
|
refetch: (queryParams?: {
|
|
571
|
-
query?:
|
|
571
|
+
query?: better_auth153.SessionQueryParams;
|
|
572
572
|
} | undefined) => Promise<void>;
|
|
573
573
|
};
|
|
574
574
|
$Infer: {
|
|
@@ -594,21 +594,21 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
594
594
|
};
|
|
595
595
|
};
|
|
596
596
|
};
|
|
597
|
-
$fetch:
|
|
598
|
-
plugins: (
|
|
597
|
+
$fetch: _better_fetch_fetch89.BetterFetch<{
|
|
598
|
+
plugins: (_better_fetch_fetch89.BetterFetchPlugin | {
|
|
599
599
|
id: string;
|
|
600
600
|
name: string;
|
|
601
601
|
hooks: {
|
|
602
|
-
onSuccess(context:
|
|
602
|
+
onSuccess(context: _better_fetch_fetch89.SuccessContext<any>): void;
|
|
603
603
|
};
|
|
604
604
|
} | {
|
|
605
605
|
id: string;
|
|
606
606
|
name: string;
|
|
607
607
|
hooks: {
|
|
608
|
-
onSuccess: ((context:
|
|
609
|
-
onError: ((context:
|
|
610
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
611
|
-
onResponse: ((context:
|
|
608
|
+
onSuccess: ((context: _better_fetch_fetch89.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
609
|
+
onError: ((context: _better_fetch_fetch89.ErrorContext) => Promise<void> | void) | undefined;
|
|
610
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch89.RequestContext<T>) => Promise<_better_fetch_fetch89.RequestContext | void> | _better_fetch_fetch89.RequestContext | void) | undefined;
|
|
611
|
+
onResponse: ((context: _better_fetch_fetch89.ResponseContext) => Promise<Response | void | _better_fetch_fetch89.ResponseContext> | Response | _better_fetch_fetch89.ResponseContext | void) | undefined;
|
|
612
612
|
};
|
|
613
613
|
})[];
|
|
614
614
|
cache?: RequestCache | undefined;
|
|
@@ -628,12 +628,12 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
628
628
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
629
629
|
signal?: (AbortSignal | null) | undefined;
|
|
630
630
|
window?: null | undefined;
|
|
631
|
-
onRetry?: ((response:
|
|
631
|
+
onRetry?: ((response: _better_fetch_fetch89.ResponseContext) => Promise<void> | void) | undefined;
|
|
632
632
|
hookOptions?: {
|
|
633
633
|
cloneResponse?: boolean;
|
|
634
634
|
} | undefined;
|
|
635
635
|
timeout?: number | undefined;
|
|
636
|
-
customFetchImpl:
|
|
636
|
+
customFetchImpl: _better_fetch_fetch89.FetchEsque;
|
|
637
637
|
baseURL: string;
|
|
638
638
|
throw?: boolean | undefined;
|
|
639
639
|
auth?: ({
|
|
@@ -653,10 +653,10 @@ declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
|
653
653
|
params?: any;
|
|
654
654
|
duplex?: "full" | "half" | undefined;
|
|
655
655
|
jsonParser: (text: string) => Promise<any> | any;
|
|
656
|
-
retry?:
|
|
656
|
+
retry?: _better_fetch_fetch89.RetryOptions | undefined;
|
|
657
657
|
retryAttempt?: number | undefined;
|
|
658
|
-
output?: (
|
|
659
|
-
errorSchema?:
|
|
658
|
+
output?: (_better_fetch_fetch89.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
659
|
+
errorSchema?: _better_fetch_fetch89.StandardSchemaV1 | undefined;
|
|
660
660
|
disableValidation?: boolean | undefined;
|
|
661
661
|
disableSignal?: boolean | undefined;
|
|
662
662
|
}, unknown, unknown, {}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Session, User } from "better-auth/types";
|
|
2
|
+
import { BetterFetchError } from "@better-fetch/fetch";
|
|
3
|
+
|
|
4
|
+
//#region src/core/better-auth-types.d.ts
|
|
5
|
+
type BetterAuthSession = Session;
|
|
6
|
+
type BetterAuthUser = User;
|
|
7
|
+
type BetterAuthErrorResponse = BetterFetchError;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { BetterAuthSession as n, BetterAuthUser as r, BetterAuthErrorResponse as t };
|