import { EventFactory } from '@customerio/cdp-analytics-core' import { createMessageId } from '../lib/get-message-id' import { CustomerioEvent } from './types' // use declaration merging to downcast CoreCustomerioEvent without adding any runtime code. // if/when we decide to add an actual implementation to NodeEventFactory that actually changes the event shape, we can remove this. export interface NodeEventFactory { alias(...args: Parameters): CustomerioEvent group(...args: Parameters): CustomerioEvent identify(...args: Parameters): CustomerioEvent track(...args: Parameters): CustomerioEvent page(...args: Parameters): CustomerioEvent screen(...args: Parameters): CustomerioEvent } export class NodeEventFactory extends EventFactory { constructor() { super({ createMessageId }) } }