UNPKG

@retracedhq/retraced

Version:

The official NodeJS client for interacting with the Retraced audit logging API.

24 lines (23 loc) 744 B
import { Event } from "./event"; import { StructuredQuery, EventNodeMask, EventsConnection } from "./graphql"; export interface Config { projectId: string; apiKey: string; endpoint?: string; component?: string; version?: string; viewLogAction?: string; } export interface NewEventRecord { id: string; hash: string; } export declare class Client { private config; constructor(config: Config); private mapping; reportEvent(event: Event): Promise<string>; reportEvents(events: Event[]): Promise<string[]>; getViewerToken(groupId: string, actorId: string, isAdmin?: boolean): Promise<string>; query(q: StructuredQuery, mask: EventNodeMask, pageSize: number): Promise<EventsConnection>; }