import { FieldSchema, OpenAPIModelSchema, OpenAPIParameter, OpenAPISchema, Path, generator } from "./generator.mjs"; import { LiteralString } from "@better-auth/core"; import * as better_call0 from "better-call"; //#region src/plugins/open-api/index.d.ts declare module "@better-auth/core" { interface BetterAuthPluginRegistry { "open-api": { creator: typeof openAPI; }; } } type ScalarTheme = "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "saturn" | "kepler" | "mars" | "deepSpace" | "laserwave" | "none"; interface OpenAPIOptions { /** * The path to the OpenAPI reference page * * keep in mind that this path will be appended to the base URL `/api/auth` path * by default, so if you set this to `/reference`, the full path will be `/api/auth/reference` * * @default "/reference" */ path?: LiteralString | undefined; /** * Disable the default reference page that is generated by Scalar * * @default false */ disableDefaultReference?: boolean | undefined; /** * Theme of the OpenAPI reference page. * * @default "default" */ theme?: ScalarTheme | undefined; /** * A 'nonce' string to be attached to inline scripts * for Content Security Policy (CSP) compliance. * @default undefined */ nonce?: string | undefined; } declare const openAPI: (options?: O | undefined) => { id: "open-api"; version: string; endpoints: { generateOpenAPISchema: better_call0.StrictEndpoint<"/open-api/generate-schema", { method: "GET"; }, { openapi: string; info: { title: string; description: string; version: string; }; components: { securitySchemes: { apiKeyCookie: { type: string; in: string; name: string; description: string; }; bearerAuth: { type: string; scheme: string; description: string; }; }; schemas: { [x: string]: OpenAPIModelSchema; }; }; security: { apiKeyCookie: never[]; bearerAuth: never[]; }[]; servers: { url: string; }[]; tags: { name: string; description: string; }[]; paths: Record; }>; openAPIReference: better_call0.StrictEndpoint; }; options: NoInfer; }; //#endregion export { type FieldSchema, type OpenAPIModelSchema, OpenAPIOptions, OpenAPIParameter, OpenAPISchema, type Path, generator, openAPI };