import { ApiProperty } from '@nestjs/swagger'; import { ChatElement } from 'chat-element-json-ts'; import { QuickReplyElementName } from './constants'; export class QuickReplyElementPropsType { @ApiProperty() label: string; @ApiProperty() action: 'message' | 'block'; @ApiProperty() messageText?: string; @ApiProperty() blockId?: string; @ApiProperty() extra?: Record; } export type QuickReplyType = ChatElement; export function QuickReply(quickReplyProps: QuickReplyElementPropsType): QuickReplyType { return new ChatElement(QuickReplyElementName, quickReplyProps); }