import * as better_call from 'better-call'; import { OpenAPIParameter, OpenAPISchemaType } from 'better-call'; import { l as AuthContext, f as BetterAuthOptions } from '../../shared/better-auth.6fr3ElRe.js'; import { L as LiteralString } from '../../shared/better-auth.Bi8FQwDD.js'; import 'zod'; import '../../shared/better-auth.BLX8BItA.js'; import 'jose'; import 'kysely'; import 'better-sqlite3'; interface Path { get?: { tags?: string[]; operationId?: string; description?: string; security?: [{ bearerAuth: string[]; }]; parameters?: OpenAPIParameter[]; responses?: { [key in string]: { description?: string; content: { "application/json": { schema: { type?: OpenAPISchemaType; properties?: Record; required?: string[]; $ref?: string; }; }; }; }; }; }; post?: { tags?: string[]; operationId?: string; description?: string; security?: [{ bearerAuth: string[]; }]; parameters?: OpenAPIParameter[]; requestBody?: { content: { "application/json": { schema: { type?: OpenAPISchemaType; properties?: Record; required?: string[]; $ref?: string; }; }; }; }; responses?: { [key in string]: { description?: string; content: { "application/json": { schema: { type?: OpenAPISchemaType; properties?: Record; required?: string[]; $ref?: string; }; }; }; }; }; }; } declare function generator(ctx: AuthContext, options: BetterAuthOptions): Promise<{ 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: {}; }; security: { apiKeyCookie: never[]; bearerAuth: never[]; }[]; servers: { url: string; }[]; tags: { name: string; description: string; }[]; paths: Record; }>; 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; /** * Disable the default reference page that is generated by Scalar * * @default false */ disableDefaultReference?: boolean; } declare const openAPI: (options?: O) => { id: "open-api"; endpoints: { generateOpenAPISchema: { | undefined)?]>(...inputCtx: C): Promise; }; } : { 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: {}; }; security: { apiKeyCookie: never[]; bearerAuth: never[]; }[]; servers: { url: string; }[]; tags: { name: string; description: string; }[]; paths: Record; }>; options: { method: "GET"; } & { use: any[]; }; path: "/open-api/generate-schema"; }; openAPIReference: { | undefined)?]>(...inputCtx: C): Promise; options: { method: "GET"; metadata: { isAction: boolean; }; } & { use: any[]; }; path: "/reference"; }; }; }; export { type OpenAPIOptions, type Path, generator, openAPI };