/** * Standalone Server * * Creates a self-contained Hono server with telephony routes. * Use this when running talker WITHOUT chatter — you provide your own * chatFn to handle the actual chatbot logic. * * @example * ```typescript * import { createStandaloneServer } from "@diegoaltoworks/talker"; * * const app = await createStandaloneServer({ * openaiApiKey: process.env.OPENAI_API_KEY!, * twilio: { * accountSid: process.env.TWILIO_ACCOUNT_SID, * authToken: process.env.TWILIO_AUTH_TOKEN, * phoneNumber: process.env.TWILIO_PHONE_NUMBER, * }, * transferNumber: "+441234567890", * chatFn: async (phoneNumber, message) => { * // Your chatbot logic here * return "I received your message: " + message; * }, * }); * * Bun.serve({ port: 3000, fetch: app.fetch }); * ``` */ import { Hono } from "hono"; import type { TalkerConfig } from "./types"; export interface StandaloneConfig extends TalkerConfig { /** OpenAI API key (required in standalone mode) */ openaiApiKey: string; /** Enable CORS. Default: true */ cors?: boolean; } /** * Create a standalone Hono server with telephony routes. * * This does NOT require chatter. Provide a `chatFn` to handle chatbot logic, * or leave it undefined for a telephony-only server (flows + transfer only). */ export declare function createStandaloneServer(config: StandaloneConfig): Promise>;