/** * audit-info.tsx * * — discreet "when and who" footer for a record: created, modified * and (if tombstoned) deleted, each with the actor and a relative + absolute * date. Driven only by the kernel's `TableMetadata.audit` (column names) and * the record row — manifests declare nothing. * * Actor resolution (no extra requests), in order: * 1. the host's `resolveActor(id)` when it returns a name; * 2. the record's expanded sibling (`created_by_id` → `row.created_by`, * `{ label | name | title }` or a plain string); * 3. the system actor id → "Sistema" / "System"; * 4. a short id (first 8 chars) — never a long uuid. * * Renders nothing when `audit` is absent or the record has none of its values. */ import * as React from 'react'; import type { AuditMeta } from './types'; /** The kernel's actor for unattended work (schedules, webhooks, connectors). */ export declare const SYSTEM_ACTOR_ID = "00000000-0000-0000-0000-000000000001"; /** * Defensive reader for the served `audit` block: keeps only known keys whose * value is a non-empty string; returns `undefined` when nothing usable remains. */ export declare function readAuditMeta(raw: unknown): AuditMeta | undefined; export interface AuditActor { /** Display text. */ name: string; /** True when the name is a real resolved label (not a short id). */ resolved: boolean; } /** Resolves the actor stored in `row[idColumn]` to something human. */ export declare function resolveAuditActor(row: Record, idColumn: string | undefined, opts: { resolveActor?: (id: string) => string | undefined; systemLabel: string; }): AuditActor | null; export interface AuditInfoProps { /** The record row (keys are the column names `audit` points at). */ record: Record | null | undefined; /** `TableMetadata.audit`. Absent → renders nothing. */ audit: AuditMeta | null | undefined; /** Optional host resolver uuid → display name (e.g. from a users cache). */ resolveActor?: (id: string) => string | undefined; /** IANA timezone; defaults to the org runtime timezone. */ timeZone?: string; /** BCP-47 locale; defaults to the i18n language. */ locale?: string; /** Start expanded. Default: collapsed. */ defaultOpen?: boolean; className?: string; } export declare function AuditInfo({ record, audit, resolveActor, timeZone, locale, defaultOpen, className, }: AuditInfoProps): React.JSX.Element | null; //# sourceMappingURL=audit-info.d.ts.map