/**
 * Analytics Event Types and Definitions
 *
 * Defines event types for tracking player actions and game metrics.
 * Ported from Python: ws/analytics/events.py
 */
/**
 * Core event categories
 */
export type EventCategory = 'session' | 'purchase' | 'gameplay' | 'social' | 'progression' | 'tutorial' | 'retention' | 'system';
/**
 * Standard event names by category
 */
export declare const EVENT_NAMES: {
    readonly SESSION_START: "session_start";
    readonly SESSION_END: "session_end";
    readonly SESSION_RESUME: "session_resume";
    readonly PURCHASE_INITIATED: "purchase_initiated";
    readonly PURCHASE_COMPLETED: "purchase_completed";
    readonly PURCHASE_FAILED: "purchase_failed";
    readonly PURCHASE_RESTORED: "purchase_restored";
    readonly GAME_START: "game_start";
    readonly GAME_PAUSE: "game_pause";
    readonly GAME_RESUME: "game_resume";
    readonly GAME_SAVE: "game_save";
    readonly CHARACTER_CREATED: "character_created";
    readonly CHARACTER_DEATH: "character_death";
    readonly AGE_UP: "age_up";
    readonly ACTIVITY_STARTED: "activity_started";
    readonly ACTIVITY_COMPLETED: "activity_completed";
    readonly CONVERSATION_STARTED: "conversation_started";
    readonly CONVERSATION_SENT: "conversation_sent";
    readonly CONVERSATION_RECEIVED: "conversation_received";
    readonly RELATIONSHIP_FORMED: "relationship_formed";
    readonly RELATIONSHIP_ENDED: "relationship_ended";
    readonly FRIEND_MADE: "friend_made";
    readonly DATING_STARTED: "dating_started";
    readonly MARRIAGE: "marriage";
    readonly CHILD_BORN: "child_born";
    readonly LEVEL_UP: "level_up";
    readonly ACHIEVEMENT_UNLOCKED: "achievement_unlocked";
    readonly QUEST_COMPLETED: "quest_completed";
    readonly MILESTONE_REACHED: "milestone_reached";
    readonly JOB_OBTAINED: "job_obtained";
    readonly JOB_PROMOTION: "job_promotion";
    readonly JOB_FIRED: "job_fired";
    readonly EDUCATION_STARTED: "education_started";
    readonly EDUCATION_COMPLETED: "education_completed";
    readonly MONEY_EARNED: "money_earned";
    readonly MONEY_SPENT: "money_spent";
    readonly TUTORIAL_STARTED: "tutorial_started";
    readonly TUTORIAL_STEP: "tutorial_step";
    readonly TUTORIAL_COMPLETED: "tutorial_completed";
    readonly TUTORIAL_SKIPPED: "tutorial_skipped";
    readonly ONBOARDING_COMPLETED: "onboarding_completed";
    readonly DAILY_LOGIN: "daily_login";
    readonly STREAK_CONTINUED: "streak_continued";
    readonly STREAK_BROKEN: "streak_broken";
    readonly DAILY_REWARD_CLAIMED: "daily_reward_claimed";
    readonly DAILY_QUEST_STARTED: "daily_quest_started";
    readonly DAILY_QUEST_COMPLETED: "daily_quest_completed";
    readonly ERROR: "error";
    readonly CRASH: "crash";
    readonly PERFORMANCE_WARNING: "performance_warning";
};
export type EventName = (typeof EVENT_NAMES)[keyof typeof EVENT_NAMES];
/**
 * Base properties for all events
 */
export interface BaseEventProperties {
    [key: string]: unknown;
}
/**
 * Session event properties
 */
export interface SessionEventProperties extends BaseEventProperties {
    sessionDuration?: number;
    platform?: string;
    appVersion?: string;
    deviceModel?: string;
}
/**
 * Purchase event properties
 */
export interface PurchaseEventProperties extends BaseEventProperties {
    itemId: string;
    price: number;
    currency: string;
    transactionId?: string;
    productName?: string;
    category?: string;
}
/**
 * Gameplay event properties
 */
export interface GameplayEventProperties extends BaseEventProperties {
    characterAge?: number;
    gameTime?: string;
    activityType?: string;
    locationId?: string;
    locationName?: string;
    outcome?: string;
}
/**
 * Social event properties
 */
export interface SocialEventProperties extends BaseEventProperties {
    npcId?: string;
    npcName?: string;
    relationshipType?: string;
    affinityLevel?: number;
    messageType?: string;
}
/**
 * Progression event properties
 */
export interface ProgressionEventProperties extends BaseEventProperties {
    level?: number;
    category?: string;
    achievementKey?: string;
    questId?: string;
    milestoneId?: string;
    jobId?: string;
    jobTitle?: string;
    educationLevel?: string;
    amount?: number;
}
/**
 * Tutorial event properties
 */
export interface TutorialEventProperties extends BaseEventProperties {
    stepName?: string;
    stepIndex?: number;
    completed?: boolean;
    timeSpent?: number;
}
/**
 * Retention event properties
 */
export interface RetentionEventProperties extends BaseEventProperties {
    streakDays?: number;
    rewardDay?: number;
    rewardType?: string;
    rewardAmount?: number;
    questType?: string;
    questProgress?: number;
}
/**
 * System event properties
 */
export interface SystemEventProperties extends BaseEventProperties {
    errorType?: string;
    errorMessage?: string;
    stackTrace?: string;
    metric?: string;
    value?: number;
}
/**
 * Union of all event property types
 */
export type EventProperties = BaseEventProperties | SessionEventProperties | PurchaseEventProperties | GameplayEventProperties | SocialEventProperties | ProgressionEventProperties | TutorialEventProperties | RetentionEventProperties | SystemEventProperties;
/**
 * Complete analytics event structure
 */
export interface AnalyticsEvent {
    id: string;
    playerId: string;
    sessionId: string | null;
    eventName: EventName | string;
    category: EventCategory;
    properties: EventProperties | null;
    timestamp: number;
    createdAt?: Date;
}
/**
 * Session tracking structure
 */
export interface AnalyticsSession {
    sessionId: string;
    playerId: string;
    startedAt: number;
    endedAt: number | null;
    durationSeconds: number | null;
    eventsCount: number;
    platform?: string;
    appVersion?: string;
}
/**
 * Batch of events for efficient storage
 */
export interface EventBatch {
    events: AnalyticsEvent[];
    createdAt: number;
    flushedAt: number | null;
}
/**
 * Event buffer configuration
 */
export interface EventBufferConfig {
    maxSize: number;
    flushIntervalMs: number;
    retryAttempts: number;
}
export declare const DEFAULT_BUFFER_CONFIG: EventBufferConfig;
/**
 * Map event names to their categories
 */
export declare function getEventCategory(eventName: EventName | string): EventCategory;
/**
 * Validate an event has required fields
 */
export declare function validateEvent(event: Partial<AnalyticsEvent>): event is AnalyticsEvent;
/**
 * Check if an event name is a known standard event
 */
export declare function isKnownEvent(eventName: string): eventName is EventName;
//# sourceMappingURL=events.d.ts.map