@teardown/types 0.1.22 → 0.1.24

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