import { CloverTransport } from '../transport/CloverTransport'; import { WebSocketCloverDeviceConfiguration } from './WebSocketCloverDeviceConfiguration'; import { HttpSupport } from '../../../util/HttpSupport'; import { IImageUtil } from '../../../util/IImageUtil'; /** * Configuration used to create a connection to a device via the Clover cloud. */ export declare class WebSocketCloudCloverDeviceConfiguration extends WebSocketCloverDeviceConfiguration { private cloverServer; private accessToken; private httpSupport; private merchantId; private deviceId; private friendlyId; private forceConnect; /** * * @param {string} applicationId - the applicationId that uniquely identifies the POS. * e.g. com.company.MyPOS:2.3.1 for the first connection * @param {Object} webSocketFactoryFunction - the function that will return an instance of the * CloverWebSocketInterface that will be used when connecting. For Browser implementations, this can be * BrowserWebSocketImpl.createInstance. For NodeJS implementations, this will be defined differently. * @param {IImageUtil} imageUtil - utility to translate images into base64 strings. * @param {string} cloverServer the base url for the clover server used in the cloud connection. * EX: https://www.clover.com, http://localhost:9000 * @param {string} accessToken - the OAuth access token that will be used when contacting the clover server * @param {HttpSupport} httpSupport - the helper object used when making http requests. * @param {string} merchantId - the merchant the device belongs to. * @param {string} deviceId - the id (not uuid) of the device to connect to * @param {string} friendlyId - an identifier for the specific terminal connected to this device. This id is used * in debugging and may be sent to other clients if they attempt to connect to the same device. It will also be * sent to other clients that are currently connected if this device does a forceConnect. * @param {boolean} forceConnect - if true, overtake any existing connection. * @param {number} heartbeatInterval - Frequency at which we will ping the device - millis. Defaults to -1, which means the heartbeat check is disabled. * @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. */ constructor(applicationId: string, webSocketFactoryFunction: any, imageUtil: IImageUtil, cloverServer: string, accessToken: string, httpSupport: HttpSupport, merchantId: string, deviceId: string, friendlyId: string, forceConnect?: boolean, heartbeatInterval?: number, reconnectDelay?: number, heartbeatDisconnectTimeout?: number); getMessagePackageName(): string; getName(): string; getCloverDeviceType(): any; getCloverTransport(): CloverTransport; } export declare class WebSocketCloudCloverDeviceConfigurationBuilder { private readonly applicationId; private readonly deviceId; private readonly merchantId; private readonly accessToken; private cloverServer; private httpSupport; private webSocketFactoryFunction; private imageUtil; private friendlyId; private forceConnect; private heartbeatInterval; private heartbeatDisconnectTimeout; private reconnectDelay; /** * * @param {string} applicationId - the applicationId that uniquely identifies the POS. * e.g. com.company.MyPOS:2.3.1 for the first connection * @param {string} deviceId - the id (not uuid) of the device to connect to * @param {string} merchantId - the merchant the device belongs to. * @param {string} accessToken - the OAuth access token that will be used when contacting the clover server */ constructor(applicationId: string, deviceId: string, merchantId: string, accessToken: string); getApplicationId(): string; getDeviceId(): string; getMerchantId(): string; getAccessToken(): string; getCloverServer(): string; setCloverServer(value: string): WebSocketCloudCloverDeviceConfigurationBuilder; getHttpSupport(): HttpSupport; setHttpSupport(value: HttpSupport): WebSocketCloudCloverDeviceConfigurationBuilder; getWebSocketFactoryFunction(): any; setWebSocketFactoryFunction(value: any): WebSocketCloudCloverDeviceConfigurationBuilder; getImageUtil(): IImageUtil; setImageUtil(value: IImageUtil): WebSocketCloudCloverDeviceConfigurationBuilder; getFriendlyId(): string; setFriendlyId(value: string): WebSocketCloudCloverDeviceConfigurationBuilder; getForceConnect(): boolean; setForceConnect(value: boolean): WebSocketCloudCloverDeviceConfigurationBuilder; getHeartbeatInterval(): number; setHeartbeatInterval(value: number): WebSocketCloudCloverDeviceConfigurationBuilder; getHeartbeatDisconnectTimeout(): number; setHeartbeatDisconnectTimeout(value: number): WebSocketCloudCloverDeviceConfigurationBuilder; getReconnectDelay(): number; setReconnectDelay(value: number): WebSocketCloudCloverDeviceConfigurationBuilder; build(): WebSocketCloudCloverDeviceConfiguration; }