@twilio/flex-sdk
    Preparing search index...

    Interface Action<T>

    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);
    }
    interface Action<T> {
        run(ctx: {}): T;
    }

    Type Parameters

    • T

    Implemented by

    Index

    Methods

    Methods

    • Parameters

      • ctx: {}

      Returns T