Circle V2 API Docs
    Preparing search index...

    Type Alias ElectronApi

    type ElectronApi = {
        api: { fetch: (request: ApiFetchRequest) => Promise<ApiFetchResponse> };
        auth: {
            hasSession: () => Promise<HasSessionResult>;
            onStateChanged: (
                callback: (payload: AuthStateChangedPayload) => void,
            ) => () => void;
        };
        desktopCapture: { getSources: () => Promise<DesktopCaptureSource[]> };
        permissions: { requestMicrophone: () => Promise<boolean> };
        tray: {
            hide: () => Promise<void>;
            show: () => Promise<void>;
            toggle: () => Promise<void>;
        };
        window: {
            close: () => Promise<void>;
            focus: () => Promise<void>;
            minimize: () => Promise<void>;
        };
    }
    Index

    Properties

    api: { fetch: (request: ApiFetchRequest) => Promise<ApiFetchResponse> }

    Type Declaration

    • fetch: (request: ApiFetchRequest) => Promise<ApiFetchResponse>

      Fetch executed by the main process against the API origin so httpOnly session cookies attach and the server refreshes the session in-flight. The tray renderer's local origin cannot send sameSite: lax cookies cross-site, so all authenticated HTTP must go through this channel.

    auth: {
        hasSession: () => Promise<HasSessionResult>;
        onStateChanged: (
            callback: (payload: AuthStateChangedPayload) => void,
        ) => () => void;
    }
    desktopCapture: { getSources: () => Promise<DesktopCaptureSource[]> }
    permissions: { requestMicrophone: () => Promise<boolean> }
    tray: {
        hide: () => Promise<void>;
        show: () => Promise<void>;
        toggle: () => Promise<void>;
    }
    window: {
        close: () => Promise<void>;
        focus: () => Promise<void>;
        minimize: () => Promise<void>;
    }