import assert from "assert"; import { RawEvent } from "../../types"; export default (event: RawEvent) => { assert(event, `Diag:Canaries null event: ${event}`); assert( event.id, `Diag:Canaries event is missing the required field id ${event}` ); assert( event.ts, `Diag:Canaries event is missing the required field ts ${event}` ); return { id: `diag|${event.id}`, ts: event.ts, user_info: { source_user_id: null, user_id: null, name: null, email: null, ip: null, avatar: null, nickname: null, phone: null, city: null, continent_code: null, country: null, postal_code: null, region: null, timezone: null, country_code: null, address_line1: null, address_line2: null, user_agent: null, is_employee: null, title: null, birthday: null, company: { name: null, id: null, industry: null, employee_count: null, plan: null }, created_at: null, age: null, gender: null, website: null, custom_attributes: null }, text: "Diagnositc Event", href: null, is_bad: null, direction: null, source: "diag", stream: "canaries" }; };