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 DisconnectPeripheralConnectionParams extends BaseServiceParams { physicalDevice?: PeripheralDevice; } interface SyncPeripheralConnectionStatusParams extends BaseServiceParams { physicalDevice: PeripheralDevice; peripheralUsage?: PeripheralUsage; } interface SyncLocalPeripheralBindingsParams { app?: any; connections: DeviceConnectionItem[]; } interface UpdatePeripheralUsageParams extends BaseServiceParams { localBinding?: LocalPeripheralBinding; physicalDevice?: PeripheralDevice; peripheralUsage: PeripheralUsage; } export declare const getSQLiteAdapter: (app?: any) => Promise; export declare const saveLocalPeripheralBinding: (app: any, binding: LocalPeripheralBinding) => Promise; export declare const getLocalPeripheralBindings: (app?: any) => Promise; export declare const syncLocalPeripheralBindings: ({ app, connections, }: SyncLocalPeripheralBindingsParams) => Promise; /** * Connects one configured device connection to a physical peripheral. * * Execution order: * 1. Calls the native peripheral plugin with either uuid or ip. * 2. Reports the returned physical device to the connected API via `_target_device.data`. * 3. 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 syncPeripheralConnectionStatus: ({ app, connection, physicalDevice, peripheralUsage, }: SyncPeripheralConnectionStatusParams) => Promise<{ binding: LocalPeripheralBinding; physicalDevice: PeripheralDevice; }>; /** * Disconnects one configured device connection from its physical peripheral. * * Execution order: * 1. Reports disconnected state to the API. * 2. Writes a SQLite cache record with `is_connect=false`. * 3. Clears `peripheral_usage`, so label printers must choose usage again next time. * * @returns The updated local cache binding. */ export declare const disconnectPeripheralConnection: ({ app, connection, physicalDevice, }: DisconnectPeripheralConnectionParams) => Promise<{ binding: LocalPeripheralBinding; physicalDevice: { is_connect: boolean; status_code: string; uuid: string; ip?: string | undefined; port?: string | undefined; mac?: string | undefined; name: string; connect_type: import("../types").PeripheralConnectType; metadata?: Record | undefined; } | undefined; }>; 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 {};