@jikey/fcazero
Version:
Facebook Messenger bot, and is one of the most advanced next-generation Facebook Chat API (FCA)
28 lines (25 loc) • 2.32 kB
TypeScript
import { Attachment, AttachmentMap, ShareMap, DeltaMessageInput, DeltaMessageOutput, MessageInput, FormattedMessage, EventMessageInput, EventMessageOutput, HistoryMessageInput, AdminTextMessageTypeMap, DeltaEvent, FormattedDeltaEvent, TypingEvent, FormattedTypingEvent, DeltaReadReceiptInput, DeltaReadReceiptOutput, ReadReceiptEvent, FormattedReadReceipt, FormatReadEvent, FormattedRead, ThreadData, FormattedThread, FormattedDateString, ProxyPresence, FormattedProxyPresence, PresenceInput, FormattedPresence, DecodablePayload } from '../types/utils/formatters.js';
declare class Formatters {
static isReadableStream(obj: unknown): obj is NodeJS.ReadableStream;
static fullFileName(fileName: string, extension: string): string;
static getExtension(original_extension: string, fullFileName?: string): string;
static _formatAttachment(attachment1: any, attachment2?: any): Attachment;
static formatAttachment(attachments: any[] | undefined, attachmentIds: string[] | undefined, attachmentMap: AttachmentMap | undefined, shareMap?: ShareMap): Attachment[];
static formatDeltaMessage(m: DeltaMessageInput): DeltaMessageOutput;
static formatID(id: string | undefined | null): string | undefined | null;
static formatMessage(m: MessageInput): FormattedMessage;
static formatEvent(m: EventMessageInput): EventMessageOutput;
static formatHistoryMessage(m: HistoryMessageInput): FormattedMessage | EventMessageOutput;
static getAdminTextMessageType(type: keyof AdminTextMessageTypeMap | string): string;
static formatDeltaEvent(m: DeltaEvent): FormattedDeltaEvent;
static formatTyp(event: TypingEvent): FormattedTypingEvent;
static formatDeltaReadReceipt(delta: DeltaReadReceiptInput): DeltaReadReceiptOutput;
static formatReadReceipt(event: ReadReceiptEvent): FormattedReadReceipt;
static formatRead(event: FormatReadEvent): FormattedRead;
static formatThread(data: ThreadData): FormattedThread;
static formatDate(date: Date): FormattedDateString;
static formatProxyPresence(presence: ProxyPresence, userID: string | number): FormattedProxyPresence | null;
static formatPresence(presence: PresenceInput, userID: string | number): FormattedPresence;
static decodeClientPayload(payload: DecodablePayload): unknown;
}
export { Formatters };