import { UserTypes } from "@springtree/eva-services-core"; import { IJoinHub } from "./base-hub.js"; /** * Properties required to join a client application hub */ export interface IJoinClientAppHub extends IJoinHub { } export type TClientAppActions = "cfd:attachUserToOrder" | "cfd:cancelOnboarding" | "cfd:cancelScan" | "cfd:confirmUserDetails" | "cfd:confirmUserDetailsResponse" | "cfd:createProfileAddress" | "cfd:customerCreatedSuccessfully" | "cfd:detachUserFromOrder" | "cfd:idle" | "cfd:loyaltyCardScan" | "cfd:loyaltyProgramData" | "cfd:orderLoyaltyData" | "cfd:orderUpdate" | "cfd:pickDiscountProductResponse" | "cfd:profileAddressesData" | "cfd:profileLoyaltyProgramsData" | "cfd:profileLoyaltyProgramsSaved" | "cfd:profileSubscriptionsData" | "cfd:profileSubscriptionsSaved" | "cfd:refreshOrderSubscription" | "cfd:requestLoyaltyData" | "cfd:requestOrderLoyaltyData" | "cfd:requestProfileAddressesData" | "cfd:requestProfileLoyaltyProgramsData" | "cfd:requestProfileSubscriptionsData" | "cfd:requestUserOrderForm" | "cfd:saveProfileAddress" | "cfd:saveProfileLoyaltyPrograms" | "cfd:saveProfileSubscriptions" | "cfd:scanResponse" | "cfd:startOnboarding" | "cfd:startScan" | "cfd:userForm" | "cfd:userFormResponse" | "client:ping" | "client:status" | "notification" | "scanBarcode" | "setOrder" | "setUser" | "transferOrder"; export declare const enum Capabilities { None = 0, SupportsStringIDs = 1, SupportsCFD2 = 2 } /** * The client application details */ export interface IClientApp { /** * Unique uuid v4 to identify the ClientApp instance */ UUID: string; /** * The EVA user agent. Will be retrieved from the core settings if not provided */ UserAgent?: string; /** * Optional user friendly display name of the application */ DisplayName?: string; /** * The current user for the App */ UserID?: string; /** * The current user type for the App */ UserType?: UserTypes; /** * The supported capabilities for the App */ Capabilities?: Capabilities; } /** * The registration client message */ export interface IClientAppRegister { App: IClientApp; } /** * The unregister client message */ export interface IClientAppUnregister { App: IClientApp; } /** * The join channel message * * By default POS/Companion app will join a channel for the current stations * ProxyID. If no ProxyID is available it will join `ST:${StationID}` */ export interface IClientAppJoinChannel { ChannelID: string; } /** * The leave channel message */ export interface IClientAppLeaveChannel { ChannelID: string; } /** * The message format to send to all the client apps in a channel */ export interface IClientAppMessage { /** The channel the message is to be sent to */ ChannelID: string; UUID?: string; /** Message data */ Message: IClientAppMessagePayload; } /** * The generic variant that any message should extend from */ export interface IClientAppMessagePayload { Action: TClientAppActions; Data: unknown; } //# sourceMappingURL=client-app-hub.d.ts.map