import { Application } from '../Application'; import { BILLING_STATUS } from '../Billing'; import { FileInfo } from '../FileInfo'; import { WhatsappTemplate } from './sinch'; import { ZaloZnsTemmplateParam } from './zalo'; import { TemplateMessageSource } from './TemplateMessage'; import { WhatsappInteractive } from './infobip'; export declare enum MESSAGE_CONTENT_TYPE { EVENT = 1, MESSAGE = 2, LIVE_AGENT_REQUEST = 3, TYPING_INDICATOR = 4, CONVERSATION_CLOSE = 5 } export declare enum SEND_TYPE { VIA_BROADCAST = 1, VIA_BOT = 2, RECEIVE = 3 } export declare const sendTypeStr: (sendType: SEND_TYPE | null) => "CONVERSATION" | "BROADCAST" | "RECEIVE" | "UNKNOWN"; export declare enum MESSAGE_STATUS { PENDING = 1, SUCCESS = 2, FAIL = 3, DELIVERED = 4, READ = 5 } export declare const messageStatusStr: (status: MESSAGE_STATUS) => string; export declare enum DIRECTION_TYPE { SEND = 1, RECEIVE = 2 } export declare enum MESSAGE_TYPE { NONE = "NONE", TEXT = "text", TEXT_WITH_ATTACHMENT = "text_with_attachment", RICH_CARD = "rich_card", VIDEO = "video", PICTURE = "picture", FILE = "file", RICH_LINK = "richLink", LIST_PICKER = "listPicker", QUICK_REPLY = "quickReply", LOCATION = "location", ZALO_LIST_PICKER = "zalo_list_picker", TYPING_INDICATOR_START = "TYPING_INDICATOR_START", TYPING_INDICATOR_STOP = "TYPING_INDICATOR_STOP", ZALO_ZNS_TEMPLATE = "zalo_zns_template", SHARE_INFO = "share_info", REACTION = "reaction", FB_WHATSAPP_TEMPLATE = "fb_whatsapp_template", FB_WHATSAPP_INTERACTIVE = "FB_WHATSAPP_INTERACTIVE", ZALO_TRANSACTION_MESSAGE = "ZALO_TRANSACTION_MESSAGE", ZALO_PROMOTION_MESSAGE = "ZALO_PROMOTION_MESSAGE", PRODUCT_LIST = "PRODUCT_LIST", SUBSCRIBED = "SUBSCRIBED", UNSUBSCRIBED = "UNSUBSCRIBED", CONVERSATION_STARTED = "CONVERSATION_STARTED", CHOICES = "CHOICES", FORM = "FORM", ARTICLES = "ARTICLES", FORM_RESULT = "FORM_RESULT", VIBER_CAROUSEL = "VIBER_CAROUSEL", VIBER_LIST_MESSAGE = "VIBER_LIST_MESSAGE", CALL_CONSENT = "CALL_CONSENT", CALL_CONFIRM = "CALL_CONFIRM", CALL_INFO = "CALL_INFO", SHARE = "SHARE", NEWS = "NEWS", LINE_TEMPLATE = "LINE_TEMPLATE", CALENDAR = "CALENDAR" } export declare const GENERAL_MESSAGE: MESSAGE_TYPE[]; export declare const APPLICATION_MESSAGE: Record>; export declare enum SEND_MESSAGE_VIA { QUEUE = 1, DIRECTLY = 2 } export declare enum MESSAGE_REACTION { REPLY = 1, LIKE = 2, SUGGESTION_CLICK = 3, DELETE = 4 } export declare enum SuggestionActionType { OPEN_URL = "open-url", REPLY = "reply", DIAL = "dial", CALENDAR = "CalendarEventAction", VIEW_LOCATION = "VIEW_LOCATION", SHARE_LOCATION = "SHARE_LOCATION", SHARE_INFO = "SHARE_INFO" } export interface RawMessageSuggestion { action: SuggestionActionType; text: string; postbackData: string; } export interface RichCard { title?: string; titleRow?: number; description?: string; descriptionRow?: number; image?: string; imageRow?: number; suggestions: RawMessageSuggestion[]; } export interface PickListItem { title: string; value: string; subtitle?: string; image?: string; } type ReceivedMessage = PickListItem; type ReplyMessage = PickListItem; export interface ContactMessage { name: string; phone: string; address: string; [key: string]: any; } export declare enum PreviewUrlPosition { BEFORE = 1, AFTER = 2 } export interface PreviewUrl { image: string; title: string; redirectUrl: string; position: PreviewUrlPosition; } export declare enum ExpireType { NONE = "NONE", TTL = "TTL", EXPIRE_TIME = "EXPIRE_TIME" } interface Expire { type: ExpireType; ttl: string; expireTime: string; } export interface RawMessage { type: MESSAGE_TYPE; message?: string; previewUrl?: PreviewUrl; file?: FileInfo; fileUrl?: string; fileName?: string; fileSize?: string | number; trackingData?: ''; richCards?: RichCard[]; rcsExpireOpts?: Expire; rcsRichCardsOpts?: { type: 'STANDALONE' | 'CAROUSEL'; orientation?: string; imageAlign?: string; }; viberRichCardRow?: number; viberRichCardCol?: number; fileResolution?: string; thumbnailUrl?: string; thumbnailFile?: FileInfo; suggestions?: Array; allowMultiple?: boolean; attachments?: Array; listPicker?: Array; receivedMessage?: ReceivedMessage; replyMessage?: ReplyMessage; richLinkUrl?: string; zaloZnsTemplateParam?: ZaloZnsTemmplateParam; whatsappTemplateParam?: WhatsappTemplate; whatsappInteractive?: WhatsappInteractive; contacts?: Array; source?: TemplateMessageSource; extra?: any; formMessages?: Array; articleMessages?: Array; choiceMessages?: Array; sharePayload?: { url: string; title?: string; id?: string; type?: string; }; news?: { articles?: Array<{ title?: string; description?: string; url?: string; picurl?: string; }>; }; calendar?: { datetime?: string; }; } export interface Message { id?: number; publicId?: string; rawMessage: RawMessage; extraData?: RawMessage; createdDate?: string; cost?: number; billingStatus?: BILLING_STATUS; } export interface FormMessageItem { name: string; placeholder: string; type: 'text' | 'email' | 'text_area' | 'select' | string; label: string; deafult?: string; options?: Array<{ label: string; value: string; }>; } export interface ArticlesMessageItem { title: string; description?: string; link: string; } export interface ChoiceMessageItem { title: string; value: any; nextMessage?: any; } export declare enum OPEN_URL_APPLICATION { WEBVIEW = "WEBVIEW", BROWSER = "BROWSER" } export declare enum WEBVIEW_TYPE { FULL = "FULL", HALF = "HALF", TALL = "TALL" } export {};