import { IHubEventJoin, IHubEventLeave, IHubJoinRequestBase } from './hubs'; /** * The barcode scanned event * * @export * @interface IHubEventBarcode */ export interface IHubEventBarcode { DeviceID: string; Barcode: string; } /** * The session updated event * * @export * @interface IHubEventSessionChanged */ export interface IHubEventSessionChanged { OrderID: number; OldSessionID: string; NewSessionID: string; UserID: number; } /** * Session pushed to device event * Contains an upgraded authentication token * * @export * @interface IHubEventSessionPushedToDeviceID */ export interface IHubEventSessionPushedToDeviceID { DeviceID: string; AuthenticationToken: string; OrderID?: number; } /** * Session push to device request * * @export * @interface IHubPushSessionToDeviceID */ export interface IHubPushSessionToDeviceID { DeviceID: string; OrderID?: number; } /** * Session pushed to device response * * @export * @interface IHubSessionPushedToDeviceIDResponse */ export interface IHubSessionPushedToDeviceIDResponse { DeviceID: string; AuthenticationRequestToken: string; OrderID?: number; } /** * The device hub join request payload * * @export * @interface IHubDeviceJoinRequest */ export interface IHubDeviceJoinRequest extends IHubJoinRequestBase { deviceId: string; barcodeScannedCallback?: (scanEvent: IHubEventBarcode) => void; sessionPushedToDeviceCallback?: (transferEvent: IHubEventSessionPushedToDeviceID) => void; joinCallback?: (joinEvent: IHubEventJoin) => void; leaveCallback?: (leaveEvent: IHubEventLeave) => void; }