import Outgoing from '../outgoing'; import { Message, MessageType, MessageTypes } from '../types/message'; import { ButtonMessage, Button, PostbackType, LinkType, PostbackButton, LinkButton } from '../types/messages/button'; import * as uuid from 'uuid'; export default class ButtonClass { private message: ButtonMessage = { type: 'button', text: '', buttons: [], id: uuid.v4(), conversation_id: null, }; private outgoing: Outgoing; constructor(outgoing: Outgoing) { this.outgoing = outgoing; this.message.conversation_id = outgoing.conversation; return this; } set type(newType: MessageType) { return; } get type(): MessageType { return this.message.type; } public text(): string; public text(newText: string): this; public text(newText?: string): this | string { if (typeof newText === 'undefined') { return this.message.text; } this.message.text = newText; return this; } get buttons(): Array