UNPKG

votcore

Version:

Vot Kit for Valensas Bots

33 lines (32 loc) 1.03 kB
import { Context, GUID } from './../models'; import { ConversationChannelData, ConversationStatus, VotChannels } from './../types'; export interface ConversationConstructor { channel: keyof VotChannels; context?: Context | undefined; channelData?: ConversationChannelData; status?: ConversationStatus; startDate?: Date; endDate?: Date; id?: GUID | string; } /** * Conversation Class. If an id is not supplied, it is generated automatically. */ export declare class Conversation { id: GUID; startDate?: Date; endDate?: Date; channel: keyof VotChannels; channelData: ConversationChannelData; status: ConversationStatus; context: Context; /** * Used to parse Conversation from a JSON string. */ static deserialize: (json: string) => Conversation; /** * Converts the given conversation to a JSON string. */ serialize(): string; constructor({channel, context, channelData, status, startDate, endDate, id}: ConversationConstructor); }