Kaizen
Browse modulesPeripheralsperipherals/sharedFunctions

Function: encodeDrawerKickForDevice()

function encodeDrawerKickForDevice(device: 
  | Pick<{
  connection:   | {
     kind: "webusb";
     usbProductId: number;
     usbSerialNumber?: string | null;
     usbVendorId: number;
   }
     | {
     host: string;
     kind: "network";
     port: number;
   }
     | {
     kind: "qz";
     printerName: string;
   };
  deviceType: "receipt_printer" | "cash_drawer" | "barcode_scanner";
  drawerPin?: 2 | 5 | null;
  id: string;
  make?: string | null;
  metadata?: Record<string, unknown> | null;
  model?: string | null;
  name: string;
  organizationId: string;
  paperWidthChars?: 32 | 35 | 42 | 44 | 48 | null;
  printerLanguage?: "esc-pos" | "star-prnt" | "star-line" | null;
  stationId?: string | null;
  status: "active" | "inactive";
  storeId?: string | null;
}, "printerLanguage" | "drawerPin">
  | null
  | undefined, config?: Partial<{
  offTimeMs: number;
  onTimeMs: number;
  pin: 2 | 5;
}>): Uint8Array;

Defined in: shared/peripherals/encoder.ts:137

Drawer-kick bytes with a registry device's language/pin defaults applied.

Parameters

ParameterType
device| Pick<{ connection: | { kind: "webusb"; usbProductId: number; usbSerialNumber?: string | null; usbVendorId: number; } | { host: string; kind: "network"; port: number; } | { kind: "qz"; printerName: string; }; deviceType: "receipt_printer" | "cash_drawer" | "barcode_scanner"; drawerPin?: 2 | 5 | null; id: string; make?: string | null; metadata?: Record<string, unknown> | null; model?: string | null; name: string; organizationId: string; paperWidthChars?: 32 | 35 | 42 | 44 | 48 | null; printerLanguage?: "esc-pos" | "star-prnt" | "star-line" | null; stationId?: string | null; status: "active" | "inactive"; storeId?: string | null; }, "printerLanguage" | "drawerPin"> | null | undefined
config?Partial<{ offTimeMs: number; onTimeMs: number; pin: 2 | 5; }>

Returns

Uint8Array

On this page