import { IClientAppMessagePayload } from "./client-app-hub.js"; /** * The set current order message payload */ export interface IClientAppSetOrderPayload extends IClientAppMessagePayload { Action: "setOrder"; Data: { OrderID: string; }; } /** * The set current user message payload. * Can optionally also supply a target OrderID to combine the setOrder behavior * The LanguageID can optionally be used to change the language of the receiving app */ export interface IClientAppSetUserPayload extends IClientAppMessagePayload { Action: "setUser"; Data: { /** * @deprecated Should use TemporaryToken * Client should check for TemporaryToken first and if it is not present then use UserToken */ UserToken?: string; /** * This property is marked optional to support backward compatibility for the deprecated UserToken property. * In time it will be removed and the TemporaryToken property will be required. * The token is generated using the GetTemporaryRedirectToken service. It has a limited lifetime of only 30 seconds. * It can and should be used with the Login service to authenticate the user using the AuthenticationToken property (not the header). */ TemporaryToken?: string; OrderID?: string; LanguageID?: string; }; } /** * A generic text message payload which can be used for chat or notifications */ export interface IClientAppNotificationPayload extends IClientAppMessagePayload { Action: "notification"; Data: { Message: string; }; } /** * This message is used to transfer orders between EVA applications. * The payload for this message starts with a call to SvcGenerateSessionBarcode. * The app that is offering the order to another app joins a channel with response barcode. * where the token comes from the GenerateSessionBarcode response. * This barcode is presented to another app who will join the same channel. * When the received app successfully makes the order its current order it can * send this message to signal success (ACCEPTED) or failure (DECLINED). * The sender can then send the RELEASED message as a final cleanup. * Apps should leave the transfer channel when this exchange has completed. */ export interface IClientAppTransferOrderPayload extends IClientAppMessagePayload { Action: "transferOrder"; Data: { OrderID: string; UserID: string; /** * @deprecated Should use TemporaryToken * Client should check for TemporaryToken first and if it is not present then use Token */ Token?: string; /** * This property is marked optional to support backward compatibility for the deprecated UserToken property. * In time it will be removed and the TemporaryToken property will be required. * The token is generated using the GetTemporaryRedirectToken service. It has a limited lifetime of only 30 seconds. * It can and should be used with the Login service to authenticate the user using the AuthenticationToken property (not the header). */ TemporaryToken?: string; Status: "AVAILABLE" | "ACCEPTED" | "DECLINED" | "RELEASED"; }; } /** * This message is used to send a barcode scan event to another application. * Can be used to use another application as a remote barcode scanner. */ export interface IClientAppScanBarcodePayload extends IClientAppMessagePayload { Action: "scanBarcode"; Data: { Barcode: string; }; } //# sourceMappingURL=client-app-hub-core.d.ts.map