import { type EventHandler, type H3Event } from 'h3'; import { type ApiJsonSource, type DatasourceSqlExecutor, type MokelaySuccessResponse, type OrchestrationHandlerOptions } from './orchestration-schema.js'; export type { ApiJsonSource, OrchestrationCondition as Condition, } from './orchestration-schema.js'; export type LoadedApiJson = { apiJson: unknown; source: ApiJsonSource; }; /** * Loads a top-level HTTP API and reports the ownership domain used for all * Fragment references made by that API. Root server/Nitro assets are system * APIs; R2 and database records are user APIs. */ export declare function loadApiJsonWithSource(apiJsonUuid: string, executeSql?: DatasourceSqlExecutor): Promise; /** * Backward-compatible raw top-level API loader. Use loadApiJsonWithSource when * the caller will execute the API and therefore needs Fragment source routing. */ export declare function loadApiJson(apiJsonUuid: string, executeSql?: DatasourceSqlExecutor): Promise; /** * Loads a Fragment owned by a built-in API. System Fragments live only below * server/assets/mokelay-apis/fragment (or the equivalent Nitro asset path). */ export declare function loadSystemFragmentApiJson(apiJsonUuid: string): Promise; /** * Loads a Fragment owned by a user API from the authoritative published * database record. System assets and R2 are deliberately excluded. */ export declare function loadUserFragmentApiJson(apiJsonUuid: string, executeSql?: DatasourceSqlExecutor): Promise; /** @deprecated Prefer loadUserFragmentApiJson for explicit source ownership. */ export declare function loadFragmentApiJson(apiJsonUuid: string, executeSql?: DatasourceSqlExecutor): Promise; export declare function executeApiJson(event: H3Event, rawApiJson: unknown, options?: OrchestrationHandlerOptions): Promise<"" | MokelaySuccessResponse>; export declare function createMokelayOrchestrationHandler(options?: OrchestrationHandlerOptions): EventHandler;