UNPKG

webzlp

Version:

A small library using WebUSB to print labels on label printers.

36 lines 1.73 kB
import * as Conf from '../../Configs/index.js'; import * as Cmds from '../../Commands/index.js'; export type CmdHostQueryType = 'Error status' | 'Hardware address' | 'Head test' | 'Maintenance alert' | 'Maintenance info' | 'Odometer read' | 'Printhead history' | 'Plug and play string' | 'Serial number' | 'USB info'; /** Warning flags that could be returned by the Error Status query. */ export declare enum HostQueryWarningFlags { /** No warnings present. */ none = 0, /** Media calibration needs to be performed. */ calibrateMedia = 1, /** Printhead needs to be cleaned. */ cleanPrinthead = 2, /** Printhead needs to be replaced. */ replacePrinthead = 4, /** KR403 paper is near the end. */ paperNearEndSensor = 8 } /** Error flags that could be returned by the Error Status query. */ export declare enum HostQueryErrorFlags { /** No errors present. */ none = 0 } export declare class CmdHostQuery implements Cmds.IPrinterExtendedCommand { readonly query: CmdHostQueryType; static typeE: symbol; typeExtended: symbol; commandLanguageApplicability: Conf.PrinterCommandLanguage; name: string; type: "CustomCommand"; effectFlags: Cmds.CommandEffectFlags; toDisplay(): string; constructor(query: CmdHostQueryType); } export declare const cmdHostQueryMapping: Cmds.IPrinterCommandMapping<string>; export declare function handleCmdHostQuery(cmd: Cmds.IPrinterCommand, docState: Cmds.TranspiledDocumentState, _commandSet: Cmds.CommandSet<string>): string | Cmds.TranspileDocumentError; export declare function parseCmdHostQuery(msg: string, cmd: Cmds.IPrinterCommand): Cmds.IMessageHandlerResult<string>; //# sourceMappingURL=CmdHostQuery.d.ts.map