/** A physical device paired to an org (and usually a branch) via ops-edge-agent. */ export interface EdgeDevice { id: string; label: string; kind: string; status: 'online' | 'offline'; capabilities: string[]; sucursalId?: string | number | null; } /** Stable react-query key for the org's edge device list. */ export declare function edgeDevicesKey(): readonly ["edge-devices"]; /** * Pick the best device for `capability`: online devices only, preferring one * paired to `sucursalId` and falling back to an org-level device (no * `sucursalId`) when the branch has none. Pure + exported for unit testing. */ export declare function resolveEdgeDevice(devices: EdgeDevice[], capability: string, sucursalId?: string | number | null): EdgeDevice | undefined; export interface UseEdgeDeviceOptions { /** Override staleTime (default 15s — device pairing/online status can change). */ staleTime?: number; /** Poll interval; devices go on/offline without any local event to react to. */ refetchInterval?: number; /** Defer fetching. */ enabled?: boolean; } export interface UseEdgeDeviceResult { device: EdgeDevice | undefined; isLoading: boolean; error: unknown; refetch: () => void; } /** * Resolve the best online device offering `capability` for the active branch. * * @example * const { device, isLoading } = useEdgeDevice('print') * if (device) await sendEdgeDeviceCommand(device.id, { type: 'print', payload }) */ export declare function useEdgeDevice(capability: string, opts?: UseEdgeDeviceOptions): UseEdgeDeviceResult; /** * Send a command to a paired edge device (e.g. a print job, an open-drawer * pulse, a weigh request). Generic over the command payload shape — each * addon defines its own command contract with the local agent. * * @example * const send = useSendEdgeDeviceCommand() * await send.mutateAsync({ deviceId: device.id, command: { type: 'print', payload } }) */ export declare function sendEdgeDeviceCommand(api: Pick, deviceId: string, command: Record): Promise; export interface SendEdgeDeviceCommandArgs { deviceId: string; command: Record; } /** Mutation wrapper over {@link sendEdgeDeviceCommand} bound to the host's ApiClient. */ export declare function useSendEdgeDeviceCommand(): import("@tanstack/react-query").UseMutationResult; //# sourceMappingURL=use-edge-device.d.ts.map