Add player bug reports and profile identity features

This commit is contained in:
2026-10-08 18:27:20 +05:00
parent 36e8d11eb4
commit 0b08672f4a
51 changed files with 3938 additions and 45 deletions

View File

@@ -43,6 +43,30 @@ export type Database = {
};
public: {
Tables: {
bug_reports: {
Row: import("./bug-reports").BugReportRecord;
Insert: Partial<import("./bug-reports").BugReportRecord> &
Pick<
import("./bug-reports").BugReportRecord,
| "client_id"
| "access_hash"
| "display_name"
| "title"
| "description"
>;
Update: Partial<import("./bug-reports").BugReportRecord>;
Relationships: [];
};
bug_report_messages: {
Row: import("./bug-reports").BugMessageRecord;
Insert: Partial<import("./bug-reports").BugMessageRecord> &
Pick<
import("./bug-reports").BugMessageRecord,
"report_id" | "kind" | "body" | "author_name"
>;
Update: Partial<import("./bug-reports").BugMessageRecord>;
Relationships: [];
};
multiplayer_messages: {
Row: {
id: number;
@@ -115,6 +139,7 @@ export type Database = {
};
multiplayer_players: {
Row: {
account_id: string | null;
id: string;
room_id: string;
access_hash: string;
@@ -124,6 +149,7 @@ export type Database = {
joined_at: string;
};
Insert: {
account_id?: string | null;
id?: string;
room_id: string;
access_hash: string;
@@ -132,7 +158,11 @@ export type Database = {
has_left?: boolean;
joined_at?: string;
};
Update: { ready_round?: number; has_left?: boolean };
Update: {
ready_round?: number;
has_left?: boolean;
account_id?: string | null;
};
Relationships: [];
};
multiplayer_guesses: {
@@ -453,18 +483,33 @@ export type Database = {
};
profiles: {
Row: {
glow_color: string;
bug_finder: boolean;
custom_prefix: string | null;
custom_prefix_icon: string;
name_glow: boolean;
created_at: string;
display_name: string;
id: string;
role: string;
};
Insert: {
glow_color?: string;
bug_finder?: boolean;
custom_prefix?: string | null;
custom_prefix_icon?: string;
name_glow?: boolean;
created_at?: string;
display_name?: string;
id: string;
role?: string;
};
Update: {
glow_color?: string;
bug_finder?: boolean;
custom_prefix?: string | null;
custom_prefix_icon?: string;
name_glow?: boolean;
created_at?: string;
display_name?: string;
id?: string;
@@ -650,6 +695,33 @@ export type Database = {
[_ in never]: never;
};
Functions: {
set_user_prefix: {
Args: {
p_reviewer: string;
p_user: string;
p_prefix: string | null;
p_icon: string;
};
Returns: undefined;
};
claim_bug_sync: {
Args: { p_report: string; p_worker: string };
Returns: boolean;
};
receive_bug_reply: {
Args: {
p_report: string;
p_external: string;
p_author: string;
p_body: string;
p_glow: boolean | null;
};
Returns: boolean;
};
claim_bug_report: {
Args: { p_report: string; p_hash: string; p_owner: string };
Returns: undefined;
};
create_map_import: {
Args: {
p_owner: string;