import * as t from 'io-ts'; import { Context, IdentifyMessage, Integrations, SchemaValidator, TrackMessage } from './models'; export { t }; export interface NeverProps { [key: string]: t.Type; } /** We need this to as a workaround to accomodate `NeverProps` type */ export declare type AnyOrNeverProps = NeverProps | t.AnyProps; export declare type TypeOfProps

= { [K in keyof P]: P[K]['_A']; }; /** Runtype type for traits */ export declare type Traits = AnyOrNeverProps; /** Runtime type for events */ export interface Events { [eventName: string]: AnyOrNeverProps; } export declare const NoProps: NeverProps; /** * This is a TypeScript implementation of `SchemaValidator` which allows for both * compile time and runtime type validation */ export declare class TrackingPlan implements SchemaValidator { debug: boolean; traits: T; events: E; constructor(options: { traits: T; events: E; }); validateIdentify(message: IdentifyMessage): { traits: { [x: string]: any; }; type: "identify"; userId?: string | undefined; anonymousId?: string | undefined; context?: Context | undefined; timestamp?: Date | undefined; messageId?: string | undefined; integrations?: Integrations | undefined; } | null; validateTrack(message: TrackMessage): { properties: { [x: string]: any; }; type: "track"; event: string; userId?: string | undefined; anonymousId?: string | undefined; context?: Context | undefined; timestamp?: Date | undefined; messageId?: string | undefined; integrations?: Integrations | undefined; } | null; private error; } export declare class TrackingPlanError extends Error { constructor(message: string, validation?: t.Validation); }