@teardown/types 0.1.22 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1204 @@
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: "13.0.5"
14
+ }
15
+ public: {
16
+ Tables: {
17
+ device_sessions: {
18
+ Row: {
19
+ created_at: string
20
+ device_id: string
21
+ emergency_launch_reason: string | null
22
+ environment_id: string | null
23
+ id: string
24
+ is_embedded_launch: boolean | null
25
+ is_emergency_launch: boolean | null
26
+ metadata: Json | null
27
+ os_version: string | null
28
+ ota_update_created_at: string | null
29
+ ota_update_id: string | null
30
+ ota_update_runtime_version: string | null
31
+ ota_updates_enabled: boolean | null
32
+ started_at: string
33
+ token: string | null
34
+ updated_at: string
35
+ version: string | null
36
+ version_build_id: string | null
37
+ version_id: string | null
38
+ }
39
+ Insert: {
40
+ created_at?: string
41
+ device_id: string
42
+ emergency_launch_reason?: string | null
43
+ environment_id?: string | null
44
+ id?: string
45
+ is_embedded_launch?: boolean | null
46
+ is_emergency_launch?: boolean | null
47
+ metadata?: Json | null
48
+ os_version?: string | null
49
+ ota_update_created_at?: string | null
50
+ ota_update_id?: string | null
51
+ ota_update_runtime_version?: string | null
52
+ ota_updates_enabled?: boolean | null
53
+ started_at?: string
54
+ token?: string | null
55
+ updated_at?: string
56
+ version?: string | null
57
+ version_build_id?: string | null
58
+ version_id?: string | null
59
+ }
60
+ Update: {
61
+ created_at?: string
62
+ device_id?: string
63
+ emergency_launch_reason?: string | null
64
+ environment_id?: string | null
65
+ id?: string
66
+ is_embedded_launch?: boolean | null
67
+ is_emergency_launch?: boolean | null
68
+ metadata?: Json | null
69
+ os_version?: string | null
70
+ ota_update_created_at?: string | null
71
+ ota_update_id?: string | null
72
+ ota_update_runtime_version?: string | null
73
+ ota_updates_enabled?: boolean | null
74
+ started_at?: string
75
+ token?: string | null
76
+ updated_at?: string
77
+ version?: string | null
78
+ version_build_id?: string | null
79
+ version_id?: string | null
80
+ }
81
+ Relationships: [
82
+ {
83
+ foreignKeyName: "device_sessions_device_id_fkey"
84
+ columns: ["device_id"]
85
+ isOneToOne: false
86
+ referencedRelation: "devices"
87
+ referencedColumns: ["id"]
88
+ },
89
+ {
90
+ foreignKeyName: "device_sessions_environment_id_fkey"
91
+ columns: ["environment_id"]
92
+ isOneToOne: false
93
+ referencedRelation: "environments"
94
+ referencedColumns: ["id"]
95
+ },
96
+ {
97
+ foreignKeyName: "device_sessions_ota_update_id_fkey"
98
+ columns: ["ota_update_id"]
99
+ isOneToOne: false
100
+ referencedRelation: "ota_updates"
101
+ referencedColumns: ["id"]
102
+ },
103
+ {
104
+ foreignKeyName: "device_sessions_version_build_id_fkey"
105
+ columns: ["version_build_id"]
106
+ isOneToOne: false
107
+ referencedRelation: "version_builds"
108
+ referencedColumns: ["id"]
109
+ },
110
+ {
111
+ foreignKeyName: "device_sessions_version_id_fkey"
112
+ columns: ["version_id"]
113
+ isOneToOne: false
114
+ referencedRelation: "project_versions"
115
+ referencedColumns: ["id"]
116
+ },
117
+ ]
118
+ }
119
+ devices: {
120
+ Row: {
121
+ created_at: string
122
+ device_brand: string | null
123
+ device_id: string
124
+ device_name: string | null
125
+ environment_id: string | null
126
+ id: string
127
+ metadata: Json | null
128
+ os_name: string | null
129
+ os_type: string | null
130
+ persona_id: string
131
+ platform: Database["public"]["Enums"]["device_platform"] | null
132
+ updated_at: string
133
+ }
134
+ Insert: {
135
+ created_at?: string
136
+ device_brand?: string | null
137
+ device_id: string
138
+ device_name?: string | null
139
+ environment_id?: string | null
140
+ id?: string
141
+ metadata?: Json | null
142
+ os_name?: string | null
143
+ os_type?: string | null
144
+ persona_id: string
145
+ platform?: Database["public"]["Enums"]["device_platform"] | null
146
+ updated_at?: string
147
+ }
148
+ Update: {
149
+ created_at?: string
150
+ device_brand?: string | null
151
+ device_id?: string
152
+ device_name?: string | null
153
+ environment_id?: string | null
154
+ id?: string
155
+ metadata?: Json | null
156
+ os_name?: string | null
157
+ os_type?: string | null
158
+ persona_id?: string
159
+ platform?: Database["public"]["Enums"]["device_platform"] | null
160
+ updated_at?: string
161
+ }
162
+ Relationships: [
163
+ {
164
+ foreignKeyName: "devices_environment_id_fkey"
165
+ columns: ["environment_id"]
166
+ isOneToOne: false
167
+ referencedRelation: "environments"
168
+ referencedColumns: ["id"]
169
+ },
170
+ {
171
+ foreignKeyName: "devices_persona_id_fkey"
172
+ columns: ["persona_id"]
173
+ isOneToOne: false
174
+ referencedRelation: "personas"
175
+ referencedColumns: ["id"]
176
+ },
177
+ {
178
+ foreignKeyName: "devices_persona_id_fkey"
179
+ columns: ["persona_id"]
180
+ isOneToOne: false
181
+ referencedRelation: "view_device_session_persona"
182
+ referencedColumns: ["persona_id"]
183
+ },
184
+ ]
185
+ }
186
+ environments: {
187
+ Row: {
188
+ created_at: string
189
+ id: string
190
+ name: string
191
+ project_id: string
192
+ slug: string
193
+ type: Database["public"]["Enums"]["environment_type"]
194
+ updated_at: string
195
+ }
196
+ Insert: {
197
+ created_at?: string
198
+ id?: string
199
+ name: string
200
+ project_id: string
201
+ slug: string
202
+ type: Database["public"]["Enums"]["environment_type"]
203
+ updated_at?: string
204
+ }
205
+ Update: {
206
+ created_at?: string
207
+ id?: string
208
+ name?: string
209
+ project_id?: string
210
+ slug?: string
211
+ type?: Database["public"]["Enums"]["environment_type"]
212
+ updated_at?: string
213
+ }
214
+ Relationships: [
215
+ {
216
+ foreignKeyName: "environments_project_id_fkey"
217
+ columns: ["project_id"]
218
+ isOneToOne: false
219
+ referencedRelation: "projects"
220
+ referencedColumns: ["id"]
221
+ },
222
+ ]
223
+ }
224
+ events: {
225
+ Row: {
226
+ created_at: string
227
+ device_id: string | null
228
+ environment_id: string
229
+ event_name: string
230
+ event_type: string
231
+ id: string
232
+ properties: Json | null
233
+ session_id: string | null
234
+ timestamp: string
235
+ }
236
+ Insert: {
237
+ created_at?: string
238
+ device_id?: string | null
239
+ environment_id: string
240
+ event_name: string
241
+ event_type?: string
242
+ id?: string
243
+ properties?: Json | null
244
+ session_id?: string | null
245
+ timestamp: string
246
+ }
247
+ Update: {
248
+ created_at?: string
249
+ device_id?: string | null
250
+ environment_id?: string
251
+ event_name?: string
252
+ event_type?: string
253
+ id?: string
254
+ properties?: Json | null
255
+ session_id?: string | null
256
+ timestamp?: string
257
+ }
258
+ Relationships: [
259
+ {
260
+ foreignKeyName: "events_device_id_fkey"
261
+ columns: ["device_id"]
262
+ isOneToOne: false
263
+ referencedRelation: "devices"
264
+ referencedColumns: ["id"]
265
+ },
266
+ {
267
+ foreignKeyName: "events_environment_id_fkey"
268
+ columns: ["environment_id"]
269
+ isOneToOne: false
270
+ referencedRelation: "environments"
271
+ referencedColumns: ["id"]
272
+ },
273
+ {
274
+ foreignKeyName: "events_session_id_fkey"
275
+ columns: ["session_id"]
276
+ isOneToOne: false
277
+ referencedRelation: "device_sessions"
278
+ referencedColumns: ["id"]
279
+ },
280
+ {
281
+ foreignKeyName: "events_session_id_fkey"
282
+ columns: ["session_id"]
283
+ isOneToOne: false
284
+ referencedRelation: "view_device_session_persona"
285
+ referencedColumns: ["session_id"]
286
+ },
287
+ ]
288
+ }
289
+ github_installations: {
290
+ Row: {
291
+ account_id: number
292
+ account_login: string
293
+ account_type: string
294
+ created_at: string
295
+ events: string[] | null
296
+ id: string
297
+ installation_id: number
298
+ installed_by_user_id: string | null
299
+ permissions: Json | null
300
+ suspended_at: string | null
301
+ suspended_by: Json | null
302
+ target_type: string
303
+ updated_at: string
304
+ }
305
+ Insert: {
306
+ account_id: number
307
+ account_login: string
308
+ account_type: string
309
+ created_at?: string
310
+ events?: string[] | null
311
+ id?: string
312
+ installation_id: number
313
+ installed_by_user_id?: string | null
314
+ permissions?: Json | null
315
+ suspended_at?: string | null
316
+ suspended_by?: Json | null
317
+ target_type: string
318
+ updated_at?: string
319
+ }
320
+ Update: {
321
+ account_id?: number
322
+ account_login?: string
323
+ account_type?: string
324
+ created_at?: string
325
+ events?: string[] | null
326
+ id?: string
327
+ installation_id?: number
328
+ installed_by_user_id?: string | null
329
+ permissions?: Json | null
330
+ suspended_at?: string | null
331
+ suspended_by?: Json | null
332
+ target_type?: string
333
+ updated_at?: string
334
+ }
335
+ Relationships: []
336
+ }
337
+ github_project_connections: {
338
+ Row: {
339
+ connected_by_user_id: string
340
+ created_at: string
341
+ id: string
342
+ installation_id: string
343
+ project_id: string
344
+ repository_id: string
345
+ updated_at: string
346
+ }
347
+ Insert: {
348
+ connected_by_user_id: string
349
+ created_at?: string
350
+ id?: string
351
+ installation_id: string
352
+ project_id: string
353
+ repository_id: string
354
+ updated_at?: string
355
+ }
356
+ Update: {
357
+ connected_by_user_id?: string
358
+ created_at?: string
359
+ id?: string
360
+ installation_id?: string
361
+ project_id?: string
362
+ repository_id?: string
363
+ updated_at?: string
364
+ }
365
+ Relationships: [
366
+ {
367
+ foreignKeyName: "github_project_connections_installation_id_fkey"
368
+ columns: ["installation_id"]
369
+ isOneToOne: false
370
+ referencedRelation: "github_installations"
371
+ referencedColumns: ["id"]
372
+ },
373
+ {
374
+ foreignKeyName: "github_project_connections_project_id_fkey"
375
+ columns: ["project_id"]
376
+ isOneToOne: true
377
+ referencedRelation: "projects"
378
+ referencedColumns: ["id"]
379
+ },
380
+ {
381
+ foreignKeyName: "github_project_connections_repository_id_fkey"
382
+ columns: ["repository_id"]
383
+ isOneToOne: false
384
+ referencedRelation: "github_repositories"
385
+ referencedColumns: ["id"]
386
+ },
387
+ ]
388
+ }
389
+ github_repositories: {
390
+ Row: {
391
+ archived: boolean
392
+ created_at: string
393
+ default_branch: string
394
+ disabled: boolean
395
+ fork: boolean
396
+ full_name: string
397
+ id: string
398
+ installation_id: string
399
+ name: string
400
+ owner: string
401
+ permissions: Json | null
402
+ private: boolean
403
+ repository_id: number
404
+ updated_at: string
405
+ }
406
+ Insert: {
407
+ archived?: boolean
408
+ created_at?: string
409
+ default_branch?: string
410
+ disabled?: boolean
411
+ fork?: boolean
412
+ full_name: string
413
+ id?: string
414
+ installation_id: string
415
+ name: string
416
+ owner: string
417
+ permissions?: Json | null
418
+ private?: boolean
419
+ repository_id: number
420
+ updated_at?: string
421
+ }
422
+ Update: {
423
+ archived?: boolean
424
+ created_at?: string
425
+ default_branch?: string
426
+ disabled?: boolean
427
+ fork?: boolean
428
+ full_name?: string
429
+ id?: string
430
+ installation_id?: string
431
+ name?: string
432
+ owner?: string
433
+ permissions?: Json | null
434
+ private?: boolean
435
+ repository_id?: number
436
+ updated_at?: string
437
+ }
438
+ Relationships: [
439
+ {
440
+ foreignKeyName: "github_repositories_installation_id_fkey"
441
+ columns: ["installation_id"]
442
+ isOneToOne: false
443
+ referencedRelation: "github_installations"
444
+ referencedColumns: ["id"]
445
+ },
446
+ ]
447
+ }
448
+ github_webhook_events: {
449
+ Row: {
450
+ action: string | null
451
+ created_at: string
452
+ delivery_id: string | null
453
+ error: string | null
454
+ event_type: string
455
+ id: string
456
+ installation_id: string | null
457
+ payload: Json
458
+ processed: boolean
459
+ processed_at: string | null
460
+ }
461
+ Insert: {
462
+ action?: string | null
463
+ created_at?: string
464
+ delivery_id?: string | null
465
+ error?: string | null
466
+ event_type: string
467
+ id?: string
468
+ installation_id?: string | null
469
+ payload: Json
470
+ processed?: boolean
471
+ processed_at?: string | null
472
+ }
473
+ Update: {
474
+ action?: string | null
475
+ created_at?: string
476
+ delivery_id?: string | null
477
+ error?: string | null
478
+ event_type?: string
479
+ id?: string
480
+ installation_id?: string | null
481
+ payload?: Json
482
+ processed?: boolean
483
+ processed_at?: string | null
484
+ }
485
+ Relationships: [
486
+ {
487
+ foreignKeyName: "github_webhook_events_installation_id_fkey"
488
+ columns: ["installation_id"]
489
+ isOneToOne: false
490
+ referencedRelation: "github_installations"
491
+ referencedColumns: ["id"]
492
+ },
493
+ ]
494
+ }
495
+ org_api_keys: {
496
+ Row: {
497
+ created_at: string
498
+ id: string
499
+ key: string
500
+ name: string
501
+ org_id: string
502
+ updated_at: string
503
+ }
504
+ Insert: {
505
+ created_at?: string
506
+ id?: string
507
+ key?: string
508
+ name?: string
509
+ org_id: string
510
+ updated_at?: string
511
+ }
512
+ Update: {
513
+ created_at?: string
514
+ id?: string
515
+ key?: string
516
+ name?: string
517
+ org_id?: string
518
+ updated_at?: string
519
+ }
520
+ Relationships: [
521
+ {
522
+ foreignKeyName: "org_api_keys_org_id_fkey"
523
+ columns: ["org_id"]
524
+ isOneToOne: false
525
+ referencedRelation: "orgs"
526
+ referencedColumns: ["id"]
527
+ },
528
+ ]
529
+ }
530
+ org_roles: {
531
+ Row: {
532
+ created_at: string
533
+ id: string
534
+ org_id: string
535
+ role: Database["public"]["Enums"]["org_role_type"]
536
+ updated_at: string
537
+ user_id: string
538
+ }
539
+ Insert: {
540
+ created_at?: string
541
+ id?: string
542
+ org_id: string
543
+ role?: Database["public"]["Enums"]["org_role_type"]
544
+ updated_at?: string
545
+ user_id: string
546
+ }
547
+ Update: {
548
+ created_at?: string
549
+ id?: string
550
+ org_id?: string
551
+ role?: Database["public"]["Enums"]["org_role_type"]
552
+ updated_at?: string
553
+ user_id?: string
554
+ }
555
+ Relationships: [
556
+ {
557
+ foreignKeyName: "org_roles_org_id_fkey"
558
+ columns: ["org_id"]
559
+ isOneToOne: false
560
+ referencedRelation: "orgs"
561
+ referencedColumns: ["id"]
562
+ },
563
+ ]
564
+ }
565
+ orgs: {
566
+ Row: {
567
+ created_at: string
568
+ id: string
569
+ name: string
570
+ slug: string
571
+ type: Database["public"]["Enums"]["org_type"]
572
+ updated_at: string
573
+ }
574
+ Insert: {
575
+ created_at?: string
576
+ id?: string
577
+ name: string
578
+ slug: string
579
+ type?: Database["public"]["Enums"]["org_type"]
580
+ updated_at?: string
581
+ }
582
+ Update: {
583
+ created_at?: string
584
+ id?: string
585
+ name?: string
586
+ slug?: string
587
+ type?: Database["public"]["Enums"]["org_type"]
588
+ updated_at?: string
589
+ }
590
+ Relationships: []
591
+ }
592
+ ota_updates: {
593
+ Row: {
594
+ channel: string | null
595
+ created_at: string
596
+ fingerprint: string | null
597
+ id: string
598
+ metadata: Json | null
599
+ update_id: string
600
+ updated_at: string
601
+ version_build_id: string | null
602
+ }
603
+ Insert: {
604
+ channel?: string | null
605
+ created_at?: string
606
+ fingerprint?: string | null
607
+ id?: string
608
+ metadata?: Json | null
609
+ update_id: string
610
+ updated_at?: string
611
+ version_build_id?: string | null
612
+ }
613
+ Update: {
614
+ channel?: string | null
615
+ created_at?: string
616
+ fingerprint?: string | null
617
+ id?: string
618
+ metadata?: Json | null
619
+ update_id?: string
620
+ updated_at?: string
621
+ version_build_id?: string | null
622
+ }
623
+ Relationships: [
624
+ {
625
+ foreignKeyName: "ota_updates_version_build_id_fkey"
626
+ columns: ["version_build_id"]
627
+ isOneToOne: false
628
+ referencedRelation: "version_builds"
629
+ referencedColumns: ["id"]
630
+ },
631
+ ]
632
+ }
633
+ personas: {
634
+ Row: {
635
+ created_at: string
636
+ email: string | null
637
+ environment_id: string
638
+ id: string
639
+ name: string | null
640
+ updated_at: string
641
+ user_id: string | null
642
+ }
643
+ Insert: {
644
+ created_at?: string
645
+ email?: string | null
646
+ environment_id: string
647
+ id?: string
648
+ name?: string | null
649
+ updated_at?: string
650
+ user_id?: string | null
651
+ }
652
+ Update: {
653
+ created_at?: string
654
+ email?: string | null
655
+ environment_id?: string
656
+ id?: string
657
+ name?: string | null
658
+ updated_at?: string
659
+ user_id?: string | null
660
+ }
661
+ Relationships: [
662
+ {
663
+ foreignKeyName: "personas_environment_id_fkey"
664
+ columns: ["environment_id"]
665
+ isOneToOne: false
666
+ referencedRelation: "environments"
667
+ referencedColumns: ["id"]
668
+ },
669
+ ]
670
+ }
671
+ project_api_keys: {
672
+ Row: {
673
+ created_at: string
674
+ id: string
675
+ key: string
676
+ kind: Database["public"]["Enums"]["project_api_key_kind"]
677
+ name: string
678
+ project_id: string
679
+ updated_at: string
680
+ }
681
+ Insert: {
682
+ created_at?: string
683
+ id?: string
684
+ key?: string
685
+ kind?: Database["public"]["Enums"]["project_api_key_kind"]
686
+ name?: string
687
+ project_id: string
688
+ updated_at?: string
689
+ }
690
+ Update: {
691
+ created_at?: string
692
+ id?: string
693
+ key?: string
694
+ kind?: Database["public"]["Enums"]["project_api_key_kind"]
695
+ name?: string
696
+ project_id?: string
697
+ updated_at?: string
698
+ }
699
+ Relationships: [
700
+ {
701
+ foreignKeyName: "project_api_keys_project_id_fkey"
702
+ columns: ["project_id"]
703
+ isOneToOne: false
704
+ referencedRelation: "projects"
705
+ referencedColumns: ["id"]
706
+ },
707
+ ]
708
+ }
709
+ project_versions: {
710
+ Row: {
711
+ created_at: string
712
+ id: string
713
+ major: number
714
+ minor: number
715
+ name: string
716
+ patch: number
717
+ project_id: string
718
+ release_at: string
719
+ status: Database["public"]["Enums"]["project_version_status"]
720
+ updated_at: string
721
+ }
722
+ Insert: {
723
+ created_at?: string
724
+ id?: string
725
+ major?: number
726
+ minor?: number
727
+ name: string
728
+ patch?: number
729
+ project_id: string
730
+ release_at?: string
731
+ status?: Database["public"]["Enums"]["project_version_status"]
732
+ updated_at?: string
733
+ }
734
+ Update: {
735
+ created_at?: string
736
+ id?: string
737
+ major?: number
738
+ minor?: number
739
+ name?: string
740
+ patch?: number
741
+ project_id?: string
742
+ release_at?: string
743
+ status?: Database["public"]["Enums"]["project_version_status"]
744
+ updated_at?: string
745
+ }
746
+ Relationships: [
747
+ {
748
+ foreignKeyName: "project_versions_project_id_fkey"
749
+ columns: ["project_id"]
750
+ isOneToOne: false
751
+ referencedRelation: "projects"
752
+ referencedColumns: ["id"]
753
+ },
754
+ ]
755
+ }
756
+ projects: {
757
+ Row: {
758
+ created_at: string
759
+ id: string
760
+ name: string
761
+ org_id: string
762
+ slug: string
763
+ status: Database["public"]["Enums"]["project_status"]
764
+ type: Database["public"]["Enums"]["project_type"]
765
+ updated_at: string
766
+ }
767
+ Insert: {
768
+ created_at?: string
769
+ id?: string
770
+ name: string
771
+ org_id: string
772
+ slug: string
773
+ status?: Database["public"]["Enums"]["project_status"]
774
+ type: Database["public"]["Enums"]["project_type"]
775
+ updated_at?: string
776
+ }
777
+ Update: {
778
+ created_at?: string
779
+ id?: string
780
+ name?: string
781
+ org_id?: string
782
+ slug?: string
783
+ status?: Database["public"]["Enums"]["project_status"]
784
+ type?: Database["public"]["Enums"]["project_type"]
785
+ updated_at?: string
786
+ }
787
+ Relationships: [
788
+ {
789
+ foreignKeyName: "projects_org_fk"
790
+ columns: ["org_id"]
791
+ isOneToOne: false
792
+ referencedRelation: "orgs"
793
+ referencedColumns: ["id"]
794
+ },
795
+ ]
796
+ }
797
+ user_api_keys: {
798
+ Row: {
799
+ created_at: string
800
+ id: string
801
+ key: string
802
+ name: string
803
+ updated_at: string
804
+ user_id: string
805
+ }
806
+ Insert: {
807
+ created_at?: string
808
+ id?: string
809
+ key?: string
810
+ name?: string
811
+ updated_at?: string
812
+ user_id: string
813
+ }
814
+ Update: {
815
+ created_at?: string
816
+ id?: string
817
+ key?: string
818
+ name?: string
819
+ updated_at?: string
820
+ user_id?: string
821
+ }
822
+ Relationships: []
823
+ }
824
+ version_builds: {
825
+ Row: {
826
+ build_number: number
827
+ commit_sha: string | null
828
+ created_at: string
829
+ fingerprint: string | null
830
+ id: string
831
+ name: string | null
832
+ platform: Database["public"]["Enums"]["device_platform"]
833
+ status: Database["public"]["Enums"]["version_build_status"]
834
+ summary: string | null
835
+ updated_at: string
836
+ version_id: string
837
+ }
838
+ Insert: {
839
+ build_number: number
840
+ commit_sha?: string | null
841
+ created_at?: string
842
+ fingerprint?: string | null
843
+ id?: string
844
+ name?: string | null
845
+ platform: Database["public"]["Enums"]["device_platform"]
846
+ status?: Database["public"]["Enums"]["version_build_status"]
847
+ summary?: string | null
848
+ updated_at?: string
849
+ version_id: string
850
+ }
851
+ Update: {
852
+ build_number?: number
853
+ commit_sha?: string | null
854
+ created_at?: string
855
+ fingerprint?: string | null
856
+ id?: string
857
+ name?: string | null
858
+ platform?: Database["public"]["Enums"]["device_platform"]
859
+ status?: Database["public"]["Enums"]["version_build_status"]
860
+ summary?: string | null
861
+ updated_at?: string
862
+ version_id?: string
863
+ }
864
+ Relationships: [
865
+ {
866
+ foreignKeyName: "version_builds_version_id_fkey"
867
+ columns: ["version_id"]
868
+ isOneToOne: false
869
+ referencedRelation: "project_versions"
870
+ referencedColumns: ["id"]
871
+ },
872
+ ]
873
+ }
874
+ }
875
+ Views: {
876
+ view_device_session_persona: {
877
+ Row: {
878
+ device_brand: string | null
879
+ device_id: string | null
880
+ device_name: string | null
881
+ device_platform: Database["public"]["Enums"]["device_platform"] | null
882
+ environment_id: string | null
883
+ os_version: string | null
884
+ persona_email: string | null
885
+ persona_id: string | null
886
+ persona_name: string | null
887
+ persona_user_id: string | null
888
+ session_id: string | null
889
+ started_at: string | null
890
+ version_build_id: string | null
891
+ version_id: string | null
892
+ }
893
+ Relationships: [
894
+ {
895
+ foreignKeyName: "device_sessions_device_id_fkey"
896
+ columns: ["device_id"]
897
+ isOneToOne: false
898
+ referencedRelation: "devices"
899
+ referencedColumns: ["id"]
900
+ },
901
+ {
902
+ foreignKeyName: "device_sessions_environment_id_fkey"
903
+ columns: ["environment_id"]
904
+ isOneToOne: false
905
+ referencedRelation: "environments"
906
+ referencedColumns: ["id"]
907
+ },
908
+ {
909
+ foreignKeyName: "device_sessions_version_build_id_fkey"
910
+ columns: ["version_build_id"]
911
+ isOneToOne: false
912
+ referencedRelation: "version_builds"
913
+ referencedColumns: ["id"]
914
+ },
915
+ {
916
+ foreignKeyName: "device_sessions_version_id_fkey"
917
+ columns: ["version_id"]
918
+ isOneToOne: false
919
+ referencedRelation: "project_versions"
920
+ referencedColumns: ["id"]
921
+ },
922
+ ]
923
+ }
924
+ }
925
+ Functions: {
926
+ fn_create_org_api_key: {
927
+ Args: { p_name?: string; p_org_id: string }
928
+ Returns: {
929
+ created_at: string
930
+ id: string
931
+ key: string
932
+ name: string
933
+ org_id: string
934
+ updated_at: string
935
+ }
936
+ SetofOptions: {
937
+ from: "*"
938
+ to: "org_api_keys"
939
+ isOneToOne: true
940
+ isSetofReturn: false
941
+ }
942
+ }
943
+ fn_create_user_api_key: {
944
+ Args: { key_name?: string; user_id: string }
945
+ Returns: {
946
+ created_at: string
947
+ id: string
948
+ key: string
949
+ name: string
950
+ updated_at: string
951
+ user_id: string
952
+ }
953
+ SetofOptions: {
954
+ from: "*"
955
+ to: "user_api_keys"
956
+ isOneToOne: true
957
+ isSetofReturn: false
958
+ }
959
+ }
960
+ fn_ensure_default_environments: {
961
+ Args: { p_project_id: string }
962
+ Returns: undefined
963
+ }
964
+ search_active_sessions: {
965
+ Args: {
966
+ p_end_date: string
967
+ p_environment_ids: string[]
968
+ p_search?: string
969
+ p_start_date: string
970
+ }
971
+ Returns: {
972
+ build_number: number
973
+ build_platform: string
974
+ device_id: string
975
+ device_platform: string
976
+ session_id: string
977
+ version_build_id: string
978
+ version_id: string
979
+ version_name: string
980
+ }[]
981
+ }
982
+ search_build_sessions: {
983
+ Args: {
984
+ p_build_id: string
985
+ p_end_date: string
986
+ p_limit?: number
987
+ p_offset?: number
988
+ p_search?: string
989
+ p_start_date: string
990
+ }
991
+ Returns: {
992
+ device_brand: string
993
+ device_id: string
994
+ device_name: string
995
+ os_version: string
996
+ persona_email: string
997
+ persona_id: string
998
+ persona_name: string
999
+ persona_user_id: string
1000
+ session_id: string
1001
+ started_at: string
1002
+ }[]
1003
+ }
1004
+ }
1005
+ Enums: {
1006
+ device_platform:
1007
+ | "IOS"
1008
+ | "ANDROID"
1009
+ | "WEB"
1010
+ | "WINDOWS"
1011
+ | "MACOS"
1012
+ | "LINUX"
1013
+ | "PHONE"
1014
+ | "TABLET"
1015
+ | "DESKTOP"
1016
+ | "CONSOLE"
1017
+ | "TV"
1018
+ | "WEARABLE"
1019
+ | "GAME_CONSOLE"
1020
+ | "VR"
1021
+ | "UNKNOWN"
1022
+ | "OTHER"
1023
+ environment_type: "DEVELOPMENT" | "STAGING" | "PRODUCTION"
1024
+ org_role_type: "OWNER" | "ADMIN" | "ENGINEER"
1025
+ org_type: "PERSONAL" | "START_UP" | "SCALE_UP" | "AGENCY" | "ENTERPRISE"
1026
+ project_api_key_kind: "publishable" | "secret"
1027
+ project_status: "PENDING_SETUP" | "ACTIVE" | "PAUSED" | "ARCHIVED"
1028
+ project_type: "REACT_NATIVE" | "EXPO"
1029
+ project_version_status:
1030
+ | "SUPPORTED"
1031
+ | "UPDATE_AVAILABLE"
1032
+ | "UPDATE_RECOMMENDED"
1033
+ | "UPDATE_REQUIRED"
1034
+ version_build_status:
1035
+ | "SUPPORTED"
1036
+ | "UPDATE_AVAILABLE"
1037
+ | "UPDATE_RECOMMENDED"
1038
+ | "UPDATE_REQUIRED"
1039
+ }
1040
+ CompositeTypes: {
1041
+ [_ in never]: never
1042
+ }
1043
+ }
1044
+ }
1045
+
1046
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">
1047
+
1048
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">]
1049
+
1050
+ export type Tables<
1051
+ DefaultSchemaTableNameOrOptions extends
1052
+ | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
1053
+ | { schema: keyof DatabaseWithoutInternals },
1054
+ TableName extends DefaultSchemaTableNameOrOptions extends {
1055
+ schema: keyof DatabaseWithoutInternals
1056
+ }
1057
+ ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
1058
+ DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
1059
+ : never = never,
1060
+ > = DefaultSchemaTableNameOrOptions extends {
1061
+ schema: keyof DatabaseWithoutInternals
1062
+ }
1063
+ ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
1064
+ DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1065
+ Row: infer R
1066
+ }
1067
+ ? R
1068
+ : never
1069
+ : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] &
1070
+ DefaultSchema["Views"])
1071
+ ? (DefaultSchema["Tables"] &
1072
+ DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
1073
+ Row: infer R
1074
+ }
1075
+ ? R
1076
+ : never
1077
+ : never
1078
+
1079
+ export type TablesInsert<
1080
+ DefaultSchemaTableNameOrOptions extends
1081
+ | keyof DefaultSchema["Tables"]
1082
+ | { schema: keyof DatabaseWithoutInternals },
1083
+ TableName extends DefaultSchemaTableNameOrOptions extends {
1084
+ schema: keyof DatabaseWithoutInternals
1085
+ }
1086
+ ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
1087
+ : never = never,
1088
+ > = DefaultSchemaTableNameOrOptions extends {
1089
+ schema: keyof DatabaseWithoutInternals
1090
+ }
1091
+ ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1092
+ Insert: infer I
1093
+ }
1094
+ ? I
1095
+ : never
1096
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
1097
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
1098
+ Insert: infer I
1099
+ }
1100
+ ? I
1101
+ : never
1102
+ : never
1103
+
1104
+ export type TablesUpdate<
1105
+ DefaultSchemaTableNameOrOptions extends
1106
+ | keyof DefaultSchema["Tables"]
1107
+ | { schema: keyof DatabaseWithoutInternals },
1108
+ TableName extends DefaultSchemaTableNameOrOptions extends {
1109
+ schema: keyof DatabaseWithoutInternals
1110
+ }
1111
+ ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
1112
+ : never = never,
1113
+ > = DefaultSchemaTableNameOrOptions extends {
1114
+ schema: keyof DatabaseWithoutInternals
1115
+ }
1116
+ ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1117
+ Update: infer U
1118
+ }
1119
+ ? U
1120
+ : never
1121
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
1122
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
1123
+ Update: infer U
1124
+ }
1125
+ ? U
1126
+ : never
1127
+ : never
1128
+
1129
+ export type Enums<
1130
+ DefaultSchemaEnumNameOrOptions extends
1131
+ | keyof DefaultSchema["Enums"]
1132
+ | { schema: keyof DatabaseWithoutInternals },
1133
+ EnumName extends DefaultSchemaEnumNameOrOptions extends {
1134
+ schema: keyof DatabaseWithoutInternals
1135
+ }
1136
+ ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
1137
+ : never = never,
1138
+ > = DefaultSchemaEnumNameOrOptions extends {
1139
+ schema: keyof DatabaseWithoutInternals
1140
+ }
1141
+ ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
1142
+ : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
1143
+ ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
1144
+ : never
1145
+
1146
+ export type CompositeTypes<
1147
+ PublicCompositeTypeNameOrOptions extends
1148
+ | keyof DefaultSchema["CompositeTypes"]
1149
+ | { schema: keyof DatabaseWithoutInternals },
1150
+ CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
1151
+ schema: keyof DatabaseWithoutInternals
1152
+ }
1153
+ ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
1154
+ : never = never,
1155
+ > = PublicCompositeTypeNameOrOptions extends {
1156
+ schema: keyof DatabaseWithoutInternals
1157
+ }
1158
+ ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
1159
+ : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
1160
+ ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
1161
+ : never
1162
+
1163
+ export const Constants = {
1164
+ public: {
1165
+ Enums: {
1166
+ device_platform: [
1167
+ "IOS",
1168
+ "ANDROID",
1169
+ "WEB",
1170
+ "WINDOWS",
1171
+ "MACOS",
1172
+ "LINUX",
1173
+ "PHONE",
1174
+ "TABLET",
1175
+ "DESKTOP",
1176
+ "CONSOLE",
1177
+ "TV",
1178
+ "WEARABLE",
1179
+ "GAME_CONSOLE",
1180
+ "VR",
1181
+ "UNKNOWN",
1182
+ "OTHER",
1183
+ ],
1184
+ environment_type: ["DEVELOPMENT", "STAGING", "PRODUCTION"],
1185
+ org_role_type: ["OWNER", "ADMIN", "ENGINEER"],
1186
+ org_type: ["PERSONAL", "START_UP", "SCALE_UP", "AGENCY", "ENTERPRISE"],
1187
+ project_api_key_kind: ["publishable", "secret"],
1188
+ project_status: ["PENDING_SETUP", "ACTIVE", "PAUSED", "ARCHIVED"],
1189
+ project_type: ["REACT_NATIVE", "EXPO"],
1190
+ project_version_status: [
1191
+ "SUPPORTED",
1192
+ "UPDATE_AVAILABLE",
1193
+ "UPDATE_RECOMMENDED",
1194
+ "UPDATE_REQUIRED",
1195
+ ],
1196
+ version_build_status: [
1197
+ "SUPPORTED",
1198
+ "UPDATE_AVAILABLE",
1199
+ "UPDATE_RECOMMENDED",
1200
+ "UPDATE_REQUIRED",
1201
+ ],
1202
+ },
1203
+ },
1204
+ } as const