@nesalia/cli 1.0.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 (103) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/dist/commands/auth/index.d.ts +4 -0
  3. package/dist/commands/auth/index.d.ts.map +1 -0
  4. package/dist/commands/auth/index.js +4 -0
  5. package/dist/commands/auth/index.js.map +1 -0
  6. package/dist/commands/auth/login.d.ts +2 -0
  7. package/dist/commands/auth/login.d.ts.map +1 -0
  8. package/dist/commands/auth/login.js +19 -0
  9. package/dist/commands/auth/login.js.map +1 -0
  10. package/dist/commands/auth/logout.d.ts +2 -0
  11. package/dist/commands/auth/logout.d.ts.map +1 -0
  12. package/dist/commands/auth/logout.js +23 -0
  13. package/dist/commands/auth/logout.js.map +1 -0
  14. package/dist/commands/auth/status.d.ts +2 -0
  15. package/dist/commands/auth/status.d.ts.map +1 -0
  16. package/dist/commands/auth/status.js +33 -0
  17. package/dist/commands/auth/status.js.map +1 -0
  18. package/dist/commands/index.d.ts +2 -0
  19. package/dist/commands/index.d.ts.map +1 -0
  20. package/dist/commands/index.js +2 -0
  21. package/dist/commands/index.js.map +1 -0
  22. package/dist/commands/post/by-id.d.ts +6 -0
  23. package/dist/commands/post/by-id.d.ts.map +1 -0
  24. package/dist/commands/post/by-id.js +32 -0
  25. package/dist/commands/post/by-id.js.map +1 -0
  26. package/dist/commands/post/create.d.ts +7 -0
  27. package/dist/commands/post/create.d.ts.map +1 -0
  28. package/dist/commands/post/create.js +35 -0
  29. package/dist/commands/post/create.js.map +1 -0
  30. package/dist/commands/post/index.d.ts +4 -0
  31. package/dist/commands/post/index.d.ts.map +1 -0
  32. package/dist/commands/post/index.js +4 -0
  33. package/dist/commands/post/index.js.map +1 -0
  34. package/dist/commands/post/list.d.ts +2 -0
  35. package/dist/commands/post/list.d.ts.map +1 -0
  36. package/dist/commands/post/list.js +35 -0
  37. package/dist/commands/post/list.js.map +1 -0
  38. package/dist/index.d.ts +3 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +22 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/lib/api/client.d.ts +17 -0
  43. package/dist/lib/api/client.d.ts.map +1 -0
  44. package/dist/lib/api/client.js +18 -0
  45. package/dist/lib/api/client.js.map +1 -0
  46. package/dist/lib/auth/client.d.ts +2748 -0
  47. package/dist/lib/auth/client.d.ts.map +1 -0
  48. package/dist/lib/auth/client.js +11 -0
  49. package/dist/lib/auth/client.js.map +1 -0
  50. package/dist/lib/auth/device-flow/config.d.ts +5 -0
  51. package/dist/lib/auth/device-flow/config.d.ts.map +1 -0
  52. package/dist/lib/auth/device-flow/config.js +5 -0
  53. package/dist/lib/auth/device-flow/config.js.map +1 -0
  54. package/dist/lib/auth/device-flow/device-code.d.ts +10 -0
  55. package/dist/lib/auth/device-flow/device-code.d.ts.map +1 -0
  56. package/dist/lib/auth/device-flow/device-code.js +27 -0
  57. package/dist/lib/auth/device-flow/device-code.js.map +1 -0
  58. package/dist/lib/auth/device-flow/errors.d.ts +8 -0
  59. package/dist/lib/auth/device-flow/errors.d.ts.map +1 -0
  60. package/dist/lib/auth/device-flow/errors.js +26 -0
  61. package/dist/lib/auth/device-flow/errors.js.map +1 -0
  62. package/dist/lib/auth/device-flow/index.d.ts +3 -0
  63. package/dist/lib/auth/device-flow/index.d.ts.map +1 -0
  64. package/dist/lib/auth/device-flow/index.js +13 -0
  65. package/dist/lib/auth/device-flow/index.js.map +1 -0
  66. package/dist/lib/auth/device-flow/polling.d.ts +4 -0
  67. package/dist/lib/auth/device-flow/polling.d.ts.map +1 -0
  68. package/dist/lib/auth/device-flow/polling.js +75 -0
  69. package/dist/lib/auth/device-flow/polling.js.map +1 -0
  70. package/dist/lib/auth/device-flow/types.d.ts +10 -0
  71. package/dist/lib/auth/device-flow/types.d.ts.map +1 -0
  72. package/dist/lib/auth/device-flow/types.js +2 -0
  73. package/dist/lib/auth/device-flow/types.js.map +1 -0
  74. package/dist/lib/auth/index.d.ts +12 -0
  75. package/dist/lib/auth/index.d.ts.map +1 -0
  76. package/dist/lib/auth/index.js +24 -0
  77. package/dist/lib/auth/index.js.map +1 -0
  78. package/dist/lib/auth/storage.d.ts +20 -0
  79. package/dist/lib/auth/storage.d.ts.map +1 -0
  80. package/dist/lib/auth/storage.js +48 -0
  81. package/dist/lib/auth/storage.js.map +1 -0
  82. package/package.json +36 -0
  83. package/src/CLAUDE.md +83 -0
  84. package/src/commands/auth/index.ts +3 -0
  85. package/src/commands/auth/login.ts +20 -0
  86. package/src/commands/auth/logout.ts +25 -0
  87. package/src/commands/auth/status.ts +37 -0
  88. package/src/commands/index.ts +1 -0
  89. package/src/index.ts +32 -0
  90. package/src/lib/api/client.ts +20 -0
  91. package/src/lib/auth/client.ts +14 -0
  92. package/src/lib/auth/device-flow/config.ts +4 -0
  93. package/src/lib/auth/device-flow/device-code.ts +39 -0
  94. package/src/lib/auth/device-flow/errors.ts +29 -0
  95. package/src/lib/auth/device-flow/index.ts +19 -0
  96. package/src/lib/auth/device-flow/polling.ts +91 -0
  97. package/src/lib/auth/device-flow/types.ts +9 -0
  98. package/src/lib/auth/index.ts +41 -0
  99. package/src/lib/auth/storage.ts +69 -0
  100. package/tests/auth.test.ts +123 -0
  101. package/tests/setup.ts +43 -0
  102. package/tsconfig.json +19 -0
  103. package/vitest.config.ts +9 -0
@@ -0,0 +1,2748 @@
1
+ export declare const authClient: {
2
+ useActiveOrganization: import("better-auth/client").AuthQueryAtom<import("better-auth").Prettify<{
3
+ id: string;
4
+ name: string;
5
+ slug: string;
6
+ createdAt: Date;
7
+ logo?: string | null | undefined | undefined;
8
+ metadata?: any;
9
+ } & {
10
+ members: {
11
+ id: string;
12
+ organizationId: string;
13
+ role: "member" | "admin" | "owner";
14
+ createdAt: Date;
15
+ userId: string;
16
+ user: {
17
+ id: string;
18
+ email: string;
19
+ name: string;
20
+ image?: string | undefined;
21
+ };
22
+ }[];
23
+ invitations: {
24
+ id: string;
25
+ organizationId: string;
26
+ email: string;
27
+ role: "member" | "admin" | "owner";
28
+ status: import("better-auth/client").InvitationStatus;
29
+ inviterId: string;
30
+ expiresAt: Date;
31
+ createdAt: Date;
32
+ }[];
33
+ }>>;
34
+ useListOrganizations: import("better-auth/client").AuthQueryAtom<{
35
+ id: string;
36
+ name: string;
37
+ slug: string;
38
+ createdAt: Date;
39
+ logo?: string | null | undefined | undefined;
40
+ metadata?: any;
41
+ }[]>;
42
+ useActiveMember: import("better-auth/client").AuthQueryAtom<{
43
+ id: string;
44
+ organizationId: string;
45
+ userId: string;
46
+ role: string;
47
+ createdAt: Date;
48
+ }>;
49
+ useActiveMemberRole: import("better-auth/client").AuthQueryAtom<{
50
+ role: string;
51
+ }>;
52
+ } & {
53
+ device: {
54
+ code: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
55
+ client_id: string;
56
+ scope?: string | undefined;
57
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
58
+ client_id: string;
59
+ scope?: string | undefined;
60
+ } & {
61
+ fetchOptions?: FetchOptions | undefined;
62
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
63
+ device_code: string;
64
+ user_code: string;
65
+ verification_uri: string;
66
+ verification_uri_complete: string;
67
+ expires_in: number;
68
+ interval: number;
69
+ }, {
70
+ error: "invalid_request" | "invalid_client";
71
+ error_description: string;
72
+ }, FetchOptions["throw"] extends true ? true : false>>;
73
+ };
74
+ } & {
75
+ device: {
76
+ token: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
77
+ grant_type: "urn:ietf:params:oauth:grant-type:device_code";
78
+ device_code: string;
79
+ client_id: string;
80
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
81
+ grant_type: "urn:ietf:params:oauth:grant-type:device_code";
82
+ device_code: string;
83
+ client_id: string;
84
+ } & {
85
+ fetchOptions?: FetchOptions | undefined;
86
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
87
+ access_token: string;
88
+ token_type: string;
89
+ expires_in: number;
90
+ scope: string;
91
+ }, {
92
+ error: "invalid_request" | "authorization_pending" | "slow_down" | "expired_token" | "access_denied" | "invalid_grant";
93
+ error_description: string;
94
+ }, FetchOptions["throw"] extends true ? true : false>>;
95
+ };
96
+ } & {
97
+ device: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
98
+ user_code: string;
99
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
100
+ query: {
101
+ user_code: string;
102
+ };
103
+ fetchOptions?: FetchOptions | undefined;
104
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
105
+ user_code: string;
106
+ status: string;
107
+ }, {
108
+ error: "invalid_request";
109
+ error_description: string;
110
+ }, FetchOptions["throw"] extends true ? true : false>>;
111
+ } & {
112
+ device: {
113
+ approve: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
114
+ userCode: string;
115
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
116
+ userCode: string;
117
+ } & {
118
+ fetchOptions?: FetchOptions | undefined;
119
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
120
+ success: boolean;
121
+ }, {
122
+ error: "invalid_request" | "expired_token" | "access_denied" | "device_code_already_processed" | "unauthorized";
123
+ error_description: string;
124
+ }, FetchOptions["throw"] extends true ? true : false>>;
125
+ };
126
+ } & {
127
+ device: {
128
+ deny: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
129
+ userCode: string;
130
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
131
+ userCode: string;
132
+ } & {
133
+ fetchOptions?: FetchOptions | undefined;
134
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
135
+ success: boolean;
136
+ }, {
137
+ error: "invalid_request" | "expired_token" | "access_denied" | "unauthorized";
138
+ error_description: string;
139
+ }, FetchOptions["throw"] extends true ? true : false>>;
140
+ };
141
+ } & {
142
+ organization: {
143
+ create: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
144
+ name: string;
145
+ slug: string;
146
+ userId?: string | undefined;
147
+ logo?: string | undefined;
148
+ metadata?: Record<string, any> | undefined;
149
+ keepCurrentActiveOrganization?: boolean | undefined;
150
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
151
+ name: string;
152
+ slug: string;
153
+ userId?: string | undefined;
154
+ logo?: string | undefined;
155
+ metadata?: Record<string, any> | undefined;
156
+ keepCurrentActiveOrganization?: boolean | undefined;
157
+ } & {
158
+ fetchOptions?: FetchOptions | undefined;
159
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<{
160
+ id: string;
161
+ name: string;
162
+ slug: string;
163
+ createdAt: Date;
164
+ logo?: string | null | undefined | undefined;
165
+ metadata?: any;
166
+ } & {
167
+ metadata: any;
168
+ members: ({
169
+ id: string;
170
+ organizationId: string;
171
+ userId: string;
172
+ role: string;
173
+ createdAt: Date;
174
+ } | undefined)[];
175
+ }>, {
176
+ code?: string | undefined;
177
+ message?: string | undefined;
178
+ }, FetchOptions["throw"] extends true ? true : false>>;
179
+ };
180
+ } & {
181
+ organization: {
182
+ update: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
183
+ data: {
184
+ name?: string | undefined;
185
+ slug?: string | undefined;
186
+ logo?: string | undefined;
187
+ metadata?: Record<string, any> | undefined;
188
+ } & Partial<{}>;
189
+ organizationId?: string | undefined;
190
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
191
+ data: {
192
+ name?: string | undefined;
193
+ slug?: string | undefined;
194
+ logo?: string | undefined;
195
+ metadata?: Record<string, any> | undefined;
196
+ } & Partial<{}>;
197
+ organizationId?: string | undefined;
198
+ } & {
199
+ fetchOptions?: FetchOptions | undefined;
200
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
201
+ id: string;
202
+ name: string;
203
+ slug: string;
204
+ createdAt: Date;
205
+ logo?: string | null | undefined | undefined;
206
+ metadata?: any;
207
+ }, {
208
+ code?: string | undefined;
209
+ message?: string | undefined;
210
+ }, FetchOptions["throw"] extends true ? true : false>>;
211
+ };
212
+ } & {
213
+ organization: {
214
+ delete: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
215
+ organizationId: string;
216
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
217
+ organizationId: string;
218
+ } & {
219
+ fetchOptions?: FetchOptions | undefined;
220
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
221
+ id: string;
222
+ name: string;
223
+ slug: string;
224
+ createdAt: Date;
225
+ logo?: string | null | undefined | undefined;
226
+ metadata?: any;
227
+ }, {
228
+ code?: string | undefined;
229
+ message?: string | undefined;
230
+ }, FetchOptions["throw"] extends true ? true : false>>;
231
+ };
232
+ } & {
233
+ organization: {
234
+ setActive: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
235
+ organizationId?: string | null | undefined;
236
+ organizationSlug?: string | undefined;
237
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
238
+ organizationId?: string | null | undefined;
239
+ organizationSlug?: string | undefined;
240
+ } & {
241
+ fetchOptions?: FetchOptions | undefined;
242
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
243
+ members: {
244
+ id: string;
245
+ organizationId: string;
246
+ role: "member" | "admin" | "owner";
247
+ createdAt: Date;
248
+ userId: string;
249
+ user: {
250
+ id: string;
251
+ email: string;
252
+ name: string;
253
+ image?: string | undefined;
254
+ };
255
+ }[];
256
+ invitations: {
257
+ id: string;
258
+ organizationId: string;
259
+ email: string;
260
+ role: "member" | "admin" | "owner";
261
+ status: import("better-auth/client").InvitationStatus;
262
+ inviterId: string;
263
+ expiresAt: Date;
264
+ createdAt: Date;
265
+ }[];
266
+ } & {
267
+ id: string;
268
+ name: string;
269
+ slug: string;
270
+ createdAt: Date;
271
+ logo?: string | null | undefined | undefined;
272
+ metadata?: any;
273
+ }, {
274
+ code?: string | undefined;
275
+ message?: string | undefined;
276
+ }, FetchOptions["throw"] extends true ? true : false>>;
277
+ };
278
+ } & {
279
+ organization: {
280
+ getFullOrganization: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
281
+ organizationId?: string | undefined;
282
+ organizationSlug?: string | undefined;
283
+ membersLimit?: string | number | undefined;
284
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
285
+ query?: {
286
+ organizationId?: string | undefined;
287
+ organizationSlug?: string | undefined;
288
+ membersLimit?: string | number | undefined;
289
+ } | undefined;
290
+ fetchOptions?: FetchOptions | undefined;
291
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
292
+ members: {
293
+ id: string;
294
+ organizationId: string;
295
+ role: "member" | "admin" | "owner";
296
+ createdAt: Date;
297
+ userId: string;
298
+ user: {
299
+ id: string;
300
+ email: string;
301
+ name: string;
302
+ image?: string | undefined;
303
+ };
304
+ }[];
305
+ invitations: {
306
+ id: string;
307
+ organizationId: string;
308
+ email: string;
309
+ role: "member" | "admin" | "owner";
310
+ status: import("better-auth/client").InvitationStatus;
311
+ inviterId: string;
312
+ expiresAt: Date;
313
+ createdAt: Date;
314
+ }[];
315
+ } & {
316
+ id: string;
317
+ name: string;
318
+ slug: string;
319
+ createdAt: Date;
320
+ logo?: string | null | undefined | undefined;
321
+ metadata?: any;
322
+ }, {
323
+ code?: string | undefined;
324
+ message?: string | undefined;
325
+ }, FetchOptions["throw"] extends true ? true : false>>;
326
+ };
327
+ } & {
328
+ organization: {
329
+ list: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
330
+ query?: Record<string, any> | undefined;
331
+ fetchOptions?: FetchOptions | undefined;
332
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
333
+ id: string;
334
+ name: string;
335
+ slug: string;
336
+ createdAt: Date;
337
+ logo?: string | null | undefined | undefined;
338
+ metadata?: any;
339
+ }[], {
340
+ code?: string | undefined;
341
+ message?: string | undefined;
342
+ }, FetchOptions["throw"] extends true ? true : false>>;
343
+ };
344
+ } & {
345
+ organization: {
346
+ inviteMember: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
347
+ email: string;
348
+ role: "member" | "admin" | "owner" | ("member" | "admin" | "owner")[];
349
+ organizationId?: string | undefined;
350
+ resend?: boolean | undefined;
351
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
352
+ email: string;
353
+ role: "member" | "admin" | "owner" | ("member" | "admin" | "owner")[];
354
+ organizationId?: string | undefined;
355
+ resend?: boolean | undefined;
356
+ } & {
357
+ fetchOptions?: FetchOptions | undefined;
358
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<{
359
+ id: string;
360
+ organizationId: string;
361
+ email: string;
362
+ role: "member" | "admin" | "owner";
363
+ status: import("better-auth/client").InvitationStatus;
364
+ inviterId: string;
365
+ expiresAt: Date;
366
+ createdAt: Date;
367
+ } | {
368
+ id: string;
369
+ organizationId: string;
370
+ email: string;
371
+ role: "member" | "admin" | "owner";
372
+ status: import("better-auth/client").InvitationStatus;
373
+ inviterId: string;
374
+ expiresAt: Date;
375
+ createdAt: Date;
376
+ }>, {
377
+ code?: string | undefined;
378
+ message?: string | undefined;
379
+ }, FetchOptions["throw"] extends true ? true : false>>;
380
+ };
381
+ } & {
382
+ organization: {
383
+ cancelInvitation: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
384
+ invitationId: string;
385
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
386
+ invitationId: string;
387
+ } & {
388
+ fetchOptions?: FetchOptions | undefined;
389
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
390
+ id: string;
391
+ organizationId: string;
392
+ email: string;
393
+ role: "member" | "admin" | "owner";
394
+ status: import("better-auth/client").InvitationStatus;
395
+ inviterId: string;
396
+ expiresAt: Date;
397
+ createdAt: Date;
398
+ }, {
399
+ code?: string | undefined;
400
+ message?: string | undefined;
401
+ }, FetchOptions["throw"] extends true ? true : false>>;
402
+ };
403
+ } & {
404
+ organization: {
405
+ acceptInvitation: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
406
+ invitationId: string;
407
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
408
+ invitationId: string;
409
+ } & {
410
+ fetchOptions?: FetchOptions | undefined;
411
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
412
+ invitation: {
413
+ id: string;
414
+ organizationId: string;
415
+ email: string;
416
+ role: "member" | "admin" | "owner";
417
+ status: import("better-auth/client").InvitationStatus;
418
+ inviterId: string;
419
+ expiresAt: Date;
420
+ createdAt: Date;
421
+ };
422
+ member: {
423
+ id: string;
424
+ organizationId: string;
425
+ userId: string;
426
+ role: string;
427
+ createdAt: Date;
428
+ };
429
+ }, {
430
+ code?: string | undefined;
431
+ message?: string | undefined;
432
+ }, FetchOptions["throw"] extends true ? true : false>>;
433
+ };
434
+ } & {
435
+ organization: {
436
+ getInvitation: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
437
+ id: string;
438
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
439
+ query: {
440
+ id: string;
441
+ };
442
+ fetchOptions?: FetchOptions | undefined;
443
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<{
444
+ id: string;
445
+ organizationId: string;
446
+ email: string;
447
+ role: "member" | "admin" | "owner";
448
+ status: import("better-auth/client").InvitationStatus;
449
+ inviterId: string;
450
+ expiresAt: Date;
451
+ createdAt: Date;
452
+ } & {
453
+ organizationName: string;
454
+ organizationSlug: string;
455
+ inviterEmail: string;
456
+ }>, {
457
+ code?: string | undefined;
458
+ message?: string | undefined;
459
+ }, FetchOptions["throw"] extends true ? true : false>>;
460
+ };
461
+ } & {
462
+ organization: {
463
+ rejectInvitation: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
464
+ invitationId: string;
465
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
466
+ invitationId: string;
467
+ } & {
468
+ fetchOptions?: FetchOptions | undefined;
469
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
470
+ invitation: {
471
+ id: string;
472
+ organizationId: string;
473
+ email: string;
474
+ role: "admin" | "member" | "owner";
475
+ status: import("better-auth/client").InvitationStatus;
476
+ inviterId: string;
477
+ expiresAt: Date;
478
+ createdAt: Date;
479
+ } | null;
480
+ member: null;
481
+ }, {
482
+ code?: string | undefined;
483
+ message?: string | undefined;
484
+ }, FetchOptions["throw"] extends true ? true : false>>;
485
+ };
486
+ } & {
487
+ organization: {
488
+ listInvitations: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
489
+ organizationId?: string | undefined;
490
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
491
+ query?: {
492
+ organizationId?: string | undefined;
493
+ } | undefined;
494
+ fetchOptions?: FetchOptions | undefined;
495
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
496
+ id: string;
497
+ organizationId: string;
498
+ email: string;
499
+ role: "member" | "admin" | "owner";
500
+ status: import("better-auth/client").InvitationStatus;
501
+ inviterId: string;
502
+ expiresAt: Date;
503
+ createdAt: Date;
504
+ }[], {
505
+ code?: string | undefined;
506
+ message?: string | undefined;
507
+ }, FetchOptions["throw"] extends true ? true : false>>;
508
+ };
509
+ } & {
510
+ organization: {
511
+ getActiveMember: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
512
+ query?: Record<string, any> | undefined;
513
+ fetchOptions?: FetchOptions | undefined;
514
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<Omit<{
515
+ id: string;
516
+ organizationId: string;
517
+ role: "member" | "admin" | "owner";
518
+ createdAt: Date;
519
+ userId: string;
520
+ user: {
521
+ id: string;
522
+ email: string;
523
+ name: string;
524
+ image?: string | undefined;
525
+ };
526
+ } & {
527
+ user: {
528
+ id: string;
529
+ createdAt: Date;
530
+ updatedAt: Date;
531
+ email: string;
532
+ emailVerified: boolean;
533
+ name: string;
534
+ image?: string | null | undefined;
535
+ };
536
+ }, "user"> & {
537
+ user: {
538
+ id: string;
539
+ name: string;
540
+ email: string;
541
+ image: string | undefined;
542
+ };
543
+ }>, {
544
+ code?: string | undefined;
545
+ message?: string | undefined;
546
+ }, FetchOptions["throw"] extends true ? true : false>>;
547
+ };
548
+ } & {
549
+ organization: {
550
+ checkSlug: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
551
+ slug: string;
552
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
553
+ slug: string;
554
+ } & {
555
+ fetchOptions?: FetchOptions | undefined;
556
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
557
+ status: boolean;
558
+ }, {
559
+ code?: string | undefined;
560
+ message?: string | undefined;
561
+ }, FetchOptions["throw"] extends true ? true : false>>;
562
+ };
563
+ } & {
564
+ organization: {
565
+ removeMember: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
566
+ memberIdOrEmail: string;
567
+ organizationId?: string | undefined;
568
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
569
+ memberIdOrEmail: string;
570
+ organizationId?: string | undefined;
571
+ } & {
572
+ fetchOptions?: FetchOptions | undefined;
573
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
574
+ member: {
575
+ id: string;
576
+ organizationId: string;
577
+ role: "member" | "admin" | "owner";
578
+ createdAt: Date;
579
+ userId: string;
580
+ user: {
581
+ id: string;
582
+ email: string;
583
+ name: string;
584
+ image?: string | undefined;
585
+ };
586
+ };
587
+ }, {
588
+ code?: string | undefined;
589
+ message?: string | undefined;
590
+ }, FetchOptions["throw"] extends true ? true : false>>;
591
+ };
592
+ } & {
593
+ organization: {
594
+ updateMemberRole: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
595
+ role: import("better-auth").LiteralString | "member" | import("better-auth").LiteralString[] | "admin" | "owner" | ("member" | "admin" | "owner")[];
596
+ memberId: string;
597
+ organizationId?: string | undefined;
598
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
599
+ role: import("better-auth").LiteralString | "member" | import("better-auth").LiteralString[] | "admin" | "owner" | ("member" | "admin" | "owner")[];
600
+ memberId: string;
601
+ organizationId?: string | undefined;
602
+ } & {
603
+ fetchOptions?: FetchOptions | undefined;
604
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
605
+ id: string;
606
+ organizationId: string;
607
+ role: "admin" | "member" | "owner";
608
+ createdAt: Date;
609
+ userId: string;
610
+ user: {
611
+ id: string;
612
+ email: string;
613
+ name: string;
614
+ image?: string | undefined;
615
+ };
616
+ }, {
617
+ code?: string | undefined;
618
+ message?: string | undefined;
619
+ }, FetchOptions["throw"] extends true ? true : false>>;
620
+ };
621
+ } & {
622
+ organization: {
623
+ leave: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
624
+ organizationId: string;
625
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
626
+ organizationId: string;
627
+ } & {
628
+ fetchOptions?: FetchOptions | undefined;
629
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<Omit<{
630
+ id: string;
631
+ organizationId: string;
632
+ role: "member" | "admin" | "owner";
633
+ createdAt: Date;
634
+ userId: string;
635
+ user: {
636
+ id: string;
637
+ email: string;
638
+ name: string;
639
+ image?: string | undefined;
640
+ };
641
+ } & {
642
+ user: {
643
+ id: string;
644
+ createdAt: Date;
645
+ updatedAt: Date;
646
+ email: string;
647
+ emailVerified: boolean;
648
+ name: string;
649
+ image?: string | null | undefined;
650
+ };
651
+ }, "user"> & {
652
+ user: {
653
+ id: string;
654
+ name: string;
655
+ email: string;
656
+ image: string | undefined;
657
+ };
658
+ }>, {
659
+ code?: string | undefined;
660
+ message?: string | undefined;
661
+ }, FetchOptions["throw"] extends true ? true : false>>;
662
+ };
663
+ } & {
664
+ organization: {
665
+ listUserInvitations: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
666
+ email?: string | undefined;
667
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
668
+ query?: {
669
+ email?: string | undefined;
670
+ } | undefined;
671
+ fetchOptions?: FetchOptions | undefined;
672
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
673
+ id: string;
674
+ organizationId: string;
675
+ email: string;
676
+ role: "member" | "admin" | "owner";
677
+ status: import("better-auth/client").InvitationStatus;
678
+ inviterId: string;
679
+ expiresAt: Date;
680
+ createdAt: Date;
681
+ } & {
682
+ organization: {
683
+ id: string;
684
+ name: string;
685
+ slug: string;
686
+ createdAt: Date;
687
+ logo?: string | null | undefined | undefined;
688
+ metadata?: any;
689
+ };
690
+ }, "organization"> & {
691
+ organizationName: string;
692
+ })[], {
693
+ code?: string | undefined;
694
+ message?: string | undefined;
695
+ }, FetchOptions["throw"] extends true ? true : false>>;
696
+ };
697
+ } & {
698
+ organization: {
699
+ listMembers: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
700
+ limit?: string | number | undefined;
701
+ offset?: string | number | undefined;
702
+ sortBy?: string | undefined;
703
+ sortDirection?: "asc" | "desc" | undefined;
704
+ filterField?: string | undefined;
705
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
706
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
707
+ organizationId?: string | undefined;
708
+ organizationSlug?: string | undefined;
709
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
710
+ query?: {
711
+ limit?: string | number | undefined;
712
+ offset?: string | number | undefined;
713
+ sortBy?: string | undefined;
714
+ sortDirection?: "asc" | "desc" | undefined;
715
+ filterField?: string | undefined;
716
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
717
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
718
+ organizationId?: string | undefined;
719
+ organizationSlug?: string | undefined;
720
+ } | undefined;
721
+ fetchOptions?: FetchOptions | undefined;
722
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
723
+ members: ({
724
+ id: string;
725
+ organizationId: string;
726
+ role: "member" | "admin" | "owner";
727
+ createdAt: Date;
728
+ userId: string;
729
+ user: {
730
+ id: string;
731
+ email: string;
732
+ name: string;
733
+ image?: string | undefined;
734
+ };
735
+ } & {
736
+ user: {
737
+ id: string;
738
+ name: string;
739
+ email: string;
740
+ image: string | null | undefined;
741
+ };
742
+ })[];
743
+ total: number;
744
+ }, {
745
+ code?: string | undefined;
746
+ message?: string | undefined;
747
+ }, FetchOptions["throw"] extends true ? true : false>>;
748
+ };
749
+ } & {
750
+ organization: {
751
+ getActiveMemberRole: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
752
+ userId?: string | undefined;
753
+ organizationId?: string | undefined;
754
+ organizationSlug?: string | undefined;
755
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
756
+ query?: {
757
+ userId?: string | undefined;
758
+ organizationId?: string | undefined;
759
+ organizationSlug?: string | undefined;
760
+ } | undefined;
761
+ fetchOptions?: FetchOptions | undefined;
762
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
763
+ role: "member" | "admin" | "owner";
764
+ }, {
765
+ code?: string | undefined;
766
+ message?: string | undefined;
767
+ }, FetchOptions["throw"] extends true ? true : false>>;
768
+ };
769
+ } & {
770
+ organization: {
771
+ hasPermission: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
772
+ permissions: {
773
+ readonly organization?: ("update" | "delete")[] | undefined;
774
+ readonly member?: ("create" | "update" | "delete")[] | undefined;
775
+ readonly invitation?: ("create" | "cancel")[] | undefined;
776
+ readonly team?: ("create" | "update" | "delete")[] | undefined;
777
+ readonly ac?: ("create" | "update" | "delete" | "read")[] | undefined;
778
+ };
779
+ } & {
780
+ organizationId?: string | undefined;
781
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
782
+ permissions: {
783
+ readonly organization?: ("update" | "delete")[] | undefined;
784
+ readonly member?: ("create" | "update" | "delete")[] | undefined;
785
+ readonly invitation?: ("create" | "cancel")[] | undefined;
786
+ readonly team?: ("create" | "update" | "delete")[] | undefined;
787
+ readonly ac?: ("create" | "update" | "delete" | "read")[] | undefined;
788
+ };
789
+ } & {
790
+ organizationId?: string | undefined;
791
+ } & {
792
+ fetchOptions?: FetchOptions | undefined;
793
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
794
+ error: null;
795
+ success: boolean;
796
+ }, {
797
+ code?: string | undefined;
798
+ message?: string | undefined;
799
+ }, FetchOptions["throw"] extends true ? true : false>>;
800
+ };
801
+ } & {
802
+ signIn: {
803
+ social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
804
+ provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
805
+ callbackURL?: string | undefined;
806
+ newUserCallbackURL?: string | undefined;
807
+ errorCallbackURL?: string | undefined;
808
+ disableRedirect?: boolean | undefined;
809
+ idToken?: {
810
+ token: string;
811
+ nonce?: string | undefined;
812
+ accessToken?: string | undefined;
813
+ refreshToken?: string | undefined;
814
+ expiresAt?: number | undefined;
815
+ user?: {
816
+ name?: {
817
+ firstName?: string | undefined;
818
+ lastName?: string | undefined;
819
+ } | undefined;
820
+ email?: string | undefined;
821
+ } | undefined;
822
+ } | undefined;
823
+ scopes?: string[] | undefined;
824
+ requestSignUp?: boolean | undefined;
825
+ loginHint?: string | undefined;
826
+ additionalData?: Record<string, any> | undefined;
827
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
828
+ provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
829
+ callbackURL?: string | undefined;
830
+ newUserCallbackURL?: string | undefined;
831
+ errorCallbackURL?: string | undefined;
832
+ disableRedirect?: boolean | undefined;
833
+ idToken?: {
834
+ token: string;
835
+ nonce?: string | undefined;
836
+ accessToken?: string | undefined;
837
+ refreshToken?: string | undefined;
838
+ expiresAt?: number | undefined;
839
+ user?: {
840
+ name?: {
841
+ firstName?: string | undefined;
842
+ lastName?: string | undefined;
843
+ } | undefined;
844
+ email?: string | undefined;
845
+ } | undefined;
846
+ } | undefined;
847
+ scopes?: string[] | undefined;
848
+ requestSignUp?: boolean | undefined;
849
+ loginHint?: string | undefined;
850
+ additionalData?: Record<string, any> | undefined;
851
+ } & {
852
+ fetchOptions?: FetchOptions | undefined;
853
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
854
+ redirect: boolean;
855
+ url: string;
856
+ } | (Omit<{
857
+ redirect: boolean;
858
+ token: string;
859
+ url: undefined;
860
+ user: {
861
+ id: string;
862
+ createdAt: Date;
863
+ updatedAt: Date;
864
+ email: string;
865
+ emailVerified: boolean;
866
+ name: string;
867
+ image?: string | null | undefined | undefined;
868
+ };
869
+ }, "user"> & {
870
+ user: import("better-auth").StripEmptyObjects<{
871
+ id: string;
872
+ createdAt: Date;
873
+ updatedAt: Date;
874
+ email: string;
875
+ emailVerified: boolean;
876
+ name: string;
877
+ image?: string | null | undefined;
878
+ }>;
879
+ }), {
880
+ code?: string | undefined;
881
+ message?: string | undefined;
882
+ }, FetchOptions["throw"] extends true ? true : false>>;
883
+ };
884
+ } & {
885
+ signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
886
+ query?: Record<string, any> | undefined;
887
+ fetchOptions?: FetchOptions | undefined;
888
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
889
+ success: boolean;
890
+ }, {
891
+ code?: string | undefined;
892
+ message?: string | undefined;
893
+ }, FetchOptions["throw"] extends true ? true : false>>;
894
+ } & {
895
+ signUp: {
896
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
897
+ name: string;
898
+ email: string;
899
+ password: string;
900
+ image?: string | undefined;
901
+ callbackURL?: string | undefined;
902
+ rememberMe?: boolean | undefined;
903
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
904
+ email: string;
905
+ name: string;
906
+ password: string;
907
+ image?: string | undefined;
908
+ callbackURL?: string | undefined;
909
+ fetchOptions?: FetchOptions | undefined;
910
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
911
+ token: null;
912
+ user: {
913
+ id: string;
914
+ createdAt: Date;
915
+ updatedAt: Date;
916
+ email: string;
917
+ emailVerified: boolean;
918
+ name: string;
919
+ image?: string | null | undefined | undefined;
920
+ };
921
+ }, "user"> & {
922
+ user: import("better-auth").StripEmptyObjects<{
923
+ id: string;
924
+ createdAt: Date;
925
+ updatedAt: Date;
926
+ email: string;
927
+ emailVerified: boolean;
928
+ name: string;
929
+ image?: string | null | undefined;
930
+ }>;
931
+ }) | (Omit<{
932
+ token: string;
933
+ user: {
934
+ id: string;
935
+ createdAt: Date;
936
+ updatedAt: Date;
937
+ email: string;
938
+ emailVerified: boolean;
939
+ name: string;
940
+ image?: string | null | undefined | undefined;
941
+ };
942
+ }, "user"> & {
943
+ user: import("better-auth").StripEmptyObjects<{
944
+ id: string;
945
+ createdAt: Date;
946
+ updatedAt: Date;
947
+ email: string;
948
+ emailVerified: boolean;
949
+ name: string;
950
+ image?: string | null | undefined;
951
+ }>;
952
+ }), {
953
+ code?: string | undefined;
954
+ message?: string | undefined;
955
+ }, FetchOptions["throw"] extends true ? true : false>>;
956
+ };
957
+ } & {
958
+ signIn: {
959
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
960
+ email: string;
961
+ password: string;
962
+ callbackURL?: string | undefined;
963
+ rememberMe?: boolean | undefined;
964
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
965
+ email: string;
966
+ password: string;
967
+ callbackURL?: string | undefined;
968
+ rememberMe?: boolean | undefined;
969
+ } & {
970
+ fetchOptions?: FetchOptions | undefined;
971
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
972
+ redirect: boolean;
973
+ token: string;
974
+ url?: string | undefined;
975
+ user: {
976
+ id: string;
977
+ createdAt: Date;
978
+ updatedAt: Date;
979
+ email: string;
980
+ emailVerified: boolean;
981
+ name: string;
982
+ image?: string | null | undefined | undefined;
983
+ };
984
+ }, "user"> & {
985
+ user: import("better-auth").StripEmptyObjects<{
986
+ id: string;
987
+ createdAt: Date;
988
+ updatedAt: Date;
989
+ email: string;
990
+ emailVerified: boolean;
991
+ name: string;
992
+ image?: string | null | undefined;
993
+ }>;
994
+ }, {
995
+ code?: string | undefined;
996
+ message?: string | undefined;
997
+ }, FetchOptions["throw"] extends true ? true : false>>;
998
+ };
999
+ } & {
1000
+ resetPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1001
+ newPassword: string;
1002
+ token?: string | undefined;
1003
+ }> & Record<string, any>, Partial<{
1004
+ token?: string | undefined;
1005
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1006
+ newPassword: string;
1007
+ token?: string | undefined;
1008
+ } & {
1009
+ fetchOptions?: FetchOptions | undefined;
1010
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1011
+ status: boolean;
1012
+ }, {
1013
+ code?: string | undefined;
1014
+ message?: string | undefined;
1015
+ }, FetchOptions["throw"] extends true ? true : false>>;
1016
+ } & {
1017
+ verifyEmail: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1018
+ token: string;
1019
+ callbackURL?: string | undefined;
1020
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1021
+ query: {
1022
+ token: string;
1023
+ callbackURL?: string | undefined;
1024
+ };
1025
+ fetchOptions?: FetchOptions | undefined;
1026
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<void | {
1027
+ status: boolean;
1028
+ }>, {
1029
+ code?: string | undefined;
1030
+ message?: string | undefined;
1031
+ }, FetchOptions["throw"] extends true ? true : false>>;
1032
+ } & {
1033
+ sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1034
+ email: string;
1035
+ callbackURL?: string | undefined;
1036
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1037
+ email: string;
1038
+ callbackURL?: string | undefined;
1039
+ } & {
1040
+ fetchOptions?: FetchOptions | undefined;
1041
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1042
+ status: boolean;
1043
+ }, {
1044
+ code?: string | undefined;
1045
+ message?: string | undefined;
1046
+ }, FetchOptions["throw"] extends true ? true : false>>;
1047
+ } & {
1048
+ changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1049
+ newEmail: string;
1050
+ callbackURL?: string | undefined;
1051
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1052
+ newEmail: string;
1053
+ callbackURL?: string | undefined;
1054
+ } & {
1055
+ fetchOptions?: FetchOptions | undefined;
1056
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1057
+ status: boolean;
1058
+ }, {
1059
+ code?: string | undefined;
1060
+ message?: string | undefined;
1061
+ }, FetchOptions["throw"] extends true ? true : false>>;
1062
+ } & {
1063
+ changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1064
+ newPassword: string;
1065
+ currentPassword: string;
1066
+ revokeOtherSessions?: boolean | undefined;
1067
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1068
+ newPassword: string;
1069
+ currentPassword: string;
1070
+ revokeOtherSessions?: boolean | undefined;
1071
+ } & {
1072
+ fetchOptions?: FetchOptions | undefined;
1073
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
1074
+ token: string | null;
1075
+ user: {
1076
+ id: string;
1077
+ createdAt: Date;
1078
+ updatedAt: Date;
1079
+ email: string;
1080
+ emailVerified: boolean;
1081
+ name: string;
1082
+ image?: string | null | undefined;
1083
+ } & Record<string, any> & {
1084
+ id: string;
1085
+ createdAt: Date;
1086
+ updatedAt: Date;
1087
+ email: string;
1088
+ emailVerified: boolean;
1089
+ name: string;
1090
+ image?: string | null | undefined;
1091
+ };
1092
+ }, "user"> & {
1093
+ user: import("better-auth").StripEmptyObjects<{
1094
+ id: string;
1095
+ createdAt: Date;
1096
+ updatedAt: Date;
1097
+ email: string;
1098
+ emailVerified: boolean;
1099
+ name: string;
1100
+ image?: string | null | undefined;
1101
+ }>;
1102
+ }, {
1103
+ code?: string | undefined;
1104
+ message?: string | undefined;
1105
+ }, FetchOptions["throw"] extends true ? true : false>>;
1106
+ } & {
1107
+ updateSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<Partial<{}> & {
1108
+ fetchOptions?: FetchOptions | undefined;
1109
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1110
+ session: {
1111
+ id: string;
1112
+ createdAt: Date;
1113
+ updatedAt: Date;
1114
+ userId: string;
1115
+ expiresAt: Date;
1116
+ token: string;
1117
+ ipAddress?: string | null | undefined;
1118
+ userAgent?: string | null | undefined;
1119
+ };
1120
+ }, {
1121
+ code?: string | undefined;
1122
+ message?: string | undefined;
1123
+ }, FetchOptions["throw"] extends true ? true : false>>;
1124
+ } & {
1125
+ updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}> & {
1126
+ name?: string | undefined;
1127
+ image?: string | undefined | null;
1128
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<import("better-auth/client").InferUserUpdateCtx<{
1129
+ baseURL: string;
1130
+ plugins: ({
1131
+ id: "device-authorization";
1132
+ version: string;
1133
+ $InferServerPlugin: ReturnType<(options?: Partial<import("better-auth/plugins/device-authorization").DeviceAuthorizationOptions>) => {
1134
+ id: "device-authorization";
1135
+ version: string;
1136
+ schema: {
1137
+ deviceCode: {
1138
+ fields: {
1139
+ deviceCode: {
1140
+ type: "string";
1141
+ required: true;
1142
+ };
1143
+ userCode: {
1144
+ type: "string";
1145
+ required: true;
1146
+ };
1147
+ userId: {
1148
+ type: "string";
1149
+ required: false;
1150
+ };
1151
+ expiresAt: {
1152
+ type: "date";
1153
+ required: true;
1154
+ };
1155
+ status: {
1156
+ type: "string";
1157
+ required: true;
1158
+ };
1159
+ lastPolledAt: {
1160
+ type: "date";
1161
+ required: false;
1162
+ };
1163
+ pollingInterval: {
1164
+ type: "number";
1165
+ required: false;
1166
+ };
1167
+ clientId: {
1168
+ type: "string";
1169
+ required: false;
1170
+ };
1171
+ scope: {
1172
+ type: "string";
1173
+ required: false;
1174
+ };
1175
+ };
1176
+ };
1177
+ };
1178
+ endpoints: {
1179
+ deviceCode: import("better-call").StrictEndpoint<"/device/code", {
1180
+ method: "POST";
1181
+ body: import("zod").ZodObject<{
1182
+ client_id: import("zod").ZodString;
1183
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
1184
+ }, import("zod/v4/core").$strip>;
1185
+ error: import("zod").ZodObject<{
1186
+ error: import("zod").ZodEnum<{
1187
+ invalid_request: "invalid_request";
1188
+ invalid_client: "invalid_client";
1189
+ }>;
1190
+ error_description: import("zod").ZodString;
1191
+ }, import("zod/v4/core").$strip>;
1192
+ metadata: {
1193
+ openapi: {
1194
+ description: string;
1195
+ responses: {
1196
+ 200: {
1197
+ description: string;
1198
+ content: {
1199
+ "application/json": {
1200
+ schema: {
1201
+ type: "object";
1202
+ properties: {
1203
+ device_code: {
1204
+ type: string;
1205
+ description: string;
1206
+ };
1207
+ user_code: {
1208
+ type: string;
1209
+ description: string;
1210
+ };
1211
+ verification_uri: {
1212
+ type: string;
1213
+ format: string;
1214
+ description: string;
1215
+ };
1216
+ verification_uri_complete: {
1217
+ type: string;
1218
+ format: string;
1219
+ description: string;
1220
+ };
1221
+ expires_in: {
1222
+ type: string;
1223
+ description: string;
1224
+ };
1225
+ interval: {
1226
+ type: string;
1227
+ description: string;
1228
+ };
1229
+ };
1230
+ };
1231
+ };
1232
+ };
1233
+ };
1234
+ 400: {
1235
+ description: string;
1236
+ content: {
1237
+ "application/json": {
1238
+ schema: {
1239
+ type: "object";
1240
+ properties: {
1241
+ error: {
1242
+ type: string;
1243
+ enum: string[];
1244
+ };
1245
+ error_description: {
1246
+ type: string;
1247
+ };
1248
+ };
1249
+ };
1250
+ };
1251
+ };
1252
+ };
1253
+ };
1254
+ };
1255
+ };
1256
+ }, {
1257
+ device_code: string;
1258
+ user_code: string;
1259
+ verification_uri: string;
1260
+ verification_uri_complete: string;
1261
+ expires_in: number;
1262
+ interval: number;
1263
+ }>;
1264
+ deviceToken: import("better-call").StrictEndpoint<"/device/token", {
1265
+ method: "POST";
1266
+ body: import("zod").ZodObject<{
1267
+ grant_type: import("zod").ZodLiteral<"urn:ietf:params:oauth:grant-type:device_code">;
1268
+ device_code: import("zod").ZodString;
1269
+ client_id: import("zod").ZodString;
1270
+ }, import("zod/v4/core").$strip>;
1271
+ error: import("zod").ZodObject<{
1272
+ error: import("zod").ZodEnum<{
1273
+ invalid_request: "invalid_request";
1274
+ authorization_pending: "authorization_pending";
1275
+ slow_down: "slow_down";
1276
+ expired_token: "expired_token";
1277
+ access_denied: "access_denied";
1278
+ invalid_grant: "invalid_grant";
1279
+ }>;
1280
+ error_description: import("zod").ZodString;
1281
+ }, import("zod/v4/core").$strip>;
1282
+ metadata: {
1283
+ openapi: {
1284
+ description: string;
1285
+ responses: {
1286
+ 200: {
1287
+ description: string;
1288
+ content: {
1289
+ "application/json": {
1290
+ schema: {
1291
+ type: "object";
1292
+ properties: {
1293
+ session: {
1294
+ $ref: string;
1295
+ };
1296
+ user: {
1297
+ $ref: string;
1298
+ };
1299
+ };
1300
+ };
1301
+ };
1302
+ };
1303
+ };
1304
+ 400: {
1305
+ description: string;
1306
+ content: {
1307
+ "application/json": {
1308
+ schema: {
1309
+ type: "object";
1310
+ properties: {
1311
+ error: {
1312
+ type: string;
1313
+ enum: string[];
1314
+ };
1315
+ error_description: {
1316
+ type: string;
1317
+ };
1318
+ };
1319
+ };
1320
+ };
1321
+ };
1322
+ };
1323
+ };
1324
+ };
1325
+ };
1326
+ }, {
1327
+ access_token: string;
1328
+ token_type: string;
1329
+ expires_in: number;
1330
+ scope: string;
1331
+ }>;
1332
+ deviceVerify: import("better-call").StrictEndpoint<"/device", {
1333
+ method: "GET";
1334
+ query: import("zod").ZodObject<{
1335
+ user_code: import("zod").ZodString;
1336
+ }, import("zod/v4/core").$strip>;
1337
+ error: import("zod").ZodObject<{
1338
+ error: import("zod").ZodEnum<{
1339
+ invalid_request: "invalid_request";
1340
+ }>;
1341
+ error_description: import("zod").ZodString;
1342
+ }, import("zod/v4/core").$strip>;
1343
+ metadata: {
1344
+ openapi: {
1345
+ description: string;
1346
+ responses: {
1347
+ 200: {
1348
+ description: string;
1349
+ content: {
1350
+ "application/json": {
1351
+ schema: {
1352
+ type: "object";
1353
+ properties: {
1354
+ user_code: {
1355
+ type: string;
1356
+ description: string;
1357
+ };
1358
+ status: {
1359
+ type: string;
1360
+ enum: string[];
1361
+ description: string;
1362
+ };
1363
+ };
1364
+ };
1365
+ };
1366
+ };
1367
+ };
1368
+ };
1369
+ };
1370
+ };
1371
+ }, {
1372
+ user_code: string;
1373
+ status: string;
1374
+ }>;
1375
+ deviceApprove: import("better-call").StrictEndpoint<"/device/approve", {
1376
+ method: "POST";
1377
+ body: import("zod").ZodObject<{
1378
+ userCode: import("zod").ZodString;
1379
+ }, import("zod/v4/core").$strip>;
1380
+ error: import("zod").ZodObject<{
1381
+ error: import("zod").ZodEnum<{
1382
+ invalid_request: "invalid_request";
1383
+ expired_token: "expired_token";
1384
+ access_denied: "access_denied";
1385
+ device_code_already_processed: "device_code_already_processed";
1386
+ unauthorized: "unauthorized";
1387
+ }>;
1388
+ error_description: import("zod").ZodString;
1389
+ }, import("zod/v4/core").$strip>;
1390
+ requireHeaders: true;
1391
+ metadata: {
1392
+ openapi: {
1393
+ description: string;
1394
+ responses: {
1395
+ 200: {
1396
+ description: string;
1397
+ content: {
1398
+ "application/json": {
1399
+ schema: {
1400
+ type: "object";
1401
+ properties: {
1402
+ success: {
1403
+ type: string;
1404
+ };
1405
+ };
1406
+ };
1407
+ };
1408
+ };
1409
+ };
1410
+ };
1411
+ };
1412
+ };
1413
+ }, {
1414
+ success: boolean;
1415
+ }>;
1416
+ deviceDeny: import("better-call").StrictEndpoint<"/device/deny", {
1417
+ method: "POST";
1418
+ body: import("zod").ZodObject<{
1419
+ userCode: import("zod").ZodString;
1420
+ }, import("zod/v4/core").$strip>;
1421
+ error: import("zod").ZodObject<{
1422
+ error: import("zod").ZodEnum<{
1423
+ invalid_request: "invalid_request";
1424
+ expired_token: "expired_token";
1425
+ access_denied: "access_denied";
1426
+ unauthorized: "unauthorized";
1427
+ }>;
1428
+ error_description: import("zod").ZodString;
1429
+ }, import("zod/v4/core").$strip>;
1430
+ requireHeaders: true;
1431
+ metadata: {
1432
+ openapi: {
1433
+ description: string;
1434
+ responses: {
1435
+ 200: {
1436
+ description: string;
1437
+ content: {
1438
+ "application/json": {
1439
+ schema: {
1440
+ type: "object";
1441
+ properties: {
1442
+ success: {
1443
+ type: string;
1444
+ };
1445
+ };
1446
+ };
1447
+ };
1448
+ };
1449
+ };
1450
+ };
1451
+ };
1452
+ };
1453
+ }, {
1454
+ success: boolean;
1455
+ }>;
1456
+ };
1457
+ $ERROR_CODES: {
1458
+ USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
1459
+ FAILED_TO_CREATE_SESSION: import("better-auth").RawError<"FAILED_TO_CREATE_SESSION">;
1460
+ INVALID_DEVICE_CODE: import("better-auth").RawError<"INVALID_DEVICE_CODE">;
1461
+ EXPIRED_DEVICE_CODE: import("better-auth").RawError<"EXPIRED_DEVICE_CODE">;
1462
+ EXPIRED_USER_CODE: import("better-auth").RawError<"EXPIRED_USER_CODE">;
1463
+ AUTHORIZATION_PENDING: import("better-auth").RawError<"AUTHORIZATION_PENDING">;
1464
+ ACCESS_DENIED: import("better-auth").RawError<"ACCESS_DENIED">;
1465
+ INVALID_USER_CODE: import("better-auth").RawError<"INVALID_USER_CODE">;
1466
+ DEVICE_CODE_ALREADY_PROCESSED: import("better-auth").RawError<"DEVICE_CODE_ALREADY_PROCESSED">;
1467
+ POLLING_TOO_FREQUENTLY: import("better-auth").RawError<"POLLING_TOO_FREQUENTLY">;
1468
+ INVALID_DEVICE_CODE_STATUS: import("better-auth").RawError<"INVALID_DEVICE_CODE_STATUS">;
1469
+ AUTHENTICATION_REQUIRED: import("better-auth").RawError<"AUTHENTICATION_REQUIRED">;
1470
+ };
1471
+ options: Partial<{
1472
+ expiresIn: import("better-auth/plugins/device-authorization").TimeString;
1473
+ interval: import("better-auth/plugins/device-authorization").TimeString;
1474
+ deviceCodeLength: number;
1475
+ userCodeLength: number;
1476
+ schema: {
1477
+ deviceCode?: {
1478
+ modelName?: string | undefined;
1479
+ fields?: {
1480
+ deviceCode?: string | undefined;
1481
+ userCode?: string | undefined;
1482
+ userId?: string | undefined;
1483
+ expiresAt?: string | undefined;
1484
+ status?: string | undefined;
1485
+ lastPolledAt?: string | undefined;
1486
+ pollingInterval?: string | undefined;
1487
+ clientId?: string | undefined;
1488
+ scope?: string | undefined;
1489
+ } | undefined;
1490
+ } | undefined;
1491
+ };
1492
+ generateDeviceCode?: (() => string | Promise<string>) | undefined;
1493
+ generateUserCode?: (() => string | Promise<string>) | undefined;
1494
+ validateClient?: ((clientId: string) => boolean | Promise<boolean>) | undefined;
1495
+ onDeviceAuthRequest?: ((clientId: string, scope: string | undefined) => void | Promise<void>) | undefined;
1496
+ verificationUri?: string | undefined;
1497
+ }>;
1498
+ }>;
1499
+ pathMethods: {
1500
+ "/device/code": "POST";
1501
+ "/device/token": "POST";
1502
+ "/device": "GET";
1503
+ "/device/approve": "POST";
1504
+ "/device/deny": "POST";
1505
+ };
1506
+ } | {
1507
+ id: "organization";
1508
+ version: string;
1509
+ $InferServerPlugin: import("better-auth/client").OrganizationPlugin<{
1510
+ ac: import("better-auth/client").AccessControl<{
1511
+ readonly organization: readonly ["update", "delete"];
1512
+ readonly member: readonly ["create", "update", "delete"];
1513
+ readonly invitation: readonly ["create", "cancel"];
1514
+ readonly team: readonly ["create", "update", "delete"];
1515
+ readonly ac: readonly ["create", "read", "update", "delete"];
1516
+ }>;
1517
+ roles: {
1518
+ admin: import("better-auth/client").Role;
1519
+ member: import("better-auth/client").Role;
1520
+ owner: import("better-auth/client").Role;
1521
+ };
1522
+ teams: {
1523
+ enabled: false;
1524
+ };
1525
+ schema: {
1526
+ organization?: {
1527
+ additionalFields?: {
1528
+ [key: string]: import("better-auth").DBFieldAttribute;
1529
+ };
1530
+ };
1531
+ member?: {
1532
+ additionalFields?: {
1533
+ [key: string]: import("better-auth").DBFieldAttribute;
1534
+ };
1535
+ };
1536
+ invitation?: {
1537
+ additionalFields?: {
1538
+ [key: string]: import("better-auth").DBFieldAttribute;
1539
+ };
1540
+ };
1541
+ team?: {
1542
+ additionalFields?: {
1543
+ [key: string]: import("better-auth").DBFieldAttribute;
1544
+ };
1545
+ };
1546
+ organizationRole?: {
1547
+ additionalFields?: {
1548
+ [key: string]: import("better-auth").DBFieldAttribute;
1549
+ };
1550
+ };
1551
+ } | undefined;
1552
+ dynamicAccessControl: {
1553
+ enabled: false;
1554
+ };
1555
+ }>;
1556
+ getActions: ($fetch: import("@better-fetch/fetch").BetterFetch, _$store: import("better-auth").ClientStore, co: import("better-auth").BetterAuthClientOptions | undefined) => {
1557
+ $Infer: {
1558
+ ActiveOrganization: {
1559
+ members: {
1560
+ id: string;
1561
+ organizationId: string;
1562
+ role: "member" | "admin" | "owner";
1563
+ createdAt: Date;
1564
+ userId: string;
1565
+ user: {
1566
+ id: string;
1567
+ email: string;
1568
+ name: string;
1569
+ image?: string | undefined;
1570
+ };
1571
+ }[];
1572
+ invitations: {
1573
+ id: string;
1574
+ organizationId: string;
1575
+ email: string;
1576
+ role: "member" | "admin" | "owner";
1577
+ status: import("better-auth/client").InvitationStatus;
1578
+ inviterId: string;
1579
+ expiresAt: Date;
1580
+ createdAt: Date;
1581
+ }[];
1582
+ } & {
1583
+ id: string;
1584
+ name: string;
1585
+ slug: string;
1586
+ createdAt: Date;
1587
+ logo?: string | null | undefined | undefined;
1588
+ metadata?: any;
1589
+ };
1590
+ Organization: {
1591
+ id: string;
1592
+ name: string;
1593
+ slug: string;
1594
+ createdAt: Date;
1595
+ logo?: string | null | undefined;
1596
+ metadata?: any;
1597
+ };
1598
+ Invitation: {
1599
+ id: string;
1600
+ organizationId: string;
1601
+ email: string;
1602
+ role: "member" | "admin" | "owner";
1603
+ status: import("better-auth/client").InvitationStatus;
1604
+ inviterId: string;
1605
+ expiresAt: Date;
1606
+ createdAt: Date;
1607
+ };
1608
+ Member: {
1609
+ id: string;
1610
+ organizationId: string;
1611
+ role: "member" | "admin" | "owner";
1612
+ createdAt: Date;
1613
+ userId: string;
1614
+ user: {
1615
+ id: string;
1616
+ email: string;
1617
+ name: string;
1618
+ image?: string | undefined;
1619
+ };
1620
+ };
1621
+ Team: {
1622
+ id: string;
1623
+ name: string;
1624
+ organizationId: string;
1625
+ createdAt: Date;
1626
+ updatedAt?: Date | undefined;
1627
+ };
1628
+ };
1629
+ organization: {
1630
+ checkRolePermission: <R extends "member" | "admin" | "owner">(data: {
1631
+ permissions: {
1632
+ readonly organization?: ("update" | "delete")[] | undefined;
1633
+ readonly member?: ("create" | "update" | "delete")[] | undefined;
1634
+ readonly invitation?: ("create" | "cancel")[] | undefined;
1635
+ readonly team?: ("create" | "update" | "delete")[] | undefined;
1636
+ readonly ac?: ("create" | "update" | "delete" | "read")[] | undefined;
1637
+ };
1638
+ } & {
1639
+ role: R;
1640
+ }) => boolean;
1641
+ };
1642
+ };
1643
+ getAtoms: ($fetch: import("@better-fetch/fetch").BetterFetch) => {
1644
+ $listOrg: import("nanostores").PreinitializedWritableAtom<boolean> & object;
1645
+ $activeOrgSignal: import("nanostores").PreinitializedWritableAtom<boolean> & object;
1646
+ $activeMemberSignal: import("nanostores").PreinitializedWritableAtom<boolean> & object;
1647
+ $activeMemberRoleSignal: import("nanostores").PreinitializedWritableAtom<boolean> & object;
1648
+ activeOrganization: import("better-auth/client").AuthQueryAtom<import("better-auth").Prettify<{
1649
+ id: string;
1650
+ name: string;
1651
+ slug: string;
1652
+ createdAt: Date;
1653
+ logo?: string | null | undefined | undefined;
1654
+ metadata?: any;
1655
+ } & {
1656
+ members: {
1657
+ id: string;
1658
+ organizationId: string;
1659
+ role: "member" | "admin" | "owner";
1660
+ createdAt: Date;
1661
+ userId: string;
1662
+ user: {
1663
+ id: string;
1664
+ email: string;
1665
+ name: string;
1666
+ image?: string | undefined;
1667
+ };
1668
+ }[];
1669
+ invitations: {
1670
+ id: string;
1671
+ organizationId: string;
1672
+ email: string;
1673
+ role: "member" | "admin" | "owner";
1674
+ status: import("better-auth/client").InvitationStatus;
1675
+ inviterId: string;
1676
+ expiresAt: Date;
1677
+ createdAt: Date;
1678
+ }[];
1679
+ }>>;
1680
+ listOrganizations: import("better-auth/client").AuthQueryAtom<{
1681
+ id: string;
1682
+ name: string;
1683
+ slug: string;
1684
+ createdAt: Date;
1685
+ logo?: string | null | undefined | undefined;
1686
+ metadata?: any;
1687
+ }[]>;
1688
+ activeMember: import("better-auth/client").AuthQueryAtom<{
1689
+ id: string;
1690
+ organizationId: string;
1691
+ userId: string;
1692
+ role: string;
1693
+ createdAt: Date;
1694
+ }>;
1695
+ activeMemberRole: import("better-auth/client").AuthQueryAtom<{
1696
+ role: string;
1697
+ }>;
1698
+ };
1699
+ pathMethods: {
1700
+ "/organization/get-full-organization": "GET";
1701
+ "/organization/list-user-teams": "GET";
1702
+ };
1703
+ atomListeners: ({
1704
+ matcher(path: string): path is "/organization/create" | "/organization/update" | "/organization/delete";
1705
+ signal: "$listOrg";
1706
+ } | {
1707
+ matcher(path: string): boolean;
1708
+ signal: "$activeOrgSignal";
1709
+ } | {
1710
+ matcher(path: string): boolean;
1711
+ signal: "$sessionSignal";
1712
+ } | {
1713
+ matcher(path: string): boolean;
1714
+ signal: "$activeMemberSignal";
1715
+ } | {
1716
+ matcher(path: string): boolean;
1717
+ signal: "$activeMemberRoleSignal";
1718
+ })[];
1719
+ $ERROR_CODES: {
1720
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION">;
1721
+ YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: import("better-auth").RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS">;
1722
+ ORGANIZATION_ALREADY_EXISTS: import("better-auth").RawError<"ORGANIZATION_ALREADY_EXISTS">;
1723
+ ORGANIZATION_SLUG_ALREADY_TAKEN: import("better-auth").RawError<"ORGANIZATION_SLUG_ALREADY_TAKEN">;
1724
+ ORGANIZATION_NOT_FOUND: import("better-auth").RawError<"ORGANIZATION_NOT_FOUND">;
1725
+ USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: import("better-auth").RawError<"USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION">;
1726
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION">;
1727
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION">;
1728
+ NO_ACTIVE_ORGANIZATION: import("better-auth").RawError<"NO_ACTIVE_ORGANIZATION">;
1729
+ USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: import("better-auth").RawError<"USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION">;
1730
+ MEMBER_NOT_FOUND: import("better-auth").RawError<"MEMBER_NOT_FOUND">;
1731
+ ROLE_NOT_FOUND: import("better-auth").RawError<"ROLE_NOT_FOUND">;
1732
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM">;
1733
+ TEAM_ALREADY_EXISTS: import("better-auth").RawError<"TEAM_ALREADY_EXISTS">;
1734
+ TEAM_NOT_FOUND: import("better-auth").RawError<"TEAM_NOT_FOUND">;
1735
+ YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: import("better-auth").RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER">;
1736
+ YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: import("better-auth").RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER">;
1737
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER">;
1738
+ YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION">;
1739
+ USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: import("better-auth").RawError<"USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION">;
1740
+ INVITATION_NOT_FOUND: import("better-auth").RawError<"INVITATION_NOT_FOUND">;
1741
+ YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: import("better-auth").RawError<"YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION">;
1742
+ EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: import("better-auth").RawError<"EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION">;
1743
+ YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION">;
1744
+ INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: import("better-auth").RawError<"INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION">;
1745
+ YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE">;
1746
+ FAILED_TO_RETRIEVE_INVITATION: import("better-auth").RawError<"FAILED_TO_RETRIEVE_INVITATION">;
1747
+ YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: import("better-auth").RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS">;
1748
+ UNABLE_TO_REMOVE_LAST_TEAM: import("better-auth").RawError<"UNABLE_TO_REMOVE_LAST_TEAM">;
1749
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER">;
1750
+ ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: import("better-auth").RawError<"ORGANIZATION_MEMBERSHIP_LIMIT_REACHED">;
1751
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION">;
1752
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION">;
1753
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM">;
1754
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM">;
1755
+ INVITATION_LIMIT_REACHED: import("better-auth").RawError<"INVITATION_LIMIT_REACHED">;
1756
+ TEAM_MEMBER_LIMIT_REACHED: import("better-auth").RawError<"TEAM_MEMBER_LIMIT_REACHED">;
1757
+ USER_IS_NOT_A_MEMBER_OF_THE_TEAM: import("better-auth").RawError<"USER_IS_NOT_A_MEMBER_OF_THE_TEAM">;
1758
+ YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: import("better-auth").RawError<"YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM">;
1759
+ YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: import("better-auth").RawError<"YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM">;
1760
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER">;
1761
+ YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER">;
1762
+ YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION">;
1763
+ YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION">;
1764
+ MISSING_AC_INSTANCE: import("better-auth").RawError<"MISSING_AC_INSTANCE">;
1765
+ YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: import("better-auth").RawError<"YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE">;
1766
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE">;
1767
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE">;
1768
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE">;
1769
+ YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE">;
1770
+ YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE">;
1771
+ YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE">;
1772
+ TOO_MANY_ROLES: import("better-auth").RawError<"TOO_MANY_ROLES">;
1773
+ INVALID_RESOURCE: import("better-auth").RawError<"INVALID_RESOURCE">;
1774
+ ROLE_NAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"ROLE_NAME_IS_ALREADY_TAKEN">;
1775
+ CANNOT_DELETE_A_PRE_DEFINED_ROLE: import("better-auth").RawError<"CANNOT_DELETE_A_PRE_DEFINED_ROLE">;
1776
+ ROLE_IS_ASSIGNED_TO_MEMBERS: import("better-auth").RawError<"ROLE_IS_ASSIGNED_TO_MEMBERS">;
1777
+ };
1778
+ })[];
1779
+ }, FetchOptions>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1780
+ status: boolean;
1781
+ }, {
1782
+ code?: string | undefined;
1783
+ message?: string | undefined;
1784
+ }, FetchOptions["throw"] extends true ? true : false>>;
1785
+ } & {
1786
+ deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1787
+ callbackURL?: string | undefined;
1788
+ password?: string | undefined;
1789
+ token?: string | undefined;
1790
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1791
+ callbackURL?: string | undefined;
1792
+ password?: string | undefined;
1793
+ token?: string | undefined;
1794
+ } & {
1795
+ fetchOptions?: FetchOptions | undefined;
1796
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1797
+ success: boolean;
1798
+ message: string;
1799
+ }, {
1800
+ code?: string | undefined;
1801
+ message?: string | undefined;
1802
+ }, FetchOptions["throw"] extends true ? true : false>>;
1803
+ } & {
1804
+ requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1805
+ email: string;
1806
+ redirectTo?: string | undefined;
1807
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1808
+ email: string;
1809
+ redirectTo?: string | undefined;
1810
+ } & {
1811
+ fetchOptions?: FetchOptions | undefined;
1812
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1813
+ status: boolean;
1814
+ message: string;
1815
+ }, {
1816
+ code?: string | undefined;
1817
+ message?: string | undefined;
1818
+ }, FetchOptions["throw"] extends true ? true : false>>;
1819
+ } & {
1820
+ resetPassword: {
1821
+ ":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1822
+ callbackURL: string;
1823
+ }> & Record<string, any>, {
1824
+ token: string;
1825
+ }>>(data_0: import("better-auth").Prettify<{
1826
+ query: {
1827
+ callbackURL: string;
1828
+ };
1829
+ fetchOptions?: FetchOptions | undefined;
1830
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<never, {
1831
+ code?: string | undefined;
1832
+ message?: string | undefined;
1833
+ }, FetchOptions["throw"] extends true ? true : false>>;
1834
+ };
1835
+ } & {
1836
+ listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1837
+ query?: Record<string, any> | undefined;
1838
+ fetchOptions?: FetchOptions | undefined;
1839
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth").Prettify<{
1840
+ id: string;
1841
+ createdAt: Date;
1842
+ updatedAt: Date;
1843
+ userId: string;
1844
+ expiresAt: Date;
1845
+ token: string;
1846
+ ipAddress?: string | null | undefined | undefined;
1847
+ userAgent?: string | null | undefined | undefined;
1848
+ }>[], {
1849
+ code?: string | undefined;
1850
+ message?: string | undefined;
1851
+ }, FetchOptions["throw"] extends true ? true : false>>;
1852
+ } & {
1853
+ revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1854
+ token: string;
1855
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1856
+ token: string;
1857
+ } & {
1858
+ fetchOptions?: FetchOptions | undefined;
1859
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1860
+ status: boolean;
1861
+ }, {
1862
+ code?: string | undefined;
1863
+ message?: string | undefined;
1864
+ }, FetchOptions["throw"] extends true ? true : false>>;
1865
+ } & {
1866
+ revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1867
+ query?: Record<string, any> | undefined;
1868
+ fetchOptions?: FetchOptions | undefined;
1869
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1870
+ status: boolean;
1871
+ }, {
1872
+ code?: string | undefined;
1873
+ message?: string | undefined;
1874
+ }, FetchOptions["throw"] extends true ? true : false>>;
1875
+ } & {
1876
+ revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1877
+ query?: Record<string, any> | undefined;
1878
+ fetchOptions?: FetchOptions | undefined;
1879
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1880
+ status: boolean;
1881
+ }, {
1882
+ code?: string | undefined;
1883
+ message?: string | undefined;
1884
+ }, FetchOptions["throw"] extends true ? true : false>>;
1885
+ } & {
1886
+ linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1887
+ provider: unknown;
1888
+ callbackURL?: string | undefined;
1889
+ idToken?: {
1890
+ token: string;
1891
+ nonce?: string | undefined;
1892
+ accessToken?: string | undefined;
1893
+ refreshToken?: string | undefined;
1894
+ scopes?: string[] | undefined;
1895
+ } | undefined;
1896
+ requestSignUp?: boolean | undefined;
1897
+ scopes?: string[] | undefined;
1898
+ errorCallbackURL?: string | undefined;
1899
+ disableRedirect?: boolean | undefined;
1900
+ additionalData?: Record<string, any> | undefined;
1901
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1902
+ provider: unknown;
1903
+ callbackURL?: string | undefined;
1904
+ idToken?: {
1905
+ token: string;
1906
+ nonce?: string | undefined;
1907
+ accessToken?: string | undefined;
1908
+ refreshToken?: string | undefined;
1909
+ scopes?: string[] | undefined;
1910
+ } | undefined;
1911
+ requestSignUp?: boolean | undefined;
1912
+ scopes?: string[] | undefined;
1913
+ errorCallbackURL?: string | undefined;
1914
+ disableRedirect?: boolean | undefined;
1915
+ additionalData?: Record<string, any> | undefined;
1916
+ } & {
1917
+ fetchOptions?: FetchOptions | undefined;
1918
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1919
+ url: string;
1920
+ redirect: boolean;
1921
+ }, {
1922
+ code?: string | undefined;
1923
+ message?: string | undefined;
1924
+ }, FetchOptions["throw"] extends true ? true : false>>;
1925
+ } & {
1926
+ listAccounts: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1927
+ query?: Record<string, any> | undefined;
1928
+ fetchOptions?: FetchOptions | undefined;
1929
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1930
+ scopes: string[];
1931
+ id: string;
1932
+ createdAt: Date;
1933
+ updatedAt: Date;
1934
+ userId: string;
1935
+ providerId: string;
1936
+ accountId: string;
1937
+ }[], {
1938
+ code?: string | undefined;
1939
+ message?: string | undefined;
1940
+ }, FetchOptions["throw"] extends true ? true : false>>;
1941
+ } & {
1942
+ deleteUser: {
1943
+ callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1944
+ token: string;
1945
+ callbackURL?: string | undefined;
1946
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1947
+ query: {
1948
+ token: string;
1949
+ callbackURL?: string | undefined;
1950
+ };
1951
+ fetchOptions?: FetchOptions | undefined;
1952
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1953
+ success: boolean;
1954
+ message: string;
1955
+ }, {
1956
+ code?: string | undefined;
1957
+ message?: string | undefined;
1958
+ }, FetchOptions["throw"] extends true ? true : false>>;
1959
+ };
1960
+ } & {
1961
+ unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1962
+ providerId: string;
1963
+ accountId?: string | undefined;
1964
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1965
+ providerId: string;
1966
+ accountId?: string | undefined;
1967
+ } & {
1968
+ fetchOptions?: FetchOptions | undefined;
1969
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1970
+ status: boolean;
1971
+ }, {
1972
+ code?: string | undefined;
1973
+ message?: string | undefined;
1974
+ }, FetchOptions["throw"] extends true ? true : false>>;
1975
+ } & {
1976
+ refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1977
+ providerId: string;
1978
+ accountId?: string | undefined;
1979
+ userId?: string | undefined;
1980
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1981
+ providerId: string;
1982
+ accountId?: string | undefined;
1983
+ userId?: string | undefined;
1984
+ } & {
1985
+ fetchOptions?: FetchOptions | undefined;
1986
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1987
+ accessToken: string | undefined;
1988
+ refreshToken: string;
1989
+ accessTokenExpiresAt: Date | undefined;
1990
+ refreshTokenExpiresAt: Date | null | undefined;
1991
+ scope: string | null | undefined;
1992
+ idToken: string | null | undefined;
1993
+ providerId: string;
1994
+ accountId: string;
1995
+ }, {
1996
+ code?: string | undefined;
1997
+ message?: string | undefined;
1998
+ }, FetchOptions["throw"] extends true ? true : false>>;
1999
+ } & {
2000
+ getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
2001
+ providerId: string;
2002
+ accountId?: string | undefined;
2003
+ userId?: string | undefined;
2004
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
2005
+ providerId: string;
2006
+ accountId?: string | undefined;
2007
+ userId?: string | undefined;
2008
+ } & {
2009
+ fetchOptions?: FetchOptions | undefined;
2010
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
2011
+ accessToken: string;
2012
+ accessTokenExpiresAt: Date | undefined;
2013
+ scopes: string[];
2014
+ idToken: string | undefined;
2015
+ }, {
2016
+ code?: string | undefined;
2017
+ message?: string | undefined;
2018
+ }, FetchOptions["throw"] extends true ? true : false>>;
2019
+ } & {
2020
+ accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
2021
+ accountId?: string | undefined;
2022
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2023
+ query?: {
2024
+ accountId?: string | undefined;
2025
+ } | undefined;
2026
+ fetchOptions?: FetchOptions | undefined;
2027
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
2028
+ user: import("better-auth").OAuth2UserInfo;
2029
+ data: Record<string, any>;
2030
+ }, {
2031
+ code?: string | undefined;
2032
+ message?: string | undefined;
2033
+ }, FetchOptions["throw"] extends true ? true : false>>;
2034
+ } & {
2035
+ getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
2036
+ disableCookieCache?: unknown;
2037
+ disableRefresh?: unknown;
2038
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
2039
+ query?: {
2040
+ disableCookieCache?: unknown;
2041
+ disableRefresh?: unknown;
2042
+ } | undefined;
2043
+ fetchOptions?: FetchOptions | undefined;
2044
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
2045
+ user: import("better-auth").StripEmptyObjects<{
2046
+ id: string;
2047
+ createdAt: Date;
2048
+ updatedAt: Date;
2049
+ email: string;
2050
+ emailVerified: boolean;
2051
+ name: string;
2052
+ image?: string | null | undefined;
2053
+ }>;
2054
+ session: import("better-auth").StripEmptyObjects<{
2055
+ id: string;
2056
+ createdAt: Date;
2057
+ updatedAt: Date;
2058
+ userId: string;
2059
+ expiresAt: Date;
2060
+ token: string;
2061
+ ipAddress?: string | null | undefined;
2062
+ userAgent?: string | null | undefined;
2063
+ } & {} & {
2064
+ activeOrganizationId?: string | null | undefined;
2065
+ }>;
2066
+ } | null, {
2067
+ code?: string | undefined;
2068
+ message?: string | undefined;
2069
+ }, FetchOptions["throw"] extends true ? true : false>>;
2070
+ } & {
2071
+ $Infer: {
2072
+ ActiveOrganization: {
2073
+ members: {
2074
+ id: string;
2075
+ organizationId: string;
2076
+ role: "member" | "admin" | "owner";
2077
+ createdAt: Date;
2078
+ userId: string;
2079
+ user: {
2080
+ id: string;
2081
+ email: string;
2082
+ name: string;
2083
+ image?: string | undefined;
2084
+ };
2085
+ }[];
2086
+ invitations: {
2087
+ id: string;
2088
+ organizationId: string;
2089
+ email: string;
2090
+ role: "member" | "admin" | "owner";
2091
+ status: import("better-auth/client").InvitationStatus;
2092
+ inviterId: string;
2093
+ expiresAt: Date;
2094
+ createdAt: Date;
2095
+ }[];
2096
+ } & {
2097
+ id: string;
2098
+ name: string;
2099
+ slug: string;
2100
+ createdAt: Date;
2101
+ logo?: string | null | undefined | undefined;
2102
+ metadata?: any;
2103
+ };
2104
+ Organization: {
2105
+ id: string;
2106
+ name: string;
2107
+ slug: string;
2108
+ createdAt: Date;
2109
+ logo?: string | null | undefined;
2110
+ metadata?: any;
2111
+ };
2112
+ Invitation: {
2113
+ id: string;
2114
+ organizationId: string;
2115
+ email: string;
2116
+ role: "member" | "admin" | "owner";
2117
+ status: import("better-auth/client").InvitationStatus;
2118
+ inviterId: string;
2119
+ expiresAt: Date;
2120
+ createdAt: Date;
2121
+ };
2122
+ Member: {
2123
+ id: string;
2124
+ organizationId: string;
2125
+ role: "member" | "admin" | "owner";
2126
+ createdAt: Date;
2127
+ userId: string;
2128
+ user: {
2129
+ id: string;
2130
+ email: string;
2131
+ name: string;
2132
+ image?: string | undefined;
2133
+ };
2134
+ };
2135
+ Team: {
2136
+ id: string;
2137
+ name: string;
2138
+ organizationId: string;
2139
+ createdAt: Date;
2140
+ updatedAt?: Date | undefined;
2141
+ };
2142
+ };
2143
+ organization: {
2144
+ checkRolePermission: <R extends "member" | "admin" | "owner">(data: {
2145
+ permissions: {
2146
+ readonly organization?: ("update" | "delete")[] | undefined;
2147
+ readonly member?: ("create" | "update" | "delete")[] | undefined;
2148
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2149
+ readonly team?: ("create" | "update" | "delete")[] | undefined;
2150
+ readonly ac?: ("create" | "update" | "delete" | "read")[] | undefined;
2151
+ };
2152
+ } & {
2153
+ role: R;
2154
+ }) => boolean;
2155
+ };
2156
+ } & {
2157
+ useSession: import("nanostores").Atom<{
2158
+ data: {
2159
+ user: import("better-auth").StripEmptyObjects<{
2160
+ id: string;
2161
+ createdAt: Date;
2162
+ updatedAt: Date;
2163
+ email: string;
2164
+ emailVerified: boolean;
2165
+ name: string;
2166
+ image?: string | null | undefined;
2167
+ }>;
2168
+ session: import("better-auth").StripEmptyObjects<{
2169
+ id: string;
2170
+ createdAt: Date;
2171
+ updatedAt: Date;
2172
+ userId: string;
2173
+ expiresAt: Date;
2174
+ token: string;
2175
+ ipAddress?: string | null | undefined;
2176
+ userAgent?: string | null | undefined;
2177
+ } & {} & {
2178
+ activeOrganizationId?: string | null | undefined;
2179
+ }>;
2180
+ } | null;
2181
+ error: import("@better-fetch/fetch").BetterFetchError | null;
2182
+ isPending: boolean;
2183
+ isRefetching: boolean;
2184
+ refetch: (queryParams?: {
2185
+ query?: import("better-auth").SessionQueryParams;
2186
+ } | undefined) => Promise<void>;
2187
+ }>;
2188
+ $fetch: import("@better-fetch/fetch").BetterFetch<{
2189
+ plugins: (import("@better-fetch/fetch").BetterFetchPlugin<Record<string, any>> | {
2190
+ id: string;
2191
+ name: string;
2192
+ hooks: {
2193
+ onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
2194
+ };
2195
+ } | {
2196
+ id: string;
2197
+ name: string;
2198
+ hooks: {
2199
+ onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
2200
+ onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
2201
+ onRequest: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
2202
+ onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
2203
+ };
2204
+ })[];
2205
+ priority?: RequestPriority | undefined;
2206
+ cache?: RequestCache | undefined;
2207
+ credentials?: RequestCredentials;
2208
+ headers?: (HeadersInit & (HeadersInit | {
2209
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2210
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2211
+ authorization: "Bearer" | "Basic";
2212
+ })) | undefined;
2213
+ integrity?: string | undefined;
2214
+ keepalive?: boolean | undefined;
2215
+ method: string;
2216
+ mode?: RequestMode | undefined;
2217
+ redirect?: RequestRedirect | undefined;
2218
+ referrer?: string | undefined;
2219
+ referrerPolicy?: ReferrerPolicy | undefined;
2220
+ signal?: (AbortSignal | null) | undefined;
2221
+ window?: null | undefined;
2222
+ onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
2223
+ hookOptions?: {
2224
+ cloneResponse?: boolean;
2225
+ } | undefined;
2226
+ timeout?: number | undefined;
2227
+ customFetchImpl: import("@better-fetch/fetch").FetchEsque;
2228
+ baseURL: string;
2229
+ throw?: boolean | undefined;
2230
+ auth?: ({
2231
+ type: "Bearer";
2232
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2233
+ } | {
2234
+ type: "Basic";
2235
+ username: string | (() => string | undefined) | undefined;
2236
+ password: string | (() => string | undefined) | undefined;
2237
+ } | {
2238
+ type: "Custom";
2239
+ prefix: string | (() => string | undefined) | undefined;
2240
+ value: string | (() => string | undefined) | undefined;
2241
+ }) | undefined;
2242
+ body?: any;
2243
+ query?: any;
2244
+ params?: any;
2245
+ duplex?: "full" | "half" | undefined;
2246
+ jsonParser: (text: string) => Promise<any> | any;
2247
+ retry?: import("@better-fetch/fetch").RetryOptions | undefined;
2248
+ retryAttempt?: number | undefined;
2249
+ output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2250
+ errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
2251
+ disableValidation?: boolean | undefined;
2252
+ disableSignal?: boolean | undefined;
2253
+ }, unknown, unknown, {}>;
2254
+ $store: {
2255
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
2256
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2257
+ atoms: Record<string, import("nanostores").WritableAtom<any>>;
2258
+ };
2259
+ $Infer: {
2260
+ Session: {
2261
+ user: import("better-auth").StripEmptyObjects<{
2262
+ id: string;
2263
+ createdAt: Date;
2264
+ updatedAt: Date;
2265
+ email: string;
2266
+ emailVerified: boolean;
2267
+ name: string;
2268
+ image?: string | null | undefined;
2269
+ }>;
2270
+ session: import("better-auth").StripEmptyObjects<{
2271
+ id: string;
2272
+ createdAt: Date;
2273
+ updatedAt: Date;
2274
+ userId: string;
2275
+ expiresAt: Date;
2276
+ token: string;
2277
+ ipAddress?: string | null | undefined;
2278
+ userAgent?: string | null | undefined;
2279
+ } & {} & {
2280
+ activeOrganizationId?: string | null | undefined;
2281
+ }>;
2282
+ };
2283
+ };
2284
+ $ERROR_CODES: {
2285
+ USER_NOT_FOUND: {
2286
+ readonly code: "USER_NOT_FOUND";
2287
+ message: string;
2288
+ };
2289
+ FAILED_TO_CREATE_SESSION: {
2290
+ readonly code: "FAILED_TO_CREATE_SESSION";
2291
+ message: string;
2292
+ };
2293
+ INVALID_DEVICE_CODE: {
2294
+ readonly code: "INVALID_DEVICE_CODE";
2295
+ message: string;
2296
+ };
2297
+ EXPIRED_DEVICE_CODE: {
2298
+ readonly code: "EXPIRED_DEVICE_CODE";
2299
+ message: string;
2300
+ };
2301
+ EXPIRED_USER_CODE: {
2302
+ readonly code: "EXPIRED_USER_CODE";
2303
+ message: string;
2304
+ };
2305
+ AUTHORIZATION_PENDING: {
2306
+ readonly code: "AUTHORIZATION_PENDING";
2307
+ message: string;
2308
+ };
2309
+ ACCESS_DENIED: {
2310
+ readonly code: "ACCESS_DENIED";
2311
+ message: string;
2312
+ };
2313
+ INVALID_USER_CODE: {
2314
+ readonly code: "INVALID_USER_CODE";
2315
+ message: string;
2316
+ };
2317
+ DEVICE_CODE_ALREADY_PROCESSED: {
2318
+ readonly code: "DEVICE_CODE_ALREADY_PROCESSED";
2319
+ message: string;
2320
+ };
2321
+ POLLING_TOO_FREQUENTLY: {
2322
+ readonly code: "POLLING_TOO_FREQUENTLY";
2323
+ message: string;
2324
+ };
2325
+ INVALID_DEVICE_CODE_STATUS: {
2326
+ readonly code: "INVALID_DEVICE_CODE_STATUS";
2327
+ message: string;
2328
+ };
2329
+ AUTHENTICATION_REQUIRED: {
2330
+ readonly code: "AUTHENTICATION_REQUIRED";
2331
+ message: string;
2332
+ };
2333
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: {
2334
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION";
2335
+ message: string;
2336
+ };
2337
+ YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: {
2338
+ readonly code: "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS";
2339
+ message: string;
2340
+ };
2341
+ ORGANIZATION_ALREADY_EXISTS: {
2342
+ readonly code: "ORGANIZATION_ALREADY_EXISTS";
2343
+ message: string;
2344
+ };
2345
+ ORGANIZATION_SLUG_ALREADY_TAKEN: {
2346
+ readonly code: "ORGANIZATION_SLUG_ALREADY_TAKEN";
2347
+ message: string;
2348
+ };
2349
+ ORGANIZATION_NOT_FOUND: {
2350
+ readonly code: "ORGANIZATION_NOT_FOUND";
2351
+ message: string;
2352
+ };
2353
+ USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: {
2354
+ readonly code: "USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION";
2355
+ message: string;
2356
+ };
2357
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: {
2358
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION";
2359
+ message: string;
2360
+ };
2361
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: {
2362
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION";
2363
+ message: string;
2364
+ };
2365
+ NO_ACTIVE_ORGANIZATION: {
2366
+ readonly code: "NO_ACTIVE_ORGANIZATION";
2367
+ message: string;
2368
+ };
2369
+ USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: {
2370
+ readonly code: "USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION";
2371
+ message: string;
2372
+ };
2373
+ MEMBER_NOT_FOUND: {
2374
+ readonly code: "MEMBER_NOT_FOUND";
2375
+ message: string;
2376
+ };
2377
+ ROLE_NOT_FOUND: {
2378
+ readonly code: "ROLE_NOT_FOUND";
2379
+ message: string;
2380
+ };
2381
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: {
2382
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM";
2383
+ message: string;
2384
+ };
2385
+ TEAM_ALREADY_EXISTS: {
2386
+ readonly code: "TEAM_ALREADY_EXISTS";
2387
+ message: string;
2388
+ };
2389
+ TEAM_NOT_FOUND: {
2390
+ readonly code: "TEAM_NOT_FOUND";
2391
+ message: string;
2392
+ };
2393
+ YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: {
2394
+ readonly code: "YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER";
2395
+ message: string;
2396
+ };
2397
+ YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: {
2398
+ readonly code: "YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER";
2399
+ message: string;
2400
+ };
2401
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: {
2402
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER";
2403
+ message: string;
2404
+ };
2405
+ YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: {
2406
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION";
2407
+ message: string;
2408
+ };
2409
+ USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: {
2410
+ readonly code: "USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION";
2411
+ message: string;
2412
+ };
2413
+ INVITATION_NOT_FOUND: {
2414
+ readonly code: "INVITATION_NOT_FOUND";
2415
+ message: string;
2416
+ };
2417
+ YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: {
2418
+ readonly code: "YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION";
2419
+ message: string;
2420
+ };
2421
+ EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: {
2422
+ readonly code: "EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION";
2423
+ message: string;
2424
+ };
2425
+ YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: {
2426
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION";
2427
+ message: string;
2428
+ };
2429
+ INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: {
2430
+ readonly code: "INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION";
2431
+ message: string;
2432
+ };
2433
+ YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: {
2434
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE";
2435
+ message: string;
2436
+ };
2437
+ FAILED_TO_RETRIEVE_INVITATION: {
2438
+ readonly code: "FAILED_TO_RETRIEVE_INVITATION";
2439
+ message: string;
2440
+ };
2441
+ YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: {
2442
+ readonly code: "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS";
2443
+ message: string;
2444
+ };
2445
+ UNABLE_TO_REMOVE_LAST_TEAM: {
2446
+ readonly code: "UNABLE_TO_REMOVE_LAST_TEAM";
2447
+ message: string;
2448
+ };
2449
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: {
2450
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER";
2451
+ message: string;
2452
+ };
2453
+ ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: {
2454
+ readonly code: "ORGANIZATION_MEMBERSHIP_LIMIT_REACHED";
2455
+ message: string;
2456
+ };
2457
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: {
2458
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION";
2459
+ message: string;
2460
+ };
2461
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: {
2462
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION";
2463
+ message: string;
2464
+ };
2465
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: {
2466
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM";
2467
+ message: string;
2468
+ };
2469
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: {
2470
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM";
2471
+ message: string;
2472
+ };
2473
+ INVITATION_LIMIT_REACHED: {
2474
+ readonly code: "INVITATION_LIMIT_REACHED";
2475
+ message: string;
2476
+ };
2477
+ TEAM_MEMBER_LIMIT_REACHED: {
2478
+ readonly code: "TEAM_MEMBER_LIMIT_REACHED";
2479
+ message: string;
2480
+ };
2481
+ USER_IS_NOT_A_MEMBER_OF_THE_TEAM: {
2482
+ readonly code: "USER_IS_NOT_A_MEMBER_OF_THE_TEAM";
2483
+ message: string;
2484
+ };
2485
+ YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: {
2486
+ readonly code: "YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM";
2487
+ message: string;
2488
+ };
2489
+ YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: {
2490
+ readonly code: "YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM";
2491
+ message: string;
2492
+ };
2493
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: {
2494
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER";
2495
+ message: string;
2496
+ };
2497
+ YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: {
2498
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER";
2499
+ message: string;
2500
+ };
2501
+ YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: {
2502
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION";
2503
+ message: string;
2504
+ };
2505
+ YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: {
2506
+ readonly code: "YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION";
2507
+ message: string;
2508
+ };
2509
+ MISSING_AC_INSTANCE: {
2510
+ readonly code: "MISSING_AC_INSTANCE";
2511
+ message: string;
2512
+ };
2513
+ YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: {
2514
+ readonly code: "YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE";
2515
+ message: string;
2516
+ };
2517
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: {
2518
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE";
2519
+ message: string;
2520
+ };
2521
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: {
2522
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE";
2523
+ message: string;
2524
+ };
2525
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: {
2526
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE";
2527
+ message: string;
2528
+ };
2529
+ YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: {
2530
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE";
2531
+ message: string;
2532
+ };
2533
+ YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: {
2534
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE";
2535
+ message: string;
2536
+ };
2537
+ YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: {
2538
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE";
2539
+ message: string;
2540
+ };
2541
+ TOO_MANY_ROLES: {
2542
+ readonly code: "TOO_MANY_ROLES";
2543
+ message: string;
2544
+ };
2545
+ INVALID_RESOURCE: {
2546
+ readonly code: "INVALID_RESOURCE";
2547
+ message: string;
2548
+ };
2549
+ ROLE_NAME_IS_ALREADY_TAKEN: {
2550
+ readonly code: "ROLE_NAME_IS_ALREADY_TAKEN";
2551
+ message: string;
2552
+ };
2553
+ CANNOT_DELETE_A_PRE_DEFINED_ROLE: {
2554
+ readonly code: "CANNOT_DELETE_A_PRE_DEFINED_ROLE";
2555
+ message: string;
2556
+ };
2557
+ ROLE_IS_ASSIGNED_TO_MEMBERS: {
2558
+ readonly code: "ROLE_IS_ASSIGNED_TO_MEMBERS";
2559
+ message: string;
2560
+ };
2561
+ FAILED_TO_CREATE_USER: {
2562
+ readonly code: "FAILED_TO_CREATE_USER";
2563
+ message: string;
2564
+ };
2565
+ FAILED_TO_UPDATE_USER: {
2566
+ readonly code: "FAILED_TO_UPDATE_USER";
2567
+ message: string;
2568
+ };
2569
+ FAILED_TO_GET_SESSION: {
2570
+ readonly code: "FAILED_TO_GET_SESSION";
2571
+ message: string;
2572
+ };
2573
+ INVALID_PASSWORD: {
2574
+ readonly code: "INVALID_PASSWORD";
2575
+ message: string;
2576
+ };
2577
+ INVALID_EMAIL: {
2578
+ readonly code: "INVALID_EMAIL";
2579
+ message: string;
2580
+ };
2581
+ INVALID_EMAIL_OR_PASSWORD: {
2582
+ readonly code: "INVALID_EMAIL_OR_PASSWORD";
2583
+ message: string;
2584
+ };
2585
+ INVALID_USER: {
2586
+ readonly code: "INVALID_USER";
2587
+ message: string;
2588
+ };
2589
+ SOCIAL_ACCOUNT_ALREADY_LINKED: {
2590
+ readonly code: "SOCIAL_ACCOUNT_ALREADY_LINKED";
2591
+ message: string;
2592
+ };
2593
+ PROVIDER_NOT_FOUND: {
2594
+ readonly code: "PROVIDER_NOT_FOUND";
2595
+ message: string;
2596
+ };
2597
+ INVALID_TOKEN: {
2598
+ readonly code: "INVALID_TOKEN";
2599
+ message: string;
2600
+ };
2601
+ TOKEN_EXPIRED: {
2602
+ readonly code: "TOKEN_EXPIRED";
2603
+ message: string;
2604
+ };
2605
+ ID_TOKEN_NOT_SUPPORTED: {
2606
+ readonly code: "ID_TOKEN_NOT_SUPPORTED";
2607
+ message: string;
2608
+ };
2609
+ FAILED_TO_GET_USER_INFO: {
2610
+ readonly code: "FAILED_TO_GET_USER_INFO";
2611
+ message: string;
2612
+ };
2613
+ USER_EMAIL_NOT_FOUND: {
2614
+ readonly code: "USER_EMAIL_NOT_FOUND";
2615
+ message: string;
2616
+ };
2617
+ EMAIL_NOT_VERIFIED: {
2618
+ readonly code: "EMAIL_NOT_VERIFIED";
2619
+ message: string;
2620
+ };
2621
+ PASSWORD_TOO_SHORT: {
2622
+ readonly code: "PASSWORD_TOO_SHORT";
2623
+ message: string;
2624
+ };
2625
+ PASSWORD_TOO_LONG: {
2626
+ readonly code: "PASSWORD_TOO_LONG";
2627
+ message: string;
2628
+ };
2629
+ USER_ALREADY_EXISTS: {
2630
+ readonly code: "USER_ALREADY_EXISTS";
2631
+ message: string;
2632
+ };
2633
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: {
2634
+ readonly code: "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL";
2635
+ message: string;
2636
+ };
2637
+ EMAIL_CAN_NOT_BE_UPDATED: {
2638
+ readonly code: "EMAIL_CAN_NOT_BE_UPDATED";
2639
+ message: string;
2640
+ };
2641
+ CREDENTIAL_ACCOUNT_NOT_FOUND: {
2642
+ readonly code: "CREDENTIAL_ACCOUNT_NOT_FOUND";
2643
+ message: string;
2644
+ };
2645
+ ACCOUNT_NOT_FOUND: {
2646
+ readonly code: "ACCOUNT_NOT_FOUND";
2647
+ message: string;
2648
+ };
2649
+ SESSION_EXPIRED: {
2650
+ readonly code: "SESSION_EXPIRED";
2651
+ message: string;
2652
+ };
2653
+ FAILED_TO_UNLINK_LAST_ACCOUNT: {
2654
+ readonly code: "FAILED_TO_UNLINK_LAST_ACCOUNT";
2655
+ message: string;
2656
+ };
2657
+ USER_ALREADY_HAS_PASSWORD: {
2658
+ readonly code: "USER_ALREADY_HAS_PASSWORD";
2659
+ message: string;
2660
+ };
2661
+ CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: {
2662
+ readonly code: "CROSS_SITE_NAVIGATION_LOGIN_BLOCKED";
2663
+ message: string;
2664
+ };
2665
+ VERIFICATION_EMAIL_NOT_ENABLED: {
2666
+ readonly code: "VERIFICATION_EMAIL_NOT_ENABLED";
2667
+ message: string;
2668
+ };
2669
+ EMAIL_ALREADY_VERIFIED: {
2670
+ readonly code: "EMAIL_ALREADY_VERIFIED";
2671
+ message: string;
2672
+ };
2673
+ EMAIL_MISMATCH: {
2674
+ readonly code: "EMAIL_MISMATCH";
2675
+ message: string;
2676
+ };
2677
+ SESSION_NOT_FRESH: {
2678
+ readonly code: "SESSION_NOT_FRESH";
2679
+ message: string;
2680
+ };
2681
+ LINKED_ACCOUNT_ALREADY_EXISTS: {
2682
+ readonly code: "LINKED_ACCOUNT_ALREADY_EXISTS";
2683
+ message: string;
2684
+ };
2685
+ INVALID_ORIGIN: {
2686
+ readonly code: "INVALID_ORIGIN";
2687
+ message: string;
2688
+ };
2689
+ INVALID_CALLBACK_URL: {
2690
+ readonly code: "INVALID_CALLBACK_URL";
2691
+ message: string;
2692
+ };
2693
+ INVALID_REDIRECT_URL: {
2694
+ readonly code: "INVALID_REDIRECT_URL";
2695
+ message: string;
2696
+ };
2697
+ INVALID_ERROR_CALLBACK_URL: {
2698
+ readonly code: "INVALID_ERROR_CALLBACK_URL";
2699
+ message: string;
2700
+ };
2701
+ INVALID_NEW_USER_CALLBACK_URL: {
2702
+ readonly code: "INVALID_NEW_USER_CALLBACK_URL";
2703
+ message: string;
2704
+ };
2705
+ MISSING_OR_NULL_ORIGIN: {
2706
+ readonly code: "MISSING_OR_NULL_ORIGIN";
2707
+ message: string;
2708
+ };
2709
+ CALLBACK_URL_REQUIRED: {
2710
+ readonly code: "CALLBACK_URL_REQUIRED";
2711
+ message: string;
2712
+ };
2713
+ FAILED_TO_CREATE_VERIFICATION: {
2714
+ readonly code: "FAILED_TO_CREATE_VERIFICATION";
2715
+ message: string;
2716
+ };
2717
+ FIELD_NOT_ALLOWED: {
2718
+ readonly code: "FIELD_NOT_ALLOWED";
2719
+ message: string;
2720
+ };
2721
+ ASYNC_VALIDATION_NOT_SUPPORTED: {
2722
+ readonly code: "ASYNC_VALIDATION_NOT_SUPPORTED";
2723
+ message: string;
2724
+ };
2725
+ VALIDATION_ERROR: {
2726
+ readonly code: "VALIDATION_ERROR";
2727
+ message: string;
2728
+ };
2729
+ MISSING_FIELD: {
2730
+ readonly code: "MISSING_FIELD";
2731
+ message: string;
2732
+ };
2733
+ METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: {
2734
+ readonly code: "METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED";
2735
+ message: string;
2736
+ };
2737
+ BODY_MUST_BE_AN_OBJECT: {
2738
+ readonly code: "BODY_MUST_BE_AN_OBJECT";
2739
+ message: string;
2740
+ };
2741
+ PASSWORD_ALREADY_SET: {
2742
+ readonly code: "PASSWORD_ALREADY_SET";
2743
+ message: string;
2744
+ };
2745
+ };
2746
+ };
2747
+ export type AuthClient = typeof authClient;
2748
+ //# sourceMappingURL=client.d.ts.map