/** * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * This source code is licensed under the license found in the * LICENSE file in the root directory of this source tree. */ import { RequesterResponseInterface } from '../types/requester'; import BaseAPI from './base'; import { ComponentTypesEnum, MessageTypesEnum } from '../types/enums'; import { RequestData } from '../types/httpsClient'; import * as m from '../types/messages'; export default class MessagesAPI extends BaseAPI implements m.MessagesClass { private readonly commonMethod; private readonly commonEndpoint; bodyBuilder(type: T, payload: m.AudioMediaObject | [m.ContactObject] | m.DocumentMediaObject | m.ImageMediaObject | m.InteractiveObject | m.LocationObject | m.MessageTemplateObject | m.StickerMediaObject | m.TextObject | m.VideoMediaObject, toNumber: string, replyMessageId?: string): m.MessageRequestBody; send(body: RequestData): Promise>; audio(body: m.AudioMediaObject, recipient: number, replyMessageId?: string): Promise>; contacts(body: [m.ContactObject], recipient: number, replyMessageId?: string): Promise>; document(body: m.DocumentMediaObject, recipient: number, replyMessageId?: string): Promise>; image(body: m.ImageMediaObject, recipient: number, replyMessageId?: string): Promise>; interactive(body: m.InteractiveObject, recipient: number, replyMessageId?: string): Promise>; location(body: m.LocationObject, recipient: number, replyMessageId?: string): Promise>; sticker(body: m.StickerMediaObject, recipient: number, replyMessageId?: string): Promise>; template(body: m.MessageTemplateObject, recipient: number, replyMessageId?: string): Promise>; text(body: m.TextObject, recipient: number, replyMessageId?: string): Promise>; video(body: m.VideoMediaObject, recipient: number, replyMessageId?: string): Promise>; status(body: m.StatusObject): Promise>; }