@capgo/cli 3.13.10 → 3.13.13
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 +16 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/api/app.ts +5 -5
- package/src/app/add.ts +3 -12
- package/src/app/debug.ts +1 -1
- package/src/app/delete.ts +2 -2
- package/src/app/list.ts +1 -1
- package/src/app/set.ts +1 -1
- package/src/bundle/cleanup.ts +1 -1
- package/src/bundle/delete.ts +1 -1
- package/src/bundle/list.ts +1 -1
- package/src/bundle/unlink.ts +2 -2
- package/src/bundle/upload.ts +2 -19
- package/src/channel/add.ts +2 -2
- package/src/channel/delete.ts +2 -2
- package/src/channel/list.ts +2 -2
- package/src/channel/set.ts +4 -4
- package/src/types/supabase.types.ts +448 -41
- package/src/utils.ts +6 -2
|
@@ -3,7 +3,7 @@ export type Json =
|
|
|
3
3
|
| number
|
|
4
4
|
| boolean
|
|
5
5
|
| null
|
|
6
|
-
| { [key: string]: Json }
|
|
6
|
+
| { [key: string]: Json | undefined }
|
|
7
7
|
| Json[]
|
|
8
8
|
|
|
9
9
|
export interface Database {
|
|
@@ -34,6 +34,14 @@ export interface Database {
|
|
|
34
34
|
updated_at?: string | null
|
|
35
35
|
user_id?: string
|
|
36
36
|
}
|
|
37
|
+
Relationships: [
|
|
38
|
+
{
|
|
39
|
+
foreignKeyName: "apikeys_user_id_fkey"
|
|
40
|
+
columns: ["user_id"]
|
|
41
|
+
referencedRelation: "users"
|
|
42
|
+
referencedColumns: ["id"]
|
|
43
|
+
}
|
|
44
|
+
]
|
|
37
45
|
}
|
|
38
46
|
app_live: {
|
|
39
47
|
Row: {
|
|
@@ -54,6 +62,14 @@ export interface Database {
|
|
|
54
62
|
updated_at?: string | null
|
|
55
63
|
url?: string
|
|
56
64
|
}
|
|
65
|
+
Relationships: [
|
|
66
|
+
{
|
|
67
|
+
foreignKeyName: "app_live_id_fkey"
|
|
68
|
+
columns: ["id"]
|
|
69
|
+
referencedRelation: "users"
|
|
70
|
+
referencedColumns: ["id"]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
57
73
|
}
|
|
58
74
|
app_stats: {
|
|
59
75
|
Row: {
|
|
@@ -104,6 +120,50 @@ export interface Database {
|
|
|
104
120
|
version_size?: number
|
|
105
121
|
versions?: number
|
|
106
122
|
}
|
|
123
|
+
Relationships: [
|
|
124
|
+
{
|
|
125
|
+
foreignKeyName: "app_stats_app_id_fkey"
|
|
126
|
+
columns: ["app_id"]
|
|
127
|
+
referencedRelation: "apps"
|
|
128
|
+
referencedColumns: ["app_id"]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
foreignKeyName: "app_stats_user_id_fkey"
|
|
132
|
+
columns: ["user_id"]
|
|
133
|
+
referencedRelation: "users"
|
|
134
|
+
referencedColumns: ["id"]
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
app_usage: {
|
|
139
|
+
Row: {
|
|
140
|
+
app_id: string
|
|
141
|
+
bandwidth: number
|
|
142
|
+
created_at: string | null
|
|
143
|
+
id: string
|
|
144
|
+
mau: number
|
|
145
|
+
mode: Database["public"]["Enums"]["usage_mode"]
|
|
146
|
+
storage: number
|
|
147
|
+
}
|
|
148
|
+
Insert: {
|
|
149
|
+
app_id: string
|
|
150
|
+
bandwidth?: number
|
|
151
|
+
created_at?: string | null
|
|
152
|
+
id?: string
|
|
153
|
+
mau?: number
|
|
154
|
+
mode?: Database["public"]["Enums"]["usage_mode"]
|
|
155
|
+
storage?: number
|
|
156
|
+
}
|
|
157
|
+
Update: {
|
|
158
|
+
app_id?: string
|
|
159
|
+
bandwidth?: number
|
|
160
|
+
created_at?: string | null
|
|
161
|
+
id?: string
|
|
162
|
+
mau?: number
|
|
163
|
+
mode?: Database["public"]["Enums"]["usage_mode"]
|
|
164
|
+
storage?: number
|
|
165
|
+
}
|
|
166
|
+
Relationships: []
|
|
107
167
|
}
|
|
108
168
|
app_versions: {
|
|
109
169
|
Row: {
|
|
@@ -148,6 +208,20 @@ export interface Database {
|
|
|
148
208
|
updated_at?: string | null
|
|
149
209
|
user_id?: string
|
|
150
210
|
}
|
|
211
|
+
Relationships: [
|
|
212
|
+
{
|
|
213
|
+
foreignKeyName: "app_versions_app_id_fkey"
|
|
214
|
+
columns: ["app_id"]
|
|
215
|
+
referencedRelation: "apps"
|
|
216
|
+
referencedColumns: ["app_id"]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
foreignKeyName: "app_versions_user_id_fkey"
|
|
220
|
+
columns: ["user_id"]
|
|
221
|
+
referencedRelation: "users"
|
|
222
|
+
referencedColumns: ["id"]
|
|
223
|
+
}
|
|
224
|
+
]
|
|
151
225
|
}
|
|
152
226
|
app_versions_meta: {
|
|
153
227
|
Row: {
|
|
@@ -189,6 +263,26 @@ export interface Database {
|
|
|
189
263
|
updated_at?: string | null
|
|
190
264
|
user_id?: string
|
|
191
265
|
}
|
|
266
|
+
Relationships: [
|
|
267
|
+
{
|
|
268
|
+
foreignKeyName: "app_versions_meta_app_id_fkey"
|
|
269
|
+
columns: ["app_id"]
|
|
270
|
+
referencedRelation: "apps"
|
|
271
|
+
referencedColumns: ["app_id"]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
foreignKeyName: "app_versions_meta_id_fkey"
|
|
275
|
+
columns: ["id"]
|
|
276
|
+
referencedRelation: "app_versions"
|
|
277
|
+
referencedColumns: ["id"]
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
foreignKeyName: "app_versions_meta_user_id_fkey"
|
|
281
|
+
columns: ["user_id"]
|
|
282
|
+
referencedRelation: "users"
|
|
283
|
+
referencedColumns: ["id"]
|
|
284
|
+
}
|
|
285
|
+
]
|
|
192
286
|
}
|
|
193
287
|
apps: {
|
|
194
288
|
Row: {
|
|
@@ -224,6 +318,14 @@ export interface Database {
|
|
|
224
318
|
updated_at?: string | null
|
|
225
319
|
user_id?: string
|
|
226
320
|
}
|
|
321
|
+
Relationships: [
|
|
322
|
+
{
|
|
323
|
+
foreignKeyName: "apps_user_id_fkey"
|
|
324
|
+
columns: ["user_id"]
|
|
325
|
+
referencedRelation: "users"
|
|
326
|
+
referencedColumns: ["id"]
|
|
327
|
+
}
|
|
328
|
+
]
|
|
227
329
|
}
|
|
228
330
|
channel_devices: {
|
|
229
331
|
Row: {
|
|
@@ -250,6 +352,32 @@ export interface Database {
|
|
|
250
352
|
device_id?: string
|
|
251
353
|
updated_at?: string
|
|
252
354
|
}
|
|
355
|
+
Relationships: [
|
|
356
|
+
{
|
|
357
|
+
foreignKeyName: "channel_devices_app_id_fkey"
|
|
358
|
+
columns: ["app_id"]
|
|
359
|
+
referencedRelation: "apps"
|
|
360
|
+
referencedColumns: ["app_id"]
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
foreignKeyName: "channel_devices_channel_id_fkey"
|
|
364
|
+
columns: ["channel_id"]
|
|
365
|
+
referencedRelation: "channels"
|
|
366
|
+
referencedColumns: ["id"]
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
foreignKeyName: "channel_devices_created_by_fkey"
|
|
370
|
+
columns: ["created_by"]
|
|
371
|
+
referencedRelation: "users"
|
|
372
|
+
referencedColumns: ["id"]
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
foreignKeyName: "channel_devices_device_id_fkey"
|
|
376
|
+
columns: ["device_id"]
|
|
377
|
+
referencedRelation: "devices"
|
|
378
|
+
referencedColumns: ["device_id"]
|
|
379
|
+
}
|
|
380
|
+
]
|
|
253
381
|
}
|
|
254
382
|
channel_users: {
|
|
255
383
|
Row: {
|
|
@@ -279,6 +407,32 @@ export interface Database {
|
|
|
279
407
|
updated_at?: string
|
|
280
408
|
user_id?: string
|
|
281
409
|
}
|
|
410
|
+
Relationships: [
|
|
411
|
+
{
|
|
412
|
+
foreignKeyName: "channel_users_app_id_fkey"
|
|
413
|
+
columns: ["app_id"]
|
|
414
|
+
referencedRelation: "apps"
|
|
415
|
+
referencedColumns: ["app_id"]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
foreignKeyName: "channel_users_channel_id_fkey"
|
|
419
|
+
columns: ["channel_id"]
|
|
420
|
+
referencedRelation: "channels"
|
|
421
|
+
referencedColumns: ["id"]
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
foreignKeyName: "channel_users_created_by_fkey"
|
|
425
|
+
columns: ["created_by"]
|
|
426
|
+
referencedRelation: "users"
|
|
427
|
+
referencedColumns: ["id"]
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
foreignKeyName: "channel_users_user_id_fkey"
|
|
431
|
+
columns: ["user_id"]
|
|
432
|
+
referencedRelation: "users"
|
|
433
|
+
referencedColumns: ["id"]
|
|
434
|
+
}
|
|
435
|
+
]
|
|
282
436
|
}
|
|
283
437
|
channels: {
|
|
284
438
|
Row: {
|
|
@@ -299,7 +453,7 @@ export interface Database {
|
|
|
299
453
|
name: string
|
|
300
454
|
public: boolean
|
|
301
455
|
secondaryVersionPercentage: number
|
|
302
|
-
secondVersion: number
|
|
456
|
+
secondVersion: number | null
|
|
303
457
|
updated_at: string
|
|
304
458
|
version: number
|
|
305
459
|
}
|
|
@@ -321,9 +475,9 @@ export interface Database {
|
|
|
321
475
|
name: string
|
|
322
476
|
public?: boolean
|
|
323
477
|
secondaryVersionPercentage?: number
|
|
324
|
-
secondVersion?: number
|
|
478
|
+
secondVersion?: number | null
|
|
325
479
|
updated_at?: string
|
|
326
|
-
version
|
|
480
|
+
version: number
|
|
327
481
|
}
|
|
328
482
|
Update: {
|
|
329
483
|
allow_dev?: boolean
|
|
@@ -343,10 +497,36 @@ export interface Database {
|
|
|
343
497
|
name?: string
|
|
344
498
|
public?: boolean
|
|
345
499
|
secondaryVersionPercentage?: number
|
|
346
|
-
secondVersion?: number
|
|
500
|
+
secondVersion?: number | null
|
|
347
501
|
updated_at?: string
|
|
348
502
|
version?: number
|
|
349
503
|
}
|
|
504
|
+
Relationships: [
|
|
505
|
+
{
|
|
506
|
+
foreignKeyName: "channels_app_id_fkey"
|
|
507
|
+
columns: ["app_id"]
|
|
508
|
+
referencedRelation: "apps"
|
|
509
|
+
referencedColumns: ["app_id"]
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
foreignKeyName: "channels_created_by_fkey"
|
|
513
|
+
columns: ["created_by"]
|
|
514
|
+
referencedRelation: "users"
|
|
515
|
+
referencedColumns: ["id"]
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
foreignKeyName: "channels_secondVersion_fkey"
|
|
519
|
+
columns: ["secondVersion"]
|
|
520
|
+
referencedRelation: "app_versions"
|
|
521
|
+
referencedColumns: ["id"]
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
foreignKeyName: "channels_version_fkey"
|
|
525
|
+
columns: ["version"]
|
|
526
|
+
referencedRelation: "app_versions"
|
|
527
|
+
referencedColumns: ["id"]
|
|
528
|
+
}
|
|
529
|
+
]
|
|
350
530
|
}
|
|
351
531
|
deleted_account: {
|
|
352
532
|
Row: {
|
|
@@ -356,7 +536,7 @@ export interface Database {
|
|
|
356
536
|
}
|
|
357
537
|
Insert: {
|
|
358
538
|
created_at?: string | null
|
|
359
|
-
email
|
|
539
|
+
email?: string
|
|
360
540
|
id?: string
|
|
361
541
|
}
|
|
362
542
|
Update: {
|
|
@@ -364,6 +544,7 @@ export interface Database {
|
|
|
364
544
|
email?: string
|
|
365
545
|
id?: string
|
|
366
546
|
}
|
|
547
|
+
Relationships: []
|
|
367
548
|
}
|
|
368
549
|
devices: {
|
|
369
550
|
Row: {
|
|
@@ -374,6 +555,7 @@ export interface Database {
|
|
|
374
555
|
device_id: string
|
|
375
556
|
is_emulator: boolean | null
|
|
376
557
|
is_prod: boolean | null
|
|
558
|
+
last_mau: string
|
|
377
559
|
os_version: string | null
|
|
378
560
|
platform: Database["public"]["Enums"]["platform_os"] | null
|
|
379
561
|
plugin_version: string
|
|
@@ -389,6 +571,7 @@ export interface Database {
|
|
|
389
571
|
device_id: string
|
|
390
572
|
is_emulator?: boolean | null
|
|
391
573
|
is_prod?: boolean | null
|
|
574
|
+
last_mau?: string
|
|
392
575
|
os_version?: string | null
|
|
393
576
|
platform?: Database["public"]["Enums"]["platform_os"] | null
|
|
394
577
|
plugin_version?: string
|
|
@@ -404,6 +587,7 @@ export interface Database {
|
|
|
404
587
|
device_id?: string
|
|
405
588
|
is_emulator?: boolean | null
|
|
406
589
|
is_prod?: boolean | null
|
|
590
|
+
last_mau?: string
|
|
407
591
|
os_version?: string | null
|
|
408
592
|
platform?: Database["public"]["Enums"]["platform_os"] | null
|
|
409
593
|
plugin_version?: string
|
|
@@ -411,6 +595,20 @@ export interface Database {
|
|
|
411
595
|
version?: number
|
|
412
596
|
version_build?: string | null
|
|
413
597
|
}
|
|
598
|
+
Relationships: [
|
|
599
|
+
{
|
|
600
|
+
foreignKeyName: "devices_app_id_fkey"
|
|
601
|
+
columns: ["app_id"]
|
|
602
|
+
referencedRelation: "apps"
|
|
603
|
+
referencedColumns: ["app_id"]
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
foreignKeyName: "devices_version_fkey"
|
|
607
|
+
columns: ["version"]
|
|
608
|
+
referencedRelation: "app_versions"
|
|
609
|
+
referencedColumns: ["id"]
|
|
610
|
+
}
|
|
611
|
+
]
|
|
414
612
|
}
|
|
415
613
|
devices_override: {
|
|
416
614
|
Row: {
|
|
@@ -437,6 +635,32 @@ export interface Database {
|
|
|
437
635
|
updated_at?: string | null
|
|
438
636
|
version?: number
|
|
439
637
|
}
|
|
638
|
+
Relationships: [
|
|
639
|
+
{
|
|
640
|
+
foreignKeyName: "devices_override_app_id_fkey"
|
|
641
|
+
columns: ["app_id"]
|
|
642
|
+
referencedRelation: "apps"
|
|
643
|
+
referencedColumns: ["app_id"]
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
foreignKeyName: "devices_override_created_by_fkey"
|
|
647
|
+
columns: ["created_by"]
|
|
648
|
+
referencedRelation: "users"
|
|
649
|
+
referencedColumns: ["id"]
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
foreignKeyName: "devices_override_device_id_fkey"
|
|
653
|
+
columns: ["device_id"]
|
|
654
|
+
referencedRelation: "devices"
|
|
655
|
+
referencedColumns: ["device_id"]
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
foreignKeyName: "devices_override_version_fkey"
|
|
659
|
+
columns: ["version"]
|
|
660
|
+
referencedRelation: "app_versions"
|
|
661
|
+
referencedColumns: ["id"]
|
|
662
|
+
}
|
|
663
|
+
]
|
|
440
664
|
}
|
|
441
665
|
global_stats: {
|
|
442
666
|
Row: {
|
|
@@ -478,6 +702,7 @@ export interface Database {
|
|
|
478
702
|
updates?: number
|
|
479
703
|
users?: number | null
|
|
480
704
|
}
|
|
705
|
+
Relationships: []
|
|
481
706
|
}
|
|
482
707
|
notifications: {
|
|
483
708
|
Row: {
|
|
@@ -504,6 +729,99 @@ export interface Database {
|
|
|
504
729
|
updated_at?: string | null
|
|
505
730
|
user_id?: string
|
|
506
731
|
}
|
|
732
|
+
Relationships: [
|
|
733
|
+
{
|
|
734
|
+
foreignKeyName: "notifications_user_id_fkey"
|
|
735
|
+
columns: ["user_id"]
|
|
736
|
+
referencedRelation: "users"
|
|
737
|
+
referencedColumns: ["id"]
|
|
738
|
+
}
|
|
739
|
+
]
|
|
740
|
+
}
|
|
741
|
+
org_users: {
|
|
742
|
+
Row: {
|
|
743
|
+
app_id: string | null
|
|
744
|
+
channel_id: number | null
|
|
745
|
+
created_at: string | null
|
|
746
|
+
id: number
|
|
747
|
+
org_id: string
|
|
748
|
+
updated_at: string | null
|
|
749
|
+
user_id: string
|
|
750
|
+
user_right: Database["public"]["Enums"]["user_min_right"] | null
|
|
751
|
+
}
|
|
752
|
+
Insert: {
|
|
753
|
+
app_id?: string | null
|
|
754
|
+
channel_id?: number | null
|
|
755
|
+
created_at?: string | null
|
|
756
|
+
id?: number
|
|
757
|
+
org_id: string
|
|
758
|
+
updated_at?: string | null
|
|
759
|
+
user_id: string
|
|
760
|
+
user_right?: Database["public"]["Enums"]["user_min_right"] | null
|
|
761
|
+
}
|
|
762
|
+
Update: {
|
|
763
|
+
app_id?: string | null
|
|
764
|
+
channel_id?: number | null
|
|
765
|
+
created_at?: string | null
|
|
766
|
+
id?: number
|
|
767
|
+
org_id?: string
|
|
768
|
+
updated_at?: string | null
|
|
769
|
+
user_id?: string
|
|
770
|
+
user_right?: Database["public"]["Enums"]["user_min_right"] | null
|
|
771
|
+
}
|
|
772
|
+
Relationships: [
|
|
773
|
+
{
|
|
774
|
+
foreignKeyName: "org_users_app_id_fkey"
|
|
775
|
+
columns: ["app_id"]
|
|
776
|
+
referencedRelation: "apps"
|
|
777
|
+
referencedColumns: ["app_id"]
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
foreignKeyName: "org_users_channel_id_fkey"
|
|
781
|
+
columns: ["channel_id"]
|
|
782
|
+
referencedRelation: "channels"
|
|
783
|
+
referencedColumns: ["id"]
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
foreignKeyName: "org_users_org_id_fkey"
|
|
787
|
+
columns: ["org_id"]
|
|
788
|
+
referencedRelation: "orgs"
|
|
789
|
+
referencedColumns: ["id"]
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
foreignKeyName: "org_users_user_id_fkey"
|
|
793
|
+
columns: ["user_id"]
|
|
794
|
+
referencedRelation: "users"
|
|
795
|
+
referencedColumns: ["id"]
|
|
796
|
+
}
|
|
797
|
+
]
|
|
798
|
+
}
|
|
799
|
+
orgs: {
|
|
800
|
+
Row: {
|
|
801
|
+
created_at: string | null
|
|
802
|
+
created_by: string
|
|
803
|
+
id: string
|
|
804
|
+
logo: string | null
|
|
805
|
+
name: string
|
|
806
|
+
updated_at: string | null
|
|
807
|
+
}
|
|
808
|
+
Insert: {
|
|
809
|
+
created_at?: string | null
|
|
810
|
+
created_by: string
|
|
811
|
+
id?: string
|
|
812
|
+
logo?: string | null
|
|
813
|
+
name: string
|
|
814
|
+
updated_at?: string | null
|
|
815
|
+
}
|
|
816
|
+
Update: {
|
|
817
|
+
created_at?: string | null
|
|
818
|
+
created_by?: string
|
|
819
|
+
id?: string
|
|
820
|
+
logo?: string | null
|
|
821
|
+
name?: string
|
|
822
|
+
updated_at?: string | null
|
|
823
|
+
}
|
|
824
|
+
Relationships: []
|
|
507
825
|
}
|
|
508
826
|
plans: {
|
|
509
827
|
Row: {
|
|
@@ -593,6 +911,7 @@ export interface Database {
|
|
|
593
911
|
updated_at?: string
|
|
594
912
|
version?: number
|
|
595
913
|
}
|
|
914
|
+
Relationships: []
|
|
596
915
|
}
|
|
597
916
|
stats: {
|
|
598
917
|
Row: {
|
|
@@ -600,9 +919,7 @@ export interface Database {
|
|
|
600
919
|
app_id: string
|
|
601
920
|
created_at: string | null
|
|
602
921
|
device_id: string
|
|
603
|
-
id: number
|
|
604
922
|
platform: Database["public"]["Enums"]["platform_os"]
|
|
605
|
-
updated_at: string | null
|
|
606
923
|
version: number
|
|
607
924
|
version_build: string
|
|
608
925
|
}
|
|
@@ -611,9 +928,7 @@ export interface Database {
|
|
|
611
928
|
app_id: string
|
|
612
929
|
created_at?: string | null
|
|
613
930
|
device_id: string
|
|
614
|
-
id?: number
|
|
615
931
|
platform: Database["public"]["Enums"]["platform_os"]
|
|
616
|
-
updated_at?: string | null
|
|
617
932
|
version: number
|
|
618
933
|
version_build: string
|
|
619
934
|
}
|
|
@@ -622,12 +937,30 @@ export interface Database {
|
|
|
622
937
|
app_id?: string
|
|
623
938
|
created_at?: string | null
|
|
624
939
|
device_id?: string
|
|
625
|
-
id?: number
|
|
626
940
|
platform?: Database["public"]["Enums"]["platform_os"]
|
|
627
|
-
updated_at?: string | null
|
|
628
941
|
version?: number
|
|
629
942
|
version_build?: string
|
|
630
943
|
}
|
|
944
|
+
Relationships: [
|
|
945
|
+
{
|
|
946
|
+
foreignKeyName: "logs_app_id_fkey"
|
|
947
|
+
columns: ["app_id"]
|
|
948
|
+
referencedRelation: "apps"
|
|
949
|
+
referencedColumns: ["app_id"]
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
foreignKeyName: "logs_device_id_fkey"
|
|
953
|
+
columns: ["device_id"]
|
|
954
|
+
referencedRelation: "devices"
|
|
955
|
+
referencedColumns: ["device_id"]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
foreignKeyName: "logs_version_fkey"
|
|
959
|
+
columns: ["version"]
|
|
960
|
+
referencedRelation: "app_versions"
|
|
961
|
+
referencedColumns: ["id"]
|
|
962
|
+
}
|
|
963
|
+
]
|
|
631
964
|
}
|
|
632
965
|
store_apps: {
|
|
633
966
|
Row: {
|
|
@@ -726,6 +1059,7 @@ export interface Database {
|
|
|
726
1059
|
updates?: number
|
|
727
1060
|
url?: string
|
|
728
1061
|
}
|
|
1062
|
+
Relationships: []
|
|
729
1063
|
}
|
|
730
1064
|
stripe_info: {
|
|
731
1065
|
Row: {
|
|
@@ -736,7 +1070,8 @@ export interface Database {
|
|
|
736
1070
|
price_id: string | null
|
|
737
1071
|
product_id: string
|
|
738
1072
|
status: Database["public"]["Enums"]["stripe_status"] | null
|
|
739
|
-
|
|
1073
|
+
subscription_anchor_end: string
|
|
1074
|
+
subscription_anchor_start: string
|
|
740
1075
|
subscription_id: string | null
|
|
741
1076
|
subscription_metered: Json
|
|
742
1077
|
trial_at: string
|
|
@@ -750,7 +1085,8 @@ export interface Database {
|
|
|
750
1085
|
price_id?: string | null
|
|
751
1086
|
product_id?: string
|
|
752
1087
|
status?: Database["public"]["Enums"]["stripe_status"] | null
|
|
753
|
-
|
|
1088
|
+
subscription_anchor_end?: string
|
|
1089
|
+
subscription_anchor_start?: string
|
|
754
1090
|
subscription_id?: string | null
|
|
755
1091
|
subscription_metered?: Json
|
|
756
1092
|
trial_at?: string
|
|
@@ -764,12 +1100,21 @@ export interface Database {
|
|
|
764
1100
|
price_id?: string | null
|
|
765
1101
|
product_id?: string
|
|
766
1102
|
status?: Database["public"]["Enums"]["stripe_status"] | null
|
|
767
|
-
|
|
1103
|
+
subscription_anchor_end?: string
|
|
1104
|
+
subscription_anchor_start?: string
|
|
768
1105
|
subscription_id?: string | null
|
|
769
1106
|
subscription_metered?: Json
|
|
770
1107
|
trial_at?: string
|
|
771
1108
|
updated_at?: string
|
|
772
1109
|
}
|
|
1110
|
+
Relationships: [
|
|
1111
|
+
{
|
|
1112
|
+
foreignKeyName: "stripe_info_product_id_fkey"
|
|
1113
|
+
columns: ["product_id"]
|
|
1114
|
+
referencedRelation: "plans"
|
|
1115
|
+
referencedColumns: ["stripe_id"]
|
|
1116
|
+
}
|
|
1117
|
+
]
|
|
773
1118
|
}
|
|
774
1119
|
users: {
|
|
775
1120
|
Row: {
|
|
@@ -817,12 +1162,44 @@ export interface Database {
|
|
|
817
1162
|
optForNewsletters?: boolean
|
|
818
1163
|
updated_at?: string | null
|
|
819
1164
|
}
|
|
1165
|
+
Relationships: [
|
|
1166
|
+
{
|
|
1167
|
+
foreignKeyName: "users_customer_id_fkey"
|
|
1168
|
+
columns: ["customer_id"]
|
|
1169
|
+
referencedRelation: "stripe_info"
|
|
1170
|
+
referencedColumns: ["customer_id"]
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
foreignKeyName: "users_id_fkey"
|
|
1174
|
+
columns: ["id"]
|
|
1175
|
+
referencedRelation: "users"
|
|
1176
|
+
referencedColumns: ["id"]
|
|
1177
|
+
}
|
|
1178
|
+
]
|
|
820
1179
|
}
|
|
821
1180
|
}
|
|
822
1181
|
Views: {
|
|
823
1182
|
[_ in never]: never
|
|
824
1183
|
}
|
|
825
1184
|
Functions: {
|
|
1185
|
+
calculate_cycle_usage: {
|
|
1186
|
+
Args: Record<PropertyKey, never>
|
|
1187
|
+
Returns: undefined
|
|
1188
|
+
}
|
|
1189
|
+
calculate_daily_app_usage: {
|
|
1190
|
+
Args: Record<PropertyKey, never>
|
|
1191
|
+
Returns: undefined
|
|
1192
|
+
}
|
|
1193
|
+
check_min_rights: {
|
|
1194
|
+
Args: {
|
|
1195
|
+
min_right: Database["public"]["Enums"]["user_min_right"]
|
|
1196
|
+
user_id: string
|
|
1197
|
+
org_id: string
|
|
1198
|
+
app_id: string
|
|
1199
|
+
channel_id: number
|
|
1200
|
+
}
|
|
1201
|
+
Returns: boolean
|
|
1202
|
+
}
|
|
826
1203
|
convert_bytes_to_gb: {
|
|
827
1204
|
Args: {
|
|
828
1205
|
byt: number
|
|
@@ -885,12 +1262,9 @@ export interface Database {
|
|
|
885
1262
|
Args: Record<PropertyKey, never>
|
|
886
1263
|
Returns: number
|
|
887
1264
|
}
|
|
888
|
-
|
|
889
|
-
Args:
|
|
890
|
-
|
|
891
|
-
apikey: string
|
|
892
|
-
}
|
|
893
|
-
Returns: boolean
|
|
1265
|
+
delete_user: {
|
|
1266
|
+
Args: Record<PropertyKey, never>
|
|
1267
|
+
Returns: undefined
|
|
894
1268
|
}
|
|
895
1269
|
exist_app_v2: {
|
|
896
1270
|
Args: {
|
|
@@ -946,6 +1320,10 @@ export interface Database {
|
|
|
946
1320
|
missing_app_id: string
|
|
947
1321
|
}[]
|
|
948
1322
|
}
|
|
1323
|
+
get_apikey: {
|
|
1324
|
+
Args: Record<PropertyKey, never>
|
|
1325
|
+
Returns: string
|
|
1326
|
+
}
|
|
949
1327
|
get_app_versions: {
|
|
950
1328
|
Args: {
|
|
951
1329
|
appid: string
|
|
@@ -970,6 +1348,17 @@ export interface Database {
|
|
|
970
1348
|
}
|
|
971
1349
|
Returns: string
|
|
972
1350
|
}
|
|
1351
|
+
get_cycle_info: {
|
|
1352
|
+
Args: Record<PropertyKey, never>
|
|
1353
|
+
Returns: {
|
|
1354
|
+
subscription_anchor_start: string
|
|
1355
|
+
subscription_anchor_end: string
|
|
1356
|
+
}[]
|
|
1357
|
+
}
|
|
1358
|
+
get_db_url: {
|
|
1359
|
+
Args: Record<PropertyKey, never>
|
|
1360
|
+
Returns: string
|
|
1361
|
+
}
|
|
973
1362
|
get_devices_version: {
|
|
974
1363
|
Args: {
|
|
975
1364
|
app_id: string
|
|
@@ -1079,20 +1468,15 @@ export interface Database {
|
|
|
1079
1468
|
}
|
|
1080
1469
|
Returns: string
|
|
1081
1470
|
}
|
|
1082
|
-
|
|
1471
|
+
has_min_right: {
|
|
1083
1472
|
Args: {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
shared: number
|
|
1090
|
-
mlu: number
|
|
1091
|
-
mlu_real: number
|
|
1092
|
-
versions: number
|
|
1093
|
-
devices: number
|
|
1473
|
+
_userid: string
|
|
1474
|
+
_orgid: string
|
|
1475
|
+
_right: Database["public"]["Enums"]["user_min_right"]
|
|
1476
|
+
_appid?: string
|
|
1477
|
+
_channelid?: number
|
|
1094
1478
|
}
|
|
1095
|
-
Returns:
|
|
1479
|
+
Returns: boolean
|
|
1096
1480
|
}
|
|
1097
1481
|
increment_stats_v2: {
|
|
1098
1482
|
Args: {
|
|
@@ -1117,14 +1501,6 @@ export interface Database {
|
|
|
1117
1501
|
}
|
|
1118
1502
|
Returns: undefined
|
|
1119
1503
|
}
|
|
1120
|
-
increment_version_stats: {
|
|
1121
|
-
Args: {
|
|
1122
|
-
app_id: string
|
|
1123
|
-
version_id: number
|
|
1124
|
-
devices: number
|
|
1125
|
-
}
|
|
1126
|
-
Returns: undefined
|
|
1127
|
-
}
|
|
1128
1504
|
is_admin: {
|
|
1129
1505
|
Args: {
|
|
1130
1506
|
userid: string
|
|
@@ -1204,6 +1580,12 @@ export interface Database {
|
|
|
1204
1580
|
}
|
|
1205
1581
|
Returns: boolean
|
|
1206
1582
|
}
|
|
1583
|
+
is_not_deleted_v2: {
|
|
1584
|
+
Args: {
|
|
1585
|
+
email_check: string
|
|
1586
|
+
}
|
|
1587
|
+
Returns: boolean
|
|
1588
|
+
}
|
|
1207
1589
|
is_onboarded: {
|
|
1208
1590
|
Args: {
|
|
1209
1591
|
userid: string
|
|
@@ -1235,6 +1617,28 @@ export interface Database {
|
|
|
1235
1617
|
}
|
|
1236
1618
|
Returns: boolean
|
|
1237
1619
|
}
|
|
1620
|
+
one_month_ahead: {
|
|
1621
|
+
Args: Record<PropertyKey, never>
|
|
1622
|
+
Returns: string
|
|
1623
|
+
}
|
|
1624
|
+
remove_enum_value: {
|
|
1625
|
+
Args: {
|
|
1626
|
+
enum_type: unknown
|
|
1627
|
+
enum_value: string
|
|
1628
|
+
}
|
|
1629
|
+
Returns: undefined
|
|
1630
|
+
}
|
|
1631
|
+
update_app_usage:
|
|
1632
|
+
| {
|
|
1633
|
+
Args: {
|
|
1634
|
+
minutes_interval: number
|
|
1635
|
+
}
|
|
1636
|
+
Returns: undefined
|
|
1637
|
+
}
|
|
1638
|
+
| {
|
|
1639
|
+
Args: Record<PropertyKey, never>
|
|
1640
|
+
Returns: undefined
|
|
1641
|
+
}
|
|
1238
1642
|
update_version_stats: {
|
|
1239
1643
|
Args: {
|
|
1240
1644
|
app_id: string
|
|
@@ -1258,6 +1662,9 @@ export interface Database {
|
|
|
1258
1662
|
| "failed"
|
|
1259
1663
|
| "deleted"
|
|
1260
1664
|
| "canceled"
|
|
1665
|
+
usage_mode: "5min" | "day" | "month" | "cycle"
|
|
1666
|
+
user_min_right: "read" | "upload" | "write" | "admin"
|
|
1667
|
+
user_role: "read" | "upload" | "write" | "admin"
|
|
1261
1668
|
}
|
|
1262
1669
|
CompositeTypes: {
|
|
1263
1670
|
match_plan: {
|