sunmi-plugin
v0.0.44
Published
sunmi-print
Downloads
141
Readme
sunmi-plugin
sunmi-print
Install
npm install sunmi-plugin
npx cap syncAPI
echo(...)searchPrinter(...)selectPrinter(...)setIpPrinter(...)printReceiptVoucher(...)printReceipt(...)connect()disconnectPrinter()requestPermissionsConnections()checkConnection()
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
| ------------- | ------------------------------- |
| options | { value: string; } |
Returns: Promise<{ value: string; }>
searchPrinter(...)
searchPrinter(options: { method: number; }) => Promise<{ status: string; printers: any; }>| Param | Type |
| ------------- | -------------------------------- |
| options | { method: number; } |
Returns: Promise<{ status: string; printers: any; }>
selectPrinter(...)
selectPrinter(options: { name: string; }) => Promise<{ selected: string; }>| Param | Type |
| ------------- | ------------------------------ |
| options | { name: string; } |
Returns: Promise<{ selected: string; }>
setIpPrinter(...)
setIpPrinter(options: { ip: string; }) => Promise<{ status: string; ip: string; }>| Param | Type |
| ------------- | ---------------------------- |
| options | { ip: string; } |
Returns: Promise<{ status: string; ip: string; }>
printReceiptVoucher(...)
printReceiptVoucher(options: { content: any; }) => Promise<{ message: string; }>| Param | Type |
| ------------- | ------------------------------ |
| options | { content: any; } |
Returns: Promise<{ message: string; }>
printReceipt(...)
printReceipt(options: { content: any; }) => Promise<{ message: string; }>| Param | Type |
| ------------- | ------------------------------ |
| options | { content: any; } |
Returns: Promise<{ message: string; }>
connect()
connect() => Promise<void>disconnectPrinter()
disconnectPrinter() => Promise<void>requestPermissionsConnections()
requestPermissionsConnections() => Promise<{ permissions: { location: boolean; bluetooth: boolean; }; }>Returns: Promise<{ permissions: { location: boolean; bluetooth: boolean; }; }>
checkConnection()
checkConnection() => Promise<{ status: string; }>Returns: Promise<{ status: string; }>
