@neondatabase/neon-js 0.1.0-alpha.8 → 0.1.0-beta.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/README.md +84 -90
- package/dist/auth/index.d.mts +1 -0
- package/dist/auth/index.mjs +3 -0
- package/dist/auth/next/index.d.mts +1 -0
- package/dist/auth/next/index.mjs +3 -0
- package/dist/auth/react/adapters/index.d.mts +1 -0
- package/dist/auth/react/adapters/index.mjs +3 -0
- package/dist/auth/react/index.d.mts +1 -0
- package/dist/auth/react/index.mjs +3 -0
- package/dist/auth/react/ui/index.d.mts +2 -0
- package/dist/auth/react/ui/index.mjs +4 -0
- package/dist/auth/react/ui/server.d.mts +1 -0
- package/dist/auth/react/ui/server.mjs +3 -0
- package/dist/auth/vanilla/adapters/index.d.mts +1 -0
- package/dist/auth/vanilla/adapters/index.mjs +3 -0
- package/dist/auth/vanilla/index.d.mts +1 -0
- package/dist/auth/vanilla/index.mjs +3 -0
- package/dist/index.d.mts +18 -1012
- package/dist/index.mjs +6 -6
- package/dist/package.json +76 -19
- package/dist/ui/css.css +2 -0
- package/dist/ui/css.d.ts +1 -0
- package/dist/ui/tailwind.css +6 -0
- package/dist/ui/theme.css +125 -0
- package/package.json +76 -19
- package/dist/chunk-CYrQad0d.mjs +0 -25
package/dist/index.d.mts
CHANGED
|
@@ -1,1005 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import * as _better_fetch_fetch0 from "@better-fetch/fetch";
|
|
6
|
-
import * as nanostores0 from "nanostores";
|
|
7
|
-
import * as _supabase_auth_js0 from "@supabase/auth-js";
|
|
8
|
-
import { AuthApiError, AuthClient as AuthClient$1, AuthError, JwtHeader, JwtPayload, Session, User, isAuthError } from "@supabase/auth-js";
|
|
9
|
-
import { PostgrestClient } from "@supabase/postgrest-js";
|
|
1
|
+
import { NeonAuth, NeonAuth as NeonAuth$1, NeonAuthAdapter, NeonAuthAdapter as NeonAuthAdapter$1, NeonAuthConfig, NeonAuthPublicApi, NeonAuthPublicApi as NeonAuthPublicApi$1, ReactBetterAuthClient, VanillaBetterAuthClient } from "@neondatabase/auth";
|
|
2
|
+
import { BetterAuthVanillaAdapter, BetterAuthVanillaAdapterInstance, BetterAuthVanillaAdapterInstance as BetterAuthVanillaAdapterInstance$1, BetterAuthVanillaAdapterOptions, SupabaseAuthAdapter, SupabaseAuthAdapterInstance, SupabaseAuthAdapterInstance as SupabaseAuthAdapterInstance$1, SupabaseAuthAdapterOptions } from "@neondatabase/auth/vanilla/adapters";
|
|
3
|
+
import { BetterAuthReactAdapterInstance } from "@neondatabase/auth/react/adapters";
|
|
4
|
+
import { AuthRequiredError, DefaultSchemaName, DefaultSchemaName as DefaultSchemaName$1, NeonPostgrestClient, NeonPostgrestClientConstructorOptions, fetchWithToken } from "@neondatabase/postgrest-js";
|
|
10
5
|
|
|
11
|
-
//#region ../neon-auth/src/core/adapter-core.d.ts
|
|
12
|
-
interface NeonAuthAdapterCoreAuthOptions extends Omit<BetterAuthClientOptions, 'plugins'> {}
|
|
13
|
-
declare abstract class NeonAuthAdapterCore {
|
|
14
|
-
protected betterAuthOptions: BetterAuthClientOptions;
|
|
15
|
-
/**
|
|
16
|
-
* Better Auth adapter implementing the NeonAuthClient interface.
|
|
17
|
-
* See CLAUDE.md for architecture details and API mappings.
|
|
18
|
-
*/
|
|
19
|
-
constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
|
|
20
|
-
abstract getBetterAuthInstance?(): AuthClient<BetterAuthClientOptions> | ReturnType<typeof createAuthClient$1>;
|
|
21
|
-
abstract getJWTToken(): Promise<string | null>;
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region ../neon-auth/src/adapters/better-auth-react/better-auth-react-adapter.d.ts
|
|
25
|
-
type BetterAuthReactAdapterOptions = Omit<NeonAuthAdapterCoreAuthOptions, 'baseURL'>;
|
|
26
|
-
/**
|
|
27
|
-
* Internal implementation class - use BetterAuthReactAdapter factory function instead
|
|
28
|
-
*/
|
|
29
|
-
declare class BetterAuthReactAdapterImpl extends NeonAuthAdapterCore {
|
|
30
|
-
private _betterAuth;
|
|
31
|
-
constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
|
|
32
|
-
getBetterAuthInstance(): {
|
|
33
|
-
signIn: {
|
|
34
|
-
social: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
35
|
-
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";
|
|
36
|
-
callbackURL?: string | undefined;
|
|
37
|
-
newUserCallbackURL?: string | undefined;
|
|
38
|
-
errorCallbackURL?: string | undefined;
|
|
39
|
-
disableRedirect?: boolean | undefined;
|
|
40
|
-
idToken?: {
|
|
41
|
-
token: string;
|
|
42
|
-
nonce?: string | undefined;
|
|
43
|
-
accessToken?: string | undefined;
|
|
44
|
-
refreshToken?: string | undefined;
|
|
45
|
-
expiresAt?: number | undefined;
|
|
46
|
-
} | undefined;
|
|
47
|
-
scopes?: string[] | undefined;
|
|
48
|
-
requestSignUp?: boolean | undefined;
|
|
49
|
-
loginHint?: string | undefined;
|
|
50
|
-
additionalData?: Record<string, any> | undefined;
|
|
51
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
52
|
-
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";
|
|
53
|
-
callbackURL?: string | undefined;
|
|
54
|
-
newUserCallbackURL?: string | undefined;
|
|
55
|
-
errorCallbackURL?: string | undefined;
|
|
56
|
-
disableRedirect?: boolean | undefined;
|
|
57
|
-
idToken?: {
|
|
58
|
-
token: string;
|
|
59
|
-
nonce?: string | undefined;
|
|
60
|
-
accessToken?: string | undefined;
|
|
61
|
-
refreshToken?: string | undefined;
|
|
62
|
-
expiresAt?: number | undefined;
|
|
63
|
-
} | undefined;
|
|
64
|
-
scopes?: string[] | undefined;
|
|
65
|
-
requestSignUp?: boolean | undefined;
|
|
66
|
-
loginHint?: string | undefined;
|
|
67
|
-
additionalData?: Record<string, any> | undefined;
|
|
68
|
-
} & {
|
|
69
|
-
fetchOptions?: FetchOptions | undefined;
|
|
70
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<NonNullable<{
|
|
71
|
-
redirect: boolean;
|
|
72
|
-
url: string;
|
|
73
|
-
} | {
|
|
74
|
-
redirect: boolean;
|
|
75
|
-
token: string;
|
|
76
|
-
url: undefined;
|
|
77
|
-
user: {
|
|
78
|
-
id: string;
|
|
79
|
-
createdAt: Date;
|
|
80
|
-
updatedAt: Date;
|
|
81
|
-
email: string;
|
|
82
|
-
emailVerified: boolean;
|
|
83
|
-
name: string;
|
|
84
|
-
image?: string | null | undefined | undefined;
|
|
85
|
-
};
|
|
86
|
-
}>, {
|
|
87
|
-
code?: string | undefined;
|
|
88
|
-
message?: string | undefined;
|
|
89
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
90
|
-
};
|
|
91
|
-
} & {
|
|
92
|
-
signOut: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_react0.Prettify<{
|
|
93
|
-
query?: Record<string, any> | undefined;
|
|
94
|
-
fetchOptions?: FetchOptions | undefined;
|
|
95
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
96
|
-
success: boolean;
|
|
97
|
-
}, {
|
|
98
|
-
code?: string | undefined;
|
|
99
|
-
message?: string | undefined;
|
|
100
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
101
|
-
} & {
|
|
102
|
-
signUp: {
|
|
103
|
-
email: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
104
|
-
name: string;
|
|
105
|
-
email: string;
|
|
106
|
-
password: string;
|
|
107
|
-
image?: string | undefined;
|
|
108
|
-
callbackURL?: string | undefined;
|
|
109
|
-
rememberMe?: boolean | undefined;
|
|
110
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
111
|
-
email: string;
|
|
112
|
-
name: string;
|
|
113
|
-
password: string;
|
|
114
|
-
image?: string | undefined;
|
|
115
|
-
callbackURL?: string | undefined;
|
|
116
|
-
fetchOptions?: FetchOptions | undefined;
|
|
117
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<NonNullable<{
|
|
118
|
-
token: null;
|
|
119
|
-
user: {
|
|
120
|
-
id: string;
|
|
121
|
-
createdAt: Date;
|
|
122
|
-
updatedAt: Date;
|
|
123
|
-
email: string;
|
|
124
|
-
emailVerified: boolean;
|
|
125
|
-
name: string;
|
|
126
|
-
image?: string | null | undefined | undefined;
|
|
127
|
-
};
|
|
128
|
-
} | {
|
|
129
|
-
token: string;
|
|
130
|
-
user: {
|
|
131
|
-
id: string;
|
|
132
|
-
createdAt: Date;
|
|
133
|
-
updatedAt: Date;
|
|
134
|
-
email: string;
|
|
135
|
-
emailVerified: boolean;
|
|
136
|
-
name: string;
|
|
137
|
-
image?: string | null | undefined | undefined;
|
|
138
|
-
};
|
|
139
|
-
}>, {
|
|
140
|
-
code?: string | undefined;
|
|
141
|
-
message?: string | undefined;
|
|
142
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
143
|
-
};
|
|
144
|
-
} & {
|
|
145
|
-
signIn: {
|
|
146
|
-
email: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
147
|
-
email: string;
|
|
148
|
-
password: string;
|
|
149
|
-
callbackURL?: string | undefined;
|
|
150
|
-
rememberMe?: boolean | undefined;
|
|
151
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
152
|
-
email: string;
|
|
153
|
-
password: string;
|
|
154
|
-
callbackURL?: string | undefined;
|
|
155
|
-
rememberMe?: boolean | undefined;
|
|
156
|
-
} & {
|
|
157
|
-
fetchOptions?: FetchOptions | undefined;
|
|
158
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
159
|
-
redirect: boolean;
|
|
160
|
-
token: string;
|
|
161
|
-
url?: string | undefined;
|
|
162
|
-
user: {
|
|
163
|
-
id: string;
|
|
164
|
-
createdAt: Date;
|
|
165
|
-
updatedAt: Date;
|
|
166
|
-
email: string;
|
|
167
|
-
emailVerified: boolean;
|
|
168
|
-
name: string;
|
|
169
|
-
image?: string | null | undefined | undefined;
|
|
170
|
-
};
|
|
171
|
-
}, {
|
|
172
|
-
code?: string | undefined;
|
|
173
|
-
message?: string | undefined;
|
|
174
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
175
|
-
};
|
|
176
|
-
} & {
|
|
177
|
-
resetPassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
178
|
-
newPassword: string;
|
|
179
|
-
token?: string | undefined;
|
|
180
|
-
}> & Record<string, any>, Partial<{
|
|
181
|
-
token?: string | undefined;
|
|
182
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
183
|
-
newPassword: string;
|
|
184
|
-
token?: string | undefined;
|
|
185
|
-
} & {
|
|
186
|
-
fetchOptions?: FetchOptions | undefined;
|
|
187
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
188
|
-
status: boolean;
|
|
189
|
-
}, {
|
|
190
|
-
code?: string | undefined;
|
|
191
|
-
message?: string | undefined;
|
|
192
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
193
|
-
} & {
|
|
194
|
-
verifyEmail: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
|
|
195
|
-
token: string;
|
|
196
|
-
callbackURL?: string | undefined;
|
|
197
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
198
|
-
query: {
|
|
199
|
-
token: string;
|
|
200
|
-
callbackURL?: string | undefined;
|
|
201
|
-
};
|
|
202
|
-
fetchOptions?: FetchOptions | undefined;
|
|
203
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<NonNullable<void | {
|
|
204
|
-
status: boolean;
|
|
205
|
-
}>, {
|
|
206
|
-
code?: string | undefined;
|
|
207
|
-
message?: string | undefined;
|
|
208
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
209
|
-
} & {
|
|
210
|
-
sendVerificationEmail: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
211
|
-
email: string;
|
|
212
|
-
callbackURL?: string | undefined;
|
|
213
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
214
|
-
email: string;
|
|
215
|
-
callbackURL?: string | undefined;
|
|
216
|
-
} & {
|
|
217
|
-
fetchOptions?: FetchOptions | undefined;
|
|
218
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
219
|
-
status: boolean;
|
|
220
|
-
}, {
|
|
221
|
-
code?: string | undefined;
|
|
222
|
-
message?: string | undefined;
|
|
223
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
224
|
-
} & {
|
|
225
|
-
changeEmail: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
226
|
-
newEmail: string;
|
|
227
|
-
callbackURL?: string | undefined;
|
|
228
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
229
|
-
newEmail: string;
|
|
230
|
-
callbackURL?: string | undefined;
|
|
231
|
-
} & {
|
|
232
|
-
fetchOptions?: FetchOptions | undefined;
|
|
233
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
234
|
-
status: boolean;
|
|
235
|
-
}, {
|
|
236
|
-
code?: string | undefined;
|
|
237
|
-
message?: string | undefined;
|
|
238
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
239
|
-
} & {
|
|
240
|
-
changePassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
241
|
-
newPassword: string;
|
|
242
|
-
currentPassword: string;
|
|
243
|
-
revokeOtherSessions?: boolean | undefined;
|
|
244
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
245
|
-
newPassword: string;
|
|
246
|
-
currentPassword: string;
|
|
247
|
-
revokeOtherSessions?: boolean | undefined;
|
|
248
|
-
} & {
|
|
249
|
-
fetchOptions?: FetchOptions | undefined;
|
|
250
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
251
|
-
token: string | null;
|
|
252
|
-
user: {
|
|
253
|
-
id: string;
|
|
254
|
-
email: string;
|
|
255
|
-
name: string;
|
|
256
|
-
image: string | null | undefined;
|
|
257
|
-
emailVerified: boolean;
|
|
258
|
-
createdAt: Date;
|
|
259
|
-
updatedAt: Date;
|
|
260
|
-
};
|
|
261
|
-
}, {
|
|
262
|
-
code?: string | undefined;
|
|
263
|
-
message?: string | undefined;
|
|
264
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
265
|
-
} & {
|
|
266
|
-
updateUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<Partial<{}> & {
|
|
267
|
-
name?: string | undefined;
|
|
268
|
-
image?: string | undefined;
|
|
269
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_react0.Prettify<{
|
|
270
|
-
image?: (string | null) | undefined;
|
|
271
|
-
name?: string | undefined;
|
|
272
|
-
fetchOptions?: FetchOptions | undefined;
|
|
273
|
-
} & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
274
|
-
status: boolean;
|
|
275
|
-
}, {
|
|
276
|
-
code?: string | undefined;
|
|
277
|
-
message?: string | undefined;
|
|
278
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
279
|
-
} & {
|
|
280
|
-
deleteUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
281
|
-
callbackURL?: string | undefined;
|
|
282
|
-
password?: string | undefined;
|
|
283
|
-
token?: string | undefined;
|
|
284
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_react0.Prettify<{
|
|
285
|
-
callbackURL?: string | undefined;
|
|
286
|
-
password?: string | undefined;
|
|
287
|
-
token?: string | undefined;
|
|
288
|
-
} & {
|
|
289
|
-
fetchOptions?: FetchOptions | undefined;
|
|
290
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
291
|
-
success: boolean;
|
|
292
|
-
message: string;
|
|
293
|
-
}, {
|
|
294
|
-
code?: string | undefined;
|
|
295
|
-
message?: string | undefined;
|
|
296
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
297
|
-
} & {
|
|
298
|
-
requestPasswordReset: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
299
|
-
email: string;
|
|
300
|
-
redirectTo?: string | undefined;
|
|
301
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
302
|
-
email: string;
|
|
303
|
-
redirectTo?: string | undefined;
|
|
304
|
-
} & {
|
|
305
|
-
fetchOptions?: FetchOptions | undefined;
|
|
306
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
307
|
-
status: boolean;
|
|
308
|
-
message: string;
|
|
309
|
-
}, {
|
|
310
|
-
code?: string | undefined;
|
|
311
|
-
message?: string | undefined;
|
|
312
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
313
|
-
} & {
|
|
314
|
-
resetPassword: {
|
|
315
|
-
":token": <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
|
|
316
|
-
callbackURL: string;
|
|
317
|
-
}> & Record<string, any>, {
|
|
318
|
-
token: string;
|
|
319
|
-
}>>(data_0: better_auth_react0.Prettify<{
|
|
320
|
-
query: {
|
|
321
|
-
callbackURL: string;
|
|
322
|
-
};
|
|
323
|
-
fetchOptions?: FetchOptions | undefined;
|
|
324
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<never, {
|
|
325
|
-
code?: string | undefined;
|
|
326
|
-
message?: string | undefined;
|
|
327
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
328
|
-
};
|
|
329
|
-
} & {
|
|
330
|
-
listSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_react0.Prettify<{
|
|
331
|
-
query?: Record<string, any> | undefined;
|
|
332
|
-
fetchOptions?: FetchOptions | undefined;
|
|
333
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<better_auth_react0.Prettify<{
|
|
334
|
-
id: string;
|
|
335
|
-
createdAt: Date;
|
|
336
|
-
updatedAt: Date;
|
|
337
|
-
userId: string;
|
|
338
|
-
expiresAt: Date;
|
|
339
|
-
token: string;
|
|
340
|
-
ipAddress?: string | null | undefined | undefined;
|
|
341
|
-
userAgent?: string | null | undefined | undefined;
|
|
342
|
-
}>[], {
|
|
343
|
-
code?: string | undefined;
|
|
344
|
-
message?: string | undefined;
|
|
345
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
346
|
-
} & {
|
|
347
|
-
revokeSession: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
348
|
-
token: string;
|
|
349
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
350
|
-
token: string;
|
|
351
|
-
} & {
|
|
352
|
-
fetchOptions?: FetchOptions | undefined;
|
|
353
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
354
|
-
status: boolean;
|
|
355
|
-
}, {
|
|
356
|
-
code?: string | undefined;
|
|
357
|
-
message?: string | undefined;
|
|
358
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
359
|
-
} & {
|
|
360
|
-
revokeSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_react0.Prettify<{
|
|
361
|
-
query?: Record<string, any> | undefined;
|
|
362
|
-
fetchOptions?: FetchOptions | undefined;
|
|
363
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
364
|
-
status: boolean;
|
|
365
|
-
}, {
|
|
366
|
-
code?: string | undefined;
|
|
367
|
-
message?: string | undefined;
|
|
368
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
369
|
-
} & {
|
|
370
|
-
revokeOtherSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_react0.Prettify<{
|
|
371
|
-
query?: Record<string, any> | undefined;
|
|
372
|
-
fetchOptions?: FetchOptions | undefined;
|
|
373
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
374
|
-
status: boolean;
|
|
375
|
-
}, {
|
|
376
|
-
code?: string | undefined;
|
|
377
|
-
message?: string | undefined;
|
|
378
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
379
|
-
} & {
|
|
380
|
-
linkSocial: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
381
|
-
provider: unknown;
|
|
382
|
-
callbackURL?: string | undefined;
|
|
383
|
-
idToken?: {
|
|
384
|
-
token: string;
|
|
385
|
-
nonce?: string | undefined;
|
|
386
|
-
accessToken?: string | undefined;
|
|
387
|
-
refreshToken?: string | undefined;
|
|
388
|
-
scopes?: string[] | undefined;
|
|
389
|
-
} | undefined;
|
|
390
|
-
requestSignUp?: boolean | undefined;
|
|
391
|
-
scopes?: string[] | undefined;
|
|
392
|
-
errorCallbackURL?: string | undefined;
|
|
393
|
-
disableRedirect?: boolean | undefined;
|
|
394
|
-
additionalData?: Record<string, any> | undefined;
|
|
395
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
396
|
-
provider: unknown;
|
|
397
|
-
callbackURL?: string | undefined;
|
|
398
|
-
idToken?: {
|
|
399
|
-
token: string;
|
|
400
|
-
nonce?: string | undefined;
|
|
401
|
-
accessToken?: string | undefined;
|
|
402
|
-
refreshToken?: string | undefined;
|
|
403
|
-
scopes?: string[] | undefined;
|
|
404
|
-
} | undefined;
|
|
405
|
-
requestSignUp?: boolean | undefined;
|
|
406
|
-
scopes?: string[] | undefined;
|
|
407
|
-
errorCallbackURL?: string | undefined;
|
|
408
|
-
disableRedirect?: boolean | undefined;
|
|
409
|
-
additionalData?: Record<string, any> | undefined;
|
|
410
|
-
} & {
|
|
411
|
-
fetchOptions?: FetchOptions | undefined;
|
|
412
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
413
|
-
url: string;
|
|
414
|
-
redirect: boolean;
|
|
415
|
-
}, {
|
|
416
|
-
code?: string | undefined;
|
|
417
|
-
message?: string | undefined;
|
|
418
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
419
|
-
} & {
|
|
420
|
-
listAccounts: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_react0.Prettify<{
|
|
421
|
-
query?: Record<string, any> | undefined;
|
|
422
|
-
fetchOptions?: FetchOptions | undefined;
|
|
423
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
424
|
-
id: string;
|
|
425
|
-
providerId: string;
|
|
426
|
-
createdAt: Date;
|
|
427
|
-
updatedAt: Date;
|
|
428
|
-
accountId: string;
|
|
429
|
-
userId: string;
|
|
430
|
-
scopes: string[];
|
|
431
|
-
}[], {
|
|
432
|
-
code?: string | undefined;
|
|
433
|
-
message?: string | undefined;
|
|
434
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
435
|
-
} & {
|
|
436
|
-
deleteUser: {
|
|
437
|
-
callback: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
|
|
438
|
-
token: string;
|
|
439
|
-
callbackURL?: string | undefined;
|
|
440
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
441
|
-
query: {
|
|
442
|
-
token: string;
|
|
443
|
-
callbackURL?: string | undefined;
|
|
444
|
-
};
|
|
445
|
-
fetchOptions?: FetchOptions | undefined;
|
|
446
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
447
|
-
success: boolean;
|
|
448
|
-
message: string;
|
|
449
|
-
}, {
|
|
450
|
-
code?: string | undefined;
|
|
451
|
-
message?: string | undefined;
|
|
452
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
453
|
-
};
|
|
454
|
-
} & {
|
|
455
|
-
unlinkAccount: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
456
|
-
providerId: string;
|
|
457
|
-
accountId?: string | undefined;
|
|
458
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
459
|
-
providerId: string;
|
|
460
|
-
accountId?: string | undefined;
|
|
461
|
-
} & {
|
|
462
|
-
fetchOptions?: FetchOptions | undefined;
|
|
463
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
464
|
-
status: boolean;
|
|
465
|
-
}, {
|
|
466
|
-
code?: string | undefined;
|
|
467
|
-
message?: string | undefined;
|
|
468
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
469
|
-
} & {
|
|
470
|
-
refreshToken: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
471
|
-
providerId: string;
|
|
472
|
-
accountId?: string | undefined;
|
|
473
|
-
userId?: string | undefined;
|
|
474
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
475
|
-
providerId: string;
|
|
476
|
-
accountId?: string | undefined;
|
|
477
|
-
userId?: string | undefined;
|
|
478
|
-
} & {
|
|
479
|
-
fetchOptions?: FetchOptions | undefined;
|
|
480
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
481
|
-
accessToken: string | undefined;
|
|
482
|
-
refreshToken: string | undefined;
|
|
483
|
-
accessTokenExpiresAt: Date | undefined;
|
|
484
|
-
refreshTokenExpiresAt: Date | undefined;
|
|
485
|
-
scope: string | null | undefined;
|
|
486
|
-
idToken: string | null | undefined;
|
|
487
|
-
providerId: string;
|
|
488
|
-
accountId: string;
|
|
489
|
-
}, {
|
|
490
|
-
code?: string | undefined;
|
|
491
|
-
message?: string | undefined;
|
|
492
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
493
|
-
} & {
|
|
494
|
-
getAccessToken: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
495
|
-
providerId: string;
|
|
496
|
-
accountId?: string | undefined;
|
|
497
|
-
userId?: string | undefined;
|
|
498
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_react0.Prettify<{
|
|
499
|
-
providerId: string;
|
|
500
|
-
accountId?: string | undefined;
|
|
501
|
-
userId?: string | undefined;
|
|
502
|
-
} & {
|
|
503
|
-
fetchOptions?: FetchOptions | undefined;
|
|
504
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
505
|
-
accessToken: string;
|
|
506
|
-
accessTokenExpiresAt: Date | undefined;
|
|
507
|
-
scopes: string[];
|
|
508
|
-
idToken: string | undefined;
|
|
509
|
-
}, {
|
|
510
|
-
code?: string | undefined;
|
|
511
|
-
message?: string | undefined;
|
|
512
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
513
|
-
} & {
|
|
514
|
-
accountInfo: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
|
|
515
|
-
accountId?: string | undefined;
|
|
516
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_react0.Prettify<{
|
|
517
|
-
query?: {
|
|
518
|
-
accountId?: string | undefined;
|
|
519
|
-
} | undefined;
|
|
520
|
-
fetchOptions?: FetchOptions | undefined;
|
|
521
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
522
|
-
user: better_auth0.OAuth2UserInfo;
|
|
523
|
-
data: Record<string, any>;
|
|
524
|
-
}, {
|
|
525
|
-
code?: string | undefined;
|
|
526
|
-
message?: string | undefined;
|
|
527
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
528
|
-
} & {
|
|
529
|
-
getSession: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
|
|
530
|
-
disableCookieCache?: unknown;
|
|
531
|
-
disableRefresh?: unknown;
|
|
532
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_react0.Prettify<{
|
|
533
|
-
query?: {
|
|
534
|
-
disableCookieCache?: unknown;
|
|
535
|
-
disableRefresh?: unknown;
|
|
536
|
-
} | undefined;
|
|
537
|
-
fetchOptions?: FetchOptions | undefined;
|
|
538
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
539
|
-
user: {
|
|
540
|
-
id: string;
|
|
541
|
-
createdAt: Date;
|
|
542
|
-
updatedAt: Date;
|
|
543
|
-
email: string;
|
|
544
|
-
emailVerified: boolean;
|
|
545
|
-
name: string;
|
|
546
|
-
image?: string | null | undefined;
|
|
547
|
-
};
|
|
548
|
-
session: {
|
|
549
|
-
id: string;
|
|
550
|
-
createdAt: Date;
|
|
551
|
-
updatedAt: Date;
|
|
552
|
-
userId: string;
|
|
553
|
-
expiresAt: Date;
|
|
554
|
-
token: string;
|
|
555
|
-
ipAddress?: string | null | undefined;
|
|
556
|
-
userAgent?: string | null | undefined;
|
|
557
|
-
};
|
|
558
|
-
} | null, {
|
|
559
|
-
code?: string | undefined;
|
|
560
|
-
message?: string | undefined;
|
|
561
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
562
|
-
} & {
|
|
563
|
-
useSession: () => {
|
|
564
|
-
data: {
|
|
565
|
-
user: {
|
|
566
|
-
id: string;
|
|
567
|
-
createdAt: Date;
|
|
568
|
-
updatedAt: Date;
|
|
569
|
-
email: string;
|
|
570
|
-
emailVerified: boolean;
|
|
571
|
-
name: string;
|
|
572
|
-
image?: string | null | undefined;
|
|
573
|
-
};
|
|
574
|
-
session: {
|
|
575
|
-
id: string;
|
|
576
|
-
createdAt: Date;
|
|
577
|
-
updatedAt: Date;
|
|
578
|
-
userId: string;
|
|
579
|
-
expiresAt: Date;
|
|
580
|
-
token: string;
|
|
581
|
-
ipAddress?: string | null | undefined;
|
|
582
|
-
userAgent?: string | null | undefined;
|
|
583
|
-
};
|
|
584
|
-
} | null;
|
|
585
|
-
isPending: boolean;
|
|
586
|
-
isRefetching: boolean;
|
|
587
|
-
error: _better_fetch_fetch0.BetterFetchError | null;
|
|
588
|
-
refetch: (queryParams?: {
|
|
589
|
-
query?: better_auth0.SessionQueryParams;
|
|
590
|
-
} | undefined) => Promise<void>;
|
|
591
|
-
};
|
|
592
|
-
$Infer: {
|
|
593
|
-
Session: {
|
|
594
|
-
user: {
|
|
595
|
-
id: string;
|
|
596
|
-
createdAt: Date;
|
|
597
|
-
updatedAt: Date;
|
|
598
|
-
email: string;
|
|
599
|
-
emailVerified: boolean;
|
|
600
|
-
name: string;
|
|
601
|
-
image?: string | null | undefined;
|
|
602
|
-
};
|
|
603
|
-
session: {
|
|
604
|
-
id: string;
|
|
605
|
-
createdAt: Date;
|
|
606
|
-
updatedAt: Date;
|
|
607
|
-
userId: string;
|
|
608
|
-
expiresAt: Date;
|
|
609
|
-
token: string;
|
|
610
|
-
ipAddress?: string | null | undefined;
|
|
611
|
-
userAgent?: string | null | undefined;
|
|
612
|
-
};
|
|
613
|
-
};
|
|
614
|
-
};
|
|
615
|
-
$fetch: _better_fetch_fetch0.BetterFetch<{
|
|
616
|
-
plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
|
|
617
|
-
id: string;
|
|
618
|
-
name: string;
|
|
619
|
-
hooks: {
|
|
620
|
-
onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
|
|
621
|
-
};
|
|
622
|
-
} | {
|
|
623
|
-
id: string;
|
|
624
|
-
name: string;
|
|
625
|
-
hooks: {
|
|
626
|
-
onRequest<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>): void;
|
|
627
|
-
};
|
|
628
|
-
} | {
|
|
629
|
-
id: string;
|
|
630
|
-
name: string;
|
|
631
|
-
hooks: {
|
|
632
|
-
onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
633
|
-
onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
|
|
634
|
-
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
|
|
635
|
-
onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
|
|
636
|
-
};
|
|
637
|
-
})[];
|
|
638
|
-
cache?: RequestCache | undefined;
|
|
639
|
-
method: string;
|
|
640
|
-
headers?: (HeadersInit & (HeadersInit | {
|
|
641
|
-
accept: "application/json" | "text/plain" | "application/octet-stream";
|
|
642
|
-
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
|
643
|
-
authorization: "Bearer" | "Basic";
|
|
644
|
-
})) | undefined;
|
|
645
|
-
redirect?: RequestRedirect | undefined;
|
|
646
|
-
credentials?: RequestCredentials;
|
|
647
|
-
integrity?: string | undefined;
|
|
648
|
-
keepalive?: boolean | undefined;
|
|
649
|
-
mode?: RequestMode | undefined;
|
|
650
|
-
priority?: RequestPriority | undefined;
|
|
651
|
-
referrer?: string | undefined;
|
|
652
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
653
|
-
signal?: (AbortSignal | null) | undefined;
|
|
654
|
-
window?: null | undefined;
|
|
655
|
-
onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
|
|
656
|
-
hookOptions?: {
|
|
657
|
-
cloneResponse?: boolean;
|
|
658
|
-
} | undefined;
|
|
659
|
-
timeout?: number | undefined;
|
|
660
|
-
customFetchImpl: _better_fetch_fetch0.FetchEsque;
|
|
661
|
-
baseURL: string;
|
|
662
|
-
throw?: boolean | undefined;
|
|
663
|
-
auth?: ({
|
|
664
|
-
type: "Bearer";
|
|
665
|
-
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
|
666
|
-
} | {
|
|
667
|
-
type: "Basic";
|
|
668
|
-
username: string | (() => string | undefined) | undefined;
|
|
669
|
-
password: string | (() => string | undefined) | undefined;
|
|
670
|
-
} | {
|
|
671
|
-
type: "Custom";
|
|
672
|
-
prefix: string | (() => string | undefined) | undefined;
|
|
673
|
-
value: string | (() => string | undefined) | undefined;
|
|
674
|
-
}) | undefined;
|
|
675
|
-
body?: any;
|
|
676
|
-
query?: any;
|
|
677
|
-
params?: any;
|
|
678
|
-
duplex?: "full" | "half" | undefined;
|
|
679
|
-
jsonParser: (text: string) => Promise<any> | any;
|
|
680
|
-
retry?: _better_fetch_fetch0.RetryOptions | undefined;
|
|
681
|
-
retryAttempt?: number | undefined;
|
|
682
|
-
output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
683
|
-
errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
|
|
684
|
-
disableValidation?: boolean | undefined;
|
|
685
|
-
disableSignal?: boolean | undefined;
|
|
686
|
-
}, unknown, unknown, {}>;
|
|
687
|
-
$store: {
|
|
688
|
-
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
689
|
-
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
690
|
-
atoms: Record<string, nanostores0.WritableAtom<any>>;
|
|
691
|
-
};
|
|
692
|
-
$ERROR_CODES: {
|
|
693
|
-
readonly USER_NOT_FOUND: "User not found";
|
|
694
|
-
readonly FAILED_TO_CREATE_USER: "Failed to create user";
|
|
695
|
-
readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
|
|
696
|
-
readonly FAILED_TO_UPDATE_USER: "Failed to update user";
|
|
697
|
-
readonly FAILED_TO_GET_SESSION: "Failed to get session";
|
|
698
|
-
readonly INVALID_PASSWORD: "Invalid password";
|
|
699
|
-
readonly INVALID_EMAIL: "Invalid email";
|
|
700
|
-
readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
|
|
701
|
-
readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
|
|
702
|
-
readonly PROVIDER_NOT_FOUND: "Provider not found";
|
|
703
|
-
readonly INVALID_TOKEN: "Invalid token";
|
|
704
|
-
readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
|
|
705
|
-
readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
|
|
706
|
-
readonly USER_EMAIL_NOT_FOUND: "User email not found";
|
|
707
|
-
readonly EMAIL_NOT_VERIFIED: "Email not verified";
|
|
708
|
-
readonly PASSWORD_TOO_SHORT: "Password too short";
|
|
709
|
-
readonly PASSWORD_TOO_LONG: "Password too long";
|
|
710
|
-
readonly USER_ALREADY_EXISTS: "User already exists.";
|
|
711
|
-
readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
|
|
712
|
-
readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
|
|
713
|
-
readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
|
|
714
|
-
readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
|
|
715
|
-
readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
|
|
716
|
-
readonly ACCOUNT_NOT_FOUND: "Account not found";
|
|
717
|
-
readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
|
|
718
|
-
};
|
|
719
|
-
};
|
|
720
|
-
getJWTToken(): Promise<string | null>;
|
|
721
|
-
}
|
|
722
|
-
/** Instance type for BetterAuthReactAdapter */
|
|
723
|
-
type BetterAuthReactAdapterInstance = BetterAuthReactAdapterImpl;
|
|
724
|
-
/** Builder type that creates adapter instances */
|
|
725
|
-
type BetterAuthReactAdapterBuilder = (url: string) => BetterAuthReactAdapterInstance;
|
|
726
|
-
/**
|
|
727
|
-
* Factory function that returns an adapter builder.
|
|
728
|
-
* The builder is called by createClient/createAuthClient with the URL.
|
|
729
|
-
*
|
|
730
|
-
* @param options - Optional adapter configuration (baseURL is injected separately)
|
|
731
|
-
* @returns A builder function that creates the adapter instance
|
|
732
|
-
*
|
|
733
|
-
* @example
|
|
734
|
-
* ```typescript
|
|
735
|
-
* const client = createClient({
|
|
736
|
-
* auth: {
|
|
737
|
-
* url: 'https://auth.example.com',
|
|
738
|
-
* adapter: BetterAuthReactAdapter(),
|
|
739
|
-
* },
|
|
740
|
-
* dataApi: { url: 'https://data-api.example.com' },
|
|
741
|
-
* });
|
|
742
|
-
* ```
|
|
743
|
-
*/
|
|
744
|
-
declare function BetterAuthReactAdapter(options?: BetterAuthReactAdapterOptions): BetterAuthReactAdapterBuilder;
|
|
745
|
-
//#endregion
|
|
746
|
-
//#region ../neon-auth/src/adapters/better-auth-vanilla/better-auth-vanilla-adapter.d.ts
|
|
747
|
-
type BetterAuthVanillaAdapterOptions = Omit<NeonAuthAdapterCoreAuthOptions, 'baseURL'>;
|
|
748
|
-
/**
|
|
749
|
-
* Internal implementation class - use BetterAuthVanillaAdapter factory function instead
|
|
750
|
-
*/
|
|
751
|
-
declare class BetterAuthVanillaAdapterImpl extends NeonAuthAdapterCore {
|
|
752
|
-
private _betterAuth;
|
|
753
|
-
constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
|
|
754
|
-
getBetterAuthInstance(): AuthClient<BetterAuthClientOptions>;
|
|
755
|
-
getJWTToken(): Promise<string | null>;
|
|
756
|
-
}
|
|
757
|
-
/** Instance type for BetterAuthVanillaAdapter */
|
|
758
|
-
type BetterAuthVanillaAdapterInstance = BetterAuthVanillaAdapterImpl;
|
|
759
|
-
/** Builder type that creates adapter instances */
|
|
760
|
-
type BetterAuthVanillaAdapterBuilder = (url: string) => BetterAuthVanillaAdapterInstance;
|
|
761
|
-
/**
|
|
762
|
-
* Factory function that returns an adapter builder.
|
|
763
|
-
* The builder is called by createClient/createAuthClient with the URL.
|
|
764
|
-
*
|
|
765
|
-
* @param options - Optional adapter configuration (baseURL is injected separately)
|
|
766
|
-
* @returns A builder function that creates the adapter instance
|
|
767
|
-
*
|
|
768
|
-
* @example
|
|
769
|
-
* ```typescript
|
|
770
|
-
* const client = createClient({
|
|
771
|
-
* auth: {
|
|
772
|
-
* url: 'https://auth.example.com',
|
|
773
|
-
* adapter: BetterAuthVanillaAdapter(),
|
|
774
|
-
* },
|
|
775
|
-
* dataApi: { url: 'https://data-api.example.com' },
|
|
776
|
-
* });
|
|
777
|
-
* ```
|
|
778
|
-
*/
|
|
779
|
-
declare function BetterAuthVanillaAdapter(options?: BetterAuthVanillaAdapterOptions): BetterAuthVanillaAdapterBuilder;
|
|
780
|
-
//#endregion
|
|
781
|
-
//#region ../neon-auth/src/adapters/supabase/auth-interface.d.ts
|
|
782
|
-
type _UpstreamAuthClientInstance = InstanceType<typeof AuthClient$1>;
|
|
783
|
-
type _AuthClientBase = { [K in keyof _UpstreamAuthClientInstance as _UpstreamAuthClientInstance[K] extends never ? never : K]: _UpstreamAuthClientInstance[K] };
|
|
784
|
-
type SupabaseAuthClientInterface = _AuthClientBase;
|
|
785
|
-
//#endregion
|
|
786
|
-
//#region ../neon-auth/src/adapters/supabase/supabase-adapter.d.ts
|
|
787
|
-
type SupabaseAuthAdapterOptions = Omit<NeonAuthAdapterCoreAuthOptions, 'baseURL'>;
|
|
788
|
-
/**
|
|
789
|
-
* Internal implementation class - use SupabaseAuthAdapter factory function instead
|
|
790
|
-
*/
|
|
791
|
-
declare class SupabaseAuthAdapterImpl extends NeonAuthAdapterCore implements SupabaseAuthClientInterface {
|
|
792
|
-
admin: SupabaseAuthClientInterface['admin'];
|
|
793
|
-
mfa: SupabaseAuthClientInterface['mfa'];
|
|
794
|
-
oauth: SupabaseAuthClientInterface['oauth'];
|
|
795
|
-
private _betterAuth;
|
|
796
|
-
private _stateChangeEmitters;
|
|
797
|
-
constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
|
|
798
|
-
getBetterAuthInstance(): AuthClient<BetterAuthClientOptions>;
|
|
799
|
-
getJWTToken(): Promise<string | null>;
|
|
800
|
-
initialize: SupabaseAuthClientInterface['initialize'];
|
|
801
|
-
getSession(options?: {
|
|
802
|
-
forceFetch?: boolean;
|
|
803
|
-
}): ReturnType<SupabaseAuthClientInterface['getSession']>;
|
|
804
|
-
refreshSession: SupabaseAuthClientInterface['refreshSession'];
|
|
805
|
-
setSession: SupabaseAuthClientInterface['setSession'];
|
|
806
|
-
signUp: SupabaseAuthClientInterface['signUp'];
|
|
807
|
-
signInAnonymously: SupabaseAuthClientInterface['signInAnonymously'];
|
|
808
|
-
signInWithPassword: SupabaseAuthClientInterface['signInWithPassword'];
|
|
809
|
-
signInWithOAuth: SupabaseAuthClientInterface['signInWithOAuth'];
|
|
810
|
-
signInWithOtp: SupabaseAuthClientInterface['signInWithOtp'];
|
|
811
|
-
signInWithIdToken: SupabaseAuthClientInterface['signInWithIdToken'];
|
|
812
|
-
signInWithSSO: SupabaseAuthClientInterface['signInWithSSO'];
|
|
813
|
-
signInWithWeb3: SupabaseAuthClientInterface['signInWithWeb3'];
|
|
814
|
-
signOut: SupabaseAuthClientInterface['signOut'];
|
|
815
|
-
getUser: SupabaseAuthClientInterface['getUser'];
|
|
816
|
-
getClaims: (jwtArg?: string) => Promise<{
|
|
817
|
-
data: {
|
|
818
|
-
header: JwtHeader;
|
|
819
|
-
claims: JwtPayload;
|
|
820
|
-
signature: Uint8Array<ArrayBufferLike>;
|
|
821
|
-
};
|
|
822
|
-
error: null;
|
|
823
|
-
} | {
|
|
824
|
-
data: null;
|
|
825
|
-
error: _supabase_auth_js0.AuthError;
|
|
826
|
-
}>;
|
|
827
|
-
updateUser: SupabaseAuthClientInterface['updateUser'];
|
|
828
|
-
getUserIdentities: SupabaseAuthClientInterface['getUserIdentities'];
|
|
829
|
-
linkIdentity: SupabaseAuthClientInterface['linkIdentity'];
|
|
830
|
-
unlinkIdentity: SupabaseAuthClientInterface['unlinkIdentity'];
|
|
831
|
-
verifyOtp: SupabaseAuthClientInterface['verifyOtp'];
|
|
832
|
-
resetPasswordForEmail: SupabaseAuthClientInterface['resetPasswordForEmail'];
|
|
833
|
-
reauthenticate: SupabaseAuthClientInterface['reauthenticate'];
|
|
834
|
-
resend: SupabaseAuthClientInterface['resend'];
|
|
835
|
-
exchangeCodeForSession: SupabaseAuthClientInterface['exchangeCodeForSession'];
|
|
836
|
-
onAuthStateChange: SupabaseAuthClientInterface['onAuthStateChange'];
|
|
837
|
-
isThrowOnErrorEnabled: SupabaseAuthClientInterface['isThrowOnErrorEnabled'];
|
|
838
|
-
startAutoRefresh: SupabaseAuthClientInterface['startAutoRefresh'];
|
|
839
|
-
stopAutoRefresh: SupabaseAuthClientInterface['stopAutoRefresh'];
|
|
840
|
-
private verifyEmailOtp;
|
|
841
|
-
private verifyPhoneOtp;
|
|
842
|
-
private emitInitialSession;
|
|
843
|
-
}
|
|
844
|
-
/** Instance type for SupabaseAuthAdapter */
|
|
845
|
-
type SupabaseAuthAdapterInstance = SupabaseAuthAdapterImpl;
|
|
846
|
-
/** Builder type that creates adapter instances */
|
|
847
|
-
type SupabaseAuthAdapterBuilder = (url: string) => SupabaseAuthAdapterInstance;
|
|
848
|
-
/**
|
|
849
|
-
* Factory function that returns an adapter builder.
|
|
850
|
-
* The builder is called by createClient/createAuthClient with the URL.
|
|
851
|
-
*
|
|
852
|
-
* @param options - Optional adapter configuration (baseURL is injected separately)
|
|
853
|
-
* @returns A builder function that creates the adapter instance
|
|
854
|
-
*
|
|
855
|
-
* @example
|
|
856
|
-
* ```typescript
|
|
857
|
-
* const client = createClient({
|
|
858
|
-
* auth: {
|
|
859
|
-
* url: 'https://auth.example.com',
|
|
860
|
-
* adapter: SupabaseAuthAdapter(),
|
|
861
|
-
* },
|
|
862
|
-
* dataApi: { url: 'https://data-api.example.com' },
|
|
863
|
-
* });
|
|
864
|
-
* ```
|
|
865
|
-
*/
|
|
866
|
-
declare function SupabaseAuthAdapter(options?: SupabaseAuthAdapterOptions): SupabaseAuthAdapterBuilder;
|
|
867
|
-
//#endregion
|
|
868
|
-
//#region ../neon-auth/src/neon-auth.d.ts
|
|
869
|
-
/**
|
|
870
|
-
* Type representing the Better Auth React client
|
|
871
|
-
*/
|
|
872
|
-
type ReactBetterAuthClient = ReturnType<typeof createAuthClient$1>;
|
|
873
|
-
/**
|
|
874
|
-
* Type representing the Better Auth Vanilla client
|
|
875
|
-
*/
|
|
876
|
-
type VanillaBetterAuthClient = ReturnType<typeof createAuthClient$2>;
|
|
877
|
-
/**
|
|
878
|
-
* Union type of all supported auth adapter instances
|
|
879
|
-
*/
|
|
880
|
-
type NeonAuthAdapter = BetterAuthVanillaAdapterInstance | BetterAuthReactAdapterInstance | SupabaseAuthAdapterInstance;
|
|
881
|
-
/**
|
|
882
|
-
* Configuration for createAuthClient
|
|
883
|
-
*/
|
|
884
|
-
interface NeonAuthConfig<T extends NeonAuthAdapter> {
|
|
885
|
-
/** The adapter builder to use. Defaults to BetterAuthVanillaAdapter() if not specified. */
|
|
886
|
-
adapter?: (url: string) => T;
|
|
887
|
-
}
|
|
888
|
-
/**
|
|
889
|
-
* Resolves the public API type for an adapter.
|
|
890
|
-
* - SupabaseAuthAdapter: exposes its own methods directly (Supabase-compatible API)
|
|
891
|
-
* - BetterAuth adapters: expose the Better Auth client directly
|
|
892
|
-
*/
|
|
893
|
-
type NeonAuthPublicApi<T extends NeonAuthAdapter> = T extends BetterAuthVanillaAdapterInstance ? VanillaBetterAuthClient : T extends BetterAuthReactAdapterInstance ? ReactBetterAuthClient : T;
|
|
894
|
-
/**
|
|
895
|
-
* NeonAuth type - combines base functionality with the appropriate public API
|
|
896
|
-
* This is the return type of createAuthClient()
|
|
897
|
-
*
|
|
898
|
-
* For SupabaseAuthAdapter: exposes Supabase-compatible methods (signInWithPassword, getSession, etc.)
|
|
899
|
-
* For BetterAuth adapters: exposes the Better Auth client directly (signIn.email, signUp.email, etc.)
|
|
900
|
-
*/
|
|
901
|
-
type NeonAuth<T extends NeonAuthAdapter> = {
|
|
902
|
-
adapter: NeonAuthPublicApi<T>;
|
|
903
|
-
getJWTToken: () => Promise<string | null>;
|
|
904
|
-
};
|
|
905
|
-
/**
|
|
906
|
-
* Create a NeonAuth instance that exposes the appropriate API based on the adapter.
|
|
907
|
-
*
|
|
908
|
-
* @param url - The auth service URL (e.g., 'https://auth.example.com')
|
|
909
|
-
* @param config - Configuration with adapter builder
|
|
910
|
-
* @returns NeonAuth instance with the adapter's API exposed directly
|
|
911
|
-
*
|
|
912
|
-
* @example SupabaseAuthAdapter - Supabase-compatible API
|
|
913
|
-
* ```typescript
|
|
914
|
-
* import { createAuthClient, SupabaseAuthAdapter } from '@neondatabase/neon-auth';
|
|
915
|
-
*
|
|
916
|
-
* const auth = createAuthClient('https://auth.example.com', {
|
|
917
|
-
* adapter: SupabaseAuthAdapter(),
|
|
918
|
-
* });
|
|
919
|
-
*
|
|
920
|
-
* // Supabase-compatible methods
|
|
921
|
-
* await auth.signInWithPassword({ email, password });
|
|
922
|
-
* await auth.getSession();
|
|
923
|
-
* ```
|
|
924
|
-
*
|
|
925
|
-
* @example BetterAuthVanillaAdapter - Direct Better Auth API
|
|
926
|
-
* ```typescript
|
|
927
|
-
* import { createAuthClient, BetterAuthVanillaAdapter } from '@neondatabase/neon-auth';
|
|
928
|
-
*
|
|
929
|
-
* const auth = createAuthClient('https://auth.example.com', {
|
|
930
|
-
* adapter: BetterAuthVanillaAdapter(),
|
|
931
|
-
* });
|
|
932
|
-
*
|
|
933
|
-
* // Direct Better Auth API access
|
|
934
|
-
* await auth.signIn.email({ email, password });
|
|
935
|
-
* await auth.signUp.email({ email, password, name: 'John' });
|
|
936
|
-
* await auth.getSession();
|
|
937
|
-
* ```
|
|
938
|
-
*
|
|
939
|
-
* @example BetterAuthReactAdapter - Better Auth with React hooks
|
|
940
|
-
* ```typescript
|
|
941
|
-
* import { createAuthClient, BetterAuthReactAdapter } from '@neondatabase/neon-auth';
|
|
942
|
-
*
|
|
943
|
-
* const auth = createAuthClient('https://auth.example.com', {
|
|
944
|
-
* adapter: BetterAuthReactAdapter(),
|
|
945
|
-
* });
|
|
946
|
-
*
|
|
947
|
-
* // Direct Better Auth API with React hooks
|
|
948
|
-
* await auth.signIn.email({ email, password });
|
|
949
|
-
* const session = auth.useSession(); // React hook
|
|
950
|
-
* ```
|
|
951
|
-
*/
|
|
952
|
-
declare function createInternalNeonAuth<T extends NeonAuthAdapter = BetterAuthVanillaAdapterInstance>(url: string, config?: NeonAuthConfig<T>): NeonAuth<T>;
|
|
953
|
-
declare function createAuthClient<T extends NeonAuthAdapter = BetterAuthVanillaAdapterInstance>(url: string, config?: NeonAuthConfig<T>): NeonAuthPublicApi<T>;
|
|
954
|
-
//#endregion
|
|
955
|
-
//#region ../neon-auth/src/utils/jwt.d.ts
|
|
956
|
-
/**
|
|
957
|
-
* Extract expiration timestamp from JWT payload
|
|
958
|
-
* @param jwt - The JWT token string
|
|
959
|
-
* @returns Expiration timestamp in seconds (Unix time) or null if invalid
|
|
960
|
-
*/
|
|
961
|
-
declare function getJwtExpiration(jwt: string): number | null;
|
|
962
|
-
/**
|
|
963
|
-
* Extract expiration timestamp from JWT payload in milliseconds
|
|
964
|
-
* @param jwt - The JWT token string
|
|
965
|
-
* @returns Expiration timestamp in milliseconds or null if invalid
|
|
966
|
-
*/
|
|
967
|
-
declare function getJwtExpirationMs(jwt: string): number | null;
|
|
968
|
-
//#endregion
|
|
969
|
-
//#region ../postgrest-js/src/client/postgrest-client.d.ts
|
|
970
|
-
type NeonPostgrestClientConstructorOptions<SchemaName> = {
|
|
971
|
-
dataApiUrl: string;
|
|
972
|
-
options?: {
|
|
973
|
-
db?: {
|
|
974
|
-
schema?: Exclude<SchemaName, '__InternalSupabase'>;
|
|
975
|
-
};
|
|
976
|
-
global?: {
|
|
977
|
-
fetch: typeof fetch;
|
|
978
|
-
headers?: Record<string, string>;
|
|
979
|
-
};
|
|
980
|
-
};
|
|
981
|
-
};
|
|
982
|
-
type DefaultSchemaName<Database> = 'public' extends keyof Database ? 'public' : string & keyof Database;
|
|
983
|
-
/**
|
|
984
|
-
* Neon PostgreSQL client for querying the Neon Data API
|
|
985
|
-
*
|
|
986
|
-
* This is a generic PostgreSQL client without authentication built-in.
|
|
987
|
-
* For auth-integrated clients, use @neondatabase/neon-js instead.
|
|
988
|
-
*
|
|
989
|
-
* Extends the upstream PostgrestClient with Neon-specific configuration.
|
|
990
|
-
*/
|
|
991
|
-
declare class NeonPostgrestClient<Database = any, SchemaName extends string & keyof Database = DefaultSchemaName<Database>> extends PostgrestClient<Database, {
|
|
992
|
-
PostgrestVersion: '12';
|
|
993
|
-
}, Exclude<SchemaName, '__InternalSupabase'>> {
|
|
994
|
-
constructor({
|
|
995
|
-
dataApiUrl,
|
|
996
|
-
options
|
|
997
|
-
}: NeonPostgrestClientConstructorOptions<SchemaName>);
|
|
998
|
-
}
|
|
999
|
-
//#endregion
|
|
1000
6
|
//#region src/client/neon-client.d.ts
|
|
1001
|
-
type NeonClientConstructorOptions<SchemaName, TAuth extends NeonAuthAdapter = NeonAuthAdapter> = NeonPostgrestClientConstructorOptions<SchemaName> & {
|
|
1002
|
-
authClient: NeonAuth<TAuth>;
|
|
7
|
+
type NeonClientConstructorOptions<SchemaName, TAuth extends NeonAuthAdapter$1 = NeonAuthAdapter$1> = NeonPostgrestClientConstructorOptions<SchemaName> & {
|
|
8
|
+
authClient: NeonAuth$1<TAuth>;
|
|
1003
9
|
};
|
|
1004
10
|
/**
|
|
1005
11
|
* Neon client with integrated authentication
|
|
@@ -1007,8 +13,8 @@ type NeonClientConstructorOptions<SchemaName, TAuth extends NeonAuthAdapter = Ne
|
|
|
1007
13
|
* Extends NeonPostgrestClient with Neon Auth integration.
|
|
1008
14
|
* For auth-free clients, use @neondatabase/postgrest-js instead.
|
|
1009
15
|
*/
|
|
1010
|
-
declare class NeonClient<Database = any, SchemaName extends string & keyof Database = DefaultSchemaName<Database>, TAuth extends NeonAuthAdapter = NeonAuthAdapter> extends NeonPostgrestClient<Database, SchemaName> {
|
|
1011
|
-
auth: NeonAuthPublicApi<TAuth>;
|
|
16
|
+
declare class NeonClient<Database = any, SchemaName extends string & keyof Database = DefaultSchemaName<Database>, TAuth extends NeonAuthAdapter$1 = NeonAuthAdapter$1> extends NeonPostgrestClient<Database, SchemaName> {
|
|
17
|
+
auth: NeonAuthPublicApi$1<TAuth>;
|
|
1012
18
|
constructor({
|
|
1013
19
|
dataApiUrl,
|
|
1014
20
|
options,
|
|
@@ -1020,7 +26,7 @@ declare class NeonClient<Database = any, SchemaName extends string & keyof Datab
|
|
|
1020
26
|
/**
|
|
1021
27
|
* Auth configuration for createClient
|
|
1022
28
|
*/
|
|
1023
|
-
type CreateClientAuthConfig<T extends NeonAuthAdapter> = {
|
|
29
|
+
type CreateClientAuthConfig<T extends NeonAuthAdapter$1> = {
|
|
1024
30
|
/** The adapter builder to use. Defaults to BetterAuthVanillaAdapter() if not specified. */
|
|
1025
31
|
adapter?: (url: string) => T;
|
|
1026
32
|
/** The auth service URL */
|
|
@@ -1029,7 +35,7 @@ type CreateClientAuthConfig<T extends NeonAuthAdapter> = {
|
|
|
1029
35
|
/**
|
|
1030
36
|
* Data API configuration for createClient
|
|
1031
37
|
*/
|
|
1032
|
-
type CreateClientDataApiConfig<SchemaName, TAuth extends NeonAuthAdapter> = {
|
|
38
|
+
type CreateClientDataApiConfig<SchemaName, TAuth extends NeonAuthAdapter$1> = {
|
|
1033
39
|
/** The Data API URL */
|
|
1034
40
|
url: string;
|
|
1035
41
|
/** Additional client options */
|
|
@@ -1038,7 +44,7 @@ type CreateClientDataApiConfig<SchemaName, TAuth extends NeonAuthAdapter> = {
|
|
|
1038
44
|
/**
|
|
1039
45
|
* Configuration for createClient
|
|
1040
46
|
*/
|
|
1041
|
-
type CreateClientConfig<SchemaName, T extends NeonAuthAdapter> = {
|
|
47
|
+
type CreateClientConfig<SchemaName, T extends NeonAuthAdapter$1> = {
|
|
1042
48
|
/** Auth service configuration */
|
|
1043
49
|
auth: CreateClientAuthConfig<T>;
|
|
1044
50
|
/** Data API configuration */
|
|
@@ -1091,15 +97,15 @@ type CreateClientConfig<SchemaName, T extends NeonAuthAdapter> = {
|
|
|
1091
97
|
* Helper type to create NeonClient with proper schema resolution.
|
|
1092
98
|
* Uses 'public' as the default schema since it's the most common case.
|
|
1093
99
|
*/
|
|
1094
|
-
type CreateClientResult<Database, TAdapter extends NeonAuthAdapter> = NeonClient<Database, DefaultSchemaName<Database>, TAdapter>;
|
|
100
|
+
type CreateClientResult<Database, TAdapter extends NeonAuthAdapter$1> = NeonClient<Database, DefaultSchemaName$1<Database>, TAdapter>;
|
|
1095
101
|
declare function createClient<Database = any>(config: {
|
|
1096
102
|
auth: {
|
|
1097
103
|
url: string;
|
|
1098
104
|
};
|
|
1099
|
-
dataApi: CreateClientDataApiConfig<DefaultSchemaName<Database>, BetterAuthVanillaAdapterInstance>;
|
|
1100
|
-
}): CreateClientResult<Database, BetterAuthVanillaAdapterInstance>;
|
|
1101
|
-
declare function createClient<Database = any>(config: CreateClientConfig<DefaultSchemaName<Database>, SupabaseAuthAdapterInstance>): CreateClientResult<Database, SupabaseAuthAdapterInstance>;
|
|
1102
|
-
declare function createClient<Database = any>(config: CreateClientConfig<DefaultSchemaName<Database>, BetterAuthVanillaAdapterInstance>): CreateClientResult<Database, BetterAuthVanillaAdapterInstance>;
|
|
1103
|
-
declare function createClient<Database = any>(config: CreateClientConfig<DefaultSchemaName<Database>, BetterAuthReactAdapterInstance>): CreateClientResult<Database, BetterAuthReactAdapterInstance>;
|
|
105
|
+
dataApi: CreateClientDataApiConfig<DefaultSchemaName$1<Database>, BetterAuthVanillaAdapterInstance$1>;
|
|
106
|
+
}): CreateClientResult<Database, BetterAuthVanillaAdapterInstance$1>;
|
|
107
|
+
declare function createClient<Database = any>(config: CreateClientConfig<DefaultSchemaName$1<Database>, SupabaseAuthAdapterInstance$1>): CreateClientResult<Database, SupabaseAuthAdapterInstance$1>;
|
|
108
|
+
declare function createClient<Database = any>(config: CreateClientConfig<DefaultSchemaName$1<Database>, BetterAuthVanillaAdapterInstance$1>): CreateClientResult<Database, BetterAuthVanillaAdapterInstance$1>;
|
|
109
|
+
declare function createClient<Database = any>(config: CreateClientConfig<DefaultSchemaName$1<Database>, BetterAuthReactAdapterInstance>): CreateClientResult<Database, BetterAuthReactAdapterInstance>;
|
|
1104
110
|
//#endregion
|
|
1105
|
-
export {
|
|
111
|
+
export { AuthRequiredError, BetterAuthVanillaAdapter, type BetterAuthVanillaAdapterInstance, type BetterAuthVanillaAdapterOptions, type NeonAuth, type NeonAuthAdapter, type NeonAuthConfig, type NeonAuthPublicApi, type ReactBetterAuthClient, SupabaseAuthAdapter, type SupabaseAuthAdapterInstance, type SupabaseAuthAdapterOptions, type VanillaBetterAuthClient, createClient, fetchWithToken };
|