Skip to main content

@wildix/wda-stream-client > ConsumeEventCommand

ConsumeEventCommand class

Signature:

export declare class ConsumeEventCommand extends ConsumeEventCommand_base 

Extends: ConsumeEventCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { WdaStreamClient, ConsumeEventCommand } from "@wildix/wda-stream-client"; // ES Modules import
// const { WdaStreamClient, ConsumeEventCommand } = require("@wildix/wda-stream-client"); // CommonJS import
const client = new WdaStreamClient(config);
const input = { // ConsumeEventInput
event: { // ConsumeEventInputEvent Union: only one key present
callStart: { // CallStartConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: { // CallStartConsumeEventData
caller: { // CallFlowConsumeParticipant
phone: "STRING_VALUE",
name: "STRING_VALUE",
email: "STRING_VALUE",
company: "STRING_VALUE",
userId: "STRING_VALUE",
userExtension: "STRING_VALUE",
userDepartment: "STRING_VALUE",
userLicense: "STRING_VALUE",
groupId: "STRING_VALUE",
groupName: "STRING_VALUE",
device: "STRING_VALUE",
},
callee: {
phone: "STRING_VALUE",
name: "STRING_VALUE",
email: "STRING_VALUE",
company: "STRING_VALUE",
userId: "STRING_VALUE",
userExtension: "STRING_VALUE",
userDepartment: "STRING_VALUE",
userLicense: "STRING_VALUE",
groupId: "STRING_VALUE",
groupName: "STRING_VALUE",
device: "STRING_VALUE",
},
status: "connecting" || "talking" || "hold",
destination: "STRING_VALUE",
service: "STRING_VALUE",
serviceNumber: "STRING_VALUE",
trunk: { // CallFlowConsumeTrunk
direction: "STRING_VALUE", // required
name: "STRING_VALUE", // required
},
queue: { // CallFlowConsumeQueue
id: "STRING_VALUE", // required
name: "STRING_VALUE", // required
},
tags: [ // CallFlowTags
"STRING_VALUE",
],
flags: [ // CallFlowFlags
"STRING_VALUE",
],
licenses: [ // LicensesList
"x-bees",
],
},
},
callUpdate: { // CallUpdateConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: { // CallUpdateConsumeEventData
caller: {
phone: "STRING_VALUE",
name: "STRING_VALUE",
email: "STRING_VALUE",
company: "STRING_VALUE",
userId: "STRING_VALUE",
userExtension: "STRING_VALUE",
userDepartment: "STRING_VALUE",
userLicense: "STRING_VALUE",
groupId: "STRING_VALUE",
groupName: "STRING_VALUE",
device: "STRING_VALUE",
},
callee: {
phone: "STRING_VALUE",
name: "STRING_VALUE",
email: "STRING_VALUE",
company: "STRING_VALUE",
userId: "STRING_VALUE",
userExtension: "STRING_VALUE",
userDepartment: "STRING_VALUE",
userLicense: "STRING_VALUE",
groupId: "STRING_VALUE",
groupName: "STRING_VALUE",
device: "STRING_VALUE",
},
status: "connecting" || "talking" || "hold",
destination: "STRING_VALUE",
service: "STRING_VALUE",
serviceNumber: "STRING_VALUE",
trunk: {
direction: "STRING_VALUE", // required
name: "STRING_VALUE", // required
},
queue: {
id: "STRING_VALUE", // required
name: "STRING_VALUE", // required
},
tags: [
"STRING_VALUE",
],
flags: [
"STRING_VALUE",
],
mos: { // CallMosData
caller: "STRING_VALUE",
callee: "STRING_VALUE",
},
},
},
callSplit: { // CallSplitConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: { // CallSplitConsumeEventData
caller: {
phone: "STRING_VALUE",
name: "STRING_VALUE",
email: "STRING_VALUE",
company: "STRING_VALUE",
userId: "STRING_VALUE",
userExtension: "STRING_VALUE",
userDepartment: "STRING_VALUE",
userLicense: "STRING_VALUE",
groupId: "STRING_VALUE",
groupName: "STRING_VALUE",
device: "STRING_VALUE",
},
callee: "<CallFlowConsumeParticipant>",
status: "connecting" || "talking" || "hold",
destination: "STRING_VALUE",
service: "STRING_VALUE",
serviceNumber: "STRING_VALUE",
trunk: {
direction: "STRING_VALUE", // required
name: "STRING_VALUE", // required
},
queue: {
id: "STRING_VALUE", // required
name: "STRING_VALUE", // required
},
tags: [
"STRING_VALUE",
],
flags: [
"STRING_VALUE",
],
mos: {
caller: "STRING_VALUE",
callee: "STRING_VALUE",
},
reason: "STRING_VALUE",
transferType: "STRING_VALUE",
mergeWith: "STRING_VALUE",
},
},
callLive: { // CallLiveConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
},
callAgentsStart: { // CallAgentsStartConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: { // CallAgentsStartOrEndConsumeEventData
agents: [ // CallAgentsItemConsumeItemList // required
{ // CallAgentsItemConsumeItem
agent: "STRING_VALUE",
info: "<CallFlowConsumeParticipant>",
},
],
},
},
callAgentsCancel: { // CallAgentsCancelConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: {
agents: [ // required
{
agent: "STRING_VALUE",
info: "<CallFlowConsumeParticipant>",
},
],
},
},
callEnd: { // CallEndConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: { // CallEndConsumeEventData
mos: {
caller: "STRING_VALUE",
callee: "STRING_VALUE",
},
cause: "STRING_VALUE",
causeStr: "STRING_VALUE",
who: "caller" || "callee",
},
},
callRecordStart: { // CallRecordStartConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: { // CallRecordStartConsumeEventData
fileName: "STRING_VALUE", // required
start: Number("long"), // required
owner: "callee" || "caller" || "system", // required
},
},
callRecordStop: { // CallRecordStopConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: { // CallRecordStopConsumeEventData
fileName: "STRING_VALUE", // required
url: "STRING_VALUE", // required
end: Number("long"), // required
pauses: [ // CallRecordPausesList // required
{ // CallRecordPause
start: Number("long"),
end: Number("long"),
reason: "pause" || "hold",
},
],
flowId: Number("int"), // required
},
},
callAttachment: { // CallAttachmentConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: { // CallAttachmentConsumeEventData
type: "voicemail" || "fax", // required
url: "STRING_VALUE", // required
destinations: [ // CallFlowAttachmentDestinationList
{ // CallFlowAttachmentDestination
phone: "STRING_VALUE",
name: "STRING_VALUE",
email: "STRING_VALUE",
userId: "STRING_VALUE",
userExtension: "STRING_VALUE",
userDepartment: "STRING_VALUE",
groupId: "STRING_VALUE",
groupName: "STRING_VALUE",
},
],
},
},
callTranscription: { // CallTranscribeConsumeEvent
id: "STRING_VALUE", // required
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
type: "CALL.START" || "CALL.UPDATE" || "CALL.SPLIT" || "CALL.LIVE" || "CALL.AGENTS_START" || "CALL.AGENTS_CANCEL" || "CALL.END" || "CALL.RECORD_START" || "CALL.RECORD_STOP" || "CALL.ATTACHMENT" || "CALL.TRANSCRIPTION", // required
data: { // CallTranscribeConsumeEventData
flowId: Number("int"), // required
id: "STRING_VALUE", // required
role: "callee" || "caller", // required
text: "STRING_VALUE", // required
language: "STRING_VALUE", // required
final: true || false, // required
start: Number("long"), // required
end: Number("long"), // required
sentiment: "STRING_VALUE",
},
},
conferenceTimeFrames: { // ConferenceTimeFramesConsumeEvent
room: "STRING_VALUE", // required
session: "STRING_VALUE", // required
time: Number("long"), // required
type: "CONFERENCE.START" || "CONFERENCE.JOIN" || "CONFERENCE.RECORD_START" || "CONFERENCE.TRANSCRIPTION" || "CONFERENCE.LEAVE" || "CONFERENCE.RECORD_STOP" || "CONFERENCE.KEEP_ALIVE" || "CONFERENCE.TIMEFRAMES" || "CONFERENCE.END", // required
data: { // ConferenceTimeFramesConsumeEventData
timeFrames: [ // ConferenceTimeFramesList // required
{ // ConferenceTimeFramesListItem
jid: "STRING_VALUE", // required
frames: [ // ConferenceTimeFramesChunkList // required
{ // ConferenceTimeFramesChunk
start: Number("long"), // required
end: Number("long"), // required
},
],
},
],
},
},
conferenceStart: { // ConferenceStartConsumeEvent
room: "STRING_VALUE", // required
session: "STRING_VALUE", // required
time: Number("long"), // required
type: "CONFERENCE.START" || "CONFERENCE.JOIN" || "CONFERENCE.RECORD_START" || "CONFERENCE.TRANSCRIPTION" || "CONFERENCE.LEAVE" || "CONFERENCE.RECORD_STOP" || "CONFERENCE.KEEP_ALIVE" || "CONFERENCE.TIMEFRAMES" || "CONFERENCE.END", // required
provider: "STRING_VALUE",
direction: "internal" || "inbound" || "outbound",
service: "STRING_VALUE",
data: { // ConferenceStartConsumeEventData
company: "STRING_VALUE",
pbx: "STRING_VALUE",
subject: "STRING_VALUE",
},
},
conferenceJoin: { // ConferenceJoinConsumeEvent
room: "STRING_VALUE", // required
session: "STRING_VALUE", // required
time: Number("long"), // required
type: "CONFERENCE.START" || "CONFERENCE.JOIN" || "CONFERENCE.RECORD_START" || "CONFERENCE.TRANSCRIPTION" || "CONFERENCE.LEAVE" || "CONFERENCE.RECORD_STOP" || "CONFERENCE.KEEP_ALIVE" || "CONFERENCE.TIMEFRAMES" || "CONFERENCE.END", // required
data: { // ConferenceJoinConsumeEventData
jid: "STRING_VALUE",
name: "STRING_VALUE",
email: "STRING_VALUE",
company: "STRING_VALUE",
department: "STRING_VALUE",
pbxSerial: "STRING_VALUE",
pbxExtension: "STRING_VALUE",
pbxGroupId: "STRING_VALUE",
license: "basic" || "essential" || "business" || "premium" || "wizyconf",
xbsId: "STRING_VALUE",
},
},
conferenceRecordStart: { // ConferenceRecordStartConsumeEvent
room: "STRING_VALUE", // required
session: "STRING_VALUE", // required
time: Number("long"), // required
type: "CONFERENCE.START" || "CONFERENCE.JOIN" || "CONFERENCE.RECORD_START" || "CONFERENCE.TRANSCRIPTION" || "CONFERENCE.LEAVE" || "CONFERENCE.RECORD_STOP" || "CONFERENCE.KEEP_ALIVE" || "CONFERENCE.TIMEFRAMES" || "CONFERENCE.END", // required
data: { // ConferenceRecordStartConsumeEventData
jid: "STRING_VALUE",
},
},
conferenceTranscription: { // ConferenceTranscriptionConsumeEvent
room: "STRING_VALUE", // required
session: "STRING_VALUE", // required
time: Number("long"), // required
type: "CONFERENCE.START" || "CONFERENCE.JOIN" || "CONFERENCE.RECORD_START" || "CONFERENCE.TRANSCRIPTION" || "CONFERENCE.LEAVE" || "CONFERENCE.RECORD_STOP" || "CONFERENCE.KEEP_ALIVE" || "CONFERENCE.TIMEFRAMES" || "CONFERENCE.END", // required
data: { // ConferenceTranscriptionConsumeEventData
id: "STRING_VALUE", // required
jid: "STRING_VALUE", // required
language: "STRING_VALUE",
text: "STRING_VALUE", // required
time: Number("long"), // required
start: Number("long"), // required
end: Number("long"), // required
sentiment: "POSITIVE" || "NEGATIVE" || "MIXED" || "NEUTRAL",
final: true || false,
},
},
conferenceLeave: { // ConferenceLeaveConsumeEvent
room: "STRING_VALUE", // required
session: "STRING_VALUE", // required
time: Number("long"), // required
type: "CONFERENCE.START" || "CONFERENCE.JOIN" || "CONFERENCE.RECORD_START" || "CONFERENCE.TRANSCRIPTION" || "CONFERENCE.LEAVE" || "CONFERENCE.RECORD_STOP" || "CONFERENCE.KEEP_ALIVE" || "CONFERENCE.TIMEFRAMES" || "CONFERENCE.END", // required
data: { // ConferenceLeaveConsumeEventData
jid: "STRING_VALUE",
},
},
conferenceRecordStop: { // ConferenceRecordStopConsumeEvent
room: "STRING_VALUE", // required
session: "STRING_VALUE", // required
time: Number("long"), // required
type: "CONFERENCE.START" || "CONFERENCE.JOIN" || "CONFERENCE.RECORD_START" || "CONFERENCE.TRANSCRIPTION" || "CONFERENCE.LEAVE" || "CONFERENCE.RECORD_STOP" || "CONFERENCE.KEEP_ALIVE" || "CONFERENCE.TIMEFRAMES" || "CONFERENCE.END", // required
data: { // ConferenceRecordStopConsumeEventData
jid: "STRING_VALUE", // required
link: "STRING_VALUE", // required
startTime: Number("long"), // required
endTime: Number("long"), // required
},
},
conferenceKeepAlive: { // ConferenceKeepAliveConsumeEvent
type: "CONFERENCE.START" || "CONFERENCE.JOIN" || "CONFERENCE.RECORD_START" || "CONFERENCE.TRANSCRIPTION" || "CONFERENCE.LEAVE" || "CONFERENCE.RECORD_STOP" || "CONFERENCE.KEEP_ALIVE" || "CONFERENCE.TIMEFRAMES" || "CONFERENCE.END", // required
time: Number("long"), // required
sessions: [ // ConferenceKeepAliveSessions // required
"STRING_VALUE",
],
},
conferenceEnd: { // ConverenceEndConsumeEvent
room: "STRING_VALUE", // required
session: "STRING_VALUE", // required
time: Number("long"), // required
type: "CONFERENCE.START" || "CONFERENCE.JOIN" || "CONFERENCE.RECORD_START" || "CONFERENCE.TRANSCRIPTION" || "CONFERENCE.LEAVE" || "CONFERENCE.RECORD_STOP" || "CONFERENCE.KEEP_ALIVE" || "CONFERENCE.TIMEFRAMES" || "CONFERENCE.END", // required
},
chatNew: { // ChatNewConsumeEvent
type: "CHAT.NEW" || "CHAT.UPDATE", // required
company: "STRING_VALUE", // required
time: Number("long"), // required
data: { // ChatNewConsumeEventData
channelId: "STRING_VALUE", // required
channelType: "direct" || "group", // required
subject: "STRING_VALUE", // required
service: "STRING_VALUE",
serviceTitle: "STRING_VALUE",
participants: { // ChatConsumeEventParticipants
agents: [ // UsersList // required
{ // User
id: "STRING_VALUE", // required
name: "STRING_VALUE",
email: "STRING_VALUE",
phone: "STRING_VALUE",
picture: "STRING_VALUE",
locale: "STRING_VALUE",
timeZone: "STRING_VALUE",
company: "STRING_VALUE",
bot: true || false,
pbxDomain: "STRING_VALUE",
pbxPort: "STRING_VALUE",
pbxExtension: "STRING_VALUE",
pbxSerial: "STRING_VALUE",
pbxUserId: "STRING_VALUE",
createdAt: "STRING_VALUE",
updatedAt: "STRING_VALUE",
},
],
agentsCount: Number("int"), // required
customers: [ // required
{
id: "STRING_VALUE", // required
name: "STRING_VALUE",
email: "STRING_VALUE",
phone: "STRING_VALUE",
picture: "STRING_VALUE",
locale: "STRING_VALUE",
timeZone: "STRING_VALUE",
company: "STRING_VALUE",
bot: true || false,
pbxDomain: "STRING_VALUE",
pbxPort: "STRING_VALUE",
pbxExtension: "STRING_VALUE",
pbxSerial: "STRING_VALUE",
pbxUserId: "STRING_VALUE",
createdAt: "STRING_VALUE",
updatedAt: "STRING_VALUE",
},
],
customersCount: Number("int"), // required
},
tags: [ // ChatTags
"sms" || "telephony" || "whatsapp",
],
sender: {
id: "STRING_VALUE", // required
name: "STRING_VALUE",
email: "STRING_VALUE",
phone: "STRING_VALUE",
picture: "STRING_VALUE",
locale: "STRING_VALUE",
timeZone: "STRING_VALUE",
company: "STRING_VALUE",
bot: true || false,
pbxDomain: "STRING_VALUE",
pbxPort: "STRING_VALUE",
pbxExtension: "STRING_VALUE",
pbxSerial: "STRING_VALUE",
pbxUserId: "STRING_VALUE",
createdAt: "STRING_VALUE",
updatedAt: "STRING_VALUE",
},
},
},
chatUpdate: { // ChatUpdateConsumeEvent
type: "CHAT.NEW" || "CHAT.UPDATE", // required
company: "STRING_VALUE", // required
time: Number("long"), // required
data: { // ChatUpdateConsumeEventData
channelId: "STRING_VALUE", // required
channelType: "direct" || "group", // required
subject: "STRING_VALUE", // required
service: "STRING_VALUE",
serviceTitle: "STRING_VALUE",
participants: {
agents: [ // required
{
id: "STRING_VALUE", // required
name: "STRING_VALUE",
email: "STRING_VALUE",
phone: "STRING_VALUE",
picture: "STRING_VALUE",
locale: "STRING_VALUE",
timeZone: "STRING_VALUE",
company: "STRING_VALUE",
bot: true || false,
pbxDomain: "STRING_VALUE",
pbxPort: "STRING_VALUE",
pbxExtension: "STRING_VALUE",
pbxSerial: "STRING_VALUE",
pbxUserId: "STRING_VALUE",
createdAt: "STRING_VALUE",
updatedAt: "STRING_VALUE",
},
],
agentsCount: Number("int"), // required
customers: [ // required
{
id: "STRING_VALUE", // required
name: "STRING_VALUE",
email: "STRING_VALUE",
phone: "STRING_VALUE",
picture: "STRING_VALUE",
locale: "STRING_VALUE",
timeZone: "STRING_VALUE",
company: "STRING_VALUE",
bot: true || false,
pbxDomain: "STRING_VALUE",
pbxPort: "STRING_VALUE",
pbxExtension: "STRING_VALUE",
pbxSerial: "STRING_VALUE",
pbxUserId: "STRING_VALUE",
createdAt: "STRING_VALUE",
updatedAt: "STRING_VALUE",
},
],
customersCount: Number("int"), // required
},
tags: [
"sms" || "telephony" || "whatsapp",
],
},
},
smsInbound: { // SmsInboundConsumeEvent
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
time: Number("int"), // required
type: "SMS.INBOUND" || "SMS.STATUS", // required
data: { // SmsInboundConsumeEventData
id: "STRING_VALUE", // required
from: "STRING_VALUE", // required
to: "STRING_VALUE", // required
message: "STRING_VALUE", // required
},
},
smsStatus: { // SmsStatusConsumeEvent
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
time: Number("int"), // required
type: "SMS.INBOUND" || "SMS.STATUS", // required
data: { // SmsStatusConsumeEventData
id: "STRING_VALUE", // required
from: "STRING_VALUE", // required
to: "STRING_VALUE", // required
status: "sent" || "delivered" || "trying" || "error", // required
channel: "1-way-sms" || "2-way-sms", // required
parts: Number("int"), // required
},
},
whatsappInbound: { // WhatsAppInboundConsumeEvent
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
time: new Date("TIMESTAMP"), // required
type: "WHATSAPP.INBOUND" || "WHATSAPP.STATUS", // required
data: { // WhatsAppInboundEventData
from: "STRING_VALUE", // required
to: "STRING_VALUE", // required
id: "STRING_VALUE", // required
message: "STRING_VALUE", // required
media: [ // StringList
"STRING_VALUE",
],
},
},
whatsappStatus: { // WhatsAppStatusConsumeEvent
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
time: new Date("TIMESTAMP"), // required
type: "WHATSAPP.INBOUND" || "WHATSAPP.STATUS", // required
data: { // WhatsAppStatusEventData
from: "STRING_VALUE", // required
to: "STRING_VALUE", // required
id: "STRING_VALUE", // required
status: "SENT" || "DELIVERED" || "ERROR" || "READ" || "DELETED" || "24H_CHANNEL_CLOSED", // required
reason: "STRING_VALUE", // required
channel: "STRING_VALUE",
parts: Number("int"),
},
},
presence: { // PresenceConsumeEvent
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
ext: "STRING_VALUE", // required
type: "PRESENCE" || "PRESENCE.TELEPHONY", // required
data: { // PresenceConsumeEventData
department: "STRING_VALUE",
group: "STRING_VALUE",
email: "STRING_VALUE",
sourceId: "STRING_VALUE",
status: "STRING_VALUE",
location: [ // PresenceLocation
"STRING_VALUE",
],
message: "STRING_VALUE",
until: "STRING_VALUE",
},
},
presenceTelephony: { // PresenceTelephonyConsumeEvent
time: Number("long"), // required
pbx: "STRING_VALUE", // required
company: "STRING_VALUE", // required
ext: "STRING_VALUE", // required
type: "PRESENCE" || "PRESENCE.TELEPHONY", // required
data: { // PresenceTelephonyConsumeEventData
department: "STRING_VALUE",
group: "STRING_VALUE",
email: "STRING_VALUE",
sourceId: "STRING_VALUE",
status: "STRING_VALUE",
},
},
},
};
const command = new ConsumeEventCommand(input);
const response = await client.send(command);
// {};