import Api from './api'; import { V1 } from './v1-types'; export declare class Broadcasts { private readonly api; private readonly url; constructor(api: Api); /** * Send broadcast message to several phone numbers. There must be at least 2 receivers * @param phoneNumbers array of phones, for example ['79001234567', '79001234568'] * @param text text message to send * @param regPeriod filter by registration period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param activePeriod filter for activity period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param startAt date when to start broadcasting. If empty to begin immediately. Format like "2020-01-01 00:00:00" */ sendBroadcastTextMessage(phoneNumbers: Array, text: string, regPeriod?: PeriodFilter, activePeriod?: PeriodFilter, startAt?: string): Promise; /** * Send broadcast image to several phone numbers. There must be at least 2 receivers * @param phoneNumbers array of phones, for example ['79001234567', '79001234568'] * @param mediaId id obtained from uploading image via method media.uploadMedia() * @param caption title under image in WhatsApp * @param regPeriod filter by registration period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param activePeriod filter for activity period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param startAt date when to start broadcasting. If empty to begin immediately. Format like "2020-01-01 00:00:00" */ sendBroadcastImageById(phoneNumbers: Array, mediaId: string, caption?: string, regPeriod?: PeriodFilter, activePeriod?: PeriodFilter, startAt?: string): Promise; /** * Send broadcast image to several phone numbers. There must be at least 2 receivers * @param phoneNumbers array of phones, for example ['79001234567', '79001234568'] * @param link url * @param caption title under image in WhatsApp * @param regPeriod filter by registration period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param activePeriod filter for activity period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param startAt date when to start broadcasting. If empty to begin immediately. Format like "2020-01-01 00:00:00" */ sendBroadcastImageByLink(phoneNumbers: Array, link: string, caption?: string, regPeriod?: PeriodFilter, activePeriod?: PeriodFilter, startAt?: string): Promise; /** * Send broadcast video to several phone numbers. There must be at least 2 receivers * @param phoneNumbers array of phones, for example ['79001234567', '79001234568'] * @param mediaId id obtained from uploading video via method media.uploadMedia() * @param caption title under video in WhatsApp * @param regPeriod filter by registration period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param activePeriod filter for activity period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param startAt date when to start broadcasting. If empty to begin immediately. Format like "2020-01-01 00:00:00" */ sendBroadcastVideoById(phoneNumbers: Array, mediaId: string, regPeriod?: PeriodFilter, activePeriod?: PeriodFilter, startAt?: string): Promise; /** * Send broadcast video to several phone numbers. There must be at least 2 receivers * @param phoneNumbers array of phones, for example ['79001234567', '79001234568'] * @param link url * @param caption title under video in WhatsApp * @param regPeriod filter by registration period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param activePeriod filter for activity period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param startAt date when to start broadcasting. If empty to begin immediately. Format like "2020-01-01 00:00:00" */ sendBroadcastVideoByLink(phoneNumbers: Array, link: string, regPeriod?: PeriodFilter, activePeriod?: PeriodFilter, startAt?: string): Promise; /** * Send broadcast document to several phone numbers. There must be at least 2 receivers * @param phoneNumbers array of phones, for example ['79001234567', '79001234568'] * @param mediaId id obtained from uploading document via method media.uploadMedia() * @param caption title under document in WhatsApp * @param regPeriod filter by registration period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param activePeriod filter for activity period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param startAt date when to start broadcasting. If empty to begin immediately. Format like "2020-01-01 00:00:00" */ sendBroadcastDocumentById(phoneNumbers: Array, mediaId: string, regPeriod?: PeriodFilter, activePeriod?: PeriodFilter, startAt?: string): Promise; /** * Send broadcast document to several phone numbers. There must be at least 2 receivers * @param phoneNumbers array of phones, for example ['79001234567', '79001234568'] * @param link url * @param caption title under document in WhatsApp * @param regPeriod filter by registration period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param activePeriod filter for activity period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param startAt date when to start broadcasting. If empty to begin immediately. Format like "2020-01-01 00:00:00" */ sendBroadcastDocumentByLink(phoneNumbers: Array, link: string, regPeriod?: PeriodFilter, activePeriod?: PeriodFilter, startAt?: string): Promise; /** * Send broadcast audio to several phone numbers. There must be at least 2 receivers * @param phoneNumbers array of phones, for example ['79001234567', '79001234568'] * @param mediaId id obtained from uploading audio via method media.uploadMedia() * @param caption title under audio in WhatsApp * @param regPeriod filter by registration period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param activePeriod filter for activity period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param startAt date when to start broadcasting. If empty to begin immediately. Format like "2020-01-01 00:00:00" */ sendBroadcastAudioById(phoneNumbers: Array, mediaId: string, regPeriod?: PeriodFilter, activePeriod?: PeriodFilter, startAt?: string): Promise; /** * Send broadcast audio to several phone numbers. There must be at least 2 receivers * @param phoneNumbers array of phones, for example ['79001234567', '79001234568'] * @param link url * @param caption title under audio in WhatsApp * @param regPeriod filter by registration period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param activePeriod filter for activity period for phones. Something like {"from": "2020-01-01 00:00:00", "to": "2020-01-31 23:59:59"} * @param startAt date when to start broadcasting. If empty to begin immediately. Format like "2020-01-01 00:00:00" */ sendBroadcastAudioByLink(phoneNumbers: Array, link: string, regPeriod?: PeriodFilter, activePeriod?: PeriodFilter, startAt?: string): Promise; private toWaIds; } export interface PeriodFilter { from: string; to: string; }