import type { DeviceConnectionItem, LocalPeripheralBinding, PeripheralConnectTarget, PeripheralDevice, PeripheralPlugin, PeripheralUsage } from '../types';
interface BaseServiceParams {
    app?: any;
    connection: DeviceConnectionItem;
}
interface ConnectPeripheralConnectionParams extends BaseServiceParams {
    plugin?: PeripheralPlugin;
    target: PeripheralDevice | PeripheralConnectTarget;
    peripheralUsage?: PeripheralUsage;
}
interface ReconnectPeripheralConnectionParams extends BaseServiceParams {
    plugin?: PeripheralPlugin;
    physicalDevice?: PeripheralDevice;
    peripheralUsage?: PeripheralUsage;
}
interface RemovePeripheralConnectionParams extends BaseServiceParams {
    plugin?: PeripheralPlugin;
    physicalDevice?: PeripheralDevice;
}
interface SyncLocalPeripheralBindingsParams {
    app?: any;
    connections: DeviceConnectionItem[];
}
interface UpdatePeripheralUsageParams extends BaseServiceParams {
    localBinding?: LocalPeripheralBinding;
    physicalDevice?: PeripheralDevice;
    peripheralUsage: PeripheralUsage;
}
export declare const getSQLiteAdapter: (app?: any) => Promise<any>;
export declare const saveLocalPeripheralBinding: (app: any, binding: LocalPeripheralBinding) => Promise<void>;
export declare const getLocalPeripheralBindings: (app?: any) => Promise<LocalPeripheralBinding[]>;
export declare const deleteLocalPeripheralBinding: (app: any, connection: DeviceConnectionItem) => Promise<void>;
export declare const syncLocalPeripheralBindings: ({ app, connections, }: SyncLocalPeripheralBindingsParams) => Promise<LocalPeripheralBinding[]>;
/**
 * Connects one configured device connection to a physical peripheral.
 *
 * Execution order:
 * 1. Calls the native peripheral plugin with either uuid or ip.
 * 2. Writes a SQLite cache record with physical device info and optional peripheral usage.
 *
 * @returns The connected physical device and the updated local cache binding.
 */
export declare const connectPeripheralConnection: ({ app, plugin, connection, target, peripheralUsage, }: ConnectPeripheralConnectionParams) => Promise<{
    physicalDevice: PeripheralDevice;
    binding: LocalPeripheralBinding;
}>;
export declare const savePeripheralConnectionStatus: ({ app, connection, physicalDevice, peripheralUsage, }: {
    app?: any;
    connection: DeviceConnectionItem;
    physicalDevice: PeripheralDevice;
    peripheralUsage?: PeripheralUsage | undefined;
}) => Promise<{
    binding: LocalPeripheralBinding;
    physicalDevice: PeripheralDevice;
}>;
/**
 * Reconnects one configured device connection to its known physical peripheral.
 *
 * Execution order:
 * 1. Calls the native peripheral reconnect API by uuid, falling back to connect when the host plugin has not exposed reconnect yet.
 * 2. Writes the returned connection state to SQLite.
 *
 * @returns The updated local cache binding.
 */
export declare const reconnectPeripheralConnection: ({ app, plugin, connection, physicalDevice, peripheralUsage, }: ReconnectPeripheralConnectionParams) => Promise<{
    binding: LocalPeripheralBinding;
    physicalDevice: PeripheralDevice;
}>;
export declare const removePeripheralConnection: ({ app, plugin, connection, physicalDevice, }: RemovePeripheralConnectionParams) => Promise<void>;
export declare const updatePeripheralUsage: ({ app, connection, localBinding, physicalDevice, peripheralUsage, }: UpdatePeripheralUsageParams) => Promise<{
    binding: {
        physical_uuid: string | undefined;
        physical_device: PeripheralDevice | undefined;
        is_connect: boolean;
        id: string;
        connection_id: number;
        source_device_id: number;
        target_device_id: number;
        type_code: string;
        model_code?: string | undefined;
        peripheral_usage?: PeripheralUsage | undefined;
        updated_at: number;
        payload: DeviceConnectionItem;
    };
    physicalDevice: PeripheralDevice | undefined;
}>;
export {};
