Skip to content

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? ​

AuditFilterQuery

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? ​

AuditFilterQuery

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? ​

AuditFilterQuery

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? ​

AuditFilterQuery

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? ​

AuditListQuery

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? ​

AuditListQuery

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; }>>

Released under the Apache-2.0 License.