Add multiplayer rooms and Vercel analytics

This commit is contained in:
2026-10-07 12:28:45 +05:00
parent ce26e6fdbc
commit 48b34db6f1
20 changed files with 2345 additions and 9 deletions

View File

@@ -43,6 +43,93 @@ export type Database = {
};
public: {
Tables: {
multiplayer_rooms: {
Row: {
id: string;
revision_id: string;
host_player_id: string;
difficulty: string;
player_limit: number;
status: string;
current_round: number;
transition_at: string | null;
created_at: string;
};
Insert: {
id?: string;
revision_id: string;
host_player_id: string;
difficulty: string;
player_limit: number;
status?: string;
current_round?: number;
transition_at?: string | null;
created_at?: string;
};
Update: {
host_player_id?: string;
status?: string;
current_round?: number;
transition_at?: string | null;
};
Relationships: [];
};
multiplayer_rounds: {
Row: {
room_id: string;
round_number: number;
viewpoint: Json;
deadline: string | null;
closed_at: string | null;
};
Insert: {
room_id: string;
round_number: number;
viewpoint: Json;
deadline?: string | null;
closed_at?: string | null;
};
Update: { deadline?: string | null; closed_at?: string | null };
Relationships: [];
};
multiplayer_players: {
Row: {
id: string;
room_id: string;
access_hash: string;
display_name: string;
ready_round: number;
has_left: boolean;
joined_at: string;
};
Insert: {
id?: string;
room_id: string;
access_hash: string;
display_name: string;
ready_round?: number;
has_left?: boolean;
joined_at?: string;
};
Update: { ready_round?: number; has_left?: boolean };
Relationships: [];
};
multiplayer_guesses: {
Row: {
room_id: string;
player_id: string;
round_number: number;
result: Json;
};
Insert: {
room_id: string;
player_id: string;
round_number: number;
result: Json;
};
Update: { result?: Json };
Relationships: [];
};
site_settings: {
Row: {
id: boolean;
@@ -540,6 +627,25 @@ export type Database = {
[_ in never]: never;
};
Functions: {
create_multiplayer_room: {
Args: {
p_dataset: string;
p_difficulty: string;
p_name: string;
p_limit: number;
p_access_hash: string;
};
Returns: string;
};
multiplayer_action: {
Args: {
p_room: string;
p_access_hash: string;
p_action: string;
p_payload: Json;
};
Returns: Json;
};
legacy_password_needed: { Args: { p_user: string }; Returns: boolean };
claim_legacy_password: { Args: { p_user: string }; Returns: boolean };
set_beta_badge: {