@larva.io/report-definitions
v1.0.28
Published
Defines larva.io report events
Downloads
53
Readme
Larva.io event reporting definitions
Standard Contact ID event codes are used. All codes above 999 are Larva.io custom events. TypeDefinitions included.
Example:
import { ReportEvent, ReportEventGroup, LogLevel, getEventGroup, getEventMessage, getLogLevel } from '@larva.io/report-definitions';
// let's say you have event with ID 1101 (ReportEvent.USER_ADDED);
const event = 1101; // ReportEvent.USER_ADDED
const message = getEventMessage(event); // 'User added'
const eventGroup = getEventGroup(event); // 'system_events' // ReportEventGroup.SYSTEM_EVENTS
const logLevel = getLogLevel(event); // 'warning' // LogLevel.WARNING
console.wan(`Event id ${event} message: "${message}", eventGroup ${eventGroup} logLevel ${logLevel}`);