import type { GameModelAPI } from '../domains/gameModel.js'; import type { Scalars } from '../generated/graphql.js'; /** Options for {@link TelemetryKit}. */ export interface TelemetryKitOptions { /** The counter container type name. Defaults to `'TelemetryCounter'`. */ counterTypeName?: string; /** * Sample rate for `track()` in [0, 1] — the client-side budget knob. * Defaults to 1 (every event). */ sampleRate?: number; } /** * Game analytics events (matrix P7) — MODEL-THIN by design: `track()` * writes a naming-convention row into the existing model event log via a * fire-and-forget container property bump, and sampled counters live in * ordinary `TelemetryCounter` containers (`event_name` + `count`). Export * and BI are platform concerns, deliberately out of scope; the convention * is the abstraction. * * Naming convention: `.` (e.g. `ftue.step_completed`, * `shop.purchase`). Keep cardinality low — counters are containers. * * Obtained via `client.kit(appId).telemetry`. */ export declare class TelemetryKit { private readonly appId; private readonly gameModel; private readonly counterTypeName; private readonly sampleRate; /** event name -> counter container id (cached per session). */ private readonly counterIds; constructor(appId: Scalars['BigInt']['input'], gameModel: GameModelAPI, options?: TelemetryKitOptions); /** * Track one event — fire-and-forget (never throws, never blocks * gameplay): bumps the event's sampled counter. `props` ride the * container's last-props snapshot for spot-debugging (NOT a warehouse). */ track(name: string, props?: Record): void; /** The awaitable form of {@link track} for tests/backfills. */ bump(name: string, props?: Record): Promise; /** Read the sampled counters (dashboards, tests). */ counters(): Promise>; private ensureCounter; } /** The telemetry blueprint: one counter type; the convention is the point. */ export declare function telemetryBlueprint(counterTypeName?: string): { name: string; containerTypes: { typeName: string; displayName: string; description: string; }[]; propertyDefinitions: { containerTypeName: string; key: string; valueType: string; defaultValueJson: string; description: string; }[]; }; //# sourceMappingURL=telemetry.d.ts.map