@capgo/cli 7.20.1 → 7.20.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/dist/index.js +8 -8
- package/dist/package.json +1 -1
- package/dist/src/api/channels.d.ts +1130 -136
- package/dist/src/api/channels.d.ts.map +1 -1
- package/dist/src/api/versions.d.ts.map +1 -1
- package/dist/src/app/debug.d.ts.map +1 -1
- package/dist/src/app/list.d.ts +2 -0
- package/dist/src/app/list.d.ts.map +1 -1
- package/dist/src/bundle/list.d.ts.map +1 -1
- package/dist/src/bundle/upload.d.ts +1 -1
- package/dist/src/bundle/upload.d.ts.map +1 -1
- package/dist/src/channel/add.d.ts.map +1 -1
- package/dist/src/organisation/add.d.ts +1 -0
- package/dist/src/organisation/add.d.ts.map +1 -1
- package/dist/src/organisation/list.d.ts +5 -0
- package/dist/src/organisation/list.d.ts.map +1 -1
- package/dist/src/sdk.js +3 -3
- package/dist/src/types/supabase.types.d.ts +584 -69
- package/dist/src/types/supabase.types.d.ts.map +1 -1
- package/dist/src/utils.d.ts +568 -79
- package/dist/src/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -51,6 +51,41 @@ export type Database = {
|
|
|
51
51
|
}
|
|
52
52
|
];
|
|
53
53
|
};
|
|
54
|
+
app_metrics_cache: {
|
|
55
|
+
Row: {
|
|
56
|
+
cached_at: string;
|
|
57
|
+
end_date: string;
|
|
58
|
+
id: number;
|
|
59
|
+
org_id: string;
|
|
60
|
+
response: Json;
|
|
61
|
+
start_date: string;
|
|
62
|
+
};
|
|
63
|
+
Insert: {
|
|
64
|
+
cached_at?: string;
|
|
65
|
+
end_date: string;
|
|
66
|
+
id?: number;
|
|
67
|
+
org_id: string;
|
|
68
|
+
response: Json;
|
|
69
|
+
start_date: string;
|
|
70
|
+
};
|
|
71
|
+
Update: {
|
|
72
|
+
cached_at?: string;
|
|
73
|
+
end_date?: string;
|
|
74
|
+
id?: number;
|
|
75
|
+
org_id?: string;
|
|
76
|
+
response?: Json;
|
|
77
|
+
start_date?: string;
|
|
78
|
+
};
|
|
79
|
+
Relationships: [
|
|
80
|
+
{
|
|
81
|
+
foreignKeyName: "app_metrics_cache_org_id_fkey";
|
|
82
|
+
columns: ["org_id"];
|
|
83
|
+
isOneToOne: false;
|
|
84
|
+
referencedRelation: "orgs";
|
|
85
|
+
referencedColumns: ["id"];
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
};
|
|
54
89
|
app_versions: {
|
|
55
90
|
Row: {
|
|
56
91
|
app_id: string;
|
|
@@ -184,11 +219,13 @@ export type Database = {
|
|
|
184
219
|
apps: {
|
|
185
220
|
Row: {
|
|
186
221
|
app_id: string;
|
|
222
|
+
channel_device_count: number;
|
|
187
223
|
created_at: string | null;
|
|
188
224
|
default_upload_channel: string;
|
|
189
225
|
icon_url: string;
|
|
190
226
|
id: string | null;
|
|
191
227
|
last_version: string | null;
|
|
228
|
+
manifest_bundle_count: number;
|
|
192
229
|
name: string | null;
|
|
193
230
|
owner_org: string;
|
|
194
231
|
retention: number;
|
|
@@ -198,11 +235,13 @@ export type Database = {
|
|
|
198
235
|
};
|
|
199
236
|
Insert: {
|
|
200
237
|
app_id: string;
|
|
238
|
+
channel_device_count?: number;
|
|
201
239
|
created_at?: string | null;
|
|
202
240
|
default_upload_channel?: string;
|
|
203
241
|
icon_url: string;
|
|
204
242
|
id?: string | null;
|
|
205
243
|
last_version?: string | null;
|
|
244
|
+
manifest_bundle_count?: number;
|
|
206
245
|
name?: string | null;
|
|
207
246
|
owner_org: string;
|
|
208
247
|
retention?: number;
|
|
@@ -212,11 +251,13 @@ export type Database = {
|
|
|
212
251
|
};
|
|
213
252
|
Update: {
|
|
214
253
|
app_id?: string;
|
|
254
|
+
channel_device_count?: number;
|
|
215
255
|
created_at?: string | null;
|
|
216
256
|
default_upload_channel?: string;
|
|
217
257
|
icon_url?: string;
|
|
218
258
|
id?: string | null;
|
|
219
259
|
last_version?: string | null;
|
|
260
|
+
manifest_bundle_count?: number;
|
|
220
261
|
name?: string | null;
|
|
221
262
|
owner_org?: string;
|
|
222
263
|
retention?: number;
|
|
@@ -269,10 +310,10 @@ export type Database = {
|
|
|
269
310
|
Row: {
|
|
270
311
|
created_at: string;
|
|
271
312
|
id: number;
|
|
313
|
+
org_id: string | null;
|
|
272
314
|
price_per_unit: number;
|
|
273
315
|
step_max: number;
|
|
274
316
|
step_min: number;
|
|
275
|
-
stripe_id: string | null;
|
|
276
317
|
type: string;
|
|
277
318
|
unit_factor: number;
|
|
278
319
|
updated_at: string;
|
|
@@ -280,10 +321,10 @@ export type Database = {
|
|
|
280
321
|
Insert: {
|
|
281
322
|
created_at?: string;
|
|
282
323
|
id?: number;
|
|
324
|
+
org_id?: string | null;
|
|
283
325
|
price_per_unit: number;
|
|
284
326
|
step_max: number;
|
|
285
327
|
step_min: number;
|
|
286
|
-
stripe_id?: string | null;
|
|
287
328
|
type: string;
|
|
288
329
|
unit_factor?: number;
|
|
289
330
|
updated_at?: string;
|
|
@@ -291,15 +332,23 @@ export type Database = {
|
|
|
291
332
|
Update: {
|
|
292
333
|
created_at?: string;
|
|
293
334
|
id?: number;
|
|
335
|
+
org_id?: string | null;
|
|
294
336
|
price_per_unit?: number;
|
|
295
337
|
step_max?: number;
|
|
296
338
|
step_min?: number;
|
|
297
|
-
stripe_id?: string | null;
|
|
298
339
|
type?: string;
|
|
299
340
|
unit_factor?: number;
|
|
300
341
|
updated_at?: string;
|
|
301
342
|
};
|
|
302
|
-
Relationships: [
|
|
343
|
+
Relationships: [
|
|
344
|
+
{
|
|
345
|
+
foreignKeyName: "capgo_credits_steps_org_id_fkey";
|
|
346
|
+
columns: ["org_id"];
|
|
347
|
+
isOneToOne: false;
|
|
348
|
+
referencedRelation: "orgs";
|
|
349
|
+
referencedColumns: ["id"];
|
|
350
|
+
}
|
|
351
|
+
];
|
|
303
352
|
};
|
|
304
353
|
channel_devices: {
|
|
305
354
|
Row: {
|
|
@@ -637,18 +686,21 @@ export type Database = {
|
|
|
637
686
|
app_id: string;
|
|
638
687
|
device_id: string;
|
|
639
688
|
id: number;
|
|
689
|
+
org_id: string;
|
|
640
690
|
timestamp: string;
|
|
641
691
|
};
|
|
642
692
|
Insert: {
|
|
643
693
|
app_id: string;
|
|
644
694
|
device_id: string;
|
|
645
695
|
id?: number;
|
|
696
|
+
org_id: string;
|
|
646
697
|
timestamp?: string;
|
|
647
698
|
};
|
|
648
699
|
Update: {
|
|
649
700
|
app_id?: string;
|
|
650
701
|
device_id?: string;
|
|
651
702
|
id?: number;
|
|
703
|
+
org_id?: string;
|
|
652
704
|
timestamp?: string;
|
|
653
705
|
};
|
|
654
706
|
Relationships: [];
|
|
@@ -657,6 +709,7 @@ export type Database = {
|
|
|
657
709
|
Row: {
|
|
658
710
|
app_id: string;
|
|
659
711
|
custom_id: string;
|
|
712
|
+
default_channel: string | null;
|
|
660
713
|
device_id: string;
|
|
661
714
|
id: number;
|
|
662
715
|
is_emulator: boolean | null;
|
|
@@ -665,12 +718,14 @@ export type Database = {
|
|
|
665
718
|
platform: Database["public"]["Enums"]["platform_os"];
|
|
666
719
|
plugin_version: string;
|
|
667
720
|
updated_at: string;
|
|
668
|
-
version: number;
|
|
721
|
+
version: number | null;
|
|
669
722
|
version_build: string | null;
|
|
723
|
+
version_name: string;
|
|
670
724
|
};
|
|
671
725
|
Insert: {
|
|
672
726
|
app_id: string;
|
|
673
727
|
custom_id?: string;
|
|
728
|
+
default_channel?: string | null;
|
|
674
729
|
device_id: string;
|
|
675
730
|
id?: never;
|
|
676
731
|
is_emulator?: boolean | null;
|
|
@@ -679,12 +734,14 @@ export type Database = {
|
|
|
679
734
|
platform: Database["public"]["Enums"]["platform_os"];
|
|
680
735
|
plugin_version?: string;
|
|
681
736
|
updated_at: string;
|
|
682
|
-
version
|
|
737
|
+
version?: number | null;
|
|
683
738
|
version_build?: string | null;
|
|
739
|
+
version_name?: string;
|
|
684
740
|
};
|
|
685
741
|
Update: {
|
|
686
742
|
app_id?: string;
|
|
687
743
|
custom_id?: string;
|
|
744
|
+
default_channel?: string | null;
|
|
688
745
|
device_id?: string;
|
|
689
746
|
id?: never;
|
|
690
747
|
is_emulator?: boolean | null;
|
|
@@ -693,8 +750,9 @@ export type Database = {
|
|
|
693
750
|
platform?: Database["public"]["Enums"]["platform_os"];
|
|
694
751
|
plugin_version?: string;
|
|
695
752
|
updated_at?: string;
|
|
696
|
-
version?: number;
|
|
753
|
+
version?: number | null;
|
|
697
754
|
version_build?: string | null;
|
|
755
|
+
version_name?: string;
|
|
698
756
|
};
|
|
699
757
|
Relationships: [];
|
|
700
758
|
};
|
|
@@ -702,6 +760,7 @@ export type Database = {
|
|
|
702
760
|
Row: {
|
|
703
761
|
apps: number;
|
|
704
762
|
apps_active: number | null;
|
|
763
|
+
bundle_storage_gb: number;
|
|
705
764
|
created_at: string | null;
|
|
706
765
|
date_id: string;
|
|
707
766
|
devices_last_month: number | null;
|
|
@@ -715,6 +774,7 @@ export type Database = {
|
|
|
715
774
|
plan_payg: number | null;
|
|
716
775
|
plan_solo: number | null;
|
|
717
776
|
plan_team: number | null;
|
|
777
|
+
registers_today: number;
|
|
718
778
|
stars: number;
|
|
719
779
|
success_rate: number | null;
|
|
720
780
|
trial: number | null;
|
|
@@ -727,6 +787,7 @@ export type Database = {
|
|
|
727
787
|
Insert: {
|
|
728
788
|
apps: number;
|
|
729
789
|
apps_active?: number | null;
|
|
790
|
+
bundle_storage_gb?: number;
|
|
730
791
|
created_at?: string | null;
|
|
731
792
|
date_id: string;
|
|
732
793
|
devices_last_month?: number | null;
|
|
@@ -740,6 +801,7 @@ export type Database = {
|
|
|
740
801
|
plan_payg?: number | null;
|
|
741
802
|
plan_solo?: number | null;
|
|
742
803
|
plan_team?: number | null;
|
|
804
|
+
registers_today?: number;
|
|
743
805
|
stars: number;
|
|
744
806
|
success_rate?: number | null;
|
|
745
807
|
trial?: number | null;
|
|
@@ -752,6 +814,7 @@ export type Database = {
|
|
|
752
814
|
Update: {
|
|
753
815
|
apps?: number;
|
|
754
816
|
apps_active?: number | null;
|
|
817
|
+
bundle_storage_gb?: number;
|
|
755
818
|
created_at?: string | null;
|
|
756
819
|
date_id?: string;
|
|
757
820
|
devices_last_month?: number | null;
|
|
@@ -765,6 +828,7 @@ export type Database = {
|
|
|
765
828
|
plan_payg?: number | null;
|
|
766
829
|
plan_solo?: number | null;
|
|
767
830
|
plan_team?: number | null;
|
|
831
|
+
registers_today?: number;
|
|
768
832
|
stars?: number;
|
|
769
833
|
success_rate?: number | null;
|
|
770
834
|
trial?: number | null;
|
|
@@ -920,6 +984,7 @@ export type Database = {
|
|
|
920
984
|
logo: string | null;
|
|
921
985
|
management_email: string;
|
|
922
986
|
name: string;
|
|
987
|
+
stats_updated_at: string | null;
|
|
923
988
|
updated_at: string | null;
|
|
924
989
|
};
|
|
925
990
|
Insert: {
|
|
@@ -930,6 +995,7 @@ export type Database = {
|
|
|
930
995
|
logo?: string | null;
|
|
931
996
|
management_email: string;
|
|
932
997
|
name: string;
|
|
998
|
+
stats_updated_at?: string | null;
|
|
933
999
|
updated_at?: string | null;
|
|
934
1000
|
};
|
|
935
1001
|
Update: {
|
|
@@ -940,6 +1006,7 @@ export type Database = {
|
|
|
940
1006
|
logo?: string | null;
|
|
941
1007
|
management_email?: string;
|
|
942
1008
|
name?: string;
|
|
1009
|
+
stats_updated_at?: string | null;
|
|
943
1010
|
updated_at?: string | null;
|
|
944
1011
|
};
|
|
945
1012
|
Relationships: [
|
|
@@ -1035,7 +1102,7 @@ export type Database = {
|
|
|
1035
1102
|
created_at: string;
|
|
1036
1103
|
device_id: string;
|
|
1037
1104
|
id: number;
|
|
1038
|
-
|
|
1105
|
+
version_name: string;
|
|
1039
1106
|
};
|
|
1040
1107
|
Insert: {
|
|
1041
1108
|
action: Database["public"]["Enums"]["stats_action"];
|
|
@@ -1043,7 +1110,7 @@ export type Database = {
|
|
|
1043
1110
|
created_at: string;
|
|
1044
1111
|
device_id: string;
|
|
1045
1112
|
id?: never;
|
|
1046
|
-
|
|
1113
|
+
version_name?: string;
|
|
1047
1114
|
};
|
|
1048
1115
|
Update: {
|
|
1049
1116
|
action?: Database["public"]["Enums"]["stats_action"];
|
|
@@ -1051,7 +1118,7 @@ export type Database = {
|
|
|
1051
1118
|
created_at?: string;
|
|
1052
1119
|
device_id?: string;
|
|
1053
1120
|
id?: never;
|
|
1054
|
-
|
|
1121
|
+
version_name?: string;
|
|
1055
1122
|
};
|
|
1056
1123
|
Relationships: [];
|
|
1057
1124
|
};
|
|
@@ -1088,6 +1155,7 @@ export type Database = {
|
|
|
1088
1155
|
id: number;
|
|
1089
1156
|
is_good_plan: boolean | null;
|
|
1090
1157
|
mau_exceeded: boolean | null;
|
|
1158
|
+
plan_calculated_at: string | null;
|
|
1091
1159
|
plan_usage: number | null;
|
|
1092
1160
|
price_id: string | null;
|
|
1093
1161
|
product_id: string;
|
|
@@ -1108,6 +1176,7 @@ export type Database = {
|
|
|
1108
1176
|
id?: number;
|
|
1109
1177
|
is_good_plan?: boolean | null;
|
|
1110
1178
|
mau_exceeded?: boolean | null;
|
|
1179
|
+
plan_calculated_at?: string | null;
|
|
1111
1180
|
plan_usage?: number | null;
|
|
1112
1181
|
price_id?: string | null;
|
|
1113
1182
|
product_id: string;
|
|
@@ -1128,6 +1197,7 @@ export type Database = {
|
|
|
1128
1197
|
id?: number;
|
|
1129
1198
|
is_good_plan?: boolean | null;
|
|
1130
1199
|
mau_exceeded?: boolean | null;
|
|
1200
|
+
plan_calculated_at?: string | null;
|
|
1131
1201
|
plan_usage?: number | null;
|
|
1132
1202
|
price_id?: string | null;
|
|
1133
1203
|
product_id?: string;
|
|
@@ -1232,6 +1302,210 @@ export type Database = {
|
|
|
1232
1302
|
}
|
|
1233
1303
|
];
|
|
1234
1304
|
};
|
|
1305
|
+
usage_credit_consumptions: {
|
|
1306
|
+
Row: {
|
|
1307
|
+
applied_at: string;
|
|
1308
|
+
credits_used: number;
|
|
1309
|
+
grant_id: string;
|
|
1310
|
+
id: number;
|
|
1311
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1312
|
+
org_id: string;
|
|
1313
|
+
overage_event_id: string | null;
|
|
1314
|
+
};
|
|
1315
|
+
Insert: {
|
|
1316
|
+
applied_at?: string;
|
|
1317
|
+
credits_used: number;
|
|
1318
|
+
grant_id: string;
|
|
1319
|
+
id?: number;
|
|
1320
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1321
|
+
org_id: string;
|
|
1322
|
+
overage_event_id?: string | null;
|
|
1323
|
+
};
|
|
1324
|
+
Update: {
|
|
1325
|
+
applied_at?: string;
|
|
1326
|
+
credits_used?: number;
|
|
1327
|
+
grant_id?: string;
|
|
1328
|
+
id?: number;
|
|
1329
|
+
metric?: Database["public"]["Enums"]["credit_metric_type"];
|
|
1330
|
+
org_id?: string;
|
|
1331
|
+
overage_event_id?: string | null;
|
|
1332
|
+
};
|
|
1333
|
+
Relationships: [
|
|
1334
|
+
{
|
|
1335
|
+
foreignKeyName: "usage_credit_consumptions_grant_id_fkey";
|
|
1336
|
+
columns: ["grant_id"];
|
|
1337
|
+
isOneToOne: false;
|
|
1338
|
+
referencedRelation: "usage_credit_grants";
|
|
1339
|
+
referencedColumns: ["id"];
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
foreignKeyName: "usage_credit_consumptions_org_id_fkey";
|
|
1343
|
+
columns: ["org_id"];
|
|
1344
|
+
isOneToOne: false;
|
|
1345
|
+
referencedRelation: "orgs";
|
|
1346
|
+
referencedColumns: ["id"];
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
foreignKeyName: "usage_credit_consumptions_overage_event_id_fkey";
|
|
1350
|
+
columns: ["overage_event_id"];
|
|
1351
|
+
isOneToOne: false;
|
|
1352
|
+
referencedRelation: "usage_overage_events";
|
|
1353
|
+
referencedColumns: ["id"];
|
|
1354
|
+
}
|
|
1355
|
+
];
|
|
1356
|
+
};
|
|
1357
|
+
usage_credit_grants: {
|
|
1358
|
+
Row: {
|
|
1359
|
+
credits_consumed: number;
|
|
1360
|
+
credits_total: number;
|
|
1361
|
+
expires_at: string;
|
|
1362
|
+
granted_at: string;
|
|
1363
|
+
id: string;
|
|
1364
|
+
notes: string | null;
|
|
1365
|
+
org_id: string;
|
|
1366
|
+
source: string;
|
|
1367
|
+
source_ref: Json | null;
|
|
1368
|
+
};
|
|
1369
|
+
Insert: {
|
|
1370
|
+
credits_consumed?: number;
|
|
1371
|
+
credits_total: number;
|
|
1372
|
+
expires_at?: string;
|
|
1373
|
+
granted_at?: string;
|
|
1374
|
+
id?: string;
|
|
1375
|
+
notes?: string | null;
|
|
1376
|
+
org_id: string;
|
|
1377
|
+
source?: string;
|
|
1378
|
+
source_ref?: Json | null;
|
|
1379
|
+
};
|
|
1380
|
+
Update: {
|
|
1381
|
+
credits_consumed?: number;
|
|
1382
|
+
credits_total?: number;
|
|
1383
|
+
expires_at?: string;
|
|
1384
|
+
granted_at?: string;
|
|
1385
|
+
id?: string;
|
|
1386
|
+
notes?: string | null;
|
|
1387
|
+
org_id?: string;
|
|
1388
|
+
source?: string;
|
|
1389
|
+
source_ref?: Json | null;
|
|
1390
|
+
};
|
|
1391
|
+
Relationships: [
|
|
1392
|
+
{
|
|
1393
|
+
foreignKeyName: "usage_credit_grants_org_id_fkey";
|
|
1394
|
+
columns: ["org_id"];
|
|
1395
|
+
isOneToOne: false;
|
|
1396
|
+
referencedRelation: "orgs";
|
|
1397
|
+
referencedColumns: ["id"];
|
|
1398
|
+
}
|
|
1399
|
+
];
|
|
1400
|
+
};
|
|
1401
|
+
usage_credit_transactions: {
|
|
1402
|
+
Row: {
|
|
1403
|
+
amount: number;
|
|
1404
|
+
balance_after: number | null;
|
|
1405
|
+
description: string | null;
|
|
1406
|
+
grant_id: string | null;
|
|
1407
|
+
id: number;
|
|
1408
|
+
occurred_at: string;
|
|
1409
|
+
org_id: string;
|
|
1410
|
+
source_ref: Json | null;
|
|
1411
|
+
transaction_type: Database["public"]["Enums"]["credit_transaction_type"];
|
|
1412
|
+
};
|
|
1413
|
+
Insert: {
|
|
1414
|
+
amount: number;
|
|
1415
|
+
balance_after?: number | null;
|
|
1416
|
+
description?: string | null;
|
|
1417
|
+
grant_id?: string | null;
|
|
1418
|
+
id?: number;
|
|
1419
|
+
occurred_at?: string;
|
|
1420
|
+
org_id: string;
|
|
1421
|
+
source_ref?: Json | null;
|
|
1422
|
+
transaction_type: Database["public"]["Enums"]["credit_transaction_type"];
|
|
1423
|
+
};
|
|
1424
|
+
Update: {
|
|
1425
|
+
amount?: number;
|
|
1426
|
+
balance_after?: number | null;
|
|
1427
|
+
description?: string | null;
|
|
1428
|
+
grant_id?: string | null;
|
|
1429
|
+
id?: number;
|
|
1430
|
+
occurred_at?: string;
|
|
1431
|
+
org_id?: string;
|
|
1432
|
+
source_ref?: Json | null;
|
|
1433
|
+
transaction_type?: Database["public"]["Enums"]["credit_transaction_type"];
|
|
1434
|
+
};
|
|
1435
|
+
Relationships: [
|
|
1436
|
+
{
|
|
1437
|
+
foreignKeyName: "usage_credit_transactions_grant_id_fkey";
|
|
1438
|
+
columns: ["grant_id"];
|
|
1439
|
+
isOneToOne: false;
|
|
1440
|
+
referencedRelation: "usage_credit_grants";
|
|
1441
|
+
referencedColumns: ["id"];
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
foreignKeyName: "usage_credit_transactions_org_id_fkey";
|
|
1445
|
+
columns: ["org_id"];
|
|
1446
|
+
isOneToOne: false;
|
|
1447
|
+
referencedRelation: "orgs";
|
|
1448
|
+
referencedColumns: ["id"];
|
|
1449
|
+
}
|
|
1450
|
+
];
|
|
1451
|
+
};
|
|
1452
|
+
usage_overage_events: {
|
|
1453
|
+
Row: {
|
|
1454
|
+
billing_cycle_end: string | null;
|
|
1455
|
+
billing_cycle_start: string | null;
|
|
1456
|
+
created_at: string;
|
|
1457
|
+
credit_step_id: number | null;
|
|
1458
|
+
credits_debited: number;
|
|
1459
|
+
credits_estimated: number;
|
|
1460
|
+
details: Json | null;
|
|
1461
|
+
id: string;
|
|
1462
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1463
|
+
org_id: string;
|
|
1464
|
+
overage_amount: number;
|
|
1465
|
+
};
|
|
1466
|
+
Insert: {
|
|
1467
|
+
billing_cycle_end?: string | null;
|
|
1468
|
+
billing_cycle_start?: string | null;
|
|
1469
|
+
created_at?: string;
|
|
1470
|
+
credit_step_id?: number | null;
|
|
1471
|
+
credits_debited?: number;
|
|
1472
|
+
credits_estimated: number;
|
|
1473
|
+
details?: Json | null;
|
|
1474
|
+
id?: string;
|
|
1475
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1476
|
+
org_id: string;
|
|
1477
|
+
overage_amount: number;
|
|
1478
|
+
};
|
|
1479
|
+
Update: {
|
|
1480
|
+
billing_cycle_end?: string | null;
|
|
1481
|
+
billing_cycle_start?: string | null;
|
|
1482
|
+
created_at?: string;
|
|
1483
|
+
credit_step_id?: number | null;
|
|
1484
|
+
credits_debited?: number;
|
|
1485
|
+
credits_estimated?: number;
|
|
1486
|
+
details?: Json | null;
|
|
1487
|
+
id?: string;
|
|
1488
|
+
metric?: Database["public"]["Enums"]["credit_metric_type"];
|
|
1489
|
+
org_id?: string;
|
|
1490
|
+
overage_amount?: number;
|
|
1491
|
+
};
|
|
1492
|
+
Relationships: [
|
|
1493
|
+
{
|
|
1494
|
+
foreignKeyName: "usage_overage_events_credit_step_id_fkey";
|
|
1495
|
+
columns: ["credit_step_id"];
|
|
1496
|
+
isOneToOne: false;
|
|
1497
|
+
referencedRelation: "capgo_credits_steps";
|
|
1498
|
+
referencedColumns: ["id"];
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
foreignKeyName: "usage_overage_events_org_id_fkey";
|
|
1502
|
+
columns: ["org_id"];
|
|
1503
|
+
isOneToOne: false;
|
|
1504
|
+
referencedRelation: "orgs";
|
|
1505
|
+
referencedColumns: ["id"];
|
|
1506
|
+
}
|
|
1507
|
+
];
|
|
1508
|
+
};
|
|
1235
1509
|
users: {
|
|
1236
1510
|
Row: {
|
|
1237
1511
|
ban_time: string | null;
|
|
@@ -1318,7 +1592,23 @@ export type Database = {
|
|
|
1318
1592
|
};
|
|
1319
1593
|
};
|
|
1320
1594
|
Views: {
|
|
1321
|
-
|
|
1595
|
+
usage_credit_balances: {
|
|
1596
|
+
Row: {
|
|
1597
|
+
available_credits: number | null;
|
|
1598
|
+
next_expiration: string | null;
|
|
1599
|
+
org_id: string | null;
|
|
1600
|
+
total_credits: number | null;
|
|
1601
|
+
};
|
|
1602
|
+
Relationships: [
|
|
1603
|
+
{
|
|
1604
|
+
foreignKeyName: "usage_credit_grants_org_id_fkey";
|
|
1605
|
+
columns: ["org_id"];
|
|
1606
|
+
isOneToOne: false;
|
|
1607
|
+
referencedRelation: "orgs";
|
|
1608
|
+
referencedColumns: ["id"];
|
|
1609
|
+
}
|
|
1610
|
+
];
|
|
1611
|
+
};
|
|
1322
1612
|
};
|
|
1323
1613
|
Functions: {
|
|
1324
1614
|
accept_invitation_to_org: {
|
|
@@ -1327,13 +1617,47 @@ export type Database = {
|
|
|
1327
1617
|
};
|
|
1328
1618
|
Returns: string;
|
|
1329
1619
|
};
|
|
1620
|
+
apply_usage_overage: {
|
|
1621
|
+
Args: {
|
|
1622
|
+
p_billing_cycle_end: string;
|
|
1623
|
+
p_billing_cycle_start: string;
|
|
1624
|
+
p_details?: Json;
|
|
1625
|
+
p_metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1626
|
+
p_org_id: string;
|
|
1627
|
+
p_overage_amount: number;
|
|
1628
|
+
};
|
|
1629
|
+
Returns: {
|
|
1630
|
+
credit_step_id: number;
|
|
1631
|
+
credits_applied: number;
|
|
1632
|
+
credits_remaining: number;
|
|
1633
|
+
credits_required: number;
|
|
1634
|
+
overage_amount: number;
|
|
1635
|
+
overage_covered: number;
|
|
1636
|
+
overage_event_id: string;
|
|
1637
|
+
overage_unpaid: number;
|
|
1638
|
+
}[];
|
|
1639
|
+
};
|
|
1640
|
+
calculate_credit_cost: {
|
|
1641
|
+
Args: {
|
|
1642
|
+
p_metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1643
|
+
p_overage_amount: number;
|
|
1644
|
+
};
|
|
1645
|
+
Returns: {
|
|
1646
|
+
credit_cost_per_unit: number;
|
|
1647
|
+
credit_step_id: number;
|
|
1648
|
+
credits_required: number;
|
|
1649
|
+
}[];
|
|
1650
|
+
};
|
|
1330
1651
|
check_min_rights: {
|
|
1331
1652
|
Args: {
|
|
1332
1653
|
app_id: string;
|
|
1333
1654
|
channel_id: number;
|
|
1334
1655
|
min_right: Database["public"]["Enums"]["user_min_right"];
|
|
1335
1656
|
org_id: string;
|
|
1336
|
-
}
|
|
1657
|
+
};
|
|
1658
|
+
Returns: boolean;
|
|
1659
|
+
} | {
|
|
1660
|
+
Args: {
|
|
1337
1661
|
app_id: string;
|
|
1338
1662
|
channel_id: number;
|
|
1339
1663
|
min_right: Database["public"]["Enums"]["user_min_right"];
|
|
@@ -1349,22 +1673,22 @@ export type Database = {
|
|
|
1349
1673
|
Returns: number;
|
|
1350
1674
|
};
|
|
1351
1675
|
cleanup_frequent_job_details: {
|
|
1352
|
-
Args:
|
|
1676
|
+
Args: never;
|
|
1353
1677
|
Returns: undefined;
|
|
1354
1678
|
};
|
|
1355
1679
|
cleanup_queue_messages: {
|
|
1356
|
-
Args:
|
|
1680
|
+
Args: never;
|
|
1357
1681
|
Returns: undefined;
|
|
1358
1682
|
};
|
|
1359
1683
|
convert_bytes_to_gb: {
|
|
1360
1684
|
Args: {
|
|
1361
|
-
|
|
1685
|
+
bytes_value: number;
|
|
1362
1686
|
};
|
|
1363
1687
|
Returns: number;
|
|
1364
1688
|
};
|
|
1365
1689
|
convert_bytes_to_mb: {
|
|
1366
1690
|
Args: {
|
|
1367
|
-
|
|
1691
|
+
bytes_value: number;
|
|
1368
1692
|
};
|
|
1369
1693
|
Returns: number;
|
|
1370
1694
|
};
|
|
@@ -1394,22 +1718,22 @@ export type Database = {
|
|
|
1394
1718
|
Returns: number;
|
|
1395
1719
|
};
|
|
1396
1720
|
count_all_need_upgrade: {
|
|
1397
|
-
Args:
|
|
1721
|
+
Args: never;
|
|
1398
1722
|
Returns: number;
|
|
1399
1723
|
};
|
|
1400
1724
|
count_all_onboarded: {
|
|
1401
|
-
Args:
|
|
1725
|
+
Args: never;
|
|
1402
1726
|
Returns: number;
|
|
1403
1727
|
};
|
|
1404
1728
|
count_all_plans_v2: {
|
|
1405
|
-
Args:
|
|
1729
|
+
Args: never;
|
|
1406
1730
|
Returns: {
|
|
1407
1731
|
count: number;
|
|
1408
1732
|
plan_name: string;
|
|
1409
1733
|
}[];
|
|
1410
1734
|
};
|
|
1411
1735
|
delete_accounts_marked_for_deletion: {
|
|
1412
|
-
Args:
|
|
1736
|
+
Args: never;
|
|
1413
1737
|
Returns: {
|
|
1414
1738
|
deleted_count: number;
|
|
1415
1739
|
deleted_user_ids: string[];
|
|
@@ -1422,11 +1746,11 @@ export type Database = {
|
|
|
1422
1746
|
Returns: undefined;
|
|
1423
1747
|
};
|
|
1424
1748
|
delete_old_deleted_apps: {
|
|
1425
|
-
Args:
|
|
1749
|
+
Args: never;
|
|
1426
1750
|
Returns: undefined;
|
|
1427
1751
|
};
|
|
1428
1752
|
delete_user: {
|
|
1429
|
-
Args:
|
|
1753
|
+
Args: never;
|
|
1430
1754
|
Returns: undefined;
|
|
1431
1755
|
};
|
|
1432
1756
|
exist_app_v2: {
|
|
@@ -1437,15 +1761,22 @@ export type Database = {
|
|
|
1437
1761
|
};
|
|
1438
1762
|
exist_app_versions: {
|
|
1439
1763
|
Args: {
|
|
1440
|
-
apikey: string;
|
|
1441
1764
|
appid: string;
|
|
1442
1765
|
name_version: string;
|
|
1443
|
-
}
|
|
1766
|
+
};
|
|
1767
|
+
Returns: boolean;
|
|
1768
|
+
} | {
|
|
1769
|
+
Args: {
|
|
1770
|
+
apikey: string;
|
|
1444
1771
|
appid: string;
|
|
1445
1772
|
name_version: string;
|
|
1446
1773
|
};
|
|
1447
1774
|
Returns: boolean;
|
|
1448
1775
|
};
|
|
1776
|
+
expire_usage_credits: {
|
|
1777
|
+
Args: never;
|
|
1778
|
+
Returns: number;
|
|
1779
|
+
};
|
|
1449
1780
|
find_best_plan_v3: {
|
|
1450
1781
|
Args: {
|
|
1451
1782
|
bandwidth: number;
|
|
@@ -1471,19 +1802,15 @@ export type Database = {
|
|
|
1471
1802
|
Returns: string;
|
|
1472
1803
|
};
|
|
1473
1804
|
get_apikey: {
|
|
1474
|
-
Args:
|
|
1805
|
+
Args: never;
|
|
1475
1806
|
Returns: string;
|
|
1476
1807
|
};
|
|
1477
1808
|
get_apikey_header: {
|
|
1478
|
-
Args:
|
|
1809
|
+
Args: never;
|
|
1479
1810
|
Returns: string;
|
|
1480
1811
|
};
|
|
1481
1812
|
get_app_metrics: {
|
|
1482
1813
|
Args: {
|
|
1483
|
-
end_date: string;
|
|
1484
|
-
org_id: string;
|
|
1485
|
-
start_date: string;
|
|
1486
|
-
} | {
|
|
1487
1814
|
org_id: string;
|
|
1488
1815
|
};
|
|
1489
1816
|
Returns: {
|
|
@@ -1497,6 +1824,23 @@ export type Database = {
|
|
|
1497
1824
|
storage: number;
|
|
1498
1825
|
uninstall: number;
|
|
1499
1826
|
}[];
|
|
1827
|
+
} | {
|
|
1828
|
+
Args: {
|
|
1829
|
+
p_end_date: string;
|
|
1830
|
+
p_org_id: string;
|
|
1831
|
+
p_start_date: string;
|
|
1832
|
+
};
|
|
1833
|
+
Returns: {
|
|
1834
|
+
app_id: string;
|
|
1835
|
+
bandwidth: number;
|
|
1836
|
+
date: string;
|
|
1837
|
+
fail: number;
|
|
1838
|
+
get: number;
|
|
1839
|
+
install: number;
|
|
1840
|
+
mau: number;
|
|
1841
|
+
storage: number;
|
|
1842
|
+
uninstall: number;
|
|
1843
|
+
}[];
|
|
1500
1844
|
};
|
|
1501
1845
|
get_app_versions: {
|
|
1502
1846
|
Args: {
|
|
@@ -1523,7 +1867,7 @@ export type Database = {
|
|
|
1523
1867
|
Returns: string;
|
|
1524
1868
|
};
|
|
1525
1869
|
get_customer_counts: {
|
|
1526
|
-
Args:
|
|
1870
|
+
Args: never;
|
|
1527
1871
|
Returns: {
|
|
1528
1872
|
monthly: number;
|
|
1529
1873
|
total: number;
|
|
@@ -1539,21 +1883,37 @@ export type Database = {
|
|
|
1539
1883
|
subscription_anchor_start: string;
|
|
1540
1884
|
}[];
|
|
1541
1885
|
};
|
|
1886
|
+
get_d1_sync_url: {
|
|
1887
|
+
Args: never;
|
|
1888
|
+
Returns: string;
|
|
1889
|
+
};
|
|
1542
1890
|
get_d1_webhook_signature: {
|
|
1543
|
-
Args:
|
|
1891
|
+
Args: never;
|
|
1544
1892
|
Returns: string;
|
|
1545
1893
|
};
|
|
1546
1894
|
get_db_url: {
|
|
1547
|
-
Args:
|
|
1895
|
+
Args: never;
|
|
1548
1896
|
Returns: string;
|
|
1549
1897
|
};
|
|
1550
1898
|
get_global_metrics: {
|
|
1899
|
+
Args: {
|
|
1900
|
+
org_id: string;
|
|
1901
|
+
};
|
|
1902
|
+
Returns: {
|
|
1903
|
+
bandwidth: number;
|
|
1904
|
+
date: string;
|
|
1905
|
+
fail: number;
|
|
1906
|
+
get: number;
|
|
1907
|
+
install: number;
|
|
1908
|
+
mau: number;
|
|
1909
|
+
storage: number;
|
|
1910
|
+
uninstall: number;
|
|
1911
|
+
}[];
|
|
1912
|
+
} | {
|
|
1551
1913
|
Args: {
|
|
1552
1914
|
end_date: string;
|
|
1553
1915
|
org_id: string;
|
|
1554
1916
|
start_date: string;
|
|
1555
|
-
} | {
|
|
1556
|
-
org_id: string;
|
|
1557
1917
|
};
|
|
1558
1918
|
Returns: {
|
|
1559
1919
|
bandwidth: number;
|
|
@@ -1567,7 +1927,10 @@ export type Database = {
|
|
|
1567
1927
|
}[];
|
|
1568
1928
|
};
|
|
1569
1929
|
get_identity: {
|
|
1570
|
-
Args:
|
|
1930
|
+
Args: never;
|
|
1931
|
+
Returns: string;
|
|
1932
|
+
} | {
|
|
1933
|
+
Args: {
|
|
1571
1934
|
keymode: Database["public"]["Enums"]["key_mode"][];
|
|
1572
1935
|
};
|
|
1573
1936
|
Returns: string;
|
|
@@ -1604,10 +1967,25 @@ export type Database = {
|
|
|
1604
1967
|
}[];
|
|
1605
1968
|
};
|
|
1606
1969
|
get_metered_usage: {
|
|
1607
|
-
Args:
|
|
1970
|
+
Args: {
|
|
1608
1971
|
orgid: string;
|
|
1609
1972
|
};
|
|
1610
1973
|
Returns: Database["public"]["CompositeTypes"]["stats_table"];
|
|
1974
|
+
SetofOptions: {
|
|
1975
|
+
from: "*";
|
|
1976
|
+
to: "stats_table";
|
|
1977
|
+
isOneToOne: true;
|
|
1978
|
+
isSetofReturn: false;
|
|
1979
|
+
};
|
|
1980
|
+
} | {
|
|
1981
|
+
Args: never;
|
|
1982
|
+
Returns: Database["public"]["CompositeTypes"]["stats_table"];
|
|
1983
|
+
SetofOptions: {
|
|
1984
|
+
from: "*";
|
|
1985
|
+
to: "stats_table";
|
|
1986
|
+
isOneToOne: true;
|
|
1987
|
+
isSetofReturn: false;
|
|
1988
|
+
};
|
|
1611
1989
|
};
|
|
1612
1990
|
get_next_cron_time: {
|
|
1613
1991
|
Args: {
|
|
@@ -1624,11 +2002,15 @@ export type Database = {
|
|
|
1624
2002
|
};
|
|
1625
2003
|
Returns: number;
|
|
1626
2004
|
};
|
|
2005
|
+
get_next_stats_update_date: {
|
|
2006
|
+
Args: {
|
|
2007
|
+
org: string;
|
|
2008
|
+
};
|
|
2009
|
+
Returns: string;
|
|
2010
|
+
};
|
|
1627
2011
|
get_org_members: {
|
|
1628
2012
|
Args: {
|
|
1629
2013
|
guild_id: string;
|
|
1630
|
-
} | {
|
|
1631
|
-
guild_id: string;
|
|
1632
2014
|
user_id: string;
|
|
1633
2015
|
};
|
|
1634
2016
|
Returns: {
|
|
@@ -1639,6 +2021,18 @@ export type Database = {
|
|
|
1639
2021
|
role: Database["public"]["Enums"]["user_min_right"];
|
|
1640
2022
|
uid: string;
|
|
1641
2023
|
}[];
|
|
2024
|
+
} | {
|
|
2025
|
+
Args: {
|
|
2026
|
+
guild_id: string;
|
|
2027
|
+
};
|
|
2028
|
+
Returns: {
|
|
2029
|
+
aid: number;
|
|
2030
|
+
email: string;
|
|
2031
|
+
image_url: string;
|
|
2032
|
+
is_tmp: boolean;
|
|
2033
|
+
role: Database["public"]["Enums"]["user_min_right"];
|
|
2034
|
+
uid: string;
|
|
2035
|
+
}[];
|
|
1642
2036
|
};
|
|
1643
2037
|
get_org_owner_id: {
|
|
1644
2038
|
Args: {
|
|
@@ -1662,33 +2056,69 @@ export type Database = {
|
|
|
1662
2056
|
Returns: Json[];
|
|
1663
2057
|
};
|
|
1664
2058
|
get_orgs_v6: {
|
|
1665
|
-
Args:
|
|
2059
|
+
Args: never;
|
|
2060
|
+
Returns: {
|
|
2061
|
+
app_count: number;
|
|
2062
|
+
can_use_more: boolean;
|
|
2063
|
+
created_by: string;
|
|
2064
|
+
credit_available: number;
|
|
2065
|
+
credit_next_expiration: string;
|
|
2066
|
+
credit_total: number;
|
|
2067
|
+
gid: string;
|
|
2068
|
+
is_canceled: boolean;
|
|
2069
|
+
is_yearly: boolean;
|
|
2070
|
+
logo: string;
|
|
2071
|
+
management_email: string;
|
|
2072
|
+
name: string;
|
|
2073
|
+
next_stats_update_at: string;
|
|
2074
|
+
paying: boolean;
|
|
2075
|
+
role: string;
|
|
2076
|
+
stats_updated_at: string;
|
|
2077
|
+
subscription_end: string;
|
|
2078
|
+
subscription_start: string;
|
|
2079
|
+
trial_left: number;
|
|
2080
|
+
}[];
|
|
2081
|
+
} | {
|
|
2082
|
+
Args: {
|
|
1666
2083
|
userid: string;
|
|
1667
2084
|
};
|
|
1668
2085
|
Returns: {
|
|
1669
2086
|
app_count: number;
|
|
1670
2087
|
can_use_more: boolean;
|
|
1671
2088
|
created_by: string;
|
|
2089
|
+
credit_available: number;
|
|
2090
|
+
credit_next_expiration: string;
|
|
2091
|
+
credit_total: number;
|
|
1672
2092
|
gid: string;
|
|
1673
2093
|
is_canceled: boolean;
|
|
1674
2094
|
is_yearly: boolean;
|
|
1675
2095
|
logo: string;
|
|
1676
2096
|
management_email: string;
|
|
1677
2097
|
name: string;
|
|
2098
|
+
next_stats_update_at: string;
|
|
1678
2099
|
paying: boolean;
|
|
1679
2100
|
role: string;
|
|
2101
|
+
stats_updated_at: string;
|
|
1680
2102
|
subscription_end: string;
|
|
1681
2103
|
subscription_start: string;
|
|
1682
2104
|
trial_left: number;
|
|
1683
2105
|
}[];
|
|
1684
2106
|
};
|
|
1685
2107
|
get_plan_usage_percent_detailed: {
|
|
2108
|
+
Args: {
|
|
2109
|
+
orgid: string;
|
|
2110
|
+
};
|
|
2111
|
+
Returns: {
|
|
2112
|
+
bandwidth_percent: number;
|
|
2113
|
+
mau_percent: number;
|
|
2114
|
+
storage_percent: number;
|
|
2115
|
+
total_percent: number;
|
|
2116
|
+
}[];
|
|
2117
|
+
} | {
|
|
1686
2118
|
Args: {
|
|
1687
2119
|
cycle_end: string;
|
|
1688
2120
|
cycle_start: string;
|
|
1689
2121
|
orgid: string;
|
|
1690
|
-
} | {
|
|
1691
|
-
orgid: string;
|
|
1692
2122
|
};
|
|
1693
2123
|
Returns: {
|
|
1694
2124
|
bandwidth_percent: number;
|
|
@@ -1698,7 +2128,7 @@ export type Database = {
|
|
|
1698
2128
|
}[];
|
|
1699
2129
|
};
|
|
1700
2130
|
get_process_cron_stats_job_info: {
|
|
1701
|
-
Args:
|
|
2131
|
+
Args: never;
|
|
1702
2132
|
Returns: {
|
|
1703
2133
|
last_run: string;
|
|
1704
2134
|
next_run: string;
|
|
@@ -1712,12 +2142,23 @@ export type Database = {
|
|
|
1712
2142
|
Returns: number;
|
|
1713
2143
|
};
|
|
1714
2144
|
get_total_metrics: {
|
|
2145
|
+
Args: {
|
|
2146
|
+
org_id: string;
|
|
2147
|
+
};
|
|
2148
|
+
Returns: {
|
|
2149
|
+
bandwidth: number;
|
|
2150
|
+
fail: number;
|
|
2151
|
+
get: number;
|
|
2152
|
+
install: number;
|
|
2153
|
+
mau: number;
|
|
2154
|
+
storage: number;
|
|
2155
|
+
uninstall: number;
|
|
2156
|
+
}[];
|
|
2157
|
+
} | {
|
|
1715
2158
|
Args: {
|
|
1716
2159
|
end_date: string;
|
|
1717
2160
|
org_id: string;
|
|
1718
2161
|
start_date: string;
|
|
1719
|
-
} | {
|
|
1720
|
-
org_id: string;
|
|
1721
2162
|
};
|
|
1722
2163
|
Returns: {
|
|
1723
2164
|
bandwidth: number;
|
|
@@ -1736,7 +2177,7 @@ export type Database = {
|
|
|
1736
2177
|
Returns: number;
|
|
1737
2178
|
};
|
|
1738
2179
|
get_update_stats: {
|
|
1739
|
-
Args:
|
|
2180
|
+
Args: never;
|
|
1740
2181
|
Returns: {
|
|
1741
2182
|
app_id: string;
|
|
1742
2183
|
failed: number;
|
|
@@ -1749,11 +2190,14 @@ export type Database = {
|
|
|
1749
2190
|
get_user_id: {
|
|
1750
2191
|
Args: {
|
|
1751
2192
|
apikey: string;
|
|
1752
|
-
} | {
|
|
1753
|
-
apikey: string;
|
|
1754
2193
|
app_id: string;
|
|
1755
2194
|
};
|
|
1756
2195
|
Returns: string;
|
|
2196
|
+
} | {
|
|
2197
|
+
Args: {
|
|
2198
|
+
apikey: string;
|
|
2199
|
+
};
|
|
2200
|
+
Returns: string;
|
|
1757
2201
|
};
|
|
1758
2202
|
get_user_main_org_id: {
|
|
1759
2203
|
Args: {
|
|
@@ -1768,7 +2212,7 @@ export type Database = {
|
|
|
1768
2212
|
Returns: string;
|
|
1769
2213
|
};
|
|
1770
2214
|
get_versions_with_no_metadata: {
|
|
1771
|
-
Args:
|
|
2215
|
+
Args: never;
|
|
1772
2216
|
Returns: {
|
|
1773
2217
|
app_id: string;
|
|
1774
2218
|
checksum: string | null;
|
|
@@ -1789,6 +2233,12 @@ export type Database = {
|
|
|
1789
2233
|
updated_at: string | null;
|
|
1790
2234
|
user_id: string | null;
|
|
1791
2235
|
}[];
|
|
2236
|
+
SetofOptions: {
|
|
2237
|
+
from: "*";
|
|
2238
|
+
to: "app_versions";
|
|
2239
|
+
isOneToOne: false;
|
|
2240
|
+
isSetofReturn: true;
|
|
2241
|
+
};
|
|
1792
2242
|
};
|
|
1793
2243
|
get_weekly_stats: {
|
|
1794
2244
|
Args: {
|
|
@@ -1839,10 +2289,13 @@ export type Database = {
|
|
|
1839
2289
|
Returns: boolean;
|
|
1840
2290
|
};
|
|
1841
2291
|
is_admin: {
|
|
1842
|
-
Args:
|
|
2292
|
+
Args: {
|
|
1843
2293
|
userid: string;
|
|
1844
2294
|
};
|
|
1845
2295
|
Returns: boolean;
|
|
2296
|
+
} | {
|
|
2297
|
+
Args: never;
|
|
2298
|
+
Returns: boolean;
|
|
1846
2299
|
};
|
|
1847
2300
|
is_allowed_action: {
|
|
1848
2301
|
Args: {
|
|
@@ -1867,10 +2320,13 @@ export type Database = {
|
|
|
1867
2320
|
is_allowed_capgkey: {
|
|
1868
2321
|
Args: {
|
|
1869
2322
|
apikey: string;
|
|
1870
|
-
app_id: string;
|
|
1871
2323
|
keymode: Database["public"]["Enums"]["key_mode"][];
|
|
1872
|
-
}
|
|
2324
|
+
};
|
|
2325
|
+
Returns: boolean;
|
|
2326
|
+
} | {
|
|
2327
|
+
Args: {
|
|
1873
2328
|
apikey: string;
|
|
2329
|
+
app_id: string;
|
|
1874
2330
|
keymode: Database["public"]["Enums"]["key_mode"][];
|
|
1875
2331
|
};
|
|
1876
2332
|
Returns: boolean;
|
|
@@ -1879,13 +2335,19 @@ export type Database = {
|
|
|
1879
2335
|
Args: {
|
|
1880
2336
|
apikey: string;
|
|
1881
2337
|
appid: string;
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
|
|
2338
|
+
};
|
|
2339
|
+
Returns: boolean;
|
|
2340
|
+
} | {
|
|
2341
|
+
Args: {
|
|
1885
2342
|
appid: string;
|
|
1886
2343
|
userid: string;
|
|
1887
2344
|
};
|
|
1888
2345
|
Returns: boolean;
|
|
2346
|
+
} | {
|
|
2347
|
+
Args: {
|
|
2348
|
+
appid: string;
|
|
2349
|
+
};
|
|
2350
|
+
Returns: boolean;
|
|
1889
2351
|
};
|
|
1890
2352
|
is_bandwidth_exceeded_by_org: {
|
|
1891
2353
|
Args: {
|
|
@@ -2001,7 +2463,7 @@ export type Database = {
|
|
|
2001
2463
|
Returns: string;
|
|
2002
2464
|
};
|
|
2003
2465
|
one_month_ahead: {
|
|
2004
|
-
Args:
|
|
2466
|
+
Args: never;
|
|
2005
2467
|
Returns: string;
|
|
2006
2468
|
};
|
|
2007
2469
|
parse_cron_field: {
|
|
@@ -2026,41 +2488,65 @@ export type Database = {
|
|
|
2026
2488
|
Returns: undefined;
|
|
2027
2489
|
};
|
|
2028
2490
|
process_admin_stats: {
|
|
2029
|
-
Args:
|
|
2491
|
+
Args: never;
|
|
2030
2492
|
Returns: undefined;
|
|
2031
2493
|
};
|
|
2494
|
+
process_channel_device_counts_queue: {
|
|
2495
|
+
Args: {
|
|
2496
|
+
batch_size?: number;
|
|
2497
|
+
};
|
|
2498
|
+
Returns: number;
|
|
2499
|
+
};
|
|
2032
2500
|
process_cron_stats_jobs: {
|
|
2033
|
-
Args:
|
|
2501
|
+
Args: never;
|
|
2502
|
+
Returns: undefined;
|
|
2503
|
+
};
|
|
2504
|
+
process_cron_sync_sub_jobs: {
|
|
2505
|
+
Args: never;
|
|
2034
2506
|
Returns: undefined;
|
|
2035
2507
|
};
|
|
2036
2508
|
process_d1_replication_batch: {
|
|
2037
|
-
Args:
|
|
2509
|
+
Args: never;
|
|
2038
2510
|
Returns: undefined;
|
|
2039
2511
|
};
|
|
2040
2512
|
process_failed_uploads: {
|
|
2041
|
-
Args:
|
|
2513
|
+
Args: never;
|
|
2042
2514
|
Returns: undefined;
|
|
2043
2515
|
};
|
|
2044
2516
|
process_free_trial_expired: {
|
|
2045
|
-
Args:
|
|
2517
|
+
Args: never;
|
|
2046
2518
|
Returns: undefined;
|
|
2047
2519
|
};
|
|
2048
2520
|
process_function_queue: {
|
|
2049
2521
|
Args: {
|
|
2522
|
+
batch_size?: number;
|
|
2050
2523
|
queue_name: string;
|
|
2051
2524
|
};
|
|
2052
2525
|
Returns: number;
|
|
2053
2526
|
};
|
|
2527
|
+
process_manifest_bundle_counts_queue: {
|
|
2528
|
+
Args: {
|
|
2529
|
+
batch_size?: number;
|
|
2530
|
+
};
|
|
2531
|
+
Returns: number;
|
|
2532
|
+
};
|
|
2054
2533
|
process_stats_email_monthly: {
|
|
2055
|
-
Args:
|
|
2534
|
+
Args: never;
|
|
2056
2535
|
Returns: undefined;
|
|
2057
2536
|
};
|
|
2058
2537
|
process_stats_email_weekly: {
|
|
2059
|
-
Args:
|
|
2538
|
+
Args: never;
|
|
2060
2539
|
Returns: undefined;
|
|
2061
2540
|
};
|
|
2062
2541
|
process_subscribed_orgs: {
|
|
2063
|
-
Args:
|
|
2542
|
+
Args: never;
|
|
2543
|
+
Returns: undefined;
|
|
2544
|
+
};
|
|
2545
|
+
queue_cron_stat_org_for_org: {
|
|
2546
|
+
Args: {
|
|
2547
|
+
customer_id: string;
|
|
2548
|
+
org_id: string;
|
|
2549
|
+
};
|
|
2064
2550
|
Returns: undefined;
|
|
2065
2551
|
};
|
|
2066
2552
|
read_bandwidth_usage: {
|
|
@@ -2116,7 +2602,7 @@ export type Database = {
|
|
|
2116
2602
|
}[];
|
|
2117
2603
|
};
|
|
2118
2604
|
remove_old_jobs: {
|
|
2119
|
-
Args:
|
|
2605
|
+
Args: never;
|
|
2120
2606
|
Returns: undefined;
|
|
2121
2607
|
};
|
|
2122
2608
|
rescind_invitation: {
|
|
@@ -2126,6 +2612,27 @@ export type Database = {
|
|
|
2126
2612
|
};
|
|
2127
2613
|
Returns: string;
|
|
2128
2614
|
};
|
|
2615
|
+
seed_get_app_metrics_caches: {
|
|
2616
|
+
Args: {
|
|
2617
|
+
p_end_date: string;
|
|
2618
|
+
p_org_id: string;
|
|
2619
|
+
p_start_date: string;
|
|
2620
|
+
};
|
|
2621
|
+
Returns: {
|
|
2622
|
+
cached_at: string;
|
|
2623
|
+
end_date: string;
|
|
2624
|
+
id: number;
|
|
2625
|
+
org_id: string;
|
|
2626
|
+
response: Json;
|
|
2627
|
+
start_date: string;
|
|
2628
|
+
};
|
|
2629
|
+
SetofOptions: {
|
|
2630
|
+
from: "*";
|
|
2631
|
+
to: "app_metrics_cache";
|
|
2632
|
+
isOneToOne: true;
|
|
2633
|
+
isSetofReturn: false;
|
|
2634
|
+
};
|
|
2635
|
+
};
|
|
2129
2636
|
set_bandwidth_exceeded_by_org: {
|
|
2130
2637
|
Args: {
|
|
2131
2638
|
disabled: boolean;
|
|
@@ -2147,6 +2654,10 @@ export type Database = {
|
|
|
2147
2654
|
};
|
|
2148
2655
|
Returns: undefined;
|
|
2149
2656
|
};
|
|
2657
|
+
total_bundle_storage_bytes: {
|
|
2658
|
+
Args: never;
|
|
2659
|
+
Returns: number;
|
|
2660
|
+
};
|
|
2150
2661
|
transfer_app: {
|
|
2151
2662
|
Args: {
|
|
2152
2663
|
p_app_id: string;
|
|
@@ -2167,7 +2678,7 @@ export type Database = {
|
|
|
2167
2678
|
Returns: Database["public"]["Enums"]["user_min_right"];
|
|
2168
2679
|
};
|
|
2169
2680
|
update_app_versions_retention: {
|
|
2170
|
-
Args:
|
|
2681
|
+
Args: never;
|
|
2171
2682
|
Returns: undefined;
|
|
2172
2683
|
};
|
|
2173
2684
|
upsert_version_meta: {
|
|
@@ -2179,18 +2690,20 @@ export type Database = {
|
|
|
2179
2690
|
Returns: boolean;
|
|
2180
2691
|
};
|
|
2181
2692
|
verify_mfa: {
|
|
2182
|
-
Args:
|
|
2693
|
+
Args: never;
|
|
2183
2694
|
Returns: boolean;
|
|
2184
2695
|
};
|
|
2185
2696
|
};
|
|
2186
2697
|
Enums: {
|
|
2187
2698
|
action_type: "mau" | "storage" | "bandwidth";
|
|
2188
2699
|
app_mode: "prod" | "dev" | "livereload";
|
|
2700
|
+
credit_metric_type: "mau" | "bandwidth" | "storage";
|
|
2701
|
+
credit_transaction_type: "grant" | "purchase" | "manual_grant" | "deduction" | "expiry" | "refund";
|
|
2189
2702
|
disable_update: "major" | "minor" | "patch" | "version_number" | "none";
|
|
2190
2703
|
key_mode: "read" | "write" | "all" | "upload";
|
|
2191
2704
|
pay_as_you_go_type: "base" | "units";
|
|
2192
2705
|
platform_os: "ios" | "android";
|
|
2193
|
-
stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableEmulator" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "InvalidIp";
|
|
2706
|
+
stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableEmulator" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "ping" | "InvalidIp" | "blocked_by_server_url" | "download_manifest_start" | "download_manifest_complete" | "download_zip_start" | "download_zip_complete" | "download_manifest_file_fail" | "download_manifest_checksum_fail" | "download_manifest_brotli_fail" | "backend_refusal";
|
|
2194
2707
|
stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
|
|
2195
2708
|
usage_mode: "5min" | "day" | "month" | "cycle" | "last_saved";
|
|
2196
2709
|
user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
|
|
@@ -2288,11 +2801,13 @@ export declare const Constants: {
|
|
|
2288
2801
|
readonly Enums: {
|
|
2289
2802
|
readonly action_type: readonly ["mau", "storage", "bandwidth"];
|
|
2290
2803
|
readonly app_mode: readonly ["prod", "dev", "livereload"];
|
|
2804
|
+
readonly credit_metric_type: readonly ["mau", "bandwidth", "storage"];
|
|
2805
|
+
readonly credit_transaction_type: readonly ["grant", "purchase", "manual_grant", "deduction", "expiry", "refund"];
|
|
2291
2806
|
readonly disable_update: readonly ["major", "minor", "patch", "version_number", "none"];
|
|
2292
2807
|
readonly key_mode: readonly ["read", "write", "all", "upload"];
|
|
2293
2808
|
readonly pay_as_you_go_type: readonly ["base", "units"];
|
|
2294
2809
|
readonly platform_os: readonly ["ios", "android"];
|
|
2295
|
-
readonly stats_action: readonly ["delete", "reset", "set", "get", "set_fail", "update_fail", "download_fail", "windows_path_fail", "canonical_path_fail", "directory_path_fail", "unzip_fail", "low_mem_fail", "download_10", "download_20", "download_30", "download_40", "download_50", "download_60", "download_70", "download_80", "download_90", "download_complete", "decrypt_fail", "app_moved_to_foreground", "app_moved_to_background", "uninstall", "needPlanUpgrade", "missingBundle", "noNew", "disablePlatformIos", "disablePlatformAndroid", "disableAutoUpdateToMajor", "cannotUpdateViaPrivateChannel", "disableAutoUpdateToMinor", "disableAutoUpdateToPatch", "channelMisconfigured", "disableAutoUpdateMetadata", "disableAutoUpdateUnderNative", "disableDevBuild", "disableEmulator", "cannotGetBundle", "checksum_fail", "NoChannelOrOverride", "setChannel", "getChannel", "rateLimited", "disableAutoUpdate", "InvalidIp"];
|
|
2810
|
+
readonly stats_action: readonly ["delete", "reset", "set", "get", "set_fail", "update_fail", "download_fail", "windows_path_fail", "canonical_path_fail", "directory_path_fail", "unzip_fail", "low_mem_fail", "download_10", "download_20", "download_30", "download_40", "download_50", "download_60", "download_70", "download_80", "download_90", "download_complete", "decrypt_fail", "app_moved_to_foreground", "app_moved_to_background", "uninstall", "needPlanUpgrade", "missingBundle", "noNew", "disablePlatformIos", "disablePlatformAndroid", "disableAutoUpdateToMajor", "cannotUpdateViaPrivateChannel", "disableAutoUpdateToMinor", "disableAutoUpdateToPatch", "channelMisconfigured", "disableAutoUpdateMetadata", "disableAutoUpdateUnderNative", "disableDevBuild", "disableEmulator", "cannotGetBundle", "checksum_fail", "NoChannelOrOverride", "setChannel", "getChannel", "rateLimited", "disableAutoUpdate", "ping", "InvalidIp", "blocked_by_server_url", "download_manifest_start", "download_manifest_complete", "download_zip_start", "download_zip_complete", "download_manifest_file_fail", "download_manifest_checksum_fail", "download_manifest_brotli_fail", "backend_refusal"];
|
|
2296
2811
|
readonly stripe_status: readonly ["created", "succeeded", "updated", "failed", "deleted", "canceled"];
|
|
2297
2812
|
readonly usage_mode: readonly ["5min", "day", "month", "cycle", "last_saved"];
|
|
2298
2813
|
readonly user_min_right: readonly ["invite_read", "invite_upload", "invite_write", "invite_admin", "invite_super_admin", "read", "upload", "write", "admin", "super_admin"];
|