import { BetterAuthPluginRegistry, BetterAuthPluginRegistryIdentifier, GenericEndpointContext, UnionToIntersection } from "@better-auth/core"; //#region ../../node_modules/.pnpm/better-call@1.3.7_zod@4.3.6/node_modules/better-call/dist/standard-schema.d.mts //#region src/standard-schema.d.ts /** The Standard Schema interface. */ interface StandardSchemaV1 { /** The Standard Schema properties. */ readonly "~standard": StandardSchemaV1.Props; } declare namespace StandardSchemaV1 { /** The Standard Schema properties interface. */ interface Props { /** The version number of the standard. */ readonly version: 1; /** The vendor name of the schema library. */ readonly vendor: string; /** Validates unknown input values. */ readonly validate: (value: unknown) => Result | Promise>; /** Inferred types associated with the schema. */ readonly types?: Types | undefined; } /** The result interface of the validate function. */ type Result = SuccessResult | FailureResult; /** The result interface if validation succeeds. */ interface SuccessResult { /** The typed output value. */ readonly value: Output; /** The non-existent issues. */ readonly issues?: undefined; } /** The result interface if validation fails. */ interface FailureResult { /** The issues of failed validation. */ readonly issues: ReadonlyArray; } /** The issue interface of the failure output. */ interface Issue { /** The error message of the issue. */ readonly message: string; /** The path of the issue, if any. */ readonly path?: ReadonlyArray | undefined; } /** The path segment interface of the issue. */ interface PathSegment { /** The key representing a path segment. */ readonly key: PropertyKey; } /** The Standard Schema types interface. */ interface Types { /** The input type of the schema. */ readonly input: Input; /** The output type of the schema. */ readonly output: Output; } /** Infers the input type of a Standard Schema. */ type InferInput = NonNullable["input"]; /** Infers the output type of a Standard Schema. */ type InferOutput = NonNullable["output"]; } //#endregion //#endregion //#region ../../node_modules/.pnpm/better-call@1.3.7_zod@4.3.6/node_modules/better-call/dist/error.d.mts declare const statusCodes: { OK: number; CREATED: number; ACCEPTED: number; NO_CONTENT: number; MULTIPLE_CHOICES: number; MOVED_PERMANENTLY: number; FOUND: number; SEE_OTHER: number; NOT_MODIFIED: number; TEMPORARY_REDIRECT: number; BAD_REQUEST: number; UNAUTHORIZED: number; PAYMENT_REQUIRED: number; FORBIDDEN: number; NOT_FOUND: number; METHOD_NOT_ALLOWED: number; NOT_ACCEPTABLE: number; PROXY_AUTHENTICATION_REQUIRED: number; REQUEST_TIMEOUT: number; CONFLICT: number; GONE: number; LENGTH_REQUIRED: number; PRECONDITION_FAILED: number; PAYLOAD_TOO_LARGE: number; URI_TOO_LONG: number; UNSUPPORTED_MEDIA_TYPE: number; RANGE_NOT_SATISFIABLE: number; EXPECTATION_FAILED: number; "I'M_A_TEAPOT": number; MISDIRECTED_REQUEST: number; UNPROCESSABLE_ENTITY: number; LOCKED: number; FAILED_DEPENDENCY: number; TOO_EARLY: number; UPGRADE_REQUIRED: number; PRECONDITION_REQUIRED: number; TOO_MANY_REQUESTS: number; REQUEST_HEADER_FIELDS_TOO_LARGE: number; UNAVAILABLE_FOR_LEGAL_REASONS: number; INTERNAL_SERVER_ERROR: number; NOT_IMPLEMENTED: number; BAD_GATEWAY: number; SERVICE_UNAVAILABLE: number; GATEWAY_TIMEOUT: number; HTTP_VERSION_NOT_SUPPORTED: number; VARIANT_ALSO_NEGOTIATES: number; INSUFFICIENT_STORAGE: number; LOOP_DETECTED: number; NOT_EXTENDED: number; NETWORK_AUTHENTICATION_REQUIRED: number; }; type Status = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511; declare class InternalAPIError extends Error { status: keyof typeof statusCodes | Status; body: ({ message?: string; code?: string; cause?: unknown; } & Record) | undefined; headers: HeadersInit; statusCode: number; constructor(status?: keyof typeof statusCodes | Status, body?: ({ message?: string; code?: string; cause?: unknown; } & Record) | undefined, headers?: HeadersInit, statusCode?: number); } type APIError = InstanceType; declare const APIError: new (status?: 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" | undefined, body?: ({ message?: string; code?: string; cause?: unknown; } & Record) | undefined, headers?: HeadersInit | undefined, statusCode?: number | undefined) => InternalAPIError & { errorStack: string | undefined; }; //#endregion //#endregion //#region ../../node_modules/.pnpm/better-call@1.3.7_zod@4.3.6/node_modules/better-call/dist/openapi.d.mts //#region src/openapi.d.ts type OpenAPISchemaType = "string" | "number" | "integer" | "boolean" | "array" | "object"; interface OpenAPIParameter { in: "query" | "path" | "header" | "cookie"; name?: string; description?: string; required?: boolean; schema?: { type: OpenAPISchemaType; format?: string | undefined; items?: { type: OpenAPISchemaType; }; enum?: string[]; minLength?: number; description?: string | undefined; default?: string | undefined; example?: string | undefined; }; } //#endregion //#region ../../node_modules/.pnpm/better-call@1.3.7_zod@4.3.6/node_modules/better-call/dist/endpoint.d.mts //#region src/endpoint.d.ts interface EndpointBaseOptions { /** * Query Schema */ query?: StandardSchemaV1; /** * Error Schema */ error?: StandardSchemaV1; /** * If true headers will be required to be passed in the context */ requireHeaders?: boolean; /** * If true request object will be required */ requireRequest?: boolean; /** * Clone the request object from the router */ cloneRequest?: boolean; /** * If true the body will be undefined */ disableBody?: boolean; /** * Endpoint metadata */ metadata?: { /** * Open API definition */ openapi?: { summary?: string; description?: string; tags?: string[]; operationId?: string; parameters?: OpenAPIParameter[]; requestBody?: { content: { "application/json": { schema: { type?: OpenAPISchemaType; properties?: Record; required?: string[]; $ref?: string; }; }; }; }; responses?: { [status: string]: { description: string; content?: { "application/json"?: { schema: { type?: OpenAPISchemaType; properties?: Record; required?: string[]; $ref?: string; }; }; "text/plain"?: { schema?: { type?: OpenAPISchemaType; properties?: Record; required?: string[]; $ref?: string; }; }; "text/html"?: { schema?: { type?: OpenAPISchemaType; properties?: Record; required?: string[]; $ref?: string; }; }; }; }; }; }; /** * Infer body and query type from ts interface * * useful for generic and dynamic types * * @example * ```ts * const endpoint = createEndpoint("/path", { * method: "POST", * body: z.record(z.string()), * $Infer: { * body: {} as { * type: InferTypeFromOptions