import type { InterfaceAdapterRuntimeCaller, InterfaceAdapterRuntimeGate } from "./interfaceAdapterRuntime.js";
export type CustomInterfaceLayerBoundary = "input" | "contract" | "governance" | "runtime-state" | "binding";
export type CustomInterfaceLifecycle = "registered" | "reused" | "suspended" | (string & {});
export type CustomInterfaceLayerErrorCode = "MISSING_RUNTIME_ID" | "MISSING_CALLER" | "MISSING_CUSTOM_INTERFACE_LAYER" | "MISSING_CUSTOM_INTERFACE_LAYER_ID" | "EMPTY_CUSTOM_INTERFACES" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED";
export type CustomInterfaceLayerError = {
    code: CustomInterfaceLayerErrorCode;
    message: string;
    boundary: CustomInterfaceLayerBoundary;
    publicSafe: true;
};
export type CustomInterfaceDefinitionRef = {
    interfaceId: string;
    contractRef: string;
    lifecycle?: CustomInterfaceLifecycle;
    ruleRef?: string;
};
export type CustomInterfaceLayerInput = {
    id?: string;
    source?: "application" | "official-module" | "runtime" | "test";
    definitions?: readonly CustomInterfaceDefinitionRef[];
    metadata?: Readonly<Record<string, unknown>>;
};
export type CustomInterfaceLayerBindingRequest = {
    runtimeId?: string;
    caller?: InterfaceAdapterRuntimeCaller;
    customInterfaceLayer?: CustomInterfaceLayerInput;
    runtimeReady?: boolean;
    contract?: InterfaceAdapterRuntimeGate;
    governance?: InterfaceAdapterRuntimeGate;
};
export type CustomInterfaceLayerBinding = {
    bindingId: string;
    runtimeId: string;
    layerId: string;
    caller: InterfaceAdapterRuntimeCaller;
    source: "application" | "official-module" | "runtime" | "test";
    surface: "customInterfaceLayer";
    route: "runtime.interfaceAdapter.customInterfaceLayer";
    definitions: readonly CustomInterfaceDefinitionRef[];
    interfaceIds: readonly string[];
    contractRefs: readonly string[];
    metadata: Readonly<Record<string, unknown>>;
    contractChecked: true;
    governanceChecked: true;
    dryRun: true;
    unsafeSideEffects: false;
};
export type CustomInterfaceLayerBindingResult = {
    ok: true;
    binding: CustomInterfaceLayerBinding;
    events: readonly string[];
} | {
    ok: false;
    error: CustomInterfaceLayerError;
    events: readonly string[];
};
export declare function bindCustomInterfaceLayer(request?: CustomInterfaceLayerBindingRequest): CustomInterfaceLayerBindingResult;
