Add new listener to receive broadcast notifications
the listener to add
Generates a WebSocketCloudCloverDeviceConfiguration with a "raw" configuration
a Json object that has values that can be used to construct the object configuration.
Get the access token, either from the configuration or from the window URL, or redirect.
Gets the deviceId, calling the webservice to get the device list if necessary. If the deviceId is not set, and the deviceSerialId is not set, then this will call notify of an error. If the deviceId is not set, and the deviceSerialId is set then the call to get the devices is made the result is used to build a mapping that is passed to handleDeviceResult.
the raw configuration object
Get the merchantId or redirect.
Uses the mapping of devices to find the correct deviceId to use in the configuration. This then moves on to generateNewConfigurationAndInitialize.
Initialize the connector with a new config
the configuration for the connector
Checks for a oauth token, does a redirect based on the configuration domain and clientid if necessary, then moves on to #onceWeHaveTheAccessToken(...)
the raw configuration object
Gets the merchantId, redirecting if necessary, then moves on to #getDeviceId(...)
the raw configuration object
Remove a listener
the listener to remove
Builds a mapping of the passed set of devices, from the device serial number to the device.
the mapping from the device serial number to the device
Generated using TypeDoc
This connector uses Browser specific objects to work in a manner compatible with the 1.1.0 implementation of the ICloverConnector.
It uses the domain && clientId to get the oauthtoken, then gets the merchantId, and the deviceId. This process may involve redirection of the page, and XHR requests, all of which are performed using default Browser objects.
Once these values have been obtained, a new WebSocketCloudCloverDeviceConfiguration is generated using the default Browser WebSocket implementation, and the connector is initialized.