better-auth 1.6.26 → 1.6.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/api/index.d.mts +74 -73
  2. package/dist/api/middlewares/authorization.d.mts +4 -4
  3. package/dist/api/middlewares/origin-check.d.mts +3 -3
  4. package/dist/api/routes/account.d.mts +6 -6
  5. package/dist/api/routes/email-verification.d.mts +1 -1
  6. package/dist/api/routes/password.d.mts +4 -4
  7. package/dist/api/routes/session.d.mts +16 -16
  8. package/dist/api/routes/session.mjs +2 -3
  9. package/dist/api/routes/sign-in.d.mts +1 -1
  10. package/dist/api/routes/sign-up.d.mts +1 -1
  11. package/dist/api/routes/update-session.d.mts +2 -2
  12. package/dist/api/routes/update-user.d.mts +11 -11
  13. package/dist/client/session-atom.mjs +33 -44
  14. package/dist/integrations/next-js.d.mts +2 -2
  15. package/dist/integrations/svelte-kit.d.mts +1 -1
  16. package/dist/integrations/tanstack-start-solid.d.mts +1 -1
  17. package/dist/integrations/tanstack-start.d.mts +1 -1
  18. package/dist/package.mjs +1 -1
  19. package/dist/plugins/admin/admin.d.mts +25 -25
  20. package/dist/plugins/anonymous/index.d.mts +3 -3
  21. package/dist/plugins/bearer/index.d.mts +3 -3
  22. package/dist/plugins/custom-session/index.d.mts +1 -1
  23. package/dist/plugins/email-otp/index.d.mts +6 -6
  24. package/dist/plugins/generic-oauth/index.d.mts +2 -2
  25. package/dist/plugins/jwt/index.d.mts +3 -3
  26. package/dist/plugins/last-login-method/index.d.mts +2 -2
  27. package/dist/plugins/magic-link/index.d.mts +2 -2
  28. package/dist/plugins/mcp/index.d.mts +3 -3
  29. package/dist/plugins/multi-session/index.d.mts +3 -3
  30. package/dist/plugins/oauth-popup/index.d.mts +1 -1
  31. package/dist/plugins/oauth-proxy/index.d.mts +3 -3
  32. package/dist/plugins/oidc-provider/index.d.mts +6 -6
  33. package/dist/plugins/one-time-token/index.d.mts +3 -3
  34. package/dist/plugins/organization/organization.d.mts +28 -4
  35. package/dist/plugins/organization/routes/crud-access-control.d.mts +140 -20
  36. package/dist/plugins/organization/routes/crud-invites.d.mts +149 -29
  37. package/dist/plugins/organization/routes/crud-members.d.mts +150 -30
  38. package/dist/plugins/organization/routes/crud-org.d.mts +96 -24
  39. package/dist/plugins/organization/routes/crud-team.d.mts +207 -39
  40. package/dist/plugins/phone-number/index.d.mts +1 -1
  41. package/dist/plugins/two-factor/backup-codes/index.d.mts +2 -2
  42. package/dist/plugins/two-factor/index.d.mts +10 -10
  43. package/dist/plugins/two-factor/totp/index.d.mts +2 -2
  44. package/dist/plugins/username/index.d.mts +1 -1
  45. package/package.json +10 -9
@@ -31,8 +31,8 @@ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => impo
31
31
  };
32
32
  };
33
33
  requireHeaders: true;
34
- use: ((inputContext: import("better-call").MiddlewareInputContext<{
35
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
34
+ use: import("better-call").Middleware<{
35
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
36
36
  session: {
37
37
  session: Record<string, any> & {
38
38
  id: string;
@@ -54,7 +54,31 @@ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => impo
54
54
  image?: string | null | undefined;
55
55
  };
56
56
  };
57
- }>)[];
57
+ }>>[];
58
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
59
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
60
+ session: {
61
+ session: Record<string, any> & {
62
+ id: string;
63
+ createdAt: Date;
64
+ updatedAt: Date;
65
+ userId: string;
66
+ expiresAt: Date;
67
+ token: string;
68
+ ipAddress?: string | null | undefined;
69
+ userAgent?: string | null | undefined;
70
+ };
71
+ user: Record<string, any> & {
72
+ id: string;
73
+ createdAt: Date;
74
+ updatedAt: Date;
75
+ email: string;
76
+ emailVerified: boolean;
77
+ name: string;
78
+ image?: string | null | undefined;
79
+ };
80
+ };
81
+ }>>[];
58
82
  }>) => Promise<{
59
83
  session: {
60
84
  session: {
@@ -80,7 +104,7 @@ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => impo
80
104
  image?: string | null | undefined;
81
105
  };
82
106
  };
83
- }>)[];
107
+ }>>[];
84
108
  }, {
85
109
  success: boolean;
86
110
  roleData: {
@@ -103,8 +127,8 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => impo
103
127
  roleId: z.ZodString;
104
128
  }, z.core.$strip>]>>;
105
129
  requireHeaders: true;
106
- use: ((inputContext: import("better-call").MiddlewareInputContext<{
107
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
130
+ use: import("better-call").Middleware<{
131
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
108
132
  session: {
109
133
  session: Record<string, any> & {
110
134
  id: string;
@@ -126,7 +150,31 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => impo
126
150
  image?: string | null | undefined;
127
151
  };
128
152
  };
129
- }>)[];
153
+ }>>[];
154
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
155
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
156
+ session: {
157
+ session: Record<string, any> & {
158
+ id: string;
159
+ createdAt: Date;
160
+ updatedAt: Date;
161
+ userId: string;
162
+ expiresAt: Date;
163
+ token: string;
164
+ ipAddress?: string | null | undefined;
165
+ userAgent?: string | null | undefined;
166
+ };
167
+ user: Record<string, any> & {
168
+ id: string;
169
+ createdAt: Date;
170
+ updatedAt: Date;
171
+ email: string;
172
+ emailVerified: boolean;
173
+ name: string;
174
+ image?: string | null | undefined;
175
+ };
176
+ };
177
+ }>>[];
130
178
  }>) => Promise<{
131
179
  session: {
132
180
  session: {
@@ -152,7 +200,7 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => impo
152
200
  image?: string | null | undefined;
153
201
  };
154
202
  };
155
- }>)[];
203
+ }>>[];
156
204
  metadata: {
157
205
  $Infer: {
158
206
  body: {
@@ -168,8 +216,8 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => impo
168
216
  declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => import("better-call").StrictEndpoint<"/organization/list-roles", {
169
217
  method: "GET";
170
218
  requireHeaders: true;
171
- use: ((inputContext: import("better-call").MiddlewareInputContext<{
172
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
219
+ use: import("better-call").Middleware<{
220
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
173
221
  session: {
174
222
  session: Record<string, any> & {
175
223
  id: string;
@@ -191,7 +239,31 @@ declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => impor
191
239
  image?: string | null | undefined;
192
240
  };
193
241
  };
194
- }>)[];
242
+ }>>[];
243
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
244
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
245
+ session: {
246
+ session: Record<string, any> & {
247
+ id: string;
248
+ createdAt: Date;
249
+ updatedAt: Date;
250
+ userId: string;
251
+ expiresAt: Date;
252
+ token: string;
253
+ ipAddress?: string | null | undefined;
254
+ userAgent?: string | null | undefined;
255
+ };
256
+ user: Record<string, any> & {
257
+ id: string;
258
+ createdAt: Date;
259
+ updatedAt: Date;
260
+ email: string;
261
+ emailVerified: boolean;
262
+ name: string;
263
+ image?: string | null | undefined;
264
+ };
265
+ };
266
+ }>>[];
195
267
  }>) => Promise<{
196
268
  session: {
197
269
  session: {
@@ -217,7 +289,7 @@ declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => impor
217
289
  image?: string | null | undefined;
218
290
  };
219
291
  };
220
- }>)[];
292
+ }>>[];
221
293
  query: z.ZodOptional<z.ZodObject<{
222
294
  organizationId: z.ZodOptional<z.ZodString>;
223
295
  }, z.core.$strip>>;
@@ -232,8 +304,32 @@ declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => impor
232
304
  declare const getOrgRole: <O extends OrganizationOptions>(options: O) => import("better-call").StrictEndpoint<"/organization/get-role", {
233
305
  method: "GET";
234
306
  requireHeaders: true;
235
- use: ((inputContext: import("better-call").MiddlewareInputContext<{
236
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
307
+ use: import("better-call").Middleware<{
308
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
309
+ session: {
310
+ session: Record<string, any> & {
311
+ id: string;
312
+ createdAt: Date;
313
+ updatedAt: Date;
314
+ userId: string;
315
+ expiresAt: Date;
316
+ token: string;
317
+ ipAddress?: string | null | undefined;
318
+ userAgent?: string | null | undefined;
319
+ };
320
+ user: Record<string, any> & {
321
+ id: string;
322
+ createdAt: Date;
323
+ updatedAt: Date;
324
+ email: string;
325
+ emailVerified: boolean;
326
+ name: string;
327
+ image?: string | null | undefined;
328
+ };
329
+ };
330
+ }>>[];
331
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
332
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
237
333
  session: {
238
334
  session: Record<string, any> & {
239
335
  id: string;
@@ -255,7 +351,7 @@ declare const getOrgRole: <O extends OrganizationOptions>(options: O) => import(
255
351
  image?: string | null | undefined;
256
352
  };
257
353
  };
258
- }>)[];
354
+ }>>[];
259
355
  }>) => Promise<{
260
356
  session: {
261
357
  session: {
@@ -281,7 +377,7 @@ declare const getOrgRole: <O extends OrganizationOptions>(options: O) => import(
281
377
  image?: string | null | undefined;
282
378
  };
283
379
  };
284
- }>)[];
380
+ }>>[];
285
381
  query: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
286
382
  organizationId: z.ZodOptional<z.ZodString>;
287
383
  }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
@@ -333,8 +429,32 @@ declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => impo
333
429
  };
334
430
  };
335
431
  requireHeaders: true;
336
- use: ((inputContext: import("better-call").MiddlewareInputContext<{
337
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
432
+ use: import("better-call").Middleware<{
433
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
434
+ session: {
435
+ session: Record<string, any> & {
436
+ id: string;
437
+ createdAt: Date;
438
+ updatedAt: Date;
439
+ userId: string;
440
+ expiresAt: Date;
441
+ token: string;
442
+ ipAddress?: string | null | undefined;
443
+ userAgent?: string | null | undefined;
444
+ };
445
+ user: Record<string, any> & {
446
+ id: string;
447
+ createdAt: Date;
448
+ updatedAt: Date;
449
+ email: string;
450
+ emailVerified: boolean;
451
+ name: string;
452
+ image?: string | null | undefined;
453
+ };
454
+ };
455
+ }>>[];
456
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
457
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
338
458
  session: {
339
459
  session: Record<string, any> & {
340
460
  id: string;
@@ -356,7 +476,7 @@ declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => impo
356
476
  image?: string | null | undefined;
357
477
  };
358
478
  };
359
- }>)[];
479
+ }>>[];
360
480
  }>) => Promise<{
361
481
  session: {
362
482
  session: {
@@ -382,7 +502,7 @@ declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => impo
382
502
  image?: string | null | undefined;
383
503
  };
384
504
  };
385
- }>)[];
505
+ }>>[];
386
506
  }, {
387
507
  success: boolean;
388
508
  roleData: OrganizationRole & InferAdditionalFieldsFromPluginOptions<"organizationRole", O, false>;
@@ -18,7 +18,7 @@ type OrganizationInvitationRole<O extends OrganizationOptions> = InferOrganizati
18
18
  declare const createInvitation: <O extends OrganizationOptions>(option: O) => import("better-call").StrictEndpoint<"/organization/invite-member", {
19
19
  method: "POST";
20
20
  requireHeaders: true;
21
- use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
21
+ use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
22
22
  orgOptions: OrganizationOptions;
23
23
  roles: typeof defaultRoles & {
24
24
  [key: string]: Role<{}>;
@@ -47,8 +47,8 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => im
47
47
  image?: string | null | undefined;
48
48
  };
49
49
  }>;
50
- }>) | ((inputContext: import("better-call").MiddlewareInputContext<{
51
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
50
+ }>> | import("better-call").Middleware<{
51
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
52
52
  session: {
53
53
  session: Record<string, any> & {
54
54
  id: string;
@@ -70,7 +70,31 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => im
70
70
  image?: string | null | undefined;
71
71
  };
72
72
  };
73
- }>)[];
73
+ }>>[];
74
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
75
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
76
+ session: {
77
+ session: Record<string, any> & {
78
+ id: string;
79
+ createdAt: Date;
80
+ updatedAt: Date;
81
+ userId: string;
82
+ expiresAt: Date;
83
+ token: string;
84
+ ipAddress?: string | null | undefined;
85
+ userAgent?: string | null | undefined;
86
+ };
87
+ user: Record<string, any> & {
88
+ id: string;
89
+ createdAt: Date;
90
+ updatedAt: Date;
91
+ email: string;
92
+ emailVerified: boolean;
93
+ name: string;
94
+ image?: string | null | undefined;
95
+ };
96
+ };
97
+ }>>[];
74
98
  }>) => Promise<{
75
99
  session: {
76
100
  session: {
@@ -96,7 +120,7 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => im
96
120
  image?: string | null | undefined;
97
121
  };
98
122
  };
99
- }>))[];
123
+ }>>)[];
100
124
  body: z.ZodObject<{
101
125
  email: z.ZodString;
102
126
  role: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
@@ -239,7 +263,7 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => i
239
263
  invitationId: z.ZodString;
240
264
  }, z.core.$strip>;
241
265
  requireHeaders: true;
242
- use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
266
+ use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
243
267
  orgOptions: OrganizationOptions;
244
268
  roles: typeof defaultRoles & {
245
269
  [key: string]: Role<{}>;
@@ -268,8 +292,8 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => i
268
292
  image?: string | null | undefined;
269
293
  };
270
294
  }>;
271
- }>) | ((inputContext: import("better-call").MiddlewareInputContext<{
272
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
295
+ }>> | import("better-call").Middleware<{
296
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
273
297
  session: {
274
298
  session: Record<string, any> & {
275
299
  id: string;
@@ -291,7 +315,31 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => i
291
315
  image?: string | null | undefined;
292
316
  };
293
317
  };
294
- }>)[];
318
+ }>>[];
319
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
320
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
321
+ session: {
322
+ session: Record<string, any> & {
323
+ id: string;
324
+ createdAt: Date;
325
+ updatedAt: Date;
326
+ userId: string;
327
+ expiresAt: Date;
328
+ token: string;
329
+ ipAddress?: string | null | undefined;
330
+ userAgent?: string | null | undefined;
331
+ };
332
+ user: Record<string, any> & {
333
+ id: string;
334
+ createdAt: Date;
335
+ updatedAt: Date;
336
+ email: string;
337
+ emailVerified: boolean;
338
+ name: string;
339
+ image?: string | null | undefined;
340
+ };
341
+ };
342
+ }>>[];
295
343
  }>) => Promise<{
296
344
  session: {
297
345
  session: {
@@ -317,7 +365,7 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => i
317
365
  image?: string | null | undefined;
318
366
  };
319
367
  };
320
- }>))[];
368
+ }>>)[];
321
369
  metadata: {
322
370
  openapi: {
323
371
  description: string;
@@ -384,7 +432,7 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => i
384
432
  invitationId: z.ZodString;
385
433
  }, z.core.$strip>;
386
434
  requireHeaders: true;
387
- use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
435
+ use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
388
436
  orgOptions: OrganizationOptions;
389
437
  roles: typeof defaultRoles & {
390
438
  [key: string]: Role<{}>;
@@ -413,8 +461,8 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => i
413
461
  image?: string | null | undefined;
414
462
  };
415
463
  }>;
416
- }>) | ((inputContext: import("better-call").MiddlewareInputContext<{
417
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
464
+ }>> | import("better-call").Middleware<{
465
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
418
466
  session: {
419
467
  session: Record<string, any> & {
420
468
  id: string;
@@ -436,7 +484,31 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => i
436
484
  image?: string | null | undefined;
437
485
  };
438
486
  };
439
- }>)[];
487
+ }>>[];
488
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
489
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
490
+ session: {
491
+ session: Record<string, any> & {
492
+ id: string;
493
+ createdAt: Date;
494
+ updatedAt: Date;
495
+ userId: string;
496
+ expiresAt: Date;
497
+ token: string;
498
+ ipAddress?: string | null | undefined;
499
+ userAgent?: string | null | undefined;
500
+ };
501
+ user: Record<string, any> & {
502
+ id: string;
503
+ createdAt: Date;
504
+ updatedAt: Date;
505
+ email: string;
506
+ emailVerified: boolean;
507
+ name: string;
508
+ image?: string | null | undefined;
509
+ };
510
+ };
511
+ }>>[];
440
512
  }>) => Promise<{
441
513
  session: {
442
514
  session: {
@@ -462,7 +534,7 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => i
462
534
  image?: string | null | undefined;
463
535
  };
464
536
  };
465
- }>))[];
537
+ }>>)[];
466
538
  metadata: {
467
539
  openapi: {
468
540
  description: string;
@@ -508,7 +580,7 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => i
508
580
  invitationId: z.ZodString;
509
581
  }, z.core.$strip>;
510
582
  requireHeaders: true;
511
- use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
583
+ use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
512
584
  orgOptions: OrganizationOptions;
513
585
  roles: typeof defaultRoles & {
514
586
  [key: string]: Role<{}>;
@@ -537,8 +609,32 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => i
537
609
  image?: string | null | undefined;
538
610
  };
539
611
  }>;
540
- }>) | ((inputContext: import("better-call").MiddlewareInputContext<{
541
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
612
+ }>> | import("better-call").Middleware<{
613
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
614
+ session: {
615
+ session: Record<string, any> & {
616
+ id: string;
617
+ createdAt: Date;
618
+ updatedAt: Date;
619
+ userId: string;
620
+ expiresAt: Date;
621
+ token: string;
622
+ ipAddress?: string | null | undefined;
623
+ userAgent?: string | null | undefined;
624
+ };
625
+ user: Record<string, any> & {
626
+ id: string;
627
+ createdAt: Date;
628
+ updatedAt: Date;
629
+ email: string;
630
+ emailVerified: boolean;
631
+ name: string;
632
+ image?: string | null | undefined;
633
+ };
634
+ };
635
+ }>>[];
636
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
637
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
542
638
  session: {
543
639
  session: Record<string, any> & {
544
640
  id: string;
@@ -560,7 +656,7 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => i
560
656
  image?: string | null | undefined;
561
657
  };
562
658
  };
563
- }>)[];
659
+ }>>[];
564
660
  }>) => Promise<{
565
661
  session: {
566
662
  session: {
@@ -586,7 +682,7 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => i
586
682
  image?: string | null | undefined;
587
683
  };
588
684
  };
589
- }>))[];
685
+ }>>)[];
590
686
  openapi: {
591
687
  operationId: string;
592
688
  description: string;
@@ -636,7 +732,7 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => i
636
732
  } ? FieldAttributeToObject<Field> : {}) extends (infer T) ? { [K in keyof T]: T[K]; } : never) | null>;
637
733
  declare const getInvitation: <O extends OrganizationOptions>(options: O) => import("better-call").StrictEndpoint<"/organization/get-invitation", {
638
734
  method: "GET";
639
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
735
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
640
736
  orgOptions: OrganizationOptions;
641
737
  roles: typeof defaultRoles & {
642
738
  [key: string]: Role<{}>;
@@ -665,7 +761,7 @@ declare const getInvitation: <O extends OrganizationOptions>(options: O) => impo
665
761
  image?: string | null | undefined;
666
762
  };
667
763
  }>;
668
- }>)[];
764
+ }>>[];
669
765
  requireHeaders: true;
670
766
  query: z.ZodObject<{
671
767
  id: z.ZodString;
@@ -775,7 +871,7 @@ declare const getInvitation: <O extends OrganizationOptions>(options: O) => impo
775
871
  declare const listInvitations: <O extends OrganizationOptions>(options: O) => import("better-call").StrictEndpoint<"/organization/list-invitations", {
776
872
  method: "GET";
777
873
  requireHeaders: true;
778
- use: (((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
874
+ use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
779
875
  orgOptions: OrganizationOptions;
780
876
  roles: typeof defaultRoles & {
781
877
  [key: string]: Role<{}>;
@@ -804,8 +900,32 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => im
804
900
  image?: string | null | undefined;
805
901
  };
806
902
  }>;
807
- }>) | ((inputContext: import("better-call").MiddlewareInputContext<{
808
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
903
+ }>> | import("better-call").Middleware<{
904
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
905
+ session: {
906
+ session: Record<string, any> & {
907
+ id: string;
908
+ createdAt: Date;
909
+ updatedAt: Date;
910
+ userId: string;
911
+ expiresAt: Date;
912
+ token: string;
913
+ ipAddress?: string | null | undefined;
914
+ userAgent?: string | null | undefined;
915
+ };
916
+ user: Record<string, any> & {
917
+ id: string;
918
+ createdAt: Date;
919
+ updatedAt: Date;
920
+ email: string;
921
+ emailVerified: boolean;
922
+ name: string;
923
+ image?: string | null | undefined;
924
+ };
925
+ };
926
+ }>>[];
927
+ }, (inputContext: import("better-call").MiddlewareInputContext<{
928
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
809
929
  session: {
810
930
  session: Record<string, any> & {
811
931
  id: string;
@@ -827,7 +947,7 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => im
827
947
  image?: string | null | undefined;
828
948
  };
829
949
  };
830
- }>)[];
950
+ }>>[];
831
951
  }>) => Promise<{
832
952
  session: {
833
953
  session: {
@@ -853,7 +973,7 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => im
853
973
  image?: string | null | undefined;
854
974
  };
855
975
  };
856
- }>))[];
976
+ }>>)[];
857
977
  query: z.ZodOptional<z.ZodObject<{
858
978
  organizationId: z.ZodOptional<z.ZodString>;
859
979
  }, z.core.$strip>>;
@@ -888,7 +1008,7 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => im
888
1008
  */
889
1009
  declare const listUserInvitations: <O extends OrganizationOptions>(options: O) => import("better-call").StrictEndpoint<"/organization/list-user-invitations", {
890
1010
  method: "GET";
891
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1011
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
892
1012
  orgOptions: OrganizationOptions;
893
1013
  roles: typeof defaultRoles & {
894
1014
  [key: string]: Role<{}>;
@@ -917,7 +1037,7 @@ declare const listUserInvitations: <O extends OrganizationOptions>(options: O) =
917
1037
  image?: string | null | undefined;
918
1038
  };
919
1039
  }>;
920
- }>)[];
1040
+ }>>[];
921
1041
  query: z.ZodOptional<z.ZodObject<{
922
1042
  email: z.ZodOptional<z.ZodString>;
923
1043
  }, z.core.$strip>>;