UNPKG

@botonic/plugin-contentful

Version:

Botonic Plugin Contentful is one of the **[available](https://github.com/hubtype/botonic/tree/master/packages)** plugins for Botonic. **[Contentful](http://www.contentful.com)** is a CMS (Content Management System) which manages contents of a great variet

41 lines (40 loc) 1.41 kB
import * as cms from '../cms'; import { ButtonStyle } from '../cms'; export declare class RenderOptions { followUpDelaySeconds: number; maxButtons: number; maxQuickReplies: number; /** Some integrations fail when a field is empty*/ replaceEmptyStringsWith?: string; defaultButtonsStyle?: ButtonStyle; } export interface BotonicMsg { type: 'carousel' | 'text' | 'image' | 'document' | 'video'; delay?: number; data: any; } export type BotonicMsgs = BotonicMsg | BotonicMsgArray; export interface BotonicMsgArray extends Array<BotonicMsgs> { } export interface BotonicText extends BotonicMsg { buttons: any; } export interface BotonicDocument extends BotonicMsg { src: string; } export declare class BotonicMsgConverter { readonly options: RenderOptions; constructor(options?: Partial<RenderOptions>); convert(content: cms.MessageContent, delayS?: number): BotonicMsgs; carousel(carousel: cms.Carousel, delayS?: number): BotonicMsgs; private element; private convertButtons; text(text: cms.Text, delayS?: number): BotonicMsgs; startUp(startUp: cms.StartUp, delayS?: number): BotonicMsgs; image(img: cms.Image, delayS?: number): BotonicMsgs; video(video: cms.Video, delayS?: number): BotonicMsgs; document(doc: cms.Document, delayS?: number): BotonicMsgs; private appendFollowUp; private followUp; private str; }