@capgo/cli 4.3.6 → 5.0.0-alpha.7
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.
- package/CHANGELOG.md +880 -604
- package/README.md +6 -6
- package/dist/index.js +93 -51
- package/package.json +1 -1
- package/src/api/crypto.ts +17 -12
- package/src/bundle/decrypt.ts +23 -12
- package/src/bundle/encrypt.ts +23 -14
- package/src/bundle/upload.ts +15 -10
- package/src/index.ts +4 -4
- package/src/key.ts +38 -11
- package/src/types/supabase.types.ts +544 -276
- package/src/utils.ts +22 -1
|
@@ -7,31 +7,6 @@ export type Json =
|
|
|
7
7
|
| Json[]
|
|
8
8
|
|
|
9
9
|
export interface Database {
|
|
10
|
-
graphql_public: {
|
|
11
|
-
Tables: {
|
|
12
|
-
[_ in never]: never
|
|
13
|
-
}
|
|
14
|
-
Views: {
|
|
15
|
-
[_ in never]: never
|
|
16
|
-
}
|
|
17
|
-
Functions: {
|
|
18
|
-
graphql: {
|
|
19
|
-
Args: {
|
|
20
|
-
operationName?: string
|
|
21
|
-
query?: string
|
|
22
|
-
variables?: Json
|
|
23
|
-
extensions?: Json
|
|
24
|
-
}
|
|
25
|
-
Returns: Json
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
Enums: {
|
|
29
|
-
[_ in never]: never
|
|
30
|
-
}
|
|
31
|
-
CompositeTypes: {
|
|
32
|
-
[_ in never]: never
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
10
|
public: {
|
|
36
11
|
Tables: {
|
|
37
12
|
apikeys: {
|
|
@@ -69,12 +44,78 @@ export interface Database {
|
|
|
69
44
|
},
|
|
70
45
|
]
|
|
71
46
|
}
|
|
47
|
+
app_stats: {
|
|
48
|
+
Row: {
|
|
49
|
+
app_id: string
|
|
50
|
+
bandwidth: number
|
|
51
|
+
channels: number
|
|
52
|
+
created_at: string | null
|
|
53
|
+
date_id: string
|
|
54
|
+
devices: number
|
|
55
|
+
devices_real: number
|
|
56
|
+
mlu: number
|
|
57
|
+
mlu_real: number
|
|
58
|
+
shared: number
|
|
59
|
+
updated_at: string | null
|
|
60
|
+
user_id: string
|
|
61
|
+
version_size: number
|
|
62
|
+
versions: number
|
|
63
|
+
}
|
|
64
|
+
Insert: {
|
|
65
|
+
app_id: string
|
|
66
|
+
bandwidth?: number
|
|
67
|
+
channels?: number
|
|
68
|
+
created_at?: string | null
|
|
69
|
+
date_id?: string
|
|
70
|
+
devices?: number
|
|
71
|
+
devices_real?: number
|
|
72
|
+
mlu?: number
|
|
73
|
+
mlu_real?: number
|
|
74
|
+
shared?: number
|
|
75
|
+
updated_at?: string | null
|
|
76
|
+
user_id: string
|
|
77
|
+
version_size?: number
|
|
78
|
+
versions?: number
|
|
79
|
+
}
|
|
80
|
+
Update: {
|
|
81
|
+
app_id?: string
|
|
82
|
+
bandwidth?: number
|
|
83
|
+
channels?: number
|
|
84
|
+
created_at?: string | null
|
|
85
|
+
date_id?: string
|
|
86
|
+
devices?: number
|
|
87
|
+
devices_real?: number
|
|
88
|
+
mlu?: number
|
|
89
|
+
mlu_real?: number
|
|
90
|
+
shared?: number
|
|
91
|
+
updated_at?: string | null
|
|
92
|
+
user_id?: string
|
|
93
|
+
version_size?: number
|
|
94
|
+
versions?: number
|
|
95
|
+
}
|
|
96
|
+
Relationships: [
|
|
97
|
+
{
|
|
98
|
+
foreignKeyName: 'app_stats_app_id_fkey'
|
|
99
|
+
columns: ['app_id']
|
|
100
|
+
isOneToOne: false
|
|
101
|
+
referencedRelation: 'apps'
|
|
102
|
+
referencedColumns: ['app_id']
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
foreignKeyName: 'app_stats_user_id_fkey'
|
|
106
|
+
columns: ['user_id']
|
|
107
|
+
isOneToOne: false
|
|
108
|
+
referencedRelation: 'users'
|
|
109
|
+
referencedColumns: ['id']
|
|
110
|
+
},
|
|
111
|
+
]
|
|
112
|
+
}
|
|
72
113
|
app_usage: {
|
|
73
114
|
Row: {
|
|
74
115
|
app_id: string
|
|
75
116
|
bandwidth: number
|
|
76
117
|
date: string | null
|
|
77
|
-
|
|
118
|
+
fails: number
|
|
78
119
|
get: number
|
|
79
120
|
id: string
|
|
80
121
|
install: number
|
|
@@ -87,7 +128,7 @@ export interface Database {
|
|
|
87
128
|
app_id: string
|
|
88
129
|
bandwidth?: number
|
|
89
130
|
date?: string | null
|
|
90
|
-
|
|
131
|
+
fails?: number
|
|
91
132
|
get?: number
|
|
92
133
|
id?: string
|
|
93
134
|
install?: number
|
|
@@ -100,7 +141,7 @@ export interface Database {
|
|
|
100
141
|
app_id?: string
|
|
101
142
|
bandwidth?: number
|
|
102
143
|
date?: string | null
|
|
103
|
-
|
|
144
|
+
fails?: number
|
|
104
145
|
get?: number
|
|
105
146
|
id?: string
|
|
106
147
|
install?: number
|
|
@@ -252,12 +293,11 @@ export interface Database {
|
|
|
252
293
|
app_id: string
|
|
253
294
|
created_at: string | null
|
|
254
295
|
icon_url: string
|
|
255
|
-
id:
|
|
296
|
+
id: string | null
|
|
256
297
|
last_version: string | null
|
|
257
298
|
name: string | null
|
|
258
299
|
owner_org: string
|
|
259
300
|
retention: number
|
|
260
|
-
tmp_id: string | null
|
|
261
301
|
updated_at: string | null
|
|
262
302
|
user_id: string | null
|
|
263
303
|
}
|
|
@@ -265,12 +305,11 @@ export interface Database {
|
|
|
265
305
|
app_id: string
|
|
266
306
|
created_at?: string | null
|
|
267
307
|
icon_url: string
|
|
268
|
-
id?:
|
|
308
|
+
id?: string | null
|
|
269
309
|
last_version?: string | null
|
|
270
310
|
name?: string | null
|
|
271
311
|
owner_org: string
|
|
272
312
|
retention?: number
|
|
273
|
-
tmp_id?: string | null
|
|
274
313
|
updated_at?: string | null
|
|
275
314
|
user_id?: string | null
|
|
276
315
|
}
|
|
@@ -278,12 +317,11 @@ export interface Database {
|
|
|
278
317
|
app_id?: string
|
|
279
318
|
created_at?: string | null
|
|
280
319
|
icon_url?: string
|
|
281
|
-
id?:
|
|
320
|
+
id?: string | null
|
|
282
321
|
last_version?: string | null
|
|
283
322
|
name?: string | null
|
|
284
323
|
owner_org?: string
|
|
285
324
|
retention?: number
|
|
286
|
-
tmp_id?: string | null
|
|
287
325
|
updated_at?: string | null
|
|
288
326
|
user_id?: string | null
|
|
289
327
|
}
|
|
@@ -304,6 +342,42 @@ export interface Database {
|
|
|
304
342
|
},
|
|
305
343
|
]
|
|
306
344
|
}
|
|
345
|
+
auth_uid: {
|
|
346
|
+
Row: {
|
|
347
|
+
uid: string | null
|
|
348
|
+
}
|
|
349
|
+
Insert: {
|
|
350
|
+
uid?: string | null
|
|
351
|
+
}
|
|
352
|
+
Update: {
|
|
353
|
+
uid?: string | null
|
|
354
|
+
}
|
|
355
|
+
Relationships: []
|
|
356
|
+
}
|
|
357
|
+
bandwidth_usage: {
|
|
358
|
+
Row: {
|
|
359
|
+
app_id: string
|
|
360
|
+
device_id: string
|
|
361
|
+
file_size: number
|
|
362
|
+
id: number
|
|
363
|
+
timestamp: string
|
|
364
|
+
}
|
|
365
|
+
Insert: {
|
|
366
|
+
app_id: string
|
|
367
|
+
device_id: string
|
|
368
|
+
file_size: number
|
|
369
|
+
id?: number
|
|
370
|
+
timestamp?: string
|
|
371
|
+
}
|
|
372
|
+
Update: {
|
|
373
|
+
app_id?: string
|
|
374
|
+
device_id?: string
|
|
375
|
+
file_size?: number
|
|
376
|
+
id?: number
|
|
377
|
+
timestamp?: string
|
|
378
|
+
}
|
|
379
|
+
Relationships: []
|
|
380
|
+
}
|
|
307
381
|
channel_devices: {
|
|
308
382
|
Row: {
|
|
309
383
|
app_id: string
|
|
@@ -457,6 +531,276 @@ export interface Database {
|
|
|
457
531
|
},
|
|
458
532
|
]
|
|
459
533
|
}
|
|
534
|
+
clickhouse_app_usage: {
|
|
535
|
+
Row: {
|
|
536
|
+
app_id: string | null
|
|
537
|
+
bandwidth: number | null
|
|
538
|
+
date: string | null
|
|
539
|
+
fail: number | null
|
|
540
|
+
get: number | null
|
|
541
|
+
install: number | null
|
|
542
|
+
mau: number | null
|
|
543
|
+
storage_added: number | null
|
|
544
|
+
storage_deleted: number | null
|
|
545
|
+
uninstall: number | null
|
|
546
|
+
}
|
|
547
|
+
Insert: {
|
|
548
|
+
app_id?: string | null
|
|
549
|
+
bandwidth?: number | null
|
|
550
|
+
date?: string | null
|
|
551
|
+
fail?: number | null
|
|
552
|
+
get?: number | null
|
|
553
|
+
install?: number | null
|
|
554
|
+
mau?: number | null
|
|
555
|
+
storage_added?: number | null
|
|
556
|
+
storage_deleted?: number | null
|
|
557
|
+
uninstall?: number | null
|
|
558
|
+
}
|
|
559
|
+
Update: {
|
|
560
|
+
app_id?: string | null
|
|
561
|
+
bandwidth?: number | null
|
|
562
|
+
date?: string | null
|
|
563
|
+
fail?: number | null
|
|
564
|
+
get?: number | null
|
|
565
|
+
install?: number | null
|
|
566
|
+
mau?: number | null
|
|
567
|
+
storage_added?: number | null
|
|
568
|
+
storage_deleted?: number | null
|
|
569
|
+
uninstall?: number | null
|
|
570
|
+
}
|
|
571
|
+
Relationships: []
|
|
572
|
+
}
|
|
573
|
+
clickhouse_app_usage_parm: {
|
|
574
|
+
Row: {
|
|
575
|
+
_app_list: string | null
|
|
576
|
+
_end_date: string | null
|
|
577
|
+
_start_date: string | null
|
|
578
|
+
app_id: string | null
|
|
579
|
+
bandwidth: number | null
|
|
580
|
+
date: string | null
|
|
581
|
+
fail: number | null
|
|
582
|
+
get: number | null
|
|
583
|
+
install: number | null
|
|
584
|
+
mau: number | null
|
|
585
|
+
storage_added: number | null
|
|
586
|
+
storage_deleted: number | null
|
|
587
|
+
uninstall: number | null
|
|
588
|
+
}
|
|
589
|
+
Insert: {
|
|
590
|
+
_app_list?: string | null
|
|
591
|
+
_end_date?: string | null
|
|
592
|
+
_start_date?: string | null
|
|
593
|
+
app_id?: string | null
|
|
594
|
+
bandwidth?: number | null
|
|
595
|
+
date?: string | null
|
|
596
|
+
fail?: number | null
|
|
597
|
+
get?: number | null
|
|
598
|
+
install?: number | null
|
|
599
|
+
mau?: number | null
|
|
600
|
+
storage_added?: number | null
|
|
601
|
+
storage_deleted?: number | null
|
|
602
|
+
uninstall?: number | null
|
|
603
|
+
}
|
|
604
|
+
Update: {
|
|
605
|
+
_app_list?: string | null
|
|
606
|
+
_end_date?: string | null
|
|
607
|
+
_start_date?: string | null
|
|
608
|
+
app_id?: string | null
|
|
609
|
+
bandwidth?: number | null
|
|
610
|
+
date?: string | null
|
|
611
|
+
fail?: number | null
|
|
612
|
+
get?: number | null
|
|
613
|
+
install?: number | null
|
|
614
|
+
mau?: number | null
|
|
615
|
+
storage_added?: number | null
|
|
616
|
+
storage_deleted?: number | null
|
|
617
|
+
uninstall?: number | null
|
|
618
|
+
}
|
|
619
|
+
Relationships: []
|
|
620
|
+
}
|
|
621
|
+
clickhouse_devices: {
|
|
622
|
+
Row: {
|
|
623
|
+
app_id: string | null
|
|
624
|
+
created_at: string | null
|
|
625
|
+
custom_id: string | null
|
|
626
|
+
device_id: string | null
|
|
627
|
+
is_emulator: boolean | null
|
|
628
|
+
is_prod: boolean | null
|
|
629
|
+
os_version: string | null
|
|
630
|
+
platform: string | null
|
|
631
|
+
plugin_version: string | null
|
|
632
|
+
updated_at: string | null
|
|
633
|
+
version: number | null
|
|
634
|
+
version_build: string | null
|
|
635
|
+
}
|
|
636
|
+
Insert: {
|
|
637
|
+
app_id?: string | null
|
|
638
|
+
created_at?: string | null
|
|
639
|
+
custom_id?: string | null
|
|
640
|
+
device_id?: string | null
|
|
641
|
+
is_emulator?: boolean | null
|
|
642
|
+
is_prod?: boolean | null
|
|
643
|
+
os_version?: string | null
|
|
644
|
+
platform?: string | null
|
|
645
|
+
plugin_version?: string | null
|
|
646
|
+
updated_at?: string | null
|
|
647
|
+
version?: number | null
|
|
648
|
+
version_build?: string | null
|
|
649
|
+
}
|
|
650
|
+
Update: {
|
|
651
|
+
app_id?: string | null
|
|
652
|
+
created_at?: string | null
|
|
653
|
+
custom_id?: string | null
|
|
654
|
+
device_id?: string | null
|
|
655
|
+
is_emulator?: boolean | null
|
|
656
|
+
is_prod?: boolean | null
|
|
657
|
+
os_version?: string | null
|
|
658
|
+
platform?: string | null
|
|
659
|
+
plugin_version?: string | null
|
|
660
|
+
updated_at?: string | null
|
|
661
|
+
version?: number | null
|
|
662
|
+
version_build?: string | null
|
|
663
|
+
}
|
|
664
|
+
Relationships: []
|
|
665
|
+
}
|
|
666
|
+
clickhouse_logs: {
|
|
667
|
+
Row: {
|
|
668
|
+
action: string | null
|
|
669
|
+
app_id: string | null
|
|
670
|
+
created_at: string | null
|
|
671
|
+
device_id: string | null
|
|
672
|
+
platform: string | null
|
|
673
|
+
version: number | null
|
|
674
|
+
version_build: string | null
|
|
675
|
+
}
|
|
676
|
+
Insert: {
|
|
677
|
+
action?: string | null
|
|
678
|
+
app_id?: string | null
|
|
679
|
+
created_at?: string | null
|
|
680
|
+
device_id?: string | null
|
|
681
|
+
platform?: string | null
|
|
682
|
+
version?: number | null
|
|
683
|
+
version_build?: string | null
|
|
684
|
+
}
|
|
685
|
+
Update: {
|
|
686
|
+
action?: string | null
|
|
687
|
+
app_id?: string | null
|
|
688
|
+
created_at?: string | null
|
|
689
|
+
device_id?: string | null
|
|
690
|
+
platform?: string | null
|
|
691
|
+
version?: number | null
|
|
692
|
+
version_build?: string | null
|
|
693
|
+
}
|
|
694
|
+
Relationships: []
|
|
695
|
+
}
|
|
696
|
+
cycle_info: {
|
|
697
|
+
Row: {
|
|
698
|
+
subscription_anchor_end: string | null
|
|
699
|
+
subscription_anchor_start: string | null
|
|
700
|
+
}
|
|
701
|
+
Insert: {
|
|
702
|
+
subscription_anchor_end?: string | null
|
|
703
|
+
subscription_anchor_start?: string | null
|
|
704
|
+
}
|
|
705
|
+
Update: {
|
|
706
|
+
subscription_anchor_end?: string | null
|
|
707
|
+
subscription_anchor_start?: string | null
|
|
708
|
+
}
|
|
709
|
+
Relationships: []
|
|
710
|
+
}
|
|
711
|
+
daily_bandwidth: {
|
|
712
|
+
Row: {
|
|
713
|
+
app_id: string
|
|
714
|
+
bandwidth: number
|
|
715
|
+
date: string
|
|
716
|
+
id: number
|
|
717
|
+
}
|
|
718
|
+
Insert: {
|
|
719
|
+
app_id: string
|
|
720
|
+
bandwidth: number
|
|
721
|
+
date: string
|
|
722
|
+
id?: number
|
|
723
|
+
}
|
|
724
|
+
Update: {
|
|
725
|
+
app_id?: string
|
|
726
|
+
bandwidth?: number
|
|
727
|
+
date?: string
|
|
728
|
+
id?: number
|
|
729
|
+
}
|
|
730
|
+
Relationships: []
|
|
731
|
+
}
|
|
732
|
+
daily_mau: {
|
|
733
|
+
Row: {
|
|
734
|
+
app_id: string
|
|
735
|
+
date: string
|
|
736
|
+
id: number
|
|
737
|
+
mau: number
|
|
738
|
+
}
|
|
739
|
+
Insert: {
|
|
740
|
+
app_id: string
|
|
741
|
+
date: string
|
|
742
|
+
id?: number
|
|
743
|
+
mau: number
|
|
744
|
+
}
|
|
745
|
+
Update: {
|
|
746
|
+
app_id?: string
|
|
747
|
+
date?: string
|
|
748
|
+
id?: number
|
|
749
|
+
mau?: number
|
|
750
|
+
}
|
|
751
|
+
Relationships: []
|
|
752
|
+
}
|
|
753
|
+
daily_storage: {
|
|
754
|
+
Row: {
|
|
755
|
+
app_id: string
|
|
756
|
+
date: string
|
|
757
|
+
id: number
|
|
758
|
+
storage: number
|
|
759
|
+
}
|
|
760
|
+
Insert: {
|
|
761
|
+
app_id: string
|
|
762
|
+
date: string
|
|
763
|
+
id?: number
|
|
764
|
+
storage: number
|
|
765
|
+
}
|
|
766
|
+
Update: {
|
|
767
|
+
app_id?: string
|
|
768
|
+
date?: string
|
|
769
|
+
id?: number
|
|
770
|
+
storage?: number
|
|
771
|
+
}
|
|
772
|
+
Relationships: []
|
|
773
|
+
}
|
|
774
|
+
daily_version: {
|
|
775
|
+
Row: {
|
|
776
|
+
app_id: string
|
|
777
|
+
date: string
|
|
778
|
+
fail: number | null
|
|
779
|
+
get: number | null
|
|
780
|
+
install: number | null
|
|
781
|
+
uninstall: number | null
|
|
782
|
+
version: number
|
|
783
|
+
}
|
|
784
|
+
Insert: {
|
|
785
|
+
app_id: string
|
|
786
|
+
date: string
|
|
787
|
+
fail?: number | null
|
|
788
|
+
get?: number | null
|
|
789
|
+
install?: number | null
|
|
790
|
+
uninstall?: number | null
|
|
791
|
+
version: number
|
|
792
|
+
}
|
|
793
|
+
Update: {
|
|
794
|
+
app_id?: string
|
|
795
|
+
date?: string
|
|
796
|
+
fail?: number | null
|
|
797
|
+
get?: number | null
|
|
798
|
+
install?: number | null
|
|
799
|
+
uninstall?: number | null
|
|
800
|
+
version?: number
|
|
801
|
+
}
|
|
802
|
+
Relationships: []
|
|
803
|
+
}
|
|
460
804
|
deleted_account: {
|
|
461
805
|
Row: {
|
|
462
806
|
created_at: string | null
|
|
@@ -465,7 +809,7 @@ export interface Database {
|
|
|
465
809
|
}
|
|
466
810
|
Insert: {
|
|
467
811
|
created_at?: string | null
|
|
468
|
-
email
|
|
812
|
+
email?: string
|
|
469
813
|
id?: string
|
|
470
814
|
}
|
|
471
815
|
Update: {
|
|
@@ -475,6 +819,27 @@ export interface Database {
|
|
|
475
819
|
}
|
|
476
820
|
Relationships: []
|
|
477
821
|
}
|
|
822
|
+
device_usage: {
|
|
823
|
+
Row: {
|
|
824
|
+
app_id: string
|
|
825
|
+
device_id: string
|
|
826
|
+
id: number
|
|
827
|
+
timestamp: string
|
|
828
|
+
}
|
|
829
|
+
Insert: {
|
|
830
|
+
app_id: string
|
|
831
|
+
device_id: string
|
|
832
|
+
id?: number
|
|
833
|
+
timestamp?: string
|
|
834
|
+
}
|
|
835
|
+
Update: {
|
|
836
|
+
app_id?: string
|
|
837
|
+
device_id?: string
|
|
838
|
+
id?: number
|
|
839
|
+
timestamp?: string
|
|
840
|
+
}
|
|
841
|
+
Relationships: []
|
|
842
|
+
}
|
|
478
843
|
devices: {
|
|
479
844
|
Row: {
|
|
480
845
|
app_id: string
|
|
@@ -667,32 +1032,32 @@ export interface Database {
|
|
|
667
1032
|
created_at: string | null
|
|
668
1033
|
id: string
|
|
669
1034
|
last_send_at: string
|
|
1035
|
+
owner_org: string
|
|
670
1036
|
total_send: number
|
|
671
1037
|
updated_at: string | null
|
|
672
|
-
user_id: string
|
|
673
1038
|
}
|
|
674
1039
|
Insert: {
|
|
675
1040
|
created_at?: string | null
|
|
676
1041
|
id: string
|
|
677
1042
|
last_send_at?: string
|
|
1043
|
+
owner_org: string
|
|
678
1044
|
total_send?: number
|
|
679
1045
|
updated_at?: string | null
|
|
680
|
-
user_id: string
|
|
681
1046
|
}
|
|
682
1047
|
Update: {
|
|
683
1048
|
created_at?: string | null
|
|
684
1049
|
id?: string
|
|
685
1050
|
last_send_at?: string
|
|
1051
|
+
owner_org?: string
|
|
686
1052
|
total_send?: number
|
|
687
1053
|
updated_at?: string | null
|
|
688
|
-
user_id?: string
|
|
689
1054
|
}
|
|
690
1055
|
Relationships: [
|
|
691
1056
|
{
|
|
692
|
-
foreignKeyName: '
|
|
693
|
-
columns: ['
|
|
1057
|
+
foreignKeyName: 'owner_org_id_fkey'
|
|
1058
|
+
columns: ['owner_org']
|
|
694
1059
|
isOneToOne: false
|
|
695
|
-
referencedRelation: '
|
|
1060
|
+
referencedRelation: 'orgs'
|
|
696
1061
|
referencedColumns: ['id']
|
|
697
1062
|
},
|
|
698
1063
|
]
|
|
@@ -809,11 +1174,8 @@ export interface Database {
|
|
|
809
1174
|
}
|
|
810
1175
|
plans: {
|
|
811
1176
|
Row: {
|
|
812
|
-
abtest: boolean
|
|
813
|
-
app: number
|
|
814
1177
|
bandwidth: number
|
|
815
1178
|
bandwidth_unit: number | null
|
|
816
|
-
channel: number
|
|
817
1179
|
created_at: string
|
|
818
1180
|
description: string
|
|
819
1181
|
id: string
|
|
@@ -828,21 +1190,14 @@ export interface Database {
|
|
|
828
1190
|
price_m_storage_id: string | null
|
|
829
1191
|
price_y: number
|
|
830
1192
|
price_y_id: string
|
|
831
|
-
progressive_deploy: boolean
|
|
832
|
-
shared: number
|
|
833
1193
|
storage: number
|
|
834
1194
|
storage_unit: number | null
|
|
835
1195
|
stripe_id: string
|
|
836
|
-
update: number
|
|
837
1196
|
updated_at: string
|
|
838
|
-
version: number
|
|
839
1197
|
}
|
|
840
1198
|
Insert: {
|
|
841
|
-
abtest?: boolean
|
|
842
|
-
app?: number
|
|
843
1199
|
bandwidth: number
|
|
844
1200
|
bandwidth_unit?: number | null
|
|
845
|
-
channel?: number
|
|
846
1201
|
created_at?: string
|
|
847
1202
|
description?: string
|
|
848
1203
|
id?: string
|
|
@@ -857,21 +1212,14 @@ export interface Database {
|
|
|
857
1212
|
price_m_storage_id?: string | null
|
|
858
1213
|
price_y?: number
|
|
859
1214
|
price_y_id: string
|
|
860
|
-
progressive_deploy?: boolean
|
|
861
|
-
shared?: number
|
|
862
1215
|
storage: number
|
|
863
1216
|
storage_unit?: number | null
|
|
864
1217
|
stripe_id?: string
|
|
865
|
-
update?: number
|
|
866
1218
|
updated_at?: string
|
|
867
|
-
version?: number
|
|
868
1219
|
}
|
|
869
1220
|
Update: {
|
|
870
|
-
abtest?: boolean
|
|
871
|
-
app?: number
|
|
872
1221
|
bandwidth?: number
|
|
873
1222
|
bandwidth_unit?: number | null
|
|
874
|
-
channel?: number
|
|
875
1223
|
created_at?: string
|
|
876
1224
|
description?: string
|
|
877
1225
|
id?: string
|
|
@@ -886,14 +1234,10 @@ export interface Database {
|
|
|
886
1234
|
price_m_storage_id?: string | null
|
|
887
1235
|
price_y?: number
|
|
888
1236
|
price_y_id?: string
|
|
889
|
-
progressive_deploy?: boolean
|
|
890
|
-
shared?: number
|
|
891
1237
|
storage?: number
|
|
892
1238
|
storage_unit?: number | null
|
|
893
1239
|
stripe_id?: string
|
|
894
|
-
update?: number
|
|
895
1240
|
updated_at?: string
|
|
896
|
-
version?: number
|
|
897
1241
|
}
|
|
898
1242
|
Relationships: []
|
|
899
1243
|
}
|
|
@@ -927,6 +1271,30 @@ export interface Database {
|
|
|
927
1271
|
}
|
|
928
1272
|
Relationships: []
|
|
929
1273
|
}
|
|
1274
|
+
storage_usage: {
|
|
1275
|
+
Row: {
|
|
1276
|
+
app_id: string
|
|
1277
|
+
device_id: string
|
|
1278
|
+
file_size: number
|
|
1279
|
+
id: number
|
|
1280
|
+
timestamp: string
|
|
1281
|
+
}
|
|
1282
|
+
Insert: {
|
|
1283
|
+
app_id: string
|
|
1284
|
+
device_id: string
|
|
1285
|
+
file_size: number
|
|
1286
|
+
id?: number
|
|
1287
|
+
timestamp?: string
|
|
1288
|
+
}
|
|
1289
|
+
Update: {
|
|
1290
|
+
app_id?: string
|
|
1291
|
+
device_id?: string
|
|
1292
|
+
file_size?: number
|
|
1293
|
+
id?: number
|
|
1294
|
+
timestamp?: string
|
|
1295
|
+
}
|
|
1296
|
+
Relationships: []
|
|
1297
|
+
}
|
|
930
1298
|
stripe_info: {
|
|
931
1299
|
Row: {
|
|
932
1300
|
created_at: string
|
|
@@ -1046,6 +1414,27 @@ export interface Database {
|
|
|
1046
1414
|
},
|
|
1047
1415
|
]
|
|
1048
1416
|
}
|
|
1417
|
+
version_usage: {
|
|
1418
|
+
Row: {
|
|
1419
|
+
action: string
|
|
1420
|
+
app_id: string
|
|
1421
|
+
timestamp: string
|
|
1422
|
+
version: number
|
|
1423
|
+
}
|
|
1424
|
+
Insert: {
|
|
1425
|
+
action: string
|
|
1426
|
+
app_id: string
|
|
1427
|
+
timestamp: string
|
|
1428
|
+
version: number
|
|
1429
|
+
}
|
|
1430
|
+
Update: {
|
|
1431
|
+
action?: string
|
|
1432
|
+
app_id?: string
|
|
1433
|
+
timestamp?: string
|
|
1434
|
+
version?: number
|
|
1435
|
+
}
|
|
1436
|
+
Relationships: []
|
|
1437
|
+
}
|
|
1049
1438
|
workers: {
|
|
1050
1439
|
Row: {
|
|
1051
1440
|
id: number
|
|
@@ -1072,6 +1461,14 @@ export interface Database {
|
|
|
1072
1461
|
}
|
|
1073
1462
|
Returns: string
|
|
1074
1463
|
}
|
|
1464
|
+
calculate_cycle_usage: {
|
|
1465
|
+
Args: Record<PropertyKey, never>
|
|
1466
|
+
Returns: undefined
|
|
1467
|
+
}
|
|
1468
|
+
calculate_daily_app_usage: {
|
|
1469
|
+
Args: Record<PropertyKey, never>
|
|
1470
|
+
Returns: undefined
|
|
1471
|
+
}
|
|
1075
1472
|
check_min_rights:
|
|
1076
1473
|
| {
|
|
1077
1474
|
Args: {
|
|
@@ -1137,6 +1534,10 @@ export interface Database {
|
|
|
1137
1534
|
Args: Record<PropertyKey, never>
|
|
1138
1535
|
Returns: number
|
|
1139
1536
|
}
|
|
1537
|
+
count_all_paying: {
|
|
1538
|
+
Args: Record<PropertyKey, never>
|
|
1539
|
+
Returns: number
|
|
1540
|
+
}
|
|
1140
1541
|
count_all_plans: {
|
|
1141
1542
|
Args: Record<PropertyKey, never>
|
|
1142
1543
|
Returns: {
|
|
@@ -1155,6 +1556,13 @@ export interface Database {
|
|
|
1155
1556
|
Args: Record<PropertyKey, never>
|
|
1156
1557
|
Returns: number
|
|
1157
1558
|
}
|
|
1559
|
+
create_partitions: {
|
|
1560
|
+
Args: {
|
|
1561
|
+
start_date: string
|
|
1562
|
+
num_years: number
|
|
1563
|
+
}
|
|
1564
|
+
Returns: undefined
|
|
1565
|
+
}
|
|
1158
1566
|
delete_user: {
|
|
1159
1567
|
Args: Record<PropertyKey, never>
|
|
1160
1568
|
Returns: undefined
|
|
@@ -1309,13 +1717,25 @@ export interface Database {
|
|
|
1309
1717
|
}
|
|
1310
1718
|
Returns: string
|
|
1311
1719
|
}
|
|
1720
|
+
get_infos: {
|
|
1721
|
+
Args: {
|
|
1722
|
+
appid: string
|
|
1723
|
+
deviceid: string
|
|
1724
|
+
versionname: string
|
|
1725
|
+
}
|
|
1726
|
+
Returns: {
|
|
1727
|
+
current_version_id: number
|
|
1728
|
+
versiondata: Json
|
|
1729
|
+
channel: Json
|
|
1730
|
+
}[]
|
|
1731
|
+
}
|
|
1312
1732
|
get_max_plan:
|
|
1313
1733
|
| {
|
|
1314
1734
|
Args: Record<PropertyKey, never>
|
|
1315
1735
|
Returns: {
|
|
1316
1736
|
mau: number
|
|
1317
|
-
storage: number
|
|
1318
1737
|
bandwidth: number
|
|
1738
|
+
storage: number
|
|
1319
1739
|
}[]
|
|
1320
1740
|
}
|
|
1321
1741
|
| {
|
|
@@ -1358,18 +1778,6 @@ export interface Database {
|
|
|
1358
1778
|
}
|
|
1359
1779
|
Returns: string
|
|
1360
1780
|
}
|
|
1361
|
-
get_orgs_v2: {
|
|
1362
|
-
Args: {
|
|
1363
|
-
userid: string
|
|
1364
|
-
}
|
|
1365
|
-
Returns: {
|
|
1366
|
-
gid: string
|
|
1367
|
-
created_by: string
|
|
1368
|
-
logo: string
|
|
1369
|
-
name: string
|
|
1370
|
-
role: string
|
|
1371
|
-
}[]
|
|
1372
|
-
}
|
|
1373
1781
|
get_orgs_v3: {
|
|
1374
1782
|
Args: {
|
|
1375
1783
|
userid: string
|
|
@@ -1462,17 +1870,12 @@ export interface Database {
|
|
|
1462
1870
|
management_email: string
|
|
1463
1871
|
}[]
|
|
1464
1872
|
}
|
|
1465
|
-
get_plan_usage_percent:
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
Returns: number
|
|
1469
|
-
}
|
|
1470
|
-
| {
|
|
1471
|
-
Args: {
|
|
1472
|
-
userid: string
|
|
1473
|
-
}
|
|
1474
|
-
Returns: number
|
|
1873
|
+
get_plan_usage_percent: {
|
|
1874
|
+
Args: {
|
|
1875
|
+
userid: string
|
|
1475
1876
|
}
|
|
1877
|
+
Returns: number
|
|
1878
|
+
}
|
|
1476
1879
|
get_plan_usage_percent_org: {
|
|
1477
1880
|
Args: {
|
|
1478
1881
|
orgid: string
|
|
@@ -1525,9 +1928,22 @@ export interface Database {
|
|
|
1525
1928
|
Args: Record<PropertyKey, never>
|
|
1526
1929
|
Returns: number
|
|
1527
1930
|
}
|
|
1931
|
+
| {
|
|
1932
|
+
Args: {
|
|
1933
|
+
appid: string
|
|
1934
|
+
}
|
|
1935
|
+
Returns: number
|
|
1936
|
+
}
|
|
1937
|
+
| {
|
|
1938
|
+
Args: {
|
|
1939
|
+
userid: string
|
|
1940
|
+
}
|
|
1941
|
+
Returns: number
|
|
1942
|
+
}
|
|
1528
1943
|
| {
|
|
1529
1944
|
Args: {
|
|
1530
1945
|
userid: string
|
|
1946
|
+
appid: string
|
|
1531
1947
|
}
|
|
1532
1948
|
Returns: number
|
|
1533
1949
|
}
|
|
@@ -1761,6 +2177,12 @@ export interface Database {
|
|
|
1761
2177
|
}
|
|
1762
2178
|
Returns: boolean
|
|
1763
2179
|
}
|
|
2180
|
+
is_good_plan_v5_org: {
|
|
2181
|
+
Args: {
|
|
2182
|
+
orgid: string
|
|
2183
|
+
}
|
|
2184
|
+
Returns: boolean
|
|
2185
|
+
}
|
|
1764
2186
|
is_member_of_org: {
|
|
1765
2187
|
Args: {
|
|
1766
2188
|
user_id: string
|
|
@@ -1785,6 +2207,12 @@ export interface Database {
|
|
|
1785
2207
|
}
|
|
1786
2208
|
Returns: boolean
|
|
1787
2209
|
}
|
|
2210
|
+
is_onboarded_org: {
|
|
2211
|
+
Args: {
|
|
2212
|
+
orgid: string
|
|
2213
|
+
}
|
|
2214
|
+
Returns: boolean
|
|
2215
|
+
}
|
|
1788
2216
|
is_onboarding_needed:
|
|
1789
2217
|
| {
|
|
1790
2218
|
Args: Record<PropertyKey, never>
|
|
@@ -1858,6 +2286,20 @@ export interface Database {
|
|
|
1858
2286
|
Args: Record<PropertyKey, never>
|
|
1859
2287
|
Returns: string
|
|
1860
2288
|
}
|
|
2289
|
+
post_replication_sql:
|
|
2290
|
+
| {
|
|
2291
|
+
Args: {
|
|
2292
|
+
sql_query: string
|
|
2293
|
+
}
|
|
2294
|
+
Returns: undefined
|
|
2295
|
+
}
|
|
2296
|
+
| {
|
|
2297
|
+
Args: {
|
|
2298
|
+
sql_query: string
|
|
2299
|
+
params: string[]
|
|
2300
|
+
}
|
|
2301
|
+
Returns: undefined
|
|
2302
|
+
}
|
|
1861
2303
|
process_current_jobs_if_unlocked: {
|
|
1862
2304
|
Args: Record<PropertyKey, never>
|
|
1863
2305
|
Returns: number[]
|
|
@@ -1866,13 +2308,6 @@ export interface Database {
|
|
|
1866
2308
|
Args: Record<PropertyKey, never>
|
|
1867
2309
|
Returns: undefined
|
|
1868
2310
|
}
|
|
1869
|
-
remove_enum_value: {
|
|
1870
|
-
Args: {
|
|
1871
|
-
enum_type: unknown
|
|
1872
|
-
enum_value: string
|
|
1873
|
-
}
|
|
1874
|
-
Returns: undefined
|
|
1875
|
-
}
|
|
1876
2311
|
reset_and_seed_data: {
|
|
1877
2312
|
Args: Record<PropertyKey, never>
|
|
1878
2313
|
Returns: undefined
|
|
@@ -1881,18 +2316,27 @@ export interface Database {
|
|
|
1881
2316
|
Args: Record<PropertyKey, never>
|
|
1882
2317
|
Returns: undefined
|
|
1883
2318
|
}
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
2319
|
+
update_app_usage:
|
|
2320
|
+
| {
|
|
2321
|
+
Args: Record<PropertyKey, never>
|
|
2322
|
+
Returns: undefined
|
|
2323
|
+
}
|
|
2324
|
+
| {
|
|
2325
|
+
Args: {
|
|
2326
|
+
minutes_interval: number
|
|
2327
|
+
}
|
|
2328
|
+
Returns: undefined
|
|
2329
|
+
}
|
|
1888
2330
|
verify_mfa: {
|
|
1889
2331
|
Args: Record<PropertyKey, never>
|
|
1890
2332
|
Returns: boolean
|
|
1891
2333
|
}
|
|
1892
2334
|
}
|
|
1893
2335
|
Enums: {
|
|
2336
|
+
app_mode: 'prod' | 'dev' | 'livereload'
|
|
1894
2337
|
disable_update: 'major' | 'minor' | 'version_number' | 'none'
|
|
1895
2338
|
key_mode: 'read' | 'write' | 'all' | 'upload'
|
|
2339
|
+
pay_as_you_go_type: 'base' | 'units'
|
|
1896
2340
|
platform_os: 'ios' | 'android'
|
|
1897
2341
|
queue_job_status: 'inserted' | 'requested' | 'failed'
|
|
1898
2342
|
stripe_status:
|
|
@@ -1902,7 +2346,7 @@ export interface Database {
|
|
|
1902
2346
|
| 'failed'
|
|
1903
2347
|
| 'deleted'
|
|
1904
2348
|
| 'canceled'
|
|
1905
|
-
usage_mode: '
|
|
2349
|
+
usage_mode: '5min' | 'day' | 'month' | 'cycle' | 'last_saved'
|
|
1906
2350
|
user_min_right:
|
|
1907
2351
|
| 'invite_read'
|
|
1908
2352
|
| 'invite_upload'
|
|
@@ -1917,6 +2361,9 @@ export interface Database {
|
|
|
1917
2361
|
user_role: 'read' | 'upload' | 'write' | 'admin'
|
|
1918
2362
|
}
|
|
1919
2363
|
CompositeTypes: {
|
|
2364
|
+
match_plan: {
|
|
2365
|
+
name: string | null
|
|
2366
|
+
}
|
|
1920
2367
|
orgs_table: {
|
|
1921
2368
|
id: string | null
|
|
1922
2369
|
created_by: string | null
|
|
@@ -1939,185 +2386,6 @@ export interface Database {
|
|
|
1939
2386
|
}
|
|
1940
2387
|
}
|
|
1941
2388
|
}
|
|
1942
|
-
storage: {
|
|
1943
|
-
Tables: {
|
|
1944
|
-
buckets: {
|
|
1945
|
-
Row: {
|
|
1946
|
-
allowed_mime_types: string[] | null
|
|
1947
|
-
avif_autodetection: boolean | null
|
|
1948
|
-
created_at: string | null
|
|
1949
|
-
file_size_limit: number | null
|
|
1950
|
-
id: string
|
|
1951
|
-
name: string
|
|
1952
|
-
owner: string | null
|
|
1953
|
-
owner_id: string | null
|
|
1954
|
-
public: boolean | null
|
|
1955
|
-
updated_at: string | null
|
|
1956
|
-
}
|
|
1957
|
-
Insert: {
|
|
1958
|
-
allowed_mime_types?: string[] | null
|
|
1959
|
-
avif_autodetection?: boolean | null
|
|
1960
|
-
created_at?: string | null
|
|
1961
|
-
file_size_limit?: number | null
|
|
1962
|
-
id: string
|
|
1963
|
-
name: string
|
|
1964
|
-
owner?: string | null
|
|
1965
|
-
owner_id?: string | null
|
|
1966
|
-
public?: boolean | null
|
|
1967
|
-
updated_at?: string | null
|
|
1968
|
-
}
|
|
1969
|
-
Update: {
|
|
1970
|
-
allowed_mime_types?: string[] | null
|
|
1971
|
-
avif_autodetection?: boolean | null
|
|
1972
|
-
created_at?: string | null
|
|
1973
|
-
file_size_limit?: number | null
|
|
1974
|
-
id?: string
|
|
1975
|
-
name?: string
|
|
1976
|
-
owner?: string | null
|
|
1977
|
-
owner_id?: string | null
|
|
1978
|
-
public?: boolean | null
|
|
1979
|
-
updated_at?: string | null
|
|
1980
|
-
}
|
|
1981
|
-
Relationships: []
|
|
1982
|
-
}
|
|
1983
|
-
migrations: {
|
|
1984
|
-
Row: {
|
|
1985
|
-
executed_at: string | null
|
|
1986
|
-
hash: string
|
|
1987
|
-
id: number
|
|
1988
|
-
name: string
|
|
1989
|
-
}
|
|
1990
|
-
Insert: {
|
|
1991
|
-
executed_at?: string | null
|
|
1992
|
-
hash: string
|
|
1993
|
-
id: number
|
|
1994
|
-
name: string
|
|
1995
|
-
}
|
|
1996
|
-
Update: {
|
|
1997
|
-
executed_at?: string | null
|
|
1998
|
-
hash?: string
|
|
1999
|
-
id?: number
|
|
2000
|
-
name?: string
|
|
2001
|
-
}
|
|
2002
|
-
Relationships: []
|
|
2003
|
-
}
|
|
2004
|
-
objects: {
|
|
2005
|
-
Row: {
|
|
2006
|
-
bucket_id: string | null
|
|
2007
|
-
created_at: string | null
|
|
2008
|
-
id: string
|
|
2009
|
-
last_accessed_at: string | null
|
|
2010
|
-
metadata: Json | null
|
|
2011
|
-
name: string | null
|
|
2012
|
-
owner: string | null
|
|
2013
|
-
owner_id: string | null
|
|
2014
|
-
path_tokens: string[] | null
|
|
2015
|
-
updated_at: string | null
|
|
2016
|
-
version: string | null
|
|
2017
|
-
}
|
|
2018
|
-
Insert: {
|
|
2019
|
-
bucket_id?: string | null
|
|
2020
|
-
created_at?: string | null
|
|
2021
|
-
id?: string
|
|
2022
|
-
last_accessed_at?: string | null
|
|
2023
|
-
metadata?: Json | null
|
|
2024
|
-
name?: string | null
|
|
2025
|
-
owner?: string | null
|
|
2026
|
-
owner_id?: string | null
|
|
2027
|
-
path_tokens?: string[] | null
|
|
2028
|
-
updated_at?: string | null
|
|
2029
|
-
version?: string | null
|
|
2030
|
-
}
|
|
2031
|
-
Update: {
|
|
2032
|
-
bucket_id?: string | null
|
|
2033
|
-
created_at?: string | null
|
|
2034
|
-
id?: string
|
|
2035
|
-
last_accessed_at?: string | null
|
|
2036
|
-
metadata?: Json | null
|
|
2037
|
-
name?: string | null
|
|
2038
|
-
owner?: string | null
|
|
2039
|
-
owner_id?: string | null
|
|
2040
|
-
path_tokens?: string[] | null
|
|
2041
|
-
updated_at?: string | null
|
|
2042
|
-
version?: string | null
|
|
2043
|
-
}
|
|
2044
|
-
Relationships: [
|
|
2045
|
-
{
|
|
2046
|
-
foreignKeyName: 'objects_bucketId_fkey'
|
|
2047
|
-
columns: ['bucket_id']
|
|
2048
|
-
isOneToOne: false
|
|
2049
|
-
referencedRelation: 'buckets'
|
|
2050
|
-
referencedColumns: ['id']
|
|
2051
|
-
},
|
|
2052
|
-
]
|
|
2053
|
-
}
|
|
2054
|
-
}
|
|
2055
|
-
Views: {
|
|
2056
|
-
[_ in never]: never
|
|
2057
|
-
}
|
|
2058
|
-
Functions: {
|
|
2059
|
-
can_insert_object: {
|
|
2060
|
-
Args: {
|
|
2061
|
-
bucketid: string
|
|
2062
|
-
name: string
|
|
2063
|
-
owner: string
|
|
2064
|
-
metadata: Json
|
|
2065
|
-
}
|
|
2066
|
-
Returns: undefined
|
|
2067
|
-
}
|
|
2068
|
-
extension: {
|
|
2069
|
-
Args: {
|
|
2070
|
-
name: string
|
|
2071
|
-
}
|
|
2072
|
-
Returns: string
|
|
2073
|
-
}
|
|
2074
|
-
filename: {
|
|
2075
|
-
Args: {
|
|
2076
|
-
name: string
|
|
2077
|
-
}
|
|
2078
|
-
Returns: string
|
|
2079
|
-
}
|
|
2080
|
-
foldername: {
|
|
2081
|
-
Args: {
|
|
2082
|
-
name: string
|
|
2083
|
-
}
|
|
2084
|
-
Returns: string[]
|
|
2085
|
-
}
|
|
2086
|
-
get_size_by_bucket: {
|
|
2087
|
-
Args: Record<PropertyKey, never>
|
|
2088
|
-
Returns: {
|
|
2089
|
-
size: number
|
|
2090
|
-
bucket_id: string
|
|
2091
|
-
}[]
|
|
2092
|
-
}
|
|
2093
|
-
search: {
|
|
2094
|
-
Args: {
|
|
2095
|
-
prefix: string
|
|
2096
|
-
bucketname: string
|
|
2097
|
-
limits?: number
|
|
2098
|
-
levels?: number
|
|
2099
|
-
offsets?: number
|
|
2100
|
-
search?: string
|
|
2101
|
-
sortcolumn?: string
|
|
2102
|
-
sortorder?: string
|
|
2103
|
-
}
|
|
2104
|
-
Returns: {
|
|
2105
|
-
name: string
|
|
2106
|
-
id: string
|
|
2107
|
-
updated_at: string
|
|
2108
|
-
created_at: string
|
|
2109
|
-
last_accessed_at: string
|
|
2110
|
-
metadata: Json
|
|
2111
|
-
}[]
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
Enums: {
|
|
2115
|
-
[_ in never]: never
|
|
2116
|
-
}
|
|
2117
|
-
CompositeTypes: {
|
|
2118
|
-
[_ in never]: never
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
2389
|
}
|
|
2122
2390
|
|
|
2123
2391
|
type PublicSchema = Database[Extract<keyof Database, 'public'>]
|