mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
21 lines
653 B
TypeScript
21 lines
653 B
TypeScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
export const DESKTOP_KNOWN_INSTANCE_CHANNELS = Object.freeze({
|
|
getAll: 'desktop-known-instances:get-all',
|
|
upsert: 'desktop-known-instances:upsert',
|
|
delete: 'desktop-known-instances:delete',
|
|
} as const);
|
|
|
|
export interface DesktopKnownInstanceRecord {
|
|
readonly instanceKey: string;
|
|
readonly domain: string;
|
|
readonly displayName: string;
|
|
readonly lastUsed: number;
|
|
}
|
|
|
|
export interface DesktopKnownInstanceStorageAPI {
|
|
getAll: () => Promise<ReadonlyArray<DesktopKnownInstanceRecord>>;
|
|
upsert: (instance: DesktopKnownInstanceRecord) => Promise<void>;
|
|
delete: (instanceKey: string) => Promise<void>;
|
|
}
|