import { Subject, Observable } from 'rxjs' export interface SocketStateInterface { userId: string userIpAddress: string sessionToken: string socket: any channels: string[] } export interface ChannelStateInterface { channel: any onMessageSubject: string } export interface AuthenticatePayload { clusterName: string } export interface AuthenticateSuccessPayload { clusterName: string userIpAddress: string userId: string sessionToken: string } export interface ConnectPayload { clusterName: string socket: any } export interface JoinChannelPayload { clusterName: string channelName: string } export interface JoinChannelPendingPayload { clusterName: string channelName: string channel: any onMessageSubject: Subject, leaveChannel$: Observable } export interface JoinChannelSuccessPayload { clusterName: string channelName: string channel: any leaveChannel$: Observable } export interface JoinChannelFailurePayload { clusterName: string channelName: string channel: any error: any }