TaskClientApiEvents

Task.TaskClientApiEvents

Events

task.received

task.received(payload): void

Emitted whenever a task is received. Your event handler receives the payload. Example:

const client = new Task.Client(...)
client.on('task.received', (payload) => {
  console.log('Task Received', payload)
  // Do something with the payload...
})

Parameters

NameTypeDescription
payloadRecord<string, unknown>

The message payload.

Returns

void