import { PluginListenerHandle } from "@capacitor/core"; export interface RFIDPlugin { /** * Connect handheld to the module. * * @since 1.0.0 */ connect(options: ReaderConnectOptions): Promise; /** * Disconnect handheld to the module. * * @since 1.0.0 */ disconnect(): Promise; /** * Begin start inventory task (deprecated). * * @since 1.0.0 */ startScan(): Promise; /** * Stop inventory task (deprecated). * * @since 1.0.0 */ stopScan(): Promise; /** * Clear scanned inventory task. * * @since 1.0.0 */ clear(): Promise; /** * Set options for handheld using recommended settings (Antenna power, Mode set). * * @since 1.0.0 */ setOption(options: ReaderOptions): Promise; addWatcher(): Promise; removeWatcher(): Promise; /** * Called when an action is performed. * * @since 1.0.0 */ addListener(eventName: 'rfid', listenerFunc: (data: any) => void): Promise & PluginListenerHandle; /** * Remove all native listeners for this plugin. * * @since 1.0.0 */ removeAllListeners(): Promise; } export interface ReaderScanResult { tags: TagList[]; } export interface TagList { sort: string; epcId: string; count: string; ant: string; protocol: string; rssi: string; frequency: string; rfu: string; timestamp: string; emd: string; nxpu8_tid: string; nxpu8_bid: string; } export interface ReaderConnectOptions { address: string; } export interface ReaderConnectResult { connected: boolean; } export interface ReaderOptions { readerMode: string; antennaPower: number; }