auth/cell_audit_action_specs.ts

cell_audit_list RPC — per-cell audit timeline.

Returns audit-log rows whose metadata names this cell on any of the (cell_id, source_id, parent_id, child_id, target_id, new_id) keys used by the cell-domain event types. The handler 404-masks for callers who are not in the cell's manage tier (can_manage_cell = admin / owner) — the timeline reveals who-touched-the-cell, so it is gated above can_view_cell.

Read-only; no audit side effect. Returns the most-recent CELL_AUDIT_LIST_EVENTS_MAX events; pagination is intentionally not on the wire yet — the only consumer renders a single page. Add {before, limit} input + {next_before} output together when a paginating consumer surfaces.

view source

Declarations
#

6 declarations

all_cell_audit_action_specs
#

auth/cell_audit_action_specs.ts view source

readonly [{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: false; input: Schema<{ cell_id: Branded<string, "Uuid">; acting?: Branded<...> | undefined; }, { ...; }, "object", { ...; }>; output: Schema<...>; async: true; description: st... import {all_cell_audit_action_specs} from '@fuzdev/fuz_app/auth/cell_audit_action_specs.js';

Registry export to compose into all_cell_action_specs.

cell_audit_list_action_spec
#

auth/cell_audit_action_specs.ts view source

also exported from auth/cell_action_specs.ts

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "required"; }; side_effects: false; input: Schema<{ cell_id: Branded<string, "Uuid">; acting?: Branded<...> | undefined; }, { ...; }, "object", { ...; }>; output: Schema<...>; async: true; description: string; } import {cell_audit_list_action_spec} from '@fuzdev/fuz_app/auth/cell_audit_action_specs.js';

CELL_AUDIT_LIST_EVENTS_MAX
#

auth/cell_audit_action_specs.ts view source

50 import {CELL_AUDIT_LIST_EVENTS_MAX} from '@fuzdev/fuz_app/auth/cell_audit_action_specs.js';

The most events cell_audit_list returns, the most recent first. Fixed: the input takes no limit and the output no cursor, so this is the whole timeline a caller sees.

CellAuditEventJson
#

auth/cell_audit_action_specs.ts view source

value + type

{ id: Branded<string, "Uuid">; created_at: string; event_type: string; outcome: "success" | "failure"; seq: number; actor_id: Branded<string, "Uuid"> | null; } import {CellAuditEventJson} from '@fuzdev/fuz_app/auth/cell_audit_action_specs.js';

Wire shape for a single cell-audit row. Narrower than AuditLogEventJson — account_id and target_account_id are deliberately omitted so this verb does NOT surface the actor↔account join. target_actor_id and metadata are dropped too: target_actor_id is NULL for every cell-domain event (the grant recipient lives inside metadata.principal on grant rows, not on the audit-log top-level field); metadata is unread by the timeline UI.

ip is also omitted: it is PII about the actors who touched the cell, and even at the manage tier this per-cell timeline has no need for it (admins reach the full audit_log surface, which carries ip, through the admin audit verbs). Keeping it off this wire avoids leaking collaborators' IPs to a cell's owner.

All omitted fields can be re-added under a richer admin-only event-detail view later — keep the wire surface honest about what consumers use.

id

type Branded

created_at

type string

event_type

type string

outcome

type "success" | "failure"

seq

type number

actor_id

type Branded | null

CellAuditListInput
#

auth/cell_audit_action_specs.ts view source

value + type

{ cell_id: Branded<string, "Uuid">; acting?: Branded<string, "Uuid"> | undefined; } import {CellAuditListInput} from '@fuzdev/fuz_app/auth/cell_audit_action_specs.js';

cell_id

type Branded

acting?

type Branded

CellAuditListOutput
#

auth/cell_audit_action_specs.ts view source

value + type

{ events: { id: Branded<string, "Uuid">; created_at: string; event_type: string; outcome: "success" | "failure"; seq: number; actor_id: Branded<string, "Uuid"> | null; }[]; } import {CellAuditListOutput} from '@fuzdev/fuz_app/auth/cell_audit_action_specs.js';

events

type CellAuditEventJson[]

Depends on
#

Imported by
#