export declare const enum ContentType { TEXT = "text", LOCATION = "location", USER_PHONE_NUMBER = "user_phone_number", USER_EMAIL = "user_email" } export declare const enum AttachmentType { IMAGE = "image", AUDIO = "audio", VIDEO = "video", FILE = "file", TEMPLATE = "template" } export declare const enum NotificationType { NO_PUSH = "NO_PUSH", REGULAR = "REGULAR", SILENT_PUSH = "SILENT_PUSH" } export declare const enum WebviewHeightRatio { FULL = "full", COMPACT = "compact", TALL = "tall" } export declare const enum WebviewShareButton { HIDE = "hide" } export declare const enum ImageAspectRatio { HORIZONTAL = "horizontal", SQUARE = "square" } export interface TextMessage { text: string; } export interface QuickReplyAttachment { type: 'image' | 'audio' | 'video' | 'file' | 'template'; payload: T; } export interface QuickReplies { content_type: 'text' | 'location' | 'user_phone_number' | 'user_email'; title?: string; payload?: string | number; image_url?: string; } export interface QuickReply { text: string; quick_replies: QuickReplies[]; attachment?: QuickReplyAttachment; } export interface ButtonTemplateMessagePayload { template_type: 'button'; text: string; buttons: T[]; sharable?: boolean; } export declare type ButtonTemplateMessage = BaseTemplate>; export interface GenericTemplateMessagePayloadElements { title: string; buttons: T[]; subtitle?: string; image_url?: string; default_action?: DefaultAction; } export interface GenericTemplateMessagePayload { template_type: 'generic'; elements: GenericTemplateMessagePayloadElements[]; sharable?: boolean; image_aspect_ratio?: 'horizontal' | 'square'; } export declare type GenericTemplateMessage = BaseTemplate>; export interface ReceiptTemplatePayloadAdjustment { name: string; amount: number; } export interface ReceiptTemplatePayloadAddress { street_1: string; city: string; postal_code: string; state: string; country: string; street_2?: string; } export interface ReceiptTemplatePayloadElements { title: string; price: number; subtitle?: string; quantity?: number; currency?: string; image_url?: string; } export interface ReceiptTemplatePayloadSummary { total_cost: number; subtotal?: number; shipping_cost?: number; total_tax?: number; } export interface ReceiptTemplatePayload { template_type: 'receipt'; recipient_name: string; order_number: string; currency: string; payment_method: string; summary: ReceiptTemplatePayloadSummary; sharable?: boolean; merchant_name?: string; timestamp?: string; elements?: ReceiptTemplatePayloadElements[]; address?: ReceiptTemplatePayloadAddress; adjustments?: ReceiptTemplatePayloadAdjustment[]; } export declare type ReceiptTemplateMessage = BaseTemplate; export interface DefaultAction { type: 'web_url'; url: string; webview_height_ratio?: 'full' | 'compact' | 'tall'; messenger_extensions?: boolean; fallback_url?: string; webview_share_button?: 'hide'; } export interface PostbackButton { type: 'postback'; title: string; payload: string; } export interface URLButton extends DefaultAction { title: string; } export interface MessengerId { id: string; } export interface SendAsReturnError { message: string; type: string; code: number; error_subcode: number; fbtrace_id: string; } export interface SendAsData { recipient_id: string; message_id: string; } declare interface BaseParams { url: string; recipient: MessengerId; notificationType?: 'NO_PUSH' | 'REGULAR' | 'SILENT_PUSH'; typingDelay?: number; options?: RequestInit; } declare interface SendAsParams extends BaseParams { message: T; } declare type SendAsReadReceiptParams = Pick; declare interface SendAsTypingBubbleParams extends SendAsReadReceiptParams { showTyping: boolean; } declare interface BaseTemplate { attachment: { type: 'template'; payload: T; }; } import { RequestInit } from 'node-fetch'; export declare function sendAs({ url, recipient, message, notificationType, options, typingDelay, }: SendAsParams): Promise; export declare function sendAsText(args: SendAsParams): Promise; export declare function sendAsQuickReply(args: SendAsParams>): Promise; export declare function sendAsButtonTemplate(args: SendAsParams>): Promise; export declare function sendAsGenericTemplate(args: SendAsParams>): Promise; export declare function sendAsReceiptTemplate(args: SendAsParams): Promise; export declare function sendAsReadReceipt({ url, recipient, options, }: SendAsReadReceiptParams): Promise; export declare function sendAsTypingBubble({ url, recipient, showTyping, options, }: SendAsTypingBubbleParams): Promise; export default sendAs;