@m5kdev/frontend 0.20.49 → 0.21.0

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 (134) hide show
  1. package/dist/src/index.d.mts +25 -0
  2. package/dist/src/index.d.ts +25 -0
  3. package/dist/src/index.js +83 -0
  4. package/dist/src/index.mjs +25 -0
  5. package/dist/src/modules/auth/auth.client.d.mts +708 -0
  6. package/dist/src/modules/auth/auth.client.d.mts.map +1 -0
  7. package/dist/src/modules/auth/auth.client.d.ts +708 -0
  8. package/dist/src/modules/auth/auth.client.d.ts.map +1 -0
  9. package/dist/src/modules/auth/auth.client.js +72 -0
  10. package/dist/src/modules/auth/auth.client.js.map +1 -0
  11. package/dist/src/modules/auth/auth.client.mjs +71 -0
  12. package/dist/src/modules/auth/auth.client.mjs.map +1 -0
  13. package/dist/src/modules/auth/auth.context.d.mts +15 -0
  14. package/dist/src/modules/auth/auth.context.d.mts.map +1 -0
  15. package/dist/src/modules/auth/auth.context.d.ts +15 -0
  16. package/dist/src/modules/auth/auth.context.d.ts.map +1 -0
  17. package/dist/src/modules/auth/auth.context.js +13 -0
  18. package/dist/src/modules/auth/auth.context.js.map +1 -0
  19. package/dist/src/modules/auth/auth.context.mjs +13 -0
  20. package/dist/src/modules/auth/auth.context.mjs.map +1 -0
  21. package/dist/src/modules/auth/auth.lib.d.mts +1251 -1380
  22. package/dist/src/modules/auth/auth.lib.d.mts.map +1 -1
  23. package/dist/src/modules/auth/auth.lib.d.ts +1251 -1380
  24. package/dist/src/modules/auth/auth.lib.d.ts.map +1 -1
  25. package/dist/src/modules/auth/auth.lib.js +18 -63
  26. package/dist/src/modules/auth/auth.lib.js.map +1 -1
  27. package/dist/src/modules/auth/auth.lib.mjs +10 -64
  28. package/dist/src/modules/auth/auth.lib.mjs.map +1 -1
  29. package/dist/src/modules/auth/components/AuthProvider.d.mts +9 -10
  30. package/dist/src/modules/auth/components/AuthProvider.d.mts.map +1 -1
  31. package/dist/src/modules/auth/components/AuthProvider.d.ts +9 -10
  32. package/dist/src/modules/auth/components/AuthProvider.d.ts.map +1 -1
  33. package/dist/src/modules/auth/components/AuthProvider.js +20 -42
  34. package/dist/src/modules/auth/components/AuthProvider.js.map +1 -1
  35. package/dist/src/modules/auth/components/AuthProvider.mjs +22 -43
  36. package/dist/src/modules/auth/components/AuthProvider.mjs.map +1 -1
  37. package/dist/src/modules/auth/hooks/useAuth.d.mts.map +1 -1
  38. package/dist/src/modules/auth/hooks/useAuth.d.ts.map +1 -1
  39. package/dist/src/modules/auth/hooks/useAuth.js +5 -3
  40. package/dist/src/modules/auth/hooks/useAuth.js.map +1 -1
  41. package/dist/src/modules/auth/hooks/useAuth.mjs +3 -1
  42. package/dist/src/modules/auth/hooks/useAuth.mjs.map +1 -1
  43. package/dist/src/modules/auth/hooks/useAuthAdmin.d.mts +10 -19
  44. package/dist/src/modules/auth/hooks/useAuthAdmin.d.mts.map +1 -1
  45. package/dist/src/modules/auth/hooks/useAuthAdmin.d.ts +10 -19
  46. package/dist/src/modules/auth/hooks/useAuthAdmin.d.ts.map +1 -1
  47. package/dist/src/modules/auth/hooks/useAuthAdmin.js +20 -12
  48. package/dist/src/modules/auth/hooks/useAuthAdmin.js.map +1 -1
  49. package/dist/src/modules/auth/hooks/useAuthAdmin.mjs +14 -6
  50. package/dist/src/modules/auth/hooks/useAuthAdmin.mjs.map +1 -1
  51. package/dist/src/modules/auth/hooks/useAuthClient.d.mts +707 -0
  52. package/dist/src/modules/auth/hooks/useAuthClient.d.mts.map +1 -0
  53. package/dist/src/modules/auth/hooks/useAuthClient.d.ts +707 -0
  54. package/dist/src/modules/auth/hooks/useAuthClient.d.ts.map +1 -0
  55. package/dist/src/modules/auth/hooks/useAuthClient.js +12 -0
  56. package/dist/src/modules/auth/hooks/useAuthClient.js.map +1 -0
  57. package/dist/src/modules/auth/hooks/useAuthClient.mjs +11 -0
  58. package/dist/src/modules/auth/hooks/useAuthClient.mjs.map +1 -0
  59. package/dist/src/modules/auth/hooks/useMemberInvite.js +3 -2
  60. package/dist/src/modules/auth/hooks/useMemberInvite.js.map +1 -1
  61. package/dist/src/modules/auth/hooks/useMemberInvite.mjs +2 -1
  62. package/dist/src/modules/auth/hooks/useMemberInvite.mjs.map +1 -1
  63. package/dist/src/modules/auth/hooks/useOrganizationAccess.d.mts +1 -1
  64. package/dist/src/modules/auth/hooks/useOrganizationAccess.d.ts +1 -1
  65. package/dist/src/modules/auth/hooks/useSession.d.mts +4 -37
  66. package/dist/src/modules/auth/hooks/useSession.d.mts.map +1 -1
  67. package/dist/src/modules/auth/hooks/useSession.d.ts +4 -37
  68. package/dist/src/modules/auth/hooks/useSession.d.ts.map +1 -1
  69. package/dist/src/modules/auth/hooks/useSession.js +3 -2
  70. package/dist/src/modules/auth/hooks/useSession.js.map +1 -1
  71. package/dist/src/modules/auth/hooks/useSession.mjs +3 -2
  72. package/dist/src/modules/auth/hooks/useSession.mjs.map +1 -1
  73. package/dist/src/modules/file/hooks/useS3Upload.d.mts +15 -2
  74. package/dist/src/modules/file/hooks/useS3Upload.d.mts.map +1 -1
  75. package/dist/src/modules/file/hooks/useS3Upload.d.ts +15 -2
  76. package/dist/src/modules/file/hooks/useS3Upload.d.ts.map +1 -1
  77. package/dist/src/modules/file/hooks/useS3Upload.js +29 -4
  78. package/dist/src/modules/file/hooks/useS3Upload.js.map +1 -1
  79. package/dist/src/modules/file/hooks/useS3Upload.mjs +29 -5
  80. package/dist/src/modules/file/hooks/useS3Upload.mjs.map +1 -1
  81. package/dist/src/modules/file/hooks/useUpload.d.mts +6 -4
  82. package/dist/src/modules/file/hooks/useUpload.d.mts.map +1 -1
  83. package/dist/src/modules/file/hooks/useUpload.d.ts +6 -4
  84. package/dist/src/modules/file/hooks/useUpload.d.ts.map +1 -1
  85. package/dist/src/modules/file/hooks/useUpload.js +10 -7
  86. package/dist/src/modules/file/hooks/useUpload.js.map +1 -1
  87. package/dist/src/modules/file/hooks/useUpload.mjs +10 -7
  88. package/dist/src/modules/file/hooks/useUpload.mjs.map +1 -1
  89. package/dist/src/modules/table/hooks/useQueryWithParams.d.mts +2 -2
  90. package/dist/src/modules/table/hooks/useQueryWithParams.d.mts.map +1 -1
  91. package/dist/src/modules/table/hooks/useQueryWithParams.d.ts +2 -2
  92. package/dist/src/modules/table/hooks/useQueryWithParams.d.ts.map +1 -1
  93. package/dist/src/modules/table/hooks/useQueryWithParams.js.map +1 -1
  94. package/dist/src/modules/table/hooks/useQueryWithParams.mjs.map +1 -1
  95. package/dist/src/modules/table/hooks/useTableQueryParams.d.mts +7 -0
  96. package/dist/src/modules/table/hooks/useTableQueryParams.d.mts.map +1 -0
  97. package/dist/src/modules/table/hooks/useTableQueryParams.d.ts +7 -0
  98. package/dist/src/modules/table/hooks/useTableQueryParams.d.ts.map +1 -0
  99. package/dist/src/modules/table/hooks/useTableQueryParams.js +95 -0
  100. package/dist/src/modules/table/hooks/useTableQueryParams.js.map +1 -0
  101. package/dist/src/modules/table/hooks/useTableQueryParams.mjs +94 -0
  102. package/dist/src/modules/table/hooks/useTableQueryParams.mjs.map +1 -0
  103. package/dist/src/modules/table/queryParams.d.mts +34 -0
  104. package/dist/src/modules/table/queryParams.d.mts.map +1 -0
  105. package/dist/src/modules/table/queryParams.d.ts +34 -0
  106. package/dist/src/modules/table/queryParams.d.ts.map +1 -0
  107. package/dist/src/modules/table/{hooks/useNuqsQueryParams.js → queryParams.js} +14 -130
  108. package/dist/src/modules/table/queryParams.js.map +1 -0
  109. package/dist/src/modules/table/{hooks/useNuqsQueryParams.mjs → queryParams.mjs} +10 -130
  110. package/dist/src/modules/table/queryParams.mjs.map +1 -0
  111. package/dist/src/utils/date.d.mts +1 -1
  112. package/package.json +24 -6
  113. package/dist/src/modules/table/hooks/useDateRangeFilter.d.mts +0 -34
  114. package/dist/src/modules/table/hooks/useDateRangeFilter.d.mts.map +0 -1
  115. package/dist/src/modules/table/hooks/useDateRangeFilter.d.ts +0 -34
  116. package/dist/src/modules/table/hooks/useDateRangeFilter.d.ts.map +0 -1
  117. package/dist/src/modules/table/hooks/useDateRangeFilter.js +0 -30
  118. package/dist/src/modules/table/hooks/useDateRangeFilter.js.map +0 -1
  119. package/dist/src/modules/table/hooks/useDateRangeFilter.mjs +0 -29
  120. package/dist/src/modules/table/hooks/useDateRangeFilter.mjs.map +0 -1
  121. package/dist/src/modules/table/hooks/useNuqsQueryParams.d.mts +0 -34
  122. package/dist/src/modules/table/hooks/useNuqsQueryParams.d.mts.map +0 -1
  123. package/dist/src/modules/table/hooks/useNuqsQueryParams.d.ts +0 -34
  124. package/dist/src/modules/table/hooks/useNuqsQueryParams.d.ts.map +0 -1
  125. package/dist/src/modules/table/hooks/useNuqsQueryParams.js.map +0 -1
  126. package/dist/src/modules/table/hooks/useNuqsQueryParams.mjs.map +0 -1
  127. package/dist/src/modules/table/hooks/useNuqsTable.d.mts +0 -46
  128. package/dist/src/modules/table/hooks/useNuqsTable.d.mts.map +0 -1
  129. package/dist/src/modules/table/hooks/useNuqsTable.d.ts +0 -46
  130. package/dist/src/modules/table/hooks/useNuqsTable.d.ts.map +0 -1
  131. package/dist/src/modules/table/hooks/useNuqsTable.js +0 -58
  132. package/dist/src/modules/table/hooks/useNuqsTable.js.map +0 -1
  133. package/dist/src/modules/table/hooks/useNuqsTable.mjs +0 -58
  134. package/dist/src/modules/table/hooks/useNuqsTable.mjs.map +0 -1
@@ -1,94 +1,9 @@
1
- import * as _$better_auth_plugins0 from "better-auth/plugins";
1
+ import { M5KAuthClient, createM5KAuthClient } from "./auth.client.js";
2
2
  import * as _$better_auth0 from "better-auth";
3
3
  import * as _$better_auth_client0 from "better-auth/client";
4
4
 
5
5
  //#region src/modules/auth/auth.lib.d.ts
6
- declare const authClient: {
7
- useActiveOrganization: () => {
8
- data: _$better_auth0.Prettify<{
9
- id: string;
10
- name: string;
11
- slug: string;
12
- createdAt: Date;
13
- logo?: string | null | undefined | undefined;
14
- metadata?: any;
15
- } & {
16
- members: {
17
- id: string;
18
- organizationId: string;
19
- role: "admin" | "member" | "owner";
20
- createdAt: Date;
21
- userId: string;
22
- teamId?: string | undefined | undefined;
23
- user: {
24
- id: string;
25
- email: string;
26
- name: string;
27
- image?: string | undefined;
28
- };
29
- }[];
30
- invitations: {
31
- id: string;
32
- organizationId: string;
33
- email: string;
34
- role: "admin" | "member" | "owner";
35
- status: _$better_auth_plugins0.InvitationStatus;
36
- inviterId: string;
37
- expiresAt: Date;
38
- createdAt: Date;
39
- teamId?: string | undefined | undefined;
40
- }[];
41
- }> | null;
42
- error: null | _$better_auth_client0.BetterFetchError;
43
- isPending: boolean;
44
- isRefetching: boolean;
45
- refetch: (queryParams?: {
46
- query?: _$better_auth0.SessionQueryParams;
47
- } | undefined) => Promise<void>;
48
- };
49
- useListOrganizations: () => {
50
- data: {
51
- id: string;
52
- name: string;
53
- slug: string;
54
- createdAt: Date;
55
- logo?: string | null | undefined | undefined;
56
- metadata?: any;
57
- }[] | null;
58
- error: null | _$better_auth_client0.BetterFetchError;
59
- isPending: boolean;
60
- isRefetching: boolean;
61
- refetch: (queryParams?: {
62
- query?: _$better_auth0.SessionQueryParams;
63
- } | undefined) => Promise<void>;
64
- };
65
- useActiveMember: () => {
66
- data: {
67
- id: string;
68
- organizationId: string;
69
- userId: string;
70
- role: string;
71
- createdAt: Date;
72
- } | null;
73
- error: null | _$better_auth_client0.BetterFetchError;
74
- isPending: boolean;
75
- isRefetching: boolean;
76
- refetch: (queryParams?: {
77
- query?: _$better_auth0.SessionQueryParams;
78
- } | undefined) => Promise<void>;
79
- };
80
- useActiveMemberRole: () => {
81
- data: {
82
- role: string;
83
- } | null;
84
- error: null | _$better_auth_client0.BetterFetchError;
85
- isPending: boolean;
86
- isRefetching: boolean;
87
- refetch: (queryParams?: {
88
- query?: _$better_auth0.SessionQueryParams;
89
- } | undefined) => Promise<void>;
90
- };
91
- } & {
6
+ declare let authClient: {
92
7
  signOut: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
93
8
  query?: Record<string, any> | undefined;
94
9
  fetchOptions?: FetchOptions | undefined;
@@ -420,318 +335,133 @@ declare const authClient: {
420
335
  message?: string | undefined;
421
336
  }, FetchOptions["throw"] extends true ? true : false>>;
422
337
  } & {
423
- organization: {
424
- create: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
425
- name: string;
426
- slug: string;
427
- userId?: string | undefined;
428
- logo?: string | undefined;
429
- metadata?: Record<string, any> | undefined;
430
- keepCurrentActiveOrganization?: boolean | undefined;
338
+ signIn: {
339
+ social: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
340
+ 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";
341
+ callbackURL?: string | undefined;
342
+ newUserCallbackURL?: string | undefined;
343
+ errorCallbackURL?: string | undefined;
344
+ disableRedirect?: boolean | undefined;
345
+ idToken?: {
346
+ token: string;
347
+ nonce?: string | undefined;
348
+ accessToken?: string | undefined;
349
+ refreshToken?: string | undefined;
350
+ expiresAt?: number | undefined;
351
+ } | undefined;
352
+ scopes?: string[] | undefined;
353
+ requestSignUp?: boolean | undefined;
354
+ loginHint?: string | undefined;
355
+ additionalData?: Record<string, any> | undefined;
431
356
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
432
- name: string;
433
- slug: string;
434
- userId?: string | undefined;
435
- logo?: string | undefined;
436
- metadata?: Record<string, any> | undefined;
437
- keepCurrentActiveOrganization?: boolean | undefined;
357
+ 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";
358
+ callbackURL?: string | undefined;
359
+ newUserCallbackURL?: string | undefined;
360
+ errorCallbackURL?: string | undefined;
361
+ disableRedirect?: boolean | undefined;
362
+ idToken?: {
363
+ token: string;
364
+ nonce?: string | undefined;
365
+ accessToken?: string | undefined;
366
+ refreshToken?: string | undefined;
367
+ expiresAt?: number | undefined;
368
+ } | undefined;
369
+ scopes?: string[] | undefined;
370
+ requestSignUp?: boolean | undefined;
371
+ loginHint?: string | undefined;
372
+ additionalData?: Record<string, any> | undefined;
438
373
  } & {
439
374
  fetchOptions?: FetchOptions | undefined;
440
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
441
- id: string;
442
- name: string;
443
- slug: string;
444
- createdAt: Date;
445
- logo?: string | null | undefined | undefined;
446
- metadata?: any;
447
- } & {
448
- metadata: any;
449
- members: ({
375
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
376
+ redirect: boolean;
377
+ url: string;
378
+ } | {
379
+ redirect: boolean;
380
+ token: string;
381
+ url: undefined;
382
+ user: {
450
383
  id: string;
451
- organizationId: string;
452
- userId: string;
453
- role: string;
454
384
  createdAt: Date;
455
- } | undefined)[];
456
- }, {
385
+ updatedAt: Date;
386
+ email: string;
387
+ emailVerified: boolean;
388
+ name: string;
389
+ image?: string | null | undefined | undefined;
390
+ };
391
+ }>, {
457
392
  code?: string | undefined;
458
393
  message?: string | undefined;
459
394
  }, FetchOptions["throw"] extends true ? true : false>>;
460
395
  };
461
396
  } & {
462
- organization: {
463
- update: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
464
- data: {
465
- name?: string | undefined;
466
- slug?: string | undefined;
467
- logo?: string | undefined;
468
- metadata?: Record<string, any> | undefined;
469
- } & Partial<{}>;
470
- organizationId?: string | undefined;
471
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
472
- data: {
473
- name?: string | undefined;
474
- slug?: string | undefined;
475
- logo?: string | undefined;
476
- metadata?: Record<string, any> | undefined;
477
- } & Partial<{}>;
478
- organizationId?: string | undefined;
479
- } & {
480
- fetchOptions?: FetchOptions | undefined;
481
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
482
- id: string;
397
+ signUp: {
398
+ email: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
483
399
  name: string;
484
- slug: string;
485
- createdAt: Date;
486
- logo?: string | null | undefined | undefined;
487
- metadata?: any;
488
- }, {
489
- code?: string | undefined;
490
- message?: string | undefined;
491
- }, FetchOptions["throw"] extends true ? true : false>>;
492
- };
493
- } & {
494
- organization: {
495
- delete: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
496
- organizationId: string;
400
+ email: string;
401
+ password: string;
402
+ image?: string | undefined;
403
+ callbackURL?: string | undefined;
404
+ rememberMe?: boolean | undefined;
497
405
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
498
- organizationId: string;
499
- } & {
500
- fetchOptions?: FetchOptions | undefined;
501
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
502
- id: string;
406
+ email: string;
503
407
  name: string;
504
- slug: string;
505
- createdAt: Date;
506
- logo?: string | null | undefined | undefined;
507
- metadata?: any;
508
- }, {
509
- code?: string | undefined;
510
- message?: string | undefined;
511
- }, FetchOptions["throw"] extends true ? true : false>>;
512
- };
513
- } & {
514
- organization: {
515
- setActive: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
516
- organizationId?: string | null | undefined;
517
- organizationSlug?: string | undefined;
518
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
519
- organizationId?: string | null | undefined;
520
- organizationSlug?: string | undefined;
521
- } & {
408
+ password: string;
409
+ image?: string | undefined;
410
+ callbackURL?: string | undefined;
522
411
  fetchOptions?: FetchOptions | undefined;
523
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
524
- members: {
412
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
413
+ token: null;
414
+ user: {
525
415
  id: string;
526
- organizationId: string;
527
- role: "admin" | "member" | "owner";
528
416
  createdAt: Date;
529
- userId: string;
530
- teamId?: string | undefined | undefined;
531
- user: {
532
- id: string;
533
- email: string;
534
- name: string;
535
- image?: string | undefined;
536
- };
537
- }[];
538
- invitations: {
539
- id: string;
540
- organizationId: string;
417
+ updatedAt: Date;
541
418
  email: string;
542
- role: "admin" | "member" | "owner";
543
- status: _$better_auth_plugins0.InvitationStatus;
544
- inviterId: string;
545
- expiresAt: Date;
546
- createdAt: Date;
547
- teamId?: string | undefined | undefined;
548
- }[];
549
- teams: {
550
- id: string;
419
+ emailVerified: boolean;
551
420
  name: string;
552
- organizationId: string;
553
- createdAt: Date;
554
- updatedAt?: Date | undefined;
555
- }[];
556
- } & {
557
- id: string;
558
- name: string;
559
- slug: string;
560
- createdAt: Date;
561
- logo?: string | null | undefined | undefined;
562
- metadata?: any;
563
- }, {
564
- code?: string | undefined;
565
- message?: string | undefined;
566
- }, FetchOptions["throw"] extends true ? true : false>>;
567
- };
568
- } & {
569
- organization: {
570
- getFullOrganization: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
571
- organizationId?: string | undefined;
572
- organizationSlug?: string | undefined;
573
- membersLimit?: string | number | undefined;
574
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
575
- query?: {
576
- organizationId?: string | undefined;
577
- organizationSlug?: string | undefined;
578
- membersLimit?: string | number | undefined;
579
- } | undefined;
580
- fetchOptions?: FetchOptions | undefined;
581
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
582
- members: {
421
+ image?: string | null | undefined | undefined;
422
+ };
423
+ } | {
424
+ token: string;
425
+ user: {
583
426
  id: string;
584
- organizationId: string;
585
- role: "admin" | "member" | "owner";
586
427
  createdAt: Date;
587
- userId: string;
588
- teamId?: string | undefined | undefined;
589
- user: {
590
- id: string;
591
- email: string;
592
- name: string;
593
- image?: string | undefined;
594
- };
595
- }[];
596
- invitations: {
597
- id: string;
598
- organizationId: string;
428
+ updatedAt: Date;
599
429
  email: string;
600
- role: "admin" | "member" | "owner";
601
- status: _$better_auth_plugins0.InvitationStatus;
602
- inviterId: string;
603
- expiresAt: Date;
604
- createdAt: Date;
605
- teamId?: string | undefined | undefined;
606
- }[];
607
- teams: {
608
- id: string;
430
+ emailVerified: boolean;
609
431
  name: string;
610
- organizationId: string;
611
- createdAt: Date;
612
- updatedAt?: Date | undefined;
613
- }[];
614
- } & {
615
- id: string;
616
- name: string;
617
- slug: string;
618
- createdAt: Date;
619
- logo?: string | null | undefined | undefined;
620
- metadata?: any;
621
- }, {
622
- code?: string | undefined;
623
- message?: string | undefined;
624
- }, FetchOptions["throw"] extends true ? true : false>>;
625
- };
626
- } & {
627
- organization: {
628
- list: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
629
- query?: Record<string, any> | undefined;
630
- fetchOptions?: FetchOptions | undefined;
631
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
632
- id: string;
633
- name: string;
634
- slug: string;
635
- createdAt: Date;
636
- logo?: string | null | undefined | undefined;
637
- metadata?: any;
638
- }[], {
639
- code?: string | undefined;
640
- message?: string | undefined;
641
- }, FetchOptions["throw"] extends true ? true : false>>;
642
- };
643
- } & {
644
- organization: {
645
- inviteMember: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
646
- email: string;
647
- role: "admin" | "member" | "owner" | ("admin" | "member" | "owner")[];
648
- organizationId?: string | undefined;
649
- resend?: boolean | undefined;
650
- } & {
651
- teamId?: (string | string[]) | undefined;
652
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
653
- email: string;
654
- role: "admin" | "member" | "owner" | ("admin" | "member" | "owner")[];
655
- organizationId?: string | undefined;
656
- resend?: boolean | undefined;
657
- } & {
658
- teamId?: (string | string[]) | undefined;
659
- } & {
660
- fetchOptions?: FetchOptions | undefined;
661
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
662
- id: string;
663
- organizationId: string;
664
- email: string;
665
- role: "admin" | "member" | "owner";
666
- status: _$better_auth_plugins0.InvitationStatus;
667
- inviterId: string;
668
- expiresAt: Date;
669
- createdAt: Date;
670
- teamId?: string | undefined | undefined;
671
- } | {
672
- id: string;
673
- organizationId: string;
674
- email: string;
675
- role: "admin" | "member" | "owner";
676
- status: _$better_auth_plugins0.InvitationStatus;
677
- inviterId: string;
678
- expiresAt: Date;
679
- createdAt: Date;
680
- teamId?: string | undefined | undefined;
432
+ image?: string | null | undefined | undefined;
433
+ };
681
434
  }>, {
682
435
  code?: string | undefined;
683
436
  message?: string | undefined;
684
437
  }, FetchOptions["throw"] extends true ? true : false>>;
685
438
  };
686
439
  } & {
687
- organization: {
688
- cancelInvitation: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
689
- invitationId: string;
690
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
691
- invitationId: string;
692
- } & {
693
- fetchOptions?: FetchOptions | undefined;
694
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
695
- id: string;
696
- organizationId: string;
440
+ signIn: {
441
+ email: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
697
442
  email: string;
698
- role: "admin" | "member" | "owner";
699
- status: _$better_auth_plugins0.InvitationStatus;
700
- inviterId: string;
701
- expiresAt: Date;
702
- createdAt: Date;
703
- teamId?: string | undefined | undefined;
704
- }, {
705
- code?: string | undefined;
706
- message?: string | undefined;
707
- }, FetchOptions["throw"] extends true ? true : false>>;
708
- };
709
- } & {
710
- organization: {
711
- acceptInvitation: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
712
- invitationId: string;
443
+ password: string;
444
+ callbackURL?: string | undefined;
445
+ rememberMe?: boolean | undefined;
713
446
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
714
- invitationId: string;
447
+ email: string;
448
+ password: string;
449
+ callbackURL?: string | undefined;
450
+ rememberMe?: boolean | undefined;
715
451
  } & {
716
452
  fetchOptions?: FetchOptions | undefined;
717
453
  }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
718
- invitation: {
719
- id: string;
720
- organizationId: string;
721
- email: string;
722
- role: "admin" | "member" | "owner";
723
- status: _$better_auth_plugins0.InvitationStatus;
724
- inviterId: string;
725
- expiresAt: Date;
726
- createdAt: Date;
727
- teamId?: string | undefined | undefined;
728
- };
729
- member: {
454
+ redirect: boolean;
455
+ token: string;
456
+ url?: string | undefined;
457
+ user: {
730
458
  id: string;
731
- organizationId: string;
732
- userId: string;
733
- role: string;
734
459
  createdAt: Date;
460
+ updatedAt: Date;
461
+ email: string;
462
+ emailVerified: boolean;
463
+ name: string;
464
+ image?: string | null | undefined | undefined;
735
465
  };
736
466
  }, {
737
467
  code?: string | undefined;
@@ -739,758 +469,665 @@ declare const authClient: {
739
469
  }, FetchOptions["throw"] extends true ? true : false>>;
740
470
  };
741
471
  } & {
742
- organization: {
743
- getInvitation: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
744
- id: string;
745
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
746
- query: {
747
- id: string;
748
- };
749
- fetchOptions?: FetchOptions | undefined;
750
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
751
- id: string;
752
- organizationId: string;
753
- email: string;
754
- role: "admin" | "member" | "owner";
755
- status: _$better_auth_plugins0.InvitationStatus;
756
- inviterId: string;
757
- expiresAt: Date;
758
- createdAt: Date;
759
- teamId?: string | undefined | undefined;
760
- } & {
761
- organizationName: string;
762
- organizationSlug: string;
763
- inviterEmail: string;
764
- }>, {
765
- code?: string | undefined;
766
- message?: string | undefined;
767
- }, FetchOptions["throw"] extends true ? true : false>>;
768
- };
472
+ updateUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<Partial<{}> & {
473
+ name?: string | undefined;
474
+ image?: string | undefined | null;
475
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
476
+ image?: (string | null) | undefined;
477
+ name?: string | undefined;
478
+ fetchOptions?: FetchOptions | undefined;
479
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
480
+ status: boolean;
481
+ }, {
482
+ code?: string | undefined;
483
+ message?: string | undefined;
484
+ }, FetchOptions["throw"] extends true ? true : false>>;
769
485
  } & {
770
- organization: {
771
- rejectInvitation: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
772
- invitationId: string;
773
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
774
- invitationId: string;
775
- } & {
776
- fetchOptions?: FetchOptions | undefined;
777
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
778
- invitation: {
779
- id: string;
780
- organizationId: string;
781
- email: string;
782
- role: "member" | "admin" | "owner";
783
- status: _$better_auth_plugins0.InvitationStatus;
784
- inviterId: string;
785
- expiresAt: Date;
786
- createdAt: Date;
787
- } | null;
788
- member: null;
789
- }, {
790
- code?: string | undefined;
791
- message?: string | undefined;
792
- }, FetchOptions["throw"] extends true ? true : false>>;
793
- };
486
+ listSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
487
+ query?: Record<string, any> | undefined;
488
+ fetchOptions?: FetchOptions | undefined;
489
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<_$better_auth0.Prettify<{
490
+ id: string;
491
+ createdAt: Date;
492
+ updatedAt: Date;
493
+ userId: string;
494
+ expiresAt: Date;
495
+ token: string;
496
+ ipAddress?: string | null | undefined | undefined;
497
+ userAgent?: string | null | undefined | undefined;
498
+ }>[], {
499
+ code?: string | undefined;
500
+ message?: string | undefined;
501
+ }, FetchOptions["throw"] extends true ? true : false>>;
794
502
  } & {
795
- organization: {
796
- listInvitations: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
797
- organizationId?: string | undefined;
798
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
799
- query?: {
800
- organizationId?: string | undefined;
801
- } | undefined;
802
- fetchOptions?: FetchOptions | undefined;
803
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
503
+ getSession: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
504
+ disableCookieCache?: unknown;
505
+ disableRefresh?: unknown;
506
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
507
+ query?: {
508
+ disableCookieCache?: unknown;
509
+ disableRefresh?: unknown;
510
+ } | undefined;
511
+ fetchOptions?: FetchOptions | undefined;
512
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
513
+ user: {
804
514
  id: string;
805
- organizationId: string;
806
- email: string;
807
- role: "admin" | "member" | "owner";
808
- status: _$better_auth_plugins0.InvitationStatus;
809
- inviterId: string;
810
- expiresAt: Date;
811
515
  createdAt: Date;
812
- teamId?: string | undefined | undefined;
813
- }[], {
814
- code?: string | undefined;
815
- message?: string | undefined;
816
- }, FetchOptions["throw"] extends true ? true : false>>;
817
- };
818
- } & {
819
- organization: {
820
- getActiveMember: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
821
- query?: Record<string, any> | undefined;
822
- fetchOptions?: FetchOptions | undefined;
823
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<Omit<{
516
+ updatedAt: Date;
517
+ email: string;
518
+ emailVerified: boolean;
519
+ name: string;
520
+ image?: string | null | undefined;
521
+ };
522
+ session: {
824
523
  id: string;
825
- organizationId: string;
826
- role: "admin" | "member" | "owner";
827
524
  createdAt: Date;
525
+ updatedAt: Date;
828
526
  userId: string;
829
- teamId?: string | undefined | undefined;
527
+ expiresAt: Date;
528
+ token: string;
529
+ ipAddress?: string | null | undefined;
530
+ userAgent?: string | null | undefined;
531
+ };
532
+ } | null, {
533
+ code?: string | undefined;
534
+ message?: string | undefined;
535
+ }, FetchOptions["throw"] extends true ? true : false>>;
536
+ } & {
537
+ useSession: () => {
538
+ data: {
830
539
  user: {
831
540
  id: string;
541
+ createdAt: Date;
542
+ updatedAt: Date;
832
543
  email: string;
544
+ emailVerified: boolean;
833
545
  name: string;
834
- image?: string | undefined;
835
- };
836
- } & {
837
- user: _$better_auth0.User;
838
- }, "user"> & {
839
- user: {
840
- id: string;
841
- name: string;
842
- email: string;
843
- image: string | undefined;
546
+ image?: string | null | undefined;
844
547
  };
845
- }, {
846
- code?: string | undefined;
847
- message?: string | undefined;
848
- }, FetchOptions["throw"] extends true ? true : false>>;
849
- };
850
- } & {
851
- organization: {
852
- checkSlug: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
853
- slug: string;
854
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
855
- slug: string;
856
- } & {
857
- fetchOptions?: FetchOptions | undefined;
858
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
859
- status: boolean;
860
- }, {
861
- code?: string | undefined;
862
- message?: string | undefined;
863
- }, FetchOptions["throw"] extends true ? true : false>>;
864
- };
865
- } & {
866
- organization: {
867
- removeMember: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
868
- memberIdOrEmail: string;
869
- organizationId?: string | undefined;
870
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
871
- memberIdOrEmail: string;
872
- organizationId?: string | undefined;
873
- } & {
874
- fetchOptions?: FetchOptions | undefined;
875
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
876
- member: {
548
+ session: {
877
549
  id: string;
878
- organizationId: string;
879
- role: "admin" | "member" | "owner";
880
550
  createdAt: Date;
551
+ updatedAt: Date;
881
552
  userId: string;
882
- teamId?: string | undefined | undefined;
883
- user: {
884
- id: string;
885
- email: string;
886
- name: string;
887
- image?: string | undefined;
888
- };
889
- };
890
- }, {
891
- code?: string | undefined;
892
- message?: string | undefined;
893
- }, FetchOptions["throw"] extends true ? true : false>>;
894
- };
895
- } & {
896
- organization: {
897
- updateMemberRole: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
898
- role: _$better_auth0.LiteralString | _$better_auth0.LiteralString[] | "admin" | "member" | "owner" | ("admin" | "member" | "owner")[];
899
- memberId: string;
900
- organizationId?: string | undefined;
901
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
902
- role: _$better_auth0.LiteralString | _$better_auth0.LiteralString[] | "admin" | "member" | "owner" | ("admin" | "member" | "owner")[];
903
- memberId: string;
904
- organizationId?: string | undefined;
905
- } & {
906
- fetchOptions?: FetchOptions | undefined;
907
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
908
- id: string;
909
- organizationId: string;
910
- role: "member" | "admin" | "owner";
911
- createdAt: Date;
912
- userId: string;
913
- user: {
914
- id: string;
915
- email: string;
916
- name: string;
917
- image?: string | undefined;
553
+ expiresAt: Date;
554
+ token: string;
555
+ ipAddress?: string | null | undefined;
556
+ userAgent?: string | null | undefined;
918
557
  };
919
- }, {
920
- code?: string | undefined;
921
- message?: string | undefined;
922
- }, FetchOptions["throw"] extends true ? true : false>>;
558
+ } | null;
559
+ isPending: boolean;
560
+ isRefetching: boolean;
561
+ error: _$better_auth_client0.BetterFetchError | null;
562
+ refetch: (queryParams?: {
563
+ query?: _$better_auth0.SessionQueryParams;
564
+ } | undefined) => Promise<void>;
923
565
  };
924
- } & {
925
- organization: {
926
- leave: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
927
- organizationId: string;
928
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
929
- organizationId: string;
930
- } & {
931
- fetchOptions?: FetchOptions | undefined;
932
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<Omit<{
933
- id: string;
934
- organizationId: string;
935
- role: "admin" | "member" | "owner";
936
- createdAt: Date;
937
- userId: string;
938
- teamId?: string | undefined | undefined;
939
- user: {
940
- id: string;
941
- email: string;
942
- name: string;
943
- image?: string | undefined;
944
- };
945
- } & {
946
- user: _$better_auth0.User;
947
- }, "user"> & {
566
+ $Infer: {
567
+ Session: {
948
568
  user: {
949
569
  id: string;
950
- name: string;
570
+ createdAt: Date;
571
+ updatedAt: Date;
951
572
  email: string;
952
- image: string | undefined;
953
- };
954
- }>, {
955
- code?: string | undefined;
956
- message?: string | undefined;
957
- }, FetchOptions["throw"] extends true ? true : false>>;
958
- };
959
- } & {
960
- organization: {
961
- listUserInvitations: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
962
- email?: string | undefined;
963
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
964
- query?: {
965
- email?: string | undefined;
966
- } | undefined;
967
- fetchOptions?: FetchOptions | undefined;
968
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<(Omit<{
969
- id: string;
970
- organizationId: string;
971
- email: string;
972
- role: "admin" | "member" | "owner";
973
- status: _$better_auth_plugins0.InvitationStatus;
974
- inviterId: string;
975
- expiresAt: Date;
976
- createdAt: Date;
977
- teamId?: string | undefined | undefined;
978
- } & {
979
- organization: {
980
- id: string;
573
+ emailVerified: boolean;
981
574
  name: string;
982
- slug: string;
983
- createdAt: Date;
984
- logo?: string | null | undefined | undefined;
985
- metadata?: any;
575
+ image?: string | null | undefined;
986
576
  };
987
- }, "organization"> & {
988
- organizationName: string;
989
- })[], {
990
- code?: string | undefined;
991
- message?: string | undefined;
992
- }, FetchOptions["throw"] extends true ? true : false>>;
993
- };
994
- } & {
995
- organization: {
996
- listMembers: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
997
- limit?: string | number | undefined;
998
- offset?: string | number | undefined;
999
- sortBy?: string | undefined;
1000
- sortDirection?: "asc" | "desc" | undefined;
1001
- filterField?: string | undefined;
1002
- filterValue?: string | number | boolean | undefined;
1003
- filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
1004
- organizationId?: string | undefined;
1005
- organizationSlug?: string | undefined;
1006
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1007
- query?: {
1008
- limit?: string | number | undefined;
1009
- offset?: string | number | undefined;
1010
- sortBy?: string | undefined;
1011
- sortDirection?: "asc" | "desc" | undefined;
1012
- filterField?: string | undefined;
1013
- filterValue?: string | number | boolean | undefined;
1014
- filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
1015
- organizationId?: string | undefined;
1016
- organizationSlug?: string | undefined;
1017
- } | undefined;
1018
- fetchOptions?: FetchOptions | undefined;
1019
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1020
- members: ({
577
+ session: {
1021
578
  id: string;
1022
- organizationId: string;
1023
- role: "admin" | "member" | "owner";
1024
579
  createdAt: Date;
580
+ updatedAt: Date;
1025
581
  userId: string;
1026
- teamId?: string | undefined | undefined;
1027
- user: {
1028
- id: string;
1029
- email: string;
1030
- name: string;
1031
- image?: string | undefined;
1032
- };
1033
- } & {
1034
- user: {
1035
- id: string;
1036
- name: string;
1037
- email: string;
1038
- image: string | null | undefined;
1039
- };
1040
- })[];
1041
- total: number;
1042
- }, {
1043
- code?: string | undefined;
1044
- message?: string | undefined;
1045
- }, FetchOptions["throw"] extends true ? true : false>>;
1046
- };
1047
- } & {
1048
- organization: {
1049
- getActiveMemberRole: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1050
- userId?: string | undefined;
1051
- organizationId?: string | undefined;
1052
- organizationSlug?: string | undefined;
1053
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1054
- query?: {
1055
- userId?: string | undefined;
1056
- organizationId?: string | undefined;
1057
- organizationSlug?: string | undefined;
1058
- } | undefined;
1059
- fetchOptions?: FetchOptions | undefined;
1060
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1061
- role: "admin" | "member" | "owner";
1062
- }, {
1063
- code?: string | undefined;
1064
- message?: string | undefined;
1065
- }, FetchOptions["throw"] extends true ? true : false>>;
1066
- };
1067
- } & {
1068
- organization: {
1069
- hasPermission: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<({
1070
- permission: {
1071
- readonly organization?: ("delete" | "update")[] | undefined;
1072
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1073
- readonly invitation?: ("create" | "cancel")[] | undefined;
1074
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1075
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
1076
- };
1077
- permissions?: never | undefined;
1078
- } | {
1079
- permissions: {
1080
- readonly organization?: ("delete" | "update")[] | undefined;
1081
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1082
- readonly invitation?: ("create" | "cancel")[] | undefined;
1083
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1084
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
1085
- };
1086
- permission?: never | undefined;
1087
- }) & {
1088
- organizationId?: string | undefined;
1089
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<(({
1090
- permission: {
1091
- readonly organization?: ("delete" | "update")[] | undefined;
1092
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1093
- readonly invitation?: ("create" | "cancel")[] | undefined;
1094
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1095
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
1096
- };
1097
- permissions?: never | undefined;
1098
- } | {
1099
- permissions: {
1100
- readonly organization?: ("delete" | "update")[] | undefined;
1101
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1102
- readonly invitation?: ("create" | "cancel")[] | undefined;
1103
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1104
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
582
+ expiresAt: Date;
583
+ token: string;
584
+ ipAddress?: string | null | undefined;
585
+ userAgent?: string | null | undefined;
1105
586
  };
1106
- permission?: never | undefined;
1107
- }) & {
1108
- organizationId?: string | undefined;
1109
- }) & {
1110
- fetchOptions?: FetchOptions | undefined;
1111
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1112
- error: null;
1113
- success: boolean;
1114
- }, {
1115
- code?: string | undefined;
1116
- message?: string | undefined;
1117
- }, FetchOptions["throw"] extends true ? true : false>>;
587
+ };
1118
588
  };
1119
- } & {
1120
- organization: {
1121
- createTeam: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1122
- name: string;
1123
- organizationId?: string | undefined;
1124
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
589
+ $fetch: _$better_auth_client0.BetterFetch<{
590
+ plugins: (_$better_auth_client0.BetterFetchPlugin<Record<string, any>> | {
591
+ id: string;
1125
592
  name: string;
1126
- organizationId?: string | undefined;
1127
- } & {
1128
- fetchOptions?: FetchOptions | undefined;
1129
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
593
+ hooks: {
594
+ onSuccess(context: _$better_auth_client0.SuccessContext<any>): void;
595
+ };
596
+ } | {
1130
597
  id: string;
1131
598
  name: string;
1132
- organizationId: string;
1133
- createdAt: Date;
1134
- updatedAt?: Date | undefined;
1135
- }, {
1136
- code?: string | undefined;
1137
- message?: string | undefined;
1138
- }, FetchOptions["throw"] extends true ? true : false>>;
1139
- };
1140
- } & {
1141
- organization: {
1142
- listTeams: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1143
- organizationId?: string | undefined;
1144
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1145
- query?: {
1146
- organizationId?: string | undefined;
1147
- } | undefined;
1148
- fetchOptions?: FetchOptions | undefined;
1149
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1150
- id: string;
1151
- name: string;
1152
- organizationId: string;
1153
- createdAt: Date;
1154
- updatedAt?: Date | undefined;
1155
- }[], {
1156
- code?: string | undefined;
1157
- message?: string | undefined;
1158
- }, FetchOptions["throw"] extends true ? true : false>>;
599
+ hooks: {
600
+ onSuccess: ((context: _$better_auth_client0.SuccessContext<any>) => Promise<void> | void) | undefined;
601
+ onError: ((context: _$better_auth_client0.ErrorContext) => Promise<void> | void) | undefined;
602
+ onRequest: (<T extends Record<string, any>>(context: _$better_auth_client0.RequestContext<T>) => Promise<_$better_auth_client0.RequestContext | void> | _$better_auth_client0.RequestContext | void) | undefined;
603
+ onResponse: ((context: _$better_auth_client0.ResponseContext) => Promise<Response | void | _$better_auth_client0.ResponseContext> | Response | _$better_auth_client0.ResponseContext | void) | undefined;
604
+ };
605
+ })[];
606
+ cache?: RequestCache | undefined;
607
+ method: string;
608
+ window?: null | undefined;
609
+ headers?: (HeadersInit & (HeadersInit | {
610
+ accept: "application/json" | "text/plain" | "application/octet-stream";
611
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
612
+ authorization: "Bearer" | "Basic";
613
+ })) | undefined;
614
+ redirect?: RequestRedirect | undefined;
615
+ credentials?: RequestCredentials;
616
+ integrity?: string | undefined;
617
+ keepalive?: boolean | undefined;
618
+ mode?: RequestMode | undefined;
619
+ priority?: RequestPriority | undefined;
620
+ referrer?: string | undefined;
621
+ referrerPolicy?: ReferrerPolicy | undefined;
622
+ signal?: (AbortSignal | null) | undefined;
623
+ onRetry?: ((response: _$better_auth_client0.ResponseContext) => Promise<void> | void) | undefined;
624
+ hookOptions?: {
625
+ cloneResponse?: boolean;
626
+ } | undefined;
627
+ timeout?: number | undefined;
628
+ customFetchImpl: _$better_auth_client0.FetchEsque;
629
+ baseURL: string;
630
+ throw?: boolean | undefined;
631
+ auth?: ({
632
+ type: "Bearer";
633
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
634
+ } | {
635
+ type: "Basic";
636
+ username: string | (() => string | undefined) | undefined;
637
+ password: string | (() => string | undefined) | undefined;
638
+ } | {
639
+ type: "Custom";
640
+ prefix: string | (() => string | undefined) | undefined;
641
+ value: string | (() => string | undefined) | undefined;
642
+ }) | undefined;
643
+ body?: any;
644
+ query?: any;
645
+ params?: any;
646
+ duplex?: "full" | "half" | undefined;
647
+ jsonParser: (text: string) => Promise<any> | any;
648
+ retry?: _$better_auth_client0.RetryOptions | undefined;
649
+ retryAttempt?: number | undefined;
650
+ output?: (_$better_auth_client0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
651
+ errorSchema?: _$better_auth_client0.StandardSchemaV1 | undefined;
652
+ disableValidation?: boolean | undefined;
653
+ disableSignal?: boolean | undefined;
654
+ }, unknown, unknown, {}>;
655
+ $store: {
656
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
657
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
658
+ atoms: Record<string, _$better_auth_client0.WritableAtom<any>>;
1159
659
  };
1160
- } & {
1161
- organization: {
1162
- removeTeam: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1163
- teamId: string;
1164
- organizationId?: string | undefined;
1165
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1166
- teamId: string;
1167
- organizationId?: string | undefined;
1168
- } & {
1169
- fetchOptions?: FetchOptions | undefined;
1170
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1171
- message: string;
1172
- }, {
1173
- code?: string | undefined;
1174
- message?: string | undefined;
1175
- }, FetchOptions["throw"] extends true ? true : false>>;
660
+ $ERROR_CODES: {
661
+ readonly USER_NOT_FOUND: "User not found";
662
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
663
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
664
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
665
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
666
+ readonly INVALID_PASSWORD: "Invalid password";
667
+ readonly INVALID_EMAIL: "Invalid email";
668
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
669
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
670
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
671
+ readonly INVALID_TOKEN: "Invalid token";
672
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
673
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
674
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
675
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
676
+ readonly PASSWORD_TOO_SHORT: "Password too short";
677
+ readonly PASSWORD_TOO_LONG: "Password too long";
678
+ readonly USER_ALREADY_EXISTS: "User already exists.";
679
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
680
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
681
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
682
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
683
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
684
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
685
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
686
+ readonly CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: "Cross-site navigation login blocked. This request appears to be a CSRF attack.";
687
+ readonly VERIFICATION_EMAIL_NOT_ENABLED: "Verification email isn't enabled";
688
+ readonly EMAIL_ALREADY_VERIFIED: "Email is already verified";
689
+ readonly EMAIL_MISMATCH: "Email mismatch";
690
+ readonly SESSION_NOT_FRESH: "Session is not fresh";
691
+ readonly LINKED_ACCOUNT_ALREADY_EXISTS: "Linked account already exists";
692
+ readonly INVALID_ORIGIN: "Invalid origin";
693
+ readonly INVALID_CALLBACK_URL: "Invalid callbackURL";
694
+ readonly INVALID_REDIRECT_URL: "Invalid redirectURL";
695
+ readonly INVALID_ERROR_CALLBACK_URL: "Invalid errorCallbackURL";
696
+ readonly INVALID_NEW_USER_CALLBACK_URL: "Invalid newUserCallbackURL";
697
+ readonly MISSING_OR_NULL_ORIGIN: "Missing or null Origin";
698
+ readonly CALLBACK_URL_REQUIRED: "callbackURL is required";
699
+ readonly FAILED_TO_CREATE_VERIFICATION: "Unable to create verification";
700
+ readonly FIELD_NOT_ALLOWED: "Field not allowed to be set";
701
+ readonly ASYNC_VALIDATION_NOT_SUPPORTED: "Async validation is not supported";
702
+ readonly VALIDATION_ERROR: "Validation Error";
703
+ readonly MISSING_FIELD: "Field is required";
1176
704
  };
705
+ };
706
+ declare function configureAuthClient({
707
+ baseURL,
708
+ client
709
+ }?: {
710
+ baseURL?: string;
711
+ client?: typeof authClient;
712
+ }): {
713
+ signOut: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
714
+ query?: Record<string, any> | undefined;
715
+ fetchOptions?: FetchOptions | undefined;
716
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
717
+ success: boolean;
718
+ }, {
719
+ code?: string | undefined;
720
+ message?: string | undefined;
721
+ }, FetchOptions["throw"] extends true ? true : false>>;
1177
722
  } & {
1178
- organization: {
1179
- updateTeam: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1180
- teamId: string;
1181
- data: Partial<{
1182
- name: string;
1183
- organizationId: string;
1184
- }>;
1185
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1186
- teamId: string;
1187
- data: Partial<{
1188
- name: string;
1189
- organizationId: string;
1190
- }>;
1191
- } & {
1192
- fetchOptions?: FetchOptions | undefined;
1193
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1194
- id: string;
1195
- name: string;
1196
- organizationId: string;
1197
- createdAt: Date;
1198
- updatedAt?: Date | undefined;
1199
- }, {
1200
- code?: string | undefined;
1201
- message?: string | undefined;
1202
- }, FetchOptions["throw"] extends true ? true : false>>;
1203
- };
723
+ resetPassword: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
724
+ newPassword: string;
725
+ token?: string | undefined;
726
+ }> & Record<string, any>, Partial<{
727
+ token?: string | undefined;
728
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
729
+ newPassword: string;
730
+ token?: string | undefined;
731
+ } & {
732
+ fetchOptions?: FetchOptions | undefined;
733
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
734
+ status: boolean;
735
+ }, {
736
+ code?: string | undefined;
737
+ message?: string | undefined;
738
+ }, FetchOptions["throw"] extends true ? true : false>>;
1204
739
  } & {
1205
- organization: {
1206
- setActiveTeam: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1207
- teamId?: string | null | undefined;
1208
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1209
- teamId?: string | null | undefined;
1210
- } & {
1211
- fetchOptions?: FetchOptions | undefined;
1212
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1213
- id: string;
1214
- name: string;
1215
- organizationId: string;
1216
- createdAt: Date;
1217
- updatedAt?: Date | undefined;
1218
- }, {
1219
- code?: string | undefined;
1220
- message?: string | undefined;
1221
- }, FetchOptions["throw"] extends true ? true : false>>;
1222
- };
740
+ verifyEmail: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
741
+ token: string;
742
+ callbackURL?: string | undefined;
743
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
744
+ query: {
745
+ token: string;
746
+ callbackURL?: string | undefined;
747
+ };
748
+ fetchOptions?: FetchOptions | undefined;
749
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<void | {
750
+ status: boolean;
751
+ }>, {
752
+ code?: string | undefined;
753
+ message?: string | undefined;
754
+ }, FetchOptions["throw"] extends true ? true : false>>;
1223
755
  } & {
1224
- organization: {
1225
- listUserTeams: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1226
- query?: Record<string, any> | undefined;
1227
- fetchOptions?: FetchOptions | undefined;
1228
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1229
- id: string;
1230
- name: string;
1231
- organizationId: string;
1232
- createdAt: Date;
1233
- updatedAt?: Date | undefined;
1234
- }[], {
1235
- code?: string | undefined;
1236
- message?: string | undefined;
1237
- }, FetchOptions["throw"] extends true ? true : false>>;
1238
- };
756
+ sendVerificationEmail: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
757
+ email: string;
758
+ callbackURL?: string | undefined;
759
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
760
+ email: string;
761
+ callbackURL?: string | undefined;
762
+ } & {
763
+ fetchOptions?: FetchOptions | undefined;
764
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
765
+ status: boolean;
766
+ }, {
767
+ code?: string | undefined;
768
+ message?: string | undefined;
769
+ }, FetchOptions["throw"] extends true ? true : false>>;
1239
770
  } & {
1240
- organization: {
1241
- listTeamMembers: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1242
- teamId?: string | undefined;
1243
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1244
- query?: {
1245
- teamId?: string | undefined;
1246
- } | undefined;
1247
- fetchOptions?: FetchOptions | undefined;
1248
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1249
- id: string;
1250
- teamId: string;
1251
- userId: string;
1252
- createdAt: Date;
1253
- }[], {
1254
- code?: string | undefined;
1255
- message?: string | undefined;
1256
- }, FetchOptions["throw"] extends true ? true : false>>;
1257
- };
771
+ changeEmail: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
772
+ newEmail: string;
773
+ callbackURL?: string | undefined;
774
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
775
+ newEmail: string;
776
+ callbackURL?: string | undefined;
777
+ } & {
778
+ fetchOptions?: FetchOptions | undefined;
779
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
780
+ status: boolean;
781
+ }, {
782
+ code?: string | undefined;
783
+ message?: string | undefined;
784
+ }, FetchOptions["throw"] extends true ? true : false>>;
1258
785
  } & {
1259
- organization: {
1260
- addTeamMember: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1261
- teamId: string;
1262
- userId: unknown;
1263
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1264
- teamId: string;
1265
- userId: unknown;
1266
- } & {
1267
- fetchOptions?: FetchOptions | undefined;
1268
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
786
+ changePassword: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
787
+ newPassword: string;
788
+ currentPassword: string;
789
+ revokeOtherSessions?: boolean | undefined;
790
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
791
+ newPassword: string;
792
+ currentPassword: string;
793
+ revokeOtherSessions?: boolean | undefined;
794
+ } & {
795
+ fetchOptions?: FetchOptions | undefined;
796
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
797
+ token: string | null;
798
+ user: {
1269
799
  id: string;
1270
- teamId: string;
1271
- userId: string;
1272
800
  createdAt: Date;
1273
- }, {
1274
- code?: string | undefined;
1275
- message?: string | undefined;
1276
- }, FetchOptions["throw"] extends true ? true : false>>;
1277
- };
1278
- } & {
1279
- organization: {
1280
- removeTeamMember: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1281
- teamId: string;
1282
- userId: unknown;
1283
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1284
- teamId: string;
1285
- userId: unknown;
1286
- } & {
1287
- fetchOptions?: FetchOptions | undefined;
1288
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1289
- message: string;
1290
- }, {
1291
- code?: string | undefined;
1292
- message?: string | undefined;
1293
- }, FetchOptions["throw"] extends true ? true : false>>;
1294
- };
801
+ updatedAt: Date;
802
+ email: string;
803
+ emailVerified: boolean;
804
+ name: string;
805
+ image?: string | null | undefined;
806
+ } & Record<string, any>;
807
+ }, {
808
+ code?: string | undefined;
809
+ message?: string | undefined;
810
+ }, FetchOptions["throw"] extends true ? true : false>>;
1295
811
  } & {
1296
- admin: {
1297
- setRole: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1298
- userId: string;
1299
- role: "user" | "admin" | ("user" | "admin")[];
1300
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1301
- userId: string;
1302
- role: "user" | "admin" | ("user" | "admin")[];
1303
- } & {
1304
- fetchOptions?: FetchOptions | undefined;
1305
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1306
- user: _$better_auth_plugins0.UserWithRole;
1307
- }, {
1308
- code?: string | undefined;
1309
- message?: string | undefined;
1310
- }, FetchOptions["throw"] extends true ? true : false>>;
1311
- };
812
+ deleteUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
813
+ callbackURL?: string | undefined;
814
+ password?: string | undefined;
815
+ token?: string | undefined;
816
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
817
+ callbackURL?: string | undefined;
818
+ password?: string | undefined;
819
+ token?: string | undefined;
820
+ } & {
821
+ fetchOptions?: FetchOptions | undefined;
822
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
823
+ success: boolean;
824
+ message: string;
825
+ }, {
826
+ code?: string | undefined;
827
+ message?: string | undefined;
828
+ }, FetchOptions["throw"] extends true ? true : false>>;
1312
829
  } & {
1313
- admin: {
1314
- getUser: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1315
- id: string;
1316
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
830
+ requestPasswordReset: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
831
+ email: string;
832
+ redirectTo?: string | undefined;
833
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
834
+ email: string;
835
+ redirectTo?: string | undefined;
836
+ } & {
837
+ fetchOptions?: FetchOptions | undefined;
838
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
839
+ status: boolean;
840
+ message: string;
841
+ }, {
842
+ code?: string | undefined;
843
+ message?: string | undefined;
844
+ }, FetchOptions["throw"] extends true ? true : false>>;
845
+ } & {
846
+ resetPassword: {
847
+ ":token": <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
848
+ callbackURL: string;
849
+ }> & Record<string, any>, {
850
+ token: string;
851
+ }>>(data_0: _$better_auth0.Prettify<{
1317
852
  query: {
1318
- id: string;
853
+ callbackURL: string;
1319
854
  };
1320
855
  fetchOptions?: FetchOptions | undefined;
1321
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<_$better_auth_plugins0.UserWithRole, {
856
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<never, {
1322
857
  code?: string | undefined;
1323
858
  message?: string | undefined;
1324
859
  }, FetchOptions["throw"] extends true ? true : false>>;
1325
860
  };
1326
861
  } & {
1327
- admin: {
1328
- createUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1329
- email: string;
1330
- password?: string | undefined;
1331
- name: string;
1332
- role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1333
- data?: Record<string, any> | undefined;
1334
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1335
- email: string;
1336
- password?: string | undefined;
1337
- name: string;
1338
- role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1339
- data?: Record<string, any> | undefined;
1340
- } & {
1341
- fetchOptions?: FetchOptions | undefined;
1342
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1343
- user: _$better_auth_plugins0.UserWithRole;
1344
- }, {
1345
- code?: string | undefined;
1346
- message?: string | undefined;
1347
- }, FetchOptions["throw"] extends true ? true : false>>;
1348
- };
862
+ revokeSession: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
863
+ token: string;
864
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
865
+ token: string;
866
+ } & {
867
+ fetchOptions?: FetchOptions | undefined;
868
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
869
+ status: boolean;
870
+ }, {
871
+ code?: string | undefined;
872
+ message?: string | undefined;
873
+ }, FetchOptions["throw"] extends true ? true : false>>;
1349
874
  } & {
1350
- admin: {
1351
- updateUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1352
- userId: unknown;
1353
- data: Record<any, any>;
1354
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1355
- userId: unknown;
1356
- data: Record<any, any>;
1357
- } & {
1358
- fetchOptions?: FetchOptions | undefined;
1359
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<_$better_auth_plugins0.UserWithRole, {
1360
- code?: string | undefined;
1361
- message?: string | undefined;
1362
- }, FetchOptions["throw"] extends true ? true : false>>;
1363
- };
875
+ revokeSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
876
+ query?: Record<string, any> | undefined;
877
+ fetchOptions?: FetchOptions | undefined;
878
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
879
+ status: boolean;
880
+ }, {
881
+ code?: string | undefined;
882
+ message?: string | undefined;
883
+ }, FetchOptions["throw"] extends true ? true : false>>;
884
+ } & {
885
+ revokeOtherSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
886
+ query?: Record<string, any> | undefined;
887
+ fetchOptions?: FetchOptions | undefined;
888
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
889
+ status: boolean;
890
+ }, {
891
+ code?: string | undefined;
892
+ message?: string | undefined;
893
+ }, FetchOptions["throw"] extends true ? true : false>>;
894
+ } & {
895
+ linkSocial: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
896
+ provider: unknown;
897
+ callbackURL?: string | undefined;
898
+ idToken?: {
899
+ token: string;
900
+ nonce?: string | undefined;
901
+ accessToken?: string | undefined;
902
+ refreshToken?: string | undefined;
903
+ scopes?: string[] | undefined;
904
+ } | undefined;
905
+ requestSignUp?: boolean | undefined;
906
+ scopes?: string[] | undefined;
907
+ errorCallbackURL?: string | undefined;
908
+ disableRedirect?: boolean | undefined;
909
+ additionalData?: Record<string, any> | undefined;
910
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
911
+ provider: unknown;
912
+ callbackURL?: string | undefined;
913
+ idToken?: {
914
+ token: string;
915
+ nonce?: string | undefined;
916
+ accessToken?: string | undefined;
917
+ refreshToken?: string | undefined;
918
+ scopes?: string[] | undefined;
919
+ } | undefined;
920
+ requestSignUp?: boolean | undefined;
921
+ scopes?: string[] | undefined;
922
+ errorCallbackURL?: string | undefined;
923
+ disableRedirect?: boolean | undefined;
924
+ additionalData?: Record<string, any> | undefined;
925
+ } & {
926
+ fetchOptions?: FetchOptions | undefined;
927
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
928
+ url: string;
929
+ redirect: boolean;
930
+ }, {
931
+ code?: string | undefined;
932
+ message?: string | undefined;
933
+ }, FetchOptions["throw"] extends true ? true : false>>;
934
+ } & {
935
+ listAccounts: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
936
+ query?: Record<string, any> | undefined;
937
+ fetchOptions?: FetchOptions | undefined;
938
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
939
+ scopes: string[];
940
+ id: string;
941
+ createdAt: Date;
942
+ updatedAt: Date;
943
+ userId: string;
944
+ providerId: string;
945
+ accountId: string;
946
+ }[], {
947
+ code?: string | undefined;
948
+ message?: string | undefined;
949
+ }, FetchOptions["throw"] extends true ? true : false>>;
1364
950
  } & {
1365
- admin: {
1366
- listUsers: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1367
- searchValue?: string | undefined;
1368
- searchField?: "email" | "name" | undefined;
1369
- searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
1370
- limit?: string | number | undefined;
1371
- offset?: string | number | undefined;
1372
- sortBy?: string | undefined;
1373
- sortDirection?: "asc" | "desc" | undefined;
1374
- filterField?: string | undefined;
1375
- filterValue?: string | number | boolean | undefined;
1376
- filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
951
+ deleteUser: {
952
+ callback: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
953
+ token: string;
954
+ callbackURL?: string | undefined;
1377
955
  }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1378
956
  query: {
1379
- searchValue?: string | undefined;
1380
- searchField?: "email" | "name" | undefined;
1381
- searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
1382
- limit?: string | number | undefined;
1383
- offset?: string | number | undefined;
1384
- sortBy?: string | undefined;
1385
- sortDirection?: "asc" | "desc" | undefined;
1386
- filterField?: string | undefined;
1387
- filterValue?: string | number | boolean | undefined;
1388
- filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
957
+ token: string;
958
+ callbackURL?: string | undefined;
1389
959
  };
1390
960
  fetchOptions?: FetchOptions | undefined;
1391
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
1392
- users: _$better_auth_plugins0.UserWithRole[];
1393
- total: number;
1394
- limit: number | undefined;
1395
- offset: number | undefined;
1396
- } | {
1397
- users: never[];
1398
- total: number;
1399
- }>, {
1400
- code?: string | undefined;
1401
- message?: string | undefined;
1402
- }, FetchOptions["throw"] extends true ? true : false>>;
1403
- };
1404
- } & {
1405
- admin: {
1406
- listUserSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1407
- userId: unknown;
1408
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1409
- userId: unknown;
1410
- } & {
1411
- fetchOptions?: FetchOptions | undefined;
1412
961
  }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1413
- sessions: _$better_auth_plugins0.SessionWithImpersonatedBy[];
962
+ success: boolean;
963
+ message: string;
1414
964
  }, {
1415
965
  code?: string | undefined;
1416
966
  message?: string | undefined;
1417
967
  }, FetchOptions["throw"] extends true ? true : false>>;
1418
968
  };
1419
969
  } & {
1420
- admin: {
1421
- unbanUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1422
- userId: unknown;
1423
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1424
- userId: unknown;
1425
- } & {
1426
- fetchOptions?: FetchOptions | undefined;
1427
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1428
- user: _$better_auth_plugins0.UserWithRole;
1429
- }, {
1430
- code?: string | undefined;
1431
- message?: string | undefined;
1432
- }, FetchOptions["throw"] extends true ? true : false>>;
1433
- };
970
+ unlinkAccount: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
971
+ providerId: string;
972
+ accountId?: string | undefined;
973
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
974
+ providerId: string;
975
+ accountId?: string | undefined;
976
+ } & {
977
+ fetchOptions?: FetchOptions | undefined;
978
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
979
+ status: boolean;
980
+ }, {
981
+ code?: string | undefined;
982
+ message?: string | undefined;
983
+ }, FetchOptions["throw"] extends true ? true : false>>;
1434
984
  } & {
1435
- admin: {
1436
- banUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1437
- userId: unknown;
1438
- banReason?: string | undefined;
1439
- banExpiresIn?: number | undefined;
1440
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1441
- userId: unknown;
1442
- banReason?: string | undefined;
1443
- banExpiresIn?: number | undefined;
1444
- } & {
1445
- fetchOptions?: FetchOptions | undefined;
1446
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1447
- user: _$better_auth_plugins0.UserWithRole;
1448
- }, {
1449
- code?: string | undefined;
1450
- message?: string | undefined;
1451
- }, FetchOptions["throw"] extends true ? true : false>>;
1452
- };
985
+ refreshToken: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
986
+ providerId: string;
987
+ accountId?: string | undefined;
988
+ userId?: string | undefined;
989
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
990
+ providerId: string;
991
+ accountId?: string | undefined;
992
+ userId?: string | undefined;
993
+ } & {
994
+ fetchOptions?: FetchOptions | undefined;
995
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
996
+ accessToken: string | undefined;
997
+ refreshToken: string | undefined;
998
+ accessTokenExpiresAt: Date | undefined;
999
+ refreshTokenExpiresAt: Date | undefined;
1000
+ scope: string | null | undefined;
1001
+ idToken: string | null | undefined;
1002
+ providerId: string;
1003
+ accountId: string;
1004
+ }, {
1005
+ code?: string | undefined;
1006
+ message?: string | undefined;
1007
+ }, FetchOptions["throw"] extends true ? true : false>>;
1453
1008
  } & {
1454
- admin: {
1455
- impersonateUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1456
- userId: unknown;
1457
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1458
- userId: unknown;
1009
+ getAccessToken: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1010
+ providerId: string;
1011
+ accountId?: string | undefined;
1012
+ userId?: string | undefined;
1013
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1014
+ providerId: string;
1015
+ accountId?: string | undefined;
1016
+ userId?: string | undefined;
1017
+ } & {
1018
+ fetchOptions?: FetchOptions | undefined;
1019
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1020
+ accessToken: string;
1021
+ accessTokenExpiresAt: Date | undefined;
1022
+ scopes: string[];
1023
+ idToken: string | undefined;
1024
+ }, {
1025
+ code?: string | undefined;
1026
+ message?: string | undefined;
1027
+ }, FetchOptions["throw"] extends true ? true : false>>;
1028
+ } & {
1029
+ accountInfo: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1030
+ accountId?: string | undefined;
1031
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1032
+ query?: {
1033
+ accountId?: string | undefined;
1034
+ } | undefined;
1035
+ fetchOptions?: FetchOptions | undefined;
1036
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1037
+ user: _$better_auth0.OAuth2UserInfo;
1038
+ data: Record<string, any>;
1039
+ }, {
1040
+ code?: string | undefined;
1041
+ message?: string | undefined;
1042
+ }, FetchOptions["throw"] extends true ? true : false>>;
1043
+ } & {
1044
+ signIn: {
1045
+ social: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1046
+ 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";
1047
+ callbackURL?: string | undefined;
1048
+ newUserCallbackURL?: string | undefined;
1049
+ errorCallbackURL?: string | undefined;
1050
+ disableRedirect?: boolean | undefined;
1051
+ idToken?: {
1052
+ token: string;
1053
+ nonce?: string | undefined;
1054
+ accessToken?: string | undefined;
1055
+ refreshToken?: string | undefined;
1056
+ expiresAt?: number | undefined;
1057
+ } | undefined;
1058
+ scopes?: string[] | undefined;
1059
+ requestSignUp?: boolean | undefined;
1060
+ loginHint?: string | undefined;
1061
+ additionalData?: Record<string, any> | undefined;
1062
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1063
+ 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";
1064
+ callbackURL?: string | undefined;
1065
+ newUserCallbackURL?: string | undefined;
1066
+ errorCallbackURL?: string | undefined;
1067
+ disableRedirect?: boolean | undefined;
1068
+ idToken?: {
1069
+ token: string;
1070
+ nonce?: string | undefined;
1071
+ accessToken?: string | undefined;
1072
+ refreshToken?: string | undefined;
1073
+ expiresAt?: number | undefined;
1074
+ } | undefined;
1075
+ scopes?: string[] | undefined;
1076
+ requestSignUp?: boolean | undefined;
1077
+ loginHint?: string | undefined;
1078
+ additionalData?: Record<string, any> | undefined;
1459
1079
  } & {
1460
1080
  fetchOptions?: FetchOptions | undefined;
1461
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1462
- session: {
1081
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
1082
+ redirect: boolean;
1083
+ url: string;
1084
+ } | {
1085
+ redirect: boolean;
1086
+ token: string;
1087
+ url: undefined;
1088
+ user: {
1463
1089
  id: string;
1464
1090
  createdAt: Date;
1465
1091
  updatedAt: Date;
1466
- userId: string;
1467
- expiresAt: Date;
1468
- token: string;
1469
- ipAddress?: string | null | undefined;
1470
- userAgent?: string | null | undefined;
1092
+ email: string;
1093
+ emailVerified: boolean;
1094
+ name: string;
1095
+ image?: string | null | undefined | undefined;
1471
1096
  };
1472
- user: _$better_auth_plugins0.UserWithRole;
1473
- }, {
1097
+ }>, {
1474
1098
  code?: string | undefined;
1475
1099
  message?: string | undefined;
1476
1100
  }, FetchOptions["throw"] extends true ? true : false>>;
1477
1101
  };
1478
1102
  } & {
1479
- admin: {
1480
- stopImpersonating: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1481
- query?: Record<string, any> | undefined;
1103
+ signUp: {
1104
+ email: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1105
+ name: string;
1106
+ email: string;
1107
+ password: string;
1108
+ image?: string | undefined;
1109
+ callbackURL?: string | undefined;
1110
+ rememberMe?: boolean | undefined;
1111
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1112
+ email: string;
1113
+ name: string;
1114
+ password: string;
1115
+ image?: string | undefined;
1116
+ callbackURL?: string | undefined;
1482
1117
  fetchOptions?: FetchOptions | undefined;
1483
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1484
- session: {
1118
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
1119
+ token: null;
1120
+ user: {
1485
1121
  id: string;
1486
1122
  createdAt: Date;
1487
1123
  updatedAt: Date;
1488
- userId: string;
1489
- expiresAt: Date;
1490
- token: string;
1491
- ipAddress?: string | null | undefined;
1492
- userAgent?: string | null | undefined;
1493
- } & Record<string, any>;
1124
+ email: string;
1125
+ emailVerified: boolean;
1126
+ name: string;
1127
+ image?: string | null | undefined | undefined;
1128
+ };
1129
+ } | {
1130
+ token: string;
1494
1131
  user: {
1495
1132
  id: string;
1496
1133
  createdAt: Date;
@@ -1498,117 +1135,611 @@ declare const authClient: {
1498
1135
  email: string;
1499
1136
  emailVerified: boolean;
1500
1137
  name: string;
1501
- image?: string | null | undefined;
1502
- } & Record<string, any>;
1503
- }, {
1138
+ image?: string | null | undefined | undefined;
1139
+ };
1140
+ }>, {
1504
1141
  code?: string | undefined;
1505
1142
  message?: string | undefined;
1506
1143
  }, FetchOptions["throw"] extends true ? true : false>>;
1507
1144
  };
1508
1145
  } & {
1509
- admin: {
1510
- revokeUserSession: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1511
- sessionToken: string;
1146
+ signIn: {
1147
+ email: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1148
+ email: string;
1149
+ password: string;
1150
+ callbackURL?: string | undefined;
1151
+ rememberMe?: boolean | undefined;
1512
1152
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1513
- sessionToken: string;
1153
+ email: string;
1154
+ password: string;
1155
+ callbackURL?: string | undefined;
1156
+ rememberMe?: boolean | undefined;
1514
1157
  } & {
1515
1158
  fetchOptions?: FetchOptions | undefined;
1516
1159
  }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1517
- success: boolean;
1160
+ redirect: boolean;
1161
+ token: string;
1162
+ url?: string | undefined;
1163
+ user: {
1164
+ id: string;
1165
+ createdAt: Date;
1166
+ updatedAt: Date;
1167
+ email: string;
1168
+ emailVerified: boolean;
1169
+ name: string;
1170
+ image?: string | null | undefined | undefined;
1171
+ };
1518
1172
  }, {
1519
1173
  code?: string | undefined;
1520
1174
  message?: string | undefined;
1521
1175
  }, FetchOptions["throw"] extends true ? true : false>>;
1522
1176
  };
1523
1177
  } & {
1524
- admin: {
1525
- revokeUserSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1526
- userId: unknown;
1527
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1528
- userId: unknown;
1529
- } & {
1530
- fetchOptions?: FetchOptions | undefined;
1531
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1532
- success: boolean;
1533
- }, {
1534
- code?: string | undefined;
1535
- message?: string | undefined;
1536
- }, FetchOptions["throw"] extends true ? true : false>>;
1178
+ updateUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<Partial<{}> & {
1179
+ name?: string | undefined;
1180
+ image?: string | undefined | null;
1181
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1182
+ image?: (string | null) | undefined;
1183
+ name?: string | undefined;
1184
+ fetchOptions?: FetchOptions | undefined;
1185
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1186
+ status: boolean;
1187
+ }, {
1188
+ code?: string | undefined;
1189
+ message?: string | undefined;
1190
+ }, FetchOptions["throw"] extends true ? true : false>>;
1191
+ } & {
1192
+ listSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1193
+ query?: Record<string, any> | undefined;
1194
+ fetchOptions?: FetchOptions | undefined;
1195
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<_$better_auth0.Prettify<{
1196
+ id: string;
1197
+ createdAt: Date;
1198
+ updatedAt: Date;
1199
+ userId: string;
1200
+ expiresAt: Date;
1201
+ token: string;
1202
+ ipAddress?: string | null | undefined | undefined;
1203
+ userAgent?: string | null | undefined | undefined;
1204
+ }>[], {
1205
+ code?: string | undefined;
1206
+ message?: string | undefined;
1207
+ }, FetchOptions["throw"] extends true ? true : false>>;
1208
+ } & {
1209
+ getSession: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1210
+ disableCookieCache?: unknown;
1211
+ disableRefresh?: unknown;
1212
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1213
+ query?: {
1214
+ disableCookieCache?: unknown;
1215
+ disableRefresh?: unknown;
1216
+ } | undefined;
1217
+ fetchOptions?: FetchOptions | undefined;
1218
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1219
+ user: {
1220
+ id: string;
1221
+ createdAt: Date;
1222
+ updatedAt: Date;
1223
+ email: string;
1224
+ emailVerified: boolean;
1225
+ name: string;
1226
+ image?: string | null | undefined;
1227
+ };
1228
+ session: {
1229
+ id: string;
1230
+ createdAt: Date;
1231
+ updatedAt: Date;
1232
+ userId: string;
1233
+ expiresAt: Date;
1234
+ token: string;
1235
+ ipAddress?: string | null | undefined;
1236
+ userAgent?: string | null | undefined;
1237
+ };
1238
+ } | null, {
1239
+ code?: string | undefined;
1240
+ message?: string | undefined;
1241
+ }, FetchOptions["throw"] extends true ? true : false>>;
1242
+ } & {
1243
+ useSession: () => {
1244
+ data: {
1245
+ user: {
1246
+ id: string;
1247
+ createdAt: Date;
1248
+ updatedAt: Date;
1249
+ email: string;
1250
+ emailVerified: boolean;
1251
+ name: string;
1252
+ image?: string | null | undefined;
1253
+ };
1254
+ session: {
1255
+ id: string;
1256
+ createdAt: Date;
1257
+ updatedAt: Date;
1258
+ userId: string;
1259
+ expiresAt: Date;
1260
+ token: string;
1261
+ ipAddress?: string | null | undefined;
1262
+ userAgent?: string | null | undefined;
1263
+ };
1264
+ } | null;
1265
+ isPending: boolean;
1266
+ isRefetching: boolean;
1267
+ error: _$better_auth_client0.BetterFetchError | null;
1268
+ refetch: (queryParams?: {
1269
+ query?: _$better_auth0.SessionQueryParams;
1270
+ } | undefined) => Promise<void>;
1537
1271
  };
1272
+ $Infer: {
1273
+ Session: {
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;
1282
+ };
1283
+ session: {
1284
+ id: string;
1285
+ createdAt: Date;
1286
+ updatedAt: Date;
1287
+ userId: string;
1288
+ expiresAt: Date;
1289
+ token: string;
1290
+ ipAddress?: string | null | undefined;
1291
+ userAgent?: string | null | undefined;
1292
+ };
1293
+ };
1294
+ };
1295
+ $fetch: _$better_auth_client0.BetterFetch<{
1296
+ plugins: (_$better_auth_client0.BetterFetchPlugin<Record<string, any>> | {
1297
+ id: string;
1298
+ name: string;
1299
+ hooks: {
1300
+ onSuccess(context: _$better_auth_client0.SuccessContext<any>): void;
1301
+ };
1302
+ } | {
1303
+ id: string;
1304
+ name: string;
1305
+ hooks: {
1306
+ onSuccess: ((context: _$better_auth_client0.SuccessContext<any>) => Promise<void> | void) | undefined;
1307
+ onError: ((context: _$better_auth_client0.ErrorContext) => Promise<void> | void) | undefined;
1308
+ onRequest: (<T extends Record<string, any>>(context: _$better_auth_client0.RequestContext<T>) => Promise<_$better_auth_client0.RequestContext | void> | _$better_auth_client0.RequestContext | void) | undefined;
1309
+ onResponse: ((context: _$better_auth_client0.ResponseContext) => Promise<Response | void | _$better_auth_client0.ResponseContext> | Response | _$better_auth_client0.ResponseContext | void) | undefined;
1310
+ };
1311
+ })[];
1312
+ cache?: RequestCache | undefined;
1313
+ method: string;
1314
+ window?: null | undefined;
1315
+ headers?: (HeadersInit & (HeadersInit | {
1316
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1317
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1318
+ authorization: "Bearer" | "Basic";
1319
+ })) | undefined;
1320
+ redirect?: RequestRedirect | undefined;
1321
+ credentials?: RequestCredentials;
1322
+ integrity?: string | undefined;
1323
+ keepalive?: boolean | undefined;
1324
+ mode?: RequestMode | undefined;
1325
+ priority?: RequestPriority | undefined;
1326
+ referrer?: string | undefined;
1327
+ referrerPolicy?: ReferrerPolicy | undefined;
1328
+ signal?: (AbortSignal | null) | undefined;
1329
+ onRetry?: ((response: _$better_auth_client0.ResponseContext) => Promise<void> | void) | undefined;
1330
+ hookOptions?: {
1331
+ cloneResponse?: boolean;
1332
+ } | undefined;
1333
+ timeout?: number | undefined;
1334
+ customFetchImpl: _$better_auth_client0.FetchEsque;
1335
+ baseURL: string;
1336
+ throw?: boolean | undefined;
1337
+ auth?: ({
1338
+ type: "Bearer";
1339
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1340
+ } | {
1341
+ type: "Basic";
1342
+ username: string | (() => string | undefined) | undefined;
1343
+ password: string | (() => string | undefined) | undefined;
1344
+ } | {
1345
+ type: "Custom";
1346
+ prefix: string | (() => string | undefined) | undefined;
1347
+ value: string | (() => string | undefined) | undefined;
1348
+ }) | undefined;
1349
+ body?: any;
1350
+ query?: any;
1351
+ params?: any;
1352
+ duplex?: "full" | "half" | undefined;
1353
+ jsonParser: (text: string) => Promise<any> | any;
1354
+ retry?: _$better_auth_client0.RetryOptions | undefined;
1355
+ retryAttempt?: number | undefined;
1356
+ output?: (_$better_auth_client0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1357
+ errorSchema?: _$better_auth_client0.StandardSchemaV1 | undefined;
1358
+ disableValidation?: boolean | undefined;
1359
+ disableSignal?: boolean | undefined;
1360
+ }, unknown, unknown, {}>;
1361
+ $store: {
1362
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
1363
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
1364
+ atoms: Record<string, _$better_auth_client0.WritableAtom<any>>;
1365
+ };
1366
+ $ERROR_CODES: {
1367
+ readonly USER_NOT_FOUND: "User not found";
1368
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
1369
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
1370
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
1371
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
1372
+ readonly INVALID_PASSWORD: "Invalid password";
1373
+ readonly INVALID_EMAIL: "Invalid email";
1374
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
1375
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
1376
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
1377
+ readonly INVALID_TOKEN: "Invalid token";
1378
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
1379
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
1380
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
1381
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
1382
+ readonly PASSWORD_TOO_SHORT: "Password too short";
1383
+ readonly PASSWORD_TOO_LONG: "Password too long";
1384
+ readonly USER_ALREADY_EXISTS: "User already exists.";
1385
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
1386
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
1387
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
1388
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
1389
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
1390
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
1391
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
1392
+ readonly CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: "Cross-site navigation login blocked. This request appears to be a CSRF attack.";
1393
+ readonly VERIFICATION_EMAIL_NOT_ENABLED: "Verification email isn't enabled";
1394
+ readonly EMAIL_ALREADY_VERIFIED: "Email is already verified";
1395
+ readonly EMAIL_MISMATCH: "Email mismatch";
1396
+ readonly SESSION_NOT_FRESH: "Session is not fresh";
1397
+ readonly LINKED_ACCOUNT_ALREADY_EXISTS: "Linked account already exists";
1398
+ readonly INVALID_ORIGIN: "Invalid origin";
1399
+ readonly INVALID_CALLBACK_URL: "Invalid callbackURL";
1400
+ readonly INVALID_REDIRECT_URL: "Invalid redirectURL";
1401
+ readonly INVALID_ERROR_CALLBACK_URL: "Invalid errorCallbackURL";
1402
+ readonly INVALID_NEW_USER_CALLBACK_URL: "Invalid newUserCallbackURL";
1403
+ readonly MISSING_OR_NULL_ORIGIN: "Missing or null Origin";
1404
+ readonly CALLBACK_URL_REQUIRED: "callbackURL is required";
1405
+ readonly FAILED_TO_CREATE_VERIFICATION: "Unable to create verification";
1406
+ readonly FIELD_NOT_ALLOWED: "Field not allowed to be set";
1407
+ readonly ASYNC_VALIDATION_NOT_SUPPORTED: "Async validation is not supported";
1408
+ readonly VALIDATION_ERROR: "Validation Error";
1409
+ readonly MISSING_FIELD: "Field is required";
1410
+ };
1411
+ };
1412
+ declare function getAuthClient(): {
1413
+ signOut: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1414
+ query?: Record<string, any> | undefined;
1415
+ fetchOptions?: FetchOptions | undefined;
1416
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1417
+ success: boolean;
1418
+ }, {
1419
+ code?: string | undefined;
1420
+ message?: string | undefined;
1421
+ }, FetchOptions["throw"] extends true ? true : false>>;
1422
+ } & {
1423
+ resetPassword: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1424
+ newPassword: string;
1425
+ token?: string | undefined;
1426
+ }> & Record<string, any>, Partial<{
1427
+ token?: string | undefined;
1428
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1429
+ newPassword: string;
1430
+ token?: string | undefined;
1431
+ } & {
1432
+ fetchOptions?: FetchOptions | undefined;
1433
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1434
+ status: boolean;
1435
+ }, {
1436
+ code?: string | undefined;
1437
+ message?: string | undefined;
1438
+ }, FetchOptions["throw"] extends true ? true : false>>;
1439
+ } & {
1440
+ verifyEmail: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1441
+ token: string;
1442
+ callbackURL?: string | undefined;
1443
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1444
+ query: {
1445
+ token: string;
1446
+ callbackURL?: string | undefined;
1447
+ };
1448
+ fetchOptions?: FetchOptions | undefined;
1449
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<void | {
1450
+ status: boolean;
1451
+ }>, {
1452
+ code?: string | undefined;
1453
+ message?: string | undefined;
1454
+ }, FetchOptions["throw"] extends true ? true : false>>;
1455
+ } & {
1456
+ sendVerificationEmail: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1457
+ email: string;
1458
+ callbackURL?: string | undefined;
1459
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1460
+ email: string;
1461
+ callbackURL?: string | undefined;
1462
+ } & {
1463
+ fetchOptions?: FetchOptions | undefined;
1464
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1465
+ status: boolean;
1466
+ }, {
1467
+ code?: string | undefined;
1468
+ message?: string | undefined;
1469
+ }, FetchOptions["throw"] extends true ? true : false>>;
1470
+ } & {
1471
+ changeEmail: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1472
+ newEmail: string;
1473
+ callbackURL?: string | undefined;
1474
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1475
+ newEmail: string;
1476
+ callbackURL?: string | undefined;
1477
+ } & {
1478
+ fetchOptions?: FetchOptions | undefined;
1479
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1480
+ status: boolean;
1481
+ }, {
1482
+ code?: string | undefined;
1483
+ message?: string | undefined;
1484
+ }, FetchOptions["throw"] extends true ? true : false>>;
1485
+ } & {
1486
+ changePassword: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1487
+ newPassword: string;
1488
+ currentPassword: string;
1489
+ revokeOtherSessions?: boolean | undefined;
1490
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1491
+ newPassword: string;
1492
+ currentPassword: string;
1493
+ revokeOtherSessions?: boolean | undefined;
1494
+ } & {
1495
+ fetchOptions?: FetchOptions | undefined;
1496
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1497
+ token: string | null;
1498
+ user: {
1499
+ id: string;
1500
+ createdAt: Date;
1501
+ updatedAt: Date;
1502
+ email: string;
1503
+ emailVerified: boolean;
1504
+ name: string;
1505
+ image?: string | null | undefined;
1506
+ } & Record<string, any>;
1507
+ }, {
1508
+ code?: string | undefined;
1509
+ message?: string | undefined;
1510
+ }, FetchOptions["throw"] extends true ? true : false>>;
1511
+ } & {
1512
+ deleteUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1513
+ callbackURL?: string | undefined;
1514
+ password?: string | undefined;
1515
+ token?: string | undefined;
1516
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1517
+ callbackURL?: string | undefined;
1518
+ password?: string | undefined;
1519
+ token?: string | undefined;
1520
+ } & {
1521
+ fetchOptions?: FetchOptions | undefined;
1522
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1523
+ success: boolean;
1524
+ message: string;
1525
+ }, {
1526
+ code?: string | undefined;
1527
+ message?: string | undefined;
1528
+ }, FetchOptions["throw"] extends true ? true : false>>;
1529
+ } & {
1530
+ requestPasswordReset: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1531
+ email: string;
1532
+ redirectTo?: string | undefined;
1533
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1534
+ email: string;
1535
+ redirectTo?: string | undefined;
1536
+ } & {
1537
+ fetchOptions?: FetchOptions | undefined;
1538
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1539
+ status: boolean;
1540
+ message: string;
1541
+ }, {
1542
+ code?: string | undefined;
1543
+ message?: string | undefined;
1544
+ }, FetchOptions["throw"] extends true ? true : false>>;
1538
1545
  } & {
1539
- admin: {
1540
- removeUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1541
- userId: unknown;
1542
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1543
- userId: unknown;
1544
- } & {
1546
+ resetPassword: {
1547
+ ":token": <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1548
+ callbackURL: string;
1549
+ }> & Record<string, any>, {
1550
+ token: string;
1551
+ }>>(data_0: _$better_auth0.Prettify<{
1552
+ query: {
1553
+ callbackURL: string;
1554
+ };
1545
1555
  fetchOptions?: FetchOptions | undefined;
1546
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1547
- success: boolean;
1548
- }, {
1556
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<never, {
1549
1557
  code?: string | undefined;
1550
1558
  message?: string | undefined;
1551
1559
  }, FetchOptions["throw"] extends true ? true : false>>;
1552
1560
  };
1553
1561
  } & {
1554
- admin: {
1555
- setUserPassword: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1556
- newPassword: string;
1557
- userId: unknown;
1558
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1559
- newPassword: string;
1560
- userId: unknown;
1561
- } & {
1562
- fetchOptions?: FetchOptions | undefined;
1563
- }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1564
- status: boolean;
1565
- }, {
1566
- code?: string | undefined;
1567
- message?: string | undefined;
1568
- }, FetchOptions["throw"] extends true ? true : false>>;
1569
- };
1562
+ revokeSession: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1563
+ token: string;
1564
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1565
+ token: string;
1566
+ } & {
1567
+ fetchOptions?: FetchOptions | undefined;
1568
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1569
+ status: boolean;
1570
+ }, {
1571
+ code?: string | undefined;
1572
+ message?: string | undefined;
1573
+ }, FetchOptions["throw"] extends true ? true : false>>;
1570
1574
  } & {
1571
- admin: {
1572
- hasPermission: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<({
1573
- permission: {
1574
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1575
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1576
- };
1577
- permissions?: never | undefined;
1578
- } | {
1579
- permissions: {
1580
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1581
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1582
- };
1583
- permission?: never | undefined;
1584
- }) & {
1585
- userId?: string | undefined;
1586
- role?: "user" | "admin" | undefined;
1587
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<(({
1588
- permission: {
1589
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1590
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1591
- };
1592
- permissions?: never | undefined;
1593
- } | {
1594
- permissions: {
1595
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1596
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1575
+ revokeSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1576
+ query?: Record<string, any> | undefined;
1577
+ fetchOptions?: FetchOptions | undefined;
1578
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1579
+ status: boolean;
1580
+ }, {
1581
+ code?: string | undefined;
1582
+ message?: string | undefined;
1583
+ }, FetchOptions["throw"] extends true ? true : false>>;
1584
+ } & {
1585
+ revokeOtherSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1586
+ query?: Record<string, any> | undefined;
1587
+ fetchOptions?: FetchOptions | undefined;
1588
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1589
+ status: boolean;
1590
+ }, {
1591
+ code?: string | undefined;
1592
+ message?: string | undefined;
1593
+ }, FetchOptions["throw"] extends true ? true : false>>;
1594
+ } & {
1595
+ linkSocial: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1596
+ provider: unknown;
1597
+ callbackURL?: string | undefined;
1598
+ idToken?: {
1599
+ token: string;
1600
+ nonce?: string | undefined;
1601
+ accessToken?: string | undefined;
1602
+ refreshToken?: string | undefined;
1603
+ scopes?: string[] | undefined;
1604
+ } | undefined;
1605
+ requestSignUp?: boolean | undefined;
1606
+ scopes?: string[] | undefined;
1607
+ errorCallbackURL?: string | undefined;
1608
+ disableRedirect?: boolean | undefined;
1609
+ additionalData?: Record<string, any> | undefined;
1610
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1611
+ provider: unknown;
1612
+ callbackURL?: string | undefined;
1613
+ idToken?: {
1614
+ token: string;
1615
+ nonce?: string | undefined;
1616
+ accessToken?: string | undefined;
1617
+ refreshToken?: string | undefined;
1618
+ scopes?: string[] | undefined;
1619
+ } | undefined;
1620
+ requestSignUp?: boolean | undefined;
1621
+ scopes?: string[] | undefined;
1622
+ errorCallbackURL?: string | undefined;
1623
+ disableRedirect?: boolean | undefined;
1624
+ additionalData?: Record<string, any> | undefined;
1625
+ } & {
1626
+ fetchOptions?: FetchOptions | undefined;
1627
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1628
+ url: string;
1629
+ redirect: boolean;
1630
+ }, {
1631
+ code?: string | undefined;
1632
+ message?: string | undefined;
1633
+ }, FetchOptions["throw"] extends true ? true : false>>;
1634
+ } & {
1635
+ listAccounts: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1636
+ query?: Record<string, any> | undefined;
1637
+ fetchOptions?: FetchOptions | undefined;
1638
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1639
+ scopes: string[];
1640
+ id: string;
1641
+ createdAt: Date;
1642
+ updatedAt: Date;
1643
+ userId: string;
1644
+ providerId: string;
1645
+ accountId: string;
1646
+ }[], {
1647
+ code?: string | undefined;
1648
+ message?: string | undefined;
1649
+ }, FetchOptions["throw"] extends true ? true : false>>;
1650
+ } & {
1651
+ deleteUser: {
1652
+ callback: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1653
+ token: string;
1654
+ callbackURL?: string | undefined;
1655
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1656
+ query: {
1657
+ token: string;
1658
+ callbackURL?: string | undefined;
1597
1659
  };
1598
- permission?: never | undefined;
1599
- }) & {
1600
- userId?: string | undefined;
1601
- role?: "user" | "admin" | undefined;
1602
- }) & {
1603
1660
  fetchOptions?: FetchOptions | undefined;
1604
1661
  }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1605
- error: null;
1606
1662
  success: boolean;
1663
+ message: string;
1607
1664
  }, {
1608
1665
  code?: string | undefined;
1609
1666
  message?: string | undefined;
1610
1667
  }, FetchOptions["throw"] extends true ? true : false>>;
1611
1668
  };
1669
+ } & {
1670
+ unlinkAccount: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1671
+ providerId: string;
1672
+ accountId?: string | undefined;
1673
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1674
+ providerId: string;
1675
+ accountId?: string | undefined;
1676
+ } & {
1677
+ fetchOptions?: FetchOptions | undefined;
1678
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1679
+ status: boolean;
1680
+ }, {
1681
+ code?: string | undefined;
1682
+ message?: string | undefined;
1683
+ }, FetchOptions["throw"] extends true ? true : false>>;
1684
+ } & {
1685
+ refreshToken: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1686
+ providerId: string;
1687
+ accountId?: string | undefined;
1688
+ userId?: string | undefined;
1689
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1690
+ providerId: string;
1691
+ accountId?: string | undefined;
1692
+ userId?: string | undefined;
1693
+ } & {
1694
+ fetchOptions?: FetchOptions | undefined;
1695
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1696
+ accessToken: string | undefined;
1697
+ refreshToken: string | undefined;
1698
+ accessTokenExpiresAt: Date | undefined;
1699
+ refreshTokenExpiresAt: Date | undefined;
1700
+ scope: string | null | undefined;
1701
+ idToken: string | null | undefined;
1702
+ providerId: string;
1703
+ accountId: string;
1704
+ }, {
1705
+ code?: string | undefined;
1706
+ message?: string | undefined;
1707
+ }, FetchOptions["throw"] extends true ? true : false>>;
1708
+ } & {
1709
+ getAccessToken: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
1710
+ providerId: string;
1711
+ accountId?: string | undefined;
1712
+ userId?: string | undefined;
1713
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
1714
+ providerId: string;
1715
+ accountId?: string | undefined;
1716
+ userId?: string | undefined;
1717
+ } & {
1718
+ fetchOptions?: FetchOptions | undefined;
1719
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1720
+ accessToken: string;
1721
+ accessTokenExpiresAt: Date | undefined;
1722
+ scopes: string[];
1723
+ idToken: string | undefined;
1724
+ }, {
1725
+ code?: string | undefined;
1726
+ message?: string | undefined;
1727
+ }, FetchOptions["throw"] extends true ? true : false>>;
1728
+ } & {
1729
+ accountInfo: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
1730
+ accountId?: string | undefined;
1731
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
1732
+ query?: {
1733
+ accountId?: string | undefined;
1734
+ } | undefined;
1735
+ fetchOptions?: FetchOptions | undefined;
1736
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1737
+ user: _$better_auth0.OAuth2UserInfo;
1738
+ data: Record<string, any>;
1739
+ }, {
1740
+ code?: string | undefined;
1741
+ message?: string | undefined;
1742
+ }, FetchOptions["throw"] extends true ? true : false>>;
1612
1743
  } & {
1613
1744
  signIn: {
1614
1745
  social: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
@@ -1684,12 +1815,6 @@ declare const authClient: {
1684
1815
  image?: string | undefined;
1685
1816
  callbackURL?: string | undefined;
1686
1817
  fetchOptions?: FetchOptions | undefined;
1687
- } & {} & {} & {} & {
1688
- metadata?: string | null | undefined;
1689
- onboarding?: number | null | undefined;
1690
- preferences?: string | null | undefined;
1691
- flags?: string | null | undefined;
1692
- stripeCustomerId?: string | null | undefined;
1693
1818
  }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
1694
1819
  token: null;
1695
1820
  user: {
@@ -1757,13 +1882,7 @@ declare const authClient: {
1757
1882
  image?: (string | null) | undefined;
1758
1883
  name?: string | undefined;
1759
1884
  fetchOptions?: FetchOptions | undefined;
1760
- } & Partial<{} & {} & {} & {
1761
- metadata?: string | null | undefined;
1762
- onboarding?: number | null | undefined;
1763
- preferences?: string | null | undefined;
1764
- flags?: string | null | undefined;
1765
- stripeCustomerId?: string | null | undefined;
1766
- }>> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1885
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
1767
1886
  status: boolean;
1768
1887
  }, {
1769
1888
  code?: string | undefined;
@@ -1805,15 +1924,6 @@ declare const authClient: {
1805
1924
  emailVerified: boolean;
1806
1925
  name: string;
1807
1926
  image?: string | null | undefined;
1808
- banned: boolean | null | undefined;
1809
- role?: string | null | undefined;
1810
- banReason?: string | null | undefined;
1811
- banExpires?: Date | null | undefined;
1812
- metadata?: string | null | undefined;
1813
- onboarding?: number | null | undefined;
1814
- preferences?: string | null | undefined;
1815
- flags?: string | null | undefined;
1816
- stripeCustomerId?: string | null | undefined;
1817
1927
  };
1818
1928
  session: {
1819
1929
  id: string;
@@ -1824,146 +1934,11 @@ declare const authClient: {
1824
1934
  token: string;
1825
1935
  ipAddress?: string | null | undefined;
1826
1936
  userAgent?: string | null | undefined;
1827
- activeOrganizationId?: string | null | undefined;
1828
- activeTeamId?: string | null | undefined;
1829
- impersonatedBy?: string | null | undefined;
1830
- activeTeamRole?: string | null | undefined;
1831
- activeOrganizationRole?: string | null | undefined;
1832
- activeOrganizationType?: string | null | undefined;
1833
1937
  };
1834
1938
  } | null, {
1835
1939
  code?: string | undefined;
1836
1940
  message?: string | undefined;
1837
1941
  }, FetchOptions["throw"] extends true ? true : false>>;
1838
- } & {
1839
- getLastUsedLoginMethod: () => string | null;
1840
- clearLastUsedLoginMethod: () => void;
1841
- isLastUsedLoginMethod: (method: string) => boolean;
1842
- } & {
1843
- $Infer: {
1844
- ActiveOrganization: {
1845
- members: {
1846
- id: string;
1847
- organizationId: string;
1848
- role: "admin" | "member" | "owner";
1849
- createdAt: Date;
1850
- userId: string;
1851
- teamId?: string | undefined | undefined;
1852
- user: {
1853
- id: string;
1854
- email: string;
1855
- name: string;
1856
- image?: string | undefined;
1857
- };
1858
- }[];
1859
- invitations: {
1860
- id: string;
1861
- organizationId: string;
1862
- email: string;
1863
- role: "admin" | "member" | "owner";
1864
- status: _$better_auth_plugins0.InvitationStatus;
1865
- inviterId: string;
1866
- expiresAt: Date;
1867
- createdAt: Date;
1868
- teamId?: string | undefined | undefined;
1869
- }[];
1870
- teams: {
1871
- id: string;
1872
- name: string;
1873
- organizationId: string;
1874
- createdAt: Date;
1875
- updatedAt?: Date | undefined;
1876
- }[];
1877
- } & {
1878
- id: string;
1879
- name: string;
1880
- slug: string;
1881
- createdAt: Date;
1882
- logo?: string | null | undefined | undefined;
1883
- metadata?: any;
1884
- };
1885
- Organization: {
1886
- id: string;
1887
- name: string;
1888
- slug: string;
1889
- createdAt: Date;
1890
- logo?: string | null | undefined;
1891
- metadata?: any;
1892
- };
1893
- Invitation: {
1894
- id: string;
1895
- organizationId: string;
1896
- email: string;
1897
- role: "admin" | "member" | "owner";
1898
- status: _$better_auth_plugins0.InvitationStatus;
1899
- inviterId: string;
1900
- expiresAt: Date;
1901
- createdAt: Date;
1902
- teamId?: string | undefined | undefined;
1903
- };
1904
- Member: {
1905
- id: string;
1906
- organizationId: string;
1907
- role: "admin" | "member" | "owner";
1908
- createdAt: Date;
1909
- userId: string;
1910
- teamId?: string | undefined | undefined;
1911
- user: {
1912
- id: string;
1913
- email: string;
1914
- name: string;
1915
- image?: string | undefined;
1916
- };
1917
- };
1918
- Team: {
1919
- id: string;
1920
- name: string;
1921
- organizationId: string;
1922
- createdAt: Date;
1923
- updatedAt?: Date | undefined;
1924
- };
1925
- };
1926
- organization: {
1927
- checkRolePermission: <R extends "admin" | "member" | "owner">(data: ({
1928
- permission: {
1929
- readonly organization?: ("delete" | "update")[] | undefined;
1930
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1931
- readonly invitation?: ("create" | "cancel")[] | undefined;
1932
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1933
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
1934
- };
1935
- permissions?: never | undefined;
1936
- } | {
1937
- permissions: {
1938
- readonly organization?: ("delete" | "update")[] | undefined;
1939
- readonly member?: ("create" | "delete" | "update")[] | undefined;
1940
- readonly invitation?: ("create" | "cancel")[] | undefined;
1941
- readonly team?: ("create" | "delete" | "update")[] | undefined;
1942
- readonly ac?: ("create" | "delete" | "update" | "read")[] | undefined;
1943
- };
1944
- permission?: never | undefined;
1945
- }) & {
1946
- role: R;
1947
- }) => boolean;
1948
- };
1949
- } & {
1950
- admin: {
1951
- checkRolePermission: <R extends "user" | "admin">(data: ({
1952
- permission: {
1953
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1954
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1955
- };
1956
- permissions?: never | undefined;
1957
- } | {
1958
- permissions: {
1959
- readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
1960
- readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1961
- };
1962
- permission?: never | undefined;
1963
- }) & {
1964
- role: R;
1965
- }) => boolean;
1966
- };
1967
1942
  } & {
1968
1943
  useSession: () => {
1969
1944
  data: {
@@ -1975,15 +1950,6 @@ declare const authClient: {
1975
1950
  emailVerified: boolean;
1976
1951
  name: string;
1977
1952
  image?: string | null | undefined;
1978
- banned: boolean | null | undefined;
1979
- role?: string | null | undefined;
1980
- banReason?: string | null | undefined;
1981
- banExpires?: Date | null | undefined;
1982
- metadata?: string | null | undefined;
1983
- onboarding?: number | null | undefined;
1984
- preferences?: string | null | undefined;
1985
- flags?: string | null | undefined;
1986
- stripeCustomerId?: string | null | undefined;
1987
1953
  };
1988
1954
  session: {
1989
1955
  id: string;
@@ -1994,12 +1960,6 @@ declare const authClient: {
1994
1960
  token: string;
1995
1961
  ipAddress?: string | null | undefined;
1996
1962
  userAgent?: string | null | undefined;
1997
- activeOrganizationId?: string | null | undefined;
1998
- activeTeamId?: string | null | undefined;
1999
- impersonatedBy?: string | null | undefined;
2000
- activeTeamRole?: string | null | undefined;
2001
- activeOrganizationRole?: string | null | undefined;
2002
- activeOrganizationType?: string | null | undefined;
2003
1963
  };
2004
1964
  } | null;
2005
1965
  isPending: boolean;
@@ -2019,15 +1979,6 @@ declare const authClient: {
2019
1979
  emailVerified: boolean;
2020
1980
  name: string;
2021
1981
  image?: string | null | undefined;
2022
- banned: boolean | null | undefined;
2023
- role?: string | null | undefined;
2024
- banReason?: string | null | undefined;
2025
- banExpires?: Date | null | undefined;
2026
- metadata?: string | null | undefined;
2027
- onboarding?: number | null | undefined;
2028
- preferences?: string | null | undefined;
2029
- flags?: string | null | undefined;
2030
- stripeCustomerId?: string | null | undefined;
2031
1982
  };
2032
1983
  session: {
2033
1984
  id: string;
@@ -2038,12 +1989,6 @@ declare const authClient: {
2038
1989
  token: string;
2039
1990
  ipAddress?: string | null | undefined;
2040
1991
  userAgent?: string | null | undefined;
2041
- activeOrganizationId?: string | null | undefined;
2042
- activeTeamId?: string | null | undefined;
2043
- impersonatedBy?: string | null | undefined;
2044
- activeTeamRole?: string | null | undefined;
2045
- activeOrganizationRole?: string | null | undefined;
2046
- activeOrganizationType?: string | null | undefined;
2047
1992
  };
2048
1993
  };
2049
1994
  };
@@ -2119,84 +2064,8 @@ declare const authClient: {
2119
2064
  atoms: Record<string, _$better_auth_client0.WritableAtom<any>>;
2120
2065
  };
2121
2066
  $ERROR_CODES: {
2122
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
2123
- readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
2124
- readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
2125
- readonly ORGANIZATION_SLUG_ALREADY_TAKEN: "Organization slug already taken";
2126
- readonly ORGANIZATION_NOT_FOUND: "Organization not found";
2127
- readonly USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: "User is not a member of the organization";
2128
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: "You are not allowed to update this organization";
2129
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: "You are not allowed to delete this organization";
2130
- readonly NO_ACTIVE_ORGANIZATION: "No active organization";
2131
- readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: "User is already a member of this organization";
2132
- readonly MEMBER_NOT_FOUND: "Member not found";
2133
- readonly ROLE_NOT_FOUND: "Role not found";
2134
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: "You are not allowed to create a new team";
2135
- readonly TEAM_ALREADY_EXISTS: "Team already exists";
2136
- readonly TEAM_NOT_FOUND: "Team not found";
2137
- readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: "You cannot leave the organization as the only owner";
2138
- readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: "You cannot leave the organization without an owner";
2139
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: "You are not allowed to delete this member";
2140
- readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: "You are not allowed to invite users to this organization";
2141
- readonly USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: "User is already invited to this organization";
2142
- readonly INVITATION_NOT_FOUND: "Invitation not found";
2143
- readonly YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: "You are not the recipient of the invitation";
2144
- readonly EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: "Email verification required before accepting or rejecting invitation";
2145
- readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: "You are not allowed to cancel this invitation";
2146
- readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: "Inviter is no longer a member of the organization";
2147
- readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: "You are not allowed to invite a user with this role";
2148
- readonly FAILED_TO_RETRIEVE_INVITATION: "Failed to retrieve invitation";
2149
- readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: "You have reached the maximum number of teams";
2150
- readonly UNABLE_TO_REMOVE_LAST_TEAM: "Unable to remove last team";
2151
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: "You are not allowed to update this member";
2152
- readonly ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: "Organization membership limit reached";
2153
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to create teams in this organization";
2154
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to delete teams in this organization";
2155
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: "You are not allowed to update this team";
2156
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: "You are not allowed to delete this team";
2157
- readonly INVITATION_LIMIT_REACHED: "Invitation limit reached";
2158
- readonly TEAM_MEMBER_LIMIT_REACHED: "Team member limit reached";
2159
- readonly USER_IS_NOT_A_MEMBER_OF_THE_TEAM: "User is not a member of the team";
2160
- readonly YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: "You are not allowed to list the members of this team";
2161
- readonly YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: "You do not have an active team";
2162
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: "You are not allowed to create a new member";
2163
- readonly YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: "You are not allowed to remove a team member";
2164
- readonly YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: "You are not allowed to access this organization as an owner";
2165
- readonly YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: "You are not a member of this organization";
2166
- readonly MISSING_AC_INSTANCE: "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information";
2167
- readonly YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: "You must be in an organization to create a role";
2168
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: "You are not allowed to create a role";
2169
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: "You are not allowed to update a role";
2170
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: "You are not allowed to delete a role";
2171
- readonly YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: "You are not allowed to read a role";
2172
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: "You are not allowed to list a role";
2173
- readonly YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: "You are not allowed to get a role";
2174
- readonly TOO_MANY_ROLES: "This organization has too many roles";
2175
- readonly INVALID_RESOURCE: "The provided permission includes an invalid resource";
2176
- readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
2177
- readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
2178
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
2179
- readonly USER_ALREADY_EXISTS: "User already exists.";
2180
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2181
- readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
2182
- readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
2183
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
2184
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
2185
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
2186
- readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
2187
- readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
2188
- readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
2189
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
2190
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
2191
- readonly BANNED_USER: "You have been banned from this application";
2192
- readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
2193
- readonly NO_DATA_TO_UPDATE: "No data to update";
2194
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
2195
- readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
2196
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
2197
- readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
2198
- readonly INVALID_ROLE_TYPE: "Invalid role type";
2199
2067
  readonly USER_NOT_FOUND: "User not found";
2068
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
2200
2069
  readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2201
2070
  readonly FAILED_TO_UPDATE_USER: "Failed to update user";
2202
2071
  readonly FAILED_TO_GET_SESSION: "Failed to get session";
@@ -2212,6 +2081,8 @@ declare const authClient: {
2212
2081
  readonly EMAIL_NOT_VERIFIED: "Email not verified";
2213
2082
  readonly PASSWORD_TOO_SHORT: "Password too short";
2214
2083
  readonly PASSWORD_TOO_LONG: "Password too long";
2084
+ readonly USER_ALREADY_EXISTS: "User already exists.";
2085
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2215
2086
  readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
2216
2087
  readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
2217
2088
  readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
@@ -2239,5 +2110,5 @@ declare const authClient: {
2239
2110
  };
2240
2111
  };
2241
2112
  //#endregion
2242
- export { authClient };
2113
+ export { type M5KAuthClient as AuthClient, authClient, configureAuthClient, createM5KAuthClient, getAuthClient };
2243
2114
  //# sourceMappingURL=auth.lib.d.ts.map