@meistrari/auth-core 1.11.2 → 1.11.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.
- package/dist/index.d.mts +401 -2986
- package/dist/index.d.ts +401 -2986
- package/dist/index.mjs +3 -2
- package/package.json +4 -3
package/dist/index.d.mts
CHANGED
|
@@ -3,8 +3,6 @@ import * as better_auth from 'better-auth';
|
|
|
3
3
|
import { JWTPayload } from 'better-auth';
|
|
4
4
|
import * as better_auth_client from 'better-auth/client';
|
|
5
5
|
import { BetterFetchOption } from 'better-auth/client';
|
|
6
|
-
import * as nanostores from 'nanostores';
|
|
7
|
-
import * as _better_auth_sso from '@better-auth/sso';
|
|
8
6
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
9
7
|
export { BetterFetchError as APIError } from '@better-fetch/fetch';
|
|
10
8
|
|
|
@@ -221,2222 +219,9 @@ type Strict<T> = {
|
|
|
221
219
|
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
|
|
222
220
|
};
|
|
223
221
|
declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOption): {
|
|
224
|
-
useActiveOrganization: better_auth_client.AuthQueryAtom<better_auth.Prettify<{
|
|
225
|
-
id: string;
|
|
226
|
-
name: string;
|
|
227
|
-
slug: string;
|
|
228
|
-
createdAt: Date;
|
|
229
|
-
logo?: string | null | undefined | undefined;
|
|
230
|
-
metadata?: any;
|
|
231
|
-
} & {
|
|
232
|
-
members: {
|
|
233
|
-
id: string;
|
|
234
|
-
organizationId: string;
|
|
235
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
236
|
-
createdAt: Date;
|
|
237
|
-
userId: string;
|
|
238
|
-
teamId?: string | undefined | undefined;
|
|
239
|
-
user: {
|
|
240
|
-
id: string;
|
|
241
|
-
email: string;
|
|
242
|
-
name: string;
|
|
243
|
-
image?: string | undefined;
|
|
244
|
-
};
|
|
245
|
-
}[];
|
|
246
|
-
invitations: {
|
|
247
|
-
id: string;
|
|
248
|
-
organizationId: string;
|
|
249
|
-
email: string;
|
|
250
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
251
|
-
status: better_auth_plugins.InvitationStatus;
|
|
252
|
-
inviterId: string;
|
|
253
|
-
expiresAt: Date;
|
|
254
|
-
createdAt: Date;
|
|
255
|
-
teamId?: string | undefined | undefined;
|
|
256
|
-
}[];
|
|
257
|
-
}>>;
|
|
258
|
-
useListOrganizations: better_auth_client.AuthQueryAtom<{
|
|
259
|
-
id: string;
|
|
260
|
-
name: string;
|
|
261
|
-
slug: string;
|
|
262
|
-
createdAt: Date;
|
|
263
|
-
logo?: string | null | undefined | undefined;
|
|
264
|
-
metadata?: any;
|
|
265
|
-
}[]>;
|
|
266
|
-
useActiveMember: better_auth_client.AuthQueryAtom<{
|
|
267
|
-
id: string;
|
|
268
|
-
organizationId: string;
|
|
269
|
-
userId: string;
|
|
270
|
-
role: string;
|
|
271
|
-
createdAt: Date;
|
|
272
|
-
}>;
|
|
273
|
-
useActiveMemberRole: better_auth_client.AuthQueryAtom<{
|
|
274
|
-
role: string;
|
|
275
|
-
}>;
|
|
276
|
-
} & {
|
|
277
|
-
customEndpoints: {
|
|
278
|
-
teams: {
|
|
279
|
-
":id": {
|
|
280
|
-
members: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, {
|
|
281
|
-
id: string;
|
|
282
|
-
}>>(data_0?: better_auth.Prettify<{
|
|
283
|
-
query?: Record<string, any> | undefined;
|
|
284
|
-
fetchOptions?: FetchOptions | undefined;
|
|
285
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
286
|
-
teamMembers: {
|
|
287
|
-
id: string;
|
|
288
|
-
teamId: string;
|
|
289
|
-
userId: string;
|
|
290
|
-
createdAt: Date;
|
|
291
|
-
}[];
|
|
292
|
-
}, {
|
|
293
|
-
code?: string | undefined;
|
|
294
|
-
message?: string | undefined;
|
|
295
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
};
|
|
299
|
-
} & {
|
|
300
|
-
handshake: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
301
|
-
origin: string;
|
|
302
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
303
|
-
query: {
|
|
304
|
-
origin: string;
|
|
305
|
-
};
|
|
306
|
-
fetchOptions?: FetchOptions | undefined;
|
|
307
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
308
|
-
status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
|
|
309
|
-
body: ({
|
|
310
|
-
message?: string;
|
|
311
|
-
code?: string;
|
|
312
|
-
cause?: unknown;
|
|
313
|
-
} & Record<string, any>) | undefined;
|
|
314
|
-
headers: HeadersInit;
|
|
315
|
-
statusCode: number;
|
|
316
|
-
name: string;
|
|
317
|
-
message: string;
|
|
318
|
-
stack?: string;
|
|
319
|
-
cause?: unknown;
|
|
320
|
-
}, {
|
|
321
|
-
code?: string | undefined;
|
|
322
|
-
message?: string | undefined;
|
|
323
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
324
|
-
} & {
|
|
325
|
-
handshake: {
|
|
326
|
-
noncePayload: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
327
|
-
nonce: string;
|
|
328
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
329
|
-
query: {
|
|
330
|
-
nonce: string;
|
|
331
|
-
};
|
|
332
|
-
fetchOptions?: FetchOptions | undefined;
|
|
333
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
334
|
-
token: string;
|
|
335
|
-
}, {
|
|
336
|
-
code?: string | undefined;
|
|
337
|
-
message?: string | undefined;
|
|
338
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
339
|
-
};
|
|
340
|
-
} & {
|
|
341
|
-
organization: {
|
|
342
|
-
create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
343
|
-
name: string;
|
|
344
|
-
slug: string;
|
|
345
|
-
userId?: string | undefined;
|
|
346
|
-
logo?: string | undefined;
|
|
347
|
-
metadata?: Record<string, any> | undefined;
|
|
348
|
-
keepCurrentActiveOrganization?: boolean | undefined;
|
|
349
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
350
|
-
name: string;
|
|
351
|
-
slug: string;
|
|
352
|
-
userId?: string | undefined;
|
|
353
|
-
logo?: string | undefined;
|
|
354
|
-
metadata?: Record<string, any> | undefined;
|
|
355
|
-
keepCurrentActiveOrganization?: boolean | undefined;
|
|
356
|
-
} & {
|
|
357
|
-
fetchOptions?: FetchOptions | undefined;
|
|
358
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
359
|
-
id: string;
|
|
360
|
-
name: string;
|
|
361
|
-
slug: string;
|
|
362
|
-
createdAt: Date;
|
|
363
|
-
logo?: string | null | undefined | undefined;
|
|
364
|
-
metadata?: any;
|
|
365
|
-
} & {
|
|
366
|
-
metadata: any;
|
|
367
|
-
members: ({
|
|
368
|
-
id: string;
|
|
369
|
-
organizationId: string;
|
|
370
|
-
userId: string;
|
|
371
|
-
role: string;
|
|
372
|
-
createdAt: Date;
|
|
373
|
-
} | undefined)[];
|
|
374
|
-
}, {
|
|
375
|
-
code?: string | undefined;
|
|
376
|
-
message?: string | undefined;
|
|
377
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
378
|
-
};
|
|
379
|
-
} & {
|
|
380
|
-
organization: {
|
|
381
|
-
update: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
382
|
-
data: {
|
|
383
|
-
name?: string | undefined;
|
|
384
|
-
slug?: string | undefined;
|
|
385
|
-
logo?: string | undefined;
|
|
386
|
-
metadata?: Record<string, any> | undefined;
|
|
387
|
-
} & Partial<{}>;
|
|
388
|
-
organizationId?: string | undefined;
|
|
389
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
390
|
-
data: {
|
|
391
|
-
name?: string | undefined;
|
|
392
|
-
slug?: string | undefined;
|
|
393
|
-
logo?: string | undefined;
|
|
394
|
-
metadata?: Record<string, any> | undefined;
|
|
395
|
-
} & Partial<{}>;
|
|
396
|
-
organizationId?: string | undefined;
|
|
397
|
-
} & {
|
|
398
|
-
fetchOptions?: FetchOptions | undefined;
|
|
399
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
400
|
-
id: string;
|
|
401
|
-
name: string;
|
|
402
|
-
slug: string;
|
|
403
|
-
createdAt: Date;
|
|
404
|
-
logo?: string | null | undefined | undefined;
|
|
405
|
-
metadata?: any;
|
|
406
|
-
}, {
|
|
407
|
-
code?: string | undefined;
|
|
408
|
-
message?: string | undefined;
|
|
409
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
410
|
-
};
|
|
411
|
-
} & {
|
|
412
|
-
organization: {
|
|
413
|
-
delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
414
|
-
organizationId: string;
|
|
415
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
416
|
-
organizationId: string;
|
|
417
|
-
} & {
|
|
418
|
-
fetchOptions?: FetchOptions | undefined;
|
|
419
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
420
|
-
id: string;
|
|
421
|
-
name: string;
|
|
422
|
-
slug: string;
|
|
423
|
-
createdAt: Date;
|
|
424
|
-
logo?: string | null | undefined | undefined;
|
|
425
|
-
metadata?: any;
|
|
426
|
-
}, {
|
|
427
|
-
code?: string | undefined;
|
|
428
|
-
message?: string | undefined;
|
|
429
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
430
|
-
};
|
|
431
|
-
} & {
|
|
432
|
-
organization: {
|
|
433
|
-
setActive: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
434
|
-
organizationId?: string | null | undefined;
|
|
435
|
-
organizationSlug?: string | undefined;
|
|
436
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
437
|
-
organizationId?: string | null | undefined;
|
|
438
|
-
organizationSlug?: string | undefined;
|
|
439
|
-
} & {
|
|
440
|
-
fetchOptions?: FetchOptions | undefined;
|
|
441
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
442
|
-
members: {
|
|
443
|
-
id: string;
|
|
444
|
-
organizationId: string;
|
|
445
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
446
|
-
createdAt: Date;
|
|
447
|
-
userId: string;
|
|
448
|
-
teamId?: string | undefined | undefined;
|
|
449
|
-
user: {
|
|
450
|
-
id: string;
|
|
451
|
-
email: string;
|
|
452
|
-
name: string;
|
|
453
|
-
image?: string | undefined;
|
|
454
|
-
};
|
|
455
|
-
}[];
|
|
456
|
-
invitations: {
|
|
457
|
-
id: string;
|
|
458
|
-
organizationId: string;
|
|
459
|
-
email: string;
|
|
460
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
461
|
-
status: better_auth_plugins.InvitationStatus;
|
|
462
|
-
inviterId: string;
|
|
463
|
-
expiresAt: Date;
|
|
464
|
-
createdAt: Date;
|
|
465
|
-
teamId?: string | undefined | undefined;
|
|
466
|
-
}[];
|
|
467
|
-
teams: {
|
|
468
|
-
id: string;
|
|
469
|
-
name: string;
|
|
470
|
-
organizationId: string;
|
|
471
|
-
createdAt: Date;
|
|
472
|
-
updatedAt?: Date | undefined;
|
|
473
|
-
}[];
|
|
474
|
-
} & {
|
|
475
|
-
id: string;
|
|
476
|
-
name: string;
|
|
477
|
-
slug: string;
|
|
478
|
-
createdAt: Date;
|
|
479
|
-
logo?: string | null | undefined | undefined;
|
|
480
|
-
metadata?: any;
|
|
481
|
-
}, {
|
|
482
|
-
code?: string | undefined;
|
|
483
|
-
message?: string | undefined;
|
|
484
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
485
|
-
};
|
|
486
|
-
} & {
|
|
487
|
-
organization: {
|
|
488
|
-
getFullOrganization: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
489
|
-
organizationId?: string | undefined;
|
|
490
|
-
organizationSlug?: string | undefined;
|
|
491
|
-
membersLimit?: string | number | undefined;
|
|
492
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
493
|
-
query?: {
|
|
494
|
-
organizationId?: string | undefined;
|
|
495
|
-
organizationSlug?: string | undefined;
|
|
496
|
-
membersLimit?: string | number | undefined;
|
|
497
|
-
} | undefined;
|
|
498
|
-
fetchOptions?: FetchOptions | undefined;
|
|
499
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
500
|
-
members: {
|
|
501
|
-
id: string;
|
|
502
|
-
organizationId: string;
|
|
503
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
504
|
-
createdAt: Date;
|
|
505
|
-
userId: string;
|
|
506
|
-
teamId?: string | undefined | undefined;
|
|
507
|
-
user: {
|
|
508
|
-
id: string;
|
|
509
|
-
email: string;
|
|
510
|
-
name: string;
|
|
511
|
-
image?: string | undefined;
|
|
512
|
-
};
|
|
513
|
-
}[];
|
|
514
|
-
invitations: {
|
|
515
|
-
id: string;
|
|
516
|
-
organizationId: string;
|
|
517
|
-
email: string;
|
|
518
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
519
|
-
status: better_auth_plugins.InvitationStatus;
|
|
520
|
-
inviterId: string;
|
|
521
|
-
expiresAt: Date;
|
|
522
|
-
createdAt: Date;
|
|
523
|
-
teamId?: string | undefined | undefined;
|
|
524
|
-
}[];
|
|
525
|
-
teams: {
|
|
526
|
-
id: string;
|
|
527
|
-
name: string;
|
|
528
|
-
organizationId: string;
|
|
529
|
-
createdAt: Date;
|
|
530
|
-
updatedAt?: Date | undefined;
|
|
531
|
-
}[];
|
|
532
|
-
} & {
|
|
533
|
-
id: string;
|
|
534
|
-
name: string;
|
|
535
|
-
slug: string;
|
|
536
|
-
createdAt: Date;
|
|
537
|
-
logo?: string | null | undefined | undefined;
|
|
538
|
-
metadata?: any;
|
|
539
|
-
}, {
|
|
540
|
-
code?: string | undefined;
|
|
541
|
-
message?: string | undefined;
|
|
542
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
543
|
-
};
|
|
544
|
-
} & {
|
|
545
|
-
organization: {
|
|
546
|
-
list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
547
|
-
query?: Record<string, any> | undefined;
|
|
548
|
-
fetchOptions?: FetchOptions | undefined;
|
|
549
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
550
|
-
id: string;
|
|
551
|
-
name: string;
|
|
552
|
-
slug: string;
|
|
553
|
-
createdAt: Date;
|
|
554
|
-
logo?: string | null | undefined | undefined;
|
|
555
|
-
metadata?: any;
|
|
556
|
-
}[], {
|
|
557
|
-
code?: string | undefined;
|
|
558
|
-
message?: string | undefined;
|
|
559
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
560
|
-
};
|
|
561
|
-
} & {
|
|
562
|
-
organization: {
|
|
563
|
-
inviteMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
564
|
-
email: string;
|
|
565
|
-
role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
|
|
566
|
-
organizationId?: string | undefined;
|
|
567
|
-
resend?: boolean | undefined;
|
|
568
|
-
} & {
|
|
569
|
-
teamId?: (string | string[]) | undefined;
|
|
570
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
571
|
-
email: string;
|
|
572
|
-
role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
|
|
573
|
-
organizationId?: string | undefined;
|
|
574
|
-
resend?: boolean | undefined;
|
|
575
|
-
} & {
|
|
576
|
-
teamId?: (string | string[]) | undefined;
|
|
577
|
-
} & {
|
|
578
|
-
fetchOptions?: FetchOptions | undefined;
|
|
579
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
580
|
-
id: string;
|
|
581
|
-
organizationId: string;
|
|
582
|
-
email: string;
|
|
583
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
584
|
-
status: better_auth_plugins.InvitationStatus;
|
|
585
|
-
inviterId: string;
|
|
586
|
-
expiresAt: Date;
|
|
587
|
-
createdAt: Date;
|
|
588
|
-
teamId?: string | undefined | undefined;
|
|
589
|
-
} | {
|
|
590
|
-
id: string;
|
|
591
|
-
organizationId: string;
|
|
592
|
-
email: string;
|
|
593
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
594
|
-
status: better_auth_plugins.InvitationStatus;
|
|
595
|
-
inviterId: string;
|
|
596
|
-
expiresAt: Date;
|
|
597
|
-
createdAt: Date;
|
|
598
|
-
teamId?: string | undefined | undefined;
|
|
599
|
-
}>, {
|
|
600
|
-
code?: string | undefined;
|
|
601
|
-
message?: string | undefined;
|
|
602
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
603
|
-
};
|
|
604
|
-
} & {
|
|
605
|
-
organization: {
|
|
606
|
-
cancelInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
607
|
-
invitationId: string;
|
|
608
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
609
|
-
invitationId: string;
|
|
610
|
-
} & {
|
|
611
|
-
fetchOptions?: FetchOptions | undefined;
|
|
612
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
613
|
-
id: string;
|
|
614
|
-
organizationId: string;
|
|
615
|
-
email: string;
|
|
616
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
617
|
-
status: better_auth_plugins.InvitationStatus;
|
|
618
|
-
inviterId: string;
|
|
619
|
-
expiresAt: Date;
|
|
620
|
-
createdAt: Date;
|
|
621
|
-
teamId?: string | undefined | undefined;
|
|
622
|
-
}, {
|
|
623
|
-
code?: string | undefined;
|
|
624
|
-
message?: string | undefined;
|
|
625
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
626
|
-
};
|
|
627
|
-
} & {
|
|
628
|
-
organization: {
|
|
629
|
-
acceptInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
630
|
-
invitationId: string;
|
|
631
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
632
|
-
invitationId: string;
|
|
633
|
-
} & {
|
|
634
|
-
fetchOptions?: FetchOptions | undefined;
|
|
635
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
636
|
-
invitation: {
|
|
637
|
-
id: string;
|
|
638
|
-
organizationId: string;
|
|
639
|
-
email: string;
|
|
640
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
641
|
-
status: better_auth_plugins.InvitationStatus;
|
|
642
|
-
inviterId: string;
|
|
643
|
-
expiresAt: Date;
|
|
644
|
-
createdAt: Date;
|
|
645
|
-
teamId?: string | undefined | undefined;
|
|
646
|
-
};
|
|
647
|
-
member: {
|
|
648
|
-
id: string;
|
|
649
|
-
organizationId: string;
|
|
650
|
-
userId: string;
|
|
651
|
-
role: string;
|
|
652
|
-
createdAt: Date;
|
|
653
|
-
};
|
|
654
|
-
}, {
|
|
655
|
-
code?: string | undefined;
|
|
656
|
-
message?: string | undefined;
|
|
657
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
658
|
-
};
|
|
659
|
-
} & {
|
|
660
|
-
organization: {
|
|
661
|
-
getInvitation: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
662
|
-
id: string;
|
|
663
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
664
|
-
query: {
|
|
665
|
-
id: string;
|
|
666
|
-
};
|
|
667
|
-
fetchOptions?: FetchOptions | undefined;
|
|
668
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
669
|
-
id: string;
|
|
670
|
-
organizationId: string;
|
|
671
|
-
email: string;
|
|
672
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
673
|
-
status: better_auth_plugins.InvitationStatus;
|
|
674
|
-
inviterId: string;
|
|
675
|
-
expiresAt: Date;
|
|
676
|
-
createdAt: Date;
|
|
677
|
-
teamId?: string | undefined | undefined;
|
|
678
|
-
} & {
|
|
679
|
-
organizationName: string;
|
|
680
|
-
organizationSlug: string;
|
|
681
|
-
inviterEmail: string;
|
|
682
|
-
}>, {
|
|
683
|
-
code?: string | undefined;
|
|
684
|
-
message?: string | undefined;
|
|
685
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
686
|
-
};
|
|
687
|
-
} & {
|
|
688
|
-
organization: {
|
|
689
|
-
rejectInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
690
|
-
invitationId: string;
|
|
691
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
692
|
-
invitationId: string;
|
|
693
|
-
} & {
|
|
694
|
-
fetchOptions?: FetchOptions | undefined;
|
|
695
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
696
|
-
invitation: {
|
|
697
|
-
id: string;
|
|
698
|
-
organizationId: string;
|
|
699
|
-
email: string;
|
|
700
|
-
role: "member" | "admin" | "owner";
|
|
701
|
-
status: better_auth_plugins.InvitationStatus;
|
|
702
|
-
inviterId: string;
|
|
703
|
-
expiresAt: Date;
|
|
704
|
-
createdAt: Date;
|
|
705
|
-
} | null;
|
|
706
|
-
member: null;
|
|
707
|
-
}, {
|
|
708
|
-
code?: string | undefined;
|
|
709
|
-
message?: string | undefined;
|
|
710
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
711
|
-
};
|
|
712
|
-
} & {
|
|
713
|
-
organization: {
|
|
714
|
-
listInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
715
|
-
organizationId?: string | undefined;
|
|
716
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
717
|
-
query?: {
|
|
718
|
-
organizationId?: string | undefined;
|
|
719
|
-
} | undefined;
|
|
720
|
-
fetchOptions?: FetchOptions | undefined;
|
|
721
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
722
|
-
id: string;
|
|
723
|
-
organizationId: string;
|
|
724
|
-
email: string;
|
|
725
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
726
|
-
status: better_auth_plugins.InvitationStatus;
|
|
727
|
-
inviterId: string;
|
|
728
|
-
expiresAt: Date;
|
|
729
|
-
createdAt: Date;
|
|
730
|
-
teamId?: string | undefined | undefined;
|
|
731
|
-
}[], {
|
|
732
|
-
code?: string | undefined;
|
|
733
|
-
message?: string | undefined;
|
|
734
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
735
|
-
};
|
|
736
|
-
} & {
|
|
737
|
-
organization: {
|
|
738
|
-
getActiveMember: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
739
|
-
query?: Record<string, any> | undefined;
|
|
740
|
-
fetchOptions?: FetchOptions | undefined;
|
|
741
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Omit<{
|
|
742
|
-
id: string;
|
|
743
|
-
organizationId: string;
|
|
744
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
745
|
-
createdAt: Date;
|
|
746
|
-
userId: string;
|
|
747
|
-
teamId?: string | undefined | undefined;
|
|
748
|
-
user: {
|
|
749
|
-
id: string;
|
|
750
|
-
email: string;
|
|
751
|
-
name: string;
|
|
752
|
-
image?: string | undefined;
|
|
753
|
-
};
|
|
754
|
-
} & {
|
|
755
|
-
user: better_auth.User;
|
|
756
|
-
}, "user"> & {
|
|
757
|
-
user: {
|
|
758
|
-
id: string;
|
|
759
|
-
name: string;
|
|
760
|
-
email: string;
|
|
761
|
-
image: string | undefined;
|
|
762
|
-
};
|
|
763
|
-
}, {
|
|
764
|
-
code?: string | undefined;
|
|
765
|
-
message?: string | undefined;
|
|
766
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
767
|
-
};
|
|
768
|
-
} & {
|
|
769
|
-
organization: {
|
|
770
|
-
checkSlug: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
771
|
-
slug: string;
|
|
772
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
773
|
-
slug: string;
|
|
774
|
-
} & {
|
|
775
|
-
fetchOptions?: FetchOptions | undefined;
|
|
776
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
777
|
-
status: boolean;
|
|
778
|
-
}, {
|
|
779
|
-
code?: string | undefined;
|
|
780
|
-
message?: string | undefined;
|
|
781
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
782
|
-
};
|
|
783
|
-
} & {
|
|
784
|
-
organization: {
|
|
785
|
-
removeMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
786
|
-
memberIdOrEmail: string;
|
|
787
|
-
organizationId?: string | undefined;
|
|
788
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
789
|
-
memberIdOrEmail: string;
|
|
790
|
-
organizationId?: string | undefined;
|
|
791
|
-
} & {
|
|
792
|
-
fetchOptions?: FetchOptions | undefined;
|
|
793
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
794
|
-
member: {
|
|
795
|
-
id: string;
|
|
796
|
-
organizationId: string;
|
|
797
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
798
|
-
createdAt: Date;
|
|
799
|
-
userId: string;
|
|
800
|
-
teamId?: string | undefined | undefined;
|
|
801
|
-
user: {
|
|
802
|
-
id: string;
|
|
803
|
-
email: string;
|
|
804
|
-
name: string;
|
|
805
|
-
image?: string | undefined;
|
|
806
|
-
};
|
|
807
|
-
};
|
|
808
|
-
}, {
|
|
809
|
-
code?: string | undefined;
|
|
810
|
-
message?: string | undefined;
|
|
811
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
812
|
-
};
|
|
813
|
-
} & {
|
|
814
|
-
organization: {
|
|
815
|
-
updateMemberRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
816
|
-
role: better_auth.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
|
|
817
|
-
memberId: string;
|
|
818
|
-
organizationId?: string | undefined;
|
|
819
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
820
|
-
role: better_auth.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
|
|
821
|
-
memberId: string;
|
|
822
|
-
organizationId?: string | undefined;
|
|
823
|
-
} & {
|
|
824
|
-
fetchOptions?: FetchOptions | undefined;
|
|
825
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
826
|
-
id: string;
|
|
827
|
-
organizationId: string;
|
|
828
|
-
role: "member" | "admin" | "owner";
|
|
829
|
-
createdAt: Date;
|
|
830
|
-
userId: string;
|
|
831
|
-
user: {
|
|
832
|
-
id: string;
|
|
833
|
-
email: string;
|
|
834
|
-
name: string;
|
|
835
|
-
image?: string | undefined;
|
|
836
|
-
};
|
|
837
|
-
}, {
|
|
838
|
-
code?: string | undefined;
|
|
839
|
-
message?: string | undefined;
|
|
840
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
841
|
-
};
|
|
842
|
-
} & {
|
|
843
|
-
organization: {
|
|
844
|
-
leave: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
845
|
-
organizationId: string;
|
|
846
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
847
|
-
organizationId: string;
|
|
848
|
-
} & {
|
|
849
|
-
fetchOptions?: FetchOptions | undefined;
|
|
850
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<Omit<{
|
|
851
|
-
id: string;
|
|
852
|
-
organizationId: string;
|
|
853
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
854
|
-
createdAt: Date;
|
|
855
|
-
userId: string;
|
|
856
|
-
teamId?: string | undefined | undefined;
|
|
857
|
-
user: {
|
|
858
|
-
id: string;
|
|
859
|
-
email: string;
|
|
860
|
-
name: string;
|
|
861
|
-
image?: string | undefined;
|
|
862
|
-
};
|
|
863
|
-
} & {
|
|
864
|
-
user: better_auth.User;
|
|
865
|
-
}, "user"> & {
|
|
866
|
-
user: {
|
|
867
|
-
id: string;
|
|
868
|
-
name: string;
|
|
869
|
-
email: string;
|
|
870
|
-
image: string | undefined;
|
|
871
|
-
};
|
|
872
|
-
}>, {
|
|
873
|
-
code?: string | undefined;
|
|
874
|
-
message?: string | undefined;
|
|
875
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
876
|
-
};
|
|
877
|
-
} & {
|
|
878
|
-
organization: {
|
|
879
|
-
listUserInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
880
|
-
email?: string | undefined;
|
|
881
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
882
|
-
query?: {
|
|
883
|
-
email?: string | undefined;
|
|
884
|
-
} | undefined;
|
|
885
|
-
fetchOptions?: FetchOptions | undefined;
|
|
886
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<(Omit<{
|
|
887
|
-
id: string;
|
|
888
|
-
organizationId: string;
|
|
889
|
-
email: string;
|
|
890
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
891
|
-
status: better_auth_plugins.InvitationStatus;
|
|
892
|
-
inviterId: string;
|
|
893
|
-
expiresAt: Date;
|
|
894
|
-
createdAt: Date;
|
|
895
|
-
teamId?: string | undefined | undefined;
|
|
896
|
-
} & {
|
|
897
|
-
organization: {
|
|
898
|
-
id: string;
|
|
899
|
-
name: string;
|
|
900
|
-
slug: string;
|
|
901
|
-
createdAt: Date;
|
|
902
|
-
logo?: string | null | undefined | undefined;
|
|
903
|
-
metadata?: any;
|
|
904
|
-
};
|
|
905
|
-
}, "organization"> & {
|
|
906
|
-
organizationName: string;
|
|
907
|
-
})[], {
|
|
908
|
-
code?: string | undefined;
|
|
909
|
-
message?: string | undefined;
|
|
910
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
911
|
-
};
|
|
912
|
-
} & {
|
|
913
|
-
organization: {
|
|
914
|
-
listMembers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
915
|
-
limit?: string | number | undefined;
|
|
916
|
-
offset?: string | number | undefined;
|
|
917
|
-
sortBy?: string | undefined;
|
|
918
|
-
sortDirection?: "asc" | "desc" | undefined;
|
|
919
|
-
filterField?: string | undefined;
|
|
920
|
-
filterValue?: string | number | boolean | undefined;
|
|
921
|
-
filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
|
|
922
|
-
organizationId?: string | undefined;
|
|
923
|
-
organizationSlug?: string | undefined;
|
|
924
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
925
|
-
query?: {
|
|
926
|
-
limit?: string | number | undefined;
|
|
927
|
-
offset?: string | number | undefined;
|
|
928
|
-
sortBy?: string | undefined;
|
|
929
|
-
sortDirection?: "asc" | "desc" | undefined;
|
|
930
|
-
filterField?: string | undefined;
|
|
931
|
-
filterValue?: string | number | boolean | undefined;
|
|
932
|
-
filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
|
|
933
|
-
organizationId?: string | undefined;
|
|
934
|
-
organizationSlug?: string | undefined;
|
|
935
|
-
} | undefined;
|
|
936
|
-
fetchOptions?: FetchOptions | undefined;
|
|
937
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
938
|
-
members: ({
|
|
939
|
-
id: string;
|
|
940
|
-
organizationId: string;
|
|
941
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
942
|
-
createdAt: Date;
|
|
943
|
-
userId: string;
|
|
944
|
-
teamId?: string | undefined | undefined;
|
|
945
|
-
user: {
|
|
946
|
-
id: string;
|
|
947
|
-
email: string;
|
|
948
|
-
name: string;
|
|
949
|
-
image?: string | undefined;
|
|
950
|
-
};
|
|
951
|
-
} & {
|
|
952
|
-
user: {
|
|
953
|
-
id: string;
|
|
954
|
-
name: string;
|
|
955
|
-
email: string;
|
|
956
|
-
image: string | null | undefined;
|
|
957
|
-
};
|
|
958
|
-
})[];
|
|
959
|
-
total: number;
|
|
960
|
-
}, {
|
|
961
|
-
code?: string | undefined;
|
|
962
|
-
message?: string | undefined;
|
|
963
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
964
|
-
};
|
|
965
|
-
} & {
|
|
966
|
-
organization: {
|
|
967
|
-
getActiveMemberRole: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
968
|
-
userId?: string | undefined;
|
|
969
|
-
organizationId?: string | undefined;
|
|
970
|
-
organizationSlug?: string | undefined;
|
|
971
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
972
|
-
query?: {
|
|
973
|
-
userId?: string | undefined;
|
|
974
|
-
organizationId?: string | undefined;
|
|
975
|
-
organizationSlug?: string | undefined;
|
|
976
|
-
} | undefined;
|
|
977
|
-
fetchOptions?: FetchOptions | undefined;
|
|
978
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
979
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
980
|
-
}, {
|
|
981
|
-
code?: string | undefined;
|
|
982
|
-
message?: string | undefined;
|
|
983
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
984
|
-
};
|
|
985
|
-
} & {
|
|
986
|
-
organization: {
|
|
987
|
-
hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<({
|
|
988
|
-
permission: {
|
|
989
|
-
access?: string[] | undefined;
|
|
990
|
-
organization?: ("update" | "delete")[] | undefined;
|
|
991
|
-
member?: ("update" | "delete" | "create")[] | undefined;
|
|
992
|
-
invitation?: ("create" | "cancel")[] | undefined;
|
|
993
|
-
team?: ("update" | "delete" | "create")[] | undefined;
|
|
994
|
-
ac?: ("update" | "delete" | "create" | "read")[] | undefined;
|
|
995
|
-
};
|
|
996
|
-
permissions?: never | undefined;
|
|
997
|
-
} | {
|
|
998
|
-
permissions: {
|
|
999
|
-
access?: string[] | undefined;
|
|
1000
|
-
organization?: ("update" | "delete")[] | undefined;
|
|
1001
|
-
member?: ("update" | "delete" | "create")[] | undefined;
|
|
1002
|
-
invitation?: ("create" | "cancel")[] | undefined;
|
|
1003
|
-
team?: ("update" | "delete" | "create")[] | undefined;
|
|
1004
|
-
ac?: ("update" | "delete" | "create" | "read")[] | undefined;
|
|
1005
|
-
};
|
|
1006
|
-
permission?: never | undefined;
|
|
1007
|
-
}) & {
|
|
1008
|
-
organizationId?: string | undefined;
|
|
1009
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<(({
|
|
1010
|
-
permission: {
|
|
1011
|
-
access?: string[] | undefined;
|
|
1012
|
-
organization?: ("update" | "delete")[] | undefined;
|
|
1013
|
-
member?: ("update" | "delete" | "create")[] | undefined;
|
|
1014
|
-
invitation?: ("create" | "cancel")[] | undefined;
|
|
1015
|
-
team?: ("update" | "delete" | "create")[] | undefined;
|
|
1016
|
-
ac?: ("update" | "delete" | "create" | "read")[] | undefined;
|
|
1017
|
-
};
|
|
1018
|
-
permissions?: never | undefined;
|
|
1019
|
-
} | {
|
|
1020
|
-
permissions: {
|
|
1021
|
-
access?: string[] | undefined;
|
|
1022
|
-
organization?: ("update" | "delete")[] | undefined;
|
|
1023
|
-
member?: ("update" | "delete" | "create")[] | undefined;
|
|
1024
|
-
invitation?: ("create" | "cancel")[] | undefined;
|
|
1025
|
-
team?: ("update" | "delete" | "create")[] | undefined;
|
|
1026
|
-
ac?: ("update" | "delete" | "create" | "read")[] | undefined;
|
|
1027
|
-
};
|
|
1028
|
-
permission?: never | undefined;
|
|
1029
|
-
}) & {
|
|
1030
|
-
organizationId?: string | undefined;
|
|
1031
|
-
}) & {
|
|
1032
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1033
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1034
|
-
error: null;
|
|
1035
|
-
success: boolean;
|
|
1036
|
-
}, {
|
|
1037
|
-
code?: string | undefined;
|
|
1038
|
-
message?: string | undefined;
|
|
1039
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1040
|
-
};
|
|
1041
|
-
} & {
|
|
1042
|
-
organization: {
|
|
1043
|
-
createTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1044
|
-
name: string;
|
|
1045
|
-
organizationId?: string | undefined;
|
|
1046
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1047
|
-
name: string;
|
|
1048
|
-
organizationId?: string | undefined;
|
|
1049
|
-
} & {
|
|
1050
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1051
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1052
|
-
id: string;
|
|
1053
|
-
name: string;
|
|
1054
|
-
organizationId: string;
|
|
1055
|
-
createdAt: Date;
|
|
1056
|
-
updatedAt?: Date | undefined;
|
|
1057
|
-
}, {
|
|
1058
|
-
code?: string | undefined;
|
|
1059
|
-
message?: string | undefined;
|
|
1060
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1061
|
-
};
|
|
1062
|
-
} & {
|
|
1063
|
-
organization: {
|
|
1064
|
-
listTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
1065
|
-
organizationId?: string | undefined;
|
|
1066
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
1067
|
-
query?: {
|
|
1068
|
-
organizationId?: string | undefined;
|
|
1069
|
-
} | undefined;
|
|
1070
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1071
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1072
|
-
id: string;
|
|
1073
|
-
name: string;
|
|
1074
|
-
organizationId: string;
|
|
1075
|
-
createdAt: Date;
|
|
1076
|
-
updatedAt?: Date | undefined;
|
|
1077
|
-
}[], {
|
|
1078
|
-
code?: string | undefined;
|
|
1079
|
-
message?: string | undefined;
|
|
1080
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1081
|
-
};
|
|
1082
|
-
} & {
|
|
1083
|
-
organization: {
|
|
1084
|
-
removeTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1085
|
-
teamId: string;
|
|
1086
|
-
organizationId?: string | undefined;
|
|
1087
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1088
|
-
teamId: string;
|
|
1089
|
-
organizationId?: string | undefined;
|
|
1090
|
-
} & {
|
|
1091
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1092
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1093
|
-
message: string;
|
|
1094
|
-
}, {
|
|
1095
|
-
code?: string | undefined;
|
|
1096
|
-
message?: string | undefined;
|
|
1097
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1098
|
-
};
|
|
1099
|
-
} & {
|
|
1100
|
-
organization: {
|
|
1101
|
-
updateTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1102
|
-
teamId: string;
|
|
1103
|
-
data: Partial<{
|
|
1104
|
-
name: string;
|
|
1105
|
-
organizationId: string;
|
|
1106
|
-
}>;
|
|
1107
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1108
|
-
teamId: string;
|
|
1109
|
-
data: Partial<{
|
|
1110
|
-
name: string;
|
|
1111
|
-
organizationId: string;
|
|
1112
|
-
}>;
|
|
1113
|
-
} & {
|
|
1114
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1115
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1116
|
-
id: string;
|
|
1117
|
-
name: string;
|
|
1118
|
-
organizationId: string;
|
|
1119
|
-
createdAt: Date;
|
|
1120
|
-
updatedAt?: Date | undefined;
|
|
1121
|
-
}, {
|
|
1122
|
-
code?: string | undefined;
|
|
1123
|
-
message?: string | undefined;
|
|
1124
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1125
|
-
};
|
|
1126
|
-
} & {
|
|
1127
|
-
organization: {
|
|
1128
|
-
setActiveTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1129
|
-
teamId?: string | null | undefined;
|
|
1130
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
1131
|
-
teamId?: string | null | undefined;
|
|
1132
|
-
} & {
|
|
1133
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1134
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1135
|
-
id: string;
|
|
1136
|
-
name: string;
|
|
1137
|
-
organizationId: string;
|
|
1138
|
-
createdAt: Date;
|
|
1139
|
-
updatedAt?: Date | undefined;
|
|
1140
|
-
}, {
|
|
1141
|
-
code?: string | undefined;
|
|
1142
|
-
message?: string | undefined;
|
|
1143
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1144
|
-
};
|
|
1145
|
-
} & {
|
|
1146
|
-
organization: {
|
|
1147
|
-
listUserTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
1148
|
-
query?: Record<string, any> | undefined;
|
|
1149
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1150
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1151
|
-
id: string;
|
|
1152
|
-
name: string;
|
|
1153
|
-
organizationId: string;
|
|
1154
|
-
createdAt: Date;
|
|
1155
|
-
updatedAt?: Date | undefined;
|
|
1156
|
-
}[], {
|
|
1157
|
-
code?: string | undefined;
|
|
1158
|
-
message?: string | undefined;
|
|
1159
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1160
|
-
};
|
|
1161
|
-
} & {
|
|
1162
|
-
organization: {
|
|
1163
|
-
listTeamMembers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
1164
|
-
teamId?: string | undefined;
|
|
1165
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
1166
|
-
query?: {
|
|
1167
|
-
teamId?: string | undefined;
|
|
1168
|
-
} | undefined;
|
|
1169
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1170
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1171
|
-
id: string;
|
|
1172
|
-
teamId: string;
|
|
1173
|
-
userId: string;
|
|
1174
|
-
createdAt: Date;
|
|
1175
|
-
}[], {
|
|
1176
|
-
code?: string | undefined;
|
|
1177
|
-
message?: string | undefined;
|
|
1178
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1179
|
-
};
|
|
1180
|
-
} & {
|
|
1181
|
-
organization: {
|
|
1182
|
-
addTeamMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1183
|
-
teamId: string;
|
|
1184
|
-
userId: unknown;
|
|
1185
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1186
|
-
teamId: string;
|
|
1187
|
-
userId: unknown;
|
|
1188
|
-
} & {
|
|
1189
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1190
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1191
|
-
id: string;
|
|
1192
|
-
teamId: string;
|
|
1193
|
-
userId: string;
|
|
1194
|
-
createdAt: Date;
|
|
1195
|
-
}, {
|
|
1196
|
-
code?: string | undefined;
|
|
1197
|
-
message?: string | undefined;
|
|
1198
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1199
|
-
};
|
|
1200
|
-
} & {
|
|
1201
|
-
organization: {
|
|
1202
|
-
removeTeamMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1203
|
-
teamId: string;
|
|
1204
|
-
userId: unknown;
|
|
1205
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1206
|
-
teamId: string;
|
|
1207
|
-
userId: unknown;
|
|
1208
|
-
} & {
|
|
1209
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1210
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1211
|
-
message: string;
|
|
1212
|
-
}, {
|
|
1213
|
-
code?: string | undefined;
|
|
1214
|
-
message?: string | undefined;
|
|
1215
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1216
|
-
};
|
|
1217
|
-
} & {
|
|
1218
|
-
sso: {
|
|
1219
|
-
saml2: {
|
|
1220
|
-
sp: {
|
|
1221
|
-
metadata: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
1222
|
-
providerId: string;
|
|
1223
|
-
format?: "json" | "xml" | undefined;
|
|
1224
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1225
|
-
query: {
|
|
1226
|
-
providerId: string;
|
|
1227
|
-
format?: "json" | "xml" | undefined;
|
|
1228
|
-
};
|
|
1229
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1230
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Response, {
|
|
1231
|
-
code?: string | undefined;
|
|
1232
|
-
message?: string | undefined;
|
|
1233
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1234
|
-
};
|
|
1235
|
-
};
|
|
1236
|
-
};
|
|
1237
|
-
} & {
|
|
1238
|
-
sso: {
|
|
1239
|
-
register: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1240
|
-
providerId: string;
|
|
1241
|
-
issuer: string;
|
|
1242
|
-
domain: string;
|
|
1243
|
-
oidcConfig?: {
|
|
1244
|
-
clientId: string;
|
|
1245
|
-
clientSecret: string;
|
|
1246
|
-
authorizationEndpoint?: string | undefined;
|
|
1247
|
-
tokenEndpoint?: string | undefined;
|
|
1248
|
-
userInfoEndpoint?: string | undefined;
|
|
1249
|
-
tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
|
|
1250
|
-
jwksEndpoint?: string | undefined;
|
|
1251
|
-
discoveryEndpoint?: string | undefined;
|
|
1252
|
-
skipDiscovery?: boolean | undefined;
|
|
1253
|
-
scopes?: string[] | undefined;
|
|
1254
|
-
pkce?: boolean | undefined;
|
|
1255
|
-
mapping?: {
|
|
1256
|
-
id: string;
|
|
1257
|
-
email: string;
|
|
1258
|
-
name: string;
|
|
1259
|
-
emailVerified?: string | undefined;
|
|
1260
|
-
image?: string | undefined;
|
|
1261
|
-
extraFields?: Record<string, any> | undefined;
|
|
1262
|
-
} | undefined;
|
|
1263
|
-
} | undefined;
|
|
1264
|
-
samlConfig?: {
|
|
1265
|
-
entryPoint: string;
|
|
1266
|
-
cert: string;
|
|
1267
|
-
callbackUrl: string;
|
|
1268
|
-
spMetadata: {
|
|
1269
|
-
metadata?: string | undefined;
|
|
1270
|
-
entityID?: string | undefined;
|
|
1271
|
-
binding?: string | undefined;
|
|
1272
|
-
privateKey?: string | undefined;
|
|
1273
|
-
privateKeyPass?: string | undefined;
|
|
1274
|
-
isAssertionEncrypted?: boolean | undefined;
|
|
1275
|
-
encPrivateKey?: string | undefined;
|
|
1276
|
-
encPrivateKeyPass?: string | undefined;
|
|
1277
|
-
};
|
|
1278
|
-
audience?: string | undefined;
|
|
1279
|
-
idpMetadata?: {
|
|
1280
|
-
metadata?: string | undefined;
|
|
1281
|
-
entityID?: string | undefined;
|
|
1282
|
-
cert?: string | undefined;
|
|
1283
|
-
privateKey?: string | undefined;
|
|
1284
|
-
privateKeyPass?: string | undefined;
|
|
1285
|
-
isAssertionEncrypted?: boolean | undefined;
|
|
1286
|
-
encPrivateKey?: string | undefined;
|
|
1287
|
-
encPrivateKeyPass?: string | undefined;
|
|
1288
|
-
singleSignOnService?: {
|
|
1289
|
-
Binding: string;
|
|
1290
|
-
Location: string;
|
|
1291
|
-
}[] | undefined;
|
|
1292
|
-
} | undefined;
|
|
1293
|
-
wantAssertionsSigned?: boolean | undefined;
|
|
1294
|
-
signatureAlgorithm?: string | undefined;
|
|
1295
|
-
digestAlgorithm?: string | undefined;
|
|
1296
|
-
identifierFormat?: string | undefined;
|
|
1297
|
-
privateKey?: string | undefined;
|
|
1298
|
-
decryptionPvk?: string | undefined;
|
|
1299
|
-
additionalParams?: Record<string, any> | undefined;
|
|
1300
|
-
mapping?: {
|
|
1301
|
-
id: string;
|
|
1302
|
-
email: string;
|
|
1303
|
-
name: string;
|
|
1304
|
-
emailVerified?: string | undefined;
|
|
1305
|
-
firstName?: string | undefined;
|
|
1306
|
-
lastName?: string | undefined;
|
|
1307
|
-
extraFields?: Record<string, any> | undefined;
|
|
1308
|
-
} | undefined;
|
|
1309
|
-
} | undefined;
|
|
1310
|
-
organizationId?: string | undefined;
|
|
1311
|
-
overrideUserInfo?: boolean | undefined;
|
|
1312
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1313
|
-
providerId: string;
|
|
1314
|
-
issuer: string;
|
|
1315
|
-
domain: string;
|
|
1316
|
-
oidcConfig?: {
|
|
1317
|
-
clientId: string;
|
|
1318
|
-
clientSecret: string;
|
|
1319
|
-
authorizationEndpoint?: string | undefined;
|
|
1320
|
-
tokenEndpoint?: string | undefined;
|
|
1321
|
-
userInfoEndpoint?: string | undefined;
|
|
1322
|
-
tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
|
|
1323
|
-
jwksEndpoint?: string | undefined;
|
|
1324
|
-
discoveryEndpoint?: string | undefined;
|
|
1325
|
-
skipDiscovery?: boolean | undefined;
|
|
1326
|
-
scopes?: string[] | undefined;
|
|
1327
|
-
pkce?: boolean | undefined;
|
|
1328
|
-
mapping?: {
|
|
1329
|
-
id: string;
|
|
1330
|
-
email: string;
|
|
1331
|
-
name: string;
|
|
1332
|
-
emailVerified?: string | undefined;
|
|
1333
|
-
image?: string | undefined;
|
|
1334
|
-
extraFields?: Record<string, any> | undefined;
|
|
1335
|
-
} | undefined;
|
|
1336
|
-
} | undefined;
|
|
1337
|
-
samlConfig?: {
|
|
1338
|
-
entryPoint: string;
|
|
1339
|
-
cert: string;
|
|
1340
|
-
callbackUrl: string;
|
|
1341
|
-
spMetadata: {
|
|
1342
|
-
metadata?: string | undefined;
|
|
1343
|
-
entityID?: string | undefined;
|
|
1344
|
-
binding?: string | undefined;
|
|
1345
|
-
privateKey?: string | undefined;
|
|
1346
|
-
privateKeyPass?: string | undefined;
|
|
1347
|
-
isAssertionEncrypted?: boolean | undefined;
|
|
1348
|
-
encPrivateKey?: string | undefined;
|
|
1349
|
-
encPrivateKeyPass?: string | undefined;
|
|
1350
|
-
};
|
|
1351
|
-
audience?: string | undefined;
|
|
1352
|
-
idpMetadata?: {
|
|
1353
|
-
metadata?: string | undefined;
|
|
1354
|
-
entityID?: string | undefined;
|
|
1355
|
-
cert?: string | undefined;
|
|
1356
|
-
privateKey?: string | undefined;
|
|
1357
|
-
privateKeyPass?: string | undefined;
|
|
1358
|
-
isAssertionEncrypted?: boolean | undefined;
|
|
1359
|
-
encPrivateKey?: string | undefined;
|
|
1360
|
-
encPrivateKeyPass?: string | undefined;
|
|
1361
|
-
singleSignOnService?: {
|
|
1362
|
-
Binding: string;
|
|
1363
|
-
Location: string;
|
|
1364
|
-
}[] | undefined;
|
|
1365
|
-
} | undefined;
|
|
1366
|
-
wantAssertionsSigned?: boolean | undefined;
|
|
1367
|
-
signatureAlgorithm?: string | undefined;
|
|
1368
|
-
digestAlgorithm?: string | undefined;
|
|
1369
|
-
identifierFormat?: string | undefined;
|
|
1370
|
-
privateKey?: string | undefined;
|
|
1371
|
-
decryptionPvk?: string | undefined;
|
|
1372
|
-
additionalParams?: Record<string, any> | undefined;
|
|
1373
|
-
mapping?: {
|
|
1374
|
-
id: string;
|
|
1375
|
-
email: string;
|
|
1376
|
-
name: string;
|
|
1377
|
-
emailVerified?: string | undefined;
|
|
1378
|
-
firstName?: string | undefined;
|
|
1379
|
-
lastName?: string | undefined;
|
|
1380
|
-
extraFields?: Record<string, any> | undefined;
|
|
1381
|
-
} | undefined;
|
|
1382
|
-
} | undefined;
|
|
1383
|
-
organizationId?: string | undefined;
|
|
1384
|
-
overrideUserInfo?: boolean | undefined;
|
|
1385
|
-
} & {
|
|
1386
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1387
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
1388
|
-
redirectURI: string;
|
|
1389
|
-
oidcConfig: _better_auth_sso.OIDCConfig | null;
|
|
1390
|
-
samlConfig: _better_auth_sso.SAMLConfig | null;
|
|
1391
|
-
} & Omit<{
|
|
1392
|
-
issuer: string;
|
|
1393
|
-
oidcConfig?: _better_auth_sso.OIDCConfig | undefined;
|
|
1394
|
-
samlConfig?: _better_auth_sso.SAMLConfig | undefined;
|
|
1395
|
-
userId: string;
|
|
1396
|
-
providerId: string;
|
|
1397
|
-
organizationId?: string | undefined;
|
|
1398
|
-
domain: string;
|
|
1399
|
-
}, "oidcConfig" | "samlConfig">>, {
|
|
1400
|
-
code?: string | undefined;
|
|
1401
|
-
message?: string | undefined;
|
|
1402
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1403
|
-
};
|
|
1404
|
-
} & {
|
|
1405
|
-
signIn: {
|
|
1406
|
-
sso: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1407
|
-
callbackURL: string;
|
|
1408
|
-
email?: string | undefined;
|
|
1409
|
-
organizationSlug?: string | undefined;
|
|
1410
|
-
providerId?: string | undefined;
|
|
1411
|
-
domain?: string | undefined;
|
|
1412
|
-
errorCallbackURL?: string | undefined;
|
|
1413
|
-
newUserCallbackURL?: string | undefined;
|
|
1414
|
-
scopes?: string[] | undefined;
|
|
1415
|
-
loginHint?: string | undefined;
|
|
1416
|
-
requestSignUp?: boolean | undefined;
|
|
1417
|
-
providerType?: "saml" | "oidc" | undefined;
|
|
1418
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1419
|
-
callbackURL: string;
|
|
1420
|
-
email?: string | undefined;
|
|
1421
|
-
organizationSlug?: string | undefined;
|
|
1422
|
-
providerId?: string | undefined;
|
|
1423
|
-
domain?: string | undefined;
|
|
1424
|
-
errorCallbackURL?: string | undefined;
|
|
1425
|
-
newUserCallbackURL?: string | undefined;
|
|
1426
|
-
scopes?: string[] | undefined;
|
|
1427
|
-
loginHint?: string | undefined;
|
|
1428
|
-
requestSignUp?: boolean | undefined;
|
|
1429
|
-
providerType?: "saml" | "oidc" | undefined;
|
|
1430
|
-
} & {
|
|
1431
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1432
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1433
|
-
url: string;
|
|
1434
|
-
redirect: boolean;
|
|
1435
|
-
}, {
|
|
1436
|
-
code?: string | undefined;
|
|
1437
|
-
message?: string | undefined;
|
|
1438
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1439
|
-
};
|
|
1440
|
-
} & {
|
|
1441
|
-
sso: {
|
|
1442
|
-
providers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
1443
|
-
query?: Record<string, any> | undefined;
|
|
1444
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1445
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1446
|
-
providers: {
|
|
1447
|
-
providerId: string;
|
|
1448
|
-
type: string;
|
|
1449
|
-
issuer: string;
|
|
1450
|
-
domain: string;
|
|
1451
|
-
organizationId: string | null;
|
|
1452
|
-
domainVerified: boolean;
|
|
1453
|
-
oidcConfig: {
|
|
1454
|
-
discoveryEndpoint: string;
|
|
1455
|
-
clientIdLastFour: string;
|
|
1456
|
-
pkce: boolean;
|
|
1457
|
-
authorizationEndpoint: string | undefined;
|
|
1458
|
-
tokenEndpoint: string | undefined;
|
|
1459
|
-
userInfoEndpoint: string | undefined;
|
|
1460
|
-
jwksEndpoint: string | undefined;
|
|
1461
|
-
scopes: string[] | undefined;
|
|
1462
|
-
tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
|
|
1463
|
-
} | undefined;
|
|
1464
|
-
samlConfig: {
|
|
1465
|
-
entryPoint: string;
|
|
1466
|
-
callbackUrl: string;
|
|
1467
|
-
audience: string | undefined;
|
|
1468
|
-
wantAssertionsSigned: boolean | undefined;
|
|
1469
|
-
identifierFormat: string | undefined;
|
|
1470
|
-
signatureAlgorithm: string | undefined;
|
|
1471
|
-
digestAlgorithm: string | undefined;
|
|
1472
|
-
certificate: {
|
|
1473
|
-
fingerprintSha256: string;
|
|
1474
|
-
notBefore: string;
|
|
1475
|
-
notAfter: string;
|
|
1476
|
-
publicKeyAlgorithm: string;
|
|
1477
|
-
} | {
|
|
1478
|
-
error: string;
|
|
1479
|
-
};
|
|
1480
|
-
} | undefined;
|
|
1481
|
-
spMetadataUrl: string;
|
|
1482
|
-
}[];
|
|
1483
|
-
}, {
|
|
1484
|
-
code?: string | undefined;
|
|
1485
|
-
message?: string | undefined;
|
|
1486
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1487
|
-
};
|
|
1488
|
-
} & {
|
|
1489
|
-
sso: {
|
|
1490
|
-
providers: {
|
|
1491
|
-
":providerid": <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, {
|
|
1492
|
-
providerId: string;
|
|
1493
|
-
}>>(data_0?: better_auth.Prettify<{
|
|
1494
|
-
query?: Record<string, any> | undefined;
|
|
1495
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1496
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1497
|
-
providerId: string;
|
|
1498
|
-
type: string;
|
|
1499
|
-
issuer: string;
|
|
1500
|
-
domain: string;
|
|
1501
|
-
organizationId: string | null;
|
|
1502
|
-
domainVerified: boolean;
|
|
1503
|
-
oidcConfig: {
|
|
1504
|
-
discoveryEndpoint: string;
|
|
1505
|
-
clientIdLastFour: string;
|
|
1506
|
-
pkce: boolean;
|
|
1507
|
-
authorizationEndpoint: string | undefined;
|
|
1508
|
-
tokenEndpoint: string | undefined;
|
|
1509
|
-
userInfoEndpoint: string | undefined;
|
|
1510
|
-
jwksEndpoint: string | undefined;
|
|
1511
|
-
scopes: string[] | undefined;
|
|
1512
|
-
tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
|
|
1513
|
-
} | undefined;
|
|
1514
|
-
samlConfig: {
|
|
1515
|
-
entryPoint: string;
|
|
1516
|
-
callbackUrl: string;
|
|
1517
|
-
audience: string | undefined;
|
|
1518
|
-
wantAssertionsSigned: boolean | undefined;
|
|
1519
|
-
identifierFormat: string | undefined;
|
|
1520
|
-
signatureAlgorithm: string | undefined;
|
|
1521
|
-
digestAlgorithm: string | undefined;
|
|
1522
|
-
certificate: {
|
|
1523
|
-
fingerprintSha256: string;
|
|
1524
|
-
notBefore: string;
|
|
1525
|
-
notAfter: string;
|
|
1526
|
-
publicKeyAlgorithm: string;
|
|
1527
|
-
} | {
|
|
1528
|
-
error: string;
|
|
1529
|
-
};
|
|
1530
|
-
} | undefined;
|
|
1531
|
-
spMetadataUrl: string;
|
|
1532
|
-
}, {
|
|
1533
|
-
code?: string | undefined;
|
|
1534
|
-
message?: string | undefined;
|
|
1535
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1536
|
-
};
|
|
1537
|
-
};
|
|
1538
|
-
} & {
|
|
1539
|
-
sso: {
|
|
1540
|
-
providers: {
|
|
1541
|
-
":providerid": <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1542
|
-
issuer?: string | undefined;
|
|
1543
|
-
domain?: string | undefined;
|
|
1544
|
-
oidcConfig?: {
|
|
1545
|
-
clientId?: string | undefined;
|
|
1546
|
-
clientSecret?: string | undefined;
|
|
1547
|
-
authorizationEndpoint?: string | undefined;
|
|
1548
|
-
tokenEndpoint?: string | undefined;
|
|
1549
|
-
userInfoEndpoint?: string | undefined;
|
|
1550
|
-
tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
|
|
1551
|
-
jwksEndpoint?: string | undefined;
|
|
1552
|
-
discoveryEndpoint?: string | undefined;
|
|
1553
|
-
scopes?: string[] | undefined;
|
|
1554
|
-
pkce?: boolean | undefined;
|
|
1555
|
-
overrideUserInfo?: boolean | undefined;
|
|
1556
|
-
mapping?: {
|
|
1557
|
-
id?: string | undefined;
|
|
1558
|
-
email?: string | undefined;
|
|
1559
|
-
emailVerified?: string | undefined;
|
|
1560
|
-
name?: string | undefined;
|
|
1561
|
-
image?: string | undefined;
|
|
1562
|
-
extraFields?: Record<string, any> | undefined;
|
|
1563
|
-
} | undefined;
|
|
1564
|
-
} | undefined;
|
|
1565
|
-
samlConfig?: {
|
|
1566
|
-
entryPoint?: string | undefined;
|
|
1567
|
-
cert?: string | undefined;
|
|
1568
|
-
callbackUrl?: string | undefined;
|
|
1569
|
-
audience?: string | undefined;
|
|
1570
|
-
idpMetadata?: {
|
|
1571
|
-
metadata?: string | undefined;
|
|
1572
|
-
entityID?: string | undefined;
|
|
1573
|
-
cert?: string | undefined;
|
|
1574
|
-
privateKey?: string | undefined;
|
|
1575
|
-
privateKeyPass?: string | undefined;
|
|
1576
|
-
isAssertionEncrypted?: boolean | undefined;
|
|
1577
|
-
encPrivateKey?: string | undefined;
|
|
1578
|
-
encPrivateKeyPass?: string | undefined;
|
|
1579
|
-
singleSignOnService?: {
|
|
1580
|
-
Binding: string;
|
|
1581
|
-
Location: string;
|
|
1582
|
-
}[] | undefined;
|
|
1583
|
-
} | undefined;
|
|
1584
|
-
spMetadata?: {
|
|
1585
|
-
metadata?: string | undefined;
|
|
1586
|
-
entityID?: string | undefined;
|
|
1587
|
-
binding?: string | undefined;
|
|
1588
|
-
privateKey?: string | undefined;
|
|
1589
|
-
privateKeyPass?: string | undefined;
|
|
1590
|
-
isAssertionEncrypted?: boolean | undefined;
|
|
1591
|
-
encPrivateKey?: string | undefined;
|
|
1592
|
-
encPrivateKeyPass?: string | undefined;
|
|
1593
|
-
} | undefined;
|
|
1594
|
-
wantAssertionsSigned?: boolean | undefined;
|
|
1595
|
-
signatureAlgorithm?: string | undefined;
|
|
1596
|
-
digestAlgorithm?: string | undefined;
|
|
1597
|
-
identifierFormat?: string | undefined;
|
|
1598
|
-
privateKey?: string | undefined;
|
|
1599
|
-
decryptionPvk?: string | undefined;
|
|
1600
|
-
additionalParams?: Record<string, any> | undefined;
|
|
1601
|
-
mapping?: {
|
|
1602
|
-
id?: string | undefined;
|
|
1603
|
-
email?: string | undefined;
|
|
1604
|
-
emailVerified?: string | undefined;
|
|
1605
|
-
name?: string | undefined;
|
|
1606
|
-
firstName?: string | undefined;
|
|
1607
|
-
lastName?: string | undefined;
|
|
1608
|
-
extraFields?: Record<string, any> | undefined;
|
|
1609
|
-
} | undefined;
|
|
1610
|
-
} | undefined;
|
|
1611
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, {
|
|
1612
|
-
providerId: string;
|
|
1613
|
-
}>>(data_0?: better_auth.Prettify<{
|
|
1614
|
-
issuer?: string | undefined;
|
|
1615
|
-
domain?: string | undefined;
|
|
1616
|
-
oidcConfig?: {
|
|
1617
|
-
clientId?: string | undefined;
|
|
1618
|
-
clientSecret?: string | undefined;
|
|
1619
|
-
authorizationEndpoint?: string | undefined;
|
|
1620
|
-
tokenEndpoint?: string | undefined;
|
|
1621
|
-
userInfoEndpoint?: string | undefined;
|
|
1622
|
-
tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
|
|
1623
|
-
jwksEndpoint?: string | undefined;
|
|
1624
|
-
discoveryEndpoint?: string | undefined;
|
|
1625
|
-
scopes?: string[] | undefined;
|
|
1626
|
-
pkce?: boolean | undefined;
|
|
1627
|
-
overrideUserInfo?: boolean | undefined;
|
|
1628
|
-
mapping?: {
|
|
1629
|
-
id?: string | undefined;
|
|
1630
|
-
email?: string | undefined;
|
|
1631
|
-
emailVerified?: string | undefined;
|
|
1632
|
-
name?: string | undefined;
|
|
1633
|
-
image?: string | undefined;
|
|
1634
|
-
extraFields?: Record<string, any> | undefined;
|
|
1635
|
-
} | undefined;
|
|
1636
|
-
} | undefined;
|
|
1637
|
-
samlConfig?: {
|
|
1638
|
-
entryPoint?: string | undefined;
|
|
1639
|
-
cert?: string | undefined;
|
|
1640
|
-
callbackUrl?: string | undefined;
|
|
1641
|
-
audience?: string | undefined;
|
|
1642
|
-
idpMetadata?: {
|
|
1643
|
-
metadata?: string | undefined;
|
|
1644
|
-
entityID?: string | undefined;
|
|
1645
|
-
cert?: string | undefined;
|
|
1646
|
-
privateKey?: string | undefined;
|
|
1647
|
-
privateKeyPass?: string | undefined;
|
|
1648
|
-
isAssertionEncrypted?: boolean | undefined;
|
|
1649
|
-
encPrivateKey?: string | undefined;
|
|
1650
|
-
encPrivateKeyPass?: string | undefined;
|
|
1651
|
-
singleSignOnService?: {
|
|
1652
|
-
Binding: string;
|
|
1653
|
-
Location: string;
|
|
1654
|
-
}[] | undefined;
|
|
1655
|
-
} | undefined;
|
|
1656
|
-
spMetadata?: {
|
|
1657
|
-
metadata?: string | undefined;
|
|
1658
|
-
entityID?: string | undefined;
|
|
1659
|
-
binding?: string | undefined;
|
|
1660
|
-
privateKey?: string | undefined;
|
|
1661
|
-
privateKeyPass?: string | undefined;
|
|
1662
|
-
isAssertionEncrypted?: boolean | undefined;
|
|
1663
|
-
encPrivateKey?: string | undefined;
|
|
1664
|
-
encPrivateKeyPass?: string | undefined;
|
|
1665
|
-
} | undefined;
|
|
1666
|
-
wantAssertionsSigned?: boolean | undefined;
|
|
1667
|
-
signatureAlgorithm?: string | undefined;
|
|
1668
|
-
digestAlgorithm?: string | undefined;
|
|
1669
|
-
identifierFormat?: string | undefined;
|
|
1670
|
-
privateKey?: string | undefined;
|
|
1671
|
-
decryptionPvk?: string | undefined;
|
|
1672
|
-
additionalParams?: Record<string, any> | undefined;
|
|
1673
|
-
mapping?: {
|
|
1674
|
-
id?: string | undefined;
|
|
1675
|
-
email?: string | undefined;
|
|
1676
|
-
emailVerified?: string | undefined;
|
|
1677
|
-
name?: string | undefined;
|
|
1678
|
-
firstName?: string | undefined;
|
|
1679
|
-
lastName?: string | undefined;
|
|
1680
|
-
extraFields?: Record<string, any> | undefined;
|
|
1681
|
-
} | undefined;
|
|
1682
|
-
} | undefined;
|
|
1683
|
-
} & {
|
|
1684
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1685
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1686
|
-
providerId: string;
|
|
1687
|
-
type: string;
|
|
1688
|
-
issuer: string;
|
|
1689
|
-
domain: string;
|
|
1690
|
-
organizationId: string | null;
|
|
1691
|
-
domainVerified: boolean;
|
|
1692
|
-
oidcConfig: {
|
|
1693
|
-
discoveryEndpoint: string;
|
|
1694
|
-
clientIdLastFour: string;
|
|
1695
|
-
pkce: boolean;
|
|
1696
|
-
authorizationEndpoint: string | undefined;
|
|
1697
|
-
tokenEndpoint: string | undefined;
|
|
1698
|
-
userInfoEndpoint: string | undefined;
|
|
1699
|
-
jwksEndpoint: string | undefined;
|
|
1700
|
-
scopes: string[] | undefined;
|
|
1701
|
-
tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
|
|
1702
|
-
} | undefined;
|
|
1703
|
-
samlConfig: {
|
|
1704
|
-
entryPoint: string;
|
|
1705
|
-
callbackUrl: string;
|
|
1706
|
-
audience: string | undefined;
|
|
1707
|
-
wantAssertionsSigned: boolean | undefined;
|
|
1708
|
-
identifierFormat: string | undefined;
|
|
1709
|
-
signatureAlgorithm: string | undefined;
|
|
1710
|
-
digestAlgorithm: string | undefined;
|
|
1711
|
-
certificate: {
|
|
1712
|
-
fingerprintSha256: string;
|
|
1713
|
-
notBefore: string;
|
|
1714
|
-
notAfter: string;
|
|
1715
|
-
publicKeyAlgorithm: string;
|
|
1716
|
-
} | {
|
|
1717
|
-
error: string;
|
|
1718
|
-
};
|
|
1719
|
-
} | undefined;
|
|
1720
|
-
spMetadataUrl: string;
|
|
1721
|
-
}, {
|
|
1722
|
-
code?: string | undefined;
|
|
1723
|
-
message?: string | undefined;
|
|
1724
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1725
|
-
};
|
|
1726
|
-
};
|
|
1727
|
-
} & {
|
|
1728
|
-
sso: {
|
|
1729
|
-
providers: {
|
|
1730
|
-
":providerid": <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, {
|
|
1731
|
-
providerId: string;
|
|
1732
|
-
}>>(data_0?: better_auth.Prettify<{
|
|
1733
|
-
query?: Record<string, any> | undefined;
|
|
1734
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1735
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1736
|
-
success: boolean;
|
|
1737
|
-
}, {
|
|
1738
|
-
code?: string | undefined;
|
|
1739
|
-
message?: string | undefined;
|
|
1740
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1741
|
-
};
|
|
1742
|
-
};
|
|
1743
|
-
} & {
|
|
1744
|
-
twoFactor: {
|
|
1745
|
-
enable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1746
|
-
password: string;
|
|
1747
|
-
issuer?: string | undefined;
|
|
1748
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1749
|
-
password: string;
|
|
1750
|
-
issuer?: string | undefined;
|
|
1751
|
-
} & {
|
|
1752
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1753
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1754
|
-
totpURI: string;
|
|
1755
|
-
backupCodes: string[];
|
|
1756
|
-
}, {
|
|
1757
|
-
code?: string | undefined;
|
|
1758
|
-
message?: string | undefined;
|
|
1759
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1760
|
-
};
|
|
1761
|
-
} & {
|
|
1762
|
-
twoFactor: {
|
|
1763
|
-
disable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1764
|
-
password: string;
|
|
1765
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1766
|
-
password: string;
|
|
1767
|
-
} & {
|
|
1768
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1769
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1770
|
-
status: boolean;
|
|
1771
|
-
}, {
|
|
1772
|
-
code?: string | undefined;
|
|
1773
|
-
message?: string | undefined;
|
|
1774
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1775
|
-
};
|
|
1776
|
-
} & {
|
|
1777
|
-
twoFactor: {
|
|
1778
|
-
verifyBackupCode: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1779
|
-
code: string;
|
|
1780
|
-
disableSession?: boolean | undefined;
|
|
1781
|
-
trustDevice?: boolean | undefined;
|
|
1782
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1783
|
-
code: string;
|
|
1784
|
-
disableSession?: boolean | undefined;
|
|
1785
|
-
trustDevice?: boolean | undefined;
|
|
1786
|
-
} & {
|
|
1787
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1788
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1789
|
-
token: string | undefined;
|
|
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
|
-
}) | better_auth_plugins.UserWithTwoFactor;
|
|
1799
|
-
}, {
|
|
1800
|
-
code?: string | undefined;
|
|
1801
|
-
message?: string | undefined;
|
|
1802
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1803
|
-
};
|
|
1804
|
-
} & {
|
|
1805
|
-
twoFactor: {
|
|
1806
|
-
generateBackupCodes: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1807
|
-
password: string;
|
|
1808
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1809
|
-
password: string;
|
|
1810
|
-
} & {
|
|
1811
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1812
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1813
|
-
status: boolean;
|
|
1814
|
-
backupCodes: string[];
|
|
1815
|
-
}, {
|
|
1816
|
-
code?: string | undefined;
|
|
1817
|
-
message?: string | undefined;
|
|
1818
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1819
|
-
};
|
|
1820
|
-
} & {
|
|
1821
|
-
twoFactor: {
|
|
1822
|
-
sendOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1823
|
-
trustDevice?: boolean | undefined;
|
|
1824
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
1825
|
-
query?: Record<string, any> | undefined;
|
|
1826
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1827
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1828
|
-
status: boolean;
|
|
1829
|
-
}, {
|
|
1830
|
-
code?: string | undefined;
|
|
1831
|
-
message?: string | undefined;
|
|
1832
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1833
|
-
};
|
|
1834
|
-
} & {
|
|
1835
|
-
twoFactor: {
|
|
1836
|
-
verifyOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1837
|
-
code: string;
|
|
1838
|
-
trustDevice?: boolean | undefined;
|
|
1839
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1840
|
-
code: string;
|
|
1841
|
-
trustDevice?: boolean | undefined;
|
|
1842
|
-
} & {
|
|
1843
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1844
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
1845
|
-
token: string;
|
|
1846
|
-
user: better_auth_plugins.UserWithTwoFactor;
|
|
1847
|
-
} | {
|
|
1848
|
-
token: string;
|
|
1849
|
-
user: Record<string, any> & {
|
|
1850
|
-
id: string;
|
|
1851
|
-
createdAt: Date;
|
|
1852
|
-
updatedAt: Date;
|
|
1853
|
-
email: string;
|
|
1854
|
-
emailVerified: boolean;
|
|
1855
|
-
name: string;
|
|
1856
|
-
image?: string | null | undefined;
|
|
1857
|
-
};
|
|
1858
|
-
}>, {
|
|
1859
|
-
code?: string | undefined;
|
|
1860
|
-
message?: string | undefined;
|
|
1861
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1862
|
-
};
|
|
1863
|
-
} & {
|
|
1864
|
-
twoFactor: {
|
|
1865
|
-
getTotpUri: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1866
|
-
password: string;
|
|
1867
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1868
|
-
password: string;
|
|
1869
|
-
} & {
|
|
1870
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1871
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1872
|
-
totpURI: string;
|
|
1873
|
-
}, {
|
|
1874
|
-
code?: string | undefined;
|
|
1875
|
-
message?: string | undefined;
|
|
1876
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1877
|
-
};
|
|
1878
|
-
} & {
|
|
1879
|
-
twoFactor: {
|
|
1880
|
-
verifyTotp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1881
|
-
code: string;
|
|
1882
|
-
trustDevice?: boolean | undefined;
|
|
1883
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1884
|
-
code: string;
|
|
1885
|
-
trustDevice?: boolean | undefined;
|
|
1886
|
-
} & {
|
|
1887
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1888
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
1889
|
-
token: string;
|
|
1890
|
-
user: better_auth_plugins.UserWithTwoFactor;
|
|
1891
|
-
} | {
|
|
1892
|
-
token: string;
|
|
1893
|
-
user: Record<string, any> & {
|
|
1894
|
-
id: string;
|
|
1895
|
-
createdAt: Date;
|
|
1896
|
-
updatedAt: Date;
|
|
1897
|
-
email: string;
|
|
1898
|
-
emailVerified: boolean;
|
|
1899
|
-
name: string;
|
|
1900
|
-
image?: string | null | undefined;
|
|
1901
|
-
};
|
|
1902
|
-
}>, {
|
|
1903
|
-
code?: string | undefined;
|
|
1904
|
-
message?: string | undefined;
|
|
1905
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1906
|
-
};
|
|
1907
|
-
} & {
|
|
1908
|
-
token: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
1909
|
-
query?: Record<string, any> | undefined;
|
|
1910
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1911
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1912
|
-
token: string;
|
|
1913
|
-
}, {
|
|
1914
|
-
code?: string | undefined;
|
|
1915
|
-
message?: string | undefined;
|
|
1916
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1917
|
-
} & {
|
|
1918
|
-
apiKey: {
|
|
1919
|
-
create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1920
|
-
name?: string | undefined;
|
|
1921
|
-
expiresIn?: number | null | undefined;
|
|
1922
|
-
userId?: unknown;
|
|
1923
|
-
prefix?: string | undefined;
|
|
1924
|
-
remaining?: number | null | undefined;
|
|
1925
|
-
metadata?: any;
|
|
1926
|
-
refillAmount?: number | undefined;
|
|
1927
|
-
refillInterval?: number | undefined;
|
|
1928
|
-
rateLimitTimeWindow?: number | undefined;
|
|
1929
|
-
rateLimitMax?: number | undefined;
|
|
1930
|
-
rateLimitEnabled?: boolean | undefined;
|
|
1931
|
-
permissions?: Record<string, string[]> | undefined;
|
|
1932
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
1933
|
-
name?: string | undefined;
|
|
1934
|
-
expiresIn?: number | null | undefined;
|
|
1935
|
-
userId?: unknown;
|
|
1936
|
-
prefix?: string | undefined;
|
|
1937
|
-
remaining?: number | null | undefined;
|
|
1938
|
-
metadata?: any;
|
|
1939
|
-
refillAmount?: number | undefined;
|
|
1940
|
-
refillInterval?: number | undefined;
|
|
1941
|
-
rateLimitTimeWindow?: number | undefined;
|
|
1942
|
-
rateLimitMax?: number | undefined;
|
|
1943
|
-
rateLimitEnabled?: boolean | undefined;
|
|
1944
|
-
permissions?: Record<string, string[]> | undefined;
|
|
1945
|
-
} & {
|
|
1946
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1947
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1948
|
-
key: string;
|
|
1949
|
-
metadata: any;
|
|
1950
|
-
permissions: any;
|
|
1951
|
-
id: string;
|
|
1952
|
-
name: string | null;
|
|
1953
|
-
start: string | null;
|
|
1954
|
-
prefix: string | null;
|
|
1955
|
-
userId: string;
|
|
1956
|
-
refillInterval: number | null;
|
|
1957
|
-
refillAmount: number | null;
|
|
1958
|
-
lastRefillAt: Date | null;
|
|
1959
|
-
enabled: boolean;
|
|
1960
|
-
rateLimitEnabled: boolean;
|
|
1961
|
-
rateLimitTimeWindow: number | null;
|
|
1962
|
-
rateLimitMax: number | null;
|
|
1963
|
-
requestCount: number;
|
|
1964
|
-
remaining: number | null;
|
|
1965
|
-
lastRequest: Date | null;
|
|
1966
|
-
expiresAt: Date | null;
|
|
1967
|
-
createdAt: Date;
|
|
1968
|
-
updatedAt: Date;
|
|
1969
|
-
}, {
|
|
1970
|
-
code?: string | undefined;
|
|
1971
|
-
message?: string | undefined;
|
|
1972
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
1973
|
-
};
|
|
1974
|
-
} & {
|
|
1975
|
-
apiKey: {
|
|
1976
|
-
get: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
1977
|
-
id: string;
|
|
1978
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1979
|
-
query: {
|
|
1980
|
-
id: string;
|
|
1981
|
-
};
|
|
1982
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1983
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1984
|
-
metadata: Record<string, any> | null;
|
|
1985
|
-
permissions: {
|
|
1986
|
-
[key: string]: string[];
|
|
1987
|
-
} | null;
|
|
1988
|
-
id: string;
|
|
1989
|
-
name: string | null;
|
|
1990
|
-
start: string | null;
|
|
1991
|
-
prefix: string | null;
|
|
1992
|
-
userId: string;
|
|
1993
|
-
refillInterval: number | null;
|
|
1994
|
-
refillAmount: number | null;
|
|
1995
|
-
lastRefillAt: Date | null;
|
|
1996
|
-
enabled: boolean;
|
|
1997
|
-
rateLimitEnabled: boolean;
|
|
1998
|
-
rateLimitTimeWindow: number | null;
|
|
1999
|
-
rateLimitMax: number | null;
|
|
2000
|
-
requestCount: number;
|
|
2001
|
-
remaining: number | null;
|
|
2002
|
-
lastRequest: Date | null;
|
|
2003
|
-
expiresAt: Date | null;
|
|
2004
|
-
createdAt: Date;
|
|
2005
|
-
updatedAt: Date;
|
|
2006
|
-
}, {
|
|
2007
|
-
code?: string | undefined;
|
|
2008
|
-
message?: string | undefined;
|
|
2009
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2010
|
-
};
|
|
2011
|
-
} & {
|
|
2012
|
-
apiKey: {
|
|
2013
|
-
update: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2014
|
-
keyId: string;
|
|
2015
|
-
userId?: unknown;
|
|
2016
|
-
name?: string | undefined;
|
|
2017
|
-
enabled?: boolean | undefined;
|
|
2018
|
-
remaining?: number | undefined;
|
|
2019
|
-
refillAmount?: number | undefined;
|
|
2020
|
-
refillInterval?: number | undefined;
|
|
2021
|
-
metadata?: any;
|
|
2022
|
-
expiresIn?: number | null | undefined;
|
|
2023
|
-
rateLimitEnabled?: boolean | undefined;
|
|
2024
|
-
rateLimitTimeWindow?: number | undefined;
|
|
2025
|
-
rateLimitMax?: number | undefined;
|
|
2026
|
-
permissions?: Record<string, string[]> | null | undefined;
|
|
2027
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2028
|
-
keyId: string;
|
|
2029
|
-
userId?: unknown;
|
|
2030
|
-
name?: string | undefined;
|
|
2031
|
-
enabled?: boolean | undefined;
|
|
2032
|
-
remaining?: number | undefined;
|
|
2033
|
-
refillAmount?: number | undefined;
|
|
2034
|
-
refillInterval?: number | undefined;
|
|
2035
|
-
metadata?: any;
|
|
2036
|
-
expiresIn?: number | null | undefined;
|
|
2037
|
-
rateLimitEnabled?: boolean | undefined;
|
|
2038
|
-
rateLimitTimeWindow?: number | undefined;
|
|
2039
|
-
rateLimitMax?: number | undefined;
|
|
2040
|
-
permissions?: Record<string, string[]> | null | undefined;
|
|
2041
|
-
} & {
|
|
2042
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2043
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2044
|
-
metadata: Record<string, any> | null;
|
|
2045
|
-
permissions: {
|
|
2046
|
-
[key: string]: string[];
|
|
2047
|
-
} | null;
|
|
2048
|
-
id: string;
|
|
2049
|
-
name: string | null;
|
|
2050
|
-
start: string | null;
|
|
2051
|
-
prefix: string | null;
|
|
2052
|
-
userId: string;
|
|
2053
|
-
refillInterval: number | null;
|
|
2054
|
-
refillAmount: number | null;
|
|
2055
|
-
lastRefillAt: Date | null;
|
|
2056
|
-
enabled: boolean;
|
|
2057
|
-
rateLimitEnabled: boolean;
|
|
2058
|
-
rateLimitTimeWindow: number | null;
|
|
2059
|
-
rateLimitMax: number | null;
|
|
2060
|
-
requestCount: number;
|
|
2061
|
-
remaining: number | null;
|
|
2062
|
-
lastRequest: Date | null;
|
|
2063
|
-
expiresAt: Date | null;
|
|
2064
|
-
createdAt: Date;
|
|
2065
|
-
updatedAt: Date;
|
|
2066
|
-
}, {
|
|
2067
|
-
code?: string | undefined;
|
|
2068
|
-
message?: string | undefined;
|
|
2069
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2070
|
-
};
|
|
2071
|
-
} & {
|
|
2072
|
-
apiKey: {
|
|
2073
|
-
delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2074
|
-
keyId: string;
|
|
2075
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2076
|
-
keyId: string;
|
|
2077
|
-
} & {
|
|
2078
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2079
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2080
|
-
success: boolean;
|
|
2081
|
-
}, {
|
|
2082
|
-
code?: string | undefined;
|
|
2083
|
-
message?: string | undefined;
|
|
2084
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2085
|
-
};
|
|
2086
|
-
} & {
|
|
2087
|
-
apiKey: {
|
|
2088
|
-
list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
2089
|
-
query?: Record<string, any> | undefined;
|
|
2090
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2091
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2092
|
-
metadata: Record<string, any> | null;
|
|
2093
|
-
permissions: {
|
|
2094
|
-
[key: string]: string[];
|
|
2095
|
-
} | null;
|
|
2096
|
-
id: string;
|
|
2097
|
-
name: string | null;
|
|
2098
|
-
start: string | null;
|
|
2099
|
-
prefix: string | null;
|
|
2100
|
-
userId: string;
|
|
2101
|
-
refillInterval: number | null;
|
|
2102
|
-
refillAmount: number | null;
|
|
2103
|
-
lastRefillAt: Date | null;
|
|
2104
|
-
enabled: boolean;
|
|
2105
|
-
rateLimitEnabled: boolean;
|
|
2106
|
-
rateLimitTimeWindow: number | null;
|
|
2107
|
-
rateLimitMax: number | null;
|
|
2108
|
-
requestCount: number;
|
|
2109
|
-
remaining: number | null;
|
|
2110
|
-
lastRequest: Date | null;
|
|
2111
|
-
expiresAt: Date | null;
|
|
2112
|
-
createdAt: Date;
|
|
2113
|
-
updatedAt: Date;
|
|
2114
|
-
}[], {
|
|
2115
|
-
code?: string | undefined;
|
|
2116
|
-
message?: string | undefined;
|
|
2117
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2118
|
-
};
|
|
2119
|
-
} & {
|
|
2120
|
-
admin: {
|
|
2121
|
-
setRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2122
|
-
userId: string;
|
|
2123
|
-
role: "admin" | "user" | ("admin" | "user")[];
|
|
2124
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2125
|
-
userId: string;
|
|
2126
|
-
role: "admin" | "user" | ("admin" | "user")[];
|
|
2127
|
-
} & {
|
|
2128
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2129
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2130
|
-
user: better_auth_plugins.UserWithRole;
|
|
2131
|
-
}, {
|
|
2132
|
-
code?: string | undefined;
|
|
2133
|
-
message?: string | undefined;
|
|
2134
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2135
|
-
};
|
|
2136
|
-
} & {
|
|
2137
|
-
admin: {
|
|
2138
|
-
getUser: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
2139
|
-
id: string;
|
|
2140
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2141
|
-
query: {
|
|
2142
|
-
id: string;
|
|
2143
|
-
};
|
|
2144
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2145
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_plugins.UserWithRole, {
|
|
2146
|
-
code?: string | undefined;
|
|
2147
|
-
message?: string | undefined;
|
|
2148
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2149
|
-
};
|
|
2150
|
-
} & {
|
|
2151
|
-
admin: {
|
|
2152
|
-
createUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2153
|
-
email: string;
|
|
2154
|
-
password?: string | undefined;
|
|
2155
|
-
name: string;
|
|
2156
|
-
role?: "admin" | "user" | ("admin" | "user")[] | undefined;
|
|
2157
|
-
data?: Record<string, any> | undefined;
|
|
2158
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2159
|
-
email: string;
|
|
2160
|
-
password?: string | undefined;
|
|
2161
|
-
name: string;
|
|
2162
|
-
role?: "admin" | "user" | ("admin" | "user")[] | undefined;
|
|
2163
|
-
data?: Record<string, any> | undefined;
|
|
2164
|
-
} & {
|
|
2165
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2166
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2167
|
-
user: better_auth_plugins.UserWithRole;
|
|
2168
|
-
}, {
|
|
2169
|
-
code?: string | undefined;
|
|
2170
|
-
message?: string | undefined;
|
|
2171
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2172
|
-
};
|
|
2173
|
-
} & {
|
|
2174
|
-
admin: {
|
|
2175
|
-
updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2176
|
-
userId: unknown;
|
|
2177
|
-
data: Record<any, any>;
|
|
2178
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2179
|
-
userId: unknown;
|
|
2180
|
-
data: Record<any, any>;
|
|
2181
|
-
} & {
|
|
2182
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2183
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_plugins.UserWithRole, {
|
|
2184
|
-
code?: string | undefined;
|
|
2185
|
-
message?: string | undefined;
|
|
2186
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2187
|
-
};
|
|
2188
|
-
} & {
|
|
2189
|
-
admin: {
|
|
2190
|
-
listUsers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
2191
|
-
searchValue?: string | undefined;
|
|
2192
|
-
searchField?: "name" | "email" | undefined;
|
|
2193
|
-
searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
|
|
2194
|
-
limit?: string | number | undefined;
|
|
2195
|
-
offset?: string | number | undefined;
|
|
2196
|
-
sortBy?: string | undefined;
|
|
2197
|
-
sortDirection?: "asc" | "desc" | undefined;
|
|
2198
|
-
filterField?: string | undefined;
|
|
2199
|
-
filterValue?: string | number | boolean | undefined;
|
|
2200
|
-
filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
|
|
2201
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2202
|
-
query: {
|
|
2203
|
-
searchValue?: string | undefined;
|
|
2204
|
-
searchField?: "name" | "email" | undefined;
|
|
2205
|
-
searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
|
|
2206
|
-
limit?: string | number | undefined;
|
|
2207
|
-
offset?: string | number | undefined;
|
|
2208
|
-
sortBy?: string | undefined;
|
|
2209
|
-
sortDirection?: "asc" | "desc" | undefined;
|
|
2210
|
-
filterField?: string | undefined;
|
|
2211
|
-
filterValue?: string | number | boolean | undefined;
|
|
2212
|
-
filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
|
|
2213
|
-
};
|
|
2214
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2215
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
2216
|
-
users: better_auth_plugins.UserWithRole[];
|
|
2217
|
-
total: number;
|
|
2218
|
-
limit: number | undefined;
|
|
2219
|
-
offset: number | undefined;
|
|
2220
|
-
} | {
|
|
2221
|
-
users: never[];
|
|
2222
|
-
total: number;
|
|
2223
|
-
}>, {
|
|
2224
|
-
code?: string | undefined;
|
|
2225
|
-
message?: string | undefined;
|
|
2226
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2227
|
-
};
|
|
2228
|
-
} & {
|
|
2229
|
-
admin: {
|
|
2230
|
-
listUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2231
|
-
userId: unknown;
|
|
2232
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2233
|
-
userId: unknown;
|
|
2234
|
-
} & {
|
|
2235
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2236
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2237
|
-
sessions: better_auth_plugins.SessionWithImpersonatedBy[];
|
|
2238
|
-
}, {
|
|
2239
|
-
code?: string | undefined;
|
|
2240
|
-
message?: string | undefined;
|
|
2241
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2242
|
-
};
|
|
2243
|
-
} & {
|
|
2244
|
-
admin: {
|
|
2245
|
-
unbanUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2246
|
-
userId: unknown;
|
|
2247
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2248
|
-
userId: unknown;
|
|
2249
|
-
} & {
|
|
2250
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2251
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2252
|
-
user: better_auth_plugins.UserWithRole;
|
|
2253
|
-
}, {
|
|
2254
|
-
code?: string | undefined;
|
|
2255
|
-
message?: string | undefined;
|
|
2256
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2257
|
-
};
|
|
2258
|
-
} & {
|
|
2259
|
-
admin: {
|
|
2260
|
-
banUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2261
|
-
userId: unknown;
|
|
2262
|
-
banReason?: string | undefined;
|
|
2263
|
-
banExpiresIn?: number | undefined;
|
|
2264
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2265
|
-
userId: unknown;
|
|
2266
|
-
banReason?: string | undefined;
|
|
2267
|
-
banExpiresIn?: number | undefined;
|
|
2268
|
-
} & {
|
|
2269
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2270
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2271
|
-
user: better_auth_plugins.UserWithRole;
|
|
2272
|
-
}, {
|
|
2273
|
-
code?: string | undefined;
|
|
2274
|
-
message?: string | undefined;
|
|
2275
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2276
|
-
};
|
|
2277
|
-
} & {
|
|
2278
|
-
admin: {
|
|
2279
|
-
impersonateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2280
|
-
userId: unknown;
|
|
2281
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2282
|
-
userId: unknown;
|
|
2283
|
-
} & {
|
|
2284
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2285
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2286
|
-
session: {
|
|
2287
|
-
id: string;
|
|
2288
|
-
createdAt: Date;
|
|
2289
|
-
updatedAt: Date;
|
|
2290
|
-
userId: string;
|
|
2291
|
-
expiresAt: Date;
|
|
2292
|
-
token: string;
|
|
2293
|
-
ipAddress?: string | null | undefined;
|
|
2294
|
-
userAgent?: string | null | undefined;
|
|
2295
|
-
};
|
|
2296
|
-
user: better_auth_plugins.UserWithRole;
|
|
2297
|
-
}, {
|
|
2298
|
-
code?: string | undefined;
|
|
2299
|
-
message?: string | undefined;
|
|
2300
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2301
|
-
};
|
|
2302
|
-
} & {
|
|
2303
|
-
admin: {
|
|
2304
|
-
stopImpersonating: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
2305
|
-
query?: Record<string, any> | undefined;
|
|
2306
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2307
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2308
|
-
session: {
|
|
2309
|
-
id: string;
|
|
2310
|
-
createdAt: Date;
|
|
2311
|
-
updatedAt: Date;
|
|
2312
|
-
userId: string;
|
|
2313
|
-
expiresAt: Date;
|
|
2314
|
-
token: string;
|
|
2315
|
-
ipAddress?: string | null | undefined;
|
|
2316
|
-
userAgent?: string | null | undefined;
|
|
2317
|
-
} & Record<string, any>;
|
|
2318
|
-
user: {
|
|
2319
|
-
id: string;
|
|
2320
|
-
createdAt: Date;
|
|
2321
|
-
updatedAt: Date;
|
|
2322
|
-
email: string;
|
|
2323
|
-
emailVerified: boolean;
|
|
2324
|
-
name: string;
|
|
2325
|
-
image?: string | null | undefined;
|
|
2326
|
-
} & Record<string, any>;
|
|
2327
|
-
}, {
|
|
2328
|
-
code?: string | undefined;
|
|
2329
|
-
message?: string | undefined;
|
|
2330
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2331
|
-
};
|
|
2332
|
-
} & {
|
|
2333
|
-
admin: {
|
|
2334
|
-
revokeUserSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2335
|
-
sessionToken: string;
|
|
2336
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2337
|
-
sessionToken: string;
|
|
2338
|
-
} & {
|
|
2339
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2340
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2341
|
-
success: boolean;
|
|
2342
|
-
}, {
|
|
2343
|
-
code?: string | undefined;
|
|
2344
|
-
message?: string | undefined;
|
|
2345
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2346
|
-
};
|
|
2347
|
-
} & {
|
|
2348
|
-
admin: {
|
|
2349
|
-
revokeUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2350
|
-
userId: unknown;
|
|
2351
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2352
|
-
userId: unknown;
|
|
2353
|
-
} & {
|
|
2354
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2355
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2356
|
-
success: boolean;
|
|
2357
|
-
}, {
|
|
2358
|
-
code?: string | undefined;
|
|
2359
|
-
message?: string | undefined;
|
|
2360
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2361
|
-
};
|
|
2362
|
-
} & {
|
|
2363
|
-
admin: {
|
|
2364
|
-
removeUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2365
|
-
userId: unknown;
|
|
2366
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2367
|
-
userId: unknown;
|
|
2368
|
-
} & {
|
|
2369
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2370
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2371
|
-
success: boolean;
|
|
2372
|
-
}, {
|
|
2373
|
-
code?: string | undefined;
|
|
2374
|
-
message?: string | undefined;
|
|
2375
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2376
|
-
};
|
|
2377
|
-
} & {
|
|
2378
|
-
admin: {
|
|
2379
|
-
setUserPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2380
|
-
newPassword: string;
|
|
2381
|
-
userId: unknown;
|
|
2382
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2383
|
-
newPassword: string;
|
|
2384
|
-
userId: unknown;
|
|
2385
|
-
} & {
|
|
2386
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2387
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2388
|
-
status: boolean;
|
|
2389
|
-
}, {
|
|
2390
|
-
code?: string | undefined;
|
|
2391
|
-
message?: string | undefined;
|
|
2392
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2393
|
-
};
|
|
2394
|
-
} & {
|
|
2395
|
-
admin: {
|
|
2396
|
-
hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<({
|
|
2397
|
-
permission: {
|
|
2398
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
|
|
2399
|
-
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
2400
|
-
};
|
|
2401
|
-
permissions?: never | undefined;
|
|
2402
|
-
} | {
|
|
2403
|
-
permissions: {
|
|
2404
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
|
|
2405
|
-
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
2406
|
-
};
|
|
2407
|
-
permission?: never | undefined;
|
|
2408
|
-
}) & {
|
|
2409
|
-
userId?: string | undefined;
|
|
2410
|
-
role?: "admin" | "user" | undefined;
|
|
2411
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<(({
|
|
2412
|
-
permission: {
|
|
2413
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
|
|
2414
|
-
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
2415
|
-
};
|
|
2416
|
-
permissions?: never | undefined;
|
|
2417
|
-
} | {
|
|
2418
|
-
permissions: {
|
|
2419
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
|
|
2420
|
-
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
2421
|
-
};
|
|
2422
|
-
permission?: never | undefined;
|
|
2423
|
-
}) & {
|
|
2424
|
-
userId?: string | undefined;
|
|
2425
|
-
role?: "admin" | "user" | undefined;
|
|
2426
|
-
}) & {
|
|
2427
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2428
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2429
|
-
error: null;
|
|
2430
|
-
success: boolean;
|
|
2431
|
-
}, {
|
|
2432
|
-
code?: string | undefined;
|
|
2433
|
-
message?: string | undefined;
|
|
2434
|
-
}, FetchOptions["throw"] extends true ? true : true>>;
|
|
2435
|
-
};
|
|
2436
|
-
} & {
|
|
2437
222
|
signIn: {
|
|
2438
223
|
social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2439
|
-
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "
|
|
224
|
+
provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
|
|
2440
225
|
callbackURL?: string | undefined;
|
|
2441
226
|
newUserCallbackURL?: string | undefined;
|
|
2442
227
|
errorCallbackURL?: string | undefined;
|
|
@@ -2453,7 +238,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2453
238
|
loginHint?: string | undefined;
|
|
2454
239
|
additionalData?: Record<string, any> | undefined;
|
|
2455
240
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
2456
|
-
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "
|
|
241
|
+
provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
|
|
2457
242
|
callbackURL?: string | undefined;
|
|
2458
243
|
newUserCallbackURL?: string | undefined;
|
|
2459
244
|
errorCallbackURL?: string | undefined;
|
|
@@ -2471,10 +256,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2471
256
|
additionalData?: Record<string, any> | undefined;
|
|
2472
257
|
} & {
|
|
2473
258
|
fetchOptions?: FetchOptions | undefined;
|
|
2474
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<
|
|
259
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2475
260
|
redirect: boolean;
|
|
2476
261
|
url: string;
|
|
2477
|
-
} | {
|
|
262
|
+
} | (Omit<{
|
|
2478
263
|
redirect: boolean;
|
|
2479
264
|
token: string;
|
|
2480
265
|
url: undefined;
|
|
@@ -2487,10 +272,20 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2487
272
|
name: string;
|
|
2488
273
|
image?: string | null | undefined | undefined;
|
|
2489
274
|
};
|
|
2490
|
-
}
|
|
275
|
+
}, "user"> & {
|
|
276
|
+
user: better_auth.StripEmptyObjects<{
|
|
277
|
+
id: string;
|
|
278
|
+
createdAt: Date;
|
|
279
|
+
updatedAt: Date;
|
|
280
|
+
email: string;
|
|
281
|
+
emailVerified: boolean;
|
|
282
|
+
name: string;
|
|
283
|
+
image?: string | null | undefined;
|
|
284
|
+
}>;
|
|
285
|
+
}), {
|
|
2491
286
|
code?: string | undefined;
|
|
2492
287
|
message?: string | undefined;
|
|
2493
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
288
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2494
289
|
};
|
|
2495
290
|
} & {
|
|
2496
291
|
signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
@@ -2501,7 +296,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2501
296
|
}, {
|
|
2502
297
|
code?: string | undefined;
|
|
2503
298
|
message?: string | undefined;
|
|
2504
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
299
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2505
300
|
} & {
|
|
2506
301
|
signUp: {
|
|
2507
302
|
email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
@@ -2518,9 +313,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2518
313
|
image?: string | undefined;
|
|
2519
314
|
callbackURL?: string | undefined;
|
|
2520
315
|
fetchOptions?: FetchOptions | undefined;
|
|
2521
|
-
}
|
|
2522
|
-
lastActiveAt?: Date | null | undefined;
|
|
2523
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
316
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<(Omit<{
|
|
2524
317
|
token: null;
|
|
2525
318
|
user: {
|
|
2526
319
|
id: string;
|
|
@@ -2531,7 +324,17 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2531
324
|
name: string;
|
|
2532
325
|
image?: string | null | undefined | undefined;
|
|
2533
326
|
};
|
|
2534
|
-
}
|
|
327
|
+
}, "user"> & {
|
|
328
|
+
user: better_auth.StripEmptyObjects<{
|
|
329
|
+
id: string;
|
|
330
|
+
createdAt: Date;
|
|
331
|
+
updatedAt: Date;
|
|
332
|
+
email: string;
|
|
333
|
+
emailVerified: boolean;
|
|
334
|
+
name: string;
|
|
335
|
+
image?: string | null | undefined;
|
|
336
|
+
}>;
|
|
337
|
+
}) | (Omit<{
|
|
2535
338
|
token: string;
|
|
2536
339
|
user: {
|
|
2537
340
|
id: string;
|
|
@@ -2542,10 +345,20 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2542
345
|
name: string;
|
|
2543
346
|
image?: string | null | undefined | undefined;
|
|
2544
347
|
};
|
|
2545
|
-
}
|
|
348
|
+
}, "user"> & {
|
|
349
|
+
user: better_auth.StripEmptyObjects<{
|
|
350
|
+
id: string;
|
|
351
|
+
createdAt: Date;
|
|
352
|
+
updatedAt: Date;
|
|
353
|
+
email: string;
|
|
354
|
+
emailVerified: boolean;
|
|
355
|
+
name: string;
|
|
356
|
+
image?: string | null | undefined;
|
|
357
|
+
}>;
|
|
358
|
+
}), {
|
|
2546
359
|
code?: string | undefined;
|
|
2547
360
|
message?: string | undefined;
|
|
2548
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
361
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2549
362
|
};
|
|
2550
363
|
} & {
|
|
2551
364
|
signIn: {
|
|
@@ -2561,7 +374,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2561
374
|
rememberMe?: boolean | undefined;
|
|
2562
375
|
} & {
|
|
2563
376
|
fetchOptions?: FetchOptions | undefined;
|
|
2564
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
377
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Omit<{
|
|
2565
378
|
redirect: boolean;
|
|
2566
379
|
token: string;
|
|
2567
380
|
url?: string | undefined;
|
|
@@ -2574,10 +387,20 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2574
387
|
name: string;
|
|
2575
388
|
image?: string | null | undefined | undefined;
|
|
2576
389
|
};
|
|
390
|
+
}, "user"> & {
|
|
391
|
+
user: better_auth.StripEmptyObjects<{
|
|
392
|
+
id: string;
|
|
393
|
+
createdAt: Date;
|
|
394
|
+
updatedAt: Date;
|
|
395
|
+
email: string;
|
|
396
|
+
emailVerified: boolean;
|
|
397
|
+
name: string;
|
|
398
|
+
image?: string | null | undefined;
|
|
399
|
+
}>;
|
|
2577
400
|
}, {
|
|
2578
401
|
code?: string | undefined;
|
|
2579
402
|
message?: string | undefined;
|
|
2580
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
403
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2581
404
|
};
|
|
2582
405
|
} & {
|
|
2583
406
|
resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
@@ -2595,7 +418,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2595
418
|
}, {
|
|
2596
419
|
code?: string | undefined;
|
|
2597
420
|
message?: string | undefined;
|
|
2598
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
421
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2599
422
|
} & {
|
|
2600
423
|
verifyEmail: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
2601
424
|
token: string;
|
|
@@ -2611,7 +434,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2611
434
|
}>, {
|
|
2612
435
|
code?: string | undefined;
|
|
2613
436
|
message?: string | undefined;
|
|
2614
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
437
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2615
438
|
} & {
|
|
2616
439
|
sendVerificationEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2617
440
|
email: string;
|
|
@@ -2626,7 +449,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2626
449
|
}, {
|
|
2627
450
|
code?: string | undefined;
|
|
2628
451
|
message?: string | undefined;
|
|
2629
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
452
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2630
453
|
} & {
|
|
2631
454
|
changeEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2632
455
|
newEmail: string;
|
|
@@ -2641,7 +464,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2641
464
|
}, {
|
|
2642
465
|
code?: string | undefined;
|
|
2643
466
|
message?: string | undefined;
|
|
2644
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
467
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2645
468
|
} & {
|
|
2646
469
|
changePassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2647
470
|
newPassword: string;
|
|
@@ -2653,7 +476,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2653
476
|
revokeOtherSessions?: boolean | undefined;
|
|
2654
477
|
} & {
|
|
2655
478
|
fetchOptions?: FetchOptions | undefined;
|
|
2656
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
479
|
+
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Omit<{
|
|
2657
480
|
token: string | null;
|
|
2658
481
|
user: {
|
|
2659
482
|
id: string;
|
|
@@ -2663,11 +486,47 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2663
486
|
emailVerified: boolean;
|
|
2664
487
|
name: string;
|
|
2665
488
|
image?: string | null | undefined;
|
|
2666
|
-
} & Record<string, any
|
|
489
|
+
} & Record<string, any> & {
|
|
490
|
+
id: string;
|
|
491
|
+
createdAt: Date;
|
|
492
|
+
updatedAt: Date;
|
|
493
|
+
email: string;
|
|
494
|
+
emailVerified: boolean;
|
|
495
|
+
name: string;
|
|
496
|
+
image?: string | null | undefined;
|
|
497
|
+
};
|
|
498
|
+
}, "user"> & {
|
|
499
|
+
user: better_auth.StripEmptyObjects<{
|
|
500
|
+
id: string;
|
|
501
|
+
createdAt: Date;
|
|
502
|
+
updatedAt: Date;
|
|
503
|
+
email: string;
|
|
504
|
+
emailVerified: boolean;
|
|
505
|
+
name: string;
|
|
506
|
+
image?: string | null | undefined;
|
|
507
|
+
}>;
|
|
508
|
+
}, {
|
|
509
|
+
code?: string | undefined;
|
|
510
|
+
message?: string | undefined;
|
|
511
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
512
|
+
} & {
|
|
513
|
+
updateSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<Partial<{}> & {
|
|
514
|
+
fetchOptions?: FetchOptions | undefined;
|
|
515
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
516
|
+
session: {
|
|
517
|
+
id: string;
|
|
518
|
+
createdAt: Date;
|
|
519
|
+
updatedAt: Date;
|
|
520
|
+
userId: string;
|
|
521
|
+
expiresAt: Date;
|
|
522
|
+
token: string;
|
|
523
|
+
ipAddress?: string | null | undefined;
|
|
524
|
+
userAgent?: string | null | undefined;
|
|
525
|
+
};
|
|
2667
526
|
}, {
|
|
2668
527
|
code?: string | undefined;
|
|
2669
528
|
message?: string | undefined;
|
|
2670
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
529
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2671
530
|
} & {
|
|
2672
531
|
updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}> & {
|
|
2673
532
|
name?: string | undefined;
|
|
@@ -2676,14 +535,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2676
535
|
image?: (string | null) | undefined;
|
|
2677
536
|
name?: string | undefined;
|
|
2678
537
|
fetchOptions?: FetchOptions | undefined;
|
|
2679
|
-
} & Partial<{}
|
|
2680
|
-
lastActiveAt?: Date | null | undefined;
|
|
2681
|
-
}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
538
|
+
} & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2682
539
|
status: boolean;
|
|
2683
540
|
}, {
|
|
2684
541
|
code?: string | undefined;
|
|
2685
542
|
message?: string | undefined;
|
|
2686
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
543
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2687
544
|
} & {
|
|
2688
545
|
deleteUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2689
546
|
callbackURL?: string | undefined;
|
|
@@ -2701,7 +558,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2701
558
|
}, {
|
|
2702
559
|
code?: string | undefined;
|
|
2703
560
|
message?: string | undefined;
|
|
2704
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
561
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2705
562
|
} & {
|
|
2706
563
|
requestPasswordReset: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2707
564
|
email: string;
|
|
@@ -2717,7 +574,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2717
574
|
}, {
|
|
2718
575
|
code?: string | undefined;
|
|
2719
576
|
message?: string | undefined;
|
|
2720
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
577
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2721
578
|
} & {
|
|
2722
579
|
resetPassword: {
|
|
2723
580
|
":token": <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
@@ -2732,7 +589,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2732
589
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<never, {
|
|
2733
590
|
code?: string | undefined;
|
|
2734
591
|
message?: string | undefined;
|
|
2735
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
592
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2736
593
|
};
|
|
2737
594
|
} & {
|
|
2738
595
|
listSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
@@ -2750,7 +607,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2750
607
|
}>[], {
|
|
2751
608
|
code?: string | undefined;
|
|
2752
609
|
message?: string | undefined;
|
|
2753
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
610
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2754
611
|
} & {
|
|
2755
612
|
revokeSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2756
613
|
token: string;
|
|
@@ -2763,7 +620,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2763
620
|
}, {
|
|
2764
621
|
code?: string | undefined;
|
|
2765
622
|
message?: string | undefined;
|
|
2766
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
623
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2767
624
|
} & {
|
|
2768
625
|
revokeSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
2769
626
|
query?: Record<string, any> | undefined;
|
|
@@ -2773,7 +630,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2773
630
|
}, {
|
|
2774
631
|
code?: string | undefined;
|
|
2775
632
|
message?: string | undefined;
|
|
2776
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
633
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2777
634
|
} & {
|
|
2778
635
|
revokeOtherSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
2779
636
|
query?: Record<string, any> | undefined;
|
|
@@ -2783,7 +640,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2783
640
|
}, {
|
|
2784
641
|
code?: string | undefined;
|
|
2785
642
|
message?: string | undefined;
|
|
2786
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
643
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2787
644
|
} & {
|
|
2788
645
|
linkSocial: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2789
646
|
provider: unknown;
|
|
@@ -2823,7 +680,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2823
680
|
}, {
|
|
2824
681
|
code?: string | undefined;
|
|
2825
682
|
message?: string | undefined;
|
|
2826
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
683
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2827
684
|
} & {
|
|
2828
685
|
listAccounts: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
|
|
2829
686
|
query?: Record<string, any> | undefined;
|
|
@@ -2839,7 +696,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2839
696
|
}[], {
|
|
2840
697
|
code?: string | undefined;
|
|
2841
698
|
message?: string | undefined;
|
|
2842
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
699
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2843
700
|
} & {
|
|
2844
701
|
deleteUser: {
|
|
2845
702
|
callback: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
@@ -2857,7 +714,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2857
714
|
}, {
|
|
2858
715
|
code?: string | undefined;
|
|
2859
716
|
message?: string | undefined;
|
|
2860
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
717
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2861
718
|
};
|
|
2862
719
|
} & {
|
|
2863
720
|
unlinkAccount: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
@@ -2873,7 +730,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2873
730
|
}, {
|
|
2874
731
|
code?: string | undefined;
|
|
2875
732
|
message?: string | undefined;
|
|
2876
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
733
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2877
734
|
} & {
|
|
2878
735
|
refreshToken: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2879
736
|
providerId: string;
|
|
@@ -2887,9 +744,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2887
744
|
fetchOptions?: FetchOptions | undefined;
|
|
2888
745
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2889
746
|
accessToken: string | undefined;
|
|
2890
|
-
refreshToken: string
|
|
747
|
+
refreshToken: string;
|
|
2891
748
|
accessTokenExpiresAt: Date | undefined;
|
|
2892
|
-
refreshTokenExpiresAt: Date | undefined;
|
|
749
|
+
refreshTokenExpiresAt: Date | null | undefined;
|
|
2893
750
|
scope: string | null | undefined;
|
|
2894
751
|
idToken: string | null | undefined;
|
|
2895
752
|
providerId: string;
|
|
@@ -2897,7 +754,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2897
754
|
}, {
|
|
2898
755
|
code?: string | undefined;
|
|
2899
756
|
message?: string | undefined;
|
|
2900
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
757
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2901
758
|
} & {
|
|
2902
759
|
getAccessToken: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
2903
760
|
providerId: string;
|
|
@@ -2917,7 +774,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2917
774
|
}, {
|
|
2918
775
|
code?: string | undefined;
|
|
2919
776
|
message?: string | undefined;
|
|
2920
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
777
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2921
778
|
} & {
|
|
2922
779
|
accountInfo: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
2923
780
|
accountId?: string | undefined;
|
|
@@ -2932,7 +789,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2932
789
|
}, {
|
|
2933
790
|
code?: string | undefined;
|
|
2934
791
|
message?: string | undefined;
|
|
2935
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
792
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2936
793
|
} & {
|
|
2937
794
|
getSession: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
|
|
2938
795
|
disableCookieCache?: unknown;
|
|
@@ -2944,7 +801,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2944
801
|
} | undefined;
|
|
2945
802
|
fetchOptions?: FetchOptions | undefined;
|
|
2946
803
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
2947
|
-
user: {
|
|
804
|
+
user: better_auth.StripEmptyObjects<{
|
|
2948
805
|
id: string;
|
|
2949
806
|
createdAt: Date;
|
|
2950
807
|
updatedAt: Date;
|
|
@@ -2952,14 +809,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2952
809
|
emailVerified: boolean;
|
|
2953
810
|
name: string;
|
|
2954
811
|
image?: string | null | undefined;
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
role?: string | null | undefined;
|
|
2958
|
-
banReason?: string | null | undefined;
|
|
2959
|
-
banExpires?: Date | null | undefined;
|
|
2960
|
-
lastActiveAt?: Date | null | undefined;
|
|
2961
|
-
};
|
|
2962
|
-
session: {
|
|
812
|
+
}>;
|
|
813
|
+
session: better_auth.StripEmptyObjects<{
|
|
2963
814
|
id: string;
|
|
2964
815
|
createdAt: Date;
|
|
2965
816
|
updatedAt: Date;
|
|
@@ -2968,243 +819,15 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
2968
819
|
token: string;
|
|
2969
820
|
ipAddress?: string | null | undefined;
|
|
2970
821
|
userAgent?: string | null | undefined;
|
|
2971
|
-
|
|
2972
|
-
activeTeamId?: string | null | undefined;
|
|
2973
|
-
impersonatedBy?: string | null | undefined;
|
|
2974
|
-
};
|
|
822
|
+
}>;
|
|
2975
823
|
} | null, {
|
|
2976
824
|
code?: string | undefined;
|
|
2977
825
|
message?: string | undefined;
|
|
2978
|
-
}, FetchOptions["throw"] extends true ? true :
|
|
2979
|
-
} & {
|
|
2980
|
-
applications: {
|
|
2981
|
-
listCandidateOrganizations: (applicationId: string) => Promise<{
|
|
2982
|
-
data: {
|
|
2983
|
-
organizations: FullOrganization[];
|
|
2984
|
-
application?: Application | undefined;
|
|
2985
|
-
};
|
|
2986
|
-
error: null;
|
|
2987
|
-
} | {
|
|
2988
|
-
data: {
|
|
2989
|
-
organizations: FullOrganization[];
|
|
2990
|
-
application?: Application | undefined;
|
|
2991
|
-
};
|
|
2992
|
-
error: {
|
|
2993
|
-
message?: string | undefined;
|
|
2994
|
-
status: number;
|
|
2995
|
-
statusText: string;
|
|
2996
|
-
};
|
|
2997
|
-
}>;
|
|
2998
|
-
startAuthorizationFlow: (applicationId: string, redirectUri: string, codeChallenge: string, organizationId: string) => Promise<{
|
|
2999
|
-
data: null;
|
|
3000
|
-
error: {
|
|
3001
|
-
message?: string | undefined;
|
|
3002
|
-
status: number;
|
|
3003
|
-
statusText: string;
|
|
3004
|
-
};
|
|
3005
|
-
} | {
|
|
3006
|
-
data: StartAuthorizationFlowResponse;
|
|
3007
|
-
error: null;
|
|
3008
|
-
}>;
|
|
3009
|
-
completeAuthorizationFlow: (code: string, codeVerifier: string) => Promise<{
|
|
3010
|
-
data: null;
|
|
3011
|
-
error: {
|
|
3012
|
-
message?: string | undefined;
|
|
3013
|
-
status: number;
|
|
3014
|
-
statusText: string;
|
|
3015
|
-
};
|
|
3016
|
-
} | {
|
|
3017
|
-
data: CompleteAuthorizationFlowResponse;
|
|
3018
|
-
error: null;
|
|
3019
|
-
}>;
|
|
3020
|
-
refreshAccessToken: (refreshToken: string) => Promise<{
|
|
3021
|
-
data: null;
|
|
3022
|
-
error: {
|
|
3023
|
-
message?: string | undefined;
|
|
3024
|
-
status: number;
|
|
3025
|
-
statusText: string;
|
|
3026
|
-
};
|
|
3027
|
-
} | {
|
|
3028
|
-
data: CompleteAuthorizationFlowResponse;
|
|
3029
|
-
error: null;
|
|
3030
|
-
}>;
|
|
3031
|
-
whoAmI: (accessToken: string) => Promise<{
|
|
3032
|
-
data: null;
|
|
3033
|
-
error: {
|
|
3034
|
-
message?: string | undefined;
|
|
3035
|
-
status: number;
|
|
3036
|
-
statusText: string;
|
|
3037
|
-
};
|
|
3038
|
-
} | {
|
|
3039
|
-
data: WhoAmIResponse;
|
|
3040
|
-
error: null;
|
|
3041
|
-
}>;
|
|
3042
|
-
switchOrganization: (organizationId: string, accessToken: string) => Promise<{
|
|
3043
|
-
data: null;
|
|
3044
|
-
error: {
|
|
3045
|
-
message?: string | undefined;
|
|
3046
|
-
status: number;
|
|
3047
|
-
statusText: string;
|
|
3048
|
-
};
|
|
3049
|
-
} | {
|
|
3050
|
-
data: CompleteAuthorizationFlowResponse;
|
|
3051
|
-
error: null;
|
|
3052
|
-
}>;
|
|
3053
|
-
logout: (refreshToken: string) => Promise<{
|
|
3054
|
-
data: null;
|
|
3055
|
-
error: {
|
|
3056
|
-
message?: string | undefined;
|
|
3057
|
-
status: number;
|
|
3058
|
-
statusText: string;
|
|
3059
|
-
};
|
|
3060
|
-
} | {
|
|
3061
|
-
data: void;
|
|
3062
|
-
error: null;
|
|
3063
|
-
}>;
|
|
3064
|
-
};
|
|
3065
|
-
} & {
|
|
3066
|
-
$Infer: {
|
|
3067
|
-
ActiveOrganization: {
|
|
3068
|
-
members: {
|
|
3069
|
-
id: string;
|
|
3070
|
-
organizationId: string;
|
|
3071
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3072
|
-
createdAt: Date;
|
|
3073
|
-
userId: string;
|
|
3074
|
-
teamId?: string | undefined | undefined;
|
|
3075
|
-
user: {
|
|
3076
|
-
id: string;
|
|
3077
|
-
email: string;
|
|
3078
|
-
name: string;
|
|
3079
|
-
image?: string | undefined;
|
|
3080
|
-
};
|
|
3081
|
-
}[];
|
|
3082
|
-
invitations: {
|
|
3083
|
-
id: string;
|
|
3084
|
-
organizationId: string;
|
|
3085
|
-
email: string;
|
|
3086
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3087
|
-
status: better_auth_plugins.InvitationStatus;
|
|
3088
|
-
inviterId: string;
|
|
3089
|
-
expiresAt: Date;
|
|
3090
|
-
createdAt: Date;
|
|
3091
|
-
teamId?: string | undefined | undefined;
|
|
3092
|
-
}[];
|
|
3093
|
-
teams: {
|
|
3094
|
-
id: string;
|
|
3095
|
-
name: string;
|
|
3096
|
-
organizationId: string;
|
|
3097
|
-
createdAt: Date;
|
|
3098
|
-
updatedAt?: Date | undefined;
|
|
3099
|
-
}[];
|
|
3100
|
-
} & {
|
|
3101
|
-
id: string;
|
|
3102
|
-
name: string;
|
|
3103
|
-
slug: string;
|
|
3104
|
-
createdAt: Date;
|
|
3105
|
-
logo?: string | null | undefined | undefined;
|
|
3106
|
-
metadata?: any;
|
|
3107
|
-
};
|
|
3108
|
-
Organization: {
|
|
3109
|
-
id: string;
|
|
3110
|
-
name: string;
|
|
3111
|
-
slug: string;
|
|
3112
|
-
createdAt: Date;
|
|
3113
|
-
logo?: string | null | undefined;
|
|
3114
|
-
metadata?: any;
|
|
3115
|
-
};
|
|
3116
|
-
Invitation: {
|
|
3117
|
-
id: string;
|
|
3118
|
-
organizationId: string;
|
|
3119
|
-
email: string;
|
|
3120
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3121
|
-
status: better_auth_plugins.InvitationStatus;
|
|
3122
|
-
inviterId: string;
|
|
3123
|
-
expiresAt: Date;
|
|
3124
|
-
createdAt: Date;
|
|
3125
|
-
teamId?: string | undefined | undefined;
|
|
3126
|
-
};
|
|
3127
|
-
Member: {
|
|
3128
|
-
id: string;
|
|
3129
|
-
organizationId: string;
|
|
3130
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3131
|
-
createdAt: Date;
|
|
3132
|
-
userId: string;
|
|
3133
|
-
teamId?: string | undefined | undefined;
|
|
3134
|
-
user: {
|
|
3135
|
-
id: string;
|
|
3136
|
-
email: string;
|
|
3137
|
-
name: string;
|
|
3138
|
-
image?: string | undefined;
|
|
3139
|
-
};
|
|
3140
|
-
};
|
|
3141
|
-
Team: {
|
|
3142
|
-
id: string;
|
|
3143
|
-
name: string;
|
|
3144
|
-
organizationId: string;
|
|
3145
|
-
createdAt: Date;
|
|
3146
|
-
updatedAt?: Date | undefined;
|
|
3147
|
-
};
|
|
3148
|
-
};
|
|
3149
|
-
organization: {
|
|
3150
|
-
checkRolePermission: <R extends "org:admin" | "org:member" | "org:reviewer">(data: ({
|
|
3151
|
-
permission: {
|
|
3152
|
-
access?: string[] | undefined;
|
|
3153
|
-
organization?: ("update" | "delete")[] | undefined;
|
|
3154
|
-
member?: ("update" | "delete" | "create")[] | undefined;
|
|
3155
|
-
invitation?: ("create" | "cancel")[] | undefined;
|
|
3156
|
-
team?: ("update" | "delete" | "create")[] | undefined;
|
|
3157
|
-
ac?: ("update" | "delete" | "create" | "read")[] | undefined;
|
|
3158
|
-
};
|
|
3159
|
-
permissions?: never | undefined;
|
|
3160
|
-
} | {
|
|
3161
|
-
permissions: {
|
|
3162
|
-
access?: string[] | undefined;
|
|
3163
|
-
organization?: ("update" | "delete")[] | undefined;
|
|
3164
|
-
member?: ("update" | "delete" | "create")[] | undefined;
|
|
3165
|
-
invitation?: ("create" | "cancel")[] | undefined;
|
|
3166
|
-
team?: ("update" | "delete" | "create")[] | undefined;
|
|
3167
|
-
ac?: ("update" | "delete" | "create" | "read")[] | undefined;
|
|
3168
|
-
};
|
|
3169
|
-
permission?: never | undefined;
|
|
3170
|
-
}) & {
|
|
3171
|
-
role: R;
|
|
3172
|
-
}) => boolean;
|
|
3173
|
-
};
|
|
3174
|
-
} & {
|
|
3175
|
-
jwks: (fetchOptions?: any) => Promise<{
|
|
3176
|
-
data: null;
|
|
3177
|
-
error: {
|
|
3178
|
-
message?: string | undefined;
|
|
3179
|
-
status: number;
|
|
3180
|
-
statusText: string;
|
|
3181
|
-
};
|
|
3182
|
-
} | {
|
|
3183
|
-
data: better_auth.JSONWebKeySet;
|
|
3184
|
-
error: null;
|
|
3185
|
-
}>;
|
|
3186
|
-
} & {
|
|
3187
|
-
admin: {
|
|
3188
|
-
checkRolePermission: <R extends "admin" | "user">(data: ({
|
|
3189
|
-
permission: {
|
|
3190
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
|
|
3191
|
-
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
3192
|
-
};
|
|
3193
|
-
permissions?: never | undefined;
|
|
3194
|
-
} | {
|
|
3195
|
-
permissions: {
|
|
3196
|
-
readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
|
|
3197
|
-
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
3198
|
-
};
|
|
3199
|
-
permission?: never | undefined;
|
|
3200
|
-
}) & {
|
|
3201
|
-
role: R;
|
|
3202
|
-
}) => boolean;
|
|
3203
|
-
};
|
|
826
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
3204
827
|
} & {
|
|
3205
|
-
useSession:
|
|
828
|
+
useSession: better_auth_client.Atom<{
|
|
3206
829
|
data: {
|
|
3207
|
-
user: {
|
|
830
|
+
user: better_auth.StripEmptyObjects<{
|
|
3208
831
|
id: string;
|
|
3209
832
|
createdAt: Date;
|
|
3210
833
|
updatedAt: Date;
|
|
@@ -3212,14 +835,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3212
835
|
emailVerified: boolean;
|
|
3213
836
|
name: string;
|
|
3214
837
|
image?: string | null | undefined;
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
role?: string | null | undefined;
|
|
3218
|
-
banReason?: string | null | undefined;
|
|
3219
|
-
banExpires?: Date | null | undefined;
|
|
3220
|
-
lastActiveAt?: Date | null | undefined;
|
|
3221
|
-
};
|
|
3222
|
-
session: {
|
|
838
|
+
}>;
|
|
839
|
+
session: better_auth.StripEmptyObjects<{
|
|
3223
840
|
id: string;
|
|
3224
841
|
createdAt: Date;
|
|
3225
842
|
updatedAt: Date;
|
|
@@ -3228,11 +845,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3228
845
|
token: string;
|
|
3229
846
|
ipAddress?: string | null | undefined;
|
|
3230
847
|
userAgent?: string | null | undefined;
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
impersonatedBy?: string | null | undefined;
|
|
3234
|
-
};
|
|
3235
|
-
};
|
|
848
|
+
}>;
|
|
849
|
+
} | null;
|
|
3236
850
|
error: _better_fetch_fetch.BetterFetchError | null;
|
|
3237
851
|
isPending: boolean;
|
|
3238
852
|
isRefetching: boolean;
|
|
@@ -3258,22 +872,22 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3258
872
|
};
|
|
3259
873
|
})[];
|
|
3260
874
|
cache?: RequestCache | undefined;
|
|
3261
|
-
|
|
3262
|
-
|
|
875
|
+
priority?: RequestPriority | undefined;
|
|
876
|
+
credentials?: RequestCredentials;
|
|
3263
877
|
headers?: (HeadersInit & (HeadersInit | {
|
|
3264
878
|
accept: "application/json" | "text/plain" | "application/octet-stream";
|
|
3265
879
|
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
|
3266
880
|
authorization: "Bearer" | "Basic";
|
|
3267
881
|
})) | undefined;
|
|
3268
|
-
redirect?: RequestRedirect | undefined;
|
|
3269
|
-
credentials?: RequestCredentials;
|
|
3270
882
|
integrity?: string | undefined;
|
|
3271
883
|
keepalive?: boolean | undefined;
|
|
884
|
+
method: string;
|
|
3272
885
|
mode?: RequestMode | undefined;
|
|
3273
|
-
|
|
886
|
+
redirect?: RequestRedirect | undefined;
|
|
3274
887
|
referrer?: string | undefined;
|
|
3275
888
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
3276
889
|
signal?: (AbortSignal | null) | undefined;
|
|
890
|
+
window?: null | undefined;
|
|
3277
891
|
onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
|
|
3278
892
|
hookOptions?: {
|
|
3279
893
|
cloneResponse?: boolean;
|
|
@@ -3309,11 +923,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3309
923
|
$store: {
|
|
3310
924
|
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
3311
925
|
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
3312
|
-
atoms: Record<string,
|
|
926
|
+
atoms: Record<string, better_auth_client.WritableAtom<any>>;
|
|
3313
927
|
};
|
|
3314
928
|
$Infer: {
|
|
3315
929
|
Session: {
|
|
3316
|
-
user: {
|
|
930
|
+
user: better_auth.StripEmptyObjects<{
|
|
3317
931
|
id: string;
|
|
3318
932
|
createdAt: Date;
|
|
3319
933
|
updatedAt: Date;
|
|
@@ -3321,14 +935,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3321
935
|
emailVerified: boolean;
|
|
3322
936
|
name: string;
|
|
3323
937
|
image?: string | null | undefined;
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
role?: string | null | undefined;
|
|
3327
|
-
banReason?: string | null | undefined;
|
|
3328
|
-
banExpires?: Date | null | undefined;
|
|
3329
|
-
lastActiveAt?: Date | null | undefined;
|
|
3330
|
-
};
|
|
3331
|
-
session: {
|
|
938
|
+
}>;
|
|
939
|
+
session: better_auth.StripEmptyObjects<{
|
|
3332
940
|
id: string;
|
|
3333
941
|
createdAt: Date;
|
|
3334
942
|
updatedAt: Date;
|
|
@@ -3337,164 +945,202 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3337
945
|
token: string;
|
|
3338
946
|
ipAddress?: string | null | undefined;
|
|
3339
947
|
userAgent?: string | null | undefined;
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
948
|
+
}>;
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
$ERROR_CODES: {
|
|
952
|
+
USER_NOT_FOUND: {
|
|
953
|
+
readonly code: "USER_NOT_FOUND";
|
|
954
|
+
message: string;
|
|
955
|
+
};
|
|
956
|
+
FAILED_TO_CREATE_USER: {
|
|
957
|
+
readonly code: "FAILED_TO_CREATE_USER";
|
|
958
|
+
message: string;
|
|
959
|
+
};
|
|
960
|
+
FAILED_TO_CREATE_SESSION: {
|
|
961
|
+
readonly code: "FAILED_TO_CREATE_SESSION";
|
|
962
|
+
message: string;
|
|
963
|
+
};
|
|
964
|
+
FAILED_TO_UPDATE_USER: {
|
|
965
|
+
readonly code: "FAILED_TO_UPDATE_USER";
|
|
966
|
+
message: string;
|
|
967
|
+
};
|
|
968
|
+
FAILED_TO_GET_SESSION: {
|
|
969
|
+
readonly code: "FAILED_TO_GET_SESSION";
|
|
970
|
+
message: string;
|
|
971
|
+
};
|
|
972
|
+
INVALID_PASSWORD: {
|
|
973
|
+
readonly code: "INVALID_PASSWORD";
|
|
974
|
+
message: string;
|
|
975
|
+
};
|
|
976
|
+
INVALID_EMAIL: {
|
|
977
|
+
readonly code: "INVALID_EMAIL";
|
|
978
|
+
message: string;
|
|
979
|
+
};
|
|
980
|
+
INVALID_EMAIL_OR_PASSWORD: {
|
|
981
|
+
readonly code: "INVALID_EMAIL_OR_PASSWORD";
|
|
982
|
+
message: string;
|
|
983
|
+
};
|
|
984
|
+
INVALID_USER: {
|
|
985
|
+
readonly code: "INVALID_USER";
|
|
986
|
+
message: string;
|
|
987
|
+
};
|
|
988
|
+
SOCIAL_ACCOUNT_ALREADY_LINKED: {
|
|
989
|
+
readonly code: "SOCIAL_ACCOUNT_ALREADY_LINKED";
|
|
990
|
+
message: string;
|
|
991
|
+
};
|
|
992
|
+
PROVIDER_NOT_FOUND: {
|
|
993
|
+
readonly code: "PROVIDER_NOT_FOUND";
|
|
994
|
+
message: string;
|
|
995
|
+
};
|
|
996
|
+
INVALID_TOKEN: {
|
|
997
|
+
readonly code: "INVALID_TOKEN";
|
|
998
|
+
message: string;
|
|
999
|
+
};
|
|
1000
|
+
TOKEN_EXPIRED: {
|
|
1001
|
+
readonly code: "TOKEN_EXPIRED";
|
|
1002
|
+
message: string;
|
|
1003
|
+
};
|
|
1004
|
+
ID_TOKEN_NOT_SUPPORTED: {
|
|
1005
|
+
readonly code: "ID_TOKEN_NOT_SUPPORTED";
|
|
1006
|
+
message: string;
|
|
1007
|
+
};
|
|
1008
|
+
FAILED_TO_GET_USER_INFO: {
|
|
1009
|
+
readonly code: "FAILED_TO_GET_USER_INFO";
|
|
1010
|
+
message: string;
|
|
1011
|
+
};
|
|
1012
|
+
USER_EMAIL_NOT_FOUND: {
|
|
1013
|
+
readonly code: "USER_EMAIL_NOT_FOUND";
|
|
1014
|
+
message: string;
|
|
1015
|
+
};
|
|
1016
|
+
EMAIL_NOT_VERIFIED: {
|
|
1017
|
+
readonly code: "EMAIL_NOT_VERIFIED";
|
|
1018
|
+
message: string;
|
|
1019
|
+
};
|
|
1020
|
+
PASSWORD_TOO_SHORT: {
|
|
1021
|
+
readonly code: "PASSWORD_TOO_SHORT";
|
|
1022
|
+
message: string;
|
|
1023
|
+
};
|
|
1024
|
+
PASSWORD_TOO_LONG: {
|
|
1025
|
+
readonly code: "PASSWORD_TOO_LONG";
|
|
1026
|
+
message: string;
|
|
1027
|
+
};
|
|
1028
|
+
USER_ALREADY_EXISTS: {
|
|
1029
|
+
readonly code: "USER_ALREADY_EXISTS";
|
|
1030
|
+
message: string;
|
|
1031
|
+
};
|
|
1032
|
+
USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: {
|
|
1033
|
+
readonly code: "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL";
|
|
1034
|
+
message: string;
|
|
1035
|
+
};
|
|
1036
|
+
EMAIL_CAN_NOT_BE_UPDATED: {
|
|
1037
|
+
readonly code: "EMAIL_CAN_NOT_BE_UPDATED";
|
|
1038
|
+
message: string;
|
|
1039
|
+
};
|
|
1040
|
+
CREDENTIAL_ACCOUNT_NOT_FOUND: {
|
|
1041
|
+
readonly code: "CREDENTIAL_ACCOUNT_NOT_FOUND";
|
|
1042
|
+
message: string;
|
|
1043
|
+
};
|
|
1044
|
+
ACCOUNT_NOT_FOUND: {
|
|
1045
|
+
readonly code: "ACCOUNT_NOT_FOUND";
|
|
1046
|
+
message: string;
|
|
1047
|
+
};
|
|
1048
|
+
SESSION_EXPIRED: {
|
|
1049
|
+
readonly code: "SESSION_EXPIRED";
|
|
1050
|
+
message: string;
|
|
1051
|
+
};
|
|
1052
|
+
FAILED_TO_UNLINK_LAST_ACCOUNT: {
|
|
1053
|
+
readonly code: "FAILED_TO_UNLINK_LAST_ACCOUNT";
|
|
1054
|
+
message: string;
|
|
1055
|
+
};
|
|
1056
|
+
USER_ALREADY_HAS_PASSWORD: {
|
|
1057
|
+
readonly code: "USER_ALREADY_HAS_PASSWORD";
|
|
1058
|
+
message: string;
|
|
1059
|
+
};
|
|
1060
|
+
CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: {
|
|
1061
|
+
readonly code: "CROSS_SITE_NAVIGATION_LOGIN_BLOCKED";
|
|
1062
|
+
message: string;
|
|
1063
|
+
};
|
|
1064
|
+
VERIFICATION_EMAIL_NOT_ENABLED: {
|
|
1065
|
+
readonly code: "VERIFICATION_EMAIL_NOT_ENABLED";
|
|
1066
|
+
message: string;
|
|
1067
|
+
};
|
|
1068
|
+
EMAIL_ALREADY_VERIFIED: {
|
|
1069
|
+
readonly code: "EMAIL_ALREADY_VERIFIED";
|
|
1070
|
+
message: string;
|
|
1071
|
+
};
|
|
1072
|
+
EMAIL_MISMATCH: {
|
|
1073
|
+
readonly code: "EMAIL_MISMATCH";
|
|
1074
|
+
message: string;
|
|
1075
|
+
};
|
|
1076
|
+
SESSION_NOT_FRESH: {
|
|
1077
|
+
readonly code: "SESSION_NOT_FRESH";
|
|
1078
|
+
message: string;
|
|
1079
|
+
};
|
|
1080
|
+
LINKED_ACCOUNT_ALREADY_EXISTS: {
|
|
1081
|
+
readonly code: "LINKED_ACCOUNT_ALREADY_EXISTS";
|
|
1082
|
+
message: string;
|
|
1083
|
+
};
|
|
1084
|
+
INVALID_ORIGIN: {
|
|
1085
|
+
readonly code: "INVALID_ORIGIN";
|
|
1086
|
+
message: string;
|
|
1087
|
+
};
|
|
1088
|
+
INVALID_CALLBACK_URL: {
|
|
1089
|
+
readonly code: "INVALID_CALLBACK_URL";
|
|
1090
|
+
message: string;
|
|
1091
|
+
};
|
|
1092
|
+
INVALID_REDIRECT_URL: {
|
|
1093
|
+
readonly code: "INVALID_REDIRECT_URL";
|
|
1094
|
+
message: string;
|
|
1095
|
+
};
|
|
1096
|
+
INVALID_ERROR_CALLBACK_URL: {
|
|
1097
|
+
readonly code: "INVALID_ERROR_CALLBACK_URL";
|
|
1098
|
+
message: string;
|
|
1099
|
+
};
|
|
1100
|
+
INVALID_NEW_USER_CALLBACK_URL: {
|
|
1101
|
+
readonly code: "INVALID_NEW_USER_CALLBACK_URL";
|
|
1102
|
+
message: string;
|
|
1103
|
+
};
|
|
1104
|
+
MISSING_OR_NULL_ORIGIN: {
|
|
1105
|
+
readonly code: "MISSING_OR_NULL_ORIGIN";
|
|
1106
|
+
message: string;
|
|
1107
|
+
};
|
|
1108
|
+
CALLBACK_URL_REQUIRED: {
|
|
1109
|
+
readonly code: "CALLBACK_URL_REQUIRED";
|
|
1110
|
+
message: string;
|
|
1111
|
+
};
|
|
1112
|
+
FAILED_TO_CREATE_VERIFICATION: {
|
|
1113
|
+
readonly code: "FAILED_TO_CREATE_VERIFICATION";
|
|
1114
|
+
message: string;
|
|
1115
|
+
};
|
|
1116
|
+
FIELD_NOT_ALLOWED: {
|
|
1117
|
+
readonly code: "FIELD_NOT_ALLOWED";
|
|
1118
|
+
message: string;
|
|
1119
|
+
};
|
|
1120
|
+
ASYNC_VALIDATION_NOT_SUPPORTED: {
|
|
1121
|
+
readonly code: "ASYNC_VALIDATION_NOT_SUPPORTED";
|
|
1122
|
+
message: string;
|
|
1123
|
+
};
|
|
1124
|
+
VALIDATION_ERROR: {
|
|
1125
|
+
readonly code: "VALIDATION_ERROR";
|
|
1126
|
+
message: string;
|
|
1127
|
+
};
|
|
1128
|
+
MISSING_FIELD: {
|
|
1129
|
+
readonly code: "MISSING_FIELD";
|
|
1130
|
+
message: string;
|
|
1131
|
+
};
|
|
1132
|
+
METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: {
|
|
1133
|
+
readonly code: "METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED";
|
|
1134
|
+
message: string;
|
|
1135
|
+
};
|
|
1136
|
+
BODY_MUST_BE_AN_OBJECT: {
|
|
1137
|
+
readonly code: "BODY_MUST_BE_AN_OBJECT";
|
|
1138
|
+
message: string;
|
|
1139
|
+
};
|
|
1140
|
+
PASSWORD_ALREADY_SET: {
|
|
1141
|
+
readonly code: "PASSWORD_ALREADY_SET";
|
|
1142
|
+
message: string;
|
|
3344
1143
|
};
|
|
3345
|
-
};
|
|
3346
|
-
$ERROR_CODES: {
|
|
3347
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
|
|
3348
|
-
readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
|
|
3349
|
-
readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
|
|
3350
|
-
readonly ORGANIZATION_SLUG_ALREADY_TAKEN: "Organization slug already taken";
|
|
3351
|
-
readonly ORGANIZATION_NOT_FOUND: "Organization not found";
|
|
3352
|
-
readonly USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: "User is not a member of the organization";
|
|
3353
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: "You are not allowed to update this organization";
|
|
3354
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: "You are not allowed to delete this organization";
|
|
3355
|
-
readonly NO_ACTIVE_ORGANIZATION: "No active organization";
|
|
3356
|
-
readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: "User is already a member of this organization";
|
|
3357
|
-
readonly MEMBER_NOT_FOUND: "Member not found";
|
|
3358
|
-
readonly ROLE_NOT_FOUND: "Role not found";
|
|
3359
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: "You are not allowed to create a new team";
|
|
3360
|
-
readonly TEAM_ALREADY_EXISTS: "Team already exists";
|
|
3361
|
-
readonly TEAM_NOT_FOUND: "Team not found";
|
|
3362
|
-
readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: "You cannot leave the organization as the only owner";
|
|
3363
|
-
readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: "You cannot leave the organization without an owner";
|
|
3364
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: "You are not allowed to delete this member";
|
|
3365
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: "You are not allowed to invite users to this organization";
|
|
3366
|
-
readonly USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: "User is already invited to this organization";
|
|
3367
|
-
readonly INVITATION_NOT_FOUND: "Invitation not found";
|
|
3368
|
-
readonly YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: "You are not the recipient of the invitation";
|
|
3369
|
-
readonly EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: "Email verification required before accepting or rejecting invitation";
|
|
3370
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: "You are not allowed to cancel this invitation";
|
|
3371
|
-
readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: "Inviter is no longer a member of the organization";
|
|
3372
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: "You are not allowed to invite a user with this role";
|
|
3373
|
-
readonly FAILED_TO_RETRIEVE_INVITATION: "Failed to retrieve invitation";
|
|
3374
|
-
readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: "You have reached the maximum number of teams";
|
|
3375
|
-
readonly UNABLE_TO_REMOVE_LAST_TEAM: "Unable to remove last team";
|
|
3376
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: "You are not allowed to update this member";
|
|
3377
|
-
readonly ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: "Organization membership limit reached";
|
|
3378
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to create teams in this organization";
|
|
3379
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to delete teams in this organization";
|
|
3380
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: "You are not allowed to update this team";
|
|
3381
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: "You are not allowed to delete this team";
|
|
3382
|
-
readonly INVITATION_LIMIT_REACHED: "Invitation limit reached";
|
|
3383
|
-
readonly TEAM_MEMBER_LIMIT_REACHED: "Team member limit reached";
|
|
3384
|
-
readonly USER_IS_NOT_A_MEMBER_OF_THE_TEAM: "User is not a member of the team";
|
|
3385
|
-
readonly YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: "You are not allowed to list the members of this team";
|
|
3386
|
-
readonly YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: "You do not have an active team";
|
|
3387
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: "You are not allowed to create a new member";
|
|
3388
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: "You are not allowed to remove a team member";
|
|
3389
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: "You are not allowed to access this organization as an owner";
|
|
3390
|
-
readonly YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: "You are not a member of this organization";
|
|
3391
|
-
readonly MISSING_AC_INSTANCE: "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information";
|
|
3392
|
-
readonly YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: "You must be in an organization to create a role";
|
|
3393
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: "You are not allowed to create a role";
|
|
3394
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: "You are not allowed to update a role";
|
|
3395
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: "You are not allowed to delete a role";
|
|
3396
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: "You are not allowed to read a role";
|
|
3397
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: "You are not allowed to list a role";
|
|
3398
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: "You are not allowed to get a role";
|
|
3399
|
-
readonly TOO_MANY_ROLES: "This organization has too many roles";
|
|
3400
|
-
readonly INVALID_RESOURCE: "The provided permission includes an invalid resource";
|
|
3401
|
-
readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
|
|
3402
|
-
readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
|
|
3403
|
-
readonly FAILED_TO_CREATE_USER: "Failed to create user";
|
|
3404
|
-
readonly USER_ALREADY_EXISTS: "User already exists.";
|
|
3405
|
-
readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
|
|
3406
|
-
readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
|
|
3407
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
|
|
3408
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
|
|
3409
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
|
|
3410
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
|
|
3411
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
|
|
3412
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
|
|
3413
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
|
|
3414
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
|
|
3415
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
|
|
3416
|
-
readonly BANNED_USER: "You have been banned from this application";
|
|
3417
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
|
|
3418
|
-
readonly NO_DATA_TO_UPDATE: "No data to update";
|
|
3419
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
|
|
3420
|
-
readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
|
|
3421
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
|
|
3422
|
-
readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
|
|
3423
|
-
readonly INVALID_ROLE_TYPE: "Invalid role type";
|
|
3424
|
-
readonly OTP_NOT_ENABLED: "OTP not enabled";
|
|
3425
|
-
readonly OTP_HAS_EXPIRED: "OTP has expired";
|
|
3426
|
-
readonly TOTP_NOT_ENABLED: "TOTP not enabled";
|
|
3427
|
-
readonly TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled";
|
|
3428
|
-
readonly BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled";
|
|
3429
|
-
readonly INVALID_BACKUP_CODE: "Invalid backup code";
|
|
3430
|
-
readonly INVALID_CODE: "Invalid code";
|
|
3431
|
-
readonly TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many attempts. Please request a new code.";
|
|
3432
|
-
readonly INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie";
|
|
3433
|
-
readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
|
|
3434
|
-
readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
|
|
3435
|
-
readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
|
|
3436
|
-
readonly USER_BANNED: "User is banned";
|
|
3437
|
-
readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
|
|
3438
|
-
readonly KEY_NOT_FOUND: "API Key not found";
|
|
3439
|
-
readonly KEY_DISABLED: "API Key is disabled";
|
|
3440
|
-
readonly KEY_EXPIRED: "API Key has expired";
|
|
3441
|
-
readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
|
|
3442
|
-
readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
|
|
3443
|
-
readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
|
|
3444
|
-
readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
|
|
3445
|
-
readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
|
|
3446
|
-
readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
|
|
3447
|
-
readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
|
|
3448
|
-
readonly METADATA_DISABLED: "Metadata is disabled.";
|
|
3449
|
-
readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
|
|
3450
|
-
readonly NO_VALUES_TO_UPDATE: "No values to update.";
|
|
3451
|
-
readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
|
|
3452
|
-
readonly INVALID_API_KEY: "Invalid API key.";
|
|
3453
|
-
readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
|
|
3454
|
-
readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
|
|
3455
|
-
readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
|
|
3456
|
-
readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
|
|
3457
|
-
readonly NAME_REQUIRED: "API Key name is required.";
|
|
3458
|
-
readonly USER_NOT_FOUND: "User not found";
|
|
3459
|
-
readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
|
|
3460
|
-
readonly FAILED_TO_UPDATE_USER: "Failed to update user";
|
|
3461
|
-
readonly FAILED_TO_GET_SESSION: "Failed to get session";
|
|
3462
|
-
readonly INVALID_PASSWORD: "Invalid password";
|
|
3463
|
-
readonly INVALID_EMAIL: "Invalid email";
|
|
3464
|
-
readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
|
|
3465
|
-
readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
|
|
3466
|
-
readonly PROVIDER_NOT_FOUND: "Provider not found";
|
|
3467
|
-
readonly INVALID_TOKEN: "Invalid token";
|
|
3468
|
-
readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
|
|
3469
|
-
readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
|
|
3470
|
-
readonly USER_EMAIL_NOT_FOUND: "User email not found";
|
|
3471
|
-
readonly EMAIL_NOT_VERIFIED: "Email not verified";
|
|
3472
|
-
readonly PASSWORD_TOO_SHORT: "Password too short";
|
|
3473
|
-
readonly PASSWORD_TOO_LONG: "Password too long";
|
|
3474
|
-
readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
|
|
3475
|
-
readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
|
|
3476
|
-
readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
|
|
3477
|
-
readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
|
|
3478
|
-
readonly ACCOUNT_NOT_FOUND: "Account not found";
|
|
3479
|
-
readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
|
|
3480
|
-
readonly CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: "Cross-site navigation login blocked. This request appears to be a CSRF attack.";
|
|
3481
|
-
readonly VERIFICATION_EMAIL_NOT_ENABLED: "Verification email isn't enabled";
|
|
3482
|
-
readonly EMAIL_ALREADY_VERIFIED: "Email is already verified";
|
|
3483
|
-
readonly EMAIL_MISMATCH: "Email mismatch";
|
|
3484
|
-
readonly SESSION_NOT_FRESH: "Session is not fresh";
|
|
3485
|
-
readonly LINKED_ACCOUNT_ALREADY_EXISTS: "Linked account already exists";
|
|
3486
|
-
readonly INVALID_ORIGIN: "Invalid origin";
|
|
3487
|
-
readonly INVALID_CALLBACK_URL: "Invalid callbackURL";
|
|
3488
|
-
readonly INVALID_REDIRECT_URL: "Invalid redirectURL";
|
|
3489
|
-
readonly INVALID_ERROR_CALLBACK_URL: "Invalid errorCallbackURL";
|
|
3490
|
-
readonly INVALID_NEW_USER_CALLBACK_URL: "Invalid newUserCallbackURL";
|
|
3491
|
-
readonly MISSING_OR_NULL_ORIGIN: "Missing or null Origin";
|
|
3492
|
-
readonly CALLBACK_URL_REQUIRED: "callbackURL is required";
|
|
3493
|
-
readonly FAILED_TO_CREATE_VERIFICATION: "Unable to create verification";
|
|
3494
|
-
readonly FIELD_NOT_ALLOWED: "Field not allowed to be set";
|
|
3495
|
-
readonly ASYNC_VALIDATION_NOT_SUPPORTED: "Async validation is not supported";
|
|
3496
|
-
readonly VALIDATION_ERROR: "Validation Error";
|
|
3497
|
-
readonly MISSING_FIELD: "Field is required";
|
|
3498
1144
|
};
|
|
3499
1145
|
};
|
|
3500
1146
|
type APIClient = ReturnType<typeof createAPIClient>;
|
|
@@ -3524,6 +1170,24 @@ type TeamMember = {
|
|
|
3524
1170
|
createdAt: Date;
|
|
3525
1171
|
};
|
|
3526
1172
|
|
|
1173
|
+
declare class BaseError extends Error {
|
|
1174
|
+
code: string;
|
|
1175
|
+
constructor(code: string, message: string, options?: ErrorOptions);
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
declare class ApplicationError extends BaseError {
|
|
1179
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1180
|
+
}
|
|
1181
|
+
declare class RefreshTokenExpiredError extends ApplicationError {
|
|
1182
|
+
constructor(options?: ErrorOptions);
|
|
1183
|
+
}
|
|
1184
|
+
declare class AuthorizationFlowError extends ApplicationError {
|
|
1185
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1186
|
+
}
|
|
1187
|
+
declare class UserNotLoggedInError extends ApplicationError {
|
|
1188
|
+
constructor(message: string, options?: ErrorOptions);
|
|
1189
|
+
}
|
|
1190
|
+
|
|
3527
1191
|
type Application = {
|
|
3528
1192
|
id: string;
|
|
3529
1193
|
name: string;
|
|
@@ -3548,24 +1212,6 @@ type WhoAmIResponse = {
|
|
|
3548
1212
|
organization: FullOrganization;
|
|
3549
1213
|
};
|
|
3550
1214
|
|
|
3551
|
-
declare class BaseError extends Error {
|
|
3552
|
-
code: string;
|
|
3553
|
-
constructor(code: string, message: string, options?: ErrorOptions);
|
|
3554
|
-
}
|
|
3555
|
-
|
|
3556
|
-
declare class ApplicationError extends BaseError {
|
|
3557
|
-
constructor(message: string, options?: ErrorOptions);
|
|
3558
|
-
}
|
|
3559
|
-
declare class RefreshTokenExpiredError extends ApplicationError {
|
|
3560
|
-
constructor(options?: ErrorOptions);
|
|
3561
|
-
}
|
|
3562
|
-
declare class AuthorizationFlowError extends ApplicationError {
|
|
3563
|
-
constructor(message: string, options?: ErrorOptions);
|
|
3564
|
-
}
|
|
3565
|
-
declare class UserNotLoggedInError extends ApplicationError {
|
|
3566
|
-
constructor(message: string, options?: ErrorOptions);
|
|
3567
|
-
}
|
|
3568
|
-
|
|
3569
1215
|
/**
|
|
3570
1216
|
* Service for managing applications and their candidate organizations.
|
|
3571
1217
|
*
|
|
@@ -3589,13 +1235,7 @@ declare class ApplicationService {
|
|
|
3589
1235
|
* @param applicationId - The application ID to get candidate organizations for
|
|
3590
1236
|
* @returns The application details and list of candidate organizations
|
|
3591
1237
|
*/
|
|
3592
|
-
listCandidateOrganizations(applicationId: string): Promise<
|
|
3593
|
-
organizations: FullOrganization[];
|
|
3594
|
-
application?: Application | undefined;
|
|
3595
|
-
} | {
|
|
3596
|
-
organizations: FullOrganization[];
|
|
3597
|
-
application?: Application | undefined;
|
|
3598
|
-
}>;
|
|
1238
|
+
listCandidateOrganizations(applicationId: string): Promise<any>;
|
|
3599
1239
|
/**
|
|
3600
1240
|
* Starts an authorization flow for a specific application.
|
|
3601
1241
|
*
|
|
@@ -3604,14 +1244,14 @@ declare class ApplicationService {
|
|
|
3604
1244
|
* @param codeChallenge - The code challenge to use for the authorization flow
|
|
3605
1245
|
* @param organizationId - The organization ID to start the authorization flow for
|
|
3606
1246
|
*/
|
|
3607
|
-
startAuthorizationFlow(applicationId: string, redirectUri: string, codeChallenge: string, organizationId: string): Promise<
|
|
1247
|
+
startAuthorizationFlow(applicationId: string, redirectUri: string, codeChallenge: string, organizationId: string): Promise<any>;
|
|
3608
1248
|
/**
|
|
3609
1249
|
* Completes an authorization flow for a specific application.
|
|
3610
1250
|
*
|
|
3611
1251
|
* @param code - The code to use for the authorization flow
|
|
3612
1252
|
* @param codeVerifier - The code verifier to use for the authorization flow
|
|
3613
1253
|
*/
|
|
3614
|
-
completeAuthorizationFlow(code: string, codeVerifier: string): Promise<
|
|
1254
|
+
completeAuthorizationFlow(code: string, codeVerifier: string): Promise<any>;
|
|
3615
1255
|
/**
|
|
3616
1256
|
* Refreshes an authentication token for a specific application.
|
|
3617
1257
|
*
|
|
@@ -3619,14 +1259,14 @@ declare class ApplicationService {
|
|
|
3619
1259
|
* @throws {RefreshTokenExpiredError} When the refresh token has expired or is invalid
|
|
3620
1260
|
* @throws {ApplicationError} For other API errors
|
|
3621
1261
|
*/
|
|
3622
|
-
refreshAccessToken(refreshToken: string): Promise<
|
|
1262
|
+
refreshAccessToken(refreshToken: string): Promise<any>;
|
|
3623
1263
|
/**
|
|
3624
1264
|
* Gets the current user and organization for a specific application.
|
|
3625
1265
|
*
|
|
3626
1266
|
* @param accessToken - The access token to use for the who am I request
|
|
3627
1267
|
* @returns The current user and organization
|
|
3628
1268
|
*/
|
|
3629
|
-
whoAmI(accessToken: string): Promise<
|
|
1269
|
+
whoAmI(accessToken: string): Promise<any>;
|
|
3630
1270
|
/**
|
|
3631
1271
|
* Switches the active organization for the authenticated user.
|
|
3632
1272
|
*
|
|
@@ -3638,7 +1278,7 @@ declare class ApplicationService {
|
|
|
3638
1278
|
* @param accessToken - Optional access token for authentication (uses cookie if not provided)
|
|
3639
1279
|
* @returns New authentication tokens and user/organization details
|
|
3640
1280
|
*/
|
|
3641
|
-
switchOrganization(organizationId: string, accessToken: string): Promise<
|
|
1281
|
+
switchOrganization(organizationId: string, accessToken: string): Promise<any>;
|
|
3642
1282
|
/**
|
|
3643
1283
|
* Logs out the user by invalidating their refresh token.
|
|
3644
1284
|
*
|
|
@@ -3698,53 +1338,13 @@ declare class OrganizationService {
|
|
|
3698
1338
|
* @param id - The organization ID
|
|
3699
1339
|
* @returns The organization with members, invitations, and teams
|
|
3700
1340
|
*/
|
|
3701
|
-
getOrganization(id: string): Promise<
|
|
3702
|
-
members: {
|
|
3703
|
-
id: string;
|
|
3704
|
-
organizationId: string;
|
|
3705
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3706
|
-
createdAt: Date;
|
|
3707
|
-
userId: string;
|
|
3708
|
-
teamId?: string | undefined | undefined;
|
|
3709
|
-
user: {
|
|
3710
|
-
id: string;
|
|
3711
|
-
email: string;
|
|
3712
|
-
name: string;
|
|
3713
|
-
image?: string | undefined;
|
|
3714
|
-
};
|
|
3715
|
-
}[];
|
|
3716
|
-
invitations: {
|
|
3717
|
-
id: string;
|
|
3718
|
-
organizationId: string;
|
|
3719
|
-
email: string;
|
|
3720
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3721
|
-
status: better_auth_plugins.InvitationStatus;
|
|
3722
|
-
inviterId: string;
|
|
3723
|
-
expiresAt: Date;
|
|
3724
|
-
createdAt: Date;
|
|
3725
|
-
teamId?: string | undefined | undefined;
|
|
3726
|
-
}[];
|
|
3727
|
-
teams: {
|
|
3728
|
-
id: string;
|
|
3729
|
-
name: string;
|
|
3730
|
-
organizationId: string;
|
|
3731
|
-
createdAt: Date;
|
|
3732
|
-
updatedAt?: Date | undefined;
|
|
3733
|
-
}[];
|
|
3734
|
-
} & {
|
|
3735
|
-
id: string;
|
|
3736
|
-
name: string;
|
|
3737
|
-
slug: string;
|
|
3738
|
-
createdAt: Date;
|
|
3739
|
-
logo?: string | null | undefined | undefined;
|
|
3740
|
-
metadata?: any;
|
|
3741
|
-
}>;
|
|
1341
|
+
getOrganization(id: string): Promise<any>;
|
|
3742
1342
|
/**
|
|
3743
1343
|
* Lists all organizations accessible to the current user.
|
|
3744
1344
|
*
|
|
3745
1345
|
* @returns An array of organizations
|
|
3746
1346
|
*/
|
|
3747
|
-
listOrganizations(): Promise<
|
|
1347
|
+
listOrganizations(): Promise<any[]>;
|
|
3748
1348
|
/**
|
|
3749
1349
|
* Sets the active organization for the current user session.
|
|
3750
1350
|
*
|
|
@@ -3760,7 +1360,7 @@ declare class OrganizationService {
|
|
|
3760
1360
|
* @param payload.settings - New organization settings
|
|
3761
1361
|
* @returns The updated organization
|
|
3762
1362
|
*/
|
|
3763
|
-
updateOrganization(payload: UpdateOrganizationPayload): Promise<
|
|
1363
|
+
updateOrganization(payload: UpdateOrganizationPayload): Promise<any>;
|
|
3764
1364
|
/**
|
|
3765
1365
|
* Lists members of the active organization with optional pagination.
|
|
3766
1366
|
*
|
|
@@ -3769,55 +1369,13 @@ declare class OrganizationService {
|
|
|
3769
1369
|
* @param options.offset - Number of members to skip
|
|
3770
1370
|
* @returns An array of organization members
|
|
3771
1371
|
*/
|
|
3772
|
-
listMembers(options?: ListMembersOptions): Promise<
|
|
3773
|
-
id: string;
|
|
3774
|
-
organizationId: string;
|
|
3775
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3776
|
-
createdAt: Date;
|
|
3777
|
-
userId: string;
|
|
3778
|
-
teamId?: string | undefined | undefined;
|
|
3779
|
-
user: {
|
|
3780
|
-
id: string;
|
|
3781
|
-
email: string;
|
|
3782
|
-
name: string;
|
|
3783
|
-
image?: string | undefined;
|
|
3784
|
-
};
|
|
3785
|
-
} & {
|
|
3786
|
-
user: {
|
|
3787
|
-
id: string;
|
|
3788
|
-
name: string;
|
|
3789
|
-
email: string;
|
|
3790
|
-
image: string | null | undefined;
|
|
3791
|
-
};
|
|
3792
|
-
})[]>;
|
|
1372
|
+
listMembers(options?: ListMembersOptions): Promise<any>;
|
|
3793
1373
|
/**
|
|
3794
1374
|
* Gets the currently active organization member for the authenticated user.
|
|
3795
1375
|
*
|
|
3796
1376
|
* @returns The active member object
|
|
3797
1377
|
*/
|
|
3798
|
-
getActiveMember(): Promise<
|
|
3799
|
-
id: string;
|
|
3800
|
-
organizationId: string;
|
|
3801
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3802
|
-
createdAt: Date;
|
|
3803
|
-
userId: string;
|
|
3804
|
-
teamId?: string | undefined | undefined;
|
|
3805
|
-
user: {
|
|
3806
|
-
id: string;
|
|
3807
|
-
email: string;
|
|
3808
|
-
name: string;
|
|
3809
|
-
image?: string | undefined;
|
|
3810
|
-
};
|
|
3811
|
-
} & {
|
|
3812
|
-
user: better_auth.User;
|
|
3813
|
-
}, "user"> & {
|
|
3814
|
-
user: {
|
|
3815
|
-
id: string;
|
|
3816
|
-
name: string;
|
|
3817
|
-
email: string;
|
|
3818
|
-
image: string | undefined;
|
|
3819
|
-
};
|
|
3820
|
-
}>;
|
|
1378
|
+
getActiveMember(): Promise<any>;
|
|
3821
1379
|
/**
|
|
3822
1380
|
* Invites a user to join the active organization.
|
|
3823
1381
|
*
|
|
@@ -3828,27 +1386,7 @@ declare class OrganizationService {
|
|
|
3828
1386
|
* @param options.resend - Whether to resend if invitation already exists
|
|
3829
1387
|
* @returns The created invitation
|
|
3830
1388
|
*/
|
|
3831
|
-
inviteUserToOrganization({ userEmail, role, teamId, resend }: InviteUserToOrganizationOptions): Promise<
|
|
3832
|
-
id: string;
|
|
3833
|
-
organizationId: string;
|
|
3834
|
-
email: string;
|
|
3835
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3836
|
-
status: better_auth_plugins.InvitationStatus;
|
|
3837
|
-
inviterId: string;
|
|
3838
|
-
expiresAt: Date;
|
|
3839
|
-
createdAt: Date;
|
|
3840
|
-
teamId?: string | undefined | undefined;
|
|
3841
|
-
} | {
|
|
3842
|
-
id: string;
|
|
3843
|
-
organizationId: string;
|
|
3844
|
-
email: string;
|
|
3845
|
-
role: "org:admin" | "org:member" | "org:reviewer";
|
|
3846
|
-
status: better_auth_plugins.InvitationStatus;
|
|
3847
|
-
inviterId: string;
|
|
3848
|
-
expiresAt: Date;
|
|
3849
|
-
createdAt: Date;
|
|
3850
|
-
teamId?: string | undefined | undefined;
|
|
3851
|
-
}>>;
|
|
1389
|
+
inviteUserToOrganization({ userEmail, role, teamId, resend }: InviteUserToOrganizationOptions): Promise<any>;
|
|
3852
1390
|
/**
|
|
3853
1391
|
* Cancels a pending organization invitation.
|
|
3854
1392
|
*
|
|
@@ -3884,13 +1422,7 @@ declare class OrganizationService {
|
|
|
3884
1422
|
* @param payload.name - The name of the team
|
|
3885
1423
|
* @returns The created team
|
|
3886
1424
|
*/
|
|
3887
|
-
createTeam(payload: CreateTeamPayload): Promise<
|
|
3888
|
-
id: string;
|
|
3889
|
-
name: string;
|
|
3890
|
-
organizationId: string;
|
|
3891
|
-
createdAt: Date;
|
|
3892
|
-
updatedAt?: Date | undefined;
|
|
3893
|
-
}>;
|
|
1425
|
+
createTeam(payload: CreateTeamPayload): Promise<any>;
|
|
3894
1426
|
/**
|
|
3895
1427
|
* Updates an existing team's details.
|
|
3896
1428
|
*
|
|
@@ -3899,13 +1431,7 @@ declare class OrganizationService {
|
|
|
3899
1431
|
* @param payload.name - The new team name
|
|
3900
1432
|
* @returns The updated team
|
|
3901
1433
|
*/
|
|
3902
|
-
updateTeam(id: string, payload: UpdateTeamPayload): Promise<
|
|
3903
|
-
id: string;
|
|
3904
|
-
name: string;
|
|
3905
|
-
organizationId: string;
|
|
3906
|
-
createdAt: Date;
|
|
3907
|
-
updatedAt?: Date | undefined;
|
|
3908
|
-
}>;
|
|
1434
|
+
updateTeam(id: string, payload: UpdateTeamPayload): Promise<any>;
|
|
3909
1435
|
/**
|
|
3910
1436
|
* Deletes a team from the active organization.
|
|
3911
1437
|
*
|
|
@@ -3917,25 +1443,14 @@ declare class OrganizationService {
|
|
|
3917
1443
|
*
|
|
3918
1444
|
* @returns An array of teams
|
|
3919
1445
|
*/
|
|
3920
|
-
listTeams(): Promise<
|
|
3921
|
-
id: string;
|
|
3922
|
-
name: string;
|
|
3923
|
-
organizationId: string;
|
|
3924
|
-
createdAt: Date;
|
|
3925
|
-
updatedAt?: Date | undefined;
|
|
3926
|
-
}[]>;
|
|
1446
|
+
listTeams(): Promise<any>;
|
|
3927
1447
|
/**
|
|
3928
1448
|
* Lists all members of a specific team.
|
|
3929
1449
|
*
|
|
3930
1450
|
* @param id - The team ID
|
|
3931
1451
|
* @returns An array of team members
|
|
3932
1452
|
*/
|
|
3933
|
-
listTeamMembers(id: string): Promise<
|
|
3934
|
-
id: string;
|
|
3935
|
-
teamId: string;
|
|
3936
|
-
userId: string;
|
|
3937
|
-
createdAt: Date;
|
|
3938
|
-
}[]>;
|
|
1453
|
+
listTeamMembers(id: string): Promise<any>;
|
|
3939
1454
|
/**
|
|
3940
1455
|
* Adds a user to a team.
|
|
3941
1456
|
*
|
|
@@ -3943,12 +1458,7 @@ declare class OrganizationService {
|
|
|
3943
1458
|
* @param userId - The user ID to add
|
|
3944
1459
|
* @returns The added team member
|
|
3945
1460
|
*/
|
|
3946
|
-
addTeamMember(teamId: string, userId: string): Promise<
|
|
3947
|
-
id: string;
|
|
3948
|
-
teamId: string;
|
|
3949
|
-
userId: string;
|
|
3950
|
-
createdAt: Date;
|
|
3951
|
-
}>;
|
|
1461
|
+
addTeamMember(teamId: string, userId: string): Promise<any>;
|
|
3952
1462
|
/**
|
|
3953
1463
|
* Removes a user from a team.
|
|
3954
1464
|
*
|
|
@@ -3997,43 +1507,43 @@ declare class SessionService {
|
|
|
3997
1507
|
* @returns The current user session
|
|
3998
1508
|
*/
|
|
3999
1509
|
getSession(token?: string): Promise<{
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
1510
|
+
data: {
|
|
1511
|
+
user: better_auth.StripEmptyObjects<{
|
|
1512
|
+
id: string;
|
|
1513
|
+
createdAt: Date;
|
|
1514
|
+
updatedAt: Date;
|
|
1515
|
+
email: string;
|
|
1516
|
+
emailVerified: boolean;
|
|
1517
|
+
name: string;
|
|
1518
|
+
image?: string | null | undefined;
|
|
1519
|
+
}>;
|
|
1520
|
+
session: better_auth.StripEmptyObjects<{
|
|
1521
|
+
id: string;
|
|
1522
|
+
createdAt: Date;
|
|
1523
|
+
updatedAt: Date;
|
|
1524
|
+
userId: string;
|
|
1525
|
+
expiresAt: Date;
|
|
1526
|
+
token: string;
|
|
1527
|
+
ipAddress?: string | null | undefined;
|
|
1528
|
+
userAgent?: string | null | undefined;
|
|
1529
|
+
}>;
|
|
1530
|
+
} | null;
|
|
1531
|
+
error: null;
|
|
1532
|
+
} | {
|
|
1533
|
+
data: null;
|
|
1534
|
+
error: {
|
|
1535
|
+
code?: string | undefined | undefined;
|
|
1536
|
+
message?: string | undefined | undefined;
|
|
1537
|
+
status: number;
|
|
1538
|
+
statusText: string;
|
|
4027
1539
|
};
|
|
4028
|
-
}
|
|
1540
|
+
}>;
|
|
4029
1541
|
/**
|
|
4030
1542
|
* Retrieves a valid JWT token.
|
|
4031
1543
|
*
|
|
4032
1544
|
* @returns The JWT token
|
|
4033
1545
|
*/
|
|
4034
|
-
getToken(): Promise<
|
|
4035
|
-
token: string;
|
|
4036
|
-
}>;
|
|
1546
|
+
getToken(): Promise<any>;
|
|
4037
1547
|
/**
|
|
4038
1548
|
* Initiates social authentication flow with Google or Microsoft.
|
|
4039
1549
|
*
|
|
@@ -4092,9 +1602,7 @@ declare class SessionService {
|
|
|
4092
1602
|
* @param nonce - The nonce to retrieve the token for
|
|
4093
1603
|
* @returns The JWT token for the nonce
|
|
4094
1604
|
*/
|
|
4095
|
-
getNoncePayload(nonce: string): Promise<
|
|
4096
|
-
token: string;
|
|
4097
|
-
}>;
|
|
1605
|
+
getNoncePayload(nonce: string): Promise<any>;
|
|
4098
1606
|
}
|
|
4099
1607
|
|
|
4100
1608
|
type CreateApiKeyPayload = {
|
|
@@ -4132,104 +1640,11 @@ declare class ApiKeyService {
|
|
|
4132
1640
|
* @param client - The API client for making API key requests
|
|
4133
1641
|
*/
|
|
4134
1642
|
constructor(client: APIClient);
|
|
4135
|
-
createApiKey(payload: CreateApiKeyPayload): Promise<
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
name: string | null;
|
|
4141
|
-
start: string | null;
|
|
4142
|
-
prefix: string | null;
|
|
4143
|
-
userId: string;
|
|
4144
|
-
refillInterval: number | null;
|
|
4145
|
-
refillAmount: number | null;
|
|
4146
|
-
lastRefillAt: Date | null;
|
|
4147
|
-
enabled: boolean;
|
|
4148
|
-
rateLimitEnabled: boolean;
|
|
4149
|
-
rateLimitTimeWindow: number | null;
|
|
4150
|
-
rateLimitMax: number | null;
|
|
4151
|
-
requestCount: number;
|
|
4152
|
-
remaining: number | null;
|
|
4153
|
-
lastRequest: Date | null;
|
|
4154
|
-
expiresAt: Date | null;
|
|
4155
|
-
createdAt: Date;
|
|
4156
|
-
updatedAt: Date;
|
|
4157
|
-
}>;
|
|
4158
|
-
getApiKey(id: string): Promise<{
|
|
4159
|
-
metadata: Record<string, any> | null;
|
|
4160
|
-
permissions: {
|
|
4161
|
-
[key: string]: string[];
|
|
4162
|
-
} | null;
|
|
4163
|
-
id: string;
|
|
4164
|
-
name: string | null;
|
|
4165
|
-
start: string | null;
|
|
4166
|
-
prefix: string | null;
|
|
4167
|
-
userId: string;
|
|
4168
|
-
refillInterval: number | null;
|
|
4169
|
-
refillAmount: number | null;
|
|
4170
|
-
lastRefillAt: Date | null;
|
|
4171
|
-
enabled: boolean;
|
|
4172
|
-
rateLimitEnabled: boolean;
|
|
4173
|
-
rateLimitTimeWindow: number | null;
|
|
4174
|
-
rateLimitMax: number | null;
|
|
4175
|
-
requestCount: number;
|
|
4176
|
-
remaining: number | null;
|
|
4177
|
-
lastRequest: Date | null;
|
|
4178
|
-
expiresAt: Date | null;
|
|
4179
|
-
createdAt: Date;
|
|
4180
|
-
updatedAt: Date;
|
|
4181
|
-
}>;
|
|
4182
|
-
listApiKeys(): Promise<{
|
|
4183
|
-
metadata: Record<string, any> | null;
|
|
4184
|
-
permissions: {
|
|
4185
|
-
[key: string]: string[];
|
|
4186
|
-
} | null;
|
|
4187
|
-
id: string;
|
|
4188
|
-
name: string | null;
|
|
4189
|
-
start: string | null;
|
|
4190
|
-
prefix: string | null;
|
|
4191
|
-
userId: string;
|
|
4192
|
-
refillInterval: number | null;
|
|
4193
|
-
refillAmount: number | null;
|
|
4194
|
-
lastRefillAt: Date | null;
|
|
4195
|
-
enabled: boolean;
|
|
4196
|
-
rateLimitEnabled: boolean;
|
|
4197
|
-
rateLimitTimeWindow: number | null;
|
|
4198
|
-
rateLimitMax: number | null;
|
|
4199
|
-
requestCount: number;
|
|
4200
|
-
remaining: number | null;
|
|
4201
|
-
lastRequest: Date | null;
|
|
4202
|
-
expiresAt: Date | null;
|
|
4203
|
-
createdAt: Date;
|
|
4204
|
-
updatedAt: Date;
|
|
4205
|
-
}[]>;
|
|
4206
|
-
updateApiKey(payload: UpdateApiKeyPayload): Promise<{
|
|
4207
|
-
metadata: Record<string, any> | null;
|
|
4208
|
-
permissions: {
|
|
4209
|
-
[key: string]: string[];
|
|
4210
|
-
} | null;
|
|
4211
|
-
id: string;
|
|
4212
|
-
name: string | null;
|
|
4213
|
-
start: string | null;
|
|
4214
|
-
prefix: string | null;
|
|
4215
|
-
userId: string;
|
|
4216
|
-
refillInterval: number | null;
|
|
4217
|
-
refillAmount: number | null;
|
|
4218
|
-
lastRefillAt: Date | null;
|
|
4219
|
-
enabled: boolean;
|
|
4220
|
-
rateLimitEnabled: boolean;
|
|
4221
|
-
rateLimitTimeWindow: number | null;
|
|
4222
|
-
rateLimitMax: number | null;
|
|
4223
|
-
requestCount: number;
|
|
4224
|
-
remaining: number | null;
|
|
4225
|
-
lastRequest: Date | null;
|
|
4226
|
-
expiresAt: Date | null;
|
|
4227
|
-
createdAt: Date;
|
|
4228
|
-
updatedAt: Date;
|
|
4229
|
-
}>;
|
|
4230
|
-
deleteApiKey(id: string): Promise<{
|
|
4231
|
-
success: boolean;
|
|
4232
|
-
}>;
|
|
1643
|
+
createApiKey(payload: CreateApiKeyPayload): Promise<any>;
|
|
1644
|
+
getApiKey(id: string): Promise<any>;
|
|
1645
|
+
listApiKeys(): Promise<any>;
|
|
1646
|
+
updateApiKey(payload: UpdateApiKeyPayload): Promise<any>;
|
|
1647
|
+
deleteApiKey(id: string): Promise<any>;
|
|
4233
1648
|
}
|
|
4234
1649
|
|
|
4235
1650
|
/**
|