Options
All
  • Public
  • Public/Protected
  • All
Menu

Module WAPI

Index

Variables

Const addAllNewMessagesListener

addAllNewMessagesListener: (callback: Function) => void

Type declaration

    • (callback: Function): void
    • Parameters

      • callback: Function

      Returns void

Const addParticipant

addParticipant: (groupId: string, contactId: string) => void

Type declaration

    • (groupId: string, contactId: string): void
    • Parameters

      • groupId: string
      • contactId: string

      Returns void

Const asyncLoadAllEarlierMessages

asyncLoadAllEarlierMessages: (contactId: string) => void

Type declaration

    • (contactId: string): void
    • Parameters

      • contactId: string

      Returns void

Const checkNumberStatus

checkNumberStatus: (contactId: string) => any

Type declaration

    • (contactId: string): any
    • Parameters

      • contactId: string

      Returns any

Const createGroup

createGroup: (groupName: string, contactId: string | string[]) => Promise<any>

Type declaration

    • (groupName: string, contactId: string | string[]): Promise<any>
    • Parameters

      • groupName: string
      • contactId: string | string[]

      Returns Promise<any>

Const demoteParticipant

demoteParticipant: (groupId: string, contactId: string) => void

Type declaration

    • (groupId: string, contactId: string): void
    • Parameters

      • groupId: string
      • contactId: string

      Returns void

Const forwardMessages

forwardMessages: (to: string, messages: string | (string | Message)[], skipMyMessages: boolean) => any

Type declaration

    • (to: string, messages: string | (string | Message)[], skipMyMessages: boolean): any
    • Parameters

      • to: string
      • messages: string | (string | Message)[]
      • skipMyMessages: boolean

      Returns any

Const getAllChatIds

getAllChatIds: () => string[]

Type declaration

    • (): string[]
    • Returns string[]

Const getAllChats

getAllChats: () => any

Type declaration

    • (): any
    • Returns any

Const getAllChatsWithMessages

getAllChatsWithMessages: (withNewMessageOnly?: boolean) => any

Type declaration

    • (withNewMessageOnly?: boolean): any
    • Parameters

      • Optional withNewMessageOnly: boolean

      Returns any

Const getAllChatsWithNewMsg

getAllChatsWithNewMsg: () => Chat[]

Type declaration

Const getAllContacts

getAllContacts: () => Contact[]

Type declaration

Const getAllGroups

getAllGroups: () => Chat[]

Type declaration

Const getAllMessagesInChat

getAllMessagesInChat: (chatId: string, includeMe: boolean, includeNotifications: boolean) => [Message]

Type declaration

    • (chatId: string, includeMe: boolean, includeNotifications: boolean): [Message]
    • Parameters

      • chatId: string
      • includeMe: boolean
      • includeNotifications: boolean

      Returns [Message]

Const getAllNewMessages

getAllNewMessages: () => any

Type declaration

    • (): any
    • Returns any

Const getAllUnreadMessages

getAllUnreadMessages: () => any

Type declaration

    • (): any
    • Returns any

Const getBatteryLevel

getBatteryLevel: () => Number

Type declaration

    • (): Number
    • Returns Number

Const getBusinessProfilesProducts

getBusinessProfilesProducts: (to: string) => any

Type declaration

    • (to: string): any
    • Parameters

      • to: string

      Returns any

Const getChat

getChat: (contactId: string) => Chat

Type declaration

    • (contactId: string): Chat
    • Parameters

      • contactId: string

      Returns Chat

Const getChatById

getChatById: (contactId: string) => Chat

Type declaration

    • (contactId: string): Chat
    • Parameters

      • contactId: string

      Returns Chat

Const getContact

getContact: (contactId: string) => Contact

Type declaration

    • Parameters

      • contactId: string

      Returns Contact

Const getGeneratedUserAgent

getGeneratedUserAgent: (userAgent?: string) => string

Type declaration

    • (userAgent?: string): string
    • Parameters

      • Optional userAgent: string

      Returns string

Const getGroupAdmins

getGroupAdmins: (groupId: string) => Contact[]

Type declaration

    • Parameters

      • groupId: string

      Returns Contact[]

Const getGroupParticipantIDs

getGroupParticipantIDs: (groupId: string) => Id[]

Type declaration

    • (groupId: string): Id[]
    • Parameters

      • groupId: string

      Returns Id[]

Const getMe

getMe: () => any

Type declaration

    • (): any
    • Returns any

Const getProfilePicFromServer

getProfilePicFromServer: (chatId: string) => any

Type declaration

    • (chatId: string): any
    • Parameters

      • chatId: string

      Returns any

Const getStatus

getStatus: (contactId: string) => void

Type declaration

    • (contactId: string): void
    • Parameters

      • contactId: string

      Returns void

Const getUnreadMessages

getUnreadMessages: (includeMe: boolean, includeNotifications: boolean, use_unread_count: boolean) => any

Type declaration

    • (includeMe: boolean, includeNotifications: boolean, use_unread_count: boolean): any
    • Parameters

      • includeMe: boolean
      • includeNotifications: boolean
      • use_unread_count: boolean

      Returns any

Const getWAVersion

getWAVersion: () => String

Type declaration

    • (): String
    • Returns String

Const isConnected

isConnected: () => Boolean

Type declaration

    • (): Boolean
    • Returns Boolean

Const leaveGroup

leaveGroup: (groupId: string) => any

Type declaration

    • (groupId: string): any
    • Parameters

      • groupId: string

      Returns any

Const loadAllEarlierMessages

loadAllEarlierMessages: (contactId: string) => void

Type declaration

    • (contactId: string): void
    • Parameters

      • contactId: string

      Returns void

Const loadAndGetAllMessagesInChat

loadAndGetAllMessagesInChat: (chatId: string, includeMe: boolean, includeNotifications: boolean) => [Message]

Type declaration

    • (chatId: string, includeMe: boolean, includeNotifications: boolean): [Message]
    • Parameters

      • chatId: string
      • includeMe: boolean
      • includeNotifications: boolean

      Returns [Message]

Const loadEarlierMessages

loadEarlierMessages: (contactId: string) => Message[]

Type declaration

    • Parameters

      • contactId: string

      Returns Message[]

Const onAddedToGroup

onAddedToGroup: (callback: Function) => any

Type declaration

    • (callback: Function): any
    • Parameters

      • callback: Function

      Returns any

Const onLiveLocation

onLiveLocation: (chatId: string, callback: Function) => any

Type declaration

    • (chatId: string, callback: Function): any
    • Parameters

      • chatId: string
      • callback: Function

      Returns any

Const onParticipantsChanged

onParticipantsChanged: (groupId: string, callback: Function) => any

Type declaration

    • (groupId: string, callback: Function): any
    • Parameters

      • groupId: string
      • callback: Function

      Returns any

Const onStateChanged

onStateChanged: (callback: Function) => void

Type declaration

    • (callback: Function): void
    • Parameters

      • callback: Function

      Returns void

Const promoteParticipant

promoteParticipant: (groupId: string, contactId: string) => void

Type declaration

    • (groupId: string, contactId: string): void
    • Parameters

      • groupId: string
      • contactId: string

      Returns void

Const removeParticipant

removeParticipant: (groupId: string, contactId: string) => void

Type declaration

    • (groupId: string, contactId: string): void
    • Parameters

      • groupId: string
      • contactId: string

      Returns void

Const reply

reply: (to: string, content: string, quotedMsg: string | Message) => void

Type declaration

    • (to: string, content: string, quotedMsg: string | Message): void
    • Parameters

      • to: string
      • content: string
      • quotedMsg: string | Message

      Returns void

Const sendContact

sendContact: (to: string, contact: string | string[]) => any

Type declaration

    • (to: string, contact: string | string[]): any
    • Parameters

      • to: string
      • contact: string | string[]

      Returns any

Const sendFile

sendFile: (base64: string, to: string, filename: string, caption: string) => void

Type declaration

    • (base64: string, to: string, filename: string, caption: string): void
    • Parameters

      • base64: string
      • to: string
      • filename: string
      • caption: string

      Returns void

Const sendImage

sendImage: (base64: string, to: string, filename: string, caption: string) => void

Type declaration

    • (base64: string, to: string, filename: string, caption: string): void
    • Parameters

      • base64: string
      • to: string
      • filename: string
      • caption: string

      Returns void

Const sendImageAsSticker

sendImageAsSticker: (webpBase64: string, to: string, metadata?: any) => void

Type declaration

    • (webpBase64: string, to: string, metadata?: any): void
    • Parameters

      • webpBase64: string
      • to: string
      • Optional metadata: any

      Returns void

Const sendImageWithProduct

sendImageWithProduct: (base64: string, to: string, caption: string, bizNumber: string, productId: string) => any

Type declaration

    • (base64: string, to: string, caption: string, bizNumber: string, productId: string): any
    • Parameters

      • base64: string
      • to: string
      • caption: string
      • bizNumber: string
      • productId: string

      Returns any

Const sendLocation

sendLocation: (to: string, lat: any, lng: any, loc: string) => void

Type declaration

    • (to: string, lat: any, lng: any, loc: string): void
    • Parameters

      • to: string
      • lat: any
      • lng: any
      • loc: string

      Returns void

Const sendMessage

sendMessage: (to: string, content: string) => string

Type declaration

    • (to: string, content: string): string
    • Parameters

      • to: string
      • content: string

      Returns string

Const sendMessageWithThumb

sendMessageWithThumb: (thumb: string, url: string, title: string, description: string, chatId: string) => void

Type declaration

    • (thumb: string, url: string, title: string, description: string, chatId: string): void
    • Parameters

      • thumb: string
      • url: string
      • title: string
      • description: string
      • chatId: string

      Returns void

Const sendSeen

sendSeen: (to: string) => void

Type declaration

    • (to: string): void
    • Parameters

      • to: string

      Returns void

Const sendVideoAsGif

sendVideoAsGif: (base64: string, to: string, filename: string, caption: string) => void

Type declaration

    • (base64: string, to: string, filename: string, caption: string): void
    • Parameters

      • base64: string
      • to: string
      • filename: string
      • caption: string

      Returns void

Const setChatState

setChatState: (chatState: ChatState, chatId: string) => void

Type declaration

    • (chatState: ChatState, chatId: string): void
    • Parameters

      Returns void

Const setMyName

setMyName: (newName: string) => void

Type declaration

    • (newName: string): void
    • Parameters

      • newName: string

      Returns void

Const setMyStatus

setMyStatus: (newStatus: string) => void

Type declaration

    • (newStatus: string): void
    • Parameters

      • newStatus: string

      Returns void

Const simulateTyping

simulateTyping: (to: string, on: boolean) => void

Type declaration

    • (to: string, on: boolean): void
    • Parameters

      • to: string
      • on: boolean

      Returns void

Const smartDeleteMessages

smartDeleteMessages: (contactId: string, messageId: string[] | string, onlyLocal: boolean) => any

Type declaration

    • (contactId: string, messageId: string[] | string, onlyLocal: boolean): any
    • Parameters

      • contactId: string
      • messageId: string[] | string
      • onlyLocal: boolean

      Returns any

Const waitNewMessages

waitNewMessages: (rmCallback: boolean, callback: Function) => void

Type declaration

    • (rmCallback: boolean, callback: Function): void
    • Parameters

      • rmCallback: boolean
      • callback: Function

      Returns void