1- export type Json = string
2- | number
3- | boolean
4- | null
5- | { [ key : string ] : Json }
6- | Json [ ]
7-
8- export interface Database {
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+ // Allows to automatically instantiate createClient with right options
11+ // instead of createClient<Database, { PostgrestVersion: 'XX' }>(URL, KEY)
12+ __InternalSupabase : {
13+ PostgrestVersion : '12.2.3 (519615d)'
14+ }
915 public : {
1016 Tables : {
1117 tasks : {
1218 Row : {
1319 completed : boolean | null
14- created_at : string | null
20+ created_at : string
1521 id : number
1622 title : string | null
17- user : string
23+ user : string | null
1824 }
1925 Insert : {
2026 completed ?: boolean | null
21- created_at ?: string | null
27+ created_at ?: string
2228 id ?: number
2329 title ?: string | null
24- user : string
30+ user ? : string | null
2531 }
2632 Update : {
2733 completed ?: boolean | null
28- created_at ?: string | null
34+ created_at ?: string
2935 id ?: number
3036 title ?: string | null
31- user ?: string
37+ user ?: string | null
3238 }
39+ Relationships : [ ]
3340 }
3441 }
3542 Views : {
@@ -46,3 +53,126 @@ export interface Database {
4653 }
4754 }
4855}
56+
57+ type DatabaseWithoutInternals = Omit < Database , '__InternalSupabase' >
58+
59+ type DefaultSchema = DatabaseWithoutInternals [ Extract < keyof Database , 'public' > ]
60+
61+ export type Tables <
62+ DefaultSchemaTableNameOrOptions extends
63+ | keyof ( DefaultSchema [ 'Tables' ] & DefaultSchema [ 'Views' ] )
64+ | { schema : keyof DatabaseWithoutInternals } ,
65+ TableName extends DefaultSchemaTableNameOrOptions extends {
66+ schema : keyof DatabaseWithoutInternals
67+ }
68+ ? keyof ( DatabaseWithoutInternals [ DefaultSchemaTableNameOrOptions [ 'schema' ] ] [ 'Tables' ]
69+ & DatabaseWithoutInternals [ DefaultSchemaTableNameOrOptions [ 'schema' ] ] [ 'Views' ] )
70+ : never = never ,
71+ > = DefaultSchemaTableNameOrOptions extends {
72+ schema : keyof DatabaseWithoutInternals
73+ }
74+ ? ( DatabaseWithoutInternals [ DefaultSchemaTableNameOrOptions [ 'schema' ] ] [ 'Tables' ]
75+ & DatabaseWithoutInternals [ DefaultSchemaTableNameOrOptions [ 'schema' ] ] [ 'Views' ] ) [ TableName ] extends {
76+ Row : infer R
77+ }
78+ ? R
79+ : never
80+ : DefaultSchemaTableNameOrOptions extends keyof ( DefaultSchema [ 'Tables' ]
81+ & DefaultSchema [ 'Views' ] )
82+ ? ( DefaultSchema [ 'Tables' ]
83+ & DefaultSchema [ 'Views' ] ) [ DefaultSchemaTableNameOrOptions ] extends {
84+ Row : infer R
85+ }
86+ ? R
87+ : never
88+ : never
89+
90+ export type TablesInsert <
91+ DefaultSchemaTableNameOrOptions extends
92+ | keyof DefaultSchema [ 'Tables' ]
93+ | { schema : keyof DatabaseWithoutInternals } ,
94+ TableName extends DefaultSchemaTableNameOrOptions extends {
95+ schema : keyof DatabaseWithoutInternals
96+ }
97+ ? keyof DatabaseWithoutInternals [ DefaultSchemaTableNameOrOptions [ 'schema' ] ] [ 'Tables' ]
98+ : never = never ,
99+ > = DefaultSchemaTableNameOrOptions extends {
100+ schema : keyof DatabaseWithoutInternals
101+ }
102+ ? DatabaseWithoutInternals [ DefaultSchemaTableNameOrOptions [ 'schema' ] ] [ 'Tables' ] [ TableName ] extends {
103+ Insert : infer I
104+ }
105+ ? I
106+ : never
107+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema [ 'Tables' ]
108+ ? DefaultSchema [ 'Tables' ] [ DefaultSchemaTableNameOrOptions ] extends {
109+ Insert : infer I
110+ }
111+ ? I
112+ : never
113+ : never
114+
115+ export type TablesUpdate <
116+ DefaultSchemaTableNameOrOptions extends
117+ | keyof DefaultSchema [ 'Tables' ]
118+ | { schema : keyof DatabaseWithoutInternals } ,
119+ TableName extends DefaultSchemaTableNameOrOptions extends {
120+ schema : keyof DatabaseWithoutInternals
121+ }
122+ ? keyof DatabaseWithoutInternals [ DefaultSchemaTableNameOrOptions [ 'schema' ] ] [ 'Tables' ]
123+ : never = never ,
124+ > = DefaultSchemaTableNameOrOptions extends {
125+ schema : keyof DatabaseWithoutInternals
126+ }
127+ ? DatabaseWithoutInternals [ DefaultSchemaTableNameOrOptions [ 'schema' ] ] [ 'Tables' ] [ TableName ] extends {
128+ Update : infer U
129+ }
130+ ? U
131+ : never
132+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema [ 'Tables' ]
133+ ? DefaultSchema [ 'Tables' ] [ DefaultSchemaTableNameOrOptions ] extends {
134+ Update : infer U
135+ }
136+ ? U
137+ : never
138+ : never
139+
140+ export type Enums <
141+ DefaultSchemaEnumNameOrOptions extends
142+ | keyof DefaultSchema [ 'Enums' ]
143+ | { schema : keyof DatabaseWithoutInternals } ,
144+ EnumName extends DefaultSchemaEnumNameOrOptions extends {
145+ schema : keyof DatabaseWithoutInternals
146+ }
147+ ? keyof DatabaseWithoutInternals [ DefaultSchemaEnumNameOrOptions [ 'schema' ] ] [ 'Enums' ]
148+ : never = never ,
149+ > = DefaultSchemaEnumNameOrOptions extends {
150+ schema : keyof DatabaseWithoutInternals
151+ }
152+ ? DatabaseWithoutInternals [ DefaultSchemaEnumNameOrOptions [ 'schema' ] ] [ 'Enums' ] [ EnumName ]
153+ : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema [ 'Enums' ]
154+ ? DefaultSchema [ 'Enums' ] [ DefaultSchemaEnumNameOrOptions ]
155+ : never
156+
157+ export type CompositeTypes <
158+ PublicCompositeTypeNameOrOptions extends
159+ | keyof DefaultSchema [ 'CompositeTypes' ]
160+ | { schema : keyof DatabaseWithoutInternals } ,
161+ CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
162+ schema : keyof DatabaseWithoutInternals
163+ }
164+ ? keyof DatabaseWithoutInternals [ PublicCompositeTypeNameOrOptions [ 'schema' ] ] [ 'CompositeTypes' ]
165+ : never = never ,
166+ > = PublicCompositeTypeNameOrOptions extends {
167+ schema : keyof DatabaseWithoutInternals
168+ }
169+ ? DatabaseWithoutInternals [ PublicCompositeTypeNameOrOptions [ 'schema' ] ] [ 'CompositeTypes' ] [ CompositeTypeName ]
170+ : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema [ 'CompositeTypes' ]
171+ ? DefaultSchema [ 'CompositeTypes' ] [ PublicCompositeTypeNameOrOptions ]
172+ : never
173+
174+ export const Constants = {
175+ public : {
176+ Enums : { } ,
177+ } ,
178+ } as const
0 commit comments