Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

AccountInfo

AccountInfo: { background: string; category: string; country: string; eventTypes: Delivered | Seen | Failed | ConversationStarted; icon: string; id: string; location: { lat: number; lon: number }; members: { avatar: string; id: string; name: string; role: string }[]; name: string; subcategory: string; subscribersCount: number; uri: string; webhook: string }

Type declaration

  • background: string
  • category: string
  • country: string
  • eventTypes: Delivered | Seen | Failed | ConversationStarted
  • icon: string
  • id: string
  • location: { lat: number; lon: number }
    • lat: number
    • lon: number
  • members: { avatar: string; id: string; name: string; role: string }[]
  • name: string
  • subcategory: string
  • subscribersCount: number
  • uri: string
  • webhook: string

BroadcastResponseData

ClientConfig

ClientConfig: { accessToken: string; onRequest?: OnRequestFunction; origin?: string; sender: Sender }

Type declaration

  • accessToken: string
  • Optional onRequest?: OnRequestFunction
  • Optional origin?: string
  • sender: Sender

Contact

Contact: { name: string; phoneNumber: string }

Type declaration

  • name: string
  • phoneNumber: string

ContactMessage

ContactMessage: { contact: Contact; type: "contact" } & MessageOptions

Failed

Failed: FailedResponseData<{ receiver: string }>

FailedResponseData

FailedResponseData<T>: ({ status: 1; statusMessage: "invalidUrl" } | { status: 2; statusMessage: "invalidAuthToken" } | { status: 3; statusMessage: "badData" } | { status: 4; statusMessage: "missingData" } | { status: 5; statusMessage: "receiverNotRegistered" } | { status: 6; statusMessage: "receiverNotSubscribed" } | { status: 7; statusMessage: "publicAccountBlocked" } | { status: 8; statusMessage: "publicAccountNotFound" } | { status: 9; statusMessage: "publicAccountSuspended" } | { status: 10; statusMessage: "webhookNotSet" } | { status: 11; statusMessage: "receiverNoSuitableDevice" } | { status: 12; statusMessage: "tooManyRequests" } | { status: 13; statusMessage: "apiVersionNotSupported" } | { status: 14; statusMessage: "incompatibleWithVersion" } | { status: 15; statusMessage: "publicAccountNotAuthorized" } | { status: 16; statusMessage: "inchatReplyMessageNotAllowed" } | { status: 17; statusMessage: "publicAccountIsNotInline" } | { status: 18; statusMessage: "noPublicChat" } | { status: 19; statusMessage: "cannotSendBroadcast" } | { status: 20; statusMessage: "broadcastNotAllowed" }) & T

Type parameters

  • T: object

File

File: { fileName: string; media: string; size: number }

Type declaration

  • fileName: string
  • media: string
  • size: number

FileMessage

FileMessage: { type: "file" } & File & MessageOptions

Keyboard

Keyboard: { bgColor?: string; buttons: KeyboardButton[]; buttonsGroupColumns?: number; buttonsGroupRows?: number; customDefaultHeight?: number; defaultHeight?: boolean; favoritesMetadata?: any; heightScale?: number; inputFieldState?: "regular" | "minimized" | "hidden"; type: "keyboard" }

Type declaration

  • Optional bgColor?: string
  • buttons: KeyboardButton[]
  • Optional buttonsGroupColumns?: number
  • Optional buttonsGroupRows?: number
  • Optional customDefaultHeight?: number
  • Optional defaultHeight?: boolean
  • Optional favoritesMetadata?: any
  • Optional heightScale?: number
  • Optional inputFieldState?: "regular" | "minimized" | "hidden"
  • type: "keyboard"

KeyboardButton

KeyboardButton: { actionBody: string; actionType?: "reply" | "open-url" | "location-picker" | "share-phone" | "none"; bgColor?: string; bgLoop?: boolean; bgMedia?: string; bgMediaScaleType?: "crop" | "fill" | "fit"; bgMediaType?: "picture" | "gif"; columns?: number; frame?: KeyboardButtonFrame; image?: string; imageScaleType?: "crop" | "fill" | "fit"; internalBrowser?: KeyboardButtonInternalBrowser; map?: KeyboardButtonMap; mediaPlayer?: KeyboardButtonMediaPlayer; openURLMediaType?: "not-media" | "video" | "gif" | "picture"; openURLType?: "internal" | "external"; rows?: number; silent?: boolean; text?: string; textBgGradientColor?: string; textHAlign?: "left" | "center" | "right"; textOpacity?: number; textPaddings?: [number, number, number, number]; textShouldFit?: boolean; textSize?: "small" | "regular" | "large"; textVAlign?: "top" | "middle" | "bottom" }

Type declaration

  • actionBody: string
  • Optional actionType?: "reply" | "open-url" | "location-picker" | "share-phone" | "none"
  • Optional bgColor?: string
  • Optional bgLoop?: boolean
  • Optional bgMedia?: string
  • Optional bgMediaScaleType?: "crop" | "fill" | "fit"
  • Optional bgMediaType?: "picture" | "gif"
  • Optional columns?: number
  • Optional frame?: KeyboardButtonFrame
  • Optional image?: string
  • Optional imageScaleType?: "crop" | "fill" | "fit"
  • Optional internalBrowser?: KeyboardButtonInternalBrowser
  • Optional map?: KeyboardButtonMap
  • Optional mediaPlayer?: KeyboardButtonMediaPlayer
  • Optional openURLMediaType?: "not-media" | "video" | "gif" | "picture"
  • Optional openURLType?: "internal" | "external"
  • Optional rows?: number
  • Optional silent?: boolean
  • Optional text?: string
  • Optional textBgGradientColor?: string
  • Optional textHAlign?: "left" | "center" | "right"
  • Optional textOpacity?: number
  • Optional textPaddings?: [number, number, number, number]
  • Optional textShouldFit?: boolean
  • Optional textSize?: "small" | "regular" | "large"
  • Optional textVAlign?: "top" | "middle" | "bottom"

KeyboardButtonFrame

KeyboardButtonFrame: { borderColor?: string; borderWidth?: number; cornerRadius?: number }

Type declaration

  • Optional borderColor?: string
  • Optional borderWidth?: number
  • Optional cornerRadius?: number

KeyboardButtonInternalBrowser

KeyboardButtonInternalBrowser: { actionButton?: "forward" | "send" | "open-externally" | "send-to-bot" | "none"; actionPredefinedURL?: string; actionReplyData?: string; customTitle?: string; footerType?: "default" | "hidden"; mode?: "fullscreen" | "fullscreen-portrait" | "fullscreen-landscape" | "partial-size"; titleType?: "domain" | "default" }

Type declaration

  • Optional actionButton?: "forward" | "send" | "open-externally" | "send-to-bot" | "none"
  • Optional actionPredefinedURL?: string
  • Optional actionReplyData?: string
  • Optional customTitle?: string
  • Optional footerType?: "default" | "hidden"
  • Optional mode?: "fullscreen" | "fullscreen-portrait" | "fullscreen-landscape" | "partial-size"
  • Optional titleType?: "domain" | "default"

KeyboardButtonMap

KeyboardButtonMap: { latitude?: number; longitude?: number }

Type declaration

  • Optional latitude?: number
  • Optional longitude?: number

KeyboardButtonMediaPlayer

KeyboardButtonMediaPlayer: { loop?: boolean; subtitle?: string; thumbnailURL?: string; title?: string }

Type declaration

  • Optional loop?: boolean
  • Optional subtitle?: string
  • Optional thumbnailURL?: string
  • Optional title?: string

Location

Location: { lat: string; lon: string }

Type declaration

  • lat: string
  • lon: string

LocationMessage

LocationMessage: { location: Location; type: "location" } & MessageOptions

Message

MessageOptions

MessageOptions: { keyboard?: Keyboard; minApiVersion?: number; sender?: Sender; trackingData?: string }

Type declaration

  • Optional keyboard?: Keyboard
  • Optional minApiVersion?: number
  • Optional sender?: Sender
  • Optional trackingData?: string

Picture

Picture: { media: string; text: string; thumbnail?: string }

Type declaration

  • media: string
  • text: string
  • Optional thumbnail?: string

PictureMessage

PictureMessage: { type: "picture" } & Picture & MessageOptions

ResponseData

ResponseData<T>: SucceededResponseData<T> | FailedResponseData<{}>

Type parameters

  • T: object

RichMedia

RichMedia: { bgColor: string; buttons: RichMediaButton[]; buttonsGroupColumns: number; buttonsGroupRows: number; type: "rich_media" }

Type declaration

  • bgColor: string
  • buttons: RichMediaButton[]
  • buttonsGroupColumns: number
  • buttonsGroupRows: number
  • type: "rich_media"

RichMediaButton

RichMediaButton: { actionBody: string; actionType: "open-url" | "reply"; columns: number; image?: string; rows: number; text?: string; textHAlign?: "left" | "middle" | "right"; textSize?: "small" | "medium" | "large"; textVAlign?: "middle" }

Type declaration

  • actionBody: string
  • actionType: "open-url" | "reply"
  • columns: number
  • Optional image?: string
  • rows: number
  • Optional text?: string
  • Optional textHAlign?: "left" | "middle" | "right"
  • Optional textSize?: "small" | "medium" | "large"
  • Optional textVAlign?: "middle"

RichMediaMessage

RichMediaMessage: { richMedia: RichMedia; type: "rich_media" } & MessageOptions

Sender

Sender: { avatar?: string; name: string }

Type declaration

  • Optional avatar?: string
  • name: string

StickerMessage

StickerMessage: { stickerId: number; type: "sticker" } & MessageOptions

SucceededBroadcastResponseData

SucceededBroadcastResponseData: SucceededResponseData<{ failedList: Failed[]; messageToken: string }>

SucceededResponseData

SucceededResponseData<T>: { status: 0; statusMessage: "ok" } & T

Type parameters

  • T: object

TextMessage

TextMessage: { text: string; type: "text" } & MessageOptions

UrlMessage

UrlMessage: { media: string; type: "url" } & MessageOptions

UserDetails

UserDetails: { apiVersion: number; avatar: string; country: string; deviceType: string; id: string; language: string; mcc: number; mnc: number; name: string; primaryDeviceOs: string; viberVersion: string }

Type declaration

  • apiVersion: number
  • avatar: string
  • country: string
  • deviceType: string
  • id: string
  • language: string
  • mcc: number
  • mnc: number
  • name: string
  • primaryDeviceOs: string
  • viberVersion: string

UserOnlineStatus

UserOnlineStatus: { id: string; onlineStatus: 0 | 1 | 2 | 3 | 4; onlineStatusMessage: "online" }

Type declaration

  • id: string
  • onlineStatus: 0 | 1 | 2 | 3 | 4
  • onlineStatusMessage: "online"

Video

Video: { duration?: number; media: string; size: number; thumbnail?: string }

Type declaration

  • Optional duration?: number
  • media: string
  • size: number
  • Optional thumbnail?: string

VideoMessage

VideoMessage: { type: "video" } & Video & MessageOptions

Generated using TypeDoc