import { OutboundMessageEvent } from "./OutboundMessageEvent"; export class MessageSentEvent extends OutboundMessageEvent { public static eventName = "conversations.MessageSentEvent"; public static eventVersion = 0; public readonly sentAt: string; public readonly sentBy: string; readonly messageContent: { text: string }; // TODO type for message in events readonly platform: string; readonly channelId: string; readonly channelUserId: string; constructor({ tenantId, messageId, messageContent, platform, channelId, channelUserId, sentAt, sentBy }: { tenantId: string; messageId: string; messageContent: { text: string }; platform: string; channelId: string; channelUserId: string; sentAt:string; sentBy:string; }) { super({ eventName: MessageSentEvent.eventName, eventVersion: MessageSentEvent.eventVersion, tenantId, messageId, }); this.platform = platform; this.channelId = channelId; this.channelUserId = channelUserId; this.sentAt = sentAt; this.sentBy = sentBy; this.messageContent = messageContent; } }