@delmaredigital/payload-better-auth 0.3.6 → 0.3.7

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.
@@ -5,15 +5,2369 @@
5
5
  export { createAuthClient } from 'better-auth/react';
6
6
  export { twoFactorClient, apiKeyClient } from 'better-auth/client/plugins';
7
7
  export { passkeyClient } from '@better-auth/passkey/client';
8
+ /**
9
+ * Default plugins included with Payload Better Auth.
10
+ * Use this with createAuthClient when you need custom plugins with full type safety.
11
+ *
12
+ * @example With custom plugins (full type safety)
13
+ * ```typescript
14
+ * import { createAuthClient, payloadAuthPlugins } from '@delmaredigital/payload-better-auth/client'
15
+ * import { stripeClient } from '@better-auth/stripe/client'
16
+ *
17
+ * export const authClient = createAuthClient({
18
+ * plugins: [...payloadAuthPlugins, stripeClient({ subscription: true })],
19
+ * })
20
+ *
21
+ * // authClient.subscription is fully typed!
22
+ * ```
23
+ */
24
+ export declare const payloadAuthPlugins: readonly [{
25
+ id: "two-factor";
26
+ $InferServerPlugin: ReturnType<(<O extends import("better-auth/plugins").TwoFactorOptions>(options?: O) => {
27
+ id: "two-factor";
28
+ endpoints: {
29
+ enableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/enable", {
30
+ method: "POST";
31
+ body: import("better-auth").ZodObject<{
32
+ password: import("better-auth").ZodString;
33
+ issuer: import("better-auth").ZodOptional<import("better-auth").ZodString>;
34
+ }, import("better-auth").$strip>;
35
+ use: ((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
+ totpURI: {
71
+ type: string;
72
+ description: string;
73
+ };
74
+ backupCodes: {
75
+ type: string;
76
+ items: {
77
+ type: string;
78
+ };
79
+ description: string;
80
+ };
81
+ };
82
+ };
83
+ };
84
+ };
85
+ };
86
+ };
87
+ };
88
+ };
89
+ }, {
90
+ totpURI: string;
91
+ backupCodes: string[];
92
+ }>;
93
+ disableTwoFactor: import("better-auth").StrictEndpoint<"/two-factor/disable", {
94
+ method: "POST";
95
+ body: import("better-auth").ZodObject<{
96
+ password: import("better-auth").ZodString;
97
+ }, import("better-auth").$strip>;
98
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
99
+ session: {
100
+ session: Record<string, any> & {
101
+ id: string;
102
+ createdAt: Date;
103
+ updatedAt: Date;
104
+ userId: string;
105
+ expiresAt: Date;
106
+ token: string;
107
+ ipAddress?: string | null | undefined;
108
+ userAgent?: string | null | undefined;
109
+ };
110
+ user: Record<string, any> & {
111
+ id: string;
112
+ createdAt: Date;
113
+ updatedAt: Date;
114
+ email: string;
115
+ emailVerified: boolean;
116
+ name: string;
117
+ image?: string | null | undefined;
118
+ };
119
+ };
120
+ }>)[];
121
+ metadata: {
122
+ openapi: {
123
+ summary: string;
124
+ description: string;
125
+ responses: {
126
+ 200: {
127
+ description: string;
128
+ content: {
129
+ "application/json": {
130
+ schema: {
131
+ type: "object";
132
+ properties: {
133
+ status: {
134
+ type: string;
135
+ };
136
+ };
137
+ };
138
+ };
139
+ };
140
+ };
141
+ };
142
+ };
143
+ };
144
+ }, {
145
+ status: boolean;
146
+ }>;
147
+ verifyBackupCode: import("better-auth").StrictEndpoint<"/two-factor/verify-backup-code", {
148
+ method: "POST";
149
+ body: import("better-auth").ZodObject<{
150
+ code: import("better-auth").ZodString;
151
+ disableSession: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
152
+ trustDevice: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
153
+ }, import("better-auth").$strip>;
154
+ metadata: {
155
+ openapi: {
156
+ description: string;
157
+ responses: {
158
+ "200": {
159
+ description: string;
160
+ content: {
161
+ "application/json": {
162
+ schema: {
163
+ type: "object";
164
+ properties: {
165
+ user: {
166
+ type: string;
167
+ properties: {
168
+ id: {
169
+ type: string;
170
+ description: string;
171
+ };
172
+ email: {
173
+ type: string;
174
+ format: string;
175
+ nullable: boolean;
176
+ description: string;
177
+ };
178
+ emailVerified: {
179
+ type: string;
180
+ nullable: boolean;
181
+ description: string;
182
+ };
183
+ name: {
184
+ type: string;
185
+ nullable: boolean;
186
+ description: string;
187
+ };
188
+ image: {
189
+ type: string;
190
+ format: string;
191
+ nullable: boolean;
192
+ description: string;
193
+ };
194
+ twoFactorEnabled: {
195
+ type: string;
196
+ description: string;
197
+ };
198
+ createdAt: {
199
+ type: string;
200
+ format: string;
201
+ description: string;
202
+ };
203
+ updatedAt: {
204
+ type: string;
205
+ format: string;
206
+ description: string;
207
+ };
208
+ };
209
+ required: string[];
210
+ description: string;
211
+ };
212
+ session: {
213
+ type: string;
214
+ properties: {
215
+ token: {
216
+ type: string;
217
+ description: string;
218
+ };
219
+ userId: {
220
+ type: string;
221
+ description: string;
222
+ };
223
+ createdAt: {
224
+ type: string;
225
+ format: string;
226
+ description: string;
227
+ };
228
+ expiresAt: {
229
+ type: string;
230
+ format: string;
231
+ description: string;
232
+ };
233
+ };
234
+ required: string[];
235
+ description: string;
236
+ };
237
+ };
238
+ required: string[];
239
+ };
240
+ };
241
+ };
242
+ };
243
+ };
244
+ };
245
+ };
246
+ }, {
247
+ token: string | undefined;
248
+ user: (Record<string, any> & {
249
+ id: string;
250
+ createdAt: Date;
251
+ updatedAt: Date;
252
+ email: string;
253
+ emailVerified: boolean;
254
+ name: string;
255
+ image?: string | null | undefined;
256
+ }) | import("better-auth/plugins").UserWithTwoFactor;
257
+ }>;
258
+ generateBackupCodes: import("better-auth").StrictEndpoint<"/two-factor/generate-backup-codes", {
259
+ method: "POST";
260
+ body: import("better-auth").ZodObject<{
261
+ password: import("better-auth").ZodString;
262
+ }, import("better-auth").$strip>;
263
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
264
+ session: {
265
+ session: Record<string, any> & {
266
+ id: string;
267
+ createdAt: Date;
268
+ updatedAt: Date;
269
+ userId: string;
270
+ expiresAt: Date;
271
+ token: string;
272
+ ipAddress?: string | null | undefined;
273
+ userAgent?: string | null | undefined;
274
+ };
275
+ user: Record<string, any> & {
276
+ id: string;
277
+ createdAt: Date;
278
+ updatedAt: Date;
279
+ email: string;
280
+ emailVerified: boolean;
281
+ name: string;
282
+ image?: string | null | undefined;
283
+ };
284
+ };
285
+ }>)[];
286
+ metadata: {
287
+ openapi: {
288
+ description: string;
289
+ responses: {
290
+ "200": {
291
+ description: string;
292
+ content: {
293
+ "application/json": {
294
+ schema: {
295
+ type: "object";
296
+ properties: {
297
+ status: {
298
+ type: string;
299
+ description: string;
300
+ enum: boolean[];
301
+ };
302
+ backupCodes: {
303
+ type: string;
304
+ items: {
305
+ type: string;
306
+ };
307
+ description: string;
308
+ };
309
+ };
310
+ required: string[];
311
+ };
312
+ };
313
+ };
314
+ };
315
+ };
316
+ };
317
+ };
318
+ }, {
319
+ status: boolean;
320
+ backupCodes: string[];
321
+ }>;
322
+ viewBackupCodes: import("better-auth").StrictEndpoint<string, {
323
+ method: "POST";
324
+ body: import("better-auth").ZodObject<{
325
+ userId: import("better-auth").ZodCoercedString<unknown>;
326
+ }, import("better-auth").$strip>;
327
+ }, {
328
+ status: boolean;
329
+ backupCodes: string[];
330
+ }>;
331
+ sendTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/send-otp", {
332
+ method: "POST";
333
+ body: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
334
+ trustDevice: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
335
+ }, import("better-auth").$strip>>;
336
+ metadata: {
337
+ openapi: {
338
+ summary: string;
339
+ description: string;
340
+ responses: {
341
+ 200: {
342
+ description: string;
343
+ content: {
344
+ "application/json": {
345
+ schema: {
346
+ type: "object";
347
+ properties: {
348
+ status: {
349
+ type: string;
350
+ };
351
+ };
352
+ };
353
+ };
354
+ };
355
+ };
356
+ };
357
+ };
358
+ };
359
+ }, {
360
+ status: boolean;
361
+ }>;
362
+ verifyTwoFactorOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-otp", {
363
+ method: "POST";
364
+ body: import("better-auth").ZodObject<{
365
+ code: import("better-auth").ZodString;
366
+ trustDevice: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
367
+ }, import("better-auth").$strip>;
368
+ metadata: {
369
+ openapi: {
370
+ summary: string;
371
+ description: string;
372
+ responses: {
373
+ "200": {
374
+ description: string;
375
+ content: {
376
+ "application/json": {
377
+ schema: {
378
+ type: "object";
379
+ properties: {
380
+ token: {
381
+ type: string;
382
+ description: string;
383
+ };
384
+ user: {
385
+ type: string;
386
+ properties: {
387
+ id: {
388
+ type: string;
389
+ description: string;
390
+ };
391
+ email: {
392
+ type: string;
393
+ format: string;
394
+ nullable: boolean;
395
+ description: string;
396
+ };
397
+ emailVerified: {
398
+ type: string;
399
+ nullable: boolean;
400
+ description: string;
401
+ };
402
+ name: {
403
+ type: string;
404
+ nullable: boolean;
405
+ description: string;
406
+ };
407
+ image: {
408
+ type: string;
409
+ format: string;
410
+ nullable: boolean;
411
+ description: string;
412
+ };
413
+ createdAt: {
414
+ type: string;
415
+ format: string;
416
+ description: string;
417
+ };
418
+ updatedAt: {
419
+ type: string;
420
+ format: string;
421
+ description: string;
422
+ };
423
+ };
424
+ required: string[];
425
+ description: string;
426
+ };
427
+ };
428
+ required: string[];
429
+ };
430
+ };
431
+ };
432
+ };
433
+ };
434
+ };
435
+ };
436
+ }, {
437
+ token: string;
438
+ user: import("better-auth/plugins").UserWithTwoFactor;
439
+ } | {
440
+ token: string;
441
+ user: Record<string, any> & {
442
+ id: string;
443
+ createdAt: Date;
444
+ updatedAt: Date;
445
+ email: string;
446
+ emailVerified: boolean;
447
+ name: string;
448
+ image?: string | null | undefined;
449
+ };
450
+ }>;
451
+ generateTOTP: import("better-auth").StrictEndpoint<string, {
452
+ method: "POST";
453
+ body: import("better-auth").ZodObject<{
454
+ secret: import("better-auth").ZodString;
455
+ }, import("better-auth").$strip>;
456
+ metadata: {
457
+ openapi: {
458
+ summary: string;
459
+ description: string;
460
+ responses: {
461
+ 200: {
462
+ description: string;
463
+ content: {
464
+ "application/json": {
465
+ schema: {
466
+ type: "object";
467
+ properties: {
468
+ code: {
469
+ type: string;
470
+ };
471
+ };
472
+ };
473
+ };
474
+ };
475
+ };
476
+ };
477
+ };
478
+ };
479
+ }, {
480
+ code: string;
481
+ }>;
482
+ getTOTPURI: import("better-auth").StrictEndpoint<"/two-factor/get-totp-uri", {
483
+ method: "POST";
484
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
485
+ session: {
486
+ session: Record<string, any> & {
487
+ id: string;
488
+ createdAt: Date;
489
+ updatedAt: Date;
490
+ userId: string;
491
+ expiresAt: Date;
492
+ token: string;
493
+ ipAddress?: string | null | undefined;
494
+ userAgent?: string | null | undefined;
495
+ };
496
+ user: Record<string, any> & {
497
+ id: string;
498
+ createdAt: Date;
499
+ updatedAt: Date;
500
+ email: string;
501
+ emailVerified: boolean;
502
+ name: string;
503
+ image?: string | null | undefined;
504
+ };
505
+ };
506
+ }>)[];
507
+ body: import("better-auth").ZodObject<{
508
+ password: import("better-auth").ZodString;
509
+ }, import("better-auth").$strip>;
510
+ metadata: {
511
+ openapi: {
512
+ summary: string;
513
+ description: string;
514
+ responses: {
515
+ 200: {
516
+ description: string;
517
+ content: {
518
+ "application/json": {
519
+ schema: {
520
+ type: "object";
521
+ properties: {
522
+ totpURI: {
523
+ type: string;
524
+ };
525
+ };
526
+ };
527
+ };
528
+ };
529
+ };
530
+ };
531
+ };
532
+ };
533
+ }, {
534
+ totpURI: string;
535
+ }>;
536
+ verifyTOTP: import("better-auth").StrictEndpoint<"/two-factor/verify-totp", {
537
+ method: "POST";
538
+ body: import("better-auth").ZodObject<{
539
+ code: import("better-auth").ZodString;
540
+ trustDevice: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
541
+ }, import("better-auth").$strip>;
542
+ metadata: {
543
+ openapi: {
544
+ summary: string;
545
+ description: string;
546
+ responses: {
547
+ 200: {
548
+ description: string;
549
+ content: {
550
+ "application/json": {
551
+ schema: {
552
+ type: "object";
553
+ properties: {
554
+ status: {
555
+ type: string;
556
+ };
557
+ };
558
+ };
559
+ };
560
+ };
561
+ };
562
+ };
563
+ };
564
+ };
565
+ }, {
566
+ token: string;
567
+ user: import("better-auth/plugins").UserWithTwoFactor;
568
+ } | {
569
+ token: string;
570
+ user: Record<string, any> & {
571
+ id: string;
572
+ createdAt: Date;
573
+ updatedAt: Date;
574
+ email: string;
575
+ emailVerified: boolean;
576
+ name: string;
577
+ image?: string | null | undefined;
578
+ };
579
+ }>;
580
+ };
581
+ options: NoInfer<O>;
582
+ hooks: {
583
+ after: {
584
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
585
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
586
+ twoFactorRedirect: boolean;
587
+ } | undefined>;
588
+ }[];
589
+ };
590
+ schema: {
591
+ user: {
592
+ fields: {
593
+ twoFactorEnabled: {
594
+ type: "boolean";
595
+ required: false;
596
+ defaultValue: false;
597
+ input: false;
598
+ };
599
+ };
600
+ };
601
+ twoFactor: {
602
+ fields: {
603
+ secret: {
604
+ type: "string";
605
+ required: true;
606
+ returned: false;
607
+ index: true;
608
+ };
609
+ backupCodes: {
610
+ type: "string";
611
+ required: true;
612
+ returned: false;
613
+ };
614
+ userId: {
615
+ type: "string";
616
+ required: true;
617
+ returned: false;
618
+ references: {
619
+ model: string;
620
+ field: string;
621
+ };
622
+ index: true;
623
+ };
624
+ };
625
+ };
626
+ };
627
+ rateLimit: {
628
+ pathMatcher(path: string): boolean;
629
+ window: number;
630
+ max: number;
631
+ }[];
632
+ $ERROR_CODES: {
633
+ readonly OTP_NOT_ENABLED: "OTP not enabled";
634
+ readonly OTP_HAS_EXPIRED: "OTP has expired";
635
+ readonly TOTP_NOT_ENABLED: "TOTP not enabled";
636
+ readonly TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled";
637
+ readonly BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled";
638
+ readonly INVALID_BACKUP_CODE: "Invalid backup code";
639
+ readonly INVALID_CODE: "Invalid code";
640
+ readonly TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many attempts. Please request a new code.";
641
+ readonly INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie";
642
+ };
643
+ })>;
644
+ atomListeners: {
645
+ matcher: (path: string) => boolean;
646
+ signal: "$sessionSignal";
647
+ }[];
648
+ pathMethods: {
649
+ "/two-factor/disable": "POST";
650
+ "/two-factor/enable": "POST";
651
+ "/two-factor/send-otp": "POST";
652
+ "/two-factor/generate-backup-codes": "POST";
653
+ "/two-factor/get-totp-uri": "POST";
654
+ "/two-factor/verify-totp": "POST";
655
+ "/two-factor/verify-otp": "POST";
656
+ "/two-factor/verify-backup-code": "POST";
657
+ };
658
+ fetchPlugins: {
659
+ id: string;
660
+ name: string;
661
+ hooks: {
662
+ onSuccess(context: import("better-auth/react").SuccessContext<any>): Promise<void>;
663
+ };
664
+ }[];
665
+ }, {
666
+ id: "api-key";
667
+ $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins").ApiKeyOptions | undefined) => {
668
+ id: "api-key";
669
+ $ERROR_CODES: {
670
+ readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
671
+ readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
672
+ readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
673
+ readonly USER_BANNED: "User is banned";
674
+ readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
675
+ readonly KEY_NOT_FOUND: "API Key not found";
676
+ readonly KEY_DISABLED: "API Key is disabled";
677
+ readonly KEY_EXPIRED: "API Key has expired";
678
+ readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
679
+ readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
680
+ readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
681
+ readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
682
+ readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
683
+ readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
684
+ readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
685
+ readonly METADATA_DISABLED: "Metadata is disabled.";
686
+ readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
687
+ readonly NO_VALUES_TO_UPDATE: "No values to update.";
688
+ readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
689
+ readonly INVALID_API_KEY: "Invalid API key.";
690
+ readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
691
+ readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
692
+ readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
693
+ readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
694
+ readonly NAME_REQUIRED: "API Key name is required.";
695
+ };
696
+ hooks: {
697
+ before: {
698
+ matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
699
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
700
+ user: {
701
+ id: string;
702
+ createdAt: Date;
703
+ updatedAt: Date;
704
+ email: string;
705
+ emailVerified: boolean;
706
+ name: string;
707
+ image?: string | null | undefined;
708
+ };
709
+ session: {
710
+ id: string;
711
+ token: string;
712
+ userId: string;
713
+ userAgent: string | null;
714
+ ipAddress: string | null;
715
+ createdAt: Date;
716
+ updatedAt: Date;
717
+ expiresAt: Date;
718
+ };
719
+ } | {
720
+ context: import("better-auth").MiddlewareContext<import("better-auth").MiddlewareOptions, {
721
+ returned?: unknown | undefined;
722
+ responseHeaders?: Headers | undefined;
723
+ } & import("better-auth").PluginContext & import("better-auth").InfoContext & {
724
+ options: import("better-auth").BetterAuthOptions;
725
+ trustedOrigins: string[];
726
+ isTrustedOrigin: (url: string, settings?: {
727
+ allowRelativePaths: boolean;
728
+ }) => boolean;
729
+ oauthConfig: {
730
+ skipStateCookieCheck?: boolean | undefined;
731
+ storeStateStrategy: "database" | "cookie";
732
+ };
733
+ newSession: {
734
+ session: import("better-auth").Session & Record<string, any>;
735
+ user: import("better-auth").User & Record<string, any>;
736
+ } | null;
737
+ session: {
738
+ session: import("better-auth").Session & Record<string, any>;
739
+ user: import("better-auth").User & Record<string, any>;
740
+ } | null;
741
+ setNewSession: (session: {
742
+ session: import("better-auth").Session & Record<string, any>;
743
+ user: import("better-auth").User & Record<string, any>;
744
+ } | null) => void;
745
+ socialProviders: import("better-auth").OAuthProvider[];
746
+ authCookies: import("better-auth").BetterAuthCookies;
747
+ logger: ReturnType<(options?: import("better-auth").Logger | undefined) => import("better-auth").InternalLogger>;
748
+ rateLimit: {
749
+ enabled: boolean;
750
+ window: number;
751
+ max: number;
752
+ storage: "memory" | "database" | "secondary-storage";
753
+ } & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
754
+ adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
755
+ internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
756
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
757
+ secret: string;
758
+ sessionConfig: {
759
+ updateAge: number;
760
+ expiresIn: number;
761
+ freshAge: number;
762
+ cookieRefreshCache: false | {
763
+ enabled: true;
764
+ updateAge: number;
765
+ };
766
+ };
767
+ generateId: (options: {
768
+ model: import("better-auth").ModelNames;
769
+ size?: number | undefined;
770
+ }) => string | false;
771
+ secondaryStorage: import("better-auth").SecondaryStorage | undefined;
772
+ password: {
773
+ hash: (password: string) => Promise<string>;
774
+ verify: (data: {
775
+ password: string;
776
+ hash: string;
777
+ }) => Promise<boolean>;
778
+ config: {
779
+ minPasswordLength: number;
780
+ maxPasswordLength: number;
781
+ };
782
+ checkPassword: (userId: string, ctx: import("better-auth").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
783
+ };
784
+ tables: import("better-auth").BetterAuthDBSchema;
785
+ runMigrations: () => Promise<void>;
786
+ publishTelemetry: (event: {
787
+ type: string;
788
+ anonymousId?: string | undefined;
789
+ payload: Record<string, any>;
790
+ }) => Promise<void>;
791
+ skipOriginCheck: boolean | string[];
792
+ skipCSRFCheck: boolean;
793
+ runInBackground: (promise: Promise<void>) => void;
794
+ runInBackgroundOrAwait: (promise: Promise<unknown> | Promise<void> | void | unknown) => Promise<unknown>;
795
+ }>;
796
+ }>;
797
+ }[];
798
+ };
799
+ endpoints: {
800
+ createApiKey: import("better-auth").StrictEndpoint<"/api-key/create", {
801
+ method: "POST";
802
+ body: import("better-auth").ZodObject<{
803
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
804
+ expiresIn: import("better-auth").ZodDefault<import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodNumber>>>;
805
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodCoercedString<unknown>>;
806
+ prefix: import("better-auth").ZodOptional<import("better-auth").ZodString>;
807
+ remaining: import("better-auth").ZodDefault<import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodNumber>>>;
808
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodAny>;
809
+ refillAmount: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
810
+ refillInterval: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
811
+ rateLimitTimeWindow: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
812
+ rateLimitMax: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
813
+ rateLimitEnabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
814
+ permissions: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>>;
815
+ }, import("better-auth").$strip>;
816
+ metadata: {
817
+ openapi: {
818
+ description: string;
819
+ responses: {
820
+ "200": {
821
+ description: string;
822
+ content: {
823
+ "application/json": {
824
+ schema: {
825
+ type: "object";
826
+ properties: {
827
+ id: {
828
+ type: string;
829
+ description: string;
830
+ };
831
+ createdAt: {
832
+ type: string;
833
+ format: string;
834
+ description: string;
835
+ };
836
+ updatedAt: {
837
+ type: string;
838
+ format: string;
839
+ description: string;
840
+ };
841
+ name: {
842
+ type: string;
843
+ nullable: boolean;
844
+ description: string;
845
+ };
846
+ prefix: {
847
+ type: string;
848
+ nullable: boolean;
849
+ description: string;
850
+ };
851
+ start: {
852
+ type: string;
853
+ nullable: boolean;
854
+ description: string;
855
+ };
856
+ key: {
857
+ type: string;
858
+ description: string;
859
+ };
860
+ enabled: {
861
+ type: string;
862
+ description: string;
863
+ };
864
+ expiresAt: {
865
+ type: string;
866
+ format: string;
867
+ nullable: boolean;
868
+ description: string;
869
+ };
870
+ userId: {
871
+ type: string;
872
+ description: string;
873
+ };
874
+ lastRefillAt: {
875
+ type: string;
876
+ format: string;
877
+ nullable: boolean;
878
+ description: string;
879
+ };
880
+ lastRequest: {
881
+ type: string;
882
+ format: string;
883
+ nullable: boolean;
884
+ description: string;
885
+ };
886
+ metadata: {
887
+ type: string;
888
+ nullable: boolean;
889
+ additionalProperties: boolean;
890
+ description: string;
891
+ };
892
+ rateLimitMax: {
893
+ type: string;
894
+ nullable: boolean;
895
+ description: string;
896
+ };
897
+ rateLimitTimeWindow: {
898
+ type: string;
899
+ nullable: boolean;
900
+ description: string;
901
+ };
902
+ remaining: {
903
+ type: string;
904
+ nullable: boolean;
905
+ description: string;
906
+ };
907
+ refillAmount: {
908
+ type: string;
909
+ nullable: boolean;
910
+ description: string;
911
+ };
912
+ refillInterval: {
913
+ type: string;
914
+ nullable: boolean;
915
+ description: string;
916
+ };
917
+ rateLimitEnabled: {
918
+ type: string;
919
+ description: string;
920
+ };
921
+ requestCount: {
922
+ type: string;
923
+ description: string;
924
+ };
925
+ permissions: {
926
+ type: string;
927
+ nullable: boolean;
928
+ additionalProperties: {
929
+ type: string;
930
+ items: {
931
+ type: string;
932
+ };
933
+ };
934
+ description: string;
935
+ };
936
+ };
937
+ required: string[];
938
+ };
939
+ };
940
+ };
941
+ };
942
+ };
943
+ };
944
+ };
945
+ }, {
946
+ key: string;
947
+ metadata: any;
948
+ permissions: any;
949
+ id: string;
950
+ name: string | null;
951
+ start: string | null;
952
+ prefix: string | null;
953
+ userId: string;
954
+ refillInterval: number | null;
955
+ refillAmount: number | null;
956
+ lastRefillAt: Date | null;
957
+ enabled: boolean;
958
+ rateLimitEnabled: boolean;
959
+ rateLimitTimeWindow: number | null;
960
+ rateLimitMax: number | null;
961
+ requestCount: number;
962
+ remaining: number | null;
963
+ lastRequest: Date | null;
964
+ expiresAt: Date | null;
965
+ createdAt: Date;
966
+ updatedAt: Date;
967
+ }>;
968
+ verifyApiKey: import("better-auth").StrictEndpoint<string, {
969
+ method: "POST";
970
+ body: import("better-auth").ZodObject<{
971
+ key: import("better-auth").ZodString;
972
+ permissions: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>>;
973
+ }, import("better-auth").$strip>;
974
+ }, {
975
+ valid: boolean;
976
+ error: {
977
+ message: string | undefined;
978
+ code: string;
979
+ };
980
+ key: null;
981
+ } | {
982
+ valid: boolean;
983
+ error: null;
984
+ key: Omit<import("better-auth/plugins").ApiKey, "key"> | null;
985
+ }>;
986
+ getApiKey: import("better-auth").StrictEndpoint<"/api-key/get", {
987
+ method: "GET";
988
+ query: import("better-auth").ZodObject<{
989
+ id: import("better-auth").ZodString;
990
+ }, import("better-auth").$strip>;
991
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
992
+ session: {
993
+ session: Record<string, any> & {
994
+ id: string;
995
+ createdAt: Date;
996
+ updatedAt: Date;
997
+ userId: string;
998
+ expiresAt: Date;
999
+ token: string;
1000
+ ipAddress?: string | null | undefined;
1001
+ userAgent?: string | null | undefined;
1002
+ };
1003
+ user: Record<string, any> & {
1004
+ id: string;
1005
+ createdAt: Date;
1006
+ updatedAt: Date;
1007
+ email: string;
1008
+ emailVerified: boolean;
1009
+ name: string;
1010
+ image?: string | null | undefined;
1011
+ };
1012
+ };
1013
+ }>)[];
1014
+ metadata: {
1015
+ openapi: {
1016
+ description: string;
1017
+ responses: {
1018
+ "200": {
1019
+ description: string;
1020
+ content: {
1021
+ "application/json": {
1022
+ schema: {
1023
+ type: "object";
1024
+ properties: {
1025
+ id: {
1026
+ type: string;
1027
+ description: string;
1028
+ };
1029
+ name: {
1030
+ type: string;
1031
+ nullable: boolean;
1032
+ description: string;
1033
+ };
1034
+ start: {
1035
+ type: string;
1036
+ nullable: boolean;
1037
+ description: string;
1038
+ };
1039
+ prefix: {
1040
+ type: string;
1041
+ nullable: boolean;
1042
+ description: string;
1043
+ };
1044
+ userId: {
1045
+ type: string;
1046
+ description: string;
1047
+ };
1048
+ refillInterval: {
1049
+ type: string;
1050
+ nullable: boolean;
1051
+ description: string;
1052
+ };
1053
+ refillAmount: {
1054
+ type: string;
1055
+ nullable: boolean;
1056
+ description: string;
1057
+ };
1058
+ lastRefillAt: {
1059
+ type: string;
1060
+ format: string;
1061
+ nullable: boolean;
1062
+ description: string;
1063
+ };
1064
+ enabled: {
1065
+ type: string;
1066
+ description: string;
1067
+ default: boolean;
1068
+ };
1069
+ rateLimitEnabled: {
1070
+ type: string;
1071
+ description: string;
1072
+ };
1073
+ rateLimitTimeWindow: {
1074
+ type: string;
1075
+ nullable: boolean;
1076
+ description: string;
1077
+ };
1078
+ rateLimitMax: {
1079
+ type: string;
1080
+ nullable: boolean;
1081
+ description: string;
1082
+ };
1083
+ requestCount: {
1084
+ type: string;
1085
+ description: string;
1086
+ };
1087
+ remaining: {
1088
+ type: string;
1089
+ nullable: boolean;
1090
+ description: string;
1091
+ };
1092
+ lastRequest: {
1093
+ type: string;
1094
+ format: string;
1095
+ nullable: boolean;
1096
+ description: string;
1097
+ };
1098
+ expiresAt: {
1099
+ type: string;
1100
+ format: string;
1101
+ nullable: boolean;
1102
+ description: string;
1103
+ };
1104
+ createdAt: {
1105
+ type: string;
1106
+ format: string;
1107
+ description: string;
1108
+ };
1109
+ updatedAt: {
1110
+ type: string;
1111
+ format: string;
1112
+ description: string;
1113
+ };
1114
+ metadata: {
1115
+ type: string;
1116
+ nullable: boolean;
1117
+ additionalProperties: boolean;
1118
+ description: string;
1119
+ };
1120
+ permissions: {
1121
+ type: string;
1122
+ nullable: boolean;
1123
+ description: string;
1124
+ };
1125
+ };
1126
+ required: string[];
1127
+ };
1128
+ };
1129
+ };
1130
+ };
1131
+ };
1132
+ };
1133
+ };
1134
+ }, {
1135
+ metadata: Record<string, any> | null;
1136
+ permissions: {
1137
+ [key: string]: string[];
1138
+ } | null;
1139
+ id: string;
1140
+ name: string | null;
1141
+ start: string | null;
1142
+ prefix: string | null;
1143
+ userId: string;
1144
+ refillInterval: number | null;
1145
+ refillAmount: number | null;
1146
+ lastRefillAt: Date | null;
1147
+ enabled: boolean;
1148
+ rateLimitEnabled: boolean;
1149
+ rateLimitTimeWindow: number | null;
1150
+ rateLimitMax: number | null;
1151
+ requestCount: number;
1152
+ remaining: number | null;
1153
+ lastRequest: Date | null;
1154
+ expiresAt: Date | null;
1155
+ createdAt: Date;
1156
+ updatedAt: Date;
1157
+ }>;
1158
+ updateApiKey: import("better-auth").StrictEndpoint<"/api-key/update", {
1159
+ method: "POST";
1160
+ body: import("better-auth").ZodObject<{
1161
+ keyId: import("better-auth").ZodString;
1162
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodCoercedString<unknown>>;
1163
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1164
+ enabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1165
+ remaining: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1166
+ refillAmount: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1167
+ refillInterval: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1168
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodAny>;
1169
+ expiresIn: import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodNumber>>;
1170
+ rateLimitEnabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1171
+ rateLimitTimeWindow: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1172
+ rateLimitMax: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
1173
+ permissions: import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>>>;
1174
+ }, import("better-auth").$strip>;
1175
+ metadata: {
1176
+ openapi: {
1177
+ description: string;
1178
+ responses: {
1179
+ "200": {
1180
+ description: string;
1181
+ content: {
1182
+ "application/json": {
1183
+ schema: {
1184
+ type: "object";
1185
+ properties: {
1186
+ id: {
1187
+ type: string;
1188
+ description: string;
1189
+ };
1190
+ name: {
1191
+ type: string;
1192
+ nullable: boolean;
1193
+ description: string;
1194
+ };
1195
+ start: {
1196
+ type: string;
1197
+ nullable: boolean;
1198
+ description: string;
1199
+ };
1200
+ prefix: {
1201
+ type: string;
1202
+ nullable: boolean;
1203
+ description: string;
1204
+ };
1205
+ userId: {
1206
+ type: string;
1207
+ description: string;
1208
+ };
1209
+ refillInterval: {
1210
+ type: string;
1211
+ nullable: boolean;
1212
+ description: string;
1213
+ };
1214
+ refillAmount: {
1215
+ type: string;
1216
+ nullable: boolean;
1217
+ description: string;
1218
+ };
1219
+ lastRefillAt: {
1220
+ type: string;
1221
+ format: string;
1222
+ nullable: boolean;
1223
+ description: string;
1224
+ };
1225
+ enabled: {
1226
+ type: string;
1227
+ description: string;
1228
+ default: boolean;
1229
+ };
1230
+ rateLimitEnabled: {
1231
+ type: string;
1232
+ description: string;
1233
+ };
1234
+ rateLimitTimeWindow: {
1235
+ type: string;
1236
+ nullable: boolean;
1237
+ description: string;
1238
+ };
1239
+ rateLimitMax: {
1240
+ type: string;
1241
+ nullable: boolean;
1242
+ description: string;
1243
+ };
1244
+ requestCount: {
1245
+ type: string;
1246
+ description: string;
1247
+ };
1248
+ remaining: {
1249
+ type: string;
1250
+ nullable: boolean;
1251
+ description: string;
1252
+ };
1253
+ lastRequest: {
1254
+ type: string;
1255
+ format: string;
1256
+ nullable: boolean;
1257
+ description: string;
1258
+ };
1259
+ expiresAt: {
1260
+ type: string;
1261
+ format: string;
1262
+ nullable: boolean;
1263
+ description: string;
1264
+ };
1265
+ createdAt: {
1266
+ type: string;
1267
+ format: string;
1268
+ description: string;
1269
+ };
1270
+ updatedAt: {
1271
+ type: string;
1272
+ format: string;
1273
+ description: string;
1274
+ };
1275
+ metadata: {
1276
+ type: string;
1277
+ nullable: boolean;
1278
+ additionalProperties: boolean;
1279
+ description: string;
1280
+ };
1281
+ permissions: {
1282
+ type: string;
1283
+ nullable: boolean;
1284
+ description: string;
1285
+ };
1286
+ };
1287
+ required: string[];
1288
+ };
1289
+ };
1290
+ };
1291
+ };
1292
+ };
1293
+ };
1294
+ };
1295
+ }, {
1296
+ metadata: Record<string, any> | null;
1297
+ permissions: {
1298
+ [key: string]: string[];
1299
+ } | null;
1300
+ id: string;
1301
+ name: string | null;
1302
+ start: string | null;
1303
+ prefix: string | null;
1304
+ userId: string;
1305
+ refillInterval: number | null;
1306
+ refillAmount: number | null;
1307
+ lastRefillAt: Date | null;
1308
+ enabled: boolean;
1309
+ rateLimitEnabled: boolean;
1310
+ rateLimitTimeWindow: number | null;
1311
+ rateLimitMax: number | null;
1312
+ requestCount: number;
1313
+ remaining: number | null;
1314
+ lastRequest: Date | null;
1315
+ expiresAt: Date | null;
1316
+ createdAt: Date;
1317
+ updatedAt: Date;
1318
+ }>;
1319
+ deleteApiKey: import("better-auth").StrictEndpoint<"/api-key/delete", {
1320
+ method: "POST";
1321
+ body: import("better-auth").ZodObject<{
1322
+ keyId: import("better-auth").ZodString;
1323
+ }, import("better-auth").$strip>;
1324
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1325
+ session: {
1326
+ session: Record<string, any> & {
1327
+ id: string;
1328
+ createdAt: Date;
1329
+ updatedAt: Date;
1330
+ userId: string;
1331
+ expiresAt: Date;
1332
+ token: string;
1333
+ ipAddress?: string | null | undefined;
1334
+ userAgent?: string | null | undefined;
1335
+ };
1336
+ user: Record<string, any> & {
1337
+ id: string;
1338
+ createdAt: Date;
1339
+ updatedAt: Date;
1340
+ email: string;
1341
+ emailVerified: boolean;
1342
+ name: string;
1343
+ image?: string | null | undefined;
1344
+ };
1345
+ };
1346
+ }>)[];
1347
+ metadata: {
1348
+ openapi: {
1349
+ description: string;
1350
+ requestBody: {
1351
+ content: {
1352
+ "application/json": {
1353
+ schema: {
1354
+ type: "object";
1355
+ properties: {
1356
+ keyId: {
1357
+ type: string;
1358
+ description: string;
1359
+ };
1360
+ };
1361
+ required: string[];
1362
+ };
1363
+ };
1364
+ };
1365
+ };
1366
+ responses: {
1367
+ "200": {
1368
+ description: string;
1369
+ content: {
1370
+ "application/json": {
1371
+ schema: {
1372
+ type: "object";
1373
+ properties: {
1374
+ success: {
1375
+ type: string;
1376
+ description: string;
1377
+ };
1378
+ };
1379
+ required: string[];
1380
+ };
1381
+ };
1382
+ };
1383
+ };
1384
+ };
1385
+ };
1386
+ };
1387
+ }, {
1388
+ success: boolean;
1389
+ }>;
1390
+ listApiKeys: import("better-auth").StrictEndpoint<"/api-key/list", {
1391
+ method: "GET";
1392
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1393
+ session: {
1394
+ session: Record<string, any> & {
1395
+ id: string;
1396
+ createdAt: Date;
1397
+ updatedAt: Date;
1398
+ userId: string;
1399
+ expiresAt: Date;
1400
+ token: string;
1401
+ ipAddress?: string | null | undefined;
1402
+ userAgent?: string | null | undefined;
1403
+ };
1404
+ user: Record<string, any> & {
1405
+ id: string;
1406
+ createdAt: Date;
1407
+ updatedAt: Date;
1408
+ email: string;
1409
+ emailVerified: boolean;
1410
+ name: string;
1411
+ image?: string | null | undefined;
1412
+ };
1413
+ };
1414
+ }>)[];
1415
+ metadata: {
1416
+ openapi: {
1417
+ description: string;
1418
+ responses: {
1419
+ "200": {
1420
+ description: string;
1421
+ content: {
1422
+ "application/json": {
1423
+ schema: {
1424
+ type: "array";
1425
+ items: {
1426
+ type: string;
1427
+ properties: {
1428
+ id: {
1429
+ type: string;
1430
+ description: string;
1431
+ };
1432
+ name: {
1433
+ type: string;
1434
+ nullable: boolean;
1435
+ description: string;
1436
+ };
1437
+ start: {
1438
+ type: string;
1439
+ nullable: boolean;
1440
+ description: string;
1441
+ };
1442
+ prefix: {
1443
+ type: string;
1444
+ nullable: boolean;
1445
+ description: string;
1446
+ };
1447
+ userId: {
1448
+ type: string;
1449
+ description: string;
1450
+ };
1451
+ refillInterval: {
1452
+ type: string;
1453
+ nullable: boolean;
1454
+ description: string;
1455
+ };
1456
+ refillAmount: {
1457
+ type: string;
1458
+ nullable: boolean;
1459
+ description: string;
1460
+ };
1461
+ lastRefillAt: {
1462
+ type: string;
1463
+ format: string;
1464
+ nullable: boolean;
1465
+ description: string;
1466
+ };
1467
+ enabled: {
1468
+ type: string;
1469
+ description: string;
1470
+ default: boolean;
1471
+ };
1472
+ rateLimitEnabled: {
1473
+ type: string;
1474
+ description: string;
1475
+ };
1476
+ rateLimitTimeWindow: {
1477
+ type: string;
1478
+ nullable: boolean;
1479
+ description: string;
1480
+ };
1481
+ rateLimitMax: {
1482
+ type: string;
1483
+ nullable: boolean;
1484
+ description: string;
1485
+ };
1486
+ requestCount: {
1487
+ type: string;
1488
+ description: string;
1489
+ };
1490
+ remaining: {
1491
+ type: string;
1492
+ nullable: boolean;
1493
+ description: string;
1494
+ };
1495
+ lastRequest: {
1496
+ type: string;
1497
+ format: string;
1498
+ nullable: boolean;
1499
+ description: string;
1500
+ };
1501
+ expiresAt: {
1502
+ type: string;
1503
+ format: string;
1504
+ nullable: boolean;
1505
+ description: string;
1506
+ };
1507
+ createdAt: {
1508
+ type: string;
1509
+ format: string;
1510
+ description: string;
1511
+ };
1512
+ updatedAt: {
1513
+ type: string;
1514
+ format: string;
1515
+ description: string;
1516
+ };
1517
+ metadata: {
1518
+ type: string;
1519
+ nullable: boolean;
1520
+ additionalProperties: boolean;
1521
+ description: string;
1522
+ };
1523
+ permissions: {
1524
+ type: string;
1525
+ nullable: boolean;
1526
+ description: string;
1527
+ };
1528
+ };
1529
+ required: string[];
1530
+ };
1531
+ };
1532
+ };
1533
+ };
1534
+ };
1535
+ };
1536
+ };
1537
+ };
1538
+ }, {
1539
+ metadata: Record<string, any> | null;
1540
+ permissions: {
1541
+ [key: string]: string[];
1542
+ } | null;
1543
+ id: string;
1544
+ name: string | null;
1545
+ start: string | null;
1546
+ prefix: string | null;
1547
+ userId: string;
1548
+ refillInterval: number | null;
1549
+ refillAmount: number | null;
1550
+ lastRefillAt: Date | null;
1551
+ enabled: boolean;
1552
+ rateLimitEnabled: boolean;
1553
+ rateLimitTimeWindow: number | null;
1554
+ rateLimitMax: number | null;
1555
+ requestCount: number;
1556
+ remaining: number | null;
1557
+ lastRequest: Date | null;
1558
+ expiresAt: Date | null;
1559
+ createdAt: Date;
1560
+ updatedAt: Date;
1561
+ }[]>;
1562
+ deleteAllExpiredApiKeys: import("better-auth").StrictEndpoint<string, {
1563
+ method: "POST";
1564
+ }, {
1565
+ success: boolean;
1566
+ error: unknown;
1567
+ }>;
1568
+ };
1569
+ schema: {
1570
+ apikey: {
1571
+ fields: {
1572
+ name: {
1573
+ type: "string";
1574
+ required: false;
1575
+ input: false;
1576
+ };
1577
+ start: {
1578
+ type: "string";
1579
+ required: false;
1580
+ input: false;
1581
+ };
1582
+ prefix: {
1583
+ type: "string";
1584
+ required: false;
1585
+ input: false;
1586
+ };
1587
+ key: {
1588
+ type: "string";
1589
+ required: true;
1590
+ input: false;
1591
+ index: true;
1592
+ };
1593
+ userId: {
1594
+ type: "string";
1595
+ references: {
1596
+ model: string;
1597
+ field: string;
1598
+ onDelete: "cascade";
1599
+ };
1600
+ required: true;
1601
+ input: false;
1602
+ index: true;
1603
+ };
1604
+ refillInterval: {
1605
+ type: "number";
1606
+ required: false;
1607
+ input: false;
1608
+ };
1609
+ refillAmount: {
1610
+ type: "number";
1611
+ required: false;
1612
+ input: false;
1613
+ };
1614
+ lastRefillAt: {
1615
+ type: "date";
1616
+ required: false;
1617
+ input: false;
1618
+ };
1619
+ enabled: {
1620
+ type: "boolean";
1621
+ required: false;
1622
+ input: false;
1623
+ defaultValue: true;
1624
+ };
1625
+ rateLimitEnabled: {
1626
+ type: "boolean";
1627
+ required: false;
1628
+ input: false;
1629
+ defaultValue: true;
1630
+ };
1631
+ rateLimitTimeWindow: {
1632
+ type: "number";
1633
+ required: false;
1634
+ input: false;
1635
+ defaultValue: number;
1636
+ };
1637
+ rateLimitMax: {
1638
+ type: "number";
1639
+ required: false;
1640
+ input: false;
1641
+ defaultValue: number;
1642
+ };
1643
+ requestCount: {
1644
+ type: "number";
1645
+ required: false;
1646
+ input: false;
1647
+ defaultValue: number;
1648
+ };
1649
+ remaining: {
1650
+ type: "number";
1651
+ required: false;
1652
+ input: false;
1653
+ };
1654
+ lastRequest: {
1655
+ type: "date";
1656
+ required: false;
1657
+ input: false;
1658
+ };
1659
+ expiresAt: {
1660
+ type: "date";
1661
+ required: false;
1662
+ input: false;
1663
+ };
1664
+ createdAt: {
1665
+ type: "date";
1666
+ required: true;
1667
+ input: false;
1668
+ };
1669
+ updatedAt: {
1670
+ type: "date";
1671
+ required: true;
1672
+ input: false;
1673
+ };
1674
+ permissions: {
1675
+ type: "string";
1676
+ required: false;
1677
+ input: false;
1678
+ };
1679
+ metadata: {
1680
+ type: "string";
1681
+ required: false;
1682
+ input: true;
1683
+ transform: {
1684
+ input(value: import("better-auth").DBPrimitive): string;
1685
+ output(value: import("better-auth").DBPrimitive): any;
1686
+ };
1687
+ };
1688
+ };
1689
+ };
1690
+ };
1691
+ options: import("better-auth/plugins").ApiKeyOptions | undefined;
1692
+ }>;
1693
+ pathMethods: {
1694
+ "/api-key/create": "POST";
1695
+ "/api-key/delete": "POST";
1696
+ "/api-key/delete-all-expired-api-keys": "POST";
1697
+ };
1698
+ }, {
1699
+ id: "passkey";
1700
+ $InferServerPlugin: ReturnType<(options?: import("@better-auth/passkey").PasskeyOptions | undefined) => {
1701
+ id: "passkey";
1702
+ endpoints: {
1703
+ generatePasskeyRegistrationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-register-options", {
1704
+ method: "GET";
1705
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1706
+ session: {
1707
+ session: Record<string, any> & {
1708
+ id: string;
1709
+ createdAt: Date;
1710
+ updatedAt: Date;
1711
+ userId: string;
1712
+ expiresAt: Date;
1713
+ token: string;
1714
+ ipAddress?: string | null | undefined;
1715
+ userAgent?: string | null | undefined;
1716
+ };
1717
+ user: Record<string, any> & {
1718
+ id: string;
1719
+ createdAt: Date;
1720
+ updatedAt: Date;
1721
+ email: string;
1722
+ emailVerified: boolean;
1723
+ name: string;
1724
+ image?: string | null | undefined;
1725
+ };
1726
+ };
1727
+ }>)[];
1728
+ query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
1729
+ authenticatorAttachment: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
1730
+ platform: "platform";
1731
+ "cross-platform": "cross-platform";
1732
+ }>>;
1733
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1734
+ }, import("better-auth").$strip>>;
1735
+ metadata: {
1736
+ openapi: {
1737
+ operationId: string;
1738
+ description: string;
1739
+ responses: {
1740
+ 200: {
1741
+ description: string;
1742
+ parameters: {
1743
+ query: {
1744
+ authenticatorAttachment: {
1745
+ description: string;
1746
+ required: boolean;
1747
+ };
1748
+ name: {
1749
+ description: string;
1750
+ required: boolean;
1751
+ };
1752
+ };
1753
+ };
1754
+ content: {
1755
+ "application/json": {
1756
+ schema: {
1757
+ type: "object";
1758
+ properties: {
1759
+ challenge: {
1760
+ type: string;
1761
+ };
1762
+ rp: {
1763
+ type: string;
1764
+ properties: {
1765
+ name: {
1766
+ type: string;
1767
+ };
1768
+ id: {
1769
+ type: string;
1770
+ };
1771
+ };
1772
+ };
1773
+ user: {
1774
+ type: string;
1775
+ properties: {
1776
+ id: {
1777
+ type: string;
1778
+ };
1779
+ name: {
1780
+ type: string;
1781
+ };
1782
+ displayName: {
1783
+ type: string;
1784
+ };
1785
+ };
1786
+ };
1787
+ pubKeyCredParams: {
1788
+ type: string;
1789
+ items: {
1790
+ type: string;
1791
+ properties: {
1792
+ type: {
1793
+ type: string;
1794
+ };
1795
+ alg: {
1796
+ type: string;
1797
+ };
1798
+ };
1799
+ };
1800
+ };
1801
+ timeout: {
1802
+ type: string;
1803
+ };
1804
+ excludeCredentials: {
1805
+ type: string;
1806
+ items: {
1807
+ type: string;
1808
+ properties: {
1809
+ id: {
1810
+ type: string;
1811
+ };
1812
+ type: {
1813
+ type: string;
1814
+ };
1815
+ transports: {
1816
+ type: string;
1817
+ items: {
1818
+ type: string;
1819
+ };
1820
+ };
1821
+ };
1822
+ };
1823
+ };
1824
+ authenticatorSelection: {
1825
+ type: string;
1826
+ properties: {
1827
+ authenticatorAttachment: {
1828
+ type: string;
1829
+ };
1830
+ requireResidentKey: {
1831
+ type: string;
1832
+ };
1833
+ userVerification: {
1834
+ type: string;
1835
+ };
1836
+ };
1837
+ };
1838
+ attestation: {
1839
+ type: string;
1840
+ };
1841
+ extensions: {
1842
+ type: string;
1843
+ };
1844
+ };
1845
+ };
1846
+ };
1847
+ };
1848
+ };
1849
+ };
1850
+ };
1851
+ };
1852
+ }, import("@better-auth/passkey/client").PublicKeyCredentialCreationOptionsJSON>;
1853
+ generatePasskeyAuthenticationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-authenticate-options", {
1854
+ method: "GET";
1855
+ metadata: {
1856
+ openapi: {
1857
+ operationId: string;
1858
+ description: string;
1859
+ responses: {
1860
+ 200: {
1861
+ description: string;
1862
+ content: {
1863
+ "application/json": {
1864
+ schema: {
1865
+ type: "object";
1866
+ properties: {
1867
+ challenge: {
1868
+ type: string;
1869
+ };
1870
+ rp: {
1871
+ type: string;
1872
+ properties: {
1873
+ name: {
1874
+ type: string;
1875
+ };
1876
+ id: {
1877
+ type: string;
1878
+ };
1879
+ };
1880
+ };
1881
+ user: {
1882
+ type: string;
1883
+ properties: {
1884
+ id: {
1885
+ type: string;
1886
+ };
1887
+ name: {
1888
+ type: string;
1889
+ };
1890
+ displayName: {
1891
+ type: string;
1892
+ };
1893
+ };
1894
+ };
1895
+ timeout: {
1896
+ type: string;
1897
+ };
1898
+ allowCredentials: {
1899
+ type: string;
1900
+ items: {
1901
+ type: string;
1902
+ properties: {
1903
+ id: {
1904
+ type: string;
1905
+ };
1906
+ type: {
1907
+ type: string;
1908
+ };
1909
+ transports: {
1910
+ type: string;
1911
+ items: {
1912
+ type: string;
1913
+ };
1914
+ };
1915
+ };
1916
+ };
1917
+ };
1918
+ userVerification: {
1919
+ type: string;
1920
+ };
1921
+ authenticatorSelection: {
1922
+ type: string;
1923
+ properties: {
1924
+ authenticatorAttachment: {
1925
+ type: string;
1926
+ };
1927
+ requireResidentKey: {
1928
+ type: string;
1929
+ };
1930
+ userVerification: {
1931
+ type: string;
1932
+ };
1933
+ };
1934
+ };
1935
+ extensions: {
1936
+ type: string;
1937
+ };
1938
+ };
1939
+ };
1940
+ };
1941
+ };
1942
+ };
1943
+ };
1944
+ };
1945
+ };
1946
+ }, import("@better-auth/passkey/client").PublicKeyCredentialRequestOptionsJSON>;
1947
+ verifyPasskeyRegistration: import("better-auth").StrictEndpoint<"/passkey/verify-registration", {
1948
+ method: "POST";
1949
+ body: import("better-auth").ZodObject<{
1950
+ response: import("better-auth").ZodAny;
1951
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1952
+ }, import("better-auth").$strip>;
1953
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1954
+ session: {
1955
+ session: Record<string, any> & {
1956
+ id: string;
1957
+ createdAt: Date;
1958
+ updatedAt: Date;
1959
+ userId: string;
1960
+ expiresAt: Date;
1961
+ token: string;
1962
+ ipAddress?: string | null | undefined;
1963
+ userAgent?: string | null | undefined;
1964
+ };
1965
+ user: Record<string, any> & {
1966
+ id: string;
1967
+ createdAt: Date;
1968
+ updatedAt: Date;
1969
+ email: string;
1970
+ emailVerified: boolean;
1971
+ name: string;
1972
+ image?: string | null | undefined;
1973
+ };
1974
+ };
1975
+ }>)[];
1976
+ metadata: {
1977
+ openapi: {
1978
+ operationId: string;
1979
+ description: string;
1980
+ responses: {
1981
+ 200: {
1982
+ description: string;
1983
+ content: {
1984
+ "application/json": {
1985
+ schema: {
1986
+ $ref: string;
1987
+ };
1988
+ };
1989
+ };
1990
+ };
1991
+ 400: {
1992
+ description: string;
1993
+ };
1994
+ };
1995
+ };
1996
+ };
1997
+ }, import("@better-auth/passkey").Passkey | null>;
1998
+ verifyPasskeyAuthentication: import("better-auth").StrictEndpoint<"/passkey/verify-authentication", {
1999
+ method: "POST";
2000
+ body: import("better-auth").ZodObject<{
2001
+ response: import("better-auth").ZodRecord<import("better-auth").ZodAny, import("better-auth").ZodAny>;
2002
+ }, import("better-auth").$strip>;
2003
+ metadata: {
2004
+ openapi: {
2005
+ operationId: string;
2006
+ description: string;
2007
+ responses: {
2008
+ 200: {
2009
+ description: string;
2010
+ content: {
2011
+ "application/json": {
2012
+ schema: {
2013
+ type: "object";
2014
+ properties: {
2015
+ session: {
2016
+ $ref: string;
2017
+ };
2018
+ user: {
2019
+ $ref: string;
2020
+ };
2021
+ };
2022
+ };
2023
+ };
2024
+ };
2025
+ };
2026
+ };
2027
+ };
2028
+ $Infer: {
2029
+ body: {
2030
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
2031
+ };
2032
+ };
2033
+ };
2034
+ }, {
2035
+ session: {
2036
+ id: string;
2037
+ createdAt: Date;
2038
+ updatedAt: Date;
2039
+ userId: string;
2040
+ expiresAt: Date;
2041
+ token: string;
2042
+ ipAddress?: string | null | undefined;
2043
+ userAgent?: string | null | undefined;
2044
+ };
2045
+ }>;
2046
+ listPasskeys: import("better-auth").StrictEndpoint<"/passkey/list-user-passkeys", {
2047
+ method: "GET";
2048
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2049
+ session: {
2050
+ session: Record<string, any> & {
2051
+ id: string;
2052
+ createdAt: Date;
2053
+ updatedAt: Date;
2054
+ userId: string;
2055
+ expiresAt: Date;
2056
+ token: string;
2057
+ ipAddress?: string | null | undefined;
2058
+ userAgent?: string | null | undefined;
2059
+ };
2060
+ user: Record<string, any> & {
2061
+ id: string;
2062
+ createdAt: Date;
2063
+ updatedAt: Date;
2064
+ email: string;
2065
+ emailVerified: boolean;
2066
+ name: string;
2067
+ image?: string | null | undefined;
2068
+ };
2069
+ };
2070
+ }>)[];
2071
+ metadata: {
2072
+ openapi: {
2073
+ description: string;
2074
+ responses: {
2075
+ "200": {
2076
+ description: string;
2077
+ content: {
2078
+ "application/json": {
2079
+ schema: {
2080
+ type: "array";
2081
+ items: {
2082
+ $ref: string;
2083
+ required: string[];
2084
+ };
2085
+ description: string;
2086
+ };
2087
+ };
2088
+ };
2089
+ };
2090
+ };
2091
+ };
2092
+ };
2093
+ }, import("@better-auth/passkey").Passkey[]>;
2094
+ deletePasskey: import("better-auth").StrictEndpoint<"/passkey/delete-passkey", {
2095
+ method: "POST";
2096
+ body: import("better-auth").ZodObject<{
2097
+ id: import("better-auth").ZodString;
2098
+ }, import("better-auth").$strip>;
2099
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2100
+ session: {
2101
+ session: Record<string, any> & {
2102
+ id: string;
2103
+ createdAt: Date;
2104
+ updatedAt: Date;
2105
+ userId: string;
2106
+ expiresAt: Date;
2107
+ token: string;
2108
+ ipAddress?: string | null | undefined;
2109
+ userAgent?: string | null | undefined;
2110
+ };
2111
+ user: Record<string, any> & {
2112
+ id: string;
2113
+ createdAt: Date;
2114
+ updatedAt: Date;
2115
+ email: string;
2116
+ emailVerified: boolean;
2117
+ name: string;
2118
+ image?: string | null | undefined;
2119
+ };
2120
+ };
2121
+ }>)[];
2122
+ metadata: {
2123
+ openapi: {
2124
+ description: string;
2125
+ responses: {
2126
+ "200": {
2127
+ description: string;
2128
+ content: {
2129
+ "application/json": {
2130
+ schema: {
2131
+ type: "object";
2132
+ properties: {
2133
+ status: {
2134
+ type: string;
2135
+ description: string;
2136
+ };
2137
+ };
2138
+ required: string[];
2139
+ };
2140
+ };
2141
+ };
2142
+ };
2143
+ };
2144
+ };
2145
+ };
2146
+ }, {
2147
+ status: boolean;
2148
+ }>;
2149
+ updatePasskey: import("better-auth").StrictEndpoint<"/passkey/update-passkey", {
2150
+ method: "POST";
2151
+ body: import("better-auth").ZodObject<{
2152
+ id: import("better-auth").ZodString;
2153
+ name: import("better-auth").ZodString;
2154
+ }, import("better-auth").$strip>;
2155
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2156
+ session: {
2157
+ session: Record<string, any> & {
2158
+ id: string;
2159
+ createdAt: Date;
2160
+ updatedAt: Date;
2161
+ userId: string;
2162
+ expiresAt: Date;
2163
+ token: string;
2164
+ ipAddress?: string | null | undefined;
2165
+ userAgent?: string | null | undefined;
2166
+ };
2167
+ user: Record<string, any> & {
2168
+ id: string;
2169
+ createdAt: Date;
2170
+ updatedAt: Date;
2171
+ email: string;
2172
+ emailVerified: boolean;
2173
+ name: string;
2174
+ image?: string | null | undefined;
2175
+ };
2176
+ };
2177
+ }>)[];
2178
+ metadata: {
2179
+ openapi: {
2180
+ description: string;
2181
+ responses: {
2182
+ "200": {
2183
+ description: string;
2184
+ content: {
2185
+ "application/json": {
2186
+ schema: {
2187
+ type: "object";
2188
+ properties: {
2189
+ passkey: {
2190
+ $ref: string;
2191
+ };
2192
+ };
2193
+ required: string[];
2194
+ };
2195
+ };
2196
+ };
2197
+ };
2198
+ };
2199
+ };
2200
+ };
2201
+ }, {
2202
+ passkey: import("@better-auth/passkey").Passkey;
2203
+ }>;
2204
+ };
2205
+ schema: {
2206
+ passkey: {
2207
+ fields: {
2208
+ name: {
2209
+ type: "string";
2210
+ required: false;
2211
+ };
2212
+ publicKey: {
2213
+ type: "string";
2214
+ required: true;
2215
+ };
2216
+ userId: {
2217
+ type: "string";
2218
+ references: {
2219
+ model: string;
2220
+ field: string;
2221
+ };
2222
+ required: true;
2223
+ index: true;
2224
+ };
2225
+ credentialID: {
2226
+ type: "string";
2227
+ required: true;
2228
+ index: true;
2229
+ };
2230
+ counter: {
2231
+ type: "number";
2232
+ required: true;
2233
+ };
2234
+ deviceType: {
2235
+ type: "string";
2236
+ required: true;
2237
+ };
2238
+ backedUp: {
2239
+ type: "boolean";
2240
+ required: true;
2241
+ };
2242
+ transports: {
2243
+ type: "string";
2244
+ required: false;
2245
+ };
2246
+ createdAt: {
2247
+ type: "date";
2248
+ required: false;
2249
+ };
2250
+ aaguid: {
2251
+ type: "string";
2252
+ required: false;
2253
+ };
2254
+ };
2255
+ };
2256
+ };
2257
+ $ERROR_CODES: {
2258
+ readonly CHALLENGE_NOT_FOUND: "Challenge not found";
2259
+ readonly YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: "You are not allowed to register this passkey";
2260
+ readonly FAILED_TO_VERIFY_REGISTRATION: "Failed to verify registration";
2261
+ readonly PASSKEY_NOT_FOUND: "Passkey not found";
2262
+ readonly AUTHENTICATION_FAILED: "Authentication failed";
2263
+ readonly UNABLE_TO_CREATE_SESSION: "Unable to create session";
2264
+ readonly FAILED_TO_UPDATE_PASSKEY: "Failed to update passkey";
2265
+ };
2266
+ options: import("@better-auth/passkey").PasskeyOptions | undefined;
2267
+ }>;
2268
+ getActions: ($fetch: import("better-auth/react").BetterFetch, $store: import("better-auth").ClientStore) => {
2269
+ signIn: {
2270
+ passkey: (opts?: {
2271
+ autoFill?: boolean;
2272
+ fetchOptions?: import("better-auth").ClientFetchOption;
2273
+ } | undefined, options?: import("better-auth").ClientFetchOption | undefined) => Promise<{
2274
+ data: null;
2275
+ error: {
2276
+ message?: string | undefined;
2277
+ status: number;
2278
+ statusText: string;
2279
+ };
2280
+ } | {
2281
+ data: {
2282
+ session: import("better-auth").Session;
2283
+ user: import("better-auth").User;
2284
+ };
2285
+ error: null;
2286
+ } | {
2287
+ data: null;
2288
+ error: {
2289
+ code: string;
2290
+ message: string;
2291
+ status: number;
2292
+ statusText: string;
2293
+ };
2294
+ }>;
2295
+ };
2296
+ passkey: {
2297
+ addPasskey: (opts?: {
2298
+ fetchOptions?: import("better-auth").ClientFetchOption;
2299
+ name?: string;
2300
+ authenticatorAttachment?: "platform" | "cross-platform";
2301
+ useAutoRegister?: boolean;
2302
+ } | undefined, fetchOpts?: import("better-auth").ClientFetchOption | undefined) => Promise<{
2303
+ data: null;
2304
+ error: {
2305
+ message?: string | undefined;
2306
+ status: number;
2307
+ statusText: string;
2308
+ };
2309
+ } | {
2310
+ data: import("@better-auth/passkey").Passkey;
2311
+ error: null;
2312
+ } | {
2313
+ data: null;
2314
+ error: {
2315
+ code: string;
2316
+ message: string;
2317
+ status: number;
2318
+ statusText: string;
2319
+ };
2320
+ }>;
2321
+ };
2322
+ $Infer: {
2323
+ Passkey: import("@better-auth/passkey").Passkey;
2324
+ };
2325
+ };
2326
+ getAtoms($fetch: import("better-auth/react").BetterFetch): {
2327
+ listPasskeys: import("better-auth/client").AuthQueryAtom<import("@better-auth/passkey").Passkey[]>;
2328
+ $listPasskeys: import("better-auth/react").PreinitializedWritableAtom<any> & object;
2329
+ };
2330
+ pathMethods: {
2331
+ "/passkey/register": "POST";
2332
+ "/passkey/authenticate": "POST";
2333
+ };
2334
+ atomListeners: ({
2335
+ matcher(path: string): path is "/passkey/delete-passkey" | "/passkey/update-passkey" | "/passkey/verify-registration" | "/sign-out";
2336
+ signal: "$listPasskeys";
2337
+ } | {
2338
+ matcher: (path: string) => path is "/passkey/verify-authentication";
2339
+ signal: "$sessionSignal";
2340
+ })[];
2341
+ }];
8
2342
  export interface PayloadAuthClientOptions {
2343
+ /** Base URL for auth endpoints (defaults to window.location.origin) */
9
2344
  baseURL?: string;
10
2345
  }
11
2346
  /**
12
- * Create a pre-configured auth client with common plugins (twoFactor, apiKey, passkey)
2347
+ * Create a pre-configured auth client with default plugins (twoFactor, apiKey, passkey).
2348
+ *
2349
+ * This is a convenience wrapper for simple setups. For custom plugins with full type
2350
+ * safety, use `createAuthClient` with `payloadAuthPlugins` instead.
2351
+ *
13
2352
  * @param options - Optional configuration
14
2353
  * @param options.baseURL - Base URL for auth endpoints (defaults to window.location.origin)
15
2354
  *
16
- * Note: Passkey features require installing @better-auth/passkey as a peer dependency
2355
+ * @example Basic usage (no custom plugins)
2356
+ * ```typescript
2357
+ * import { createPayloadAuthClient } from '@delmaredigital/payload-better-auth/client'
2358
+ *
2359
+ * export const authClient = createPayloadAuthClient()
2360
+ * ```
2361
+ *
2362
+ * @example With custom plugins (use createAuthClient for full type safety)
2363
+ * ```typescript
2364
+ * import { createAuthClient, payloadAuthPlugins } from '@delmaredigital/payload-better-auth/client'
2365
+ * import { stripeClient } from '@better-auth/stripe/client'
2366
+ *
2367
+ * export const authClient = createAuthClient({
2368
+ * plugins: [...payloadAuthPlugins, stripeClient({ subscription: true })],
2369
+ * })
2370
+ * ```
17
2371
  */
18
2372
  export declare function createPayloadAuthClient(options?: PayloadAuthClientOptions): {
19
2373
  useListPasskeys: () => {