UNPKG

autumn-js

Version:
23 lines (20 loc) 794 B
import { A as AuthResult } from '../../authTypes-jU7ON-I5.js'; type HandleRouteByNameOptions = { /** Route name to execute (e.g. "customers.get_or_create") */ routeName: string; /** Request body */ body: unknown; /** Function to identify the customer */ identify: () => AuthResult; /** Autumn API secret key */ secretKey?: string; /** Autumn API URL */ autumnURL?: string; }; type HandleRouteByNameResult = { status: number; body: unknown; }; /** Handle a route by name (used by Better Auth plugin) */ declare const handleRouteByName: ({ routeName, body, identify, secretKey, autumnURL, }: HandleRouteByNameOptions) => Promise<HandleRouteByNameResult>; export { type HandleRouteByNameOptions, type HandleRouteByNameResult, handleRouteByName };