UNPKG

sunmi-device-sdk

Version:

JavaScript SDK for Sunmi card readers and printers

65 lines (64 loc) 1.23 kB
/** * Card types supported by Sunmi card readers */ export declare enum CardType { MIFARE = "mifare", IC = "ic", MAGNETIC = "magnetic", PSAM = "psam" } /** * Mifare key types for authentication */ export declare enum MifareKeyType { KEY_A = "A", KEY_B = "B" } /** * Text alignment options for printing */ export declare enum PrintAlignment { LEFT = 0, CENTER = 1, RIGHT = 2 } /** * Text position for barcode printing */ export declare enum BarcodeTextPosition { NO_TEXT = 0, ABOVE = 1, BELOW = 2, BOTH = 3 } /** * Printer status codes */ export declare enum PrinterStatus { NORMAL = "NORMAL", OUT_OF_PAPER = "OUT_OF_PAPER", ERROR = "ERROR", COVER_OPEN = "COVER_OPEN", COVER_ERROR = "COVER_ERROR", KNIFE_ERROR_1 = "KNIFE_ERROR_1", KNIFE_ERROR_2 = "KNIFE_ERROR_2", OVER_HEATING = "OVER_HEATING", FIRMWARE_UPDATING = "FIRMWARE_UPDATING" } /** * Card reading result */ export interface CardReadResult { cardType: string; cardNumber?: string; atr?: string; uid?: string; } /** * Printer configuration */ export interface PrinterConfig { alignment?: PrintAlignment; fontSize?: number; fontName?: string; }