|
| 1 | +export type Json = |
| 2 | + | string |
| 3 | + | number |
| 4 | + | boolean |
| 5 | + | null |
| 6 | + | { [key: string]: Json | undefined } |
| 7 | + | Json[] |
| 8 | + |
| 9 | +export type Database = { |
| 10 | + graphql_public: { |
| 11 | + Tables: { |
| 12 | + [_ in never]: never |
| 13 | + } |
| 14 | + Views: { |
| 15 | + [_ in never]: never |
| 16 | + } |
| 17 | + Functions: { |
| 18 | + graphql: { |
| 19 | + Args: { |
| 20 | + operationName?: string |
| 21 | + query?: string |
| 22 | + variables?: Json |
| 23 | + extensions?: Json |
| 24 | + } |
| 25 | + Returns: Json |
| 26 | + } |
| 27 | + } |
| 28 | + Enums: { |
| 29 | + [_ in never]: never |
| 30 | + } |
| 31 | + CompositeTypes: { |
| 32 | + [_ in never]: never |
| 33 | + } |
| 34 | + } |
| 35 | + public: { |
| 36 | + Tables: { |
| 37 | + tasks: { |
| 38 | + Row: { |
| 39 | + created_at: string | null |
| 40 | + description: string |
| 41 | + id: string |
| 42 | + status: Database["public"]["Enums"]["task_status"] |
| 43 | + title: string |
| 44 | + topic_id: string |
| 45 | + updated_at: string | null |
| 46 | + } |
| 47 | + Insert: { |
| 48 | + created_at?: string | null |
| 49 | + description: string |
| 50 | + id?: string |
| 51 | + status?: Database["public"]["Enums"]["task_status"] |
| 52 | + title: string |
| 53 | + topic_id: string |
| 54 | + updated_at?: string | null |
| 55 | + } |
| 56 | + Update: { |
| 57 | + created_at?: string | null |
| 58 | + description?: string |
| 59 | + id?: string |
| 60 | + status?: Database["public"]["Enums"]["task_status"] |
| 61 | + title?: string |
| 62 | + topic_id?: string |
| 63 | + updated_at?: string | null |
| 64 | + } |
| 65 | + Relationships: [ |
| 66 | + { |
| 67 | + foreignKeyName: "fk_topic_tasks" |
| 68 | + columns: ["topic_id"] |
| 69 | + isOneToOne: false |
| 70 | + referencedRelation: "topics" |
| 71 | + referencedColumns: ["id"] |
| 72 | + }, |
| 73 | + ] |
| 74 | + } |
| 75 | + timeline_nodes: { |
| 76 | + Row: { |
| 77 | + created_at: string | null |
| 78 | + description: string |
| 79 | + id: string |
| 80 | + title: string |
| 81 | + topic_id: string |
| 82 | + updated_at: string | null |
| 83 | + } |
| 84 | + Insert: { |
| 85 | + created_at?: string | null |
| 86 | + description: string |
| 87 | + id?: string |
| 88 | + title: string |
| 89 | + topic_id: string |
| 90 | + updated_at?: string | null |
| 91 | + } |
| 92 | + Update: { |
| 93 | + created_at?: string | null |
| 94 | + description?: string |
| 95 | + id?: string |
| 96 | + title?: string |
| 97 | + topic_id?: string |
| 98 | + updated_at?: string | null |
| 99 | + } |
| 100 | + Relationships: [ |
| 101 | + { |
| 102 | + foreignKeyName: "fk_topic_timeline_nodes" |
| 103 | + columns: ["topic_id"] |
| 104 | + isOneToOne: false |
| 105 | + referencedRelation: "topics" |
| 106 | + referencedColumns: ["id"] |
| 107 | + }, |
| 108 | + ] |
| 109 | + } |
| 110 | + topics: { |
| 111 | + Row: { |
| 112 | + created_at: string | null |
| 113 | + description: string |
| 114 | + id: string |
| 115 | + owner: string |
| 116 | + title: string |
| 117 | + updated_at: string | null |
| 118 | + } |
| 119 | + Insert: { |
| 120 | + created_at?: string | null |
| 121 | + description: string |
| 122 | + id?: string |
| 123 | + owner: string |
| 124 | + title: string |
| 125 | + updated_at?: string | null |
| 126 | + } |
| 127 | + Update: { |
| 128 | + created_at?: string | null |
| 129 | + description?: string |
| 130 | + id?: string |
| 131 | + owner?: string |
| 132 | + title?: string |
| 133 | + updated_at?: string | null |
| 134 | + } |
| 135 | + Relationships: [] |
| 136 | + } |
| 137 | + } |
| 138 | + Views: { |
| 139 | + [_ in never]: never |
| 140 | + } |
| 141 | + Functions: { |
| 142 | + [_ in never]: never |
| 143 | + } |
| 144 | + Enums: { |
| 145 | + task_status: "pending" | "accepted" | "rejected" | "completed" |
| 146 | + } |
| 147 | + CompositeTypes: { |
| 148 | + [_ in never]: never |
| 149 | + } |
| 150 | + } |
| 151 | +} |
| 152 | + |
| 153 | +type DefaultSchema = Database[Extract<keyof Database, "public">] |
| 154 | + |
| 155 | +export type Tables< |
| 156 | + DefaultSchemaTableNameOrOptions extends |
| 157 | + | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) |
| 158 | + | { schema: keyof Database }, |
| 159 | + TableName extends DefaultSchemaTableNameOrOptions extends { |
| 160 | + schema: keyof Database |
| 161 | + } |
| 162 | + ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & |
| 163 | + Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) |
| 164 | + : never = never, |
| 165 | +> = DefaultSchemaTableNameOrOptions extends { schema: keyof Database } |
| 166 | + ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & |
| 167 | + Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends { |
| 168 | + Row: infer R |
| 169 | + } |
| 170 | + ? R |
| 171 | + : never |
| 172 | + : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & |
| 173 | + DefaultSchema["Views"]) |
| 174 | + ? (DefaultSchema["Tables"] & |
| 175 | + DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends { |
| 176 | + Row: infer R |
| 177 | + } |
| 178 | + ? R |
| 179 | + : never |
| 180 | + : never |
| 181 | + |
| 182 | +export type TablesInsert< |
| 183 | + DefaultSchemaTableNameOrOptions extends |
| 184 | + | keyof DefaultSchema["Tables"] |
| 185 | + | { schema: keyof Database }, |
| 186 | + TableName extends DefaultSchemaTableNameOrOptions extends { |
| 187 | + schema: keyof Database |
| 188 | + } |
| 189 | + ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] |
| 190 | + : never = never, |
| 191 | +> = DefaultSchemaTableNameOrOptions extends { schema: keyof Database } |
| 192 | + ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends { |
| 193 | + Insert: infer I |
| 194 | + } |
| 195 | + ? I |
| 196 | + : never |
| 197 | + : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] |
| 198 | + ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends { |
| 199 | + Insert: infer I |
| 200 | + } |
| 201 | + ? I |
| 202 | + : never |
| 203 | + : never |
| 204 | + |
| 205 | +export type TablesUpdate< |
| 206 | + DefaultSchemaTableNameOrOptions extends |
| 207 | + | keyof DefaultSchema["Tables"] |
| 208 | + | { schema: keyof Database }, |
| 209 | + TableName extends DefaultSchemaTableNameOrOptions extends { |
| 210 | + schema: keyof Database |
| 211 | + } |
| 212 | + ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] |
| 213 | + : never = never, |
| 214 | +> = DefaultSchemaTableNameOrOptions extends { schema: keyof Database } |
| 215 | + ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends { |
| 216 | + Update: infer U |
| 217 | + } |
| 218 | + ? U |
| 219 | + : never |
| 220 | + : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] |
| 221 | + ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends { |
| 222 | + Update: infer U |
| 223 | + } |
| 224 | + ? U |
| 225 | + : never |
| 226 | + : never |
| 227 | + |
| 228 | +export type Enums< |
| 229 | + DefaultSchemaEnumNameOrOptions extends |
| 230 | + | keyof DefaultSchema["Enums"] |
| 231 | + | { schema: keyof Database }, |
| 232 | + EnumName extends DefaultSchemaEnumNameOrOptions extends { |
| 233 | + schema: keyof Database |
| 234 | + } |
| 235 | + ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] |
| 236 | + : never = never, |
| 237 | +> = DefaultSchemaEnumNameOrOptions extends { schema: keyof Database } |
| 238 | + ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] |
| 239 | + : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] |
| 240 | + ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] |
| 241 | + : never |
| 242 | + |
| 243 | +export type CompositeTypes< |
| 244 | + PublicCompositeTypeNameOrOptions extends |
| 245 | + | keyof DefaultSchema["CompositeTypes"] |
| 246 | + | { schema: keyof Database }, |
| 247 | + CompositeTypeName extends PublicCompositeTypeNameOrOptions extends { |
| 248 | + schema: keyof Database |
| 249 | + } |
| 250 | + ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] |
| 251 | + : never = never, |
| 252 | +> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database } |
| 253 | + ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] |
| 254 | + : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] |
| 255 | + ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] |
| 256 | + : never |
| 257 | + |
| 258 | +export const Constants = { |
| 259 | + graphql_public: { |
| 260 | + Enums: {}, |
| 261 | + }, |
| 262 | + public: { |
| 263 | + Enums: { |
| 264 | + task_status: ["pending", "accepted", "rejected", "completed"], |
| 265 | + }, |
| 266 | + }, |
| 267 | +} as const |
| 268 | + |
0 commit comments