UNPKG

je_nfc_sdk

Version:

A comprehensive React Native SDK for NFC-based device control and communication

59 lines 2.05 kB
import React from 'react'; export interface OperationConfig { writeCmd: number; writeSubCmd: number; readCmd: number; writeApdu: number[]; readApdu: number[]; displayName: string; processingMessage: string; icon: string; } export type OperationState = 'IDLE' | 'WRITE_PENDING' | 'READ_READY_WRITE' | 'READ_READY_READ' | 'READ_READY' | 'READ_PENDING' | 'PROCESSING' | 'ERROR'; export interface OperationStatus { state: OperationState; lastOperation: { type: 'WRITE' | 'READ' | null; status: 'SUCCESS' | 'FAILED' | 'COMPLETED' | null; timestamp: number | null; }; processingBit: number; data?: string; resetRequested?: boolean; processingStartTime?: number; timer?: { startTime: number; currentValue: number; isRunning: boolean; }; } export type OperationType = 'nfc' | 'solenoid-open' | 'solenoid-close' | 'schedule' | 'time' | 'pressure' | 'waterflow' | 'fetch-solenoid-states' | 'testing'; export interface Schedule { id: number; Solenoid: number; startTime: Date; scheduledDate: Date; duration: number; enabled: boolean; todelete: boolean; } export interface ControlScreenProps { translate?: (key: string) => string; operationConfigs?: Record<string, OperationConfig>; icons?: Record<string, any>; onTagConnected?: (tagInfo: any) => void; onOperationComplete?: (operationType: string, result: any) => void; onError?: (error: string) => void; initialSolenoidStates?: Record<number, boolean>; initialSchedules?: Schedule[]; showMenu?: boolean; categories?: string[]; theme?: 'light' | 'dark'; enableScheduling?: boolean; enableSensorData?: boolean; enableTesting?: boolean; } export declare const DEFAULT_OPERATION_CONFIGS: Record<string, OperationConfig>; export declare const ControlScreen: React.ForwardRefExoticComponent<ControlScreenProps & React.RefAttributes<any>>; export default ControlScreen; //# sourceMappingURL=ControlScreen.d.ts.map