Generic interface for executable actions in the Flex SDK. Actions represent operations that can be performed on Flex resources such as tasks, reservations, or participants.
import type { Action, TaskReservation } from "@twilio/flex-sdk"; import { createClient, AcceptTask } from "@twilio/flex-sdk"; async function runAction() { const client = await createClient("SDK_TOKEN"); const action: Action<Promise<TaskReservation>> = new AcceptTask("TASK_SID"); await client.execute(action); } Copy
import type { Action, TaskReservation } from "@twilio/flex-sdk"; import { createClient, AcceptTask } from "@twilio/flex-sdk"; async function runAction() { const client = await createClient("SDK_TOKEN"); const action: Action<Promise<TaskReservation>> = new AcceptTask("TASK_SID"); await client.execute(action); }
Generic interface for executable actions in the Flex SDK. Actions represent operations that can be performed on Flex resources such as tasks, reservations, or participants.
Example