@better-auth/infra 0.1.7 → 0.1.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.mts +5 -5
- package/dist/client.mjs +6 -2
- package/dist/constants-DWl1utFw.mjs +18 -0
- package/dist/email.d.mts +53 -1
- package/dist/email.mjs +182 -2
- package/dist/index.d.mts +531 -264
- package/dist/index.mjs +816 -263
- package/package.json +18 -17
- package/dist/email-BGxJ96Ky.mjs +0 -128
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,49 @@
|
|
|
1
|
-
import { EMAIL_TEMPLATES, EmailConfig, EmailTemplateId, EmailTemplateVariables, SendEmailOptions, SendEmailResult, createEmailSender, sendEmail } from "./email.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import { BetterAuthPlugin, HookEndpointContext } from "better-auth";
|
|
1
|
+
import { EMAIL_TEMPLATES, EmailConfig, EmailTemplateId, EmailTemplateVariables, SendBulkEmailsOptions, SendBulkEmailsResult, SendEmailOptions, SendEmailResult, createEmailSender, sendBulkEmails, sendEmail } from "./email.mjs";
|
|
2
|
+
import * as better_auth298 from "better-auth";
|
|
3
|
+
import { BetterAuthPlugin, GenericEndpointContext, HookEndpointContext } from "better-auth";
|
|
4
4
|
import * as zod0 from "zod";
|
|
5
5
|
import z$1 from "zod";
|
|
6
|
-
import "better-call";
|
|
7
6
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
8
7
|
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
9
|
-
import
|
|
8
|
+
import { APIError, Endpoint, EndpointOptions } from "better-call";
|
|
9
|
+
import { scim } from "@better-auth/scim";
|
|
10
10
|
export * from "better-call";
|
|
11
11
|
|
|
12
|
+
//#region src/identification.d.ts
|
|
13
|
+
|
|
14
|
+
interface IPLocation {
|
|
15
|
+
lat: number;
|
|
16
|
+
lng: number;
|
|
17
|
+
city: string | null;
|
|
18
|
+
region: string | null;
|
|
19
|
+
postalCode: string | null;
|
|
20
|
+
country: {
|
|
21
|
+
code: string;
|
|
22
|
+
name: string;
|
|
23
|
+
} | null;
|
|
24
|
+
timezone: string | null;
|
|
25
|
+
}
|
|
26
|
+
interface Identification {
|
|
27
|
+
visitorId: string;
|
|
28
|
+
requestId: string;
|
|
29
|
+
timestamp: number;
|
|
30
|
+
url: string;
|
|
31
|
+
ip: string | null;
|
|
32
|
+
location: IPLocation | null;
|
|
33
|
+
browser: {
|
|
34
|
+
name: string | null;
|
|
35
|
+
version: string | null;
|
|
36
|
+
os: string | null;
|
|
37
|
+
osVersion: string | null;
|
|
38
|
+
device: string | null;
|
|
39
|
+
userAgent: string | null;
|
|
40
|
+
};
|
|
41
|
+
confidence: number;
|
|
42
|
+
incognito: boolean;
|
|
43
|
+
bot: "notDetected" | "detected" | "unknown";
|
|
44
|
+
isAnonymous: boolean;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
12
47
|
//#region src/security.d.ts
|
|
13
48
|
type SecurityAction = "log" | "block" | "challenge";
|
|
14
49
|
interface ThresholdConfig {
|
|
@@ -183,25 +218,51 @@ interface SentinelOptions extends InfraPluginConnectionOptions {
|
|
|
183
218
|
*/
|
|
184
219
|
security?: SecurityOptions;
|
|
185
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Internal connection options with required fields resolved.
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
225
|
+
interface InfraPluginConnectionOptionsInternal extends InfraPluginConnectionOptions {
|
|
226
|
+
apiUrl: string;
|
|
227
|
+
kvUrl: string;
|
|
228
|
+
apiKey: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Internal options with required fields resolved
|
|
232
|
+
* @internal
|
|
233
|
+
*/
|
|
234
|
+
interface DashOptionsInternal extends Omit<DashOptions, keyof InfraPluginConnectionOptions>, InfraPluginConnectionOptionsInternal {}
|
|
235
|
+
/**
|
|
236
|
+
* Internal sentinel options with required fields resolved.
|
|
237
|
+
* @internal
|
|
238
|
+
*/
|
|
239
|
+
interface SentinelOptionsInternal extends Omit<SentinelOptions, keyof InfraPluginConnectionOptions>, InfraPluginConnectionOptionsInternal {}
|
|
240
|
+
interface LocationDataContext {
|
|
241
|
+
ipAddress?: string;
|
|
242
|
+
city?: string;
|
|
243
|
+
country?: string;
|
|
244
|
+
countryCode?: string;
|
|
245
|
+
}
|
|
246
|
+
type InfraEndpointContext = (GenericEndpointContext & {
|
|
247
|
+
context: {
|
|
248
|
+
identification: Identification | null;
|
|
249
|
+
visitorId: string | null;
|
|
250
|
+
requestId: string | null;
|
|
251
|
+
location: LocationDataContext | undefined;
|
|
252
|
+
};
|
|
253
|
+
}) | undefined;
|
|
186
254
|
//#endregion
|
|
187
255
|
//#region src/routes/org-log-drains.d.ts
|
|
188
256
|
type OrgLogDrainDestinationType = "datadog" | "splunk" | "webhook";
|
|
189
257
|
type OrgLogDrainEventType = "auth" | "security" | "email" | "all";
|
|
190
258
|
//#endregion
|
|
191
|
-
//#region src/routes/directory-sync/types.d.ts
|
|
192
|
-
interface DirectorySyncConnection {
|
|
193
|
-
organizationId: string;
|
|
194
|
-
providerId: string;
|
|
195
|
-
scimEndpoint: string;
|
|
196
|
-
}
|
|
197
|
-
//#endregion
|
|
198
259
|
//#region src/validation/matchers.d.ts
|
|
199
260
|
type Matcher = (context: HookEndpointContext) => boolean;
|
|
200
261
|
//#endregion
|
|
201
262
|
//#region src/sentinel.d.ts
|
|
202
263
|
declare const sentinel: (options?: SentinelOptions) => {
|
|
203
264
|
id: "sentinel";
|
|
204
|
-
init(ctx:
|
|
265
|
+
init(ctx: better_auth298.AuthContext): {
|
|
205
266
|
options: {
|
|
206
267
|
databaseHooks: {
|
|
207
268
|
user: {
|
|
@@ -214,7 +275,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
214
275
|
emailVerified: boolean;
|
|
215
276
|
name: string;
|
|
216
277
|
image?: string | null | undefined;
|
|
217
|
-
} & Record<string, unknown>, hookCtx:
|
|
278
|
+
} & Record<string, unknown>, hookCtx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
218
279
|
after(user: {
|
|
219
280
|
id: string;
|
|
220
281
|
createdAt: Date;
|
|
@@ -223,7 +284,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
223
284
|
emailVerified: boolean;
|
|
224
285
|
name: string;
|
|
225
286
|
image?: string | null | undefined;
|
|
226
|
-
} & Record<string, unknown>, hookCtx:
|
|
287
|
+
} & Record<string, unknown>, hookCtx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
227
288
|
};
|
|
228
289
|
};
|
|
229
290
|
session: {
|
|
@@ -237,7 +298,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
237
298
|
token: string;
|
|
238
299
|
ipAddress?: string | null | undefined;
|
|
239
300
|
userAgent?: string | null | undefined;
|
|
240
|
-
} & Record<string, unknown>, hookCtx:
|
|
301
|
+
} & Record<string, unknown>, hookCtx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
241
302
|
after(session: {
|
|
242
303
|
id: string;
|
|
243
304
|
createdAt: Date;
|
|
@@ -247,7 +308,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
247
308
|
token: string;
|
|
248
309
|
ipAddress?: string | null | undefined;
|
|
249
310
|
userAgent?: string | null | undefined;
|
|
250
|
-
} & Record<string, unknown>, hookCtx:
|
|
311
|
+
} & Record<string, unknown>, hookCtx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
251
312
|
};
|
|
252
313
|
};
|
|
253
314
|
};
|
|
@@ -256,7 +317,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
256
317
|
hooks: {
|
|
257
318
|
before: ({
|
|
258
319
|
matcher: Matcher;
|
|
259
|
-
handler: (inputContext:
|
|
320
|
+
handler: (inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
260
321
|
context: {
|
|
261
322
|
query: {
|
|
262
323
|
email: string;
|
|
@@ -269,12 +330,12 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
269
330
|
request: Request | undefined;
|
|
270
331
|
headers: Headers | undefined;
|
|
271
332
|
setHeader: ((key: string, value: string) => void) & ((key: string, value: string) => void);
|
|
272
|
-
setStatus: (status:
|
|
333
|
+
setStatus: (status: better_auth298.Status) => void;
|
|
273
334
|
getHeader: ((key: string) => string | null) & ((key: string) => string | null);
|
|
274
|
-
getCookie: (key: string, prefix?:
|
|
275
|
-
getSignedCookie: (key: string, secret: string, prefix?:
|
|
276
|
-
setCookie: (key: string, value: string, options?:
|
|
277
|
-
setSignedCookie: (key: string, value: string, secret: string, options?:
|
|
335
|
+
getCookie: (key: string, prefix?: better_auth298.CookiePrefixOptions) => string | null;
|
|
336
|
+
getSignedCookie: (key: string, secret: string, prefix?: better_auth298.CookiePrefixOptions) => Promise<string | null | false>;
|
|
337
|
+
setCookie: (key: string, value: string, options?: better_auth298.CookieOptions) => string;
|
|
338
|
+
setSignedCookie: (key: string, value: string, secret: string, options?: better_auth298.CookieOptions) => Promise<string>;
|
|
278
339
|
json: (<R extends Record<string, any> | null>(json: R, routerResponse?: {
|
|
279
340
|
status?: number;
|
|
280
341
|
headers?: Record<string, string>;
|
|
@@ -290,14 +351,14 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
290
351
|
} & {
|
|
291
352
|
returned?: unknown | undefined;
|
|
292
353
|
responseHeaders?: Headers | undefined;
|
|
293
|
-
getPlugin: <ID extends
|
|
354
|
+
getPlugin: <ID extends better_auth298.BetterAuthPluginRegistryIdentifier | better_auth298.LiteralString, PluginOptions extends never>(pluginId: ID) => (ID extends keyof better_auth298.BetterAuthPluginRegistry<unknown, unknown> ? better_auth298.BetterAuthPluginRegistry<better_auth298.BetterAuthOptions, PluginOptions>[ID] extends {
|
|
294
355
|
creator: infer C;
|
|
295
356
|
} ? C extends ((...args: any[]) => infer R) ? R : never : never : BetterAuthPlugin) | null;
|
|
296
|
-
hasPlugin: <ID extends
|
|
357
|
+
hasPlugin: <ID extends better_auth298.BetterAuthPluginRegistryIdentifier | better_auth298.LiteralString>(pluginId: ID) => ID extends never ? true : boolean;
|
|
297
358
|
appName: string;
|
|
298
359
|
baseURL: string;
|
|
299
360
|
version: string;
|
|
300
|
-
options:
|
|
361
|
+
options: better_auth298.BetterAuthOptions;
|
|
301
362
|
trustedOrigins: string[];
|
|
302
363
|
trustedProviders: string[];
|
|
303
364
|
isTrustedOrigin: (url: string, settings?: {
|
|
@@ -370,18 +431,18 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
370
431
|
image?: string | null | undefined;
|
|
371
432
|
} & Record<string, any>;
|
|
372
433
|
} | null) => void;
|
|
373
|
-
socialProviders:
|
|
374
|
-
authCookies:
|
|
375
|
-
logger: ReturnType<(options?:
|
|
434
|
+
socialProviders: better_auth298.OAuthProvider[];
|
|
435
|
+
authCookies: better_auth298.BetterAuthCookies;
|
|
436
|
+
logger: ReturnType<(options?: better_auth298.Logger | undefined) => better_auth298.InternalLogger>;
|
|
376
437
|
rateLimit: {
|
|
377
438
|
enabled: boolean;
|
|
378
439
|
window: number;
|
|
379
440
|
max: number;
|
|
380
441
|
storage: "memory" | "database" | "secondary-storage";
|
|
381
|
-
} & Omit<
|
|
382
|
-
adapter:
|
|
383
|
-
internalAdapter:
|
|
384
|
-
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<
|
|
442
|
+
} & Omit<better_auth298.BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
443
|
+
adapter: better_auth298.DBAdapter<better_auth298.BetterAuthOptions>;
|
|
444
|
+
internalAdapter: better_auth298.InternalAdapter<better_auth298.BetterAuthOptions>;
|
|
445
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<better_auth298.CookieOptions> | undefined) => better_auth298.BetterAuthCookie;
|
|
385
446
|
secret: string;
|
|
386
447
|
sessionConfig: {
|
|
387
448
|
updateAge: number;
|
|
@@ -393,10 +454,10 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
393
454
|
};
|
|
394
455
|
};
|
|
395
456
|
generateId: (options: {
|
|
396
|
-
model:
|
|
457
|
+
model: better_auth298.ModelNames;
|
|
397
458
|
size?: number | undefined;
|
|
398
459
|
}) => string | false;
|
|
399
|
-
secondaryStorage:
|
|
460
|
+
secondaryStorage: better_auth298.SecondaryStorage | undefined;
|
|
400
461
|
password: {
|
|
401
462
|
hash: (password: string) => Promise<string>;
|
|
402
463
|
verify: (data: {
|
|
@@ -407,9 +468,9 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
407
468
|
minPasswordLength: number;
|
|
408
469
|
maxPasswordLength: number;
|
|
409
470
|
};
|
|
410
|
-
checkPassword: (userId: string, ctx:
|
|
471
|
+
checkPassword: (userId: string, ctx: better_auth298.GenericEndpointContext<better_auth298.BetterAuthOptions>) => Promise<boolean>;
|
|
411
472
|
};
|
|
412
|
-
tables:
|
|
473
|
+
tables: better_auth298.BetterAuthDBSchema;
|
|
413
474
|
runMigrations: () => Promise<void>;
|
|
414
475
|
publishTelemetry: (event: {
|
|
415
476
|
type: string;
|
|
@@ -419,13 +480,39 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
419
480
|
skipOriginCheck: boolean | string[];
|
|
420
481
|
skipCSRFCheck: boolean;
|
|
421
482
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
422
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> | void) =>
|
|
483
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => better_auth298.Awaitable<unknown>;
|
|
484
|
+
};
|
|
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") | better_auth298.Status;
|
|
487
|
+
body: ({
|
|
488
|
+
message?: string;
|
|
489
|
+
code?: string;
|
|
490
|
+
cause?: unknown;
|
|
491
|
+
} & Record<string, any>) | undefined;
|
|
492
|
+
headers: HeadersInit;
|
|
493
|
+
statusCode: number;
|
|
494
|
+
name: string;
|
|
495
|
+
message: string;
|
|
496
|
+
stack?: string;
|
|
497
|
+
cause?: unknown;
|
|
423
498
|
};
|
|
424
|
-
|
|
425
|
-
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_auth260.Status, body?: {
|
|
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_auth298.Status, body?: {
|
|
426
500
|
message?: string;
|
|
427
501
|
code?: string;
|
|
428
|
-
} & Record<string, any>, headers?: HeadersInit) =>
|
|
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") | better_auth298.Status;
|
|
504
|
+
body: ({
|
|
505
|
+
message?: string;
|
|
506
|
+
code?: string;
|
|
507
|
+
cause?: unknown;
|
|
508
|
+
} & Record<string, any>) | undefined;
|
|
509
|
+
headers: HeadersInit;
|
|
510
|
+
statusCode: number;
|
|
511
|
+
name: string;
|
|
512
|
+
message: string;
|
|
513
|
+
stack?: string;
|
|
514
|
+
cause?: unknown;
|
|
515
|
+
};
|
|
429
516
|
};
|
|
430
517
|
} | {
|
|
431
518
|
context: {
|
|
@@ -440,12 +527,12 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
440
527
|
request: Request | undefined;
|
|
441
528
|
headers: Headers | undefined;
|
|
442
529
|
setHeader: ((key: string, value: string) => void) & ((key: string, value: string) => void);
|
|
443
|
-
setStatus: (status:
|
|
530
|
+
setStatus: (status: better_auth298.Status) => void;
|
|
444
531
|
getHeader: ((key: string) => string | null) & ((key: string) => string | null);
|
|
445
|
-
getCookie: (key: string, prefix?:
|
|
446
|
-
getSignedCookie: (key: string, secret: string, prefix?:
|
|
447
|
-
setCookie: (key: string, value: string, options?:
|
|
448
|
-
setSignedCookie: (key: string, value: string, secret: string, options?:
|
|
532
|
+
getCookie: (key: string, prefix?: better_auth298.CookiePrefixOptions) => string | null;
|
|
533
|
+
getSignedCookie: (key: string, secret: string, prefix?: better_auth298.CookiePrefixOptions) => Promise<string | null | false>;
|
|
534
|
+
setCookie: (key: string, value: string, options?: better_auth298.CookieOptions) => string;
|
|
535
|
+
setSignedCookie: (key: string, value: string, secret: string, options?: better_auth298.CookieOptions) => Promise<string>;
|
|
449
536
|
json: (<R extends Record<string, any> | null>(json: R, routerResponse?: {
|
|
450
537
|
status?: number;
|
|
451
538
|
headers?: Record<string, string>;
|
|
@@ -461,14 +548,14 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
461
548
|
} & {
|
|
462
549
|
returned?: unknown | undefined;
|
|
463
550
|
responseHeaders?: Headers | undefined;
|
|
464
|
-
getPlugin: <ID extends
|
|
551
|
+
getPlugin: <ID extends better_auth298.BetterAuthPluginRegistryIdentifier | better_auth298.LiteralString, PluginOptions extends never>(pluginId: ID) => (ID extends keyof better_auth298.BetterAuthPluginRegistry<unknown, unknown> ? better_auth298.BetterAuthPluginRegistry<better_auth298.BetterAuthOptions, PluginOptions>[ID] extends {
|
|
465
552
|
creator: infer C;
|
|
466
553
|
} ? C extends ((...args: any[]) => infer R) ? R : never : never : BetterAuthPlugin) | null;
|
|
467
|
-
hasPlugin: <ID extends
|
|
554
|
+
hasPlugin: <ID extends better_auth298.BetterAuthPluginRegistryIdentifier | better_auth298.LiteralString>(pluginId: ID) => ID extends never ? true : boolean;
|
|
468
555
|
appName: string;
|
|
469
556
|
baseURL: string;
|
|
470
557
|
version: string;
|
|
471
|
-
options:
|
|
558
|
+
options: better_auth298.BetterAuthOptions;
|
|
472
559
|
trustedOrigins: string[];
|
|
473
560
|
trustedProviders: string[];
|
|
474
561
|
isTrustedOrigin: (url: string, settings?: {
|
|
@@ -541,18 +628,18 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
541
628
|
image?: string | null | undefined;
|
|
542
629
|
} & Record<string, any>;
|
|
543
630
|
} | null) => void;
|
|
544
|
-
socialProviders:
|
|
545
|
-
authCookies:
|
|
546
|
-
logger: ReturnType<(options?:
|
|
631
|
+
socialProviders: better_auth298.OAuthProvider[];
|
|
632
|
+
authCookies: better_auth298.BetterAuthCookies;
|
|
633
|
+
logger: ReturnType<(options?: better_auth298.Logger | undefined) => better_auth298.InternalLogger>;
|
|
547
634
|
rateLimit: {
|
|
548
635
|
enabled: boolean;
|
|
549
636
|
window: number;
|
|
550
637
|
max: number;
|
|
551
638
|
storage: "memory" | "database" | "secondary-storage";
|
|
552
|
-
} & Omit<
|
|
553
|
-
adapter:
|
|
554
|
-
internalAdapter:
|
|
555
|
-
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<
|
|
639
|
+
} & Omit<better_auth298.BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
640
|
+
adapter: better_auth298.DBAdapter<better_auth298.BetterAuthOptions>;
|
|
641
|
+
internalAdapter: better_auth298.InternalAdapter<better_auth298.BetterAuthOptions>;
|
|
642
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<better_auth298.CookieOptions> | undefined) => better_auth298.BetterAuthCookie;
|
|
556
643
|
secret: string;
|
|
557
644
|
sessionConfig: {
|
|
558
645
|
updateAge: number;
|
|
@@ -564,10 +651,10 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
564
651
|
};
|
|
565
652
|
};
|
|
566
653
|
generateId: (options: {
|
|
567
|
-
model:
|
|
654
|
+
model: better_auth298.ModelNames;
|
|
568
655
|
size?: number | undefined;
|
|
569
656
|
}) => string | false;
|
|
570
|
-
secondaryStorage:
|
|
657
|
+
secondaryStorage: better_auth298.SecondaryStorage | undefined;
|
|
571
658
|
password: {
|
|
572
659
|
hash: (password: string) => Promise<string>;
|
|
573
660
|
verify: (data: {
|
|
@@ -578,9 +665,9 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
578
665
|
minPasswordLength: number;
|
|
579
666
|
maxPasswordLength: number;
|
|
580
667
|
};
|
|
581
|
-
checkPassword: (userId: string, ctx:
|
|
668
|
+
checkPassword: (userId: string, ctx: better_auth298.GenericEndpointContext<better_auth298.BetterAuthOptions>) => Promise<boolean>;
|
|
582
669
|
};
|
|
583
|
-
tables:
|
|
670
|
+
tables: better_auth298.BetterAuthDBSchema;
|
|
584
671
|
runMigrations: () => Promise<void>;
|
|
585
672
|
publishTelemetry: (event: {
|
|
586
673
|
type: string;
|
|
@@ -590,22 +677,48 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
590
677
|
skipOriginCheck: boolean | string[];
|
|
591
678
|
skipCSRFCheck: boolean;
|
|
592
679
|
runInBackground: (promise: Promise<unknown>) => void;
|
|
593
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> | void) =>
|
|
680
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => better_auth298.Awaitable<unknown>;
|
|
594
681
|
};
|
|
595
|
-
redirect: (url: string) =>
|
|
596
|
-
|
|
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") | better_auth298.Status;
|
|
684
|
+
body: ({
|
|
685
|
+
message?: string;
|
|
686
|
+
code?: string;
|
|
687
|
+
cause?: unknown;
|
|
688
|
+
} & Record<string, any>) | undefined;
|
|
689
|
+
headers: HeadersInit;
|
|
690
|
+
statusCode: number;
|
|
691
|
+
name: string;
|
|
692
|
+
message: string;
|
|
693
|
+
stack?: string;
|
|
694
|
+
cause?: unknown;
|
|
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") | better_auth298.Status, body?: {
|
|
597
697
|
message?: string;
|
|
598
698
|
code?: string;
|
|
599
|
-
} & Record<string, any>, headers?: HeadersInit) =>
|
|
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") | better_auth298.Status;
|
|
701
|
+
body: ({
|
|
702
|
+
message?: string;
|
|
703
|
+
code?: string;
|
|
704
|
+
cause?: unknown;
|
|
705
|
+
} & Record<string, any>) | undefined;
|
|
706
|
+
headers: HeadersInit;
|
|
707
|
+
statusCode: number;
|
|
708
|
+
name: string;
|
|
709
|
+
message: string;
|
|
710
|
+
stack?: string;
|
|
711
|
+
cause?: unknown;
|
|
712
|
+
};
|
|
600
713
|
};
|
|
601
714
|
} | undefined>;
|
|
602
715
|
} | {
|
|
603
716
|
matcher: Matcher;
|
|
604
|
-
handler: (inputContext:
|
|
717
|
+
handler: (inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<void>;
|
|
605
718
|
})[];
|
|
606
719
|
after: {
|
|
607
|
-
matcher: (ctx:
|
|
608
|
-
handler: (inputContext:
|
|
720
|
+
matcher: (ctx: better_auth298.HookEndpointContext) => boolean;
|
|
721
|
+
handler: (inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<void>;
|
|
609
722
|
}[];
|
|
610
723
|
};
|
|
611
724
|
};
|
|
@@ -752,6 +865,17 @@ declare function createSMSSender(config?: SMSConfig): {
|
|
|
752
865
|
*/
|
|
753
866
|
declare function sendSMS(options: SendSMSOptions, config?: SMSConfig): Promise<SendSMSResult>;
|
|
754
867
|
//#endregion
|
|
868
|
+
//#region src/routes/directory-sync/types.d.ts
|
|
869
|
+
type SCIMPlugin = ReturnType<typeof scim>;
|
|
870
|
+
interface DirectorySyncConnection {
|
|
871
|
+
organizationId: string;
|
|
872
|
+
providerId: string;
|
|
873
|
+
scimEndpoint: string;
|
|
874
|
+
}
|
|
875
|
+
interface DirectorySyncConnectionWithToken extends DirectorySyncConnection {
|
|
876
|
+
scimToken: string;
|
|
877
|
+
}
|
|
878
|
+
//#endregion
|
|
755
879
|
//#region src/routes/events.d.ts
|
|
756
880
|
/**
|
|
757
881
|
* All available event types that can be returned in audit logs
|
|
@@ -849,7 +973,7 @@ interface UserEventsResponse {
|
|
|
849
973
|
//#region src/index.d.ts
|
|
850
974
|
declare const dash: (options?: DashOptions) => {
|
|
851
975
|
id: "dash";
|
|
852
|
-
init(ctx:
|
|
976
|
+
init(ctx: better_auth298.AuthContext): {
|
|
853
977
|
options: {
|
|
854
978
|
databaseHooks: {
|
|
855
979
|
user: {
|
|
@@ -862,7 +986,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
862
986
|
emailVerified: boolean;
|
|
863
987
|
name: string;
|
|
864
988
|
image?: string | null | undefined;
|
|
865
|
-
} & Record<string, unknown>, _ctx:
|
|
989
|
+
} & Record<string, unknown>, _ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
866
990
|
};
|
|
867
991
|
update: {
|
|
868
992
|
after(user: {
|
|
@@ -873,7 +997,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
873
997
|
emailVerified: boolean;
|
|
874
998
|
name: string;
|
|
875
999
|
image?: string | null | undefined;
|
|
876
|
-
} & Record<string, unknown>, _ctx:
|
|
1000
|
+
} & Record<string, unknown>, _ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
877
1001
|
};
|
|
878
1002
|
delete: {
|
|
879
1003
|
after(user: {
|
|
@@ -884,7 +1008,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
884
1008
|
emailVerified: boolean;
|
|
885
1009
|
name: string;
|
|
886
1010
|
image?: string | null | undefined;
|
|
887
|
-
} & Record<string, unknown>, _ctx:
|
|
1011
|
+
} & Record<string, unknown>, _ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
888
1012
|
};
|
|
889
1013
|
};
|
|
890
1014
|
session: {
|
|
@@ -898,7 +1022,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
898
1022
|
token: string;
|
|
899
1023
|
ipAddress?: string | null | undefined;
|
|
900
1024
|
userAgent?: string | null | undefined;
|
|
901
|
-
} & Record<string, unknown>, _ctx:
|
|
1025
|
+
} & Record<string, unknown>, _ctx: better_auth298.GenericEndpointContext | null): Promise<{
|
|
902
1026
|
data: {
|
|
903
1027
|
loginMethod: string | null | undefined;
|
|
904
1028
|
};
|
|
@@ -912,7 +1036,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
912
1036
|
token: string;
|
|
913
1037
|
ipAddress?: string | null | undefined;
|
|
914
1038
|
userAgent?: string | null | undefined;
|
|
915
|
-
} & Record<string, unknown>, _ctx:
|
|
1039
|
+
} & Record<string, unknown>, _ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
916
1040
|
};
|
|
917
1041
|
delete: {
|
|
918
1042
|
after(session: {
|
|
@@ -924,7 +1048,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
924
1048
|
token: string;
|
|
925
1049
|
ipAddress?: string | null | undefined;
|
|
926
1050
|
userAgent?: string | null | undefined;
|
|
927
|
-
} & Record<string, unknown>, _ctx:
|
|
1051
|
+
} & Record<string, unknown>, _ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
928
1052
|
};
|
|
929
1053
|
};
|
|
930
1054
|
account: {
|
|
@@ -943,7 +1067,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
943
1067
|
refreshTokenExpiresAt?: Date | null | undefined;
|
|
944
1068
|
scope?: string | null | undefined;
|
|
945
1069
|
password?: string | null | undefined;
|
|
946
|
-
}, _ctx:
|
|
1070
|
+
}, _ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
947
1071
|
};
|
|
948
1072
|
update: {
|
|
949
1073
|
after(account: {
|
|
@@ -960,7 +1084,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
960
1084
|
refreshTokenExpiresAt?: Date | null | undefined;
|
|
961
1085
|
scope?: string | null | undefined;
|
|
962
1086
|
password?: string | null | undefined;
|
|
963
|
-
} & Record<string, unknown>, _ctx:
|
|
1087
|
+
} & Record<string, unknown>, _ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
964
1088
|
};
|
|
965
1089
|
delete: {
|
|
966
1090
|
after(account: {
|
|
@@ -977,7 +1101,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
977
1101
|
refreshTokenExpiresAt?: Date | null | undefined;
|
|
978
1102
|
scope?: string | null | undefined;
|
|
979
1103
|
password?: string | null | undefined;
|
|
980
|
-
} & Record<string, unknown>, _ctx:
|
|
1104
|
+
} & Record<string, unknown>, _ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
981
1105
|
};
|
|
982
1106
|
};
|
|
983
1107
|
verification: {
|
|
@@ -989,7 +1113,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
989
1113
|
value: string;
|
|
990
1114
|
expiresAt: Date;
|
|
991
1115
|
identifier: string;
|
|
992
|
-
} & Record<string, unknown>, _ctx:
|
|
1116
|
+
} & Record<string, unknown>, _ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
993
1117
|
};
|
|
994
1118
|
delete: {
|
|
995
1119
|
after(verification: {
|
|
@@ -999,7 +1123,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
999
1123
|
value: string;
|
|
1000
1124
|
expiresAt: Date;
|
|
1001
1125
|
identifier: string;
|
|
1002
|
-
} & Record<string, unknown>, ctx:
|
|
1126
|
+
} & Record<string, unknown>, ctx: better_auth298.GenericEndpointContext | null): Promise<void>;
|
|
1003
1127
|
};
|
|
1004
1128
|
};
|
|
1005
1129
|
};
|
|
@@ -1010,18 +1134,18 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1010
1134
|
};
|
|
1011
1135
|
hooks: {
|
|
1012
1136
|
before: {
|
|
1013
|
-
matcher: (ctx:
|
|
1014
|
-
handler: (inputContext:
|
|
1137
|
+
matcher: (ctx: better_auth298.HookEndpointContext) => boolean;
|
|
1138
|
+
handler: (inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<void>;
|
|
1015
1139
|
}[];
|
|
1016
1140
|
after: {
|
|
1017
|
-
matcher: (ctx:
|
|
1018
|
-
handler: (inputContext:
|
|
1141
|
+
matcher: (ctx: better_auth298.HookEndpointContext) => boolean;
|
|
1142
|
+
handler: (inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<void>;
|
|
1019
1143
|
}[];
|
|
1020
1144
|
};
|
|
1021
1145
|
endpoints: {
|
|
1022
|
-
getDashConfig:
|
|
1146
|
+
getDashConfig: better_auth298.StrictEndpoint<"/dash/config", {
|
|
1023
1147
|
method: "GET";
|
|
1024
|
-
use: ((inputContext:
|
|
1148
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1025
1149
|
payload: Record<string, unknown>;
|
|
1026
1150
|
}>)[];
|
|
1027
1151
|
}, {
|
|
@@ -1034,13 +1158,13 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1034
1158
|
maxPasswordLength?: number;
|
|
1035
1159
|
minPasswordLength?: number;
|
|
1036
1160
|
sendResetPassword?: (data: {
|
|
1037
|
-
user:
|
|
1161
|
+
user: better_auth298.User;
|
|
1038
1162
|
url: string;
|
|
1039
1163
|
token: string;
|
|
1040
1164
|
}, request?: Request) => Promise<void>;
|
|
1041
1165
|
resetPasswordTokenExpiresIn?: number;
|
|
1042
1166
|
onPasswordReset?: (data: {
|
|
1043
|
-
user:
|
|
1167
|
+
user: better_auth298.User;
|
|
1044
1168
|
}, request?: Request) => Promise<void>;
|
|
1045
1169
|
password?: {
|
|
1046
1170
|
hash?: (password: string) => Promise<string>;
|
|
@@ -1051,17 +1175,20 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1051
1175
|
};
|
|
1052
1176
|
autoSignIn?: boolean;
|
|
1053
1177
|
revokeSessionsOnPasswordReset?: boolean;
|
|
1178
|
+
onExistingUserSignUp?: (data: {
|
|
1179
|
+
user: better_auth298.User;
|
|
1180
|
+
}, request?: Request) => Promise<void>;
|
|
1054
1181
|
} | undefined;
|
|
1055
1182
|
plugins: {
|
|
1056
|
-
id:
|
|
1057
|
-
schema:
|
|
1058
|
-
options:
|
|
1183
|
+
id: better_auth298.LiteralString;
|
|
1184
|
+
schema: better_auth298.BetterAuthPluginDBSchema | undefined;
|
|
1185
|
+
options: unknown;
|
|
1059
1186
|
}[] | undefined;
|
|
1060
1187
|
organization: {
|
|
1061
1188
|
sendInvitationEmailEnabled: boolean;
|
|
1062
1189
|
additionalFields: {
|
|
1063
1190
|
name: string;
|
|
1064
|
-
type:
|
|
1191
|
+
type: better_auth298.DBFieldType;
|
|
1065
1192
|
required: boolean | undefined;
|
|
1066
1193
|
input: boolean | undefined;
|
|
1067
1194
|
unique: boolean | undefined;
|
|
@@ -1078,7 +1205,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1078
1205
|
user: {
|
|
1079
1206
|
fields: {
|
|
1080
1207
|
name: string;
|
|
1081
|
-
type:
|
|
1208
|
+
type: better_auth298.DBFieldType | undefined;
|
|
1082
1209
|
required: boolean | undefined;
|
|
1083
1210
|
input: boolean | undefined;
|
|
1084
1211
|
unique: boolean | undefined;
|
|
@@ -1093,7 +1220,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1093
1220
|
}[];
|
|
1094
1221
|
additionalFields: {
|
|
1095
1222
|
name: string;
|
|
1096
|
-
type:
|
|
1223
|
+
type: better_auth298.DBFieldType | undefined;
|
|
1097
1224
|
required: boolean | undefined;
|
|
1098
1225
|
input: boolean | undefined;
|
|
1099
1226
|
unique: boolean | undefined;
|
|
@@ -1107,9 +1234,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1107
1234
|
bigInt: boolean | undefined;
|
|
1108
1235
|
}[];
|
|
1109
1236
|
deleteUserEnabled: boolean;
|
|
1110
|
-
modelName:
|
|
1237
|
+
modelName: better_auth298.LiteralString | "user" | undefined;
|
|
1111
1238
|
};
|
|
1112
|
-
baseURL:
|
|
1239
|
+
baseURL: better_auth298.BaseURLConfig | undefined;
|
|
1113
1240
|
basePath: string;
|
|
1114
1241
|
emailVerification: {
|
|
1115
1242
|
sendVerificationEmailEnabled: boolean;
|
|
@@ -1119,7 +1246,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1119
1246
|
cookies: {
|
|
1120
1247
|
key: string;
|
|
1121
1248
|
name: string | undefined;
|
|
1122
|
-
sameSite:
|
|
1249
|
+
sameSite: "none" | "strict" | "Strict" | "Lax" | "None" | "lax" | undefined;
|
|
1123
1250
|
}[] | null;
|
|
1124
1251
|
hasIpAddressHeaders: boolean;
|
|
1125
1252
|
ipAddressHeaders: string[] | null;
|
|
@@ -1149,7 +1276,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1149
1276
|
defaultCookieAttributes: {
|
|
1150
1277
|
sameSite: "none" | "strict" | "Strict" | "Lax" | "None" | "lax" | null;
|
|
1151
1278
|
httpOnly: boolean | null;
|
|
1152
|
-
prefix:
|
|
1279
|
+
prefix: better_auth298.CookiePrefixOptions | null;
|
|
1153
1280
|
partitioned: boolean | null;
|
|
1154
1281
|
secure: boolean | null;
|
|
1155
1282
|
} | null;
|
|
@@ -1157,9 +1284,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1157
1284
|
hasJoinsEnabled: boolean;
|
|
1158
1285
|
};
|
|
1159
1286
|
}>;
|
|
1160
|
-
getDashUsers:
|
|
1287
|
+
getDashUsers: better_auth298.StrictEndpoint<"/dash/list-users", {
|
|
1161
1288
|
method: "GET";
|
|
1162
|
-
use: ((inputContext:
|
|
1289
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1163
1290
|
payload: Record<string, unknown>;
|
|
1164
1291
|
}>)[];
|
|
1165
1292
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -1170,8 +1297,8 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1170
1297
|
asc: "asc";
|
|
1171
1298
|
desc: "desc";
|
|
1172
1299
|
}>>;
|
|
1173
|
-
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<
|
|
1174
|
-
countWhere: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<
|
|
1300
|
+
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth298.Where[], string>>>;
|
|
1301
|
+
countWhere: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth298.Where[], string>>>;
|
|
1175
1302
|
}, zod_v4_core0.$strip>>;
|
|
1176
1303
|
}, {
|
|
1177
1304
|
users: {
|
|
@@ -1192,17 +1319,34 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1192
1319
|
onlineUsers: number;
|
|
1193
1320
|
activityTrackingEnabled: boolean;
|
|
1194
1321
|
}>;
|
|
1195
|
-
|
|
1322
|
+
exportDashUsers: better_auth298.StrictEndpoint<"/dash/export-users", {
|
|
1196
1323
|
method: "GET";
|
|
1197
|
-
use: ((inputContext:
|
|
1324
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1325
|
+
payload: Record<string, unknown>;
|
|
1326
|
+
}>)[];
|
|
1327
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
1328
|
+
limit: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodNumber, zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<number, string>>]>>;
|
|
1329
|
+
offset: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodNumber, zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<number, string>>]>>;
|
|
1330
|
+
sortBy: zod0.ZodOptional<zod0.ZodString>;
|
|
1331
|
+
sortOrder: zod0.ZodOptional<zod0.ZodEnum<{
|
|
1332
|
+
asc: "asc";
|
|
1333
|
+
desc: "desc";
|
|
1334
|
+
}>>;
|
|
1335
|
+
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth298.Where[], string>>>;
|
|
1336
|
+
countWhere: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth298.Where[], string>>>;
|
|
1337
|
+
}, zod_v4_core0.$strip>>;
|
|
1338
|
+
}, Response>;
|
|
1339
|
+
getOnlineUsersCount: better_auth298.StrictEndpoint<"/dash/online-users-count", {
|
|
1340
|
+
method: "GET";
|
|
1341
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1198
1342
|
payload: Record<string, unknown>;
|
|
1199
1343
|
}>)[];
|
|
1200
1344
|
}, {
|
|
1201
1345
|
onlineUsers: number;
|
|
1202
1346
|
}>;
|
|
1203
|
-
createDashUser:
|
|
1347
|
+
createDashUser: better_auth298.StrictEndpoint<"/dash/create-user", {
|
|
1204
1348
|
method: "POST";
|
|
1205
|
-
use: ((inputContext:
|
|
1349
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1206
1350
|
payload: {
|
|
1207
1351
|
organizationId?: string | undefined;
|
|
1208
1352
|
organizationRole?: string | undefined;
|
|
@@ -1229,17 +1373,29 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1229
1373
|
name: string;
|
|
1230
1374
|
image?: string | null | undefined;
|
|
1231
1375
|
}>;
|
|
1232
|
-
deleteDashUser:
|
|
1376
|
+
deleteDashUser: better_auth298.StrictEndpoint<"/dash/delete-user", {
|
|
1233
1377
|
method: "POST";
|
|
1234
|
-
use: ((inputContext:
|
|
1378
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1235
1379
|
payload: {
|
|
1236
1380
|
userId: string;
|
|
1237
1381
|
};
|
|
1238
1382
|
}>)[];
|
|
1239
1383
|
}, void>;
|
|
1240
|
-
|
|
1384
|
+
deleteManyDashUsers: better_auth298.StrictEndpoint<"/dash/delete-many-users", {
|
|
1385
|
+
method: "POST";
|
|
1386
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1387
|
+
payload: {
|
|
1388
|
+
userIds: string[];
|
|
1389
|
+
};
|
|
1390
|
+
}>)[];
|
|
1391
|
+
}, {
|
|
1392
|
+
success: boolean;
|
|
1393
|
+
skippedUserIds: string[];
|
|
1394
|
+
deletedUserIds: string[];
|
|
1395
|
+
}>;
|
|
1396
|
+
listDashOrganizations: better_auth298.StrictEndpoint<"/dash/list-organizations", {
|
|
1241
1397
|
method: "GET";
|
|
1242
|
-
use: ((inputContext:
|
|
1398
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1243
1399
|
payload: Record<string, unknown>;
|
|
1244
1400
|
}>)[];
|
|
1245
1401
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -1255,6 +1411,13 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1255
1411
|
asc: "asc";
|
|
1256
1412
|
desc: "desc";
|
|
1257
1413
|
}>>;
|
|
1414
|
+
filterMembers: zod0.ZodOptional<zod0.ZodEnum<{
|
|
1415
|
+
abandoned: "abandoned";
|
|
1416
|
+
eq1: "eq1";
|
|
1417
|
+
gt1: "gt1";
|
|
1418
|
+
gt5: "gt5";
|
|
1419
|
+
gt10: "gt10";
|
|
1420
|
+
}>>;
|
|
1258
1421
|
search: zod0.ZodOptional<zod0.ZodString>;
|
|
1259
1422
|
startDate: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodDate, zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<Date, string>>]>>;
|
|
1260
1423
|
endDate: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodDate, zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<Date, string>>]>>;
|
|
@@ -1274,15 +1437,30 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1274
1437
|
createdAt: Date;
|
|
1275
1438
|
logo?: string | null | undefined;
|
|
1276
1439
|
metadata?: any;
|
|
1277
|
-
member: better_auth_plugins0.Member[];
|
|
1278
1440
|
}[];
|
|
1279
1441
|
total: number;
|
|
1280
1442
|
offset: number;
|
|
1281
1443
|
limit: number;
|
|
1282
1444
|
}>;
|
|
1283
|
-
|
|
1445
|
+
exportDashOrganizations: better_auth298.StrictEndpoint<"/dash/export-organizations", {
|
|
1446
|
+
method: "GET";
|
|
1447
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1448
|
+
payload: Record<string, unknown>;
|
|
1449
|
+
}>)[];
|
|
1450
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
1451
|
+
limit: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodNumber, zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<number, string>>]>>;
|
|
1452
|
+
offset: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodNumber, zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<number, string>>]>>;
|
|
1453
|
+
sortBy: zod0.ZodOptional<zod0.ZodString>;
|
|
1454
|
+
sortOrder: zod0.ZodOptional<zod0.ZodEnum<{
|
|
1455
|
+
asc: "asc";
|
|
1456
|
+
desc: "desc";
|
|
1457
|
+
}>>;
|
|
1458
|
+
where: zod0.ZodOptional<zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<better_auth298.Where[], string>>>;
|
|
1459
|
+
}, zod_v4_core0.$strip>>;
|
|
1460
|
+
}, Response>;
|
|
1461
|
+
getDashOrganization: better_auth298.StrictEndpoint<"/dash/organization/:id", {
|
|
1284
1462
|
method: "GET";
|
|
1285
|
-
use: ((inputContext:
|
|
1463
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1286
1464
|
payload: Record<string, unknown>;
|
|
1287
1465
|
}>)[];
|
|
1288
1466
|
}, {
|
|
@@ -1295,9 +1473,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1295
1473
|
} & {
|
|
1296
1474
|
memberCount: number;
|
|
1297
1475
|
}>;
|
|
1298
|
-
listDashOrganizationMembers:
|
|
1476
|
+
listDashOrganizationMembers: better_auth298.StrictEndpoint<"/dash/organization/:id/members", {
|
|
1299
1477
|
method: "GET";
|
|
1300
|
-
use: ((inputContext:
|
|
1478
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1301
1479
|
payload: Record<string, unknown>;
|
|
1302
1480
|
}>)[];
|
|
1303
1481
|
}, {
|
|
@@ -1319,9 +1497,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1319
1497
|
role: string;
|
|
1320
1498
|
createdAt: Date;
|
|
1321
1499
|
}[]>;
|
|
1322
|
-
listDashOrganizationInvitations:
|
|
1500
|
+
listDashOrganizationInvitations: better_auth298.StrictEndpoint<"/dash/organization/:id/invitations", {
|
|
1323
1501
|
method: "GET";
|
|
1324
|
-
use: ((inputContext:
|
|
1502
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1325
1503
|
payload: Record<string, unknown>;
|
|
1326
1504
|
}>)[];
|
|
1327
1505
|
}, {
|
|
@@ -1341,15 +1519,15 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1341
1519
|
createdAt: Date;
|
|
1342
1520
|
teamId?: string | null | undefined;
|
|
1343
1521
|
}[]>;
|
|
1344
|
-
listDashOrganizationTeams:
|
|
1522
|
+
listDashOrganizationTeams: better_auth298.StrictEndpoint<"/dash/organization/:id/teams", {
|
|
1345
1523
|
method: "GET";
|
|
1346
|
-
use: ((inputContext:
|
|
1524
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1347
1525
|
payload: Record<string, unknown>;
|
|
1348
1526
|
}>)[];
|
|
1349
1527
|
}, any[]>;
|
|
1350
|
-
listDashOrganizationSsoProviders:
|
|
1528
|
+
listDashOrganizationSsoProviders: better_auth298.StrictEndpoint<"/dash/organization/:id/sso-providers", {
|
|
1351
1529
|
method: "GET";
|
|
1352
|
-
use: ((inputContext:
|
|
1530
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1353
1531
|
payload: {
|
|
1354
1532
|
organizationId: string;
|
|
1355
1533
|
};
|
|
@@ -1366,9 +1544,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1366
1544
|
createdAt: Date;
|
|
1367
1545
|
updatedAt: Date;
|
|
1368
1546
|
}[]>;
|
|
1369
|
-
createDashSsoProvider:
|
|
1547
|
+
createDashSsoProvider: better_auth298.StrictEndpoint<"/dash/organization/:id/sso-provider/create", {
|
|
1370
1548
|
method: "POST";
|
|
1371
|
-
use: ((inputContext:
|
|
1549
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1372
1550
|
payload: {
|
|
1373
1551
|
organizationId: string;
|
|
1374
1552
|
};
|
|
@@ -1417,18 +1595,18 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1417
1595
|
}, {
|
|
1418
1596
|
success: boolean;
|
|
1419
1597
|
provider: {
|
|
1420
|
-
id:
|
|
1421
|
-
providerId:
|
|
1422
|
-
domain:
|
|
1598
|
+
id: any;
|
|
1599
|
+
providerId: any;
|
|
1600
|
+
domain: any;
|
|
1423
1601
|
};
|
|
1424
1602
|
domainVerification: {
|
|
1425
1603
|
txtRecordName: string;
|
|
1426
|
-
verificationToken:
|
|
1604
|
+
verificationToken: any;
|
|
1427
1605
|
};
|
|
1428
1606
|
}>;
|
|
1429
|
-
updateDashSsoProvider:
|
|
1607
|
+
updateDashSsoProvider: better_auth298.StrictEndpoint<"/dash/organization/:id/sso-provider/update", {
|
|
1430
1608
|
method: "POST";
|
|
1431
|
-
use: ((inputContext:
|
|
1609
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1432
1610
|
payload: {
|
|
1433
1611
|
organizationId: string;
|
|
1434
1612
|
};
|
|
@@ -1476,14 +1654,14 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1476
1654
|
}, {
|
|
1477
1655
|
success: boolean;
|
|
1478
1656
|
provider: {
|
|
1479
|
-
id:
|
|
1480
|
-
providerId:
|
|
1481
|
-
domain:
|
|
1657
|
+
id: string;
|
|
1658
|
+
providerId: any;
|
|
1659
|
+
domain: any;
|
|
1482
1660
|
};
|
|
1483
1661
|
}>;
|
|
1484
|
-
requestDashSsoVerificationToken:
|
|
1662
|
+
requestDashSsoVerificationToken: better_auth298.StrictEndpoint<"/dash/organization/:id/sso-provider/request-verification-token", {
|
|
1485
1663
|
method: "POST";
|
|
1486
|
-
use: ((inputContext:
|
|
1664
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1487
1665
|
payload: {
|
|
1488
1666
|
organizationId: string;
|
|
1489
1667
|
};
|
|
@@ -1495,12 +1673,12 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1495
1673
|
success: boolean;
|
|
1496
1674
|
providerId: string;
|
|
1497
1675
|
domain: string;
|
|
1498
|
-
verificationToken:
|
|
1676
|
+
verificationToken: any;
|
|
1499
1677
|
txtRecordName: string;
|
|
1500
1678
|
}>;
|
|
1501
|
-
verifyDashSsoProviderDomain:
|
|
1679
|
+
verifyDashSsoProviderDomain: better_auth298.StrictEndpoint<"/dash/organization/:id/sso-provider/verify-domain", {
|
|
1502
1680
|
method: "POST";
|
|
1503
|
-
use: ((inputContext:
|
|
1681
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1504
1682
|
payload: {
|
|
1505
1683
|
organizationId: string;
|
|
1506
1684
|
};
|
|
@@ -1512,9 +1690,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1512
1690
|
verified: boolean;
|
|
1513
1691
|
message: string;
|
|
1514
1692
|
}>;
|
|
1515
|
-
deleteDashSsoProvider:
|
|
1693
|
+
deleteDashSsoProvider: better_auth298.StrictEndpoint<"/dash/organization/:id/sso-provider/delete", {
|
|
1516
1694
|
method: "POST";
|
|
1517
|
-
use: ((inputContext:
|
|
1695
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1518
1696
|
payload: {
|
|
1519
1697
|
organizationId: string;
|
|
1520
1698
|
};
|
|
@@ -1526,9 +1704,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1526
1704
|
success: boolean;
|
|
1527
1705
|
message: string;
|
|
1528
1706
|
}>;
|
|
1529
|
-
markDashSsoProviderDomainVerified:
|
|
1707
|
+
markDashSsoProviderDomainVerified: better_auth298.StrictEndpoint<"/dash/organization/:id/sso-provider/mark-domain-verified", {
|
|
1530
1708
|
method: "POST";
|
|
1531
|
-
use: ((inputContext:
|
|
1709
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1532
1710
|
payload: {
|
|
1533
1711
|
organizationId: string;
|
|
1534
1712
|
};
|
|
@@ -1542,9 +1720,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1542
1720
|
domainVerified: boolean;
|
|
1543
1721
|
message: string;
|
|
1544
1722
|
}>;
|
|
1545
|
-
listDashTeamMembers:
|
|
1723
|
+
listDashTeamMembers: better_auth298.StrictEndpoint<"/dash/organization/:orgId/teams/:teamId/members", {
|
|
1546
1724
|
method: "GET";
|
|
1547
|
-
use: ((inputContext:
|
|
1725
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1548
1726
|
payload: Record<string, unknown>;
|
|
1549
1727
|
}>)[];
|
|
1550
1728
|
}, {
|
|
@@ -1559,9 +1737,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1559
1737
|
userId: string;
|
|
1560
1738
|
createdAt: Date;
|
|
1561
1739
|
}[]>;
|
|
1562
|
-
createDashOrganization:
|
|
1740
|
+
createDashOrganization: better_auth298.StrictEndpoint<"/dash/organization/create", {
|
|
1563
1741
|
method: "POST";
|
|
1564
|
-
use: ((inputContext:
|
|
1742
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1565
1743
|
payload: {
|
|
1566
1744
|
userId: string;
|
|
1567
1745
|
skipDefaultTeam: boolean;
|
|
@@ -1588,9 +1766,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1588
1766
|
logo?: string | null | undefined;
|
|
1589
1767
|
metadata?: any;
|
|
1590
1768
|
}>;
|
|
1591
|
-
deleteDashOrganization:
|
|
1769
|
+
deleteDashOrganization: better_auth298.StrictEndpoint<"/dash/organization/delete", {
|
|
1592
1770
|
method: "POST";
|
|
1593
|
-
use: ((inputContext:
|
|
1771
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1594
1772
|
payload: {
|
|
1595
1773
|
organizationId: string;
|
|
1596
1774
|
};
|
|
@@ -1601,17 +1779,29 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1601
1779
|
}, {
|
|
1602
1780
|
success: boolean;
|
|
1603
1781
|
}>;
|
|
1604
|
-
|
|
1782
|
+
deleteManyDashOrganizations: better_auth298.StrictEndpoint<"/dash/organization/delete-many", {
|
|
1783
|
+
method: "POST";
|
|
1784
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1785
|
+
payload: {
|
|
1786
|
+
organizationIds: string[];
|
|
1787
|
+
};
|
|
1788
|
+
}>)[];
|
|
1789
|
+
}, {
|
|
1790
|
+
success: boolean;
|
|
1791
|
+
deletedOrgIds: string[];
|
|
1792
|
+
skippedOrgIds: string[];
|
|
1793
|
+
}>;
|
|
1794
|
+
getDashOrganizationOptions: better_auth298.StrictEndpoint<"/dash/organization/options", {
|
|
1605
1795
|
method: "GET";
|
|
1606
|
-
use: ((inputContext:
|
|
1796
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1607
1797
|
payload: Record<string, unknown>;
|
|
1608
1798
|
}>)[];
|
|
1609
1799
|
}, {
|
|
1610
|
-
teamsEnabled:
|
|
1800
|
+
teamsEnabled: boolean | undefined;
|
|
1611
1801
|
}>;
|
|
1612
|
-
deleteDashSessions:
|
|
1802
|
+
deleteDashSessions: better_auth298.StrictEndpoint<"/dash/delete-sessions", {
|
|
1613
1803
|
method: "POST";
|
|
1614
|
-
use: ((inputContext:
|
|
1804
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1615
1805
|
payload: {
|
|
1616
1806
|
userId: string;
|
|
1617
1807
|
};
|
|
@@ -1619,14 +1809,31 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1619
1809
|
}, {
|
|
1620
1810
|
message: string;
|
|
1621
1811
|
}>;
|
|
1622
|
-
getDashUser:
|
|
1812
|
+
getDashUser: better_auth298.StrictEndpoint<"/dash/user", {
|
|
1623
1813
|
method: "GET";
|
|
1624
|
-
use: ((inputContext:
|
|
1814
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1625
1815
|
payload: {
|
|
1626
1816
|
userId: string;
|
|
1627
1817
|
};
|
|
1628
1818
|
}>)[];
|
|
1819
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
1820
|
+
minimal: zod0.ZodOptional<zod0.ZodUnion<[zod0.ZodBoolean, zod0.ZodPipe<zod0.ZodString, zod0.ZodTransform<boolean, string>>]>>;
|
|
1821
|
+
}, zod_v4_core0.$strip>>;
|
|
1629
1822
|
}, {
|
|
1823
|
+
lastActiveAt: any;
|
|
1824
|
+
banned: boolean;
|
|
1825
|
+
banReason: string | null;
|
|
1826
|
+
banExpires: number | null;
|
|
1827
|
+
account: never[];
|
|
1828
|
+
session: never[];
|
|
1829
|
+
id: string;
|
|
1830
|
+
createdAt: Date;
|
|
1831
|
+
updatedAt: Date;
|
|
1832
|
+
email: string;
|
|
1833
|
+
emailVerified: boolean;
|
|
1834
|
+
name: string;
|
|
1835
|
+
image?: string | null | undefined;
|
|
1836
|
+
} | {
|
|
1630
1837
|
lastActiveAt: Date | null;
|
|
1631
1838
|
banned: boolean;
|
|
1632
1839
|
banReason: string | null;
|
|
@@ -1638,12 +1845,12 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1638
1845
|
emailVerified: boolean;
|
|
1639
1846
|
name: string;
|
|
1640
1847
|
image?: string | null | undefined;
|
|
1641
|
-
account
|
|
1642
|
-
session
|
|
1848
|
+
account?: better_auth298.Account[];
|
|
1849
|
+
session?: better_auth298.Session[];
|
|
1643
1850
|
}>;
|
|
1644
|
-
getDashUserOrganizations:
|
|
1851
|
+
getDashUserOrganizations: better_auth298.StrictEndpoint<"/dash/user-organizations", {
|
|
1645
1852
|
method: "GET";
|
|
1646
|
-
use: ((inputContext:
|
|
1853
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1647
1854
|
payload: {
|
|
1648
1855
|
userId: string;
|
|
1649
1856
|
};
|
|
@@ -1665,9 +1872,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1665
1872
|
}[];
|
|
1666
1873
|
}[];
|
|
1667
1874
|
}>;
|
|
1668
|
-
updateDashUser:
|
|
1875
|
+
updateDashUser: better_auth298.StrictEndpoint<"/dash/update-user", {
|
|
1669
1876
|
method: "POST";
|
|
1670
|
-
use: ((inputContext:
|
|
1877
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1671
1878
|
payload: {
|
|
1672
1879
|
userId: string;
|
|
1673
1880
|
};
|
|
@@ -1687,9 +1894,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1687
1894
|
name: string;
|
|
1688
1895
|
image?: string | null | undefined;
|
|
1689
1896
|
} & Record<string, any>>;
|
|
1690
|
-
setDashPassword:
|
|
1897
|
+
setDashPassword: better_auth298.StrictEndpoint<"/dash/set-password", {
|
|
1691
1898
|
method: "POST";
|
|
1692
|
-
use: ((inputContext:
|
|
1899
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1693
1900
|
payload: {
|
|
1694
1901
|
userId: string;
|
|
1695
1902
|
};
|
|
@@ -1700,9 +1907,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1700
1907
|
}, {
|
|
1701
1908
|
success: boolean;
|
|
1702
1909
|
}>;
|
|
1703
|
-
unlinkDashAccount:
|
|
1910
|
+
unlinkDashAccount: better_auth298.StrictEndpoint<"/dash/unlink-account", {
|
|
1704
1911
|
method: "POST";
|
|
1705
|
-
use: ((inputContext:
|
|
1912
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1706
1913
|
payload: {
|
|
1707
1914
|
userId: string;
|
|
1708
1915
|
};
|
|
@@ -1714,9 +1921,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1714
1921
|
}, {
|
|
1715
1922
|
success: boolean;
|
|
1716
1923
|
}>;
|
|
1717
|
-
listAllDashSessions:
|
|
1924
|
+
listAllDashSessions: better_auth298.StrictEndpoint<"/dash/list-all-sessions", {
|
|
1718
1925
|
method: "GET";
|
|
1719
|
-
use: ((inputContext:
|
|
1926
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1720
1927
|
payload: Record<string, unknown>;
|
|
1721
1928
|
}>)[];
|
|
1722
1929
|
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -1742,9 +1949,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1742
1949
|
name: string;
|
|
1743
1950
|
image?: string | null | undefined;
|
|
1744
1951
|
}[]>;
|
|
1745
|
-
dashRevokeSession:
|
|
1952
|
+
dashRevokeSession: better_auth298.StrictEndpoint<"/dash/sessions/revoke", {
|
|
1746
1953
|
method: "POST";
|
|
1747
|
-
use: ((inputContext:
|
|
1954
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1748
1955
|
payload: Record<string, unknown>;
|
|
1749
1956
|
}>)[];
|
|
1750
1957
|
metadata: {
|
|
@@ -1753,9 +1960,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1753
1960
|
}, {
|
|
1754
1961
|
success: boolean;
|
|
1755
1962
|
}>;
|
|
1756
|
-
dashRevokeAllSessions:
|
|
1963
|
+
dashRevokeAllSessions: better_auth298.StrictEndpoint<"/dash/sessions/revoke-all", {
|
|
1757
1964
|
method: "POST";
|
|
1758
|
-
use: ((inputContext:
|
|
1965
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1759
1966
|
payload: Record<string, unknown>;
|
|
1760
1967
|
}>)[];
|
|
1761
1968
|
body: zod0.ZodObject<{
|
|
@@ -1764,12 +1971,23 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1764
1971
|
}, {
|
|
1765
1972
|
success: boolean;
|
|
1766
1973
|
}>;
|
|
1767
|
-
|
|
1974
|
+
dashRevokeManySessions: better_auth298.StrictEndpoint<"/dash/sessions/revoke-many", {
|
|
1975
|
+
method: "POST";
|
|
1976
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1977
|
+
payload: {
|
|
1978
|
+
userIds: string[];
|
|
1979
|
+
};
|
|
1980
|
+
}>)[];
|
|
1981
|
+
}, {
|
|
1982
|
+
success: boolean;
|
|
1983
|
+
revokedCount: number;
|
|
1984
|
+
}>;
|
|
1985
|
+
dashImpersonateUser: better_auth298.StrictEndpoint<"/dash/impersonate-user", {
|
|
1768
1986
|
method: "GET";
|
|
1769
1987
|
query: zod0.ZodObject<{
|
|
1770
1988
|
impersonation_token: zod0.ZodString;
|
|
1771
1989
|
}, zod_v4_core0.$strip>;
|
|
1772
|
-
use: ((inputContext:
|
|
1990
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1773
1991
|
payload: {
|
|
1774
1992
|
userId: string;
|
|
1775
1993
|
redirectUrl: string;
|
|
@@ -1777,9 +1995,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1777
1995
|
};
|
|
1778
1996
|
}>)[];
|
|
1779
1997
|
}, never>;
|
|
1780
|
-
updateDashOrganization:
|
|
1998
|
+
updateDashOrganization: better_auth298.StrictEndpoint<"/dash/organization/update", {
|
|
1781
1999
|
method: "POST";
|
|
1782
|
-
use: ((inputContext:
|
|
2000
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1783
2001
|
payload: {
|
|
1784
2002
|
organizationId: string;
|
|
1785
2003
|
};
|
|
@@ -1797,10 +2015,10 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1797
2015
|
createdAt: Date;
|
|
1798
2016
|
logo?: string | null | undefined;
|
|
1799
2017
|
metadata?: any;
|
|
1800
|
-
}
|
|
1801
|
-
createDashTeam:
|
|
2018
|
+
}>;
|
|
2019
|
+
createDashTeam: better_auth298.StrictEndpoint<"/dash/organization/create-team", {
|
|
1802
2020
|
method: "POST";
|
|
1803
|
-
use: ((inputContext:
|
|
2021
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1804
2022
|
payload: {
|
|
1805
2023
|
organizationId: string;
|
|
1806
2024
|
};
|
|
@@ -1815,9 +2033,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1815
2033
|
createdAt: Date;
|
|
1816
2034
|
updatedAt?: Date | undefined;
|
|
1817
2035
|
}>;
|
|
1818
|
-
updateDashTeam:
|
|
2036
|
+
updateDashTeam: better_auth298.StrictEndpoint<"/dash/organization/update-team", {
|
|
1819
2037
|
method: "POST";
|
|
1820
|
-
use: ((inputContext:
|
|
2038
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1821
2039
|
payload: {
|
|
1822
2040
|
organizationId: string;
|
|
1823
2041
|
};
|
|
@@ -1833,9 +2051,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1833
2051
|
createdAt: Date;
|
|
1834
2052
|
updatedAt?: Date | undefined;
|
|
1835
2053
|
} | null>;
|
|
1836
|
-
deleteDashTeam:
|
|
2054
|
+
deleteDashTeam: better_auth298.StrictEndpoint<"/dash/organization/delete-team", {
|
|
1837
2055
|
method: "POST";
|
|
1838
|
-
use: ((inputContext:
|
|
2056
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1839
2057
|
payload: {
|
|
1840
2058
|
organizationId: string;
|
|
1841
2059
|
};
|
|
@@ -1846,9 +2064,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1846
2064
|
}, {
|
|
1847
2065
|
success: boolean;
|
|
1848
2066
|
}>;
|
|
1849
|
-
addDashTeamMember:
|
|
2067
|
+
addDashTeamMember: better_auth298.StrictEndpoint<"/dash/organization/add-team-member", {
|
|
1850
2068
|
method: "POST";
|
|
1851
|
-
use: ((inputContext:
|
|
2069
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1852
2070
|
payload: {
|
|
1853
2071
|
organizationId: string;
|
|
1854
2072
|
};
|
|
@@ -1863,9 +2081,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1863
2081
|
userId: string;
|
|
1864
2082
|
createdAt: Date;
|
|
1865
2083
|
}>;
|
|
1866
|
-
removeDashTeamMember:
|
|
2084
|
+
removeDashTeamMember: better_auth298.StrictEndpoint<"/dash/organization/remove-team-member", {
|
|
1867
2085
|
method: "POST";
|
|
1868
|
-
use: ((inputContext:
|
|
2086
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1869
2087
|
payload: {
|
|
1870
2088
|
organizationId: string;
|
|
1871
2089
|
};
|
|
@@ -1877,9 +2095,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1877
2095
|
}, {
|
|
1878
2096
|
success: boolean;
|
|
1879
2097
|
}>;
|
|
1880
|
-
addDashMember:
|
|
2098
|
+
addDashMember: better_auth298.StrictEndpoint<"/dash/organization/add-member", {
|
|
1881
2099
|
method: "POST";
|
|
1882
|
-
use: ((inputContext:
|
|
2100
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1883
2101
|
payload: {
|
|
1884
2102
|
organizationId: string;
|
|
1885
2103
|
};
|
|
@@ -1895,9 +2113,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1895
2113
|
role: string;
|
|
1896
2114
|
createdAt: Date;
|
|
1897
2115
|
}>;
|
|
1898
|
-
removeDashMember:
|
|
2116
|
+
removeDashMember: better_auth298.StrictEndpoint<"/dash/organization/remove-member", {
|
|
1899
2117
|
method: "POST";
|
|
1900
|
-
use: ((inputContext:
|
|
2118
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1901
2119
|
payload: {
|
|
1902
2120
|
organizationId: string;
|
|
1903
2121
|
};
|
|
@@ -1908,9 +2126,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1908
2126
|
}, {
|
|
1909
2127
|
success: boolean;
|
|
1910
2128
|
}>;
|
|
1911
|
-
updateDashMemberRole:
|
|
2129
|
+
updateDashMemberRole: better_auth298.StrictEndpoint<"/dash/organization/update-member-role", {
|
|
1912
2130
|
method: "POST";
|
|
1913
|
-
use: ((inputContext:
|
|
2131
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1914
2132
|
payload: {
|
|
1915
2133
|
organizationId: string;
|
|
1916
2134
|
};
|
|
@@ -1925,24 +2143,42 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1925
2143
|
userId: string;
|
|
1926
2144
|
role: string;
|
|
1927
2145
|
createdAt: Date;
|
|
1928
|
-
}
|
|
1929
|
-
inviteDashMember:
|
|
2146
|
+
}>;
|
|
2147
|
+
inviteDashMember: better_auth298.StrictEndpoint<"/dash/organization/invite-member", {
|
|
1930
2148
|
method: "POST";
|
|
1931
2149
|
body: zod0.ZodObject<{
|
|
1932
2150
|
email: zod0.ZodString;
|
|
1933
2151
|
role: zod0.ZodString;
|
|
1934
2152
|
invitedBy: zod0.ZodString;
|
|
1935
2153
|
}, zod_v4_core0.$strip>;
|
|
1936
|
-
use: ((inputContext:
|
|
2154
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1937
2155
|
payload: {
|
|
1938
2156
|
organizationId: string;
|
|
1939
2157
|
invitedBy: string;
|
|
1940
2158
|
};
|
|
1941
2159
|
}>)[];
|
|
1942
|
-
},
|
|
1943
|
-
|
|
2160
|
+
}, {
|
|
2161
|
+
id: string;
|
|
2162
|
+
organizationId: string;
|
|
2163
|
+
email: string;
|
|
2164
|
+
role: "admin" | "member" | "owner";
|
|
2165
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
2166
|
+
inviterId: string;
|
|
2167
|
+
expiresAt: Date;
|
|
2168
|
+
createdAt: Date;
|
|
2169
|
+
} | {
|
|
2170
|
+
id: string;
|
|
2171
|
+
organizationId: string;
|
|
2172
|
+
email: string;
|
|
2173
|
+
role: "admin" | "member" | "owner";
|
|
2174
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
2175
|
+
inviterId: string;
|
|
2176
|
+
expiresAt: Date;
|
|
2177
|
+
createdAt: Date;
|
|
2178
|
+
}>;
|
|
2179
|
+
cancelDashInvitation: better_auth298.StrictEndpoint<"/dash/organization/cancel-invitation", {
|
|
1944
2180
|
method: "POST";
|
|
1945
|
-
use: ((inputContext:
|
|
2181
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1946
2182
|
payload: {
|
|
1947
2183
|
organizationId: string;
|
|
1948
2184
|
invitationId: string;
|
|
@@ -1954,9 +2190,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1954
2190
|
}, {
|
|
1955
2191
|
success: boolean;
|
|
1956
2192
|
}>;
|
|
1957
|
-
resendDashInvitation:
|
|
2193
|
+
resendDashInvitation: better_auth298.StrictEndpoint<"/dash/organization/resend-invitation", {
|
|
1958
2194
|
method: "POST";
|
|
1959
|
-
use: ((inputContext:
|
|
2195
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1960
2196
|
payload: {
|
|
1961
2197
|
organizationId: string;
|
|
1962
2198
|
invitationId: string;
|
|
@@ -1968,12 +2204,12 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1968
2204
|
}, {
|
|
1969
2205
|
success: boolean;
|
|
1970
2206
|
}>;
|
|
1971
|
-
dashCheckUserByEmail:
|
|
2207
|
+
dashCheckUserByEmail: better_auth298.StrictEndpoint<"/dash/organization/check-user-by-email", {
|
|
1972
2208
|
method: "POST";
|
|
1973
2209
|
body: zod0.ZodObject<{
|
|
1974
2210
|
email: zod0.ZodString;
|
|
1975
2211
|
}, zod_v4_core0.$strip>;
|
|
1976
|
-
use: ((inputContext:
|
|
2212
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1977
2213
|
payload: {
|
|
1978
2214
|
organizationId: string;
|
|
1979
2215
|
};
|
|
@@ -1992,9 +2228,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
1992
2228
|
};
|
|
1993
2229
|
isAlreadyMember: boolean;
|
|
1994
2230
|
}>;
|
|
1995
|
-
dashGetUserStats:
|
|
2231
|
+
dashGetUserStats: better_auth298.StrictEndpoint<"/dash/user-stats", {
|
|
1996
2232
|
method: "GET";
|
|
1997
|
-
use: ((inputContext:
|
|
2233
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
1998
2234
|
payload: Record<string, unknown>;
|
|
1999
2235
|
}>)[];
|
|
2000
2236
|
}, {
|
|
@@ -2026,9 +2262,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2026
2262
|
};
|
|
2027
2263
|
};
|
|
2028
2264
|
}>;
|
|
2029
|
-
dashGetUserGraphData:
|
|
2265
|
+
dashGetUserGraphData: better_auth298.StrictEndpoint<"/dash/user-graph-data", {
|
|
2030
2266
|
method: "GET";
|
|
2031
|
-
use: ((inputContext:
|
|
2267
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2032
2268
|
payload: Record<string, unknown>;
|
|
2033
2269
|
}>)[];
|
|
2034
2270
|
query: zod0.ZodObject<{
|
|
@@ -2048,9 +2284,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2048
2284
|
}[];
|
|
2049
2285
|
period: "daily" | "weekly" | "monthly";
|
|
2050
2286
|
}>;
|
|
2051
|
-
dashGetUserRetentionData:
|
|
2287
|
+
dashGetUserRetentionData: better_auth298.StrictEndpoint<"/dash/user-retention-data", {
|
|
2052
2288
|
method: "GET";
|
|
2053
|
-
use: ((inputContext:
|
|
2289
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2054
2290
|
payload: Record<string, unknown>;
|
|
2055
2291
|
}>)[];
|
|
2056
2292
|
query: zod0.ZodObject<{
|
|
@@ -2074,9 +2310,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2074
2310
|
}[];
|
|
2075
2311
|
period: "daily" | "weekly" | "monthly";
|
|
2076
2312
|
}>;
|
|
2077
|
-
dashGetUserMapData:
|
|
2313
|
+
dashGetUserMapData: better_auth298.StrictEndpoint<"/dash/user-map-data", {
|
|
2078
2314
|
method: "GET";
|
|
2079
|
-
use: ((inputContext:
|
|
2315
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2080
2316
|
payload: Record<string, unknown>;
|
|
2081
2317
|
}>)[];
|
|
2082
2318
|
}, {
|
|
@@ -2093,9 +2329,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2093
2329
|
}[];
|
|
2094
2330
|
total: number;
|
|
2095
2331
|
}>;
|
|
2096
|
-
dashBanUser:
|
|
2332
|
+
dashBanUser: better_auth298.StrictEndpoint<"/dash/ban-user", {
|
|
2097
2333
|
method: "POST";
|
|
2098
|
-
use: ((inputContext:
|
|
2334
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2099
2335
|
payload: {
|
|
2100
2336
|
userId: string;
|
|
2101
2337
|
};
|
|
@@ -2107,9 +2343,25 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2107
2343
|
}, {
|
|
2108
2344
|
success: boolean;
|
|
2109
2345
|
}>;
|
|
2110
|
-
|
|
2346
|
+
dashBanManyUsers: better_auth298.StrictEndpoint<"/dash/ban-many-users", {
|
|
2347
|
+
method: "POST";
|
|
2348
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2349
|
+
payload: {
|
|
2350
|
+
userIds: string[];
|
|
2351
|
+
};
|
|
2352
|
+
}>)[];
|
|
2353
|
+
body: zod0.ZodObject<{
|
|
2354
|
+
banReason: zod0.ZodOptional<zod0.ZodString>;
|
|
2355
|
+
banExpires: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2356
|
+
}, zod_v4_core0.$strip>;
|
|
2357
|
+
}, {
|
|
2358
|
+
success: boolean;
|
|
2359
|
+
bannedUserIds: string[];
|
|
2360
|
+
skippedUserIds: string[];
|
|
2361
|
+
}>;
|
|
2362
|
+
dashUnbanUser: better_auth298.StrictEndpoint<"/dash/unban-user", {
|
|
2111
2363
|
method: "POST";
|
|
2112
|
-
use: ((inputContext:
|
|
2364
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2113
2365
|
payload: {
|
|
2114
2366
|
userId: string;
|
|
2115
2367
|
};
|
|
@@ -2117,9 +2369,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2117
2369
|
}, {
|
|
2118
2370
|
success: boolean;
|
|
2119
2371
|
}>;
|
|
2120
|
-
dashSendVerificationEmail:
|
|
2372
|
+
dashSendVerificationEmail: better_auth298.StrictEndpoint<"/dash/send-verification-email", {
|
|
2121
2373
|
method: "POST";
|
|
2122
|
-
use: ((inputContext:
|
|
2374
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2123
2375
|
payload: {
|
|
2124
2376
|
userId: string;
|
|
2125
2377
|
};
|
|
@@ -2130,9 +2382,24 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2130
2382
|
}, {
|
|
2131
2383
|
success: boolean;
|
|
2132
2384
|
}>;
|
|
2133
|
-
|
|
2385
|
+
dashSendManyVerificationEmails: better_auth298.StrictEndpoint<"/dash/send-many-verification-emails", {
|
|
2134
2386
|
method: "POST";
|
|
2135
|
-
use: ((inputContext:
|
|
2387
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2388
|
+
payload: {
|
|
2389
|
+
userIds: string[];
|
|
2390
|
+
};
|
|
2391
|
+
}>)[];
|
|
2392
|
+
body: zod0.ZodObject<{
|
|
2393
|
+
callbackUrl: zod0.ZodString;
|
|
2394
|
+
}, zod_v4_core0.$strip>;
|
|
2395
|
+
}, {
|
|
2396
|
+
success: boolean;
|
|
2397
|
+
sentEmailUserIds: string[];
|
|
2398
|
+
skippedEmailUserIds: string[];
|
|
2399
|
+
}>;
|
|
2400
|
+
dashSendResetPasswordEmail: better_auth298.StrictEndpoint<"/dash/send-reset-password-email", {
|
|
2401
|
+
method: "POST";
|
|
2402
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2136
2403
|
payload: {
|
|
2137
2404
|
userId: string;
|
|
2138
2405
|
};
|
|
@@ -2141,9 +2408,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2141
2408
|
callbackUrl: zod0.ZodString;
|
|
2142
2409
|
}, zod_v4_core0.$strip>;
|
|
2143
2410
|
}, never>;
|
|
2144
|
-
dashEnableTwoFactor:
|
|
2411
|
+
dashEnableTwoFactor: better_auth298.StrictEndpoint<"/dash/enable-two-factor", {
|
|
2145
2412
|
method: "POST";
|
|
2146
|
-
use: ((inputContext:
|
|
2413
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2147
2414
|
payload: {
|
|
2148
2415
|
userId: string;
|
|
2149
2416
|
};
|
|
@@ -2154,12 +2421,12 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2154
2421
|
secret: string;
|
|
2155
2422
|
backupCodes: string[];
|
|
2156
2423
|
}>;
|
|
2157
|
-
dashViewTwoFactorTotpUri:
|
|
2424
|
+
dashViewTwoFactorTotpUri: better_auth298.StrictEndpoint<"/dash/view-two-factor-totp-uri", {
|
|
2158
2425
|
method: "POST";
|
|
2159
2426
|
metadata: {
|
|
2160
2427
|
scope: "http";
|
|
2161
2428
|
};
|
|
2162
|
-
use: ((inputContext:
|
|
2429
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2163
2430
|
payload: {
|
|
2164
2431
|
userId: string;
|
|
2165
2432
|
};
|
|
@@ -2168,9 +2435,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2168
2435
|
totpURI: string;
|
|
2169
2436
|
secret: string;
|
|
2170
2437
|
}>;
|
|
2171
|
-
dashViewBackupCodes:
|
|
2438
|
+
dashViewBackupCodes: better_auth298.StrictEndpoint<"/dash/view-backup-codes", {
|
|
2172
2439
|
method: "POST";
|
|
2173
|
-
use: ((inputContext:
|
|
2440
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2174
2441
|
payload: {
|
|
2175
2442
|
userId: string;
|
|
2176
2443
|
};
|
|
@@ -2178,9 +2445,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2178
2445
|
}, {
|
|
2179
2446
|
backupCodes: string[];
|
|
2180
2447
|
}>;
|
|
2181
|
-
dashDisableTwoFactor:
|
|
2448
|
+
dashDisableTwoFactor: better_auth298.StrictEndpoint<"/dash/disable-two-factor", {
|
|
2182
2449
|
method: "POST";
|
|
2183
|
-
use: ((inputContext:
|
|
2450
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2184
2451
|
payload: {
|
|
2185
2452
|
userId: string;
|
|
2186
2453
|
};
|
|
@@ -2188,9 +2455,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2188
2455
|
}, {
|
|
2189
2456
|
success: boolean;
|
|
2190
2457
|
}>;
|
|
2191
|
-
dashGenerateBackupCodes:
|
|
2458
|
+
dashGenerateBackupCodes: better_auth298.StrictEndpoint<"/dash/generate-backup-codes", {
|
|
2192
2459
|
method: "POST";
|
|
2193
|
-
use: ((inputContext:
|
|
2460
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2194
2461
|
payload: {
|
|
2195
2462
|
userId: string;
|
|
2196
2463
|
};
|
|
@@ -2198,9 +2465,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2198
2465
|
}, {
|
|
2199
2466
|
backupCodes: string[];
|
|
2200
2467
|
}>;
|
|
2201
|
-
getUserEvents:
|
|
2468
|
+
getUserEvents: better_auth298.StrictEndpoint<"/events/list", {
|
|
2202
2469
|
method: "GET";
|
|
2203
|
-
use: ((inputContext:
|
|
2470
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2204
2471
|
session: {
|
|
2205
2472
|
session: Record<string, any> & {
|
|
2206
2473
|
id: string;
|
|
@@ -2234,9 +2501,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2234
2501
|
limit: number;
|
|
2235
2502
|
offset: number;
|
|
2236
2503
|
}>;
|
|
2237
|
-
getAuditLogs:
|
|
2504
|
+
getAuditLogs: better_auth298.StrictEndpoint<"/events/audit-logs", {
|
|
2238
2505
|
method: "GET";
|
|
2239
|
-
use: ((inputContext:
|
|
2506
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2240
2507
|
session: {
|
|
2241
2508
|
session: Record<string, any> & {
|
|
2242
2509
|
id: string;
|
|
@@ -2273,9 +2540,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2273
2540
|
limit: number;
|
|
2274
2541
|
offset: number;
|
|
2275
2542
|
}>;
|
|
2276
|
-
getEventTypes:
|
|
2543
|
+
getEventTypes: better_auth298.StrictEndpoint<"/events/types", {
|
|
2277
2544
|
method: "GET";
|
|
2278
|
-
use: ((inputContext:
|
|
2545
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2279
2546
|
session: {
|
|
2280
2547
|
session: Record<string, any> & {
|
|
2281
2548
|
id: string;
|
|
@@ -2384,13 +2651,13 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2384
2651
|
readonly USER_IMPERSONATED_STOPPED: "user_impersonated_stopped";
|
|
2385
2652
|
};
|
|
2386
2653
|
}>;
|
|
2387
|
-
dashAcceptInvitation:
|
|
2654
|
+
dashAcceptInvitation: better_auth298.StrictEndpoint<"/dash/accept-invitation", {
|
|
2388
2655
|
method: "GET";
|
|
2389
2656
|
query: zod0.ZodObject<{
|
|
2390
2657
|
token: zod0.ZodString;
|
|
2391
2658
|
}, zod_v4_core0.$strip>;
|
|
2392
2659
|
}, {
|
|
2393
|
-
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_auth298.Status;
|
|
2394
2661
|
body: ({
|
|
2395
2662
|
message?: string;
|
|
2396
2663
|
code?: string;
|
|
@@ -2403,7 +2670,7 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2403
2670
|
stack?: string;
|
|
2404
2671
|
cause?: unknown;
|
|
2405
2672
|
}>;
|
|
2406
|
-
dashCompleteInvitation:
|
|
2673
|
+
dashCompleteInvitation: better_auth298.StrictEndpoint<"/dash/complete-invitation", {
|
|
2407
2674
|
method: "POST";
|
|
2408
2675
|
body: zod0.ZodObject<{
|
|
2409
2676
|
token: zod0.ZodString;
|
|
@@ -2415,9 +2682,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2415
2682
|
}, zod_v4_core0.$strip>;
|
|
2416
2683
|
}, {
|
|
2417
2684
|
success: boolean;
|
|
2418
|
-
redirectUrl:
|
|
2685
|
+
redirectUrl: better_auth298.BaseURLConfig;
|
|
2419
2686
|
}>;
|
|
2420
|
-
dashCheckUserExists:
|
|
2687
|
+
dashCheckUserExists: better_auth298.StrictEndpoint<"/dash/check-user-exists", {
|
|
2421
2688
|
method: "POST";
|
|
2422
2689
|
body: zod0.ZodObject<{
|
|
2423
2690
|
email: zod0.ZodString;
|
|
@@ -2426,9 +2693,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2426
2693
|
exists: boolean;
|
|
2427
2694
|
userId: string | null;
|
|
2428
2695
|
}>;
|
|
2429
|
-
listDashOrganizationLogDrains:
|
|
2696
|
+
listDashOrganizationLogDrains: better_auth298.StrictEndpoint<"/dash/organization/:id/log-drains", {
|
|
2430
2697
|
method: "GET";
|
|
2431
|
-
use: ((inputContext:
|
|
2698
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2432
2699
|
payload: Record<string, unknown>;
|
|
2433
2700
|
}>)[];
|
|
2434
2701
|
}, {
|
|
@@ -2442,9 +2709,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2442
2709
|
createdAt: Date | string;
|
|
2443
2710
|
updatedAt: Date | string;
|
|
2444
2711
|
}[]>;
|
|
2445
|
-
createDashOrganizationLogDrain:
|
|
2712
|
+
createDashOrganizationLogDrain: better_auth298.StrictEndpoint<"/dash/organization/log-drain/create", {
|
|
2446
2713
|
method: "POST";
|
|
2447
|
-
use: ((inputContext:
|
|
2714
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2448
2715
|
payload: {
|
|
2449
2716
|
organizationId: string;
|
|
2450
2717
|
};
|
|
@@ -2476,9 +2743,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2476
2743
|
createdAt: Date | string;
|
|
2477
2744
|
updatedAt: Date | string;
|
|
2478
2745
|
}>;
|
|
2479
|
-
updateDashOrganizationLogDrain:
|
|
2746
|
+
updateDashOrganizationLogDrain: better_auth298.StrictEndpoint<"/dash/organization/log-drain/update", {
|
|
2480
2747
|
method: "POST";
|
|
2481
|
-
use: ((inputContext:
|
|
2748
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2482
2749
|
payload: {
|
|
2483
2750
|
organizationId: string;
|
|
2484
2751
|
};
|
|
@@ -2511,9 +2778,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2511
2778
|
createdAt: Date | string;
|
|
2512
2779
|
updatedAt: Date | string;
|
|
2513
2780
|
}>;
|
|
2514
|
-
deleteDashOrganizationLogDrain:
|
|
2781
|
+
deleteDashOrganizationLogDrain: better_auth298.StrictEndpoint<"/dash/organization/log-drain/delete", {
|
|
2515
2782
|
method: "POST";
|
|
2516
|
-
use: ((inputContext:
|
|
2783
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2517
2784
|
payload: {
|
|
2518
2785
|
organizationId: string;
|
|
2519
2786
|
};
|
|
@@ -2524,9 +2791,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2524
2791
|
}, {
|
|
2525
2792
|
success: boolean;
|
|
2526
2793
|
}>;
|
|
2527
|
-
testDashOrganizationLogDrain:
|
|
2794
|
+
testDashOrganizationLogDrain: better_auth298.StrictEndpoint<"/dash/organization/log-drain/test", {
|
|
2528
2795
|
method: "POST";
|
|
2529
|
-
use: ((inputContext:
|
|
2796
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2530
2797
|
payload: {
|
|
2531
2798
|
organizationId: string;
|
|
2532
2799
|
};
|
|
@@ -2546,15 +2813,15 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2546
2813
|
success: boolean;
|
|
2547
2814
|
error: string;
|
|
2548
2815
|
}>;
|
|
2549
|
-
listDashOrganizationDirectories:
|
|
2816
|
+
listDashOrganizationDirectories: better_auth298.StrictEndpoint<"/dash/organization/:id/directories", {
|
|
2550
2817
|
method: "GET";
|
|
2551
|
-
use: ((inputContext:
|
|
2818
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2552
2819
|
payload: Record<string, unknown>;
|
|
2553
2820
|
}>)[];
|
|
2554
2821
|
}, DirectorySyncConnection[]>;
|
|
2555
|
-
createDashOrganizationDirectory:
|
|
2822
|
+
createDashOrganizationDirectory: better_auth298.StrictEndpoint<"/dash/organization/directory/create", {
|
|
2556
2823
|
method: "POST";
|
|
2557
|
-
use: ((inputContext:
|
|
2824
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2558
2825
|
payload: {
|
|
2559
2826
|
organizationId: string;
|
|
2560
2827
|
};
|
|
@@ -2569,9 +2836,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2569
2836
|
scimEndpoint: string;
|
|
2570
2837
|
scimToken: string;
|
|
2571
2838
|
}>;
|
|
2572
|
-
deleteDashOrganizationDirectory:
|
|
2839
|
+
deleteDashOrganizationDirectory: better_auth298.StrictEndpoint<"/dash/organization/directory/delete", {
|
|
2573
2840
|
method: "POST";
|
|
2574
|
-
use: ((inputContext:
|
|
2841
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2575
2842
|
payload: {
|
|
2576
2843
|
organizationId: string;
|
|
2577
2844
|
};
|
|
@@ -2582,9 +2849,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2582
2849
|
}, {
|
|
2583
2850
|
success: boolean;
|
|
2584
2851
|
}>;
|
|
2585
|
-
regenerateDashDirectoryToken:
|
|
2852
|
+
regenerateDashDirectoryToken: better_auth298.StrictEndpoint<"/dash/organization/directory/regenerate-token", {
|
|
2586
2853
|
method: "POST";
|
|
2587
|
-
use: ((inputContext:
|
|
2854
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2588
2855
|
payload: {
|
|
2589
2856
|
organizationId: string;
|
|
2590
2857
|
};
|
|
@@ -2597,9 +2864,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2597
2864
|
scimToken: string;
|
|
2598
2865
|
scimEndpoint: string;
|
|
2599
2866
|
}>;
|
|
2600
|
-
getDashDirectoryDetails:
|
|
2867
|
+
getDashDirectoryDetails: better_auth298.StrictEndpoint<"/dash/organization/:orgId/directory", {
|
|
2601
2868
|
method: "GET";
|
|
2602
|
-
use: ((inputContext:
|
|
2869
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2603
2870
|
payload: Record<string, unknown>;
|
|
2604
2871
|
}>)[];
|
|
2605
2872
|
query: zod0.ZodObject<{
|
|
@@ -2610,9 +2877,9 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2610
2877
|
providerId: string;
|
|
2611
2878
|
scimEndpoint: string;
|
|
2612
2879
|
}>;
|
|
2613
|
-
dashExecuteAdapter:
|
|
2880
|
+
dashExecuteAdapter: better_auth298.StrictEndpoint<"/dash/execute-adapter", {
|
|
2614
2881
|
method: "POST";
|
|
2615
|
-
use: ((inputContext:
|
|
2882
|
+
use: ((inputContext: better_auth298.MiddlewareInputContext<better_auth298.MiddlewareOptions>) => Promise<{
|
|
2616
2883
|
payload: Record<string, unknown>;
|
|
2617
2884
|
}>)[];
|
|
2618
2885
|
body: zod0.ZodDiscriminatedUnion<[zod0.ZodObject<{
|
|
@@ -2634,8 +2901,8 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2634
2901
|
ends_with: "ends_with";
|
|
2635
2902
|
}>>;
|
|
2636
2903
|
connector: zod0.ZodOptional<zod0.ZodEnum<{
|
|
2637
|
-
AND: "AND";
|
|
2638
2904
|
OR: "OR";
|
|
2905
|
+
AND: "AND";
|
|
2639
2906
|
}>>;
|
|
2640
2907
|
}, zod_v4_core0.$strip>>>;
|
|
2641
2908
|
select: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
@@ -2659,8 +2926,8 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2659
2926
|
ends_with: "ends_with";
|
|
2660
2927
|
}>>;
|
|
2661
2928
|
connector: zod0.ZodOptional<zod0.ZodEnum<{
|
|
2662
|
-
AND: "AND";
|
|
2663
2929
|
OR: "OR";
|
|
2930
|
+
AND: "AND";
|
|
2664
2931
|
}>>;
|
|
2665
2932
|
}, zod_v4_core0.$strip>>>;
|
|
2666
2933
|
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
@@ -2696,8 +2963,8 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2696
2963
|
ends_with: "ends_with";
|
|
2697
2964
|
}>>;
|
|
2698
2965
|
connector: zod0.ZodOptional<zod0.ZodEnum<{
|
|
2699
|
-
AND: "AND";
|
|
2700
2966
|
OR: "OR";
|
|
2967
|
+
AND: "AND";
|
|
2701
2968
|
}>>;
|
|
2702
2969
|
}, zod_v4_core0.$strip>>;
|
|
2703
2970
|
update: zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>;
|
|
@@ -2720,8 +2987,8 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2720
2987
|
ends_with: "ends_with";
|
|
2721
2988
|
}>>;
|
|
2722
2989
|
connector: zod0.ZodOptional<zod0.ZodEnum<{
|
|
2723
|
-
AND: "AND";
|
|
2724
2990
|
OR: "OR";
|
|
2991
|
+
AND: "AND";
|
|
2725
2992
|
}>>;
|
|
2726
2993
|
}, zod_v4_core0.$strip>>>;
|
|
2727
2994
|
}, zod_v4_core0.$strip>], "action">;
|
|
@@ -2744,4 +3011,4 @@ declare const dash: (options?: DashOptions) => {
|
|
|
2744
3011
|
};
|
|
2745
3012
|
};
|
|
2746
3013
|
//#endregion
|
|
2747
|
-
export { CHALLENGE_TTL, type CompromisedPasswordResult, type CredentialStuffingResult, DEFAULT_DIFFICULTY, type DashOptions, EMAIL_TEMPLATES, type EmailConfig, type EmailTemplateId, type EmailTemplateVariables, type EventLocation, type ImpossibleTravelResult, type PoWChallenge, type PoWSolution, type SMSConfig, type SMSTemplateId, type SMSTemplateVariables, SMS_TEMPLATES, type SecurityEvent, type SecurityEventType, type SecurityOptions, type SecurityVerdict, type SendEmailOptions, type SendEmailResult, type SendSMSOptions, type SendSMSResult, type SentinelOptions, type StaleUserResult, type ThresholdConfig, USER_EVENT_TYPES, type UserEvent, type UserEventType, type UserEventsResponse, createEmailSender, createSMSSender, dash, decodePoWChallenge, encodePoWSolution, sendEmail, sendSMS, sentinel, solvePoWChallenge, verifyPoWSolution };
|
|
3014
|
+
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 };
|