import type { DeviceConnectionItem, ConnectionFactStatus, DisplayConnectionStatus, LocalPeripheralBinding, PeripheralConnectionRow, PeripheralConnectParams, PeripheralConnectStatus, PeripheralConnectTarget, PeripheralConnectType, PeripheralDevice, PeripheralFindListParams, PeripheralUsage, SetupFlowState } from '../types'; export declare const TESTABLE_PRINTER_TYPES: string[]; export declare const PERIPHERAL_TABLE_NAME = "peripheral_bindings"; export declare const isRecord: (value: unknown) => value is Record; export declare const normalizeConnectType: (value?: string) => PeripheralConnectType | undefined; export declare const getPeripheralUuid: (connection: DeviceConnectionItem) => string; export declare const getPeripheralIp: (connection: DeviceConnectionItem) => string; export declare const getPhysicalDeviceDisplay: (device?: PeripheralDevice) => string; /** 手动 IP 是唯一允许未绑定设备自动连接的配置入口。 */ export declare const getManualConnectionIp: (connection: DeviceConnectionItem) => string; export declare const getConnectionDeviceIdentity: (connection: DeviceConnectionItem) => Pick | undefined; /** `CONNECTED` 校准是全局查询,只传原生约定的 `other` 品牌和连接状态。 */ export declare const buildConnectedFindListParams: () => PeripheralFindListParams; /** 生成原生连接入参,要求业务设备身份和 `uuid`/`ip` 目标至少同时具备。 */ export declare const buildPeripheralConnectParams: (connection: DeviceConnectionItem, target: PeripheralDevice | PeripheralConnectTarget) => PeripheralConnectParams | undefined; /** 按业务连接关系生成通用 `findList` 入参,供明确状态的查询场景复用。 */ export declare const buildFindListParams: (connection: DeviceConnectionItem, connectStatus: PeripheralConnectStatus, uuid?: string) => PeripheralFindListParams | undefined; /** `NOT_CONNECT` 持续发现必须按当前业务设备身份搜索,避免不同外设互相串候选。 */ export declare const buildNotConnectedFindListParams: (connection: DeviceConnectionItem) => PeripheralFindListParams | undefined; /** 为原生持续发现参数生成稳定键,用于避免重复启动同一搜索。 */ export declare const createFindListSearchKey: (params: PeripheralFindListParams) => string; /** 按 `uuid` 去重原生返回的物理设备列表,后出现的数据覆盖旧数据。 */ export declare const uniquePeripheralDevices: (devices: PeripheralDevice[]) => PeripheralDevice[]; /** 原生不同端可能用 `brand`、`device_brand`、`device_type` 等字段,这里统一做候选匹配。 */ export declare const matchesPeripheralDiscovery: (connection: DeviceConnectionItem, device: PeripheralDevice) => boolean; /** 设备事实状态只依据是否绑定物理设备以及原生连接结果计算。 */ export declare const getConnectionFactStatus: (row: PeripheralConnectionRow) => ConnectionFactStatus; export declare const isLabelPrinterConnection: (connection: DeviceConnectionItem) => boolean; /** 业务设置是否完成独立于连接过程,避免把配置缺失误判成连接状态。 */ export declare const isPeripheralSetupIncomplete: (row: PeripheralConnectionRow) => boolean; /** 展示状态只在最后一层合成,流程控制不要直接依赖它。 */ export declare const getDisplayConnectionStatus: (factStatus: ConnectionFactStatus, flowState?: SetupFlowState) => DisplayConnectionStatus; export declare const getPhysicalDeviceFromConnection: (connection: DeviceConnectionItem) => PeripheralDevice | undefined; export declare const createLocalPeripheralBinding: (connection: DeviceConnectionItem, physicalDevice?: PeripheralDevice, peripheralUsage?: PeripheralUsage) => LocalPeripheralBinding; /** 用接口条目和本地缓存轻量组装渲染行,不转换后端字段命名。 */ export declare const createPeripheralRow: (connection: DeviceConnectionItem, localBinding?: LocalPeripheralBinding) => PeripheralConnectionRow; /** 刷新连接列表时只替换云端字段,保留已有物理设备状态和业务用途。 */ export declare const mergeConnectionRows: (prevRows: PeripheralConnectionRow[], nextConnections: DeviceConnectionItem[], localBindingMap?: Record) => PeripheralConnectionRow[];