@larva.io/report-definitions
TypeScript icon, indicating that this package has built-in type declarations

1.0.28 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @larva.io/report-definitions

Homepage

www.larva.io

Weekly Downloads

17

Version

1.0.28

License

ISC

Unpacked Size

102 kB

Total Files

10

Last publish

Collaborators

  • reijosirila