import type { EventSource, EventTypeDescriptor, OpenGeniClient, ReadyEventSource } from "@opengeni/sdk"; import type { EventTriggersDraft } from "./event-trigger-model.js"; /** An MCP server whose events people can pick without adding a source first. */ export interface AutomationEventServer { /** The MCP server id as configured for the workspace. */ serverId: string; /** Its name in the source picker. Default: the server id. */ name?: string | undefined; } export interface EventSourceStandInsOptions { /** Adds a stand-in's source and reads event types. */ client: Pick; workspaceId: string; /** The sources the person can use; undefined while they load. */ sources: EventSource[] | undefined; /** What the server lists as ready to use (`listReadyEventSources`). */ readySources?: readonly ReadyEventSource[] | undefined; /** MCP servers whose events people can pick right away, such as the host's own. */ eventServers?: readonly AutomationEventServer[] | undefined; /** Offer this workspace's own events, such as a meeting's transcript being ready. */ workspaceEvents?: boolean | undefined; } export interface EventSourceStandIns { /** The person's sources, then a stand-in for each one they don't have yet. */ sources: EventSource[] | undefined; /** Reads a source's event types; a stand-in's source is added first. */ loadEventTypes: (sourceId: string) => Promise; /** The triggers on the person's own sources, adding the source behind any stand-in. */ realEvents: (events: EventTriggersDraft) => Promise; /** True when a trigger is on a stand-in, so the host reads its sources again after saving. */ usesStandIn: (events: EventTriggersDraft) => boolean; } /** The sources a trigger can point at, with stand-ins for the ones added on first use. */ export declare function useEventSourceStandIns({ client, workspaceId, sources, readySources, eventServers, workspaceEvents, }: EventSourceStandInsOptions): EventSourceStandIns;