import { CoreAnalytics } from '@customerio/cdp-analytics-core'; import { AnalyticsSettings } from './settings'; import { Callback } from './dispatch-emit'; import { NodeEmitter } from './emitter'; import { AliasParams, GroupParams, IdentifyParams, PageParams, TrackParams, Plugin } from './types'; export declare class Analytics extends NodeEmitter implements CoreAnalytics { private readonly _eventFactory; private _isClosed; private _pendingEvents; private readonly _closeAndFlushDefaultTimeout; private readonly _publisher; private readonly _queue; ready: Promise; constructor(settings: AnalyticsSettings); get VERSION(): string; /** * Call this method to stop collecting new events and flush all existing events. * This method also waits for any event method-specific callbacks to be triggered, * and any of their subsequent promises to be resolved/rejected. */ closeAndFlush({ timeout, }?: { /** Set a maximum time permitted to wait before resolving. */ timeout?: number; }): Promise; private _dispatch; /** * Combines two unassociated user identities. */ alias({ userId, previousId, context, timestamp, integrations }: AliasParams, callback?: Callback): void; /** * Associates an identified user with a collective. */ group({ timestamp, groupId, userId, anonymousId, traits, context, integrations, }: GroupParams, callback?: Callback): void; /** * Includes a unique userId and (maybe anonymousId) and any optional traits you know about them. */ identify({ userId, anonymousId, traits, context, timestamp, integrations, }: IdentifyParams, callback?: Callback): void; /** * The page method lets you record page views on your website, along with optional extra information about the page being viewed. */ page({ userId, anonymousId, category, name, properties, context, timestamp, integrations, }: PageParams, callback?: Callback): void; /** * Records screen views on your app, along with optional extra information * about the screen viewed by the user. */ screen({ userId, anonymousId, category, name, properties, context, timestamp, integrations, }: PageParams, callback?: Callback): void; /** * Records actions your users perform. */ track({ userId, anonymousId, event, properties, context, timestamp, integrations, }: TrackParams, callback?: Callback): void; /** * Registers one or more plugins to augment Analytics functionality. * @param plugins */ register(...plugins: Plugin[]): Promise; /** * Deregisters one or more plugins based on their names. * @param pluginNames - The names of one or more plugins to deregister. */ deregister(...pluginNames: string[]): Promise; } //# sourceMappingURL=analytics-node.d.ts.map