/** * `cleo cloud activity --journal`: what each device changed and when, read * from this store's journal (T13369). * * The plain `cleo cloud activity` lists the server's account events * (snapshots, leases, enrolments). This lists the journal transactions this * store received: per transaction, the device that wrote it, its write time * (HLC), when it was staged and applied here, its status, its command and * its per-table op counts; and per device, how many transactions and the * newest one's time. * * Local: the listing reads only the store. Device names come from the * account's device list when a device credential is available, unless * `offline` is set; without names the device ids are still shown. * * @module cloud/nexus-cloud-journal-activity * @task T13369 * @epic T12323 */ import type { CloudJournalActivityResult, CloudVaultScope, CloudWarning } from '@cleocode/contracts'; import { type NexusCloudOptions } from './nexus-cloud.js'; /** Options of {@link nexusJournalActivity}. */ export interface NexusJournalActivityOptions extends NexusCloudOptions { /** The project directory (default: the current project). */ readonly cwd?: string; /** Which store (default `project`). */ readonly scope?: CloudVaultScope; /** Transactions to return (1..200, default 50). */ readonly limit?: number; /** Older page: the `nextBefore` of a previous call. */ readonly before?: string; /** Only transactions signed by this Nexus device id. */ readonly deviceId?: string; /** Only transactions written at or after this instant (ISO-8601). */ readonly since?: string; /** Only transactions for this project id. */ readonly projectId?: string; /** Skip the device-name lookup: no request leaves the machine. */ readonly offline?: boolean; } /** Thrown for a `since` that is not a date. */ export declare class JournalActivitySinceError extends Error { readonly code = "E_VALIDATION"; readonly fix = "pass --since as an ISO-8601 date or time, e.g. 2026-10-09 or 2026-10-09T12:00:00Z"; constructor(since: string); } /** * Device names and last presence by Nexus device id, or why there are none. * No request is made when `offline` is set. * * @param opts - The connection options and `offline`. * @returns The names, last presence times, and a warning when the lookup failed. */ export declare function deviceNames(opts: NexusCloudOptions & { readonly offline?: boolean; }): Promise<{ names: Map; lastSeen: Map; warning: CloudWarning | null; }>; /** * List the journal transactions this store received, newest first, with * the device that wrote each one. * * @param opts - Store, paging, filters and the name lookup. * @returns The page, the per-device summary, the next cursor and warnings. * @throws {JournalActivitySinceError} When `since` is not a date. */ export declare function nexusJournalActivity(opts?: NexusJournalActivityOptions): Promise; //# sourceMappingURL=nexus-cloud-journal-activity.d.ts.map