@vonall/auth 0.1.1 → 0.2.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.
@@ -1,6 +1,1951 @@
1
- import { type CreateAuthOptions, type CreatedAuth } from "../server/create.js";
1
+ import { type CreateAuthOptions } from "../server/create.js";
2
2
  import type { Db } from "../server/registry.js";
3
3
  /** Creates a user directly (the first one becomes admin, as in the app) and returns its id. */
4
4
  export declare function createUser(email?: string): Promise<string>;
5
- /** `createAuth()` with test values: every option on, mail off, unless overridden. */
6
- export declare function testAuth(db: Db, overrides?: Partial<CreateAuthOptions>): CreatedAuth;
5
+ /** The wiring with test values: every option on, mail off, unless overridden; as a Product's `src/lib/auth.ts` does it. */
6
+ export declare function testAuth(db: Db, overrides?: Partial<CreateAuthOptions>): {
7
+ handle: import("@sveltejs/kit/hooks").Handle;
8
+ apiHandler: import("@sveltejs/kit").RequestHandler;
9
+ providers: {
10
+ github: boolean;
11
+ google: boolean;
12
+ };
13
+ auth: import("better-auth").Auth<{
14
+ plugins: [{
15
+ id: "two-factor";
16
+ version: string;
17
+ endpoints: {
18
+ enableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/enable", {
19
+ method: "POST";
20
+ body: import("zod").ZodObject<{
21
+ password: import("zod").ZodOptional<import("zod").ZodString>;
22
+ method: import("zod").ZodDefault<import("zod").ZodEnum<{
23
+ otp: "otp";
24
+ totp: "totp";
25
+ }>>;
26
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
27
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
28
+ password: import("zod").ZodString;
29
+ method: import("zod").ZodDefault<import("zod").ZodEnum<{
30
+ otp: "otp";
31
+ totp: "totp";
32
+ }>>;
33
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
34
+ }, import("zod/v4/core").$strip>;
35
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
36
+ session: {
37
+ session: Record<string, any> & {
38
+ id: string;
39
+ createdAt: Date;
40
+ updatedAt: Date;
41
+ userId: string;
42
+ expiresAt: Date;
43
+ token: string;
44
+ ipAddress?: string | null | undefined;
45
+ userAgent?: string | null | undefined;
46
+ };
47
+ user: Record<string, any> & {
48
+ id: string;
49
+ createdAt: Date;
50
+ updatedAt: Date;
51
+ email: string;
52
+ emailVerified: boolean;
53
+ name: string;
54
+ image?: string | null | undefined;
55
+ };
56
+ };
57
+ }>>[];
58
+ metadata: {
59
+ openapi: {
60
+ summary: string;
61
+ description: string;
62
+ responses: {
63
+ 200: {
64
+ description: string;
65
+ content: {
66
+ "application/json": {
67
+ schema: {
68
+ type: "object";
69
+ properties: {
70
+ method: {
71
+ type: string;
72
+ enum: string[];
73
+ description: string;
74
+ };
75
+ totpURI: {
76
+ type: string;
77
+ description: string;
78
+ };
79
+ backupCodes: {
80
+ type: string;
81
+ items: {
82
+ type: string;
83
+ };
84
+ description: string;
85
+ };
86
+ };
87
+ required: string[];
88
+ };
89
+ };
90
+ };
91
+ };
92
+ };
93
+ };
94
+ };
95
+ }, {
96
+ method: "otp";
97
+ } | {
98
+ method: "totp";
99
+ totpURI: string;
100
+ backupCodes: string[];
101
+ }>;
102
+ disableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/disable", {
103
+ method: "POST";
104
+ body: import("zod").ZodObject<{
105
+ password: import("zod").ZodOptional<import("zod").ZodString>;
106
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
107
+ password: import("zod").ZodString;
108
+ }, import("zod/v4/core").$strip>;
109
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
110
+ session: {
111
+ session: Record<string, any> & {
112
+ id: string;
113
+ createdAt: Date;
114
+ updatedAt: Date;
115
+ userId: string;
116
+ expiresAt: Date;
117
+ token: string;
118
+ ipAddress?: string | null | undefined;
119
+ userAgent?: string | null | undefined;
120
+ };
121
+ user: Record<string, any> & {
122
+ id: string;
123
+ createdAt: Date;
124
+ updatedAt: Date;
125
+ email: string;
126
+ emailVerified: boolean;
127
+ name: string;
128
+ image?: string | null | undefined;
129
+ };
130
+ };
131
+ }>>[];
132
+ metadata: {
133
+ openapi: {
134
+ summary: string;
135
+ description: string;
136
+ responses: {
137
+ 200: {
138
+ description: string;
139
+ content: {
140
+ "application/json": {
141
+ schema: {
142
+ type: "object";
143
+ properties: {
144
+ status: {
145
+ type: string;
146
+ };
147
+ };
148
+ };
149
+ };
150
+ };
151
+ };
152
+ };
153
+ };
154
+ };
155
+ }, {
156
+ status: boolean;
157
+ }>;
158
+ verifyBackupCode: import("better-auth").StrictEndpoint<"/two-factor/verify-backup-code", {
159
+ method: "POST";
160
+ body: import("zod").ZodObject<{
161
+ code: import("zod").ZodString;
162
+ disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
163
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
164
+ }, import("zod/v4/core").$strip>;
165
+ metadata: {
166
+ openapi: {
167
+ description: string;
168
+ responses: {
169
+ "200": {
170
+ description: string;
171
+ content: {
172
+ "application/json": {
173
+ schema: {
174
+ type: "object";
175
+ properties: {
176
+ user: {
177
+ type: string;
178
+ properties: {
179
+ id: {
180
+ type: string;
181
+ description: string;
182
+ };
183
+ email: {
184
+ type: string;
185
+ format: string;
186
+ nullable: boolean;
187
+ description: string;
188
+ };
189
+ emailVerified: {
190
+ type: string;
191
+ nullable: boolean;
192
+ description: string;
193
+ };
194
+ name: {
195
+ type: string;
196
+ nullable: boolean;
197
+ description: string;
198
+ };
199
+ image: {
200
+ type: string;
201
+ format: string;
202
+ nullable: boolean;
203
+ description: string;
204
+ };
205
+ twoFactorEnabled: {
206
+ type: string;
207
+ description: string;
208
+ };
209
+ createdAt: {
210
+ type: string;
211
+ format: string;
212
+ description: string;
213
+ };
214
+ updatedAt: {
215
+ type: string;
216
+ format: string;
217
+ description: string;
218
+ };
219
+ };
220
+ required: string[];
221
+ description: string;
222
+ };
223
+ session: {
224
+ type: string;
225
+ properties: {
226
+ token: {
227
+ type: string;
228
+ description: string;
229
+ };
230
+ userId: {
231
+ type: string;
232
+ description: string;
233
+ };
234
+ createdAt: {
235
+ type: string;
236
+ format: string;
237
+ description: string;
238
+ };
239
+ expiresAt: {
240
+ type: string;
241
+ format: string;
242
+ description: string;
243
+ };
244
+ };
245
+ required: string[];
246
+ description: string;
247
+ };
248
+ };
249
+ required: string[];
250
+ };
251
+ };
252
+ };
253
+ };
254
+ };
255
+ };
256
+ };
257
+ }, {
258
+ token: string | undefined;
259
+ user: (Record<string, any> & {
260
+ id: string;
261
+ createdAt: Date;
262
+ updatedAt: Date;
263
+ email: string;
264
+ emailVerified: boolean;
265
+ name: string;
266
+ image?: string | null | undefined;
267
+ }) | import("better-auth/plugins").UserWithTwoFactor;
268
+ }>;
269
+ generateBackupCodes: import("better-auth").StrictEndpoint<"/two-factor/generate-backup-codes", {
270
+ method: "POST";
271
+ body: import("zod").ZodObject<{
272
+ password: import("zod").ZodOptional<import("zod").ZodString>;
273
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
274
+ password: import("zod").ZodString;
275
+ }, import("zod/v4/core").$strip>;
276
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
277
+ session: {
278
+ session: Record<string, any> & {
279
+ id: string;
280
+ createdAt: Date;
281
+ updatedAt: Date;
282
+ userId: string;
283
+ expiresAt: Date;
284
+ token: string;
285
+ ipAddress?: string | null | undefined;
286
+ userAgent?: string | null | undefined;
287
+ };
288
+ user: Record<string, any> & {
289
+ id: string;
290
+ createdAt: Date;
291
+ updatedAt: Date;
292
+ email: string;
293
+ emailVerified: boolean;
294
+ name: string;
295
+ image?: string | null | undefined;
296
+ };
297
+ };
298
+ }>>[];
299
+ metadata: {
300
+ openapi: {
301
+ description: string;
302
+ responses: {
303
+ "200": {
304
+ description: string;
305
+ content: {
306
+ "application/json": {
307
+ schema: {
308
+ type: "object";
309
+ properties: {
310
+ status: {
311
+ type: string;
312
+ description: string;
313
+ enum: boolean[];
314
+ };
315
+ backupCodes: {
316
+ type: string;
317
+ items: {
318
+ type: string;
319
+ };
320
+ description: string;
321
+ };
322
+ };
323
+ required: string[];
324
+ };
325
+ };
326
+ };
327
+ };
328
+ };
329
+ };
330
+ };
331
+ }, {
332
+ status: boolean;
333
+ backupCodes: string[];
334
+ }>;
335
+ viewBackupCodes: import("better-auth").StrictEndpoint<string, {
336
+ method: "POST";
337
+ body: import("zod").ZodObject<{
338
+ userId: import("zod").ZodCoercedString<unknown>;
339
+ }, import("zod/v4/core").$strip>;
340
+ }, {
341
+ status: boolean;
342
+ backupCodes: string[];
343
+ }>;
344
+ sendTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/send-otp", {
345
+ method: "POST";
346
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
347
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
348
+ }, import("zod/v4/core").$strip>>;
349
+ metadata: {
350
+ openapi: {
351
+ summary: string;
352
+ description: string;
353
+ responses: {
354
+ 200: {
355
+ description: string;
356
+ content: {
357
+ "application/json": {
358
+ schema: {
359
+ type: "object";
360
+ properties: {
361
+ status: {
362
+ type: string;
363
+ };
364
+ };
365
+ };
366
+ };
367
+ };
368
+ };
369
+ };
370
+ };
371
+ };
372
+ }, {
373
+ status: boolean;
374
+ }>;
375
+ verifyTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-otp", {
376
+ method: "POST";
377
+ body: import("zod").ZodObject<{
378
+ code: import("zod").ZodString;
379
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
380
+ }, import("zod/v4/core").$strip>;
381
+ metadata: {
382
+ openapi: {
383
+ summary: string;
384
+ description: string;
385
+ responses: {
386
+ "200": {
387
+ description: string;
388
+ content: {
389
+ "application/json": {
390
+ schema: {
391
+ type: "object";
392
+ properties: {
393
+ token: {
394
+ type: string;
395
+ description: string;
396
+ };
397
+ user: {
398
+ type: string;
399
+ properties: {
400
+ id: {
401
+ type: string;
402
+ description: string;
403
+ };
404
+ email: {
405
+ type: string;
406
+ format: string;
407
+ nullable: boolean;
408
+ description: string;
409
+ };
410
+ emailVerified: {
411
+ type: string;
412
+ nullable: boolean;
413
+ description: string;
414
+ };
415
+ name: {
416
+ type: string;
417
+ nullable: boolean;
418
+ description: string;
419
+ };
420
+ image: {
421
+ type: string;
422
+ format: string;
423
+ nullable: boolean;
424
+ description: string;
425
+ };
426
+ createdAt: {
427
+ type: string;
428
+ format: string;
429
+ description: string;
430
+ };
431
+ updatedAt: {
432
+ type: string;
433
+ format: string;
434
+ description: string;
435
+ };
436
+ };
437
+ required: string[];
438
+ description: string;
439
+ };
440
+ };
441
+ required: string[];
442
+ };
443
+ };
444
+ };
445
+ };
446
+ };
447
+ };
448
+ };
449
+ }, {
450
+ token: string;
451
+ user: import("better-auth/plugins").UserWithTwoFactor;
452
+ } | {
453
+ token: string;
454
+ user: Record<string, any> & {
455
+ id: string;
456
+ createdAt: Date;
457
+ updatedAt: Date;
458
+ email: string;
459
+ emailVerified: boolean;
460
+ name: string;
461
+ image?: string | null | undefined;
462
+ };
463
+ }>;
464
+ generateTOTP: import("better-auth").StrictEndpoint<string, {
465
+ method: "POST";
466
+ body: import("zod").ZodObject<{
467
+ secret: import("zod").ZodString;
468
+ }, import("zod/v4/core").$strip>;
469
+ metadata: {
470
+ openapi: {
471
+ summary: string;
472
+ description: string;
473
+ responses: {
474
+ 200: {
475
+ description: string;
476
+ content: {
477
+ "application/json": {
478
+ schema: {
479
+ type: "object";
480
+ properties: {
481
+ code: {
482
+ type: string;
483
+ };
484
+ };
485
+ };
486
+ };
487
+ };
488
+ };
489
+ };
490
+ };
491
+ };
492
+ }, {
493
+ code: string;
494
+ }>;
495
+ getTOTPURI: import("better-auth").StrictEndpoint<"/two-factor/get-totp-uri", {
496
+ method: "POST";
497
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
498
+ session: {
499
+ session: Record<string, any> & {
500
+ id: string;
501
+ createdAt: Date;
502
+ updatedAt: Date;
503
+ userId: string;
504
+ expiresAt: Date;
505
+ token: string;
506
+ ipAddress?: string | null | undefined;
507
+ userAgent?: string | null | undefined;
508
+ };
509
+ user: Record<string, any> & {
510
+ id: string;
511
+ createdAt: Date;
512
+ updatedAt: Date;
513
+ email: string;
514
+ emailVerified: boolean;
515
+ name: string;
516
+ image?: string | null | undefined;
517
+ };
518
+ };
519
+ }>>[];
520
+ body: import("zod").ZodObject<{
521
+ password: import("zod").ZodOptional<import("zod").ZodString>;
522
+ }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
523
+ password: import("zod").ZodString;
524
+ }, import("zod/v4/core").$strip>;
525
+ metadata: {
526
+ openapi: {
527
+ summary: string;
528
+ description: string;
529
+ responses: {
530
+ 200: {
531
+ description: string;
532
+ content: {
533
+ "application/json": {
534
+ schema: {
535
+ type: "object";
536
+ properties: {
537
+ totpURI: {
538
+ type: string;
539
+ };
540
+ };
541
+ };
542
+ };
543
+ };
544
+ };
545
+ };
546
+ };
547
+ };
548
+ }, {
549
+ totpURI: string;
550
+ }>;
551
+ verifyTOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-totp", {
552
+ method: "POST";
553
+ body: import("zod").ZodObject<{
554
+ code: import("zod").ZodString;
555
+ trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
556
+ }, import("zod/v4/core").$strip>;
557
+ metadata: {
558
+ openapi: {
559
+ summary: string;
560
+ description: string;
561
+ responses: {
562
+ 200: {
563
+ description: string;
564
+ content: {
565
+ "application/json": {
566
+ schema: {
567
+ type: "object";
568
+ properties: {
569
+ status: {
570
+ type: string;
571
+ };
572
+ };
573
+ };
574
+ };
575
+ };
576
+ };
577
+ };
578
+ };
579
+ };
580
+ }, {
581
+ token: string;
582
+ user: import("better-auth/plugins").UserWithTwoFactor;
583
+ } | {
584
+ token: string;
585
+ user: Record<string, any> & {
586
+ id: string;
587
+ createdAt: Date;
588
+ updatedAt: Date;
589
+ email: string;
590
+ emailVerified: boolean;
591
+ name: string;
592
+ image?: string | null | undefined;
593
+ };
594
+ }>;
595
+ };
596
+ options: NoInfer<import("better-auth/plugins").TwoFactorOptions>;
597
+ hooks: {
598
+ after: {
599
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
600
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
601
+ twoFactorRedirect: boolean;
602
+ twoFactorMethods: string[];
603
+ } | undefined>>;
604
+ }[];
605
+ };
606
+ schema: {
607
+ user: {
608
+ fields: {
609
+ twoFactorEnabled: {
610
+ type: "boolean";
611
+ required: false;
612
+ defaultValue: false;
613
+ input: false;
614
+ };
615
+ };
616
+ };
617
+ twoFactor: {
618
+ fields: {
619
+ secret: {
620
+ type: "string";
621
+ required: true;
622
+ returned: false;
623
+ index: true;
624
+ };
625
+ backupCodes: {
626
+ type: "string";
627
+ required: true;
628
+ returned: false;
629
+ };
630
+ userId: {
631
+ type: "string";
632
+ required: true;
633
+ returned: false;
634
+ references: {
635
+ model: string;
636
+ field: string;
637
+ };
638
+ index: true;
639
+ };
640
+ verified: {
641
+ type: "boolean";
642
+ required: false;
643
+ defaultValue: true;
644
+ input: false;
645
+ };
646
+ failedVerificationCount: {
647
+ type: "number";
648
+ required: false;
649
+ defaultValue: number;
650
+ input: false;
651
+ returned: false;
652
+ };
653
+ lockedUntil: {
654
+ type: "date";
655
+ required: false;
656
+ input: false;
657
+ returned: false;
658
+ };
659
+ };
660
+ };
661
+ };
662
+ rateLimit: {
663
+ pathMatcher(path: string): boolean;
664
+ window: number;
665
+ max: number;
666
+ }[];
667
+ $ERROR_CODES: {
668
+ OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
669
+ OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
670
+ OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
671
+ TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
672
+ TOTP_ALREADY_ENABLED: import("better-auth").RawError<"TOTP_ALREADY_ENABLED">;
673
+ TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
674
+ TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
675
+ BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
676
+ INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
677
+ INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
678
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
679
+ ACCOUNT_TEMPORARILY_LOCKED: import("better-auth").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
680
+ INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
681
+ };
682
+ }, {
683
+ id: "admin";
684
+ version: string;
685
+ init(): {
686
+ options: {
687
+ databaseHooks: {
688
+ user: {
689
+ create: {
690
+ before(user: {
691
+ id: string;
692
+ createdAt: Date;
693
+ updatedAt: Date;
694
+ email: string;
695
+ emailVerified: boolean;
696
+ name: string;
697
+ image?: string | null | undefined;
698
+ } & Record<string, unknown>): Promise<{
699
+ data: {
700
+ id: string;
701
+ createdAt: Date;
702
+ updatedAt: Date;
703
+ email: string;
704
+ emailVerified: boolean;
705
+ name: string;
706
+ image?: string | null | undefined;
707
+ role: string;
708
+ };
709
+ }>;
710
+ };
711
+ };
712
+ session: {
713
+ create: {
714
+ before(session: {
715
+ id: string;
716
+ createdAt: Date;
717
+ updatedAt: Date;
718
+ userId: string;
719
+ expiresAt: Date;
720
+ token: string;
721
+ ipAddress?: string | null | undefined;
722
+ userAgent?: string | null | undefined;
723
+ } & Record<string, unknown>, ctx: import("better-auth").GenericEndpointContext | null): Promise<void>;
724
+ };
725
+ };
726
+ };
727
+ };
728
+ };
729
+ hooks: {
730
+ after: {
731
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
732
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<import("better-auth/plugins").SessionWithImpersonatedBy[] | undefined>>;
733
+ }[];
734
+ };
735
+ endpoints: {
736
+ setRole: import("better-auth").StrictEndpoint<"/admin/set-role", {
737
+ method: "POST";
738
+ body: import("zod").ZodObject<{
739
+ userId: import("zod").ZodCoercedString<unknown>;
740
+ role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
741
+ }, import("zod/v4/core").$strip>;
742
+ requireHeaders: true;
743
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
744
+ session: {
745
+ user: import("better-auth/plugins").UserWithRole;
746
+ session: {
747
+ id: string;
748
+ createdAt: Date;
749
+ updatedAt: Date;
750
+ userId: string;
751
+ expiresAt: Date;
752
+ token: string;
753
+ ipAddress?: string | null | undefined;
754
+ userAgent?: string | null | undefined;
755
+ };
756
+ };
757
+ }>>[];
758
+ metadata: {
759
+ openapi: {
760
+ operationId: string;
761
+ summary: string;
762
+ description: string;
763
+ responses: {
764
+ 200: {
765
+ description: string;
766
+ content: {
767
+ "application/json": {
768
+ schema: {
769
+ type: "object";
770
+ properties: {
771
+ user: {
772
+ $ref: string;
773
+ };
774
+ };
775
+ };
776
+ };
777
+ };
778
+ };
779
+ };
780
+ };
781
+ $Infer: {
782
+ body: {
783
+ userId: string;
784
+ role: "user" | "admin" | ("user" | "admin")[];
785
+ };
786
+ };
787
+ };
788
+ }, {
789
+ user: import("better-auth/plugins").UserWithRole;
790
+ }>;
791
+ getUser: import("better-auth").StrictEndpoint<"/admin/get-user", {
792
+ method: "GET";
793
+ query: import("zod").ZodObject<{
794
+ id: import("zod").ZodString;
795
+ }, import("zod/v4/core").$strip>;
796
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
797
+ session: {
798
+ user: import("better-auth/plugins").UserWithRole;
799
+ session: {
800
+ id: string;
801
+ createdAt: Date;
802
+ updatedAt: Date;
803
+ userId: string;
804
+ expiresAt: Date;
805
+ token: string;
806
+ ipAddress?: string | null | undefined;
807
+ userAgent?: string | null | undefined;
808
+ };
809
+ };
810
+ }>>[];
811
+ metadata: {
812
+ openapi: {
813
+ operationId: string;
814
+ summary: string;
815
+ description: string;
816
+ responses: {
817
+ 200: {
818
+ description: string;
819
+ content: {
820
+ "application/json": {
821
+ schema: {
822
+ type: "object";
823
+ properties: {
824
+ user: {
825
+ $ref: string;
826
+ };
827
+ };
828
+ };
829
+ };
830
+ };
831
+ };
832
+ };
833
+ };
834
+ };
835
+ }, import("better-auth/plugins").UserWithRole>;
836
+ createUser: import("better-auth").StrictEndpoint<"/admin/create-user", {
837
+ method: "POST";
838
+ body: import("zod").ZodObject<{
839
+ email: import("zod").ZodString;
840
+ password: import("zod").ZodOptional<import("zod").ZodString>;
841
+ name: import("zod").ZodString;
842
+ role: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>;
843
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
844
+ }, import("zod/v4/core").$strip>;
845
+ metadata: {
846
+ openapi: {
847
+ operationId: string;
848
+ summary: string;
849
+ description: string;
850
+ responses: {
851
+ 200: {
852
+ description: string;
853
+ content: {
854
+ "application/json": {
855
+ schema: {
856
+ type: "object";
857
+ properties: {
858
+ user: {
859
+ $ref: string;
860
+ };
861
+ };
862
+ };
863
+ };
864
+ };
865
+ };
866
+ };
867
+ };
868
+ $Infer: {
869
+ body: {
870
+ email: string;
871
+ password?: string | undefined;
872
+ name: string;
873
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
874
+ data?: Record<string, any> | undefined;
875
+ };
876
+ };
877
+ };
878
+ }, {
879
+ user: import("better-auth/plugins").UserWithRole;
880
+ }>;
881
+ adminUpdateUser: import("better-auth").StrictEndpoint<"/admin/update-user", {
882
+ method: "POST";
883
+ body: import("zod").ZodObject<{
884
+ userId: import("zod").ZodCoercedString<unknown>;
885
+ data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
886
+ }, import("zod/v4/core").$strip>;
887
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
888
+ session: {
889
+ user: import("better-auth/plugins").UserWithRole;
890
+ session: {
891
+ id: string;
892
+ createdAt: Date;
893
+ updatedAt: Date;
894
+ userId: string;
895
+ expiresAt: Date;
896
+ token: string;
897
+ ipAddress?: string | null | undefined;
898
+ userAgent?: string | null | undefined;
899
+ };
900
+ };
901
+ }>>[];
902
+ metadata: {
903
+ openapi: {
904
+ operationId: string;
905
+ summary: string;
906
+ description: string;
907
+ responses: {
908
+ 200: {
909
+ description: string;
910
+ content: {
911
+ "application/json": {
912
+ schema: {
913
+ type: "object";
914
+ properties: {
915
+ user: {
916
+ $ref: string;
917
+ };
918
+ };
919
+ };
920
+ };
921
+ };
922
+ };
923
+ };
924
+ };
925
+ };
926
+ }, import("better-auth/plugins").UserWithRole>;
927
+ listUsers: import("better-auth").StrictEndpoint<"/admin/list-users", {
928
+ method: "GET";
929
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
930
+ session: {
931
+ user: import("better-auth/plugins").UserWithRole;
932
+ session: {
933
+ id: string;
934
+ createdAt: Date;
935
+ updatedAt: Date;
936
+ userId: string;
937
+ expiresAt: Date;
938
+ token: string;
939
+ ipAddress?: string | null | undefined;
940
+ userAgent?: string | null | undefined;
941
+ };
942
+ };
943
+ }>>[];
944
+ query: import("zod").ZodObject<{
945
+ searchValue: import("zod").ZodOptional<import("zod").ZodString>;
946
+ searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
947
+ email: "email";
948
+ name: "name";
949
+ }>>;
950
+ searchOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
951
+ contains: "contains";
952
+ starts_with: "starts_with";
953
+ ends_with: "ends_with";
954
+ }>>;
955
+ limit: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
956
+ offset: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
957
+ sortBy: import("zod").ZodOptional<import("zod").ZodString>;
958
+ sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
959
+ asc: "asc";
960
+ desc: "desc";
961
+ }>>;
962
+ filterField: import("zod").ZodOptional<import("zod").ZodString>;
963
+ filterValue: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, import("zod").ZodBoolean]>, import("zod").ZodArray<import("zod").ZodString>]>, import("zod").ZodArray<import("zod").ZodNumber>]>>;
964
+ filterOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
965
+ in: "in";
966
+ lte: "lte";
967
+ eq: "eq";
968
+ ne: "ne";
969
+ lt: "lt";
970
+ gt: "gt";
971
+ gte: "gte";
972
+ not_in: "not_in";
973
+ contains: "contains";
974
+ starts_with: "starts_with";
975
+ ends_with: "ends_with";
976
+ }>>;
977
+ }, import("zod/v4/core").$strip>;
978
+ metadata: {
979
+ openapi: {
980
+ operationId: string;
981
+ summary: string;
982
+ description: string;
983
+ responses: {
984
+ 200: {
985
+ description: string;
986
+ content: {
987
+ "application/json": {
988
+ schema: {
989
+ type: "object";
990
+ properties: {
991
+ users: {
992
+ type: string;
993
+ items: {
994
+ $ref: string;
995
+ };
996
+ };
997
+ total: {
998
+ type: string;
999
+ };
1000
+ limit: {
1001
+ type: string;
1002
+ };
1003
+ offset: {
1004
+ type: string;
1005
+ };
1006
+ };
1007
+ required: string[];
1008
+ };
1009
+ };
1010
+ };
1011
+ };
1012
+ };
1013
+ };
1014
+ };
1015
+ }, {
1016
+ users: import("better-auth/plugins").UserWithRole[];
1017
+ total: number;
1018
+ }>;
1019
+ listUserSessions: import("better-auth").StrictEndpoint<"/admin/list-user-sessions", {
1020
+ method: "POST";
1021
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1022
+ session: {
1023
+ user: import("better-auth/plugins").UserWithRole;
1024
+ session: {
1025
+ id: string;
1026
+ createdAt: Date;
1027
+ updatedAt: Date;
1028
+ userId: string;
1029
+ expiresAt: Date;
1030
+ token: string;
1031
+ ipAddress?: string | null | undefined;
1032
+ userAgent?: string | null | undefined;
1033
+ };
1034
+ };
1035
+ }>>[];
1036
+ body: import("zod").ZodObject<{
1037
+ userId: import("zod").ZodCoercedString<unknown>;
1038
+ }, import("zod/v4/core").$strip>;
1039
+ metadata: {
1040
+ openapi: {
1041
+ operationId: string;
1042
+ summary: string;
1043
+ description: string;
1044
+ responses: {
1045
+ 200: {
1046
+ description: string;
1047
+ content: {
1048
+ "application/json": {
1049
+ schema: {
1050
+ type: "object";
1051
+ properties: {
1052
+ sessions: {
1053
+ type: string;
1054
+ items: {
1055
+ $ref: string;
1056
+ };
1057
+ };
1058
+ };
1059
+ };
1060
+ };
1061
+ };
1062
+ };
1063
+ };
1064
+ };
1065
+ };
1066
+ }, {
1067
+ sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
1068
+ }>;
1069
+ unbanUser: import("better-auth").StrictEndpoint<"/admin/unban-user", {
1070
+ method: "POST";
1071
+ body: import("zod").ZodObject<{
1072
+ userId: import("zod").ZodCoercedString<unknown>;
1073
+ }, import("zod/v4/core").$strip>;
1074
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1075
+ session: {
1076
+ user: import("better-auth/plugins").UserWithRole;
1077
+ session: {
1078
+ id: string;
1079
+ createdAt: Date;
1080
+ updatedAt: Date;
1081
+ userId: string;
1082
+ expiresAt: Date;
1083
+ token: string;
1084
+ ipAddress?: string | null | undefined;
1085
+ userAgent?: string | null | undefined;
1086
+ };
1087
+ };
1088
+ }>>[];
1089
+ metadata: {
1090
+ openapi: {
1091
+ operationId: string;
1092
+ summary: string;
1093
+ description: string;
1094
+ responses: {
1095
+ 200: {
1096
+ description: string;
1097
+ content: {
1098
+ "application/json": {
1099
+ schema: {
1100
+ type: "object";
1101
+ properties: {
1102
+ user: {
1103
+ $ref: string;
1104
+ };
1105
+ };
1106
+ };
1107
+ };
1108
+ };
1109
+ };
1110
+ };
1111
+ };
1112
+ };
1113
+ }, {
1114
+ user: import("better-auth/plugins").UserWithRole;
1115
+ }>;
1116
+ banUser: import("better-auth").StrictEndpoint<"/admin/ban-user", {
1117
+ method: "POST";
1118
+ body: import("zod").ZodObject<{
1119
+ userId: import("zod").ZodCoercedString<unknown>;
1120
+ banReason: import("zod").ZodOptional<import("zod").ZodString>;
1121
+ banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
1122
+ }, import("zod/v4/core").$strip>;
1123
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1124
+ session: {
1125
+ user: import("better-auth/plugins").UserWithRole;
1126
+ session: {
1127
+ id: string;
1128
+ createdAt: Date;
1129
+ updatedAt: Date;
1130
+ userId: string;
1131
+ expiresAt: Date;
1132
+ token: string;
1133
+ ipAddress?: string | null | undefined;
1134
+ userAgent?: string | null | undefined;
1135
+ };
1136
+ };
1137
+ }>>[];
1138
+ metadata: {
1139
+ openapi: {
1140
+ operationId: string;
1141
+ summary: string;
1142
+ description: string;
1143
+ responses: {
1144
+ 200: {
1145
+ description: string;
1146
+ content: {
1147
+ "application/json": {
1148
+ schema: {
1149
+ type: "object";
1150
+ properties: {
1151
+ user: {
1152
+ $ref: string;
1153
+ };
1154
+ };
1155
+ };
1156
+ };
1157
+ };
1158
+ };
1159
+ };
1160
+ };
1161
+ };
1162
+ }, {
1163
+ user: import("better-auth/plugins").UserWithRole;
1164
+ }>;
1165
+ impersonateUser: import("better-auth").StrictEndpoint<"/admin/impersonate-user", {
1166
+ method: "POST";
1167
+ body: import("zod").ZodObject<{
1168
+ userId: import("zod").ZodCoercedString<unknown>;
1169
+ }, import("zod/v4/core").$strip>;
1170
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1171
+ session: {
1172
+ user: import("better-auth/plugins").UserWithRole;
1173
+ session: {
1174
+ id: string;
1175
+ createdAt: Date;
1176
+ updatedAt: Date;
1177
+ userId: string;
1178
+ expiresAt: Date;
1179
+ token: string;
1180
+ ipAddress?: string | null | undefined;
1181
+ userAgent?: string | null | undefined;
1182
+ };
1183
+ };
1184
+ }>>[];
1185
+ metadata: {
1186
+ openapi: {
1187
+ operationId: string;
1188
+ summary: string;
1189
+ description: string;
1190
+ responses: {
1191
+ 200: {
1192
+ description: string;
1193
+ content: {
1194
+ "application/json": {
1195
+ schema: {
1196
+ type: "object";
1197
+ properties: {
1198
+ session: {
1199
+ $ref: string;
1200
+ };
1201
+ user: {
1202
+ $ref: string;
1203
+ };
1204
+ };
1205
+ };
1206
+ };
1207
+ };
1208
+ };
1209
+ };
1210
+ };
1211
+ };
1212
+ }, {
1213
+ session: {
1214
+ id: string;
1215
+ createdAt: Date;
1216
+ updatedAt: Date;
1217
+ userId: string;
1218
+ expiresAt: Date;
1219
+ token: string;
1220
+ ipAddress?: string | null | undefined;
1221
+ userAgent?: string | null | undefined;
1222
+ };
1223
+ user: import("better-auth/plugins").UserWithRole;
1224
+ }>;
1225
+ stopImpersonating: import("better-auth").StrictEndpoint<"/admin/stop-impersonating", {
1226
+ method: "POST";
1227
+ requireHeaders: true;
1228
+ }, {
1229
+ session: {
1230
+ id: string;
1231
+ createdAt: Date;
1232
+ updatedAt: Date;
1233
+ userId: string;
1234
+ expiresAt: Date;
1235
+ token: string;
1236
+ ipAddress?: string | null | undefined;
1237
+ userAgent?: string | null | undefined;
1238
+ } & Record<string, any>;
1239
+ user: {
1240
+ id: string;
1241
+ createdAt: Date;
1242
+ updatedAt: Date;
1243
+ email: string;
1244
+ emailVerified: boolean;
1245
+ name: string;
1246
+ image?: string | null | undefined;
1247
+ } & Record<string, any>;
1248
+ }>;
1249
+ revokeUserSession: import("better-auth").StrictEndpoint<"/admin/revoke-user-session", {
1250
+ method: "POST";
1251
+ body: import("zod").ZodObject<{
1252
+ sessionToken: import("zod").ZodString;
1253
+ }, import("zod/v4/core").$strip>;
1254
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1255
+ session: {
1256
+ user: import("better-auth/plugins").UserWithRole;
1257
+ session: {
1258
+ id: string;
1259
+ createdAt: Date;
1260
+ updatedAt: Date;
1261
+ userId: string;
1262
+ expiresAt: Date;
1263
+ token: string;
1264
+ ipAddress?: string | null | undefined;
1265
+ userAgent?: string | null | undefined;
1266
+ };
1267
+ };
1268
+ }>>[];
1269
+ metadata: {
1270
+ openapi: {
1271
+ operationId: string;
1272
+ summary: string;
1273
+ description: string;
1274
+ responses: {
1275
+ 200: {
1276
+ description: string;
1277
+ content: {
1278
+ "application/json": {
1279
+ schema: {
1280
+ type: "object";
1281
+ properties: {
1282
+ success: {
1283
+ type: string;
1284
+ };
1285
+ };
1286
+ };
1287
+ };
1288
+ };
1289
+ };
1290
+ };
1291
+ };
1292
+ };
1293
+ }, {
1294
+ success: boolean;
1295
+ }>;
1296
+ revokeUserSessions: import("better-auth").StrictEndpoint<"/admin/revoke-user-sessions", {
1297
+ method: "POST";
1298
+ body: import("zod").ZodObject<{
1299
+ userId: import("zod").ZodCoercedString<unknown>;
1300
+ }, import("zod/v4/core").$strip>;
1301
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1302
+ session: {
1303
+ user: import("better-auth/plugins").UserWithRole;
1304
+ session: {
1305
+ id: string;
1306
+ createdAt: Date;
1307
+ updatedAt: Date;
1308
+ userId: string;
1309
+ expiresAt: Date;
1310
+ token: string;
1311
+ ipAddress?: string | null | undefined;
1312
+ userAgent?: string | null | undefined;
1313
+ };
1314
+ };
1315
+ }>>[];
1316
+ metadata: {
1317
+ openapi: {
1318
+ operationId: string;
1319
+ summary: string;
1320
+ description: string;
1321
+ responses: {
1322
+ 200: {
1323
+ description: string;
1324
+ content: {
1325
+ "application/json": {
1326
+ schema: {
1327
+ type: "object";
1328
+ properties: {
1329
+ success: {
1330
+ type: string;
1331
+ };
1332
+ };
1333
+ };
1334
+ };
1335
+ };
1336
+ };
1337
+ };
1338
+ };
1339
+ };
1340
+ }, {
1341
+ success: boolean;
1342
+ }>;
1343
+ removeUser: import("better-auth").StrictEndpoint<"/admin/remove-user", {
1344
+ method: "POST";
1345
+ body: import("zod").ZodObject<{
1346
+ userId: import("zod").ZodCoercedString<unknown>;
1347
+ }, import("zod/v4/core").$strip>;
1348
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1349
+ session: {
1350
+ user: import("better-auth/plugins").UserWithRole;
1351
+ session: {
1352
+ id: string;
1353
+ createdAt: Date;
1354
+ updatedAt: Date;
1355
+ userId: string;
1356
+ expiresAt: Date;
1357
+ token: string;
1358
+ ipAddress?: string | null | undefined;
1359
+ userAgent?: string | null | undefined;
1360
+ };
1361
+ };
1362
+ }>>[];
1363
+ metadata: {
1364
+ openapi: {
1365
+ operationId: string;
1366
+ summary: string;
1367
+ description: string;
1368
+ responses: {
1369
+ 200: {
1370
+ description: string;
1371
+ content: {
1372
+ "application/json": {
1373
+ schema: {
1374
+ type: "object";
1375
+ properties: {
1376
+ success: {
1377
+ type: string;
1378
+ };
1379
+ };
1380
+ };
1381
+ };
1382
+ };
1383
+ };
1384
+ };
1385
+ };
1386
+ };
1387
+ }, {
1388
+ success: boolean;
1389
+ }>;
1390
+ setUserPassword: import("better-auth").StrictEndpoint<"/admin/set-user-password", {
1391
+ method: "POST";
1392
+ body: import("zod").ZodObject<{
1393
+ newPassword: import("zod").ZodString;
1394
+ userId: import("zod").ZodCoercedString<unknown>;
1395
+ }, import("zod/v4/core").$strip>;
1396
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1397
+ session: {
1398
+ user: import("better-auth/plugins").UserWithRole;
1399
+ session: {
1400
+ id: string;
1401
+ createdAt: Date;
1402
+ updatedAt: Date;
1403
+ userId: string;
1404
+ expiresAt: Date;
1405
+ token: string;
1406
+ ipAddress?: string | null | undefined;
1407
+ userAgent?: string | null | undefined;
1408
+ };
1409
+ };
1410
+ }>>[];
1411
+ metadata: {
1412
+ openapi: {
1413
+ operationId: string;
1414
+ summary: string;
1415
+ description: string;
1416
+ responses: {
1417
+ 200: {
1418
+ description: string;
1419
+ content: {
1420
+ "application/json": {
1421
+ schema: {
1422
+ type: "object";
1423
+ properties: {
1424
+ status: {
1425
+ type: string;
1426
+ };
1427
+ };
1428
+ };
1429
+ };
1430
+ };
1431
+ };
1432
+ };
1433
+ };
1434
+ };
1435
+ }, {
1436
+ status: boolean;
1437
+ }>;
1438
+ userHasPermission: import("better-auth").StrictEndpoint<"/admin/has-permission", {
1439
+ method: "POST";
1440
+ body: import("zod").ZodIntersection<import("zod").ZodObject<{
1441
+ userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
1442
+ role: import("zod").ZodOptional<import("zod").ZodString>;
1443
+ }, import("zod/v4/core").$strip>, import("zod").ZodXor<readonly [import("zod").ZodObject<{
1444
+ permission: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
1445
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1446
+ permissions: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
1447
+ }, import("zod/v4/core").$strip>]>>;
1448
+ metadata: {
1449
+ openapi: {
1450
+ description: string;
1451
+ requestBody: {
1452
+ content: {
1453
+ "application/json": {
1454
+ schema: {
1455
+ type: "object";
1456
+ properties: {
1457
+ permissions: {
1458
+ type: string;
1459
+ description: string;
1460
+ };
1461
+ };
1462
+ required: string[];
1463
+ };
1464
+ };
1465
+ };
1466
+ };
1467
+ responses: {
1468
+ "200": {
1469
+ description: string;
1470
+ content: {
1471
+ "application/json": {
1472
+ schema: {
1473
+ type: "object";
1474
+ properties: {
1475
+ error: {
1476
+ type: string;
1477
+ };
1478
+ success: {
1479
+ type: string;
1480
+ };
1481
+ };
1482
+ required: string[];
1483
+ };
1484
+ };
1485
+ };
1486
+ };
1487
+ };
1488
+ };
1489
+ $Infer: {
1490
+ body: {
1491
+ permissions: {
1492
+ readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "delete" | "set-password" | "set-email" | "get" | "update")[] | undefined;
1493
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
1494
+ };
1495
+ } & {
1496
+ userId?: string | undefined;
1497
+ role?: "user" | "admin" | undefined;
1498
+ };
1499
+ };
1500
+ };
1501
+ }, {
1502
+ error: null;
1503
+ success: boolean;
1504
+ }>;
1505
+ };
1506
+ $ERROR_CODES: {
1507
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
1508
+ FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
1509
+ USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
1510
+ YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
1511
+ YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
1512
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
1513
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
1514
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
1515
+ YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
1516
+ YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
1517
+ YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
1518
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
1519
+ YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
1520
+ BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
1521
+ YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
1522
+ NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
1523
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
1524
+ YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
1525
+ YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
1526
+ YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
1527
+ INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
1528
+ YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
1529
+ PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: import("better-auth").RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
1530
+ };
1531
+ schema: {
1532
+ user: {
1533
+ fields: {
1534
+ role: {
1535
+ type: "string";
1536
+ required: false;
1537
+ input: false;
1538
+ };
1539
+ banned: {
1540
+ type: "boolean";
1541
+ defaultValue: false;
1542
+ required: false;
1543
+ input: false;
1544
+ };
1545
+ banReason: {
1546
+ type: "string";
1547
+ required: false;
1548
+ input: false;
1549
+ };
1550
+ banExpires: {
1551
+ type: "date";
1552
+ required: false;
1553
+ input: false;
1554
+ };
1555
+ };
1556
+ };
1557
+ session: {
1558
+ fields: {
1559
+ impersonatedBy: {
1560
+ type: "string";
1561
+ required: false;
1562
+ input: false;
1563
+ };
1564
+ };
1565
+ };
1566
+ };
1567
+ options: NoInfer<{
1568
+ ac: {
1569
+ newRole<const TRoleStatements extends import("better-auth/plugins").Statements>(statements: import("better-auth/plugins").RoleInput<{
1570
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
1571
+ readonly session: readonly ["list", "revoke", "delete"];
1572
+ }, TRoleStatements>): import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<TRoleStatements>, {
1573
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
1574
+ readonly session: readonly ["list", "revoke", "delete"];
1575
+ }>;
1576
+ statements: {
1577
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
1578
+ readonly session: readonly ["list", "revoke", "delete"];
1579
+ };
1580
+ };
1581
+ roles: {
1582
+ admin: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<{
1583
+ readonly user: ["list", "get", "set-role", "ban", "delete"];
1584
+ readonly session: ["list", "revoke"];
1585
+ }>, {
1586
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
1587
+ readonly session: readonly ["list", "revoke", "delete"];
1588
+ }>;
1589
+ user: import("better-auth/plugins").Role<import("better-auth/plugins").ExactRoleStatements<{
1590
+ readonly user: [];
1591
+ readonly session: [];
1592
+ }>, {
1593
+ readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "set-email", "get", "update"];
1594
+ readonly session: readonly ["list", "revoke", "delete"];
1595
+ }>;
1596
+ };
1597
+ }>;
1598
+ }, {
1599
+ id: "sveltekit-cookies";
1600
+ version: string;
1601
+ hooks: {
1602
+ after: {
1603
+ matcher(): true;
1604
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>;
1605
+ }[];
1606
+ };
1607
+ }];
1608
+ appName?: string | undefined;
1609
+ baseURL?: import("better-auth").BaseURLConfig | undefined;
1610
+ basePath?: string | undefined;
1611
+ secret?: string | undefined;
1612
+ secrets?: Array<{
1613
+ version: number;
1614
+ value: string;
1615
+ }> | undefined;
1616
+ database?: (any) | undefined;
1617
+ secondaryStorage?: import("better-auth").SecondaryStorage | undefined;
1618
+ emailVerification?: {
1619
+ sendVerificationEmail?: (data: {
1620
+ user: import("better-auth").User;
1621
+ url: string;
1622
+ token: string;
1623
+ }, request?: Request) => Promise<void>;
1624
+ sendOnSignUp?: boolean;
1625
+ sendOnSignIn?: boolean;
1626
+ autoSignInAfterVerification?: boolean;
1627
+ expiresIn?: number;
1628
+ beforeEmailVerification?: (user: import("better-auth").User, request?: Request) => Promise<void>;
1629
+ afterEmailVerification?: (user: import("better-auth").User, request?: Request) => Promise<void>;
1630
+ } | undefined;
1631
+ emailAndPassword?: {
1632
+ enabled: boolean;
1633
+ disableSignUp?: boolean;
1634
+ requireEmailVerification?: boolean;
1635
+ maxPasswordLength?: number;
1636
+ minPasswordLength?: number;
1637
+ sendResetPassword?: (data: {
1638
+ user: import("better-auth").User;
1639
+ url: string;
1640
+ token: string;
1641
+ }, request?: Request) => Promise<void>;
1642
+ resetPasswordTokenExpiresIn?: number;
1643
+ onPasswordReset?: (data: {
1644
+ user: import("better-auth").User;
1645
+ }, request?: Request) => Promise<void>;
1646
+ password?: {
1647
+ hash?: (password: string) => Promise<string>;
1648
+ verify?: (data: {
1649
+ hash: string;
1650
+ password: string;
1651
+ }) => Promise<boolean>;
1652
+ };
1653
+ autoSignIn?: boolean;
1654
+ revokeSessionsOnPasswordReset?: boolean;
1655
+ onExistingUserSignUp?: (data: {
1656
+ user: import("better-auth").User;
1657
+ }, request?: Request) => Promise<void>;
1658
+ customSyntheticUser?: (params: {
1659
+ coreFields: {
1660
+ name: string;
1661
+ email: string;
1662
+ emailVerified: boolean;
1663
+ image: string | null;
1664
+ createdAt: Date;
1665
+ updatedAt: Date;
1666
+ };
1667
+ additionalFields: Record<string, unknown>;
1668
+ id: string;
1669
+ }) => Record<string, unknown>;
1670
+ } | undefined;
1671
+ socialProviders?: import("better-auth").SocialProviders | undefined;
1672
+ user?: (import("better-auth").BetterAuthDBOptions<"user", keyof import("better-auth").BaseUser> & {
1673
+ validateUserInfo?: (data: {
1674
+ user: Partial<import("better-auth").User> & Record<string, unknown>;
1675
+ source: import("better-auth").ValidateUserInfoSource;
1676
+ }, context: import("better-auth").GenericEndpointContext) => import("better-auth").Awaitable<void | import("better-auth").ValidateUserInfoResult>;
1677
+ changeEmail?: {
1678
+ enabled: boolean;
1679
+ sendChangeEmailConfirmation?: (data: {
1680
+ user: import("better-auth").User;
1681
+ newEmail: string;
1682
+ url: string;
1683
+ token: string;
1684
+ }, request?: Request) => Promise<void>;
1685
+ updateEmailWithoutVerification?: boolean;
1686
+ };
1687
+ deleteUser?: {
1688
+ enabled?: boolean;
1689
+ sendDeleteAccountVerification?: (data: {
1690
+ user: import("better-auth").User;
1691
+ url: string;
1692
+ token: string;
1693
+ }, request?: Request) => Promise<void>;
1694
+ beforeDelete?: (user: import("better-auth").User, request?: Request) => Promise<void>;
1695
+ afterDelete?: (user: import("better-auth").User, request?: Request) => Promise<void>;
1696
+ deleteTokenExpiresIn?: number;
1697
+ };
1698
+ }) | undefined;
1699
+ session?: (import("better-auth").BetterAuthDBOptions<"session", keyof import("better-auth").BaseSession> & {
1700
+ expiresIn?: number;
1701
+ updateAge?: number;
1702
+ disableSessionRefresh?: boolean;
1703
+ deferSessionRefresh?: boolean;
1704
+ storeSessionInDatabase?: boolean;
1705
+ preserveSessionInDatabase?: boolean;
1706
+ cookieCache?: {
1707
+ maxAge?: number;
1708
+ enabled?: boolean;
1709
+ strategy?: "compact" | "jwt" | "jwe";
1710
+ refreshCache?: boolean | {
1711
+ updateAge?: number;
1712
+ };
1713
+ version?: string | ((session: import("better-auth").Session & Record<string, any>, user: import("better-auth").User & Record<string, any>) => string) | ((session: import("better-auth").Session & Record<string, any>, user: import("better-auth").User & Record<string, any>) => Promise<string>);
1714
+ };
1715
+ freshAge?: number;
1716
+ }) | undefined;
1717
+ account?: (import("better-auth").BetterAuthDBOptions<"account", keyof import("better-auth").BaseAccount> & {
1718
+ updateAccountOnSignIn?: boolean;
1719
+ accountLinking?: {
1720
+ enabled?: boolean;
1721
+ disableImplicitLinking?: boolean;
1722
+ requireLocalEmailVerified?: boolean;
1723
+ trustedProviders?: Array<import("better-auth").LiteralUnion<import("better-auth").SocialProviderList[number] | "email-password", string>> | ((request?: Request | undefined) => import("better-auth").Awaitable<Array<import("better-auth").LiteralUnion<import("better-auth").SocialProviderList[number] | "email-password", string>>>);
1724
+ allowDifferentEmails?: boolean;
1725
+ allowUnlinkingAll?: boolean;
1726
+ updateUserInfoOnLink?: boolean;
1727
+ };
1728
+ encryptOAuthTokens?: boolean;
1729
+ skipStateCookieCheck?: boolean;
1730
+ storeStateStrategy?: "database" | "cookie";
1731
+ storeAccountCookie?: boolean;
1732
+ }) | undefined;
1733
+ verification?: (import("better-auth").BetterAuthDBOptions<"verification", keyof import("better-auth").BaseVerification> & {
1734
+ disableCleanup?: boolean;
1735
+ storeIdentifier?: import("better-auth").StoreIdentifierOption | {
1736
+ default: import("better-auth").StoreIdentifierOption;
1737
+ overrides?: Record<string, import("better-auth").StoreIdentifierOption>;
1738
+ };
1739
+ storeInDatabase?: boolean;
1740
+ }) | undefined;
1741
+ trustedOrigins?: (string[] | ((request?: Request | undefined) => import("better-auth").Awaitable<(string | undefined | null)[]>)) | undefined;
1742
+ rateLimit?: import("better-auth").BetterAuthRateLimitOptions | undefined;
1743
+ advanced?: import("better-auth").BetterAuthAdvancedOptions | undefined;
1744
+ logger?: import("better-auth").Logger | undefined;
1745
+ databaseHooks?: {
1746
+ user?: {
1747
+ create?: {
1748
+ before?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
1749
+ data: {
1750
+ id?: string | undefined;
1751
+ createdAt?: Date | undefined;
1752
+ updatedAt?: Date | undefined;
1753
+ email?: string | undefined;
1754
+ emailVerified?: boolean | undefined;
1755
+ name?: string | undefined;
1756
+ image?: string | null | undefined;
1757
+ } & Record<string, any>;
1758
+ }>;
1759
+ after?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1760
+ };
1761
+ update?: {
1762
+ before?: (user: Partial<import("better-auth").User> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
1763
+ data: {
1764
+ [x: string]: any;
1765
+ id?: string | undefined;
1766
+ createdAt?: Date | undefined;
1767
+ updatedAt?: Date | undefined;
1768
+ email?: string | undefined;
1769
+ emailVerified?: boolean | undefined;
1770
+ name?: string | undefined;
1771
+ image?: string | null | undefined;
1772
+ };
1773
+ }>;
1774
+ after?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1775
+ };
1776
+ delete?: {
1777
+ before?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
1778
+ after?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1779
+ };
1780
+ };
1781
+ session?: {
1782
+ create?: {
1783
+ before?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
1784
+ data: {
1785
+ id?: string | undefined;
1786
+ createdAt?: Date | undefined;
1787
+ updatedAt?: Date | undefined;
1788
+ userId?: string | undefined;
1789
+ expiresAt?: Date | undefined;
1790
+ token?: string | undefined;
1791
+ ipAddress?: string | null | undefined;
1792
+ userAgent?: string | null | undefined;
1793
+ } & Record<string, any>;
1794
+ }>;
1795
+ after?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1796
+ };
1797
+ update?: {
1798
+ before?: (session: Partial<import("better-auth").Session> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
1799
+ data: {
1800
+ [x: string]: any;
1801
+ id?: string | undefined;
1802
+ createdAt?: Date | undefined;
1803
+ updatedAt?: Date | undefined;
1804
+ userId?: string | undefined;
1805
+ expiresAt?: Date | undefined;
1806
+ token?: string | undefined;
1807
+ ipAddress?: string | null | undefined;
1808
+ userAgent?: string | null | undefined;
1809
+ };
1810
+ }>;
1811
+ after?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1812
+ };
1813
+ delete?: {
1814
+ before?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
1815
+ after?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1816
+ };
1817
+ };
1818
+ account?: {
1819
+ create?: {
1820
+ before?: (account: import("better-auth").Account, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
1821
+ data: {
1822
+ id?: string | undefined;
1823
+ createdAt?: Date | undefined;
1824
+ updatedAt?: Date | undefined;
1825
+ providerId?: string | undefined;
1826
+ accountId?: string | undefined;
1827
+ userId?: string | undefined;
1828
+ accessToken?: string | null | undefined;
1829
+ refreshToken?: string | null | undefined;
1830
+ idToken?: string | null | undefined;
1831
+ accessTokenExpiresAt?: Date | null | undefined;
1832
+ refreshTokenExpiresAt?: Date | null | undefined;
1833
+ scope?: string | null | undefined;
1834
+ password?: string | null | undefined;
1835
+ } & Record<string, any>;
1836
+ }>;
1837
+ after?: (account: import("better-auth").Account, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1838
+ };
1839
+ update?: {
1840
+ before?: (account: Partial<import("better-auth").Account> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
1841
+ data: {
1842
+ [x: string]: any;
1843
+ id?: string | undefined;
1844
+ createdAt?: Date | undefined;
1845
+ updatedAt?: Date | undefined;
1846
+ providerId?: string | undefined;
1847
+ accountId?: string | undefined;
1848
+ userId?: string | undefined;
1849
+ accessToken?: string | null | undefined;
1850
+ refreshToken?: string | null | undefined;
1851
+ idToken?: string | null | undefined;
1852
+ accessTokenExpiresAt?: Date | null | undefined;
1853
+ refreshTokenExpiresAt?: Date | null | undefined;
1854
+ scope?: string | null | undefined;
1855
+ password?: string | null | undefined;
1856
+ };
1857
+ }>;
1858
+ after?: (account: import("better-auth").Account & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1859
+ };
1860
+ delete?: {
1861
+ before?: (account: import("better-auth").Account & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
1862
+ after?: (account: import("better-auth").Account & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1863
+ };
1864
+ };
1865
+ verification?: {
1866
+ create?: {
1867
+ before?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
1868
+ data: {
1869
+ id?: string | undefined;
1870
+ createdAt?: Date | undefined;
1871
+ updatedAt?: Date | undefined;
1872
+ value?: string | undefined;
1873
+ expiresAt?: Date | undefined;
1874
+ identifier?: string | undefined;
1875
+ } & Record<string, any>;
1876
+ }>;
1877
+ after?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1878
+ };
1879
+ update?: {
1880
+ before?: (verification: Partial<import("better-auth").Verification> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
1881
+ data: {
1882
+ [x: string]: any;
1883
+ id?: string | undefined;
1884
+ createdAt?: Date | undefined;
1885
+ updatedAt?: Date | undefined;
1886
+ value?: string | undefined;
1887
+ expiresAt?: Date | undefined;
1888
+ identifier?: string | undefined;
1889
+ };
1890
+ }>;
1891
+ after?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1892
+ };
1893
+ delete?: {
1894
+ before?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
1895
+ after?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
1896
+ };
1897
+ };
1898
+ } | undefined;
1899
+ onAPIError?: {
1900
+ throw?: boolean;
1901
+ onError?: (error: unknown, ctx: import("better-auth").AuthContext) => void | Promise<void>;
1902
+ errorURL?: string;
1903
+ customizeDefaultErrorPage?: {
1904
+ colors?: {
1905
+ background?: string;
1906
+ foreground?: string;
1907
+ primary?: string;
1908
+ primaryForeground?: string;
1909
+ mutedForeground?: string;
1910
+ border?: string;
1911
+ destructive?: string;
1912
+ titleBorder?: string;
1913
+ titleColor?: string;
1914
+ gridColor?: string;
1915
+ cardBackground?: string;
1916
+ cornerBorder?: string;
1917
+ };
1918
+ size?: {
1919
+ radiusSm?: string;
1920
+ radiusMd?: string;
1921
+ radiusLg?: string;
1922
+ textSm?: string;
1923
+ text2xl?: string;
1924
+ text4xl?: string;
1925
+ text6xl?: string;
1926
+ };
1927
+ font?: {
1928
+ defaultFamily?: string;
1929
+ monoFamily?: string;
1930
+ };
1931
+ disableTitleBorder?: boolean;
1932
+ disableCornerDecorations?: boolean;
1933
+ disableBackgroundGrid?: boolean;
1934
+ };
1935
+ } | undefined;
1936
+ hooks?: {
1937
+ before?: import("better-auth/api").AuthMiddleware;
1938
+ after?: import("better-auth/api").AuthMiddleware;
1939
+ } | undefined;
1940
+ disabledPaths?: string[] | undefined;
1941
+ telemetry?: {
1942
+ enabled?: boolean;
1943
+ debug?: boolean;
1944
+ } | undefined;
1945
+ experimental?: {
1946
+ instrumentation?: {
1947
+ enabled?: boolean | undefined;
1948
+ } | undefined;
1949
+ } | undefined;
1950
+ }>;
1951
+ };