UNPKG

game-analysis-types

Version:

Common TypeScript types and utilities for game analysis tools.

1,248 lines 189 kB
export type Json = string | number | boolean | null | { [key: string]: Json | undefined; } | Json[]; export type Database = { public: { Tables: { analyses: { Row: { analysis_results: Json; created_at: string | null; id: string; model_version: string | null; roster_id: string | null; user_id: string | null; }; Insert: { analysis_results: Json; created_at?: string | null; id?: string; model_version?: string | null; roster_id?: string | null; user_id?: string | null; }; Update: { analysis_results?: Json; created_at?: string | null; id?: string; model_version?: string | null; roster_id?: string | null; user_id?: string | null; }; Relationships: [ { foreignKeyName: "analyses_roster_id_fkey"; columns: ["roster_id"]; isOneToOne: false; referencedRelation: "rosters"; referencedColumns: ["id"]; } ]; }; analysis_results: { Row: { analysis_id: string; created_at: string; faction: string | null; id: string; metadata: Json | null; result_data: Json | null; roster_id: string; score: number | null; status: string | null; title: string; updated_at: string; user_id: string | null; }; Insert: { analysis_id: string; created_at?: string; faction?: string | null; id?: string; metadata?: Json | null; result_data?: Json | null; roster_id: string; score?: number | null; status?: string | null; title: string; updated_at?: string; user_id?: string | null; }; Update: { analysis_id?: string; created_at?: string; faction?: string | null; id?: string; metadata?: Json | null; result_data?: Json | null; roster_id?: string; score?: number | null; status?: string | null; title?: string; updated_at?: string; user_id?: string | null; }; Relationships: [ { foreignKeyName: "analysis_results_roster_id_fkey"; columns: ["roster_id"]; isOneToOne: false; referencedRelation: "rosters"; referencedColumns: ["id"]; } ]; }; analysis_templates: { Row: { created_at: string | null; created_by_user_id: string | null; description: string | null; game_system: string | null; id: string; is_default: boolean | null; name: string; template_data: Json; updated_at: string | null; version: number | null; }; Insert: { created_at?: string | null; created_by_user_id?: string | null; description?: string | null; game_system?: string | null; id?: string; is_default?: boolean | null; name: string; template_data: Json; updated_at?: string | null; version?: number | null; }; Update: { created_at?: string | null; created_by_user_id?: string | null; description?: string | null; game_system?: string | null; id?: string; is_default?: boolean | null; name?: string; template_data?: Json; updated_at?: string | null; version?: number | null; }; Relationships: []; }; battle_comments: { Row: { battle_id: string | null; comment: string; created_at: string | null; id: string; is_edited: boolean | null; parent_comment_id: string | null; updated_at: string | null; user_id: string | null; }; Insert: { battle_id?: string | null; comment: string; created_at?: string | null; id?: string; is_edited?: boolean | null; parent_comment_id?: string | null; updated_at?: string | null; user_id?: string | null; }; Update: { battle_id?: string | null; comment?: string; created_at?: string | null; id?: string; is_edited?: boolean | null; parent_comment_id?: string | null; updated_at?: string | null; user_id?: string | null; }; Relationships: [ { foreignKeyName: "battle_comments_battle_id_fkey"; columns: ["battle_id"]; isOneToOne: false; referencedRelation: "battles"; referencedColumns: ["id"]; }, { foreignKeyName: "battle_comments_parent_comment_id_fkey"; columns: ["parent_comment_id"]; isOneToOne: false; referencedRelation: "battle_comments"; referencedColumns: ["id"]; } ]; }; battle_participants: { Row: { battle_id: string; joined_at: string | null; role: string; user_id: string; }; Insert: { battle_id: string; joined_at?: string | null; role: string; user_id: string; }; Update: { battle_id?: string; joined_at?: string | null; role?: string; user_id?: string; }; Relationships: [ { foreignKeyName: "battle_participants_battle_id_fkey"; columns: ["battle_id"]; isOneToOne: false; referencedRelation: "battles"; referencedColumns: ["id"]; } ]; }; battle_simulations: { Row: { created_at: string | null; duration_ms: number | null; id: string; outcome: Json; prediction_id: string | null; scenario_config: Json; turn_data: Json; user_id: string | null; }; Insert: { created_at?: string | null; duration_ms?: number | null; id?: string; outcome: Json; prediction_id?: string | null; scenario_config: Json; turn_data: Json; user_id?: string | null; }; Update: { created_at?: string | null; duration_ms?: number | null; id?: string; outcome?: Json; prediction_id?: string | null; scenario_config?: Json; turn_data?: Json; user_id?: string | null; }; Relationships: [ { foreignKeyName: "battle_simulations_prediction_id_fkey"; columns: ["prediction_id"]; isOneToOne: false; referencedRelation: "meta_predictions"; referencedColumns: ["id"]; } ]; }; battles: { Row: { actual_date: string | null; battle_report: string | null; created_at: string | null; created_by: string | null; id: string; images: string[] | null; is_public: boolean | null; location: string | null; mission_name: string | null; notes: string | null; opponent_army: Database["public"]["Enums"]["army_faction"] | null; opponent_army_list: Json | null; opponent_id: string | null; opponent_victory_points: number | null; player_army: Database["public"]["Enums"]["army_faction"]; player_army_list: Json | null; player_victory_points: number | null; points_level: number; scheduled_date: string | null; status: Database["public"]["Enums"]["battle_status"] | null; tags: string[] | null; type: Database["public"]["Enums"]["battle_type"] | null; updated_at: string | null; winner_id: string | null; }; Insert: { actual_date?: string | null; battle_report?: string | null; created_at?: string | null; created_by?: string | null; id?: string; images?: string[] | null; is_public?: boolean | null; location?: string | null; mission_name?: string | null; notes?: string | null; opponent_army?: Database["public"]["Enums"]["army_faction"] | null; opponent_army_list?: Json | null; opponent_id?: string | null; opponent_victory_points?: number | null; player_army: Database["public"]["Enums"]["army_faction"]; player_army_list?: Json | null; player_victory_points?: number | null; points_level: number; scheduled_date?: string | null; status?: Database["public"]["Enums"]["battle_status"] | null; tags?: string[] | null; type?: Database["public"]["Enums"]["battle_type"] | null; updated_at?: string | null; winner_id?: string | null; }; Update: { actual_date?: string | null; battle_report?: string | null; created_at?: string | null; created_by?: string | null; id?: string; images?: string[] | null; is_public?: boolean | null; location?: string | null; mission_name?: string | null; notes?: string | null; opponent_army?: Database["public"]["Enums"]["army_faction"] | null; opponent_army_list?: Json | null; opponent_id?: string | null; opponent_victory_points?: number | null; player_army?: Database["public"]["Enums"]["army_faction"]; player_army_list?: Json | null; player_victory_points?: number | null; points_level?: number; scheduled_date?: string | null; status?: Database["public"]["Enums"]["battle_status"] | null; tags?: string[] | null; type?: Database["public"]["Enums"]["battle_type"] | null; updated_at?: string | null; winner_id?: string | null; }; Relationships: []; }; chunks: { Row: { chunk_index: number; chunk_quality_score: number | null; chunking_method: string; content: string; created_at: string | null; document_id: string | null; faction: string | null; heading: string | null; id: string; metadata: Json | null; next_chunk_uuid: string | null; page_number: number | null; prev_chunk_uuid: string | null; related_chunk_ids: string[] | null; section: string | null; summary: string | null; }; Insert: { chunk_index: number; chunk_quality_score?: number | null; chunking_method?: string; content: string; created_at?: string | null; document_id?: string | null; faction?: string | null; heading?: string | null; id?: string; metadata?: Json | null; next_chunk_uuid?: string | null; page_number?: number | null; prev_chunk_uuid?: string | null; related_chunk_ids?: string[] | null; section?: string | null; summary?: string | null; }; Update: { chunk_index?: number; chunk_quality_score?: number | null; chunking_method?: string; content?: string; created_at?: string | null; document_id?: string | null; faction?: string | null; heading?: string | null; id?: string; metadata?: Json | null; next_chunk_uuid?: string | null; page_number?: number | null; prev_chunk_uuid?: string | null; related_chunk_ids?: string[] | null; section?: string | null; summary?: string | null; }; Relationships: [ { foreignKeyName: "chunks_document_id_fkey"; columns: ["document_id"]; isOneToOne: false; referencedRelation: "documents"; referencedColumns: ["id"]; }, { foreignKeyName: "chunks_next_chunk_uuid_fkey"; columns: ["next_chunk_uuid"]; isOneToOne: false; referencedRelation: "chunks"; referencedColumns: ["id"]; }, { foreignKeyName: "chunks_prev_chunk_uuid_fkey"; columns: ["prev_chunk_uuid"]; isOneToOne: false; referencedRelation: "chunks"; referencedColumns: ["id"]; } ]; }; coach_credit_transactions: { Row: { action: string | null; amount: number; created_at: string | null; id: string; reason: string | null; session_id: string | null; user_id: string | null; }; Insert: { action?: string | null; amount: number; created_at?: string | null; id?: string; reason?: string | null; session_id?: string | null; user_id?: string | null; }; Update: { action?: string | null; amount?: number; created_at?: string | null; id?: string; reason?: string | null; session_id?: string | null; user_id?: string | null; }; Relationships: [ { foreignKeyName: "coach_credit_transactions_session_id_fkey"; columns: ["session_id"]; isOneToOne: false; referencedRelation: "coaching_sessions"; referencedColumns: ["id"]; } ]; }; coaching_feedback: { Row: { areas_for_improvement: string | null; coaching_session_id: string; created_at: string | null; feedback_provider_user_id: string | null; feedback_recipient_user_id: string | null; feedback_type: string | null; general_comments: string | null; id: string; next_steps_suggested: string | null; rating_overall: number | null; strengths_identified: string | null; updated_at: string | null; }; Insert: { areas_for_improvement?: string | null; coaching_session_id: string; created_at?: string | null; feedback_provider_user_id?: string | null; feedback_recipient_user_id?: string | null; feedback_type?: string | null; general_comments?: string | null; id?: string; next_steps_suggested?: string | null; rating_overall?: number | null; strengths_identified?: string | null; updated_at?: string | null; }; Update: { areas_for_improvement?: string | null; coaching_session_id?: string; created_at?: string | null; feedback_provider_user_id?: string | null; feedback_recipient_user_id?: string | null; feedback_type?: string | null; general_comments?: string | null; id?: string; next_steps_suggested?: string | null; rating_overall?: number | null; strengths_identified?: string | null; updated_at?: string | null; }; Relationships: [ { foreignKeyName: "coaching_feedback_coaching_session_id_fkey"; columns: ["coaching_session_id"]; isOneToOne: false; referencedRelation: "coaching_sessions"; referencedColumns: ["id"]; } ]; }; coaching_materials: { Row: { army_faction: Database["public"]["Enums"]["army_faction"] | null; coach_id: string | null; content_url: string; created_at: string | null; description: string | null; id: string; is_public: boolean | null; tags: string[] | null; title: string; type: string; updated_at: string | null; }; Insert: { army_faction?: Database["public"]["Enums"]["army_faction"] | null; coach_id?: string | null; content_url: string; created_at?: string | null; description?: string | null; id?: string; is_public?: boolean | null; tags?: string[] | null; title: string; type: string; updated_at?: string | null; }; Update: { army_faction?: Database["public"]["Enums"]["army_faction"] | null; coach_id?: string | null; content_url?: string; created_at?: string | null; description?: string | null; id?: string; is_public?: boolean | null; tags?: string[] | null; title?: string; type?: string; updated_at?: string | null; }; Relationships: []; }; coaching_messages: { Row: { content: string; created_at: string; id: string; metadata: Json | null; model_used: string | null; references: Json | null; role: string; session_id: string; updated_at: string; }; Insert: { content: string; created_at?: string; id?: string; metadata?: Json | null; model_used?: string | null; references?: Json | null; role: string; session_id: string; updated_at?: string; }; Update: { content?: string; created_at?: string; id?: string; metadata?: Json | null; model_used?: string | null; references?: Json | null; role?: string; session_id?: string; updated_at?: string; }; Relationships: [ { foreignKeyName: "coaching_messages_session_id_fkey"; columns: ["session_id"]; isOneToOne: false; referencedRelation: "coaching_sessions"; referencedColumns: ["id"]; } ]; }; coaching_sessions: { Row: { active_coach_persona_id: string | null; coaching_style: string | null; created_at: string; end_time: string | null; faction_persona: string | null; id: string; name: string | null; persona: string | null; start_time: string; style: string | null; tier: string; tournament_context_id: string | null; updated_at: string; user_id: string | null; }; Insert: { active_coach_persona_id?: string | null; coaching_style?: string | null; created_at?: string; end_time?: string | null; faction_persona?: string | null; id?: string; name?: string | null; persona?: string | null; start_time?: string; style?: string | null; tier: string; tournament_context_id?: string | null; updated_at?: string; user_id?: string | null; }; Update: { active_coach_persona_id?: string | null; coaching_style?: string | null; created_at?: string; end_time?: string | null; faction_persona?: string | null; id?: string; name?: string | null; persona?: string | null; start_time?: string; style?: string | null; tier?: string; tournament_context_id?: string | null; updated_at?: string; user_id?: string | null; }; Relationships: []; }; command_squad_abilities: { Row: { ability_range: string; created_at: string | null; description: string; effect: string; id: string; name: string; unit_type: string; updated_at: string | null; }; Insert: { ability_range: string; created_at?: string | null; description: string; effect: string; id?: string; name: string; unit_type: string; updated_at?: string | null; }; Update: { ability_range?: string; created_at?: string | null; description?: string; effect?: string; id?: string; name?: string; unit_type?: string; updated_at?: string | null; }; Relationships: []; }; community_insights: { Row: { content: string; created_at: string | null; data: Json | null; id: string; insight_type: string; tags: string[] | null; title: string; updated_at: string | null; upvotes: number | null; user_id: string | null; }; Insert: { content: string; created_at?: string | null; data?: Json | null; id?: string; insight_type: string; tags?: string[] | null; title: string; updated_at?: string | null; upvotes?: number | null; user_id?: string | null; }; Update: { content?: string; created_at?: string | null; data?: Json | null; id?: string; insight_type?: string; tags?: string[] | null; title?: string; updated_at?: string | null; upvotes?: number | null; user_id?: string | null; }; Relationships: []; }; content_tags: { Row: { content_id: string; tag: string; }; Insert: { content_id: string; tag: string; }; Update: { content_id?: string; tag?: string; }; Relationships: [ { foreignKeyName: "content_tags_content_id_fkey"; columns: ["content_id"]; isOneToOne: false; referencedRelation: "tactical_content"; referencedColumns: ["id"]; } ]; }; corpus_documents: { Row: { embedding: string | null; id: string; local_embedding: string | null; metadata: Json | null; normalized_content: string | null; source_document_id: string | null; tsv: unknown | null; }; Insert: { embedding?: string | null; id?: string; local_embedding?: string | null; metadata?: Json | null; normalized_content?: string | null; source_document_id?: string | null; tsv?: unknown | null; }; Update: { embedding?: string | null; id?: string; local_embedding?: string | null; metadata?: Json | null; normalized_content?: string | null; source_document_id?: string | null; tsv?: unknown | null; }; Relationships: []; }; detachment_types: { Row: { benefits: string[]; created_at: string | null; description: string; edition: string; faction_id: string; id: string; limitations: string[]; name: string; requirements: string[]; updated_at: string | null; }; Insert: { benefits?: string[]; created_at?: string | null; description: string; edition?: string; faction_id: string; id?: string; limitations?: string[]; name: string; requirements?: string[]; updated_at?: string | null; }; Update: { benefits?: string[]; created_at?: string | null; description?: string; edition?: string; faction_id?: string; id?: string; limitations?: string[]; name?: string; requirements?: string[]; updated_at?: string | null; }; Relationships: [ { foreignKeyName: "detachment_types_faction_id_fkey"; columns: ["faction_id"]; isOneToOne: false; referencedRelation: "factions_master"; referencedColumns: ["id"]; } ]; }; documents: { Row: { author: string | null; created_at: string | null; id: string; metadata: Json | null; title: string; }; Insert: { author?: string | null; created_at?: string | null; id?: string; metadata?: Json | null; title: string; }; Update: { author?: string | null; created_at?: string | null; id?: string; metadata?: Json | null; title?: string; }; Relationships: []; }; faction_meta_tracking: { Row: { ban_rate: number | null; counter_strategies: Json | null; created_at: string | null; date: string; faction: string; id: string; pick_rate: number | null; popular_units: Json | null; win_rate: number | null; }; Insert: { ban_rate?: number | null; counter_strategies?: Json | null; created_at?: string | null; date: string; faction: string; id?: string; pick_rate?: number | null; popular_units?: Json | null; win_rate?: number | null; }; Update: { ban_rate?: number | null; counter_strategies?: Json | null; created_at?: string | null; date?: string; faction?: string; id?: string; pick_rate?: number | null; popular_units?: Json | null; win_rate?: number | null; }; Relationships: []; }; faction_metadata: { Row: { codex_version: string | null; created_at: string | null; data_source: string | null; edition: string; faction_id: string; id: string; is_valid: boolean; last_update_date: string | null; update_notes: string | null; updated_at: string | null; }; Insert: { codex_version?: string | null; created_at?: string | null; data_source?: string | null; edition: string; faction_id: string; id?: string; is_valid?: boolean; last_update_date?: string | null; update_notes?: string | null; updated_at?: string | null; }; Update: { codex_version?: string | null; created_at?: string | null; data_source?: string | null; edition?: string; faction_id?: string; id?: string; is_valid?: boolean; last_update_date?: string | null; update_notes?: string | null; updated_at?: string | null; }; Relationships: [ { foreignKeyName: "faction_metadata_faction_id_fkey"; columns: ["faction_id"]; isOneToOne: false; referencedRelation: "factions_master"; referencedColumns: ["id"]; } ]; }; faction_rules: { Row: { created_at: string | null; description: string; effect_summary: string; embedding: string | null; faction_id: string; id: string; name: string; phase: string | null; rule_type: string; updated_at: string | null; }; Insert: { created_at?: string | null; description: string; effect_summary: string; embedding?: string | null; faction_id: string; id?: string; name: string; phase?: string | null; rule_type: string; updated_at?: string | null; }; Update: { created_at?: string | null; description?: string; effect_summary?: string; embedding?: string | null; faction_id?: string; id?: string; name?: string; phase?: string | null; rule_type?: string; updated_at?: string | null; }; Relationships: [ { foreignKeyName: "faction_rules_faction_id_fkey"; columns: ["faction_id"]; isOneToOne: false; referencedRelation: "factions_master"; referencedColumns: ["id"]; } ]; }; faction_strategies: { Row: { countered_by: string[]; created_at: string | null; description: string; effectiveness: number; embedding: string | null; explanation: string; faction_id: string; id: string; name: string; phases: string[]; recommended_units: string[]; strategy_type: string; updated_at: string | null; }; Insert: { countered_by?: string[]; created_at?: string | null; description: string; effectiveness: number; embedding?: string | null; explanation: string; faction_id: string; id?: string; name: string; phases?: string[]; recommended_units?: string[]; strategy_type: string; updated_at?: string | null; }; Update: { countered_by?: string[]; created_at?: string | null; description?: string; effectiveness?: number; embedding?: string | null; explanation?: string; faction_id?: string; id?: string; name?: string; phases?: string[]; recommended_units?: string[]; strategy_type?: string; updated_at?: string | null; }; Relationships: [ { foreignKeyName: "faction_strategies_faction_id_fkey"; columns: ["faction_id"]; isOneToOne: false; referencedRelation: "factions_master"; referencedColumns: ["id"]; } ]; }; faction_synergies: { Row: { complexity: number; counters: string[]; created_at: string | null; description: string; effectiveness: number; embedding: string | null; explanation: string; faction_id: string; id: string; name: string; units: string[]; updated_at: string | null; }; Insert: { complexity: number; counters?: string[]; created_at?: string | null; description: string; effectiveness: number; embedding?: string | null; explanation: string; faction_id: string; id?: string; name: string; units: string[]; updated_at?: string | null; }; Update: { complexity?: number; counters?: string[]; created_at?: string | null; description?: string; effectiveness?: number; embedding?: string | null; explanation?: string; faction_id?: string; id?: string; name?: string; units?: string[]; updated_at?: string | null; }; Relationships: [ { foreignKeyName: "faction_synergies_faction_id_fkey"; columns: ["faction_id"]; isOneToOne: false; referencedRelation: "factions_master"; referencedColumns: ["id"]; } ]; }; factions_master: { Row: { code_name: string; color_scheme: string | null; created_at: string | null; description: string; edition: string; embedding: string | null; icon_url: string | null; id: string; lore: string; name: string; playstyle: string[]; strengths: string[]; updated_at: string | null; weaknesses: string[]; }; Insert: { code_name: string; color_scheme?: string | null; created_at?: string | null; description: string; edition?: string; embedding?: string | null; icon_url?: string | null; id?: string; lore: string; name: string; playstyle?: string[]; strengths?: string[]; updated_at?: string | null; weaknesses?: string[]; }; Update: { code_name?: string; color_scheme?: string | null; created_at?: string | null; description?: string; edition?: string; embedding?: string | null; icon_url?: string | null; id?: string; lore?: string; name?: string; playstyle?: string[]; strengths?: string[]; updated_at?: string | null; weaknesses?: string[]; }; Relationships: []; }; featured_content: { Row: { content_id: string | null; feature_end: string | null; feature_order: number; feature_start: string | null; id: string; }; Insert: { content_id?: string | null; feature_end?: string | null; feature_order: number; feature_start?: string | null; id?: string; }; Update: { content_id?: string | null; feature_end?: string | null; feature_order?: number; feature_start?: string | null; id?: string; }; Relationships: [ { foreignKeyName: "featured_content_content_id_fkey"; columns: ["content_id"]; isOneToOne: false; referencedRelation: "tactical_content"; referencedColumns: ["id"]; } ]; }; feedback: { Row: { analysis_id: string | null; comment: string | null; created_at: string | null; id: string; rating: number | null; user_id: string | null; }; Insert: { analysis_id?: string | null; comment?: string | null; created_at?: string | null; id?: string; rating?: number | null; user_id?: string | null; }; Update: { analysis_id?: string | null; comment?: string | null; created_at?: string | null; id?: string; rating?: number | null; user_id?: string | null; }; Relationships: [ { foreignKeyName: "feedback_analysis_id_fkey"; columns: ["analysis_id"]; isOneToOne: false; referencedRelation: "analyses"; referencedColumns: ["id"]; }, { foreignKeyName: "feedback_analysis_id_fkey"; columns: ["analysis_id"]; isOneToOne: false; referencedRelation: "feedback_summary"; referencedColumns: ["analysis_id"]; } ]; }; improvement_metrics: { Row: { created_at: string; current_value: number | null; id: string; impact_category: string; improvement_percentage: number | null; iteration_id: string; metric_name: string; previous_value: number | null; }; Insert: { created_at?: string; current_value?: number | null; id?: string; impact_category: string; improvement_percentage?: number | null; iteration_id: string; metric_name: string; previous_value?: number | null; }; Update: { created_at?: string; current_value?: number | null; id?: string; impact_category?: string; improvement_percentage?: number | null; iteration_id?: string; metric_name?: string; previous_value?: number | null; }; Relationships: [ { foreignKeyName: "improvement_metrics_iteration_id_fkey"; columns: ["iteration_id"]; isOneToOne: false; referencedRelation: "refinement_iterations"; referencedColumns: ["id"]; } ]; }; learning_path_modules: { Row: { content_ids: string[] | null; description: string; id: string; learning_path_id: string | null; order: number; quiz_id: string | n