@capgo/cli 4.3.0 → 4.3.3
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 +6 -0
- package/dist/index.js +32 -19
- package/package.json +1 -1
- package/src/app/add.ts +3 -3
- package/src/bundle/unlink.ts +7 -2
- package/src/bundle/upload.ts +8 -3
- package/src/channel/set.ts +3 -1
- package/src/types/supabase.types.ts +381 -361
- package/src/utils.ts +27 -10
|
@@ -7,6 +7,31 @@ 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
|
+
}
|
|
10
35
|
public: {
|
|
11
36
|
Tables: {
|
|
12
37
|
apikeys: {
|
|
@@ -44,78 +69,12 @@ export interface Database {
|
|
|
44
69
|
},
|
|
45
70
|
]
|
|
46
71
|
}
|
|
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
|
-
}
|
|
113
72
|
app_usage: {
|
|
114
73
|
Row: {
|
|
115
74
|
app_id: string
|
|
116
75
|
bandwidth: number
|
|
117
76
|
date: string | null
|
|
118
|
-
|
|
77
|
+
fail: number
|
|
119
78
|
get: number
|
|
120
79
|
id: string
|
|
121
80
|
install: number
|
|
@@ -128,7 +87,7 @@ export interface Database {
|
|
|
128
87
|
app_id: string
|
|
129
88
|
bandwidth?: number
|
|
130
89
|
date?: string | null
|
|
131
|
-
|
|
90
|
+
fail?: number
|
|
132
91
|
get?: number
|
|
133
92
|
id?: string
|
|
134
93
|
install?: number
|
|
@@ -141,7 +100,7 @@ export interface Database {
|
|
|
141
100
|
app_id?: string
|
|
142
101
|
bandwidth?: number
|
|
143
102
|
date?: string | null
|
|
144
|
-
|
|
103
|
+
fail?: number
|
|
145
104
|
get?: number
|
|
146
105
|
id?: string
|
|
147
106
|
install?: number
|
|
@@ -293,11 +252,12 @@ export interface Database {
|
|
|
293
252
|
app_id: string
|
|
294
253
|
created_at: string | null
|
|
295
254
|
icon_url: string
|
|
296
|
-
id:
|
|
255
|
+
id: number
|
|
297
256
|
last_version: string | null
|
|
298
257
|
name: string | null
|
|
299
258
|
owner_org: string
|
|
300
259
|
retention: number
|
|
260
|
+
tmp_id: string | null
|
|
301
261
|
updated_at: string | null
|
|
302
262
|
user_id: string | null
|
|
303
263
|
}
|
|
@@ -305,11 +265,12 @@ export interface Database {
|
|
|
305
265
|
app_id: string
|
|
306
266
|
created_at?: string | null
|
|
307
267
|
icon_url: string
|
|
308
|
-
id?:
|
|
268
|
+
id?: number
|
|
309
269
|
last_version?: string | null
|
|
310
270
|
name?: string | null
|
|
311
271
|
owner_org: string
|
|
312
272
|
retention?: number
|
|
273
|
+
tmp_id?: string | null
|
|
313
274
|
updated_at?: string | null
|
|
314
275
|
user_id?: string | null
|
|
315
276
|
}
|
|
@@ -317,11 +278,12 @@ export interface Database {
|
|
|
317
278
|
app_id?: string
|
|
318
279
|
created_at?: string | null
|
|
319
280
|
icon_url?: string
|
|
320
|
-
id?:
|
|
281
|
+
id?: number
|
|
321
282
|
last_version?: string | null
|
|
322
283
|
name?: string | null
|
|
323
284
|
owner_org?: string
|
|
324
285
|
retention?: number
|
|
286
|
+
tmp_id?: string | null
|
|
325
287
|
updated_at?: string | null
|
|
326
288
|
user_id?: string | null
|
|
327
289
|
}
|
|
@@ -342,18 +304,6 @@ export interface Database {
|
|
|
342
304
|
},
|
|
343
305
|
]
|
|
344
306
|
}
|
|
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
307
|
channel_devices: {
|
|
358
308
|
Row: {
|
|
359
309
|
app_id: string
|
|
@@ -507,183 +457,6 @@ export interface Database {
|
|
|
507
457
|
},
|
|
508
458
|
]
|
|
509
459
|
}
|
|
510
|
-
clickhouse_app_usage: {
|
|
511
|
-
Row: {
|
|
512
|
-
app_id: string | null
|
|
513
|
-
bandwidth: number | null
|
|
514
|
-
date: string | null
|
|
515
|
-
fail: number | null
|
|
516
|
-
get: number | null
|
|
517
|
-
install: number | null
|
|
518
|
-
mau: number | null
|
|
519
|
-
storage_added: number | null
|
|
520
|
-
storage_deleted: number | null
|
|
521
|
-
uninstall: number | null
|
|
522
|
-
}
|
|
523
|
-
Insert: {
|
|
524
|
-
app_id?: string | null
|
|
525
|
-
bandwidth?: number | null
|
|
526
|
-
date?: string | null
|
|
527
|
-
fail?: number | null
|
|
528
|
-
get?: number | null
|
|
529
|
-
install?: number | null
|
|
530
|
-
mau?: number | null
|
|
531
|
-
storage_added?: number | null
|
|
532
|
-
storage_deleted?: number | null
|
|
533
|
-
uninstall?: number | null
|
|
534
|
-
}
|
|
535
|
-
Update: {
|
|
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
|
-
Relationships: []
|
|
548
|
-
}
|
|
549
|
-
clickhouse_app_usage_parm: {
|
|
550
|
-
Row: {
|
|
551
|
-
_app_list: string | null
|
|
552
|
-
_end_date: string | null
|
|
553
|
-
_start_date: string | null
|
|
554
|
-
app_id: string | null
|
|
555
|
-
bandwidth: number | null
|
|
556
|
-
date: string | null
|
|
557
|
-
fail: number | null
|
|
558
|
-
get: number | null
|
|
559
|
-
install: number | null
|
|
560
|
-
mau: number | null
|
|
561
|
-
storage_added: number | null
|
|
562
|
-
storage_deleted: number | null
|
|
563
|
-
uninstall: number | null
|
|
564
|
-
}
|
|
565
|
-
Insert: {
|
|
566
|
-
_app_list?: string | null
|
|
567
|
-
_end_date?: string | null
|
|
568
|
-
_start_date?: string | null
|
|
569
|
-
app_id?: string | null
|
|
570
|
-
bandwidth?: number | null
|
|
571
|
-
date?: string | null
|
|
572
|
-
fail?: number | null
|
|
573
|
-
get?: number | null
|
|
574
|
-
install?: number | null
|
|
575
|
-
mau?: number | null
|
|
576
|
-
storage_added?: number | null
|
|
577
|
-
storage_deleted?: number | null
|
|
578
|
-
uninstall?: number | null
|
|
579
|
-
}
|
|
580
|
-
Update: {
|
|
581
|
-
_app_list?: string | null
|
|
582
|
-
_end_date?: string | null
|
|
583
|
-
_start_date?: string | null
|
|
584
|
-
app_id?: string | null
|
|
585
|
-
bandwidth?: number | null
|
|
586
|
-
date?: string | null
|
|
587
|
-
fail?: number | null
|
|
588
|
-
get?: number | null
|
|
589
|
-
install?: number | null
|
|
590
|
-
mau?: number | null
|
|
591
|
-
storage_added?: number | null
|
|
592
|
-
storage_deleted?: number | null
|
|
593
|
-
uninstall?: number | null
|
|
594
|
-
}
|
|
595
|
-
Relationships: []
|
|
596
|
-
}
|
|
597
|
-
clickhouse_devices: {
|
|
598
|
-
Row: {
|
|
599
|
-
app_id: string | null
|
|
600
|
-
created_at: string | null
|
|
601
|
-
custom_id: string | null
|
|
602
|
-
device_id: string | null
|
|
603
|
-
is_emulator: boolean | null
|
|
604
|
-
is_prod: boolean | null
|
|
605
|
-
os_version: string | null
|
|
606
|
-
platform: string | null
|
|
607
|
-
plugin_version: string | null
|
|
608
|
-
updated_at: string | null
|
|
609
|
-
version: number | null
|
|
610
|
-
version_build: string | null
|
|
611
|
-
}
|
|
612
|
-
Insert: {
|
|
613
|
-
app_id?: string | null
|
|
614
|
-
created_at?: string | null
|
|
615
|
-
custom_id?: string | null
|
|
616
|
-
device_id?: string | null
|
|
617
|
-
is_emulator?: boolean | null
|
|
618
|
-
is_prod?: boolean | null
|
|
619
|
-
os_version?: string | null
|
|
620
|
-
platform?: string | null
|
|
621
|
-
plugin_version?: string | null
|
|
622
|
-
updated_at?: string | null
|
|
623
|
-
version?: number | null
|
|
624
|
-
version_build?: string | null
|
|
625
|
-
}
|
|
626
|
-
Update: {
|
|
627
|
-
app_id?: string | null
|
|
628
|
-
created_at?: string | null
|
|
629
|
-
custom_id?: string | null
|
|
630
|
-
device_id?: string | null
|
|
631
|
-
is_emulator?: boolean | null
|
|
632
|
-
is_prod?: boolean | null
|
|
633
|
-
os_version?: string | null
|
|
634
|
-
platform?: string | null
|
|
635
|
-
plugin_version?: string | null
|
|
636
|
-
updated_at?: string | null
|
|
637
|
-
version?: number | null
|
|
638
|
-
version_build?: string | null
|
|
639
|
-
}
|
|
640
|
-
Relationships: []
|
|
641
|
-
}
|
|
642
|
-
clickhouse_logs: {
|
|
643
|
-
Row: {
|
|
644
|
-
action: string | null
|
|
645
|
-
app_id: string | null
|
|
646
|
-
created_at: string | null
|
|
647
|
-
device_id: string | null
|
|
648
|
-
platform: string | null
|
|
649
|
-
version: number | null
|
|
650
|
-
version_build: string | null
|
|
651
|
-
}
|
|
652
|
-
Insert: {
|
|
653
|
-
action?: string | null
|
|
654
|
-
app_id?: string | null
|
|
655
|
-
created_at?: string | null
|
|
656
|
-
device_id?: string | null
|
|
657
|
-
platform?: string | null
|
|
658
|
-
version?: number | null
|
|
659
|
-
version_build?: string | null
|
|
660
|
-
}
|
|
661
|
-
Update: {
|
|
662
|
-
action?: string | null
|
|
663
|
-
app_id?: string | null
|
|
664
|
-
created_at?: string | null
|
|
665
|
-
device_id?: string | null
|
|
666
|
-
platform?: string | null
|
|
667
|
-
version?: number | null
|
|
668
|
-
version_build?: string | null
|
|
669
|
-
}
|
|
670
|
-
Relationships: []
|
|
671
|
-
}
|
|
672
|
-
cycle_info: {
|
|
673
|
-
Row: {
|
|
674
|
-
subscription_anchor_end: string | null
|
|
675
|
-
subscription_anchor_start: string | null
|
|
676
|
-
}
|
|
677
|
-
Insert: {
|
|
678
|
-
subscription_anchor_end?: string | null
|
|
679
|
-
subscription_anchor_start?: string | null
|
|
680
|
-
}
|
|
681
|
-
Update: {
|
|
682
|
-
subscription_anchor_end?: string | null
|
|
683
|
-
subscription_anchor_start?: string | null
|
|
684
|
-
}
|
|
685
|
-
Relationships: []
|
|
686
|
-
}
|
|
687
460
|
deleted_account: {
|
|
688
461
|
Row: {
|
|
689
462
|
created_at: string | null
|
|
@@ -692,7 +465,7 @@ export interface Database {
|
|
|
692
465
|
}
|
|
693
466
|
Insert: {
|
|
694
467
|
created_at?: string | null
|
|
695
|
-
email
|
|
468
|
+
email: string
|
|
696
469
|
id?: string
|
|
697
470
|
}
|
|
698
471
|
Update: {
|
|
@@ -990,24 +763,30 @@ export interface Database {
|
|
|
990
763
|
Row: {
|
|
991
764
|
created_at: string | null
|
|
992
765
|
created_by: string
|
|
766
|
+
customer_id: string | null
|
|
993
767
|
id: string
|
|
994
768
|
logo: string | null
|
|
769
|
+
management_email: string
|
|
995
770
|
name: string
|
|
996
771
|
updated_at: string | null
|
|
997
772
|
}
|
|
998
773
|
Insert: {
|
|
999
774
|
created_at?: string | null
|
|
1000
775
|
created_by: string
|
|
776
|
+
customer_id?: string | null
|
|
1001
777
|
id?: string
|
|
1002
778
|
logo?: string | null
|
|
779
|
+
management_email: string
|
|
1003
780
|
name: string
|
|
1004
781
|
updated_at?: string | null
|
|
1005
782
|
}
|
|
1006
783
|
Update: {
|
|
1007
784
|
created_at?: string | null
|
|
1008
785
|
created_by?: string
|
|
786
|
+
customer_id?: string | null
|
|
1009
787
|
id?: string
|
|
1010
788
|
logo?: string | null
|
|
789
|
+
management_email?: string
|
|
1011
790
|
name?: string
|
|
1012
791
|
updated_at?: string | null
|
|
1013
792
|
}
|
|
@@ -1019,12 +798,22 @@ export interface Database {
|
|
|
1019
798
|
referencedRelation: 'users'
|
|
1020
799
|
referencedColumns: ['id']
|
|
1021
800
|
},
|
|
801
|
+
{
|
|
802
|
+
foreignKeyName: 'orgs_customer_id_fkey'
|
|
803
|
+
columns: ['customer_id']
|
|
804
|
+
isOneToOne: true
|
|
805
|
+
referencedRelation: 'stripe_info'
|
|
806
|
+
referencedColumns: ['customer_id']
|
|
807
|
+
},
|
|
1022
808
|
]
|
|
1023
809
|
}
|
|
1024
810
|
plans: {
|
|
1025
811
|
Row: {
|
|
812
|
+
abtest: boolean
|
|
813
|
+
app: number
|
|
1026
814
|
bandwidth: number
|
|
1027
815
|
bandwidth_unit: number | null
|
|
816
|
+
channel: number
|
|
1028
817
|
created_at: string
|
|
1029
818
|
description: string
|
|
1030
819
|
id: string
|
|
@@ -1039,14 +828,21 @@ export interface Database {
|
|
|
1039
828
|
price_m_storage_id: string | null
|
|
1040
829
|
price_y: number
|
|
1041
830
|
price_y_id: string
|
|
831
|
+
progressive_deploy: boolean
|
|
832
|
+
shared: number
|
|
1042
833
|
storage: number
|
|
1043
834
|
storage_unit: number | null
|
|
1044
835
|
stripe_id: string
|
|
836
|
+
update: number
|
|
1045
837
|
updated_at: string
|
|
838
|
+
version: number
|
|
1046
839
|
}
|
|
1047
840
|
Insert: {
|
|
841
|
+
abtest?: boolean
|
|
842
|
+
app?: number
|
|
1048
843
|
bandwidth: number
|
|
1049
844
|
bandwidth_unit?: number | null
|
|
845
|
+
channel?: number
|
|
1050
846
|
created_at?: string
|
|
1051
847
|
description?: string
|
|
1052
848
|
id?: string
|
|
@@ -1061,14 +857,21 @@ export interface Database {
|
|
|
1061
857
|
price_m_storage_id?: string | null
|
|
1062
858
|
price_y?: number
|
|
1063
859
|
price_y_id: string
|
|
860
|
+
progressive_deploy?: boolean
|
|
861
|
+
shared?: number
|
|
1064
862
|
storage: number
|
|
1065
863
|
storage_unit?: number | null
|
|
1066
864
|
stripe_id?: string
|
|
865
|
+
update?: number
|
|
1067
866
|
updated_at?: string
|
|
867
|
+
version?: number
|
|
1068
868
|
}
|
|
1069
869
|
Update: {
|
|
870
|
+
abtest?: boolean
|
|
871
|
+
app?: number
|
|
1070
872
|
bandwidth?: number
|
|
1071
873
|
bandwidth_unit?: number | null
|
|
874
|
+
channel?: number
|
|
1072
875
|
created_at?: string
|
|
1073
876
|
description?: string
|
|
1074
877
|
id?: string
|
|
@@ -1083,10 +886,14 @@ export interface Database {
|
|
|
1083
886
|
price_m_storage_id?: string | null
|
|
1084
887
|
price_y?: number
|
|
1085
888
|
price_y_id?: string
|
|
889
|
+
progressive_deploy?: boolean
|
|
890
|
+
shared?: number
|
|
1086
891
|
storage?: number
|
|
1087
892
|
storage_unit?: number | null
|
|
1088
893
|
stripe_id?: string
|
|
894
|
+
update?: number
|
|
1089
895
|
updated_at?: string
|
|
896
|
+
version?: number
|
|
1090
897
|
}
|
|
1091
898
|
Relationships: []
|
|
1092
899
|
}
|
|
@@ -1265,14 +1072,6 @@ export interface Database {
|
|
|
1265
1072
|
}
|
|
1266
1073
|
Returns: string
|
|
1267
1074
|
}
|
|
1268
|
-
calculate_cycle_usage: {
|
|
1269
|
-
Args: Record<PropertyKey, never>
|
|
1270
|
-
Returns: undefined
|
|
1271
|
-
}
|
|
1272
|
-
calculate_daily_app_usage: {
|
|
1273
|
-
Args: Record<PropertyKey, never>
|
|
1274
|
-
Returns: undefined
|
|
1275
|
-
}
|
|
1276
1075
|
check_min_rights:
|
|
1277
1076
|
| {
|
|
1278
1077
|
Args: {
|
|
@@ -1338,10 +1137,6 @@ export interface Database {
|
|
|
1338
1137
|
Args: Record<PropertyKey, never>
|
|
1339
1138
|
Returns: number
|
|
1340
1139
|
}
|
|
1341
|
-
count_all_paying: {
|
|
1342
|
-
Args: Record<PropertyKey, never>
|
|
1343
|
-
Returns: number
|
|
1344
|
-
}
|
|
1345
1140
|
count_all_plans: {
|
|
1346
1141
|
Args: Record<PropertyKey, never>
|
|
1347
1142
|
Returns: {
|
|
@@ -1360,13 +1155,6 @@ export interface Database {
|
|
|
1360
1155
|
Args: Record<PropertyKey, never>
|
|
1361
1156
|
Returns: number
|
|
1362
1157
|
}
|
|
1363
|
-
create_partitions: {
|
|
1364
|
-
Args: {
|
|
1365
|
-
start_date: string
|
|
1366
|
-
num_years: number
|
|
1367
|
-
}
|
|
1368
|
-
Returns: undefined
|
|
1369
|
-
}
|
|
1370
1158
|
delete_user: {
|
|
1371
1159
|
Args: Record<PropertyKey, never>
|
|
1372
1160
|
Returns: undefined
|
|
@@ -1436,6 +1224,16 @@ export interface Database {
|
|
|
1436
1224
|
storage: number
|
|
1437
1225
|
}[]
|
|
1438
1226
|
}
|
|
1227
|
+
get_current_plan_max_org: {
|
|
1228
|
+
Args: {
|
|
1229
|
+
orgid: string
|
|
1230
|
+
}
|
|
1231
|
+
Returns: {
|
|
1232
|
+
mau: number
|
|
1233
|
+
bandwidth: number
|
|
1234
|
+
storage: number
|
|
1235
|
+
}[]
|
|
1236
|
+
}
|
|
1439
1237
|
get_current_plan_name:
|
|
1440
1238
|
| {
|
|
1441
1239
|
Args: Record<PropertyKey, never>
|
|
@@ -1447,6 +1245,12 @@ export interface Database {
|
|
|
1447
1245
|
}
|
|
1448
1246
|
Returns: string
|
|
1449
1247
|
}
|
|
1248
|
+
get_current_plan_name_org: {
|
|
1249
|
+
Args: {
|
|
1250
|
+
orgid: string
|
|
1251
|
+
}
|
|
1252
|
+
Returns: string
|
|
1253
|
+
}
|
|
1450
1254
|
get_customer_counts: {
|
|
1451
1255
|
Args: Record<PropertyKey, never>
|
|
1452
1256
|
Returns: {
|
|
@@ -1455,23 +1259,24 @@ export interface Database {
|
|
|
1455
1259
|
total: number
|
|
1456
1260
|
}[]
|
|
1457
1261
|
}
|
|
1458
|
-
get_cycle_info:
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
Returns: {
|
|
1462
|
-
subscription_anchor_start: string
|
|
1463
|
-
subscription_anchor_end: string
|
|
1464
|
-
}[]
|
|
1262
|
+
get_cycle_info: {
|
|
1263
|
+
Args: {
|
|
1264
|
+
userid: string
|
|
1465
1265
|
}
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1266
|
+
Returns: {
|
|
1267
|
+
subscription_anchor_start: string
|
|
1268
|
+
subscription_anchor_end: string
|
|
1269
|
+
}[]
|
|
1270
|
+
}
|
|
1271
|
+
get_cycle_info_org: {
|
|
1272
|
+
Args: {
|
|
1273
|
+
orgid: string
|
|
1474
1274
|
}
|
|
1275
|
+
Returns: {
|
|
1276
|
+
subscription_anchor_start: string
|
|
1277
|
+
subscription_anchor_end: string
|
|
1278
|
+
}[]
|
|
1279
|
+
}
|
|
1475
1280
|
get_db_url: {
|
|
1476
1281
|
Args: Record<PropertyKey, never>
|
|
1477
1282
|
Returns: string
|
|
@@ -1504,25 +1309,13 @@ export interface Database {
|
|
|
1504
1309
|
}
|
|
1505
1310
|
Returns: string
|
|
1506
1311
|
}
|
|
1507
|
-
get_infos: {
|
|
1508
|
-
Args: {
|
|
1509
|
-
appid: string
|
|
1510
|
-
deviceid: string
|
|
1511
|
-
versionname: string
|
|
1512
|
-
}
|
|
1513
|
-
Returns: {
|
|
1514
|
-
current_version_id: number
|
|
1515
|
-
versiondata: Json
|
|
1516
|
-
channel: Json
|
|
1517
|
-
}[]
|
|
1518
|
-
}
|
|
1519
1312
|
get_max_plan:
|
|
1520
1313
|
| {
|
|
1521
1314
|
Args: Record<PropertyKey, never>
|
|
1522
1315
|
Returns: {
|
|
1523
1316
|
mau: number
|
|
1524
|
-
bandwidth: number
|
|
1525
1317
|
storage: number
|
|
1318
|
+
bandwidth: number
|
|
1526
1319
|
}[]
|
|
1527
1320
|
}
|
|
1528
1321
|
| {
|
|
@@ -1630,9 +1423,59 @@ export interface Database {
|
|
|
1630
1423
|
subscription_end: string
|
|
1631
1424
|
}[]
|
|
1632
1425
|
}
|
|
1633
|
-
|
|
1426
|
+
get_orgs_v5:
|
|
1427
|
+
| {
|
|
1428
|
+
Args: Record<PropertyKey, never>
|
|
1429
|
+
Returns: {
|
|
1430
|
+
gid: string
|
|
1431
|
+
created_by: string
|
|
1432
|
+
logo: string
|
|
1433
|
+
name: string
|
|
1434
|
+
role: string
|
|
1435
|
+
paying: boolean
|
|
1436
|
+
trial_left: number
|
|
1437
|
+
can_use_more: boolean
|
|
1438
|
+
is_canceled: boolean
|
|
1439
|
+
app_count: number
|
|
1440
|
+
subscription_start: string
|
|
1441
|
+
subscription_end: string
|
|
1442
|
+
management_email: string
|
|
1443
|
+
}[]
|
|
1444
|
+
}
|
|
1445
|
+
| {
|
|
1446
|
+
Args: {
|
|
1447
|
+
userid: string
|
|
1448
|
+
}
|
|
1449
|
+
Returns: {
|
|
1450
|
+
gid: string
|
|
1451
|
+
created_by: string
|
|
1452
|
+
logo: string
|
|
1453
|
+
name: string
|
|
1454
|
+
role: string
|
|
1455
|
+
paying: boolean
|
|
1456
|
+
trial_left: number
|
|
1457
|
+
can_use_more: boolean
|
|
1458
|
+
is_canceled: boolean
|
|
1459
|
+
app_count: number
|
|
1460
|
+
subscription_start: string
|
|
1461
|
+
subscription_end: string
|
|
1462
|
+
management_email: string
|
|
1463
|
+
}[]
|
|
1464
|
+
}
|
|
1465
|
+
get_plan_usage_percent:
|
|
1466
|
+
| {
|
|
1467
|
+
Args: Record<PropertyKey, never>
|
|
1468
|
+
Returns: number
|
|
1469
|
+
}
|
|
1470
|
+
| {
|
|
1471
|
+
Args: {
|
|
1472
|
+
userid: string
|
|
1473
|
+
}
|
|
1474
|
+
Returns: number
|
|
1475
|
+
}
|
|
1476
|
+
get_plan_usage_percent_org: {
|
|
1634
1477
|
Args: {
|
|
1635
|
-
|
|
1478
|
+
orgid: string
|
|
1636
1479
|
}
|
|
1637
1480
|
Returns: number
|
|
1638
1481
|
}
|
|
@@ -1667,27 +1510,24 @@ export interface Database {
|
|
|
1667
1510
|
storage: number
|
|
1668
1511
|
}[]
|
|
1669
1512
|
}
|
|
1513
|
+
get_total_stats_v5_org: {
|
|
1514
|
+
Args: {
|
|
1515
|
+
orgid: string
|
|
1516
|
+
}
|
|
1517
|
+
Returns: {
|
|
1518
|
+
mau: number
|
|
1519
|
+
bandwidth: number
|
|
1520
|
+
storage: number
|
|
1521
|
+
}[]
|
|
1522
|
+
}
|
|
1670
1523
|
get_total_storage_size:
|
|
1671
1524
|
| {
|
|
1672
1525
|
Args: Record<PropertyKey, never>
|
|
1673
1526
|
Returns: number
|
|
1674
1527
|
}
|
|
1675
|
-
| {
|
|
1676
|
-
Args: {
|
|
1677
|
-
appid: string
|
|
1678
|
-
}
|
|
1679
|
-
Returns: number
|
|
1680
|
-
}
|
|
1681
|
-
| {
|
|
1682
|
-
Args: {
|
|
1683
|
-
userid: string
|
|
1684
|
-
}
|
|
1685
|
-
Returns: number
|
|
1686
|
-
}
|
|
1687
1528
|
| {
|
|
1688
1529
|
Args: {
|
|
1689
1530
|
userid: string
|
|
1690
|
-
appid: string
|
|
1691
1531
|
}
|
|
1692
1532
|
Returns: number
|
|
1693
1533
|
}
|
|
@@ -1812,6 +1652,12 @@ export interface Database {
|
|
|
1812
1652
|
}
|
|
1813
1653
|
Returns: boolean
|
|
1814
1654
|
}
|
|
1655
|
+
is_allowed_action_org: {
|
|
1656
|
+
Args: {
|
|
1657
|
+
orgid: string
|
|
1658
|
+
}
|
|
1659
|
+
Returns: boolean
|
|
1660
|
+
}
|
|
1815
1661
|
is_allowed_action_user:
|
|
1816
1662
|
| {
|
|
1817
1663
|
Args: Record<PropertyKey, never>
|
|
@@ -1892,6 +1738,12 @@ export interface Database {
|
|
|
1892
1738
|
}
|
|
1893
1739
|
Returns: boolean
|
|
1894
1740
|
}
|
|
1741
|
+
is_canceled_org: {
|
|
1742
|
+
Args: {
|
|
1743
|
+
orgid: string
|
|
1744
|
+
}
|
|
1745
|
+
Returns: boolean
|
|
1746
|
+
}
|
|
1895
1747
|
is_free_usage:
|
|
1896
1748
|
| {
|
|
1897
1749
|
Args: Record<PropertyKey, never>
|
|
@@ -1903,12 +1755,6 @@ export interface Database {
|
|
|
1903
1755
|
}
|
|
1904
1756
|
Returns: boolean
|
|
1905
1757
|
}
|
|
1906
|
-
is_good_plan_v3: {
|
|
1907
|
-
Args: {
|
|
1908
|
-
userid: string
|
|
1909
|
-
}
|
|
1910
|
-
Returns: boolean
|
|
1911
|
-
}
|
|
1912
1758
|
is_good_plan_v5: {
|
|
1913
1759
|
Args: {
|
|
1914
1760
|
userid: string
|
|
@@ -1979,6 +1825,18 @@ export interface Database {
|
|
|
1979
1825
|
}
|
|
1980
1826
|
Returns: boolean
|
|
1981
1827
|
}
|
|
1828
|
+
is_paying_and_good_plan_org: {
|
|
1829
|
+
Args: {
|
|
1830
|
+
orgid: string
|
|
1831
|
+
}
|
|
1832
|
+
Returns: boolean
|
|
1833
|
+
}
|
|
1834
|
+
is_paying_org: {
|
|
1835
|
+
Args: {
|
|
1836
|
+
orgid: string
|
|
1837
|
+
}
|
|
1838
|
+
Returns: boolean
|
|
1839
|
+
}
|
|
1982
1840
|
is_trial:
|
|
1983
1841
|
| {
|
|
1984
1842
|
Args: Record<PropertyKey, never>
|
|
@@ -1990,24 +1848,16 @@ export interface Database {
|
|
|
1990
1848
|
}
|
|
1991
1849
|
Returns: number
|
|
1992
1850
|
}
|
|
1851
|
+
is_trial_org: {
|
|
1852
|
+
Args: {
|
|
1853
|
+
orgid: string
|
|
1854
|
+
}
|
|
1855
|
+
Returns: number
|
|
1856
|
+
}
|
|
1993
1857
|
one_month_ahead: {
|
|
1994
1858
|
Args: Record<PropertyKey, never>
|
|
1995
1859
|
Returns: string
|
|
1996
1860
|
}
|
|
1997
|
-
post_replication_sql:
|
|
1998
|
-
| {
|
|
1999
|
-
Args: {
|
|
2000
|
-
sql_query: string
|
|
2001
|
-
}
|
|
2002
|
-
Returns: undefined
|
|
2003
|
-
}
|
|
2004
|
-
| {
|
|
2005
|
-
Args: {
|
|
2006
|
-
sql_query: string
|
|
2007
|
-
params: string[]
|
|
2008
|
-
}
|
|
2009
|
-
Returns: undefined
|
|
2010
|
-
}
|
|
2011
1861
|
process_current_jobs_if_unlocked: {
|
|
2012
1862
|
Args: Record<PropertyKey, never>
|
|
2013
1863
|
Returns: number[]
|
|
@@ -2016,6 +1866,13 @@ export interface Database {
|
|
|
2016
1866
|
Args: Record<PropertyKey, never>
|
|
2017
1867
|
Returns: undefined
|
|
2018
1868
|
}
|
|
1869
|
+
remove_enum_value: {
|
|
1870
|
+
Args: {
|
|
1871
|
+
enum_type: unknown
|
|
1872
|
+
enum_value: string
|
|
1873
|
+
}
|
|
1874
|
+
Returns: undefined
|
|
1875
|
+
}
|
|
2019
1876
|
reset_and_seed_data: {
|
|
2020
1877
|
Args: Record<PropertyKey, never>
|
|
2021
1878
|
Returns: undefined
|
|
@@ -2028,27 +1885,14 @@ export interface Database {
|
|
|
2028
1885
|
Args: Record<PropertyKey, never>
|
|
2029
1886
|
Returns: undefined
|
|
2030
1887
|
}
|
|
2031
|
-
update_app_usage:
|
|
2032
|
-
| {
|
|
2033
|
-
Args: Record<PropertyKey, never>
|
|
2034
|
-
Returns: undefined
|
|
2035
|
-
}
|
|
2036
|
-
| {
|
|
2037
|
-
Args: {
|
|
2038
|
-
minutes_interval: number
|
|
2039
|
-
}
|
|
2040
|
-
Returns: undefined
|
|
2041
|
-
}
|
|
2042
1888
|
verify_mfa: {
|
|
2043
1889
|
Args: Record<PropertyKey, never>
|
|
2044
1890
|
Returns: boolean
|
|
2045
1891
|
}
|
|
2046
1892
|
}
|
|
2047
1893
|
Enums: {
|
|
2048
|
-
app_mode: 'prod' | 'dev' | 'livereload'
|
|
2049
1894
|
disable_update: 'major' | 'minor' | 'version_number' | 'none'
|
|
2050
1895
|
key_mode: 'read' | 'write' | 'all' | 'upload'
|
|
2051
|
-
pay_as_you_go_type: 'base' | 'units'
|
|
2052
1896
|
platform_os: 'ios' | 'android'
|
|
2053
1897
|
queue_job_status: 'inserted' | 'requested' | 'failed'
|
|
2054
1898
|
stripe_status:
|
|
@@ -2058,7 +1902,7 @@ export interface Database {
|
|
|
2058
1902
|
| 'failed'
|
|
2059
1903
|
| 'deleted'
|
|
2060
1904
|
| 'canceled'
|
|
2061
|
-
usage_mode: '
|
|
1905
|
+
usage_mode: 'last_saved' | '5min' | 'day' | 'cycle'
|
|
2062
1906
|
user_min_right:
|
|
2063
1907
|
| 'invite_read'
|
|
2064
1908
|
| 'invite_upload'
|
|
@@ -2073,9 +1917,6 @@ export interface Database {
|
|
|
2073
1917
|
user_role: 'read' | 'upload' | 'write' | 'admin'
|
|
2074
1918
|
}
|
|
2075
1919
|
CompositeTypes: {
|
|
2076
|
-
match_plan: {
|
|
2077
|
-
name: string | null
|
|
2078
|
-
}
|
|
2079
1920
|
orgs_table: {
|
|
2080
1921
|
id: string | null
|
|
2081
1922
|
created_by: string | null
|
|
@@ -2098,6 +1939,185 @@ export interface Database {
|
|
|
2098
1939
|
}
|
|
2099
1940
|
}
|
|
2100
1941
|
}
|
|
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
|
+
}
|
|
2101
2121
|
}
|
|
2102
2122
|
|
|
2103
2123
|
type PublicSchema = Database[Extract<keyof Database, 'public'>]
|