UNPKG

idea-toolbox

Version:
62 lines (61 loc) 1.58 kB
import { Resource } from './resource.model'; import { epochDateTime } from './epoch'; /** * The log of an API request, in IDEA's format. * * Table: `idea_logs`. * * Indexes: * - `logId-timestamp-index` (all). */ export declare class APIRequestLog extends Resource { /** * The id to identify the log stream; usually, it's the concatenation of the project key with the teamId. */ logId: string; /** * Timestamp in which the log was captured. */ timestamp: epochDateTime; /** * Id of the user linked to the log. */ userId: string; /** * The concatenation of the timestamp with the userId, to support scenarios of concurrency. */ sort: string; /** * TTL of the record (in seconds); it's usually a month after the insertion. */ expiresAt: number; /** * The resource involved in the log; e.g. `/orders` or `/orders/{orderId}/items`. */ resource: string; /** * The determinated path for the resource; e.g. `/orders` or `/orders/12345/items`. */ path: string; /** * The identifier of a specific element of the resource (`proxy`). */ resourceId: string; /** * Enum: HTTP method (POST, GET, etc.). */ method: string; /** * If true, the request ended successfully. */ succeeded: boolean; /** * Action detail; valid (mostly) for PATCH requests. */ action?: string; /** * For complex logs, it contains extra information. */ description?: string; load(x: any): void; }