Appearance
Interface: AuditClient
Properties
count
ts
count: (filter?) => Promise<{
approxBytes: {
csv: number;
jsonl: number;
};
total: number;
totalIsEstimate: boolean;
}>;How many events an export of filter holds and its approximate size per format.
Parameters
filter?
Returns
Promise<{ approxBytes: { csv: number; jsonl: number; }; total: number; totalIsEstimate: boolean; }>
export
ts
export: (format, filter?, filename?) => Promise<Blob>;Downloads the filtered export (audit:export); the last line is the manifest.
Parameters
format
"csv" | "jsonl"
filter?
filename?
string
Returns
Promise<Blob>
exportUrl
ts
exportUrl: (format, filter?, filename?) => string;Absolute URL of the export endpoint for a filter (the request still needs the bearer token); filename names the file, without the extension.
Parameters
format
"csv" | "jsonl"
filter?
filename?
string
Returns
string
get
ts
get: (id, filter?) => Promise<{
action: string;
actorId: string;
actorType: "app" | "workflow" | "user" | "system" | "service" | "applicant";
id: string;
meta?: | {
ip: string | null;
requestId: string;
route: string;
userAgent: string | null;
}
| null;
neighbors: {
newerId: string | null;
olderId: string | null;
};
occurredAt: Date;
payload: unknown;
related: {
caseId: string | null;
decisionId: string | null;
subjectId: string | null;
workflowRunId: string | null;
};
resourceId: string;
resourceType: string;
tenantId: string;
}>;One event by id (audit:read) with its neighbours in the list of filter and the records it concerns; a 404 ApiError when it is not in the caller's tenant.
Parameters
id
string
filter?
Returns
Promise<{ action: string; actorId: string; actorType: "app" | "workflow" | "user" | "system" | "service" | "applicant"; id: string; meta?: | { ip: string | null; requestId: string; route: string; userAgent: string | null; } | null; neighbors: { newerId: string | null; olderId: string | null; }; occurredAt: Date; payload: unknown; related: { caseId: string | null; decisionId: string | null; subjectId: string | null; workflowRunId: string | null; }; resourceId: string; resourceType: string; tenantId: string; }>
list
ts
list: (query?) => Promise<object[]>;Audit events matching query, newest first (audit:read).
Parameters
query?
Returns
Promise<object[]>
listPage
ts
listPage: (query?) => Promise<Page<{
action: string;
actorId: string;
actorType: "app" | "workflow" | "user" | "system" | "service" | "applicant";
id: string;
meta?: | {
ip: string | null;
requestId: string;
route: string;
userAgent: string | null;
}
| null;
occurredAt: Date;
payload: unknown;
resourceId: string;
resourceType: string;
tenantId: string;
}>>;One page of list with the number of matching events.
Parameters
query?
Returns
Promise<Page<{ action: string; actorId: string; actorType: "app" | "workflow" | "user" | "system" | "service" | "applicant"; id: string; meta?: | { ip: string | null; requestId: string; route: string; userAgent: string | null; } | null; occurredAt: Date; payload: unknown; resourceId: string; resourceType: string; tenantId: string; }>>