prodap-chatbot-domain
Version:
Classes utilizadas na resposta de todas as Intents do Assistente Virtual
38 lines (37 loc) • 1.02 kB
TypeScript
import { StyleType, TextType } from '../../common/types';
import Message from '../base/Message';
import FormTypes from './FormTypes';
export type Option = {
code: string;
name: string;
};
export type FormAbstractProps = {
option?: Option;
placeholder?: string;
subtitle?: TextType;
style?: StyleType;
title: TextType;
tooltip?: string;
url?: string;
filter?: string;
intent?: string;
};
export default class FormAbstract extends Message {
formType: FormTypes;
option?: Option;
placeholder?: string;
style?: StyleType;
subtitle?: TextType;
title: TextType;
tooltip?: string;
url?: string;
filter?: string;
intent?: string;
constructor(props: FormAbstractProps, formType: FormTypes);
setCode(prop: Option): string;
setColor(prop: TextType): string;
setName(prop: Option): string;
setOptions(prop: Option): Option;
setTitle(prop: TextType): TextType;
setValue(prop: TextType): string | number | TextType;
}