br-com-sempresol-qrcode
v1.0.11
Published
qr code integration
Downloads
35
Readme
br-com-sempresol-qrcode
qr code integration
Install
npm install br-com-sempresol-qrcode
npx cap syncAPI
EntryPointPlugin interface for QR code scanning
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>Echo function for testing
| Param | Type | Description |
| ------------- | ------------------------------- | -------------------------- |
| options | { value: string; } | - Object with value string |
Returns: Promise<{ value: string; }>
startScanner(...)
startScanner(options: { value: string; }) => Promise<void>Start the QR code scanner
| Param | Type | Description |
| ------------- | ------------------------------- | ----------------------- |
| options | { value: string; } | - Configuration options |
addListener('onDecode' | 'onError' | 'onNonResponse', ...)
addListener(eventName: 'onDecode' | 'onError' | 'onNonResponse', listenerFunc: (data: { content: string; }) => void) => Promise<{ remove: () => void; }>Add a listener for QR code events
| Param | Type | Description |
| ------------------ | ------------------------------------------------------- | ------------------------------------------------- |
| eventName | 'onDecode' | 'onError' | 'onNonResponse' | - Event type: onDecode, onError, or onNonResponse |
| listenerFunc | (data: { content: string; }) => void | - Callback function for the event |
Returns: Promise<{ remove: () => void; }>
