/** * `cleo cloud activity --devices`: one row per device answering "what did my * other devices change, and when, and are they online" (T13482). * * It merges three sources the other views show separately: the account's * device list (name, state, presence), this store's sync journal (the newest * transaction each device wrote, `cloud activity --journal`) and the server's * account events (the newest snapshot, lease or enrolment each device made, * `cloud activity`). Offline it shows the journal alone, with a warning. * * @module cloud/nexus-cloud-device-overview * @task T13482 * @epic T12323 */ import type { CloudActivityItem, CloudDeviceOverviewResult, CloudJournalActivityResult, CloudVaultScope, CloudWarning, NexusCloudDevice } from '@cleocode/contracts'; import type { NexusCloudOptions } from './nexus-cloud.js'; /** Options of {@link nexusDeviceOverview}. */ export interface NexusDeviceOverviewOptions extends NexusCloudOptions { /** The project directory (default: the current project). */ readonly cwd?: string; /** Which store's journal (default `project`). */ readonly scope?: CloudVaultScope; /** Read only the local journal: no request leaves the machine. */ readonly offline?: boolean; } /** The sources {@link mergeDeviceOverview} combines; `null` for one that was not read. */ export interface DeviceOverviewSources { readonly scope: CloudVaultScope; readonly journal: CloudJournalActivityResult; readonly devices: readonly NexusCloudDevice[] | null; readonly server: readonly CloudActivityItem[] | null; readonly warnings: readonly CloudWarning[]; /** Clock for presence freshness (tests). */ readonly nowMs?: number; } /** * Merge the device list, the journal page and the server events into one * row per device, newest activity first. * * @param src - The sources; a `null` device list or server list was not read. * @returns The per-device overview. */ export declare function mergeDeviceOverview(src: DeviceOverviewSources): CloudDeviceOverviewResult; /** * Read the three sources and merge them. A failed device list or event * read becomes a warning; the journal read is local and always runs. * * @param opts - Store, offline switch and Nexus overrides. * @returns One row per device, newest activity first. */ export declare function nexusDeviceOverview(opts?: NexusDeviceOverviewOptions): Promise; //# sourceMappingURL=nexus-cloud-device-overview.d.ts.map