Circle V2 API Docs
    Preparing search index...

    Type Alias ElectronApi

    type ElectronApi = {
        api: { fetch: (request: ApiFetchRequest) => Promise<ApiFetchResponse> };
        app: { reloadMain: () => Promise<void> };
        auth: {
            hasSession: () => Promise<HasSessionResult>;
            onStateChanged: (
                callback: (payload: AuthStateChangedPayload) => void,
            ) => () => void;
        };
        desktopCapture: { getSources: () => Promise<DesktopCaptureSource[]> };
        permissions: {
            getScreenRecordingStatus: () => Promise<ScreenRecordingAccessStatus>;
            openScreenRecordingSettings: () => Promise<void>;
            requestMicrophone: () => Promise<boolean>;
        };
        systemAudio: {
            getPreferLegacyLoopback: () => Promise<boolean>;
            relaunchForCompatibility: () => Promise<void>;
            setPreferLegacyLoopback: (preferLegacyLoopback: boolean) => Promise<void>;
        };
        tray: {
            hide: () => Promise<void>;
            resize: (height: number) => 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.

    app: { reloadMain: () => Promise<void> }

    Type Declaration

    • reloadMain: () => Promise<void>

      Reload the main window's remote app URL (used to retry after a load failure).

    auth: {
        hasSession: () => Promise<HasSessionResult>;
        onStateChanged: (
            callback: (payload: AuthStateChangedPayload) => void,
        ) => () => void;
    }
    desktopCapture: { getSources: () => Promise<DesktopCaptureSource[]> }
    permissions: {
        getScreenRecordingStatus: () => Promise<ScreenRecordingAccessStatus>;
        openScreenRecordingSettings: () => Promise<void>;
        requestMicrophone: () => Promise<boolean>;
    }

    Type Declaration

    • getScreenRecordingStatus: () => Promise<ScreenRecordingAccessStatus>

      macOS screen/system-audio recording access status (gates loopback capture).

    • openScreenRecordingSettings: () => Promise<void>

      Open the macOS "Screen & System Audio Recording" privacy settings pane.

    • requestMicrophone: () => Promise<boolean>
    systemAudio: {
        getPreferLegacyLoopback: () => Promise<boolean>;
        relaunchForCompatibility: () => Promise<void>;
        setPreferLegacyLoopback: (preferLegacyLoopback: boolean) => Promise<void>;
    }

    Type Declaration

    • getPreferLegacyLoopback: () => Promise<boolean>

      Whether the legacy ScreenCaptureKit loopback backend is forced at startup.

    • relaunchForCompatibility: () => Promise<void>

      Switch to the legacy ScreenCaptureKit loopback backend and relaunch the app so the Chromium feature flag (set before app-ready) takes effect.

    • setPreferLegacyLoopback: (preferLegacyLoopback: boolean) => Promise<void>

      Persist the legacy-loopback preference (applied on next launch).

    tray: {
        hide: () => Promise<void>;
        resize: (height: number) => Promise<void>;
        show: () => Promise<void>;
        toggle: () => Promise<void>;
    }

    Type Declaration

    • hide: () => Promise<void>
    • resize: (height: number) => Promise<void>

      Resize the tray window to fit its rendered content height. The main process clamps the value to the display work area and re-anchors the window under the tray icon, so the renderer just reports its measured content height.

    • show: () => Promise<void>
    • toggle: () => Promise<void>
    window: {
        close: () => Promise<void>;
        focus: () => Promise<void>;
        minimize: () => Promise<void>;
    }