import type { MiddlewareHandler } from "hono"; import type { VoyantBindings } from "../types.js"; export interface StripeConnectSecurityHeadersScope { /** * URL path prefixes that render the managed Stripe Connect admin surface. * Prefixes match only the exact path or a slash-delimited descendant. */ pathPrefixes: readonly string[]; /** Restrict relaxation to HTML document responses, excluding APIs and assets. */ documentResponsesOnly?: boolean; } export interface SecurityHeadersOptions { contentSecurityPolicy?: string | false; hsts?: boolean; /** * Extend a CSP already set by the downstream response instead of replacing * it. This preserves SSR-generated script hashes/nonces. */ preserveResponseContentSecurityPolicy?: boolean; /** Opt in only the admin routes that render Stripe Connect components. */ stripeConnect?: StripeConnectSecurityHeadersScope; } export declare function withStripeConnectCsp(contentSecurityPolicy: string): string; export declare function securityHeaders(options?: SecurityHeadersOptions): MiddlewareHandler<{ Bindings: TBindings; }>;