@botonic/react
Version:
Build Chatbots using React
47 lines (46 loc) • 1.12 kB
TypeScript
type Parameters = TextParameter | CurrencyParameter | DateTimeParameter;
interface TextParameter {
type: 'text';
text: string;
}
interface CurrencyParameter {
type: 'currency';
currency: {
fallbackValue: string;
code: string;
amount1000: number;
};
}
interface DateTimeParameter {
type: 'date_time';
dateTime: {
fallbackValue: string;
};
}
type CardButton = QuickReplyButton | UrlButton;
interface Button {
type: 'quick_reply' | 'url';
buttonIndex?: number;
}
interface QuickReplyButton extends Button {
payload: string;
}
interface UrlButton extends Button {
urlVariable: string;
}
interface Card {
fileType: 'image' | 'video';
fileId: string;
cardIndex?: number;
bodyParameters?: Parameters[];
buttons?: CardButton[];
extraComponents?: Record<string, any>[];
}
export interface WhatsappMediaCarouselProps {
templateName: string;
templateLanguage: string;
cards: Card[];
bodyParameters?: Parameters[];
}
export declare const WhatsappMediaCarousel: (props: WhatsappMediaCarouselProps) => any;
export {};