hylekit 1.0.3 → 1.0.5
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 +126 -59
- package/dist/bff/index.cjs +5 -139
- package/dist/bff/index.cjs.map +1 -1
- package/dist/bff/index.d.cts +2 -1
- package/dist/bff/index.d.ts +2 -1
- package/dist/bff/index.js +5 -145
- package/dist/bff/index.js.map +1 -1
- package/dist/client/index.cjs +48 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +1588 -0
- package/dist/client/index.d.ts +1588 -0
- package/dist/client/index.js +21 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/nextjs.cjs +4 -220
- package/dist/client/nextjs.cjs.map +1 -1
- package/dist/client/nextjs.d.cts +89 -243
- package/dist/client/nextjs.d.ts +89 -243
- package/dist/client/nextjs.js +3 -224
- package/dist/client/nextjs.js.map +1 -1
- package/dist/client/sveltekit.cjs +4 -207
- package/dist/client/sveltekit.cjs.map +1 -1
- package/dist/client/sveltekit.d.cts +89 -219
- package/dist/client/sveltekit.d.ts +89 -219
- package/dist/client/sveltekit.js +3 -211
- package/dist/client/sveltekit.js.map +1 -1
- package/dist/{index-DYW73KK3.d.cts → index-B-5TEr94.d.cts} +28 -2
- package/dist/{index-DYW73KK3.d.ts → index-B-5TEr94.d.ts} +28 -2
- package/dist/index.cjs +276 -262
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +110 -3272
- package/dist/index.d.ts +110 -3272
- package/dist/index.js +270 -258
- package/dist/index.js.map +1 -1
- package/dist/server/express.cjs +71 -80
- package/dist/server/express.cjs.map +1 -1
- package/dist/server/express.d.cts +18 -6
- package/dist/server/express.d.ts +18 -6
- package/dist/server/express.js +70 -86
- package/dist/server/express.js.map +1 -1
- package/dist/server/nextjs.cjs +107 -0
- package/dist/server/nextjs.cjs.map +1 -0
- package/dist/server/nextjs.d.cts +90 -0
- package/dist/server/nextjs.d.ts +90 -0
- package/dist/server/nextjs.js +82 -0
- package/dist/server/nextjs.js.map +1 -0
- package/dist/server/sveltekit.cjs +94 -0
- package/dist/server/sveltekit.cjs.map +1 -0
- package/dist/server/sveltekit.d.cts +68 -0
- package/dist/server/sveltekit.d.ts +68 -0
- package/dist/server/sveltekit.js +69 -0
- package/dist/server/sveltekit.js.map +1 -0
- package/dist/{types-GOn9sn7-.d.ts → types-Wucl0qmN.d.cts} +1 -8
- package/dist/{types-BHiK1JUX.d.cts → types-Wucl0qmN.d.ts} +1 -8
- package/package.json +22 -6
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
import * as nanostores from 'nanostores';
|
|
2
2
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
3
3
|
import * as better_auth from 'better-auth';
|
|
4
|
-
|
|
5
|
-
import { S as SessionResult, a as SessionData, d as db } from '../types-BHiK1JUX.cjs';
|
|
6
|
-
export { U as UserInfo } from '../types-BHiK1JUX.cjs';
|
|
7
|
-
import '@libsql/client';
|
|
8
|
-
import 'drizzle-orm/libsql';
|
|
9
|
-
import '../schema-ph9L8QMm.cjs';
|
|
10
|
-
import 'drizzle-orm';
|
|
11
|
-
import 'drizzle-orm/sqlite-core';
|
|
4
|
+
export { a as SessionData, S as SessionResult, U as UserInfo } from '../types-Wucl0qmN.cjs';
|
|
12
5
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* Use this in your Svelte components and client-side logic.
|
|
16
|
-
*/
|
|
17
|
-
declare const client: {
|
|
18
|
-
/**
|
|
19
|
-
* Alias for signIn.
|
|
20
|
-
*/
|
|
21
|
-
login: {
|
|
6
|
+
declare const authClient: {
|
|
7
|
+
signIn: {
|
|
22
8
|
social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
23
9
|
provider: "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" | (string & {});
|
|
24
10
|
callbackURL?: string | undefined;
|
|
@@ -75,23 +61,35 @@ declare const client: {
|
|
|
75
61
|
code?: string | undefined;
|
|
76
62
|
message?: string | undefined;
|
|
77
63
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
78
|
-
}
|
|
64
|
+
};
|
|
65
|
+
} & {
|
|
66
|
+
signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
67
|
+
query?: Record<string, any> | undefined;
|
|
68
|
+
fetchOptions?: FetchOptions | undefined;
|
|
69
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
70
|
+
success: boolean;
|
|
71
|
+
}, {
|
|
72
|
+
code?: string | undefined;
|
|
73
|
+
message?: string | undefined;
|
|
74
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
75
|
+
} & {
|
|
76
|
+
signUp: {
|
|
79
77
|
email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
78
|
+
name: string;
|
|
80
79
|
email: string;
|
|
81
80
|
password: string;
|
|
81
|
+
image?: string | undefined;
|
|
82
82
|
callbackURL?: string | undefined;
|
|
83
83
|
rememberMe?: boolean | undefined;
|
|
84
84
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
85
85
|
email: string;
|
|
86
|
+
name: string;
|
|
86
87
|
password: string;
|
|
88
|
+
image?: string | undefined;
|
|
87
89
|
callbackURL?: string | undefined;
|
|
88
|
-
rememberMe?: boolean | undefined;
|
|
89
|
-
} & {
|
|
90
90
|
fetchOptions?: FetchOptions | undefined;
|
|
91
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
92
|
-
|
|
93
|
-
token: string;
|
|
94
|
-
url?: string | undefined;
|
|
91
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
92
|
+
token: null;
|
|
95
93
|
user: {
|
|
96
94
|
id: string;
|
|
97
95
|
createdAt: Date;
|
|
@@ -101,55 +99,8 @@ declare const client: {
|
|
|
101
99
|
name: string;
|
|
102
100
|
image?: string | null | undefined | undefined;
|
|
103
101
|
};
|
|
104
|
-
}, {
|
|
105
|
-
code?: string | undefined;
|
|
106
|
-
message?: string | undefined;
|
|
107
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
108
|
-
};
|
|
109
|
-
signIn: {
|
|
110
|
-
social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
111
|
-
provider: "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" | (string & {});
|
|
112
|
-
callbackURL?: string | undefined;
|
|
113
|
-
newUserCallbackURL?: string | undefined;
|
|
114
|
-
errorCallbackURL?: string | undefined;
|
|
115
|
-
disableRedirect?: boolean | undefined;
|
|
116
|
-
idToken?: {
|
|
117
|
-
token: string;
|
|
118
|
-
nonce?: string | undefined;
|
|
119
|
-
accessToken?: string | undefined;
|
|
120
|
-
refreshToken?: string | undefined;
|
|
121
|
-
expiresAt?: number | undefined;
|
|
122
|
-
} | undefined;
|
|
123
|
-
scopes?: string[] | undefined;
|
|
124
|
-
requestSignUp?: boolean | undefined;
|
|
125
|
-
loginHint?: string | undefined;
|
|
126
|
-
additionalData?: Record<string, any> | undefined;
|
|
127
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
128
|
-
provider: "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" | (string & {});
|
|
129
|
-
callbackURL?: string | undefined;
|
|
130
|
-
newUserCallbackURL?: string | undefined;
|
|
131
|
-
errorCallbackURL?: string | undefined;
|
|
132
|
-
disableRedirect?: boolean | undefined;
|
|
133
|
-
idToken?: {
|
|
134
|
-
token: string;
|
|
135
|
-
nonce?: string | undefined;
|
|
136
|
-
accessToken?: string | undefined;
|
|
137
|
-
refreshToken?: string | undefined;
|
|
138
|
-
expiresAt?: number | undefined;
|
|
139
|
-
} | undefined;
|
|
140
|
-
scopes?: string[] | undefined;
|
|
141
|
-
requestSignUp?: boolean | undefined;
|
|
142
|
-
loginHint?: string | undefined;
|
|
143
|
-
additionalData?: Record<string, any> | undefined;
|
|
144
|
-
} & {
|
|
145
|
-
fetchOptions?: FetchOptions | undefined;
|
|
146
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
147
|
-
redirect: boolean;
|
|
148
|
-
url: string;
|
|
149
102
|
} | {
|
|
150
|
-
redirect: boolean;
|
|
151
103
|
token: string;
|
|
152
|
-
url: undefined;
|
|
153
104
|
user: {
|
|
154
105
|
id: string;
|
|
155
106
|
createdAt: Date;
|
|
@@ -163,7 +114,9 @@ declare const client: {
|
|
|
163
114
|
code?: string | undefined;
|
|
164
115
|
message?: string | undefined;
|
|
165
116
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
166
|
-
}
|
|
117
|
+
};
|
|
118
|
+
} & {
|
|
119
|
+
signIn: {
|
|
167
120
|
email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
168
121
|
email: string;
|
|
169
122
|
password: string;
|
|
@@ -194,58 +147,8 @@ declare const client: {
|
|
|
194
147
|
message?: string | undefined;
|
|
195
148
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
196
149
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
fetchOptions?: FetchOptions | undefined;
|
|
200
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
201
|
-
success: boolean;
|
|
202
|
-
}, {
|
|
203
|
-
code?: string | undefined;
|
|
204
|
-
message?: string | undefined;
|
|
205
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
206
|
-
signUp: {
|
|
207
|
-
email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
208
|
-
name: string;
|
|
209
|
-
email: string;
|
|
210
|
-
password: string;
|
|
211
|
-
image?: string | undefined;
|
|
212
|
-
callbackURL?: string | undefined;
|
|
213
|
-
rememberMe?: boolean | undefined;
|
|
214
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
215
|
-
email: string;
|
|
216
|
-
name: string;
|
|
217
|
-
password: string;
|
|
218
|
-
image?: string | undefined;
|
|
219
|
-
callbackURL?: string | undefined;
|
|
220
|
-
fetchOptions?: FetchOptions | undefined;
|
|
221
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
222
|
-
token: null;
|
|
223
|
-
user: {
|
|
224
|
-
id: string;
|
|
225
|
-
createdAt: Date;
|
|
226
|
-
updatedAt: Date;
|
|
227
|
-
email: string;
|
|
228
|
-
emailVerified: boolean;
|
|
229
|
-
name: string;
|
|
230
|
-
image?: string | null | undefined | undefined;
|
|
231
|
-
};
|
|
232
|
-
} | {
|
|
233
|
-
token: string;
|
|
234
|
-
user: {
|
|
235
|
-
id: string;
|
|
236
|
-
createdAt: Date;
|
|
237
|
-
updatedAt: Date;
|
|
238
|
-
email: string;
|
|
239
|
-
emailVerified: boolean;
|
|
240
|
-
name: string;
|
|
241
|
-
image?: string | null | undefined | undefined;
|
|
242
|
-
};
|
|
243
|
-
}>, {
|
|
244
|
-
code?: string | undefined;
|
|
245
|
-
message?: string | undefined;
|
|
246
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
247
|
-
};
|
|
248
|
-
resetPassword: (<FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
150
|
+
} & {
|
|
151
|
+
resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
249
152
|
newPassword: string;
|
|
250
153
|
token?: string | undefined;
|
|
251
154
|
}> & Record<string, any>, Partial<{
|
|
@@ -260,21 +163,8 @@ declare const client: {
|
|
|
260
163
|
}, {
|
|
261
164
|
code?: string | undefined;
|
|
262
165
|
message?: string | undefined;
|
|
263
|
-
}, FetchOptions["throw"] extends true ? true : false
|
|
264
|
-
|
|
265
|
-
callbackURL: string;
|
|
266
|
-
}> & Record<string, any>, {
|
|
267
|
-
token: string;
|
|
268
|
-
}>>(data_0: better_auth.Prettify<{
|
|
269
|
-
query: {
|
|
270
|
-
callbackURL: string;
|
|
271
|
-
};
|
|
272
|
-
fetchOptions?: FetchOptions | undefined;
|
|
273
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<never, {
|
|
274
|
-
code?: string | undefined;
|
|
275
|
-
message?: string | undefined;
|
|
276
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
277
|
-
};
|
|
166
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
167
|
+
} & {
|
|
278
168
|
verifyEmail: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
279
169
|
token: string;
|
|
280
170
|
callbackURL?: string | undefined;
|
|
@@ -290,6 +180,7 @@ declare const client: {
|
|
|
290
180
|
code?: string | undefined;
|
|
291
181
|
message?: string | undefined;
|
|
292
182
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
183
|
+
} & {
|
|
293
184
|
sendVerificationEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
294
185
|
email: string;
|
|
295
186
|
callbackURL?: string | undefined;
|
|
@@ -304,6 +195,7 @@ declare const client: {
|
|
|
304
195
|
code?: string | undefined;
|
|
305
196
|
message?: string | undefined;
|
|
306
197
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
198
|
+
} & {
|
|
307
199
|
changeEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
308
200
|
newEmail: string;
|
|
309
201
|
callbackURL?: string | undefined;
|
|
@@ -318,6 +210,7 @@ declare const client: {
|
|
|
318
210
|
code?: string | undefined;
|
|
319
211
|
message?: string | undefined;
|
|
320
212
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
213
|
+
} & {
|
|
321
214
|
changePassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
322
215
|
newPassword: string;
|
|
323
216
|
currentPassword: string;
|
|
@@ -343,6 +236,7 @@ declare const client: {
|
|
|
343
236
|
code?: string | undefined;
|
|
344
237
|
message?: string | undefined;
|
|
345
238
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
239
|
+
} & {
|
|
346
240
|
updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}> & {
|
|
347
241
|
name?: string | undefined;
|
|
348
242
|
image?: string | undefined | null;
|
|
@@ -356,7 +250,8 @@ declare const client: {
|
|
|
356
250
|
code?: string | undefined;
|
|
357
251
|
message?: string | undefined;
|
|
358
252
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
359
|
-
|
|
253
|
+
} & {
|
|
254
|
+
deleteUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
360
255
|
callbackURL?: string | undefined;
|
|
361
256
|
password?: string | undefined;
|
|
362
257
|
token?: string | undefined;
|
|
@@ -372,24 +267,8 @@ declare const client: {
|
|
|
372
267
|
}, {
|
|
373
268
|
code?: string | undefined;
|
|
374
269
|
message?: string | undefined;
|
|
375
|
-
}, FetchOptions["throw"] extends true ? true : false
|
|
376
|
-
|
|
377
|
-
token: string;
|
|
378
|
-
callbackURL?: string | undefined;
|
|
379
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
380
|
-
query: {
|
|
381
|
-
token: string;
|
|
382
|
-
callbackURL?: string | undefined;
|
|
383
|
-
};
|
|
384
|
-
fetchOptions?: FetchOptions | undefined;
|
|
385
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
386
|
-
success: boolean;
|
|
387
|
-
message: string;
|
|
388
|
-
}, {
|
|
389
|
-
code?: string | undefined;
|
|
390
|
-
message?: string | undefined;
|
|
391
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
392
|
-
};
|
|
270
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
271
|
+
} & {
|
|
393
272
|
requestPasswordReset: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
394
273
|
email: string;
|
|
395
274
|
redirectTo?: string | undefined;
|
|
@@ -405,6 +284,23 @@ declare const client: {
|
|
|
405
284
|
code?: string | undefined;
|
|
406
285
|
message?: string | undefined;
|
|
407
286
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
287
|
+
} & {
|
|
288
|
+
resetPassword: {
|
|
289
|
+
":token": <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
290
|
+
callbackURL: string;
|
|
291
|
+
}> & Record<string, any>, {
|
|
292
|
+
token: string;
|
|
293
|
+
}>>(data_0: better_auth.Prettify<{
|
|
294
|
+
query: {
|
|
295
|
+
callbackURL: string;
|
|
296
|
+
};
|
|
297
|
+
fetchOptions?: FetchOptions | undefined;
|
|
298
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<never, {
|
|
299
|
+
code?: string | undefined;
|
|
300
|
+
message?: string | undefined;
|
|
301
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
302
|
+
};
|
|
303
|
+
} & {
|
|
408
304
|
listSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
409
305
|
query?: Record<string, any> | undefined;
|
|
410
306
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -421,6 +317,7 @@ declare const client: {
|
|
|
421
317
|
code?: string | undefined;
|
|
422
318
|
message?: string | undefined;
|
|
423
319
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
320
|
+
} & {
|
|
424
321
|
revokeSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
425
322
|
token: string;
|
|
426
323
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
@@ -433,6 +330,7 @@ declare const client: {
|
|
|
433
330
|
code?: string | undefined;
|
|
434
331
|
message?: string | undefined;
|
|
435
332
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
333
|
+
} & {
|
|
436
334
|
revokeSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
437
335
|
query?: Record<string, any> | undefined;
|
|
438
336
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -442,6 +340,7 @@ declare const client: {
|
|
|
442
340
|
code?: string | undefined;
|
|
443
341
|
message?: string | undefined;
|
|
444
342
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
343
|
+
} & {
|
|
445
344
|
revokeOtherSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
446
345
|
query?: Record<string, any> | undefined;
|
|
447
346
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -451,6 +350,7 @@ declare const client: {
|
|
|
451
350
|
code?: string | undefined;
|
|
452
351
|
message?: string | undefined;
|
|
453
352
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
353
|
+
} & {
|
|
454
354
|
linkSocial: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
455
355
|
provider: unknown;
|
|
456
356
|
callbackURL?: string | undefined;
|
|
@@ -490,6 +390,7 @@ declare const client: {
|
|
|
490
390
|
code?: string | undefined;
|
|
491
391
|
message?: string | undefined;
|
|
492
392
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
393
|
+
} & {
|
|
493
394
|
listAccounts: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
494
395
|
query?: Record<string, any> | undefined;
|
|
495
396
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -505,6 +406,26 @@ declare const client: {
|
|
|
505
406
|
code?: string | undefined;
|
|
506
407
|
message?: string | undefined;
|
|
507
408
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
409
|
+
} & {
|
|
410
|
+
deleteUser: {
|
|
411
|
+
callback: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
412
|
+
token: string;
|
|
413
|
+
callbackURL?: string | undefined;
|
|
414
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
415
|
+
query: {
|
|
416
|
+
token: string;
|
|
417
|
+
callbackURL?: string | undefined;
|
|
418
|
+
};
|
|
419
|
+
fetchOptions?: FetchOptions | undefined;
|
|
420
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
421
|
+
success: boolean;
|
|
422
|
+
message: string;
|
|
423
|
+
}, {
|
|
424
|
+
code?: string | undefined;
|
|
425
|
+
message?: string | undefined;
|
|
426
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
427
|
+
};
|
|
428
|
+
} & {
|
|
508
429
|
unlinkAccount: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
509
430
|
providerId: string;
|
|
510
431
|
accountId?: string | undefined;
|
|
@@ -519,6 +440,7 @@ declare const client: {
|
|
|
519
440
|
code?: string | undefined;
|
|
520
441
|
message?: string | undefined;
|
|
521
442
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
443
|
+
} & {
|
|
522
444
|
refreshToken: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
523
445
|
providerId: string;
|
|
524
446
|
accountId?: string | undefined;
|
|
@@ -542,6 +464,7 @@ declare const client: {
|
|
|
542
464
|
code?: string | undefined;
|
|
543
465
|
message?: string | undefined;
|
|
544
466
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
467
|
+
} & {
|
|
545
468
|
getAccessToken: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
546
469
|
providerId: string;
|
|
547
470
|
accountId?: string | undefined;
|
|
@@ -561,6 +484,7 @@ declare const client: {
|
|
|
561
484
|
code?: string | undefined;
|
|
562
485
|
message?: string | undefined;
|
|
563
486
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
487
|
+
} & {
|
|
564
488
|
accountInfo: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
565
489
|
accountId?: string | undefined;
|
|
566
490
|
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
@@ -575,6 +499,7 @@ declare const client: {
|
|
|
575
499
|
code?: string | undefined;
|
|
576
500
|
message?: string | undefined;
|
|
577
501
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
502
|
+
} & {
|
|
578
503
|
getSession: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
579
504
|
disableCookieCache?: unknown;
|
|
580
505
|
disableRefresh?: unknown;
|
|
@@ -608,6 +533,7 @@ declare const client: {
|
|
|
608
533
|
code?: string | undefined;
|
|
609
534
|
message?: string | undefined;
|
|
610
535
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
536
|
+
} & {
|
|
611
537
|
useSession: () => nanostores.Atom<{
|
|
612
538
|
data: {
|
|
613
539
|
user: {
|
|
@@ -778,67 +704,11 @@ declare const client: {
|
|
|
778
704
|
};
|
|
779
705
|
};
|
|
780
706
|
/**
|
|
781
|
-
*
|
|
782
|
-
* Use this in your
|
|
707
|
+
* Client-side Auth instance.
|
|
708
|
+
* Use this in your Svelte components and client-side logic.
|
|
783
709
|
*/
|
|
784
|
-
declare const
|
|
785
|
-
|
|
786
|
-
* The underlying BetterAuth instance.
|
|
787
|
-
*/
|
|
788
|
-
auth: better_auth.Auth<{
|
|
789
|
-
database: (options: better_auth.BetterAuthOptions) => better_auth.DBAdapter<better_auth.BetterAuthOptions>;
|
|
790
|
-
baseURL: string | undefined;
|
|
791
|
-
secret: string | undefined;
|
|
792
|
-
trustedOrigins: string[] | undefined;
|
|
793
|
-
socialProviders: {
|
|
794
|
-
google: {
|
|
795
|
-
clientId: string;
|
|
796
|
-
clientSecret: string;
|
|
797
|
-
};
|
|
798
|
-
};
|
|
799
|
-
session: {
|
|
800
|
-
expiresIn: number;
|
|
801
|
-
updateAge: number;
|
|
802
|
-
cookieCache: {
|
|
803
|
-
enabled: true;
|
|
804
|
-
maxAge: number;
|
|
805
|
-
};
|
|
806
|
-
};
|
|
807
|
-
}>;
|
|
808
|
-
/**
|
|
809
|
-
* SvelteKit request handler for auth routes.
|
|
810
|
-
* Place this in `src/routes/api/auth/[...auth]/+server.ts`
|
|
811
|
-
*/
|
|
812
|
-
handler: {
|
|
813
|
-
GET: (event: {
|
|
814
|
-
request: Request;
|
|
815
|
-
}) => Response | Promise<Response>;
|
|
816
|
-
POST: (event: {
|
|
817
|
-
request: Request;
|
|
818
|
-
}) => Response | Promise<Response>;
|
|
819
|
-
};
|
|
820
|
-
/**
|
|
821
|
-
* Creates a SvelteKit handle hook for session management.
|
|
822
|
-
*/
|
|
823
|
-
createHandle: () => Handle;
|
|
824
|
-
/**
|
|
825
|
-
* Get session from request event.
|
|
826
|
-
*/
|
|
827
|
-
getSession: (event: RequestEvent) => Promise<SessionResult>;
|
|
828
|
-
/**
|
|
829
|
-
* Check if user is authenticated.
|
|
830
|
-
*/
|
|
831
|
-
isAuthenticated: (event: RequestEvent) => Promise<boolean>;
|
|
832
|
-
/**
|
|
833
|
-
* Wraps a function to ensure the user is authenticated before execution.
|
|
834
|
-
* Injects the user, session, and db into the first argument.
|
|
835
|
-
*/
|
|
836
|
-
makeAuthenticatedCall: <TArgs extends any[], TReturn>(fn: (ctx: {
|
|
837
|
-
user: SessionData["user"];
|
|
838
|
-
session: SessionData["session"];
|
|
839
|
-
db: typeof db;
|
|
840
|
-
event: RequestEvent;
|
|
841
|
-
}, ...args: TArgs) => Promise<TReturn>) => (event: RequestEvent, ...args: TArgs) => Promise<TReturn>;
|
|
710
|
+
declare const client: typeof authClient & {
|
|
711
|
+
login: typeof authClient.signIn;
|
|
842
712
|
};
|
|
843
713
|
|
|
844
|
-
export {
|
|
714
|
+
export { client };
|