@capgo/cli 5.0.0-alpha.3 → 5.0.0-alpha.7

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.
@@ -164,10 +164,12 @@ export interface Database {
164
164
  minUpdateVersion: string | null
165
165
  name: string
166
166
  native_packages: Json[] | null
167
+ owner_org: string
168
+ r2_path: string | null
167
169
  session_key: string | null
168
170
  storage_provider: string
169
171
  updated_at: string | null
170
- user_id: string
172
+ user_id: string | null
171
173
  }
172
174
  Insert: {
173
175
  app_id: string
@@ -180,10 +182,12 @@ export interface Database {
180
182
  minUpdateVersion?: string | null
181
183
  name: string
182
184
  native_packages?: Json[] | null
185
+ owner_org: string
186
+ r2_path?: string | null
183
187
  session_key?: string | null
184
188
  storage_provider?: string
185
189
  updated_at?: string | null
186
- user_id: string
190
+ user_id?: string | null
187
191
  }
188
192
  Update: {
189
193
  app_id?: string
@@ -196,10 +200,12 @@ export interface Database {
196
200
  minUpdateVersion?: string | null
197
201
  name?: string
198
202
  native_packages?: Json[] | null
203
+ owner_org?: string
204
+ r2_path?: string | null
199
205
  session_key?: string | null
200
206
  storage_provider?: string
201
207
  updated_at?: string | null
202
- user_id?: string
208
+ user_id?: string | null
203
209
  }
204
210
  Relationships: [
205
211
  {
@@ -210,10 +216,10 @@ export interface Database {
210
216
  referencedColumns: ['app_id']
211
217
  },
212
218
  {
213
- foreignKeyName: 'app_versions_user_id_fkey'
214
- columns: ['user_id']
219
+ foreignKeyName: 'owner_org_id_fkey'
220
+ columns: ['owner_org']
215
221
  isOneToOne: false
216
- referencedRelation: 'users'
222
+ referencedRelation: 'orgs'
217
223
  referencedColumns: ['id']
218
224
  },
219
225
  ]
@@ -227,10 +233,10 @@ export interface Database {
227
233
  fails: number | null
228
234
  id: number
229
235
  installs: number | null
236
+ owner_org: string
230
237
  size: number
231
238
  uninstalls: number | null
232
239
  updated_at: string | null
233
- user_id: string
234
240
  }
235
241
  Insert: {
236
242
  app_id: string
@@ -240,10 +246,10 @@ export interface Database {
240
246
  fails?: number | null
241
247
  id?: number
242
248
  installs?: number | null
249
+ owner_org: string
243
250
  size: number
244
251
  uninstalls?: number | null
245
252
  updated_at?: string | null
246
- user_id: string
247
253
  }
248
254
  Update: {
249
255
  app_id?: string
@@ -253,10 +259,10 @@ export interface Database {
253
259
  fails?: number | null
254
260
  id?: number
255
261
  installs?: number | null
262
+ owner_org?: string
256
263
  size?: number
257
264
  uninstalls?: number | null
258
265
  updated_at?: string | null
259
- user_id?: string
260
266
  }
261
267
  Relationships: [
262
268
  {
@@ -274,10 +280,10 @@ export interface Database {
274
280
  referencedColumns: ['id']
275
281
  },
276
282
  {
277
- foreignKeyName: 'app_versions_meta_user_id_fkey'
278
- columns: ['user_id']
283
+ foreignKeyName: 'owner_org_id_fkey'
284
+ columns: ['owner_org']
279
285
  isOneToOne: false
280
- referencedRelation: 'users'
286
+ referencedRelation: 'orgs'
281
287
  referencedColumns: ['id']
282
288
  },
283
289
  ]
@@ -290,9 +296,10 @@ export interface Database {
290
296
  id: string | null
291
297
  last_version: string | null
292
298
  name: string | null
299
+ owner_org: string
293
300
  retention: number
294
301
  updated_at: string | null
295
- user_id: string
302
+ user_id: string | null
296
303
  }
297
304
  Insert: {
298
305
  app_id: string
@@ -301,9 +308,10 @@ export interface Database {
301
308
  id?: string | null
302
309
  last_version?: string | null
303
310
  name?: string | null
311
+ owner_org: string
304
312
  retention?: number
305
313
  updated_at?: string | null
306
- user_id: string
314
+ user_id?: string | null
307
315
  }
308
316
  Update: {
309
317
  app_id?: string
@@ -312,9 +320,10 @@ export interface Database {
312
320
  id?: string | null
313
321
  last_version?: string | null
314
322
  name?: string | null
323
+ owner_org?: string
315
324
  retention?: number
316
325
  updated_at?: string | null
317
- user_id?: string
326
+ user_id?: string | null
318
327
  }
319
328
  Relationships: [
320
329
  {
@@ -324,34 +333,77 @@ export interface Database {
324
333
  referencedRelation: 'users'
325
334
  referencedColumns: ['id']
326
335
  },
336
+ {
337
+ foreignKeyName: 'owner_org_id_fkey'
338
+ columns: ['owner_org']
339
+ isOneToOne: false
340
+ referencedRelation: 'orgs'
341
+ referencedColumns: ['id']
342
+ },
327
343
  ]
328
344
  }
345
+ auth_uid: {
346
+ Row: {
347
+ uid: string | null
348
+ }
349
+ Insert: {
350
+ uid?: string | null
351
+ }
352
+ Update: {
353
+ uid?: string | null
354
+ }
355
+ Relationships: []
356
+ }
357
+ bandwidth_usage: {
358
+ Row: {
359
+ app_id: string
360
+ device_id: string
361
+ file_size: number
362
+ id: number
363
+ timestamp: string
364
+ }
365
+ Insert: {
366
+ app_id: string
367
+ device_id: string
368
+ file_size: number
369
+ id?: number
370
+ timestamp?: string
371
+ }
372
+ Update: {
373
+ app_id?: string
374
+ device_id?: string
375
+ file_size?: number
376
+ id?: number
377
+ timestamp?: string
378
+ }
379
+ Relationships: []
380
+ }
329
381
  channel_devices: {
330
382
  Row: {
331
383
  app_id: string
332
384
  channel_id: number
333
385
  created_at: string | null
334
- created_by: string
335
386
  device_id: string
336
387
  id: number
388
+ owner_org: string
337
389
  updated_at: string
338
390
  }
339
391
  Insert: {
340
392
  app_id: string
341
393
  channel_id: number
342
394
  created_at?: string | null
343
- created_by: string
344
395
  device_id: string
345
396
  id?: number
397
+ owner_org: string
346
398
  updated_at?: string
347
399
  }
348
400
  Update: {
349
401
  app_id?: string
350
402
  channel_id?: number
351
403
  created_at?: string | null
352
- created_by?: string
353
404
  device_id?: string
354
405
  id?: number
406
+ owner_org?: string
355
407
  updated_at?: string
356
408
  }
357
409
  Relationships: [
@@ -370,10 +422,10 @@ export interface Database {
370
422
  referencedColumns: ['id']
371
423
  },
372
424
  {
373
- foreignKeyName: 'channel_devices_created_by_fkey'
374
- columns: ['created_by']
425
+ foreignKeyName: 'owner_org_id_fkey'
426
+ columns: ['owner_org']
375
427
  isOneToOne: false
376
- referencedRelation: 'users'
428
+ referencedRelation: 'orgs'
377
429
  referencedColumns: ['id']
378
430
  },
379
431
  ]
@@ -387,7 +439,7 @@ export interface Database {
387
439
  app_id: string
388
440
  beta: boolean
389
441
  created_at: string
390
- created_by: string
442
+ created_by: string | null
391
443
  disableAutoUpdate: Database['public']['Enums']['disable_update']
392
444
  disableAutoUpdateUnderNative: boolean
393
445
  enable_progressive_deploy: boolean
@@ -395,6 +447,7 @@ export interface Database {
395
447
  id: number
396
448
  ios: boolean
397
449
  name: string
450
+ owner_org: string
398
451
  public: boolean
399
452
  secondaryVersionPercentage: number
400
453
  secondVersion: number | null
@@ -409,7 +462,7 @@ export interface Database {
409
462
  app_id: string
410
463
  beta?: boolean
411
464
  created_at?: string
412
- created_by: string
465
+ created_by?: string | null
413
466
  disableAutoUpdate?: Database['public']['Enums']['disable_update']
414
467
  disableAutoUpdateUnderNative?: boolean
415
468
  enable_progressive_deploy?: boolean
@@ -417,6 +470,7 @@ export interface Database {
417
470
  id?: number
418
471
  ios?: boolean
419
472
  name: string
473
+ owner_org: string
420
474
  public?: boolean
421
475
  secondaryVersionPercentage?: number
422
476
  secondVersion?: number | null
@@ -431,7 +485,7 @@ export interface Database {
431
485
  app_id?: string
432
486
  beta?: boolean
433
487
  created_at?: string
434
- created_by?: string
488
+ created_by?: string | null
435
489
  disableAutoUpdate?: Database['public']['Enums']['disable_update']
436
490
  disableAutoUpdateUnderNative?: boolean
437
491
  enable_progressive_deploy?: boolean
@@ -439,6 +493,7 @@ export interface Database {
439
493
  id?: number
440
494
  ios?: boolean
441
495
  name?: string
496
+ owner_org?: string
442
497
  public?: boolean
443
498
  secondaryVersionPercentage?: number
444
499
  secondVersion?: number | null
@@ -453,13 +508,6 @@ export interface Database {
453
508
  referencedRelation: 'apps'
454
509
  referencedColumns: ['app_id']
455
510
  },
456
- {
457
- foreignKeyName: 'channels_created_by_fkey'
458
- columns: ['created_by']
459
- isOneToOne: false
460
- referencedRelation: 'users'
461
- referencedColumns: ['id']
462
- },
463
511
  {
464
512
  foreignKeyName: 'channels_secondVersion_fkey'
465
513
  columns: ['secondVersion']
@@ -474,6 +522,13 @@ export interface Database {
474
522
  referencedRelation: 'app_versions'
475
523
  referencedColumns: ['id']
476
524
  },
525
+ {
526
+ foreignKeyName: 'owner_org_id_fkey'
527
+ columns: ['owner_org']
528
+ isOneToOne: false
529
+ referencedRelation: 'orgs'
530
+ referencedColumns: ['id']
531
+ },
477
532
  ]
478
533
  }
479
534
  clickhouse_app_usage: {
@@ -515,6 +570,129 @@ export interface Database {
515
570
  }
516
571
  Relationships: []
517
572
  }
573
+ clickhouse_app_usage_parm: {
574
+ Row: {
575
+ _app_list: string | null
576
+ _end_date: string | null
577
+ _start_date: string | null
578
+ app_id: string | null
579
+ bandwidth: number | null
580
+ date: string | null
581
+ fail: number | null
582
+ get: number | null
583
+ install: number | null
584
+ mau: number | null
585
+ storage_added: number | null
586
+ storage_deleted: number | null
587
+ uninstall: number | null
588
+ }
589
+ Insert: {
590
+ _app_list?: string | null
591
+ _end_date?: string | null
592
+ _start_date?: string | null
593
+ app_id?: string | null
594
+ bandwidth?: number | null
595
+ date?: string | null
596
+ fail?: number | null
597
+ get?: number | null
598
+ install?: number | null
599
+ mau?: number | null
600
+ storage_added?: number | null
601
+ storage_deleted?: number | null
602
+ uninstall?: number | null
603
+ }
604
+ Update: {
605
+ _app_list?: string | null
606
+ _end_date?: string | null
607
+ _start_date?: string | null
608
+ app_id?: string | null
609
+ bandwidth?: number | null
610
+ date?: string | null
611
+ fail?: number | null
612
+ get?: number | null
613
+ install?: number | null
614
+ mau?: number | null
615
+ storage_added?: number | null
616
+ storage_deleted?: number | null
617
+ uninstall?: number | null
618
+ }
619
+ Relationships: []
620
+ }
621
+ clickhouse_devices: {
622
+ Row: {
623
+ app_id: string | null
624
+ created_at: string | null
625
+ custom_id: string | null
626
+ device_id: string | null
627
+ is_emulator: boolean | null
628
+ is_prod: boolean | null
629
+ os_version: string | null
630
+ platform: string | null
631
+ plugin_version: string | null
632
+ updated_at: string | null
633
+ version: number | null
634
+ version_build: string | null
635
+ }
636
+ Insert: {
637
+ app_id?: string | null
638
+ created_at?: string | null
639
+ custom_id?: string | null
640
+ device_id?: string | null
641
+ is_emulator?: boolean | null
642
+ is_prod?: boolean | null
643
+ os_version?: string | null
644
+ platform?: string | null
645
+ plugin_version?: string | null
646
+ updated_at?: string | null
647
+ version?: number | null
648
+ version_build?: string | null
649
+ }
650
+ Update: {
651
+ app_id?: string | null
652
+ created_at?: string | null
653
+ custom_id?: string | null
654
+ device_id?: string | null
655
+ is_emulator?: boolean | null
656
+ is_prod?: boolean | null
657
+ os_version?: string | null
658
+ platform?: string | null
659
+ plugin_version?: string | null
660
+ updated_at?: string | null
661
+ version?: number | null
662
+ version_build?: string | null
663
+ }
664
+ Relationships: []
665
+ }
666
+ clickhouse_logs: {
667
+ Row: {
668
+ action: string | null
669
+ app_id: string | null
670
+ created_at: string | null
671
+ device_id: string | null
672
+ platform: string | null
673
+ version: number | null
674
+ version_build: string | null
675
+ }
676
+ Insert: {
677
+ action?: string | null
678
+ app_id?: string | null
679
+ created_at?: string | null
680
+ device_id?: string | null
681
+ platform?: string | null
682
+ version?: number | null
683
+ version_build?: string | null
684
+ }
685
+ Update: {
686
+ action?: string | null
687
+ app_id?: string | null
688
+ created_at?: string | null
689
+ device_id?: string | null
690
+ platform?: string | null
691
+ version?: number | null
692
+ version_build?: string | null
693
+ }
694
+ Relationships: []
695
+ }
518
696
  cycle_info: {
519
697
  Row: {
520
698
  subscription_anchor_end: string | null
@@ -530,6 +708,99 @@ export interface Database {
530
708
  }
531
709
  Relationships: []
532
710
  }
711
+ daily_bandwidth: {
712
+ Row: {
713
+ app_id: string
714
+ bandwidth: number
715
+ date: string
716
+ id: number
717
+ }
718
+ Insert: {
719
+ app_id: string
720
+ bandwidth: number
721
+ date: string
722
+ id?: number
723
+ }
724
+ Update: {
725
+ app_id?: string
726
+ bandwidth?: number
727
+ date?: string
728
+ id?: number
729
+ }
730
+ Relationships: []
731
+ }
732
+ daily_mau: {
733
+ Row: {
734
+ app_id: string
735
+ date: string
736
+ id: number
737
+ mau: number
738
+ }
739
+ Insert: {
740
+ app_id: string
741
+ date: string
742
+ id?: number
743
+ mau: number
744
+ }
745
+ Update: {
746
+ app_id?: string
747
+ date?: string
748
+ id?: number
749
+ mau?: number
750
+ }
751
+ Relationships: []
752
+ }
753
+ daily_storage: {
754
+ Row: {
755
+ app_id: string
756
+ date: string
757
+ id: number
758
+ storage: number
759
+ }
760
+ Insert: {
761
+ app_id: string
762
+ date: string
763
+ id?: number
764
+ storage: number
765
+ }
766
+ Update: {
767
+ app_id?: string
768
+ date?: string
769
+ id?: number
770
+ storage?: number
771
+ }
772
+ Relationships: []
773
+ }
774
+ daily_version: {
775
+ Row: {
776
+ app_id: string
777
+ date: string
778
+ fail: number | null
779
+ get: number | null
780
+ install: number | null
781
+ uninstall: number | null
782
+ version: number
783
+ }
784
+ Insert: {
785
+ app_id: string
786
+ date: string
787
+ fail?: number | null
788
+ get?: number | null
789
+ install?: number | null
790
+ uninstall?: number | null
791
+ version: number
792
+ }
793
+ Update: {
794
+ app_id?: string
795
+ date?: string
796
+ fail?: number | null
797
+ get?: number | null
798
+ install?: number | null
799
+ uninstall?: number | null
800
+ version?: number
801
+ }
802
+ Relationships: []
803
+ }
533
804
  deleted_account: {
534
805
  Row: {
535
806
  created_at: string | null
@@ -548,6 +819,27 @@ export interface Database {
548
819
  }
549
820
  Relationships: []
550
821
  }
822
+ device_usage: {
823
+ Row: {
824
+ app_id: string
825
+ device_id: string
826
+ id: number
827
+ timestamp: string
828
+ }
829
+ Insert: {
830
+ app_id: string
831
+ device_id: string
832
+ id?: number
833
+ timestamp?: string
834
+ }
835
+ Update: {
836
+ app_id?: string
837
+ device_id?: string
838
+ id?: number
839
+ timestamp?: string
840
+ }
841
+ Relationships: []
842
+ }
551
843
  devices: {
552
844
  Row: {
553
845
  app_id: string
@@ -597,27 +889,27 @@ export interface Database {
597
889
  Row: {
598
890
  app_id: string
599
891
  created_at: string | null
600
- created_by: string | null
601
892
  device_id: string
602
893
  id: number
894
+ owner_org: string
603
895
  updated_at: string | null
604
896
  version: number
605
897
  }
606
898
  Insert: {
607
899
  app_id: string
608
900
  created_at?: string | null
609
- created_by?: string | null
610
901
  device_id: string
611
902
  id?: number
903
+ owner_org: string
612
904
  updated_at?: string | null
613
905
  version: number
614
906
  }
615
907
  Update: {
616
908
  app_id?: string
617
909
  created_at?: string | null
618
- created_by?: string | null
619
910
  device_id?: string
620
911
  id?: number
912
+ owner_org?: string
621
913
  updated_at?: string | null
622
914
  version?: number
623
915
  }
@@ -630,17 +922,17 @@ export interface Database {
630
922
  referencedColumns: ['app_id']
631
923
  },
632
924
  {
633
- foreignKeyName: 'devices_override_created_by_fkey'
634
- columns: ['created_by']
925
+ foreignKeyName: 'devices_override_version_fkey'
926
+ columns: ['version']
635
927
  isOneToOne: false
636
- referencedRelation: 'users'
928
+ referencedRelation: 'app_versions'
637
929
  referencedColumns: ['id']
638
930
  },
639
931
  {
640
- foreignKeyName: 'devices_override_version_fkey'
641
- columns: ['version']
932
+ foreignKeyName: 'owner_org_id_fkey'
933
+ columns: ['owner_org']
642
934
  isOneToOne: false
643
- referencedRelation: 'app_versions'
935
+ referencedRelation: 'orgs'
644
936
  referencedColumns: ['id']
645
937
  },
646
938
  ]
@@ -740,32 +1032,32 @@ export interface Database {
740
1032
  created_at: string | null
741
1033
  id: string
742
1034
  last_send_at: string
1035
+ owner_org: string
743
1036
  total_send: number
744
1037
  updated_at: string | null
745
- user_id: string
746
1038
  }
747
1039
  Insert: {
748
1040
  created_at?: string | null
749
1041
  id: string
750
1042
  last_send_at?: string
1043
+ owner_org: string
751
1044
  total_send?: number
752
1045
  updated_at?: string | null
753
- user_id: string
754
1046
  }
755
1047
  Update: {
756
1048
  created_at?: string | null
757
1049
  id?: string
758
1050
  last_send_at?: string
1051
+ owner_org?: string
759
1052
  total_send?: number
760
1053
  updated_at?: string | null
761
- user_id?: string
762
1054
  }
763
1055
  Relationships: [
764
1056
  {
765
- foreignKeyName: 'notifications_user_id_fkey'
766
- columns: ['user_id']
1057
+ foreignKeyName: 'owner_org_id_fkey'
1058
+ columns: ['owner_org']
767
1059
  isOneToOne: false
768
- referencedRelation: 'users'
1060
+ referencedRelation: 'orgs'
769
1061
  referencedColumns: ['id']
770
1062
  },
771
1063
  ]
@@ -836,24 +1128,30 @@ export interface Database {
836
1128
  Row: {
837
1129
  created_at: string | null
838
1130
  created_by: string
1131
+ customer_id: string | null
839
1132
  id: string
840
1133
  logo: string | null
1134
+ management_email: string
841
1135
  name: string
842
1136
  updated_at: string | null
843
1137
  }
844
1138
  Insert: {
845
1139
  created_at?: string | null
846
1140
  created_by: string
1141
+ customer_id?: string | null
847
1142
  id?: string
848
1143
  logo?: string | null
1144
+ management_email: string
849
1145
  name: string
850
1146
  updated_at?: string | null
851
1147
  }
852
1148
  Update: {
853
1149
  created_at?: string | null
854
1150
  created_by?: string
1151
+ customer_id?: string | null
855
1152
  id?: string
856
1153
  logo?: string | null
1154
+ management_email?: string
857
1155
  name?: string
858
1156
  updated_at?: string | null
859
1157
  }
@@ -865,6 +1163,13 @@ export interface Database {
865
1163
  referencedRelation: 'users'
866
1164
  referencedColumns: ['id']
867
1165
  },
1166
+ {
1167
+ foreignKeyName: 'orgs_customer_id_fkey'
1168
+ columns: ['customer_id']
1169
+ isOneToOne: true
1170
+ referencedRelation: 'stripe_info'
1171
+ referencedColumns: ['customer_id']
1172
+ },
868
1173
  ]
869
1174
  }
870
1175
  plans: {
@@ -966,102 +1271,27 @@ export interface Database {
966
1271
  }
967
1272
  Relationships: []
968
1273
  }
969
- store_apps: {
1274
+ storage_usage: {
970
1275
  Row: {
971
1276
  app_id: string
972
- capacitor: boolean
973
- capgo: boolean
974
- category: string
975
- cordova: boolean
976
- created_at: string | null
977
- developer: string
978
- developer_email: string
979
- developer_id: string | null
980
- error_get_framework: string
981
- error_get_info: string
982
- error_get_similar: string
983
- flutter: boolean
984
- free: boolean
985
- icon: string
986
- installs: number
987
- kotlin: boolean
988
- lang: string | null
989
- native_script: boolean
990
- onprem: boolean
991
- react_native: boolean
992
- score: number
993
- summary: string
994
- title: string
995
- to_get_framework: boolean
996
- to_get_info: boolean
997
- to_get_similar: boolean
998
- updated_at: string
999
- updates: number
1000
- url: string
1277
+ device_id: string
1278
+ file_size: number
1279
+ id: number
1280
+ timestamp: string
1001
1281
  }
1002
1282
  Insert: {
1003
1283
  app_id: string
1004
- capacitor?: boolean
1005
- capgo?: boolean
1006
- category?: string
1007
- cordova?: boolean
1008
- created_at?: string | null
1009
- developer?: string
1010
- developer_email?: string
1011
- developer_id?: string | null
1012
- error_get_framework?: string
1013
- error_get_info?: string
1014
- error_get_similar?: string
1015
- flutter?: boolean
1016
- free?: boolean
1017
- icon?: string
1018
- installs?: number
1019
- kotlin?: boolean
1020
- lang?: string | null
1021
- native_script?: boolean
1022
- onprem?: boolean
1023
- react_native?: boolean
1024
- score?: number
1025
- summary?: string
1026
- title?: string
1027
- to_get_framework?: boolean
1028
- to_get_info?: boolean
1029
- to_get_similar?: boolean
1030
- updated_at?: string
1031
- updates?: number
1032
- url?: string
1284
+ device_id: string
1285
+ file_size: number
1286
+ id?: number
1287
+ timestamp?: string
1033
1288
  }
1034
1289
  Update: {
1035
1290
  app_id?: string
1036
- capacitor?: boolean
1037
- capgo?: boolean
1038
- category?: string
1039
- cordova?: boolean
1040
- created_at?: string | null
1041
- developer?: string
1042
- developer_email?: string
1043
- developer_id?: string | null
1044
- error_get_framework?: string
1045
- error_get_info?: string
1046
- error_get_similar?: string
1047
- flutter?: boolean
1048
- free?: boolean
1049
- icon?: string
1050
- installs?: number
1051
- kotlin?: boolean
1052
- lang?: string | null
1053
- native_script?: boolean
1054
- onprem?: boolean
1055
- react_native?: boolean
1056
- score?: number
1057
- summary?: string
1058
- title?: string
1059
- to_get_framework?: boolean
1060
- to_get_info?: boolean
1061
- to_get_similar?: boolean
1062
- updated_at?: string
1063
- updates?: number
1064
- url?: string
1291
+ device_id?: string
1292
+ file_size?: number
1293
+ id?: number
1294
+ timestamp?: string
1065
1295
  }
1066
1296
  Relationships: []
1067
1297
  }
@@ -1184,6 +1414,27 @@ export interface Database {
1184
1414
  },
1185
1415
  ]
1186
1416
  }
1417
+ version_usage: {
1418
+ Row: {
1419
+ action: string
1420
+ app_id: string
1421
+ timestamp: string
1422
+ version: number
1423
+ }
1424
+ Insert: {
1425
+ action: string
1426
+ app_id: string
1427
+ timestamp: string
1428
+ version: number
1429
+ }
1430
+ Update: {
1431
+ action?: string
1432
+ app_id?: string
1433
+ timestamp?: string
1434
+ version?: number
1435
+ }
1436
+ Relationships: []
1437
+ }
1187
1438
  workers: {
1188
1439
  Row: {
1189
1440
  id: number
@@ -1275,10 +1526,6 @@ export interface Database {
1275
1526
  }
1276
1527
  Returns: number
1277
1528
  }
1278
- count_all_apps: {
1279
- Args: Record<PropertyKey, never>
1280
- Returns: number
1281
- }
1282
1529
  count_all_need_upgrade: {
1283
1530
  Args: Record<PropertyKey, never>
1284
1531
  Returns: number
@@ -1309,10 +1556,6 @@ export interface Database {
1309
1556
  Args: Record<PropertyKey, never>
1310
1557
  Returns: number
1311
1558
  }
1312
- count_all_updates: {
1313
- Args: Record<PropertyKey, never>
1314
- Returns: number
1315
- }
1316
1559
  create_partitions: {
1317
1560
  Args: {
1318
1561
  start_date: string
@@ -1389,6 +1632,16 @@ export interface Database {
1389
1632
  storage: number
1390
1633
  }[]
1391
1634
  }
1635
+ get_current_plan_max_org: {
1636
+ Args: {
1637
+ orgid: string
1638
+ }
1639
+ Returns: {
1640
+ mau: number
1641
+ bandwidth: number
1642
+ storage: number
1643
+ }[]
1644
+ }
1392
1645
  get_current_plan_name:
1393
1646
  | {
1394
1647
  Args: Record<PropertyKey, never>
@@ -1400,6 +1653,12 @@ export interface Database {
1400
1653
  }
1401
1654
  Returns: string
1402
1655
  }
1656
+ get_current_plan_name_org: {
1657
+ Args: {
1658
+ orgid: string
1659
+ }
1660
+ Returns: string
1661
+ }
1403
1662
  get_customer_counts: {
1404
1663
  Args: Record<PropertyKey, never>
1405
1664
  Returns: {
@@ -1408,23 +1667,24 @@ export interface Database {
1408
1667
  total: number
1409
1668
  }[]
1410
1669
  }
1411
- get_cycle_info:
1412
- | {
1413
- Args: Record<PropertyKey, never>
1414
- Returns: {
1415
- subscription_anchor_start: string
1416
- subscription_anchor_end: string
1417
- }[]
1670
+ get_cycle_info: {
1671
+ Args: {
1672
+ userid: string
1418
1673
  }
1419
- | {
1420
- Args: {
1421
- userid: string
1422
- }
1423
- Returns: {
1424
- subscription_anchor_start: string
1425
- subscription_anchor_end: string
1426
- }[]
1674
+ Returns: {
1675
+ subscription_anchor_start: string
1676
+ subscription_anchor_end: string
1677
+ }[]
1678
+ }
1679
+ get_cycle_info_org: {
1680
+ Args: {
1681
+ orgid: string
1427
1682
  }
1683
+ Returns: {
1684
+ subscription_anchor_start: string
1685
+ subscription_anchor_end: string
1686
+ }[]
1687
+ }
1428
1688
  get_db_url: {
1429
1689
  Args: Record<PropertyKey, never>
1430
1690
  Returns: string
@@ -1440,6 +1700,23 @@ export interface Database {
1440
1700
  Args: Record<PropertyKey, never>
1441
1701
  Returns: string
1442
1702
  }
1703
+ get_identity:
1704
+ | {
1705
+ Args: Record<PropertyKey, never>
1706
+ Returns: string
1707
+ }
1708
+ | {
1709
+ Args: {
1710
+ keymode: Database['public']['Enums']['key_mode'][]
1711
+ }
1712
+ Returns: string
1713
+ }
1714
+ get_identity_apikey_only: {
1715
+ Args: {
1716
+ keymode: Database['public']['Enums']['key_mode'][]
1717
+ }
1718
+ Returns: string
1719
+ }
1443
1720
  get_infos: {
1444
1721
  Args: {
1445
1722
  appid: string
@@ -1491,6 +1768,7 @@ export interface Database {
1491
1768
  uid: string
1492
1769
  email: string
1493
1770
  image_url: string
1771
+ role: Database['public']['Enums']['user_min_right']
1494
1772
  }[]
1495
1773
  }
1496
1774
  get_org_perm_for_apikey: {
@@ -1500,18 +1778,6 @@ export interface Database {
1500
1778
  }
1501
1779
  Returns: string
1502
1780
  }
1503
- get_orgs_v2: {
1504
- Args: {
1505
- userid: string
1506
- }
1507
- Returns: {
1508
- gid: string
1509
- created_by: string
1510
- logo: string
1511
- name: string
1512
- role: string
1513
- }[]
1514
- }
1515
1781
  get_orgs_v3: {
1516
1782
  Args: {
1517
1783
  userid: string
@@ -1528,12 +1794,94 @@ export interface Database {
1528
1794
  is_canceled: boolean
1529
1795
  }[]
1530
1796
  }
1797
+ get_orgs_v4:
1798
+ | {
1799
+ Args: Record<PropertyKey, never>
1800
+ Returns: {
1801
+ gid: string
1802
+ created_by: string
1803
+ logo: string
1804
+ name: string
1805
+ role: string
1806
+ paying: boolean
1807
+ trial_left: number
1808
+ can_use_more: boolean
1809
+ is_canceled: boolean
1810
+ app_count: number
1811
+ subscription_start: string
1812
+ subscription_end: string
1813
+ }[]
1814
+ }
1815
+ | {
1816
+ Args: {
1817
+ userid: string
1818
+ }
1819
+ Returns: {
1820
+ gid: string
1821
+ created_by: string
1822
+ logo: string
1823
+ name: string
1824
+ role: string
1825
+ paying: boolean
1826
+ trial_left: number
1827
+ can_use_more: boolean
1828
+ is_canceled: boolean
1829
+ app_count: number
1830
+ subscription_start: string
1831
+ subscription_end: string
1832
+ }[]
1833
+ }
1834
+ get_orgs_v5:
1835
+ | {
1836
+ Args: Record<PropertyKey, never>
1837
+ Returns: {
1838
+ gid: string
1839
+ created_by: string
1840
+ logo: string
1841
+ name: string
1842
+ role: string
1843
+ paying: boolean
1844
+ trial_left: number
1845
+ can_use_more: boolean
1846
+ is_canceled: boolean
1847
+ app_count: number
1848
+ subscription_start: string
1849
+ subscription_end: string
1850
+ management_email: string
1851
+ }[]
1852
+ }
1853
+ | {
1854
+ Args: {
1855
+ userid: string
1856
+ }
1857
+ Returns: {
1858
+ gid: string
1859
+ created_by: string
1860
+ logo: string
1861
+ name: string
1862
+ role: string
1863
+ paying: boolean
1864
+ trial_left: number
1865
+ can_use_more: boolean
1866
+ is_canceled: boolean
1867
+ app_count: number
1868
+ subscription_start: string
1869
+ subscription_end: string
1870
+ management_email: string
1871
+ }[]
1872
+ }
1531
1873
  get_plan_usage_percent: {
1532
1874
  Args: {
1533
1875
  userid: string
1534
1876
  }
1535
1877
  Returns: number
1536
1878
  }
1879
+ get_plan_usage_percent_org: {
1880
+ Args: {
1881
+ orgid: string
1882
+ }
1883
+ Returns: number
1884
+ }
1537
1885
  get_total_app_storage_size:
1538
1886
  | {
1539
1887
  Args: {
@@ -1548,6 +1896,13 @@ export interface Database {
1548
1896
  }
1549
1897
  Returns: number
1550
1898
  }
1899
+ get_total_app_storage_size_orgs: {
1900
+ Args: {
1901
+ org_id: string
1902
+ app_id: string
1903
+ }
1904
+ Returns: number
1905
+ }
1551
1906
  get_total_stats_v5: {
1552
1907
  Args: {
1553
1908
  userid: string
@@ -1558,6 +1913,16 @@ export interface Database {
1558
1913
  storage: number
1559
1914
  }[]
1560
1915
  }
1916
+ get_total_stats_v5_org: {
1917
+ Args: {
1918
+ orgid: string
1919
+ }
1920
+ Returns: {
1921
+ mau: number
1922
+ bandwidth: number
1923
+ storage: number
1924
+ }[]
1925
+ }
1561
1926
  get_total_storage_size:
1562
1927
  | {
1563
1928
  Args: Record<PropertyKey, never>
@@ -1582,6 +1947,12 @@ export interface Database {
1582
1947
  }
1583
1948
  Returns: number
1584
1949
  }
1950
+ get_total_storage_size_org: {
1951
+ Args: {
1952
+ org_id: string
1953
+ }
1954
+ Returns: number
1955
+ }
1585
1956
  get_usage_mode_and_last_saved: {
1586
1957
  Args: Record<PropertyKey, never>
1587
1958
  Returns: {
@@ -1632,6 +2003,14 @@ export interface Database {
1632
2003
  }
1633
2004
  Returns: boolean
1634
2005
  }
2006
+ has_app_right_userid: {
2007
+ Args: {
2008
+ appid: string
2009
+ right: Database['public']['Enums']['user_min_right']
2010
+ userid: string
2011
+ }
2012
+ Returns: boolean
2013
+ }
1635
2014
  has_min_right: {
1636
2015
  Args: {
1637
2016
  _userid: string
@@ -1656,13 +2035,6 @@ export interface Database {
1656
2035
  }
1657
2036
  Returns: number
1658
2037
  }
1659
- increment_store: {
1660
- Args: {
1661
- app_id: string
1662
- updates: number
1663
- }
1664
- Returns: undefined
1665
- }
1666
2038
  invite_user_to_org: {
1667
2039
  Args: {
1668
2040
  email: string
@@ -1696,6 +2068,12 @@ export interface Database {
1696
2068
  }
1697
2069
  Returns: boolean
1698
2070
  }
2071
+ is_allowed_action_org: {
2072
+ Args: {
2073
+ orgid: string
2074
+ }
2075
+ Returns: boolean
2076
+ }
1699
2077
  is_allowed_action_user:
1700
2078
  | {
1701
2079
  Args: Record<PropertyKey, never>
@@ -1776,6 +2154,12 @@ export interface Database {
1776
2154
  }
1777
2155
  Returns: boolean
1778
2156
  }
2157
+ is_canceled_org: {
2158
+ Args: {
2159
+ orgid: string
2160
+ }
2161
+ Returns: boolean
2162
+ }
1779
2163
  is_free_usage:
1780
2164
  | {
1781
2165
  Args: Record<PropertyKey, never>
@@ -1787,15 +2171,15 @@ export interface Database {
1787
2171
  }
1788
2172
  Returns: boolean
1789
2173
  }
1790
- is_good_plan_v3: {
2174
+ is_good_plan_v5: {
1791
2175
  Args: {
1792
2176
  userid: string
1793
2177
  }
1794
2178
  Returns: boolean
1795
2179
  }
1796
- is_good_plan_v5: {
2180
+ is_good_plan_v5_org: {
1797
2181
  Args: {
1798
- userid: string
2182
+ orgid: string
1799
2183
  }
1800
2184
  Returns: boolean
1801
2185
  }
@@ -1823,6 +2207,12 @@ export interface Database {
1823
2207
  }
1824
2208
  Returns: boolean
1825
2209
  }
2210
+ is_onboarded_org: {
2211
+ Args: {
2212
+ orgid: string
2213
+ }
2214
+ Returns: boolean
2215
+ }
1826
2216
  is_onboarding_needed:
1827
2217
  | {
1828
2218
  Args: Record<PropertyKey, never>
@@ -1863,6 +2253,18 @@ export interface Database {
1863
2253
  }
1864
2254
  Returns: boolean
1865
2255
  }
2256
+ is_paying_and_good_plan_org: {
2257
+ Args: {
2258
+ orgid: string
2259
+ }
2260
+ Returns: boolean
2261
+ }
2262
+ is_paying_org: {
2263
+ Args: {
2264
+ orgid: string
2265
+ }
2266
+ Returns: boolean
2267
+ }
1866
2268
  is_trial:
1867
2269
  | {
1868
2270
  Args: Record<PropertyKey, never>
@@ -1874,6 +2276,12 @@ export interface Database {
1874
2276
  }
1875
2277
  Returns: number
1876
2278
  }
2279
+ is_trial_org: {
2280
+ Args: {
2281
+ orgid: string
2282
+ }
2283
+ Returns: number
2284
+ }
1877
2285
  one_month_ahead: {
1878
2286
  Args: Record<PropertyKey, never>
1879
2287
  Returns: string
@@ -1908,10 +2316,6 @@ export interface Database {
1908
2316
  Args: Record<PropertyKey, never>
1909
2317
  Returns: undefined
1910
2318
  }
1911
- schedule_jobs: {
1912
- Args: Record<PropertyKey, never>
1913
- Returns: undefined
1914
- }
1915
2319
  update_app_usage:
1916
2320
  | {
1917
2321
  Args: Record<PropertyKey, never>
@@ -1948,10 +2352,12 @@ export interface Database {
1948
2352
  | 'invite_upload'
1949
2353
  | 'invite_write'
1950
2354
  | 'invite_admin'
2355
+ | 'invite_super_admin'
1951
2356
  | 'read'
1952
2357
  | 'upload'
1953
2358
  | 'write'
1954
2359
  | 'admin'
2360
+ | 'super_admin'
1955
2361
  user_role: 'read' | 'upload' | 'write' | 'admin'
1956
2362
  }
1957
2363
  CompositeTypes: {