import { Session, User } from "@supabase/supabase-js";
import { Distinct } from "helpers/ts-type-helpers";
import { PageSuggestion, Permission, PlanType, Project, UserMetaData } from "../data/types";
import { Database } from "./generated-types";
type OverrideValueSymbol = Distinct<symbol, "OverrideValueSymbol">;
type Overwrite<T, U, R> = T extends object ? {
    [K in keyof T]: K extends keyof U ? U[K] extends OverrideValueSymbol ? R : U[K] extends object ? Overwrite<T[K], U[K], R> : U[K] : T[K];
} : never;
type OverrideEntry = [path: any, replacement: any];
type ApplyOverrides<T, O extends OverrideEntry[]> = O extends [infer First, ...infer Rest] ? First extends OverrideEntry ? Rest extends OverrideEntry[] ? ApplyOverrides<Overwrite<T, First[0], First[1]>, Rest> : Overwrite<T, First[0], First[1]> : T : T;
type Overrides = [
    [
        {
            public: {
                Tables: {
                    teams: {
                        Row: {
                            plan_type: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        PlanType
    ],
    [
        {
            public: {
                Tables: {
                    teams: {
                        Insert: {
                            plan_type: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        PlanType
    ],
    [
        {
            public: {
                Tables: {
                    teams: {
                        Update: {
                            plan_type: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        PlanType
    ],
    [
        {
            public: {
                Views: {
                    users: {
                        Row: {
                            raw_user_meta_data: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        UserMetaData
    ],
    [
        {
            public: {
                Views: {
                    users: {
                        Insert: {
                            raw_user_meta_data: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        UserMetaData
    ],
    [
        {
            public: {
                Views: {
                    users: {
                        Update: {
                            raw_user_meta_data: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        UserMetaData
    ],
    [
        {
            public: {
                Tables: {
                    projects: {
                        Row: {
                            json_data: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        Project
    ],
    [
        {
            public: {
                Tables: {
                    projects: {
                        Insert: {
                            json_data: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        Project
    ],
    [
        {
            public: {
                Tables: {
                    projects: {
                        Update: {
                            json_data: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        Project
    ],
    [
        {
            public: {
                Tables: {
                    projects: {
                        Row: {
                            page_suggestions: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        PageSuggestion[] | null
    ],
    [
        {
            public: {
                Tables: {
                    projects: {
                        Insert: {
                            page_suggestions: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        PageSuggestion[] | null
    ],
    [
        {
            public: {
                Tables: {
                    projects: {
                        Update: {
                            page_suggestions: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        PageSuggestion[] | null
    ],
    [
        {
            public: {
                Tables: {
                    permissions: {
                        Row: {
                            permission: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        Permission
    ],
    [
        {
            public: {
                Tables: {
                    permissions: {
                        Insert: {
                            permission: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        Permission
    ],
    [
        {
            public: {
                Tables: {
                    permissions: {
                        Update: {
                            permission: OverrideValueSymbol;
                        };
                    };
                };
            };
        },
        Permission
    ]
];
export type SupabaseDatabase = ApplyOverrides<Database, Overrides>;
export type SupabaseTeam = SupabaseDatabase["public"]["Tables"]["teams"]["Row"];
export type SupabaseUserProfile = SupabaseDatabase["public"]["Tables"]["profiles"]["Row"];
export type SupabaseProject = SupabaseDatabase["public"]["Tables"]["projects"]["Row"];
export type SupabaseUser = User;
export type SupabaseSession = Session;
export {};
//# sourceMappingURL=supabase-types.d.ts.map