import { type ConnectionProvider, type ProviderRegistry } from '@hookfish/provider'; import type { ExecutionContext } from 'hono'; import { type BrowserRequestAuthorizer, type HookfishBackendOptions } from './client.js'; import { type DatabaseInput } from './db/binding.js'; import type { HookfishEventHandler } from './events.js'; import type { BrokerContext } from './oauth/middleware.js'; import { type BoundProviderSource, type ProviderInput } from './provider-source.js'; export type { ProviderFactory, ProviderMap } from './provider-source.js'; export type HookfishProviders = ProviderInput; export type HookfishConfig = { /** Fixed providers, a lazy provider source, or a request-aware factory. */ providers: HookfishProviders; /** Default database binding. A runtime host may override it in `HookfishServer.init`. */ db: DatabaseInput; /** Mount the browser-safe, credential-injecting facade at `/api/client`. @default false */ includeClient?: boolean; /** Include server-only operations in OpenAPI. Client operations are always documented. @default true */ includeSwagger?: boolean; /** Fixed destination after a successful OAuth callback. Omit for the development completion page. */ returnTo?: string; /** Origins allowed by the per-authorization `return_to` option. */ trustedOrigins?: readonly string[]; /** Best-effort lifecycle and audit event handler. */ onEvent?: HookfishEventHandler; }; export declare function defineHookfishConfig(config: HookfishConfig): HookfishConfig; declare function createApiRoutes(resolveProviders: (bindings: Bindings) => Promise, database: DatabaseInput, options: Pick, 'returnTo' | 'trustedOrigins' | 'onEvent'>, includeSwagger?: boolean): import("hono/hono-base").HonoBase extends infer T ? T extends BrokerContext ? T extends import("hono").Env ? import("hono").Env extends T ? {} : T : T : never : never> & {} extends infer T_1 ? T_1 extends import("hono/utils/types").IfAnyThenEmptyObject extends infer T_2 ? T_2 extends BrokerContext ? T_2 extends import("hono").Env ? import("hono").Env extends T_2 ? {} : T_2 : T_2 : never : never> & {} ? T_1 extends import("hono").Env ? import("hono").Env extends T_1 ? {} : T_1 : T_1 : never : never> & {} extends infer T_3 ? T_3 extends import("hono/utils/types").IfAnyThenEmptyObject extends infer T_4 ? T_4 extends BrokerContext ? T_4 extends import("hono").Env ? import("hono").Env extends T_4 ? {} : T_4 : T_4 : never : never> & {} extends infer T_5 ? T_5 extends import("hono/utils/types").IfAnyThenEmptyObject extends infer T_6 ? T_6 extends BrokerContext ? T_6 extends import("hono").Env ? import("hono").Env extends T_6 ? {} : T_6 : T_6 : never : never> & {} ? T_5 extends import("hono").Env ? import("hono").Env extends T_5 ? {} : T_5 : T_5 : never : never> & {} ? T_3 extends import("hono").Env ? import("hono").Env extends T_3 ? {} : T_3 : T_3 : never : never> & {} extends infer T_7 ? T_7 extends import("hono/utils/types").IfAnyThenEmptyObject extends infer T_8 ? T_8 extends BrokerContext ? T_8 extends import("hono").Env ? import("hono").Env extends T_8 ? {} : T_8 : T_8 : never : never> & {} extends infer T_9 ? T_9 extends import("hono/utils/types").IfAnyThenEmptyObject extends infer T_10 ? T_10 extends BrokerContext ? T_10 extends import("hono").Env ? import("hono").Env extends T_10 ? {} : T_10 : T_10 : never : never> & {} ? T_9 extends import("hono").Env ? import("hono").Env extends T_9 ? {} : T_9 : T_9 : never : never> & {} extends infer T_11 ? T_11 extends import("hono/utils/types").IfAnyThenEmptyObject extends infer T_12 ? T_12 extends BrokerContext ? T_12 extends import("hono").Env ? import("hono").Env extends T_12 ? {} : T_12 : T_12 : never : never> & {} extends infer T_13 ? T_13 extends import("hono/utils/types").IfAnyThenEmptyObject extends infer T_14 ? T_14 extends BrokerContext ? T_14 extends import("hono").Env ? import("hono").Env extends T_14 ? {} : T_14 : T_14 : never : never> & {} ? T_13 extends import("hono").Env ? import("hono").Env extends T_13 ? {} : T_13 : T_13 : never : never> & {} ? T_11 extends import("hono").Env ? import("hono").Env extends T_11 ? {} : T_11 : T_11 : never : never> & {} ? T_7 extends import("hono").Env ? import("hono").Env extends T_7 ? {} : T_7 : T_7 : never : never> & {}, {} | import("hono/types").MergeSchemaPath<{ "/": { $get: { input: {}; output: { region: string; uptimeMode: string; features: string[]; }; outputFormat: "json"; status: 200; }; }; }, "/stats"> | import("hono/types").MergeSchemaPath<{ "/tokens": { $post: { input: { json: { name: string; scopes: string[]; expires_in?: number | undefined; }; }; output: { name: string; access_token: string; token_type: "Bearer"; scopes: string[]; expires_at: string; }; outputFormat: "json"; status: 200; } | { input: { json: { name: string; scopes: string[]; expires_in?: number | undefined; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 400; } | { input: { json: { name: string; scopes: string[]; expires_in?: number | undefined; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 401; } | { input: { json: { name: string; scopes: string[]; expires_in?: number | undefined; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 403; } | { input: { json: { name: string; scopes: string[]; expires_in?: number | undefined; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 409; } | { input: { json: { name: string; scopes: string[]; expires_in?: number | undefined; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 500; }; }; } & { "/tokens": { $get: { input: {}; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 400; } | { input: {}; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 401; } | { input: {}; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 403; } | { input: {}; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 409; } | { input: {}; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 500; } | { input: {}; output: { tokens: string[]; }; outputFormat: "json"; status: 200; }; }; } & { "/tokens/:name": { $delete: { input: { param: { name: string; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 400; } | { input: { param: { name: string; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 401; } | { input: { param: { name: string; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 403; } | { input: { param: { name: string; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 409; } | { input: { param: { name: string; }; }; output: { error: { code: string; message: string; }; }; outputFormat: "json"; status: 500; } | { input: { param: { name: string; }; }; output: { name: string; revoked: boolean; }; outputFormat: "json"; status: 200; }; }; }, "/admin"> | import("hono/types").MergeSchemaPath<{ "/client-metadata.json": { $get: { input: {}; output: { client_id: string; client_name: string; redirect_uris: string[]; grant_types: string[]; response_types: string[]; token_endpoint_auth_method: string; }; outputFormat: "json"; status: 200; }; }; } & { "/providers": { $get: { input: {}; output: { providers: { id: string; label: string; authentication: "secret" | "oauth"; input_schema: { fields: { name: string; label: string; type: "text" | "url" | "string_list"; target: "scopes" | "configuration" | "identity"; required: boolean; placeholder?: string | undefined; description?: string | undefined; }[]; }; }[]; }; outputFormat: "json"; status: 200; } | { input: {}; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 400; } | { input: {}; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 401; } | { input: {}; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 403; } | { input: {}; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 404; } | { input: {}; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 409; } | { input: {}; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 500; } | { input: {}; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 502; }; }; } & { "/access/:connection_path{.+}": { $post: { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 400; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 401; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 403; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 404; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 409; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 500; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 502; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { path: string; secret: string; scopes: string[]; expires_at: string | null; refreshed: boolean; }; outputFormat: "json"; status: 200; }; }; } & { "/authorize/:connection_path{.+}": { $post: { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 400; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 401; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 403; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 404; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 409; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 500; } | { input: { param: { connection_path: string; }; } & { json: { configuration?: Record | undefined; scopes?: string[] | undefined; return_to?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 502; }; }; } & { "/secret/:connection_path{.+}": { $put: { input: { param: { connection_path: string; }; } & { json: { secret: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 400; } | { input: { param: { connection_path: string; }; } & { json: { secret: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 401; } | { input: { param: { connection_path: string; }; } & { json: { secret: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 403; } | { input: { param: { connection_path: string; }; } & { json: { secret: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 404; } | { input: { param: { connection_path: string; }; } & { json: { secret: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 409; } | { input: { param: { connection_path: string; }; } & { json: { secret: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 500; } | { input: { param: { connection_path: string; }; } & { json: { secret: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 502; } | { input: { param: { connection_path: string; }; } & { json: { secret: string; }; }; output: { path: string; stored: true; }; outputFormat: "json"; status: 200; }; }; } & { "/": { $get: { input: { query: { namespace?: string | undefined; provider_id?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 400; } | { input: { query: { namespace?: string | undefined; provider_id?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 401; } | { input: { query: { namespace?: string | undefined; provider_id?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 403; } | { input: { query: { namespace?: string | undefined; provider_id?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 404; } | { input: { query: { namespace?: string | undefined; provider_id?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 409; } | { input: { query: { namespace?: string | undefined; provider_id?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 500; } | { input: { query: { namespace?: string | undefined; provider_id?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 502; } | { input: { query: { namespace?: string | undefined; provider_id?: string | undefined; }; }; output: { connections: { path: string; namespace: string; provider_id: string; configuration: { [x: string]: import("hono/utils/types").JSONValue; }; scopes: string[]; expires_at: string | null; external_account_id: string | null; external_account_label: string | null; metadata: { [x: string]: import("hono/utils/types").JSONValue; }; created_at: string; updated_at: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/entry/:connection_path{.+}": { $get: { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 400; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 401; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 403; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 404; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 409; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 500; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 502; } | { input: { param: { connection_path: string; }; }; output: { connection: { path: string; namespace: string; provider_id: string; configuration: { [x: string]: import("hono/utils/types").JSONValue; }; scopes: string[]; expires_at: string | null; external_account_id: string | null; external_account_label: string | null; metadata: { [x: string]: import("hono/utils/types").JSONValue; }; created_at: string; updated_at: string; }; }; outputFormat: "json"; status: 200; }; }; } & { "/entry/:connection_path{.+}": { $delete: { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 400; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 401; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 403; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 404; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 409; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 500; } | { input: { param: { connection_path: string; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 502; } | { input: { param: { connection_path: string; }; }; output: { deleted: boolean; revocation: "revoked" | "unsupported"; }; outputFormat: "json"; status: 200; }; }; } & { "/callback/:provider_id": { $get: { input: { param: { provider_id: string; }; } & { query: { code?: string | undefined; state?: string | undefined; error?: string | undefined; error_description?: string | undefined; iss?: string | undefined; }; }; output: Response; outputFormat: "json"; status: import("hono/utils/http-status").StatusCode; } | { input: { param: { provider_id: string; }; } & { query: { code?: string | undefined; state?: string | undefined; error?: string | undefined; error_description?: string | undefined; iss?: string | undefined; }; }; output: {}; outputFormat: string; status: 302; } | { input: { param: { provider_id: string; }; } & { query: { code?: string | undefined; state?: string | undefined; error?: string | undefined; error_description?: string | undefined; iss?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 400; } | { input: { param: { provider_id: string; }; } & { query: { code?: string | undefined; state?: string | undefined; error?: string | undefined; error_description?: string | undefined; iss?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 401; } | { input: { param: { provider_id: string; }; } & { query: { code?: string | undefined; state?: string | undefined; error?: string | undefined; error_description?: string | undefined; iss?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 403; } | { input: { param: { provider_id: string; }; } & { query: { code?: string | undefined; state?: string | undefined; error?: string | undefined; error_description?: string | undefined; iss?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 404; } | { input: { param: { provider_id: string; }; } & { query: { code?: string | undefined; state?: string | undefined; error?: string | undefined; error_description?: string | undefined; iss?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 409; } | { input: { param: { provider_id: string; }; } & { query: { code?: string | undefined; state?: string | undefined; error?: string | undefined; error_description?: string | undefined; iss?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 500; } | { input: { param: { provider_id: string; }; } & { query: { code?: string | undefined; state?: string | undefined; error?: string | undefined; error_description?: string | undefined; iss?: string | undefined; }; }; output: { error: { [x: string]: import("hono/utils/types").JSONValue; code: string; message: string; authorize_url?: string | undefined; expires_at?: string | undefined; }; }; outputFormat: "json"; status: 502; }; }; }, "/connections">, "/", "/connections/*">; /** * Build the complete server contract used to generate the first-party SDK. */ export declare function createHookfishOpenAPIDocument(): Promise; export type AppType = ReturnType; export type HookfishRuntime = { /** Label shown by `/api/client/health`. @default "fetch" */ runtime?: HookfishBackendOptions['runtime']; /** Override `trustedOrigins` with a runtime-specific browser allowlist. */ browserOrigins?: HookfishBackendOptions['browserOrigins']; /** Override the root credential injected by the browser facade. */ brokerApiKey?: HookfishBackendOptions['brokerApiKey']; /** Apply application/session authorization before serving browser routes. */ authorizeBrowserRequest?: BrowserRequestAuthorizer; }; /** * A self-contained Hookfish request handler. * * `fetch` is an instance property so it can be passed directly to Node, * Cloudflare Workers, or another Fetch-compatible host without rebinding it. */ export declare class HookfishServer { readonly db: DatabaseInput; readonly includeClient: boolean; readonly includeSwagger: boolean; readonly returnTo: string | undefined; private readonly resolveProviders; private readonly app; private constructor(); static init(options: HookfishConfig, runtime?: HookfishRuntime): Promise>; readonly fetch: (request: Request, bindings?: Bindings | undefined, executionContext?: ExecutionContext) => Response | Promise; /** Resolve one provider without listing a lazy source. */ readonly getProvider: (providerId: string, bindings: Bindings) => Promise; /** Materialize the configured provider listing as an in-memory registry. */ readonly getProviders: (bindings: Bindings) => Promise; readonly migrate: (bindings: Bindings) => Promise; } export declare function isHookfish(value: unknown): value is HookfishServer; export { createProviderSource, type ProviderSource, type ProviderSourceEntry, type ProviderSourceListResult, type ProviderSourceQuery, } from '@hookfish/provider'; export { z } from 'zod'; export { type DatabaseBinding, type DatabaseInput, defineDatabase, migrateDatabase, } from './db/binding.js'; export type { BrokerAccessToken, Connection, ConnectionFilter, ConnectionSummary, ConnectionUpdate, Database, DatabaseResult, NewBrokerAccessToken, NewConnection, NewOAuthState, OAuthState, OAuthStateUpdate, } from './db/types.js'; export type { HookfishEvent, HookfishEventHandler } from './events.js'; //# sourceMappingURL=index.d.ts.map