import PrefetchOn from './PrefetchOn'; import PrefetchSortBy from './PrefetchSortBy'; /** * [[MessagingSessionConfiguration]] contains the information necessary to start * a messaging session. */ export default class MessagingSessionConfiguration { userArn: string; messagingSessionId: string | null; endpointUrl: string | undefined; chimeClient: any; /** * Maximum amount of time in milliseconds to allow for reconnecting. */ reconnectTimeoutMs: number; /** * Fixed wait amount in milliseconds between reconnecting attempts. */ reconnectFixedWaitMs: number; /** * The short back off time in milliseconds between reconnecting attempts. */ reconnectShortBackoffMs: number; /** * The long back off time in milliseconds between reconnecting attempts. */ reconnectLongBackoffMs: number; /** * The enum to indicate if we want to turn on prefetch feature. Prefetch feature will send out CHANNEL_DETAILS event * upon websocket connection, which includes information about channel, channel messages, channel memberships etc. */ prefetchOn: PrefetchOn | undefined; /** * The enum to indicate the sorting mechanism to use when deciding which channels to Prefetch. Prefetch feature will send out * CHANNEL_DETAILS event upon websocket connection, which includes information about channel, channel messages, channel memberships etc. * The first 50 channels matching the PrefetchSortBy will be sent. If not set, channels will be returned first by those * with unread messages and then those with the latest last sent message timestamp. */ prefetchSortBy: PrefetchSortBy | undefined; /** * Constructs a MessagingSessionConfiguration optionally with userArn, messaging session id, a messaging session * endpoint URL, and the chimeClient. * * endpointUrl is deprecated and should not be used. Internally it is resolved on connect via chimeClient if undefined, and * always re-resolved on reconnect. * * The messaging session id is to uniquely identify this messaging session for the userArn. * If messaging session id is passed in as null, it will be automatically generated. */ constructor(userArn: string, messagingSessionId: string | null, endpointUrl: string | undefined, chimeClient: any); private generateSessionId; }