@capgo/cli 4.10.7 → 4.10.8
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 +7 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/types/supabase.types.ts +51 -172
- package/src/utils.ts +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [4.10.8](https://github.com/Cap-go/CLI/compare/v4.10.7...v4.10.8) (2024-05-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* lint and updates types ([1b3313f](https://github.com/Cap-go/CLI/commit/1b3313f6b165c88b57ea64c7cb2544c05a6921df))
|
|
11
|
+
|
|
5
12
|
### [4.10.7](https://github.com/Cap-go/CLI/compare/v4.10.6...v4.10.7) (2024-05-27)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.js
CHANGED
|
@@ -109804,7 +109804,7 @@ async function getUserId(options) {
|
|
|
109804
109804
|
// package.json
|
|
109805
109805
|
var package_default = {
|
|
109806
109806
|
name: "@capgo/cli",
|
|
109807
|
-
version: "4.10.
|
|
109807
|
+
version: "4.10.8",
|
|
109808
109808
|
description: "A CLI to upload to capgo servers",
|
|
109809
109809
|
author: "github.com/riderx",
|
|
109810
109810
|
license: "Apache 2.0",
|
package/package.json
CHANGED
|
@@ -411,129 +411,6 @@ export interface Database {
|
|
|
411
411
|
},
|
|
412
412
|
]
|
|
413
413
|
}
|
|
414
|
-
clickhouse_app_usage_parm: {
|
|
415
|
-
Row: {
|
|
416
|
-
_app_list: string | null
|
|
417
|
-
_end_date: string | null
|
|
418
|
-
_start_date: string | null
|
|
419
|
-
app_id: string | null
|
|
420
|
-
bandwidth: number | null
|
|
421
|
-
date: string | null
|
|
422
|
-
fail: number | null
|
|
423
|
-
get: number | null
|
|
424
|
-
install: number | null
|
|
425
|
-
mau: number | null
|
|
426
|
-
storage_added: number | null
|
|
427
|
-
storage_deleted: number | null
|
|
428
|
-
uninstall: number | null
|
|
429
|
-
}
|
|
430
|
-
Insert: {
|
|
431
|
-
_app_list?: string | null
|
|
432
|
-
_end_date?: string | null
|
|
433
|
-
_start_date?: string | null
|
|
434
|
-
app_id?: string | null
|
|
435
|
-
bandwidth?: number | null
|
|
436
|
-
date?: string | null
|
|
437
|
-
fail?: number | null
|
|
438
|
-
get?: number | null
|
|
439
|
-
install?: number | null
|
|
440
|
-
mau?: number | null
|
|
441
|
-
storage_added?: number | null
|
|
442
|
-
storage_deleted?: number | null
|
|
443
|
-
uninstall?: number | null
|
|
444
|
-
}
|
|
445
|
-
Update: {
|
|
446
|
-
_app_list?: string | null
|
|
447
|
-
_end_date?: string | null
|
|
448
|
-
_start_date?: string | null
|
|
449
|
-
app_id?: string | null
|
|
450
|
-
bandwidth?: number | null
|
|
451
|
-
date?: string | null
|
|
452
|
-
fail?: number | null
|
|
453
|
-
get?: number | null
|
|
454
|
-
install?: number | null
|
|
455
|
-
mau?: number | null
|
|
456
|
-
storage_added?: number | null
|
|
457
|
-
storage_deleted?: number | null
|
|
458
|
-
uninstall?: number | null
|
|
459
|
-
}
|
|
460
|
-
Relationships: []
|
|
461
|
-
}
|
|
462
|
-
clickhouse_devices: {
|
|
463
|
-
Row: {
|
|
464
|
-
app_id: string | null
|
|
465
|
-
created_at: string | null
|
|
466
|
-
custom_id: string | null
|
|
467
|
-
device_id: string | null
|
|
468
|
-
is_emulator: boolean | null
|
|
469
|
-
is_prod: boolean | null
|
|
470
|
-
os_version: string | null
|
|
471
|
-
platform: string | null
|
|
472
|
-
plugin_version: string | null
|
|
473
|
-
updated_at: string | null
|
|
474
|
-
version: number | null
|
|
475
|
-
version_build: string | null
|
|
476
|
-
}
|
|
477
|
-
Insert: {
|
|
478
|
-
app_id?: string | null
|
|
479
|
-
created_at?: string | null
|
|
480
|
-
custom_id?: string | null
|
|
481
|
-
device_id?: string | null
|
|
482
|
-
is_emulator?: boolean | null
|
|
483
|
-
is_prod?: boolean | null
|
|
484
|
-
os_version?: string | null
|
|
485
|
-
platform?: string | null
|
|
486
|
-
plugin_version?: string | null
|
|
487
|
-
updated_at?: string | null
|
|
488
|
-
version?: number | null
|
|
489
|
-
version_build?: string | null
|
|
490
|
-
}
|
|
491
|
-
Update: {
|
|
492
|
-
app_id?: string | null
|
|
493
|
-
created_at?: string | null
|
|
494
|
-
custom_id?: string | null
|
|
495
|
-
device_id?: string | null
|
|
496
|
-
is_emulator?: boolean | null
|
|
497
|
-
is_prod?: boolean | null
|
|
498
|
-
os_version?: string | null
|
|
499
|
-
platform?: string | null
|
|
500
|
-
plugin_version?: string | null
|
|
501
|
-
updated_at?: string | null
|
|
502
|
-
version?: number | null
|
|
503
|
-
version_build?: string | null
|
|
504
|
-
}
|
|
505
|
-
Relationships: []
|
|
506
|
-
}
|
|
507
|
-
clickhouse_logs: {
|
|
508
|
-
Row: {
|
|
509
|
-
action: string | null
|
|
510
|
-
app_id: string | null
|
|
511
|
-
created_at: string | null
|
|
512
|
-
device_id: string | null
|
|
513
|
-
platform: string | null
|
|
514
|
-
version: number | null
|
|
515
|
-
version_build: string | null
|
|
516
|
-
}
|
|
517
|
-
Insert: {
|
|
518
|
-
action?: string | null
|
|
519
|
-
app_id?: string | null
|
|
520
|
-
created_at?: string | null
|
|
521
|
-
device_id?: string | null
|
|
522
|
-
platform?: string | null
|
|
523
|
-
version?: number | null
|
|
524
|
-
version_build?: string | null
|
|
525
|
-
}
|
|
526
|
-
Update: {
|
|
527
|
-
action?: string | null
|
|
528
|
-
app_id?: string | null
|
|
529
|
-
created_at?: string | null
|
|
530
|
-
device_id?: string | null
|
|
531
|
-
platform?: string | null
|
|
532
|
-
version?: number | null
|
|
533
|
-
version_build?: string | null
|
|
534
|
-
}
|
|
535
|
-
Relationships: []
|
|
536
|
-
}
|
|
537
414
|
daily_bandwidth: {
|
|
538
415
|
Row: {
|
|
539
416
|
app_id: string
|
|
@@ -669,13 +546,12 @@ export interface Database {
|
|
|
669
546
|
devices: {
|
|
670
547
|
Row: {
|
|
671
548
|
app_id: string
|
|
672
|
-
created_at: string
|
|
673
549
|
custom_id: string
|
|
674
550
|
device_id: string
|
|
675
551
|
is_emulator: boolean | null
|
|
676
552
|
is_prod: boolean | null
|
|
677
553
|
os_version: string | null
|
|
678
|
-
platform: Database['public']['Enums']['platform_os']
|
|
554
|
+
platform: Database['public']['Enums']['platform_os']
|
|
679
555
|
plugin_version: string
|
|
680
556
|
updated_at: string
|
|
681
557
|
version: number
|
|
@@ -683,13 +559,12 @@ export interface Database {
|
|
|
683
559
|
}
|
|
684
560
|
Insert: {
|
|
685
561
|
app_id: string
|
|
686
|
-
created_at: string
|
|
687
562
|
custom_id?: string
|
|
688
563
|
device_id: string
|
|
689
564
|
is_emulator?: boolean | null
|
|
690
565
|
is_prod?: boolean | null
|
|
691
566
|
os_version?: string | null
|
|
692
|
-
platform
|
|
567
|
+
platform: Database['public']['Enums']['platform_os']
|
|
693
568
|
plugin_version?: string
|
|
694
569
|
updated_at: string
|
|
695
570
|
version: number
|
|
@@ -697,13 +572,12 @@ export interface Database {
|
|
|
697
572
|
}
|
|
698
573
|
Update: {
|
|
699
574
|
app_id?: string
|
|
700
|
-
created_at?: string
|
|
701
575
|
custom_id?: string
|
|
702
576
|
device_id?: string
|
|
703
577
|
is_emulator?: boolean | null
|
|
704
578
|
is_prod?: boolean | null
|
|
705
579
|
os_version?: string | null
|
|
706
|
-
platform?: Database['public']['Enums']['platform_os']
|
|
580
|
+
platform?: Database['public']['Enums']['platform_os']
|
|
707
581
|
plugin_version?: string
|
|
708
582
|
updated_at?: string
|
|
709
583
|
version?: number
|
|
@@ -1072,31 +946,25 @@ export interface Database {
|
|
|
1072
946
|
}
|
|
1073
947
|
stats: {
|
|
1074
948
|
Row: {
|
|
1075
|
-
action:
|
|
949
|
+
action: Database['public']['Enums']['stats_action']
|
|
1076
950
|
app_id: string
|
|
1077
951
|
created_at: string
|
|
1078
952
|
device_id: string
|
|
1079
|
-
platform: Database['public']['Enums']['platform_os']
|
|
1080
953
|
version: number
|
|
1081
|
-
version_build: string
|
|
1082
954
|
}
|
|
1083
955
|
Insert: {
|
|
1084
|
-
action:
|
|
956
|
+
action: Database['public']['Enums']['stats_action']
|
|
1085
957
|
app_id: string
|
|
1086
958
|
created_at: string
|
|
1087
959
|
device_id: string
|
|
1088
|
-
platform: Database['public']['Enums']['platform_os']
|
|
1089
960
|
version: number
|
|
1090
|
-
version_build: string
|
|
1091
961
|
}
|
|
1092
962
|
Update: {
|
|
1093
|
-
action?:
|
|
963
|
+
action?: Database['public']['Enums']['stats_action']
|
|
1094
964
|
app_id?: string
|
|
1095
965
|
created_at?: string
|
|
1096
966
|
device_id?: string
|
|
1097
|
-
platform?: Database['public']['Enums']['platform_os']
|
|
1098
967
|
version?: number
|
|
1099
|
-
version_build?: string
|
|
1100
968
|
}
|
|
1101
969
|
Relationships: []
|
|
1102
970
|
}
|
|
@@ -1266,19 +1134,19 @@ export interface Database {
|
|
|
1266
1134
|
}
|
|
1267
1135
|
version_usage: {
|
|
1268
1136
|
Row: {
|
|
1269
|
-
action:
|
|
1137
|
+
action: Database['public']['Enums']['version_action']
|
|
1270
1138
|
app_id: string
|
|
1271
1139
|
timestamp: string
|
|
1272
1140
|
version_id: number
|
|
1273
1141
|
}
|
|
1274
1142
|
Insert: {
|
|
1275
|
-
action:
|
|
1143
|
+
action: Database['public']['Enums']['version_action']
|
|
1276
1144
|
app_id: string
|
|
1277
1145
|
timestamp?: string
|
|
1278
1146
|
version_id: number
|
|
1279
1147
|
}
|
|
1280
1148
|
Update: {
|
|
1281
|
-
action?:
|
|
1149
|
+
action?: Database['public']['Enums']['version_action']
|
|
1282
1150
|
app_id?: string
|
|
1283
1151
|
timestamp?: string
|
|
1284
1152
|
version_id?: number
|
|
@@ -1608,6 +1476,13 @@ export interface Database {
|
|
|
1608
1476
|
role: Database['public']['Enums']['user_min_right']
|
|
1609
1477
|
}[]
|
|
1610
1478
|
}
|
|
1479
|
+
get_org_owner_id: {
|
|
1480
|
+
Args: {
|
|
1481
|
+
apikey: string
|
|
1482
|
+
app_id: string
|
|
1483
|
+
}
|
|
1484
|
+
Returns: string
|
|
1485
|
+
}
|
|
1611
1486
|
get_org_perm_for_apikey: {
|
|
1612
1487
|
Args: {
|
|
1613
1488
|
apikey: string
|
|
@@ -1717,16 +1592,6 @@ export interface Database {
|
|
|
1717
1592
|
uninstall: number
|
|
1718
1593
|
}[]
|
|
1719
1594
|
}
|
|
1720
|
-
get_total_stats_v5_org: {
|
|
1721
|
-
Args: {
|
|
1722
|
-
orgid: string
|
|
1723
|
-
}
|
|
1724
|
-
Returns: {
|
|
1725
|
-
mau: number
|
|
1726
|
-
bandwidth: number
|
|
1727
|
-
storage: number
|
|
1728
|
-
}[]
|
|
1729
|
-
}
|
|
1730
1595
|
get_total_storage_size:
|
|
1731
1596
|
| {
|
|
1732
1597
|
Args: {
|
|
@@ -1798,6 +1663,14 @@ export interface Database {
|
|
|
1798
1663
|
}
|
|
1799
1664
|
Returns: boolean
|
|
1800
1665
|
}
|
|
1666
|
+
http_post_helper: {
|
|
1667
|
+
Args: {
|
|
1668
|
+
function_name: string
|
|
1669
|
+
function_type: string
|
|
1670
|
+
body: Json
|
|
1671
|
+
}
|
|
1672
|
+
Returns: number
|
|
1673
|
+
}
|
|
1801
1674
|
invite_user_to_org: {
|
|
1802
1675
|
Args: {
|
|
1803
1676
|
email: string
|
|
@@ -1846,27 +1719,6 @@ export interface Database {
|
|
|
1846
1719
|
}
|
|
1847
1720
|
Returns: boolean
|
|
1848
1721
|
}
|
|
1849
|
-
| {
|
|
1850
|
-
Args: {
|
|
1851
|
-
apikey: string
|
|
1852
|
-
keymode: Database['public']['Enums']['key_mode'][]
|
|
1853
|
-
app_id: string
|
|
1854
|
-
channel_id: number
|
|
1855
|
-
right: Database['public']['Enums']['user_min_right']
|
|
1856
|
-
user_id: string
|
|
1857
|
-
}
|
|
1858
|
-
Returns: boolean
|
|
1859
|
-
}
|
|
1860
|
-
| {
|
|
1861
|
-
Args: {
|
|
1862
|
-
apikey: string
|
|
1863
|
-
keymode: Database['public']['Enums']['key_mode'][]
|
|
1864
|
-
app_id: string
|
|
1865
|
-
right: Database['public']['Enums']['user_min_right']
|
|
1866
|
-
user_id: string
|
|
1867
|
-
}
|
|
1868
|
-
Returns: boolean
|
|
1869
|
-
}
|
|
1870
1722
|
is_app_owner:
|
|
1871
1723
|
| {
|
|
1872
1724
|
Args: {
|
|
@@ -2061,6 +1913,32 @@ export interface Database {
|
|
|
2061
1913
|
pay_as_you_go_type: 'base' | 'units'
|
|
2062
1914
|
platform_os: 'ios' | 'android'
|
|
2063
1915
|
queue_job_status: 'inserted' | 'requested' | 'failed'
|
|
1916
|
+
stats_action:
|
|
1917
|
+
| 'delete'
|
|
1918
|
+
| 'reset'
|
|
1919
|
+
| 'set'
|
|
1920
|
+
| 'get'
|
|
1921
|
+
| 'set_fail'
|
|
1922
|
+
| 'update_fail'
|
|
1923
|
+
| 'download_fail'
|
|
1924
|
+
| 'windows_path_fail'
|
|
1925
|
+
| 'canonical_path_fail'
|
|
1926
|
+
| 'directory_path_fail'
|
|
1927
|
+
| 'unzip_fail'
|
|
1928
|
+
| 'low_mem_fail'
|
|
1929
|
+
| 'download_10'
|
|
1930
|
+
| 'download_20'
|
|
1931
|
+
| 'download_30'
|
|
1932
|
+
| 'download_40'
|
|
1933
|
+
| 'download_50'
|
|
1934
|
+
| 'download_60'
|
|
1935
|
+
| 'download_70'
|
|
1936
|
+
| 'download_80'
|
|
1937
|
+
| 'download_90'
|
|
1938
|
+
| 'download_complete'
|
|
1939
|
+
| 'decrypt_fail'
|
|
1940
|
+
| 'app_moved_to_foreground'
|
|
1941
|
+
| 'app_moved_to_background'
|
|
2064
1942
|
stripe_status:
|
|
2065
1943
|
| 'created'
|
|
2066
1944
|
| 'succeeded'
|
|
@@ -2081,6 +1959,7 @@ export interface Database {
|
|
|
2081
1959
|
| 'admin'
|
|
2082
1960
|
| 'super_admin'
|
|
2083
1961
|
user_role: 'read' | 'upload' | 'write' | 'admin'
|
|
1962
|
+
version_action: 'get' | 'fail' | 'install' | 'uninstall'
|
|
2084
1963
|
}
|
|
2085
1964
|
CompositeTypes: {
|
|
2086
1965
|
match_plan: {
|
package/src/utils.ts
CHANGED
|
@@ -134,13 +134,6 @@ export async function checkKey(supabase: SupabaseClient<Database>, apikey: strin
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
export async function isGoodPlan(supabase: SupabaseClient<Database>, userId: string): Promise<boolean> {
|
|
138
|
-
const { data } = await supabase
|
|
139
|
-
.rpc('is_good_plan_v5', { userid: userId })
|
|
140
|
-
.single()
|
|
141
|
-
return data || false
|
|
142
|
-
}
|
|
143
|
-
|
|
144
137
|
export async function isPayingOrg(supabase: SupabaseClient<Database>, orgId: string): Promise<boolean> {
|
|
145
138
|
const { data } = await supabase
|
|
146
139
|
.rpc('is_paying_org', { orgid: orgId })
|