import { AgentDispatch } from '@livekit/protocol'; import { ClientOptions } from './ClientOptions.js'; import { ServiceBase } from './ServiceBase.js'; import './grants.js'; import 'jose'; interface CreateDispatchOptions { metadata?: string; } /** * Client to access Agent APIs */ declare class AgentDispatchClient extends ServiceBase { private readonly rpc; /** * @param host - hostname including protocol. i.e. 'https://.livekit.cloud' * @param apiKey - API Key, can be set in env var LIVEKIT_API_KEY * @param secret - API Secret, can be set in env var LIVEKIT_API_SECRET * @param options - client options */ constructor(host: string, apiKey?: string, secret?: string, options?: ClientOptions); /** * Create an explicit dispatch for an agent to join a room. To use explicit * dispatch, your agent must be registered with an `agentName`. * @param roomName - name of the room to dispatch to * @param agentName - name of the agent to dispatch * @param options - optional metadata to send along with the dispatch * @returns the dispatch that was created */ createDispatch(roomName: string, agentName: string, options?: CreateDispatchOptions): Promise; /** * Delete an explicit dispatch for an agent in a room. * @param dispatchId - id of the dispatch to delete * @param roomName - name of the room the dispatch is for */ deleteDispatch(dispatchId: string, roomName: string): Promise; /** * Get an Agent dispatch by ID * @param dispatchId - id of the dispatch to get * @param roomName - name of the room the dispatch is for * @returns the dispatch that was found, or undefined if not found */ getDispatch(dispatchId: string, roomName: string): Promise; /** * List all agent dispatches for a room * @param roomName - name of the room to list dispatches for * @returns the list of dispatches */ listDispatch(roomName: string): Promise; } export { AgentDispatchClient };