@neondatabase/auth 0.1.0-beta.8 → 0.2.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.
Files changed (45) hide show
  1. package/README.md +108 -18
  2. package/dist/{adapter-core-Bw9mn_AS.d.mts → adapter-core-CnrOXh1T.d.mts} +246 -280
  3. package/dist/{adapter-core-C_NEMs0b.mjs → adapter-core-CtmnMMJ7.mjs} +392 -67
  4. package/dist/better-auth-react-adapter-DNi5PC5D.d.mts +2170 -0
  5. package/dist/{better-auth-react-adapter-BbM3jLLv.mjs → better-auth-react-adapter-Dv-o6A6O.mjs} +10 -8
  6. package/dist/{chunk-5DLVHPZS-Bxj7snpZ-DoVNlsyk.mjs → chunk-VCZJYX65-CLnrj1o7-D6ZQkcc_.mjs} +13 -3
  7. package/dist/constants-Cupc_bln.mjs +28 -0
  8. package/dist/index.d.mts +4 -98
  9. package/dist/index.mjs +2 -1
  10. package/dist/neon-auth-BEGCfAe6.d.mts +107 -0
  11. package/dist/{neon-auth-DdlToh7_.mjs → neon-auth-Cs2cWh1B.mjs} +7 -4
  12. package/dist/next/index.d.mts +61 -170
  13. package/dist/next/index.mjs +4 -311
  14. package/dist/next/server/index.d.mts +538 -0
  15. package/dist/next/server/index.mjs +1373 -0
  16. package/dist/react/adapters/index.d.mts +4 -4
  17. package/dist/react/adapters/index.mjs +2 -1
  18. package/dist/react/index.d.mts +5 -5
  19. package/dist/react/index.mjs +4 -3
  20. package/dist/react/ui/index.d.mts +1 -1
  21. package/dist/react/ui/index.mjs +2 -2
  22. package/dist/react/ui/server.mjs +1 -1
  23. package/dist/{supabase-adapter-CAqbpOC7.mjs → supabase-adapter-BlcGPyOf.mjs} +28 -45
  24. package/dist/supabase-adapter-DUqw2fw8.d.mts +2258 -0
  25. package/dist/types/index.d.mts +2 -7
  26. package/dist/ui/.safelist.html +3 -0
  27. package/dist/ui/css.css +2 -2
  28. package/dist/ui/tailwind.css +4 -3
  29. package/dist/ui/theme-inline.css +44 -0
  30. package/dist/ui/theme.css +221 -118
  31. package/dist/{ui-aMoA-9nq.mjs → ui-COLWzDsu.mjs} +6024 -3004
  32. package/dist/vanilla/adapters/index.d.mts +3 -3
  33. package/dist/vanilla/adapters/index.mjs +2 -1
  34. package/dist/vanilla/index.d.mts +3 -3
  35. package/dist/vanilla/index.mjs +2 -1
  36. package/llms.txt +330 -0
  37. package/package.json +17 -10
  38. package/dist/better-auth-react-adapter-JoscqoDc.d.mts +0 -722
  39. package/dist/better-auth-types-CE4hLv9E.d.mts +0 -9
  40. package/dist/supabase-adapter-Clxlqg1x.d.mts +0 -127
  41. /package/dist/{adapters-D0mxG3F-.mjs → adapters-B7YKkjaL.mjs} +0 -0
  42. /package/dist/{adapters-Df6Dd3KK.mjs → adapters-CivF9wql.mjs} +0 -0
  43. /package/dist/{index-ClXLQ1fw.d.mts → index-CPnFzULh.d.mts} +0 -0
  44. /package/dist/{index-BXlAjlSt.d.mts → index-CzsGMS7C.d.mts} +0 -0
  45. /package/dist/{index-DCQ5Y2ED.d.mts → index-OEBbnNdr.d.mts} +0 -0
@@ -0,0 +1,2258 @@
1
+ import { n as NeonAuthAdapterCoreAuthOptions, r as SupportedBetterAuthClientPlugins, t as NeonAuthAdapterCore } from "./adapter-core-CnrOXh1T.mjs";
2
+ import * as better_auth_client31 from "better-auth/client";
3
+ import { createAuthClient } from "better-auth/client";
4
+ import * as _supabase_auth_js0 from "@supabase/auth-js";
5
+ import { AuthClient, JwtHeader, JwtPayload } from "@supabase/auth-js";
6
+ import * as jose6 from "jose";
7
+ import * as better_auth492 from "better-auth";
8
+ import * as _better_fetch_fetch185 from "@better-fetch/fetch";
9
+ import * as better_auth_plugins34 from "better-auth/plugins";
10
+ import * as nanostores9 from "nanostores";
11
+
12
+ //#region src/adapters/better-auth-vanilla/better-auth-vanilla-adapter.d.ts
13
+ type BetterAuthVanillaAdapterOptions = Omit<NeonAuthAdapterCoreAuthOptions, 'baseURL'>;
14
+ /**
15
+ * Internal implementation class - use BetterAuthVanillaAdapter factory function instead
16
+ */
17
+ declare class BetterAuthVanillaAdapterImpl extends NeonAuthAdapterCore {
18
+ private _betterAuth;
19
+ constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
20
+ getBetterAuthInstance(): {
21
+ useActiveOrganization: nanostores9.PreinitializedWritableAtom<{
22
+ data: better_auth492.Prettify<{
23
+ id: string;
24
+ name: string;
25
+ slug: string;
26
+ createdAt: Date;
27
+ logo?: string | null | undefined | undefined;
28
+ metadata?: any;
29
+ } & {
30
+ members: {
31
+ id: string;
32
+ organizationId: string;
33
+ role: "admin" | "member" | "owner";
34
+ createdAt: Date;
35
+ userId: string;
36
+ user: {
37
+ id: string;
38
+ email: string;
39
+ name: string;
40
+ image?: string | undefined;
41
+ };
42
+ }[];
43
+ invitations: {
44
+ id: string;
45
+ organizationId: string;
46
+ email: string;
47
+ role: "admin" | "member" | "owner";
48
+ status: better_auth_client31.InvitationStatus;
49
+ inviterId: string;
50
+ expiresAt: Date;
51
+ createdAt: Date;
52
+ }[];
53
+ }> | null;
54
+ error: null | _better_fetch_fetch185.BetterFetchError;
55
+ isPending: boolean;
56
+ isRefetching: boolean;
57
+ refetch: (queryParams?: {
58
+ query?: better_auth492.SessionQueryParams;
59
+ } | undefined) => Promise<void>;
60
+ }> & object;
61
+ useListOrganizations: nanostores9.PreinitializedWritableAtom<{
62
+ data: {
63
+ id: string;
64
+ name: string;
65
+ slug: string;
66
+ createdAt: Date;
67
+ logo?: string | null | undefined | undefined;
68
+ metadata?: any;
69
+ }[] | null;
70
+ error: null | _better_fetch_fetch185.BetterFetchError;
71
+ isPending: boolean;
72
+ isRefetching: boolean;
73
+ refetch: (queryParams?: {
74
+ query?: better_auth492.SessionQueryParams;
75
+ } | undefined) => Promise<void>;
76
+ }> & object;
77
+ useActiveMember: nanostores9.PreinitializedWritableAtom<{
78
+ data: {
79
+ id: string;
80
+ organizationId: string;
81
+ userId: string;
82
+ role: string;
83
+ createdAt: Date;
84
+ } | null;
85
+ error: null | _better_fetch_fetch185.BetterFetchError;
86
+ isPending: boolean;
87
+ isRefetching: boolean;
88
+ refetch: (queryParams?: {
89
+ query?: better_auth492.SessionQueryParams;
90
+ } | undefined) => Promise<void>;
91
+ }> & object;
92
+ useActiveMemberRole: nanostores9.PreinitializedWritableAtom<{
93
+ data: {
94
+ role: string;
95
+ } | null;
96
+ error: null | _better_fetch_fetch185.BetterFetchError;
97
+ isPending: boolean;
98
+ isRefetching: boolean;
99
+ refetch: (queryParams?: {
100
+ query?: better_auth492.SessionQueryParams;
101
+ } | undefined) => Promise<void>;
102
+ }> & object;
103
+ } & {
104
+ token: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
105
+ query?: Record<string, any> | undefined;
106
+ fetchOptions?: FetchOptions | undefined;
107
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
108
+ token: string;
109
+ }, {
110
+ code?: string | undefined;
111
+ message?: string | undefined;
112
+ }, FetchOptions["throw"] extends true ? true : false>>;
113
+ } & {
114
+ admin: {
115
+ setRole: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
116
+ userId: string;
117
+ role: "user" | "admin" | ("user" | "admin")[];
118
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
119
+ userId: string;
120
+ role: "user" | "admin" | ("user" | "admin")[];
121
+ } & {
122
+ fetchOptions?: FetchOptions | undefined;
123
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
124
+ user: better_auth_plugins34.UserWithRole;
125
+ }, {
126
+ code?: string | undefined;
127
+ message?: string | undefined;
128
+ }, FetchOptions["throw"] extends true ? true : false>>;
129
+ };
130
+ } & {
131
+ admin: {
132
+ getUser: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
133
+ id: string;
134
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
135
+ query: {
136
+ id: string;
137
+ };
138
+ fetchOptions?: FetchOptions | undefined;
139
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
140
+ id: string;
141
+ createdAt: Date;
142
+ updatedAt: Date;
143
+ email: string;
144
+ emailVerified: boolean;
145
+ name: string;
146
+ image?: string | null | undefined;
147
+ }, {
148
+ code?: string | undefined;
149
+ message?: string | undefined;
150
+ }, FetchOptions["throw"] extends true ? true : false>>;
151
+ };
152
+ } & {
153
+ admin: {
154
+ createUser: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
155
+ email: string;
156
+ password: string;
157
+ name: string;
158
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
159
+ data?: Record<string, any> | undefined;
160
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
161
+ email: string;
162
+ password: string;
163
+ name: string;
164
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
165
+ data?: Record<string, any> | undefined;
166
+ } & {
167
+ fetchOptions?: FetchOptions | undefined;
168
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
169
+ user: better_auth_plugins34.UserWithRole;
170
+ }, {
171
+ code?: string | undefined;
172
+ message?: string | undefined;
173
+ }, FetchOptions["throw"] extends true ? true : false>>;
174
+ };
175
+ } & {
176
+ admin: {
177
+ updateUser: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
178
+ userId: unknown;
179
+ data: Record<any, any>;
180
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
181
+ userId: unknown;
182
+ data: Record<any, any>;
183
+ } & {
184
+ fetchOptions?: FetchOptions | undefined;
185
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<better_auth_plugins34.UserWithRole, {
186
+ code?: string | undefined;
187
+ message?: string | undefined;
188
+ }, FetchOptions["throw"] extends true ? true : false>>;
189
+ };
190
+ } & {
191
+ admin: {
192
+ listUsers: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
193
+ searchValue?: string | undefined;
194
+ searchField?: "email" | "name" | undefined;
195
+ searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
196
+ limit?: string | number | undefined;
197
+ offset?: string | number | undefined;
198
+ sortBy?: string | undefined;
199
+ sortDirection?: "asc" | "desc" | undefined;
200
+ filterField?: string | undefined;
201
+ filterValue?: string | number | boolean | undefined;
202
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
203
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
204
+ query: {
205
+ searchValue?: string | undefined;
206
+ searchField?: "email" | "name" | undefined;
207
+ searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
208
+ limit?: string | number | undefined;
209
+ offset?: string | number | undefined;
210
+ sortBy?: string | undefined;
211
+ sortDirection?: "asc" | "desc" | undefined;
212
+ filterField?: string | undefined;
213
+ filterValue?: string | number | boolean | undefined;
214
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
215
+ };
216
+ fetchOptions?: FetchOptions | undefined;
217
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<NonNullable<{
218
+ users: better_auth_plugins34.UserWithRole[];
219
+ total: number;
220
+ limit: number | undefined;
221
+ offset: number | undefined;
222
+ } | {
223
+ users: never[];
224
+ total: number;
225
+ }>, {
226
+ code?: string | undefined;
227
+ message?: string | undefined;
228
+ }, FetchOptions["throw"] extends true ? true : false>>;
229
+ };
230
+ } & {
231
+ admin: {
232
+ listUserSessions: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
233
+ userId: unknown;
234
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
235
+ userId: unknown;
236
+ } & {
237
+ fetchOptions?: FetchOptions | undefined;
238
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
239
+ sessions: better_auth_plugins34.SessionWithImpersonatedBy[];
240
+ }, {
241
+ code?: string | undefined;
242
+ message?: string | undefined;
243
+ }, FetchOptions["throw"] extends true ? true : false>>;
244
+ };
245
+ } & {
246
+ admin: {
247
+ unbanUser: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
248
+ userId: unknown;
249
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
250
+ userId: unknown;
251
+ } & {
252
+ fetchOptions?: FetchOptions | undefined;
253
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
254
+ user: {
255
+ id: string;
256
+ createdAt: Date;
257
+ updatedAt: Date;
258
+ email: string;
259
+ emailVerified: boolean;
260
+ name: string;
261
+ image?: string | null | undefined;
262
+ } & Record<string, any>;
263
+ }, {
264
+ code?: string | undefined;
265
+ message?: string | undefined;
266
+ }, FetchOptions["throw"] extends true ? true : false>>;
267
+ };
268
+ } & {
269
+ admin: {
270
+ banUser: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
271
+ userId: unknown;
272
+ banReason?: string | undefined;
273
+ banExpiresIn?: number | undefined;
274
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
275
+ userId: unknown;
276
+ banReason?: string | undefined;
277
+ banExpiresIn?: number | undefined;
278
+ } & {
279
+ fetchOptions?: FetchOptions | undefined;
280
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
281
+ user: {
282
+ id: string;
283
+ createdAt: Date;
284
+ updatedAt: Date;
285
+ email: string;
286
+ emailVerified: boolean;
287
+ name: string;
288
+ image?: string | null | undefined;
289
+ } & Record<string, any>;
290
+ }, {
291
+ code?: string | undefined;
292
+ message?: string | undefined;
293
+ }, FetchOptions["throw"] extends true ? true : false>>;
294
+ };
295
+ } & {
296
+ admin: {
297
+ impersonateUser: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
298
+ userId: unknown;
299
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
300
+ userId: unknown;
301
+ } & {
302
+ fetchOptions?: FetchOptions | undefined;
303
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
304
+ session: {
305
+ id: string;
306
+ createdAt: Date;
307
+ updatedAt: Date;
308
+ userId: string;
309
+ expiresAt: Date;
310
+ token: string;
311
+ ipAddress?: string | null | undefined;
312
+ userAgent?: string | null | undefined;
313
+ };
314
+ user: better_auth_plugins34.UserWithRole;
315
+ }, {
316
+ code?: string | undefined;
317
+ message?: string | undefined;
318
+ }, FetchOptions["throw"] extends true ? true : false>>;
319
+ };
320
+ } & {
321
+ admin: {
322
+ stopImpersonating: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
323
+ query?: Record<string, any> | undefined;
324
+ fetchOptions?: FetchOptions | undefined;
325
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
326
+ session: better_auth492.Session & Record<string, any>;
327
+ user: better_auth492.User & Record<string, any>;
328
+ }, {
329
+ code?: string | undefined;
330
+ message?: string | undefined;
331
+ }, FetchOptions["throw"] extends true ? true : false>>;
332
+ };
333
+ } & {
334
+ admin: {
335
+ revokeUserSession: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
336
+ sessionToken: string;
337
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
338
+ sessionToken: string;
339
+ } & {
340
+ fetchOptions?: FetchOptions | undefined;
341
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
342
+ success: boolean;
343
+ }, {
344
+ code?: string | undefined;
345
+ message?: string | undefined;
346
+ }, FetchOptions["throw"] extends true ? true : false>>;
347
+ };
348
+ } & {
349
+ admin: {
350
+ revokeUserSessions: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
351
+ userId: unknown;
352
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
353
+ userId: unknown;
354
+ } & {
355
+ fetchOptions?: FetchOptions | undefined;
356
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
357
+ success: boolean;
358
+ }, {
359
+ code?: string | undefined;
360
+ message?: string | undefined;
361
+ }, FetchOptions["throw"] extends true ? true : false>>;
362
+ };
363
+ } & {
364
+ admin: {
365
+ removeUser: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
366
+ userId: unknown;
367
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
368
+ userId: unknown;
369
+ } & {
370
+ fetchOptions?: FetchOptions | undefined;
371
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
372
+ success: boolean;
373
+ }, {
374
+ code?: string | undefined;
375
+ message?: string | undefined;
376
+ }, FetchOptions["throw"] extends true ? true : false>>;
377
+ };
378
+ } & {
379
+ admin: {
380
+ setUserPassword: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
381
+ newPassword: string;
382
+ userId: unknown;
383
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
384
+ newPassword: string;
385
+ userId: unknown;
386
+ } & {
387
+ fetchOptions?: FetchOptions | undefined;
388
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
389
+ status: boolean;
390
+ }, {
391
+ code?: string | undefined;
392
+ message?: string | undefined;
393
+ }, FetchOptions["throw"] extends true ? true : false>>;
394
+ };
395
+ } & {
396
+ admin: {
397
+ hasPermission: <FetchOptions extends better_auth492.ClientFetchOption<Partial<({
398
+ permission: {
399
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
400
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
401
+ };
402
+ permissions?: never | undefined;
403
+ } | {
404
+ permissions: {
405
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
406
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
407
+ };
408
+ permission?: never | undefined;
409
+ }) & {
410
+ userId?: string | undefined;
411
+ role?: "user" | "admin" | undefined;
412
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<(({
413
+ permission: {
414
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
415
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
416
+ };
417
+ permissions?: never | undefined;
418
+ } | {
419
+ permissions: {
420
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
421
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
422
+ };
423
+ permission?: never | undefined;
424
+ }) & {
425
+ userId?: string | undefined;
426
+ role?: "user" | "admin" | undefined;
427
+ }) & {
428
+ fetchOptions?: FetchOptions | undefined;
429
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
430
+ error: null;
431
+ success: boolean;
432
+ }, {
433
+ code?: string | undefined;
434
+ message?: string | undefined;
435
+ }, FetchOptions["throw"] extends true ? true : false>>;
436
+ };
437
+ } & {
438
+ organization: {
439
+ create: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
440
+ name: string;
441
+ slug: string;
442
+ userId?: string | undefined;
443
+ logo?: string | undefined;
444
+ metadata?: Record<string, any> | undefined;
445
+ keepCurrentActiveOrganization?: boolean | undefined;
446
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
447
+ name: string;
448
+ slug: string;
449
+ userId?: string | undefined;
450
+ logo?: string | undefined;
451
+ metadata?: Record<string, any> | undefined;
452
+ keepCurrentActiveOrganization?: boolean | undefined;
453
+ } & {
454
+ fetchOptions?: FetchOptions | undefined;
455
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
456
+ id: string;
457
+ name: string;
458
+ slug: string;
459
+ createdAt: Date;
460
+ logo?: string | null | undefined | undefined;
461
+ metadata?: any;
462
+ } & {
463
+ metadata: any;
464
+ members: ({
465
+ id: string;
466
+ organizationId: string;
467
+ userId: string;
468
+ role: string;
469
+ createdAt: Date;
470
+ } | undefined)[];
471
+ }, {
472
+ code?: string | undefined;
473
+ message?: string | undefined;
474
+ }, FetchOptions["throw"] extends true ? true : false>>;
475
+ };
476
+ } & {
477
+ organization: {
478
+ update: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
479
+ data: {
480
+ name?: string | undefined;
481
+ slug?: string | undefined;
482
+ logo?: string | undefined;
483
+ metadata?: Record<string, any> | undefined;
484
+ } & Partial<{}>;
485
+ organizationId?: string | undefined;
486
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
487
+ data: {
488
+ name?: string | undefined;
489
+ slug?: string | undefined;
490
+ logo?: string | undefined;
491
+ metadata?: Record<string, any> | undefined;
492
+ } & Partial<{}>;
493
+ organizationId?: string | undefined;
494
+ } & {
495
+ fetchOptions?: FetchOptions | undefined;
496
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
497
+ id: string;
498
+ name: string;
499
+ slug: string;
500
+ createdAt: Date;
501
+ logo?: string | null | undefined | undefined;
502
+ metadata?: any;
503
+ } & {
504
+ metadata: Record<string, any> | undefined;
505
+ }, {
506
+ code?: string | undefined;
507
+ message?: string | undefined;
508
+ }, FetchOptions["throw"] extends true ? true : false>>;
509
+ };
510
+ } & {
511
+ organization: {
512
+ delete: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
513
+ organizationId: string;
514
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
515
+ organizationId: string;
516
+ } & {
517
+ fetchOptions?: FetchOptions | undefined;
518
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
519
+ id: string;
520
+ name: string;
521
+ slug: string;
522
+ createdAt: Date;
523
+ logo?: string | null | undefined | undefined;
524
+ metadata?: any;
525
+ }, {
526
+ code?: string | undefined;
527
+ message?: string | undefined;
528
+ }, FetchOptions["throw"] extends true ? true : false>>;
529
+ };
530
+ } & {
531
+ organization: {
532
+ setActive: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
533
+ organizationId?: string | null | undefined;
534
+ organizationSlug?: string | undefined;
535
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
536
+ organizationId?: string | null | undefined;
537
+ organizationSlug?: string | undefined;
538
+ } & {
539
+ fetchOptions?: FetchOptions | undefined;
540
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
541
+ members: {
542
+ id: string;
543
+ organizationId: string;
544
+ role: "admin" | "member" | "owner";
545
+ createdAt: Date;
546
+ userId: string;
547
+ user: {
548
+ id: string;
549
+ email: string;
550
+ name: string;
551
+ image?: string | undefined;
552
+ };
553
+ }[];
554
+ invitations: {
555
+ id: string;
556
+ organizationId: string;
557
+ email: string;
558
+ role: "admin" | "member" | "owner";
559
+ status: better_auth_client31.InvitationStatus;
560
+ inviterId: string;
561
+ expiresAt: Date;
562
+ createdAt: Date;
563
+ }[];
564
+ } & {
565
+ id: string;
566
+ name: string;
567
+ slug: string;
568
+ createdAt: Date;
569
+ logo?: string | null | undefined | undefined;
570
+ metadata?: any;
571
+ }, {
572
+ code?: string | undefined;
573
+ message?: string | undefined;
574
+ }, FetchOptions["throw"] extends true ? true : false>>;
575
+ };
576
+ } & {
577
+ organization: {
578
+ getFullOrganization: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
579
+ organizationId?: string | undefined;
580
+ organizationSlug?: string | undefined;
581
+ membersLimit?: string | number | undefined;
582
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
583
+ query?: {
584
+ organizationId?: string | undefined;
585
+ organizationSlug?: string | undefined;
586
+ membersLimit?: string | number | undefined;
587
+ } | undefined;
588
+ fetchOptions?: FetchOptions | undefined;
589
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
590
+ members: {
591
+ id: string;
592
+ organizationId: string;
593
+ role: "admin" | "member" | "owner";
594
+ createdAt: Date;
595
+ userId: string;
596
+ user: {
597
+ id: string;
598
+ email: string;
599
+ name: string;
600
+ image?: string | undefined;
601
+ };
602
+ }[];
603
+ invitations: {
604
+ id: string;
605
+ organizationId: string;
606
+ email: string;
607
+ role: "admin" | "member" | "owner";
608
+ status: better_auth_client31.InvitationStatus;
609
+ inviterId: string;
610
+ expiresAt: Date;
611
+ createdAt: Date;
612
+ }[];
613
+ } & {
614
+ id: string;
615
+ name: string;
616
+ slug: string;
617
+ createdAt: Date;
618
+ logo?: string | null | undefined | undefined;
619
+ metadata?: any;
620
+ }, {
621
+ code?: string | undefined;
622
+ message?: string | undefined;
623
+ }, FetchOptions["throw"] extends true ? true : false>>;
624
+ };
625
+ } & {
626
+ organization: {
627
+ list: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
628
+ query?: Record<string, any> | undefined;
629
+ fetchOptions?: FetchOptions | undefined;
630
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
631
+ id: string;
632
+ name: string;
633
+ slug: string;
634
+ createdAt: Date;
635
+ logo?: string | null | undefined | undefined;
636
+ metadata?: any;
637
+ }[], {
638
+ code?: string | undefined;
639
+ message?: string | undefined;
640
+ }, FetchOptions["throw"] extends true ? true : false>>;
641
+ };
642
+ } & {
643
+ organization: {
644
+ inviteMember: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
645
+ email: string;
646
+ role: "admin" | "member" | "owner" | ("admin" | "member" | "owner")[];
647
+ organizationId?: string | undefined;
648
+ resend?: boolean | undefined;
649
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
650
+ email: string;
651
+ role: "admin" | "member" | "owner" | ("admin" | "member" | "owner")[];
652
+ organizationId?: string | undefined;
653
+ resend?: boolean | undefined;
654
+ } & {
655
+ fetchOptions?: FetchOptions | undefined;
656
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
657
+ id: string;
658
+ organizationId: string;
659
+ email: string;
660
+ role: "admin" | "member" | "owner";
661
+ status: better_auth_client31.InvitationStatus;
662
+ inviterId: string;
663
+ expiresAt: Date;
664
+ createdAt: Date;
665
+ }, {
666
+ code?: string | undefined;
667
+ message?: string | undefined;
668
+ }, FetchOptions["throw"] extends true ? true : false>>;
669
+ };
670
+ } & {
671
+ organization: {
672
+ cancelInvitation: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
673
+ invitationId: string;
674
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
675
+ invitationId: string;
676
+ } & {
677
+ fetchOptions?: FetchOptions | undefined;
678
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
679
+ id: string;
680
+ organizationId: string;
681
+ email: string;
682
+ role: "admin" | "member" | "owner";
683
+ status: better_auth_client31.InvitationStatus;
684
+ inviterId: string;
685
+ expiresAt: Date;
686
+ createdAt: Date;
687
+ }, {
688
+ code?: string | undefined;
689
+ message?: string | undefined;
690
+ }, FetchOptions["throw"] extends true ? true : false>>;
691
+ };
692
+ } & {
693
+ organization: {
694
+ acceptInvitation: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
695
+ invitationId: string;
696
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
697
+ invitationId: string;
698
+ } & {
699
+ fetchOptions?: FetchOptions | undefined;
700
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
701
+ invitation: {
702
+ id: string;
703
+ organizationId: string;
704
+ email: string;
705
+ role: "admin" | "member" | "owner";
706
+ status: better_auth_client31.InvitationStatus;
707
+ inviterId: string;
708
+ expiresAt: Date;
709
+ createdAt: Date;
710
+ };
711
+ member: {
712
+ id: string;
713
+ organizationId: string;
714
+ userId: string;
715
+ role: string;
716
+ createdAt: Date;
717
+ };
718
+ }, {
719
+ code?: string | undefined;
720
+ message?: string | undefined;
721
+ }, FetchOptions["throw"] extends true ? true : false>>;
722
+ };
723
+ } & {
724
+ organization: {
725
+ getInvitation: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
726
+ id: string;
727
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
728
+ query: {
729
+ id: string;
730
+ };
731
+ fetchOptions?: FetchOptions | undefined;
732
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<NonNullable<{
733
+ id: string;
734
+ organizationId: string;
735
+ email: string;
736
+ role: "admin" | "member" | "owner";
737
+ status: better_auth_client31.InvitationStatus;
738
+ inviterId: string;
739
+ expiresAt: Date;
740
+ createdAt: Date;
741
+ } & {
742
+ organizationName: string;
743
+ organizationSlug: string;
744
+ inviterEmail: string;
745
+ }>, {
746
+ code?: string | undefined;
747
+ message?: string | undefined;
748
+ }, FetchOptions["throw"] extends true ? true : false>>;
749
+ };
750
+ } & {
751
+ organization: {
752
+ rejectInvitation: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
753
+ invitationId: string;
754
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
755
+ invitationId: string;
756
+ } & {
757
+ fetchOptions?: FetchOptions | undefined;
758
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
759
+ invitation: {
760
+ id: string;
761
+ organizationId: string;
762
+ email: string;
763
+ role: "member" | "admin" | "owner";
764
+ status: better_auth_client31.InvitationStatus;
765
+ inviterId: string;
766
+ expiresAt: Date;
767
+ createdAt: Date;
768
+ } | null;
769
+ member: null;
770
+ }, {
771
+ code?: string | undefined;
772
+ message?: string | undefined;
773
+ }, FetchOptions["throw"] extends true ? true : false>>;
774
+ };
775
+ } & {
776
+ organization: {
777
+ listInvitations: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
778
+ organizationId?: string | undefined;
779
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
780
+ query?: {
781
+ organizationId?: string | undefined;
782
+ } | undefined;
783
+ fetchOptions?: FetchOptions | undefined;
784
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
785
+ id: string;
786
+ organizationId: string;
787
+ email: string;
788
+ role: "admin" | "member" | "owner";
789
+ status: better_auth_client31.InvitationStatus;
790
+ inviterId: string;
791
+ expiresAt: Date;
792
+ createdAt: Date;
793
+ }[], {
794
+ code?: string | undefined;
795
+ message?: string | undefined;
796
+ }, FetchOptions["throw"] extends true ? true : false>>;
797
+ };
798
+ } & {
799
+ organization: {
800
+ getActiveMember: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
801
+ query?: Record<string, any> | undefined;
802
+ fetchOptions?: FetchOptions | undefined;
803
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<Omit<{
804
+ id: string;
805
+ organizationId: string;
806
+ role: "admin" | "member" | "owner";
807
+ createdAt: Date;
808
+ userId: string;
809
+ user: {
810
+ id: string;
811
+ email: string;
812
+ name: string;
813
+ image?: string | undefined;
814
+ };
815
+ } & {
816
+ user: better_auth492.User;
817
+ }, "user"> & {
818
+ user: {
819
+ id: string;
820
+ name: string;
821
+ email: string;
822
+ image: string | undefined;
823
+ };
824
+ }, {
825
+ code?: string | undefined;
826
+ message?: string | undefined;
827
+ }, FetchOptions["throw"] extends true ? true : false>>;
828
+ };
829
+ } & {
830
+ organization: {
831
+ checkSlug: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
832
+ slug: string;
833
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
834
+ slug: string;
835
+ } & {
836
+ fetchOptions?: FetchOptions | undefined;
837
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
838
+ status: boolean;
839
+ }, {
840
+ code?: string | undefined;
841
+ message?: string | undefined;
842
+ }, FetchOptions["throw"] extends true ? true : false>>;
843
+ };
844
+ } & {
845
+ organization: {
846
+ removeMember: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
847
+ memberIdOrEmail: string;
848
+ organizationId?: string | undefined;
849
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
850
+ memberIdOrEmail: string;
851
+ organizationId?: string | undefined;
852
+ } & {
853
+ fetchOptions?: FetchOptions | undefined;
854
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
855
+ member: {
856
+ id: string;
857
+ organizationId: string;
858
+ role: "admin" | "member" | "owner";
859
+ createdAt: Date;
860
+ userId: string;
861
+ user: {
862
+ id: string;
863
+ email: string;
864
+ name: string;
865
+ image?: string | undefined;
866
+ };
867
+ };
868
+ }, {
869
+ code?: string | undefined;
870
+ message?: string | undefined;
871
+ }, FetchOptions["throw"] extends true ? true : false>>;
872
+ };
873
+ } & {
874
+ organization: {
875
+ updateMemberRole: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
876
+ role: better_auth492.LiteralString | "admin" | "member" | "owner" | ("admin" | "member" | "owner")[] | better_auth492.LiteralString[];
877
+ memberId: string;
878
+ organizationId?: string | undefined;
879
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
880
+ role: better_auth492.LiteralString | "admin" | "member" | "owner" | ("admin" | "member" | "owner")[] | better_auth492.LiteralString[];
881
+ memberId: string;
882
+ organizationId?: string | undefined;
883
+ } & {
884
+ fetchOptions?: FetchOptions | undefined;
885
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
886
+ id: string;
887
+ organizationId: string;
888
+ role: "member" | "admin" | "owner";
889
+ createdAt: Date;
890
+ userId: string;
891
+ user: {
892
+ id: string;
893
+ email: string;
894
+ name: string;
895
+ image?: string | undefined;
896
+ };
897
+ }, {
898
+ code?: string | undefined;
899
+ message?: string | undefined;
900
+ }, FetchOptions["throw"] extends true ? true : false>>;
901
+ };
902
+ } & {
903
+ organization: {
904
+ leave: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
905
+ organizationId: string;
906
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
907
+ organizationId: string;
908
+ } & {
909
+ fetchOptions?: FetchOptions | undefined;
910
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<NonNullable<Omit<{
911
+ id: string;
912
+ organizationId: string;
913
+ role: "admin" | "member" | "owner";
914
+ createdAt: Date;
915
+ userId: string;
916
+ user: {
917
+ id: string;
918
+ email: string;
919
+ name: string;
920
+ image?: string | undefined;
921
+ };
922
+ } & {
923
+ user: better_auth492.User;
924
+ }, "user"> & {
925
+ user: {
926
+ id: string;
927
+ name: string;
928
+ email: string;
929
+ image: string | undefined;
930
+ };
931
+ }>, {
932
+ code?: string | undefined;
933
+ message?: string | undefined;
934
+ }, FetchOptions["throw"] extends true ? true : false>>;
935
+ };
936
+ } & {
937
+ organization: {
938
+ listUserInvitations: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
939
+ email?: string | undefined;
940
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
941
+ query?: {
942
+ email?: string | undefined;
943
+ } | undefined;
944
+ fetchOptions?: FetchOptions | undefined;
945
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<(Omit<{
946
+ id: string;
947
+ organizationId: string;
948
+ email: string;
949
+ role: "admin" | "member" | "owner";
950
+ status: better_auth_client31.InvitationStatus;
951
+ inviterId: string;
952
+ expiresAt: Date;
953
+ createdAt: Date;
954
+ } & {
955
+ organization: {
956
+ id: string;
957
+ name: string;
958
+ slug: string;
959
+ createdAt: Date;
960
+ logo?: string | null | undefined | undefined;
961
+ metadata?: any;
962
+ };
963
+ }, "organization"> & {
964
+ organizationName: string;
965
+ })[], {
966
+ code?: string | undefined;
967
+ message?: string | undefined;
968
+ }, FetchOptions["throw"] extends true ? true : false>>;
969
+ };
970
+ } & {
971
+ organization: {
972
+ listMembers: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
973
+ limit?: string | number | undefined;
974
+ offset?: string | number | undefined;
975
+ sortBy?: string | undefined;
976
+ sortDirection?: "asc" | "desc" | undefined;
977
+ filterField?: string | undefined;
978
+ filterValue?: string | number | boolean | undefined;
979
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
980
+ organizationId?: string | undefined;
981
+ organizationSlug?: string | undefined;
982
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
983
+ query?: {
984
+ limit?: string | number | undefined;
985
+ offset?: string | number | undefined;
986
+ sortBy?: string | undefined;
987
+ sortDirection?: "asc" | "desc" | undefined;
988
+ filterField?: string | undefined;
989
+ filterValue?: string | number | boolean | undefined;
990
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
991
+ organizationId?: string | undefined;
992
+ organizationSlug?: string | undefined;
993
+ } | undefined;
994
+ fetchOptions?: FetchOptions | undefined;
995
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
996
+ members: ({
997
+ id: string;
998
+ organizationId: string;
999
+ role: "admin" | "member" | "owner";
1000
+ createdAt: Date;
1001
+ userId: string;
1002
+ user: {
1003
+ id: string;
1004
+ email: string;
1005
+ name: string;
1006
+ image?: string | undefined;
1007
+ };
1008
+ } & {
1009
+ user: {
1010
+ id: string;
1011
+ name: string;
1012
+ email: string;
1013
+ image: string | null | undefined;
1014
+ };
1015
+ })[];
1016
+ total: number;
1017
+ }, {
1018
+ code?: string | undefined;
1019
+ message?: string | undefined;
1020
+ }, FetchOptions["throw"] extends true ? true : false>>;
1021
+ };
1022
+ } & {
1023
+ organization: {
1024
+ getActiveMemberRole: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
1025
+ userId?: string | undefined;
1026
+ organizationId?: string | undefined;
1027
+ organizationSlug?: string | undefined;
1028
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1029
+ query?: {
1030
+ userId?: string | undefined;
1031
+ organizationId?: string | undefined;
1032
+ organizationSlug?: string | undefined;
1033
+ } | undefined;
1034
+ fetchOptions?: FetchOptions | undefined;
1035
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1036
+ role: "admin" | "member" | "owner";
1037
+ }, {
1038
+ code?: string | undefined;
1039
+ message?: string | undefined;
1040
+ }, FetchOptions["throw"] extends true ? true : false>>;
1041
+ };
1042
+ } & {
1043
+ organization: {
1044
+ hasPermission: <FetchOptions extends better_auth492.ClientFetchOption<Partial<({
1045
+ permission: {
1046
+ readonly organization?: ("delete" | "update")[] | undefined;
1047
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1048
+ readonly invitation?: ("cancel" | "create")[] | undefined;
1049
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1050
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1051
+ };
1052
+ permissions?: never | undefined;
1053
+ } | {
1054
+ permissions: {
1055
+ readonly organization?: ("delete" | "update")[] | undefined;
1056
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1057
+ readonly invitation?: ("cancel" | "create")[] | undefined;
1058
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1059
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1060
+ };
1061
+ permission?: never | undefined;
1062
+ }) & {
1063
+ organizationId?: string | undefined;
1064
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<(({
1065
+ permission: {
1066
+ readonly organization?: ("delete" | "update")[] | undefined;
1067
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1068
+ readonly invitation?: ("cancel" | "create")[] | undefined;
1069
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1070
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1071
+ };
1072
+ permissions?: never | undefined;
1073
+ } | {
1074
+ permissions: {
1075
+ readonly organization?: ("delete" | "update")[] | undefined;
1076
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1077
+ readonly invitation?: ("cancel" | "create")[] | undefined;
1078
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1079
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1080
+ };
1081
+ permission?: never | undefined;
1082
+ }) & {
1083
+ organizationId?: string | undefined;
1084
+ }) & {
1085
+ fetchOptions?: FetchOptions | undefined;
1086
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1087
+ error: null;
1088
+ success: boolean;
1089
+ }, {
1090
+ code?: string | undefined;
1091
+ message?: string | undefined;
1092
+ }, FetchOptions["throw"] extends true ? true : false>>;
1093
+ };
1094
+ } & {
1095
+ emailOtp: {
1096
+ sendVerificationOtp: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1097
+ email: string;
1098
+ type: "sign-in" | "email-verification" | "forget-password";
1099
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1100
+ email: string;
1101
+ type: "sign-in" | "email-verification" | "forget-password";
1102
+ } & {
1103
+ fetchOptions?: FetchOptions | undefined;
1104
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1105
+ success: boolean;
1106
+ }, {
1107
+ code?: string | undefined;
1108
+ message?: string | undefined;
1109
+ }, FetchOptions["throw"] extends true ? true : false>>;
1110
+ };
1111
+ } & {
1112
+ emailOtp: {
1113
+ checkVerificationOtp: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1114
+ email: string;
1115
+ type: "sign-in" | "email-verification" | "forget-password";
1116
+ otp: string;
1117
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1118
+ email: string;
1119
+ type: "sign-in" | "email-verification" | "forget-password";
1120
+ otp: string;
1121
+ } & {
1122
+ fetchOptions?: FetchOptions | undefined;
1123
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1124
+ success: boolean;
1125
+ }, {
1126
+ code?: string | undefined;
1127
+ message?: string | undefined;
1128
+ }, FetchOptions["throw"] extends true ? true : false>>;
1129
+ };
1130
+ } & {
1131
+ emailOtp: {
1132
+ verifyEmail: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1133
+ email: string;
1134
+ otp: string;
1135
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1136
+ email: string;
1137
+ otp: string;
1138
+ } & {
1139
+ fetchOptions?: FetchOptions | undefined;
1140
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<NonNullable<{
1141
+ status: boolean;
1142
+ token: string;
1143
+ user: {
1144
+ id: string;
1145
+ email: string;
1146
+ emailVerified: boolean;
1147
+ name: string;
1148
+ image: string | null | undefined;
1149
+ createdAt: Date;
1150
+ updatedAt: Date;
1151
+ };
1152
+ } | {
1153
+ status: boolean;
1154
+ token: null;
1155
+ user: {
1156
+ id: string;
1157
+ email: string;
1158
+ emailVerified: boolean;
1159
+ name: string;
1160
+ image: string | null | undefined;
1161
+ createdAt: Date;
1162
+ updatedAt: Date;
1163
+ };
1164
+ }>, {
1165
+ code?: string | undefined;
1166
+ message?: string | undefined;
1167
+ }, FetchOptions["throw"] extends true ? true : false>>;
1168
+ };
1169
+ } & {
1170
+ signIn: {
1171
+ emailOtp: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1172
+ email: string;
1173
+ otp: string;
1174
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1175
+ email: string;
1176
+ otp: string;
1177
+ } & {
1178
+ fetchOptions?: FetchOptions | undefined;
1179
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1180
+ token: string;
1181
+ user: {
1182
+ id: string;
1183
+ email: string;
1184
+ emailVerified: boolean;
1185
+ name: string;
1186
+ image: string | null | undefined;
1187
+ createdAt: Date;
1188
+ updatedAt: Date;
1189
+ };
1190
+ }, {
1191
+ code?: string | undefined;
1192
+ message?: string | undefined;
1193
+ }, FetchOptions["throw"] extends true ? true : false>>;
1194
+ };
1195
+ } & {
1196
+ forgetPassword: {
1197
+ emailOtp: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1198
+ email: string;
1199
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1200
+ email: string;
1201
+ } & {
1202
+ fetchOptions?: FetchOptions | undefined;
1203
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1204
+ success: boolean;
1205
+ }, {
1206
+ code?: string | undefined;
1207
+ message?: string | undefined;
1208
+ }, FetchOptions["throw"] extends true ? true : false>>;
1209
+ };
1210
+ } & {
1211
+ emailOtp: {
1212
+ resetPassword: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1213
+ email: string;
1214
+ otp: string;
1215
+ password: string;
1216
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1217
+ email: string;
1218
+ otp: string;
1219
+ password: string;
1220
+ } & {
1221
+ fetchOptions?: FetchOptions | undefined;
1222
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1223
+ success: boolean;
1224
+ }, {
1225
+ code?: string | undefined;
1226
+ message?: string | undefined;
1227
+ }, FetchOptions["throw"] extends true ? true : false>>;
1228
+ };
1229
+ } & {
1230
+ signIn: {
1231
+ social: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1232
+ 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";
1233
+ callbackURL?: string | undefined;
1234
+ newUserCallbackURL?: string | undefined;
1235
+ errorCallbackURL?: string | undefined;
1236
+ disableRedirect?: boolean | undefined;
1237
+ idToken?: {
1238
+ token: string;
1239
+ nonce?: string | undefined;
1240
+ accessToken?: string | undefined;
1241
+ refreshToken?: string | undefined;
1242
+ expiresAt?: number | undefined;
1243
+ } | undefined;
1244
+ scopes?: string[] | undefined;
1245
+ requestSignUp?: boolean | undefined;
1246
+ loginHint?: string | undefined;
1247
+ additionalData?: Record<string, any> | undefined;
1248
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1249
+ 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";
1250
+ callbackURL?: string | undefined;
1251
+ newUserCallbackURL?: string | undefined;
1252
+ errorCallbackURL?: string | undefined;
1253
+ disableRedirect?: boolean | undefined;
1254
+ idToken?: {
1255
+ token: string;
1256
+ nonce?: string | undefined;
1257
+ accessToken?: string | undefined;
1258
+ refreshToken?: string | undefined;
1259
+ expiresAt?: number | undefined;
1260
+ } | undefined;
1261
+ scopes?: string[] | undefined;
1262
+ requestSignUp?: boolean | undefined;
1263
+ loginHint?: string | undefined;
1264
+ additionalData?: Record<string, any> | undefined;
1265
+ } & {
1266
+ fetchOptions?: FetchOptions | undefined;
1267
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<NonNullable<{
1268
+ redirect: boolean;
1269
+ url: string;
1270
+ } | {
1271
+ redirect: boolean;
1272
+ token: string;
1273
+ url: undefined;
1274
+ user: {
1275
+ id: string;
1276
+ createdAt: Date;
1277
+ updatedAt: Date;
1278
+ email: string;
1279
+ emailVerified: boolean;
1280
+ name: string;
1281
+ image?: string | null | undefined | undefined;
1282
+ };
1283
+ }>, {
1284
+ code?: string | undefined;
1285
+ message?: string | undefined;
1286
+ }, FetchOptions["throw"] extends true ? true : false>>;
1287
+ };
1288
+ } & {
1289
+ signOut: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1290
+ query?: Record<string, any> | undefined;
1291
+ fetchOptions?: FetchOptions | undefined;
1292
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1293
+ success: boolean;
1294
+ }, {
1295
+ code?: string | undefined;
1296
+ message?: string | undefined;
1297
+ }, FetchOptions["throw"] extends true ? true : false>>;
1298
+ } & {
1299
+ signUp: {
1300
+ email: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1301
+ name: string;
1302
+ email: string;
1303
+ password: string;
1304
+ image?: string | undefined;
1305
+ callbackURL?: string | undefined;
1306
+ rememberMe?: boolean | undefined;
1307
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1308
+ email: string;
1309
+ name: string;
1310
+ password: string;
1311
+ image?: string | undefined;
1312
+ callbackURL?: string | undefined;
1313
+ fetchOptions?: FetchOptions | undefined;
1314
+ } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<NonNullable<{
1315
+ token: null;
1316
+ user: {
1317
+ id: string;
1318
+ createdAt: Date;
1319
+ updatedAt: Date;
1320
+ email: string;
1321
+ emailVerified: boolean;
1322
+ name: string;
1323
+ image?: string | null | undefined | undefined;
1324
+ };
1325
+ } | {
1326
+ token: string;
1327
+ user: {
1328
+ id: string;
1329
+ createdAt: Date;
1330
+ updatedAt: Date;
1331
+ email: string;
1332
+ emailVerified: boolean;
1333
+ name: string;
1334
+ image?: string | null | undefined | undefined;
1335
+ };
1336
+ }>, {
1337
+ code?: string | undefined;
1338
+ message?: string | undefined;
1339
+ }, FetchOptions["throw"] extends true ? true : false>>;
1340
+ };
1341
+ } & {
1342
+ signIn: {
1343
+ email: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1344
+ email: string;
1345
+ password: string;
1346
+ callbackURL?: string | undefined;
1347
+ rememberMe?: boolean | undefined;
1348
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1349
+ email: string;
1350
+ password: string;
1351
+ callbackURL?: string | undefined;
1352
+ rememberMe?: boolean | undefined;
1353
+ } & {
1354
+ fetchOptions?: FetchOptions | undefined;
1355
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1356
+ redirect: boolean;
1357
+ token: string;
1358
+ url?: string | undefined;
1359
+ user: {
1360
+ id: string;
1361
+ createdAt: Date;
1362
+ updatedAt: Date;
1363
+ email: string;
1364
+ emailVerified: boolean;
1365
+ name: string;
1366
+ image?: string | null | undefined | undefined;
1367
+ };
1368
+ }, {
1369
+ code?: string | undefined;
1370
+ message?: string | undefined;
1371
+ }, FetchOptions["throw"] extends true ? true : false>>;
1372
+ };
1373
+ } & {
1374
+ resetPassword: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1375
+ newPassword: string;
1376
+ token?: string | undefined;
1377
+ }> & Record<string, any>, Partial<{
1378
+ token?: string | undefined;
1379
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1380
+ newPassword: string;
1381
+ token?: string | undefined;
1382
+ } & {
1383
+ fetchOptions?: FetchOptions | undefined;
1384
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1385
+ status: boolean;
1386
+ }, {
1387
+ code?: string | undefined;
1388
+ message?: string | undefined;
1389
+ }, FetchOptions["throw"] extends true ? true : false>>;
1390
+ } & {
1391
+ verifyEmail: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
1392
+ token: string;
1393
+ callbackURL?: string | undefined;
1394
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1395
+ query: {
1396
+ token: string;
1397
+ callbackURL?: string | undefined;
1398
+ };
1399
+ fetchOptions?: FetchOptions | undefined;
1400
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<NonNullable<void | {
1401
+ status: boolean;
1402
+ }>, {
1403
+ code?: string | undefined;
1404
+ message?: string | undefined;
1405
+ }, FetchOptions["throw"] extends true ? true : false>>;
1406
+ } & {
1407
+ sendVerificationEmail: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1408
+ email: string;
1409
+ callbackURL?: string | undefined;
1410
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1411
+ email: string;
1412
+ callbackURL?: string | undefined;
1413
+ } & {
1414
+ fetchOptions?: FetchOptions | undefined;
1415
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1416
+ status: boolean;
1417
+ }, {
1418
+ code?: string | undefined;
1419
+ message?: string | undefined;
1420
+ }, FetchOptions["throw"] extends true ? true : false>>;
1421
+ } & {
1422
+ changeEmail: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1423
+ newEmail: string;
1424
+ callbackURL?: string | undefined;
1425
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1426
+ newEmail: string;
1427
+ callbackURL?: string | undefined;
1428
+ } & {
1429
+ fetchOptions?: FetchOptions | undefined;
1430
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1431
+ status: boolean;
1432
+ }, {
1433
+ code?: string | undefined;
1434
+ message?: string | undefined;
1435
+ }, FetchOptions["throw"] extends true ? true : false>>;
1436
+ } & {
1437
+ changePassword: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1438
+ newPassword: string;
1439
+ currentPassword: string;
1440
+ revokeOtherSessions?: boolean | undefined;
1441
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1442
+ newPassword: string;
1443
+ currentPassword: string;
1444
+ revokeOtherSessions?: boolean | undefined;
1445
+ } & {
1446
+ fetchOptions?: FetchOptions | undefined;
1447
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1448
+ token: string | null;
1449
+ user: {
1450
+ id: string;
1451
+ email: string;
1452
+ name: string;
1453
+ image: string | null | undefined;
1454
+ emailVerified: boolean;
1455
+ createdAt: Date;
1456
+ updatedAt: Date;
1457
+ };
1458
+ }, {
1459
+ code?: string | undefined;
1460
+ message?: string | undefined;
1461
+ }, FetchOptions["throw"] extends true ? true : false>>;
1462
+ } & {
1463
+ updateUser: <FetchOptions extends better_auth492.ClientFetchOption<Partial<Partial<{}> & {
1464
+ name?: string | undefined;
1465
+ image?: string | undefined | null;
1466
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1467
+ image?: (string | null) | undefined;
1468
+ name?: string | undefined;
1469
+ fetchOptions?: FetchOptions | undefined;
1470
+ } & Partial<{} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1471
+ status: boolean;
1472
+ }, {
1473
+ code?: string | undefined;
1474
+ message?: string | undefined;
1475
+ }, FetchOptions["throw"] extends true ? true : false>>;
1476
+ } & {
1477
+ deleteUser: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1478
+ callbackURL?: string | undefined;
1479
+ password?: string | undefined;
1480
+ token?: string | undefined;
1481
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1482
+ callbackURL?: string | undefined;
1483
+ password?: string | undefined;
1484
+ token?: string | undefined;
1485
+ } & {
1486
+ fetchOptions?: FetchOptions | undefined;
1487
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1488
+ success: boolean;
1489
+ message: string;
1490
+ }, {
1491
+ code?: string | undefined;
1492
+ message?: string | undefined;
1493
+ }, FetchOptions["throw"] extends true ? true : false>>;
1494
+ } & {
1495
+ requestPasswordReset: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1496
+ email: string;
1497
+ redirectTo?: string | undefined;
1498
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1499
+ email: string;
1500
+ redirectTo?: string | undefined;
1501
+ } & {
1502
+ fetchOptions?: FetchOptions | undefined;
1503
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1504
+ status: boolean;
1505
+ message: string;
1506
+ }, {
1507
+ code?: string | undefined;
1508
+ message?: string | undefined;
1509
+ }, FetchOptions["throw"] extends true ? true : false>>;
1510
+ } & {
1511
+ resetPassword: {
1512
+ ":token": <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
1513
+ callbackURL: string;
1514
+ }> & Record<string, any>, {
1515
+ token: string;
1516
+ }>>(data_0: better_auth492.Prettify<{
1517
+ query: {
1518
+ callbackURL: string;
1519
+ };
1520
+ fetchOptions?: FetchOptions | undefined;
1521
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<never, {
1522
+ code?: string | undefined;
1523
+ message?: string | undefined;
1524
+ }, FetchOptions["throw"] extends true ? true : false>>;
1525
+ };
1526
+ } & {
1527
+ listSessions: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1528
+ query?: Record<string, any> | undefined;
1529
+ fetchOptions?: FetchOptions | undefined;
1530
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<better_auth492.Prettify<{
1531
+ id: string;
1532
+ createdAt: Date;
1533
+ updatedAt: Date;
1534
+ userId: string;
1535
+ expiresAt: Date;
1536
+ token: string;
1537
+ ipAddress?: string | null | undefined | undefined;
1538
+ userAgent?: string | null | undefined | undefined;
1539
+ }>[], {
1540
+ code?: string | undefined;
1541
+ message?: string | undefined;
1542
+ }, FetchOptions["throw"] extends true ? true : false>>;
1543
+ } & {
1544
+ revokeSession: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1545
+ token: string;
1546
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1547
+ token: string;
1548
+ } & {
1549
+ fetchOptions?: FetchOptions | undefined;
1550
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1551
+ status: boolean;
1552
+ }, {
1553
+ code?: string | undefined;
1554
+ message?: string | undefined;
1555
+ }, FetchOptions["throw"] extends true ? true : false>>;
1556
+ } & {
1557
+ revokeSessions: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1558
+ query?: Record<string, any> | undefined;
1559
+ fetchOptions?: FetchOptions | undefined;
1560
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1561
+ status: boolean;
1562
+ }, {
1563
+ code?: string | undefined;
1564
+ message?: string | undefined;
1565
+ }, FetchOptions["throw"] extends true ? true : false>>;
1566
+ } & {
1567
+ revokeOtherSessions: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1568
+ query?: Record<string, any> | undefined;
1569
+ fetchOptions?: FetchOptions | undefined;
1570
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1571
+ status: boolean;
1572
+ }, {
1573
+ code?: string | undefined;
1574
+ message?: string | undefined;
1575
+ }, FetchOptions["throw"] extends true ? true : false>>;
1576
+ } & {
1577
+ linkSocial: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1578
+ provider: unknown;
1579
+ callbackURL?: string | undefined;
1580
+ idToken?: {
1581
+ token: string;
1582
+ nonce?: string | undefined;
1583
+ accessToken?: string | undefined;
1584
+ refreshToken?: string | undefined;
1585
+ scopes?: string[] | undefined;
1586
+ } | undefined;
1587
+ requestSignUp?: boolean | undefined;
1588
+ scopes?: string[] | undefined;
1589
+ errorCallbackURL?: string | undefined;
1590
+ disableRedirect?: boolean | undefined;
1591
+ additionalData?: Record<string, any> | undefined;
1592
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1593
+ provider: unknown;
1594
+ callbackURL?: string | undefined;
1595
+ idToken?: {
1596
+ token: string;
1597
+ nonce?: string | undefined;
1598
+ accessToken?: string | undefined;
1599
+ refreshToken?: string | undefined;
1600
+ scopes?: string[] | undefined;
1601
+ } | undefined;
1602
+ requestSignUp?: boolean | undefined;
1603
+ scopes?: string[] | undefined;
1604
+ errorCallbackURL?: string | undefined;
1605
+ disableRedirect?: boolean | undefined;
1606
+ additionalData?: Record<string, any> | undefined;
1607
+ } & {
1608
+ fetchOptions?: FetchOptions | undefined;
1609
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1610
+ url: string;
1611
+ redirect: boolean;
1612
+ }, {
1613
+ code?: string | undefined;
1614
+ message?: string | undefined;
1615
+ }, FetchOptions["throw"] extends true ? true : false>>;
1616
+ } & {
1617
+ listAccounts: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1618
+ query?: Record<string, any> | undefined;
1619
+ fetchOptions?: FetchOptions | undefined;
1620
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1621
+ id: string;
1622
+ providerId: string;
1623
+ createdAt: Date;
1624
+ updatedAt: Date;
1625
+ accountId: string;
1626
+ userId: string;
1627
+ scopes: string[];
1628
+ }[], {
1629
+ code?: string | undefined;
1630
+ message?: string | undefined;
1631
+ }, FetchOptions["throw"] extends true ? true : false>>;
1632
+ } & {
1633
+ deleteUser: {
1634
+ callback: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
1635
+ token: string;
1636
+ callbackURL?: string | undefined;
1637
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1638
+ query: {
1639
+ token: string;
1640
+ callbackURL?: string | undefined;
1641
+ };
1642
+ fetchOptions?: FetchOptions | undefined;
1643
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1644
+ success: boolean;
1645
+ message: string;
1646
+ }, {
1647
+ code?: string | undefined;
1648
+ message?: string | undefined;
1649
+ }, FetchOptions["throw"] extends true ? true : false>>;
1650
+ };
1651
+ } & {
1652
+ unlinkAccount: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1653
+ providerId: string;
1654
+ accountId?: string | undefined;
1655
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1656
+ providerId: string;
1657
+ accountId?: string | undefined;
1658
+ } & {
1659
+ fetchOptions?: FetchOptions | undefined;
1660
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1661
+ status: boolean;
1662
+ }, {
1663
+ code?: string | undefined;
1664
+ message?: string | undefined;
1665
+ }, FetchOptions["throw"] extends true ? true : false>>;
1666
+ } & {
1667
+ refreshToken: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1668
+ providerId: string;
1669
+ accountId?: string | undefined;
1670
+ userId?: string | undefined;
1671
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1672
+ providerId: string;
1673
+ accountId?: string | undefined;
1674
+ userId?: string | undefined;
1675
+ } & {
1676
+ fetchOptions?: FetchOptions | undefined;
1677
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1678
+ accessToken: string | undefined;
1679
+ refreshToken: string | undefined;
1680
+ accessTokenExpiresAt: Date | undefined;
1681
+ refreshTokenExpiresAt: Date | undefined;
1682
+ scope: string | null | undefined;
1683
+ idToken: string | null | undefined;
1684
+ providerId: string;
1685
+ accountId: string;
1686
+ }, {
1687
+ code?: string | undefined;
1688
+ message?: string | undefined;
1689
+ }, FetchOptions["throw"] extends true ? true : false>>;
1690
+ } & {
1691
+ getAccessToken: <FetchOptions extends better_auth492.ClientFetchOption<Partial<{
1692
+ providerId: string;
1693
+ accountId?: string | undefined;
1694
+ userId?: string | undefined;
1695
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth492.Prettify<{
1696
+ providerId: string;
1697
+ accountId?: string | undefined;
1698
+ userId?: string | undefined;
1699
+ } & {
1700
+ fetchOptions?: FetchOptions | undefined;
1701
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1702
+ accessToken: string;
1703
+ accessTokenExpiresAt: Date | undefined;
1704
+ scopes: string[];
1705
+ idToken: string | undefined;
1706
+ }, {
1707
+ code?: string | undefined;
1708
+ message?: string | undefined;
1709
+ }, FetchOptions["throw"] extends true ? true : false>>;
1710
+ } & {
1711
+ accountInfo: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
1712
+ accountId?: string | undefined;
1713
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1714
+ query?: {
1715
+ accountId?: string | undefined;
1716
+ } | undefined;
1717
+ fetchOptions?: FetchOptions | undefined;
1718
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1719
+ user: better_auth492.OAuth2UserInfo;
1720
+ data: Record<string, any>;
1721
+ }, {
1722
+ code?: string | undefined;
1723
+ message?: string | undefined;
1724
+ }, FetchOptions["throw"] extends true ? true : false>>;
1725
+ } & {
1726
+ getSession: <FetchOptions extends better_auth492.ClientFetchOption<never, Partial<{
1727
+ disableCookieCache?: unknown;
1728
+ disableRefresh?: unknown;
1729
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth492.Prettify<{
1730
+ query?: {
1731
+ disableCookieCache?: unknown;
1732
+ disableRefresh?: unknown;
1733
+ } | undefined;
1734
+ fetchOptions?: FetchOptions | undefined;
1735
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch185.BetterFetchResponse<{
1736
+ user: {
1737
+ id: string;
1738
+ createdAt: Date;
1739
+ updatedAt: Date;
1740
+ email: string;
1741
+ emailVerified: boolean;
1742
+ name: string;
1743
+ image?: string | null | undefined;
1744
+ banned: boolean | null | undefined;
1745
+ role?: string | null | undefined;
1746
+ banReason?: string | null | undefined;
1747
+ banExpires?: Date | null | undefined;
1748
+ };
1749
+ session: {
1750
+ id: string;
1751
+ createdAt: Date;
1752
+ updatedAt: Date;
1753
+ userId: string;
1754
+ expiresAt: Date;
1755
+ token: string;
1756
+ ipAddress?: string | null | undefined;
1757
+ userAgent?: string | null | undefined;
1758
+ impersonatedBy?: string | null | undefined;
1759
+ activeOrganizationId?: string | null | undefined;
1760
+ };
1761
+ } | null, {
1762
+ code?: string | undefined;
1763
+ message?: string | undefined;
1764
+ }, FetchOptions["throw"] extends true ? true : false>>;
1765
+ } & {
1766
+ getAnonymousToken: (fetchOptions?: any) => Promise<{
1767
+ data: {
1768
+ token: string;
1769
+ expires_at: number;
1770
+ };
1771
+ error: null;
1772
+ } | {
1773
+ data: null;
1774
+ error: {
1775
+ message?: string | undefined;
1776
+ status: number;
1777
+ statusText: string;
1778
+ };
1779
+ }>;
1780
+ } & {
1781
+ jwks: (fetchOptions?: any) => Promise<{
1782
+ data: null;
1783
+ error: {
1784
+ message?: string | undefined;
1785
+ status: number;
1786
+ statusText: string;
1787
+ };
1788
+ } | {
1789
+ data: jose6.JSONWebKeySet;
1790
+ error: null;
1791
+ }>;
1792
+ } & {
1793
+ admin: {
1794
+ checkRolePermission: <R extends "user" | "admin">(data: ({
1795
+ permission: {
1796
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1797
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1798
+ };
1799
+ permissions?: never | undefined;
1800
+ } | {
1801
+ permissions: {
1802
+ readonly user?: ("get" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "update")[] | undefined;
1803
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1804
+ };
1805
+ permission?: never | undefined;
1806
+ }) & {
1807
+ role: R;
1808
+ }) => boolean;
1809
+ };
1810
+ } & {
1811
+ $Infer: {
1812
+ ActiveOrganization: {
1813
+ members: {
1814
+ id: string;
1815
+ organizationId: string;
1816
+ role: "admin" | "member" | "owner";
1817
+ createdAt: Date;
1818
+ userId: string;
1819
+ user: {
1820
+ id: string;
1821
+ email: string;
1822
+ name: string;
1823
+ image?: string | undefined;
1824
+ };
1825
+ }[];
1826
+ invitations: {
1827
+ id: string;
1828
+ organizationId: string;
1829
+ email: string;
1830
+ role: "admin" | "member" | "owner";
1831
+ status: better_auth_client31.InvitationStatus;
1832
+ inviterId: string;
1833
+ expiresAt: Date;
1834
+ createdAt: Date;
1835
+ }[];
1836
+ } & {
1837
+ id: string;
1838
+ name: string;
1839
+ slug: string;
1840
+ createdAt: Date;
1841
+ logo?: string | null | undefined | undefined;
1842
+ metadata?: any;
1843
+ };
1844
+ Organization: {
1845
+ id: string;
1846
+ name: string;
1847
+ slug: string;
1848
+ createdAt: Date;
1849
+ logo?: string | null | undefined;
1850
+ metadata?: any;
1851
+ };
1852
+ Invitation: {
1853
+ id: string;
1854
+ organizationId: string;
1855
+ email: string;
1856
+ role: "admin" | "member" | "owner";
1857
+ status: better_auth_client31.InvitationStatus;
1858
+ inviterId: string;
1859
+ expiresAt: Date;
1860
+ createdAt: Date;
1861
+ };
1862
+ Member: {
1863
+ id: string;
1864
+ organizationId: string;
1865
+ role: "admin" | "member" | "owner";
1866
+ createdAt: Date;
1867
+ userId: string;
1868
+ user: {
1869
+ id: string;
1870
+ email: string;
1871
+ name: string;
1872
+ image?: string | undefined;
1873
+ };
1874
+ };
1875
+ Team: {
1876
+ id: string;
1877
+ name: string;
1878
+ organizationId: string;
1879
+ createdAt: Date;
1880
+ updatedAt?: Date | undefined;
1881
+ };
1882
+ };
1883
+ organization: {
1884
+ checkRolePermission: <R extends "admin" | "member" | "owner">(data: ({
1885
+ permission: {
1886
+ readonly organization?: ("delete" | "update")[] | undefined;
1887
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1888
+ readonly invitation?: ("cancel" | "create")[] | undefined;
1889
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1890
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1891
+ };
1892
+ permissions?: never | undefined;
1893
+ } | {
1894
+ permissions: {
1895
+ readonly organization?: ("delete" | "update")[] | undefined;
1896
+ readonly member?: ("delete" | "create" | "update")[] | undefined;
1897
+ readonly invitation?: ("cancel" | "create")[] | undefined;
1898
+ readonly team?: ("delete" | "create" | "update")[] | undefined;
1899
+ readonly ac?: ("delete" | "create" | "update" | "read")[] | undefined;
1900
+ };
1901
+ permission?: never | undefined;
1902
+ }) & {
1903
+ role: R;
1904
+ }) => boolean;
1905
+ };
1906
+ } & {
1907
+ useSession: nanostores9.Atom<{
1908
+ data: {
1909
+ user: {
1910
+ id: string;
1911
+ createdAt: Date;
1912
+ updatedAt: Date;
1913
+ email: string;
1914
+ emailVerified: boolean;
1915
+ name: string;
1916
+ image?: string | null | undefined;
1917
+ banned: boolean | null | undefined;
1918
+ role?: string | null | undefined;
1919
+ banReason?: string | null | undefined;
1920
+ banExpires?: Date | null | undefined;
1921
+ };
1922
+ session: {
1923
+ id: string;
1924
+ createdAt: Date;
1925
+ updatedAt: Date;
1926
+ userId: string;
1927
+ expiresAt: Date;
1928
+ token: string;
1929
+ ipAddress?: string | null | undefined;
1930
+ userAgent?: string | null | undefined;
1931
+ impersonatedBy?: string | null | undefined;
1932
+ activeOrganizationId?: string | null | undefined;
1933
+ };
1934
+ } | null;
1935
+ error: _better_fetch_fetch185.BetterFetchError | null;
1936
+ isPending: boolean;
1937
+ }>;
1938
+ $fetch: _better_fetch_fetch185.BetterFetch<{
1939
+ plugins: (_better_fetch_fetch185.BetterFetchPlugin | {
1940
+ id: string;
1941
+ name: string;
1942
+ hooks: {
1943
+ onSuccess(context: _better_fetch_fetch185.SuccessContext<any>): void;
1944
+ };
1945
+ } | {
1946
+ id: string;
1947
+ name: string;
1948
+ hooks: {
1949
+ onSuccess: ((context: _better_fetch_fetch185.SuccessContext<any>) => Promise<void> | void) | undefined;
1950
+ onError: ((context: _better_fetch_fetch185.ErrorContext) => Promise<void> | void) | undefined;
1951
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch185.RequestContext<T>) => Promise<_better_fetch_fetch185.RequestContext | void> | _better_fetch_fetch185.RequestContext | void) | undefined;
1952
+ onResponse: ((context: _better_fetch_fetch185.ResponseContext) => Promise<Response | void | _better_fetch_fetch185.ResponseContext> | Response | _better_fetch_fetch185.ResponseContext | void) | undefined;
1953
+ };
1954
+ })[];
1955
+ cache?: RequestCache | undefined;
1956
+ method: string;
1957
+ headers?: (HeadersInit & (HeadersInit | {
1958
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1959
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1960
+ authorization: "Bearer" | "Basic";
1961
+ })) | undefined;
1962
+ redirect?: RequestRedirect | undefined;
1963
+ credentials?: RequestCredentials;
1964
+ integrity?: string | undefined;
1965
+ keepalive?: boolean | undefined;
1966
+ mode?: RequestMode | undefined;
1967
+ priority?: RequestPriority | undefined;
1968
+ referrer?: string | undefined;
1969
+ referrerPolicy?: ReferrerPolicy | undefined;
1970
+ signal?: (AbortSignal | null) | undefined;
1971
+ window?: null | undefined;
1972
+ onRetry?: ((response: _better_fetch_fetch185.ResponseContext) => Promise<void> | void) | undefined;
1973
+ hookOptions?: {
1974
+ cloneResponse?: boolean;
1975
+ } | undefined;
1976
+ timeout?: number | undefined;
1977
+ customFetchImpl: _better_fetch_fetch185.FetchEsque;
1978
+ baseURL: string;
1979
+ throw?: boolean | undefined;
1980
+ auth?: ({
1981
+ type: "Bearer";
1982
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1983
+ } | {
1984
+ type: "Basic";
1985
+ username: string | (() => string | undefined) | undefined;
1986
+ password: string | (() => string | undefined) | undefined;
1987
+ } | {
1988
+ type: "Custom";
1989
+ prefix: string | (() => string | undefined) | undefined;
1990
+ value: string | (() => string | undefined) | undefined;
1991
+ }) | undefined;
1992
+ body?: any;
1993
+ query?: any;
1994
+ params?: any;
1995
+ duplex?: "full" | "half" | undefined;
1996
+ jsonParser: (text: string) => Promise<any> | any;
1997
+ retry?: _better_fetch_fetch185.RetryOptions | undefined;
1998
+ retryAttempt?: number | undefined;
1999
+ output?: (_better_fetch_fetch185.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2000
+ errorSchema?: _better_fetch_fetch185.StandardSchemaV1 | undefined;
2001
+ disableValidation?: boolean | undefined;
2002
+ disableSignal?: boolean | undefined;
2003
+ }, unknown, unknown, {}>;
2004
+ $store: {
2005
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
2006
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2007
+ atoms: Record<string, nanostores9.WritableAtom<any>>;
2008
+ };
2009
+ $Infer: {
2010
+ Session: {
2011
+ user: {
2012
+ id: string;
2013
+ createdAt: Date;
2014
+ updatedAt: Date;
2015
+ email: string;
2016
+ emailVerified: boolean;
2017
+ name: string;
2018
+ image?: string | null | undefined;
2019
+ banned: boolean | null | undefined;
2020
+ role?: string | null | undefined;
2021
+ banReason?: string | null | undefined;
2022
+ banExpires?: Date | null | undefined;
2023
+ };
2024
+ session: {
2025
+ id: string;
2026
+ createdAt: Date;
2027
+ updatedAt: Date;
2028
+ userId: string;
2029
+ expiresAt: Date;
2030
+ token: string;
2031
+ ipAddress?: string | null | undefined;
2032
+ userAgent?: string | null | undefined;
2033
+ impersonatedBy?: string | null | undefined;
2034
+ activeOrganizationId?: string | null | undefined;
2035
+ };
2036
+ };
2037
+ };
2038
+ $ERROR_CODES: {
2039
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
2040
+ readonly USER_ALREADY_EXISTS: "User already exists.";
2041
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2042
+ readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
2043
+ readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
2044
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
2045
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
2046
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
2047
+ readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
2048
+ readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
2049
+ readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
2050
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
2051
+ readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
2052
+ readonly BANNED_USER: "You have been banned from this application";
2053
+ readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
2054
+ readonly NO_DATA_TO_UPDATE: "No data to update";
2055
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
2056
+ readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
2057
+ readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
2058
+ readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
2059
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
2060
+ readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
2061
+ readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
2062
+ readonly ORGANIZATION_SLUG_ALREADY_TAKEN: "Organization slug already taken";
2063
+ readonly ORGANIZATION_NOT_FOUND: "Organization not found";
2064
+ readonly USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: "User is not a member of the organization";
2065
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: "You are not allowed to update this organization";
2066
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: "You are not allowed to delete this organization";
2067
+ readonly NO_ACTIVE_ORGANIZATION: "No active organization";
2068
+ readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: "User is already a member of this organization";
2069
+ readonly MEMBER_NOT_FOUND: "Member not found";
2070
+ readonly ROLE_NOT_FOUND: "Role not found";
2071
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: "You are not allowed to create a new team";
2072
+ readonly TEAM_ALREADY_EXISTS: "Team already exists";
2073
+ readonly TEAM_NOT_FOUND: "Team not found";
2074
+ readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: "You cannot leave the organization as the only owner";
2075
+ readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: "You cannot leave the organization without an owner";
2076
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: "You are not allowed to delete this member";
2077
+ readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: "You are not allowed to invite users to this organization";
2078
+ readonly USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: "User is already invited to this organization";
2079
+ readonly INVITATION_NOT_FOUND: "Invitation not found";
2080
+ readonly YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: "You are not the recipient of the invitation";
2081
+ readonly EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: "Email verification required before accepting or rejecting invitation";
2082
+ readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: "You are not allowed to cancel this invitation";
2083
+ readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: "Inviter is no longer a member of the organization";
2084
+ readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: "You are not allowed to invite a user with this role";
2085
+ readonly FAILED_TO_RETRIEVE_INVITATION: "Failed to retrieve invitation";
2086
+ readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: "You have reached the maximum number of teams";
2087
+ readonly UNABLE_TO_REMOVE_LAST_TEAM: "Unable to remove last team";
2088
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: "You are not allowed to update this member";
2089
+ readonly ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: "Organization membership limit reached";
2090
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to create teams in this organization";
2091
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to delete teams in this organization";
2092
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: "You are not allowed to update this team";
2093
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: "You are not allowed to delete this team";
2094
+ readonly INVITATION_LIMIT_REACHED: "Invitation limit reached";
2095
+ readonly TEAM_MEMBER_LIMIT_REACHED: "Team member limit reached";
2096
+ readonly USER_IS_NOT_A_MEMBER_OF_THE_TEAM: "User is not a member of the team";
2097
+ readonly YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: "You are not allowed to list the members of this team";
2098
+ readonly YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: "You do not have an active team";
2099
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: "You are not allowed to create a new member";
2100
+ readonly YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: "You are not allowed to remove a team member";
2101
+ readonly YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: "You are not allowed to access this organization as an owner";
2102
+ readonly YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: "You are not a member of this organization";
2103
+ readonly MISSING_AC_INSTANCE: "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information";
2104
+ readonly YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: "You must be in an organization to create a role";
2105
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: "You are not allowed to create a role";
2106
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: "You are not allowed to update a role";
2107
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: "You are not allowed to delete a role";
2108
+ readonly YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: "You are not allowed to read a role";
2109
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: "You are not allowed to list a role";
2110
+ readonly YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: "You are not allowed to get a role";
2111
+ readonly TOO_MANY_ROLES: "This organization has too many roles";
2112
+ readonly INVALID_RESOURCE: "The provided permission includes an invalid resource";
2113
+ readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
2114
+ readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
2115
+ readonly OTP_EXPIRED: "OTP expired";
2116
+ readonly INVALID_OTP: "Invalid OTP";
2117
+ readonly TOO_MANY_ATTEMPTS: "Too many attempts";
2118
+ readonly USER_NOT_FOUND: "User not found";
2119
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2120
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
2121
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
2122
+ readonly INVALID_PASSWORD: "Invalid password";
2123
+ readonly INVALID_EMAIL: "Invalid email";
2124
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
2125
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
2126
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
2127
+ readonly INVALID_TOKEN: "Invalid token";
2128
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
2129
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
2130
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
2131
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
2132
+ readonly PASSWORD_TOO_SHORT: "Password too short";
2133
+ readonly PASSWORD_TOO_LONG: "Password too long";
2134
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
2135
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
2136
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
2137
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
2138
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
2139
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
2140
+ };
2141
+ };
2142
+ }
2143
+ /** Instance type for BetterAuthVanillaAdapter */
2144
+ type BetterAuthVanillaAdapterInstance = BetterAuthVanillaAdapterImpl;
2145
+ /** Builder type that creates adapter instances */
2146
+ type BetterAuthVanillaAdapterBuilder = (url: string, fetchOptions?: {
2147
+ headers?: Record<string, string>;
2148
+ }) => BetterAuthVanillaAdapterInstance;
2149
+ /**
2150
+ * Factory function that returns an adapter builder.
2151
+ * The builder is called by createClient/createAuthClient with the URL.
2152
+ *
2153
+ * @param options - Optional adapter configuration (baseURL is injected separately)
2154
+ * @returns A builder function that creates the adapter instance
2155
+ *
2156
+ * @example
2157
+ * ```typescript
2158
+ * const client = createClient({
2159
+ * auth: {
2160
+ * url: 'https://auth.example.com',
2161
+ * adapter: BetterAuthVanillaAdapter(),
2162
+ * },
2163
+ * dataApi: { url: 'https://data-api.example.com' },
2164
+ * });
2165
+ * ```
2166
+ */
2167
+ declare function BetterAuthVanillaAdapter(options?: BetterAuthVanillaAdapterOptions): BetterAuthVanillaAdapterBuilder;
2168
+ //#endregion
2169
+ //#region src/adapters/supabase/auth-interface.d.ts
2170
+ type _UpstreamAuthClientInstance = InstanceType<typeof AuthClient>;
2171
+ type _AuthClientBase = { [K in keyof _UpstreamAuthClientInstance as _UpstreamAuthClientInstance[K] extends never ? never : K]: _UpstreamAuthClientInstance[K] };
2172
+ type SupabaseAuthClientInterface = _AuthClientBase;
2173
+ //#endregion
2174
+ //#region src/adapters/supabase/supabase-adapter.d.ts
2175
+ type SupabaseAuthAdapterOptions = Omit<NeonAuthAdapterCoreAuthOptions, 'baseURL'>;
2176
+ /**
2177
+ * Internal implementation class - use SupabaseAuthAdapter factory function instead
2178
+ */
2179
+ declare class SupabaseAuthAdapterImpl extends NeonAuthAdapterCore implements SupabaseAuthClientInterface {
2180
+ admin: SupabaseAuthClientInterface['admin'];
2181
+ mfa: SupabaseAuthClientInterface['mfa'];
2182
+ oauth: SupabaseAuthClientInterface['oauth'];
2183
+ private _betterAuth;
2184
+ private _stateChangeEmitters;
2185
+ constructor(betterAuthClientOptions: NeonAuthAdapterCoreAuthOptions);
2186
+ getBetterAuthInstance(): ReturnType<typeof createAuthClient<{
2187
+ plugins: SupportedBetterAuthClientPlugins;
2188
+ }>>;
2189
+ initialize: SupabaseAuthClientInterface['initialize'];
2190
+ getSession(options?: {
2191
+ forceFetch?: boolean;
2192
+ }): ReturnType<SupabaseAuthClientInterface['getSession']>;
2193
+ refreshSession: SupabaseAuthClientInterface['refreshSession'];
2194
+ setSession: SupabaseAuthClientInterface['setSession'];
2195
+ signUp: SupabaseAuthClientInterface['signUp'];
2196
+ signInAnonymously: SupabaseAuthClientInterface['signInAnonymously'];
2197
+ signInWithPassword: SupabaseAuthClientInterface['signInWithPassword'];
2198
+ signInWithOAuth: SupabaseAuthClientInterface['signInWithOAuth'];
2199
+ signInWithOtp: SupabaseAuthClientInterface['signInWithOtp'];
2200
+ signInWithIdToken: SupabaseAuthClientInterface['signInWithIdToken'];
2201
+ signInWithSSO: SupabaseAuthClientInterface['signInWithSSO'];
2202
+ signInWithWeb3: SupabaseAuthClientInterface['signInWithWeb3'];
2203
+ signOut: SupabaseAuthClientInterface['signOut'];
2204
+ getUser: SupabaseAuthClientInterface['getUser'];
2205
+ getClaims: (jwtArg?: string) => Promise<{
2206
+ data: {
2207
+ header: JwtHeader;
2208
+ claims: JwtPayload;
2209
+ signature: Uint8Array<ArrayBufferLike>;
2210
+ };
2211
+ error: null;
2212
+ } | {
2213
+ data: null;
2214
+ error: _supabase_auth_js0.AuthError;
2215
+ }>;
2216
+ updateUser: SupabaseAuthClientInterface['updateUser'];
2217
+ getUserIdentities: SupabaseAuthClientInterface['getUserIdentities'];
2218
+ linkIdentity: SupabaseAuthClientInterface['linkIdentity'];
2219
+ unlinkIdentity: SupabaseAuthClientInterface['unlinkIdentity'];
2220
+ verifyOtp: SupabaseAuthClientInterface['verifyOtp'];
2221
+ resetPasswordForEmail: SupabaseAuthClientInterface['resetPasswordForEmail'];
2222
+ reauthenticate: SupabaseAuthClientInterface['reauthenticate'];
2223
+ resend: SupabaseAuthClientInterface['resend'];
2224
+ exchangeCodeForSession: SupabaseAuthClientInterface['exchangeCodeForSession'];
2225
+ onAuthStateChange: SupabaseAuthClientInterface['onAuthStateChange'];
2226
+ isThrowOnErrorEnabled: SupabaseAuthClientInterface['isThrowOnErrorEnabled'];
2227
+ startAutoRefresh: SupabaseAuthClientInterface['startAutoRefresh'];
2228
+ stopAutoRefresh: SupabaseAuthClientInterface['stopAutoRefresh'];
2229
+ private verifyEmailOtp;
2230
+ private emitInitialSession;
2231
+ }
2232
+ /** Instance type for SupabaseAuthAdapter */
2233
+ type SupabaseAuthAdapterInstance = SupabaseAuthAdapterImpl;
2234
+ /** Builder type that creates adapter instances */
2235
+ type SupabaseAuthAdapterBuilder = (url: string, fetchOptions?: {
2236
+ headers?: Record<string, string>;
2237
+ }) => SupabaseAuthAdapterInstance;
2238
+ /**
2239
+ * Factory function that returns an adapter builder.
2240
+ * The builder is called by createClient/createAuthClient with the URL.
2241
+ *
2242
+ * @param options - Optional adapter configuration (baseURL is injected separately)
2243
+ * @returns A builder function that creates the adapter instance
2244
+ *
2245
+ * @example
2246
+ * ```typescript
2247
+ * const client = createClient({
2248
+ * auth: {
2249
+ * url: 'https://auth.example.com',
2250
+ * adapter: SupabaseAuthAdapter(),
2251
+ * },
2252
+ * dataApi: { url: 'https://data-api.example.com' },
2253
+ * });
2254
+ * ```
2255
+ */
2256
+ declare function SupabaseAuthAdapter(options?: SupabaseAuthAdapterOptions): SupabaseAuthAdapterBuilder;
2257
+ //#endregion
2258
+ export { BetterAuthVanillaAdapter as a, BetterAuthVanillaAdapterOptions as c, SupabaseAuthAdapterOptions as i, SupabaseAuthAdapterBuilder as n, BetterAuthVanillaAdapterBuilder as o, SupabaseAuthAdapterInstance as r, BetterAuthVanillaAdapterInstance as s, SupabaseAuthAdapter as t };