335 lines
9.1 KiB
TypeScript
335 lines
9.1 KiB
TypeScript
export type Json =
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null
|
|
| { [key: string]: Json | undefined }
|
|
| Json[]
|
|
|
|
export type Database = {
|
|
graphql_public: {
|
|
Tables: {
|
|
[_ in never]: never
|
|
}
|
|
Views: {
|
|
[_ in never]: never
|
|
}
|
|
Functions: {
|
|
graphql: {
|
|
Args: {
|
|
operationName?: string
|
|
query?: string
|
|
variables?: Json
|
|
extensions?: Json
|
|
}
|
|
Returns: Json
|
|
}
|
|
}
|
|
Enums: {
|
|
[_ in never]: never
|
|
}
|
|
CompositeTypes: {
|
|
[_ in never]: never
|
|
}
|
|
}
|
|
public: {
|
|
Tables: {
|
|
reports: {
|
|
Row: {
|
|
content: string | null
|
|
created_at: string | null
|
|
id: string
|
|
study_space_id: string | null
|
|
type: string
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
content?: string | null
|
|
created_at?: string | null
|
|
id?: string
|
|
study_space_id?: string | null
|
|
type: string
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
content?: string | null
|
|
created_at?: string | null
|
|
id?: string
|
|
study_space_id?: string | null
|
|
type?: string
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "reports_study_space_id_fkey"
|
|
columns: ["study_space_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "study_spaces"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
study_space_hours: {
|
|
Row: {
|
|
closes_at: string
|
|
created_at: string | null
|
|
day_of_week: number
|
|
id: string
|
|
open_today_status: boolean | null
|
|
opens_at: string
|
|
study_space_id: string | null
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
closes_at: string
|
|
created_at?: string | null
|
|
day_of_week: number
|
|
id?: string
|
|
open_today_status?: boolean | null
|
|
opens_at: string
|
|
study_space_id?: string | null
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
closes_at?: string
|
|
created_at?: string | null
|
|
day_of_week?: number
|
|
id?: string
|
|
open_today_status?: boolean | null
|
|
opens_at?: string
|
|
study_space_id?: string | null
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "study_space_hours_study_space_id_fkey"
|
|
columns: ["study_space_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "study_spaces"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
study_space_images: {
|
|
Row: {
|
|
created_at: string | null
|
|
image_path: string
|
|
study_space_id: string
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
image_path: string
|
|
study_space_id: string
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
image_path?: string
|
|
study_space_id?: string
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "study_space_images_study_space_id_fkey"
|
|
columns: ["study_space_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "study_spaces"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
study_spaces: {
|
|
Row: {
|
|
building_location: Json | null
|
|
building_location_old: string | null
|
|
created_at: string | null
|
|
description: string | null
|
|
id: string
|
|
location: string | null
|
|
power: string
|
|
tags: string[]
|
|
updated_at: string | null
|
|
volume: string
|
|
wifi: string
|
|
}
|
|
Insert: {
|
|
building_location?: Json | null
|
|
building_location_old?: string | null
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
location?: string | null
|
|
power: string
|
|
tags?: string[]
|
|
updated_at?: string | null
|
|
volume: string
|
|
wifi: string
|
|
}
|
|
Update: {
|
|
building_location?: Json | null
|
|
building_location_old?: string | null
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
location?: string | null
|
|
power?: string
|
|
tags?: string[]
|
|
updated_at?: string | null
|
|
volume?: string
|
|
wifi?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
users: {
|
|
Row: {
|
|
created_at: string
|
|
id: string
|
|
is_admin: boolean
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
created_at?: string
|
|
id: string
|
|
is_admin?: boolean
|
|
updated_at?: string
|
|
}
|
|
Update: {
|
|
created_at?: string
|
|
id?: string
|
|
is_admin?: boolean
|
|
updated_at?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
}
|
|
Views: {
|
|
[_ in never]: never
|
|
}
|
|
Functions: {
|
|
[_ in never]: never
|
|
}
|
|
Enums: {
|
|
[_ in never]: never
|
|
}
|
|
CompositeTypes: {
|
|
[_ in never]: never
|
|
}
|
|
}
|
|
}
|
|
|
|
type DefaultSchema = Database[Extract<keyof Database, "public">]
|
|
|
|
export type Tables<
|
|
DefaultSchemaTableNameOrOptions extends
|
|
| keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
|
|
| { schema: keyof Database },
|
|
TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
schema: keyof Database
|
|
}
|
|
? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
|
|
Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
|
|
: never = never,
|
|
> = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
|
|
? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
|
|
Database[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 Database },
|
|
TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
schema: keyof Database
|
|
}
|
|
? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
|
|
: never = never,
|
|
> = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
|
|
? Database[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 Database },
|
|
TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
schema: keyof Database
|
|
}
|
|
? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
|
|
: never = never,
|
|
> = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
|
|
? Database[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 Database },
|
|
EnumName extends DefaultSchemaEnumNameOrOptions extends {
|
|
schema: keyof Database
|
|
}
|
|
? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
|
|
: never = never,
|
|
> = DefaultSchemaEnumNameOrOptions extends { schema: keyof Database }
|
|
? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
|
: DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
|
|
? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
|
|
: never
|
|
|
|
export type CompositeTypes<
|
|
PublicCompositeTypeNameOrOptions extends
|
|
| keyof DefaultSchema["CompositeTypes"]
|
|
| { schema: keyof Database },
|
|
CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
|
|
schema: keyof Database
|
|
}
|
|
? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
|
|
: never = never,
|
|
> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
|
|
? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
|
|
: PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
|
|
? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
|
|
: never
|
|
|
|
export const Constants = {
|
|
graphql_public: {
|
|
Enums: {},
|
|
},
|
|
public: {
|
|
Enums: {},
|
|
},
|
|
} as const
|
|
|