@better-auth/infra 0.1.8 → 0.1.9
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/client.d.mts +5 -5
- package/dist/client.mjs +3 -1
- package/dist/constants-B-e0_Nsv.mjs +18 -0
- package/dist/email.mjs +181 -1
- package/dist/index.d.mts +271 -258
- package/dist/index.mjs +246 -133
- package/package.json +13 -10
- package/dist/email-D2dL1i3c.mjs +0 -195
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EMAIL_TEMPLATES, EmailConfig, EmailTemplateId, EmailTemplateVariables, SendBulkEmailsOptions, SendBulkEmailsResult, SendEmailOptions, SendEmailResult, createEmailSender, sendBulkEmails, sendEmail } from "./email.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as better_auth283 from "better-auth";
|
|
3
3
|
import { BetterAuthPlugin, GenericEndpointContext, HookEndpointContext } from "better-auth";
|
|
4
4
|
import * as zod0 from "zod";
|
|
5
5
|
import z$1 from "zod";
|
|
@@ -172,7 +172,7 @@ type SecurityEventType = "unknown_device" | "credential_stuffing" | "impossible_
|
|
|
172
172
|
interface InfraPluginConnectionOptions {
|
|
173
173
|
/**
|
|
174
174
|
* The URL of the Better Auth Dash API
|
|
175
|
-
* @default "https://
|
|
175
|
+
* @default "https://dash.better-auth.com"
|
|
176
176
|
*/
|
|
177
177
|
apiUrl?: string;
|
|
178
178
|
/**
|
|
@@ -262,7 +262,7 @@ type Matcher = (context: HookEndpointContext) => boolean;
|
|
|
262
262
|
//#region src/sentinel.d.ts
|
|
263
263
|
declare const sentinel: (options?: SentinelOptions) => {
|
|
264
264
|
id: "sentinel";
|
|
265
|
-
init(
|
|
265
|
+
init(): {
|
|
266
266
|
options: {
|
|
267
267
|
databaseHooks: {
|
|
268
268
|
user: {
|
|
@@ -275,7 +275,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
275
275
|
emailVerified: boolean;
|
|
276
276
|
name: string;
|
|
277
277
|
image?: string | null | undefined;
|
|
278
|
-
} & Record<string, unknown>,
|
|
278
|
+
} & Record<string, unknown>, ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
279
279
|
after(user: {
|
|
280
280
|
id: string;
|
|
281
281
|
createdAt: Date;
|
|
@@ -284,7 +284,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
284
284
|
emailVerified: boolean;
|
|
285
285
|
name: string;
|
|
286
286
|
image?: string | null | undefined;
|
|
287
|
-
} & Record<string, unknown>,
|
|
287
|
+
} & Record<string, unknown>, ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
290
|
session: {
|
|
@@ -298,7 +298,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
298
298
|
token: string;
|
|
299
299
|
ipAddress?: string | null | undefined;
|
|
300
300
|
userAgent?: string | null | undefined;
|
|
301
|
-
} & Record<string, unknown>,
|
|
301
|
+
} & Record<string, unknown>, ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
302
302
|
after(session: {
|
|
303
303
|
id: string;
|
|
304
304
|
createdAt: Date;
|
|
@@ -308,7 +308,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
308
308
|
token: string;
|
|
309
309
|
ipAddress?: string | null | undefined;
|
|
310
310
|
userAgent?: string | null | undefined;
|
|
311
|
-
} & Record<string, unknown>,
|
|
311
|
+
} & Record<string, unknown>, ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
312
312
|
};
|
|
313
313
|
};
|
|
314
314
|
};
|
|
@@ -317,7 +317,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
317
317
|
hooks: {
|
|
318
318
|
before: ({
|
|
319
319
|
matcher: Matcher;
|
|
320
|
-
handler: (inputContext:
|
|
320
|
+
handler: (inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
321
321
|
context: {
|
|
322
322
|
query: {
|
|
323
323
|
email: string;
|
|
@@ -330,12 +330,12 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
330
330
|
request: Request | undefined;
|
|
331
331
|
headers: Headers | undefined;
|
|
332
332
|
setHeader: ((key: string, value: string) => void) & ((key: string, value: string) => void);
|
|
333
|
-
setStatus: (status:
|
|
333
|
+
setStatus: (status: better_auth283.Status) => void;
|
|
334
334
|
getHeader: ((key: string) => string | null) & ((key: string) => string | null);
|
|
335
|
-
getCookie: (key: string, prefix?:
|
|
336
|
-
getSignedCookie: (key: string, secret: string, prefix?:
|
|
337
|
-
setCookie: (key: string, value: string, options?:
|
|
338
|
-
setSignedCookie: (key: string, value: string, secret: string, options?:
|
|
335
|
+
getCookie: (key: string, prefix?: better_auth283.CookiePrefixOptions) => string | null;
|
|
336
|
+
getSignedCookie: (key: string, secret: string, prefix?: better_auth283.CookiePrefixOptions) => Promise<string | null | false>;
|
|
337
|
+
setCookie: (key: string, value: string, options?: better_auth283.CookieOptions) => string;
|
|
338
|
+
setSignedCookie: (key: string, value: string, secret: string, options?: better_auth283.CookieOptions) => Promise<string>;
|
|
339
339
|
json: (<R extends Record<string, any> | null>(json: R, routerResponse?: {
|
|
340
340
|
status?: number;
|
|
341
341
|
headers?: Record<string, string>;
|
|
@@ -351,14 +351,14 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
351
351
|
} & {
|
|
352
352
|
returned?: unknown | undefined;
|
|
353
353
|
responseHeaders?: Headers | undefined;
|
|
354
|
-
getPlugin: <ID extends
|
|
354
|
+
getPlugin: <ID extends better_auth283.BetterAuthPluginRegistryIdentifier | better_auth283.LiteralString, PluginOptions extends never>(pluginId: ID) => (ID extends keyof better_auth283.BetterAuthPluginRegistry<unknown, unknown> ? better_auth283.BetterAuthPluginRegistry<better_auth283.BetterAuthOptions, PluginOptions>[ID] extends {
|
|
355
355
|
creator: infer C;
|
|
356
356
|
} ? C extends ((...args: any[]) => infer R) ? R : never : never : BetterAuthPlugin) | null;
|
|
357
|
-
hasPlugin: <ID extends
|
|
357
|
+
hasPlugin: <ID extends better_auth283.BetterAuthPluginRegistryIdentifier | better_auth283.LiteralString>(pluginId: ID) => ID extends never ? true : boolean;
|
|
358
358
|
appName: string;
|
|
359
359
|
baseURL: string;
|
|
360
360
|
version: string;
|
|
361
|
-
options:
|
|
361
|
+
options: better_auth283.BetterAuthOptions;
|
|
362
362
|
trustedOrigins: string[];
|
|
363
363
|
trustedProviders: string[];
|
|
364
364
|
isTrustedOrigin: (url: string, settings?: {
|
|
@@ -431,18 +431,18 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
431
431
|
image?: string | null | undefined;
|
|
432
432
|
} & Record<string, any>;
|
|
433
433
|
} | null) => void;
|
|
434
|
-
socialProviders:
|
|
435
|
-
authCookies:
|
|
436
|
-
logger: ReturnType<(options?:
|
|
434
|
+
socialProviders: better_auth283.OAuthProvider[];
|
|
435
|
+
authCookies: better_auth283.BetterAuthCookies;
|
|
436
|
+
logger: ReturnType<(options?: better_auth283.Logger | undefined) => better_auth283.InternalLogger>;
|
|
437
437
|
rateLimit: {
|
|
438
438
|
enabled: boolean;
|
|
439
439
|
window: number;
|
|
440
440
|
max: number;
|
|
441
441
|
storage: "memory" | "database" | "secondary-storage";
|
|
442
|
-
} & Omit<
|
|
443
|
-
adapter:
|
|
444
|
-
internalAdapter:
|
|
445
|
-
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<
|
|
442
|
+
} & Omit<better_auth283.BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
443
|
+
adapter: better_auth283.DBAdapter<better_auth283.BetterAuthOptions>;
|
|
444
|
+
internalAdapter: better_auth283.InternalAdapter<better_auth283.BetterAuthOptions>;
|
|
445
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<better_auth283.CookieOptions> | undefined) => better_auth283.BetterAuthCookie;
|
|
446
446
|
secret: string;
|
|
447
447
|
sessionConfig: {
|
|
448
448
|
updateAge: number;
|
|
@@ -454,10 +454,10 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
454
454
|
};
|
|
455
455
|
};
|
|
456
456
|
generateId: (options: {
|
|
457
|
-
model:
|
|
457
|
+
model: better_auth283.ModelNames;
|
|
458
458
|
size?: number | undefined;
|
|
459
459
|
}) => string | false;
|
|
460
|
-
secondaryStorage:
|
|
460
|
+
secondaryStorage: better_auth283.SecondaryStorage | undefined;
|
|
461
461
|
password: {
|
|
462
462
|
hash: (password: string) => Promise<string>;
|
|
463
463
|
verify: (data: {
|
|
@@ -468,9 +468,9 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
468
468
|
minPasswordLength: number;
|
|
469
469
|
maxPasswordLength: number;
|
|
470
470
|
};
|
|
471
|
-
checkPassword: (userId: string, ctx:
|
|
471
|
+
checkPassword: (userId: string, ctx: better_auth283.GenericEndpointContext<better_auth283.BetterAuthOptions>) => Promise<boolean>;
|
|
472
472
|
};
|
|
473
|
-
tables:
|
|
473
|
+
tables: better_auth283.BetterAuthDBSchema;
|
|
474
474
|
runMigrations: () => Promise<void>;
|
|
475
475
|
publishTelemetry: (event: {
|
|
476
476
|
type: string;
|
|
@@ -480,10 +480,10 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
480
480
|
skipOriginCheck: boolean | string[];
|
|
481
481
|
skipCSRFCheck: boolean;
|
|
482
482
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
483
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> | void) =>
|
|
483
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => better_auth283.Awaitable<unknown>;
|
|
484
484
|
};
|
|
485
485
|
redirect: (url: string) => {
|
|
486
|
-
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") |
|
|
486
|
+
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_auth283.Status;
|
|
487
487
|
body: ({
|
|
488
488
|
message?: string;
|
|
489
489
|
code?: string;
|
|
@@ -496,11 +496,11 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
496
496
|
stack?: string;
|
|
497
497
|
cause?: unknown;
|
|
498
498
|
};
|
|
499
|
-
error: (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") |
|
|
499
|
+
error: (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_auth283.Status, body?: {
|
|
500
500
|
message?: string;
|
|
501
501
|
code?: string;
|
|
502
502
|
} & Record<string, any>, headers?: HeadersInit) => {
|
|
503
|
-
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") |
|
|
503
|
+
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_auth283.Status;
|
|
504
504
|
body: ({
|
|
505
505
|
message?: string;
|
|
506
506
|
code?: string;
|
|
@@ -527,12 +527,12 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
527
527
|
request: Request | undefined;
|
|
528
528
|
headers: Headers | undefined;
|
|
529
529
|
setHeader: ((key: string, value: string) => void) & ((key: string, value: string) => void);
|
|
530
|
-
setStatus: (status:
|
|
530
|
+
setStatus: (status: better_auth283.Status) => void;
|
|
531
531
|
getHeader: ((key: string) => string | null) & ((key: string) => string | null);
|
|
532
|
-
getCookie: (key: string, prefix?:
|
|
533
|
-
getSignedCookie: (key: string, secret: string, prefix?:
|
|
534
|
-
setCookie: (key: string, value: string, options?:
|
|
535
|
-
setSignedCookie: (key: string, value: string, secret: string, options?:
|
|
532
|
+
getCookie: (key: string, prefix?: better_auth283.CookiePrefixOptions) => string | null;
|
|
533
|
+
getSignedCookie: (key: string, secret: string, prefix?: better_auth283.CookiePrefixOptions) => Promise<string | null | false>;
|
|
534
|
+
setCookie: (key: string, value: string, options?: better_auth283.CookieOptions) => string;
|
|
535
|
+
setSignedCookie: (key: string, value: string, secret: string, options?: better_auth283.CookieOptions) => Promise<string>;
|
|
536
536
|
json: (<R extends Record<string, any> | null>(json: R, routerResponse?: {
|
|
537
537
|
status?: number;
|
|
538
538
|
headers?: Record<string, string>;
|
|
@@ -548,14 +548,14 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
548
548
|
} & {
|
|
549
549
|
returned?: unknown | undefined;
|
|
550
550
|
responseHeaders?: Headers | undefined;
|
|
551
|
-
getPlugin: <ID extends
|
|
551
|
+
getPlugin: <ID extends better_auth283.BetterAuthPluginRegistryIdentifier | better_auth283.LiteralString, PluginOptions extends never>(pluginId: ID) => (ID extends keyof better_auth283.BetterAuthPluginRegistry<unknown, unknown> ? better_auth283.BetterAuthPluginRegistry<better_auth283.BetterAuthOptions, PluginOptions>[ID] extends {
|
|
552
552
|
creator: infer C;
|
|
553
553
|
} ? C extends ((...args: any[]) => infer R) ? R : never : never : BetterAuthPlugin) | null;
|
|
554
|
-
hasPlugin: <ID extends
|
|
554
|
+
hasPlugin: <ID extends better_auth283.BetterAuthPluginRegistryIdentifier | better_auth283.LiteralString>(pluginId: ID) => ID extends never ? true : boolean;
|
|
555
555
|
appName: string;
|
|
556
556
|
baseURL: string;
|
|
557
557
|
version: string;
|
|
558
|
-
options:
|
|
558
|
+
options: better_auth283.BetterAuthOptions;
|
|
559
559
|
trustedOrigins: string[];
|
|
560
560
|
trustedProviders: string[];
|
|
561
561
|
isTrustedOrigin: (url: string, settings?: {
|
|
@@ -628,18 +628,18 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
628
628
|
image?: string | null | undefined;
|
|
629
629
|
} & Record<string, any>;
|
|
630
630
|
} | null) => void;
|
|
631
|
-
socialProviders:
|
|
632
|
-
authCookies:
|
|
633
|
-
logger: ReturnType<(options?:
|
|
631
|
+
socialProviders: better_auth283.OAuthProvider[];
|
|
632
|
+
authCookies: better_auth283.BetterAuthCookies;
|
|
633
|
+
logger: ReturnType<(options?: better_auth283.Logger | undefined) => better_auth283.InternalLogger>;
|
|
634
634
|
rateLimit: {
|
|
635
635
|
enabled: boolean;
|
|
636
636
|
window: number;
|
|
637
637
|
max: number;
|
|
638
638
|
storage: "memory" | "database" | "secondary-storage";
|
|
639
|
-
} & Omit<
|
|
640
|
-
adapter:
|
|
641
|
-
internalAdapter:
|
|
642
|
-
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<
|
|
639
|
+
} & Omit<better_auth283.BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
640
|
+
adapter: better_auth283.DBAdapter<better_auth283.BetterAuthOptions>;
|
|
641
|
+
internalAdapter: better_auth283.InternalAdapter<better_auth283.BetterAuthOptions>;
|
|
642
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<better_auth283.CookieOptions> | undefined) => better_auth283.BetterAuthCookie;
|
|
643
643
|
secret: string;
|
|
644
644
|
sessionConfig: {
|
|
645
645
|
updateAge: number;
|
|
@@ -651,10 +651,10 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
651
651
|
};
|
|
652
652
|
};
|
|
653
653
|
generateId: (options: {
|
|
654
|
-
model:
|
|
654
|
+
model: better_auth283.ModelNames;
|
|
655
655
|
size?: number | undefined;
|
|
656
656
|
}) => string | false;
|
|
657
|
-
secondaryStorage:
|
|
657
|
+
secondaryStorage: better_auth283.SecondaryStorage | undefined;
|
|
658
658
|
password: {
|
|
659
659
|
hash: (password: string) => Promise<string>;
|
|
660
660
|
verify: (data: {
|
|
@@ -665,9 +665,9 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
665
665
|
minPasswordLength: number;
|
|
666
666
|
maxPasswordLength: number;
|
|
667
667
|
};
|
|
668
|
-
checkPassword: (userId: string, ctx:
|
|
668
|
+
checkPassword: (userId: string, ctx: better_auth283.GenericEndpointContext<better_auth283.BetterAuthOptions>) => Promise<boolean>;
|
|
669
669
|
};
|
|
670
|
-
tables:
|
|
670
|
+
tables: better_auth283.BetterAuthDBSchema;
|
|
671
671
|
runMigrations: () => Promise<void>;
|
|
672
672
|
publishTelemetry: (event: {
|
|
673
673
|
type: string;
|
|
@@ -677,10 +677,10 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
677
677
|
skipOriginCheck: boolean | string[];
|
|
678
678
|
skipCSRFCheck: boolean;
|
|
679
679
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
680
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> | void) =>
|
|
680
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => better_auth283.Awaitable<unknown>;
|
|
681
681
|
};
|
|
682
682
|
redirect: (url: string) => {
|
|
683
|
-
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") |
|
|
683
|
+
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_auth283.Status;
|
|
684
684
|
body: ({
|
|
685
685
|
message?: string;
|
|
686
686
|
code?: string;
|
|
@@ -693,11 +693,11 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
693
693
|
stack?: string;
|
|
694
694
|
cause?: unknown;
|
|
695
695
|
};
|
|
696
|
-
error: (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") |
|
|
696
|
+
error: (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_auth283.Status, body?: {
|
|
697
697
|
message?: string;
|
|
698
698
|
code?: string;
|
|
699
699
|
} & Record<string, any>, headers?: HeadersInit) => {
|
|
700
|
-
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") |
|
|
700
|
+
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_auth283.Status;
|
|
701
701
|
body: ({
|
|
702
702
|
message?: string;
|
|
703
703
|
code?: string;
|
|
@@ -714,11 +714,11 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
714
714
|
} | undefined>;
|
|
715
715
|
} | {
|
|
716
716
|
matcher: Matcher;
|
|
717
|
-
handler: (inputContext:
|
|
717
|
+
handler: (inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<void>;
|
|
718
718
|
})[];
|
|
719
719
|
after: {
|
|
720
|
-
matcher: (ctx:
|
|
721
|
-
handler: (inputContext:
|
|
720
|
+
matcher: (ctx: better_auth283.HookEndpointContext) => boolean;
|
|
721
|
+
handler: (inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<void>;
|
|
722
722
|
}[];
|
|
723
723
|
};
|
|
724
724
|
};
|
|
@@ -971,9 +971,9 @@ interface UserEventsResponse {
|
|
|
971
971
|
}
|
|
972
972
|
//#endregion
|
|
973
973
|
//#region src/index.d.ts
|
|
974
|
-
declare const dash: (options?:
|
|
974
|
+
declare const dash: <O extends DashOptions>(options?: O) => {
|
|
975
975
|
id: "dash";
|
|
976
|
-
init(ctx:
|
|
976
|
+
init(ctx: better_auth283.AuthContext): {
|
|
977
977
|
options: {
|
|
978
978
|
databaseHooks: {
|
|
979
979
|
user: {
|
|
@@ -986,7 +986,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
986
986
|
emailVerified: boolean;
|
|
987
987
|
name: string;
|
|
988
988
|
image?: string | null | undefined;
|
|
989
|
-
} & Record<string, unknown>, _ctx:
|
|
989
|
+
} & Record<string, unknown>, _ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
990
990
|
};
|
|
991
991
|
update: {
|
|
992
992
|
after(user: {
|
|
@@ -997,7 +997,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
997
997
|
emailVerified: boolean;
|
|
998
998
|
name: string;
|
|
999
999
|
image?: string | null | undefined;
|
|
1000
|
-
} & Record<string, unknown>, _ctx:
|
|
1000
|
+
} & Record<string, unknown>, _ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
1001
1001
|
};
|
|
1002
1002
|
delete: {
|
|
1003
1003
|
after(user: {
|
|
@@ -1008,7 +1008,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1008
1008
|
emailVerified: boolean;
|
|
1009
1009
|
name: string;
|
|
1010
1010
|
image?: string | null | undefined;
|
|
1011
|
-
} & Record<string, unknown>, _ctx:
|
|
1011
|
+
} & Record<string, unknown>, _ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
1012
1012
|
};
|
|
1013
1013
|
};
|
|
1014
1014
|
session: {
|
|
@@ -1022,7 +1022,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1022
1022
|
token: string;
|
|
1023
1023
|
ipAddress?: string | null | undefined;
|
|
1024
1024
|
userAgent?: string | null | undefined;
|
|
1025
|
-
} & Record<string, unknown>, _ctx:
|
|
1025
|
+
} & Record<string, unknown>, _ctx: better_auth283.GenericEndpointContext | null): Promise<{
|
|
1026
1026
|
data: {
|
|
1027
1027
|
loginMethod: string | null | undefined;
|
|
1028
1028
|
};
|
|
@@ -1036,7 +1036,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1036
1036
|
token: string;
|
|
1037
1037
|
ipAddress?: string | null | undefined;
|
|
1038
1038
|
userAgent?: string | null | undefined;
|
|
1039
|
-
} & Record<string, unknown>, _ctx:
|
|
1039
|
+
} & Record<string, unknown>, _ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
1040
1040
|
};
|
|
1041
1041
|
delete: {
|
|
1042
1042
|
after(session: {
|
|
@@ -1048,7 +1048,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1048
1048
|
token: string;
|
|
1049
1049
|
ipAddress?: string | null | undefined;
|
|
1050
1050
|
userAgent?: string | null | undefined;
|
|
1051
|
-
} & Record<string, unknown>, _ctx:
|
|
1051
|
+
} & Record<string, unknown>, _ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
1052
1052
|
};
|
|
1053
1053
|
};
|
|
1054
1054
|
account: {
|
|
@@ -1067,7 +1067,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1067
1067
|
refreshTokenExpiresAt?: Date | null | undefined;
|
|
1068
1068
|
scope?: string | null | undefined;
|
|
1069
1069
|
password?: string | null | undefined;
|
|
1070
|
-
}, _ctx:
|
|
1070
|
+
}, _ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
1071
1071
|
};
|
|
1072
1072
|
update: {
|
|
1073
1073
|
after(account: {
|
|
@@ -1084,7 +1084,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1084
1084
|
refreshTokenExpiresAt?: Date | null | undefined;
|
|
1085
1085
|
scope?: string | null | undefined;
|
|
1086
1086
|
password?: string | null | undefined;
|
|
1087
|
-
} & Record<string, unknown>, _ctx:
|
|
1087
|
+
} & Record<string, unknown>, _ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
1088
1088
|
};
|
|
1089
1089
|
delete: {
|
|
1090
1090
|
after(account: {
|
|
@@ -1101,7 +1101,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1101
1101
|
refreshTokenExpiresAt?: Date | null | undefined;
|
|
1102
1102
|
scope?: string | null | undefined;
|
|
1103
1103
|
password?: string | null | undefined;
|
|
1104
|
-
} & Record<string, unknown>, _ctx:
|
|
1104
|
+
} & Record<string, unknown>, _ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
1105
1105
|
};
|
|
1106
1106
|
};
|
|
1107
1107
|
verification: {
|
|
@@ -1113,7 +1113,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1113
1113
|
value: string;
|
|
1114
1114
|
expiresAt: Date;
|
|
1115
1115
|
identifier: string;
|
|
1116
|
-
} & Record<string, unknown>, _ctx:
|
|
1116
|
+
} & Record<string, unknown>, _ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
1117
1117
|
};
|
|
1118
1118
|
delete: {
|
|
1119
1119
|
after(verification: {
|
|
@@ -1123,7 +1123,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1123
1123
|
value: string;
|
|
1124
1124
|
expiresAt: Date;
|
|
1125
1125
|
identifier: string;
|
|
1126
|
-
} & Record<string, unknown>, ctx:
|
|
1126
|
+
} & Record<string, unknown>, ctx: better_auth283.GenericEndpointContext | null): Promise<void>;
|
|
1127
1127
|
};
|
|
1128
1128
|
};
|
|
1129
1129
|
};
|
|
@@ -1134,18 +1134,18 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1134
1134
|
};
|
|
1135
1135
|
hooks: {
|
|
1136
1136
|
before: {
|
|
1137
|
-
matcher: (ctx:
|
|
1138
|
-
handler: (inputContext:
|
|
1137
|
+
matcher: (ctx: better_auth283.HookEndpointContext) => boolean;
|
|
1138
|
+
handler: (inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<void>;
|
|
1139
1139
|
}[];
|
|
1140
1140
|
after: {
|
|
1141
|
-
matcher: (ctx:
|
|
1142
|
-
handler: (inputContext:
|
|
1141
|
+
matcher: (ctx: better_auth283.HookEndpointContext) => boolean;
|
|
1142
|
+
handler: (inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<void>;
|
|
1143
1143
|
}[];
|
|
1144
1144
|
};
|
|
1145
1145
|
endpoints: {
|
|
1146
|
-
getDashConfig:
|
|
1146
|
+
getDashConfig: better_auth283.StrictEndpoint<"/dash/config", {
|
|
1147
1147
|
method: "GET";
|
|
1148
|
-
use: ((inputContext:
|
|
1148
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1149
1149
|
payload: Record<string, unknown>;
|
|
1150
1150
|
}>)[];
|
|
1151
1151
|
}, {
|
|
@@ -1158,13 +1158,13 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1158
1158
|
maxPasswordLength?: number;
|
|
1159
1159
|
minPasswordLength?: number;
|
|
1160
1160
|
sendResetPassword?: (data: {
|
|
1161
|
-
user:
|
|
1161
|
+
user: better_auth283.User;
|
|
1162
1162
|
url: string;
|
|
1163
1163
|
token: string;
|
|
1164
1164
|
}, request?: Request) => Promise<void>;
|
|
1165
1165
|
resetPasswordTokenExpiresIn?: number;
|
|
1166
1166
|
onPasswordReset?: (data: {
|
|
1167
|
-
user:
|
|
1167
|
+
user: better_auth283.User;
|
|
1168
1168
|
}, request?: Request) => Promise<void>;
|
|
1169
1169
|
password?: {
|
|
1170
1170
|
hash?: (password: string) => Promise<string>;
|
|
@@ -1175,17 +1175,20 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1175
1175
|
};
|
|
1176
1176
|
autoSignIn?: boolean;
|
|
1177
1177
|
revokeSessionsOnPasswordReset?: boolean;
|
|
1178
|
+
onExistingUserSignUp?: (data: {
|
|
1179
|
+
user: better_auth283.User;
|
|
1180
|
+
}, request?: Request) => Promise<void>;
|
|
1178
1181
|
} | undefined;
|
|
1179
1182
|
plugins: {
|
|
1180
|
-
id:
|
|
1181
|
-
schema:
|
|
1182
|
-
options:
|
|
1183
|
+
id: better_auth283.LiteralString;
|
|
1184
|
+
schema: better_auth283.BetterAuthPluginDBSchema | undefined;
|
|
1185
|
+
options: unknown;
|
|
1183
1186
|
}[] | undefined;
|
|
1184
1187
|
organization: {
|
|
1185
1188
|
sendInvitationEmailEnabled: boolean;
|
|
1186
1189
|
additionalFields: {
|
|
1187
1190
|
name: string;
|
|
1188
|
-
type:
|
|
1191
|
+
type: better_auth283.DBFieldType;
|
|
1189
1192
|
required: boolean | undefined;
|
|
1190
1193
|
input: boolean | undefined;
|
|
1191
1194
|
unique: boolean | undefined;
|
|
@@ -1202,7 +1205,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1202
1205
|
user: {
|
|
1203
1206
|
fields: {
|
|
1204
1207
|
name: string;
|
|
1205
|
-
type:
|
|
1208
|
+
type: better_auth283.DBFieldType | undefined;
|
|
1206
1209
|
required: boolean | undefined;
|
|
1207
1210
|
input: boolean | undefined;
|
|
1208
1211
|
unique: boolean | undefined;
|
|
@@ -1217,7 +1220,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1217
1220
|
}[];
|
|
1218
1221
|
additionalFields: {
|
|
1219
1222
|
name: string;
|
|
1220
|
-
type:
|
|
1223
|
+
type: better_auth283.DBFieldType | undefined;
|
|
1221
1224
|
required: boolean | undefined;
|
|
1222
1225
|
input: boolean | undefined;
|
|
1223
1226
|
unique: boolean | undefined;
|
|
@@ -1231,9 +1234,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1231
1234
|
bigInt: boolean | undefined;
|
|
1232
1235
|
}[];
|
|
1233
1236
|
deleteUserEnabled: boolean;
|
|
1234
|
-
modelName:
|
|
1237
|
+
modelName: better_auth283.LiteralString | "user" | undefined;
|
|
1235
1238
|
};
|
|
1236
|
-
baseURL:
|
|
1239
|
+
baseURL: better_auth283.BaseURLConfig | undefined;
|
|
1237
1240
|
basePath: string;
|
|
1238
1241
|
emailVerification: {
|
|
1239
1242
|
sendVerificationEmailEnabled: boolean;
|
|
@@ -1273,7 +1276,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1273
1276
|
defaultCookieAttributes: {
|
|
1274
1277
|
sameSite: "none" | "strict" | "Strict" | "Lax" | "None" | "lax" | null;
|
|
1275
1278
|
httpOnly: boolean | null;
|
|
1276
|
-
prefix:
|
|
1279
|
+
prefix: better_auth283.CookiePrefixOptions | null;
|
|
1277
1280
|
partitioned: boolean | null;
|
|
1278
1281
|
secure: boolean | null;
|
|
1279
1282
|
} | null;
|
|
@@ -1281,9 +1284,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1281
1284
|
hasJoinsEnabled: boolean;
|
|
1282
1285
|
};
|
|
1283
1286
|
}>;
|
|
1284
|
-
getDashUsers:
|
|
1287
|
+
getDashUsers: better_auth283.StrictEndpoint<"/dash/list-users", {
|
|
1285
1288
|
method: "GET";
|
|
1286
|
-
use: ((inputContext:
|
|
1289
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1287
1290
|
payload: Record<string, unknown>;
|
|
1288
1291
|
}>)[];
|
|
1289
1292
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -1294,8 +1297,8 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1294
1297
|
asc: "asc";
|
|
1295
1298
|
desc: "desc";
|
|
1296
1299
|
}>>;
|
|
1297
|
-
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<
|
|
1298
|
-
countWhere: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<
|
|
1300
|
+
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth283.Where[], string>>>;
|
|
1301
|
+
countWhere: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth283.Where[], string>>>;
|
|
1299
1302
|
}, zod_v4_core0.$strip>>;
|
|
1300
1303
|
}, {
|
|
1301
1304
|
users: {
|
|
@@ -1316,9 +1319,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1316
1319
|
onlineUsers: number;
|
|
1317
1320
|
activityTrackingEnabled: boolean;
|
|
1318
1321
|
}>;
|
|
1319
|
-
exportDashUsers:
|
|
1322
|
+
exportDashUsers: better_auth283.StrictEndpoint<"/dash/export-users", {
|
|
1320
1323
|
method: "GET";
|
|
1321
|
-
use: ((inputContext:
|
|
1324
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1322
1325
|
payload: Record<string, unknown>;
|
|
1323
1326
|
}>)[];
|
|
1324
1327
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -1329,21 +1332,21 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1329
1332
|
asc: "asc";
|
|
1330
1333
|
desc: "desc";
|
|
1331
1334
|
}>>;
|
|
1332
|
-
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<
|
|
1333
|
-
countWhere: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<
|
|
1335
|
+
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth283.Where[], string>>>;
|
|
1336
|
+
countWhere: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth283.Where[], string>>>;
|
|
1334
1337
|
}, zod_v4_core0.$strip>>;
|
|
1335
1338
|
}, Response>;
|
|
1336
|
-
getOnlineUsersCount:
|
|
1339
|
+
getOnlineUsersCount: better_auth283.StrictEndpoint<"/dash/online-users-count", {
|
|
1337
1340
|
method: "GET";
|
|
1338
|
-
use: ((inputContext:
|
|
1341
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1339
1342
|
payload: Record<string, unknown>;
|
|
1340
1343
|
}>)[];
|
|
1341
1344
|
}, {
|
|
1342
1345
|
onlineUsers: number;
|
|
1343
1346
|
}>;
|
|
1344
|
-
createDashUser:
|
|
1347
|
+
createDashUser: better_auth283.StrictEndpoint<"/dash/create-user", {
|
|
1345
1348
|
method: "POST";
|
|
1346
|
-
use: ((inputContext:
|
|
1349
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1347
1350
|
payload: {
|
|
1348
1351
|
organizationId?: string | undefined;
|
|
1349
1352
|
organizationRole?: string | undefined;
|
|
@@ -1370,17 +1373,17 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1370
1373
|
name: string;
|
|
1371
1374
|
image?: string | null | undefined;
|
|
1372
1375
|
}>;
|
|
1373
|
-
deleteDashUser:
|
|
1376
|
+
deleteDashUser: better_auth283.StrictEndpoint<"/dash/delete-user", {
|
|
1374
1377
|
method: "POST";
|
|
1375
|
-
use: ((inputContext:
|
|
1378
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1376
1379
|
payload: {
|
|
1377
1380
|
userId: string;
|
|
1378
1381
|
};
|
|
1379
1382
|
}>)[];
|
|
1380
1383
|
}, void>;
|
|
1381
|
-
deleteManyDashUsers:
|
|
1384
|
+
deleteManyDashUsers: better_auth283.StrictEndpoint<"/dash/delete-many-users", {
|
|
1382
1385
|
method: "POST";
|
|
1383
|
-
use: ((inputContext:
|
|
1386
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1384
1387
|
payload: {
|
|
1385
1388
|
userIds: string[];
|
|
1386
1389
|
};
|
|
@@ -1390,9 +1393,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1390
1393
|
skippedUserIds: string[];
|
|
1391
1394
|
deletedUserIds: string[];
|
|
1392
1395
|
}>;
|
|
1393
|
-
listDashOrganizations:
|
|
1396
|
+
listDashOrganizations: better_auth283.StrictEndpoint<"/dash/list-organizations", {
|
|
1394
1397
|
method: "GET";
|
|
1395
|
-
use: ((inputContext:
|
|
1398
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1396
1399
|
payload: Record<string, unknown>;
|
|
1397
1400
|
}>)[];
|
|
1398
1401
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -1408,6 +1411,13 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1408
1411
|
asc: "asc";
|
|
1409
1412
|
desc: "desc";
|
|
1410
1413
|
}>>;
|
|
1414
|
+
filterMembers: zod0.ZodOptional<zod0.ZodEnum<{
|
|
1415
|
+
abandoned: "abandoned";
|
|
1416
|
+
eq1: "eq1";
|
|
1417
|
+
gt1: "gt1";
|
|
1418
|
+
gt5: "gt5";
|
|
1419
|
+
gt10: "gt10";
|
|
1420
|
+
}>>;
|
|
1411
1421
|
search: zod0.ZodOptional<zod0.ZodString>;
|
|
1412
1422
|
startDate: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodDate, zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<Date, string>>]>>;
|
|
1413
1423
|
endDate: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodDate, zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<Date, string>>]>>;
|
|
@@ -1427,15 +1437,14 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1427
1437
|
createdAt: Date;
|
|
1428
1438
|
logo?: string | null | undefined;
|
|
1429
1439
|
metadata?: any;
|
|
1430
|
-
member: better_auth_plugins0.Member[];
|
|
1431
1440
|
}[];
|
|
1432
1441
|
total: number;
|
|
1433
1442
|
offset: number;
|
|
1434
1443
|
limit: number;
|
|
1435
1444
|
}>;
|
|
1436
|
-
exportDashOrganizations:
|
|
1445
|
+
exportDashOrganizations: better_auth283.StrictEndpoint<"/dash/export-organizations", {
|
|
1437
1446
|
method: "GET";
|
|
1438
|
-
use: ((inputContext:
|
|
1447
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1439
1448
|
payload: Record<string, unknown>;
|
|
1440
1449
|
}>)[];
|
|
1441
1450
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -1446,12 +1455,12 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1446
1455
|
asc: "asc";
|
|
1447
1456
|
desc: "desc";
|
|
1448
1457
|
}>>;
|
|
1449
|
-
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<
|
|
1458
|
+
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth283.Where[], string>>>;
|
|
1450
1459
|
}, zod_v4_core0.$strip>>;
|
|
1451
1460
|
}, Response>;
|
|
1452
|
-
getDashOrganization:
|
|
1461
|
+
getDashOrganization: better_auth283.StrictEndpoint<"/dash/organization/:id", {
|
|
1453
1462
|
method: "GET";
|
|
1454
|
-
use: ((inputContext:
|
|
1463
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1455
1464
|
payload: Record<string, unknown>;
|
|
1456
1465
|
}>)[];
|
|
1457
1466
|
}, {
|
|
@@ -1464,9 +1473,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1464
1473
|
} & {
|
|
1465
1474
|
memberCount: number;
|
|
1466
1475
|
}>;
|
|
1467
|
-
listDashOrganizationMembers:
|
|
1476
|
+
listDashOrganizationMembers: better_auth283.StrictEndpoint<"/dash/organization/:id/members", {
|
|
1468
1477
|
method: "GET";
|
|
1469
|
-
use: ((inputContext:
|
|
1478
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1470
1479
|
payload: Record<string, unknown>;
|
|
1471
1480
|
}>)[];
|
|
1472
1481
|
}, {
|
|
@@ -1488,9 +1497,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1488
1497
|
role: string;
|
|
1489
1498
|
createdAt: Date;
|
|
1490
1499
|
}[]>;
|
|
1491
|
-
listDashOrganizationInvitations:
|
|
1500
|
+
listDashOrganizationInvitations: better_auth283.StrictEndpoint<"/dash/organization/:id/invitations", {
|
|
1492
1501
|
method: "GET";
|
|
1493
|
-
use: ((inputContext:
|
|
1502
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1494
1503
|
payload: Record<string, unknown>;
|
|
1495
1504
|
}>)[];
|
|
1496
1505
|
}, {
|
|
@@ -1510,15 +1519,15 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1510
1519
|
createdAt: Date;
|
|
1511
1520
|
teamId?: string | null | undefined;
|
|
1512
1521
|
}[]>;
|
|
1513
|
-
listDashOrganizationTeams:
|
|
1522
|
+
listDashOrganizationTeams: better_auth283.StrictEndpoint<"/dash/organization/:id/teams", {
|
|
1514
1523
|
method: "GET";
|
|
1515
|
-
use: ((inputContext:
|
|
1524
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1516
1525
|
payload: Record<string, unknown>;
|
|
1517
1526
|
}>)[];
|
|
1518
1527
|
}, any[]>;
|
|
1519
|
-
listDashOrganizationSsoProviders:
|
|
1528
|
+
listDashOrganizationSsoProviders: better_auth283.StrictEndpoint<"/dash/organization/:id/sso-providers", {
|
|
1520
1529
|
method: "GET";
|
|
1521
|
-
use: ((inputContext:
|
|
1530
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1522
1531
|
payload: {
|
|
1523
1532
|
organizationId: string;
|
|
1524
1533
|
};
|
|
@@ -1535,9 +1544,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1535
1544
|
createdAt: Date;
|
|
1536
1545
|
updatedAt: Date;
|
|
1537
1546
|
}[]>;
|
|
1538
|
-
createDashSsoProvider:
|
|
1547
|
+
createDashSsoProvider: better_auth283.StrictEndpoint<"/dash/organization/:id/sso-provider/create", {
|
|
1539
1548
|
method: "POST";
|
|
1540
|
-
use: ((inputContext:
|
|
1549
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1541
1550
|
payload: {
|
|
1542
1551
|
organizationId: string;
|
|
1543
1552
|
};
|
|
@@ -1595,9 +1604,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1595
1604
|
verificationToken: any;
|
|
1596
1605
|
};
|
|
1597
1606
|
}>;
|
|
1598
|
-
updateDashSsoProvider:
|
|
1607
|
+
updateDashSsoProvider: better_auth283.StrictEndpoint<"/dash/organization/:id/sso-provider/update", {
|
|
1599
1608
|
method: "POST";
|
|
1600
|
-
use: ((inputContext:
|
|
1609
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1601
1610
|
payload: {
|
|
1602
1611
|
organizationId: string;
|
|
1603
1612
|
};
|
|
@@ -1650,9 +1659,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1650
1659
|
domain: any;
|
|
1651
1660
|
};
|
|
1652
1661
|
}>;
|
|
1653
|
-
requestDashSsoVerificationToken:
|
|
1662
|
+
requestDashSsoVerificationToken: better_auth283.StrictEndpoint<"/dash/organization/:id/sso-provider/request-verification-token", {
|
|
1654
1663
|
method: "POST";
|
|
1655
|
-
use: ((inputContext:
|
|
1664
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1656
1665
|
payload: {
|
|
1657
1666
|
organizationId: string;
|
|
1658
1667
|
};
|
|
@@ -1667,9 +1676,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1667
1676
|
verificationToken: any;
|
|
1668
1677
|
txtRecordName: string;
|
|
1669
1678
|
}>;
|
|
1670
|
-
verifyDashSsoProviderDomain:
|
|
1679
|
+
verifyDashSsoProviderDomain: better_auth283.StrictEndpoint<"/dash/organization/:id/sso-provider/verify-domain", {
|
|
1671
1680
|
method: "POST";
|
|
1672
|
-
use: ((inputContext:
|
|
1681
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1673
1682
|
payload: {
|
|
1674
1683
|
organizationId: string;
|
|
1675
1684
|
};
|
|
@@ -1681,9 +1690,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1681
1690
|
verified: boolean;
|
|
1682
1691
|
message: string;
|
|
1683
1692
|
}>;
|
|
1684
|
-
deleteDashSsoProvider:
|
|
1693
|
+
deleteDashSsoProvider: better_auth283.StrictEndpoint<"/dash/organization/:id/sso-provider/delete", {
|
|
1685
1694
|
method: "POST";
|
|
1686
|
-
use: ((inputContext:
|
|
1695
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1687
1696
|
payload: {
|
|
1688
1697
|
organizationId: string;
|
|
1689
1698
|
};
|
|
@@ -1695,9 +1704,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1695
1704
|
success: boolean;
|
|
1696
1705
|
message: string;
|
|
1697
1706
|
}>;
|
|
1698
|
-
markDashSsoProviderDomainVerified:
|
|
1707
|
+
markDashSsoProviderDomainVerified: better_auth283.StrictEndpoint<"/dash/organization/:id/sso-provider/mark-domain-verified", {
|
|
1699
1708
|
method: "POST";
|
|
1700
|
-
use: ((inputContext:
|
|
1709
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1701
1710
|
payload: {
|
|
1702
1711
|
organizationId: string;
|
|
1703
1712
|
};
|
|
@@ -1711,9 +1720,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1711
1720
|
domainVerified: boolean;
|
|
1712
1721
|
message: string;
|
|
1713
1722
|
}>;
|
|
1714
|
-
listDashTeamMembers:
|
|
1723
|
+
listDashTeamMembers: better_auth283.StrictEndpoint<"/dash/organization/:orgId/teams/:teamId/members", {
|
|
1715
1724
|
method: "GET";
|
|
1716
|
-
use: ((inputContext:
|
|
1725
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1717
1726
|
payload: Record<string, unknown>;
|
|
1718
1727
|
}>)[];
|
|
1719
1728
|
}, {
|
|
@@ -1728,9 +1737,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1728
1737
|
userId: string;
|
|
1729
1738
|
createdAt: Date;
|
|
1730
1739
|
}[]>;
|
|
1731
|
-
createDashOrganization:
|
|
1740
|
+
createDashOrganization: better_auth283.StrictEndpoint<"/dash/organization/create", {
|
|
1732
1741
|
method: "POST";
|
|
1733
|
-
use: ((inputContext:
|
|
1742
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1734
1743
|
payload: {
|
|
1735
1744
|
userId: string;
|
|
1736
1745
|
skipDefaultTeam: boolean;
|
|
@@ -1757,9 +1766,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1757
1766
|
logo?: string | null | undefined;
|
|
1758
1767
|
metadata?: any;
|
|
1759
1768
|
}>;
|
|
1760
|
-
deleteDashOrganization:
|
|
1769
|
+
deleteDashOrganization: better_auth283.StrictEndpoint<"/dash/organization/delete", {
|
|
1761
1770
|
method: "POST";
|
|
1762
|
-
use: ((inputContext:
|
|
1771
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1763
1772
|
payload: {
|
|
1764
1773
|
organizationId: string;
|
|
1765
1774
|
};
|
|
@@ -1770,9 +1779,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1770
1779
|
}, {
|
|
1771
1780
|
success: boolean;
|
|
1772
1781
|
}>;
|
|
1773
|
-
deleteManyDashOrganizations:
|
|
1782
|
+
deleteManyDashOrganizations: better_auth283.StrictEndpoint<"/dash/organization/delete-many", {
|
|
1774
1783
|
method: "POST";
|
|
1775
|
-
use: ((inputContext:
|
|
1784
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1776
1785
|
payload: {
|
|
1777
1786
|
organizationIds: string[];
|
|
1778
1787
|
};
|
|
@@ -1782,17 +1791,17 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1782
1791
|
deletedOrgIds: string[];
|
|
1783
1792
|
skippedOrgIds: string[];
|
|
1784
1793
|
}>;
|
|
1785
|
-
getDashOrganizationOptions:
|
|
1794
|
+
getDashOrganizationOptions: better_auth283.StrictEndpoint<"/dash/organization/options", {
|
|
1786
1795
|
method: "GET";
|
|
1787
|
-
use: ((inputContext:
|
|
1796
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1788
1797
|
payload: Record<string, unknown>;
|
|
1789
1798
|
}>)[];
|
|
1790
1799
|
}, {
|
|
1791
1800
|
teamsEnabled: boolean | undefined;
|
|
1792
1801
|
}>;
|
|
1793
|
-
deleteDashSessions:
|
|
1802
|
+
deleteDashSessions: better_auth283.StrictEndpoint<"/dash/delete-sessions", {
|
|
1794
1803
|
method: "POST";
|
|
1795
|
-
use: ((inputContext:
|
|
1804
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1796
1805
|
payload: {
|
|
1797
1806
|
userId: string;
|
|
1798
1807
|
};
|
|
@@ -1800,9 +1809,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1800
1809
|
}, {
|
|
1801
1810
|
message: string;
|
|
1802
1811
|
}>;
|
|
1803
|
-
getDashUser:
|
|
1812
|
+
getDashUser: better_auth283.StrictEndpoint<"/dash/user", {
|
|
1804
1813
|
method: "GET";
|
|
1805
|
-
use: ((inputContext:
|
|
1814
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1806
1815
|
payload: {
|
|
1807
1816
|
userId: string;
|
|
1808
1817
|
};
|
|
@@ -1836,12 +1845,12 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1836
1845
|
emailVerified: boolean;
|
|
1837
1846
|
name: string;
|
|
1838
1847
|
image?: string | null | undefined;
|
|
1839
|
-
account?:
|
|
1840
|
-
session?:
|
|
1848
|
+
account?: better_auth283.Account[];
|
|
1849
|
+
session?: better_auth283.Session[];
|
|
1841
1850
|
}>;
|
|
1842
|
-
getDashUserOrganizations:
|
|
1851
|
+
getDashUserOrganizations: better_auth283.StrictEndpoint<"/dash/user-organizations", {
|
|
1843
1852
|
method: "GET";
|
|
1844
|
-
use: ((inputContext:
|
|
1853
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1845
1854
|
payload: {
|
|
1846
1855
|
userId: string;
|
|
1847
1856
|
};
|
|
@@ -1863,9 +1872,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1863
1872
|
}[];
|
|
1864
1873
|
}[];
|
|
1865
1874
|
}>;
|
|
1866
|
-
updateDashUser:
|
|
1875
|
+
updateDashUser: better_auth283.StrictEndpoint<"/dash/update-user", {
|
|
1867
1876
|
method: "POST";
|
|
1868
|
-
use: ((inputContext:
|
|
1877
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1869
1878
|
payload: {
|
|
1870
1879
|
userId: string;
|
|
1871
1880
|
};
|
|
@@ -1885,9 +1894,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1885
1894
|
name: string;
|
|
1886
1895
|
image?: string | null | undefined;
|
|
1887
1896
|
} & Record<string, any>>;
|
|
1888
|
-
setDashPassword:
|
|
1897
|
+
setDashPassword: better_auth283.StrictEndpoint<"/dash/set-password", {
|
|
1889
1898
|
method: "POST";
|
|
1890
|
-
use: ((inputContext:
|
|
1899
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1891
1900
|
payload: {
|
|
1892
1901
|
userId: string;
|
|
1893
1902
|
};
|
|
@@ -1898,9 +1907,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1898
1907
|
}, {
|
|
1899
1908
|
success: boolean;
|
|
1900
1909
|
}>;
|
|
1901
|
-
unlinkDashAccount:
|
|
1910
|
+
unlinkDashAccount: better_auth283.StrictEndpoint<"/dash/unlink-account", {
|
|
1902
1911
|
method: "POST";
|
|
1903
|
-
use: ((inputContext:
|
|
1912
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1904
1913
|
payload: {
|
|
1905
1914
|
userId: string;
|
|
1906
1915
|
};
|
|
@@ -1912,9 +1921,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1912
1921
|
}, {
|
|
1913
1922
|
success: boolean;
|
|
1914
1923
|
}>;
|
|
1915
|
-
listAllDashSessions:
|
|
1924
|
+
listAllDashSessions: better_auth283.StrictEndpoint<"/dash/list-all-sessions", {
|
|
1916
1925
|
method: "GET";
|
|
1917
|
-
use: ((inputContext:
|
|
1926
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1918
1927
|
payload: Record<string, unknown>;
|
|
1919
1928
|
}>)[];
|
|
1920
1929
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -1940,9 +1949,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1940
1949
|
name: string;
|
|
1941
1950
|
image?: string | null | undefined;
|
|
1942
1951
|
}[]>;
|
|
1943
|
-
dashRevokeSession:
|
|
1952
|
+
dashRevokeSession: better_auth283.StrictEndpoint<"/dash/sessions/revoke", {
|
|
1944
1953
|
method: "POST";
|
|
1945
|
-
use: ((inputContext:
|
|
1954
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1946
1955
|
payload: Record<string, unknown>;
|
|
1947
1956
|
}>)[];
|
|
1948
1957
|
metadata: {
|
|
@@ -1951,9 +1960,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1951
1960
|
}, {
|
|
1952
1961
|
success: boolean;
|
|
1953
1962
|
}>;
|
|
1954
|
-
dashRevokeAllSessions:
|
|
1963
|
+
dashRevokeAllSessions: better_auth283.StrictEndpoint<"/dash/sessions/revoke-all", {
|
|
1955
1964
|
method: "POST";
|
|
1956
|
-
use: ((inputContext:
|
|
1965
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1957
1966
|
payload: Record<string, unknown>;
|
|
1958
1967
|
}>)[];
|
|
1959
1968
|
body: zod0.ZodObject<{
|
|
@@ -1962,9 +1971,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1962
1971
|
}, {
|
|
1963
1972
|
success: boolean;
|
|
1964
1973
|
}>;
|
|
1965
|
-
dashRevokeManySessions:
|
|
1974
|
+
dashRevokeManySessions: better_auth283.StrictEndpoint<"/dash/sessions/revoke-many", {
|
|
1966
1975
|
method: "POST";
|
|
1967
|
-
use: ((inputContext:
|
|
1976
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1968
1977
|
payload: {
|
|
1969
1978
|
userIds: string[];
|
|
1970
1979
|
};
|
|
@@ -1973,12 +1982,12 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1973
1982
|
success: boolean;
|
|
1974
1983
|
revokedCount: number;
|
|
1975
1984
|
}>;
|
|
1976
|
-
dashImpersonateUser:
|
|
1985
|
+
dashImpersonateUser: better_auth283.StrictEndpoint<"/dash/impersonate-user", {
|
|
1977
1986
|
method: "GET";
|
|
1978
1987
|
query: zod0.ZodObject<{
|
|
1979
1988
|
impersonation_token: zod0.ZodString;
|
|
1980
1989
|
}, zod_v4_core0.$strip>;
|
|
1981
|
-
use: ((inputContext:
|
|
1990
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1982
1991
|
payload: {
|
|
1983
1992
|
userId: string;
|
|
1984
1993
|
redirectUrl: string;
|
|
@@ -1986,9 +1995,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1986
1995
|
};
|
|
1987
1996
|
}>)[];
|
|
1988
1997
|
}, never>;
|
|
1989
|
-
updateDashOrganization:
|
|
1998
|
+
updateDashOrganization: better_auth283.StrictEndpoint<"/dash/organization/update", {
|
|
1990
1999
|
method: "POST";
|
|
1991
|
-
use: ((inputContext:
|
|
2000
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
1992
2001
|
payload: {
|
|
1993
2002
|
organizationId: string;
|
|
1994
2003
|
};
|
|
@@ -2007,9 +2016,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2007
2016
|
logo?: string | null | undefined;
|
|
2008
2017
|
metadata?: any;
|
|
2009
2018
|
}>;
|
|
2010
|
-
createDashTeam:
|
|
2019
|
+
createDashTeam: better_auth283.StrictEndpoint<"/dash/organization/create-team", {
|
|
2011
2020
|
method: "POST";
|
|
2012
|
-
use: ((inputContext:
|
|
2021
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2013
2022
|
payload: {
|
|
2014
2023
|
organizationId: string;
|
|
2015
2024
|
};
|
|
@@ -2024,9 +2033,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2024
2033
|
createdAt: Date;
|
|
2025
2034
|
updatedAt?: Date | undefined;
|
|
2026
2035
|
}>;
|
|
2027
|
-
updateDashTeam:
|
|
2036
|
+
updateDashTeam: better_auth283.StrictEndpoint<"/dash/organization/update-team", {
|
|
2028
2037
|
method: "POST";
|
|
2029
|
-
use: ((inputContext:
|
|
2038
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2030
2039
|
payload: {
|
|
2031
2040
|
organizationId: string;
|
|
2032
2041
|
};
|
|
@@ -2042,9 +2051,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2042
2051
|
createdAt: Date;
|
|
2043
2052
|
updatedAt?: Date | undefined;
|
|
2044
2053
|
} | null>;
|
|
2045
|
-
deleteDashTeam:
|
|
2054
|
+
deleteDashTeam: better_auth283.StrictEndpoint<"/dash/organization/delete-team", {
|
|
2046
2055
|
method: "POST";
|
|
2047
|
-
use: ((inputContext:
|
|
2056
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2048
2057
|
payload: {
|
|
2049
2058
|
organizationId: string;
|
|
2050
2059
|
};
|
|
@@ -2055,9 +2064,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2055
2064
|
}, {
|
|
2056
2065
|
success: boolean;
|
|
2057
2066
|
}>;
|
|
2058
|
-
addDashTeamMember:
|
|
2067
|
+
addDashTeamMember: better_auth283.StrictEndpoint<"/dash/organization/add-team-member", {
|
|
2059
2068
|
method: "POST";
|
|
2060
|
-
use: ((inputContext:
|
|
2069
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2061
2070
|
payload: {
|
|
2062
2071
|
organizationId: string;
|
|
2063
2072
|
};
|
|
@@ -2072,9 +2081,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2072
2081
|
userId: string;
|
|
2073
2082
|
createdAt: Date;
|
|
2074
2083
|
}>;
|
|
2075
|
-
removeDashTeamMember:
|
|
2084
|
+
removeDashTeamMember: better_auth283.StrictEndpoint<"/dash/organization/remove-team-member", {
|
|
2076
2085
|
method: "POST";
|
|
2077
|
-
use: ((inputContext:
|
|
2086
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2078
2087
|
payload: {
|
|
2079
2088
|
organizationId: string;
|
|
2080
2089
|
};
|
|
@@ -2086,9 +2095,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2086
2095
|
}, {
|
|
2087
2096
|
success: boolean;
|
|
2088
2097
|
}>;
|
|
2089
|
-
addDashMember:
|
|
2098
|
+
addDashMember: better_auth283.StrictEndpoint<"/dash/organization/add-member", {
|
|
2090
2099
|
method: "POST";
|
|
2091
|
-
use: ((inputContext:
|
|
2100
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2092
2101
|
payload: {
|
|
2093
2102
|
organizationId: string;
|
|
2094
2103
|
};
|
|
@@ -2104,9 +2113,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2104
2113
|
role: string;
|
|
2105
2114
|
createdAt: Date;
|
|
2106
2115
|
}>;
|
|
2107
|
-
removeDashMember:
|
|
2116
|
+
removeDashMember: better_auth283.StrictEndpoint<"/dash/organization/remove-member", {
|
|
2108
2117
|
method: "POST";
|
|
2109
|
-
use: ((inputContext:
|
|
2118
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2110
2119
|
payload: {
|
|
2111
2120
|
organizationId: string;
|
|
2112
2121
|
};
|
|
@@ -2117,9 +2126,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2117
2126
|
}, {
|
|
2118
2127
|
success: boolean;
|
|
2119
2128
|
}>;
|
|
2120
|
-
updateDashMemberRole:
|
|
2129
|
+
updateDashMemberRole: better_auth283.StrictEndpoint<"/dash/organization/update-member-role", {
|
|
2121
2130
|
method: "POST";
|
|
2122
|
-
use: ((inputContext:
|
|
2131
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2123
2132
|
payload: {
|
|
2124
2133
|
organizationId: string;
|
|
2125
2134
|
};
|
|
@@ -2135,14 +2144,14 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2135
2144
|
role: string;
|
|
2136
2145
|
createdAt: Date;
|
|
2137
2146
|
}>;
|
|
2138
|
-
inviteDashMember:
|
|
2147
|
+
inviteDashMember: better_auth283.StrictEndpoint<"/dash/organization/invite-member", {
|
|
2139
2148
|
method: "POST";
|
|
2140
2149
|
body: zod0.ZodObject<{
|
|
2141
2150
|
email: zod0.ZodString;
|
|
2142
2151
|
role: zod0.ZodString;
|
|
2143
2152
|
invitedBy: zod0.ZodString;
|
|
2144
2153
|
}, zod_v4_core0.$strip>;
|
|
2145
|
-
use: ((inputContext:
|
|
2154
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2146
2155
|
payload: {
|
|
2147
2156
|
organizationId: string;
|
|
2148
2157
|
invitedBy: string;
|
|
@@ -2167,9 +2176,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2167
2176
|
expiresAt: Date;
|
|
2168
2177
|
createdAt: Date;
|
|
2169
2178
|
}>;
|
|
2170
|
-
cancelDashInvitation:
|
|
2179
|
+
cancelDashInvitation: better_auth283.StrictEndpoint<"/dash/organization/cancel-invitation", {
|
|
2171
2180
|
method: "POST";
|
|
2172
|
-
use: ((inputContext:
|
|
2181
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2173
2182
|
payload: {
|
|
2174
2183
|
organizationId: string;
|
|
2175
2184
|
invitationId: string;
|
|
@@ -2181,9 +2190,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2181
2190
|
}, {
|
|
2182
2191
|
success: boolean;
|
|
2183
2192
|
}>;
|
|
2184
|
-
resendDashInvitation:
|
|
2193
|
+
resendDashInvitation: better_auth283.StrictEndpoint<"/dash/organization/resend-invitation", {
|
|
2185
2194
|
method: "POST";
|
|
2186
|
-
use: ((inputContext:
|
|
2195
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2187
2196
|
payload: {
|
|
2188
2197
|
organizationId: string;
|
|
2189
2198
|
invitationId: string;
|
|
@@ -2195,12 +2204,12 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2195
2204
|
}, {
|
|
2196
2205
|
success: boolean;
|
|
2197
2206
|
}>;
|
|
2198
|
-
dashCheckUserByEmail:
|
|
2207
|
+
dashCheckUserByEmail: better_auth283.StrictEndpoint<"/dash/organization/check-user-by-email", {
|
|
2199
2208
|
method: "POST";
|
|
2200
2209
|
body: zod0.ZodObject<{
|
|
2201
2210
|
email: zod0.ZodString;
|
|
2202
2211
|
}, zod_v4_core0.$strip>;
|
|
2203
|
-
use: ((inputContext:
|
|
2212
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2204
2213
|
payload: {
|
|
2205
2214
|
organizationId: string;
|
|
2206
2215
|
};
|
|
@@ -2219,9 +2228,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2219
2228
|
};
|
|
2220
2229
|
isAlreadyMember: boolean;
|
|
2221
2230
|
}>;
|
|
2222
|
-
dashGetUserStats:
|
|
2231
|
+
dashGetUserStats: better_auth283.StrictEndpoint<"/dash/user-stats", {
|
|
2223
2232
|
method: "GET";
|
|
2224
|
-
use: ((inputContext:
|
|
2233
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2225
2234
|
payload: Record<string, unknown>;
|
|
2226
2235
|
}>)[];
|
|
2227
2236
|
}, {
|
|
@@ -2253,9 +2262,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2253
2262
|
};
|
|
2254
2263
|
};
|
|
2255
2264
|
}>;
|
|
2256
|
-
dashGetUserGraphData:
|
|
2265
|
+
dashGetUserGraphData: better_auth283.StrictEndpoint<"/dash/user-graph-data", {
|
|
2257
2266
|
method: "GET";
|
|
2258
|
-
use: ((inputContext:
|
|
2267
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2259
2268
|
payload: Record<string, unknown>;
|
|
2260
2269
|
}>)[];
|
|
2261
2270
|
query: zod0.ZodObject<{
|
|
@@ -2275,9 +2284,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2275
2284
|
}[];
|
|
2276
2285
|
period: "daily" | "weekly" | "monthly";
|
|
2277
2286
|
}>;
|
|
2278
|
-
dashGetUserRetentionData:
|
|
2287
|
+
dashGetUserRetentionData: better_auth283.StrictEndpoint<"/dash/user-retention-data", {
|
|
2279
2288
|
method: "GET";
|
|
2280
|
-
use: ((inputContext:
|
|
2289
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2281
2290
|
payload: Record<string, unknown>;
|
|
2282
2291
|
}>)[];
|
|
2283
2292
|
query: zod0.ZodObject<{
|
|
@@ -2301,9 +2310,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2301
2310
|
}[];
|
|
2302
2311
|
period: "daily" | "weekly" | "monthly";
|
|
2303
2312
|
}>;
|
|
2304
|
-
dashGetUserMapData:
|
|
2313
|
+
dashGetUserMapData: better_auth283.StrictEndpoint<"/dash/user-map-data", {
|
|
2305
2314
|
method: "GET";
|
|
2306
|
-
use: ((inputContext:
|
|
2315
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2307
2316
|
payload: Record<string, unknown>;
|
|
2308
2317
|
}>)[];
|
|
2309
2318
|
}, {
|
|
@@ -2320,9 +2329,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2320
2329
|
}[];
|
|
2321
2330
|
total: number;
|
|
2322
2331
|
}>;
|
|
2323
|
-
dashBanUser:
|
|
2332
|
+
dashBanUser: better_auth283.StrictEndpoint<"/dash/ban-user", {
|
|
2324
2333
|
method: "POST";
|
|
2325
|
-
use: ((inputContext:
|
|
2334
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2326
2335
|
payload: {
|
|
2327
2336
|
userId: string;
|
|
2328
2337
|
};
|
|
@@ -2334,9 +2343,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2334
2343
|
}, {
|
|
2335
2344
|
success: boolean;
|
|
2336
2345
|
}>;
|
|
2337
|
-
dashBanManyUsers:
|
|
2346
|
+
dashBanManyUsers: better_auth283.StrictEndpoint<"/dash/ban-many-users", {
|
|
2338
2347
|
method: "POST";
|
|
2339
|
-
use: ((inputContext:
|
|
2348
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2340
2349
|
payload: {
|
|
2341
2350
|
userIds: string[];
|
|
2342
2351
|
};
|
|
@@ -2350,9 +2359,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2350
2359
|
bannedUserIds: string[];
|
|
2351
2360
|
skippedUserIds: string[];
|
|
2352
2361
|
}>;
|
|
2353
|
-
dashUnbanUser:
|
|
2362
|
+
dashUnbanUser: better_auth283.StrictEndpoint<"/dash/unban-user", {
|
|
2354
2363
|
method: "POST";
|
|
2355
|
-
use: ((inputContext:
|
|
2364
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2356
2365
|
payload: {
|
|
2357
2366
|
userId: string;
|
|
2358
2367
|
};
|
|
@@ -2360,9 +2369,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2360
2369
|
}, {
|
|
2361
2370
|
success: boolean;
|
|
2362
2371
|
}>;
|
|
2363
|
-
dashSendVerificationEmail:
|
|
2372
|
+
dashSendVerificationEmail: better_auth283.StrictEndpoint<"/dash/send-verification-email", {
|
|
2364
2373
|
method: "POST";
|
|
2365
|
-
use: ((inputContext:
|
|
2374
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2366
2375
|
payload: {
|
|
2367
2376
|
userId: string;
|
|
2368
2377
|
};
|
|
@@ -2373,9 +2382,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2373
2382
|
}, {
|
|
2374
2383
|
success: boolean;
|
|
2375
2384
|
}>;
|
|
2376
|
-
dashSendManyVerificationEmails:
|
|
2385
|
+
dashSendManyVerificationEmails: better_auth283.StrictEndpoint<"/dash/send-many-verification-emails", {
|
|
2377
2386
|
method: "POST";
|
|
2378
|
-
use: ((inputContext:
|
|
2387
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2379
2388
|
payload: {
|
|
2380
2389
|
userIds: string[];
|
|
2381
2390
|
};
|
|
@@ -2388,9 +2397,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2388
2397
|
sentEmailUserIds: string[];
|
|
2389
2398
|
skippedEmailUserIds: string[];
|
|
2390
2399
|
}>;
|
|
2391
|
-
dashSendResetPasswordEmail:
|
|
2400
|
+
dashSendResetPasswordEmail: better_auth283.StrictEndpoint<"/dash/send-reset-password-email", {
|
|
2392
2401
|
method: "POST";
|
|
2393
|
-
use: ((inputContext:
|
|
2402
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2394
2403
|
payload: {
|
|
2395
2404
|
userId: string;
|
|
2396
2405
|
};
|
|
@@ -2399,9 +2408,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2399
2408
|
callbackUrl: zod0.ZodString;
|
|
2400
2409
|
}, zod_v4_core0.$strip>;
|
|
2401
2410
|
}, never>;
|
|
2402
|
-
dashEnableTwoFactor:
|
|
2411
|
+
dashEnableTwoFactor: better_auth283.StrictEndpoint<"/dash/enable-two-factor", {
|
|
2403
2412
|
method: "POST";
|
|
2404
|
-
use: ((inputContext:
|
|
2413
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2405
2414
|
payload: {
|
|
2406
2415
|
userId: string;
|
|
2407
2416
|
};
|
|
@@ -2412,12 +2421,12 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2412
2421
|
secret: string;
|
|
2413
2422
|
backupCodes: string[];
|
|
2414
2423
|
}>;
|
|
2415
|
-
dashViewTwoFactorTotpUri:
|
|
2424
|
+
dashViewTwoFactorTotpUri: better_auth283.StrictEndpoint<"/dash/view-two-factor-totp-uri", {
|
|
2416
2425
|
method: "POST";
|
|
2417
2426
|
metadata: {
|
|
2418
2427
|
scope: "http";
|
|
2419
2428
|
};
|
|
2420
|
-
use: ((inputContext:
|
|
2429
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2421
2430
|
payload: {
|
|
2422
2431
|
userId: string;
|
|
2423
2432
|
};
|
|
@@ -2426,9 +2435,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2426
2435
|
totpURI: string;
|
|
2427
2436
|
secret: string;
|
|
2428
2437
|
}>;
|
|
2429
|
-
dashViewBackupCodes:
|
|
2438
|
+
dashViewBackupCodes: better_auth283.StrictEndpoint<"/dash/view-backup-codes", {
|
|
2430
2439
|
method: "POST";
|
|
2431
|
-
use: ((inputContext:
|
|
2440
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2432
2441
|
payload: {
|
|
2433
2442
|
userId: string;
|
|
2434
2443
|
};
|
|
@@ -2436,9 +2445,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2436
2445
|
}, {
|
|
2437
2446
|
backupCodes: string[];
|
|
2438
2447
|
}>;
|
|
2439
|
-
dashDisableTwoFactor:
|
|
2448
|
+
dashDisableTwoFactor: better_auth283.StrictEndpoint<"/dash/disable-two-factor", {
|
|
2440
2449
|
method: "POST";
|
|
2441
|
-
use: ((inputContext:
|
|
2450
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2442
2451
|
payload: {
|
|
2443
2452
|
userId: string;
|
|
2444
2453
|
};
|
|
@@ -2446,9 +2455,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2446
2455
|
}, {
|
|
2447
2456
|
success: boolean;
|
|
2448
2457
|
}>;
|
|
2449
|
-
dashGenerateBackupCodes:
|
|
2458
|
+
dashGenerateBackupCodes: better_auth283.StrictEndpoint<"/dash/generate-backup-codes", {
|
|
2450
2459
|
method: "POST";
|
|
2451
|
-
use: ((inputContext:
|
|
2460
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2452
2461
|
payload: {
|
|
2453
2462
|
userId: string;
|
|
2454
2463
|
};
|
|
@@ -2456,9 +2465,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2456
2465
|
}, {
|
|
2457
2466
|
backupCodes: string[];
|
|
2458
2467
|
}>;
|
|
2459
|
-
getUserEvents:
|
|
2468
|
+
getUserEvents: better_auth283.StrictEndpoint<"/events/list", {
|
|
2460
2469
|
method: "GET";
|
|
2461
|
-
use: ((inputContext:
|
|
2470
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2462
2471
|
session: {
|
|
2463
2472
|
session: Record<string, any> & {
|
|
2464
2473
|
id: string;
|
|
@@ -2492,9 +2501,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2492
2501
|
limit: number;
|
|
2493
2502
|
offset: number;
|
|
2494
2503
|
}>;
|
|
2495
|
-
getAuditLogs:
|
|
2504
|
+
getAuditLogs: better_auth283.StrictEndpoint<"/events/audit-logs", {
|
|
2496
2505
|
method: "GET";
|
|
2497
|
-
use: ((inputContext:
|
|
2506
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2498
2507
|
session: {
|
|
2499
2508
|
session: Record<string, any> & {
|
|
2500
2509
|
id: string;
|
|
@@ -2531,9 +2540,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2531
2540
|
limit: number;
|
|
2532
2541
|
offset: number;
|
|
2533
2542
|
}>;
|
|
2534
|
-
getEventTypes:
|
|
2543
|
+
getEventTypes: better_auth283.StrictEndpoint<"/events/types", {
|
|
2535
2544
|
method: "GET";
|
|
2536
|
-
use: ((inputContext:
|
|
2545
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2537
2546
|
session: {
|
|
2538
2547
|
session: Record<string, any> & {
|
|
2539
2548
|
id: string;
|
|
@@ -2642,13 +2651,13 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2642
2651
|
readonly USER_IMPERSONATED_STOPPED: "user_impersonated_stopped";
|
|
2643
2652
|
};
|
|
2644
2653
|
}>;
|
|
2645
|
-
dashAcceptInvitation:
|
|
2654
|
+
dashAcceptInvitation: better_auth283.StrictEndpoint<"/dash/accept-invitation", {
|
|
2646
2655
|
method: "GET";
|
|
2647
2656
|
query: zod0.ZodObject<{
|
|
2648
2657
|
token: zod0.ZodString;
|
|
2649
2658
|
}, zod_v4_core0.$strip>;
|
|
2650
2659
|
}, {
|
|
2651
|
-
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") |
|
|
2660
|
+
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_auth283.Status;
|
|
2652
2661
|
body: ({
|
|
2653
2662
|
message?: string;
|
|
2654
2663
|
code?: string;
|
|
@@ -2661,7 +2670,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2661
2670
|
stack?: string;
|
|
2662
2671
|
cause?: unknown;
|
|
2663
2672
|
}>;
|
|
2664
|
-
dashCompleteInvitation:
|
|
2673
|
+
dashCompleteInvitation: better_auth283.StrictEndpoint<"/dash/complete-invitation", {
|
|
2665
2674
|
method: "POST";
|
|
2666
2675
|
body: zod0.ZodObject<{
|
|
2667
2676
|
token: zod0.ZodString;
|
|
@@ -2673,9 +2682,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2673
2682
|
}, zod_v4_core0.$strip>;
|
|
2674
2683
|
}, {
|
|
2675
2684
|
success: boolean;
|
|
2676
|
-
redirectUrl:
|
|
2685
|
+
redirectUrl: better_auth283.BaseURLConfig;
|
|
2677
2686
|
}>;
|
|
2678
|
-
dashCheckUserExists:
|
|
2687
|
+
dashCheckUserExists: better_auth283.StrictEndpoint<"/dash/check-user-exists", {
|
|
2679
2688
|
method: "POST";
|
|
2680
2689
|
body: zod0.ZodObject<{
|
|
2681
2690
|
email: zod0.ZodString;
|
|
@@ -2684,9 +2693,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2684
2693
|
exists: boolean;
|
|
2685
2694
|
userId: string | null;
|
|
2686
2695
|
}>;
|
|
2687
|
-
listDashOrganizationLogDrains:
|
|
2696
|
+
listDashOrganizationLogDrains: better_auth283.StrictEndpoint<"/dash/organization/:id/log-drains", {
|
|
2688
2697
|
method: "GET";
|
|
2689
|
-
use: ((inputContext:
|
|
2698
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2690
2699
|
payload: Record<string, unknown>;
|
|
2691
2700
|
}>)[];
|
|
2692
2701
|
}, {
|
|
@@ -2700,9 +2709,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2700
2709
|
createdAt: Date | string;
|
|
2701
2710
|
updatedAt: Date | string;
|
|
2702
2711
|
}[]>;
|
|
2703
|
-
createDashOrganizationLogDrain:
|
|
2712
|
+
createDashOrganizationLogDrain: better_auth283.StrictEndpoint<"/dash/organization/log-drain/create", {
|
|
2704
2713
|
method: "POST";
|
|
2705
|
-
use: ((inputContext:
|
|
2714
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2706
2715
|
payload: {
|
|
2707
2716
|
organizationId: string;
|
|
2708
2717
|
};
|
|
@@ -2734,9 +2743,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2734
2743
|
createdAt: Date | string;
|
|
2735
2744
|
updatedAt: Date | string;
|
|
2736
2745
|
}>;
|
|
2737
|
-
updateDashOrganizationLogDrain:
|
|
2746
|
+
updateDashOrganizationLogDrain: better_auth283.StrictEndpoint<"/dash/organization/log-drain/update", {
|
|
2738
2747
|
method: "POST";
|
|
2739
|
-
use: ((inputContext:
|
|
2748
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2740
2749
|
payload: {
|
|
2741
2750
|
organizationId: string;
|
|
2742
2751
|
};
|
|
@@ -2769,9 +2778,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2769
2778
|
createdAt: Date | string;
|
|
2770
2779
|
updatedAt: Date | string;
|
|
2771
2780
|
}>;
|
|
2772
|
-
deleteDashOrganizationLogDrain:
|
|
2781
|
+
deleteDashOrganizationLogDrain: better_auth283.StrictEndpoint<"/dash/organization/log-drain/delete", {
|
|
2773
2782
|
method: "POST";
|
|
2774
|
-
use: ((inputContext:
|
|
2783
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2775
2784
|
payload: {
|
|
2776
2785
|
organizationId: string;
|
|
2777
2786
|
};
|
|
@@ -2782,9 +2791,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2782
2791
|
}, {
|
|
2783
2792
|
success: boolean;
|
|
2784
2793
|
}>;
|
|
2785
|
-
testDashOrganizationLogDrain:
|
|
2794
|
+
testDashOrganizationLogDrain: better_auth283.StrictEndpoint<"/dash/organization/log-drain/test", {
|
|
2786
2795
|
method: "POST";
|
|
2787
|
-
use: ((inputContext:
|
|
2796
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2788
2797
|
payload: {
|
|
2789
2798
|
organizationId: string;
|
|
2790
2799
|
};
|
|
@@ -2804,15 +2813,15 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2804
2813
|
success: boolean;
|
|
2805
2814
|
error: string;
|
|
2806
2815
|
}>;
|
|
2807
|
-
listDashOrganizationDirectories:
|
|
2816
|
+
listDashOrganizationDirectories: better_auth283.StrictEndpoint<"/dash/organization/:id/directories", {
|
|
2808
2817
|
method: "GET";
|
|
2809
|
-
use: ((inputContext:
|
|
2818
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2810
2819
|
payload: Record<string, unknown>;
|
|
2811
2820
|
}>)[];
|
|
2812
2821
|
}, DirectorySyncConnection[]>;
|
|
2813
|
-
createDashOrganizationDirectory:
|
|
2822
|
+
createDashOrganizationDirectory: better_auth283.StrictEndpoint<"/dash/organization/directory/create", {
|
|
2814
2823
|
method: "POST";
|
|
2815
|
-
use: ((inputContext:
|
|
2824
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2816
2825
|
payload: {
|
|
2817
2826
|
organizationId: string;
|
|
2818
2827
|
};
|
|
@@ -2827,9 +2836,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2827
2836
|
scimEndpoint: string;
|
|
2828
2837
|
scimToken: string;
|
|
2829
2838
|
}>;
|
|
2830
|
-
deleteDashOrganizationDirectory:
|
|
2839
|
+
deleteDashOrganizationDirectory: better_auth283.StrictEndpoint<"/dash/organization/directory/delete", {
|
|
2831
2840
|
method: "POST";
|
|
2832
|
-
use: ((inputContext:
|
|
2841
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2833
2842
|
payload: {
|
|
2834
2843
|
organizationId: string;
|
|
2835
2844
|
};
|
|
@@ -2840,9 +2849,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2840
2849
|
}, {
|
|
2841
2850
|
success: boolean;
|
|
2842
2851
|
}>;
|
|
2843
|
-
regenerateDashDirectoryToken:
|
|
2852
|
+
regenerateDashDirectoryToken: better_auth283.StrictEndpoint<"/dash/organization/directory/regenerate-token", {
|
|
2844
2853
|
method: "POST";
|
|
2845
|
-
use: ((inputContext:
|
|
2854
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2846
2855
|
payload: {
|
|
2847
2856
|
organizationId: string;
|
|
2848
2857
|
};
|
|
@@ -2855,9 +2864,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2855
2864
|
scimToken: string;
|
|
2856
2865
|
scimEndpoint: string;
|
|
2857
2866
|
}>;
|
|
2858
|
-
getDashDirectoryDetails:
|
|
2867
|
+
getDashDirectoryDetails: better_auth283.StrictEndpoint<"/dash/organization/:orgId/directory", {
|
|
2859
2868
|
method: "GET";
|
|
2860
|
-
use: ((inputContext:
|
|
2869
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2861
2870
|
payload: Record<string, unknown>;
|
|
2862
2871
|
}>)[];
|
|
2863
2872
|
query: zod0.ZodObject<{
|
|
@@ -2868,9 +2877,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2868
2877
|
providerId: string;
|
|
2869
2878
|
scimEndpoint: string;
|
|
2870
2879
|
}>;
|
|
2871
|
-
dashExecuteAdapter:
|
|
2880
|
+
dashExecuteAdapter: better_auth283.StrictEndpoint<"/dash/execute-adapter", {
|
|
2872
2881
|
method: "POST";
|
|
2873
|
-
use: ((inputContext:
|
|
2882
|
+
use: ((inputContext: better_auth283.MiddlewareInputContext<better_auth283.MiddlewareOptions>) => Promise<{
|
|
2874
2883
|
payload: Record<string, unknown>;
|
|
2875
2884
|
}>)[];
|
|
2876
2885
|
body: zod0.ZodDiscriminatedUnion<[zod0.ZodObject<{
|
|
@@ -2991,15 +3000,19 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2991
3000
|
result?: undefined;
|
|
2992
3001
|
}>;
|
|
2993
3002
|
};
|
|
2994
|
-
schema: {
|
|
2995
|
-
|
|
3003
|
+
schema: O extends {
|
|
3004
|
+
activityTracking: {
|
|
3005
|
+
enabled: true;
|
|
3006
|
+
};
|
|
3007
|
+
} ? {
|
|
3008
|
+
user: {
|
|
2996
3009
|
fields: {
|
|
2997
3010
|
lastActiveAt: {
|
|
2998
3011
|
type: "date";
|
|
2999
3012
|
};
|
|
3000
3013
|
};
|
|
3001
|
-
}
|
|
3002
|
-
};
|
|
3014
|
+
};
|
|
3015
|
+
} : {};
|
|
3003
3016
|
};
|
|
3004
3017
|
//#endregion
|
|
3005
3018
|
export { type APIError, CHALLENGE_TTL, type CompromisedPasswordResult, type CredentialStuffingResult, DEFAULT_DIFFICULTY, type DashOptions, DashOptionsInternal, DirectorySyncConnection, DirectorySyncConnectionWithToken, EMAIL_TEMPLATES, type EmailConfig, type EmailTemplateId, type EmailTemplateVariables, type Endpoint, type EndpointOptions, type EventLocation, type ImpossibleTravelResult, InfraEndpointContext, InfraPluginConnectionOptions, InfraPluginConnectionOptionsInternal, LocationDataContext, type PoWChallenge, type PoWSolution, SCIMPlugin, type SMSConfig, type SMSTemplateId, type SMSTemplateVariables, SMS_TEMPLATES, type SecurityEvent, type SecurityEventType, type SecurityOptions, type SecurityVerdict, type SendBulkEmailsOptions, type SendBulkEmailsResult, type SendEmailOptions, type SendEmailResult, type SendSMSOptions, type SendSMSResult, type SentinelOptions, SentinelOptionsInternal, type StaleUserResult, type ThresholdConfig, USER_EVENT_TYPES, type UserEvent, type UserEventType, type UserEventsResponse, createEmailSender, createSMSSender, dash, decodePoWChallenge, encodePoWSolution, sendBulkEmails, sendEmail, sendSMS, sentinel, solvePoWChallenge, verifyPoWSolution };
|