@convex-dev/better-auth 0.8.9 → 0.9.1

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 (103) hide show
  1. package/dist/commonjs/client/adapter.d.ts +8 -4
  2. package/dist/commonjs/client/adapter.d.ts.map +1 -1
  3. package/dist/commonjs/client/adapter.js +45 -8
  4. package/dist/commonjs/client/adapter.js.map +1 -1
  5. package/dist/commonjs/client/adapterUtils.d.ts +6 -6
  6. package/dist/commonjs/client/adapterUtils.d.ts.map +1 -1
  7. package/dist/commonjs/client/adapterUtils.js +17 -9
  8. package/dist/commonjs/client/adapterUtils.js.map +1 -1
  9. package/dist/commonjs/client/createSchema.d.ts +0 -5
  10. package/dist/commonjs/client/createSchema.d.ts.map +1 -1
  11. package/dist/commonjs/client/createSchema.js +0 -8
  12. package/dist/commonjs/client/createSchema.js.map +1 -1
  13. package/dist/commonjs/client/index.d.ts +64 -3355
  14. package/dist/commonjs/client/index.d.ts.map +1 -1
  15. package/dist/commonjs/client/index.js +100 -33
  16. package/dist/commonjs/client/index.js.map +1 -1
  17. package/dist/commonjs/component/adapter.d.ts +11 -9
  18. package/dist/commonjs/component/adapter.d.ts.map +1 -1
  19. package/dist/commonjs/component/adapter.js +1 -1
  20. package/dist/commonjs/component/adapter.js.map +1 -1
  21. package/dist/commonjs/component/adapterTest.d.ts +1 -1
  22. package/dist/commonjs/component/adapterTest.d.ts.map +1 -1
  23. package/dist/commonjs/component/schema.d.ts +16 -419
  24. package/dist/commonjs/component/schema.d.ts.map +1 -1
  25. package/dist/commonjs/component/schema.js +6 -196
  26. package/dist/commonjs/component/schema.js.map +1 -1
  27. package/dist/commonjs/plugins/convex/index.d.ts +10 -2
  28. package/dist/commonjs/plugins/convex/index.d.ts.map +1 -1
  29. package/dist/commonjs/plugins/convex/index.js +32 -5
  30. package/dist/commonjs/plugins/convex/index.js.map +1 -1
  31. package/dist/commonjs/plugins/convex/test.d.ts +4 -0
  32. package/dist/commonjs/plugins/convex/test.d.ts.map +1 -0
  33. package/dist/commonjs/plugins/convex/test.js +47 -0
  34. package/dist/commonjs/plugins/convex/test.js.map +1 -0
  35. package/dist/commonjs/plugins/cross-domain/index.d.ts +5 -0
  36. package/dist/commonjs/plugins/cross-domain/index.d.ts.map +1 -1
  37. package/dist/commonjs/plugins/cross-domain/index.js +8 -0
  38. package/dist/commonjs/plugins/cross-domain/index.js.map +1 -1
  39. package/dist/commonjs/react-start/index.d.ts.map +1 -1
  40. package/dist/commonjs/react-start/index.js +10 -2
  41. package/dist/commonjs/react-start/index.js.map +1 -1
  42. package/dist/commonjs/utils/index.d.ts +5 -5
  43. package/dist/commonjs/utils/index.d.ts.map +1 -1
  44. package/dist/commonjs/utils/index.js +9 -11
  45. package/dist/commonjs/utils/index.js.map +1 -1
  46. package/dist/esm/client/adapter.d.ts +8 -4
  47. package/dist/esm/client/adapter.d.ts.map +1 -1
  48. package/dist/esm/client/adapter.js +45 -8
  49. package/dist/esm/client/adapter.js.map +1 -1
  50. package/dist/esm/client/adapterUtils.d.ts +6 -6
  51. package/dist/esm/client/adapterUtils.d.ts.map +1 -1
  52. package/dist/esm/client/adapterUtils.js +17 -9
  53. package/dist/esm/client/adapterUtils.js.map +1 -1
  54. package/dist/esm/client/createSchema.d.ts +0 -5
  55. package/dist/esm/client/createSchema.d.ts.map +1 -1
  56. package/dist/esm/client/createSchema.js +0 -8
  57. package/dist/esm/client/createSchema.js.map +1 -1
  58. package/dist/esm/client/index.d.ts +64 -3355
  59. package/dist/esm/client/index.d.ts.map +1 -1
  60. package/dist/esm/client/index.js +100 -33
  61. package/dist/esm/client/index.js.map +1 -1
  62. package/dist/esm/component/adapter.d.ts +11 -9
  63. package/dist/esm/component/adapter.d.ts.map +1 -1
  64. package/dist/esm/component/adapter.js +1 -1
  65. package/dist/esm/component/adapter.js.map +1 -1
  66. package/dist/esm/component/adapterTest.d.ts +1 -1
  67. package/dist/esm/component/adapterTest.d.ts.map +1 -1
  68. package/dist/esm/component/schema.d.ts +16 -419
  69. package/dist/esm/component/schema.d.ts.map +1 -1
  70. package/dist/esm/component/schema.js +6 -196
  71. package/dist/esm/component/schema.js.map +1 -1
  72. package/dist/esm/plugins/convex/index.d.ts +10 -2
  73. package/dist/esm/plugins/convex/index.d.ts.map +1 -1
  74. package/dist/esm/plugins/convex/index.js +32 -5
  75. package/dist/esm/plugins/convex/index.js.map +1 -1
  76. package/dist/esm/plugins/convex/test.d.ts +4 -0
  77. package/dist/esm/plugins/convex/test.d.ts.map +1 -0
  78. package/dist/esm/plugins/convex/test.js +47 -0
  79. package/dist/esm/plugins/convex/test.js.map +1 -0
  80. package/dist/esm/plugins/cross-domain/index.d.ts +5 -0
  81. package/dist/esm/plugins/cross-domain/index.d.ts.map +1 -1
  82. package/dist/esm/plugins/cross-domain/index.js +8 -0
  83. package/dist/esm/plugins/cross-domain/index.js.map +1 -1
  84. package/dist/esm/react-start/index.d.ts.map +1 -1
  85. package/dist/esm/react-start/index.js +10 -2
  86. package/dist/esm/react-start/index.js.map +1 -1
  87. package/dist/esm/utils/index.d.ts +5 -5
  88. package/dist/esm/utils/index.d.ts.map +1 -1
  89. package/dist/esm/utils/index.js +9 -11
  90. package/dist/esm/utils/index.js.map +1 -1
  91. package/package.json +13 -8
  92. package/src/client/adapter.test.ts +94 -34
  93. package/src/client/adapter.ts +66 -14
  94. package/src/client/adapterUtils.ts +23 -8
  95. package/src/client/createSchema.ts +0 -8
  96. package/src/client/index.ts +124 -63
  97. package/src/component/_generated/api.d.ts +133 -1303
  98. package/src/component/adapter.ts +1 -0
  99. package/src/component/schema.ts +11 -214
  100. package/src/plugins/convex/index.ts +38 -5
  101. package/src/plugins/cross-domain/index.ts +8 -0
  102. package/src/react-start/index.ts +10 -2
  103. package/src/utils/index.ts +20 -10
@@ -4,3058 +4,13 @@ import { convexAdapter } from "./adapter";
4
4
  import { AdapterInstance, betterAuth } from "better-auth";
5
5
  import defaultSchema from "../component/schema";
6
6
  import { api } from "../component/_generated/api";
7
+ import { SetOptional } from "type-fest";
7
8
  export { convexAdapter };
8
9
  export type CreateAdapter = <Ctx extends GenericCtx<GenericDataModel>>(ctx: Ctx) => AdapterInstance;
9
10
  export type CreateAuth<DataModel extends GenericDataModel> = ((ctx: GenericCtx<DataModel>) => ReturnType<typeof betterAuth>) | ((ctx: GenericCtx<DataModel>, opts?: {
10
11
  optionsOnly?: boolean;
11
12
  }) => ReturnType<typeof betterAuth>);
12
- export declare const getStaticAuth: <DataModel extends GenericDataModel>(createAuth: CreateAuth<DataModel>) => {
13
- handler: (request: Request) => Promise<Response>;
14
- api: import("better-auth").InferAPI<{
15
- ok: {
16
- <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
17
- body?: undefined;
18
- } & {
19
- method?: "GET" | undefined;
20
- } & {
21
- query?: Record<string, any> | undefined;
22
- } & {
23
- params?: Record<string, any>;
24
- } & {
25
- request?: Request;
26
- } & {
27
- headers?: HeadersInit;
28
- } & {
29
- asResponse?: boolean;
30
- returnHeaders?: boolean;
31
- use?: import("better-call").Middleware[];
32
- path?: string;
33
- } & {
34
- asResponse?: AsResponse | undefined;
35
- returnHeaders?: ReturnHeaders | undefined;
36
- }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
37
- headers: Headers;
38
- response: {
39
- ok: boolean;
40
- };
41
- } : {
42
- ok: boolean;
43
- }>;
44
- options: {
45
- method: "GET";
46
- metadata: {
47
- openapi: {
48
- description: string;
49
- responses: {
50
- "200": {
51
- description: string;
52
- content: {
53
- "application/json": {
54
- schema: {
55
- type: "object";
56
- properties: {
57
- ok: {
58
- type: string;
59
- description: string;
60
- };
61
- };
62
- required: string[];
63
- };
64
- };
65
- };
66
- };
67
- };
68
- };
69
- isAction: false;
70
- };
71
- } & {
72
- use: any[];
73
- };
74
- path: "/ok";
75
- };
76
- error: {
77
- <AsResponse extends boolean = false, ReturnHeaders_1 extends boolean = false>(inputCtx_0?: ({
78
- body?: undefined;
79
- } & {
80
- method?: "GET" | undefined;
81
- } & {
82
- query?: Record<string, any> | undefined;
83
- } & {
84
- params?: Record<string, any>;
85
- } & {
86
- request?: Request;
87
- } & {
88
- headers?: HeadersInit;
89
- } & {
90
- asResponse?: boolean;
91
- returnHeaders?: boolean;
92
- use?: import("better-call").Middleware[];
93
- path?: string;
94
- } & {
95
- asResponse?: AsResponse | undefined;
96
- returnHeaders?: ReturnHeaders_1 | undefined;
97
- }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_1] extends [true] ? {
98
- headers: Headers;
99
- response: Response;
100
- } : Response>;
101
- options: {
102
- method: "GET";
103
- metadata: {
104
- openapi: {
105
- description: string;
106
- responses: {
107
- "200": {
108
- description: string;
109
- content: {
110
- "text/html": {
111
- schema: {
112
- type: "string";
113
- description: string;
114
- };
115
- };
116
- };
117
- };
118
- };
119
- };
120
- isAction: false;
121
- };
122
- } & {
123
- use: any[];
124
- };
125
- path: "/error";
126
- };
127
- signInSocial: {
128
- <AsResponse extends boolean = false, ReturnHeaders_2 extends boolean = false>(inputCtx_0: {
129
- body: {
130
- provider: unknown;
131
- callbackURL?: string | undefined;
132
- newUserCallbackURL?: string | undefined;
133
- errorCallbackURL?: string | undefined;
134
- disableRedirect?: boolean | undefined;
135
- idToken?: {
136
- token: string;
137
- nonce?: string | undefined;
138
- accessToken?: string | undefined;
139
- refreshToken?: string | undefined;
140
- expiresAt?: number | undefined;
141
- } | undefined;
142
- scopes?: string[] | undefined;
143
- requestSignUp?: boolean | undefined;
144
- loginHint?: string | undefined;
145
- };
146
- } & {
147
- method?: "POST" | undefined;
148
- } & {
149
- query?: Record<string, any> | undefined;
150
- } & {
151
- params?: Record<string, any>;
152
- } & {
153
- request?: Request;
154
- } & {
155
- headers?: HeadersInit;
156
- } & {
157
- asResponse?: boolean;
158
- returnHeaders?: boolean;
159
- use?: import("better-call").Middleware[];
160
- path?: string;
161
- } & {
162
- asResponse?: AsResponse | undefined;
163
- returnHeaders?: ReturnHeaders_2 | undefined;
164
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_2] extends [true] ? {
165
- headers: Headers;
166
- response: {
167
- redirect: boolean;
168
- token: string;
169
- url: undefined;
170
- user: {
171
- id: string;
172
- email: string;
173
- name: string;
174
- image: string | null | undefined;
175
- emailVerified: boolean;
176
- createdAt: Date;
177
- updatedAt: Date;
178
- };
179
- } | {
180
- url: string;
181
- redirect: boolean;
182
- };
183
- } : {
184
- redirect: boolean;
185
- token: string;
186
- url: undefined;
187
- user: {
188
- id: string;
189
- email: string;
190
- name: string;
191
- image: string | null | undefined;
192
- emailVerified: boolean;
193
- createdAt: Date;
194
- updatedAt: Date;
195
- };
196
- } | {
197
- url: string;
198
- redirect: boolean;
199
- }>;
200
- options: {
201
- method: "POST";
202
- body: import("better-auth").ZodObject<{
203
- callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
204
- newUserCallbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
205
- errorCallbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
206
- provider: import("better-auth").ZodType<"apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "github" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paypal" | (string & {}), unknown, import("better-auth").$ZodTypeInternals<"apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "github" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paypal" | (string & {}), unknown>>;
207
- disableRedirect: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
208
- idToken: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
209
- token: import("better-auth").ZodString;
210
- nonce: import("better-auth").ZodOptional<import("better-auth").ZodString>;
211
- accessToken: import("better-auth").ZodOptional<import("better-auth").ZodString>;
212
- refreshToken: import("better-auth").ZodOptional<import("better-auth").ZodString>;
213
- expiresAt: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
214
- }, import("better-auth").$strip>>;
215
- scopes: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
216
- requestSignUp: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
217
- loginHint: import("better-auth").ZodOptional<import("better-auth").ZodString>;
218
- }, import("better-auth").$strip>;
219
- metadata: {
220
- openapi: {
221
- description: string;
222
- operationId: string;
223
- responses: {
224
- "200": {
225
- description: string;
226
- content: {
227
- "application/json": {
228
- schema: {
229
- type: "object";
230
- description: string;
231
- properties: {
232
- redirect: {
233
- type: string;
234
- enum: boolean[];
235
- };
236
- token: {
237
- type: string;
238
- description: string;
239
- url: {
240
- type: string;
241
- nullable: boolean;
242
- };
243
- user: {
244
- type: string;
245
- properties: {
246
- id: {
247
- type: string;
248
- };
249
- email: {
250
- type: string;
251
- };
252
- name: {
253
- type: string;
254
- nullable: boolean;
255
- };
256
- image: {
257
- type: string;
258
- nullable: boolean;
259
- };
260
- emailVerified: {
261
- type: string;
262
- };
263
- createdAt: {
264
- type: string;
265
- format: string;
266
- };
267
- updatedAt: {
268
- type: string;
269
- format: string;
270
- };
271
- };
272
- required: string[];
273
- };
274
- };
275
- };
276
- required: string[];
277
- };
278
- };
279
- };
280
- };
281
- };
282
- };
283
- };
284
- } & {
285
- use: any[];
286
- };
287
- path: "/sign-in/social";
288
- };
289
- callbackOAuth: {
290
- <AsResponse extends boolean = false, ReturnHeaders_3 extends boolean = false>(inputCtx_0: {
291
- body?: {
292
- code?: string | undefined;
293
- error?: string | undefined;
294
- device_id?: string | undefined;
295
- error_description?: string | undefined;
296
- state?: string | undefined;
297
- user?: string | undefined;
298
- } | undefined;
299
- } & {
300
- method: "GET" | "POST";
301
- } & {
302
- query?: {
303
- code?: string | undefined;
304
- error?: string | undefined;
305
- device_id?: string | undefined;
306
- error_description?: string | undefined;
307
- state?: string | undefined;
308
- user?: string | undefined;
309
- } | undefined;
310
- } & {
311
- params: {
312
- id: string;
313
- };
314
- } & {
315
- request?: Request;
316
- } & {
317
- headers?: HeadersInit;
318
- } & {
319
- asResponse?: boolean;
320
- returnHeaders?: boolean;
321
- use?: import("better-call").Middleware[];
322
- path?: string;
323
- } & {
324
- asResponse?: AsResponse | undefined;
325
- returnHeaders?: ReturnHeaders_3 | undefined;
326
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_3] extends [true] ? {
327
- headers: Headers;
328
- response: void;
329
- } : void>;
330
- options: {
331
- method: ("GET" | "POST")[];
332
- body: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
333
- code: import("better-auth").ZodOptional<import("better-auth").ZodString>;
334
- error: import("better-auth").ZodOptional<import("better-auth").ZodString>;
335
- device_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
336
- error_description: import("better-auth").ZodOptional<import("better-auth").ZodString>;
337
- state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
338
- user: import("better-auth").ZodOptional<import("better-auth").ZodString>;
339
- }, import("better-auth").$strip>>;
340
- query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
341
- code: import("better-auth").ZodOptional<import("better-auth").ZodString>;
342
- error: import("better-auth").ZodOptional<import("better-auth").ZodString>;
343
- device_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
344
- error_description: import("better-auth").ZodOptional<import("better-auth").ZodString>;
345
- state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
346
- user: import("better-auth").ZodOptional<import("better-auth").ZodString>;
347
- }, import("better-auth").$strip>>;
348
- metadata: {
349
- isAction: false;
350
- };
351
- } & {
352
- use: any[];
353
- };
354
- path: "/callback/:id";
355
- };
356
- getSession: {
357
- <AsResponse extends boolean = false, ReturnHeaders_4 extends boolean = false>(inputCtx_0: {
358
- body?: undefined;
359
- } & {
360
- method?: "GET" | undefined;
361
- } & {
362
- query?: {
363
- disableCookieCache?: unknown;
364
- disableRefresh?: unknown;
365
- } | undefined;
366
- } & {
367
- params?: Record<string, any>;
368
- } & {
369
- request?: Request;
370
- } & {
371
- headers: HeadersInit;
372
- } & {
373
- asResponse?: boolean;
374
- returnHeaders?: boolean;
375
- use?: import("better-call").Middleware[];
376
- path?: string;
377
- } & {
378
- asResponse?: AsResponse | undefined;
379
- returnHeaders?: ReturnHeaders_4 | undefined;
380
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_4] extends [true] ? {
381
- headers: Headers;
382
- response: {
383
- session: {
384
- id: string;
385
- createdAt: Date;
386
- updatedAt: Date;
387
- userId: string;
388
- expiresAt: Date;
389
- token: string;
390
- ipAddress?: string | null | undefined | undefined;
391
- userAgent?: string | null | undefined | undefined;
392
- };
393
- user: {
394
- id: string;
395
- createdAt: Date;
396
- updatedAt: Date;
397
- email: string;
398
- emailVerified: boolean;
399
- name: string;
400
- image?: string | null | undefined | undefined;
401
- };
402
- } | null;
403
- } : {
404
- session: {
405
- id: string;
406
- createdAt: Date;
407
- updatedAt: Date;
408
- userId: string;
409
- expiresAt: Date;
410
- token: string;
411
- ipAddress?: string | null | undefined | undefined;
412
- userAgent?: string | null | undefined | undefined;
413
- };
414
- user: {
415
- id: string;
416
- createdAt: Date;
417
- updatedAt: Date;
418
- email: string;
419
- emailVerified: boolean;
420
- name: string;
421
- image?: string | null | undefined | undefined;
422
- };
423
- } | null>;
424
- options: {
425
- method: "GET";
426
- query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
427
- disableCookieCache: import("better-auth").ZodOptional<import("better-auth").ZodCoercedBoolean<unknown>>;
428
- disableRefresh: import("better-auth").ZodOptional<import("better-auth").ZodCoercedBoolean<unknown>>;
429
- }, import("better-auth").$strip>>;
430
- requireHeaders: true;
431
- metadata: {
432
- openapi: {
433
- description: string;
434
- responses: {
435
- "200": {
436
- description: string;
437
- content: {
438
- "application/json": {
439
- schema: {
440
- type: "object";
441
- properties: {
442
- session: {
443
- $ref: string;
444
- };
445
- user: {
446
- $ref: string;
447
- };
448
- };
449
- required: string[];
450
- };
451
- };
452
- };
453
- };
454
- };
455
- };
456
- };
457
- } & {
458
- use: any[];
459
- };
460
- path: "/get-session";
461
- };
462
- signOut: {
463
- <AsResponse extends boolean = false, ReturnHeaders_5 extends boolean = false>(inputCtx_0: {
464
- body?: undefined;
465
- } & {
466
- method?: "POST" | undefined;
467
- } & {
468
- query?: Record<string, any> | undefined;
469
- } & {
470
- params?: Record<string, any>;
471
- } & {
472
- request?: Request;
473
- } & {
474
- headers: HeadersInit;
475
- } & {
476
- asResponse?: boolean;
477
- returnHeaders?: boolean;
478
- use?: import("better-call").Middleware[];
479
- path?: string;
480
- } & {
481
- asResponse?: AsResponse | undefined;
482
- returnHeaders?: ReturnHeaders_5 | undefined;
483
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_5] extends [true] ? {
484
- headers: Headers;
485
- response: {
486
- success: boolean;
487
- };
488
- } : {
489
- success: boolean;
490
- }>;
491
- options: {
492
- method: "POST";
493
- requireHeaders: true;
494
- metadata: {
495
- openapi: {
496
- description: string;
497
- responses: {
498
- "200": {
499
- description: string;
500
- content: {
501
- "application/json": {
502
- schema: {
503
- type: "object";
504
- properties: {
505
- success: {
506
- type: string;
507
- };
508
- };
509
- };
510
- };
511
- };
512
- };
513
- };
514
- };
515
- };
516
- } & {
517
- use: any[];
518
- };
519
- path: "/sign-out";
520
- };
521
- signUpEmail: {
522
- <AsResponse extends boolean = false, ReturnHeaders_6 extends boolean = false>(inputCtx_0: {
523
- body: {
524
- name: string;
525
- email: string;
526
- password: string;
527
- image?: string;
528
- callbackURL?: string;
529
- rememberMe?: boolean;
530
- };
531
- } & {
532
- method?: "POST" | undefined;
533
- } & {
534
- query?: Record<string, any> | undefined;
535
- } & {
536
- params?: Record<string, any>;
537
- } & {
538
- request?: Request;
539
- } & {
540
- headers?: HeadersInit;
541
- } & {
542
- asResponse?: boolean;
543
- returnHeaders?: boolean;
544
- use?: import("better-call").Middleware[];
545
- path?: string;
546
- } & {
547
- asResponse?: AsResponse | undefined;
548
- returnHeaders?: ReturnHeaders_6 | undefined;
549
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_6] extends [true] ? {
550
- headers: Headers;
551
- response: {
552
- token: null;
553
- user: {
554
- id: string;
555
- email: string;
556
- name: string;
557
- image: string | null | undefined;
558
- emailVerified: boolean;
559
- createdAt: Date;
560
- updatedAt: Date;
561
- };
562
- } | {
563
- token: string;
564
- user: {
565
- id: string;
566
- email: string;
567
- name: string;
568
- image: string | null | undefined;
569
- emailVerified: boolean;
570
- createdAt: Date;
571
- updatedAt: Date;
572
- };
573
- };
574
- } : {
575
- token: null;
576
- user: {
577
- id: string;
578
- email: string;
579
- name: string;
580
- image: string | null | undefined;
581
- emailVerified: boolean;
582
- createdAt: Date;
583
- updatedAt: Date;
584
- };
585
- } | {
586
- token: string;
587
- user: {
588
- id: string;
589
- email: string;
590
- name: string;
591
- image: string | null | undefined;
592
- emailVerified: boolean;
593
- createdAt: Date;
594
- updatedAt: Date;
595
- };
596
- }>;
597
- options: {
598
- method: "POST";
599
- body: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>;
600
- metadata: {
601
- $Infer: {
602
- body: {
603
- name: string;
604
- email: string;
605
- password: string;
606
- image?: string;
607
- callbackURL?: string;
608
- rememberMe?: boolean;
609
- };
610
- };
611
- openapi: {
612
- description: string;
613
- requestBody: {
614
- content: {
615
- "application/json": {
616
- schema: {
617
- type: "object";
618
- properties: {
619
- name: {
620
- type: string;
621
- description: string;
622
- };
623
- email: {
624
- type: string;
625
- description: string;
626
- };
627
- password: {
628
- type: string;
629
- description: string;
630
- };
631
- image: {
632
- type: string;
633
- description: string;
634
- };
635
- callbackURL: {
636
- type: string;
637
- description: string;
638
- };
639
- rememberMe: {
640
- type: string;
641
- description: string;
642
- };
643
- };
644
- required: string[];
645
- };
646
- };
647
- };
648
- };
649
- responses: {
650
- "200": {
651
- description: string;
652
- content: {
653
- "application/json": {
654
- schema: {
655
- type: "object";
656
- properties: {
657
- token: {
658
- type: string;
659
- nullable: boolean;
660
- description: string;
661
- };
662
- user: {
663
- type: string;
664
- properties: {
665
- id: {
666
- type: string;
667
- description: string;
668
- };
669
- email: {
670
- type: string;
671
- format: string;
672
- description: string;
673
- };
674
- name: {
675
- type: string;
676
- description: string;
677
- };
678
- image: {
679
- type: string;
680
- format: string;
681
- nullable: boolean;
682
- description: string;
683
- };
684
- emailVerified: {
685
- type: string;
686
- description: string;
687
- };
688
- createdAt: {
689
- type: string;
690
- format: string;
691
- description: string;
692
- };
693
- updatedAt: {
694
- type: string;
695
- format: string;
696
- description: string;
697
- };
698
- };
699
- required: string[];
700
- };
701
- };
702
- required: string[];
703
- };
704
- };
705
- };
706
- };
707
- };
708
- };
709
- };
710
- } & {
711
- use: any[];
712
- };
713
- path: "/sign-up/email";
714
- };
715
- signInEmail: {
716
- <AsResponse extends boolean = false, ReturnHeaders_7 extends boolean = false>(inputCtx_0: {
717
- body: {
718
- email: string;
719
- password: string;
720
- callbackURL?: string | undefined;
721
- rememberMe?: boolean | undefined;
722
- };
723
- } & {
724
- method?: "POST" | undefined;
725
- } & {
726
- query?: Record<string, any> | undefined;
727
- } & {
728
- params?: Record<string, any>;
729
- } & {
730
- request?: Request;
731
- } & {
732
- headers?: HeadersInit;
733
- } & {
734
- asResponse?: boolean;
735
- returnHeaders?: boolean;
736
- use?: import("better-call").Middleware[];
737
- path?: string;
738
- } & {
739
- asResponse?: AsResponse | undefined;
740
- returnHeaders?: ReturnHeaders_7 | undefined;
741
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_7] extends [true] ? {
742
- headers: Headers;
743
- response: {
744
- redirect: boolean;
745
- token: string;
746
- url: string | undefined;
747
- user: {
748
- id: string;
749
- email: string;
750
- name: string;
751
- image: string | null | undefined;
752
- emailVerified: boolean;
753
- createdAt: Date;
754
- updatedAt: Date;
755
- };
756
- };
757
- } : {
758
- redirect: boolean;
759
- token: string;
760
- url: string | undefined;
761
- user: {
762
- id: string;
763
- email: string;
764
- name: string;
765
- image: string | null | undefined;
766
- emailVerified: boolean;
767
- createdAt: Date;
768
- updatedAt: Date;
769
- };
770
- }>;
771
- options: {
772
- method: "POST";
773
- body: import("better-auth").ZodObject<{
774
- email: import("better-auth").ZodString;
775
- password: import("better-auth").ZodString;
776
- callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
777
- rememberMe: import("better-auth").ZodOptional<import("better-auth").ZodDefault<import("better-auth").ZodBoolean>>;
778
- }, import("better-auth").$strip>;
779
- metadata: {
780
- openapi: {
781
- description: string;
782
- responses: {
783
- "200": {
784
- description: string;
785
- content: {
786
- "application/json": {
787
- schema: {
788
- type: "object";
789
- description: string;
790
- properties: {
791
- redirect: {
792
- type: string;
793
- enum: boolean[];
794
- };
795
- token: {
796
- type: string;
797
- description: string;
798
- };
799
- url: {
800
- type: string;
801
- nullable: boolean;
802
- };
803
- user: {
804
- type: string;
805
- properties: {
806
- id: {
807
- type: string;
808
- };
809
- email: {
810
- type: string;
811
- };
812
- name: {
813
- type: string;
814
- nullable: boolean;
815
- };
816
- image: {
817
- type: string;
818
- nullable: boolean;
819
- };
820
- emailVerified: {
821
- type: string;
822
- };
823
- createdAt: {
824
- type: string;
825
- format: string;
826
- };
827
- updatedAt: {
828
- type: string;
829
- format: string;
830
- };
831
- };
832
- required: string[];
833
- };
834
- };
835
- required: string[];
836
- };
837
- };
838
- };
839
- };
840
- };
841
- };
842
- };
843
- } & {
844
- use: any[];
845
- };
846
- path: "/sign-in/email";
847
- };
848
- forgetPassword: {
849
- <AsResponse extends boolean = false, ReturnHeaders_8 extends boolean = false>(inputCtx_0: {
850
- body: {
851
- email: string;
852
- redirectTo?: string | undefined;
853
- };
854
- } & {
855
- method?: "POST" | undefined;
856
- } & {
857
- query?: Record<string, any> | undefined;
858
- } & {
859
- params?: Record<string, any>;
860
- } & {
861
- request?: Request;
862
- } & {
863
- headers?: HeadersInit;
864
- } & {
865
- asResponse?: boolean;
866
- returnHeaders?: boolean;
867
- use?: import("better-call").Middleware[];
868
- path?: string;
869
- } & {
870
- asResponse?: AsResponse | undefined;
871
- returnHeaders?: ReturnHeaders_8 | undefined;
872
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_8] extends [true] ? {
873
- headers: Headers;
874
- response: {
875
- status: boolean;
876
- };
877
- } : {
878
- status: boolean;
879
- }>;
880
- options: {
881
- method: "POST";
882
- body: import("better-auth").ZodObject<{
883
- email: import("better-auth").ZodString;
884
- redirectTo: import("better-auth").ZodOptional<import("better-auth").ZodString>;
885
- }, import("better-auth").$strip>;
886
- metadata: {
887
- openapi: {
888
- description: string;
889
- responses: {
890
- "200": {
891
- description: string;
892
- content: {
893
- "application/json": {
894
- schema: {
895
- type: "object";
896
- properties: {
897
- status: {
898
- type: string;
899
- };
900
- message: {
901
- type: string;
902
- };
903
- };
904
- };
905
- };
906
- };
907
- };
908
- };
909
- };
910
- };
911
- } & {
912
- use: any[];
913
- };
914
- path: "/forget-password";
915
- };
916
- resetPassword: {
917
- <AsResponse extends boolean = false, ReturnHeaders_9 extends boolean = false>(inputCtx_0: {
918
- body: {
919
- newPassword: string;
920
- token?: string | undefined;
921
- };
922
- } & {
923
- method?: "POST" | undefined;
924
- } & {
925
- query?: {
926
- token?: string | undefined;
927
- } | undefined;
928
- } & {
929
- params?: Record<string, any>;
930
- } & {
931
- request?: Request;
932
- } & {
933
- headers?: HeadersInit;
934
- } & {
935
- asResponse?: boolean;
936
- returnHeaders?: boolean;
937
- use?: import("better-call").Middleware[];
938
- path?: string;
939
- } & {
940
- asResponse?: AsResponse | undefined;
941
- returnHeaders?: ReturnHeaders_9 | undefined;
942
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_9] extends [true] ? {
943
- headers: Headers;
944
- response: {
945
- status: boolean;
946
- };
947
- } : {
948
- status: boolean;
949
- }>;
950
- options: {
951
- method: "POST";
952
- query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
953
- token: import("better-auth").ZodOptional<import("better-auth").ZodString>;
954
- }, import("better-auth").$strip>>;
955
- body: import("better-auth").ZodObject<{
956
- newPassword: import("better-auth").ZodString;
957
- token: import("better-auth").ZodOptional<import("better-auth").ZodString>;
958
- }, import("better-auth").$strip>;
959
- metadata: {
960
- openapi: {
961
- description: string;
962
- responses: {
963
- "200": {
964
- description: string;
965
- content: {
966
- "application/json": {
967
- schema: {
968
- type: "object";
969
- properties: {
970
- status: {
971
- type: string;
972
- };
973
- };
974
- };
975
- };
976
- };
977
- };
978
- };
979
- };
980
- };
981
- } & {
982
- use: any[];
983
- };
984
- path: "/reset-password";
985
- };
986
- verifyEmail: {
987
- <AsResponse extends boolean = false, ReturnHeaders_10 extends boolean = false>(inputCtx_0: {
988
- body?: undefined;
989
- } & {
990
- method?: "GET" | undefined;
991
- } & {
992
- query: {
993
- token: string;
994
- callbackURL?: string | undefined;
995
- };
996
- } & {
997
- params?: Record<string, any>;
998
- } & {
999
- request?: Request;
1000
- } & {
1001
- headers?: HeadersInit;
1002
- } & {
1003
- asResponse?: boolean;
1004
- returnHeaders?: boolean;
1005
- use?: import("better-call").Middleware[];
1006
- path?: string;
1007
- } & {
1008
- asResponse?: AsResponse | undefined;
1009
- returnHeaders?: ReturnHeaders_10 | undefined;
1010
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_10] extends [true] ? {
1011
- headers: Headers;
1012
- response: void | {
1013
- status: boolean;
1014
- user: {
1015
- id: any;
1016
- email: any;
1017
- name: any;
1018
- image: any;
1019
- emailVerified: any;
1020
- createdAt: any;
1021
- updatedAt: any;
1022
- };
1023
- } | {
1024
- status: boolean;
1025
- user: null;
1026
- };
1027
- } : void | {
1028
- status: boolean;
1029
- user: {
1030
- id: any;
1031
- email: any;
1032
- name: any;
1033
- image: any;
1034
- emailVerified: any;
1035
- createdAt: any;
1036
- updatedAt: any;
1037
- };
1038
- } | {
1039
- status: boolean;
1040
- user: null;
1041
- }>;
1042
- options: {
1043
- method: "GET";
1044
- query: import("better-auth").ZodObject<{
1045
- token: import("better-auth").ZodString;
1046
- callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1047
- }, import("better-auth").$strip>;
1048
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
1049
- metadata: {
1050
- openapi: {
1051
- description: string;
1052
- parameters: ({
1053
- name: string;
1054
- in: "query";
1055
- description: string;
1056
- required: true;
1057
- schema: {
1058
- type: "string";
1059
- };
1060
- } | {
1061
- name: string;
1062
- in: "query";
1063
- description: string;
1064
- required: false;
1065
- schema: {
1066
- type: "string";
1067
- };
1068
- })[];
1069
- responses: {
1070
- "200": {
1071
- description: string;
1072
- content: {
1073
- "application/json": {
1074
- schema: {
1075
- type: "object";
1076
- properties: {
1077
- user: {
1078
- type: string;
1079
- properties: {
1080
- id: {
1081
- type: string;
1082
- description: string;
1083
- };
1084
- email: {
1085
- type: string;
1086
- description: string;
1087
- };
1088
- name: {
1089
- type: string;
1090
- description: string;
1091
- };
1092
- image: {
1093
- type: string;
1094
- description: string;
1095
- };
1096
- emailVerified: {
1097
- type: string;
1098
- description: string;
1099
- };
1100
- createdAt: {
1101
- type: string;
1102
- description: string;
1103
- };
1104
- updatedAt: {
1105
- type: string;
1106
- description: string;
1107
- };
1108
- };
1109
- required: string[];
1110
- };
1111
- status: {
1112
- type: string;
1113
- description: string;
1114
- };
1115
- };
1116
- required: string[];
1117
- };
1118
- };
1119
- };
1120
- };
1121
- };
1122
- };
1123
- };
1124
- } & {
1125
- use: any[];
1126
- };
1127
- path: "/verify-email";
1128
- };
1129
- sendVerificationEmail: {
1130
- <AsResponse extends boolean = false, ReturnHeaders_11 extends boolean = false>(inputCtx_0: {
1131
- body: {
1132
- email: string;
1133
- callbackURL?: string | undefined;
1134
- };
1135
- } & {
1136
- method?: "POST" | undefined;
1137
- } & {
1138
- query?: Record<string, any> | undefined;
1139
- } & {
1140
- params?: Record<string, any>;
1141
- } & {
1142
- request?: Request;
1143
- } & {
1144
- headers?: HeadersInit;
1145
- } & {
1146
- asResponse?: boolean;
1147
- returnHeaders?: boolean;
1148
- use?: import("better-call").Middleware[];
1149
- path?: string;
1150
- } & {
1151
- asResponse?: AsResponse | undefined;
1152
- returnHeaders?: ReturnHeaders_11 | undefined;
1153
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_11] extends [true] ? {
1154
- headers: Headers;
1155
- response: {
1156
- status: boolean;
1157
- };
1158
- } : {
1159
- status: boolean;
1160
- }>;
1161
- options: {
1162
- method: "POST";
1163
- body: import("better-auth").ZodObject<{
1164
- email: import("better-auth").ZodEmail;
1165
- callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1166
- }, import("better-auth").$strip>;
1167
- metadata: {
1168
- openapi: {
1169
- description: string;
1170
- requestBody: {
1171
- content: {
1172
- "application/json": {
1173
- schema: {
1174
- type: "object";
1175
- properties: {
1176
- email: {
1177
- type: string;
1178
- description: string;
1179
- example: string;
1180
- };
1181
- callbackURL: {
1182
- type: string;
1183
- description: string;
1184
- example: string;
1185
- nullable: boolean;
1186
- };
1187
- };
1188
- required: string[];
1189
- };
1190
- };
1191
- };
1192
- };
1193
- responses: {
1194
- "200": {
1195
- description: string;
1196
- content: {
1197
- "application/json": {
1198
- schema: {
1199
- type: "object";
1200
- properties: {
1201
- status: {
1202
- type: string;
1203
- description: string;
1204
- example: boolean;
1205
- };
1206
- };
1207
- };
1208
- };
1209
- };
1210
- };
1211
- "400": {
1212
- description: string;
1213
- content: {
1214
- "application/json": {
1215
- schema: {
1216
- type: "object";
1217
- properties: {
1218
- message: {
1219
- type: string;
1220
- description: string;
1221
- example: string;
1222
- };
1223
- };
1224
- };
1225
- };
1226
- };
1227
- };
1228
- };
1229
- };
1230
- };
1231
- } & {
1232
- use: any[];
1233
- };
1234
- path: "/send-verification-email";
1235
- };
1236
- changeEmail: {
1237
- <AsResponse extends boolean = false, ReturnHeaders_12 extends boolean = false>(inputCtx_0: {
1238
- body: {
1239
- newEmail: string;
1240
- callbackURL?: string | undefined;
1241
- };
1242
- } & {
1243
- method?: "POST" | undefined;
1244
- } & {
1245
- query?: Record<string, any> | undefined;
1246
- } & {
1247
- params?: Record<string, any>;
1248
- } & {
1249
- request?: Request;
1250
- } & {
1251
- headers?: HeadersInit;
1252
- } & {
1253
- asResponse?: boolean;
1254
- returnHeaders?: boolean;
1255
- use?: import("better-call").Middleware[];
1256
- path?: string;
1257
- } & {
1258
- asResponse?: AsResponse | undefined;
1259
- returnHeaders?: ReturnHeaders_12 | undefined;
1260
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_12] extends [true] ? {
1261
- headers: Headers;
1262
- response: {
1263
- status: boolean;
1264
- };
1265
- } : {
1266
- status: boolean;
1267
- }>;
1268
- options: {
1269
- method: "POST";
1270
- body: import("better-auth").ZodObject<{
1271
- newEmail: import("better-auth").ZodEmail;
1272
- callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1273
- }, import("better-auth").$strip>;
1274
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1275
- session: {
1276
- session: Record<string, any> & {
1277
- id: string;
1278
- createdAt: Date;
1279
- updatedAt: Date;
1280
- userId: string;
1281
- expiresAt: Date;
1282
- token: string;
1283
- ipAddress?: string | null | undefined;
1284
- userAgent?: string | null | undefined;
1285
- };
1286
- user: Record<string, any> & {
1287
- id: string;
1288
- createdAt: Date;
1289
- updatedAt: Date;
1290
- email: string;
1291
- emailVerified: boolean;
1292
- name: string;
1293
- image?: string | null | undefined;
1294
- };
1295
- };
1296
- }>)[];
1297
- metadata: {
1298
- openapi: {
1299
- responses: {
1300
- "200": {
1301
- description: string;
1302
- content: {
1303
- "application/json": {
1304
- schema: {
1305
- type: "object";
1306
- properties: {
1307
- status: {
1308
- type: string;
1309
- description: string;
1310
- };
1311
- message: {
1312
- type: string;
1313
- enum: string[];
1314
- description: string;
1315
- nullable: boolean;
1316
- };
1317
- };
1318
- required: string[];
1319
- };
1320
- };
1321
- };
1322
- };
1323
- };
1324
- };
1325
- };
1326
- } & {
1327
- use: any[];
1328
- };
1329
- path: "/change-email";
1330
- };
1331
- changePassword: {
1332
- <AsResponse extends boolean = false, ReturnHeaders_13 extends boolean = false>(inputCtx_0: {
1333
- body: {
1334
- newPassword: string;
1335
- currentPassword: string;
1336
- revokeOtherSessions?: boolean | undefined;
1337
- };
1338
- } & {
1339
- method?: "POST" | undefined;
1340
- } & {
1341
- query?: Record<string, any> | undefined;
1342
- } & {
1343
- params?: Record<string, any>;
1344
- } & {
1345
- request?: Request;
1346
- } & {
1347
- headers?: HeadersInit;
1348
- } & {
1349
- asResponse?: boolean;
1350
- returnHeaders?: boolean;
1351
- use?: import("better-call").Middleware[];
1352
- path?: string;
1353
- } & {
1354
- asResponse?: AsResponse | undefined;
1355
- returnHeaders?: ReturnHeaders_13 | undefined;
1356
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_13] extends [true] ? {
1357
- headers: Headers;
1358
- response: {
1359
- token: string | null;
1360
- user: {
1361
- id: string;
1362
- email: string;
1363
- name: string;
1364
- image: string | null | undefined;
1365
- emailVerified: boolean;
1366
- createdAt: Date;
1367
- updatedAt: Date;
1368
- };
1369
- };
1370
- } : {
1371
- token: string | null;
1372
- user: {
1373
- id: string;
1374
- email: string;
1375
- name: string;
1376
- image: string | null | undefined;
1377
- emailVerified: boolean;
1378
- createdAt: Date;
1379
- updatedAt: Date;
1380
- };
1381
- }>;
1382
- options: {
1383
- method: "POST";
1384
- body: import("better-auth").ZodObject<{
1385
- newPassword: import("better-auth").ZodString;
1386
- currentPassword: import("better-auth").ZodString;
1387
- revokeOtherSessions: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
1388
- }, import("better-auth").$strip>;
1389
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1390
- session: {
1391
- session: Record<string, any> & {
1392
- id: string;
1393
- createdAt: Date;
1394
- updatedAt: Date;
1395
- userId: string;
1396
- expiresAt: Date;
1397
- token: string;
1398
- ipAddress?: string | null | undefined;
1399
- userAgent?: string | null | undefined;
1400
- };
1401
- user: Record<string, any> & {
1402
- id: string;
1403
- createdAt: Date;
1404
- updatedAt: Date;
1405
- email: string;
1406
- emailVerified: boolean;
1407
- name: string;
1408
- image?: string | null | undefined;
1409
- };
1410
- };
1411
- }>)[];
1412
- metadata: {
1413
- openapi: {
1414
- description: string;
1415
- responses: {
1416
- "200": {
1417
- description: string;
1418
- content: {
1419
- "application/json": {
1420
- schema: {
1421
- type: "object";
1422
- properties: {
1423
- token: {
1424
- type: string;
1425
- nullable: boolean;
1426
- description: string;
1427
- };
1428
- user: {
1429
- type: string;
1430
- properties: {
1431
- id: {
1432
- type: string;
1433
- description: string;
1434
- };
1435
- email: {
1436
- type: string;
1437
- format: string;
1438
- description: string;
1439
- };
1440
- name: {
1441
- type: string;
1442
- description: string;
1443
- };
1444
- image: {
1445
- type: string;
1446
- format: string;
1447
- nullable: boolean;
1448
- description: string;
1449
- };
1450
- emailVerified: {
1451
- type: string;
1452
- description: string;
1453
- };
1454
- createdAt: {
1455
- type: string;
1456
- format: string;
1457
- description: string;
1458
- };
1459
- updatedAt: {
1460
- type: string;
1461
- format: string;
1462
- description: string;
1463
- };
1464
- };
1465
- required: string[];
1466
- };
1467
- };
1468
- required: string[];
1469
- };
1470
- };
1471
- };
1472
- };
1473
- };
1474
- };
1475
- };
1476
- } & {
1477
- use: any[];
1478
- };
1479
- path: "/change-password";
1480
- };
1481
- setPassword: {
1482
- <AsResponse extends boolean = false, ReturnHeaders_14 extends boolean = false>(inputCtx_0: {
1483
- body: {
1484
- newPassword: string;
1485
- };
1486
- } & {
1487
- method?: "POST" | undefined;
1488
- } & {
1489
- query?: Record<string, any> | undefined;
1490
- } & {
1491
- params?: Record<string, any>;
1492
- } & {
1493
- request?: Request;
1494
- } & {
1495
- headers?: HeadersInit;
1496
- } & {
1497
- asResponse?: boolean;
1498
- returnHeaders?: boolean;
1499
- use?: import("better-call").Middleware[];
1500
- path?: string;
1501
- } & {
1502
- asResponse?: AsResponse | undefined;
1503
- returnHeaders?: ReturnHeaders_14 | undefined;
1504
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_14] extends [true] ? {
1505
- headers: Headers;
1506
- response: {
1507
- status: boolean;
1508
- };
1509
- } : {
1510
- status: boolean;
1511
- }>;
1512
- options: {
1513
- method: "POST";
1514
- body: import("better-auth").ZodObject<{
1515
- newPassword: import("better-auth").ZodString;
1516
- }, import("better-auth").$strip>;
1517
- metadata: {
1518
- SERVER_ONLY: true;
1519
- };
1520
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1521
- session: {
1522
- session: Record<string, any> & {
1523
- id: string;
1524
- createdAt: Date;
1525
- updatedAt: Date;
1526
- userId: string;
1527
- expiresAt: Date;
1528
- token: string;
1529
- ipAddress?: string | null | undefined;
1530
- userAgent?: string | null | undefined;
1531
- };
1532
- user: Record<string, any> & {
1533
- id: string;
1534
- createdAt: Date;
1535
- updatedAt: Date;
1536
- email: string;
1537
- emailVerified: boolean;
1538
- name: string;
1539
- image?: string | null | undefined;
1540
- };
1541
- };
1542
- }>)[];
1543
- } & {
1544
- use: any[];
1545
- };
1546
- path: "/set-password";
1547
- };
1548
- updateUser: {
1549
- <AsResponse extends boolean = false, ReturnHeaders_15 extends boolean = false>(inputCtx_0: {
1550
- body: Partial<{}> & {
1551
- name?: string;
1552
- image?: string;
1553
- };
1554
- } & {
1555
- method?: "POST" | undefined;
1556
- } & {
1557
- query?: Record<string, any> | undefined;
1558
- } & {
1559
- params?: Record<string, any>;
1560
- } & {
1561
- request?: Request;
1562
- } & {
1563
- headers?: HeadersInit;
1564
- } & {
1565
- asResponse?: boolean;
1566
- returnHeaders?: boolean;
1567
- use?: import("better-call").Middleware[];
1568
- path?: string;
1569
- } & {
1570
- asResponse?: AsResponse | undefined;
1571
- returnHeaders?: ReturnHeaders_15 | undefined;
1572
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_15] extends [true] ? {
1573
- headers: Headers;
1574
- response: {
1575
- status: boolean;
1576
- };
1577
- } : {
1578
- status: boolean;
1579
- }>;
1580
- options: {
1581
- method: "POST";
1582
- body: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>;
1583
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1584
- session: {
1585
- session: Record<string, any> & {
1586
- id: string;
1587
- createdAt: Date;
1588
- updatedAt: Date;
1589
- userId: string;
1590
- expiresAt: Date;
1591
- token: string;
1592
- ipAddress?: string | null | undefined;
1593
- userAgent?: string | null | undefined;
1594
- };
1595
- user: Record<string, any> & {
1596
- id: string;
1597
- createdAt: Date;
1598
- updatedAt: Date;
1599
- email: string;
1600
- emailVerified: boolean;
1601
- name: string;
1602
- image?: string | null | undefined;
1603
- };
1604
- };
1605
- }>)[];
1606
- metadata: {
1607
- $Infer: {
1608
- body: Partial<{}> & {
1609
- name?: string;
1610
- image?: string;
1611
- };
1612
- };
1613
- openapi: {
1614
- description: string;
1615
- requestBody: {
1616
- content: {
1617
- "application/json": {
1618
- schema: {
1619
- type: "object";
1620
- properties: {
1621
- name: {
1622
- type: string;
1623
- description: string;
1624
- };
1625
- image: {
1626
- type: string;
1627
- description: string;
1628
- };
1629
- };
1630
- };
1631
- };
1632
- };
1633
- };
1634
- responses: {
1635
- "200": {
1636
- description: string;
1637
- content: {
1638
- "application/json": {
1639
- schema: {
1640
- type: "object";
1641
- properties: {
1642
- status: {
1643
- type: string;
1644
- description: string;
1645
- };
1646
- };
1647
- };
1648
- };
1649
- };
1650
- };
1651
- };
1652
- };
1653
- };
1654
- } & {
1655
- use: any[];
1656
- };
1657
- path: "/update-user";
1658
- };
1659
- deleteUser: {
1660
- <AsResponse extends boolean = false, ReturnHeaders_16 extends boolean = false>(inputCtx_0: {
1661
- body: {
1662
- callbackURL?: string | undefined;
1663
- password?: string | undefined;
1664
- token?: string | undefined;
1665
- };
1666
- } & {
1667
- method?: "POST" | undefined;
1668
- } & {
1669
- query?: Record<string, any> | undefined;
1670
- } & {
1671
- params?: Record<string, any>;
1672
- } & {
1673
- request?: Request;
1674
- } & {
1675
- headers?: HeadersInit;
1676
- } & {
1677
- asResponse?: boolean;
1678
- returnHeaders?: boolean;
1679
- use?: import("better-call").Middleware[];
1680
- path?: string;
1681
- } & {
1682
- asResponse?: AsResponse | undefined;
1683
- returnHeaders?: ReturnHeaders_16 | undefined;
1684
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_16] extends [true] ? {
1685
- headers: Headers;
1686
- response: {
1687
- success: boolean;
1688
- message: string;
1689
- };
1690
- } : {
1691
- success: boolean;
1692
- message: string;
1693
- }>;
1694
- options: {
1695
- method: "POST";
1696
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1697
- session: {
1698
- session: Record<string, any> & {
1699
- id: string;
1700
- createdAt: Date;
1701
- updatedAt: Date;
1702
- userId: string;
1703
- expiresAt: Date;
1704
- token: string;
1705
- ipAddress?: string | null | undefined;
1706
- userAgent?: string | null | undefined;
1707
- };
1708
- user: Record<string, any> & {
1709
- id: string;
1710
- createdAt: Date;
1711
- updatedAt: Date;
1712
- email: string;
1713
- emailVerified: boolean;
1714
- name: string;
1715
- image?: string | null | undefined;
1716
- };
1717
- };
1718
- }>)[];
1719
- body: import("better-auth").ZodObject<{
1720
- callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1721
- password: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1722
- token: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1723
- }, import("better-auth").$strip>;
1724
- metadata: {
1725
- openapi: {
1726
- description: string;
1727
- responses: {
1728
- "200": {
1729
- description: string;
1730
- content: {
1731
- "application/json": {
1732
- schema: {
1733
- type: "object";
1734
- properties: {
1735
- success: {
1736
- type: string;
1737
- description: string;
1738
- };
1739
- message: {
1740
- type: string;
1741
- enum: string[];
1742
- description: string;
1743
- };
1744
- };
1745
- required: string[];
1746
- };
1747
- };
1748
- };
1749
- };
1750
- };
1751
- };
1752
- };
1753
- } & {
1754
- use: any[];
1755
- };
1756
- path: "/delete-user";
1757
- };
1758
- forgetPasswordCallback: {
1759
- <AsResponse extends boolean = false, ReturnHeaders_17 extends boolean = false>(inputCtx_0: {
1760
- body?: undefined;
1761
- } & {
1762
- method?: "GET" | undefined;
1763
- } & {
1764
- query: {
1765
- callbackURL: string;
1766
- };
1767
- } & {
1768
- params: {
1769
- token: string;
1770
- };
1771
- } & {
1772
- request?: Request;
1773
- } & {
1774
- headers?: HeadersInit;
1775
- } & {
1776
- asResponse?: boolean;
1777
- returnHeaders?: boolean;
1778
- use?: import("better-call").Middleware[];
1779
- path?: string;
1780
- } & {
1781
- asResponse?: AsResponse | undefined;
1782
- returnHeaders?: ReturnHeaders_17 | undefined;
1783
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_17] extends [true] ? {
1784
- headers: Headers;
1785
- response: never;
1786
- } : never>;
1787
- options: {
1788
- method: "GET";
1789
- query: import("better-auth").ZodObject<{
1790
- callbackURL: import("better-auth").ZodString;
1791
- }, import("better-auth").$strip>;
1792
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
1793
- metadata: {
1794
- openapi: {
1795
- description: string;
1796
- responses: {
1797
- "200": {
1798
- description: string;
1799
- content: {
1800
- "application/json": {
1801
- schema: {
1802
- type: "object";
1803
- properties: {
1804
- token: {
1805
- type: string;
1806
- };
1807
- };
1808
- };
1809
- };
1810
- };
1811
- };
1812
- };
1813
- };
1814
- };
1815
- } & {
1816
- use: any[];
1817
- };
1818
- path: "/reset-password/:token";
1819
- };
1820
- requestPasswordReset: {
1821
- <AsResponse extends boolean = false, ReturnHeaders_18 extends boolean = false>(inputCtx_0: {
1822
- body: {
1823
- email: string;
1824
- redirectTo?: string | undefined;
1825
- };
1826
- } & {
1827
- method?: "POST" | undefined;
1828
- } & {
1829
- query?: Record<string, any> | undefined;
1830
- } & {
1831
- params?: Record<string, any>;
1832
- } & {
1833
- request?: Request;
1834
- } & {
1835
- headers?: HeadersInit;
1836
- } & {
1837
- asResponse?: boolean;
1838
- returnHeaders?: boolean;
1839
- use?: import("better-call").Middleware[];
1840
- path?: string;
1841
- } & {
1842
- asResponse?: AsResponse | undefined;
1843
- returnHeaders?: ReturnHeaders_18 | undefined;
1844
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_18] extends [true] ? {
1845
- headers: Headers;
1846
- response: {
1847
- status: boolean;
1848
- };
1849
- } : {
1850
- status: boolean;
1851
- }>;
1852
- options: {
1853
- method: "POST";
1854
- body: import("better-auth").ZodObject<{
1855
- email: import("better-auth").ZodEmail;
1856
- redirectTo: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1857
- }, import("better-auth").$strip>;
1858
- metadata: {
1859
- openapi: {
1860
- description: string;
1861
- responses: {
1862
- "200": {
1863
- description: string;
1864
- content: {
1865
- "application/json": {
1866
- schema: {
1867
- type: "object";
1868
- properties: {
1869
- status: {
1870
- type: string;
1871
- };
1872
- message: {
1873
- type: string;
1874
- };
1875
- };
1876
- };
1877
- };
1878
- };
1879
- };
1880
- };
1881
- };
1882
- };
1883
- } & {
1884
- use: any[];
1885
- };
1886
- path: "/request-password-reset";
1887
- };
1888
- requestPasswordResetCallback: {
1889
- <AsResponse extends boolean = false, ReturnHeaders_19 extends boolean = false>(inputCtx_0: {
1890
- body?: undefined;
1891
- } & {
1892
- method?: "GET" | undefined;
1893
- } & {
1894
- query: {
1895
- callbackURL: string;
1896
- };
1897
- } & {
1898
- params: {
1899
- token: string;
1900
- };
1901
- } & {
1902
- request?: Request;
1903
- } & {
1904
- headers?: HeadersInit;
1905
- } & {
1906
- asResponse?: boolean;
1907
- returnHeaders?: boolean;
1908
- use?: import("better-call").Middleware[];
1909
- path?: string;
1910
- } & {
1911
- asResponse?: AsResponse | undefined;
1912
- returnHeaders?: ReturnHeaders_19 | undefined;
1913
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_19] extends [true] ? {
1914
- headers: Headers;
1915
- response: never;
1916
- } : never>;
1917
- options: {
1918
- method: "GET";
1919
- query: import("better-auth").ZodObject<{
1920
- callbackURL: import("better-auth").ZodString;
1921
- }, import("better-auth").$strip>;
1922
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
1923
- metadata: {
1924
- openapi: {
1925
- description: string;
1926
- responses: {
1927
- "200": {
1928
- description: string;
1929
- content: {
1930
- "application/json": {
1931
- schema: {
1932
- type: "object";
1933
- properties: {
1934
- token: {
1935
- type: string;
1936
- };
1937
- };
1938
- };
1939
- };
1940
- };
1941
- };
1942
- };
1943
- };
1944
- };
1945
- } & {
1946
- use: any[];
1947
- };
1948
- path: "/reset-password/:token";
1949
- };
1950
- listSessions: {
1951
- <AsResponse extends boolean = false, ReturnHeaders_20 extends boolean = false>(inputCtx_0: {
1952
- body?: undefined;
1953
- } & {
1954
- method?: "GET" | undefined;
1955
- } & {
1956
- query?: Record<string, any> | undefined;
1957
- } & {
1958
- params?: Record<string, any>;
1959
- } & {
1960
- request?: Request;
1961
- } & {
1962
- headers: HeadersInit;
1963
- } & {
1964
- asResponse?: boolean;
1965
- returnHeaders?: boolean;
1966
- use?: import("better-call").Middleware[];
1967
- path?: string;
1968
- } & {
1969
- asResponse?: AsResponse | undefined;
1970
- returnHeaders?: ReturnHeaders_20 | undefined;
1971
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_20] extends [true] ? {
1972
- headers: Headers;
1973
- response: import("better-auth").Prettify<{
1974
- id: string;
1975
- createdAt: Date;
1976
- updatedAt: Date;
1977
- userId: string;
1978
- expiresAt: Date;
1979
- token: string;
1980
- ipAddress?: string | null | undefined | undefined;
1981
- userAgent?: string | null | undefined | undefined;
1982
- }>[];
1983
- } : import("better-auth").Prettify<{
1984
- id: string;
1985
- createdAt: Date;
1986
- updatedAt: Date;
1987
- userId: string;
1988
- expiresAt: Date;
1989
- token: string;
1990
- ipAddress?: string | null | undefined | undefined;
1991
- userAgent?: string | null | undefined | undefined;
1992
- }>[]>;
1993
- options: {
1994
- method: "GET";
1995
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1996
- session: {
1997
- session: Record<string, any> & {
1998
- id: string;
1999
- createdAt: Date;
2000
- updatedAt: Date;
2001
- userId: string;
2002
- expiresAt: Date;
2003
- token: string;
2004
- ipAddress?: string | null | undefined;
2005
- userAgent?: string | null | undefined;
2006
- };
2007
- user: Record<string, any> & {
2008
- id: string;
2009
- createdAt: Date;
2010
- updatedAt: Date;
2011
- email: string;
2012
- emailVerified: boolean;
2013
- name: string;
2014
- image?: string | null | undefined;
2015
- };
2016
- };
2017
- }>)[];
2018
- requireHeaders: true;
2019
- metadata: {
2020
- openapi: {
2021
- description: string;
2022
- responses: {
2023
- "200": {
2024
- description: string;
2025
- content: {
2026
- "application/json": {
2027
- schema: {
2028
- type: "array";
2029
- items: {
2030
- $ref: string;
2031
- };
2032
- };
2033
- };
2034
- };
2035
- };
2036
- };
2037
- };
2038
- };
2039
- } & {
2040
- use: any[];
2041
- };
2042
- path: "/list-sessions";
2043
- };
2044
- revokeSession: {
2045
- <AsResponse extends boolean = false, ReturnHeaders_21 extends boolean = false>(inputCtx_0: {
2046
- body: {
2047
- token: string;
2048
- };
2049
- } & {
2050
- method?: "POST" | undefined;
2051
- } & {
2052
- query?: Record<string, any> | undefined;
2053
- } & {
2054
- params?: Record<string, any>;
2055
- } & {
2056
- request?: Request;
2057
- } & {
2058
- headers: HeadersInit;
2059
- } & {
2060
- asResponse?: boolean;
2061
- returnHeaders?: boolean;
2062
- use?: import("better-call").Middleware[];
2063
- path?: string;
2064
- } & {
2065
- asResponse?: AsResponse | undefined;
2066
- returnHeaders?: ReturnHeaders_21 | undefined;
2067
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_21] extends [true] ? {
2068
- headers: Headers;
2069
- response: {
2070
- status: boolean;
2071
- };
2072
- } : {
2073
- status: boolean;
2074
- }>;
2075
- options: {
2076
- method: "POST";
2077
- body: import("better-auth").ZodObject<{
2078
- token: import("better-auth").ZodString;
2079
- }, import("better-auth").$strip>;
2080
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2081
- session: {
2082
- session: Record<string, any> & {
2083
- id: string;
2084
- createdAt: Date;
2085
- updatedAt: Date;
2086
- userId: string;
2087
- expiresAt: Date;
2088
- token: string;
2089
- ipAddress?: string | null | undefined;
2090
- userAgent?: string | null | undefined;
2091
- };
2092
- user: Record<string, any> & {
2093
- id: string;
2094
- createdAt: Date;
2095
- updatedAt: Date;
2096
- email: string;
2097
- emailVerified: boolean;
2098
- name: string;
2099
- image?: string | null | undefined;
2100
- };
2101
- };
2102
- }>)[];
2103
- requireHeaders: true;
2104
- metadata: {
2105
- openapi: {
2106
- description: string;
2107
- requestBody: {
2108
- content: {
2109
- "application/json": {
2110
- schema: {
2111
- type: "object";
2112
- properties: {
2113
- token: {
2114
- type: string;
2115
- description: string;
2116
- };
2117
- };
2118
- required: string[];
2119
- };
2120
- };
2121
- };
2122
- };
2123
- responses: {
2124
- "200": {
2125
- description: string;
2126
- content: {
2127
- "application/json": {
2128
- schema: {
2129
- type: "object";
2130
- properties: {
2131
- status: {
2132
- type: string;
2133
- description: string;
2134
- };
2135
- };
2136
- required: string[];
2137
- };
2138
- };
2139
- };
2140
- };
2141
- };
2142
- };
2143
- };
2144
- } & {
2145
- use: any[];
2146
- };
2147
- path: "/revoke-session";
2148
- };
2149
- revokeSessions: {
2150
- <AsResponse extends boolean = false, ReturnHeaders_22 extends boolean = false>(inputCtx_0: {
2151
- body?: undefined;
2152
- } & {
2153
- method?: "POST" | undefined;
2154
- } & {
2155
- query?: Record<string, any> | undefined;
2156
- } & {
2157
- params?: Record<string, any>;
2158
- } & {
2159
- request?: Request;
2160
- } & {
2161
- headers: HeadersInit;
2162
- } & {
2163
- asResponse?: boolean;
2164
- returnHeaders?: boolean;
2165
- use?: import("better-call").Middleware[];
2166
- path?: string;
2167
- } & {
2168
- asResponse?: AsResponse | undefined;
2169
- returnHeaders?: ReturnHeaders_22 | undefined;
2170
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_22] extends [true] ? {
2171
- headers: Headers;
2172
- response: {
2173
- status: boolean;
2174
- };
2175
- } : {
2176
- status: boolean;
2177
- }>;
2178
- options: {
2179
- method: "POST";
2180
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2181
- session: {
2182
- session: Record<string, any> & {
2183
- id: string;
2184
- createdAt: Date;
2185
- updatedAt: Date;
2186
- userId: string;
2187
- expiresAt: Date;
2188
- token: string;
2189
- ipAddress?: string | null | undefined;
2190
- userAgent?: string | null | undefined;
2191
- };
2192
- user: Record<string, any> & {
2193
- id: string;
2194
- createdAt: Date;
2195
- updatedAt: Date;
2196
- email: string;
2197
- emailVerified: boolean;
2198
- name: string;
2199
- image?: string | null | undefined;
2200
- };
2201
- };
2202
- }>)[];
2203
- requireHeaders: true;
2204
- metadata: {
2205
- openapi: {
2206
- description: string;
2207
- responses: {
2208
- "200": {
2209
- description: string;
2210
- content: {
2211
- "application/json": {
2212
- schema: {
2213
- type: "object";
2214
- properties: {
2215
- status: {
2216
- type: string;
2217
- description: string;
2218
- };
2219
- };
2220
- required: string[];
2221
- };
2222
- };
2223
- };
2224
- };
2225
- };
2226
- };
2227
- };
2228
- } & {
2229
- use: any[];
2230
- };
2231
- path: "/revoke-sessions";
2232
- };
2233
- revokeOtherSessions: {
2234
- <AsResponse extends boolean = false, ReturnHeaders_23 extends boolean = false>(inputCtx_0: {
2235
- body?: undefined;
2236
- } & {
2237
- method?: "POST" | undefined;
2238
- } & {
2239
- query?: Record<string, any> | undefined;
2240
- } & {
2241
- params?: Record<string, any>;
2242
- } & {
2243
- request?: Request;
2244
- } & {
2245
- headers: HeadersInit;
2246
- } & {
2247
- asResponse?: boolean;
2248
- returnHeaders?: boolean;
2249
- use?: import("better-call").Middleware[];
2250
- path?: string;
2251
- } & {
2252
- asResponse?: AsResponse | undefined;
2253
- returnHeaders?: ReturnHeaders_23 | undefined;
2254
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_23] extends [true] ? {
2255
- headers: Headers;
2256
- response: {
2257
- status: boolean;
2258
- };
2259
- } : {
2260
- status: boolean;
2261
- }>;
2262
- options: {
2263
- method: "POST";
2264
- requireHeaders: true;
2265
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2266
- session: {
2267
- session: Record<string, any> & {
2268
- id: string;
2269
- createdAt: Date;
2270
- updatedAt: Date;
2271
- userId: string;
2272
- expiresAt: Date;
2273
- token: string;
2274
- ipAddress?: string | null | undefined;
2275
- userAgent?: string | null | undefined;
2276
- };
2277
- user: Record<string, any> & {
2278
- id: string;
2279
- createdAt: Date;
2280
- updatedAt: Date;
2281
- email: string;
2282
- emailVerified: boolean;
2283
- name: string;
2284
- image?: string | null | undefined;
2285
- };
2286
- };
2287
- }>)[];
2288
- metadata: {
2289
- openapi: {
2290
- description: string;
2291
- responses: {
2292
- "200": {
2293
- description: string;
2294
- content: {
2295
- "application/json": {
2296
- schema: {
2297
- type: "object";
2298
- properties: {
2299
- status: {
2300
- type: string;
2301
- description: string;
2302
- };
2303
- };
2304
- required: string[];
2305
- };
2306
- };
2307
- };
2308
- };
2309
- };
2310
- };
2311
- };
2312
- } & {
2313
- use: any[];
2314
- };
2315
- path: "/revoke-other-sessions";
2316
- };
2317
- linkSocialAccount: {
2318
- <AsResponse extends boolean = false, ReturnHeaders_24 extends boolean = false>(inputCtx_0: {
2319
- body: {
2320
- provider: unknown;
2321
- callbackURL?: string | undefined;
2322
- idToken?: {
2323
- token: string;
2324
- nonce?: string | undefined;
2325
- accessToken?: string | undefined;
2326
- refreshToken?: string | undefined;
2327
- scopes?: string[] | undefined;
2328
- } | undefined;
2329
- requestSignUp?: boolean | undefined;
2330
- scopes?: string[] | undefined;
2331
- errorCallbackURL?: string | undefined;
2332
- disableRedirect?: boolean | undefined;
2333
- };
2334
- } & {
2335
- method?: "POST" | undefined;
2336
- } & {
2337
- query?: Record<string, any> | undefined;
2338
- } & {
2339
- params?: Record<string, any>;
2340
- } & {
2341
- request?: Request;
2342
- } & {
2343
- headers: HeadersInit;
2344
- } & {
2345
- asResponse?: boolean;
2346
- returnHeaders?: boolean;
2347
- use?: import("better-call").Middleware[];
2348
- path?: string;
2349
- } & {
2350
- asResponse?: AsResponse | undefined;
2351
- returnHeaders?: ReturnHeaders_24 | undefined;
2352
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_24] extends [true] ? {
2353
- headers: Headers;
2354
- response: {
2355
- url: string;
2356
- redirect: boolean;
2357
- };
2358
- } : {
2359
- url: string;
2360
- redirect: boolean;
2361
- }>;
2362
- options: {
2363
- method: "POST";
2364
- requireHeaders: true;
2365
- body: import("better-auth").ZodObject<{
2366
- callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2367
- provider: import("better-auth").ZodType<"apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "github" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paypal" | (string & {}), unknown, import("better-auth").$ZodTypeInternals<"apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "github" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paypal" | (string & {}), unknown>>;
2368
- idToken: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
2369
- token: import("better-auth").ZodString;
2370
- nonce: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2371
- accessToken: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2372
- refreshToken: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2373
- scopes: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
2374
- }, import("better-auth").$strip>>;
2375
- requestSignUp: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2376
- scopes: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
2377
- errorCallbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2378
- disableRedirect: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2379
- }, import("better-auth").$strip>;
2380
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2381
- session: {
2382
- session: Record<string, any> & {
2383
- id: string;
2384
- createdAt: Date;
2385
- updatedAt: Date;
2386
- userId: string;
2387
- expiresAt: Date;
2388
- token: string;
2389
- ipAddress?: string | null | undefined;
2390
- userAgent?: string | null | undefined;
2391
- };
2392
- user: Record<string, any> & {
2393
- id: string;
2394
- createdAt: Date;
2395
- updatedAt: Date;
2396
- email: string;
2397
- emailVerified: boolean;
2398
- name: string;
2399
- image?: string | null | undefined;
2400
- };
2401
- };
2402
- }>)[];
2403
- metadata: {
2404
- openapi: {
2405
- description: string;
2406
- responses: {
2407
- "200": {
2408
- description: string;
2409
- content: {
2410
- "application/json": {
2411
- schema: {
2412
- type: "object";
2413
- properties: {
2414
- url: {
2415
- type: string;
2416
- description: string;
2417
- };
2418
- redirect: {
2419
- type: string;
2420
- description: string;
2421
- };
2422
- status: {
2423
- type: string;
2424
- };
2425
- };
2426
- required: string[];
2427
- };
2428
- };
2429
- };
2430
- };
2431
- };
2432
- };
2433
- };
2434
- } & {
2435
- use: any[];
2436
- };
2437
- path: "/link-social";
2438
- };
2439
- listUserAccounts: {
2440
- <AsResponse extends boolean = false, ReturnHeaders_25 extends boolean = false>(inputCtx_0?: ({
2441
- body?: undefined;
2442
- } & {
2443
- method?: "GET" | undefined;
2444
- } & {
2445
- query?: Record<string, any> | undefined;
2446
- } & {
2447
- params?: Record<string, any>;
2448
- } & {
2449
- request?: Request;
2450
- } & {
2451
- headers?: HeadersInit;
2452
- } & {
2453
- asResponse?: boolean;
2454
- returnHeaders?: boolean;
2455
- use?: import("better-call").Middleware[];
2456
- path?: string;
2457
- } & {
2458
- asResponse?: AsResponse | undefined;
2459
- returnHeaders?: ReturnHeaders_25 | undefined;
2460
- }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_25] extends [true] ? {
2461
- headers: Headers;
2462
- response: {
2463
- id: string;
2464
- providerId: string;
2465
- createdAt: Date;
2466
- updatedAt: Date;
2467
- accountId: string;
2468
- scopes: string[];
2469
- }[];
2470
- } : {
2471
- id: string;
2472
- providerId: string;
2473
- createdAt: Date;
2474
- updatedAt: Date;
2475
- accountId: string;
2476
- scopes: string[];
2477
- }[]>;
2478
- options: {
2479
- method: "GET";
2480
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2481
- session: {
2482
- session: Record<string, any> & {
2483
- id: string;
2484
- createdAt: Date;
2485
- updatedAt: Date;
2486
- userId: string;
2487
- expiresAt: Date;
2488
- token: string;
2489
- ipAddress?: string | null | undefined;
2490
- userAgent?: string | null | undefined;
2491
- };
2492
- user: Record<string, any> & {
2493
- id: string;
2494
- createdAt: Date;
2495
- updatedAt: Date;
2496
- email: string;
2497
- emailVerified: boolean;
2498
- name: string;
2499
- image?: string | null | undefined;
2500
- };
2501
- };
2502
- }>)[];
2503
- metadata: {
2504
- openapi: {
2505
- description: string;
2506
- responses: {
2507
- "200": {
2508
- description: string;
2509
- content: {
2510
- "application/json": {
2511
- schema: {
2512
- type: "array";
2513
- items: {
2514
- type: string;
2515
- properties: {
2516
- id: {
2517
- type: string;
2518
- };
2519
- providerId: {
2520
- type: string;
2521
- };
2522
- createdAt: {
2523
- type: string;
2524
- format: string;
2525
- };
2526
- updatedAt: {
2527
- type: string;
2528
- format: string;
2529
- };
2530
- accountId: {
2531
- type: string;
2532
- };
2533
- scopes: {
2534
- type: string;
2535
- items: {
2536
- type: string;
2537
- };
2538
- };
2539
- };
2540
- required: string[];
2541
- };
2542
- };
2543
- };
2544
- };
2545
- };
2546
- };
2547
- };
2548
- };
2549
- } & {
2550
- use: any[];
2551
- };
2552
- path: "/list-accounts";
2553
- };
2554
- deleteUserCallback: {
2555
- <AsResponse extends boolean = false, ReturnHeaders_26 extends boolean = false>(inputCtx_0: {
2556
- body?: undefined;
2557
- } & {
2558
- method?: "GET" | undefined;
2559
- } & {
2560
- query: {
2561
- token: string;
2562
- callbackURL?: string | undefined;
2563
- };
2564
- } & {
2565
- params?: Record<string, any>;
2566
- } & {
2567
- request?: Request;
2568
- } & {
2569
- headers?: HeadersInit;
2570
- } & {
2571
- asResponse?: boolean;
2572
- returnHeaders?: boolean;
2573
- use?: import("better-call").Middleware[];
2574
- path?: string;
2575
- } & {
2576
- asResponse?: AsResponse | undefined;
2577
- returnHeaders?: ReturnHeaders_26 | undefined;
2578
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_26] extends [true] ? {
2579
- headers: Headers;
2580
- response: {
2581
- success: boolean;
2582
- message: string;
2583
- };
2584
- } : {
2585
- success: boolean;
2586
- message: string;
2587
- }>;
2588
- options: {
2589
- method: "GET";
2590
- query: import("better-auth").ZodObject<{
2591
- token: import("better-auth").ZodString;
2592
- callbackURL: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2593
- }, import("better-auth").$strip>;
2594
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
2595
- metadata: {
2596
- openapi: {
2597
- description: string;
2598
- responses: {
2599
- "200": {
2600
- description: string;
2601
- content: {
2602
- "application/json": {
2603
- schema: {
2604
- type: "object";
2605
- properties: {
2606
- success: {
2607
- type: string;
2608
- description: string;
2609
- };
2610
- message: {
2611
- type: string;
2612
- enum: string[];
2613
- description: string;
2614
- };
2615
- };
2616
- required: string[];
2617
- };
2618
- };
2619
- };
2620
- };
2621
- };
2622
- };
2623
- };
2624
- } & {
2625
- use: any[];
2626
- };
2627
- path: "/delete-user/callback";
2628
- };
2629
- unlinkAccount: {
2630
- <AsResponse extends boolean = false, ReturnHeaders_27 extends boolean = false>(inputCtx_0: {
2631
- body: {
2632
- providerId: string;
2633
- accountId?: string | undefined;
2634
- };
2635
- } & {
2636
- method?: "POST" | undefined;
2637
- } & {
2638
- query?: Record<string, any> | undefined;
2639
- } & {
2640
- params?: Record<string, any>;
2641
- } & {
2642
- request?: Request;
2643
- } & {
2644
- headers?: HeadersInit;
2645
- } & {
2646
- asResponse?: boolean;
2647
- returnHeaders?: boolean;
2648
- use?: import("better-call").Middleware[];
2649
- path?: string;
2650
- } & {
2651
- asResponse?: AsResponse | undefined;
2652
- returnHeaders?: ReturnHeaders_27 | undefined;
2653
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_27] extends [true] ? {
2654
- headers: Headers;
2655
- response: {
2656
- status: boolean;
2657
- };
2658
- } : {
2659
- status: boolean;
2660
- }>;
2661
- options: {
2662
- method: "POST";
2663
- body: import("better-auth").ZodObject<{
2664
- providerId: import("better-auth").ZodString;
2665
- accountId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2666
- }, import("better-auth").$strip>;
2667
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2668
- session: {
2669
- session: Record<string, any> & {
2670
- id: string;
2671
- createdAt: Date;
2672
- updatedAt: Date;
2673
- userId: string;
2674
- expiresAt: Date;
2675
- token: string;
2676
- ipAddress?: string | null | undefined;
2677
- userAgent?: string | null | undefined;
2678
- };
2679
- user: Record<string, any> & {
2680
- id: string;
2681
- createdAt: Date;
2682
- updatedAt: Date;
2683
- email: string;
2684
- emailVerified: boolean;
2685
- name: string;
2686
- image?: string | null | undefined;
2687
- };
2688
- };
2689
- }>)[];
2690
- metadata: {
2691
- openapi: {
2692
- description: string;
2693
- responses: {
2694
- "200": {
2695
- description: string;
2696
- content: {
2697
- "application/json": {
2698
- schema: {
2699
- type: "object";
2700
- properties: {
2701
- status: {
2702
- type: string;
2703
- };
2704
- };
2705
- };
2706
- };
2707
- };
2708
- };
2709
- };
2710
- };
2711
- };
2712
- } & {
2713
- use: any[];
2714
- };
2715
- path: "/unlink-account";
2716
- };
2717
- refreshToken: {
2718
- <AsResponse extends boolean = false, ReturnHeaders_28 extends boolean = false>(inputCtx_0: {
2719
- body: {
2720
- providerId: string;
2721
- accountId?: string | undefined;
2722
- userId?: string | undefined;
2723
- };
2724
- } & {
2725
- method?: "POST" | undefined;
2726
- } & {
2727
- query?: Record<string, any> | undefined;
2728
- } & {
2729
- params?: Record<string, any>;
2730
- } & {
2731
- request?: Request;
2732
- } & {
2733
- headers?: HeadersInit;
2734
- } & {
2735
- asResponse?: boolean;
2736
- returnHeaders?: boolean;
2737
- use?: import("better-call").Middleware[];
2738
- path?: string;
2739
- } & {
2740
- asResponse?: AsResponse | undefined;
2741
- returnHeaders?: ReturnHeaders_28 | undefined;
2742
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_28] extends [true] ? {
2743
- headers: Headers;
2744
- response: import("better-auth").OAuth2Tokens;
2745
- } : import("better-auth").OAuth2Tokens>;
2746
- options: {
2747
- method: "POST";
2748
- body: import("better-auth").ZodObject<{
2749
- providerId: import("better-auth").ZodString;
2750
- accountId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2751
- userId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2752
- }, import("better-auth").$strip>;
2753
- metadata: {
2754
- openapi: {
2755
- description: string;
2756
- responses: {
2757
- 200: {
2758
- description: string;
2759
- content: {
2760
- "application/json": {
2761
- schema: {
2762
- type: "object";
2763
- properties: {
2764
- tokenType: {
2765
- type: string;
2766
- };
2767
- idToken: {
2768
- type: string;
2769
- };
2770
- accessToken: {
2771
- type: string;
2772
- };
2773
- refreshToken: {
2774
- type: string;
2775
- };
2776
- accessTokenExpiresAt: {
2777
- type: string;
2778
- format: string;
2779
- };
2780
- refreshTokenExpiresAt: {
2781
- type: string;
2782
- format: string;
2783
- };
2784
- };
2785
- };
2786
- };
2787
- };
2788
- };
2789
- 400: {
2790
- description: string;
2791
- };
2792
- };
2793
- };
2794
- };
2795
- } & {
2796
- use: any[];
2797
- };
2798
- path: "/refresh-token";
2799
- };
2800
- getAccessToken: {
2801
- <AsResponse extends boolean = false, ReturnHeaders_29 extends boolean = false>(inputCtx_0: {
2802
- body: {
2803
- providerId: string;
2804
- accountId?: string | undefined;
2805
- userId?: string | undefined;
2806
- };
2807
- } & {
2808
- method?: "POST" | undefined;
2809
- } & {
2810
- query?: Record<string, any> | undefined;
2811
- } & {
2812
- params?: Record<string, any>;
2813
- } & {
2814
- request?: Request;
2815
- } & {
2816
- headers?: HeadersInit;
2817
- } & {
2818
- asResponse?: boolean;
2819
- returnHeaders?: boolean;
2820
- use?: import("better-call").Middleware[];
2821
- path?: string;
2822
- } & {
2823
- asResponse?: AsResponse | undefined;
2824
- returnHeaders?: ReturnHeaders_29 | undefined;
2825
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_29] extends [true] ? {
2826
- headers: Headers;
2827
- response: {
2828
- accessToken: string;
2829
- accessTokenExpiresAt: Date | undefined;
2830
- scopes: string[];
2831
- idToken: string | undefined;
2832
- };
2833
- } : {
2834
- accessToken: string;
2835
- accessTokenExpiresAt: Date | undefined;
2836
- scopes: string[];
2837
- idToken: string | undefined;
2838
- }>;
2839
- options: {
2840
- method: "POST";
2841
- body: import("better-auth").ZodObject<{
2842
- providerId: import("better-auth").ZodString;
2843
- accountId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2844
- userId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2845
- }, import("better-auth").$strip>;
2846
- metadata: {
2847
- openapi: {
2848
- description: string;
2849
- responses: {
2850
- 200: {
2851
- description: string;
2852
- content: {
2853
- "application/json": {
2854
- schema: {
2855
- type: "object";
2856
- properties: {
2857
- tokenType: {
2858
- type: string;
2859
- };
2860
- idToken: {
2861
- type: string;
2862
- };
2863
- accessToken: {
2864
- type: string;
2865
- };
2866
- refreshToken: {
2867
- type: string;
2868
- };
2869
- accessTokenExpiresAt: {
2870
- type: string;
2871
- format: string;
2872
- };
2873
- refreshTokenExpiresAt: {
2874
- type: string;
2875
- format: string;
2876
- };
2877
- };
2878
- };
2879
- };
2880
- };
2881
- };
2882
- 400: {
2883
- description: string;
2884
- };
2885
- };
2886
- };
2887
- };
2888
- } & {
2889
- use: any[];
2890
- };
2891
- path: "/get-access-token";
2892
- };
2893
- accountInfo: {
2894
- <AsResponse extends boolean = false, ReturnHeaders_30 extends boolean = false>(inputCtx_0: {
2895
- body: {
2896
- accountId: string;
2897
- };
2898
- } & {
2899
- method?: "POST" | undefined;
2900
- } & {
2901
- query?: Record<string, any> | undefined;
2902
- } & {
2903
- params?: Record<string, any>;
2904
- } & {
2905
- request?: Request;
2906
- } & {
2907
- headers?: HeadersInit;
2908
- } & {
2909
- asResponse?: boolean;
2910
- returnHeaders?: boolean;
2911
- use?: import("better-call").Middleware[];
2912
- path?: string;
2913
- } & {
2914
- asResponse?: AsResponse | undefined;
2915
- returnHeaders?: ReturnHeaders_30 | undefined;
2916
- }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders_30] extends [true] ? {
2917
- headers: Headers;
2918
- response: {
2919
- user: import("better-auth").OAuth2UserInfo;
2920
- data: Record<string, any>;
2921
- } | null;
2922
- } : {
2923
- user: import("better-auth").OAuth2UserInfo;
2924
- data: Record<string, any>;
2925
- } | null>;
2926
- options: {
2927
- method: "POST";
2928
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
2929
- session: {
2930
- session: Record<string, any> & {
2931
- id: string;
2932
- createdAt: Date;
2933
- updatedAt: Date;
2934
- userId: string;
2935
- expiresAt: Date;
2936
- token: string;
2937
- ipAddress?: string | null | undefined;
2938
- userAgent?: string | null | undefined;
2939
- };
2940
- user: Record<string, any> & {
2941
- id: string;
2942
- createdAt: Date;
2943
- updatedAt: Date;
2944
- email: string;
2945
- emailVerified: boolean;
2946
- name: string;
2947
- image?: string | null | undefined;
2948
- };
2949
- };
2950
- }>)[];
2951
- metadata: {
2952
- openapi: {
2953
- description: string;
2954
- responses: {
2955
- "200": {
2956
- description: string;
2957
- content: {
2958
- "application/json": {
2959
- schema: {
2960
- type: "object";
2961
- properties: {
2962
- user: {
2963
- type: string;
2964
- properties: {
2965
- id: {
2966
- type: string;
2967
- };
2968
- name: {
2969
- type: string;
2970
- };
2971
- email: {
2972
- type: string;
2973
- };
2974
- image: {
2975
- type: string;
2976
- };
2977
- emailVerified: {
2978
- type: string;
2979
- };
2980
- };
2981
- required: string[];
2982
- };
2983
- data: {
2984
- type: string;
2985
- properties: {};
2986
- additionalProperties: boolean;
2987
- };
2988
- };
2989
- required: string[];
2990
- additionalProperties: boolean;
2991
- };
2992
- };
2993
- };
2994
- };
2995
- };
2996
- };
2997
- };
2998
- body: import("better-auth").ZodObject<{
2999
- accountId: import("better-auth").ZodString;
3000
- }, import("better-auth").$strip>;
3001
- } & {
3002
- use: any[];
3003
- };
3004
- path: "/account-info";
3005
- };
3006
- }>;
3007
- options: import("better-auth").BetterAuthOptions;
3008
- $context: Promise<import("better-auth").AuthContext>;
3009
- $Infer: {
3010
- Session: {
3011
- session: {
3012
- id: string;
3013
- createdAt: Date;
3014
- updatedAt: Date;
3015
- userId: string;
3016
- expiresAt: Date;
3017
- token: string;
3018
- ipAddress?: string | null | undefined;
3019
- userAgent?: string | null | undefined;
3020
- };
3021
- user: {
3022
- id: string;
3023
- createdAt: Date;
3024
- updatedAt: Date;
3025
- email: string;
3026
- emailVerified: boolean;
3027
- name: string;
3028
- image?: string | null | undefined;
3029
- };
3030
- };
3031
- };
3032
- $ERROR_CODES: {
3033
- USER_NOT_FOUND: string;
3034
- FAILED_TO_CREATE_USER: string;
3035
- FAILED_TO_CREATE_SESSION: string;
3036
- FAILED_TO_UPDATE_USER: string;
3037
- FAILED_TO_GET_SESSION: string;
3038
- INVALID_PASSWORD: string;
3039
- INVALID_EMAIL: string;
3040
- INVALID_EMAIL_OR_PASSWORD: string;
3041
- SOCIAL_ACCOUNT_ALREADY_LINKED: string;
3042
- PROVIDER_NOT_FOUND: string;
3043
- INVALID_TOKEN: string;
3044
- ID_TOKEN_NOT_SUPPORTED: string;
3045
- FAILED_TO_GET_USER_INFO: string;
3046
- USER_EMAIL_NOT_FOUND: string;
3047
- EMAIL_NOT_VERIFIED: string;
3048
- PASSWORD_TOO_SHORT: string;
3049
- PASSWORD_TOO_LONG: string;
3050
- USER_ALREADY_EXISTS: string;
3051
- EMAIL_CAN_NOT_BE_UPDATED: string;
3052
- CREDENTIAL_ACCOUNT_NOT_FOUND: string;
3053
- SESSION_EXPIRED: string;
3054
- FAILED_TO_UNLINK_LAST_ACCOUNT: string;
3055
- ACCOUNT_NOT_FOUND: string;
3056
- USER_ALREADY_HAS_PASSWORD: string;
3057
- };
3058
- };
13
+ export declare const getStaticAuth: <DataModel extends GenericDataModel>(createAuth: CreateAuth<DataModel>) => import("better-auth").Auth<import("better-auth").BetterAuthOptions>;
3059
14
  export type EventFunction<T extends DefaultFunctionArgs> = FunctionReference<"mutation", "internal" | "public", T>;
3060
15
  export type GenericCtx<DataModel extends GenericDataModel = GenericDataModel> = GenericQueryCtx<DataModel> | GenericMutationCtx<DataModel> | GenericActionCtx<DataModel>;
3061
16
  export type AuthFunctions = {
@@ -3070,6 +25,9 @@ export type AuthFunctions = {
3070
25
  }>;
3071
26
  };
3072
27
  export declare const createApi: <DataModel extends GenericDataModel, Schema extends SchemaDefinition<any, any>>(schema: Schema, createAuth: CreateAuth<DataModel>) => {
28
+ migrationRemoveUserId: import("convex/server").RegisteredMutation<"public", {
29
+ userId: string;
30
+ }, Promise<void>>;
3073
31
  create: import("convex/server").RegisteredMutation<"public", {
3074
32
  select?: string[] | undefined;
3075
33
  onCreateHandle?: string | undefined;
@@ -3085,7 +43,7 @@ export declare const createApi: <DataModel extends GenericDataModel, Schema exte
3085
43
  findOne: import("convex/server").RegisteredQuery<"public", {
3086
44
  select?: string[] | undefined;
3087
45
  where?: {
3088
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
46
+ operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3089
47
  connector?: "AND" | "OR" | undefined;
3090
48
  value: string | number | boolean | string[] | number[] | null;
3091
49
  field: string;
@@ -3094,7 +52,7 @@ export declare const createApi: <DataModel extends GenericDataModel, Schema exte
3094
52
  }, Promise<import("convex/server").GenericDocument | null>>;
3095
53
  findMany: import("convex/server").RegisteredQuery<"public", {
3096
54
  where?: {
3097
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
55
+ operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3098
56
  connector?: "AND" | "OR" | undefined;
3099
57
  value: string | number | boolean | string[] | number[] | null;
3100
58
  field: string;
@@ -3119,34 +77,34 @@ export declare const createApi: <DataModel extends GenericDataModel, Schema exte
3119
77
  onUpdateHandle?: string | undefined;
3120
78
  input: {
3121
79
  where?: {
3122
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
80
+ operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3123
81
  connector?: "AND" | "OR" | undefined;
3124
82
  value: string | number | boolean | string[] | number[] | null;
3125
83
  field: string;
3126
84
  }[] | undefined;
3127
- model: string;
3128
85
  update: {
3129
86
  [x: string]: unknown;
3130
87
  [x: number]: unknown;
3131
88
  [x: symbol]: unknown;
3132
89
  };
90
+ model: string;
3133
91
  };
3134
92
  }, Promise<any>>;
3135
93
  updateMany: import("convex/server").RegisteredMutation<"public", {
3136
94
  onUpdateHandle?: string | undefined;
3137
95
  input: {
3138
96
  where?: {
3139
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
97
+ operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3140
98
  connector?: "AND" | "OR" | undefined;
3141
99
  value: string | number | boolean | string[] | number[] | null;
3142
100
  field: string;
3143
101
  }[] | undefined;
3144
- model: string;
3145
102
  update: {
3146
103
  [x: string]: unknown;
3147
104
  [x: number]: unknown;
3148
105
  [x: symbol]: unknown;
3149
106
  };
107
+ model: string;
3150
108
  };
3151
109
  paginationOpts: {
3152
110
  id?: number;
@@ -3168,7 +126,7 @@ export declare const createApi: <DataModel extends GenericDataModel, Schema exte
3168
126
  onDeleteHandle?: string | undefined;
3169
127
  input: {
3170
128
  where?: {
3171
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
129
+ operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3172
130
  connector?: "AND" | "OR" | undefined;
3173
131
  value: string | number | boolean | string[] | number[] | null;
3174
132
  field: string;
@@ -3180,7 +138,7 @@ export declare const createApi: <DataModel extends GenericDataModel, Schema exte
3180
138
  onDeleteHandle?: string | undefined;
3181
139
  input: {
3182
140
  where?: {
3183
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
141
+ operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3184
142
  connector?: "AND" | "OR" | undefined;
3185
143
  value: string | number | boolean | string[] | number[] | null;
3186
144
  field: string;
@@ -3223,7 +181,10 @@ export type Triggers<DataModel extends GenericDataModel, Schema extends SchemaDe
3223
181
  }) => Promise<void>;
3224
182
  };
3225
183
  };
3226
- export declare const createClient: <DataModel extends GenericDataModel, Schema extends SchemaDefinition<GenericSchema, true> = typeof defaultSchema>(component: UseApi<typeof api>, config?: {
184
+ export declare const createClient: <DataModel extends GenericDataModel, Schema extends SchemaDefinition<GenericSchema, true> = typeof defaultSchema>(component: {
185
+ adapter: SetOptional<UseApi<typeof api>["adapter"], "migrationRemoveUserId">;
186
+ adapterTest?: UseApi<typeof api>["adapterTest"];
187
+ }, config?: {
3227
188
  local?: {
3228
189
  schema?: Schema;
3229
190
  };
@@ -3232,284 +193,57 @@ export declare const createClient: <DataModel extends GenericDataModel, Schema e
3232
193
  triggers?: Triggers<DataModel, Schema>;
3233
194
  }) => {
3234
195
  component: {
3235
- adapter: {
3236
- create: FunctionReference<"mutation", "internal", {
3237
- select?: string[] | undefined;
3238
- onCreateHandle?: string | undefined;
3239
- input: {
3240
- model: string;
3241
- data: {
3242
- [x: string]: any;
3243
- [x: number]: any;
3244
- [x: symbol]: any;
3245
- };
3246
- };
3247
- }, any, string | undefined>;
3248
- findOne: FunctionReference<"query", "internal", {
3249
- select?: string[] | undefined;
3250
- where?: {
3251
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3252
- connector?: "AND" | "OR" | undefined;
3253
- value: string | number | boolean | string[] | number[] | null;
3254
- field: string;
3255
- }[] | undefined;
3256
- model: string;
3257
- }, {
3258
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | {
3259
- [x: string]: string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null | undefined;
3260
- } | null)[] | {
3261
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3262
- } | null)[] | {
3263
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3264
- } | null)[] | {
3265
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3266
- } | null)[] | {
3267
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3268
- } | null)[] | {
3269
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3270
- } | null)[] | {
3271
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3272
- } | null)[] | {
3273
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3274
- } | null)[] | {
3275
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3276
- } | null)[] | {
3277
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3278
- } | null)[] | {
3279
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3280
- } | null)[] | {
3281
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3282
- } | null;
3283
- } | null, string | undefined>;
3284
- findMany: FunctionReference<"query", "internal", {
3285
- where?: {
3286
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3287
- connector?: "AND" | "OR" | undefined;
3288
- value: string | number | boolean | string[] | number[] | null;
3289
- field: string;
3290
- }[] | undefined;
3291
- sortBy?: {
3292
- field: string;
3293
- direction: "asc" | "desc";
3294
- } | undefined;
3295
- limit?: number | undefined;
3296
- offset?: number | undefined;
3297
- model: string;
3298
- paginationOpts: {
3299
- id?: number | undefined;
3300
- endCursor?: string | null | undefined;
3301
- maximumRowsRead?: number | undefined;
3302
- maximumBytesRead?: number | undefined;
3303
- numItems: number;
3304
- cursor: string | null;
3305
- };
3306
- }, {
3307
- page: {
3308
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | {
3309
- [x: string]: string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null | undefined;
3310
- } | null)[] | {
3311
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3312
- } | null)[] | {
3313
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3314
- } | null)[] | {
3315
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3316
- } | null)[] | {
3317
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3318
- } | null)[] | {
3319
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3320
- } | null)[] | {
3321
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3322
- } | null)[] | {
3323
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3324
- } | null)[] | {
3325
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3326
- } | null)[] | {
3327
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3328
- } | null)[] | {
3329
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3330
- } | null;
3331
- }[];
3332
- isDone: boolean;
3333
- continueCursor: import("convex/server").Cursor;
3334
- splitCursor?: (import("convex/server").Cursor | null) | undefined;
3335
- pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
3336
- }, string | undefined>;
3337
- updateOne: FunctionReference<"mutation", "internal", {
3338
- onUpdateHandle?: string | undefined;
3339
- input: {
3340
- where?: {
3341
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3342
- connector?: "AND" | "OR" | undefined;
3343
- value: string | number | boolean | string[] | number[] | null;
3344
- field: string;
3345
- }[] | undefined;
3346
- model: string;
3347
- update: {
3348
- [x: string]: unknown;
3349
- [x: number]: unknown;
3350
- [x: symbol]: unknown;
3351
- };
3352
- };
3353
- }, any, string | undefined>;
3354
- updateMany: FunctionReference<"mutation", "internal", {
3355
- onUpdateHandle?: string | undefined;
3356
- input: {
3357
- where?: {
3358
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3359
- connector?: "AND" | "OR" | undefined;
3360
- value: string | number | boolean | string[] | number[] | null;
3361
- field: string;
3362
- }[] | undefined;
3363
- model: string;
3364
- update: {
3365
- [x: string]: unknown;
3366
- [x: number]: unknown;
3367
- [x: symbol]: unknown;
3368
- };
3369
- };
3370
- paginationOpts: {
3371
- id?: number | undefined;
3372
- endCursor?: string | null | undefined;
3373
- maximumRowsRead?: number | undefined;
3374
- maximumBytesRead?: number | undefined;
3375
- numItems: number;
3376
- cursor: string | null;
3377
- };
3378
- }, {
3379
- count: number;
3380
- ids: (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | {
3381
- [x: string]: string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null | undefined;
3382
- } | null)[] | {
3383
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3384
- } | null)[] | {
3385
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3386
- } | null)[] | {
3387
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3388
- } | null)[] | {
3389
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3390
- } | null)[] | {
3391
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3392
- } | null)[] | {
3393
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3394
- } | null)[] | {
3395
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3396
- } | null)[] | {
3397
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3398
- } | null)[] | {
3399
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3400
- } | null)[] | {
3401
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3402
- } | null)[];
3403
- isDone: boolean;
3404
- continueCursor: import("convex/server").Cursor;
3405
- splitCursor?: (import("convex/server").Cursor | null) | undefined;
3406
- pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
3407
- }, string | undefined>;
3408
- deleteOne: FunctionReference<"mutation", "internal", {
3409
- onDeleteHandle?: string | undefined;
3410
- input: {
3411
- where?: {
3412
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3413
- connector?: "AND" | "OR" | undefined;
3414
- value: string | number | boolean | string[] | number[] | null;
3415
- field: string;
3416
- }[] | undefined;
3417
- model: string;
3418
- };
3419
- }, {
3420
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | {
3421
- [x: string]: string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null | undefined;
3422
- } | null)[] | {
3423
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3424
- } | null)[] | {
3425
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3426
- } | null)[] | {
3427
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3428
- } | null)[] | {
3429
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3430
- } | null)[] | {
3431
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3432
- } | null)[] | {
3433
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3434
- } | null)[] | {
3435
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3436
- } | null)[] | {
3437
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3438
- } | null)[] | {
3439
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3440
- } | null)[] | {
3441
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3442
- } | null)[] | {
3443
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3444
- } | null;
3445
- } | null, string | undefined>;
3446
- deleteMany: FunctionReference<"mutation", "internal", {
3447
- onDeleteHandle?: string | undefined;
3448
- input: {
3449
- where?: {
3450
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
3451
- connector?: "AND" | "OR" | undefined;
3452
- value: string | number | boolean | string[] | number[] | null;
3453
- field: string;
3454
- }[] | undefined;
3455
- model: string;
3456
- };
3457
- paginationOpts: {
3458
- id?: number | undefined;
3459
- endCursor?: string | null | undefined;
3460
- maximumRowsRead?: number | undefined;
3461
- maximumBytesRead?: number | undefined;
3462
- numItems: number;
3463
- cursor: string | null;
3464
- };
3465
- }, {
3466
- count: number;
3467
- ids: (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | {
3468
- [x: string]: string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null | undefined;
3469
- } | null)[] | {
3470
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3471
- } | null)[] | {
3472
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3473
- } | null)[] | {
3474
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3475
- } | null)[] | {
3476
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3477
- } | null)[] | {
3478
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3479
- } | null)[] | {
3480
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3481
- } | null)[] | {
3482
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3483
- } | null)[] | {
3484
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3485
- } | null)[] | {
3486
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3487
- } | null)[] | {
3488
- [x: string]: string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | (string | number | bigint | boolean | ArrayBuffer | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null | undefined;
3489
- } | null)[];
3490
- isDone: boolean;
3491
- continueCursor: import("convex/server").Cursor;
3492
- splitCursor?: (import("convex/server").Cursor | null) | undefined;
3493
- pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
3494
- }, string | undefined>;
3495
- };
3496
- adapterTest: {
3497
- create: FunctionReference<"mutation", "internal", any, any, string | undefined>;
3498
- findOne: FunctionReference<"query", "internal", any, any, string | undefined>;
3499
- findMany: FunctionReference<"query", "internal", any, any, string | undefined>;
3500
- count: FunctionReference<"query", "internal", any, any, string | undefined>;
3501
- update: FunctionReference<"mutation", "internal", any, any, string | undefined>;
3502
- updateMany: FunctionReference<"mutation", "internal", any, any, string | undefined>;
3503
- delete: FunctionReference<"mutation", "internal", any, any, string | undefined>;
3504
- deleteMany: FunctionReference<"mutation", "internal", any, any, string | undefined>;
3505
- };
196
+ adapter: SetOptional<UseApi<typeof api>["adapter"], "migrationRemoveUserId">;
197
+ adapterTest?: UseApi<typeof api>["adapterTest"];
3506
198
  };
3507
- adapter: (ctx: GenericCtx<DataModel>) => (options: import("better-auth").BetterAuthOptions) => import("better-auth").Adapter;
3508
- getHeaders: (ctx: GenericQueryCtx<DataModel>) => Promise<Headers>;
199
+ adapter: (ctx: GenericCtx<DataModel>) => import("better-auth/adapters").AdapterFactory;
200
+ getAuth: <T extends CreateAuth<DataModel>>(createAuth: T, ctx: GenericCtx<DataModel>) => Promise<{
201
+ auth: ReturnType<T>;
202
+ headers: Headers;
203
+ }>;
204
+ getHeaders: (ctx: GenericCtx<DataModel>) => Promise<Headers>;
205
+ /**
206
+ * Returns the current user or null if the user is not found
207
+ * @param ctx - The Convex context
208
+ * @returns The user or null if the user is not found
209
+ */
3509
210
  safeGetAuthUser: (ctx: GenericCtx<DataModel>) => Promise<DataModelFromSchemaDefinition<Schema>["user"]["document"] | undefined>;
211
+ /**
212
+ * Returns the current user.
213
+ * @param ctx - The Convex context
214
+ * @returns The user or throws an error if the user is not found
215
+ */
3510
216
  getAuthUser: (ctx: GenericCtx<DataModel>) => Promise<DataModelFromSchemaDefinition<Schema>["user"]["document"]>;
217
+ /**
218
+ * Returns a user by their Better Auth user id.
219
+ * @param ctx - The Convex context
220
+ * @param id - The Better Auth user id
221
+ * @returns The user or null if the user is not found
222
+ */
3511
223
  getAnyUserById: (ctx: GenericCtx<DataModel>, id: string) => Promise<DataModelFromSchemaDefinition<Schema>["user"]["document"] | null>;
224
+ /**
225
+ * Replaces 0.7 behavior of returning a new user id from
226
+ * onCreateUser
227
+ * @param ctx - The Convex context
228
+ * @param authId - The Better Auth user id
229
+ * @param userId - The app user id
230
+ * @deprecated in 0.9
231
+ */
3512
232
  setUserId: (ctx: GenericMutationCtx<DataModel>, authId: string, userId: string) => Promise<void>;
233
+ /**
234
+ * Temporary method to simplify 0.9 migration, gets a user by `userId` field
235
+ * @param ctx - The Convex context
236
+ * @param userId - The app user id
237
+ * @returns The user or null if the user is not found
238
+ */
239
+ migrationGetUser: (ctx: GenericMutationCtx<DataModel>, userId: string) => Promise<DataModelFromSchemaDefinition<Schema>["user"]["document"] | null>;
240
+ /**
241
+ * Temporary method to simplify 0.9 migration, removes the `userId` field
242
+ * from the Better Auth user record
243
+ * @param ctx - The Convex context
244
+ * @param userId - The app user id
245
+ */
246
+ migrationRemoveUserId: (ctx: GenericMutationCtx<DataModel>, userId: string) => Promise<void>;
3513
247
  triggersApi: () => {
3514
248
  onCreate: import("convex/server").RegisteredMutation<"internal", {
3515
249
  model: string;
@@ -3517,8 +251,8 @@ export declare const createClient: <DataModel extends GenericDataModel, Schema e
3517
251
  }, Promise<void>>;
3518
252
  onUpdate: import("convex/server").RegisteredMutation<"internal", {
3519
253
  model: string;
3520
- oldDoc: any;
3521
254
  newDoc: any;
255
+ oldDoc: any;
3522
256
  }, Promise<void>>;
3523
257
  onDelete: import("convex/server").RegisteredMutation<"internal", {
3524
258
  model: string;
@@ -3533,31 +267,6 @@ export declare const createClient: <DataModel extends GenericDataModel, Schema e
3533
267
  };
3534
268
  }) => void;
3535
269
  };
3536
- /**
3537
- * @deprecated Use `QueryCtx` from _generated/server instead
3538
- */
3539
- export type RunQueryCtx = {
3540
- runQuery: GenericQueryCtx<GenericDataModel>["runQuery"];
3541
- };
3542
- /**
3543
- * @deprecated Use `MutationCtx` from _generated/server instead
3544
- */
3545
- export type RunMutationCtx = {
3546
- runQuery: GenericQueryCtx<GenericDataModel>["runQuery"];
3547
- runMutation: GenericMutationCtx<GenericDataModel>["runMutation"];
3548
- };
3549
- /**
3550
- * @deprecated Use `ActionCtx` from _generated/server instead
3551
- */
3552
- export type RunActionCtx = {
3553
- runQuery: GenericQueryCtx<GenericDataModel>["runQuery"];
3554
- runMutation: GenericMutationCtx<GenericDataModel>["runMutation"];
3555
- runAction: GenericActionCtx<GenericDataModel>["runAction"];
3556
- };
3557
- /**
3558
- * @deprecated
3559
- */
3560
- export type RunCtx = RunQueryCtx | RunMutationCtx | RunActionCtx;
3561
270
  export type OpaqueIds<T> = T extends GenericId<infer _T> ? string : T extends (infer U)[] ? OpaqueIds<U>[] : T extends ArrayBuffer ? ArrayBuffer : T extends object ? {
3562
271
  [K in keyof T]: OpaqueIds<T[K]>;
3563
272
  } : T;