@better-auth/infra 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +50 -8
- package/dist/index.mjs +434 -294
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -117,6 +117,8 @@ interface SecurityVerdict {
|
|
|
117
117
|
challenge?: string;
|
|
118
118
|
reason?: string;
|
|
119
119
|
details?: Record<string, unknown>;
|
|
120
|
+
/** Set when the request included a valid, consumed PoW solution. */
|
|
121
|
+
powVerified?: boolean;
|
|
120
122
|
}
|
|
121
123
|
interface CredentialStuffingResult {
|
|
122
124
|
blocked: boolean;
|
|
@@ -130,6 +132,7 @@ interface ImpossibleTravelResult {
|
|
|
130
132
|
action?: "allow" | "challenge" | "block";
|
|
131
133
|
challenged?: boolean;
|
|
132
134
|
challenge?: string;
|
|
135
|
+
powVerified?: boolean;
|
|
133
136
|
distance?: number;
|
|
134
137
|
timeElapsedHours?: number;
|
|
135
138
|
speedRequired?: number;
|
|
@@ -265,7 +268,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
265
268
|
};
|
|
266
269
|
hooks: {
|
|
267
270
|
before: ({
|
|
268
|
-
matcher: (context: import("better-auth").HookEndpointContext) => boolean;
|
|
271
|
+
matcher: (context: Pick<import("better-auth").HookEndpointContext, "path">) => boolean;
|
|
269
272
|
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
270
273
|
context: {
|
|
271
274
|
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
@@ -437,7 +440,7 @@ declare const sentinel: (options?: SentinelOptions) => {
|
|
|
437
440
|
};
|
|
438
441
|
} | undefined>;
|
|
439
442
|
} | {
|
|
440
|
-
matcher: (
|
|
443
|
+
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
441
444
|
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
|
|
442
445
|
})[];
|
|
443
446
|
after: {
|
|
@@ -555,6 +558,8 @@ type InfraEndpointContext = (GenericEndpointContext & {
|
|
|
555
558
|
identification?: Identification | null | undefined;
|
|
556
559
|
visitorId: string | null;
|
|
557
560
|
requestId: string | null;
|
|
561
|
+
ip: string | null;
|
|
562
|
+
untrustedVisitorId: string | null;
|
|
558
563
|
location: LocationData | undefined;
|
|
559
564
|
};
|
|
560
565
|
}) | undefined;
|
|
@@ -770,7 +775,7 @@ interface DashIdRow {
|
|
|
770
775
|
id: string;
|
|
771
776
|
}
|
|
772
777
|
//#endregion
|
|
773
|
-
//#region ../../node_modules/.bun/@better-auth+scim@1.6.
|
|
778
|
+
//#region ../../node_modules/.bun/@better-auth+scim@1.6.14+790dbc3a881c5018/node_modules/@better-auth/scim/dist/index.d.mts
|
|
774
779
|
//#region src/types.d.ts
|
|
775
780
|
interface SCIMProvider {
|
|
776
781
|
id: string;
|
|
@@ -4523,7 +4528,6 @@ interface DashTwoFactorEnableResponse {
|
|
|
4523
4528
|
}
|
|
4524
4529
|
interface DashTwoFactorTotpViewResponse {
|
|
4525
4530
|
totpURI: string;
|
|
4526
|
-
secret: string;
|
|
4527
4531
|
}
|
|
4528
4532
|
interface DashTwoFactorBackupCodesResponse {
|
|
4529
4533
|
backupCodes: string[];
|
|
@@ -5771,12 +5775,50 @@ declare const dash: <O extends DashOptions>(options?: O) => {
|
|
|
5771
5775
|
body: import("zod").ZodObject<{
|
|
5772
5776
|
token: import("zod").ZodString;
|
|
5773
5777
|
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5774
|
-
providerId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5775
|
-
providerAccountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5776
|
-
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5777
|
-
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5778
5778
|
}, import("zod/v4/core").$strip>;
|
|
5779
5779
|
}, DashCompleteInvitationResponse>;
|
|
5780
|
+
dashCompleteInvitationSocial: import("better-call").StrictEndpoint<"/dash/complete-invitation-social", {
|
|
5781
|
+
method: "GET";
|
|
5782
|
+
query: import("zod").ZodObject<{
|
|
5783
|
+
token: import("zod").ZodString;
|
|
5784
|
+
}, import("zod/v4/core").$strip>;
|
|
5785
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
5786
|
+
session: {
|
|
5787
|
+
session: Record<string, any> & {
|
|
5788
|
+
id: string;
|
|
5789
|
+
createdAt: Date;
|
|
5790
|
+
updatedAt: Date;
|
|
5791
|
+
userId: string;
|
|
5792
|
+
expiresAt: Date;
|
|
5793
|
+
token: string;
|
|
5794
|
+
ipAddress?: string | null | undefined;
|
|
5795
|
+
userAgent?: string | null | undefined;
|
|
5796
|
+
};
|
|
5797
|
+
user: Record<string, any> & {
|
|
5798
|
+
id: string;
|
|
5799
|
+
createdAt: Date;
|
|
5800
|
+
updatedAt: Date;
|
|
5801
|
+
email: string;
|
|
5802
|
+
emailVerified: boolean;
|
|
5803
|
+
name: string;
|
|
5804
|
+
image?: string | null | undefined;
|
|
5805
|
+
};
|
|
5806
|
+
};
|
|
5807
|
+
}>)[];
|
|
5808
|
+
}, {
|
|
5809
|
+
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") | import("better-call").Status;
|
|
5810
|
+
body: ({
|
|
5811
|
+
message?: string;
|
|
5812
|
+
code?: string;
|
|
5813
|
+
cause?: unknown;
|
|
5814
|
+
} & Record<string, any>) | undefined;
|
|
5815
|
+
headers: HeadersInit;
|
|
5816
|
+
statusCode: number;
|
|
5817
|
+
name: string;
|
|
5818
|
+
message: string;
|
|
5819
|
+
stack?: string;
|
|
5820
|
+
cause?: unknown;
|
|
5821
|
+
}>;
|
|
5780
5822
|
dashCheckUserExists: import("better-call").StrictEndpoint<"/dash/check-user-exists", {
|
|
5781
5823
|
method: "POST";
|
|
5782
5824
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|