Interface ExposureFetchClient

interface ExposureFetchClient {
    event<P>(id: string, payload?: P): Promise<void>;
    eventWithResult?<P>(id: string, payload?: P): Promise<P>;
    task<I, O>(id: string, input?: I): Promise<O>;
}

Methods

  • Emits an event and returns the final payload as seen by the remote Runner. Requires server support; older servers will respond with { ok: true } without result, in which case clients should throw.

    Type Parameters

    • P = unknown

    Parameters

    • id: string
    • Optionalpayload: P

    Returns Promise<P>