-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.types.ts
More file actions
976 lines (967 loc) · 32.9 KB
/
database.types.ts
File metadata and controls
976 lines (967 loc) · 32.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
export type Json =
| string
| number
| boolean
| null
| { [key: string]: Json | undefined }
| Json[]
export type Database = {
// Allows to automatically instantiate createClient with right options
// instead of createClient<Database, { PostgrestVersion: 'XX' }>(URL, KEY)
__InternalSupabase: {
PostgrestVersion: "14.1"
}
public: {
Tables: {
in_app_notifications: {
Row: {
created_at: string
in_app_notification_id: number
is_read: boolean
message: string
notification_id: number | null
organization_id: string
read_at: string | null
read_by: string | null
template_type: string
}
Insert: {
created_at?: string
in_app_notification_id?: number
is_read?: boolean
message: string
notification_id?: number | null
organization_id: string
read_at?: string | null
read_by?: string | null
template_type: string
}
Update: {
created_at?: string
in_app_notification_id?: number
is_read?: boolean
message?: string
notification_id?: number | null
organization_id?: string
read_at?: string | null
read_by?: string | null
template_type?: string
}
Relationships: [
{
foreignKeyName: "in_app_notifications_notification_id_fkey"
columns: ["notification_id"]
isOneToOne: false
referencedRelation: "notifications"
referencedColumns: ["notification_id"]
},
{
foreignKeyName: "in_app_notifications_organization_id_fkey"
columns: ["organization_id"]
isOneToOne: false
referencedRelation: "organizations"
referencedColumns: ["organization_id"]
},
{
foreignKeyName: "in_app_notifications_read_by_fkey"
columns: ["read_by"]
isOneToOne: false
referencedRelation: "profiles"
referencedColumns: ["profile_id"]
},
]
}
instructors: {
Row: {
career: Json | null
created_at: string
info: string | null
instructor_id: number
name: string
organization_id: string
photo_url: string | null
sns: Json | null
updated_at: string
}
Insert: {
career?: Json | null
created_at?: string
info?: string | null
instructor_id?: never
name: string
organization_id: string
photo_url?: string | null
sns?: Json | null
updated_at?: string
}
Update: {
career?: Json | null
created_at?: string
info?: string | null
instructor_id?: never
name?: string
organization_id?: string
photo_url?: string | null
sns?: Json | null
updated_at?: string
}
Relationships: [
{
foreignKeyName: "instructors_organization_id_organizations_organization_id_fk"
columns: ["organization_id"]
isOneToOne: false
referencedRelation: "organizations"
referencedColumns: ["organization_id"]
},
]
}
notifications: {
Row: {
alimtalk_error_code: string | null
alimtalk_error_message: string | null
alimtalk_message_id: string | null
alimtalk_sent_at: string | null
alimtalk_status: Database["public"]["Enums"]["alimtalk_status"] | null
alimtalk_template_code: string | null
alimtalk_variables: Json | null
consult_completed_at: string | null
consult_completed_by: string | null
consult_message: string | null
consult_notes: string | null
consult_result: Database["public"]["Enums"]["consult_result"] | null
consult_status: Database["public"]["Enums"]["consult_status"] | null
created_at: string
email_error_message: string | null
email_sent_at: string | null
email_status: Database["public"]["Enums"]["email_status"] | null
notification_id: number
organization_id: string
parent_notification_id: number | null
program_id: number | null
recipient_email: string | null
recipient_name: string | null
recipient_phone: string
recipient_profile_id: string | null
reminder_generated: boolean | null
retry_count: number | null
schedule_id: number | null
scheduled_send_at: string | null
send_mode: Database["public"]["Enums"]["send_mode"] | null
sender_profile_id: string | null
type: Database["public"]["Enums"]["notification_type"]
updated_at: string
}
Insert: {
alimtalk_error_code?: string | null
alimtalk_error_message?: string | null
alimtalk_message_id?: string | null
alimtalk_sent_at?: string | null
alimtalk_status?:
| Database["public"]["Enums"]["alimtalk_status"]
| null
alimtalk_template_code?: string | null
alimtalk_variables?: Json | null
consult_completed_at?: string | null
consult_completed_by?: string | null
consult_message?: string | null
consult_notes?: string | null
consult_result?: Database["public"]["Enums"]["consult_result"] | null
consult_status?: Database["public"]["Enums"]["consult_status"] | null
created_at?: string
email_error_message?: string | null
email_sent_at?: string | null
email_status?: Database["public"]["Enums"]["email_status"] | null
notification_id?: number
organization_id: string
parent_notification_id?: number | null
program_id?: number | null
recipient_email?: string | null
recipient_name?: string | null
recipient_phone: string
recipient_profile_id?: string | null
reminder_generated?: boolean | null
retry_count?: number | null
schedule_id?: number | null
scheduled_send_at?: string | null
send_mode?: Database["public"]["Enums"]["send_mode"] | null
sender_profile_id?: string | null
type: Database["public"]["Enums"]["notification_type"]
updated_at?: string
}
Update: {
alimtalk_error_code?: string | null
alimtalk_error_message?: string | null
alimtalk_message_id?: string | null
alimtalk_sent_at?: string | null
alimtalk_status?:
| Database["public"]["Enums"]["alimtalk_status"]
| null
alimtalk_template_code?: string | null
alimtalk_variables?: Json | null
consult_completed_at?: string | null
consult_completed_by?: string | null
consult_message?: string | null
consult_notes?: string | null
consult_result?: Database["public"]["Enums"]["consult_result"] | null
consult_status?: Database["public"]["Enums"]["consult_status"] | null
created_at?: string
email_error_message?: string | null
email_sent_at?: string | null
email_status?: Database["public"]["Enums"]["email_status"] | null
notification_id?: number
organization_id?: string
parent_notification_id?: number | null
program_id?: number | null
recipient_email?: string | null
recipient_name?: string | null
recipient_phone?: string
recipient_profile_id?: string | null
reminder_generated?: boolean | null
retry_count?: number | null
schedule_id?: number | null
scheduled_send_at?: string | null
send_mode?: Database["public"]["Enums"]["send_mode"] | null
sender_profile_id?: string | null
type?: Database["public"]["Enums"]["notification_type"]
updated_at?: string
}
Relationships: [
{
foreignKeyName: "notifications_consult_completed_by_fkey"
columns: ["consult_completed_by"]
isOneToOne: false
referencedRelation: "profiles"
referencedColumns: ["profile_id"]
},
{
foreignKeyName: "notifications_organization_id_fkey"
columns: ["organization_id"]
isOneToOne: false
referencedRelation: "organizations"
referencedColumns: ["organization_id"]
},
{
foreignKeyName: "notifications_parent_notification_id_fkey"
columns: ["parent_notification_id"]
isOneToOne: false
referencedRelation: "notifications"
referencedColumns: ["notification_id"]
},
{
foreignKeyName: "notifications_program_id_fkey"
columns: ["program_id"]
isOneToOne: false
referencedRelation: "programs"
referencedColumns: ["program_id"]
},
{
foreignKeyName: "notifications_recipient_profile_id_fkey"
columns: ["recipient_profile_id"]
isOneToOne: false
referencedRelation: "profiles"
referencedColumns: ["profile_id"]
},
{
foreignKeyName: "notifications_schedule_id_fkey"
columns: ["schedule_id"]
isOneToOne: false
referencedRelation: "schedules"
referencedColumns: ["schedule_id"]
},
{
foreignKeyName: "notifications_sender_profile_id_fkey"
columns: ["sender_profile_id"]
isOneToOne: false
referencedRelation: "profiles"
referencedColumns: ["profile_id"]
},
]
}
organization_members: {
Row: {
created_at: string
organization_id: string
profile_id: string
role: Database["public"]["Enums"]["user_role"]
state: Database["public"]["Enums"]["user_state"]
type: Database["public"]["Enums"]["user_type"] | null
updated_at: string
}
Insert: {
created_at?: string
organization_id: string
profile_id: string
role?: Database["public"]["Enums"]["user_role"]
state?: Database["public"]["Enums"]["user_state"]
type?: Database["public"]["Enums"]["user_type"] | null
updated_at?: string
}
Update: {
created_at?: string
organization_id?: string
profile_id?: string
role?: Database["public"]["Enums"]["user_role"]
state?: Database["public"]["Enums"]["user_state"]
type?: Database["public"]["Enums"]["user_type"] | null
updated_at?: string
}
Relationships: [
{
foreignKeyName: "organization_members_organization_id_organizations_organization"
columns: ["organization_id"]
isOneToOne: false
referencedRelation: "organizations"
referencedColumns: ["organization_id"]
},
{
foreignKeyName: "organization_members_profile_id_profiles_fk"
columns: ["profile_id"]
isOneToOne: false
referencedRelation: "profiles"
referencedColumns: ["profile_id"]
},
]
}
organization_templates: {
Row: {
alimtalk_enabled: boolean
batch_start_hour: number | null
channel: Database["public"]["Enums"]["template_channel"]
created_at: string
email_enabled: boolean
hours_before: number | null
org_template_id: number
organization_id: string
scheduled_send_time: string | null
send_timing: Database["public"]["Enums"]["send_timing"]
status: Database["public"]["Enums"]["template_status"]
super_template_id: number
updated_at: string
}
Insert: {
alimtalk_enabled?: boolean
batch_start_hour?: number | null
channel?: Database["public"]["Enums"]["template_channel"]
created_at?: string
email_enabled?: boolean
hours_before?: number | null
org_template_id?: number
organization_id: string
scheduled_send_time?: string | null
send_timing: Database["public"]["Enums"]["send_timing"]
status?: Database["public"]["Enums"]["template_status"]
super_template_id: number
updated_at?: string
}
Update: {
alimtalk_enabled?: boolean
batch_start_hour?: number | null
channel?: Database["public"]["Enums"]["template_channel"]
created_at?: string
email_enabled?: boolean
hours_before?: number | null
org_template_id?: number
organization_id?: string
scheduled_send_time?: string | null
send_timing?: Database["public"]["Enums"]["send_timing"]
status?: Database["public"]["Enums"]["template_status"]
super_template_id?: number
updated_at?: string
}
Relationships: [
{
foreignKeyName: "organization_templates_organization_id_fkey"
columns: ["organization_id"]
isOneToOne: false
referencedRelation: "organizations"
referencedColumns: ["organization_id"]
},
{
foreignKeyName: "organization_templates_super_template_id_fkey"
columns: ["super_template_id"]
isOneToOne: false
referencedRelation: "super_templates"
referencedColumns: ["super_template_id"]
},
]
}
organizations: {
Row: {
created_at: string
description: string | null
name: string
organization_id: string
updated_at: string
}
Insert: {
created_at?: string
description?: string | null
name: string
organization_id?: string
updated_at?: string
}
Update: {
created_at?: string
description?: string | null
name?: string
organization_id?: string
updated_at?: string
}
Relationships: []
}
payments: {
Row: {
approved_at: string
created_at: string
metadata: Json
order_id: string
order_name: string
payment_id: number
payment_key: string
raw_data: Json
receipt_url: string
requested_at: string
status: string
total_amount: number
updated_at: string
user_id: string | null
}
Insert: {
approved_at: string
created_at?: string
metadata: Json
order_id: string
order_name: string
payment_id?: never
payment_key: string
raw_data: Json
receipt_url: string
requested_at: string
status: string
total_amount: number
updated_at?: string
user_id?: string | null
}
Update: {
approved_at?: string
created_at?: string
metadata?: Json
order_id?: string
order_name?: string
payment_id?: never
payment_key?: string
raw_data?: Json
receipt_url?: string
requested_at?: string
status?: string
total_amount?: number
updated_at?: string
user_id?: string | null
}
Relationships: []
}
profiles: {
Row: {
avatar_url: string | null
birth_date: string | null
class_end_date: string | null
class_start_date: string | null
color: string | null
created_at: string
description: string | null
is_signup_complete: boolean
marketing_consent: boolean
name: string
parent_name: string | null
parent_phone: string | null
phone: string | null
profile_id: string
region: string | null
updated_at: string
}
Insert: {
avatar_url?: string | null
birth_date?: string | null
class_end_date?: string | null
class_start_date?: string | null
color?: string | null
created_at?: string
description?: string | null
is_signup_complete?: boolean
marketing_consent?: boolean
name: string
parent_name?: string | null
parent_phone?: string | null
phone?: string | null
profile_id: string
region?: string | null
updated_at?: string
}
Update: {
avatar_url?: string | null
birth_date?: string | null
class_end_date?: string | null
class_start_date?: string | null
color?: string | null
created_at?: string
description?: string | null
is_signup_complete?: boolean
marketing_consent?: boolean
name?: string
parent_name?: string | null
parent_phone?: string | null
phone?: string | null
profile_id?: string
region?: string | null
updated_at?: string
}
Relationships: []
}
programs: {
Row: {
cover_image_url: string | null
created_at: string
curriculum: Json | null
description: string | null
duration_minutes: number | null
instructor_id: number | null
is_public: boolean | null
level: Database["public"]["Enums"]["program_level"] | null
location_address: string | null
location_type: string | null
max_capacity: number | null
organization_id: string
price: number | null
program_id: number
slug: string | null
status: Database["public"]["Enums"]["program_status"]
subtitle: string | null
thumbnail_url: string | null
title: string
total_sessions: number | null
updated_at: string
}
Insert: {
cover_image_url?: string | null
created_at?: string
curriculum?: Json | null
description?: string | null
duration_minutes?: number | null
instructor_id?: number | null
is_public?: boolean | null
level?: Database["public"]["Enums"]["program_level"] | null
location_address?: string | null
location_type?: string | null
max_capacity?: number | null
organization_id: string
price?: number | null
program_id?: never
slug?: string | null
status?: Database["public"]["Enums"]["program_status"]
subtitle?: string | null
thumbnail_url?: string | null
title: string
total_sessions?: number | null
updated_at?: string
}
Update: {
cover_image_url?: string | null
created_at?: string
curriculum?: Json | null
description?: string | null
duration_minutes?: number | null
instructor_id?: number | null
is_public?: boolean | null
level?: Database["public"]["Enums"]["program_level"] | null
location_address?: string | null
location_type?: string | null
max_capacity?: number | null
organization_id?: string
price?: number | null
program_id?: never
slug?: string | null
status?: Database["public"]["Enums"]["program_status"]
subtitle?: string | null
thumbnail_url?: string | null
title?: string
total_sessions?: number | null
updated_at?: string
}
Relationships: [
{
foreignKeyName: "programs_instructor_id_instructors_instructor_id_fk"
columns: ["instructor_id"]
isOneToOne: false
referencedRelation: "instructors"
referencedColumns: ["instructor_id"]
},
{
foreignKeyName: "programs_organization_id_organizations_organization_id_fk"
columns: ["organization_id"]
isOneToOne: false
referencedRelation: "organizations"
referencedColumns: ["organization_id"]
},
]
}
schedules: {
Row: {
created_at: string
end_time: string
is_exception: boolean
organization_id: string
parent_schedule_id: number | null
program_id: number | null
rrule: string | null
schedule_id: number
start_time: string
student_id: string
updated_at: string
}
Insert: {
created_at?: string
end_time: string
is_exception?: boolean
organization_id: string
parent_schedule_id?: number | null
program_id?: number | null
rrule?: string | null
schedule_id?: never
start_time: string
student_id: string
updated_at?: string
}
Update: {
created_at?: string
end_time?: string
is_exception?: boolean
organization_id?: string
parent_schedule_id?: number | null
program_id?: number | null
rrule?: string | null
schedule_id?: never
start_time?: string
student_id?: string
updated_at?: string
}
Relationships: [
{
foreignKeyName: "schedules_organization_id_organizations_organization_id_fk"
columns: ["organization_id"]
isOneToOne: false
referencedRelation: "organizations"
referencedColumns: ["organization_id"]
},
{
foreignKeyName: "schedules_program_id_programs_program_id_fk"
columns: ["program_id"]
isOneToOne: false
referencedRelation: "programs"
referencedColumns: ["program_id"]
},
{
foreignKeyName: "schedules_student_id_profiles_profile_id_fk"
columns: ["student_id"]
isOneToOne: false
referencedRelation: "profiles"
referencedColumns: ["profile_id"]
},
]
}
settings: {
Row: {
created_at: string
organization_id: string
setting_key: string
setting_value: Json
updated_at: string
}
Insert: {
created_at?: string
organization_id: string
setting_key: string
setting_value: Json
updated_at?: string
}
Update: {
created_at?: string
organization_id?: string
setting_key?: string
setting_value?: Json
updated_at?: string
}
Relationships: [
{
foreignKeyName: "settings_organization_id_organizations_organization_id_fk"
columns: ["organization_id"]
isOneToOne: false
referencedRelation: "organizations"
referencedColumns: ["organization_id"]
},
]
}
super_templates: {
Row: {
channel: Database["public"]["Enums"]["template_channel"]
content: string
created_at: string
default_hours_before: number | null
default_timing: Database["public"]["Enums"]["send_timing"]
kakao_template_code: string
name: string
status: Database["public"]["Enums"]["template_status"]
super_template_id: number
type: string
updated_at: string
variables: Json
}
Insert: {
channel?: Database["public"]["Enums"]["template_channel"]
content: string
created_at?: string
default_hours_before?: number | null
default_timing: Database["public"]["Enums"]["send_timing"]
kakao_template_code: string
name: string
status?: Database["public"]["Enums"]["template_status"]
super_template_id?: number
type: string
updated_at?: string
variables?: Json
}
Update: {
channel?: Database["public"]["Enums"]["template_channel"]
content?: string
created_at?: string
default_hours_before?: number | null
default_timing?: Database["public"]["Enums"]["send_timing"]
kakao_template_code?: string
name?: string
status?: Database["public"]["Enums"]["template_status"]
super_template_id?: number
type?: string
updated_at?: string
variables?: Json
}
Relationships: []
}
test_send_logs: {
Row: {
log_id: number
org_template_id: number | null
organization_id: string | null
profile_id: string
recipient_phone: string
sent_at: string
super_template_id: number
}
Insert: {
log_id?: number
org_template_id?: number | null
organization_id?: string | null
profile_id: string
recipient_phone: string
sent_at?: string
super_template_id: number
}
Update: {
log_id?: number
org_template_id?: number | null
organization_id?: string | null
profile_id?: string
recipient_phone?: string
sent_at?: string
super_template_id?: number
}
Relationships: [
{
foreignKeyName: "test_send_logs_org_template_id_fkey"
columns: ["org_template_id"]
isOneToOne: false
referencedRelation: "organization_templates"
referencedColumns: ["org_template_id"]
},
{
foreignKeyName: "test_send_logs_organization_id_fkey"
columns: ["organization_id"]
isOneToOne: false
referencedRelation: "organizations"
referencedColumns: ["organization_id"]
},
{
foreignKeyName: "test_send_logs_profile_id_fkey"
columns: ["profile_id"]
isOneToOne: false
referencedRelation: "profiles"
referencedColumns: ["profile_id"]
},
{
foreignKeyName: "test_send_logs_super_template_id_fkey"
columns: ["super_template_id"]
isOneToOne: false
referencedRelation: "super_templates"
referencedColumns: ["super_template_id"]
},
]
}
}
Views: {
[_ in never]: never
}
Functions: {
get_user_organization_id: { Args: never; Returns: string }
is_org_admin: { Args: { org_id: string }; Returns: boolean }
is_org_member: { Args: { org_id: string }; Returns: boolean }
is_super_admin: { Args: never; Returns: boolean }
}
Enums: {
alimtalk_status: "PENDING" | "SENDING" | "SENT" | "FAILED"
consult_result: "SUCCESS" | "FAILED"
consult_status: "WAITING" | "COMPLETED"
email_status: "PENDING" | "SENT" | "FAILED" | "SKIPPED"
notification_type: "ALIMTALK" | "CONSULT_REQUEST"
program_level: "BEGINNER" | "INTERMEDIATE" | "ADVANCED"
program_status: "DRAFT" | "ACTIVE" | "ARCHIVED"
send_mode: "TEST" | "LIVE"
send_timing: "IMMEDIATE" | "SCHEDULED"
template_channel: "ALIMTALK"
template_status: "ACTIVE" | "INACTIVE"
user_role: "STUDENT" | "ADMIN"
user_state: "NORMAL" | "GRADUATE" | "DELETED"
user_type: "EXAMINEE" | "DROPPER" | "ADULT"
}
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: {
alimtalk_status: ["PENDING", "SENDING", "SENT", "FAILED"],
consult_result: ["SUCCESS", "FAILED"],
consult_status: ["WAITING", "COMPLETED"],
email_status: ["PENDING", "SENT", "FAILED", "SKIPPED"],
notification_type: ["ALIMTALK", "CONSULT_REQUEST"],
program_level: ["BEGINNER", "INTERMEDIATE", "ADVANCED"],
program_status: ["DRAFT", "ACTIVE", "ARCHIVED"],
send_mode: ["TEST", "LIVE"],
send_timing: ["IMMEDIATE", "SCHEDULED"],
template_channel: ["ALIMTALK"],
template_status: ["ACTIVE", "INACTIVE"],
user_role: ["STUDENT", "ADMIN"],
user_state: ["NORMAL", "GRADUATE", "DELETED"],
user_type: ["EXAMINEE", "DROPPER", "ADULT"],
},
},
} as const