@settlemint/dalp-sdk 3.1.18-main.33807531377 → 3.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +169 -154
  2. package/dist/{auth/permissions.d.ts → auth-permissions.d.ts} +2 -1
  3. package/dist/auth-permissions.d.ts.map +1 -0
  4. package/dist/{auth/wallet-plugins.d.ts → auth-wallet-plugins.d.ts} +5 -69
  5. package/dist/auth-wallet-plugins.d.ts.map +1 -0
  6. package/dist/auth.d.ts +115 -22
  7. package/dist/auth.d.ts.map +1 -0
  8. package/dist/bundler.d.ts +207 -14
  9. package/dist/bundler.d.ts.map +1 -0
  10. package/dist/chunk-xm8h1dzh.js +33 -0
  11. package/dist/client.d.ts +19 -0
  12. package/dist/client.d.ts.map +1 -0
  13. package/dist/contract-errors.d.ts +4156 -0
  14. package/dist/contract-errors.d.ts.map +1 -0
  15. package/dist/contract.d.ts +17 -0
  16. package/dist/contract.d.ts.map +1 -0
  17. package/dist/cookie-store.d.ts +10 -0
  18. package/dist/cookie-store.d.ts.map +1 -0
  19. package/dist/dapi-errors.d.ts +650 -0
  20. package/dist/dapi-errors.d.ts.map +1 -0
  21. package/dist/errors.d.ts +633 -0
  22. package/dist/errors.d.ts.map +1 -0
  23. package/dist/index.d.ts +40 -28
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +96109 -131
  26. package/dist/platform.d.ts +41 -0
  27. package/dist/platform.d.ts.map +1 -0
  28. package/dist/plugins/index.d.ts +13 -0
  29. package/dist/plugins/index.d.ts.map +1 -0
  30. package/dist/plugins/index.js +10 -0
  31. package/dist/sdk-error.d.ts +74 -0
  32. package/dist/sdk-error.d.ts.map +1 -0
  33. package/dist/serializers.d.ts +41 -0
  34. package/dist/serializers.d.ts.map +1 -0
  35. package/dist/types.d.ts +102 -65
  36. package/dist/types.d.ts.map +1 -0
  37. package/dist/url.d.ts +1 -0
  38. package/dist/url.d.ts.map +1 -0
  39. package/dist/verify-webhook.d.ts +28 -17
  40. package/dist/verify-webhook.d.ts.map +1 -0
  41. package/dist/version.d.ts +1 -0
  42. package/dist/version.d.ts.map +1 -0
  43. package/dist/wait-for-transaction.d.ts +81 -54
  44. package/dist/wait-for-transaction.d.ts.map +1 -0
  45. package/dist/webhook-events.d.ts +27 -44
  46. package/dist/webhook-events.d.ts.map +1 -0
  47. package/package.json +30 -103
  48. package/dist/auth/client.d.ts +0 -113
  49. package/dist/auth/live.d.ts +0 -4366
  50. package/dist/auth.js +0 -329
  51. package/dist/bundler.js +0 -99
  52. package/dist/chunk-9k284df4.js +0 -4
  53. package/dist/chunk-def7rqy6.js +0 -946
  54. package/dist/chunk-f4t1bm86.js +0 -67
  55. package/dist/chunk-fjnq61hj.js +0 -11
  56. package/dist/chunk-h12fatty.js +0 -63
  57. package/dist/chunk-kddq0nmb.js +0 -260
  58. package/dist/chunk-r0vsftj4.js +0 -102
  59. package/dist/chunk-tmk1f2yb.js +0 -33
  60. package/dist/chunk-y0d2c7kp.js +0 -54
  61. package/dist/client/conditional-request.d.ts +0 -30
  62. package/dist/client/factory.d.ts +0 -14
  63. package/dist/client/query-serializer.d.ts +0 -2
  64. package/dist/client/request-compression.d.ts +0 -47
  65. package/dist/client/ssr-fetch.d.ts +0 -12
  66. package/dist/effect.d.ts +0 -69
  67. package/dist/effect.js +0 -82
  68. package/dist/errors/api-error.d.ts +0 -29
  69. package/dist/errors/find-current-error.d.ts +0 -8
  70. package/dist/errors/sdk-error.d.ts +0 -52
  71. package/dist/errors/sdk-error.js +0 -8
  72. package/dist/generated/api-types.d.ts +0 -41271
  73. package/dist/generated/response-scalars.d.ts +0 -9
  74. package/dist/generated/routes.d.ts +0 -12
  75. package/dist/proxy/builder.d.ts +0 -47
  76. package/dist/proxy/client.d.ts +0 -32
  77. package/dist/proxy/fetch-executor.d.ts +0 -28
  78. package/dist/proxy/flat-args.d.ts +0 -51
  79. package/dist/proxy/settlement.d.ts +0 -67
  80. package/dist/proxy/sse.d.ts +0 -54
  81. package/dist/proxy/tanstack.d.ts +0 -27
  82. package/dist/proxy/transport.d.ts +0 -73
  83. package/dist/react-query.d.ts +0 -16
  84. package/dist/react-query.js +0 -13
  85. package/dist/readonly-deep.d.ts +0 -12
  86. package/dist/reads-as-funding-paused.d.ts +0 -20
  87. package/dist/routes/index.d.ts +0 -20
  88. package/dist/routes/index.js +0 -10
  89. package/dist/routes/types.d.ts +0 -51
  90. package/dist/runtime-exports.d.ts +0 -20
  91. package/dist/runtime-exports.js +0 -16
  92. package/dist/scalars/big-decimal.d.ts +0 -16
  93. package/dist/scalars/ethereum-address.d.ts +0 -20
  94. package/dist/scalars/exchange-rates.d.ts +0 -27
  95. package/dist/scalars/index.d.ts +0 -18
  96. package/dist/scalars/index.js +0 -86
  97. package/dist/scalars/organization-id.d.ts +0 -20
  98. package/dist/secret.d.ts +0 -14
  99. package/dist/sign-webhook-receipt.d.ts +0 -76
  100. package/dist/sign-webhook-receipt.js +0 -26
  101. package/dist/transport/cookie-store.d.ts +0 -9
  102. package/dist/transport/sse-lifecycle.d.ts +0 -44
  103. package/dist/verify-webhook.js +0 -8
  104. package/dist/wait-for-transaction.js +0 -120
@@ -1,4366 +0,0 @@
1
- import { makeCookieStore } from "../transport/cookie-store.ts";
2
- import { type DalpAuthClientConfig, type DalpCliAuthClient, type DecodedDalpAuthClientConfig } from "./client.ts";
3
- import { type DalpWalletAuthClient } from "./wallet-plugins.ts";
4
- declare function createConfiguredBetterAuthClient(config: DecodedDalpAuthClientConfig, cookieStore: ReturnType<typeof makeCookieStore>): import("better-auth/client").AuthClient<{
5
- baseURL: string;
6
- fetchOptions: {
7
- headers: Record<string, string>;
8
- customFetchImpl: import("../transport/cookie-store.ts").CookieStoreFetch;
9
- credentials: "include";
10
- };
11
- plugins: [{
12
- id: "infer-server-plugin";
13
- version: string;
14
- $InferServerPlugin: never;
15
- }, {
16
- id: "additional-fields-client";
17
- version: string;
18
- $InferServerPlugin: {
19
- id: "additional-fields-client";
20
- version: string;
21
- schema: {
22
- user: {
23
- fields: {};
24
- };
25
- session: {
26
- fields: {};
27
- };
28
- };
29
- };
30
- }, {
31
- id: "admin-client";
32
- version: string;
33
- $InferServerPlugin: {
34
- id: "admin";
35
- version: string;
36
- init(): {
37
- options: {
38
- databaseHooks: {
39
- user: {
40
- create: {
41
- before(user: {
42
- id: string;
43
- createdAt: Date;
44
- updatedAt: Date;
45
- email: string;
46
- emailVerified: boolean;
47
- name: string;
48
- image?: string | null | undefined;
49
- } & Record<string, unknown>): Promise<{
50
- data: {
51
- id: string;
52
- createdAt: Date;
53
- updatedAt: Date;
54
- email: string;
55
- emailVerified: boolean;
56
- name: string;
57
- image?: string | null | undefined;
58
- role: string;
59
- };
60
- }>;
61
- };
62
- };
63
- session: {
64
- create: {
65
- before(session: {
66
- id: string;
67
- createdAt: Date;
68
- updatedAt: Date;
69
- userId: string;
70
- expiresAt: Date;
71
- token: string;
72
- ipAddress?: string | null | undefined;
73
- userAgent?: string | null | undefined;
74
- } & Record<string, unknown>, ctx: import("better-auth").GenericEndpointContext | null): Promise<void>;
75
- };
76
- };
77
- };
78
- };
79
- };
80
- hooks: {
81
- after: {
82
- matcher(context: import("better-auth").HookEndpointContext): boolean;
83
- handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-auth/client/plugins").SessionWithImpersonatedBy[] | undefined>>;
84
- }[];
85
- };
86
- endpoints: {
87
- setRole: import("better-call").StrictEndpoint<"/admin/set-role", {
88
- method: "POST";
89
- body: import("zod").ZodObject<{
90
- userId: import("zod").ZodCoercedString<unknown>;
91
- role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
92
- }, import("zod/v4/core").$strip>;
93
- requireHeaders: true;
94
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
95
- session: {
96
- user: import("better-auth/client/plugins").UserWithRole;
97
- session: {
98
- id: string;
99
- createdAt: Date;
100
- updatedAt: Date;
101
- userId: string;
102
- expiresAt: Date;
103
- token: string;
104
- ipAddress?: string | null | undefined;
105
- userAgent?: string | null | undefined;
106
- };
107
- };
108
- }>>[];
109
- metadata: {
110
- openapi: {
111
- operationId: string;
112
- summary: string;
113
- description: string;
114
- responses: {
115
- 200: {
116
- description: string;
117
- content: {
118
- "application/json": {
119
- schema: {
120
- type: "object";
121
- properties: {
122
- user: {
123
- $ref: string;
124
- };
125
- };
126
- };
127
- };
128
- };
129
- };
130
- };
131
- };
132
- $Infer: {
133
- body: {
134
- userId: string;
135
- role: "admin" | "member" | "owner" | ("admin" | "member" | "owner")[];
136
- };
137
- };
138
- };
139
- }, {
140
- user: import("better-auth/client/plugins").UserWithRole;
141
- }>;
142
- getUser: import("better-call").StrictEndpoint<"/admin/get-user", {
143
- method: "GET";
144
- query: import("zod").ZodObject<{
145
- id: import("zod").ZodString;
146
- }, import("zod/v4/core").$strip>;
147
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
148
- session: {
149
- user: import("better-auth/client/plugins").UserWithRole;
150
- session: {
151
- id: string;
152
- createdAt: Date;
153
- updatedAt: Date;
154
- userId: string;
155
- expiresAt: Date;
156
- token: string;
157
- ipAddress?: string | null | undefined;
158
- userAgent?: string | null | undefined;
159
- };
160
- };
161
- }>>[];
162
- metadata: {
163
- openapi: {
164
- operationId: string;
165
- summary: string;
166
- description: string;
167
- responses: {
168
- 200: {
169
- description: string;
170
- content: {
171
- "application/json": {
172
- schema: {
173
- type: "object";
174
- properties: {
175
- user: {
176
- $ref: string;
177
- };
178
- };
179
- };
180
- };
181
- };
182
- };
183
- };
184
- };
185
- };
186
- }, import("better-auth/client/plugins").UserWithRole>;
187
- createUser: import("better-call").StrictEndpoint<"/admin/create-user", {
188
- method: "POST";
189
- body: import("zod").ZodObject<{
190
- email: import("zod").ZodString;
191
- password: import("zod").ZodOptional<import("zod").ZodString>;
192
- name: import("zod").ZodString;
193
- role: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>;
194
- data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
195
- }, import("zod/v4/core").$strip>;
196
- metadata: {
197
- openapi: {
198
- operationId: string;
199
- summary: string;
200
- description: string;
201
- responses: {
202
- 200: {
203
- description: string;
204
- content: {
205
- "application/json": {
206
- schema: {
207
- type: "object";
208
- properties: {
209
- user: {
210
- $ref: string;
211
- };
212
- };
213
- };
214
- };
215
- };
216
- };
217
- };
218
- };
219
- $Infer: {
220
- body: {
221
- email: string;
222
- password?: string | undefined;
223
- name: string;
224
- role?: "admin" | "member" | "owner" | ("admin" | "member" | "owner")[] | undefined;
225
- data?: Record<string, any> | undefined;
226
- };
227
- };
228
- };
229
- }, {
230
- user: import("better-auth/client/plugins").UserWithRole;
231
- }>;
232
- adminUpdateUser: import("better-call").StrictEndpoint<"/admin/update-user", {
233
- method: "POST";
234
- body: import("zod").ZodObject<{
235
- userId: import("zod").ZodCoercedString<unknown>;
236
- data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
237
- }, import("zod/v4/core").$strip>;
238
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
239
- session: {
240
- user: import("better-auth/client/plugins").UserWithRole;
241
- session: {
242
- id: string;
243
- createdAt: Date;
244
- updatedAt: Date;
245
- userId: string;
246
- expiresAt: Date;
247
- token: string;
248
- ipAddress?: string | null | undefined;
249
- userAgent?: string | null | undefined;
250
- };
251
- };
252
- }>>[];
253
- metadata: {
254
- openapi: {
255
- operationId: string;
256
- summary: string;
257
- description: string;
258
- responses: {
259
- 200: {
260
- description: string;
261
- content: {
262
- "application/json": {
263
- schema: {
264
- type: "object";
265
- properties: {
266
- user: {
267
- $ref: string;
268
- };
269
- };
270
- };
271
- };
272
- };
273
- };
274
- };
275
- };
276
- };
277
- }, import("better-auth/client/plugins").UserWithRole>;
278
- listUsers: import("better-call").StrictEndpoint<"/admin/list-users", {
279
- method: "GET";
280
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
281
- session: {
282
- user: import("better-auth/client/plugins").UserWithRole;
283
- session: {
284
- id: string;
285
- createdAt: Date;
286
- updatedAt: Date;
287
- userId: string;
288
- expiresAt: Date;
289
- token: string;
290
- ipAddress?: string | null | undefined;
291
- userAgent?: string | null | undefined;
292
- };
293
- };
294
- }>>[];
295
- query: import("zod").ZodObject<{
296
- searchValue: import("zod").ZodOptional<import("zod").ZodString>;
297
- searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
298
- email: "email";
299
- name: "name";
300
- }>>;
301
- searchOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
302
- contains: "contains";
303
- starts_with: "starts_with";
304
- ends_with: "ends_with";
305
- }>>;
306
- limit: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
307
- offset: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
308
- sortBy: import("zod").ZodOptional<import("zod").ZodString>;
309
- sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
310
- asc: "asc";
311
- desc: "desc";
312
- }>>;
313
- filterField: import("zod").ZodOptional<import("zod").ZodString>;
314
- 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>]>>;
315
- filterOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
316
- eq: "eq";
317
- ne: "ne";
318
- gt: "gt";
319
- gte: "gte";
320
- lt: "lt";
321
- lte: "lte";
322
- in: "in";
323
- not_in: "not_in";
324
- contains: "contains";
325
- starts_with: "starts_with";
326
- ends_with: "ends_with";
327
- }>>;
328
- }, import("zod/v4/core").$strip>;
329
- metadata: {
330
- openapi: {
331
- operationId: string;
332
- summary: string;
333
- description: string;
334
- responses: {
335
- 200: {
336
- description: string;
337
- content: {
338
- "application/json": {
339
- schema: {
340
- type: "object";
341
- properties: {
342
- users: {
343
- type: string;
344
- items: {
345
- $ref: string;
346
- };
347
- };
348
- total: {
349
- type: string;
350
- };
351
- limit: {
352
- type: string;
353
- };
354
- offset: {
355
- type: string;
356
- };
357
- };
358
- required: string[];
359
- };
360
- };
361
- };
362
- };
363
- };
364
- };
365
- };
366
- }, {
367
- users: import("better-auth/client/plugins").UserWithRole[];
368
- total: number;
369
- }>;
370
- listUserSessions: import("better-call").StrictEndpoint<"/admin/list-user-sessions", {
371
- method: "POST";
372
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
373
- session: {
374
- user: import("better-auth/client/plugins").UserWithRole;
375
- session: {
376
- id: string;
377
- createdAt: Date;
378
- updatedAt: Date;
379
- userId: string;
380
- expiresAt: Date;
381
- token: string;
382
- ipAddress?: string | null | undefined;
383
- userAgent?: string | null | undefined;
384
- };
385
- };
386
- }>>[];
387
- body: import("zod").ZodObject<{
388
- userId: import("zod").ZodCoercedString<unknown>;
389
- }, import("zod/v4/core").$strip>;
390
- metadata: {
391
- openapi: {
392
- operationId: string;
393
- summary: string;
394
- description: string;
395
- responses: {
396
- 200: {
397
- description: string;
398
- content: {
399
- "application/json": {
400
- schema: {
401
- type: "object";
402
- properties: {
403
- sessions: {
404
- type: string;
405
- items: {
406
- $ref: string;
407
- };
408
- };
409
- };
410
- };
411
- };
412
- };
413
- };
414
- };
415
- };
416
- };
417
- }, {
418
- sessions: import("better-auth/client/plugins").SessionWithImpersonatedBy[];
419
- }>;
420
- unbanUser: import("better-call").StrictEndpoint<"/admin/unban-user", {
421
- method: "POST";
422
- body: import("zod").ZodObject<{
423
- userId: import("zod").ZodCoercedString<unknown>;
424
- }, import("zod/v4/core").$strip>;
425
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
426
- session: {
427
- user: import("better-auth/client/plugins").UserWithRole;
428
- session: {
429
- id: string;
430
- createdAt: Date;
431
- updatedAt: Date;
432
- userId: string;
433
- expiresAt: Date;
434
- token: string;
435
- ipAddress?: string | null | undefined;
436
- userAgent?: string | null | undefined;
437
- };
438
- };
439
- }>>[];
440
- metadata: {
441
- openapi: {
442
- operationId: string;
443
- summary: string;
444
- description: string;
445
- responses: {
446
- 200: {
447
- description: string;
448
- content: {
449
- "application/json": {
450
- schema: {
451
- type: "object";
452
- properties: {
453
- user: {
454
- $ref: string;
455
- };
456
- };
457
- };
458
- };
459
- };
460
- };
461
- };
462
- };
463
- };
464
- }, {
465
- user: import("better-auth/client/plugins").UserWithRole;
466
- }>;
467
- banUser: import("better-call").StrictEndpoint<"/admin/ban-user", {
468
- method: "POST";
469
- body: import("zod").ZodObject<{
470
- userId: import("zod").ZodCoercedString<unknown>;
471
- banReason: import("zod").ZodOptional<import("zod").ZodString>;
472
- banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
473
- }, import("zod/v4/core").$strip>;
474
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
475
- session: {
476
- user: import("better-auth/client/plugins").UserWithRole;
477
- session: {
478
- id: string;
479
- createdAt: Date;
480
- updatedAt: Date;
481
- userId: string;
482
- expiresAt: Date;
483
- token: string;
484
- ipAddress?: string | null | undefined;
485
- userAgent?: string | null | undefined;
486
- };
487
- };
488
- }>>[];
489
- metadata: {
490
- openapi: {
491
- operationId: string;
492
- summary: string;
493
- description: string;
494
- responses: {
495
- 200: {
496
- description: string;
497
- content: {
498
- "application/json": {
499
- schema: {
500
- type: "object";
501
- properties: {
502
- user: {
503
- $ref: string;
504
- };
505
- };
506
- };
507
- };
508
- };
509
- };
510
- };
511
- };
512
- };
513
- }, {
514
- user: import("better-auth/client/plugins").UserWithRole;
515
- }>;
516
- impersonateUser: import("better-call").StrictEndpoint<"/admin/impersonate-user", {
517
- method: "POST";
518
- body: import("zod").ZodObject<{
519
- userId: import("zod").ZodCoercedString<unknown>;
520
- }, import("zod/v4/core").$strip>;
521
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
522
- session: {
523
- user: import("better-auth/client/plugins").UserWithRole;
524
- session: {
525
- id: string;
526
- createdAt: Date;
527
- updatedAt: Date;
528
- userId: string;
529
- expiresAt: Date;
530
- token: string;
531
- ipAddress?: string | null | undefined;
532
- userAgent?: string | null | undefined;
533
- };
534
- };
535
- }>>[];
536
- metadata: {
537
- openapi: {
538
- operationId: string;
539
- summary: string;
540
- description: string;
541
- responses: {
542
- 200: {
543
- description: string;
544
- content: {
545
- "application/json": {
546
- schema: {
547
- type: "object";
548
- properties: {
549
- session: {
550
- $ref: string;
551
- };
552
- user: {
553
- $ref: string;
554
- };
555
- };
556
- };
557
- };
558
- };
559
- };
560
- };
561
- };
562
- };
563
- }, {
564
- session: {
565
- id: string;
566
- createdAt: Date;
567
- updatedAt: Date;
568
- userId: string;
569
- expiresAt: Date;
570
- token: string;
571
- ipAddress?: string | null | undefined;
572
- userAgent?: string | null | undefined;
573
- };
574
- user: import("better-auth/client/plugins").UserWithRole;
575
- }>;
576
- stopImpersonating: import("better-call").StrictEndpoint<"/admin/stop-impersonating", {
577
- method: "POST";
578
- requireHeaders: true;
579
- }, {
580
- session: {
581
- id: string;
582
- createdAt: Date;
583
- updatedAt: Date;
584
- userId: string;
585
- expiresAt: Date;
586
- token: string;
587
- ipAddress?: string | null | undefined;
588
- userAgent?: string | null | undefined;
589
- } & Record<string, any>;
590
- user: {
591
- id: string;
592
- createdAt: Date;
593
- updatedAt: Date;
594
- email: string;
595
- emailVerified: boolean;
596
- name: string;
597
- image?: string | null | undefined;
598
- } & Record<string, any>;
599
- }>;
600
- revokeUserSession: import("better-call").StrictEndpoint<"/admin/revoke-user-session", {
601
- method: "POST";
602
- body: import("zod").ZodObject<{
603
- sessionToken: import("zod").ZodString;
604
- }, import("zod/v4/core").$strip>;
605
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
606
- session: {
607
- user: import("better-auth/client/plugins").UserWithRole;
608
- session: {
609
- id: string;
610
- createdAt: Date;
611
- updatedAt: Date;
612
- userId: string;
613
- expiresAt: Date;
614
- token: string;
615
- ipAddress?: string | null | undefined;
616
- userAgent?: string | null | undefined;
617
- };
618
- };
619
- }>>[];
620
- metadata: {
621
- openapi: {
622
- operationId: string;
623
- summary: string;
624
- description: string;
625
- responses: {
626
- 200: {
627
- description: string;
628
- content: {
629
- "application/json": {
630
- schema: {
631
- type: "object";
632
- properties: {
633
- success: {
634
- type: string;
635
- };
636
- };
637
- };
638
- };
639
- };
640
- };
641
- };
642
- };
643
- };
644
- }, {
645
- success: boolean;
646
- }>;
647
- revokeUserSessions: import("better-call").StrictEndpoint<"/admin/revoke-user-sessions", {
648
- method: "POST";
649
- body: import("zod").ZodObject<{
650
- userId: import("zod").ZodCoercedString<unknown>;
651
- }, import("zod/v4/core").$strip>;
652
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
653
- session: {
654
- user: import("better-auth/client/plugins").UserWithRole;
655
- session: {
656
- id: string;
657
- createdAt: Date;
658
- updatedAt: Date;
659
- userId: string;
660
- expiresAt: Date;
661
- token: string;
662
- ipAddress?: string | null | undefined;
663
- userAgent?: string | null | undefined;
664
- };
665
- };
666
- }>>[];
667
- metadata: {
668
- openapi: {
669
- operationId: string;
670
- summary: string;
671
- description: string;
672
- responses: {
673
- 200: {
674
- description: string;
675
- content: {
676
- "application/json": {
677
- schema: {
678
- type: "object";
679
- properties: {
680
- success: {
681
- type: string;
682
- };
683
- };
684
- };
685
- };
686
- };
687
- };
688
- };
689
- };
690
- };
691
- }, {
692
- success: boolean;
693
- }>;
694
- removeUser: import("better-call").StrictEndpoint<"/admin/remove-user", {
695
- method: "POST";
696
- body: import("zod").ZodObject<{
697
- userId: import("zod").ZodCoercedString<unknown>;
698
- }, import("zod/v4/core").$strip>;
699
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
700
- session: {
701
- user: import("better-auth/client/plugins").UserWithRole;
702
- session: {
703
- id: string;
704
- createdAt: Date;
705
- updatedAt: Date;
706
- userId: string;
707
- expiresAt: Date;
708
- token: string;
709
- ipAddress?: string | null | undefined;
710
- userAgent?: string | null | undefined;
711
- };
712
- };
713
- }>>[];
714
- metadata: {
715
- openapi: {
716
- operationId: string;
717
- summary: string;
718
- description: string;
719
- responses: {
720
- 200: {
721
- description: string;
722
- content: {
723
- "application/json": {
724
- schema: {
725
- type: "object";
726
- properties: {
727
- success: {
728
- type: string;
729
- };
730
- };
731
- };
732
- };
733
- };
734
- };
735
- };
736
- };
737
- };
738
- }, {
739
- success: boolean;
740
- }>;
741
- setUserPassword: import("better-call").StrictEndpoint<"/admin/set-user-password", {
742
- method: "POST";
743
- body: import("zod").ZodObject<{
744
- newPassword: import("zod").ZodString;
745
- userId: import("zod").ZodCoercedString<unknown>;
746
- }, import("zod/v4/core").$strip>;
747
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
748
- session: {
749
- user: import("better-auth/client/plugins").UserWithRole;
750
- session: {
751
- id: string;
752
- createdAt: Date;
753
- updatedAt: Date;
754
- userId: string;
755
- expiresAt: Date;
756
- token: string;
757
- ipAddress?: string | null | undefined;
758
- userAgent?: string | null | undefined;
759
- };
760
- };
761
- }>>[];
762
- metadata: {
763
- openapi: {
764
- operationId: string;
765
- summary: string;
766
- description: string;
767
- responses: {
768
- 200: {
769
- description: string;
770
- content: {
771
- "application/json": {
772
- schema: {
773
- type: "object";
774
- properties: {
775
- status: {
776
- type: string;
777
- };
778
- };
779
- };
780
- };
781
- };
782
- };
783
- };
784
- };
785
- };
786
- }, {
787
- status: boolean;
788
- }>;
789
- userHasPermission: import("better-call").StrictEndpoint<"/admin/has-permission", {
790
- method: "POST";
791
- body: import("zod").ZodIntersection<import("zod").ZodObject<{
792
- userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
793
- role: import("zod").ZodOptional<import("zod").ZodString>;
794
- }, import("zod/v4/core").$strip>, import("zod").ZodXor<readonly [import("zod").ZodObject<{
795
- permission: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
796
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
797
- permissions: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
798
- }, import("zod/v4/core").$strip>]>>;
799
- metadata: {
800
- openapi: {
801
- description: string;
802
- requestBody: {
803
- content: {
804
- "application/json": {
805
- schema: {
806
- type: "object";
807
- properties: {
808
- permissions: {
809
- type: string;
810
- description: string;
811
- };
812
- };
813
- required: string[];
814
- };
815
- };
816
- };
817
- };
818
- responses: {
819
- "200": {
820
- description: string;
821
- content: {
822
- "application/json": {
823
- schema: {
824
- type: "object";
825
- properties: {
826
- error: {
827
- type: string;
828
- };
829
- success: {
830
- type: string;
831
- };
832
- };
833
- required: string[];
834
- };
835
- };
836
- };
837
- };
838
- };
839
- };
840
- $Infer: {
841
- body: {
842
- permissions: {
843
- readonly [x: string]: import("better-auth").LiteralString[] | undefined;
844
- };
845
- } & {
846
- userId?: string | undefined;
847
- role?: "admin" | "member" | "owner" | undefined;
848
- };
849
- };
850
- };
851
- }, {
852
- error: null;
853
- success: boolean;
854
- }>;
855
- };
856
- $ERROR_CODES: {
857
- USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
858
- FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
859
- USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
860
- YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
861
- YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
862
- YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
863
- YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
864
- YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
865
- YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
866
- YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
867
- YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
868
- YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
869
- YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
870
- BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
871
- YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
872
- NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
873
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
874
- YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
875
- YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
876
- YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
877
- INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
878
- YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
879
- PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: import("better-auth").RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
880
- };
881
- schema: {
882
- user: {
883
- fields: {
884
- role: {
885
- type: "string";
886
- required: false;
887
- input: false;
888
- };
889
- banned: {
890
- type: "boolean";
891
- defaultValue: false;
892
- required: false;
893
- input: false;
894
- };
895
- banReason: {
896
- type: "string";
897
- required: false;
898
- input: false;
899
- };
900
- banExpires: {
901
- type: "date";
902
- required: false;
903
- input: false;
904
- };
905
- };
906
- };
907
- session: {
908
- fields: {
909
- impersonatedBy: {
910
- type: "string";
911
- required: false;
912
- input: false;
913
- };
914
- };
915
- };
916
- };
917
- options: NoInfer<{
918
- ac: import("better-auth/client").AccessControl;
919
- roles: {
920
- admin: import("better-auth/client").Role;
921
- owner: import("better-auth/client").Role;
922
- member: import("better-auth/client").Role;
923
- };
924
- }>;
925
- };
926
- getActions: () => {
927
- admin: {
928
- checkRolePermission: <R extends ({
929
- ac: import("better-auth/client").AccessControl;
930
- roles: {
931
- admin: import("better-auth/client").Role;
932
- owner: import("better-auth/client").Role;
933
- member: import("better-auth/client").Role;
934
- };
935
- } extends {
936
- roles: any;
937
- } ? "admin" | "member" | "owner" : "admin" | "user")>(data: {
938
- permissions: {
939
- readonly [x: string]: import("better-auth").LiteralString[] | undefined;
940
- };
941
- } & {
942
- role: R;
943
- }) => boolean;
944
- };
945
- };
946
- pathMethods: {
947
- "/admin/list-users": "GET";
948
- "/admin/impersonate-user": "POST";
949
- "/admin/stop-impersonating": "POST";
950
- };
951
- atomListeners: {
952
- matcher: (path: string) => path is "/admin/impersonate-user" | "/admin/stop-impersonating";
953
- signal: "$sessionSignal";
954
- }[];
955
- $ERROR_CODES: {
956
- USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
957
- FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
958
- USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
959
- YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
960
- YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
961
- YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
962
- YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
963
- YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
964
- YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
965
- YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
966
- YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
967
- YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
968
- YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
969
- BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
970
- YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
971
- NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
972
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
973
- YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
974
- YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
975
- YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
976
- INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
977
- YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
978
- PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: import("better-auth").RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
979
- };
980
- }, {
981
- id: "api-key";
982
- version: string;
983
- $InferServerPlugin: {
984
- id: "api-key";
985
- version: string;
986
- $ERROR_CODES: {
987
- INVALID_METADATA_TYPE: import("better-auth").RawError<"INVALID_METADATA_TYPE">;
988
- REFILL_AMOUNT_AND_INTERVAL_REQUIRED: import("better-auth").RawError<"REFILL_AMOUNT_AND_INTERVAL_REQUIRED">;
989
- REFILL_INTERVAL_AND_AMOUNT_REQUIRED: import("better-auth").RawError<"REFILL_INTERVAL_AND_AMOUNT_REQUIRED">;
990
- USER_BANNED: import("better-auth").RawError<"USER_BANNED">;
991
- UNAUTHORIZED_SESSION: import("better-auth").RawError<"UNAUTHORIZED_SESSION">;
992
- KEY_NOT_FOUND: import("better-auth").RawError<"KEY_NOT_FOUND">;
993
- KEY_DISABLED: import("better-auth").RawError<"KEY_DISABLED">;
994
- KEY_EXPIRED: import("better-auth").RawError<"KEY_EXPIRED">;
995
- USAGE_EXCEEDED: import("better-auth").RawError<"USAGE_EXCEEDED">;
996
- KEY_NOT_RECOVERABLE: import("better-auth").RawError<"KEY_NOT_RECOVERABLE">;
997
- EXPIRES_IN_IS_TOO_SMALL: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_SMALL">;
998
- EXPIRES_IN_IS_TOO_LARGE: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_LARGE">;
999
- INVALID_REMAINING: import("better-auth").RawError<"INVALID_REMAINING">;
1000
- INVALID_PREFIX_LENGTH: import("better-auth").RawError<"INVALID_PREFIX_LENGTH">;
1001
- INVALID_NAME_LENGTH: import("better-auth").RawError<"INVALID_NAME_LENGTH">;
1002
- METADATA_DISABLED: import("better-auth").RawError<"METADATA_DISABLED">;
1003
- RATE_LIMIT_EXCEEDED: import("better-auth").RawError<"RATE_LIMIT_EXCEEDED">;
1004
- NO_VALUES_TO_UPDATE: import("better-auth").RawError<"NO_VALUES_TO_UPDATE">;
1005
- KEY_DISABLED_EXPIRATION: import("better-auth").RawError<"KEY_DISABLED_EXPIRATION">;
1006
- INVALID_API_KEY: import("better-auth").RawError<"INVALID_API_KEY">;
1007
- INVALID_USER_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_USER_ID_FROM_API_KEY">;
1008
- INVALID_REFERENCE_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_REFERENCE_ID_FROM_API_KEY">;
1009
- INVALID_API_KEY_GETTER_RETURN_TYPE: import("better-auth").RawError<"INVALID_API_KEY_GETTER_RETURN_TYPE">;
1010
- SERVER_ONLY_PROPERTY: import("better-auth").RawError<"SERVER_ONLY_PROPERTY">;
1011
- FAILED_TO_UPDATE_API_KEY: import("better-auth").RawError<"FAILED_TO_UPDATE_API_KEY">;
1012
- NAME_REQUIRED: import("better-auth").RawError<"NAME_REQUIRED">;
1013
- ORGANIZATION_ID_REQUIRED: import("better-auth").RawError<"ORGANIZATION_ID_REQUIRED">;
1014
- USER_NOT_MEMBER_OF_ORGANIZATION: import("better-auth").RawError<"USER_NOT_MEMBER_OF_ORGANIZATION">;
1015
- INSUFFICIENT_API_KEY_PERMISSIONS: import("better-auth").RawError<"INSUFFICIENT_API_KEY_PERMISSIONS">;
1016
- NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: import("better-auth").RawError<"NO_DEFAULT_API_KEY_CONFIGURATION_FOUND">;
1017
- ORGANIZATION_PLUGIN_REQUIRED: import("better-auth").RawError<"ORGANIZATION_PLUGIN_REQUIRED">;
1018
- };
1019
- hooks: {
1020
- before: {
1021
- matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
1022
- handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1023
- user: {
1024
- id: string;
1025
- createdAt: Date;
1026
- updatedAt: Date;
1027
- email: string;
1028
- emailVerified: boolean;
1029
- name: string;
1030
- image?: string | null | undefined;
1031
- };
1032
- session: {
1033
- id: string;
1034
- token: string;
1035
- userId: string;
1036
- userAgent: string | null;
1037
- ipAddress: string | null;
1038
- createdAt: Date;
1039
- updatedAt: Date;
1040
- expiresAt: Date;
1041
- };
1042
- } | {
1043
- context: import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
1044
- options: import("better-auth").BetterAuthOptions;
1045
- trustedOrigins: string[];
1046
- trustedProviders: string[];
1047
- isTrustedOrigin: (url: string, settings?: {
1048
- allowRelativePaths: boolean;
1049
- }) => boolean;
1050
- oauthConfig: {
1051
- skipStateCookieCheck?: boolean | undefined;
1052
- storeStateStrategy: "database" | "cookie";
1053
- };
1054
- newSession: {
1055
- session: {
1056
- id: string;
1057
- createdAt: Date;
1058
- updatedAt: Date;
1059
- userId: string;
1060
- expiresAt: Date;
1061
- token: string;
1062
- ipAddress?: string | null | undefined;
1063
- userAgent?: string | null | undefined;
1064
- } & Record<string, any>;
1065
- user: {
1066
- id: string;
1067
- createdAt: Date;
1068
- updatedAt: Date;
1069
- email: string;
1070
- emailVerified: boolean;
1071
- name: string;
1072
- image?: string | null | undefined;
1073
- } & Record<string, any>;
1074
- } | null;
1075
- session: {
1076
- session: {
1077
- id: string;
1078
- createdAt: Date;
1079
- updatedAt: Date;
1080
- userId: string;
1081
- expiresAt: Date;
1082
- token: string;
1083
- ipAddress?: string | null | undefined;
1084
- userAgent?: string | null | undefined;
1085
- } & Record<string, any>;
1086
- user: {
1087
- id: string;
1088
- createdAt: Date;
1089
- updatedAt: Date;
1090
- email: string;
1091
- emailVerified: boolean;
1092
- name: string;
1093
- image?: string | null | undefined;
1094
- } & Record<string, any>;
1095
- } | null;
1096
- setNewSession: (session: {
1097
- session: {
1098
- id: string;
1099
- createdAt: Date;
1100
- updatedAt: Date;
1101
- userId: string;
1102
- expiresAt: Date;
1103
- token: string;
1104
- ipAddress?: string | null | undefined;
1105
- userAgent?: string | null | undefined;
1106
- } & Record<string, any>;
1107
- user: {
1108
- id: string;
1109
- createdAt: Date;
1110
- updatedAt: Date;
1111
- email: string;
1112
- emailVerified: boolean;
1113
- name: string;
1114
- image?: string | null | undefined;
1115
- } & Record<string, any>;
1116
- } | null) => void;
1117
- socialProviders: import("better-auth").OAuthProvider[];
1118
- authCookies: import("better-auth").BetterAuthCookies;
1119
- logger: ReturnType<(options?: import("better-auth").Logger | undefined) => import("better-auth").InternalLogger>;
1120
- rateLimit: {
1121
- enabled: boolean;
1122
- window: number;
1123
- max: number;
1124
- storage: "memory" | "database" | "secondary-storage";
1125
- } & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
1126
- adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
1127
- internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
1128
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-call").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
1129
- secret: string;
1130
- secretConfig: string | import("better-auth").SecretConfig;
1131
- sessionConfig: {
1132
- updateAge: number;
1133
- expiresIn: number;
1134
- freshAge: number;
1135
- cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
1136
- cookieRefreshCache: false | {
1137
- enabled: true;
1138
- updateAge: number;
1139
- };
1140
- };
1141
- generateId: (options: {
1142
- model: import("better-auth").ModelNames;
1143
- size?: number | undefined;
1144
- }) => string | false;
1145
- secondaryStorage: import("better-auth").SecondaryStorage | undefined;
1146
- password: {
1147
- hash: (password: string) => Promise<string>;
1148
- verify: (data: {
1149
- password: string;
1150
- hash: string;
1151
- }) => Promise<boolean>;
1152
- config: {
1153
- minPasswordLength: number;
1154
- maxPasswordLength: number;
1155
- };
1156
- checkPassword: (userId: string, ctx: import("better-auth").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
1157
- };
1158
- tables: import("better-auth").BetterAuthDBSchema;
1159
- runMigrations: () => Promise<void>;
1160
- publishTelemetry: (event: {
1161
- type: string;
1162
- anonymousId?: string | undefined;
1163
- payload: Record<string, any>;
1164
- }) => Promise<void>;
1165
- skipOriginCheck: boolean | string[];
1166
- skipCSRFCheck: boolean;
1167
- runInBackground: (promise: Promise<unknown>) => void;
1168
- runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
1169
- } & {
1170
- returned?: unknown | undefined;
1171
- responseHeaders?: Headers | undefined;
1172
- }>;
1173
- }>>;
1174
- }[];
1175
- };
1176
- endpoints: {
1177
- createApiKey: import("better-call").StrictEndpoint<"/api-key/create", {
1178
- method: "POST";
1179
- body: import("zod").ZodObject<{
1180
- configId: import("zod").ZodOptional<import("zod").ZodString>;
1181
- name: import("zod").ZodOptional<import("zod").ZodString>;
1182
- expiresIn: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
1183
- prefix: import("zod").ZodOptional<import("zod").ZodString>;
1184
- remaining: import("zod").ZodDefault<import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>>;
1185
- metadata: import("zod").ZodOptional<import("zod").ZodAny>;
1186
- refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
1187
- refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
1188
- rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
1189
- rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
1190
- rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
1191
- permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
1192
- userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
1193
- organizationId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
1194
- }, import("zod/v4/core").$strip>;
1195
- metadata: {
1196
- openapi: {
1197
- description: string;
1198
- responses: {
1199
- "200": {
1200
- description: string;
1201
- content: {
1202
- "application/json": {
1203
- schema: {
1204
- type: "object";
1205
- properties: {
1206
- id: {
1207
- type: string;
1208
- description: string;
1209
- };
1210
- createdAt: {
1211
- type: string;
1212
- format: string;
1213
- description: string;
1214
- };
1215
- updatedAt: {
1216
- type: string;
1217
- format: string;
1218
- description: string;
1219
- };
1220
- name: {
1221
- type: string;
1222
- nullable: boolean;
1223
- description: string;
1224
- };
1225
- prefix: {
1226
- type: string;
1227
- nullable: boolean;
1228
- description: string;
1229
- };
1230
- start: {
1231
- type: string;
1232
- nullable: boolean;
1233
- description: string;
1234
- };
1235
- key: {
1236
- type: string;
1237
- description: string;
1238
- };
1239
- enabled: {
1240
- type: string;
1241
- description: string;
1242
- };
1243
- expiresAt: {
1244
- type: string;
1245
- format: string;
1246
- nullable: boolean;
1247
- description: string;
1248
- };
1249
- referenceId: {
1250
- type: string;
1251
- description: string;
1252
- };
1253
- lastRefillAt: {
1254
- type: string;
1255
- format: string;
1256
- nullable: boolean;
1257
- description: string;
1258
- };
1259
- lastRequest: {
1260
- type: string;
1261
- format: string;
1262
- nullable: boolean;
1263
- description: string;
1264
- };
1265
- metadata: {
1266
- type: string;
1267
- nullable: boolean;
1268
- additionalProperties: boolean;
1269
- description: string;
1270
- };
1271
- rateLimitMax: {
1272
- type: string;
1273
- nullable: boolean;
1274
- description: string;
1275
- };
1276
- rateLimitTimeWindow: {
1277
- type: string;
1278
- nullable: boolean;
1279
- description: string;
1280
- };
1281
- remaining: {
1282
- type: string;
1283
- nullable: boolean;
1284
- description: string;
1285
- };
1286
- refillAmount: {
1287
- type: string;
1288
- nullable: boolean;
1289
- description: string;
1290
- };
1291
- refillInterval: {
1292
- type: string;
1293
- nullable: boolean;
1294
- description: string;
1295
- };
1296
- rateLimitEnabled: {
1297
- type: string;
1298
- description: string;
1299
- };
1300
- requestCount: {
1301
- type: string;
1302
- description: string;
1303
- };
1304
- permissions: {
1305
- type: string;
1306
- nullable: boolean;
1307
- additionalProperties: {
1308
- type: string;
1309
- items: {
1310
- type: string;
1311
- };
1312
- };
1313
- description: string;
1314
- };
1315
- };
1316
- required: string[];
1317
- };
1318
- };
1319
- };
1320
- };
1321
- };
1322
- };
1323
- };
1324
- }, {
1325
- key: string;
1326
- metadata: any;
1327
- permissions: any;
1328
- id: string;
1329
- configId: string;
1330
- name: string | null;
1331
- start: string | null;
1332
- prefix: string | null;
1333
- referenceId: string;
1334
- refillInterval: number | null;
1335
- refillAmount: number | null;
1336
- lastRefillAt: Date | null;
1337
- enabled: boolean;
1338
- rateLimitEnabled: boolean;
1339
- rateLimitTimeWindow: number | null;
1340
- rateLimitMax: number | null;
1341
- requestCount: number;
1342
- remaining: number | null;
1343
- lastRequest: Date | null;
1344
- expiresAt: Date | null;
1345
- createdAt: Date;
1346
- updatedAt: Date;
1347
- }>;
1348
- verifyApiKey: import("better-call").StrictEndpoint<string, {
1349
- method: "POST";
1350
- body: import("zod").ZodObject<{
1351
- configId: import("zod").ZodOptional<import("zod").ZodString>;
1352
- key: import("zod").ZodString;
1353
- permissions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>;
1354
- }, import("zod/v4/core").$strip>;
1355
- }, {
1356
- valid: boolean;
1357
- error: {
1358
- message: import("better-auth").RawError<"INVALID_API_KEY">;
1359
- code: "KEY_NOT_FOUND";
1360
- };
1361
- key: null;
1362
- } | {
1363
- valid: boolean;
1364
- error: {
1365
- message: string | undefined;
1366
- code: string;
1367
- cause?: unknown;
1368
- };
1369
- key: null;
1370
- } | {
1371
- valid: boolean;
1372
- error: {
1373
- message: import("better-auth").RawError<"INVALID_API_KEY">;
1374
- code: "INVALID_API_KEY";
1375
- };
1376
- key: null;
1377
- } | {
1378
- valid: boolean;
1379
- error: null;
1380
- key: Omit<import("@better-auth/api-key/client").ApiKey, "key"> | null;
1381
- }>;
1382
- getApiKey: import("better-call").StrictEndpoint<"/api-key/get", {
1383
- method: "GET";
1384
- query: import("zod").ZodObject<{
1385
- configId: import("zod").ZodOptional<import("zod").ZodString>;
1386
- id: import("zod").ZodString;
1387
- }, import("zod/v4/core").$strip>;
1388
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1389
- session: {
1390
- session: Record<string, any> & {
1391
- id: string;
1392
- createdAt: Date;
1393
- updatedAt: Date;
1394
- userId: string;
1395
- expiresAt: Date;
1396
- token: string;
1397
- ipAddress?: string | null | undefined;
1398
- userAgent?: string | null | undefined;
1399
- };
1400
- user: Record<string, any> & {
1401
- id: string;
1402
- createdAt: Date;
1403
- updatedAt: Date;
1404
- email: string;
1405
- emailVerified: boolean;
1406
- name: string;
1407
- image?: string | null | undefined;
1408
- };
1409
- };
1410
- }>>[];
1411
- metadata: {
1412
- openapi: {
1413
- description: string;
1414
- responses: {
1415
- "200": {
1416
- description: string;
1417
- content: {
1418
- "application/json": {
1419
- schema: {
1420
- type: "object";
1421
- properties: {
1422
- id: {
1423
- type: string;
1424
- description: string;
1425
- };
1426
- name: {
1427
- type: string;
1428
- nullable: boolean;
1429
- description: string;
1430
- };
1431
- start: {
1432
- type: string;
1433
- nullable: boolean;
1434
- description: string;
1435
- };
1436
- prefix: {
1437
- type: string;
1438
- nullable: boolean;
1439
- description: string;
1440
- };
1441
- userId: {
1442
- type: string;
1443
- description: string;
1444
- };
1445
- refillInterval: {
1446
- type: string;
1447
- nullable: boolean;
1448
- description: string;
1449
- };
1450
- refillAmount: {
1451
- type: string;
1452
- nullable: boolean;
1453
- description: string;
1454
- };
1455
- lastRefillAt: {
1456
- type: string;
1457
- format: string;
1458
- nullable: boolean;
1459
- description: string;
1460
- };
1461
- enabled: {
1462
- type: string;
1463
- description: string;
1464
- default: boolean;
1465
- };
1466
- rateLimitEnabled: {
1467
- type: string;
1468
- description: string;
1469
- };
1470
- rateLimitTimeWindow: {
1471
- type: string;
1472
- nullable: boolean;
1473
- description: string;
1474
- };
1475
- rateLimitMax: {
1476
- type: string;
1477
- nullable: boolean;
1478
- description: string;
1479
- };
1480
- requestCount: {
1481
- type: string;
1482
- description: string;
1483
- };
1484
- remaining: {
1485
- type: string;
1486
- nullable: boolean;
1487
- description: string;
1488
- };
1489
- lastRequest: {
1490
- type: string;
1491
- format: string;
1492
- nullable: boolean;
1493
- description: string;
1494
- };
1495
- expiresAt: {
1496
- type: string;
1497
- format: string;
1498
- nullable: boolean;
1499
- description: string;
1500
- };
1501
- createdAt: {
1502
- type: string;
1503
- format: string;
1504
- description: string;
1505
- };
1506
- updatedAt: {
1507
- type: string;
1508
- format: string;
1509
- description: string;
1510
- };
1511
- metadata: {
1512
- type: string;
1513
- nullable: boolean;
1514
- additionalProperties: boolean;
1515
- description: string;
1516
- };
1517
- permissions: {
1518
- type: string;
1519
- nullable: boolean;
1520
- description: string;
1521
- };
1522
- };
1523
- required: string[];
1524
- };
1525
- };
1526
- };
1527
- };
1528
- };
1529
- };
1530
- };
1531
- }, {
1532
- metadata: Record<string, any> | null;
1533
- permissions: {
1534
- [key: string]: string[];
1535
- } | null;
1536
- id: string;
1537
- configId: string;
1538
- name: string | null;
1539
- start: string | null;
1540
- prefix: string | null;
1541
- referenceId: string;
1542
- refillInterval: number | null;
1543
- refillAmount: number | null;
1544
- lastRefillAt: Date | null;
1545
- enabled: boolean;
1546
- rateLimitEnabled: boolean;
1547
- rateLimitTimeWindow: number | null;
1548
- rateLimitMax: number | null;
1549
- requestCount: number;
1550
- remaining: number | null;
1551
- lastRequest: Date | null;
1552
- expiresAt: Date | null;
1553
- createdAt: Date;
1554
- updatedAt: Date;
1555
- }>;
1556
- updateApiKey: import("better-call").StrictEndpoint<"/api-key/update", {
1557
- method: "POST";
1558
- body: import("zod").ZodObject<{
1559
- configId: import("zod").ZodOptional<import("zod").ZodString>;
1560
- keyId: import("zod").ZodString;
1561
- userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
1562
- name: import("zod").ZodOptional<import("zod").ZodString>;
1563
- enabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
1564
- remaining: import("zod").ZodOptional<import("zod").ZodNumber>;
1565
- refillAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
1566
- refillInterval: import("zod").ZodOptional<import("zod").ZodNumber>;
1567
- metadata: import("zod").ZodOptional<import("zod").ZodAny>;
1568
- expiresIn: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
1569
- rateLimitEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
1570
- rateLimitTimeWindow: import("zod").ZodOptional<import("zod").ZodNumber>;
1571
- rateLimitMax: import("zod").ZodOptional<import("zod").ZodNumber>;
1572
- permissions: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>>>;
1573
- }, import("zod/v4/core").$strip>;
1574
- metadata: {
1575
- openapi: {
1576
- description: string;
1577
- responses: {
1578
- "200": {
1579
- description: string;
1580
- content: {
1581
- "application/json": {
1582
- schema: {
1583
- type: "object";
1584
- properties: {
1585
- id: {
1586
- type: string;
1587
- description: string;
1588
- };
1589
- name: {
1590
- type: string;
1591
- nullable: boolean;
1592
- description: string;
1593
- };
1594
- start: {
1595
- type: string;
1596
- nullable: boolean;
1597
- description: string;
1598
- };
1599
- prefix: {
1600
- type: string;
1601
- nullable: boolean;
1602
- description: string;
1603
- };
1604
- userId: {
1605
- type: string;
1606
- description: string;
1607
- };
1608
- refillInterval: {
1609
- type: string;
1610
- nullable: boolean;
1611
- description: string;
1612
- };
1613
- refillAmount: {
1614
- type: string;
1615
- nullable: boolean;
1616
- description: string;
1617
- };
1618
- lastRefillAt: {
1619
- type: string;
1620
- format: string;
1621
- nullable: boolean;
1622
- description: string;
1623
- };
1624
- enabled: {
1625
- type: string;
1626
- description: string;
1627
- default: boolean;
1628
- };
1629
- rateLimitEnabled: {
1630
- type: string;
1631
- description: string;
1632
- };
1633
- rateLimitTimeWindow: {
1634
- type: string;
1635
- nullable: boolean;
1636
- description: string;
1637
- };
1638
- rateLimitMax: {
1639
- type: string;
1640
- nullable: boolean;
1641
- description: string;
1642
- };
1643
- requestCount: {
1644
- type: string;
1645
- description: string;
1646
- };
1647
- remaining: {
1648
- type: string;
1649
- nullable: boolean;
1650
- description: string;
1651
- };
1652
- lastRequest: {
1653
- type: string;
1654
- format: string;
1655
- nullable: boolean;
1656
- description: string;
1657
- };
1658
- expiresAt: {
1659
- type: string;
1660
- format: string;
1661
- nullable: boolean;
1662
- description: string;
1663
- };
1664
- createdAt: {
1665
- type: string;
1666
- format: string;
1667
- description: string;
1668
- };
1669
- updatedAt: {
1670
- type: string;
1671
- format: string;
1672
- description: string;
1673
- };
1674
- metadata: {
1675
- type: string;
1676
- nullable: boolean;
1677
- additionalProperties: boolean;
1678
- description: string;
1679
- };
1680
- permissions: {
1681
- type: string;
1682
- nullable: boolean;
1683
- description: string;
1684
- };
1685
- };
1686
- required: string[];
1687
- };
1688
- };
1689
- };
1690
- };
1691
- };
1692
- };
1693
- };
1694
- }, {
1695
- metadata: Record<string, any> | null;
1696
- permissions: {
1697
- [key: string]: string[];
1698
- } | null;
1699
- id: string;
1700
- configId: string;
1701
- name: string | null;
1702
- start: string | null;
1703
- prefix: string | null;
1704
- referenceId: string;
1705
- refillInterval: number | null;
1706
- refillAmount: number | null;
1707
- lastRefillAt: Date | null;
1708
- enabled: boolean;
1709
- rateLimitEnabled: boolean;
1710
- rateLimitTimeWindow: number | null;
1711
- rateLimitMax: number | null;
1712
- requestCount: number;
1713
- remaining: number | null;
1714
- lastRequest: Date | null;
1715
- expiresAt: Date | null;
1716
- createdAt: Date;
1717
- updatedAt: Date;
1718
- }>;
1719
- deleteApiKey: import("better-call").StrictEndpoint<"/api-key/delete", {
1720
- method: "POST";
1721
- body: import("zod").ZodObject<{
1722
- configId: import("zod").ZodOptional<import("zod").ZodString>;
1723
- keyId: import("zod").ZodString;
1724
- }, import("zod/v4/core").$strip>;
1725
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1726
- session: {
1727
- session: Record<string, any> & {
1728
- id: string;
1729
- createdAt: Date;
1730
- updatedAt: Date;
1731
- userId: string;
1732
- expiresAt: Date;
1733
- token: string;
1734
- ipAddress?: string | null | undefined;
1735
- userAgent?: string | null | undefined;
1736
- };
1737
- user: Record<string, any> & {
1738
- id: string;
1739
- createdAt: Date;
1740
- updatedAt: Date;
1741
- email: string;
1742
- emailVerified: boolean;
1743
- name: string;
1744
- image?: string | null | undefined;
1745
- };
1746
- };
1747
- }>>[];
1748
- metadata: {
1749
- openapi: {
1750
- description: string;
1751
- requestBody: {
1752
- content: {
1753
- "application/json": {
1754
- schema: {
1755
- type: "object";
1756
- properties: {
1757
- keyId: {
1758
- type: string;
1759
- description: string;
1760
- };
1761
- };
1762
- required: string[];
1763
- };
1764
- };
1765
- };
1766
- };
1767
- responses: {
1768
- "200": {
1769
- description: string;
1770
- content: {
1771
- "application/json": {
1772
- schema: {
1773
- type: "object";
1774
- properties: {
1775
- success: {
1776
- type: string;
1777
- description: string;
1778
- };
1779
- };
1780
- required: string[];
1781
- };
1782
- };
1783
- };
1784
- };
1785
- };
1786
- };
1787
- };
1788
- }, {
1789
- success: boolean;
1790
- }>;
1791
- listApiKeys: import("better-call").StrictEndpoint<"/api-key/list", {
1792
- method: "GET";
1793
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1794
- session: {
1795
- session: Record<string, any> & {
1796
- id: string;
1797
- createdAt: Date;
1798
- updatedAt: Date;
1799
- userId: string;
1800
- expiresAt: Date;
1801
- token: string;
1802
- ipAddress?: string | null | undefined;
1803
- userAgent?: string | null | undefined;
1804
- };
1805
- user: Record<string, any> & {
1806
- id: string;
1807
- createdAt: Date;
1808
- updatedAt: Date;
1809
- email: string;
1810
- emailVerified: boolean;
1811
- name: string;
1812
- image?: string | null | undefined;
1813
- };
1814
- };
1815
- }>>[];
1816
- query: import("zod").ZodOptional<import("zod").ZodObject<{
1817
- configId: import("zod").ZodOptional<import("zod").ZodString>;
1818
- organizationId: import("zod").ZodOptional<import("zod").ZodString>;
1819
- limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1820
- offset: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1821
- sortBy: import("zod").ZodOptional<import("zod").ZodString>;
1822
- sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
1823
- asc: "asc";
1824
- desc: "desc";
1825
- }>>;
1826
- }, import("zod/v4/core").$strip>>;
1827
- metadata: {
1828
- openapi: {
1829
- description: string;
1830
- responses: {
1831
- "200": {
1832
- description: string;
1833
- content: {
1834
- "application/json": {
1835
- schema: {
1836
- type: "object";
1837
- properties: {
1838
- apiKeys: {
1839
- type: string;
1840
- items: {
1841
- type: string;
1842
- properties: {
1843
- id: {
1844
- type: string;
1845
- description: string;
1846
- };
1847
- name: {
1848
- type: string;
1849
- nullable: boolean;
1850
- description: string;
1851
- };
1852
- start: {
1853
- type: string;
1854
- nullable: boolean;
1855
- description: string;
1856
- };
1857
- prefix: {
1858
- type: string;
1859
- nullable: boolean;
1860
- description: string;
1861
- };
1862
- userId: {
1863
- type: string;
1864
- description: string;
1865
- };
1866
- refillInterval: {
1867
- type: string;
1868
- nullable: boolean;
1869
- description: string;
1870
- };
1871
- refillAmount: {
1872
- type: string;
1873
- nullable: boolean;
1874
- description: string;
1875
- };
1876
- lastRefillAt: {
1877
- type: string;
1878
- format: string;
1879
- nullable: boolean;
1880
- description: string;
1881
- };
1882
- enabled: {
1883
- type: string;
1884
- description: string;
1885
- default: boolean;
1886
- };
1887
- rateLimitEnabled: {
1888
- type: string;
1889
- description: string;
1890
- };
1891
- rateLimitTimeWindow: {
1892
- type: string;
1893
- nullable: boolean;
1894
- description: string;
1895
- };
1896
- rateLimitMax: {
1897
- type: string;
1898
- nullable: boolean;
1899
- description: string;
1900
- };
1901
- requestCount: {
1902
- type: string;
1903
- description: string;
1904
- };
1905
- remaining: {
1906
- type: string;
1907
- nullable: boolean;
1908
- description: string;
1909
- };
1910
- lastRequest: {
1911
- type: string;
1912
- format: string;
1913
- nullable: boolean;
1914
- description: string;
1915
- };
1916
- expiresAt: {
1917
- type: string;
1918
- format: string;
1919
- nullable: boolean;
1920
- description: string;
1921
- };
1922
- createdAt: {
1923
- type: string;
1924
- format: string;
1925
- description: string;
1926
- };
1927
- updatedAt: {
1928
- type: string;
1929
- format: string;
1930
- description: string;
1931
- };
1932
- metadata: {
1933
- type: string;
1934
- nullable: boolean;
1935
- additionalProperties: boolean;
1936
- description: string;
1937
- };
1938
- permissions: {
1939
- type: string;
1940
- nullable: boolean;
1941
- description: string;
1942
- };
1943
- };
1944
- required: string[];
1945
- };
1946
- };
1947
- total: {
1948
- type: string;
1949
- description: string;
1950
- };
1951
- limit: {
1952
- type: string;
1953
- nullable: boolean;
1954
- description: string;
1955
- };
1956
- offset: {
1957
- type: string;
1958
- nullable: boolean;
1959
- description: string;
1960
- };
1961
- };
1962
- required: string[];
1963
- };
1964
- };
1965
- };
1966
- };
1967
- };
1968
- };
1969
- };
1970
- }, {
1971
- apiKeys: {
1972
- metadata: Record<string, any> | null;
1973
- permissions: {
1974
- [key: string]: string[];
1975
- } | null;
1976
- id: string;
1977
- configId: string;
1978
- name: string | null;
1979
- start: string | null;
1980
- prefix: string | null;
1981
- referenceId: string;
1982
- refillInterval: number | null;
1983
- refillAmount: number | null;
1984
- lastRefillAt: Date | null;
1985
- enabled: boolean;
1986
- rateLimitEnabled: boolean;
1987
- rateLimitTimeWindow: number | null;
1988
- rateLimitMax: number | null;
1989
- requestCount: number;
1990
- remaining: number | null;
1991
- lastRequest: Date | null;
1992
- expiresAt: Date | null;
1993
- createdAt: Date;
1994
- updatedAt: Date;
1995
- }[];
1996
- total: number;
1997
- limit: number | undefined;
1998
- offset: number | undefined;
1999
- }>;
2000
- deleteAllExpiredApiKeys: import("better-call").StrictEndpoint<string, {
2001
- method: "POST";
2002
- }, {
2003
- success: boolean;
2004
- error: unknown;
2005
- }>;
2006
- };
2007
- schema: {
2008
- apikey: {
2009
- fields: {
2010
- configId: {
2011
- type: "string";
2012
- required: true;
2013
- defaultValue: string;
2014
- input: false;
2015
- index: true;
2016
- };
2017
- name: {
2018
- type: "string";
2019
- required: false;
2020
- input: false;
2021
- };
2022
- start: {
2023
- type: "string";
2024
- required: false;
2025
- input: false;
2026
- };
2027
- referenceId: {
2028
- type: "string";
2029
- required: true;
2030
- input: false;
2031
- index: true;
2032
- };
2033
- prefix: {
2034
- type: "string";
2035
- required: false;
2036
- input: false;
2037
- };
2038
- key: {
2039
- type: "string";
2040
- required: true;
2041
- input: false;
2042
- index: true;
2043
- };
2044
- refillInterval: {
2045
- type: "number";
2046
- required: false;
2047
- input: false;
2048
- };
2049
- refillAmount: {
2050
- type: "number";
2051
- required: false;
2052
- input: false;
2053
- };
2054
- lastRefillAt: {
2055
- type: "date";
2056
- required: false;
2057
- input: false;
2058
- };
2059
- enabled: {
2060
- type: "boolean";
2061
- required: false;
2062
- input: false;
2063
- defaultValue: true;
2064
- };
2065
- rateLimitEnabled: {
2066
- type: "boolean";
2067
- required: false;
2068
- input: false;
2069
- defaultValue: true;
2070
- };
2071
- rateLimitTimeWindow: {
2072
- type: "number";
2073
- required: false;
2074
- input: false;
2075
- defaultValue: number;
2076
- };
2077
- rateLimitMax: {
2078
- type: "number";
2079
- required: false;
2080
- input: false;
2081
- defaultValue: number;
2082
- };
2083
- requestCount: {
2084
- type: "number";
2085
- required: false;
2086
- input: false;
2087
- defaultValue: number;
2088
- };
2089
- remaining: {
2090
- type: "number";
2091
- required: false;
2092
- input: false;
2093
- };
2094
- lastRequest: {
2095
- type: "date";
2096
- required: false;
2097
- input: false;
2098
- };
2099
- expiresAt: {
2100
- type: "date";
2101
- required: false;
2102
- input: false;
2103
- };
2104
- createdAt: {
2105
- type: "date";
2106
- required: true;
2107
- input: false;
2108
- };
2109
- updatedAt: {
2110
- type: "date";
2111
- required: true;
2112
- input: false;
2113
- };
2114
- permissions: {
2115
- type: "string";
2116
- required: false;
2117
- input: false;
2118
- };
2119
- metadata: {
2120
- type: "string";
2121
- required: false;
2122
- input: true;
2123
- transform: {
2124
- input(value: import("better-auth").DBPrimitive): string;
2125
- output(value: import("better-auth").DBPrimitive): any;
2126
- };
2127
- };
2128
- };
2129
- };
2130
- };
2131
- };
2132
- pathMethods: {
2133
- "/api-key/create": "POST";
2134
- "/api-key/delete": "POST";
2135
- "/api-key/delete-all-expired-api-keys": "POST";
2136
- };
2137
- $ERROR_CODES: {
2138
- INVALID_METADATA_TYPE: import("better-auth").RawError<"INVALID_METADATA_TYPE">;
2139
- REFILL_AMOUNT_AND_INTERVAL_REQUIRED: import("better-auth").RawError<"REFILL_AMOUNT_AND_INTERVAL_REQUIRED">;
2140
- REFILL_INTERVAL_AND_AMOUNT_REQUIRED: import("better-auth").RawError<"REFILL_INTERVAL_AND_AMOUNT_REQUIRED">;
2141
- USER_BANNED: import("better-auth").RawError<"USER_BANNED">;
2142
- UNAUTHORIZED_SESSION: import("better-auth").RawError<"UNAUTHORIZED_SESSION">;
2143
- KEY_NOT_FOUND: import("better-auth").RawError<"KEY_NOT_FOUND">;
2144
- KEY_DISABLED: import("better-auth").RawError<"KEY_DISABLED">;
2145
- KEY_EXPIRED: import("better-auth").RawError<"KEY_EXPIRED">;
2146
- USAGE_EXCEEDED: import("better-auth").RawError<"USAGE_EXCEEDED">;
2147
- KEY_NOT_RECOVERABLE: import("better-auth").RawError<"KEY_NOT_RECOVERABLE">;
2148
- EXPIRES_IN_IS_TOO_SMALL: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_SMALL">;
2149
- EXPIRES_IN_IS_TOO_LARGE: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_LARGE">;
2150
- INVALID_REMAINING: import("better-auth").RawError<"INVALID_REMAINING">;
2151
- INVALID_PREFIX_LENGTH: import("better-auth").RawError<"INVALID_PREFIX_LENGTH">;
2152
- INVALID_NAME_LENGTH: import("better-auth").RawError<"INVALID_NAME_LENGTH">;
2153
- METADATA_DISABLED: import("better-auth").RawError<"METADATA_DISABLED">;
2154
- RATE_LIMIT_EXCEEDED: import("better-auth").RawError<"RATE_LIMIT_EXCEEDED">;
2155
- NO_VALUES_TO_UPDATE: import("better-auth").RawError<"NO_VALUES_TO_UPDATE">;
2156
- KEY_DISABLED_EXPIRATION: import("better-auth").RawError<"KEY_DISABLED_EXPIRATION">;
2157
- INVALID_API_KEY: import("better-auth").RawError<"INVALID_API_KEY">;
2158
- INVALID_USER_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_USER_ID_FROM_API_KEY">;
2159
- INVALID_REFERENCE_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_REFERENCE_ID_FROM_API_KEY">;
2160
- INVALID_API_KEY_GETTER_RETURN_TYPE: import("better-auth").RawError<"INVALID_API_KEY_GETTER_RETURN_TYPE">;
2161
- SERVER_ONLY_PROPERTY: import("better-auth").RawError<"SERVER_ONLY_PROPERTY">;
2162
- FAILED_TO_UPDATE_API_KEY: import("better-auth").RawError<"FAILED_TO_UPDATE_API_KEY">;
2163
- NAME_REQUIRED: import("better-auth").RawError<"NAME_REQUIRED">;
2164
- ORGANIZATION_ID_REQUIRED: import("better-auth").RawError<"ORGANIZATION_ID_REQUIRED">;
2165
- USER_NOT_MEMBER_OF_ORGANIZATION: import("better-auth").RawError<"USER_NOT_MEMBER_OF_ORGANIZATION">;
2166
- INSUFFICIENT_API_KEY_PERMISSIONS: import("better-auth").RawError<"INSUFFICIENT_API_KEY_PERMISSIONS">;
2167
- NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: import("better-auth").RawError<"NO_DEFAULT_API_KEY_CONFIGURATION_FOUND">;
2168
- ORGANIZATION_PLUGIN_REQUIRED: import("better-auth").RawError<"ORGANIZATION_PLUGIN_REQUIRED">;
2169
- };
2170
- }, {
2171
- id: "passkey";
2172
- version: string;
2173
- $InferServerPlugin: ReturnType<(options?: import("@better-auth/passkey/client").PasskeyOptions | undefined) => {
2174
- id: "passkey";
2175
- version: string;
2176
- endpoints: {
2177
- generatePasskeyRegistrationOptions: import("better-call").StrictEndpoint<"/passkey/generate-register-options", {
2178
- method: "GET";
2179
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2180
- session: {
2181
- session: Record<string, any> & {
2182
- id: string;
2183
- createdAt: Date;
2184
- updatedAt: Date;
2185
- userId: string;
2186
- expiresAt: Date;
2187
- token: string;
2188
- ipAddress?: string | null | undefined;
2189
- userAgent?: string | null | undefined;
2190
- };
2191
- user: Record<string, any> & {
2192
- id: string;
2193
- createdAt: Date;
2194
- updatedAt: Date;
2195
- email: string;
2196
- emailVerified: boolean;
2197
- name: string;
2198
- image?: string | null | undefined;
2199
- };
2200
- };
2201
- }>>[];
2202
- query: import("zod").ZodOptional<import("zod").ZodObject<{
2203
- authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
2204
- platform: "platform";
2205
- "cross-platform": "cross-platform";
2206
- }>>;
2207
- name: import("zod").ZodOptional<import("zod").ZodString>;
2208
- context: import("zod").ZodOptional<import("zod").ZodString>;
2209
- }, import("zod/v4/core").$strip>>;
2210
- metadata: {
2211
- openapi: {
2212
- operationId: string;
2213
- description: string;
2214
- parameters: import("better-call").OpenAPIParameter[];
2215
- responses: {
2216
- 200: {
2217
- description: string;
2218
- content: {
2219
- "application/json": {
2220
- schema: {
2221
- type: "object";
2222
- properties: {
2223
- challenge: {
2224
- type: string;
2225
- };
2226
- rp: {
2227
- type: string;
2228
- properties: {
2229
- name: {
2230
- type: string;
2231
- };
2232
- id: {
2233
- type: string;
2234
- };
2235
- };
2236
- };
2237
- user: {
2238
- type: string;
2239
- properties: {
2240
- id: {
2241
- type: string;
2242
- };
2243
- name: {
2244
- type: string;
2245
- };
2246
- displayName: {
2247
- type: string;
2248
- };
2249
- };
2250
- };
2251
- pubKeyCredParams: {
2252
- type: string;
2253
- items: {
2254
- type: string;
2255
- properties: {
2256
- type: {
2257
- type: string;
2258
- };
2259
- alg: {
2260
- type: string;
2261
- };
2262
- };
2263
- };
2264
- };
2265
- timeout: {
2266
- type: string;
2267
- };
2268
- excludeCredentials: {
2269
- type: string;
2270
- items: {
2271
- type: string;
2272
- properties: {
2273
- id: {
2274
- type: string;
2275
- };
2276
- type: {
2277
- type: string;
2278
- };
2279
- transports: {
2280
- type: string;
2281
- items: {
2282
- type: string;
2283
- };
2284
- };
2285
- };
2286
- };
2287
- };
2288
- authenticatorSelection: {
2289
- type: string;
2290
- properties: {
2291
- authenticatorAttachment: {
2292
- type: string;
2293
- };
2294
- requireResidentKey: {
2295
- type: string;
2296
- };
2297
- userVerification: {
2298
- type: string;
2299
- };
2300
- };
2301
- };
2302
- attestation: {
2303
- type: string;
2304
- };
2305
- extensions: {
2306
- type: string;
2307
- };
2308
- };
2309
- };
2310
- };
2311
- };
2312
- };
2313
- };
2314
- };
2315
- };
2316
- }, import("@better-auth/passkey/client").PublicKeyCredentialCreationOptionsJSON>;
2317
- generatePasskeyAuthenticationOptions: import("better-call").StrictEndpoint<"/passkey/generate-authenticate-options", {
2318
- method: "GET";
2319
- metadata: {
2320
- openapi: {
2321
- operationId: string;
2322
- description: string;
2323
- responses: {
2324
- 200: {
2325
- description: string;
2326
- content: {
2327
- "application/json": {
2328
- schema: {
2329
- type: "object";
2330
- properties: {
2331
- challenge: {
2332
- type: string;
2333
- };
2334
- rp: {
2335
- type: string;
2336
- properties: {
2337
- name: {
2338
- type: string;
2339
- };
2340
- id: {
2341
- type: string;
2342
- };
2343
- };
2344
- };
2345
- user: {
2346
- type: string;
2347
- properties: {
2348
- id: {
2349
- type: string;
2350
- };
2351
- name: {
2352
- type: string;
2353
- };
2354
- displayName: {
2355
- type: string;
2356
- };
2357
- };
2358
- };
2359
- timeout: {
2360
- type: string;
2361
- };
2362
- allowCredentials: {
2363
- type: string;
2364
- items: {
2365
- type: string;
2366
- properties: {
2367
- id: {
2368
- type: string;
2369
- };
2370
- type: {
2371
- type: string;
2372
- };
2373
- transports: {
2374
- type: string;
2375
- items: {
2376
- type: string;
2377
- };
2378
- };
2379
- };
2380
- };
2381
- };
2382
- userVerification: {
2383
- type: string;
2384
- };
2385
- authenticatorSelection: {
2386
- type: string;
2387
- properties: {
2388
- authenticatorAttachment: {
2389
- type: string;
2390
- };
2391
- requireResidentKey: {
2392
- type: string;
2393
- };
2394
- userVerification: {
2395
- type: string;
2396
- };
2397
- };
2398
- };
2399
- extensions: {
2400
- type: string;
2401
- };
2402
- };
2403
- };
2404
- };
2405
- };
2406
- };
2407
- };
2408
- };
2409
- };
2410
- }, import("@better-auth/passkey/client").PublicKeyCredentialRequestOptionsJSON>;
2411
- verifyPasskeyRegistration: import("better-call").StrictEndpoint<"/passkey/verify-registration", {
2412
- method: "POST";
2413
- body: import("zod").ZodObject<{
2414
- response: import("zod").ZodAny;
2415
- name: import("zod").ZodOptional<import("zod").ZodString>;
2416
- createSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
2417
- }, import("zod/v4/core").$strip>;
2418
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2419
- session: {
2420
- session: Record<string, any> & {
2421
- id: string;
2422
- createdAt: Date;
2423
- updatedAt: Date;
2424
- userId: string;
2425
- expiresAt: Date;
2426
- token: string;
2427
- ipAddress?: string | null | undefined;
2428
- userAgent?: string | null | undefined;
2429
- };
2430
- user: Record<string, any> & {
2431
- id: string;
2432
- createdAt: Date;
2433
- updatedAt: Date;
2434
- email: string;
2435
- emailVerified: boolean;
2436
- name: string;
2437
- image?: string | null | undefined;
2438
- };
2439
- };
2440
- }>>[];
2441
- metadata: {
2442
- openapi: {
2443
- operationId: string;
2444
- description: string;
2445
- responses: {
2446
- 200: {
2447
- description: string;
2448
- content: {
2449
- "application/json": {
2450
- schema: {
2451
- readonly type: "object";
2452
- readonly allOf: readonly [{
2453
- readonly $ref: "#/components/schemas/Passkey";
2454
- }, {
2455
- readonly type: "object";
2456
- readonly properties: {
2457
- readonly session: {
2458
- readonly $ref: "#/components/schemas/Session";
2459
- };
2460
- readonly user: {
2461
- readonly $ref: "#/components/schemas/User";
2462
- };
2463
- };
2464
- }];
2465
- };
2466
- };
2467
- };
2468
- };
2469
- 400: {
2470
- description: string;
2471
- };
2472
- };
2473
- };
2474
- };
2475
- }, import("@better-auth/passkey/client").Passkey>;
2476
- verifyPasskeyAuthentication: import("better-call").StrictEndpoint<"/passkey/verify-authentication", {
2477
- method: "POST";
2478
- body: import("zod").ZodObject<{
2479
- response: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
2480
- }, import("zod/v4/core").$strip>;
2481
- metadata: {
2482
- openapi: {
2483
- operationId: string;
2484
- description: string;
2485
- responses: {
2486
- 200: {
2487
- description: string;
2488
- content: {
2489
- "application/json": {
2490
- schema: {
2491
- type: "object";
2492
- properties: {
2493
- session: {
2494
- $ref: string;
2495
- };
2496
- user: {
2497
- $ref: string;
2498
- };
2499
- };
2500
- };
2501
- };
2502
- };
2503
- };
2504
- };
2505
- };
2506
- $Infer: {
2507
- body: {
2508
- response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
2509
- };
2510
- };
2511
- };
2512
- }, {
2513
- session: {
2514
- id: string;
2515
- createdAt: Date;
2516
- updatedAt: Date;
2517
- userId: string;
2518
- expiresAt: Date;
2519
- token: string;
2520
- ipAddress?: string | null | undefined;
2521
- userAgent?: string | null | undefined;
2522
- };
2523
- user: {
2524
- id: string;
2525
- createdAt: Date;
2526
- updatedAt: Date;
2527
- email: string;
2528
- emailVerified: boolean;
2529
- name: string;
2530
- image?: string | null | undefined;
2531
- };
2532
- }>;
2533
- listPasskeys: import("better-call").StrictEndpoint<"/passkey/list-user-passkeys", {
2534
- method: "GET";
2535
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2536
- session: {
2537
- session: Record<string, any> & {
2538
- id: string;
2539
- createdAt: Date;
2540
- updatedAt: Date;
2541
- userId: string;
2542
- expiresAt: Date;
2543
- token: string;
2544
- ipAddress?: string | null | undefined;
2545
- userAgent?: string | null | undefined;
2546
- };
2547
- user: Record<string, any> & {
2548
- id: string;
2549
- createdAt: Date;
2550
- updatedAt: Date;
2551
- email: string;
2552
- emailVerified: boolean;
2553
- name: string;
2554
- image?: string | null | undefined;
2555
- };
2556
- };
2557
- }>>[];
2558
- metadata: {
2559
- openapi: {
2560
- description: string;
2561
- responses: {
2562
- "200": {
2563
- description: string;
2564
- content: {
2565
- "application/json": {
2566
- schema: {
2567
- type: "array";
2568
- items: {
2569
- $ref: string;
2570
- required: string[];
2571
- };
2572
- description: string;
2573
- };
2574
- };
2575
- };
2576
- };
2577
- };
2578
- };
2579
- };
2580
- }, import("@better-auth/passkey/client").Passkey[]>;
2581
- deletePasskey: import("better-call").StrictEndpoint<"/passkey/delete-passkey", {
2582
- method: "POST";
2583
- body: import("zod").ZodObject<{
2584
- id: import("zod").ZodString;
2585
- }, import("zod/v4/core").$strip>;
2586
- use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2587
- session: {
2588
- session: Record<string, any> & {
2589
- id: string;
2590
- createdAt: Date;
2591
- updatedAt: Date;
2592
- userId: string;
2593
- expiresAt: Date;
2594
- token: string;
2595
- ipAddress?: string | null | undefined;
2596
- userAgent?: string | null | undefined;
2597
- };
2598
- user: Record<string, any> & {
2599
- id: string;
2600
- createdAt: Date;
2601
- updatedAt: Date;
2602
- email: string;
2603
- emailVerified: boolean;
2604
- name: string;
2605
- image?: string | null | undefined;
2606
- };
2607
- };
2608
- }>> | import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2609
- verifiedResource: {};
2610
- }>>)[];
2611
- metadata: {
2612
- openapi: {
2613
- description: string;
2614
- responses: {
2615
- "200": {
2616
- description: string;
2617
- content: {
2618
- "application/json": {
2619
- schema: {
2620
- type: "object";
2621
- properties: {
2622
- status: {
2623
- type: string;
2624
- description: string;
2625
- };
2626
- };
2627
- required: string[];
2628
- };
2629
- };
2630
- };
2631
- };
2632
- };
2633
- };
2634
- };
2635
- }, {
2636
- status: boolean;
2637
- }>;
2638
- updatePasskey: import("better-call").StrictEndpoint<"/passkey/update-passkey", {
2639
- method: "POST";
2640
- body: import("zod").ZodObject<{
2641
- id: import("zod").ZodString;
2642
- name: import("zod").ZodString;
2643
- }, import("zod/v4/core").$strip>;
2644
- use: (import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2645
- session: {
2646
- session: Record<string, any> & {
2647
- id: string;
2648
- createdAt: Date;
2649
- updatedAt: Date;
2650
- userId: string;
2651
- expiresAt: Date;
2652
- token: string;
2653
- ipAddress?: string | null | undefined;
2654
- userAgent?: string | null | undefined;
2655
- };
2656
- user: Record<string, any> & {
2657
- id: string;
2658
- createdAt: Date;
2659
- updatedAt: Date;
2660
- email: string;
2661
- emailVerified: boolean;
2662
- name: string;
2663
- image?: string | null | undefined;
2664
- };
2665
- };
2666
- }>> | import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2667
- verifiedResource: {};
2668
- }>>)[];
2669
- metadata: {
2670
- openapi: {
2671
- description: string;
2672
- responses: {
2673
- "200": {
2674
- description: string;
2675
- content: {
2676
- "application/json": {
2677
- schema: {
2678
- type: "object";
2679
- properties: {
2680
- passkey: {
2681
- $ref: string;
2682
- };
2683
- };
2684
- required: string[];
2685
- };
2686
- };
2687
- };
2688
- };
2689
- };
2690
- };
2691
- };
2692
- }, {
2693
- passkey: import("@better-auth/passkey/client").Passkey;
2694
- }>;
2695
- };
2696
- schema: {
2697
- passkey: {
2698
- fields: {
2699
- name: {
2700
- type: "string";
2701
- required: false;
2702
- };
2703
- publicKey: {
2704
- type: "string";
2705
- required: true;
2706
- };
2707
- userId: {
2708
- type: "string";
2709
- references: {
2710
- model: string;
2711
- field: string;
2712
- };
2713
- required: true;
2714
- index: true;
2715
- };
2716
- credentialID: {
2717
- type: "string";
2718
- required: true;
2719
- index: true;
2720
- };
2721
- counter: {
2722
- type: "number";
2723
- required: true;
2724
- };
2725
- deviceType: {
2726
- type: "string";
2727
- required: true;
2728
- };
2729
- backedUp: {
2730
- type: "boolean";
2731
- required: true;
2732
- };
2733
- transports: {
2734
- type: "string";
2735
- required: false;
2736
- };
2737
- createdAt: {
2738
- type: "date";
2739
- required: false;
2740
- };
2741
- aaguid: {
2742
- type: "string";
2743
- required: false;
2744
- };
2745
- };
2746
- };
2747
- };
2748
- $ERROR_CODES: {
2749
- CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
2750
- YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
2751
- FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
2752
- PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
2753
- AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
2754
- UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
2755
- USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
2756
- FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
2757
- PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
2758
- REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
2759
- AUTH_CANCELLED: import("better-auth").RawError<"AUTH_CANCELLED">;
2760
- UNKNOWN_ERROR: import("better-auth").RawError<"UNKNOWN_ERROR">;
2761
- SESSION_REQUIRED: import("better-auth").RawError<"SESSION_REQUIRED">;
2762
- RESOLVE_USER_REQUIRED: import("better-auth").RawError<"RESOLVE_USER_REQUIRED">;
2763
- RESOLVED_USER_INVALID: import("better-auth").RawError<"RESOLVED_USER_INVALID">;
2764
- };
2765
- options: import("@better-auth/passkey/client").PasskeyOptions | undefined;
2766
- }>;
2767
- getActions: ($fetch: import("better-auth/client").BetterFetch, $store: import("better-auth").ClientStore) => {
2768
- signIn: {
2769
- passkey: (opts?: {
2770
- autoFill?: boolean;
2771
- extensions?: import("@better-auth/passkey/client").AuthenticationExtensionsClientInputs;
2772
- returnWebAuthnResponse?: boolean;
2773
- fetchOptions?: import("better-auth").ClientFetchOption;
2774
- } | undefined, options?: import("better-auth").ClientFetchOption | undefined) => Promise<{
2775
- data: null;
2776
- error: {
2777
- message?: string | undefined;
2778
- status: number;
2779
- statusText: string;
2780
- };
2781
- } | {
2782
- data: {
2783
- session: import("better-auth").Session;
2784
- user: import("better-auth").User;
2785
- };
2786
- error: null;
2787
- } | {
2788
- data: null;
2789
- error: {
2790
- code: string;
2791
- message: string;
2792
- status: number;
2793
- statusText: string;
2794
- };
2795
- } | {
2796
- webauthn: {
2797
- response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
2798
- clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
2799
- };
2800
- data: null;
2801
- error: {
2802
- message?: string | undefined;
2803
- status: number;
2804
- statusText: string;
2805
- };
2806
- } | {
2807
- webauthn: {
2808
- response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
2809
- clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
2810
- };
2811
- data: {
2812
- session: import("better-auth").Session;
2813
- user: import("better-auth").User;
2814
- };
2815
- error: null;
2816
- }>;
2817
- };
2818
- passkey: {
2819
- addPasskey: (opts?: {
2820
- fetchOptions?: import("better-auth").ClientFetchOption;
2821
- name?: string;
2822
- authenticatorAttachment?: "platform" | "cross-platform";
2823
- context?: string | null;
2824
- createSession?: boolean;
2825
- extensions?: import("@better-auth/passkey/client").AuthenticationExtensionsClientInputs;
2826
- useAutoRegister?: boolean;
2827
- returnWebAuthnResponse?: boolean;
2828
- } | undefined, fetchOpts?: import("better-auth").ClientFetchOption | undefined) => Promise<{
2829
- data: null;
2830
- error: {
2831
- message?: string | undefined;
2832
- status: number;
2833
- statusText: string;
2834
- };
2835
- } | {
2836
- data: import("@better-auth/passkey/client").Passkey & {
2837
- session?: import("better-auth").Session;
2838
- user?: import("better-auth").User;
2839
- };
2840
- error: null;
2841
- } | {
2842
- webauthn: {
2843
- response: import("@better-auth/passkey/client").RegistrationResponseJSON;
2844
- clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
2845
- };
2846
- data: import("@better-auth/passkey/client").Passkey & {
2847
- session?: import("better-auth").Session;
2848
- user?: import("better-auth").User;
2849
- };
2850
- error: null;
2851
- } | {
2852
- data: null;
2853
- error: {
2854
- code: string;
2855
- message: string;
2856
- status: number;
2857
- statusText: string;
2858
- };
2859
- }>;
2860
- };
2861
- $Infer: {
2862
- Passkey: import("@better-auth/passkey/client").Passkey;
2863
- };
2864
- };
2865
- getAtoms($fetch: import("better-auth/client").BetterFetch): {
2866
- listPasskeys: import("better-auth/client").AuthQueryAtom<import("@better-auth/passkey/client").Passkey[]>;
2867
- $listPasskeys: import("better-auth/client").PreinitializedWritableAtom<any> & object;
2868
- };
2869
- pathMethods: {
2870
- "/passkey/register": "POST";
2871
- "/passkey/authenticate": "POST";
2872
- };
2873
- atomListeners: ({
2874
- matcher(path: string): path is "/passkey/delete-passkey" | "/passkey/update-passkey" | "/passkey/verify-registration" | "/sign-out";
2875
- signal: "$listPasskeys";
2876
- } | {
2877
- matcher: (path: string) => path is "/passkey/verify-authentication";
2878
- signal: "$sessionSignal";
2879
- })[];
2880
- $ERROR_CODES: {
2881
- CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
2882
- YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
2883
- FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
2884
- PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
2885
- AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
2886
- UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
2887
- USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
2888
- FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
2889
- PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
2890
- REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
2891
- AUTH_CANCELLED: import("better-auth").RawError<"AUTH_CANCELLED">;
2892
- UNKNOWN_ERROR: import("better-auth").RawError<"UNKNOWN_ERROR">;
2893
- SESSION_REQUIRED: import("better-auth").RawError<"SESSION_REQUIRED">;
2894
- RESOLVE_USER_REQUIRED: import("better-auth").RawError<"RESOLVE_USER_REQUIRED">;
2895
- RESOLVED_USER_INVALID: import("better-auth").RawError<"RESOLVED_USER_INVALID">;
2896
- };
2897
- }, {
2898
- id: "wallet-pincode";
2899
- $InferServerPlugin: {
2900
- id: "wallet-pincode";
2901
- $ERROR_CODES: {
2902
- WALLET_PINCODE_ALREADY_REMOVED: import("better-auth").RawError<"WALLET_PINCODE_ALREADY_REMOVED">;
2903
- WALLET_PINCODE_ALREADY_SET: import("better-auth").RawError<"WALLET_PINCODE_ALREADY_SET">;
2904
- WALLET_PINCODE_INVALID_PASSWORD: import("better-auth").RawError<"WALLET_PINCODE_INVALID_PASSWORD">;
2905
- WALLET_PINCODE_PASSWORD_REQUIRED: import("better-auth").RawError<"WALLET_PINCODE_PASSWORD_REQUIRED">;
2906
- };
2907
- endpoints: {};
2908
- };
2909
- $ERROR_CODES: {
2910
- WALLET_PINCODE_ALREADY_REMOVED: import("better-auth").RawError<"WALLET_PINCODE_ALREADY_REMOVED">;
2911
- WALLET_PINCODE_ALREADY_SET: import("better-auth").RawError<"WALLET_PINCODE_ALREADY_SET">;
2912
- WALLET_PINCODE_INVALID_PASSWORD: import("better-auth").RawError<"WALLET_PINCODE_INVALID_PASSWORD">;
2913
- WALLET_PINCODE_PASSWORD_REQUIRED: import("better-auth").RawError<"WALLET_PINCODE_PASSWORD_REQUIRED">;
2914
- };
2915
- pathMethods: {
2916
- "/wallet/pincode/enable": "POST";
2917
- "/wallet/pincode/disable": "POST";
2918
- "/wallet/pincode/update": "POST";
2919
- "/wallet/pincode/reset": "POST";
2920
- };
2921
- atomListeners: {
2922
- matcher: (path: string) => boolean;
2923
- signal: "$sessionSignal";
2924
- }[];
2925
- }, {
2926
- id: "wallet-two-factor";
2927
- $InferServerPlugin: {
2928
- id: "wallet-two-factor";
2929
- $ERROR_CODES: {
2930
- WALLET_TWO_FACTOR_INVALID_CODE: import("better-auth").RawError<"WALLET_TWO_FACTOR_INVALID_CODE">;
2931
- WALLET_TWO_FACTOR_INVALID_PASSWORD: import("better-auth").RawError<"WALLET_TWO_FACTOR_INVALID_PASSWORD">;
2932
- WALLET_TWO_FACTOR_PASSWORD_REQUIRED: import("better-auth").RawError<"WALLET_TWO_FACTOR_PASSWORD_REQUIRED">;
2933
- };
2934
- endpoints: {};
2935
- };
2936
- $ERROR_CODES: {
2937
- WALLET_TWO_FACTOR_INVALID_CODE: import("better-auth").RawError<"WALLET_TWO_FACTOR_INVALID_CODE">;
2938
- WALLET_TWO_FACTOR_INVALID_PASSWORD: import("better-auth").RawError<"WALLET_TWO_FACTOR_INVALID_PASSWORD">;
2939
- WALLET_TWO_FACTOR_PASSWORD_REQUIRED: import("better-auth").RawError<"WALLET_TWO_FACTOR_PASSWORD_REQUIRED">;
2940
- };
2941
- pathMethods: {
2942
- "/wallet/two-factor/enable": "POST";
2943
- "/wallet/two-factor/disable": "POST";
2944
- "/wallet/two-factor/verify": "POST";
2945
- };
2946
- atomListeners: {
2947
- matcher: (path: string) => boolean;
2948
- signal: "$sessionSignal";
2949
- }[];
2950
- }, {
2951
- id: "wallet-secret-codes";
2952
- $InferServerPlugin: {
2953
- id: "wallet-secret-codes";
2954
- $ERROR_CODES: {
2955
- WALLET_SECRET_CODES_INVALID_PASSWORD: import("better-auth").RawError<"WALLET_SECRET_CODES_INVALID_PASSWORD">;
2956
- WALLET_SECRET_CODES_PASSWORD_REQUIRED: import("better-auth").RawError<"WALLET_SECRET_CODES_PASSWORD_REQUIRED">;
2957
- WALLET_SECRET_CODES_VERIFICATION_MISMATCH: import("better-auth").RawError<"WALLET_SECRET_CODES_VERIFICATION_MISMATCH">;
2958
- };
2959
- endpoints: {};
2960
- };
2961
- $ERROR_CODES: {
2962
- WALLET_SECRET_CODES_INVALID_PASSWORD: import("better-auth").RawError<"WALLET_SECRET_CODES_INVALID_PASSWORD">;
2963
- WALLET_SECRET_CODES_PASSWORD_REQUIRED: import("better-auth").RawError<"WALLET_SECRET_CODES_PASSWORD_REQUIRED">;
2964
- WALLET_SECRET_CODES_VERIFICATION_MISMATCH: import("better-auth").RawError<"WALLET_SECRET_CODES_VERIFICATION_MISMATCH">;
2965
- };
2966
- pathMethods: {
2967
- "/wallet/secret-codes/generate": "POST";
2968
- "/wallet/secret-codes/confirm": "POST";
2969
- };
2970
- atomListeners: {
2971
- matcher: (path: string) => boolean;
2972
- signal: "$sessionSignal";
2973
- }[];
2974
- }, {
2975
- id: "two-factor";
2976
- version: string;
2977
- $InferServerPlugin: ReturnType<<O extends import("better-auth/plugins/two-factor").TwoFactorOptions>(options?: O) => {
2978
- id: "two-factor";
2979
- version: string;
2980
- endpoints: {
2981
- enableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/enable", {
2982
- method: "POST";
2983
- body: import("zod").ZodObject<{
2984
- password: import("zod").ZodOptional<import("zod").ZodString>;
2985
- method: import("zod").ZodDefault<import("zod").ZodEnum<{
2986
- otp: "otp";
2987
- totp: "totp";
2988
- }>>;
2989
- issuer: import("zod").ZodOptional<import("zod").ZodString>;
2990
- }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
2991
- password: import("zod").ZodString;
2992
- method: import("zod").ZodDefault<import("zod").ZodEnum<{
2993
- otp: "otp";
2994
- totp: "totp";
2995
- }>>;
2996
- issuer: import("zod").ZodOptional<import("zod").ZodString>;
2997
- }, import("zod/v4/core").$strip>;
2998
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2999
- session: {
3000
- session: Record<string, any> & {
3001
- id: string;
3002
- createdAt: Date;
3003
- updatedAt: Date;
3004
- userId: string;
3005
- expiresAt: Date;
3006
- token: string;
3007
- ipAddress?: string | null | undefined;
3008
- userAgent?: string | null | undefined;
3009
- };
3010
- user: Record<string, any> & {
3011
- id: string;
3012
- createdAt: Date;
3013
- updatedAt: Date;
3014
- email: string;
3015
- emailVerified: boolean;
3016
- name: string;
3017
- image?: string | null | undefined;
3018
- };
3019
- };
3020
- }>>[];
3021
- metadata: {
3022
- openapi: {
3023
- summary: string;
3024
- description: string;
3025
- responses: {
3026
- 200: {
3027
- description: string;
3028
- content: {
3029
- "application/json": {
3030
- schema: {
3031
- type: "object";
3032
- properties: {
3033
- method: {
3034
- type: string;
3035
- enum: string[];
3036
- description: string;
3037
- };
3038
- totpURI: {
3039
- type: string;
3040
- description: string;
3041
- };
3042
- backupCodes: {
3043
- type: string;
3044
- items: {
3045
- type: string;
3046
- };
3047
- description: string;
3048
- };
3049
- };
3050
- required: string[];
3051
- };
3052
- };
3053
- };
3054
- };
3055
- };
3056
- };
3057
- };
3058
- }, {
3059
- method: "otp";
3060
- } | {
3061
- method: "totp";
3062
- totpURI: string;
3063
- backupCodes: string[];
3064
- }>;
3065
- disableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/disable", {
3066
- method: "POST";
3067
- body: import("zod").ZodObject<{
3068
- password: import("zod").ZodOptional<import("zod").ZodString>;
3069
- }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3070
- password: import("zod").ZodString;
3071
- }, import("zod/v4/core").$strip>;
3072
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3073
- session: {
3074
- session: Record<string, any> & {
3075
- id: string;
3076
- createdAt: Date;
3077
- updatedAt: Date;
3078
- userId: string;
3079
- expiresAt: Date;
3080
- token: string;
3081
- ipAddress?: string | null | undefined;
3082
- userAgent?: string | null | undefined;
3083
- };
3084
- user: Record<string, any> & {
3085
- id: string;
3086
- createdAt: Date;
3087
- updatedAt: Date;
3088
- email: string;
3089
- emailVerified: boolean;
3090
- name: string;
3091
- image?: string | null | undefined;
3092
- };
3093
- };
3094
- }>>[];
3095
- metadata: {
3096
- openapi: {
3097
- summary: string;
3098
- description: string;
3099
- responses: {
3100
- 200: {
3101
- description: string;
3102
- content: {
3103
- "application/json": {
3104
- schema: {
3105
- type: "object";
3106
- properties: {
3107
- status: {
3108
- type: string;
3109
- };
3110
- };
3111
- };
3112
- };
3113
- };
3114
- };
3115
- };
3116
- };
3117
- };
3118
- }, {
3119
- status: boolean;
3120
- }>;
3121
- verifyBackupCode: import("better-call").StrictEndpoint<"/two-factor/verify-backup-code", {
3122
- method: "POST";
3123
- body: import("zod").ZodObject<{
3124
- code: import("zod").ZodString;
3125
- disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
3126
- trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
3127
- }, import("zod/v4/core").$strip>;
3128
- metadata: {
3129
- openapi: {
3130
- description: string;
3131
- responses: {
3132
- "200": {
3133
- description: string;
3134
- content: {
3135
- "application/json": {
3136
- schema: {
3137
- type: "object";
3138
- properties: {
3139
- user: {
3140
- type: string;
3141
- properties: {
3142
- id: {
3143
- type: string;
3144
- description: string;
3145
- };
3146
- email: {
3147
- type: string;
3148
- format: string;
3149
- nullable: boolean;
3150
- description: string;
3151
- };
3152
- emailVerified: {
3153
- type: string;
3154
- nullable: boolean;
3155
- description: string;
3156
- };
3157
- name: {
3158
- type: string;
3159
- nullable: boolean;
3160
- description: string;
3161
- };
3162
- image: {
3163
- type: string;
3164
- format: string;
3165
- nullable: boolean;
3166
- description: string;
3167
- };
3168
- twoFactorEnabled: {
3169
- type: string;
3170
- description: string;
3171
- };
3172
- createdAt: {
3173
- type: string;
3174
- format: string;
3175
- description: string;
3176
- };
3177
- updatedAt: {
3178
- type: string;
3179
- format: string;
3180
- description: string;
3181
- };
3182
- };
3183
- required: string[];
3184
- description: string;
3185
- };
3186
- session: {
3187
- type: string;
3188
- properties: {
3189
- token: {
3190
- type: string;
3191
- description: string;
3192
- };
3193
- userId: {
3194
- type: string;
3195
- description: string;
3196
- };
3197
- createdAt: {
3198
- type: string;
3199
- format: string;
3200
- description: string;
3201
- };
3202
- expiresAt: {
3203
- type: string;
3204
- format: string;
3205
- description: string;
3206
- };
3207
- };
3208
- required: string[];
3209
- description: string;
3210
- };
3211
- };
3212
- required: string[];
3213
- };
3214
- };
3215
- };
3216
- };
3217
- };
3218
- };
3219
- };
3220
- }, {
3221
- token: string | undefined;
3222
- user: (Record<string, any> & {
3223
- id: string;
3224
- createdAt: Date;
3225
- updatedAt: Date;
3226
- email: string;
3227
- emailVerified: boolean;
3228
- name: string;
3229
- image?: string | null | undefined;
3230
- }) | import("better-auth/plugins/two-factor").UserWithTwoFactor;
3231
- }>;
3232
- generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
3233
- method: "POST";
3234
- body: import("zod").ZodObject<{
3235
- password: import("zod").ZodOptional<import("zod").ZodString>;
3236
- }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3237
- password: import("zod").ZodString;
3238
- }, import("zod/v4/core").$strip>;
3239
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3240
- session: {
3241
- session: Record<string, any> & {
3242
- id: string;
3243
- createdAt: Date;
3244
- updatedAt: Date;
3245
- userId: string;
3246
- expiresAt: Date;
3247
- token: string;
3248
- ipAddress?: string | null | undefined;
3249
- userAgent?: string | null | undefined;
3250
- };
3251
- user: Record<string, any> & {
3252
- id: string;
3253
- createdAt: Date;
3254
- updatedAt: Date;
3255
- email: string;
3256
- emailVerified: boolean;
3257
- name: string;
3258
- image?: string | null | undefined;
3259
- };
3260
- };
3261
- }>>[];
3262
- metadata: {
3263
- openapi: {
3264
- description: string;
3265
- responses: {
3266
- "200": {
3267
- description: string;
3268
- content: {
3269
- "application/json": {
3270
- schema: {
3271
- type: "object";
3272
- properties: {
3273
- status: {
3274
- type: string;
3275
- description: string;
3276
- enum: boolean[];
3277
- };
3278
- backupCodes: {
3279
- type: string;
3280
- items: {
3281
- type: string;
3282
- };
3283
- description: string;
3284
- };
3285
- };
3286
- required: string[];
3287
- };
3288
- };
3289
- };
3290
- };
3291
- };
3292
- };
3293
- };
3294
- }, {
3295
- status: boolean;
3296
- backupCodes: string[];
3297
- }>;
3298
- viewBackupCodes: import("better-call").StrictEndpoint<string, {
3299
- method: "POST";
3300
- body: import("zod").ZodObject<{
3301
- userId: import("zod").ZodCoercedString<unknown>;
3302
- }, import("zod/v4/core").$strip>;
3303
- }, {
3304
- status: boolean;
3305
- backupCodes: string[];
3306
- }>;
3307
- sendTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/send-otp", {
3308
- method: "POST";
3309
- body: import("zod").ZodOptional<import("zod").ZodObject<{
3310
- trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
3311
- }, import("zod/v4/core").$strip>>;
3312
- metadata: {
3313
- openapi: {
3314
- summary: string;
3315
- description: string;
3316
- responses: {
3317
- 200: {
3318
- description: string;
3319
- content: {
3320
- "application/json": {
3321
- schema: {
3322
- type: "object";
3323
- properties: {
3324
- status: {
3325
- type: string;
3326
- };
3327
- };
3328
- };
3329
- };
3330
- };
3331
- };
3332
- };
3333
- };
3334
- };
3335
- }, {
3336
- status: boolean;
3337
- }>;
3338
- verifyTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/verify-otp", {
3339
- method: "POST";
3340
- body: import("zod").ZodObject<{
3341
- code: import("zod").ZodString;
3342
- trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
3343
- }, import("zod/v4/core").$strip>;
3344
- metadata: {
3345
- openapi: {
3346
- summary: string;
3347
- description: string;
3348
- responses: {
3349
- "200": {
3350
- description: string;
3351
- content: {
3352
- "application/json": {
3353
- schema: {
3354
- type: "object";
3355
- properties: {
3356
- token: {
3357
- type: string;
3358
- description: string;
3359
- };
3360
- user: {
3361
- type: string;
3362
- properties: {
3363
- id: {
3364
- type: string;
3365
- description: string;
3366
- };
3367
- email: {
3368
- type: string;
3369
- format: string;
3370
- nullable: boolean;
3371
- description: string;
3372
- };
3373
- emailVerified: {
3374
- type: string;
3375
- nullable: boolean;
3376
- description: string;
3377
- };
3378
- name: {
3379
- type: string;
3380
- nullable: boolean;
3381
- description: string;
3382
- };
3383
- image: {
3384
- type: string;
3385
- format: string;
3386
- nullable: boolean;
3387
- description: string;
3388
- };
3389
- createdAt: {
3390
- type: string;
3391
- format: string;
3392
- description: string;
3393
- };
3394
- updatedAt: {
3395
- type: string;
3396
- format: string;
3397
- description: string;
3398
- };
3399
- };
3400
- required: string[];
3401
- description: string;
3402
- };
3403
- };
3404
- required: string[];
3405
- };
3406
- };
3407
- };
3408
- };
3409
- };
3410
- };
3411
- };
3412
- }, {
3413
- token: string;
3414
- user: import("better-auth/plugins/two-factor").UserWithTwoFactor;
3415
- } | {
3416
- token: string;
3417
- user: Record<string, any> & {
3418
- id: string;
3419
- createdAt: Date;
3420
- updatedAt: Date;
3421
- email: string;
3422
- emailVerified: boolean;
3423
- name: string;
3424
- image?: string | null | undefined;
3425
- };
3426
- }>;
3427
- generateTOTP: import("better-call").StrictEndpoint<string, {
3428
- method: "POST";
3429
- body: import("zod").ZodObject<{
3430
- secret: import("zod").ZodString;
3431
- }, import("zod/v4/core").$strip>;
3432
- metadata: {
3433
- openapi: {
3434
- summary: string;
3435
- description: string;
3436
- responses: {
3437
- 200: {
3438
- description: string;
3439
- content: {
3440
- "application/json": {
3441
- schema: {
3442
- type: "object";
3443
- properties: {
3444
- code: {
3445
- type: string;
3446
- };
3447
- };
3448
- };
3449
- };
3450
- };
3451
- };
3452
- };
3453
- };
3454
- };
3455
- }, {
3456
- code: string;
3457
- }>;
3458
- getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
3459
- method: "POST";
3460
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3461
- session: {
3462
- session: Record<string, any> & {
3463
- id: string;
3464
- createdAt: Date;
3465
- updatedAt: Date;
3466
- userId: string;
3467
- expiresAt: Date;
3468
- token: string;
3469
- ipAddress?: string | null | undefined;
3470
- userAgent?: string | null | undefined;
3471
- };
3472
- user: Record<string, any> & {
3473
- id: string;
3474
- createdAt: Date;
3475
- updatedAt: Date;
3476
- email: string;
3477
- emailVerified: boolean;
3478
- name: string;
3479
- image?: string | null | undefined;
3480
- };
3481
- };
3482
- }>>[];
3483
- body: import("zod").ZodObject<{
3484
- password: import("zod").ZodOptional<import("zod").ZodString>;
3485
- }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3486
- password: import("zod").ZodString;
3487
- }, import("zod/v4/core").$strip>;
3488
- metadata: {
3489
- openapi: {
3490
- summary: string;
3491
- description: string;
3492
- responses: {
3493
- 200: {
3494
- description: string;
3495
- content: {
3496
- "application/json": {
3497
- schema: {
3498
- type: "object";
3499
- properties: {
3500
- totpURI: {
3501
- type: string;
3502
- };
3503
- };
3504
- };
3505
- };
3506
- };
3507
- };
3508
- };
3509
- };
3510
- };
3511
- }, {
3512
- totpURI: string;
3513
- }>;
3514
- verifyTOTP: import("better-call").StrictEndpoint<"/two-factor/verify-totp", {
3515
- method: "POST";
3516
- body: import("zod").ZodObject<{
3517
- code: import("zod").ZodString;
3518
- trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
3519
- }, import("zod/v4/core").$strip>;
3520
- metadata: {
3521
- openapi: {
3522
- summary: string;
3523
- description: string;
3524
- responses: {
3525
- 200: {
3526
- description: string;
3527
- content: {
3528
- "application/json": {
3529
- schema: {
3530
- type: "object";
3531
- properties: {
3532
- status: {
3533
- type: string;
3534
- };
3535
- };
3536
- };
3537
- };
3538
- };
3539
- };
3540
- };
3541
- };
3542
- };
3543
- }, {
3544
- token: string;
3545
- user: import("better-auth/plugins/two-factor").UserWithTwoFactor;
3546
- } | {
3547
- token: string;
3548
- user: Record<string, any> & {
3549
- id: string;
3550
- createdAt: Date;
3551
- updatedAt: Date;
3552
- email: string;
3553
- emailVerified: boolean;
3554
- name: string;
3555
- image?: string | null | undefined;
3556
- };
3557
- }>;
3558
- };
3559
- options: NoInfer<O>;
3560
- hooks: {
3561
- after: {
3562
- matcher(context: import("better-auth").HookEndpointContext): boolean;
3563
- handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
3564
- twoFactorRedirect: boolean;
3565
- twoFactorMethods: string[];
3566
- } | undefined>>;
3567
- }[];
3568
- };
3569
- schema: {
3570
- user: {
3571
- fields: {
3572
- twoFactorEnabled: {
3573
- type: "boolean";
3574
- required: false;
3575
- defaultValue: false;
3576
- input: false;
3577
- };
3578
- };
3579
- };
3580
- twoFactor: {
3581
- fields: {
3582
- secret: {
3583
- type: "string";
3584
- required: true;
3585
- returned: false;
3586
- index: true;
3587
- };
3588
- backupCodes: {
3589
- type: "string";
3590
- required: true;
3591
- returned: false;
3592
- };
3593
- userId: {
3594
- type: "string";
3595
- required: true;
3596
- returned: false;
3597
- references: {
3598
- model: string;
3599
- field: string;
3600
- };
3601
- index: true;
3602
- };
3603
- verified: {
3604
- type: "boolean";
3605
- required: false;
3606
- defaultValue: true;
3607
- input: false;
3608
- };
3609
- failedVerificationCount: {
3610
- type: "number";
3611
- required: false;
3612
- defaultValue: number;
3613
- input: false;
3614
- returned: false;
3615
- };
3616
- lockedUntil: {
3617
- type: "date";
3618
- required: false;
3619
- input: false;
3620
- returned: false;
3621
- };
3622
- };
3623
- };
3624
- };
3625
- rateLimit: {
3626
- pathMatcher(path: string): boolean;
3627
- window: number;
3628
- max: number;
3629
- }[];
3630
- $ERROR_CODES: {
3631
- OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
3632
- OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
3633
- OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
3634
- TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
3635
- TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
3636
- TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
3637
- BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
3638
- INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
3639
- INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
3640
- TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
3641
- ACCOUNT_TEMPORARILY_LOCKED: import("better-auth").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
3642
- INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
3643
- };
3644
- }>;
3645
- atomListeners: {
3646
- matcher: (path: string) => boolean;
3647
- signal: "$sessionSignal";
3648
- }[];
3649
- pathMethods: {
3650
- "/two-factor/disable": "POST";
3651
- "/two-factor/enable": "POST";
3652
- "/two-factor/send-otp": "POST";
3653
- "/two-factor/generate-backup-codes": "POST";
3654
- "/two-factor/get-totp-uri": "POST";
3655
- "/two-factor/verify-totp": "POST";
3656
- "/two-factor/verify-otp": "POST";
3657
- "/two-factor/verify-backup-code": "POST";
3658
- };
3659
- fetchPlugins: {
3660
- id: string;
3661
- name: string;
3662
- hooks: {
3663
- onSuccess(context: import("better-auth/client").SuccessContext<any>): Promise<void>;
3664
- };
3665
- }[];
3666
- $ERROR_CODES: {
3667
- OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
3668
- OTP_NOT_CONFIGURED: import("better-auth").RawError<"OTP_NOT_CONFIGURED">;
3669
- OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
3670
- TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
3671
- TOTP_NOT_CONFIGURED: import("better-auth").RawError<"TOTP_NOT_CONFIGURED">;
3672
- TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
3673
- BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
3674
- INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
3675
- INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
3676
- TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
3677
- ACCOUNT_TEMPORARILY_LOCKED: import("better-auth").RawError<"ACCOUNT_TEMPORARILY_LOCKED">;
3678
- INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
3679
- };
3680
- }, {
3681
- id: "device-authorization";
3682
- version: string;
3683
- $InferServerPlugin: {
3684
- id: "device-authorization";
3685
- version: string;
3686
- schema: {
3687
- deviceCode: {
3688
- fields: {
3689
- deviceCode: {
3690
- type: "string";
3691
- required: true;
3692
- };
3693
- userCode: {
3694
- type: "string";
3695
- required: true;
3696
- };
3697
- userId: {
3698
- type: "string";
3699
- required: false;
3700
- };
3701
- expiresAt: {
3702
- type: "date";
3703
- required: true;
3704
- };
3705
- status: {
3706
- type: "string";
3707
- required: true;
3708
- };
3709
- lastPolledAt: {
3710
- type: "date";
3711
- required: false;
3712
- };
3713
- pollingInterval: {
3714
- type: "number";
3715
- required: false;
3716
- };
3717
- clientId: {
3718
- type: "string";
3719
- required: false;
3720
- };
3721
- scope: {
3722
- type: "string";
3723
- required: false;
3724
- };
3725
- };
3726
- indexes: {
3727
- fields: [string];
3728
- unique: true;
3729
- }[];
3730
- };
3731
- };
3732
- endpoints: {
3733
- deviceCode: import("better-call").StrictEndpoint<"/device/code", {
3734
- method: "POST";
3735
- cloneRequest: true;
3736
- body: import("zod").ZodObject<{
3737
- client_id: import("zod").ZodString;
3738
- user_id: import("zod").ZodOptional<import("zod").ZodString>;
3739
- scope: import("zod").ZodOptional<import("zod").ZodString>;
3740
- }, import("zod/v4/core").$strip> | import("zod").ZodObject<{
3741
- user_id: import("zod").ZodOptional<import("zod").ZodString>;
3742
- scope: import("zod").ZodOptional<import("zod").ZodString>;
3743
- client_id: import("zod").ZodOptional<import("zod").ZodString>;
3744
- }, import("zod/v4/core").$strip>;
3745
- error: import("zod").ZodObject<{
3746
- error: import("zod").ZodEnum<{
3747
- invalid_client: "invalid_client";
3748
- invalid_request: "invalid_request";
3749
- invalid_scope: "invalid_scope";
3750
- server_error: "server_error";
3751
- unauthorized_client: "unauthorized_client";
3752
- }>;
3753
- error_description: import("zod").ZodString;
3754
- }, import("zod/v4/core").$strip>;
3755
- onValidationError: ({ issues, message }: {
3756
- message: string;
3757
- issues: readonly import("better-call").StandardSchemaV1.Issue[];
3758
- }) => never;
3759
- metadata: {
3760
- noStore: boolean;
3761
- allowedMediaTypes: string[];
3762
- openapi: {
3763
- description: string;
3764
- responses: {
3765
- 200: {
3766
- description: string;
3767
- content: {
3768
- "application/json": {
3769
- schema: {
3770
- type: "object";
3771
- properties: {
3772
- device_code: {
3773
- type: string;
3774
- description: string;
3775
- };
3776
- user_code: {
3777
- type: string;
3778
- description: string;
3779
- };
3780
- verification_uri: {
3781
- type: string;
3782
- format: string;
3783
- description: string;
3784
- };
3785
- verification_uri_complete: {
3786
- type: string;
3787
- format: string;
3788
- description: string;
3789
- };
3790
- expires_in: {
3791
- type: string;
3792
- description: string;
3793
- };
3794
- interval: {
3795
- type: string;
3796
- description: string;
3797
- };
3798
- };
3799
- };
3800
- };
3801
- };
3802
- };
3803
- 400: {
3804
- description: string;
3805
- content: {
3806
- "application/json": {
3807
- schema: {
3808
- type: "object";
3809
- properties: {
3810
- error: {
3811
- type: string;
3812
- enum: ["invalid_request", "invalid_client", "unauthorized_client", "invalid_scope"];
3813
- };
3814
- error_description: {
3815
- type: string;
3816
- };
3817
- };
3818
- };
3819
- };
3820
- };
3821
- };
3822
- 500: {
3823
- description: string;
3824
- content: {
3825
- "application/json": {
3826
- schema: {
3827
- type: "object";
3828
- properties: {
3829
- error: {
3830
- type: string;
3831
- enum: string[];
3832
- };
3833
- error_description: {
3834
- type: string;
3835
- };
3836
- };
3837
- };
3838
- };
3839
- };
3840
- };
3841
- };
3842
- };
3843
- };
3844
- }, {
3845
- device_code: string;
3846
- user_code: string;
3847
- verification_uri: string;
3848
- verification_uri_complete: string;
3849
- expires_in: number;
3850
- interval: number;
3851
- }>;
3852
- deviceToken: import("better-call").StrictEndpoint<"/device/token", {
3853
- method: "POST";
3854
- body: import("zod").ZodObject<{
3855
- grant_type: import("zod").ZodLiteral<"urn:ietf:params:oauth:grant-type:device_code">;
3856
- device_code: import("zod").ZodString;
3857
- client_id: import("zod").ZodString;
3858
- }, import("zod/v4/core").$strip>;
3859
- error: import("zod").ZodObject<{
3860
- error: import("zod").ZodEnum<{
3861
- invalid_request: "invalid_request";
3862
- authorization_pending: "authorization_pending";
3863
- slow_down: "slow_down";
3864
- expired_token: "expired_token";
3865
- access_denied: "access_denied";
3866
- invalid_grant: "invalid_grant";
3867
- }>;
3868
- error_description: import("zod").ZodString;
3869
- }, import("zod/v4/core").$strip>;
3870
- metadata: {
3871
- noStore: boolean;
3872
- openapi: {
3873
- description: string;
3874
- responses: {
3875
- 200: {
3876
- description: string;
3877
- content: {
3878
- "application/json": {
3879
- schema: {
3880
- type: "object";
3881
- properties: {
3882
- session: {
3883
- $ref: string;
3884
- };
3885
- user: {
3886
- $ref: string;
3887
- };
3888
- };
3889
- };
3890
- };
3891
- };
3892
- };
3893
- 400: {
3894
- description: string;
3895
- content: {
3896
- "application/json": {
3897
- schema: {
3898
- type: "object";
3899
- properties: {
3900
- error: {
3901
- type: string;
3902
- enum: string[];
3903
- };
3904
- error_description: {
3905
- type: string;
3906
- };
3907
- };
3908
- };
3909
- };
3910
- };
3911
- };
3912
- };
3913
- };
3914
- };
3915
- }, {
3916
- access_token: string;
3917
- token_type: string;
3918
- expires_in: number;
3919
- scope: string;
3920
- }>;
3921
- deviceVerify: import("better-call").StrictEndpoint<"/device", {
3922
- method: "GET";
3923
- query: import("zod").ZodObject<{
3924
- user_code: import("zod").ZodString;
3925
- }, import("zod/v4/core").$strip>;
3926
- error: import("zod").ZodObject<{
3927
- error: import("zod").ZodEnum<{
3928
- invalid_request: "invalid_request";
3929
- }>;
3930
- error_description: import("zod").ZodString;
3931
- }, import("zod/v4/core").$strip>;
3932
- metadata: {
3933
- openapi: {
3934
- description: string;
3935
- responses: {
3936
- 200: {
3937
- description: string;
3938
- content: {
3939
- "application/json": {
3940
- schema: {
3941
- type: "object";
3942
- properties: {
3943
- user_code: {
3944
- type: string;
3945
- description: string;
3946
- };
3947
- status: {
3948
- type: string;
3949
- enum: string[];
3950
- description: string;
3951
- };
3952
- client_id: {
3953
- type: string;
3954
- description: string;
3955
- };
3956
- scope: {
3957
- type: string;
3958
- description: string;
3959
- };
3960
- };
3961
- };
3962
- };
3963
- };
3964
- };
3965
- };
3966
- };
3967
- };
3968
- }, {
3969
- user_code: string;
3970
- status: string;
3971
- client_id?: string | undefined;
3972
- scope?: string | undefined;
3973
- } & Partial<Record<never, never>>>;
3974
- deviceApprove: import("better-call").StrictEndpoint<"/device/approve", {
3975
- method: "POST";
3976
- body: import("zod").ZodObject<{
3977
- userCode: import("zod").ZodString;
3978
- }, import("zod/v4/core").$strip>;
3979
- error: import("zod").ZodObject<{
3980
- error: import("zod").ZodEnum<{
3981
- invalid_request: "invalid_request";
3982
- expired_token: "expired_token";
3983
- access_denied: "access_denied";
3984
- device_code_already_processed: "device_code_already_processed";
3985
- unauthorized: "unauthorized";
3986
- }>;
3987
- error_description: import("zod").ZodString;
3988
- }, import("zod/v4/core").$strip>;
3989
- requireHeaders: true;
3990
- metadata: {
3991
- openapi: {
3992
- description: string;
3993
- responses: {
3994
- 200: {
3995
- description: string;
3996
- content: {
3997
- "application/json": {
3998
- schema: {
3999
- type: "object";
4000
- properties: {
4001
- success: {
4002
- type: string;
4003
- };
4004
- };
4005
- };
4006
- };
4007
- };
4008
- };
4009
- };
4010
- };
4011
- };
4012
- }, {
4013
- success: boolean;
4014
- }>;
4015
- deviceDeny: import("better-call").StrictEndpoint<"/device/deny", {
4016
- method: "POST";
4017
- body: import("zod").ZodObject<{
4018
- userCode: import("zod").ZodString;
4019
- }, import("zod/v4/core").$strip>;
4020
- error: import("zod").ZodObject<{
4021
- error: import("zod").ZodEnum<{
4022
- invalid_request: "invalid_request";
4023
- expired_token: "expired_token";
4024
- access_denied: "access_denied";
4025
- unauthorized: "unauthorized";
4026
- }>;
4027
- error_description: import("zod").ZodString;
4028
- }, import("zod/v4/core").$strip>;
4029
- requireHeaders: true;
4030
- metadata: {
4031
- openapi: {
4032
- description: string;
4033
- responses: {
4034
- 200: {
4035
- description: string;
4036
- content: {
4037
- "application/json": {
4038
- schema: {
4039
- type: "object";
4040
- properties: {
4041
- success: {
4042
- type: string;
4043
- };
4044
- };
4045
- };
4046
- };
4047
- };
4048
- };
4049
- };
4050
- };
4051
- };
4052
- }, {
4053
- success: boolean;
4054
- }>;
4055
- };
4056
- rateLimit: {
4057
- pathMatcher(path: string): path is "/device";
4058
- window: number;
4059
- max: number;
4060
- }[];
4061
- $ERROR_CODES: {
4062
- USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
4063
- FAILED_TO_CREATE_SESSION: import("better-auth").RawError<"FAILED_TO_CREATE_SESSION">;
4064
- INVALID_DEVICE_CODE: import("better-auth").RawError<"INVALID_DEVICE_CODE">;
4065
- EXPIRED_DEVICE_CODE: import("better-auth").RawError<"EXPIRED_DEVICE_CODE">;
4066
- EXPIRED_USER_CODE: import("better-auth").RawError<"EXPIRED_USER_CODE">;
4067
- AUTHORIZATION_PENDING: import("better-auth").RawError<"AUTHORIZATION_PENDING">;
4068
- ACCESS_DENIED: import("better-auth").RawError<"ACCESS_DENIED">;
4069
- INVALID_USER_CODE: import("better-auth").RawError<"INVALID_USER_CODE">;
4070
- DEVICE_CODE_ALREADY_PROCESSED: import("better-auth").RawError<"DEVICE_CODE_ALREADY_PROCESSED">;
4071
- DEVICE_CODE_NOT_CLAIMED: import("better-auth").RawError<"DEVICE_CODE_NOT_CLAIMED">;
4072
- POLLING_TOO_FREQUENTLY: import("better-auth").RawError<"POLLING_TOO_FREQUENTLY">;
4073
- INVALID_DEVICE_CODE_STATUS: import("better-auth").RawError<"INVALID_DEVICE_CODE_STATUS">;
4074
- AUTHENTICATION_REQUIRED: import("better-auth").RawError<"AUTHENTICATION_REQUIRED">;
4075
- };
4076
- options: {
4077
- grant: import("better-auth/plugins/device-authorization").DeviceAuthorizationGrant<Readonly<{
4078
- [k: string]: import("zod/v4/core").$ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
4079
- }>, Record<string, unknown>> | undefined;
4080
- expiresIn: import("better-auth/plugins/device-authorization").TimeString;
4081
- interval: import("better-auth/plugins/device-authorization").TimeString;
4082
- deviceCodeLength: number;
4083
- userCodeLength: number;
4084
- generateDeviceCode?: (() => string | Promise<string>) | undefined;
4085
- generateUserCode?: (() => string | Promise<string>) | undefined;
4086
- validateClient?: ((clientId: string) => boolean | Promise<boolean>) | undefined;
4087
- onDeviceAuthRequest?: ((clientId: string, scope: string | undefined) => void | Promise<void>) | undefined;
4088
- verificationUri?: string | undefined;
4089
- schema?: {
4090
- deviceCode?: {
4091
- modelName?: string | undefined;
4092
- fields?: {
4093
- deviceCode?: string | undefined;
4094
- userCode?: string | undefined;
4095
- userId?: string | undefined;
4096
- expiresAt?: string | undefined;
4097
- status?: string | undefined;
4098
- lastPolledAt?: string | undefined;
4099
- pollingInterval?: string | undefined;
4100
- clientId?: string | undefined;
4101
- scope?: string | undefined;
4102
- } | undefined;
4103
- } | undefined;
4104
- } | undefined;
4105
- };
4106
- };
4107
- pathMethods: {
4108
- "/device/code": "POST";
4109
- "/device/token": "POST";
4110
- "/device": "GET";
4111
- "/device/approve": "POST";
4112
- "/device/deny": "POST";
4113
- };
4114
- }, {
4115
- id: "organization";
4116
- version: string;
4117
- $InferServerPlugin: import("better-auth/client").OrganizationPlugin<{
4118
- ac: import("better-auth/client").AccessControl;
4119
- roles: {
4120
- owner: import("better-auth/client").Role;
4121
- member: import("better-auth/client").Role;
4122
- };
4123
- teams: {
4124
- enabled: false;
4125
- };
4126
- schema: unknown;
4127
- dynamicAccessControl: {
4128
- enabled: false;
4129
- };
4130
- }>;
4131
- getActions: ($fetch: import("better-auth/client").BetterFetch, _$store: import("better-auth").ClientStore, co: import("better-auth").BetterAuthClientOptions | undefined) => {
4132
- $Infer: {
4133
- ActiveOrganization: {
4134
- members: {
4135
- id: string;
4136
- organizationId: string;
4137
- role: "member" | "owner";
4138
- createdAt: Date;
4139
- userId: string;
4140
- user: {
4141
- id: string;
4142
- email: string;
4143
- name: string;
4144
- image?: string | undefined;
4145
- };
4146
- }[];
4147
- invitations: {
4148
- id: string;
4149
- organizationId: string;
4150
- email: string;
4151
- role: "member" | "owner";
4152
- status: import("better-auth/client").InvitationStatus;
4153
- inviterId: string;
4154
- expiresAt: Date;
4155
- createdAt: Date;
4156
- }[];
4157
- } & {
4158
- id: string;
4159
- name: string;
4160
- slug: string;
4161
- createdAt: Date;
4162
- logo?: string | null | undefined;
4163
- metadata?: any;
4164
- };
4165
- Organization: {
4166
- id: string;
4167
- name: string;
4168
- slug: string;
4169
- logo?: string | null | undefined;
4170
- metadata?: any;
4171
- createdAt: Date;
4172
- };
4173
- Invitation: {
4174
- id: string;
4175
- organizationId: string;
4176
- email: string;
4177
- role: "member" | "owner";
4178
- status: import("better-auth/client").InvitationStatus;
4179
- inviterId: string;
4180
- expiresAt: Date;
4181
- createdAt: Date;
4182
- };
4183
- Member: {
4184
- id: string;
4185
- organizationId: string;
4186
- role: "member" | "owner";
4187
- createdAt: Date;
4188
- userId: string;
4189
- user: {
4190
- id: string;
4191
- email: string;
4192
- name: string;
4193
- image?: string | undefined;
4194
- };
4195
- };
4196
- Team: {
4197
- id: string;
4198
- name: string;
4199
- organizationId: string;
4200
- createdAt: Date;
4201
- updatedAt?: Date | undefined;
4202
- };
4203
- };
4204
- organization: {
4205
- checkRolePermission: <R extends ({
4206
- ac: import("better-auth/client").AccessControl;
4207
- roles: {
4208
- owner: import("better-auth/client").Role;
4209
- member: import("better-auth/client").Role;
4210
- };
4211
- } extends {
4212
- roles: any;
4213
- } ? "member" | "owner" : "admin" | "member" | "owner")>(data: {
4214
- permissions: {
4215
- readonly [x: string]: import("better-auth").LiteralString[] | undefined;
4216
- };
4217
- } & {
4218
- role: R;
4219
- }) => boolean;
4220
- };
4221
- };
4222
- getAtoms: ($fetch: import("better-auth/client").BetterFetch) => {
4223
- $listOrg: import("better-auth/client").PreinitializedWritableAtom<boolean> & object;
4224
- $activeOrgSignal: import("better-auth/client").PreinitializedWritableAtom<boolean> & object;
4225
- $activeMemberSignal: import("better-auth/client").PreinitializedWritableAtom<boolean> & object;
4226
- $activeMemberRoleSignal: import("better-auth/client").PreinitializedWritableAtom<boolean> & object;
4227
- activeOrganization: import("better-auth/client").AuthQueryAtom<import("better-auth").Prettify<{
4228
- id: string;
4229
- name: string;
4230
- slug: string;
4231
- createdAt: Date;
4232
- logo?: string | null | undefined;
4233
- metadata?: any;
4234
- } & {
4235
- members: {
4236
- id: string;
4237
- organizationId: string;
4238
- role: "member" | "owner";
4239
- createdAt: Date;
4240
- userId: string;
4241
- user: {
4242
- id: string;
4243
- email: string;
4244
- name: string;
4245
- image?: string | undefined;
4246
- };
4247
- }[];
4248
- invitations: {
4249
- id: string;
4250
- organizationId: string;
4251
- email: string;
4252
- role: "member" | "owner";
4253
- status: import("better-auth/client").InvitationStatus;
4254
- inviterId: string;
4255
- expiresAt: Date;
4256
- createdAt: Date;
4257
- }[];
4258
- }>>;
4259
- listOrganizations: import("better-auth/client").AuthQueryAtom<{
4260
- id: string;
4261
- name: string;
4262
- slug: string;
4263
- createdAt: Date;
4264
- logo?: string | null | undefined;
4265
- metadata?: any;
4266
- }[]>;
4267
- activeMember: import("better-auth/client").AuthQueryAtom<{
4268
- id: string;
4269
- organizationId: string;
4270
- userId: string;
4271
- role: string;
4272
- createdAt: Date;
4273
- }>;
4274
- activeMemberRole: import("better-auth/client").AuthQueryAtom<{
4275
- role: string;
4276
- }>;
4277
- };
4278
- pathMethods: {
4279
- "/organization/get-full-organization": "GET";
4280
- "/organization/list-user-teams": "GET";
4281
- };
4282
- atomListeners: ({
4283
- matcher(path: string): path is "/organization/create" | "/organization/update" | "/organization/delete";
4284
- signal: "$listOrg";
4285
- } | {
4286
- matcher(path: string): boolean;
4287
- signal: "$activeOrgSignal";
4288
- } | {
4289
- matcher(path: string): boolean;
4290
- signal: "$sessionSignal";
4291
- } | {
4292
- matcher(path: string): boolean;
4293
- signal: "$activeMemberSignal";
4294
- } | {
4295
- matcher(path: string): boolean;
4296
- signal: "$activeMemberRoleSignal";
4297
- })[];
4298
- $ERROR_CODES: {
4299
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION">;
4300
- YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: import("better-auth").RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS">;
4301
- ORGANIZATION_ALREADY_EXISTS: import("better-auth").RawError<"ORGANIZATION_ALREADY_EXISTS">;
4302
- ORGANIZATION_SLUG_ALREADY_TAKEN: import("better-auth").RawError<"ORGANIZATION_SLUG_ALREADY_TAKEN">;
4303
- ORGANIZATION_NOT_FOUND: import("better-auth").RawError<"ORGANIZATION_NOT_FOUND">;
4304
- USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: import("better-auth").RawError<"USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION">;
4305
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION">;
4306
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION">;
4307
- NO_ACTIVE_ORGANIZATION: import("better-auth").RawError<"NO_ACTIVE_ORGANIZATION">;
4308
- USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: import("better-auth").RawError<"USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION">;
4309
- MEMBER_NOT_FOUND: import("better-auth").RawError<"MEMBER_NOT_FOUND">;
4310
- ROLE_NOT_FOUND: import("better-auth").RawError<"ROLE_NOT_FOUND">;
4311
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM">;
4312
- TEAM_ALREADY_EXISTS: import("better-auth").RawError<"TEAM_ALREADY_EXISTS">;
4313
- TEAM_NOT_FOUND: import("better-auth").RawError<"TEAM_NOT_FOUND">;
4314
- YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: import("better-auth").RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER">;
4315
- YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: import("better-auth").RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER">;
4316
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER">;
4317
- YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION">;
4318
- USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: import("better-auth").RawError<"USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION">;
4319
- INVITATION_NOT_FOUND: import("better-auth").RawError<"INVITATION_NOT_FOUND">;
4320
- YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: import("better-auth").RawError<"YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION">;
4321
- EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: import("better-auth").RawError<"EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION">;
4322
- EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION: import("better-auth").RawError<"EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION">;
4323
- YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION">;
4324
- INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: import("better-auth").RawError<"INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION">;
4325
- YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE">;
4326
- FAILED_TO_RETRIEVE_INVITATION: import("better-auth").RawError<"FAILED_TO_RETRIEVE_INVITATION">;
4327
- YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: import("better-auth").RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS">;
4328
- UNABLE_TO_REMOVE_LAST_TEAM: import("better-auth").RawError<"UNABLE_TO_REMOVE_LAST_TEAM">;
4329
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER">;
4330
- ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: import("better-auth").RawError<"ORGANIZATION_MEMBERSHIP_LIMIT_REACHED">;
4331
- YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION">;
4332
- YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION">;
4333
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM">;
4334
- YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM">;
4335
- INVITATION_LIMIT_REACHED: import("better-auth").RawError<"INVITATION_LIMIT_REACHED">;
4336
- TEAM_MEMBER_LIMIT_REACHED: import("better-auth").RawError<"TEAM_MEMBER_LIMIT_REACHED">;
4337
- USER_IS_NOT_A_MEMBER_OF_THE_TEAM: import("better-auth").RawError<"USER_IS_NOT_A_MEMBER_OF_THE_TEAM">;
4338
- YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: import("better-auth").RawError<"YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM">;
4339
- YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: import("better-auth").RawError<"YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM">;
4340
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER">;
4341
- YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER">;
4342
- YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION">;
4343
- YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: import("better-auth").RawError<"YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION">;
4344
- MISSING_AC_INSTANCE: import("better-auth").RawError<"MISSING_AC_INSTANCE">;
4345
- YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: import("better-auth").RawError<"YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE">;
4346
- YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE">;
4347
- YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE">;
4348
- YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE">;
4349
- YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE">;
4350
- YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE">;
4351
- YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE">;
4352
- TOO_MANY_ROLES: import("better-auth").RawError<"TOO_MANY_ROLES">;
4353
- INVALID_RESOURCE: import("better-auth").RawError<"INVALID_RESOURCE">;
4354
- ROLE_NAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"ROLE_NAME_IS_ALREADY_TAKEN">;
4355
- CANNOT_DELETE_A_PRE_DEFINED_ROLE: import("better-auth").RawError<"CANNOT_DELETE_A_PRE_DEFINED_ROLE">;
4356
- ROLE_IS_ASSIGNED_TO_MEMBERS: import("better-auth").RawError<"ROLE_IS_ASSIGNED_TO_MEMBERS">;
4357
- INVALID_TEAM_ID: import("better-auth").RawError<"INVALID_TEAM_ID">;
4358
- };
4359
- }];
4360
- }>;
4361
- export type InferredBetterAuthClient = ReturnType<typeof createConfiguredBetterAuthClient>;
4362
- /** Better Auth client with the exact DALP plugin surface and stable operation types. */
4363
- export type DalpAuthClient = Omit<InferredBetterAuthClient, keyof DalpCliAuthClient | keyof DalpWalletAuthClient> & DalpCliAuthClient & DalpWalletAuthClient;
4364
- export declare function createDalpAuthClient(input: DalpAuthClientConfig): Promise<DalpAuthClient>;
4365
- export declare const makeDalpAuthClient: typeof createDalpAuthClient;
4366
- export {};