@nest-boot/auth 7.7.2 → 7.7.4

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