import type {
	Audience,
	Target,
	TargetCandidate,
	Tour,
} from "@circuy/contracts";

export type IdentifyAttributes = Record<string, string>;

export type TelemetryType =
	| "start"
	| "step_view"
	| "choice"
	| "complete"
	| "dismiss"
	| "target_lost";

export type TelemetryEvent = {
	type: TelemetryType;
	tourId: string;
	tourVersion: number;
	stepId?: string;
	choiceId?: string;
	sessionId: string;
};

export type BootOptions = {
	key: string;
	tours: Tour[];
	eventsUrl?: string;
	waitTimeoutMs?: number;
};

export type { Audience, Target, TargetCandidate, Tour };
