@capgo/cli 4.0.9 → 4.0.11
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 +14 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/types/supabase.types.ts +414 -156
- package/src/utils.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.0.11](https://github.com/Cap-go/CLI/compare/v4.0.10...v4.0.11) (2024-02-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* deploy new is_good_plan_v5 ([38bc592](https://github.com/Cap-go/CLI/commit/38bc592312f5d6e351c7da3be3ea423e2747553e))
|
|
11
|
+
|
|
12
|
+
### [4.0.10](https://github.com/Cap-go/CLI/compare/v4.0.9...v4.0.10) (2024-02-24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* types ([8a69dd1](https://github.com/Cap-go/CLI/commit/8a69dd1bddea49e1dee7f0f24ed030c6583da049))
|
|
18
|
+
|
|
5
19
|
### [4.0.9](https://github.com/Cap-go/CLI/compare/v4.0.8...v4.0.9) (2024-02-23)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.js
CHANGED
|
@@ -61661,7 +61661,7 @@ var import_get_latest_version = __toESM(require_src3());
|
|
|
61661
61661
|
// package.json
|
|
61662
61662
|
var package_default = {
|
|
61663
61663
|
name: "@capgo/cli",
|
|
61664
|
-
version: "4.0.
|
|
61664
|
+
version: "4.0.11",
|
|
61665
61665
|
description: "A CLI to upload to capgo servers",
|
|
61666
61666
|
main: "dist/index.js",
|
|
61667
61667
|
bin: {
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export type Json =
|
|
|
6
6
|
| { [key: string]: Json | undefined }
|
|
7
7
|
| Json[]
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export type Database = {
|
|
10
10
|
public: {
|
|
11
11
|
Tables: {
|
|
12
12
|
apikeys: {
|
|
@@ -38,6 +38,73 @@ export interface Database {
|
|
|
38
38
|
{
|
|
39
39
|
foreignKeyName: "apikeys_user_id_fkey"
|
|
40
40
|
columns: ["user_id"]
|
|
41
|
+
isOneToOne: false
|
|
42
|
+
referencedRelation: "users"
|
|
43
|
+
referencedColumns: ["id"]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
app_stats: {
|
|
48
|
+
Row: {
|
|
49
|
+
app_id: string
|
|
50
|
+
bandwidth: number
|
|
51
|
+
channels: number
|
|
52
|
+
created_at: string | null
|
|
53
|
+
date_id: string
|
|
54
|
+
devices: number
|
|
55
|
+
devices_real: number
|
|
56
|
+
mlu: number
|
|
57
|
+
mlu_real: number
|
|
58
|
+
shared: number
|
|
59
|
+
updated_at: string | null
|
|
60
|
+
user_id: string
|
|
61
|
+
version_size: number
|
|
62
|
+
versions: number
|
|
63
|
+
}
|
|
64
|
+
Insert: {
|
|
65
|
+
app_id: string
|
|
66
|
+
bandwidth?: number
|
|
67
|
+
channels?: number
|
|
68
|
+
created_at?: string | null
|
|
69
|
+
date_id?: string
|
|
70
|
+
devices?: number
|
|
71
|
+
devices_real?: number
|
|
72
|
+
mlu?: number
|
|
73
|
+
mlu_real?: number
|
|
74
|
+
shared?: number
|
|
75
|
+
updated_at?: string | null
|
|
76
|
+
user_id: string
|
|
77
|
+
version_size?: number
|
|
78
|
+
versions?: number
|
|
79
|
+
}
|
|
80
|
+
Update: {
|
|
81
|
+
app_id?: string
|
|
82
|
+
bandwidth?: number
|
|
83
|
+
channels?: number
|
|
84
|
+
created_at?: string | null
|
|
85
|
+
date_id?: string
|
|
86
|
+
devices?: number
|
|
87
|
+
devices_real?: number
|
|
88
|
+
mlu?: number
|
|
89
|
+
mlu_real?: number
|
|
90
|
+
shared?: number
|
|
91
|
+
updated_at?: string | null
|
|
92
|
+
user_id?: string
|
|
93
|
+
version_size?: number
|
|
94
|
+
versions?: number
|
|
95
|
+
}
|
|
96
|
+
Relationships: [
|
|
97
|
+
{
|
|
98
|
+
foreignKeyName: "app_stats_app_id_fkey"
|
|
99
|
+
columns: ["app_id"]
|
|
100
|
+
isOneToOne: false
|
|
101
|
+
referencedRelation: "apps"
|
|
102
|
+
referencedColumns: ["app_id"]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
foreignKeyName: "app_stats_user_id_fkey"
|
|
106
|
+
columns: ["user_id"]
|
|
107
|
+
isOneToOne: false
|
|
41
108
|
referencedRelation: "users"
|
|
42
109
|
referencedColumns: ["id"]
|
|
43
110
|
}
|
|
@@ -48,7 +115,7 @@ export interface Database {
|
|
|
48
115
|
app_id: string
|
|
49
116
|
bandwidth: number
|
|
50
117
|
date: string | null
|
|
51
|
-
|
|
118
|
+
fails: number
|
|
52
119
|
get: number
|
|
53
120
|
id: string
|
|
54
121
|
install: number
|
|
@@ -61,7 +128,7 @@ export interface Database {
|
|
|
61
128
|
app_id: string
|
|
62
129
|
bandwidth?: number
|
|
63
130
|
date?: string | null
|
|
64
|
-
|
|
131
|
+
fails?: number
|
|
65
132
|
get?: number
|
|
66
133
|
id?: string
|
|
67
134
|
install?: number
|
|
@@ -74,7 +141,7 @@ export interface Database {
|
|
|
74
141
|
app_id?: string
|
|
75
142
|
bandwidth?: number
|
|
76
143
|
date?: string | null
|
|
77
|
-
|
|
144
|
+
fails?: number
|
|
78
145
|
get?: number
|
|
79
146
|
id?: string
|
|
80
147
|
install?: number
|
|
@@ -138,12 +205,14 @@ export interface Database {
|
|
|
138
205
|
{
|
|
139
206
|
foreignKeyName: "app_versions_app_id_fkey"
|
|
140
207
|
columns: ["app_id"]
|
|
208
|
+
isOneToOne: false
|
|
141
209
|
referencedRelation: "apps"
|
|
142
210
|
referencedColumns: ["app_id"]
|
|
143
211
|
},
|
|
144
212
|
{
|
|
145
213
|
foreignKeyName: "app_versions_user_id_fkey"
|
|
146
214
|
columns: ["user_id"]
|
|
215
|
+
isOneToOne: false
|
|
147
216
|
referencedRelation: "users"
|
|
148
217
|
referencedColumns: ["id"]
|
|
149
218
|
}
|
|
@@ -193,18 +262,21 @@ export interface Database {
|
|
|
193
262
|
{
|
|
194
263
|
foreignKeyName: "app_versions_meta_app_id_fkey"
|
|
195
264
|
columns: ["app_id"]
|
|
265
|
+
isOneToOne: false
|
|
196
266
|
referencedRelation: "apps"
|
|
197
267
|
referencedColumns: ["app_id"]
|
|
198
268
|
},
|
|
199
269
|
{
|
|
200
270
|
foreignKeyName: "app_versions_meta_id_fkey"
|
|
201
271
|
columns: ["id"]
|
|
272
|
+
isOneToOne: true
|
|
202
273
|
referencedRelation: "app_versions"
|
|
203
274
|
referencedColumns: ["id"]
|
|
204
275
|
},
|
|
205
276
|
{
|
|
206
277
|
foreignKeyName: "app_versions_meta_user_id_fkey"
|
|
207
278
|
columns: ["user_id"]
|
|
279
|
+
isOneToOne: false
|
|
208
280
|
referencedRelation: "users"
|
|
209
281
|
referencedColumns: ["id"]
|
|
210
282
|
}
|
|
@@ -248,6 +320,7 @@ export interface Database {
|
|
|
248
320
|
{
|
|
249
321
|
foreignKeyName: "apps_user_id_fkey"
|
|
250
322
|
columns: ["user_id"]
|
|
323
|
+
isOneToOne: false
|
|
251
324
|
referencedRelation: "users"
|
|
252
325
|
referencedColumns: ["id"]
|
|
253
326
|
}
|
|
@@ -260,6 +333,7 @@ export interface Database {
|
|
|
260
333
|
created_at: string | null
|
|
261
334
|
created_by: string
|
|
262
335
|
device_id: string
|
|
336
|
+
id: number
|
|
263
337
|
updated_at: string
|
|
264
338
|
}
|
|
265
339
|
Insert: {
|
|
@@ -268,6 +342,7 @@ export interface Database {
|
|
|
268
342
|
created_at?: string | null
|
|
269
343
|
created_by: string
|
|
270
344
|
device_id: string
|
|
345
|
+
id?: number
|
|
271
346
|
updated_at?: string
|
|
272
347
|
}
|
|
273
348
|
Update: {
|
|
@@ -276,79 +351,28 @@ export interface Database {
|
|
|
276
351
|
created_at?: string | null
|
|
277
352
|
created_by?: string
|
|
278
353
|
device_id?: string
|
|
354
|
+
id?: number
|
|
279
355
|
updated_at?: string
|
|
280
356
|
}
|
|
281
357
|
Relationships: [
|
|
282
358
|
{
|
|
283
359
|
foreignKeyName: "channel_devices_app_id_fkey"
|
|
284
360
|
columns: ["app_id"]
|
|
361
|
+
isOneToOne: false
|
|
285
362
|
referencedRelation: "apps"
|
|
286
363
|
referencedColumns: ["app_id"]
|
|
287
364
|
},
|
|
288
365
|
{
|
|
289
366
|
foreignKeyName: "channel_devices_channel_id_fkey"
|
|
290
367
|
columns: ["channel_id"]
|
|
368
|
+
isOneToOne: false
|
|
291
369
|
referencedRelation: "channels"
|
|
292
370
|
referencedColumns: ["id"]
|
|
293
371
|
},
|
|
294
372
|
{
|
|
295
373
|
foreignKeyName: "channel_devices_created_by_fkey"
|
|
296
374
|
columns: ["created_by"]
|
|
297
|
-
|
|
298
|
-
referencedColumns: ["id"]
|
|
299
|
-
}
|
|
300
|
-
]
|
|
301
|
-
}
|
|
302
|
-
channel_users: {
|
|
303
|
-
Row: {
|
|
304
|
-
app_id: string
|
|
305
|
-
channel_id: number
|
|
306
|
-
created_at: string | null
|
|
307
|
-
created_by: string | null
|
|
308
|
-
id: number
|
|
309
|
-
updated_at: string
|
|
310
|
-
user_id: string
|
|
311
|
-
}
|
|
312
|
-
Insert: {
|
|
313
|
-
app_id: string
|
|
314
|
-
channel_id: number
|
|
315
|
-
created_at?: string | null
|
|
316
|
-
created_by?: string | null
|
|
317
|
-
id?: number
|
|
318
|
-
updated_at?: string
|
|
319
|
-
user_id: string
|
|
320
|
-
}
|
|
321
|
-
Update: {
|
|
322
|
-
app_id?: string
|
|
323
|
-
channel_id?: number
|
|
324
|
-
created_at?: string | null
|
|
325
|
-
created_by?: string | null
|
|
326
|
-
id?: number
|
|
327
|
-
updated_at?: string
|
|
328
|
-
user_id?: string
|
|
329
|
-
}
|
|
330
|
-
Relationships: [
|
|
331
|
-
{
|
|
332
|
-
foreignKeyName: "channel_users_app_id_fkey"
|
|
333
|
-
columns: ["app_id"]
|
|
334
|
-
referencedRelation: "apps"
|
|
335
|
-
referencedColumns: ["app_id"]
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
foreignKeyName: "channel_users_channel_id_fkey"
|
|
339
|
-
columns: ["channel_id"]
|
|
340
|
-
referencedRelation: "channels"
|
|
341
|
-
referencedColumns: ["id"]
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
foreignKeyName: "channel_users_created_by_fkey"
|
|
345
|
-
columns: ["created_by"]
|
|
346
|
-
referencedRelation: "users"
|
|
347
|
-
referencedColumns: ["id"]
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
foreignKeyName: "channel_users_user_id_fkey"
|
|
351
|
-
columns: ["user_id"]
|
|
375
|
+
isOneToOne: false
|
|
352
376
|
referencedRelation: "users"
|
|
353
377
|
referencedColumns: ["id"]
|
|
354
378
|
}
|
|
@@ -425,29 +449,87 @@ export interface Database {
|
|
|
425
449
|
{
|
|
426
450
|
foreignKeyName: "channels_app_id_fkey"
|
|
427
451
|
columns: ["app_id"]
|
|
452
|
+
isOneToOne: false
|
|
428
453
|
referencedRelation: "apps"
|
|
429
454
|
referencedColumns: ["app_id"]
|
|
430
455
|
},
|
|
431
456
|
{
|
|
432
457
|
foreignKeyName: "channels_created_by_fkey"
|
|
433
458
|
columns: ["created_by"]
|
|
459
|
+
isOneToOne: false
|
|
434
460
|
referencedRelation: "users"
|
|
435
461
|
referencedColumns: ["id"]
|
|
436
462
|
},
|
|
437
463
|
{
|
|
438
464
|
foreignKeyName: "channels_secondVersion_fkey"
|
|
439
465
|
columns: ["secondVersion"]
|
|
466
|
+
isOneToOne: false
|
|
440
467
|
referencedRelation: "app_versions"
|
|
441
468
|
referencedColumns: ["id"]
|
|
442
469
|
},
|
|
443
470
|
{
|
|
444
471
|
foreignKeyName: "channels_version_fkey"
|
|
445
472
|
columns: ["version"]
|
|
473
|
+
isOneToOne: false
|
|
446
474
|
referencedRelation: "app_versions"
|
|
447
475
|
referencedColumns: ["id"]
|
|
448
476
|
}
|
|
449
477
|
]
|
|
450
478
|
}
|
|
479
|
+
clickhouse_app_usage: {
|
|
480
|
+
Row: {
|
|
481
|
+
app_id: string | null
|
|
482
|
+
bandwidth: number | null
|
|
483
|
+
date: string | null
|
|
484
|
+
fail: number | null
|
|
485
|
+
get: number | null
|
|
486
|
+
install: number | null
|
|
487
|
+
mau: number | null
|
|
488
|
+
storage_added: number | null
|
|
489
|
+
storage_deleted: number | null
|
|
490
|
+
uninstall: number | null
|
|
491
|
+
}
|
|
492
|
+
Insert: {
|
|
493
|
+
app_id?: string | null
|
|
494
|
+
bandwidth?: number | null
|
|
495
|
+
date?: string | null
|
|
496
|
+
fail?: number | null
|
|
497
|
+
get?: number | null
|
|
498
|
+
install?: number | null
|
|
499
|
+
mau?: number | null
|
|
500
|
+
storage_added?: number | null
|
|
501
|
+
storage_deleted?: number | null
|
|
502
|
+
uninstall?: number | null
|
|
503
|
+
}
|
|
504
|
+
Update: {
|
|
505
|
+
app_id?: string | null
|
|
506
|
+
bandwidth?: number | null
|
|
507
|
+
date?: string | null
|
|
508
|
+
fail?: number | null
|
|
509
|
+
get?: number | null
|
|
510
|
+
install?: number | null
|
|
511
|
+
mau?: number | null
|
|
512
|
+
storage_added?: number | null
|
|
513
|
+
storage_deleted?: number | null
|
|
514
|
+
uninstall?: number | null
|
|
515
|
+
}
|
|
516
|
+
Relationships: []
|
|
517
|
+
}
|
|
518
|
+
cycle_info: {
|
|
519
|
+
Row: {
|
|
520
|
+
subscription_anchor_end: string | null
|
|
521
|
+
subscription_anchor_start: string | null
|
|
522
|
+
}
|
|
523
|
+
Insert: {
|
|
524
|
+
subscription_anchor_end?: string | null
|
|
525
|
+
subscription_anchor_start?: string | null
|
|
526
|
+
}
|
|
527
|
+
Update: {
|
|
528
|
+
subscription_anchor_end?: string | null
|
|
529
|
+
subscription_anchor_start?: string | null
|
|
530
|
+
}
|
|
531
|
+
Relationships: []
|
|
532
|
+
}
|
|
451
533
|
deleted_account: {
|
|
452
534
|
Row: {
|
|
453
535
|
created_at: string | null
|
|
@@ -456,7 +538,7 @@ export interface Database {
|
|
|
456
538
|
}
|
|
457
539
|
Insert: {
|
|
458
540
|
created_at?: string | null
|
|
459
|
-
email
|
|
541
|
+
email?: string
|
|
460
542
|
id?: string
|
|
461
543
|
}
|
|
462
544
|
Update: {
|
|
@@ -517,6 +599,7 @@ export interface Database {
|
|
|
517
599
|
created_at: string | null
|
|
518
600
|
created_by: string | null
|
|
519
601
|
device_id: string
|
|
602
|
+
id: number
|
|
520
603
|
updated_at: string | null
|
|
521
604
|
version: number
|
|
522
605
|
}
|
|
@@ -525,6 +608,7 @@ export interface Database {
|
|
|
525
608
|
created_at?: string | null
|
|
526
609
|
created_by?: string | null
|
|
527
610
|
device_id: string
|
|
611
|
+
id?: number
|
|
528
612
|
updated_at?: string | null
|
|
529
613
|
version: number
|
|
530
614
|
}
|
|
@@ -533,6 +617,7 @@ export interface Database {
|
|
|
533
617
|
created_at?: string | null
|
|
534
618
|
created_by?: string | null
|
|
535
619
|
device_id?: string
|
|
620
|
+
id?: number
|
|
536
621
|
updated_at?: string | null
|
|
537
622
|
version?: number
|
|
538
623
|
}
|
|
@@ -540,18 +625,21 @@ export interface Database {
|
|
|
540
625
|
{
|
|
541
626
|
foreignKeyName: "devices_override_app_id_fkey"
|
|
542
627
|
columns: ["app_id"]
|
|
628
|
+
isOneToOne: false
|
|
543
629
|
referencedRelation: "apps"
|
|
544
630
|
referencedColumns: ["app_id"]
|
|
545
631
|
},
|
|
546
632
|
{
|
|
547
633
|
foreignKeyName: "devices_override_created_by_fkey"
|
|
548
634
|
columns: ["created_by"]
|
|
635
|
+
isOneToOne: false
|
|
549
636
|
referencedRelation: "users"
|
|
550
637
|
referencedColumns: ["id"]
|
|
551
638
|
},
|
|
552
639
|
{
|
|
553
640
|
foreignKeyName: "devices_override_version_fkey"
|
|
554
641
|
columns: ["version"]
|
|
642
|
+
isOneToOne: false
|
|
555
643
|
referencedRelation: "app_versions"
|
|
556
644
|
referencedColumns: ["id"]
|
|
557
645
|
}
|
|
@@ -602,27 +690,36 @@ export interface Database {
|
|
|
602
690
|
job_queue: {
|
|
603
691
|
Row: {
|
|
604
692
|
created_at: string | null
|
|
693
|
+
extra_info: Json
|
|
605
694
|
function_name: string | null
|
|
606
695
|
function_type: string | null
|
|
607
696
|
job_id: number
|
|
608
697
|
job_type: string
|
|
609
698
|
payload: string
|
|
699
|
+
request_id: number | null
|
|
700
|
+
status: Database["public"]["Enums"]["queue_job_status"]
|
|
610
701
|
}
|
|
611
702
|
Insert: {
|
|
612
703
|
created_at?: string | null
|
|
704
|
+
extra_info?: Json
|
|
613
705
|
function_name?: string | null
|
|
614
706
|
function_type?: string | null
|
|
615
707
|
job_id?: number
|
|
616
708
|
job_type: string
|
|
617
709
|
payload: string
|
|
710
|
+
request_id?: number | null
|
|
711
|
+
status?: Database["public"]["Enums"]["queue_job_status"]
|
|
618
712
|
}
|
|
619
713
|
Update: {
|
|
620
714
|
created_at?: string | null
|
|
715
|
+
extra_info?: Json
|
|
621
716
|
function_name?: string | null
|
|
622
717
|
function_type?: string | null
|
|
623
718
|
job_id?: number
|
|
624
719
|
job_type?: string
|
|
625
720
|
payload?: string
|
|
721
|
+
request_id?: number | null
|
|
722
|
+
status?: Database["public"]["Enums"]["queue_job_status"]
|
|
626
723
|
}
|
|
627
724
|
Relationships: []
|
|
628
725
|
}
|
|
@@ -655,6 +752,7 @@ export interface Database {
|
|
|
655
752
|
{
|
|
656
753
|
foreignKeyName: "notifications_user_id_fkey"
|
|
657
754
|
columns: ["user_id"]
|
|
755
|
+
isOneToOne: false
|
|
658
756
|
referencedRelation: "users"
|
|
659
757
|
referencedColumns: ["id"]
|
|
660
758
|
}
|
|
@@ -695,24 +793,28 @@ export interface Database {
|
|
|
695
793
|
{
|
|
696
794
|
foreignKeyName: "org_users_app_id_fkey"
|
|
697
795
|
columns: ["app_id"]
|
|
796
|
+
isOneToOne: false
|
|
698
797
|
referencedRelation: "apps"
|
|
699
798
|
referencedColumns: ["app_id"]
|
|
700
799
|
},
|
|
701
800
|
{
|
|
702
801
|
foreignKeyName: "org_users_channel_id_fkey"
|
|
703
802
|
columns: ["channel_id"]
|
|
803
|
+
isOneToOne: false
|
|
704
804
|
referencedRelation: "channels"
|
|
705
805
|
referencedColumns: ["id"]
|
|
706
806
|
},
|
|
707
807
|
{
|
|
708
808
|
foreignKeyName: "org_users_org_id_fkey"
|
|
709
809
|
columns: ["org_id"]
|
|
810
|
+
isOneToOne: false
|
|
710
811
|
referencedRelation: "orgs"
|
|
711
812
|
referencedColumns: ["id"]
|
|
712
813
|
},
|
|
713
814
|
{
|
|
714
815
|
foreignKeyName: "org_users_user_id_fkey"
|
|
715
816
|
columns: ["user_id"]
|
|
817
|
+
isOneToOne: false
|
|
716
818
|
referencedRelation: "users"
|
|
717
819
|
referencedColumns: ["id"]
|
|
718
820
|
}
|
|
@@ -747,6 +849,7 @@ export interface Database {
|
|
|
747
849
|
{
|
|
748
850
|
foreignKeyName: "orgs_created_by_fkey"
|
|
749
851
|
columns: ["created_by"]
|
|
852
|
+
isOneToOne: false
|
|
750
853
|
referencedRelation: "users"
|
|
751
854
|
referencedColumns: ["id"]
|
|
752
855
|
}
|
|
@@ -754,11 +857,8 @@ export interface Database {
|
|
|
754
857
|
}
|
|
755
858
|
plans: {
|
|
756
859
|
Row: {
|
|
757
|
-
abtest: boolean
|
|
758
|
-
app: number
|
|
759
860
|
bandwidth: number
|
|
760
861
|
bandwidth_unit: number | null
|
|
761
|
-
channel: number
|
|
762
862
|
created_at: string
|
|
763
863
|
description: string
|
|
764
864
|
id: string
|
|
@@ -773,21 +873,14 @@ export interface Database {
|
|
|
773
873
|
price_m_storage_id: string | null
|
|
774
874
|
price_y: number
|
|
775
875
|
price_y_id: string
|
|
776
|
-
progressive_deploy: boolean
|
|
777
|
-
shared: number
|
|
778
876
|
storage: number
|
|
779
877
|
storage_unit: number | null
|
|
780
878
|
stripe_id: string
|
|
781
|
-
update: number
|
|
782
879
|
updated_at: string
|
|
783
|
-
version: number
|
|
784
880
|
}
|
|
785
881
|
Insert: {
|
|
786
|
-
abtest?: boolean
|
|
787
|
-
app?: number
|
|
788
882
|
bandwidth: number
|
|
789
883
|
bandwidth_unit?: number | null
|
|
790
|
-
channel?: number
|
|
791
884
|
created_at?: string
|
|
792
885
|
description?: string
|
|
793
886
|
id?: string
|
|
@@ -802,21 +895,14 @@ export interface Database {
|
|
|
802
895
|
price_m_storage_id?: string | null
|
|
803
896
|
price_y?: number
|
|
804
897
|
price_y_id: string
|
|
805
|
-
progressive_deploy?: boolean
|
|
806
|
-
shared?: number
|
|
807
898
|
storage: number
|
|
808
899
|
storage_unit?: number | null
|
|
809
900
|
stripe_id?: string
|
|
810
|
-
update?: number
|
|
811
901
|
updated_at?: string
|
|
812
|
-
version?: number
|
|
813
902
|
}
|
|
814
903
|
Update: {
|
|
815
|
-
abtest?: boolean
|
|
816
|
-
app?: number
|
|
817
904
|
bandwidth?: number
|
|
818
905
|
bandwidth_unit?: number | null
|
|
819
|
-
channel?: number
|
|
820
906
|
created_at?: string
|
|
821
907
|
description?: string
|
|
822
908
|
id?: string
|
|
@@ -831,14 +917,10 @@ export interface Database {
|
|
|
831
917
|
price_m_storage_id?: string | null
|
|
832
918
|
price_y?: number
|
|
833
919
|
price_y_id?: string
|
|
834
|
-
progressive_deploy?: boolean
|
|
835
|
-
shared?: number
|
|
836
920
|
storage?: number
|
|
837
921
|
storage_unit?: number | null
|
|
838
922
|
stripe_id?: string
|
|
839
|
-
update?: number
|
|
840
923
|
updated_at?: string
|
|
841
|
-
version?: number
|
|
842
924
|
}
|
|
843
925
|
Relationships: []
|
|
844
926
|
}
|
|
@@ -1021,6 +1103,7 @@ export interface Database {
|
|
|
1021
1103
|
{
|
|
1022
1104
|
foreignKeyName: "stripe_info_product_id_fkey"
|
|
1023
1105
|
columns: ["product_id"]
|
|
1106
|
+
isOneToOne: false
|
|
1024
1107
|
referencedRelation: "plans"
|
|
1025
1108
|
referencedColumns: ["stripe_id"]
|
|
1026
1109
|
}
|
|
@@ -1076,12 +1159,14 @@ export interface Database {
|
|
|
1076
1159
|
{
|
|
1077
1160
|
foreignKeyName: "users_customer_id_fkey"
|
|
1078
1161
|
columns: ["customer_id"]
|
|
1162
|
+
isOneToOne: true
|
|
1079
1163
|
referencedRelation: "stripe_info"
|
|
1080
1164
|
referencedColumns: ["customer_id"]
|
|
1081
1165
|
},
|
|
1082
1166
|
{
|
|
1083
1167
|
foreignKeyName: "users_id_fkey"
|
|
1084
1168
|
columns: ["id"]
|
|
1169
|
+
isOneToOne: true
|
|
1085
1170
|
referencedRelation: "users"
|
|
1086
1171
|
referencedColumns: ["id"]
|
|
1087
1172
|
}
|
|
@@ -1113,6 +1198,14 @@ export interface Database {
|
|
|
1113
1198
|
}
|
|
1114
1199
|
Returns: string
|
|
1115
1200
|
}
|
|
1201
|
+
calculate_cycle_usage: {
|
|
1202
|
+
Args: Record<PropertyKey, never>
|
|
1203
|
+
Returns: undefined
|
|
1204
|
+
}
|
|
1205
|
+
calculate_daily_app_usage: {
|
|
1206
|
+
Args: Record<PropertyKey, never>
|
|
1207
|
+
Returns: undefined
|
|
1208
|
+
}
|
|
1116
1209
|
check_min_rights:
|
|
1117
1210
|
| {
|
|
1118
1211
|
Args: {
|
|
@@ -1195,10 +1288,24 @@ export interface Database {
|
|
|
1195
1288
|
Args: Record<PropertyKey, never>
|
|
1196
1289
|
Returns: number
|
|
1197
1290
|
}
|
|
1291
|
+
create_partitions: {
|
|
1292
|
+
Args: {
|
|
1293
|
+
start_date: string
|
|
1294
|
+
num_years: number
|
|
1295
|
+
}
|
|
1296
|
+
Returns: undefined
|
|
1297
|
+
}
|
|
1198
1298
|
delete_user: {
|
|
1199
1299
|
Args: Record<PropertyKey, never>
|
|
1200
1300
|
Returns: undefined
|
|
1201
1301
|
}
|
|
1302
|
+
exist_app: {
|
|
1303
|
+
Args: {
|
|
1304
|
+
appid: string
|
|
1305
|
+
apikey: string
|
|
1306
|
+
}
|
|
1307
|
+
Returns: boolean
|
|
1308
|
+
}
|
|
1202
1309
|
exist_app_v2: {
|
|
1203
1310
|
Args: {
|
|
1204
1311
|
appid: string
|
|
@@ -1277,16 +1384,16 @@ export interface Database {
|
|
|
1277
1384
|
}
|
|
1278
1385
|
get_cycle_info:
|
|
1279
1386
|
| {
|
|
1280
|
-
Args:
|
|
1281
|
-
userid: string
|
|
1282
|
-
}
|
|
1387
|
+
Args: Record<PropertyKey, never>
|
|
1283
1388
|
Returns: {
|
|
1284
1389
|
subscription_anchor_start: string
|
|
1285
1390
|
subscription_anchor_end: string
|
|
1286
1391
|
}[]
|
|
1287
1392
|
}
|
|
1288
1393
|
| {
|
|
1289
|
-
Args:
|
|
1394
|
+
Args: {
|
|
1395
|
+
userid: string
|
|
1396
|
+
}
|
|
1290
1397
|
Returns: {
|
|
1291
1398
|
subscription_anchor_start: string
|
|
1292
1399
|
subscription_anchor_end: string
|
|
@@ -1307,13 +1414,25 @@ export interface Database {
|
|
|
1307
1414
|
Args: Record<PropertyKey, never>
|
|
1308
1415
|
Returns: string
|
|
1309
1416
|
}
|
|
1417
|
+
get_infos: {
|
|
1418
|
+
Args: {
|
|
1419
|
+
appid: string
|
|
1420
|
+
deviceid: string
|
|
1421
|
+
versionname: string
|
|
1422
|
+
}
|
|
1423
|
+
Returns: {
|
|
1424
|
+
current_version_id: number
|
|
1425
|
+
versiondata: Json
|
|
1426
|
+
channel: Json
|
|
1427
|
+
}[]
|
|
1428
|
+
}
|
|
1310
1429
|
get_max_plan:
|
|
1311
1430
|
| {
|
|
1312
1431
|
Args: Record<PropertyKey, never>
|
|
1313
1432
|
Returns: {
|
|
1314
1433
|
mau: number
|
|
1315
|
-
storage: number
|
|
1316
1434
|
bandwidth: number
|
|
1435
|
+
storage: number
|
|
1317
1436
|
}[]
|
|
1318
1437
|
}
|
|
1319
1438
|
| {
|
|
@@ -1377,6 +1496,22 @@ export interface Database {
|
|
|
1377
1496
|
role: string
|
|
1378
1497
|
}[]
|
|
1379
1498
|
}
|
|
1499
|
+
get_orgs_v3: {
|
|
1500
|
+
Args: {
|
|
1501
|
+
userid: string
|
|
1502
|
+
}
|
|
1503
|
+
Returns: {
|
|
1504
|
+
gid: string
|
|
1505
|
+
created_by: string
|
|
1506
|
+
logo: string
|
|
1507
|
+
name: string
|
|
1508
|
+
role: string
|
|
1509
|
+
paying: boolean
|
|
1510
|
+
trial_left: number
|
|
1511
|
+
can_use_more: boolean
|
|
1512
|
+
is_canceled: boolean
|
|
1513
|
+
}[]
|
|
1514
|
+
}
|
|
1380
1515
|
get_plan_usage_percent:
|
|
1381
1516
|
| {
|
|
1382
1517
|
Args: Record<PropertyKey, never>
|
|
@@ -1388,6 +1523,20 @@ export interface Database {
|
|
|
1388
1523
|
}
|
|
1389
1524
|
Returns: number
|
|
1390
1525
|
}
|
|
1526
|
+
get_total_app_storage_size:
|
|
1527
|
+
| {
|
|
1528
|
+
Args: {
|
|
1529
|
+
appid: string
|
|
1530
|
+
}
|
|
1531
|
+
Returns: number
|
|
1532
|
+
}
|
|
1533
|
+
| {
|
|
1534
|
+
Args: {
|
|
1535
|
+
userid: string
|
|
1536
|
+
appid: string
|
|
1537
|
+
}
|
|
1538
|
+
Returns: number
|
|
1539
|
+
}
|
|
1391
1540
|
get_total_stats_v2:
|
|
1392
1541
|
| {
|
|
1393
1542
|
Args: {
|
|
@@ -1412,9 +1561,7 @@ export interface Database {
|
|
|
1412
1561
|
}
|
|
1413
1562
|
get_total_stats_v3:
|
|
1414
1563
|
| {
|
|
1415
|
-
Args:
|
|
1416
|
-
userid: string
|
|
1417
|
-
}
|
|
1564
|
+
Args: Record<PropertyKey, never>
|
|
1418
1565
|
Returns: {
|
|
1419
1566
|
mau: number
|
|
1420
1567
|
bandwidth: number
|
|
@@ -1422,34 +1569,56 @@ export interface Database {
|
|
|
1422
1569
|
}[]
|
|
1423
1570
|
}
|
|
1424
1571
|
| {
|
|
1425
|
-
Args:
|
|
1572
|
+
Args: {
|
|
1573
|
+
userid: string
|
|
1574
|
+
}
|
|
1426
1575
|
Returns: {
|
|
1427
1576
|
mau: number
|
|
1428
1577
|
bandwidth: number
|
|
1429
1578
|
storage: number
|
|
1430
1579
|
}[]
|
|
1431
1580
|
}
|
|
1581
|
+
get_total_stats_v4: {
|
|
1582
|
+
Args: {
|
|
1583
|
+
userid: string
|
|
1584
|
+
}
|
|
1585
|
+
Returns: {
|
|
1586
|
+
mau: number
|
|
1587
|
+
bandwidth: number
|
|
1588
|
+
storage: number
|
|
1589
|
+
}[]
|
|
1590
|
+
}
|
|
1591
|
+
get_total_stats_v5: {
|
|
1592
|
+
Args: {
|
|
1593
|
+
userid: string
|
|
1594
|
+
}
|
|
1595
|
+
Returns: {
|
|
1596
|
+
mau: number
|
|
1597
|
+
bandwidth: number
|
|
1598
|
+
storage: number
|
|
1599
|
+
}[]
|
|
1600
|
+
}
|
|
1432
1601
|
get_total_storage_size:
|
|
1433
1602
|
| {
|
|
1434
|
-
Args:
|
|
1435
|
-
userid: string
|
|
1436
|
-
}
|
|
1603
|
+
Args: Record<PropertyKey, never>
|
|
1437
1604
|
Returns: number
|
|
1438
1605
|
}
|
|
1439
1606
|
| {
|
|
1440
|
-
Args:
|
|
1607
|
+
Args: {
|
|
1608
|
+
appid: string
|
|
1609
|
+
}
|
|
1441
1610
|
Returns: number
|
|
1442
1611
|
}
|
|
1443
1612
|
| {
|
|
1444
1613
|
Args: {
|
|
1445
1614
|
userid: string
|
|
1446
|
-
app_id: string
|
|
1447
1615
|
}
|
|
1448
1616
|
Returns: number
|
|
1449
1617
|
}
|
|
1450
1618
|
| {
|
|
1451
1619
|
Args: {
|
|
1452
|
-
|
|
1620
|
+
userid: string
|
|
1621
|
+
appid: string
|
|
1453
1622
|
}
|
|
1454
1623
|
Returns: number
|
|
1455
1624
|
}
|
|
@@ -1496,6 +1665,13 @@ export interface Database {
|
|
|
1496
1665
|
open_app: number
|
|
1497
1666
|
}[]
|
|
1498
1667
|
}
|
|
1668
|
+
has_app_right: {
|
|
1669
|
+
Args: {
|
|
1670
|
+
appid: string
|
|
1671
|
+
right: Database["public"]["Enums"]["user_min_right"]
|
|
1672
|
+
}
|
|
1673
|
+
Returns: boolean
|
|
1674
|
+
}
|
|
1499
1675
|
has_min_right: {
|
|
1500
1676
|
Args: {
|
|
1501
1677
|
_userid: string
|
|
@@ -1506,6 +1682,12 @@ export interface Database {
|
|
|
1506
1682
|
}
|
|
1507
1683
|
Returns: boolean
|
|
1508
1684
|
}
|
|
1685
|
+
has_read_rights: {
|
|
1686
|
+
Args: {
|
|
1687
|
+
appid: string
|
|
1688
|
+
}
|
|
1689
|
+
Returns: boolean
|
|
1690
|
+
}
|
|
1509
1691
|
http_post_helper: {
|
|
1510
1692
|
Args: {
|
|
1511
1693
|
function_name: string
|
|
@@ -1541,13 +1723,6 @@ export interface Database {
|
|
|
1541
1723
|
Returns: boolean
|
|
1542
1724
|
}
|
|
1543
1725
|
is_allowed_action:
|
|
1544
|
-
| {
|
|
1545
|
-
Args: {
|
|
1546
|
-
apikey: string
|
|
1547
|
-
appid: string
|
|
1548
|
-
}
|
|
1549
|
-
Returns: boolean
|
|
1550
|
-
}
|
|
1551
1726
|
| {
|
|
1552
1727
|
Args: {
|
|
1553
1728
|
apikey: string
|
|
@@ -1593,6 +1768,7 @@ export interface Database {
|
|
|
1593
1768
|
apikey: string
|
|
1594
1769
|
keymode: Database["public"]["Enums"]["key_mode"][]
|
|
1595
1770
|
app_id: string
|
|
1771
|
+
channel_id: number
|
|
1596
1772
|
right: Database["public"]["Enums"]["user_min_right"]
|
|
1597
1773
|
user_id: string
|
|
1598
1774
|
}
|
|
@@ -1603,7 +1779,6 @@ export interface Database {
|
|
|
1603
1779
|
apikey: string
|
|
1604
1780
|
keymode: Database["public"]["Enums"]["key_mode"][]
|
|
1605
1781
|
app_id: string
|
|
1606
|
-
channel_id: number
|
|
1607
1782
|
right: Database["public"]["Enums"]["user_min_right"]
|
|
1608
1783
|
user_id: string
|
|
1609
1784
|
}
|
|
@@ -1630,20 +1805,6 @@ export interface Database {
|
|
|
1630
1805
|
}
|
|
1631
1806
|
Returns: boolean
|
|
1632
1807
|
}
|
|
1633
|
-
is_app_shared:
|
|
1634
|
-
| {
|
|
1635
|
-
Args: {
|
|
1636
|
-
appid: string
|
|
1637
|
-
}
|
|
1638
|
-
Returns: boolean
|
|
1639
|
-
}
|
|
1640
|
-
| {
|
|
1641
|
-
Args: {
|
|
1642
|
-
userid: string
|
|
1643
|
-
appid: string
|
|
1644
|
-
}
|
|
1645
|
-
Returns: boolean
|
|
1646
|
-
}
|
|
1647
1808
|
is_canceled:
|
|
1648
1809
|
| {
|
|
1649
1810
|
Args: Record<PropertyKey, never>
|
|
@@ -1678,27 +1839,13 @@ export interface Database {
|
|
|
1678
1839
|
Returns: boolean
|
|
1679
1840
|
}
|
|
1680
1841
|
is_good_plan_v4:
|
|
1681
|
-
| {
|
|
1682
|
-
Args: {
|
|
1683
|
-
userid: string
|
|
1684
|
-
}
|
|
1685
|
-
Returns: boolean
|
|
1686
|
-
}
|
|
1687
1842
|
| {
|
|
1688
1843
|
Args: Record<PropertyKey, never>
|
|
1689
1844
|
Returns: boolean
|
|
1690
1845
|
}
|
|
1691
|
-
is_in_channel:
|
|
1692
|
-
| {
|
|
1693
|
-
Args: {
|
|
1694
|
-
userid: string
|
|
1695
|
-
}
|
|
1696
|
-
Returns: boolean
|
|
1697
|
-
}
|
|
1698
1846
|
| {
|
|
1699
1847
|
Args: {
|
|
1700
1848
|
userid: string
|
|
1701
|
-
ownerid: string
|
|
1702
1849
|
}
|
|
1703
1850
|
Returns: boolean
|
|
1704
1851
|
}
|
|
@@ -1715,15 +1862,21 @@ export interface Database {
|
|
|
1715
1862
|
}
|
|
1716
1863
|
Returns: boolean
|
|
1717
1864
|
}
|
|
1865
|
+
is_not_deleted_v2: {
|
|
1866
|
+
Args: {
|
|
1867
|
+
email_check: string
|
|
1868
|
+
}
|
|
1869
|
+
Returns: boolean
|
|
1870
|
+
}
|
|
1718
1871
|
is_onboarded:
|
|
1719
1872
|
| {
|
|
1720
|
-
Args:
|
|
1721
|
-
userid: string
|
|
1722
|
-
}
|
|
1873
|
+
Args: Record<PropertyKey, never>
|
|
1723
1874
|
Returns: boolean
|
|
1724
1875
|
}
|
|
1725
1876
|
| {
|
|
1726
|
-
Args:
|
|
1877
|
+
Args: {
|
|
1878
|
+
userid: string
|
|
1879
|
+
}
|
|
1727
1880
|
Returns: boolean
|
|
1728
1881
|
}
|
|
1729
1882
|
is_onboarding_needed:
|
|
@@ -1757,13 +1910,13 @@ export interface Database {
|
|
|
1757
1910
|
}
|
|
1758
1911
|
is_paying_and_good_plan:
|
|
1759
1912
|
| {
|
|
1760
|
-
Args:
|
|
1761
|
-
userid: string
|
|
1762
|
-
}
|
|
1913
|
+
Args: Record<PropertyKey, never>
|
|
1763
1914
|
Returns: boolean
|
|
1764
1915
|
}
|
|
1765
1916
|
| {
|
|
1766
|
-
Args:
|
|
1917
|
+
Args: {
|
|
1918
|
+
userid: string
|
|
1919
|
+
}
|
|
1767
1920
|
Returns: boolean
|
|
1768
1921
|
}
|
|
1769
1922
|
is_trial:
|
|
@@ -1777,44 +1930,67 @@ export interface Database {
|
|
|
1777
1930
|
}
|
|
1778
1931
|
Returns: number
|
|
1779
1932
|
}
|
|
1780
|
-
|
|
1933
|
+
one_month_ahead: {
|
|
1934
|
+
Args: Record<PropertyKey, never>
|
|
1935
|
+
Returns: string
|
|
1936
|
+
}
|
|
1937
|
+
post_replication_sql:
|
|
1781
1938
|
| {
|
|
1782
1939
|
Args: {
|
|
1783
|
-
|
|
1940
|
+
sql_query: string
|
|
1784
1941
|
}
|
|
1785
|
-
Returns:
|
|
1942
|
+
Returns: undefined
|
|
1786
1943
|
}
|
|
1787
1944
|
| {
|
|
1788
1945
|
Args: {
|
|
1789
|
-
|
|
1790
|
-
|
|
1946
|
+
sql_query: string
|
|
1947
|
+
params: string[]
|
|
1791
1948
|
}
|
|
1792
|
-
Returns:
|
|
1949
|
+
Returns: undefined
|
|
1793
1950
|
}
|
|
1794
|
-
one_month_ahead: {
|
|
1795
|
-
Args: Record<PropertyKey, never>
|
|
1796
|
-
Returns: string
|
|
1797
|
-
}
|
|
1798
1951
|
process_current_jobs_if_unlocked: {
|
|
1799
1952
|
Args: Record<PropertyKey, never>
|
|
1800
1953
|
Returns: number[]
|
|
1801
1954
|
}
|
|
1802
|
-
|
|
1803
|
-
Args:
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1955
|
+
process_requested_jobs: {
|
|
1956
|
+
Args: Record<PropertyKey, never>
|
|
1957
|
+
Returns: undefined
|
|
1958
|
+
}
|
|
1959
|
+
reset_and_seed_data: {
|
|
1960
|
+
Args: Record<PropertyKey, never>
|
|
1961
|
+
Returns: undefined
|
|
1962
|
+
}
|
|
1963
|
+
retry_failed_jobs: {
|
|
1964
|
+
Args: Record<PropertyKey, never>
|
|
1807
1965
|
Returns: undefined
|
|
1808
1966
|
}
|
|
1809
1967
|
schedule_jobs: {
|
|
1810
1968
|
Args: Record<PropertyKey, never>
|
|
1811
1969
|
Returns: undefined
|
|
1812
1970
|
}
|
|
1971
|
+
update_app_usage:
|
|
1972
|
+
| {
|
|
1973
|
+
Args: Record<PropertyKey, never>
|
|
1974
|
+
Returns: undefined
|
|
1975
|
+
}
|
|
1976
|
+
| {
|
|
1977
|
+
Args: {
|
|
1978
|
+
minutes_interval: number
|
|
1979
|
+
}
|
|
1980
|
+
Returns: undefined
|
|
1981
|
+
}
|
|
1982
|
+
verify_mfa: {
|
|
1983
|
+
Args: Record<PropertyKey, never>
|
|
1984
|
+
Returns: boolean
|
|
1985
|
+
}
|
|
1813
1986
|
}
|
|
1814
1987
|
Enums: {
|
|
1988
|
+
app_mode: "prod" | "dev" | "livereload"
|
|
1815
1989
|
disable_update: "major" | "minor" | "version_number" | "none"
|
|
1816
1990
|
key_mode: "read" | "write" | "all" | "upload"
|
|
1991
|
+
pay_as_you_go_type: "base" | "units"
|
|
1817
1992
|
platform_os: "ios" | "android"
|
|
1993
|
+
queue_job_status: "inserted" | "requested" | "failed"
|
|
1818
1994
|
stripe_status:
|
|
1819
1995
|
| "created"
|
|
1820
1996
|
| "succeeded"
|
|
@@ -1822,7 +1998,7 @@ export interface Database {
|
|
|
1822
1998
|
| "failed"
|
|
1823
1999
|
| "deleted"
|
|
1824
2000
|
| "canceled"
|
|
1825
|
-
usage_mode: "
|
|
2001
|
+
usage_mode: "5min" | "day" | "month" | "cycle" | "last_saved"
|
|
1826
2002
|
user_min_right:
|
|
1827
2003
|
| "invite_read"
|
|
1828
2004
|
| "invite_upload"
|
|
@@ -1835,6 +2011,9 @@ export interface Database {
|
|
|
1835
2011
|
user_role: "read" | "upload" | "write" | "admin"
|
|
1836
2012
|
}
|
|
1837
2013
|
CompositeTypes: {
|
|
2014
|
+
match_plan: {
|
|
2015
|
+
name: string
|
|
2016
|
+
}
|
|
1838
2017
|
orgs_table: {
|
|
1839
2018
|
id: string
|
|
1840
2019
|
created_by: string
|
|
@@ -1859,3 +2038,82 @@ export interface Database {
|
|
|
1859
2038
|
}
|
|
1860
2039
|
}
|
|
1861
2040
|
|
|
2041
|
+
export type Tables<
|
|
2042
|
+
PublicTableNameOrOptions extends
|
|
2043
|
+
| keyof (Database["public"]["Tables"] & Database["public"]["Views"])
|
|
2044
|
+
| { schema: keyof Database },
|
|
2045
|
+
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2046
|
+
? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
2047
|
+
Database[PublicTableNameOrOptions["schema"]]["Views"])
|
|
2048
|
+
: never = never
|
|
2049
|
+
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2050
|
+
? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
2051
|
+
Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
2052
|
+
Row: infer R
|
|
2053
|
+
}
|
|
2054
|
+
? R
|
|
2055
|
+
: never
|
|
2056
|
+
: PublicTableNameOrOptions extends keyof (Database["public"]["Tables"] &
|
|
2057
|
+
Database["public"]["Views"])
|
|
2058
|
+
? (Database["public"]["Tables"] &
|
|
2059
|
+
Database["public"]["Views"])[PublicTableNameOrOptions] extends {
|
|
2060
|
+
Row: infer R
|
|
2061
|
+
}
|
|
2062
|
+
? R
|
|
2063
|
+
: never
|
|
2064
|
+
: never
|
|
2065
|
+
|
|
2066
|
+
export type TablesInsert<
|
|
2067
|
+
PublicTableNameOrOptions extends
|
|
2068
|
+
| keyof Database["public"]["Tables"]
|
|
2069
|
+
| { schema: keyof Database },
|
|
2070
|
+
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2071
|
+
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
2072
|
+
: never = never
|
|
2073
|
+
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2074
|
+
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
2075
|
+
Insert: infer I
|
|
2076
|
+
}
|
|
2077
|
+
? I
|
|
2078
|
+
: never
|
|
2079
|
+
: PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
|
|
2080
|
+
? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
|
|
2081
|
+
Insert: infer I
|
|
2082
|
+
}
|
|
2083
|
+
? I
|
|
2084
|
+
: never
|
|
2085
|
+
: never
|
|
2086
|
+
|
|
2087
|
+
export type TablesUpdate<
|
|
2088
|
+
PublicTableNameOrOptions extends
|
|
2089
|
+
| keyof Database["public"]["Tables"]
|
|
2090
|
+
| { schema: keyof Database },
|
|
2091
|
+
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2092
|
+
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
2093
|
+
: never = never
|
|
2094
|
+
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
2095
|
+
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
2096
|
+
Update: infer U
|
|
2097
|
+
}
|
|
2098
|
+
? U
|
|
2099
|
+
: never
|
|
2100
|
+
: PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
|
|
2101
|
+
? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
|
|
2102
|
+
Update: infer U
|
|
2103
|
+
}
|
|
2104
|
+
? U
|
|
2105
|
+
: never
|
|
2106
|
+
: never
|
|
2107
|
+
|
|
2108
|
+
export type Enums<
|
|
2109
|
+
PublicEnumNameOrOptions extends
|
|
2110
|
+
| keyof Database["public"]["Enums"]
|
|
2111
|
+
| { schema: keyof Database },
|
|
2112
|
+
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
2113
|
+
? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
|
2114
|
+
: never = never
|
|
2115
|
+
> = PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
2116
|
+
? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
|
2117
|
+
: PublicEnumNameOrOptions extends keyof Database["public"]["Enums"]
|
|
2118
|
+
? Database["public"]["Enums"][PublicEnumNameOrOptions]
|
|
2119
|
+
: never
|
package/src/utils.ts
CHANGED
|
@@ -119,7 +119,7 @@ export const checkKey = async (supabase: SupabaseClient<Database>, apikey: strin
|
|
|
119
119
|
|
|
120
120
|
export const isGoodPlan = async (supabase: SupabaseClient<Database>, userId: string): Promise<boolean> => {
|
|
121
121
|
const { data } = await supabase
|
|
122
|
-
.rpc('
|
|
122
|
+
.rpc('is_good_plan_v5', { userid: userId })
|
|
123
123
|
.single()
|
|
124
124
|
return data || false
|
|
125
125
|
}
|