export type TrackingEvent = { category: string; action: string; label: string; value: number; }; export type TrackingSource = { /** * - Last interaction */ action?: string | undefined; senderId?: string | undefined; recipientId?: string | undefined; appId?: string | undefined; channelId?: string | undefined; cluid?: string | undefined; /** * - Used for handover */ handoverEvent?: string | undefined; /** * - Used for Nps */ handoverAgents?: string | undefined; sourceNode?: string | undefined; /** * - NPS rating */ npsValue?: number | undefined; text?: string | undefined; /** * - Use null to suppress intent logging */ intents: string[] | null; prevAction?: string | undefined; doNotTrack?: boolean | undefined; skill?: string | undefined; req?: any; res?: any; /** * - the send method (used in case res is not provided) */ send?: Function | undefined; sharedContext?: object | undefined; /** * - Console like logger */ log?: object | undefined; /** * - This flag is set to true if no more transformations * should be executed */ stop?: boolean | undefined; }; export type TrackingResult = { tracking_information: TrackingInformation; }; export type TrackingInformation = { tracking: Tracking; }; /** * @param {TrackingSource} source */ export function trackEvent(source: TrackingSource): void; export function trackOutgoingEvent({ source, message }: { source: any; message: any; }): void;