/** * Source-level extractor for `@expose` declarations. * * v1.29 Track C. Methods tagged `@expose` are auto-bound to a kebab-cased * `/api/` POST endpoint so a same-origin SPA can call them via * fetch without writing per-method `@post` directives. `@expose public` * widens this from "SameSite-cookie required" to "any caller" — useful * for anonymous public surfaces (iCal feeds, billing portals, etc.). * * Like `http-route-extractor.ts`, this runs against raw source so the * extractor doesn't depend on whatever shape the published photon-core * SchemaExtractor returns. Both the runtime dispatcher and the Cloudflare * deploy code-gen consume the same output. * * /‍** @expose *‍/ async getCurrentUser() { ... } → private * /‍** @expose public *‍/ async billing() { ... } → public * (no @expose tag) async listUsers() { ... } → MCP-only */ export type ExposeVisibility = 'private' | 'public'; export interface ExposeDef { /** Method on the photon class. */ handler: string; /** SameSite cookie required (`private`) or anonymous OK (`public`). */ visibility: ExposeVisibility; } export declare function extractExposesFromSource(source: string): ExposeDef[]; /** * Convert a method name to its kebab-cased route segment. Matches the * convention the bridge fetch fallback uses (`fetch('/api/', ...)`). * * getCurrentUser → get-current-user * listUsers → list-users * billing → billing */ export declare function methodToKebab(name: string): string; //# sourceMappingURL=expose-route-extractor.d.ts.map