All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 6m26s
1446 lines
40 KiB
TypeScript
1446 lines
40 KiB
TypeScript
export type Json =
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null
|
|
| { [key: string]: Json | undefined }
|
|
| Json[];
|
|
|
|
type MapModerationFields = {
|
|
report_strikes: number;
|
|
report_cycle: number;
|
|
banned_at: string | null;
|
|
ban_reason: string | null;
|
|
};
|
|
type ReportModerationFields = {
|
|
category: string;
|
|
revision_id: string | null;
|
|
panorama_id: string | null;
|
|
evidence_url: string | null;
|
|
report_cycle: number;
|
|
reviewer_id: string | null;
|
|
reviewed_at: string | null;
|
|
review_reason: string | null;
|
|
};
|
|
type AppealRecord = {
|
|
id: string;
|
|
dataset_id: string;
|
|
owner_id: string | null;
|
|
report_cycle: number;
|
|
reason: string;
|
|
state: string;
|
|
created_at: string;
|
|
reviewer_id: string | null;
|
|
reviewed_at: string | null;
|
|
review_reason: string | null;
|
|
};
|
|
|
|
type AccountStatusFields = {
|
|
account_status: "active" | "deactivated" | "banned" | "deleting";
|
|
account_reason: string | null;
|
|
account_changed_at: string | null;
|
|
account_changed_by: string | null;
|
|
account_status_version: number;
|
|
};
|
|
type AccountAppealRecord = {
|
|
id: string;
|
|
owner_id: string;
|
|
status_version: number;
|
|
reason: string;
|
|
state: "open" | "approved" | "rejected";
|
|
created_at: string;
|
|
reviewer_id: string | null;
|
|
reviewed_at: string | null;
|
|
review_reason: string | null;
|
|
};
|
|
|
|
export type Database = {
|
|
// Allows to automatically instantiate createClient with right options
|
|
// instead of createClient<Database, { PostgrestVersion: 'XX' }>(URL, KEY)
|
|
__InternalSupabase: {
|
|
PostgrestVersion: "14.18";
|
|
};
|
|
public: {
|
|
Tables: {
|
|
tournaments: {
|
|
Row: import("./tournaments").TournamentRecord;
|
|
Insert: Partial<import("./tournaments").TournamentRecord>;
|
|
Update: Partial<import("./tournaments").TournamentRecord>;
|
|
Relationships: [];
|
|
};
|
|
tournament_announcements: {
|
|
Row: import("../lib/tournament-discord").TournamentAnnouncementJob;
|
|
Insert: Partial<
|
|
import("../lib/tournament-discord").TournamentAnnouncementJob
|
|
>;
|
|
Update: Partial<
|
|
import("../lib/tournament-discord").TournamentAnnouncementJob
|
|
>;
|
|
Relationships: [];
|
|
};
|
|
map_reactions: {
|
|
Row: {
|
|
dataset_id: string;
|
|
user_id: string;
|
|
value: number;
|
|
created_at: string;
|
|
};
|
|
Insert: {
|
|
dataset_id: string;
|
|
user_id: string;
|
|
value: number;
|
|
created_at?: string;
|
|
};
|
|
Update: { value?: number };
|
|
Relationships: [];
|
|
};
|
|
map_comments: {
|
|
Row: import("./community").MapCommentRecord;
|
|
Insert: Partial<import("./community").MapCommentRecord> &
|
|
Pick<
|
|
import("./community").MapCommentRecord,
|
|
"dataset_id" | "author_id" | "body"
|
|
>;
|
|
Update: Partial<import("./community").MapCommentRecord>;
|
|
Relationships: [];
|
|
};
|
|
community_reports: {
|
|
Row: import("./community").CommunityReportRecord;
|
|
Insert: Partial<import("./community").CommunityReportRecord> &
|
|
Pick<
|
|
import("./community").CommunityReportRecord,
|
|
"reporter_id" | "target" | "category" | "reason"
|
|
>;
|
|
Update: Partial<import("./community").CommunityReportRecord>;
|
|
Relationships: [];
|
|
};
|
|
account_appeals: {
|
|
Row: AccountAppealRecord;
|
|
Insert: Partial<AccountAppealRecord> &
|
|
Pick<AccountAppealRecord, "owner_id" | "status_version" | "reason">;
|
|
Update: Partial<AccountAppealRecord>;
|
|
Relationships: [];
|
|
};
|
|
account_control_events: {
|
|
Row: {
|
|
id: string;
|
|
owner_id: string | null;
|
|
reviewer_id: string | null;
|
|
action: string;
|
|
previous_status: string;
|
|
new_status: string;
|
|
status_version: number;
|
|
reason: string;
|
|
created_at: string;
|
|
};
|
|
Insert: {
|
|
owner_id?: string | null;
|
|
reviewer_id?: string | null;
|
|
action: string;
|
|
previous_status: string;
|
|
new_status: string;
|
|
status_version: number;
|
|
reason: string;
|
|
};
|
|
Update: { owner_id?: string | null; reviewer_id?: string | null };
|
|
Relationships: [];
|
|
};
|
|
discord_announcements: {
|
|
Row: import("./discord").DiscordAnnouncement;
|
|
Insert: Partial<import("./discord").DiscordAnnouncement> &
|
|
Pick<import("./discord").DiscordAnnouncement, "kind" | "target_id">;
|
|
Update: Partial<import("./discord").DiscordAnnouncement>;
|
|
Relationships: [];
|
|
};
|
|
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;
|
|
room_id: string;
|
|
player_id: string;
|
|
client_id: string;
|
|
display_name: string;
|
|
body: string;
|
|
created_at: string;
|
|
};
|
|
Insert: {
|
|
room_id: string;
|
|
player_id: string;
|
|
client_id: string;
|
|
display_name: string;
|
|
body: string;
|
|
created_at?: string;
|
|
};
|
|
Update: { body?: string };
|
|
Relationships: [];
|
|
};
|
|
multiplayer_rooms: {
|
|
Row: {
|
|
tournament_id: string | null;
|
|
id: string;
|
|
revision_id: string;
|
|
host_player_id: string;
|
|
difficulty: string;
|
|
difficulty_settings: Json;
|
|
player_limit: number;
|
|
status: string;
|
|
current_round: number;
|
|
transition_at: string | null;
|
|
created_at: string;
|
|
};
|
|
Insert: {
|
|
tournament_id?: string | null;
|
|
id?: string;
|
|
revision_id: string;
|
|
host_player_id: string;
|
|
difficulty: string;
|
|
difficulty_settings: Json;
|
|
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: [];
|
|
};
|
|
difficulty_presets: {
|
|
Row: {
|
|
pan: boolean;
|
|
compass: boolean;
|
|
coordinates: boolean;
|
|
map_zoom: boolean;
|
|
map_pan: boolean;
|
|
timer_visible: boolean;
|
|
scoring: "normal" | "strict" | "gentle";
|
|
created_at: string;
|
|
id: string;
|
|
name: string;
|
|
seconds: number;
|
|
zoom: boolean;
|
|
};
|
|
Insert: {
|
|
pan?: boolean;
|
|
compass?: boolean;
|
|
coordinates?: boolean;
|
|
map_zoom?: boolean;
|
|
map_pan?: boolean;
|
|
timer_visible?: boolean;
|
|
scoring?: "normal" | "strict" | "gentle";
|
|
created_at?: string;
|
|
id?: string;
|
|
name: string;
|
|
seconds: number;
|
|
zoom: boolean;
|
|
};
|
|
Update: {
|
|
pan?: boolean;
|
|
compass?: boolean;
|
|
coordinates?: boolean;
|
|
map_zoom?: boolean;
|
|
map_pan?: boolean;
|
|
timer_visible?: boolean;
|
|
scoring?: "normal" | "strict" | "gentle";
|
|
name?: string;
|
|
seconds?: number;
|
|
zoom?: boolean;
|
|
};
|
|
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: {
|
|
account_id: string | null;
|
|
id: string;
|
|
room_id: string;
|
|
access_hash: string;
|
|
display_name: string;
|
|
ready_round: number;
|
|
has_left: boolean;
|
|
joined_at: string;
|
|
};
|
|
Insert: {
|
|
account_id?: string | null;
|
|
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;
|
|
account_id?: string | null;
|
|
};
|
|
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;
|
|
beta_badge_enabled: boolean;
|
|
updated_at: string;
|
|
updated_by: string | null;
|
|
};
|
|
Insert: {
|
|
id?: boolean;
|
|
beta_badge_enabled?: boolean;
|
|
updated_at?: string;
|
|
updated_by?: string | null;
|
|
};
|
|
Update: {
|
|
beta_badge_enabled?: boolean;
|
|
updated_at?: string;
|
|
updated_by?: string | null;
|
|
};
|
|
Relationships: [];
|
|
};
|
|
map_appeals: {
|
|
Row: AppealRecord;
|
|
Insert: Partial<AppealRecord> &
|
|
Pick<
|
|
AppealRecord,
|
|
"dataset_id" | "owner_id" | "report_cycle" | "reason"
|
|
>;
|
|
Update: Partial<AppealRecord>;
|
|
Relationships: [];
|
|
};
|
|
catalog_servers: {
|
|
Row: {
|
|
address: string | null;
|
|
created_at: string;
|
|
id: string;
|
|
name: string;
|
|
};
|
|
Insert: {
|
|
address?: string | null;
|
|
created_at?: string;
|
|
id?: string;
|
|
name: string;
|
|
};
|
|
Update: {
|
|
address?: string | null;
|
|
created_at?: string;
|
|
id?: string;
|
|
name?: string;
|
|
};
|
|
Relationships: [];
|
|
};
|
|
contributor_tokens: {
|
|
Row: {
|
|
created_at: string;
|
|
id: string;
|
|
label: string;
|
|
owner_id: string;
|
|
revoked: boolean;
|
|
token_hash: string;
|
|
};
|
|
Insert: {
|
|
created_at?: string;
|
|
id?: string;
|
|
label: string;
|
|
owner_id: string;
|
|
revoked?: boolean;
|
|
token_hash: string;
|
|
};
|
|
Update: {
|
|
created_at?: string;
|
|
id?: string;
|
|
label?: string;
|
|
owner_id?: string;
|
|
revoked?: boolean;
|
|
token_hash?: string;
|
|
};
|
|
Relationships: [];
|
|
};
|
|
dataset_inputs: {
|
|
Row: {
|
|
dataset_id: string;
|
|
manifest: Json;
|
|
validated: boolean;
|
|
};
|
|
Insert: {
|
|
dataset_id: string;
|
|
manifest: Json;
|
|
validated?: boolean;
|
|
};
|
|
Update: {
|
|
dataset_id?: string;
|
|
manifest?: Json;
|
|
validated?: boolean;
|
|
};
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "dataset_inputs_dataset_id_fkey";
|
|
columns: ["dataset_id"];
|
|
isOneToOne: true;
|
|
referencedRelation: "datasets";
|
|
referencedColumns: ["id"];
|
|
},
|
|
];
|
|
};
|
|
datasets: {
|
|
Row: MapModerationFields & {
|
|
imported_from_id: string | null;
|
|
imported_owner_name: string | null;
|
|
allow_contributions: boolean;
|
|
bounds: Json;
|
|
contribution_count: number;
|
|
contribution_server_address: string | null;
|
|
contribution_status: string | null;
|
|
cover_path: string | null;
|
|
created_at: string;
|
|
description: string;
|
|
id: string;
|
|
map_path: string | null;
|
|
name: string;
|
|
owner_id: string | null;
|
|
panorama_count: number;
|
|
parent_dataset_id: string | null;
|
|
rejection_reason: string | null;
|
|
revision_id: string | null;
|
|
server_id: string | null;
|
|
source: string;
|
|
state: string;
|
|
update_state: string | null;
|
|
updated_at: string;
|
|
};
|
|
Insert: Partial<MapModerationFields> & {
|
|
allow_contributions?: boolean;
|
|
bounds: Json;
|
|
contribution_count?: number;
|
|
contribution_server_address?: string | null;
|
|
contribution_status?: string | null;
|
|
cover_path?: string | null;
|
|
created_at?: string;
|
|
description?: string;
|
|
id?: string;
|
|
map_path?: string | null;
|
|
name: string;
|
|
owner_id: string | null;
|
|
panorama_count?: number;
|
|
parent_dataset_id?: string | null;
|
|
rejection_reason?: string | null;
|
|
revision_id?: string | null;
|
|
server_id?: string | null;
|
|
source: string;
|
|
state?: string;
|
|
update_state?: string | null;
|
|
updated_at?: string;
|
|
};
|
|
Update: Partial<MapModerationFields> & {
|
|
allow_contributions?: boolean;
|
|
bounds?: Json;
|
|
contribution_count?: number;
|
|
contribution_server_address?: string | null;
|
|
contribution_status?: string | null;
|
|
cover_path?: string | null;
|
|
created_at?: string;
|
|
description?: string;
|
|
id?: string;
|
|
map_path?: string | null;
|
|
name?: string;
|
|
owner_id?: string | null;
|
|
panorama_count?: number;
|
|
parent_dataset_id?: string | null;
|
|
rejection_reason?: string | null;
|
|
revision_id?: string | null;
|
|
server_id?: string | null;
|
|
source?: string;
|
|
state?: string;
|
|
update_state?: string | null;
|
|
updated_at?: string;
|
|
};
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "datasets_parent_dataset_id_fkey";
|
|
columns: ["parent_dataset_id"];
|
|
isOneToOne: false;
|
|
referencedRelation: "datasets";
|
|
referencedColumns: ["id"];
|
|
},
|
|
{
|
|
foreignKeyName: "datasets_revision_fk";
|
|
columns: ["revision_id"];
|
|
isOneToOne: false;
|
|
referencedRelation: "revisions";
|
|
referencedColumns: ["id"];
|
|
},
|
|
{
|
|
foreignKeyName: "datasets_server_id_fkey";
|
|
columns: ["server_id"];
|
|
isOneToOne: false;
|
|
referencedRelation: "catalog_servers";
|
|
referencedColumns: ["id"];
|
|
},
|
|
];
|
|
};
|
|
game_rounds: {
|
|
Row: {
|
|
deadline: string | null;
|
|
result: Json | null;
|
|
round_number: number;
|
|
session_id: string;
|
|
viewpoint: Json;
|
|
};
|
|
Insert: {
|
|
deadline?: string | null;
|
|
result?: Json | null;
|
|
round_number: number;
|
|
session_id: string;
|
|
viewpoint: Json;
|
|
};
|
|
Update: {
|
|
deadline?: string | null;
|
|
result?: Json | null;
|
|
round_number?: number;
|
|
session_id?: string;
|
|
viewpoint?: Json;
|
|
};
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "game_rounds_session_id_fkey";
|
|
columns: ["session_id"];
|
|
isOneToOne: false;
|
|
referencedRelation: "game_sessions";
|
|
referencedColumns: ["id"];
|
|
},
|
|
];
|
|
};
|
|
game_sessions: {
|
|
Row: {
|
|
access_hash: string;
|
|
created_at: string;
|
|
current_round: number;
|
|
difficulty: string;
|
|
difficulty_settings: Json;
|
|
id: string;
|
|
owner_id: string | null;
|
|
revision_id: string;
|
|
};
|
|
Insert: {
|
|
access_hash: string;
|
|
created_at?: string;
|
|
current_round?: number;
|
|
difficulty: string;
|
|
difficulty_settings: Json;
|
|
id?: string;
|
|
owner_id?: string | null;
|
|
revision_id: string;
|
|
};
|
|
Update: {
|
|
access_hash?: string;
|
|
created_at?: string;
|
|
current_round?: number;
|
|
difficulty?: string;
|
|
difficulty_settings?: Json;
|
|
id?: string;
|
|
owner_id?: string | null;
|
|
revision_id?: string;
|
|
};
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "game_sessions_revision_id_fkey";
|
|
columns: ["revision_id"];
|
|
isOneToOne: false;
|
|
referencedRelation: "revisions";
|
|
referencedColumns: ["id"];
|
|
},
|
|
];
|
|
};
|
|
pairing_codes: {
|
|
Row: {
|
|
consumed: boolean;
|
|
device_hash: string;
|
|
expires_at: string;
|
|
owner_id: string | null;
|
|
polled_at: string | null;
|
|
token_value: string | null;
|
|
user_code: string;
|
|
};
|
|
Insert: {
|
|
consumed?: boolean;
|
|
device_hash: string;
|
|
expires_at: string;
|
|
owner_id?: string | null;
|
|
polled_at?: string | null;
|
|
token_value?: string | null;
|
|
user_code: string;
|
|
};
|
|
Update: {
|
|
consumed?: boolean;
|
|
device_hash?: string;
|
|
expires_at?: string;
|
|
owner_id?: string | null;
|
|
polled_at?: string | null;
|
|
token_value?: string | null;
|
|
user_code?: string;
|
|
};
|
|
Relationships: [];
|
|
};
|
|
profiles: {
|
|
Row: AccountStatusFields & {
|
|
avatar_path: string | null;
|
|
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: Partial<AccountStatusFields> & {
|
|
avatar_path?: string | null;
|
|
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: Partial<AccountStatusFields> & {
|
|
avatar_path?: string | null;
|
|
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;
|
|
};
|
|
Relationships: [];
|
|
};
|
|
rate_limits: {
|
|
Row: {
|
|
count: number;
|
|
expires_at: string;
|
|
key: string;
|
|
};
|
|
Insert: {
|
|
count?: number;
|
|
expires_at: string;
|
|
key: string;
|
|
};
|
|
Update: {
|
|
count?: number;
|
|
expires_at?: string;
|
|
key?: string;
|
|
};
|
|
Relationships: [];
|
|
};
|
|
reports: {
|
|
Row: ReportModerationFields & {
|
|
created_at: string;
|
|
dataset_id: string;
|
|
id: string;
|
|
owner_id: string | null;
|
|
reason: string;
|
|
state: string;
|
|
};
|
|
Insert: Partial<ReportModerationFields> & {
|
|
created_at?: string;
|
|
dataset_id: string;
|
|
id?: string;
|
|
owner_id?: string | null;
|
|
reason: string;
|
|
state?: string;
|
|
};
|
|
Update: Partial<ReportModerationFields> & {
|
|
created_at?: string;
|
|
dataset_id?: string;
|
|
id?: string;
|
|
owner_id?: string | null;
|
|
reason?: string;
|
|
state?: string;
|
|
};
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "reports_dataset_id_fkey";
|
|
columns: ["dataset_id"];
|
|
isOneToOne: false;
|
|
referencedRelation: "datasets";
|
|
referencedColumns: ["id"];
|
|
},
|
|
];
|
|
};
|
|
review_decisions: {
|
|
Row: {
|
|
created_at: string;
|
|
dataset_id: string;
|
|
decision: string;
|
|
id: string;
|
|
reason: string | null;
|
|
reviewer_id: string;
|
|
};
|
|
Insert: {
|
|
created_at?: string;
|
|
dataset_id: string;
|
|
decision: string;
|
|
id?: string;
|
|
reason?: string | null;
|
|
reviewer_id: string;
|
|
};
|
|
Update: {
|
|
created_at?: string;
|
|
dataset_id?: string;
|
|
decision?: string;
|
|
id?: string;
|
|
reason?: string | null;
|
|
reviewer_id?: string;
|
|
};
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "review_decisions_dataset_id_fkey";
|
|
columns: ["dataset_id"];
|
|
isOneToOne: false;
|
|
referencedRelation: "datasets";
|
|
referencedColumns: ["id"];
|
|
},
|
|
];
|
|
};
|
|
revisions: {
|
|
Row: {
|
|
asset_root: string;
|
|
created_at: string;
|
|
dataset_id: string;
|
|
id: string;
|
|
manifest: Json;
|
|
};
|
|
Insert: {
|
|
asset_root: string;
|
|
created_at?: string;
|
|
dataset_id: string;
|
|
id?: string;
|
|
manifest: Json;
|
|
};
|
|
Update: {
|
|
asset_root?: string;
|
|
created_at?: string;
|
|
dataset_id?: string;
|
|
id?: string;
|
|
manifest?: Json;
|
|
};
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "revisions_dataset_id_fkey";
|
|
columns: ["dataset_id"];
|
|
isOneToOne: false;
|
|
referencedRelation: "datasets";
|
|
referencedColumns: ["id"];
|
|
},
|
|
];
|
|
};
|
|
upload_jobs: {
|
|
Row: {
|
|
kind: string;
|
|
source_dataset_id: string | null;
|
|
attempts: number;
|
|
created_at: string;
|
|
dataset_id: string;
|
|
error: string | null;
|
|
id: string;
|
|
lease_owner: string | null;
|
|
lease_until: string | null;
|
|
progress: number;
|
|
state: string;
|
|
updated_at: string;
|
|
};
|
|
Insert: {
|
|
kind?: string;
|
|
source_dataset_id?: string | null;
|
|
attempts?: number;
|
|
created_at?: string;
|
|
dataset_id: string;
|
|
error?: string | null;
|
|
id?: string;
|
|
lease_owner?: string | null;
|
|
lease_until?: string | null;
|
|
progress?: number;
|
|
state?: string;
|
|
updated_at?: string;
|
|
};
|
|
Update: {
|
|
kind?: string;
|
|
source_dataset_id?: string | null;
|
|
attempts?: number;
|
|
created_at?: string;
|
|
dataset_id?: string;
|
|
error?: string | null;
|
|
id?: string;
|
|
lease_owner?: string | null;
|
|
lease_until?: string | null;
|
|
progress?: number;
|
|
state?: string;
|
|
updated_at?: string;
|
|
};
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "upload_jobs_dataset_id_fkey";
|
|
columns: ["dataset_id"];
|
|
isOneToOne: true;
|
|
referencedRelation: "datasets";
|
|
referencedColumns: ["id"];
|
|
},
|
|
];
|
|
};
|
|
};
|
|
Views: {
|
|
[_ in never]: never;
|
|
};
|
|
Functions: {
|
|
party_community: {
|
|
Args: {
|
|
p_room: string;
|
|
p_access_hash: string;
|
|
p_action: string;
|
|
p_payload?: Json;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
tournament_community: {
|
|
Args: {
|
|
p_tournament: string;
|
|
p_account: string;
|
|
p_action: string;
|
|
p_payload?: Json;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
tournament_chat: {
|
|
Args: {
|
|
p_tournament: string;
|
|
p_account: string;
|
|
p_text?: string | null;
|
|
p_client_id?: string | null;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
create_tournament: {
|
|
Args: { p_owner: string; p_payload: Json };
|
|
Returns: string;
|
|
};
|
|
tournament_action: {
|
|
Args: {
|
|
p_tournament: string;
|
|
p_account: string | null;
|
|
p_action: string;
|
|
p_payload?: Json;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
tick_tournaments: {
|
|
Args: Record<PropertyKey, never>;
|
|
Returns: undefined;
|
|
};
|
|
claim_tournament_announcements: {
|
|
Args: { p_worker: string; p_target?: string | null };
|
|
Returns: import("../lib/tournament-discord").TournamentAnnouncementJob[];
|
|
};
|
|
map_reaction_summary: {
|
|
Args: { p_dataset: string };
|
|
Returns: { likes: number; dislikes: number }[];
|
|
};
|
|
admin_account_action: {
|
|
Args: {
|
|
p_reviewer: string;
|
|
p_user: string;
|
|
p_action: string;
|
|
p_reason: string;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
submit_account_appeal: {
|
|
Args: { p_owner: string; p_reason: string };
|
|
Returns: string;
|
|
};
|
|
review_account_appeal: {
|
|
Args: {
|
|
p_reviewer: string;
|
|
p_appeal: string;
|
|
p_decision: string;
|
|
p_reason: string;
|
|
};
|
|
Returns: undefined;
|
|
};
|
|
developer_keys_list: { Args: { p_owner: string }; Returns: Json };
|
|
developer_key_create: {
|
|
Args: {
|
|
p_owner: string;
|
|
p_name: string;
|
|
p_scopes: string[];
|
|
p_token_hash: string;
|
|
p_prefix: string;
|
|
p_expires_days: number;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
developer_key_revoke: {
|
|
Args: { p_owner: string; p_key: string };
|
|
Returns: boolean;
|
|
};
|
|
developer_key_consume: { Args: { p_token_hash: string }; Returns: Json };
|
|
prometheus_status: {
|
|
Args: { p_reviewer: string };
|
|
Returns: Json;
|
|
};
|
|
configure_prometheus: {
|
|
Args: { p_reviewer: string; p_token_hash: string | null };
|
|
Returns: Json;
|
|
};
|
|
read_prometheus_metrics: {
|
|
Args: { p_token_hash: string };
|
|
Returns: Json;
|
|
};
|
|
receive_bug_close: {
|
|
Args: { p_report: string; p_external: string };
|
|
Returns: boolean;
|
|
};
|
|
set_bug_report_done: {
|
|
Args: {
|
|
p_report: string;
|
|
p_done: boolean;
|
|
p_closed_at?: string | null;
|
|
};
|
|
Returns: boolean;
|
|
};
|
|
claim_bug_cleanup: {
|
|
Args: { p_report: string; p_worker: string };
|
|
Returns: import("./bug-reports").BugReportRecord[];
|
|
SetofOptions: {
|
|
from: "*";
|
|
to: "bug_reports";
|
|
isOneToOne: false;
|
|
isSetofReturn: true;
|
|
};
|
|
};
|
|
begin_bug_purge: {
|
|
Args: { p_report: string; p_closed_at: string };
|
|
Returns: boolean;
|
|
};
|
|
finish_bug_purge: {
|
|
Args: { p_report: string; p_closed_at: string };
|
|
Returns: boolean;
|
|
};
|
|
join_multiplayer_room: {
|
|
Args: {
|
|
p_room: string;
|
|
p_access_hash: string;
|
|
p_owner: string | null;
|
|
p_name: string;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
claim_discord_cleanup: {
|
|
Args: { p_worker: string; p_target?: string | null };
|
|
Returns: import("./discord").DiscordAnnouncement[];
|
|
SetofOptions: {
|
|
from: "*";
|
|
to: "discord_announcements";
|
|
isOneToOne: false;
|
|
isSetofReturn: true;
|
|
};
|
|
};
|
|
mark_discord_party_closed: {
|
|
Args: { p_event: string };
|
|
Returns: string;
|
|
};
|
|
publish_discord_party: {
|
|
Args: { p_room: string; p_access_hash: string };
|
|
Returns: string;
|
|
};
|
|
claim_discord_announcements: {
|
|
Args: { p_worker: string; p_kinds: string[]; p_target?: string | null };
|
|
Returns: import("./discord").DiscordAnnouncement[];
|
|
SetofOptions: {
|
|
from: "*";
|
|
to: "discord_announcements";
|
|
isOneToOne: false;
|
|
isSetofReturn: true;
|
|
};
|
|
};
|
|
retry_discord_announcements: {
|
|
Args: { p_reviewer: string };
|
|
Returns: number;
|
|
};
|
|
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;
|
|
p_manifest: Json;
|
|
p_original_map: string;
|
|
p_original_owner: string;
|
|
};
|
|
Returns: string;
|
|
};
|
|
create_map_room: {
|
|
Args: {
|
|
p_owner: string | null;
|
|
p_dataset: string;
|
|
p_difficulty: string;
|
|
p_name: string;
|
|
p_limit: number;
|
|
p_access_hash: string;
|
|
};
|
|
Returns: string;
|
|
};
|
|
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;
|
|
};
|
|
multiplayer_chat: {
|
|
Args: {
|
|
p_room: string;
|
|
p_access_hash: string;
|
|
p_text: string | null;
|
|
p_client_id: string | null;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
legacy_password_needed: { Args: { p_user: string }; Returns: boolean };
|
|
claim_legacy_password: { Args: { p_user: string }; Returns: boolean };
|
|
set_beta_badge: {
|
|
Args: { p_reviewer: string; p_enabled: boolean };
|
|
Returns: boolean;
|
|
};
|
|
player_leaderboard: {
|
|
Args: {
|
|
p_difficulty?: string;
|
|
p_search?: string;
|
|
p_page?: number;
|
|
p_limit?: number;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
submit_content_report: {
|
|
Args: {
|
|
p_dataset: string;
|
|
p_owner: string;
|
|
p_revision: string;
|
|
p_panorama: string | null;
|
|
p_category: string;
|
|
p_reason: string;
|
|
p_evidence?: string | null;
|
|
};
|
|
Returns: string;
|
|
};
|
|
review_content_report: {
|
|
Args: {
|
|
p_report: string;
|
|
p_reviewer: string;
|
|
p_decision: string;
|
|
p_reason: string;
|
|
};
|
|
Returns: undefined;
|
|
};
|
|
appeal_map_ban: {
|
|
Args: { p_dataset: string; p_owner: string; p_reason: string };
|
|
Returns: string;
|
|
};
|
|
review_map_appeal: {
|
|
Args: {
|
|
p_appeal: string;
|
|
p_reviewer: string;
|
|
p_decision: string;
|
|
p_reason: string;
|
|
};
|
|
Returns: undefined;
|
|
};
|
|
refresh_map: {
|
|
Args: { p_dataset: string; p_owner: string; p_source: string };
|
|
Returns: undefined;
|
|
};
|
|
activate_round: {
|
|
Args: { p_access_hash: string; p_round: number; p_session: string };
|
|
Returns: string;
|
|
};
|
|
approve_pairing: {
|
|
Args: {
|
|
p_code: string;
|
|
p_hash: string;
|
|
p_owner: string;
|
|
p_token: string;
|
|
};
|
|
Returns: undefined;
|
|
};
|
|
assert_capture_server: {
|
|
Args: { p_actual: string; p_expected: string };
|
|
Returns: undefined;
|
|
};
|
|
check_contribution_server: {
|
|
Args: { p_dataset: string; p_owner: string };
|
|
Returns: undefined;
|
|
};
|
|
check_rate: {
|
|
Args: { p_key: string; p_limit: number; p_seconds: number };
|
|
Returns: boolean;
|
|
};
|
|
claim_job: {
|
|
Args: { p_worker: string };
|
|
Returns: {
|
|
kind: string;
|
|
source_dataset_id: string | null;
|
|
attempts: number;
|
|
created_at: string;
|
|
dataset_id: string;
|
|
error: string | null;
|
|
id: string;
|
|
lease_owner: string | null;
|
|
lease_until: string | null;
|
|
progress: number;
|
|
state: string;
|
|
updated_at: string;
|
|
}[];
|
|
SetofOptions: {
|
|
from: "*";
|
|
to: "upload_jobs";
|
|
isOneToOne: false;
|
|
isSetofReturn: true;
|
|
};
|
|
};
|
|
complete_job: {
|
|
Args: {
|
|
p_count: number;
|
|
p_cover: string;
|
|
p_job: string;
|
|
p_worker: string;
|
|
};
|
|
Returns: undefined;
|
|
};
|
|
contribution_capacity: {
|
|
Args: { p_dataset: string; p_owner: string };
|
|
Returns: Json;
|
|
};
|
|
contribution_server: {
|
|
Args: { p_dataset: string; p_owner: string };
|
|
Returns: Json;
|
|
};
|
|
create_game: {
|
|
Args: {
|
|
p_access_hash: string;
|
|
p_dataset: string;
|
|
p_difficulty: string;
|
|
p_owner: string | null;
|
|
};
|
|
Returns: string;
|
|
};
|
|
create_upload: {
|
|
Args: { p_manifest: Json; p_owner: string };
|
|
Returns: string;
|
|
};
|
|
finalize_upload: {
|
|
Args: { p_dataset: string; p_owner: string };
|
|
Returns: string;
|
|
};
|
|
normalize_server_address: {
|
|
Args: { p_address: string };
|
|
Returns: string;
|
|
};
|
|
publish_dataset: {
|
|
Args: {
|
|
p_dataset: string;
|
|
p_decision: string;
|
|
p_reason?: string | null;
|
|
p_reviewer: string;
|
|
};
|
|
Returns: undefined;
|
|
};
|
|
review_contribution: {
|
|
Args: {
|
|
p_contribution: string;
|
|
p_dataset: string;
|
|
p_decision: string;
|
|
p_owner: string;
|
|
p_reason?: string | null;
|
|
};
|
|
Returns: undefined;
|
|
};
|
|
publish_owner_update: {
|
|
Args: { p_dataset: string; p_owner: string };
|
|
Returns: undefined;
|
|
};
|
|
publish_own_contribution: {
|
|
Args: { p_contribution: string; p_owner: string };
|
|
Returns: undefined;
|
|
};
|
|
save_draft: {
|
|
Args: {
|
|
p_dataset: string;
|
|
p_description: string;
|
|
p_ids: Json;
|
|
p_name: string;
|
|
p_owner: string;
|
|
};
|
|
Returns: undefined;
|
|
};
|
|
set_contribution_server: {
|
|
Args: { p_address: string | null; p_dataset: string; p_owner: string };
|
|
Returns: undefined;
|
|
};
|
|
set_contributions: {
|
|
Args: { p_allowed: boolean; p_dataset: string; p_owner: string };
|
|
Returns: undefined;
|
|
};
|
|
submit_draft: {
|
|
Args: { p_dataset: string; p_owner: string };
|
|
Returns: undefined;
|
|
};
|
|
submit_guess: {
|
|
Args: {
|
|
p_access_hash: string;
|
|
p_round: number;
|
|
p_session: string;
|
|
p_x?: number | null;
|
|
p_z?: number | null;
|
|
};
|
|
Returns: Json;
|
|
};
|
|
withdraw_contribution: {
|
|
Args: { p_dataset: string; p_owner: string };
|
|
Returns: undefined;
|
|
};
|
|
};
|
|
Enums: {
|
|
[_ in never]: never;
|
|
};
|
|
CompositeTypes: {
|
|
[_ in never]: never;
|
|
};
|
|
};
|
|
};
|
|
|
|
type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
|
|
|
|
type DefaultSchema = DatabaseWithoutInternals[Extract<
|
|
keyof Database,
|
|
"public"
|
|
>];
|
|
|
|
export type Tables<
|
|
DefaultSchemaTableNameOrOptions extends
|
|
| keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
|
|
| { schema: keyof DatabaseWithoutInternals },
|
|
TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
|
|
DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
|
|
: never = never,
|
|
> = DefaultSchemaTableNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
|
|
DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
Row: infer R;
|
|
}
|
|
? R
|
|
: never
|
|
: DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] &
|
|
DefaultSchema["Views"])
|
|
? (DefaultSchema["Tables"] &
|
|
DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
|
|
Row: infer R;
|
|
}
|
|
? R
|
|
: never
|
|
: never;
|
|
|
|
export type TablesInsert<
|
|
DefaultSchemaTableNameOrOptions extends
|
|
| keyof DefaultSchema["Tables"]
|
|
| { schema: keyof DatabaseWithoutInternals },
|
|
TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
|
|
: never = never,
|
|
> = DefaultSchemaTableNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
Insert: infer I;
|
|
}
|
|
? I
|
|
: never
|
|
: DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
|
|
? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
|
|
Insert: infer I;
|
|
}
|
|
? I
|
|
: never
|
|
: never;
|
|
|
|
export type TablesUpdate<
|
|
DefaultSchemaTableNameOrOptions extends
|
|
| keyof DefaultSchema["Tables"]
|
|
| { schema: keyof DatabaseWithoutInternals },
|
|
TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
|
|
: never = never,
|
|
> = DefaultSchemaTableNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
Update: infer U;
|
|
}
|
|
? U
|
|
: never
|
|
: DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
|
|
? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
|
|
Update: infer U;
|
|
}
|
|
? U
|
|
: never
|
|
: never;
|
|
|
|
export type Enums<
|
|
DefaultSchemaEnumNameOrOptions extends
|
|
| keyof DefaultSchema["Enums"]
|
|
| { schema: keyof DatabaseWithoutInternals },
|
|
EnumName extends DefaultSchemaEnumNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
|
|
: never = never,
|
|
> = DefaultSchemaEnumNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
|
: DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
|
|
? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
|
|
: never;
|
|
|
|
export type CompositeTypes<
|
|
PublicCompositeTypeNameOrOptions extends
|
|
| keyof DefaultSchema["CompositeTypes"]
|
|
| { schema: keyof DatabaseWithoutInternals },
|
|
CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
|
|
: never = never,
|
|
> = PublicCompositeTypeNameOrOptions extends {
|
|
schema: keyof DatabaseWithoutInternals;
|
|
}
|
|
? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
|
|
: PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
|
|
? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
|
|
: never;
|
|
|
|
export const Constants = {
|
|
public: {
|
|
Enums: {},
|
|
},
|
|
} as const;
|