@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
@@ -0,0 +1,708 @@
1
+ import * as _$better_auth0 from "better-auth";
2
+ import * as _$better_auth_client0 from "better-auth/client";
3
+
4
+ //#region src/modules/auth/auth.client.d.ts
5
+ declare function createM5KAuthClient(baseURL?: string, plugins?: any[]): {
6
+ signOut: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
7
+ query?: Record<string, any> | undefined;
8
+ fetchOptions?: FetchOptions | undefined;
9
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
10
+ success: boolean;
11
+ }, {
12
+ code?: string | undefined;
13
+ message?: string | undefined;
14
+ }, FetchOptions["throw"] extends true ? true : false>>;
15
+ } & {
16
+ resetPassword: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
17
+ newPassword: string;
18
+ token?: string | undefined;
19
+ }> & Record<string, any>, Partial<{
20
+ token?: string | undefined;
21
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
22
+ newPassword: string;
23
+ token?: string | undefined;
24
+ } & {
25
+ fetchOptions?: FetchOptions | undefined;
26
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
27
+ status: boolean;
28
+ }, {
29
+ code?: string | undefined;
30
+ message?: string | undefined;
31
+ }, FetchOptions["throw"] extends true ? true : false>>;
32
+ } & {
33
+ verifyEmail: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
34
+ token: string;
35
+ callbackURL?: string | undefined;
36
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
37
+ query: {
38
+ token: string;
39
+ callbackURL?: string | undefined;
40
+ };
41
+ fetchOptions?: FetchOptions | undefined;
42
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<void | {
43
+ status: boolean;
44
+ }>, {
45
+ code?: string | undefined;
46
+ message?: string | undefined;
47
+ }, FetchOptions["throw"] extends true ? true : false>>;
48
+ } & {
49
+ sendVerificationEmail: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
50
+ email: string;
51
+ callbackURL?: string | undefined;
52
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
53
+ email: string;
54
+ callbackURL?: string | undefined;
55
+ } & {
56
+ fetchOptions?: FetchOptions | undefined;
57
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
58
+ status: boolean;
59
+ }, {
60
+ code?: string | undefined;
61
+ message?: string | undefined;
62
+ }, FetchOptions["throw"] extends true ? true : false>>;
63
+ } & {
64
+ changeEmail: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
65
+ newEmail: string;
66
+ callbackURL?: string | undefined;
67
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
68
+ newEmail: string;
69
+ callbackURL?: string | undefined;
70
+ } & {
71
+ fetchOptions?: FetchOptions | undefined;
72
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
73
+ status: boolean;
74
+ }, {
75
+ code?: string | undefined;
76
+ message?: string | undefined;
77
+ }, FetchOptions["throw"] extends true ? true : false>>;
78
+ } & {
79
+ changePassword: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
80
+ newPassword: string;
81
+ currentPassword: string;
82
+ revokeOtherSessions?: boolean | undefined;
83
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
84
+ newPassword: string;
85
+ currentPassword: string;
86
+ revokeOtherSessions?: boolean | undefined;
87
+ } & {
88
+ fetchOptions?: FetchOptions | undefined;
89
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
90
+ token: string | null;
91
+ user: {
92
+ id: string;
93
+ createdAt: Date;
94
+ updatedAt: Date;
95
+ email: string;
96
+ emailVerified: boolean;
97
+ name: string;
98
+ image?: string | null | undefined;
99
+ } & Record<string, any>;
100
+ }, {
101
+ code?: string | undefined;
102
+ message?: string | undefined;
103
+ }, FetchOptions["throw"] extends true ? true : false>>;
104
+ } & {
105
+ deleteUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
106
+ callbackURL?: string | undefined;
107
+ password?: string | undefined;
108
+ token?: string | undefined;
109
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
110
+ callbackURL?: string | undefined;
111
+ password?: string | undefined;
112
+ token?: string | undefined;
113
+ } & {
114
+ fetchOptions?: FetchOptions | undefined;
115
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
116
+ success: boolean;
117
+ message: string;
118
+ }, {
119
+ code?: string | undefined;
120
+ message?: string | undefined;
121
+ }, FetchOptions["throw"] extends true ? true : false>>;
122
+ } & {
123
+ requestPasswordReset: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
124
+ email: string;
125
+ redirectTo?: string | undefined;
126
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
127
+ email: string;
128
+ redirectTo?: string | undefined;
129
+ } & {
130
+ fetchOptions?: FetchOptions | undefined;
131
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
132
+ status: boolean;
133
+ message: string;
134
+ }, {
135
+ code?: string | undefined;
136
+ message?: string | undefined;
137
+ }, FetchOptions["throw"] extends true ? true : false>>;
138
+ } & {
139
+ resetPassword: {
140
+ ":token": <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
141
+ callbackURL: string;
142
+ }> & Record<string, any>, {
143
+ token: string;
144
+ }>>(data_0: _$better_auth0.Prettify<{
145
+ query: {
146
+ callbackURL: string;
147
+ };
148
+ fetchOptions?: FetchOptions | undefined;
149
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<never, {
150
+ code?: string | undefined;
151
+ message?: string | undefined;
152
+ }, FetchOptions["throw"] extends true ? true : false>>;
153
+ };
154
+ } & {
155
+ revokeSession: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
156
+ token: string;
157
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
158
+ token: string;
159
+ } & {
160
+ fetchOptions?: FetchOptions | undefined;
161
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
162
+ status: boolean;
163
+ }, {
164
+ code?: string | undefined;
165
+ message?: string | undefined;
166
+ }, FetchOptions["throw"] extends true ? true : false>>;
167
+ } & {
168
+ revokeSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
169
+ query?: Record<string, any> | undefined;
170
+ fetchOptions?: FetchOptions | undefined;
171
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
172
+ status: boolean;
173
+ }, {
174
+ code?: string | undefined;
175
+ message?: string | undefined;
176
+ }, FetchOptions["throw"] extends true ? true : false>>;
177
+ } & {
178
+ revokeOtherSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
179
+ query?: Record<string, any> | undefined;
180
+ fetchOptions?: FetchOptions | undefined;
181
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
182
+ status: boolean;
183
+ }, {
184
+ code?: string | undefined;
185
+ message?: string | undefined;
186
+ }, FetchOptions["throw"] extends true ? true : false>>;
187
+ } & {
188
+ linkSocial: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
189
+ provider: unknown;
190
+ callbackURL?: string | undefined;
191
+ idToken?: {
192
+ token: string;
193
+ nonce?: string | undefined;
194
+ accessToken?: string | undefined;
195
+ refreshToken?: string | undefined;
196
+ scopes?: string[] | undefined;
197
+ } | undefined;
198
+ requestSignUp?: boolean | undefined;
199
+ scopes?: string[] | undefined;
200
+ errorCallbackURL?: string | undefined;
201
+ disableRedirect?: boolean | undefined;
202
+ additionalData?: Record<string, any> | undefined;
203
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
204
+ provider: unknown;
205
+ callbackURL?: string | undefined;
206
+ idToken?: {
207
+ token: string;
208
+ nonce?: string | undefined;
209
+ accessToken?: string | undefined;
210
+ refreshToken?: string | undefined;
211
+ scopes?: string[] | undefined;
212
+ } | undefined;
213
+ requestSignUp?: boolean | undefined;
214
+ scopes?: string[] | undefined;
215
+ errorCallbackURL?: string | undefined;
216
+ disableRedirect?: boolean | undefined;
217
+ additionalData?: Record<string, any> | undefined;
218
+ } & {
219
+ fetchOptions?: FetchOptions | undefined;
220
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
221
+ url: string;
222
+ redirect: boolean;
223
+ }, {
224
+ code?: string | undefined;
225
+ message?: string | undefined;
226
+ }, FetchOptions["throw"] extends true ? true : false>>;
227
+ } & {
228
+ listAccounts: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
229
+ query?: Record<string, any> | undefined;
230
+ fetchOptions?: FetchOptions | undefined;
231
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
232
+ scopes: string[];
233
+ id: string;
234
+ createdAt: Date;
235
+ updatedAt: Date;
236
+ userId: string;
237
+ providerId: string;
238
+ accountId: string;
239
+ }[], {
240
+ code?: string | undefined;
241
+ message?: string | undefined;
242
+ }, FetchOptions["throw"] extends true ? true : false>>;
243
+ } & {
244
+ deleteUser: {
245
+ callback: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
246
+ token: string;
247
+ callbackURL?: string | undefined;
248
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
249
+ query: {
250
+ token: string;
251
+ callbackURL?: string | undefined;
252
+ };
253
+ fetchOptions?: FetchOptions | undefined;
254
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
255
+ success: boolean;
256
+ message: string;
257
+ }, {
258
+ code?: string | undefined;
259
+ message?: string | undefined;
260
+ }, FetchOptions["throw"] extends true ? true : false>>;
261
+ };
262
+ } & {
263
+ unlinkAccount: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
264
+ providerId: string;
265
+ accountId?: string | undefined;
266
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
267
+ providerId: string;
268
+ accountId?: string | undefined;
269
+ } & {
270
+ fetchOptions?: FetchOptions | undefined;
271
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
272
+ status: boolean;
273
+ }, {
274
+ code?: string | undefined;
275
+ message?: string | undefined;
276
+ }, FetchOptions["throw"] extends true ? true : false>>;
277
+ } & {
278
+ refreshToken: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
279
+ providerId: string;
280
+ accountId?: string | undefined;
281
+ userId?: string | undefined;
282
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
283
+ providerId: string;
284
+ accountId?: string | undefined;
285
+ userId?: string | undefined;
286
+ } & {
287
+ fetchOptions?: FetchOptions | undefined;
288
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
289
+ accessToken: string | undefined;
290
+ refreshToken: string | undefined;
291
+ accessTokenExpiresAt: Date | undefined;
292
+ refreshTokenExpiresAt: Date | undefined;
293
+ scope: string | null | undefined;
294
+ idToken: string | null | undefined;
295
+ providerId: string;
296
+ accountId: string;
297
+ }, {
298
+ code?: string | undefined;
299
+ message?: string | undefined;
300
+ }, FetchOptions["throw"] extends true ? true : false>>;
301
+ } & {
302
+ getAccessToken: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
303
+ providerId: string;
304
+ accountId?: string | undefined;
305
+ userId?: string | undefined;
306
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
307
+ providerId: string;
308
+ accountId?: string | undefined;
309
+ userId?: string | undefined;
310
+ } & {
311
+ fetchOptions?: FetchOptions | undefined;
312
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
313
+ accessToken: string;
314
+ accessTokenExpiresAt: Date | undefined;
315
+ scopes: string[];
316
+ idToken: string | undefined;
317
+ }, {
318
+ code?: string | undefined;
319
+ message?: string | undefined;
320
+ }, FetchOptions["throw"] extends true ? true : false>>;
321
+ } & {
322
+ accountInfo: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
323
+ accountId?: string | undefined;
324
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
325
+ query?: {
326
+ accountId?: string | undefined;
327
+ } | undefined;
328
+ fetchOptions?: FetchOptions | undefined;
329
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
330
+ user: _$better_auth0.OAuth2UserInfo;
331
+ data: Record<string, any>;
332
+ }, {
333
+ code?: string | undefined;
334
+ message?: string | undefined;
335
+ }, FetchOptions["throw"] extends true ? true : false>>;
336
+ } & {
337
+ signIn: {
338
+ social: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
339
+ 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";
340
+ callbackURL?: string | undefined;
341
+ newUserCallbackURL?: string | undefined;
342
+ errorCallbackURL?: string | undefined;
343
+ disableRedirect?: boolean | undefined;
344
+ idToken?: {
345
+ token: string;
346
+ nonce?: string | undefined;
347
+ accessToken?: string | undefined;
348
+ refreshToken?: string | undefined;
349
+ expiresAt?: number | undefined;
350
+ } | undefined;
351
+ scopes?: string[] | undefined;
352
+ requestSignUp?: boolean | undefined;
353
+ loginHint?: string | undefined;
354
+ additionalData?: Record<string, any> | undefined;
355
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
356
+ 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";
357
+ callbackURL?: string | undefined;
358
+ newUserCallbackURL?: string | undefined;
359
+ errorCallbackURL?: string | undefined;
360
+ disableRedirect?: boolean | undefined;
361
+ idToken?: {
362
+ token: string;
363
+ nonce?: string | undefined;
364
+ accessToken?: string | undefined;
365
+ refreshToken?: string | undefined;
366
+ expiresAt?: number | undefined;
367
+ } | undefined;
368
+ scopes?: string[] | undefined;
369
+ requestSignUp?: boolean | undefined;
370
+ loginHint?: string | undefined;
371
+ additionalData?: Record<string, any> | undefined;
372
+ } & {
373
+ fetchOptions?: FetchOptions | undefined;
374
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
375
+ redirect: boolean;
376
+ url: string;
377
+ } | {
378
+ redirect: boolean;
379
+ token: string;
380
+ url: undefined;
381
+ user: {
382
+ id: string;
383
+ createdAt: Date;
384
+ updatedAt: Date;
385
+ email: string;
386
+ emailVerified: boolean;
387
+ name: string;
388
+ image?: string | null | undefined | undefined;
389
+ };
390
+ }>, {
391
+ code?: string | undefined;
392
+ message?: string | undefined;
393
+ }, FetchOptions["throw"] extends true ? true : false>>;
394
+ };
395
+ } & {
396
+ signUp: {
397
+ email: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
398
+ name: string;
399
+ email: string;
400
+ password: string;
401
+ image?: string | undefined;
402
+ callbackURL?: string | undefined;
403
+ rememberMe?: boolean | undefined;
404
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
405
+ email: string;
406
+ name: string;
407
+ password: string;
408
+ image?: string | undefined;
409
+ callbackURL?: string | undefined;
410
+ fetchOptions?: FetchOptions | undefined;
411
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<NonNullable<{
412
+ token: null;
413
+ user: {
414
+ id: string;
415
+ createdAt: Date;
416
+ updatedAt: Date;
417
+ email: string;
418
+ emailVerified: boolean;
419
+ name: string;
420
+ image?: string | null | undefined | undefined;
421
+ };
422
+ } | {
423
+ token: string;
424
+ user: {
425
+ id: string;
426
+ createdAt: Date;
427
+ updatedAt: Date;
428
+ email: string;
429
+ emailVerified: boolean;
430
+ name: string;
431
+ image?: string | null | undefined | undefined;
432
+ };
433
+ }>, {
434
+ code?: string | undefined;
435
+ message?: string | undefined;
436
+ }, FetchOptions["throw"] extends true ? true : false>>;
437
+ };
438
+ } & {
439
+ signIn: {
440
+ email: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<{
441
+ email: string;
442
+ password: string;
443
+ callbackURL?: string | undefined;
444
+ rememberMe?: boolean | undefined;
445
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: _$better_auth0.Prettify<{
446
+ email: string;
447
+ password: string;
448
+ callbackURL?: string | undefined;
449
+ rememberMe?: boolean | undefined;
450
+ } & {
451
+ fetchOptions?: FetchOptions | undefined;
452
+ }>, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
453
+ redirect: boolean;
454
+ token: string;
455
+ url?: string | undefined;
456
+ user: {
457
+ id: string;
458
+ createdAt: Date;
459
+ updatedAt: Date;
460
+ email: string;
461
+ emailVerified: boolean;
462
+ name: string;
463
+ image?: string | null | undefined | undefined;
464
+ };
465
+ }, {
466
+ code?: string | undefined;
467
+ message?: string | undefined;
468
+ }, FetchOptions["throw"] extends true ? true : false>>;
469
+ };
470
+ } & {
471
+ updateUser: <FetchOptions extends _$better_auth0.ClientFetchOption<Partial<Partial<{}> & {
472
+ name?: string | undefined;
473
+ image?: string | undefined | null;
474
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
475
+ image?: (string | null) | undefined;
476
+ name?: string | undefined;
477
+ fetchOptions?: FetchOptions | undefined;
478
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
479
+ status: boolean;
480
+ }, {
481
+ code?: string | undefined;
482
+ message?: string | undefined;
483
+ }, FetchOptions["throw"] extends true ? true : false>>;
484
+ } & {
485
+ listSessions: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
486
+ query?: Record<string, any> | undefined;
487
+ fetchOptions?: FetchOptions | undefined;
488
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<_$better_auth0.Prettify<{
489
+ id: string;
490
+ createdAt: Date;
491
+ updatedAt: Date;
492
+ userId: string;
493
+ expiresAt: Date;
494
+ token: string;
495
+ ipAddress?: string | null | undefined | undefined;
496
+ userAgent?: string | null | undefined | undefined;
497
+ }>[], {
498
+ code?: string | undefined;
499
+ message?: string | undefined;
500
+ }, FetchOptions["throw"] extends true ? true : false>>;
501
+ } & {
502
+ getSession: <FetchOptions extends _$better_auth0.ClientFetchOption<never, Partial<{
503
+ disableCookieCache?: unknown;
504
+ disableRefresh?: unknown;
505
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: _$better_auth0.Prettify<{
506
+ query?: {
507
+ disableCookieCache?: unknown;
508
+ disableRefresh?: unknown;
509
+ } | undefined;
510
+ fetchOptions?: FetchOptions | undefined;
511
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_$better_auth_client0.BetterFetchResponse<{
512
+ user: {
513
+ id: string;
514
+ createdAt: Date;
515
+ updatedAt: Date;
516
+ email: string;
517
+ emailVerified: boolean;
518
+ name: string;
519
+ image?: string | null | undefined;
520
+ };
521
+ session: {
522
+ id: string;
523
+ createdAt: Date;
524
+ updatedAt: Date;
525
+ userId: string;
526
+ expiresAt: Date;
527
+ token: string;
528
+ ipAddress?: string | null | undefined;
529
+ userAgent?: string | null | undefined;
530
+ };
531
+ } | null, {
532
+ code?: string | undefined;
533
+ message?: string | undefined;
534
+ }, FetchOptions["throw"] extends true ? true : false>>;
535
+ } & {
536
+ useSession: () => {
537
+ data: {
538
+ user: {
539
+ id: string;
540
+ createdAt: Date;
541
+ updatedAt: Date;
542
+ email: string;
543
+ emailVerified: boolean;
544
+ name: string;
545
+ image?: string | null | undefined;
546
+ };
547
+ session: {
548
+ id: string;
549
+ createdAt: Date;
550
+ updatedAt: Date;
551
+ userId: string;
552
+ expiresAt: Date;
553
+ token: string;
554
+ ipAddress?: string | null | undefined;
555
+ userAgent?: string | null | undefined;
556
+ };
557
+ } | null;
558
+ isPending: boolean;
559
+ isRefetching: boolean;
560
+ error: _$better_auth_client0.BetterFetchError | null;
561
+ refetch: (queryParams?: {
562
+ query?: _$better_auth0.SessionQueryParams;
563
+ } | undefined) => Promise<void>;
564
+ };
565
+ $Infer: {
566
+ Session: {
567
+ user: {
568
+ id: string;
569
+ createdAt: Date;
570
+ updatedAt: Date;
571
+ email: string;
572
+ emailVerified: boolean;
573
+ name: string;
574
+ image?: string | null | undefined;
575
+ };
576
+ session: {
577
+ id: string;
578
+ createdAt: Date;
579
+ updatedAt: Date;
580
+ userId: string;
581
+ expiresAt: Date;
582
+ token: string;
583
+ ipAddress?: string | null | undefined;
584
+ userAgent?: string | null | undefined;
585
+ };
586
+ };
587
+ };
588
+ $fetch: _$better_auth_client0.BetterFetch<{
589
+ plugins: (_$better_auth_client0.BetterFetchPlugin<Record<string, any>> | {
590
+ id: string;
591
+ name: string;
592
+ hooks: {
593
+ onSuccess(context: _$better_auth_client0.SuccessContext<any>): void;
594
+ };
595
+ } | {
596
+ id: string;
597
+ name: string;
598
+ hooks: {
599
+ onSuccess: ((context: _$better_auth_client0.SuccessContext<any>) => Promise<void> | void) | undefined;
600
+ onError: ((context: _$better_auth_client0.ErrorContext) => Promise<void> | void) | undefined;
601
+ onRequest: (<T extends Record<string, any>>(context: _$better_auth_client0.RequestContext<T>) => Promise<_$better_auth_client0.RequestContext | void> | _$better_auth_client0.RequestContext | void) | undefined;
602
+ onResponse: ((context: _$better_auth_client0.ResponseContext) => Promise<Response | void | _$better_auth_client0.ResponseContext> | Response | _$better_auth_client0.ResponseContext | void) | undefined;
603
+ };
604
+ })[];
605
+ cache?: RequestCache | undefined;
606
+ method: string;
607
+ window?: null | undefined;
608
+ headers?: (HeadersInit & (HeadersInit | {
609
+ accept: "application/json" | "text/plain" | "application/octet-stream";
610
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
611
+ authorization: "Bearer" | "Basic";
612
+ })) | undefined;
613
+ redirect?: RequestRedirect | undefined;
614
+ credentials?: RequestCredentials;
615
+ integrity?: string | undefined;
616
+ keepalive?: boolean | undefined;
617
+ mode?: RequestMode | undefined;
618
+ priority?: RequestPriority | undefined;
619
+ referrer?: string | undefined;
620
+ referrerPolicy?: ReferrerPolicy | undefined;
621
+ signal?: (AbortSignal | null) | undefined;
622
+ onRetry?: ((response: _$better_auth_client0.ResponseContext) => Promise<void> | void) | undefined;
623
+ hookOptions?: {
624
+ cloneResponse?: boolean;
625
+ } | undefined;
626
+ timeout?: number | undefined;
627
+ customFetchImpl: _$better_auth_client0.FetchEsque;
628
+ baseURL: string;
629
+ throw?: boolean | undefined;
630
+ auth?: ({
631
+ type: "Bearer";
632
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
633
+ } | {
634
+ type: "Basic";
635
+ username: string | (() => string | undefined) | undefined;
636
+ password: string | (() => string | undefined) | undefined;
637
+ } | {
638
+ type: "Custom";
639
+ prefix: string | (() => string | undefined) | undefined;
640
+ value: string | (() => string | undefined) | undefined;
641
+ }) | undefined;
642
+ body?: any;
643
+ query?: any;
644
+ params?: any;
645
+ duplex?: "full" | "half" | undefined;
646
+ jsonParser: (text: string) => Promise<any> | any;
647
+ retry?: _$better_auth_client0.RetryOptions | undefined;
648
+ retryAttempt?: number | undefined;
649
+ output?: (_$better_auth_client0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
650
+ errorSchema?: _$better_auth_client0.StandardSchemaV1 | undefined;
651
+ disableValidation?: boolean | undefined;
652
+ disableSignal?: boolean | undefined;
653
+ }, unknown, unknown, {}>;
654
+ $store: {
655
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
656
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
657
+ atoms: Record<string, _$better_auth_client0.WritableAtom<any>>;
658
+ };
659
+ $ERROR_CODES: {
660
+ readonly USER_NOT_FOUND: "User not found";
661
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
662
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
663
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
664
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
665
+ readonly INVALID_PASSWORD: "Invalid password";
666
+ readonly INVALID_EMAIL: "Invalid email";
667
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
668
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
669
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
670
+ readonly INVALID_TOKEN: "Invalid token";
671
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
672
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
673
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
674
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
675
+ readonly PASSWORD_TOO_SHORT: "Password too short";
676
+ readonly PASSWORD_TOO_LONG: "Password too long";
677
+ readonly USER_ALREADY_EXISTS: "User already exists.";
678
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
679
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
680
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
681
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
682
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
683
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
684
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
685
+ readonly CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: "Cross-site navigation login blocked. This request appears to be a CSRF attack.";
686
+ readonly VERIFICATION_EMAIL_NOT_ENABLED: "Verification email isn't enabled";
687
+ readonly EMAIL_ALREADY_VERIFIED: "Email is already verified";
688
+ readonly EMAIL_MISMATCH: "Email mismatch";
689
+ readonly SESSION_NOT_FRESH: "Session is not fresh";
690
+ readonly LINKED_ACCOUNT_ALREADY_EXISTS: "Linked account already exists";
691
+ readonly INVALID_ORIGIN: "Invalid origin";
692
+ readonly INVALID_CALLBACK_URL: "Invalid callbackURL";
693
+ readonly INVALID_REDIRECT_URL: "Invalid redirectURL";
694
+ readonly INVALID_ERROR_CALLBACK_URL: "Invalid errorCallbackURL";
695
+ readonly INVALID_NEW_USER_CALLBACK_URL: "Invalid newUserCallbackURL";
696
+ readonly MISSING_OR_NULL_ORIGIN: "Missing or null Origin";
697
+ readonly CALLBACK_URL_REQUIRED: "callbackURL is required";
698
+ readonly FAILED_TO_CREATE_VERIFICATION: "Unable to create verification";
699
+ readonly FIELD_NOT_ALLOWED: "Field not allowed to be set";
700
+ readonly ASYNC_VALIDATION_NOT_SUPPORTED: "Async validation is not supported";
701
+ readonly VALIDATION_ERROR: "Validation Error";
702
+ readonly MISSING_FIELD: "Field is required";
703
+ };
704
+ };
705
+ type M5KAuthClient = ReturnType<typeof createM5KAuthClient>;
706
+ //#endregion
707
+ export { M5KAuthClient, createM5KAuthClient };
708
+ //# sourceMappingURL=auth.client.d.mts.map