846 lines
23 KiB
TypeScript
846 lines
23 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;
|
|
report_cycle: number;
|
|
reason: string;
|
|
state: string;
|
|
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: {
|
|
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 & {
|
|
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;
|
|
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;
|
|
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;
|
|
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;
|
|
id: string;
|
|
owner_id: string | null;
|
|
revision_id: string;
|
|
};
|
|
Insert: {
|
|
access_hash: string;
|
|
created_at?: string;
|
|
current_round?: number;
|
|
difficulty: string;
|
|
id?: string;
|
|
owner_id?: string | null;
|
|
revision_id: string;
|
|
};
|
|
Update: {
|
|
access_hash?: string;
|
|
created_at?: string;
|
|
current_round?: number;
|
|
difficulty?: string;
|
|
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: {
|
|
created_at: string;
|
|
display_name: string;
|
|
id: string;
|
|
role: string;
|
|
};
|
|
Insert: {
|
|
created_at?: string;
|
|
display_name?: string;
|
|
id: string;
|
|
role?: string;
|
|
};
|
|
Update: {
|
|
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: {
|
|
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;
|
|
};
|
|
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;
|