camox 0.3.0 → 0.4.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 (76) hide show
  1. package/dist/components/AuthGate.js +2 -1
  2. package/dist/core/components/AddBlockControlBar.js +117 -44
  3. package/dist/core/components/lexical/InlineContentEditable.js +37 -17
  4. package/dist/core/components/lexical/InlineLexicalEditor.js +84 -25
  5. package/dist/core/components/lexical/SelectionBroadcaster.js +84 -47
  6. package/dist/core/components/lexical/SidebarLexicalEditor.js +54 -19
  7. package/dist/core/createBlock.js +1172 -414
  8. package/dist/core/createLayout.js +48 -16
  9. package/dist/core/hooks/useFieldSelection.js +24 -13
  10. package/dist/core/hooks/useIsEditable.js +8 -2
  11. package/dist/core/hooks/useOverlayMessage.js +51 -20
  12. package/dist/features/content/CamoxContent.js +239 -107
  13. package/dist/features/content/components/AssetCard.js +78 -16
  14. package/dist/features/content/components/AssetCardSkeleton.js +11 -4
  15. package/dist/features/content/components/ContentSidebar.js +15 -8
  16. package/dist/features/content/components/UploadDropZone.js +77 -34
  17. package/dist/features/content/components/UploadProgressDrawer.js +201 -58
  18. package/dist/features/metadata/sitemap.js +15 -0
  19. package/dist/features/preview/CamoxPreview.js +447 -179
  20. package/dist/features/preview/components/AddBlockSheet.js +344 -167
  21. package/dist/features/preview/components/AgentChatSheet.js +32 -10
  22. package/dist/features/preview/components/AssetFieldEditor.js +185 -50
  23. package/dist/features/preview/components/AssetLightbox.js +60 -33
  24. package/dist/features/preview/components/AssetPickerGrid.js +203 -71
  25. package/dist/features/preview/components/BlockActionsPopover.js +295 -218
  26. package/dist/features/preview/components/CreatePageSheet.js +3 -3
  27. package/dist/features/preview/components/DebouncedFieldEditor.js +80 -23
  28. package/dist/features/preview/components/EditPageSheet.js +241 -86
  29. package/dist/features/preview/components/ItemFieldsEditor.js +209 -115
  30. package/dist/features/preview/components/LinkFieldEditor.js +351 -153
  31. package/dist/features/preview/components/MultipleAssetFieldEditor.js +245 -92
  32. package/dist/features/preview/components/OverlayTracker.js +58 -23
  33. package/dist/features/preview/components/Overlays.js +85 -43
  34. package/dist/features/preview/components/PageContentSheet.js +18 -18
  35. package/dist/features/preview/components/PageLocationFieldset.js +229 -63
  36. package/dist/features/preview/components/PagePicker.js +27 -27
  37. package/dist/features/preview/components/PageTree.js +921 -319
  38. package/dist/features/preview/components/PeekedBlock.js +173 -63
  39. package/dist/features/preview/components/PreviewPanel.js +271 -148
  40. package/dist/features/preview/components/PreviewSideSheet.js +44 -11
  41. package/dist/features/preview/components/PreviewToolbar.js +262 -59
  42. package/dist/features/preview/components/RepeatableItemsList.js +187 -78
  43. package/dist/features/preview/components/ShikiMarkdown.js +46 -20
  44. package/dist/features/preview/components/TextFormatToolbar.js +81 -23
  45. package/dist/features/preview/components/UnlinkAssetButton.js +161 -40
  46. package/dist/features/preview/components/useUpdateBlockPosition.js +64 -47
  47. package/dist/features/preview/previewStore.d.ts +2 -2
  48. package/dist/features/provider/CamoxProvider.js +69 -21
  49. package/dist/features/provider/actionsStore.d.ts +2 -2
  50. package/dist/features/provider/components/CamoxAppContext.js +15 -5
  51. package/dist/features/provider/components/CommandPalette.js +199 -92
  52. package/dist/features/provider/useAdminShortcuts.js +80 -64
  53. package/dist/features/routes/pageRoute.js +8 -1
  54. package/dist/features/studio/CamoxStudio.js +45 -9
  55. package/dist/features/studio/components/EnvironmentMenu.js +47 -12
  56. package/dist/features/studio/components/Navbar.js +163 -65
  57. package/dist/features/studio/components/ProjectMenu.d.ts.map +1 -1
  58. package/dist/features/studio/components/ProjectMenu.js +284 -83
  59. package/dist/features/studio/components/UserButton.js +21 -6
  60. package/dist/features/studio/studioStore.d.ts +2 -2
  61. package/dist/features/studio/useTheme.js +128 -74
  62. package/dist/features/vite/definitionsSync.d.ts +7 -12
  63. package/dist/features/vite/definitionsSync.d.ts.map +1 -1
  64. package/dist/features/vite/definitionsSync.js +5 -16
  65. package/dist/features/vite/vite.d.ts +0 -3
  66. package/dist/features/vite/vite.d.ts.map +1 -1
  67. package/dist/features/vite/vite.js +1 -2
  68. package/dist/hooks/use-file-upload.js +11 -11
  69. package/dist/hooks/use-marquee-selection.js +121 -74
  70. package/dist/lib/auth.js +95 -51
  71. package/dist/lib/normalized-data.js +103 -30
  72. package/dist/lib/use-project-room.js +55 -22
  73. package/dist/studio.css +2 -2
  74. package/package.json +29 -26
  75. package/dist/lib/auth.d.ts +0 -2130
  76. package/dist/lib/auth.d.ts.map +0 -1
@@ -1,2130 +0,0 @@
1
- import { ClientStore } from 'better-auth';
2
- import * as React from "react";
3
- /**
4
- * Read the cross-domain auth cookie from localStorage and return it as a
5
- * string suitable for the `Better-Auth-Cookie` request header.
6
- */
7
- export declare function getAuthCookieHeader(): string;
8
- export type CamoxAuthClient = ReturnType<typeof createCamoxAuthClient>;
9
- export declare function createCamoxAuthClient(apiUrl: string): {
10
- useActiveOrganization: () => {
11
- data: import('better-auth').Prettify<{
12
- id: string;
13
- name: string;
14
- slug: string;
15
- createdAt: Date;
16
- logo?: string | null | undefined | undefined;
17
- metadata?: any;
18
- } & {
19
- members: {
20
- id: string;
21
- organizationId: string;
22
- role: "member" | "admin" | "owner";
23
- createdAt: Date;
24
- userId: string;
25
- user: {
26
- id: string;
27
- email: string;
28
- name: string;
29
- image?: string | undefined;
30
- };
31
- }[];
32
- invitations: {
33
- id: string;
34
- organizationId: string;
35
- email: string;
36
- role: "member" | "admin" | "owner";
37
- status: import('better-auth/plugins').InvitationStatus;
38
- inviterId: string;
39
- expiresAt: Date;
40
- createdAt: Date;
41
- }[];
42
- }> | null;
43
- error: null | import('better-auth/client').BetterFetchError;
44
- isPending: boolean;
45
- isRefetching: boolean;
46
- refetch: (queryParams?: {
47
- query?: import('better-auth').SessionQueryParams;
48
- } | undefined) => Promise<void>;
49
- };
50
- useListOrganizations: () => {
51
- data: {
52
- id: string;
53
- name: string;
54
- slug: string;
55
- createdAt: Date;
56
- logo?: string | null | undefined | undefined;
57
- metadata?: any;
58
- }[] | null;
59
- error: null | import('better-auth/client').BetterFetchError;
60
- isPending: boolean;
61
- isRefetching: boolean;
62
- refetch: (queryParams?: {
63
- query?: import('better-auth').SessionQueryParams;
64
- } | undefined) => Promise<void>;
65
- };
66
- useActiveMember: () => {
67
- data: {
68
- id: string;
69
- organizationId: string;
70
- userId: string;
71
- role: string;
72
- createdAt: Date;
73
- } | null;
74
- error: null | import('better-auth/client').BetterFetchError;
75
- isPending: boolean;
76
- isRefetching: boolean;
77
- refetch: (queryParams?: {
78
- query?: import('better-auth').SessionQueryParams;
79
- } | undefined) => Promise<void>;
80
- };
81
- useActiveMemberRole: () => {
82
- data: {
83
- role: string;
84
- } | null;
85
- error: null | import('better-auth/client').BetterFetchError;
86
- isPending: boolean;
87
- isRefetching: boolean;
88
- refetch: (queryParams?: {
89
- query?: import('better-auth').SessionQueryParams;
90
- } | undefined) => Promise<void>;
91
- };
92
- } & {
93
- organization: {
94
- create: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
95
- name: string;
96
- slug: string;
97
- userId?: string | undefined;
98
- logo?: string | undefined;
99
- metadata?: Record<string, any> | undefined;
100
- keepCurrentActiveOrganization?: boolean | undefined;
101
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
102
- name: string;
103
- slug: string;
104
- userId?: string | undefined;
105
- logo?: string | undefined;
106
- metadata?: Record<string, any> | undefined;
107
- keepCurrentActiveOrganization?: boolean | undefined;
108
- } & {
109
- fetchOptions?: FetchOptions | undefined;
110
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<NonNullable<{
111
- id: string;
112
- name: string;
113
- slug: string;
114
- createdAt: Date;
115
- logo?: string | null | undefined | undefined;
116
- metadata?: any;
117
- } & {
118
- metadata: any;
119
- members: ({
120
- id: string;
121
- organizationId: string;
122
- userId: string;
123
- role: string;
124
- createdAt: Date;
125
- } | undefined)[];
126
- }>, {
127
- code?: string | undefined;
128
- message?: string | undefined;
129
- }, FetchOptions["throw"] extends true ? true : false>>;
130
- };
131
- } & {
132
- organization: {
133
- update: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
134
- data: {
135
- name?: string | undefined;
136
- slug?: string | undefined;
137
- logo?: string | undefined;
138
- metadata?: Record<string, any> | undefined;
139
- } & Partial<{}>;
140
- organizationId?: string | undefined;
141
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
142
- data: {
143
- name?: string | undefined;
144
- slug?: string | undefined;
145
- logo?: string | undefined;
146
- metadata?: Record<string, any> | undefined;
147
- } & Partial<{}>;
148
- organizationId?: string | undefined;
149
- } & {
150
- fetchOptions?: FetchOptions | undefined;
151
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
152
- id: string;
153
- name: string;
154
- slug: string;
155
- createdAt: Date;
156
- logo?: string | null | undefined | undefined;
157
- metadata?: any;
158
- }, {
159
- code?: string | undefined;
160
- message?: string | undefined;
161
- }, FetchOptions["throw"] extends true ? true : false>>;
162
- };
163
- } & {
164
- organization: {
165
- delete: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
166
- organizationId: string;
167
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
168
- organizationId: string;
169
- } & {
170
- fetchOptions?: FetchOptions | undefined;
171
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
172
- id: string;
173
- name: string;
174
- slug: string;
175
- createdAt: Date;
176
- logo?: string | null | undefined | undefined;
177
- metadata?: any;
178
- }, {
179
- code?: string | undefined;
180
- message?: string | undefined;
181
- }, FetchOptions["throw"] extends true ? true : false>>;
182
- };
183
- } & {
184
- organization: {
185
- setActive: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
186
- organizationId?: string | null | undefined;
187
- organizationSlug?: string | undefined;
188
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
189
- organizationId?: string | null | undefined;
190
- organizationSlug?: string | undefined;
191
- } & {
192
- fetchOptions?: FetchOptions | undefined;
193
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
194
- members: {
195
- id: string;
196
- organizationId: string;
197
- role: "member" | "admin" | "owner";
198
- createdAt: Date;
199
- userId: string;
200
- user: {
201
- id: string;
202
- email: string;
203
- name: string;
204
- image?: string | undefined;
205
- };
206
- }[];
207
- invitations: {
208
- id: string;
209
- organizationId: string;
210
- email: string;
211
- role: "member" | "admin" | "owner";
212
- status: import('better-auth/plugins').InvitationStatus;
213
- inviterId: string;
214
- expiresAt: Date;
215
- createdAt: Date;
216
- }[];
217
- } & {
218
- id: string;
219
- name: string;
220
- slug: string;
221
- createdAt: Date;
222
- logo?: string | null | undefined | undefined;
223
- metadata?: any;
224
- }, {
225
- code?: string | undefined;
226
- message?: string | undefined;
227
- }, FetchOptions["throw"] extends true ? true : false>>;
228
- };
229
- } & {
230
- organization: {
231
- getFullOrganization: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
232
- organizationId?: string | undefined;
233
- organizationSlug?: string | undefined;
234
- membersLimit?: string | number | undefined;
235
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
236
- query?: {
237
- organizationId?: string | undefined;
238
- organizationSlug?: string | undefined;
239
- membersLimit?: string | number | undefined;
240
- } | undefined;
241
- fetchOptions?: FetchOptions | undefined;
242
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').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/plugins').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
- 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<{
281
- query?: Record<string, any> | undefined;
282
- fetchOptions?: FetchOptions | undefined;
283
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
284
- id: string;
285
- name: string;
286
- slug: string;
287
- createdAt: Date;
288
- logo?: string | null | undefined | undefined;
289
- metadata?: any;
290
- }[], {
291
- code?: string | undefined;
292
- message?: string | undefined;
293
- }, FetchOptions["throw"] extends true ? true : false>>;
294
- };
295
- } & {
296
- organization: {
297
- inviteMember: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
298
- email: string;
299
- role: "member" | "admin" | "owner" | ("member" | "admin" | "owner")[];
300
- organizationId?: string | undefined;
301
- resend?: boolean | undefined;
302
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
303
- email: string;
304
- role: "member" | "admin" | "owner" | ("member" | "admin" | "owner")[];
305
- organizationId?: string | undefined;
306
- resend?: boolean | undefined;
307
- } & {
308
- fetchOptions?: FetchOptions | undefined;
309
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<NonNullable<{
310
- id: string;
311
- organizationId: string;
312
- email: string;
313
- role: "member" | "admin" | "owner";
314
- status: import('better-auth/plugins').InvitationStatus;
315
- inviterId: string;
316
- expiresAt: Date;
317
- createdAt: Date;
318
- } | {
319
- id: string;
320
- organizationId: string;
321
- email: string;
322
- role: "member" | "admin" | "owner";
323
- status: import('better-auth/plugins').InvitationStatus;
324
- inviterId: string;
325
- expiresAt: Date;
326
- createdAt: Date;
327
- }>, {
328
- code?: string | undefined;
329
- message?: string | undefined;
330
- }, FetchOptions["throw"] extends true ? true : false>>;
331
- };
332
- } & {
333
- organization: {
334
- cancelInvitation: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
335
- invitationId: string;
336
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
337
- invitationId: string;
338
- } & {
339
- fetchOptions?: FetchOptions | undefined;
340
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
341
- id: string;
342
- organizationId: string;
343
- email: string;
344
- role: "member" | "admin" | "owner";
345
- status: import('better-auth/plugins').InvitationStatus;
346
- inviterId: string;
347
- expiresAt: Date;
348
- createdAt: Date;
349
- }, {
350
- code?: string | undefined;
351
- message?: string | undefined;
352
- }, FetchOptions["throw"] extends true ? true : false>>;
353
- };
354
- } & {
355
- organization: {
356
- acceptInvitation: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
357
- invitationId: string;
358
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
359
- invitationId: string;
360
- } & {
361
- fetchOptions?: FetchOptions | undefined;
362
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
363
- invitation: {
364
- id: string;
365
- organizationId: string;
366
- email: string;
367
- role: "member" | "admin" | "owner";
368
- status: import('better-auth/plugins').InvitationStatus;
369
- inviterId: string;
370
- expiresAt: Date;
371
- createdAt: Date;
372
- };
373
- member: {
374
- id: string;
375
- organizationId: string;
376
- userId: string;
377
- role: string;
378
- createdAt: Date;
379
- };
380
- }, {
381
- code?: string | undefined;
382
- message?: string | undefined;
383
- }, FetchOptions["throw"] extends true ? true : false>>;
384
- };
385
- } & {
386
- organization: {
387
- getInvitation: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
388
- id: string;
389
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
390
- query: {
391
- id: string;
392
- };
393
- fetchOptions?: FetchOptions | undefined;
394
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<NonNullable<{
395
- id: string;
396
- organizationId: string;
397
- email: string;
398
- role: "member" | "admin" | "owner";
399
- status: import('better-auth/plugins').InvitationStatus;
400
- inviterId: string;
401
- expiresAt: Date;
402
- createdAt: Date;
403
- } & {
404
- organizationName: string;
405
- organizationSlug: string;
406
- inviterEmail: string;
407
- }>, {
408
- code?: string | undefined;
409
- message?: string | undefined;
410
- }, FetchOptions["throw"] extends true ? true : false>>;
411
- };
412
- } & {
413
- organization: {
414
- rejectInvitation: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
415
- invitationId: string;
416
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
417
- invitationId: string;
418
- } & {
419
- fetchOptions?: FetchOptions | undefined;
420
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
421
- invitation: {
422
- id: string;
423
- organizationId: string;
424
- email: string;
425
- role: "admin" | "member" | "owner";
426
- status: import('better-auth/plugins').InvitationStatus;
427
- inviterId: string;
428
- expiresAt: Date;
429
- createdAt: Date;
430
- } | null;
431
- member: null;
432
- }, {
433
- code?: string | undefined;
434
- message?: string | undefined;
435
- }, FetchOptions["throw"] extends true ? true : false>>;
436
- };
437
- } & {
438
- organization: {
439
- listInvitations: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
440
- organizationId?: string | undefined;
441
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
442
- query?: {
443
- organizationId?: string | undefined;
444
- } | undefined;
445
- fetchOptions?: FetchOptions | undefined;
446
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
447
- id: string;
448
- organizationId: string;
449
- email: string;
450
- role: "member" | "admin" | "owner";
451
- status: import('better-auth/plugins').InvitationStatus;
452
- inviterId: string;
453
- expiresAt: Date;
454
- createdAt: Date;
455
- }[], {
456
- code?: string | undefined;
457
- message?: string | undefined;
458
- }, FetchOptions["throw"] extends true ? true : false>>;
459
- };
460
- } & {
461
- organization: {
462
- 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<{
463
- query?: Record<string, any> | undefined;
464
- fetchOptions?: FetchOptions | undefined;
465
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<NonNullable<Omit<{
466
- id: string;
467
- organizationId: string;
468
- role: "member" | "admin" | "owner";
469
- createdAt: Date;
470
- userId: string;
471
- user: {
472
- id: string;
473
- email: string;
474
- name: string;
475
- image?: string | undefined;
476
- };
477
- } & {
478
- user: {
479
- id: string;
480
- createdAt: Date;
481
- updatedAt: Date;
482
- email: string;
483
- emailVerified: boolean;
484
- name: string;
485
- image?: string | null | undefined;
486
- };
487
- }, "user"> & {
488
- user: {
489
- id: string;
490
- name: string;
491
- email: string;
492
- image: string | undefined;
493
- };
494
- }>, {
495
- code?: string | undefined;
496
- message?: string | undefined;
497
- }, FetchOptions["throw"] extends true ? true : false>>;
498
- };
499
- } & {
500
- organization: {
501
- checkSlug: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
502
- slug: string;
503
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
504
- slug: string;
505
- } & {
506
- fetchOptions?: FetchOptions | undefined;
507
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
508
- status: boolean;
509
- }, {
510
- code?: string | undefined;
511
- message?: string | undefined;
512
- }, FetchOptions["throw"] extends true ? true : false>>;
513
- };
514
- } & {
515
- organization: {
516
- removeMember: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
517
- memberIdOrEmail: string;
518
- organizationId?: string | undefined;
519
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
520
- memberIdOrEmail: string;
521
- organizationId?: string | undefined;
522
- } & {
523
- fetchOptions?: FetchOptions | undefined;
524
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
525
- member: {
526
- id: string;
527
- organizationId: string;
528
- role: "member" | "admin" | "owner";
529
- createdAt: Date;
530
- userId: string;
531
- user: {
532
- id: string;
533
- email: string;
534
- name: string;
535
- image?: string | undefined;
536
- };
537
- };
538
- }, {
539
- code?: string | undefined;
540
- message?: string | undefined;
541
- }, FetchOptions["throw"] extends true ? true : false>>;
542
- };
543
- } & {
544
- organization: {
545
- updateMemberRole: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
546
- role: "member" | import('better-auth').LiteralString | import('better-auth').LiteralString[] | "admin" | "owner" | ("member" | "admin" | "owner")[];
547
- memberId: string;
548
- organizationId?: string | undefined;
549
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
550
- role: "member" | import('better-auth').LiteralString | import('better-auth').LiteralString[] | "admin" | "owner" | ("member" | "admin" | "owner")[];
551
- memberId: string;
552
- organizationId?: string | undefined;
553
- } & {
554
- fetchOptions?: FetchOptions | undefined;
555
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
556
- id: string;
557
- organizationId: string;
558
- role: "admin" | "member" | "owner";
559
- createdAt: Date;
560
- userId: string;
561
- user: {
562
- id: string;
563
- email: string;
564
- name: string;
565
- image?: string | undefined;
566
- };
567
- }, {
568
- code?: string | undefined;
569
- message?: string | undefined;
570
- }, FetchOptions["throw"] extends true ? true : false>>;
571
- };
572
- } & {
573
- organization: {
574
- leave: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
575
- organizationId: string;
576
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
577
- organizationId: string;
578
- } & {
579
- fetchOptions?: FetchOptions | undefined;
580
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<NonNullable<Omit<{
581
- id: string;
582
- organizationId: string;
583
- role: "member" | "admin" | "owner";
584
- createdAt: Date;
585
- userId: string;
586
- user: {
587
- id: string;
588
- email: string;
589
- name: string;
590
- image?: string | undefined;
591
- };
592
- } & {
593
- user: {
594
- id: string;
595
- createdAt: Date;
596
- updatedAt: Date;
597
- email: string;
598
- emailVerified: boolean;
599
- name: string;
600
- image?: string | null | undefined;
601
- };
602
- }, "user"> & {
603
- user: {
604
- id: string;
605
- name: string;
606
- email: string;
607
- image: string | undefined;
608
- };
609
- }>, {
610
- code?: string | undefined;
611
- message?: string | undefined;
612
- }, FetchOptions["throw"] extends true ? true : false>>;
613
- };
614
- } & {
615
- organization: {
616
- listUserInvitations: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
617
- email?: string | undefined;
618
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
619
- query?: {
620
- email?: string | undefined;
621
- } | undefined;
622
- fetchOptions?: FetchOptions | undefined;
623
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<(Omit<{
624
- id: string;
625
- organizationId: string;
626
- email: string;
627
- role: "member" | "admin" | "owner";
628
- status: import('better-auth/plugins').InvitationStatus;
629
- inviterId: string;
630
- expiresAt: Date;
631
- createdAt: Date;
632
- } & {
633
- organization: {
634
- id: string;
635
- name: string;
636
- slug: string;
637
- createdAt: Date;
638
- logo?: string | null | undefined | undefined;
639
- metadata?: any;
640
- };
641
- }, "organization"> & {
642
- organizationName: string;
643
- })[], {
644
- code?: string | undefined;
645
- message?: string | undefined;
646
- }, FetchOptions["throw"] extends true ? true : false>>;
647
- };
648
- } & {
649
- organization: {
650
- listMembers: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
651
- limit?: string | number | undefined;
652
- offset?: string | number | undefined;
653
- sortBy?: string | undefined;
654
- sortDirection?: "desc" | "asc" | undefined;
655
- filterField?: string | undefined;
656
- filterValue?: string | number | boolean | string[] | number[] | undefined;
657
- filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
658
- organizationId?: string | undefined;
659
- organizationSlug?: string | undefined;
660
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
661
- query?: {
662
- limit?: string | number | undefined;
663
- offset?: string | number | undefined;
664
- sortBy?: string | undefined;
665
- sortDirection?: "desc" | "asc" | undefined;
666
- filterField?: string | undefined;
667
- filterValue?: string | number | boolean | string[] | number[] | undefined;
668
- filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
669
- organizationId?: string | undefined;
670
- organizationSlug?: string | undefined;
671
- } | undefined;
672
- fetchOptions?: FetchOptions | undefined;
673
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
674
- members: ({
675
- id: string;
676
- organizationId: string;
677
- role: "member" | "admin" | "owner";
678
- createdAt: Date;
679
- userId: string;
680
- user: {
681
- id: string;
682
- email: string;
683
- name: string;
684
- image?: string | undefined;
685
- };
686
- } & {
687
- user: {
688
- id: string;
689
- name: string;
690
- email: string;
691
- image: string | null | undefined;
692
- };
693
- })[];
694
- total: number;
695
- }, {
696
- code?: string | undefined;
697
- message?: string | undefined;
698
- }, FetchOptions["throw"] extends true ? true : false>>;
699
- };
700
- } & {
701
- organization: {
702
- getActiveMemberRole: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
703
- userId?: string | undefined;
704
- organizationId?: string | undefined;
705
- organizationSlug?: string | undefined;
706
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
707
- query?: {
708
- userId?: string | undefined;
709
- organizationId?: string | undefined;
710
- organizationSlug?: string | undefined;
711
- } | undefined;
712
- fetchOptions?: FetchOptions | undefined;
713
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
714
- role: "member" | "admin" | "owner";
715
- }, {
716
- code?: string | undefined;
717
- message?: string | undefined;
718
- }, FetchOptions["throw"] extends true ? true : false>>;
719
- };
720
- } & {
721
- organization: {
722
- hasPermission: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
723
- permissions: {
724
- readonly organization?: ("update" | "delete")[] | undefined;
725
- readonly member?: ("create" | "update" | "delete")[] | undefined;
726
- readonly invitation?: ("cancel" | "create")[] | undefined;
727
- readonly team?: ("create" | "update" | "delete")[] | undefined;
728
- readonly ac?: ("create" | "update" | "delete" | "read")[] | undefined;
729
- };
730
- } & {
731
- organizationId?: string | undefined;
732
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
733
- permissions: {
734
- readonly organization?: ("update" | "delete")[] | undefined;
735
- readonly member?: ("create" | "update" | "delete")[] | undefined;
736
- readonly invitation?: ("cancel" | "create")[] | undefined;
737
- readonly team?: ("create" | "update" | "delete")[] | undefined;
738
- readonly ac?: ("create" | "update" | "delete" | "read")[] | undefined;
739
- };
740
- } & {
741
- organizationId?: string | undefined;
742
- } & {
743
- fetchOptions?: FetchOptions | undefined;
744
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
745
- error: null;
746
- success: boolean;
747
- }, {
748
- code?: string | undefined;
749
- message?: string | undefined;
750
- }, FetchOptions["throw"] extends true ? true : false>>;
751
- };
752
- } & {
753
- oneTimeToken: {
754
- generate: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
755
- query?: Record<string, any> | undefined;
756
- fetchOptions?: FetchOptions | undefined;
757
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
758
- token: string;
759
- }, {
760
- code?: string | undefined;
761
- message?: string | undefined;
762
- }, FetchOptions["throw"] extends true ? true : false>>;
763
- };
764
- } & {
765
- oneTimeToken: {
766
- verify: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
767
- token: string;
768
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
769
- token: string;
770
- } & {
771
- fetchOptions?: FetchOptions | undefined;
772
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
773
- session: {
774
- id: string;
775
- createdAt: Date;
776
- updatedAt: Date;
777
- userId: string;
778
- expiresAt: Date;
779
- token: string;
780
- ipAddress?: string | null | undefined;
781
- userAgent?: string | null | undefined;
782
- } & Record<string, any>;
783
- user: {
784
- id: string;
785
- createdAt: Date;
786
- updatedAt: Date;
787
- email: string;
788
- emailVerified: boolean;
789
- name: string;
790
- image?: string | null | undefined;
791
- } & Record<string, any>;
792
- }, {
793
- code?: string | undefined;
794
- message?: string | undefined;
795
- }, FetchOptions["throw"] extends true ? true : false>>;
796
- };
797
- } & {
798
- signIn: {
799
- social: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
800
- provider: "line" | (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
801
- callbackURL?: string | undefined;
802
- newUserCallbackURL?: string | undefined;
803
- errorCallbackURL?: string | undefined;
804
- disableRedirect?: boolean | undefined;
805
- idToken?: {
806
- token: string;
807
- nonce?: string | undefined;
808
- accessToken?: string | undefined;
809
- refreshToken?: string | undefined;
810
- expiresAt?: number | undefined;
811
- user?: {
812
- name?: {
813
- firstName?: string | undefined;
814
- lastName?: string | undefined;
815
- } | undefined;
816
- email?: string | undefined;
817
- } | undefined;
818
- } | undefined;
819
- scopes?: string[] | undefined;
820
- requestSignUp?: boolean | undefined;
821
- loginHint?: string | undefined;
822
- additionalData?: Record<string, any> | undefined;
823
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
824
- provider: "line" | (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
825
- callbackURL?: string | undefined;
826
- newUserCallbackURL?: string | undefined;
827
- errorCallbackURL?: string | undefined;
828
- disableRedirect?: boolean | undefined;
829
- idToken?: {
830
- token: string;
831
- nonce?: string | undefined;
832
- accessToken?: string | undefined;
833
- refreshToken?: string | undefined;
834
- expiresAt?: number | undefined;
835
- user?: {
836
- name?: {
837
- firstName?: string | undefined;
838
- lastName?: string | undefined;
839
- } | undefined;
840
- email?: string | undefined;
841
- } | undefined;
842
- } | undefined;
843
- scopes?: string[] | undefined;
844
- requestSignUp?: boolean | undefined;
845
- loginHint?: string | undefined;
846
- additionalData?: Record<string, any> | undefined;
847
- } & {
848
- fetchOptions?: FetchOptions | undefined;
849
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
850
- redirect: boolean;
851
- url: string;
852
- } | (Omit<{
853
- redirect: boolean;
854
- token: string;
855
- url: undefined;
856
- user: {
857
- id: string;
858
- createdAt: Date;
859
- updatedAt: Date;
860
- email: string;
861
- emailVerified: boolean;
862
- name: string;
863
- image?: string | null | undefined | undefined;
864
- };
865
- }, "user"> & {
866
- user: import('better-auth').StripEmptyObjects<{
867
- id: string;
868
- createdAt: Date;
869
- updatedAt: Date;
870
- email: string;
871
- emailVerified: boolean;
872
- name: string;
873
- image?: string | null | undefined;
874
- }>;
875
- }), {
876
- code?: string | undefined;
877
- message?: string | undefined;
878
- }, FetchOptions["throw"] extends true ? true : false>>;
879
- };
880
- } & {
881
- 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<{
882
- query?: Record<string, any> | undefined;
883
- fetchOptions?: FetchOptions | undefined;
884
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
885
- success: boolean;
886
- }, {
887
- code?: string | undefined;
888
- message?: string | undefined;
889
- }, FetchOptions["throw"] extends true ? true : false>>;
890
- } & {
891
- signUp: {
892
- email: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
893
- name: string;
894
- email: string;
895
- password: string;
896
- image?: string | undefined;
897
- callbackURL?: string | undefined;
898
- rememberMe?: boolean | undefined;
899
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
900
- email: string;
901
- name: string;
902
- password: string;
903
- image?: string | undefined;
904
- callbackURL?: string | undefined;
905
- fetchOptions?: FetchOptions | undefined;
906
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<(Omit<{
907
- token: null;
908
- user: {
909
- id: string;
910
- createdAt: Date;
911
- updatedAt: Date;
912
- email: string;
913
- emailVerified: boolean;
914
- name: string;
915
- image?: string | null | undefined | undefined;
916
- };
917
- }, "user"> & {
918
- user: import('better-auth').StripEmptyObjects<{
919
- id: string;
920
- createdAt: Date;
921
- updatedAt: Date;
922
- email: string;
923
- emailVerified: boolean;
924
- name: string;
925
- image?: string | null | undefined;
926
- }>;
927
- }) | (Omit<{
928
- token: string;
929
- user: {
930
- id: string;
931
- createdAt: Date;
932
- updatedAt: Date;
933
- email: string;
934
- emailVerified: boolean;
935
- name: string;
936
- image?: string | null | undefined | undefined;
937
- };
938
- }, "user"> & {
939
- user: import('better-auth').StripEmptyObjects<{
940
- id: string;
941
- createdAt: Date;
942
- updatedAt: Date;
943
- email: string;
944
- emailVerified: boolean;
945
- name: string;
946
- image?: string | null | undefined;
947
- }>;
948
- }), {
949
- code?: string | undefined;
950
- message?: string | undefined;
951
- }, FetchOptions["throw"] extends true ? true : false>>;
952
- };
953
- } & {
954
- signIn: {
955
- email: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
956
- email: string;
957
- password: string;
958
- callbackURL?: string | undefined;
959
- rememberMe?: boolean | undefined;
960
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
961
- email: string;
962
- password: string;
963
- callbackURL?: string | undefined;
964
- rememberMe?: boolean | undefined;
965
- } & {
966
- fetchOptions?: FetchOptions | undefined;
967
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<Omit<{
968
- redirect: boolean;
969
- token: string;
970
- url?: string | undefined;
971
- user: {
972
- id: string;
973
- createdAt: Date;
974
- updatedAt: Date;
975
- email: string;
976
- emailVerified: boolean;
977
- name: string;
978
- image?: string | null | undefined | undefined;
979
- };
980
- }, "user"> & {
981
- user: import('better-auth').StripEmptyObjects<{
982
- id: string;
983
- createdAt: Date;
984
- updatedAt: Date;
985
- email: string;
986
- emailVerified: boolean;
987
- name: string;
988
- image?: string | null | undefined;
989
- }>;
990
- }, {
991
- code?: string | undefined;
992
- message?: string | undefined;
993
- }, FetchOptions["throw"] extends true ? true : false>>;
994
- };
995
- } & {
996
- resetPassword: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
997
- newPassword: string;
998
- token?: string | undefined;
999
- }> & Record<string, any>, Partial<{
1000
- token?: string | undefined;
1001
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1002
- newPassword: string;
1003
- token?: string | undefined;
1004
- } & {
1005
- fetchOptions?: FetchOptions | undefined;
1006
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1007
- status: boolean;
1008
- }, {
1009
- code?: string | undefined;
1010
- message?: string | undefined;
1011
- }, FetchOptions["throw"] extends true ? true : false>>;
1012
- } & {
1013
- verifyEmail: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
1014
- token: string;
1015
- callbackURL?: string | undefined;
1016
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1017
- query: {
1018
- token: string;
1019
- callbackURL?: string | undefined;
1020
- };
1021
- fetchOptions?: FetchOptions | undefined;
1022
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<NonNullable<void | {
1023
- status: boolean;
1024
- }>, {
1025
- code?: string | undefined;
1026
- message?: string | undefined;
1027
- }, FetchOptions["throw"] extends true ? true : false>>;
1028
- } & {
1029
- sendVerificationEmail: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1030
- email: string;
1031
- callbackURL?: string | undefined;
1032
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1033
- email: string;
1034
- callbackURL?: string | undefined;
1035
- } & {
1036
- fetchOptions?: FetchOptions | undefined;
1037
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1038
- status: boolean;
1039
- }, {
1040
- code?: string | undefined;
1041
- message?: string | undefined;
1042
- }, FetchOptions["throw"] extends true ? true : false>>;
1043
- } & {
1044
- changeEmail: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1045
- newEmail: string;
1046
- callbackURL?: string | undefined;
1047
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1048
- newEmail: string;
1049
- callbackURL?: string | undefined;
1050
- } & {
1051
- fetchOptions?: FetchOptions | undefined;
1052
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1053
- status: boolean;
1054
- }, {
1055
- code?: string | undefined;
1056
- message?: string | undefined;
1057
- }, FetchOptions["throw"] extends true ? true : false>>;
1058
- } & {
1059
- changePassword: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1060
- newPassword: string;
1061
- currentPassword: string;
1062
- revokeOtherSessions?: boolean | undefined;
1063
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1064
- newPassword: string;
1065
- currentPassword: string;
1066
- revokeOtherSessions?: boolean | undefined;
1067
- } & {
1068
- fetchOptions?: FetchOptions | undefined;
1069
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<Omit<{
1070
- token: string | null;
1071
- user: {
1072
- id: string;
1073
- createdAt: Date;
1074
- updatedAt: Date;
1075
- email: string;
1076
- emailVerified: boolean;
1077
- name: string;
1078
- image?: string | null | undefined;
1079
- } & Record<string, any> & {
1080
- id: string;
1081
- createdAt: Date;
1082
- updatedAt: Date;
1083
- email: string;
1084
- emailVerified: boolean;
1085
- name: string;
1086
- image?: string | null | undefined;
1087
- };
1088
- }, "user"> & {
1089
- user: import('better-auth').StripEmptyObjects<{
1090
- id: string;
1091
- createdAt: Date;
1092
- updatedAt: Date;
1093
- email: string;
1094
- emailVerified: boolean;
1095
- name: string;
1096
- image?: string | null | undefined;
1097
- }>;
1098
- }, {
1099
- code?: string | undefined;
1100
- message?: string | undefined;
1101
- }, FetchOptions["throw"] extends true ? true : false>>;
1102
- } & {
1103
- 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<{}> & {
1104
- fetchOptions?: FetchOptions | undefined;
1105
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1106
- session: {
1107
- id: string;
1108
- createdAt: Date;
1109
- updatedAt: Date;
1110
- userId: string;
1111
- expiresAt: Date;
1112
- token: string;
1113
- ipAddress?: string | null | undefined;
1114
- userAgent?: string | null | undefined;
1115
- };
1116
- }, {
1117
- code?: string | undefined;
1118
- message?: string | undefined;
1119
- }, FetchOptions["throw"] extends true ? true : false>>;
1120
- } & {
1121
- updateUser: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<Partial<{}> & {
1122
- name?: string | undefined;
1123
- image?: string | undefined | null;
1124
- }> & 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<{
1125
- baseURL: string;
1126
- plugins: ({
1127
- id: "cross-domain";
1128
- getActions(_: any, $store: ClientStore): {
1129
- getCookie: () => string;
1130
- updateSession: () => void;
1131
- getSessionData: () => Record<string, unknown> | null;
1132
- };
1133
- fetchPlugins: {
1134
- id: string;
1135
- name: string;
1136
- hooks: {
1137
- onSuccess(context: any): Promise<void>;
1138
- };
1139
- init(url: string, options: any): Promise<{
1140
- url: string;
1141
- options: any;
1142
- }>;
1143
- }[];
1144
- } | {
1145
- id: "organization";
1146
- $InferServerPlugin: import('better-auth/plugins').OrganizationPlugin<{
1147
- ac: import('better-auth/plugins').AccessControl<{
1148
- readonly organization: readonly ["update", "delete"];
1149
- readonly member: readonly ["create", "update", "delete"];
1150
- readonly invitation: readonly ["create", "cancel"];
1151
- readonly team: readonly ["create", "update", "delete"];
1152
- readonly ac: readonly ["create", "read", "update", "delete"];
1153
- }>;
1154
- roles: {
1155
- admin: import('better-auth/plugins').Role;
1156
- member: import('better-auth/plugins').Role;
1157
- owner: import('better-auth/plugins').Role;
1158
- };
1159
- teams: {
1160
- enabled: false;
1161
- };
1162
- schema: {
1163
- organization?: {
1164
- additionalFields?: {
1165
- [key: string]: import('better-auth').DBFieldAttribute;
1166
- };
1167
- };
1168
- member?: {
1169
- additionalFields?: {
1170
- [key: string]: import('better-auth').DBFieldAttribute;
1171
- };
1172
- };
1173
- invitation?: {
1174
- additionalFields?: {
1175
- [key: string]: import('better-auth').DBFieldAttribute;
1176
- };
1177
- };
1178
- team?: {
1179
- additionalFields?: {
1180
- [key: string]: import('better-auth').DBFieldAttribute;
1181
- };
1182
- };
1183
- organizationRole?: {
1184
- additionalFields?: {
1185
- [key: string]: import('better-auth').DBFieldAttribute;
1186
- };
1187
- };
1188
- } | undefined;
1189
- dynamicAccessControl: {
1190
- enabled: false;
1191
- };
1192
- }>;
1193
- getActions: ($fetch: import('better-auth/client').BetterFetch, _$store: ClientStore, co: import('better-auth').BetterAuthClientOptions | undefined) => {
1194
- $Infer: {
1195
- ActiveOrganization: {
1196
- members: {
1197
- id: string;
1198
- organizationId: string;
1199
- role: "member" | "admin" | "owner";
1200
- createdAt: Date;
1201
- userId: string;
1202
- user: {
1203
- id: string;
1204
- email: string;
1205
- name: string;
1206
- image?: string | undefined;
1207
- };
1208
- }[];
1209
- invitations: {
1210
- id: string;
1211
- organizationId: string;
1212
- email: string;
1213
- role: "member" | "admin" | "owner";
1214
- status: import('better-auth/plugins').InvitationStatus;
1215
- inviterId: string;
1216
- expiresAt: Date;
1217
- createdAt: Date;
1218
- }[];
1219
- } & {
1220
- id: string;
1221
- name: string;
1222
- slug: string;
1223
- createdAt: Date;
1224
- logo?: string | null | undefined | undefined;
1225
- metadata?: any;
1226
- };
1227
- Organization: {
1228
- id: string;
1229
- name: string;
1230
- slug: string;
1231
- createdAt: Date;
1232
- logo?: string | null | undefined;
1233
- metadata?: any;
1234
- };
1235
- Invitation: {
1236
- id: string;
1237
- organizationId: string;
1238
- email: string;
1239
- role: "member" | "admin" | "owner";
1240
- status: import('better-auth/plugins').InvitationStatus;
1241
- inviterId: string;
1242
- expiresAt: Date;
1243
- createdAt: Date;
1244
- };
1245
- Member: {
1246
- id: string;
1247
- organizationId: string;
1248
- role: "member" | "admin" | "owner";
1249
- createdAt: Date;
1250
- userId: string;
1251
- user: {
1252
- id: string;
1253
- email: string;
1254
- name: string;
1255
- image?: string | undefined;
1256
- };
1257
- };
1258
- Team: {
1259
- id: string;
1260
- name: string;
1261
- organizationId: string;
1262
- createdAt: Date;
1263
- updatedAt?: Date | undefined;
1264
- };
1265
- };
1266
- organization: {
1267
- checkRolePermission: <R extends "member" | "admin" | "owner">(data: {
1268
- permissions: {
1269
- readonly organization?: ("update" | "delete")[] | undefined;
1270
- readonly member?: ("create" | "update" | "delete")[] | undefined;
1271
- readonly invitation?: ("cancel" | "create")[] | undefined;
1272
- readonly team?: ("create" | "update" | "delete")[] | undefined;
1273
- readonly ac?: ("create" | "update" | "delete" | "read")[] | undefined;
1274
- };
1275
- } & {
1276
- role: R;
1277
- }) => boolean;
1278
- };
1279
- };
1280
- getAtoms: ($fetch: import('better-auth/client').BetterFetch) => {
1281
- $listOrg: import('better-auth/client').PreinitializedWritableAtom<boolean> & object;
1282
- $activeOrgSignal: import('better-auth/client').PreinitializedWritableAtom<boolean> & object;
1283
- $activeMemberSignal: import('better-auth/client').PreinitializedWritableAtom<boolean> & object;
1284
- $activeMemberRoleSignal: import('better-auth/client').PreinitializedWritableAtom<boolean> & object;
1285
- activeOrganization: import('better-auth/client').AuthQueryAtom<import('better-auth').Prettify<{
1286
- id: string;
1287
- name: string;
1288
- slug: string;
1289
- createdAt: Date;
1290
- logo?: string | null | undefined | undefined;
1291
- metadata?: any;
1292
- } & {
1293
- members: {
1294
- id: string;
1295
- organizationId: string;
1296
- role: "member" | "admin" | "owner";
1297
- createdAt: Date;
1298
- userId: string;
1299
- user: {
1300
- id: string;
1301
- email: string;
1302
- name: string;
1303
- image?: string | undefined;
1304
- };
1305
- }[];
1306
- invitations: {
1307
- id: string;
1308
- organizationId: string;
1309
- email: string;
1310
- role: "member" | "admin" | "owner";
1311
- status: import('better-auth/plugins').InvitationStatus;
1312
- inviterId: string;
1313
- expiresAt: Date;
1314
- createdAt: Date;
1315
- }[];
1316
- }>>;
1317
- listOrganizations: import('better-auth/client').AuthQueryAtom<{
1318
- id: string;
1319
- name: string;
1320
- slug: string;
1321
- createdAt: Date;
1322
- logo?: string | null | undefined | undefined;
1323
- metadata?: any;
1324
- }[]>;
1325
- activeMember: import('better-auth/client').AuthQueryAtom<{
1326
- id: string;
1327
- organizationId: string;
1328
- userId: string;
1329
- role: string;
1330
- createdAt: Date;
1331
- }>;
1332
- activeMemberRole: import('better-auth/client').AuthQueryAtom<{
1333
- role: string;
1334
- }>;
1335
- };
1336
- pathMethods: {
1337
- "/organization/get-full-organization": "GET";
1338
- "/organization/list-user-teams": "GET";
1339
- };
1340
- atomListeners: ({
1341
- matcher(path: string): path is "/organization/create" | "/organization/update" | "/organization/delete";
1342
- signal: "$listOrg";
1343
- } | {
1344
- matcher(path: string): boolean;
1345
- signal: "$activeOrgSignal";
1346
- } | {
1347
- matcher(path: string): boolean;
1348
- signal: "$sessionSignal";
1349
- } | {
1350
- matcher(path: string): boolean;
1351
- signal: "$activeMemberSignal";
1352
- } | {
1353
- matcher(path: string): boolean;
1354
- signal: "$activeMemberRoleSignal";
1355
- })[];
1356
- $ERROR_CODES: {
1357
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION">;
1358
- YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: import('better-auth').RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS">;
1359
- ORGANIZATION_ALREADY_EXISTS: import('better-auth').RawError<"ORGANIZATION_ALREADY_EXISTS">;
1360
- ORGANIZATION_SLUG_ALREADY_TAKEN: import('better-auth').RawError<"ORGANIZATION_SLUG_ALREADY_TAKEN">;
1361
- ORGANIZATION_NOT_FOUND: import('better-auth').RawError<"ORGANIZATION_NOT_FOUND">;
1362
- USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: import('better-auth').RawError<"USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION">;
1363
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION">;
1364
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION">;
1365
- NO_ACTIVE_ORGANIZATION: import('better-auth').RawError<"NO_ACTIVE_ORGANIZATION">;
1366
- USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: import('better-auth').RawError<"USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION">;
1367
- MEMBER_NOT_FOUND: import('better-auth').RawError<"MEMBER_NOT_FOUND">;
1368
- ROLE_NOT_FOUND: import('better-auth').RawError<"ROLE_NOT_FOUND">;
1369
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM">;
1370
- TEAM_ALREADY_EXISTS: import('better-auth').RawError<"TEAM_ALREADY_EXISTS">;
1371
- TEAM_NOT_FOUND: import('better-auth').RawError<"TEAM_NOT_FOUND">;
1372
- YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: import('better-auth').RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER">;
1373
- YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: import('better-auth').RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER">;
1374
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER">;
1375
- YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION">;
1376
- USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: import('better-auth').RawError<"USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION">;
1377
- INVITATION_NOT_FOUND: import('better-auth').RawError<"INVITATION_NOT_FOUND">;
1378
- YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: import('better-auth').RawError<"YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION">;
1379
- EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: import('better-auth').RawError<"EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION">;
1380
- YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION">;
1381
- INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: import('better-auth').RawError<"INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION">;
1382
- YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE">;
1383
- FAILED_TO_RETRIEVE_INVITATION: import('better-auth').RawError<"FAILED_TO_RETRIEVE_INVITATION">;
1384
- YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: import('better-auth').RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS">;
1385
- UNABLE_TO_REMOVE_LAST_TEAM: import('better-auth').RawError<"UNABLE_TO_REMOVE_LAST_TEAM">;
1386
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER">;
1387
- ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: import('better-auth').RawError<"ORGANIZATION_MEMBERSHIP_LIMIT_REACHED">;
1388
- YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION">;
1389
- YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION">;
1390
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM">;
1391
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM">;
1392
- INVITATION_LIMIT_REACHED: import('better-auth').RawError<"INVITATION_LIMIT_REACHED">;
1393
- TEAM_MEMBER_LIMIT_REACHED: import('better-auth').RawError<"TEAM_MEMBER_LIMIT_REACHED">;
1394
- USER_IS_NOT_A_MEMBER_OF_THE_TEAM: import('better-auth').RawError<"USER_IS_NOT_A_MEMBER_OF_THE_TEAM">;
1395
- YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: import('better-auth').RawError<"YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM">;
1396
- YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: import('better-auth').RawError<"YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM">;
1397
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER">;
1398
- YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER">;
1399
- YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION">;
1400
- YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION">;
1401
- MISSING_AC_INSTANCE: import('better-auth').RawError<"MISSING_AC_INSTANCE">;
1402
- YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: import('better-auth').RawError<"YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE">;
1403
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE">;
1404
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE">;
1405
- YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE">;
1406
- YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE">;
1407
- YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE">;
1408
- YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE">;
1409
- TOO_MANY_ROLES: import('better-auth').RawError<"TOO_MANY_ROLES">;
1410
- INVALID_RESOURCE: import('better-auth').RawError<"INVALID_RESOURCE">;
1411
- ROLE_NAME_IS_ALREADY_TAKEN: import('better-auth').RawError<"ROLE_NAME_IS_ALREADY_TAKEN">;
1412
- CANNOT_DELETE_A_PRE_DEFINED_ROLE: import('better-auth').RawError<"CANNOT_DELETE_A_PRE_DEFINED_ROLE">;
1413
- ROLE_IS_ASSIGNED_TO_MEMBERS: import('better-auth').RawError<"ROLE_IS_ASSIGNED_TO_MEMBERS">;
1414
- };
1415
- } | {
1416
- id: "one-time-token";
1417
- $InferServerPlugin: ReturnType<(options?: import('better-auth/plugins').OneTimeTokenOptions | undefined) => {
1418
- id: "one-time-token";
1419
- endpoints: {
1420
- generateOneTimeToken: import('better-auth').StrictEndpoint<"/one-time-token/generate", {
1421
- method: "GET";
1422
- use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
1423
- session: {
1424
- session: Record<string, any> & {
1425
- id: string;
1426
- createdAt: Date;
1427
- updatedAt: Date;
1428
- userId: string;
1429
- expiresAt: Date;
1430
- token: string;
1431
- ipAddress?: string | null | undefined;
1432
- userAgent?: string | null | undefined;
1433
- };
1434
- user: Record<string, any> & {
1435
- id: string;
1436
- createdAt: Date;
1437
- updatedAt: Date;
1438
- email: string;
1439
- emailVerified: boolean;
1440
- name: string;
1441
- image?: string | null | undefined;
1442
- };
1443
- };
1444
- }>)[];
1445
- }, {
1446
- token: string;
1447
- }>;
1448
- verifyOneTimeToken: import('better-auth').StrictEndpoint<"/one-time-token/verify", {
1449
- method: "POST";
1450
- body: import('zod').ZodObject<{
1451
- token: import('zod').ZodString;
1452
- }, import('better-auth').$strip>;
1453
- }, {
1454
- session: {
1455
- id: string;
1456
- createdAt: Date;
1457
- updatedAt: Date;
1458
- userId: string;
1459
- expiresAt: Date;
1460
- token: string;
1461
- ipAddress?: string | null | undefined;
1462
- userAgent?: string | null | undefined;
1463
- } & Record<string, any>;
1464
- user: {
1465
- id: string;
1466
- createdAt: Date;
1467
- updatedAt: Date;
1468
- email: string;
1469
- emailVerified: boolean;
1470
- name: string;
1471
- image?: string | null | undefined;
1472
- } & Record<string, any>;
1473
- }>;
1474
- };
1475
- hooks: {
1476
- after: {
1477
- matcher: () => true;
1478
- handler: (inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<void>;
1479
- }[];
1480
- };
1481
- options: import('better-auth/plugins').OneTimeTokenOptions | undefined;
1482
- }>;
1483
- })[];
1484
- }, FetchOptions>> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1485
- status: boolean;
1486
- }, {
1487
- code?: string | undefined;
1488
- message?: string | undefined;
1489
- }, FetchOptions["throw"] extends true ? true : false>>;
1490
- } & {
1491
- deleteUser: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1492
- callbackURL?: string | undefined;
1493
- password?: string | undefined;
1494
- token?: string | undefined;
1495
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
1496
- callbackURL?: string | undefined;
1497
- password?: string | undefined;
1498
- token?: string | undefined;
1499
- } & {
1500
- fetchOptions?: FetchOptions | undefined;
1501
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1502
- success: boolean;
1503
- message: string;
1504
- }, {
1505
- code?: string | undefined;
1506
- message?: string | undefined;
1507
- }, FetchOptions["throw"] extends true ? true : false>>;
1508
- } & {
1509
- requestPasswordReset: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1510
- email: string;
1511
- redirectTo?: string | undefined;
1512
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1513
- email: string;
1514
- redirectTo?: string | undefined;
1515
- } & {
1516
- fetchOptions?: FetchOptions | undefined;
1517
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1518
- status: boolean;
1519
- message: string;
1520
- }, {
1521
- code?: string | undefined;
1522
- message?: string | undefined;
1523
- }, FetchOptions["throw"] extends true ? true : false>>;
1524
- } & {
1525
- resetPassword: {
1526
- ":token": <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
1527
- callbackURL: string;
1528
- }> & Record<string, any>, {
1529
- token: string;
1530
- }>>(data_0: import('better-auth').Prettify<{
1531
- query: {
1532
- callbackURL: string;
1533
- };
1534
- fetchOptions?: FetchOptions | undefined;
1535
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<never, {
1536
- code?: string | undefined;
1537
- message?: string | undefined;
1538
- }, FetchOptions["throw"] extends true ? true : false>>;
1539
- };
1540
- } & {
1541
- 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<{
1542
- query?: Record<string, any> | undefined;
1543
- fetchOptions?: FetchOptions | undefined;
1544
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<import('better-auth').Prettify<{
1545
- id: string;
1546
- createdAt: Date;
1547
- updatedAt: Date;
1548
- userId: string;
1549
- expiresAt: Date;
1550
- token: string;
1551
- ipAddress?: string | null | undefined | undefined;
1552
- userAgent?: string | null | undefined | undefined;
1553
- }>[], {
1554
- code?: string | undefined;
1555
- message?: string | undefined;
1556
- }, FetchOptions["throw"] extends true ? true : false>>;
1557
- } & {
1558
- revokeSession: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1559
- token: string;
1560
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1561
- token: string;
1562
- } & {
1563
- fetchOptions?: FetchOptions | undefined;
1564
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1565
- status: boolean;
1566
- }, {
1567
- code?: string | undefined;
1568
- message?: string | undefined;
1569
- }, FetchOptions["throw"] extends true ? true : false>>;
1570
- } & {
1571
- 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<{
1572
- query?: Record<string, any> | undefined;
1573
- fetchOptions?: FetchOptions | undefined;
1574
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1575
- status: boolean;
1576
- }, {
1577
- code?: string | undefined;
1578
- message?: string | undefined;
1579
- }, FetchOptions["throw"] extends true ? true : false>>;
1580
- } & {
1581
- 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<{
1582
- query?: Record<string, any> | undefined;
1583
- fetchOptions?: FetchOptions | undefined;
1584
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1585
- status: boolean;
1586
- }, {
1587
- code?: string | undefined;
1588
- message?: string | undefined;
1589
- }, FetchOptions["throw"] extends true ? true : false>>;
1590
- } & {
1591
- linkSocial: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1592
- provider: unknown;
1593
- callbackURL?: string | undefined;
1594
- idToken?: {
1595
- token: string;
1596
- nonce?: string | undefined;
1597
- accessToken?: string | undefined;
1598
- refreshToken?: string | undefined;
1599
- scopes?: string[] | undefined;
1600
- } | undefined;
1601
- requestSignUp?: boolean | undefined;
1602
- scopes?: string[] | undefined;
1603
- errorCallbackURL?: string | undefined;
1604
- disableRedirect?: boolean | undefined;
1605
- additionalData?: Record<string, any> | undefined;
1606
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1607
- provider: unknown;
1608
- callbackURL?: string | undefined;
1609
- idToken?: {
1610
- token: string;
1611
- nonce?: string | undefined;
1612
- accessToken?: string | undefined;
1613
- refreshToken?: string | undefined;
1614
- scopes?: string[] | undefined;
1615
- } | undefined;
1616
- requestSignUp?: boolean | undefined;
1617
- scopes?: string[] | undefined;
1618
- errorCallbackURL?: string | undefined;
1619
- disableRedirect?: boolean | undefined;
1620
- additionalData?: Record<string, any> | undefined;
1621
- } & {
1622
- fetchOptions?: FetchOptions | undefined;
1623
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1624
- url: string;
1625
- redirect: boolean;
1626
- }, {
1627
- code?: string | undefined;
1628
- message?: string | undefined;
1629
- }, FetchOptions["throw"] extends true ? true : false>>;
1630
- } & {
1631
- 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<{
1632
- query?: Record<string, any> | undefined;
1633
- fetchOptions?: FetchOptions | undefined;
1634
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1635
- scopes: string[];
1636
- id: string;
1637
- createdAt: Date;
1638
- updatedAt: Date;
1639
- userId: string;
1640
- providerId: string;
1641
- accountId: string;
1642
- }[], {
1643
- code?: string | undefined;
1644
- message?: string | undefined;
1645
- }, FetchOptions["throw"] extends true ? true : false>>;
1646
- } & {
1647
- deleteUser: {
1648
- callback: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
1649
- token: string;
1650
- callbackURL?: string | undefined;
1651
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1652
- query: {
1653
- token: string;
1654
- callbackURL?: string | undefined;
1655
- };
1656
- fetchOptions?: FetchOptions | undefined;
1657
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1658
- success: boolean;
1659
- message: string;
1660
- }, {
1661
- code?: string | undefined;
1662
- message?: string | undefined;
1663
- }, FetchOptions["throw"] extends true ? true : false>>;
1664
- };
1665
- } & {
1666
- unlinkAccount: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1667
- providerId: string;
1668
- accountId?: string | undefined;
1669
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1670
- providerId: string;
1671
- accountId?: string | undefined;
1672
- } & {
1673
- fetchOptions?: FetchOptions | undefined;
1674
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1675
- status: boolean;
1676
- }, {
1677
- code?: string | undefined;
1678
- message?: string | undefined;
1679
- }, FetchOptions["throw"] extends true ? true : false>>;
1680
- } & {
1681
- refreshToken: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1682
- providerId: string;
1683
- accountId?: string | undefined;
1684
- userId?: string | undefined;
1685
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1686
- providerId: string;
1687
- accountId?: string | undefined;
1688
- userId?: string | undefined;
1689
- } & {
1690
- fetchOptions?: FetchOptions | undefined;
1691
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1692
- accessToken: string | undefined;
1693
- refreshToken: string;
1694
- accessTokenExpiresAt: Date | undefined;
1695
- refreshTokenExpiresAt: Date | null | undefined;
1696
- scope: string | null | undefined;
1697
- idToken: string | null | undefined;
1698
- providerId: string;
1699
- accountId: string;
1700
- }, {
1701
- code?: string | undefined;
1702
- message?: string | undefined;
1703
- }, FetchOptions["throw"] extends true ? true : false>>;
1704
- } & {
1705
- getAccessToken: <FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
1706
- providerId: string;
1707
- accountId?: string | undefined;
1708
- userId?: string | undefined;
1709
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
1710
- providerId: string;
1711
- accountId?: string | undefined;
1712
- userId?: string | undefined;
1713
- } & {
1714
- fetchOptions?: FetchOptions | undefined;
1715
- }>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1716
- accessToken: string;
1717
- accessTokenExpiresAt: Date | undefined;
1718
- scopes: string[];
1719
- idToken: string | undefined;
1720
- }, {
1721
- code?: string | undefined;
1722
- message?: string | undefined;
1723
- }, FetchOptions["throw"] extends true ? true : false>>;
1724
- } & {
1725
- accountInfo: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
1726
- accountId?: string | undefined;
1727
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
1728
- query?: {
1729
- accountId?: string | undefined;
1730
- } | undefined;
1731
- fetchOptions?: FetchOptions | undefined;
1732
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1733
- user: import('better-auth').OAuth2UserInfo;
1734
- data: Record<string, any>;
1735
- }, {
1736
- code?: string | undefined;
1737
- message?: string | undefined;
1738
- }, FetchOptions["throw"] extends true ? true : false>>;
1739
- } & {
1740
- getSession: <FetchOptions extends import('better-auth').ClientFetchOption<never, Partial<{
1741
- disableCookieCache?: unknown;
1742
- disableRefresh?: unknown;
1743
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import('better-auth').Prettify<{
1744
- query?: {
1745
- disableCookieCache?: unknown;
1746
- disableRefresh?: unknown;
1747
- } | undefined;
1748
- fetchOptions?: FetchOptions | undefined;
1749
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
1750
- user: import('better-auth').StripEmptyObjects<{
1751
- id: string;
1752
- createdAt: Date;
1753
- updatedAt: Date;
1754
- email: string;
1755
- emailVerified: boolean;
1756
- name: string;
1757
- image?: string | null | undefined;
1758
- }>;
1759
- session: import('better-auth').StripEmptyObjects<{
1760
- id: string;
1761
- createdAt: Date;
1762
- updatedAt: Date;
1763
- userId: string;
1764
- expiresAt: Date;
1765
- token: string;
1766
- ipAddress?: string | null | undefined;
1767
- userAgent?: string | null | undefined;
1768
- } & {} & {
1769
- activeOrganizationId?: string | null | undefined;
1770
- }>;
1771
- } | null, {
1772
- code?: string | undefined;
1773
- message?: string | undefined;
1774
- }, FetchOptions["throw"] extends true ? true : false>>;
1775
- } & {
1776
- getCookie: () => string;
1777
- updateSession: () => void;
1778
- getSessionData: () => Record<string, unknown> | null;
1779
- } & {
1780
- $Infer: {
1781
- ActiveOrganization: {
1782
- members: {
1783
- id: string;
1784
- organizationId: string;
1785
- role: "member" | "admin" | "owner";
1786
- createdAt: Date;
1787
- userId: string;
1788
- user: {
1789
- id: string;
1790
- email: string;
1791
- name: string;
1792
- image?: string | undefined;
1793
- };
1794
- }[];
1795
- invitations: {
1796
- id: string;
1797
- organizationId: string;
1798
- email: string;
1799
- role: "member" | "admin" | "owner";
1800
- status: import('better-auth/plugins').InvitationStatus;
1801
- inviterId: string;
1802
- expiresAt: Date;
1803
- createdAt: Date;
1804
- }[];
1805
- } & {
1806
- id: string;
1807
- name: string;
1808
- slug: string;
1809
- createdAt: Date;
1810
- logo?: string | null | undefined | undefined;
1811
- metadata?: any;
1812
- };
1813
- Organization: {
1814
- id: string;
1815
- name: string;
1816
- slug: string;
1817
- createdAt: Date;
1818
- logo?: string | null | undefined;
1819
- metadata?: any;
1820
- };
1821
- Invitation: {
1822
- id: string;
1823
- organizationId: string;
1824
- email: string;
1825
- role: "member" | "admin" | "owner";
1826
- status: import('better-auth/plugins').InvitationStatus;
1827
- inviterId: string;
1828
- expiresAt: Date;
1829
- createdAt: Date;
1830
- };
1831
- Member: {
1832
- id: string;
1833
- organizationId: string;
1834
- role: "member" | "admin" | "owner";
1835
- createdAt: Date;
1836
- userId: string;
1837
- user: {
1838
- id: string;
1839
- email: string;
1840
- name: string;
1841
- image?: string | undefined;
1842
- };
1843
- };
1844
- Team: {
1845
- id: string;
1846
- name: string;
1847
- organizationId: string;
1848
- createdAt: Date;
1849
- updatedAt?: Date | undefined;
1850
- };
1851
- };
1852
- organization: {
1853
- checkRolePermission: <R extends "member" | "admin" | "owner">(data: {
1854
- permissions: {
1855
- readonly organization?: ("update" | "delete")[] | undefined;
1856
- readonly member?: ("create" | "update" | "delete")[] | undefined;
1857
- readonly invitation?: ("cancel" | "create")[] | undefined;
1858
- readonly team?: ("create" | "update" | "delete")[] | undefined;
1859
- readonly ac?: ("create" | "update" | "delete" | "read")[] | undefined;
1860
- };
1861
- } & {
1862
- role: R;
1863
- }) => boolean;
1864
- };
1865
- } & {
1866
- useSession: () => {
1867
- data: {
1868
- user: import('better-auth').StripEmptyObjects<{
1869
- id: string;
1870
- createdAt: Date;
1871
- updatedAt: Date;
1872
- email: string;
1873
- emailVerified: boolean;
1874
- name: string;
1875
- image?: string | null | undefined;
1876
- }>;
1877
- session: import('better-auth').StripEmptyObjects<{
1878
- id: string;
1879
- createdAt: Date;
1880
- updatedAt: Date;
1881
- userId: string;
1882
- expiresAt: Date;
1883
- token: string;
1884
- ipAddress?: string | null | undefined;
1885
- userAgent?: string | null | undefined;
1886
- } & {} & {
1887
- activeOrganizationId?: string | null | undefined;
1888
- }>;
1889
- } | null;
1890
- isPending: boolean;
1891
- isRefetching: boolean;
1892
- error: import('better-auth/client').BetterFetchError | null;
1893
- refetch: (queryParams?: {
1894
- query?: import('better-auth').SessionQueryParams;
1895
- } | undefined) => Promise<void>;
1896
- };
1897
- $Infer: {
1898
- Session: {
1899
- user: import('better-auth').StripEmptyObjects<{
1900
- id: string;
1901
- createdAt: Date;
1902
- updatedAt: Date;
1903
- email: string;
1904
- emailVerified: boolean;
1905
- name: string;
1906
- image?: string | null | undefined;
1907
- }>;
1908
- session: import('better-auth').StripEmptyObjects<{
1909
- id: string;
1910
- createdAt: Date;
1911
- updatedAt: Date;
1912
- userId: string;
1913
- expiresAt: Date;
1914
- token: string;
1915
- ipAddress?: string | null | undefined;
1916
- userAgent?: string | null | undefined;
1917
- } & {} & {
1918
- activeOrganizationId?: string | null | undefined;
1919
- }>;
1920
- };
1921
- };
1922
- $fetch: import('better-auth/client').BetterFetch<{
1923
- plugins: (import('better-auth/client').BetterFetchPlugin<Record<string, any>> | {
1924
- id: string;
1925
- name: string;
1926
- hooks: {
1927
- onSuccess(context: import('better-auth/client').SuccessContext<any>): void;
1928
- };
1929
- } | {
1930
- id: string;
1931
- name: string;
1932
- hooks: {
1933
- onSuccess: ((context: import('better-auth/client').SuccessContext<any>) => Promise<void> | void) | undefined;
1934
- onError: ((context: import('better-auth/client').ErrorContext) => Promise<void> | void) | undefined;
1935
- onRequest: (<T extends Record<string, any>>(context: import('better-auth/client').RequestContext<T>) => Promise<import('better-auth/client').RequestContext | void> | import('better-auth/client').RequestContext | void) | undefined;
1936
- onResponse: ((context: import('better-auth/client').ResponseContext) => Promise<Response | void | import('better-auth/client').ResponseContext> | Response | import('better-auth/client').ResponseContext | void) | undefined;
1937
- };
1938
- })[];
1939
- cache?: RequestCache | undefined;
1940
- priority?: RequestPriority | undefined;
1941
- credentials?: RequestCredentials;
1942
- headers?: (HeadersInit & (HeadersInit | {
1943
- accept: "application/json" | "text/plain" | "application/octet-stream";
1944
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1945
- authorization: "Bearer" | "Basic";
1946
- })) | undefined;
1947
- integrity?: string | undefined;
1948
- keepalive?: boolean | undefined;
1949
- method: string;
1950
- mode?: RequestMode | undefined;
1951
- redirect?: RequestRedirect | undefined;
1952
- referrer?: string | undefined;
1953
- referrerPolicy?: ReferrerPolicy | undefined;
1954
- signal?: (AbortSignal | null) | undefined;
1955
- window?: null | undefined;
1956
- onRetry?: ((response: import('better-auth/client').ResponseContext) => Promise<void> | void) | undefined;
1957
- hookOptions?: {
1958
- cloneResponse?: boolean;
1959
- } | undefined;
1960
- timeout?: number | undefined;
1961
- customFetchImpl: import('better-auth/client').FetchEsque;
1962
- baseURL: string;
1963
- throw?: boolean | undefined;
1964
- auth?: ({
1965
- type: "Bearer";
1966
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1967
- } | {
1968
- type: "Basic";
1969
- username: string | (() => string | undefined) | undefined;
1970
- password: string | (() => string | undefined) | undefined;
1971
- } | {
1972
- type: "Custom";
1973
- prefix: string | (() => string | undefined) | undefined;
1974
- value: string | (() => string | undefined) | undefined;
1975
- }) | undefined;
1976
- body?: any;
1977
- query?: any;
1978
- params?: any;
1979
- duplex?: "full" | "half" | undefined;
1980
- jsonParser: (text: string) => Promise<any> | any;
1981
- retry?: import('better-auth/client').RetryOptions | undefined;
1982
- retryAttempt?: number | undefined;
1983
- output?: (import('better-auth/client').StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1984
- errorSchema?: import('better-auth/client').StandardSchemaV1 | undefined;
1985
- disableValidation?: boolean | undefined;
1986
- disableSignal?: boolean | undefined;
1987
- }, unknown, unknown, {}>;
1988
- $store: {
1989
- notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
1990
- listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
1991
- atoms: Record<string, import('better-auth/client').WritableAtom<any>>;
1992
- };
1993
- $ERROR_CODES: {
1994
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION">;
1995
- YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: import('better-auth').RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS">;
1996
- ORGANIZATION_ALREADY_EXISTS: import('better-auth').RawError<"ORGANIZATION_ALREADY_EXISTS">;
1997
- ORGANIZATION_SLUG_ALREADY_TAKEN: import('better-auth').RawError<"ORGANIZATION_SLUG_ALREADY_TAKEN">;
1998
- ORGANIZATION_NOT_FOUND: import('better-auth').RawError<"ORGANIZATION_NOT_FOUND">;
1999
- USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: import('better-auth').RawError<"USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION">;
2000
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION">;
2001
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION">;
2002
- NO_ACTIVE_ORGANIZATION: import('better-auth').RawError<"NO_ACTIVE_ORGANIZATION">;
2003
- USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: import('better-auth').RawError<"USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION">;
2004
- MEMBER_NOT_FOUND: import('better-auth').RawError<"MEMBER_NOT_FOUND">;
2005
- ROLE_NOT_FOUND: import('better-auth').RawError<"ROLE_NOT_FOUND">;
2006
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM">;
2007
- TEAM_ALREADY_EXISTS: import('better-auth').RawError<"TEAM_ALREADY_EXISTS">;
2008
- TEAM_NOT_FOUND: import('better-auth').RawError<"TEAM_NOT_FOUND">;
2009
- YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: import('better-auth').RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER">;
2010
- YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: import('better-auth').RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER">;
2011
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER">;
2012
- YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION">;
2013
- USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: import('better-auth').RawError<"USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION">;
2014
- INVITATION_NOT_FOUND: import('better-auth').RawError<"INVITATION_NOT_FOUND">;
2015
- YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: import('better-auth').RawError<"YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION">;
2016
- EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: import('better-auth').RawError<"EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION">;
2017
- YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION">;
2018
- INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: import('better-auth').RawError<"INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION">;
2019
- YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE">;
2020
- FAILED_TO_RETRIEVE_INVITATION: import('better-auth').RawError<"FAILED_TO_RETRIEVE_INVITATION">;
2021
- YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: import('better-auth').RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS">;
2022
- UNABLE_TO_REMOVE_LAST_TEAM: import('better-auth').RawError<"UNABLE_TO_REMOVE_LAST_TEAM">;
2023
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER">;
2024
- ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: import('better-auth').RawError<"ORGANIZATION_MEMBERSHIP_LIMIT_REACHED">;
2025
- YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION">;
2026
- YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION">;
2027
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM">;
2028
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM">;
2029
- INVITATION_LIMIT_REACHED: import('better-auth').RawError<"INVITATION_LIMIT_REACHED">;
2030
- TEAM_MEMBER_LIMIT_REACHED: import('better-auth').RawError<"TEAM_MEMBER_LIMIT_REACHED">;
2031
- USER_IS_NOT_A_MEMBER_OF_THE_TEAM: import('better-auth').RawError<"USER_IS_NOT_A_MEMBER_OF_THE_TEAM">;
2032
- YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: import('better-auth').RawError<"YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM">;
2033
- YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: import('better-auth').RawError<"YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM">;
2034
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER">;
2035
- YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER">;
2036
- YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION">;
2037
- YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: import('better-auth').RawError<"YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION">;
2038
- MISSING_AC_INSTANCE: import('better-auth').RawError<"MISSING_AC_INSTANCE">;
2039
- YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: import('better-auth').RawError<"YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE">;
2040
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE">;
2041
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE">;
2042
- YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE">;
2043
- YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE">;
2044
- YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE">;
2045
- YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE">;
2046
- TOO_MANY_ROLES: import('better-auth').RawError<"TOO_MANY_ROLES">;
2047
- INVALID_RESOURCE: import('better-auth').RawError<"INVALID_RESOURCE">;
2048
- ROLE_NAME_IS_ALREADY_TAKEN: import('better-auth').RawError<"ROLE_NAME_IS_ALREADY_TAKEN">;
2049
- CANNOT_DELETE_A_PRE_DEFINED_ROLE: import('better-auth').RawError<"CANNOT_DELETE_A_PRE_DEFINED_ROLE">;
2050
- ROLE_IS_ASSIGNED_TO_MEMBERS: import('better-auth').RawError<"ROLE_IS_ASSIGNED_TO_MEMBERS">;
2051
- } & {
2052
- USER_NOT_FOUND: import('better-auth').RawError<"USER_NOT_FOUND">;
2053
- FAILED_TO_CREATE_USER: import('better-auth').RawError<"FAILED_TO_CREATE_USER">;
2054
- FAILED_TO_CREATE_SESSION: import('better-auth').RawError<"FAILED_TO_CREATE_SESSION">;
2055
- FAILED_TO_UPDATE_USER: import('better-auth').RawError<"FAILED_TO_UPDATE_USER">;
2056
- FAILED_TO_GET_SESSION: import('better-auth').RawError<"FAILED_TO_GET_SESSION">;
2057
- INVALID_PASSWORD: import('better-auth').RawError<"INVALID_PASSWORD">;
2058
- INVALID_EMAIL: import('better-auth').RawError<"INVALID_EMAIL">;
2059
- INVALID_EMAIL_OR_PASSWORD: import('better-auth').RawError<"INVALID_EMAIL_OR_PASSWORD">;
2060
- INVALID_USER: import('better-auth').RawError<"INVALID_USER">;
2061
- SOCIAL_ACCOUNT_ALREADY_LINKED: import('better-auth').RawError<"SOCIAL_ACCOUNT_ALREADY_LINKED">;
2062
- PROVIDER_NOT_FOUND: import('better-auth').RawError<"PROVIDER_NOT_FOUND">;
2063
- INVALID_TOKEN: import('better-auth').RawError<"INVALID_TOKEN">;
2064
- TOKEN_EXPIRED: import('better-auth').RawError<"TOKEN_EXPIRED">;
2065
- ID_TOKEN_NOT_SUPPORTED: import('better-auth').RawError<"ID_TOKEN_NOT_SUPPORTED">;
2066
- FAILED_TO_GET_USER_INFO: import('better-auth').RawError<"FAILED_TO_GET_USER_INFO">;
2067
- USER_EMAIL_NOT_FOUND: import('better-auth').RawError<"USER_EMAIL_NOT_FOUND">;
2068
- EMAIL_NOT_VERIFIED: import('better-auth').RawError<"EMAIL_NOT_VERIFIED">;
2069
- PASSWORD_TOO_SHORT: import('better-auth').RawError<"PASSWORD_TOO_SHORT">;
2070
- PASSWORD_TOO_LONG: import('better-auth').RawError<"PASSWORD_TOO_LONG">;
2071
- USER_ALREADY_EXISTS: import('better-auth').RawError<"USER_ALREADY_EXISTS">;
2072
- USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import('better-auth').RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
2073
- EMAIL_CAN_NOT_BE_UPDATED: import('better-auth').RawError<"EMAIL_CAN_NOT_BE_UPDATED">;
2074
- CREDENTIAL_ACCOUNT_NOT_FOUND: import('better-auth').RawError<"CREDENTIAL_ACCOUNT_NOT_FOUND">;
2075
- ACCOUNT_NOT_FOUND: import('better-auth').RawError<"ACCOUNT_NOT_FOUND">;
2076
- SESSION_EXPIRED: import('better-auth').RawError<"SESSION_EXPIRED">;
2077
- FAILED_TO_UNLINK_LAST_ACCOUNT: import('better-auth').RawError<"FAILED_TO_UNLINK_LAST_ACCOUNT">;
2078
- USER_ALREADY_HAS_PASSWORD: import('better-auth').RawError<"USER_ALREADY_HAS_PASSWORD">;
2079
- CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: import('better-auth').RawError<"CROSS_SITE_NAVIGATION_LOGIN_BLOCKED">;
2080
- VERIFICATION_EMAIL_NOT_ENABLED: import('better-auth').RawError<"VERIFICATION_EMAIL_NOT_ENABLED">;
2081
- EMAIL_ALREADY_VERIFIED: import('better-auth').RawError<"EMAIL_ALREADY_VERIFIED">;
2082
- EMAIL_MISMATCH: import('better-auth').RawError<"EMAIL_MISMATCH">;
2083
- SESSION_NOT_FRESH: import('better-auth').RawError<"SESSION_NOT_FRESH">;
2084
- LINKED_ACCOUNT_ALREADY_EXISTS: import('better-auth').RawError<"LINKED_ACCOUNT_ALREADY_EXISTS">;
2085
- INVALID_ORIGIN: import('better-auth').RawError<"INVALID_ORIGIN">;
2086
- INVALID_CALLBACK_URL: import('better-auth').RawError<"INVALID_CALLBACK_URL">;
2087
- INVALID_REDIRECT_URL: import('better-auth').RawError<"INVALID_REDIRECT_URL">;
2088
- INVALID_ERROR_CALLBACK_URL: import('better-auth').RawError<"INVALID_ERROR_CALLBACK_URL">;
2089
- INVALID_NEW_USER_CALLBACK_URL: import('better-auth').RawError<"INVALID_NEW_USER_CALLBACK_URL">;
2090
- MISSING_OR_NULL_ORIGIN: import('better-auth').RawError<"MISSING_OR_NULL_ORIGIN">;
2091
- CALLBACK_URL_REQUIRED: import('better-auth').RawError<"CALLBACK_URL_REQUIRED">;
2092
- FAILED_TO_CREATE_VERIFICATION: import('better-auth').RawError<"FAILED_TO_CREATE_VERIFICATION">;
2093
- FIELD_NOT_ALLOWED: import('better-auth').RawError<"FIELD_NOT_ALLOWED">;
2094
- ASYNC_VALIDATION_NOT_SUPPORTED: import('better-auth').RawError<"ASYNC_VALIDATION_NOT_SUPPORTED">;
2095
- VALIDATION_ERROR: import('better-auth').RawError<"VALIDATION_ERROR">;
2096
- MISSING_FIELD: import('better-auth').RawError<"MISSING_FIELD">;
2097
- METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: import('better-auth').RawError<"METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED">;
2098
- BODY_MUST_BE_AN_OBJECT: import('better-auth').RawError<"BODY_MUST_BE_AN_OBJECT">;
2099
- PASSWORD_ALREADY_SET: import('better-auth').RawError<"PASSWORD_ALREADY_SET">;
2100
- };
2101
- };
2102
- /**
2103
- * Process a `?ott=` one-time token from the URL before the provider mounts.
2104
- * Verifies the token against the API backend and notifies the session store.
2105
- *
2106
- * Returns `true` once processing is complete (or if there was no OTT).
2107
- */
2108
- export declare function useProcessOtt(authClient: CamoxAuthClient): boolean;
2109
- interface AuthContextValue {
2110
- authClient: CamoxAuthClient;
2111
- authenticationUrl: string;
2112
- apiUrl: string;
2113
- projectSlug: string;
2114
- environmentName?: string;
2115
- }
2116
- export declare const AuthContext: React.Context<AuthContextValue | null>;
2117
- export declare function useAuthContext(): AuthContextValue;
2118
- export declare function useProjectSlug(): string;
2119
- export declare function useAuthState(): {
2120
- isAuthenticated: boolean;
2121
- isLoading: any;
2122
- };
2123
- export declare function useIsAuthenticated(): boolean;
2124
- export declare function useSignInRedirect(): () => void;
2125
- /**
2126
- * Registers sign-out and manage-account actions in the command palette.
2127
- */
2128
- export declare function useAuthActions(): void;
2129
- export {};
2130
- //# sourceMappingURL=auth.d.ts.map