UNPKG

autumn-js

Version:
19 lines (16 loc) 911 B
import * as hono_utils_types from 'hono/utils/types'; import * as hono from 'hono'; import { Context, Next } from 'hono'; import { A as AuthResult } from '../authTypes-jU7ON-I5.js'; type HonoAutumnHandlerOptions<ContextType extends Context = Context> = { /** Function to identify the customer from the Hono context */ identify: (c: ContextType) => AuthResult; /** Autumn API secret key */ secretKey?: string; /** Autumn API URL */ autumnURL?: string; /** Path prefix for routes (default: "/api/autumn") */ pathPrefix?: string; }; declare function autumnHandler<ContextType extends Context = Context>(options: HonoAutumnHandlerOptions<ContextType>): (c: Context, next: Next) => Promise<void | (Response & hono.TypedResponse<null, 204, "body">) | (Response & hono.TypedResponse<hono_utils_types.JSONValue, 200, "json">)>; export { type HonoAutumnHandlerOptions, autumnHandler };