import { CloverTransport } from '../transport/CloverTransport'; import { WebSocketCloverDeviceConfiguration } from './WebSocketCloverDeviceConfiguration'; import { IImageUtil } from '../../../util/IImageUtil'; import { PairingDeviceConfiguration } from '../transport/PairingDeviceConfiguration'; /** * This is the base class that is used when connecting directly to a device via the "Network Pay Display". * * A pairing scheme is used when connecting, so the function callbacks for when a pairing code is received, * and when the pairing completes must be implemented here. */ export declare class WebSocketPairedCloverDeviceConfiguration extends WebSocketCloverDeviceConfiguration implements PairingDeviceConfiguration { private uri; private posName; private serialNumber; private authToken; private onPairingCodeHandler; private onPairingSuccessHandler; /** * * @param {string} endpoint - the endpoint of the Clover device. e.g. wss://192.168.1.15:12345/remote_pay * @param {string} applicationId - the applicationId that uniquely identifies the POS. e.g. com.company.MyPOS:2.3.1 * @param {string} posName - Displayed during pairing to display the POS name on the Mini. e.g. MyPOS * @param {string} serialNumber - Displayed during pairing to display the device identifier. e.g. 'Aisle 3' or 'POS-35153234' * @param {string} authToken - The authToken retrieved from a previous pairing activity, passed as an argument to onPairingSuccess. This will be null for the first connection. * @param onPairingCode - Function that will be called when a pairing code is sent. Typically, this would be displayed to the user, and * they would enter this code into the device screen. * @param onPairingSuccess - Function that willbe called when the pairing process is complete, a authentication token is sent that be reused. * @param {Object} webSocketFactoryFunction - the function that will return an instance of the CloverWebSocketInterface * that will be used when connecting. * @param {IImageUtil} imageUtil - utility to translate images into base64 strings. * @param {number} heartbeatInterval - Frequency at which we will ping the device - millis. Defaults to 5000 (millis), minimum value is 2500 millis. To disable the PING set to -1. * @param {number} reconnectDelay - upon disconnect, duration to wait until a reconnect is attempted - millis. Defaults to 3000 (millis), minimum value is 3000 millis. To disable the reconnect set to -1. * @param {number} heartbeatDisconnectTimeout - If a response to a heartbeat ping is not received within this time we will call disconnect. Defaults to 3000 (millis). */ constructor(endpoint: string, applicationId: string, posName: string, serialNumber: string, authToken: string, onPairingCode: (pairingCode: string) => void, onPairingSuccess: (authToken: string) => void, webSocketFactoryFunction: any, imageUtil: IImageUtil, heartbeatInterval?: number, reconnectDelay?: number, heartbeatDisconnectTimeout?: number); getMessagePackageName(): string; getName(): string; getCloverTransport(): CloverTransport; setAuthToken(authToken: string): void; onPairingCode(pairingCode: string): void; onPairingSuccess(authToken: string): void; } export declare class WebSocketPairedCloverDeviceConfigurationBuilder { private readonly applicationId; private readonly uri; private readonly serialNumber; private readonly authToken; private readonly onPairingCodeHandler; private readonly onPairingSuccessHandler; private webSocketFactoryFunction; private imageUtil; private posName; private heartbeatInterval; private heartbeatDisconnectTimeout; private reconnectDelay; /** * @param {string} applicationId - the applicationId that uniquely identifies the POS. e.g. com.company.MyPOS:2.3.1 * @param {string} uri - the endpoint of the Clover device. e.g. wss://192.168.1.15:12345/remote_pay * @param {string} posName - Displayed during pairing to display the POS name on the Mini. e.g. MyPOS * @param {string} serialNumber - Displayed during pairing to display the device identifier. e.g. 'Aisle 3' or 'POS-35153234' * @param {string} authToken - The authToken retrieved from a previous pairing activity, passed as an argument to onPairingSuccess. This will be null for the first connection * @param onPairingCode - Function that will be called when a pairing code is sent. Typically, this would be displayed to the user, and * they would enter this code into the device screen. * @param onPairingSuccess - Function that will be called when the pairing process is complete, a authentication token is sent that be reused. */ constructor(applicationId: string, uri: string, posName: string, serialNumber: string, authToken: string, onPairingCode: (pairingCode: string) => void, onPairingSuccess: (authToken: string) => void); getApplicationId(): string; getUri(): string; getSerialNumber(): string; getAuthToken(): string; getWebSocketFactoryFunction(): any; setWebSocketFactoryFunction(value: any): WebSocketPairedCloverDeviceConfigurationBuilder; getImageUtil(): IImageUtil; setImageUtil(value: IImageUtil): WebSocketPairedCloverDeviceConfigurationBuilder; getPosName(): string; setPosName(value: string): WebSocketPairedCloverDeviceConfigurationBuilder; getHeartbeatInterval(): number; setHeartbeatInterval(value: number): WebSocketPairedCloverDeviceConfigurationBuilder; getHeartbeatDisconnectTimeout(): number; setHeartbeatDisconnectTimeout(value: number): WebSocketPairedCloverDeviceConfigurationBuilder; getReconnectDelay(): number; setReconnectDelay(value: number): WebSocketPairedCloverDeviceConfigurationBuilder; build(): WebSocketPairedCloverDeviceConfiguration; }