Files
brenden 682afacd30 Add native self-hosted instance connection to fluxer_desktop
Trimmed monorepo checkout (fluxer_desktop + packages/voice_engine_v2 +
tools/ci) with a "Connect to a Different Server" menu item and popout
that lets the desktop app switch to any self-hosted Fluxer instance,
plus fixes for well-known discovery on single-domain self-hosted
deployments and a false-positive ERR_ABORTED on same-origin client
redirects during the switch. Defaults to chat.fluxr.chat and uses an
isolated userData directory from the official build.
2026-07-01 18:22:43 -04:00

65 lines
1.4 KiB
TypeScript

// SPDX-License-Identifier: AGPL-3.0-or-later
export type Urgency = 'low' | 'normal' | 'critical';
export interface NotifyImageData {
width: number;
height: number;
rowstride: number;
hasAlpha: boolean;
bitsPerSample: number;
channels: number;
data: Buffer | Uint8Array;
}
export interface NotifyAction {
key: string;
label: string;
}
export interface NotifyPayload {
appName: string;
replacesId?: number;
appIcon?: string;
summary: string;
body: string;
actions?: ReadonlyArray<NotifyAction>;
expireTimeoutMs?: number;
hints?: {
urgency?: Urgency;
category?: string;
desktopEntry?: string;
soundFile?: string;
transient?: boolean;
actionIcons?: boolean;
imageData?: NotifyImageData;
};
}
export type FreedesktopNotificationEvent =
| {kind: 'actionInvoked'; id: number; actionKey: string}
| {kind: 'closed'; id: number; reason: number};
export interface ServerInformation {
name: string;
vendor: string;
version: string;
specVersion: string;
}
export declare class FreedesktopNotifications {
constructor(onEvent: (event: FreedesktopNotificationEvent) => void);
notify(payload: NotifyPayload): Promise<number>;
closeNotification(id: number): Promise<void>;
getServerCapabilities(): Promise<Array<string>>;
close(): Promise<void>;
}
export declare function getServerInformation(): Promise<ServerInformation>;
export declare const loadError: Error | null;