/** * Lidta DRP JavaScript Plugin * Promise-based SDK for the Lidta browser extension + native app bridge. */ export declare const API_VERSION = 1; export type Orientation = 'Portrait' | 'Landscape'; export interface PrinterOptions { width: string; height: string; zoom: string; margin_top: string; margin_bottom: string; margin_left: string; margin_right: string; orientation: Orientation; copies: string; } export interface PrinterInfo { name: string; displayName: string; options: PrinterOptions; status?: string; description?: string; is_default?: boolean; } export interface LidtaResponse { apiVersion: number; success: boolean; requestId: string; message?: string; errorCode?: string; } export interface ReadyResponse extends LidtaResponse { type: 'LIDTA_READY'; transport?: 'nativeMessaging' | 'webSocket'; } export interface PrintersResponse extends LidtaResponse { printers: PrinterInfo[]; } export interface PrinterConfigResponse extends LidtaResponse { printer: PrinterInfo; } export interface SavePrinterConfigResponse extends LidtaResponse { printer: PrinterInfo; printers: PrinterInfo[]; } export interface PrintResponse extends LidtaResponse { } export interface PrintHtmlInput { html: string; printers: Array; timeoutMs?: number; } export declare class LidtaError extends Error { code?: string; response?: unknown; constructor(message: string, code?: string, response?: unknown); } export declare function waitUntilReady(timeoutMs?: number): Promise; export declare function isReady(timeoutMs?: number): Promise; export declare function getPrinters(timeoutMs?: number): Promise; export declare function getAllPrinterConfigs(timeoutMs?: number): Promise; export declare function getPrinterConfig(printerName: string, timeoutMs?: number): Promise; export declare function savePrinterConfig(printer: PrinterInfo, timeoutMs?: number): Promise; export declare function printHtml(input: PrintHtmlInput): Promise; export declare function printHtml(html: string, printers: Array, timeoutMs?: number): Promise; export declare function configurePrinter(printerName: string, timeoutMs?: number): Promise; export declare function enableDebug(): () => void; export declare const debug: typeof enableDebug; export declare const LidtaDrp: { API_VERSION: number; waitUntilReady: typeof waitUntilReady; isReady: typeof isReady; getPrinters: typeof getPrinters; getAllPrinterConfigs: typeof getAllPrinterConfigs; getPrinterConfig: typeof getPrinterConfig; configurePrinter: typeof configurePrinter; savePrinterConfig: typeof savePrinterConfig; printHtml: typeof printHtml; enableDebug: typeof enableDebug; debug: typeof enableDebug; }; export default LidtaDrp;