@capgo/cli 4.13.2 → 4.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/.github/FUNDING.yml +0 -1
  4. package/.github/workflows/autofix.yml +0 -25
  5. package/.github/workflows/build.yml +0 -46
  6. package/.github/workflows/bump_version.yml +0 -56
  7. package/.github/workflows/check_posix_paths.yml +0 -229
  8. package/.github/workflows/test.yml +0 -30
  9. package/.prettierignore +0 -6
  10. package/.vscode/launch.json +0 -23
  11. package/.vscode/settings.json +0 -46
  12. package/.vscode/tasks.json +0 -42
  13. package/CHANGELOG.md +0 -3392
  14. package/build.mjs +0 -21
  15. package/bun.lockb +0 -0
  16. package/bunfig.toml +0 -2
  17. package/capacitor.config.ts +0 -33
  18. package/crypto_explained.png +0 -0
  19. package/eslint.config.js +0 -10
  20. package/renovate.json +0 -23
  21. package/src/api/app.ts +0 -55
  22. package/src/api/channels.ts +0 -163
  23. package/src/api/crypto.ts +0 -116
  24. package/src/api/devices_override.ts +0 -41
  25. package/src/api/update.ts +0 -13
  26. package/src/api/versions.ts +0 -101
  27. package/src/app/add.ts +0 -157
  28. package/src/app/debug.ts +0 -258
  29. package/src/app/delete.ts +0 -110
  30. package/src/app/info.ts +0 -99
  31. package/src/app/list.ts +0 -67
  32. package/src/app/set.ts +0 -96
  33. package/src/bundle/check.ts +0 -42
  34. package/src/bundle/cleanup.ts +0 -123
  35. package/src/bundle/compatibility.ts +0 -70
  36. package/src/bundle/decrypt.ts +0 -54
  37. package/src/bundle/delete.ts +0 -52
  38. package/src/bundle/encrypt.ts +0 -60
  39. package/src/bundle/list.ts +0 -42
  40. package/src/bundle/unlink.ts +0 -88
  41. package/src/bundle/upload.ts +0 -552
  42. package/src/bundle/zip.ts +0 -145
  43. package/src/channel/add.ts +0 -80
  44. package/src/channel/currentBundle.ts +0 -72
  45. package/src/channel/delete.ts +0 -57
  46. package/src/channel/list.ts +0 -49
  47. package/src/channel/set.ts +0 -179
  48. package/src/config/index.ts +0 -156
  49. package/src/index.ts +0 -310
  50. package/src/init.ts +0 -495
  51. package/src/key.ts +0 -135
  52. package/src/login.ts +0 -70
  53. package/src/types/capacitor__cli.d.ts +0 -6
  54. package/src/types/supabase.types.ts +0 -2123
  55. package/src/user/account.ts +0 -11
  56. package/src/utils.ts +0 -1076
  57. package/test/VerifyZip.java +0 -83
  58. package/test/check-posix-paths.js +0 -21
  59. package/test/chunk_convert.ts +0 -28
  60. package/test/data.ts +0 -18769
  61. package/test/test_headers_rls.ts +0 -24
  62. package/test/test_semver.ts +0 -13
  63. package/test/test_upload/app.js +0 -3
  64. package/test/test_upload/assets/check-posix-paths.js +0 -21
  65. package/test/test_upload/index.html +0 -0
  66. package/test/test_zip_swift/Package.resolved +0 -24
  67. package/test/test_zip_swift/Package.swift +0 -29
  68. package/test/test_zip_swift/Sources/main.swift +0 -80
  69. package/tsconfig.json +0 -39
@@ -1,2123 +0,0 @@
1
- export type Json =
2
- | string
3
- | number
4
- | boolean
5
- | null
6
- | { [key: string]: Json | undefined }
7
- | Json[]
8
-
9
- export interface Database {
10
- public: {
11
- Tables: {
12
- apikeys: {
13
- Row: {
14
- created_at: string | null
15
- id: number
16
- key: string
17
- mode: Database['public']['Enums']['key_mode']
18
- name: string
19
- updated_at: string | null
20
- user_id: string
21
- }
22
- Insert: {
23
- created_at?: string | null
24
- id?: number
25
- key: string
26
- mode: Database['public']['Enums']['key_mode']
27
- name: string
28
- updated_at?: string | null
29
- user_id: string
30
- }
31
- Update: {
32
- created_at?: string | null
33
- id?: number
34
- key?: string
35
- mode?: Database['public']['Enums']['key_mode']
36
- name?: string
37
- updated_at?: string | null
38
- user_id?: string
39
- }
40
- Relationships: [
41
- {
42
- foreignKeyName: 'apikeys_user_id_fkey'
43
- columns: ['user_id']
44
- isOneToOne: false
45
- referencedRelation: 'users'
46
- referencedColumns: ['id']
47
- },
48
- ]
49
- }
50
- app_versions: {
51
- Row: {
52
- app_id: string
53
- bucket_id: string | null
54
- checksum: string | null
55
- created_at: string | null
56
- deleted: boolean
57
- external_url: string | null
58
- id: number
59
- minUpdateVersion: string | null
60
- name: string
61
- native_packages: Json[] | null
62
- owner_org: string
63
- r2_path: string | null
64
- session_key: string | null
65
- storage_provider: string
66
- updated_at: string | null
67
- user_id: string | null
68
- }
69
- Insert: {
70
- app_id: string
71
- bucket_id?: string | null
72
- checksum?: string | null
73
- created_at?: string | null
74
- deleted?: boolean
75
- external_url?: string | null
76
- id?: number
77
- minUpdateVersion?: string | null
78
- name: string
79
- native_packages?: Json[] | null
80
- owner_org: string
81
- r2_path?: string | null
82
- session_key?: string | null
83
- storage_provider?: string
84
- updated_at?: string | null
85
- user_id?: string | null
86
- }
87
- Update: {
88
- app_id?: string
89
- bucket_id?: string | null
90
- checksum?: string | null
91
- created_at?: string | null
92
- deleted?: boolean
93
- external_url?: string | null
94
- id?: number
95
- minUpdateVersion?: string | null
96
- name?: string
97
- native_packages?: Json[] | null
98
- owner_org?: string
99
- r2_path?: string | null
100
- session_key?: string | null
101
- storage_provider?: string
102
- updated_at?: string | null
103
- user_id?: string | null
104
- }
105
- Relationships: [
106
- {
107
- foreignKeyName: 'app_versions_app_id_fkey'
108
- columns: ['app_id']
109
- isOneToOne: false
110
- referencedRelation: 'apps'
111
- referencedColumns: ['app_id']
112
- },
113
- {
114
- foreignKeyName: 'owner_org_id_fkey'
115
- columns: ['owner_org']
116
- isOneToOne: false
117
- referencedRelation: 'orgs'
118
- referencedColumns: ['id']
119
- },
120
- ]
121
- }
122
- app_versions_meta: {
123
- Row: {
124
- app_id: string
125
- checksum: string
126
- created_at: string | null
127
- devices: number | null
128
- fails: number | null
129
- id: number
130
- installs: number | null
131
- owner_org: string
132
- size: number
133
- uninstalls: number | null
134
- updated_at: string | null
135
- }
136
- Insert: {
137
- app_id: string
138
- checksum: string
139
- created_at?: string | null
140
- devices?: number | null
141
- fails?: number | null
142
- id?: number
143
- installs?: number | null
144
- owner_org: string
145
- size: number
146
- uninstalls?: number | null
147
- updated_at?: string | null
148
- }
149
- Update: {
150
- app_id?: string
151
- checksum?: string
152
- created_at?: string | null
153
- devices?: number | null
154
- fails?: number | null
155
- id?: number
156
- installs?: number | null
157
- owner_org?: string
158
- size?: number
159
- uninstalls?: number | null
160
- updated_at?: string | null
161
- }
162
- Relationships: [
163
- {
164
- foreignKeyName: 'app_versions_meta_app_id_fkey'
165
- columns: ['app_id']
166
- isOneToOne: false
167
- referencedRelation: 'apps'
168
- referencedColumns: ['app_id']
169
- },
170
- {
171
- foreignKeyName: 'app_versions_meta_id_fkey'
172
- columns: ['id']
173
- isOneToOne: true
174
- referencedRelation: 'app_versions'
175
- referencedColumns: ['id']
176
- },
177
- {
178
- foreignKeyName: 'owner_org_id_fkey'
179
- columns: ['owner_org']
180
- isOneToOne: false
181
- referencedRelation: 'orgs'
182
- referencedColumns: ['id']
183
- },
184
- ]
185
- }
186
- apps: {
187
- Row: {
188
- app_id: string
189
- created_at: string | null
190
- icon_url: string
191
- id: string | null
192
- last_version: string | null
193
- name: string | null
194
- owner_org: string
195
- retention: number
196
- updated_at: string | null
197
- user_id: string | null
198
- }
199
- Insert: {
200
- app_id: string
201
- created_at?: string | null
202
- icon_url: string
203
- id?: string | null
204
- last_version?: string | null
205
- name?: string | null
206
- owner_org: string
207
- retention?: number
208
- updated_at?: string | null
209
- user_id?: string | null
210
- }
211
- Update: {
212
- app_id?: string
213
- created_at?: string | null
214
- icon_url?: string
215
- id?: string | null
216
- last_version?: string | null
217
- name?: string | null
218
- owner_org?: string
219
- retention?: number
220
- updated_at?: string | null
221
- user_id?: string | null
222
- }
223
- Relationships: [
224
- {
225
- foreignKeyName: 'apps_user_id_fkey'
226
- columns: ['user_id']
227
- isOneToOne: false
228
- referencedRelation: 'users'
229
- referencedColumns: ['id']
230
- },
231
- {
232
- foreignKeyName: 'owner_org_id_fkey'
233
- columns: ['owner_org']
234
- isOneToOne: false
235
- referencedRelation: 'orgs'
236
- referencedColumns: ['id']
237
- },
238
- ]
239
- }
240
- bandwidth_usage: {
241
- Row: {
242
- app_id: string
243
- device_id: string
244
- file_size: number
245
- id: number
246
- timestamp: string
247
- }
248
- Insert: {
249
- app_id: string
250
- device_id: string
251
- file_size: number
252
- id?: number
253
- timestamp?: string
254
- }
255
- Update: {
256
- app_id?: string
257
- device_id?: string
258
- file_size?: number
259
- id?: number
260
- timestamp?: string
261
- }
262
- Relationships: []
263
- }
264
- channel_devices: {
265
- Row: {
266
- app_id: string
267
- channel_id: number
268
- created_at: string | null
269
- device_id: string
270
- id: number
271
- owner_org: string
272
- updated_at: string
273
- }
274
- Insert: {
275
- app_id: string
276
- channel_id: number
277
- created_at?: string | null
278
- device_id: string
279
- id?: number
280
- owner_org: string
281
- updated_at?: string
282
- }
283
- Update: {
284
- app_id?: string
285
- channel_id?: number
286
- created_at?: string | null
287
- device_id?: string
288
- id?: number
289
- owner_org?: string
290
- updated_at?: string
291
- }
292
- Relationships: [
293
- {
294
- foreignKeyName: 'channel_devices_app_id_fkey'
295
- columns: ['app_id']
296
- isOneToOne: false
297
- referencedRelation: 'apps'
298
- referencedColumns: ['app_id']
299
- },
300
- {
301
- foreignKeyName: 'channel_devices_channel_id_fkey'
302
- columns: ['channel_id']
303
- isOneToOne: false
304
- referencedRelation: 'channels'
305
- referencedColumns: ['id']
306
- },
307
- {
308
- foreignKeyName: 'owner_org_id_fkey'
309
- columns: ['owner_org']
310
- isOneToOne: false
311
- referencedRelation: 'orgs'
312
- referencedColumns: ['id']
313
- },
314
- ]
315
- }
316
- channels: {
317
- Row: {
318
- allow_dev: boolean
319
- allow_device_self_set: boolean
320
- allow_emulator: boolean
321
- android: boolean
322
- app_id: string
323
- beta: boolean
324
- created_at: string
325
- created_by: string | null
326
- disableAutoUpdate: Database['public']['Enums']['disable_update']
327
- disableAutoUpdateUnderNative: boolean
328
- enable_progressive_deploy: boolean
329
- enableAbTesting: boolean
330
- id: number
331
- ios: boolean
332
- name: string
333
- owner_org: string
334
- public: boolean
335
- secondaryVersionPercentage: number
336
- secondVersion: number | null
337
- updated_at: string
338
- version: number
339
- }
340
- Insert: {
341
- allow_dev?: boolean
342
- allow_device_self_set?: boolean
343
- allow_emulator?: boolean
344
- android?: boolean
345
- app_id: string
346
- beta?: boolean
347
- created_at?: string
348
- created_by?: string | null
349
- disableAutoUpdate?: Database['public']['Enums']['disable_update']
350
- disableAutoUpdateUnderNative?: boolean
351
- enable_progressive_deploy?: boolean
352
- enableAbTesting?: boolean
353
- id?: number
354
- ios?: boolean
355
- name: string
356
- owner_org: string
357
- public?: boolean
358
- secondaryVersionPercentage?: number
359
- secondVersion?: number | null
360
- updated_at?: string
361
- version: number
362
- }
363
- Update: {
364
- allow_dev?: boolean
365
- allow_device_self_set?: boolean
366
- allow_emulator?: boolean
367
- android?: boolean
368
- app_id?: string
369
- beta?: boolean
370
- created_at?: string
371
- created_by?: string | null
372
- disableAutoUpdate?: Database['public']['Enums']['disable_update']
373
- disableAutoUpdateUnderNative?: boolean
374
- enable_progressive_deploy?: boolean
375
- enableAbTesting?: boolean
376
- id?: number
377
- ios?: boolean
378
- name?: string
379
- owner_org?: string
380
- public?: boolean
381
- secondaryVersionPercentage?: number
382
- secondVersion?: number | null
383
- updated_at?: string
384
- version?: number
385
- }
386
- Relationships: [
387
- {
388
- foreignKeyName: 'channels_app_id_fkey'
389
- columns: ['app_id']
390
- isOneToOne: false
391
- referencedRelation: 'apps'
392
- referencedColumns: ['app_id']
393
- },
394
- {
395
- foreignKeyName: 'channels_secondVersion_fkey'
396
- columns: ['secondVersion']
397
- isOneToOne: false
398
- referencedRelation: 'app_versions'
399
- referencedColumns: ['id']
400
- },
401
- {
402
- foreignKeyName: 'channels_version_fkey'
403
- columns: ['version']
404
- isOneToOne: false
405
- referencedRelation: 'app_versions'
406
- referencedColumns: ['id']
407
- },
408
- {
409
- foreignKeyName: 'owner_org_id_fkey'
410
- columns: ['owner_org']
411
- isOneToOne: false
412
- referencedRelation: 'orgs'
413
- referencedColumns: ['id']
414
- },
415
- ]
416
- }
417
- daily_bandwidth: {
418
- Row: {
419
- app_id: string
420
- bandwidth: number
421
- date: string
422
- id: number
423
- }
424
- Insert: {
425
- app_id: string
426
- bandwidth: number
427
- date: string
428
- id?: number
429
- }
430
- Update: {
431
- app_id?: string
432
- bandwidth?: number
433
- date?: string
434
- id?: number
435
- }
436
- Relationships: []
437
- }
438
- daily_mau: {
439
- Row: {
440
- app_id: string
441
- date: string
442
- id: number
443
- mau: number
444
- }
445
- Insert: {
446
- app_id: string
447
- date: string
448
- id?: number
449
- mau: number
450
- }
451
- Update: {
452
- app_id?: string
453
- date?: string
454
- id?: number
455
- mau?: number
456
- }
457
- Relationships: []
458
- }
459
- daily_storage: {
460
- Row: {
461
- app_id: string
462
- date: string
463
- id: number
464
- storage: number
465
- }
466
- Insert: {
467
- app_id: string
468
- date: string
469
- id?: number
470
- storage: number
471
- }
472
- Update: {
473
- app_id?: string
474
- date?: string
475
- id?: number
476
- storage?: number
477
- }
478
- Relationships: []
479
- }
480
- daily_version: {
481
- Row: {
482
- app_id: string
483
- date: string
484
- fail: number | null
485
- get: number | null
486
- install: number | null
487
- uninstall: number | null
488
- version_id: number
489
- }
490
- Insert: {
491
- app_id: string
492
- date: string
493
- fail?: number | null
494
- get?: number | null
495
- install?: number | null
496
- uninstall?: number | null
497
- version_id: number
498
- }
499
- Update: {
500
- app_id?: string
501
- date?: string
502
- fail?: number | null
503
- get?: number | null
504
- install?: number | null
505
- uninstall?: number | null
506
- version_id?: number
507
- }
508
- Relationships: []
509
- }
510
- deleted_account: {
511
- Row: {
512
- created_at: string | null
513
- email: string
514
- id: string
515
- }
516
- Insert: {
517
- created_at?: string | null
518
- email?: string
519
- id?: string
520
- }
521
- Update: {
522
- created_at?: string | null
523
- email?: string
524
- id?: string
525
- }
526
- Relationships: []
527
- }
528
- device_usage: {
529
- Row: {
530
- app_id: string
531
- device_id: string
532
- id: number
533
- timestamp: string
534
- }
535
- Insert: {
536
- app_id: string
537
- device_id: string
538
- id?: number
539
- timestamp?: string
540
- }
541
- Update: {
542
- app_id?: string
543
- device_id?: string
544
- id?: number
545
- timestamp?: string
546
- }
547
- Relationships: []
548
- }
549
- devices: {
550
- Row: {
551
- app_id: string
552
- custom_id: string
553
- device_id: string
554
- is_emulator: boolean | null
555
- is_prod: boolean | null
556
- os_version: string | null
557
- platform: Database['public']['Enums']['platform_os']
558
- plugin_version: string
559
- updated_at: string
560
- version: number
561
- version_build: string | null
562
- }
563
- Insert: {
564
- app_id: string
565
- custom_id?: string
566
- device_id: string
567
- is_emulator?: boolean | null
568
- is_prod?: boolean | null
569
- os_version?: string | null
570
- platform: Database['public']['Enums']['platform_os']
571
- plugin_version?: string
572
- updated_at: string
573
- version: number
574
- version_build?: string | null
575
- }
576
- Update: {
577
- app_id?: string
578
- custom_id?: string
579
- device_id?: string
580
- is_emulator?: boolean | null
581
- is_prod?: boolean | null
582
- os_version?: string | null
583
- platform?: Database['public']['Enums']['platform_os']
584
- plugin_version?: string
585
- updated_at?: string
586
- version?: number
587
- version_build?: string | null
588
- }
589
- Relationships: []
590
- }
591
- devices_override: {
592
- Row: {
593
- app_id: string
594
- created_at: string | null
595
- device_id: string
596
- id: number
597
- owner_org: string
598
- updated_at: string | null
599
- version: number
600
- }
601
- Insert: {
602
- app_id: string
603
- created_at?: string | null
604
- device_id: string
605
- id?: number
606
- owner_org: string
607
- updated_at?: string | null
608
- version: number
609
- }
610
- Update: {
611
- app_id?: string
612
- created_at?: string | null
613
- device_id?: string
614
- id?: number
615
- owner_org?: string
616
- updated_at?: string | null
617
- version?: number
618
- }
619
- Relationships: [
620
- {
621
- foreignKeyName: 'devices_override_app_id_fkey'
622
- columns: ['app_id']
623
- isOneToOne: false
624
- referencedRelation: 'apps'
625
- referencedColumns: ['app_id']
626
- },
627
- {
628
- foreignKeyName: 'devices_override_version_fkey'
629
- columns: ['version']
630
- isOneToOne: false
631
- referencedRelation: 'app_versions'
632
- referencedColumns: ['id']
633
- },
634
- {
635
- foreignKeyName: 'owner_org_id_fkey'
636
- columns: ['owner_org']
637
- isOneToOne: false
638
- referencedRelation: 'orgs'
639
- referencedColumns: ['id']
640
- },
641
- ]
642
- }
643
- global_stats: {
644
- Row: {
645
- apps: number
646
- apps_active: number | null
647
- created_at: string | null
648
- date_id: string
649
- need_upgrade: number | null
650
- not_paying: number | null
651
- onboarded: number | null
652
- paying: number | null
653
- paying_monthly: number | null
654
- paying_yearly: number | null
655
- stars: number
656
- trial: number | null
657
- updates: number
658
- users: number | null
659
- users_active: number | null
660
- }
661
- Insert: {
662
- apps: number
663
- apps_active?: number | null
664
- created_at?: string | null
665
- date_id: string
666
- need_upgrade?: number | null
667
- not_paying?: number | null
668
- onboarded?: number | null
669
- paying?: number | null
670
- paying_monthly?: number | null
671
- paying_yearly?: number | null
672
- stars: number
673
- trial?: number | null
674
- updates: number
675
- users?: number | null
676
- users_active?: number | null
677
- }
678
- Update: {
679
- apps?: number
680
- apps_active?: number | null
681
- created_at?: string | null
682
- date_id?: string
683
- need_upgrade?: number | null
684
- not_paying?: number | null
685
- onboarded?: number | null
686
- paying?: number | null
687
- paying_monthly?: number | null
688
- paying_yearly?: number | null
689
- stars?: number
690
- trial?: number | null
691
- updates?: number
692
- users?: number | null
693
- users_active?: number | null
694
- }
695
- Relationships: []
696
- }
697
- job_queue: {
698
- Row: {
699
- created_at: string | null
700
- extra_info: Json
701
- function_name: string | null
702
- function_type: string | null
703
- job_id: number
704
- job_type: string
705
- payload: string
706
- request_id: number | null
707
- status: Database['public']['Enums']['queue_job_status']
708
- }
709
- Insert: {
710
- created_at?: string | null
711
- extra_info?: Json
712
- function_name?: string | null
713
- function_type?: string | null
714
- job_id?: number
715
- job_type: string
716
- payload: string
717
- request_id?: number | null
718
- status?: Database['public']['Enums']['queue_job_status']
719
- }
720
- Update: {
721
- created_at?: string | null
722
- extra_info?: Json
723
- function_name?: string | null
724
- function_type?: string | null
725
- job_id?: number
726
- job_type?: string
727
- payload?: string
728
- request_id?: number | null
729
- status?: Database['public']['Enums']['queue_job_status']
730
- }
731
- Relationships: []
732
- }
733
- notifications: {
734
- Row: {
735
- created_at: string | null
736
- event: string
737
- last_send_at: string
738
- owner_org: string
739
- total_send: number
740
- uniq_id: string
741
- updated_at: string | null
742
- }
743
- Insert: {
744
- created_at?: string | null
745
- event: string
746
- last_send_at?: string
747
- owner_org: string
748
- total_send?: number
749
- uniq_id: string
750
- updated_at?: string | null
751
- }
752
- Update: {
753
- created_at?: string | null
754
- event?: string
755
- last_send_at?: string
756
- owner_org?: string
757
- total_send?: number
758
- uniq_id?: string
759
- updated_at?: string | null
760
- }
761
- Relationships: [
762
- {
763
- foreignKeyName: 'owner_org_id_fkey'
764
- columns: ['owner_org']
765
- isOneToOne: false
766
- referencedRelation: 'orgs'
767
- referencedColumns: ['id']
768
- },
769
- ]
770
- }
771
- org_users: {
772
- Row: {
773
- app_id: string | null
774
- channel_id: number | null
775
- created_at: string | null
776
- id: number
777
- org_id: string
778
- updated_at: string | null
779
- user_id: string
780
- user_right: Database['public']['Enums']['user_min_right'] | null
781
- }
782
- Insert: {
783
- app_id?: string | null
784
- channel_id?: number | null
785
- created_at?: string | null
786
- id?: number
787
- org_id: string
788
- updated_at?: string | null
789
- user_id: string
790
- user_right?: Database['public']['Enums']['user_min_right'] | null
791
- }
792
- Update: {
793
- app_id?: string | null
794
- channel_id?: number | null
795
- created_at?: string | null
796
- id?: number
797
- org_id?: string
798
- updated_at?: string | null
799
- user_id?: string
800
- user_right?: Database['public']['Enums']['user_min_right'] | null
801
- }
802
- Relationships: [
803
- {
804
- foreignKeyName: 'org_users_app_id_fkey'
805
- columns: ['app_id']
806
- isOneToOne: false
807
- referencedRelation: 'apps'
808
- referencedColumns: ['app_id']
809
- },
810
- {
811
- foreignKeyName: 'org_users_channel_id_fkey'
812
- columns: ['channel_id']
813
- isOneToOne: false
814
- referencedRelation: 'channels'
815
- referencedColumns: ['id']
816
- },
817
- {
818
- foreignKeyName: 'org_users_org_id_fkey'
819
- columns: ['org_id']
820
- isOneToOne: false
821
- referencedRelation: 'orgs'
822
- referencedColumns: ['id']
823
- },
824
- {
825
- foreignKeyName: 'org_users_user_id_fkey'
826
- columns: ['user_id']
827
- isOneToOne: false
828
- referencedRelation: 'users'
829
- referencedColumns: ['id']
830
- },
831
- ]
832
- }
833
- orgs: {
834
- Row: {
835
- created_at: string | null
836
- created_by: string
837
- customer_id: string | null
838
- id: string
839
- logo: string | null
840
- management_email: string
841
- name: string
842
- updated_at: string | null
843
- }
844
- Insert: {
845
- created_at?: string | null
846
- created_by: string
847
- customer_id?: string | null
848
- id?: string
849
- logo?: string | null
850
- management_email: string
851
- name: string
852
- updated_at?: string | null
853
- }
854
- Update: {
855
- created_at?: string | null
856
- created_by?: string
857
- customer_id?: string | null
858
- id?: string
859
- logo?: string | null
860
- management_email?: string
861
- name?: string
862
- updated_at?: string | null
863
- }
864
- Relationships: [
865
- {
866
- foreignKeyName: 'orgs_created_by_fkey'
867
- columns: ['created_by']
868
- isOneToOne: false
869
- referencedRelation: 'users'
870
- referencedColumns: ['id']
871
- },
872
- {
873
- foreignKeyName: 'orgs_customer_id_fkey'
874
- columns: ['customer_id']
875
- isOneToOne: true
876
- referencedRelation: 'stripe_info'
877
- referencedColumns: ['customer_id']
878
- },
879
- ]
880
- }
881
- plans: {
882
- Row: {
883
- bandwidth: number
884
- bandwidth_unit: number | null
885
- created_at: string
886
- description: string
887
- id: string
888
- market_desc: string | null
889
- mau: number
890
- mau_unit: number | null
891
- name: string
892
- price_m: number
893
- price_m_bandwidth_id: string | null
894
- price_m_id: string
895
- price_m_mau_id: string | null
896
- price_m_storage_id: string | null
897
- price_y: number
898
- price_y_id: string
899
- storage: number
900
- storage_unit: number | null
901
- stripe_id: string
902
- updated_at: string
903
- }
904
- Insert: {
905
- bandwidth: number
906
- bandwidth_unit?: number | null
907
- created_at?: string
908
- description?: string
909
- id?: string
910
- market_desc?: string | null
911
- mau?: number
912
- mau_unit?: number | null
913
- name?: string
914
- price_m?: number
915
- price_m_bandwidth_id?: string | null
916
- price_m_id: string
917
- price_m_mau_id?: string | null
918
- price_m_storage_id?: string | null
919
- price_y?: number
920
- price_y_id: string
921
- storage: number
922
- storage_unit?: number | null
923
- stripe_id?: string
924
- updated_at?: string
925
- }
926
- Update: {
927
- bandwidth?: number
928
- bandwidth_unit?: number | null
929
- created_at?: string
930
- description?: string
931
- id?: string
932
- market_desc?: string | null
933
- mau?: number
934
- mau_unit?: number | null
935
- name?: string
936
- price_m?: number
937
- price_m_bandwidth_id?: string | null
938
- price_m_id?: string
939
- price_m_mau_id?: string | null
940
- price_m_storage_id?: string | null
941
- price_y?: number
942
- price_y_id?: string
943
- storage?: number
944
- storage_unit?: number | null
945
- stripe_id?: string
946
- updated_at?: string
947
- }
948
- Relationships: []
949
- }
950
- stats: {
951
- Row: {
952
- action: Database['public']['Enums']['stats_action']
953
- app_id: string
954
- created_at: string
955
- device_id: string
956
- version: number
957
- }
958
- Insert: {
959
- action: Database['public']['Enums']['stats_action']
960
- app_id: string
961
- created_at: string
962
- device_id: string
963
- version: number
964
- }
965
- Update: {
966
- action?: Database['public']['Enums']['stats_action']
967
- app_id?: string
968
- created_at?: string
969
- device_id?: string
970
- version?: number
971
- }
972
- Relationships: []
973
- }
974
- storage_usage: {
975
- Row: {
976
- app_id: string
977
- device_id: string
978
- file_size: number
979
- id: number
980
- timestamp: string
981
- }
982
- Insert: {
983
- app_id: string
984
- device_id: string
985
- file_size: number
986
- id?: number
987
- timestamp?: string
988
- }
989
- Update: {
990
- app_id?: string
991
- device_id?: string
992
- file_size?: number
993
- id?: number
994
- timestamp?: string
995
- }
996
- Relationships: []
997
- }
998
- stripe_info: {
999
- Row: {
1000
- created_at: string
1001
- customer_id: string
1002
- is_good_plan: boolean | null
1003
- plan_usage: number | null
1004
- price_id: string | null
1005
- product_id: string
1006
- status: Database['public']['Enums']['stripe_status'] | null
1007
- subscription_anchor_end: string
1008
- subscription_anchor_start: string
1009
- subscription_id: string | null
1010
- subscription_metered: Json
1011
- trial_at: string
1012
- updated_at: string
1013
- }
1014
- Insert: {
1015
- created_at?: string
1016
- customer_id: string
1017
- is_good_plan?: boolean | null
1018
- plan_usage?: number | null
1019
- price_id?: string | null
1020
- product_id: string
1021
- status?: Database['public']['Enums']['stripe_status'] | null
1022
- subscription_anchor_end?: string
1023
- subscription_anchor_start?: string
1024
- subscription_id?: string | null
1025
- subscription_metered?: Json
1026
- trial_at?: string
1027
- updated_at?: string
1028
- }
1029
- Update: {
1030
- created_at?: string
1031
- customer_id?: string
1032
- is_good_plan?: boolean | null
1033
- plan_usage?: number | null
1034
- price_id?: string | null
1035
- product_id?: string
1036
- status?: Database['public']['Enums']['stripe_status'] | null
1037
- subscription_anchor_end?: string
1038
- subscription_anchor_start?: string
1039
- subscription_id?: string | null
1040
- subscription_metered?: Json
1041
- trial_at?: string
1042
- updated_at?: string
1043
- }
1044
- Relationships: [
1045
- {
1046
- foreignKeyName: 'stripe_info_product_id_fkey'
1047
- columns: ['product_id']
1048
- isOneToOne: false
1049
- referencedRelation: 'plans'
1050
- referencedColumns: ['stripe_id']
1051
- },
1052
- ]
1053
- }
1054
- users: {
1055
- Row: {
1056
- ban_time: string | null
1057
- billing_email: string | null
1058
- country: string | null
1059
- created_at: string | null
1060
- customer_id: string | null
1061
- email: string
1062
- enableNotifications: boolean
1063
- first_name: string | null
1064
- id: string
1065
- image_url: string | null
1066
- last_name: string | null
1067
- legalAccepted: boolean
1068
- optForNewsletters: boolean
1069
- updated_at: string | null
1070
- }
1071
- Insert: {
1072
- ban_time?: string | null
1073
- billing_email?: string | null
1074
- country?: string | null
1075
- created_at?: string | null
1076
- customer_id?: string | null
1077
- email: string
1078
- enableNotifications?: boolean
1079
- first_name?: string | null
1080
- id: string
1081
- image_url?: string | null
1082
- last_name?: string | null
1083
- legalAccepted?: boolean
1084
- optForNewsletters?: boolean
1085
- updated_at?: string | null
1086
- }
1087
- Update: {
1088
- ban_time?: string | null
1089
- billing_email?: string | null
1090
- country?: string | null
1091
- created_at?: string | null
1092
- customer_id?: string | null
1093
- email?: string
1094
- enableNotifications?: boolean
1095
- first_name?: string | null
1096
- id?: string
1097
- image_url?: string | null
1098
- last_name?: string | null
1099
- legalAccepted?: boolean
1100
- optForNewsletters?: boolean
1101
- updated_at?: string | null
1102
- }
1103
- Relationships: [
1104
- {
1105
- foreignKeyName: 'users_customer_id_fkey'
1106
- columns: ['customer_id']
1107
- isOneToOne: true
1108
- referencedRelation: 'stripe_info'
1109
- referencedColumns: ['customer_id']
1110
- },
1111
- {
1112
- foreignKeyName: 'users_id_fkey'
1113
- columns: ['id']
1114
- isOneToOne: true
1115
- referencedRelation: 'users'
1116
- referencedColumns: ['id']
1117
- },
1118
- ]
1119
- }
1120
- version_meta: {
1121
- Row: {
1122
- app_id: string
1123
- size: number
1124
- timestamp: string
1125
- version_id: number
1126
- }
1127
- Insert: {
1128
- app_id: string
1129
- size: number
1130
- timestamp?: string
1131
- version_id: number
1132
- }
1133
- Update: {
1134
- app_id?: string
1135
- size?: number
1136
- timestamp?: string
1137
- version_id?: number
1138
- }
1139
- Relationships: []
1140
- }
1141
- version_usage: {
1142
- Row: {
1143
- action: Database['public']['Enums']['version_action']
1144
- app_id: string
1145
- timestamp: string
1146
- version_id: number
1147
- }
1148
- Insert: {
1149
- action: Database['public']['Enums']['version_action']
1150
- app_id: string
1151
- timestamp?: string
1152
- version_id: number
1153
- }
1154
- Update: {
1155
- action?: Database['public']['Enums']['version_action']
1156
- app_id?: string
1157
- timestamp?: string
1158
- version_id?: number
1159
- }
1160
- Relationships: []
1161
- }
1162
- workers: {
1163
- Row: {
1164
- id: number
1165
- locked: boolean
1166
- }
1167
- Insert: {
1168
- id?: number
1169
- locked?: boolean
1170
- }
1171
- Update: {
1172
- id?: number
1173
- locked?: boolean
1174
- }
1175
- Relationships: []
1176
- }
1177
- }
1178
- Views: {
1179
- [_ in never]: never
1180
- }
1181
- Functions: {
1182
- accept_invitation_to_org: {
1183
- Args: {
1184
- org_id: string
1185
- }
1186
- Returns: string
1187
- }
1188
- calculate_daily_app_usage: {
1189
- Args: Record<PropertyKey, never>
1190
- Returns: undefined
1191
- }
1192
- check_min_rights:
1193
- | {
1194
- Args: {
1195
- min_right: Database['public']['Enums']['user_min_right']
1196
- org_id: string
1197
- app_id: string
1198
- channel_id: number
1199
- }
1200
- Returns: boolean
1201
- }
1202
- | {
1203
- Args: {
1204
- min_right: Database['public']['Enums']['user_min_right']
1205
- user_id: string
1206
- org_id: string
1207
- app_id: string
1208
- channel_id: number
1209
- }
1210
- Returns: boolean
1211
- }
1212
- convert_bytes_to_gb: {
1213
- Args: {
1214
- byt: number
1215
- }
1216
- Returns: number
1217
- }
1218
- convert_bytes_to_mb: {
1219
- Args: {
1220
- byt: number
1221
- }
1222
- Returns: number
1223
- }
1224
- convert_gb_to_bytes: {
1225
- Args: {
1226
- gb: number
1227
- }
1228
- Returns: number
1229
- }
1230
- convert_mb_to_bytes: {
1231
- Args: {
1232
- gb: number
1233
- }
1234
- Returns: number
1235
- }
1236
- convert_number_to_percent: {
1237
- Args: {
1238
- val: number
1239
- max_val: number
1240
- }
1241
- Returns: number
1242
- }
1243
- count_active_users: {
1244
- Args: {
1245
- app_ids: string[]
1246
- }
1247
- Returns: number
1248
- }
1249
- count_all_need_upgrade: {
1250
- Args: Record<PropertyKey, never>
1251
- Returns: number
1252
- }
1253
- count_all_onboarded: {
1254
- Args: Record<PropertyKey, never>
1255
- Returns: number
1256
- }
1257
- count_all_paying: {
1258
- Args: Record<PropertyKey, never>
1259
- Returns: number
1260
- }
1261
- count_all_plans_v2: {
1262
- Args: Record<PropertyKey, never>
1263
- Returns: {
1264
- plan_name: string
1265
- count: number
1266
- }[]
1267
- }
1268
- delete_failed_jobs: {
1269
- Args: Record<PropertyKey, never>
1270
- Returns: undefined
1271
- }
1272
- delete_user: {
1273
- Args: Record<PropertyKey, never>
1274
- Returns: undefined
1275
- }
1276
- exist_app_v2: {
1277
- Args: {
1278
- appid: string
1279
- }
1280
- Returns: boolean
1281
- }
1282
- exist_app_versions: {
1283
- Args: {
1284
- appid: string
1285
- name_version: string
1286
- apikey: string
1287
- }
1288
- Returns: boolean
1289
- }
1290
- find_best_plan_v3: {
1291
- Args: {
1292
- mau: number
1293
- bandwidth: number
1294
- storage: number
1295
- }
1296
- Returns: string
1297
- }
1298
- find_fit_plan_v3: {
1299
- Args: {
1300
- mau: number
1301
- bandwidth: number
1302
- storage: number
1303
- }
1304
- Returns: {
1305
- name: string
1306
- }[]
1307
- }
1308
- get_apikey: {
1309
- Args: Record<PropertyKey, never>
1310
- Returns: string
1311
- }
1312
- get_app_metrics:
1313
- | {
1314
- Args: {
1315
- org_id: string
1316
- }
1317
- Returns: {
1318
- app_id: string
1319
- date: string
1320
- mau: number
1321
- storage: number
1322
- bandwidth: number
1323
- get: number
1324
- fail: number
1325
- install: number
1326
- uninstall: number
1327
- }[]
1328
- }
1329
- | {
1330
- Args: {
1331
- org_id: string
1332
- start_date: string
1333
- end_date: string
1334
- }
1335
- Returns: {
1336
- app_id: string
1337
- date: string
1338
- mau: number
1339
- storage: number
1340
- bandwidth: number
1341
- get: number
1342
- fail: number
1343
- install: number
1344
- uninstall: number
1345
- }[]
1346
- }
1347
- get_app_versions: {
1348
- Args: {
1349
- appid: string
1350
- name_version: string
1351
- apikey: string
1352
- }
1353
- Returns: number
1354
- }
1355
- get_cloudflare_function_url: {
1356
- Args: Record<PropertyKey, never>
1357
- Returns: string
1358
- }
1359
- get_current_plan_max_org: {
1360
- Args: {
1361
- orgid: string
1362
- }
1363
- Returns: {
1364
- mau: number
1365
- bandwidth: number
1366
- storage: number
1367
- }[]
1368
- }
1369
- get_current_plan_name_org: {
1370
- Args: {
1371
- orgid: string
1372
- }
1373
- Returns: string
1374
- }
1375
- get_customer_counts: {
1376
- Args: Record<PropertyKey, never>
1377
- Returns: {
1378
- yearly: number
1379
- monthly: number
1380
- total: number
1381
- }[]
1382
- }
1383
- get_cycle_info_org: {
1384
- Args: {
1385
- orgid: string
1386
- }
1387
- Returns: {
1388
- subscription_anchor_start: string
1389
- subscription_anchor_end: string
1390
- }[]
1391
- }
1392
- get_db_url: {
1393
- Args: Record<PropertyKey, never>
1394
- Returns: string
1395
- }
1396
- get_global_metrics:
1397
- | {
1398
- Args: {
1399
- org_id: string
1400
- }
1401
- Returns: {
1402
- date: string
1403
- mau: number
1404
- storage: number
1405
- bandwidth: number
1406
- get: number
1407
- fail: number
1408
- install: number
1409
- uninstall: number
1410
- }[]
1411
- }
1412
- | {
1413
- Args: {
1414
- org_id: string
1415
- start_date: string
1416
- end_date: string
1417
- }
1418
- Returns: {
1419
- date: string
1420
- mau: number
1421
- storage: number
1422
- bandwidth: number
1423
- get: number
1424
- fail: number
1425
- install: number
1426
- uninstall: number
1427
- }[]
1428
- }
1429
- get_identity:
1430
- | {
1431
- Args: Record<PropertyKey, never>
1432
- Returns: string
1433
- }
1434
- | {
1435
- Args: {
1436
- keymode: Database['public']['Enums']['key_mode'][]
1437
- }
1438
- Returns: string
1439
- }
1440
- get_identity_apikey_only: {
1441
- Args: {
1442
- keymode: Database['public']['Enums']['key_mode'][]
1443
- }
1444
- Returns: string
1445
- }
1446
- get_infos: {
1447
- Args: {
1448
- appid: string
1449
- deviceid: string
1450
- versionname: string
1451
- }
1452
- Returns: {
1453
- current_version_id: number
1454
- versiondata: Json
1455
- channel: Json
1456
- }[]
1457
- }
1458
- get_metered_usage:
1459
- | {
1460
- Args: Record<PropertyKey, never>
1461
- Returns: number
1462
- }
1463
- | {
1464
- Args: {
1465
- orgid: string
1466
- }
1467
- Returns: Database['public']['CompositeTypes']['stats_table']
1468
- }
1469
- get_netlify_function_url: {
1470
- Args: Record<PropertyKey, never>
1471
- Returns: string
1472
- }
1473
- get_org_members: {
1474
- Args: {
1475
- guild_id: string
1476
- }
1477
- Returns: {
1478
- aid: number
1479
- uid: string
1480
- email: string
1481
- image_url: string
1482
- role: Database['public']['Enums']['user_min_right']
1483
- }[]
1484
- }
1485
- get_org_owner_id: {
1486
- Args: {
1487
- apikey: string
1488
- app_id: string
1489
- }
1490
- Returns: string
1491
- }
1492
- get_org_perm_for_apikey: {
1493
- Args: {
1494
- apikey: string
1495
- app_id: string
1496
- }
1497
- Returns: string
1498
- }
1499
- get_orgs_v5:
1500
- | {
1501
- Args: Record<PropertyKey, never>
1502
- Returns: {
1503
- gid: string
1504
- created_by: string
1505
- logo: string
1506
- name: string
1507
- role: string
1508
- paying: boolean
1509
- trial_left: number
1510
- can_use_more: boolean
1511
- is_canceled: boolean
1512
- app_count: number
1513
- subscription_start: string
1514
- subscription_end: string
1515
- management_email: string
1516
- }[]
1517
- }
1518
- | {
1519
- Args: {
1520
- userid: string
1521
- }
1522
- Returns: {
1523
- gid: string
1524
- created_by: string
1525
- logo: string
1526
- name: string
1527
- role: string
1528
- paying: boolean
1529
- trial_left: number
1530
- can_use_more: boolean
1531
- is_canceled: boolean
1532
- app_count: number
1533
- subscription_start: string
1534
- subscription_end: string
1535
- management_email: string
1536
- }[]
1537
- }
1538
- get_plan_usage_percent_detailed:
1539
- | {
1540
- Args: {
1541
- orgid: string
1542
- }
1543
- Returns: {
1544
- total_percent: number
1545
- mau_percent: number
1546
- bandwidth_percent: number
1547
- storage_percent: number
1548
- }[]
1549
- }
1550
- | {
1551
- Args: {
1552
- orgid: string
1553
- cycle_start: string
1554
- cycle_end: string
1555
- }
1556
- Returns: {
1557
- total_percent: number
1558
- mau_percent: number
1559
- bandwidth_percent: number
1560
- storage_percent: number
1561
- }[]
1562
- }
1563
- get_total_app_storage_size_orgs: {
1564
- Args: {
1565
- org_id: string
1566
- app_id: string
1567
- }
1568
- Returns: number
1569
- }
1570
- get_total_metrics:
1571
- | {
1572
- Args: {
1573
- org_id: string
1574
- }
1575
- Returns: {
1576
- mau: number
1577
- storage: number
1578
- bandwidth: number
1579
- get: number
1580
- fail: number
1581
- install: number
1582
- uninstall: number
1583
- }[]
1584
- }
1585
- | {
1586
- Args: {
1587
- org_id: string
1588
- start_date: string
1589
- end_date: string
1590
- }
1591
- Returns: {
1592
- mau: number
1593
- storage: number
1594
- bandwidth: number
1595
- get: number
1596
- fail: number
1597
- install: number
1598
- uninstall: number
1599
- }[]
1600
- }
1601
- get_total_storage_size:
1602
- | {
1603
- Args: {
1604
- appid: string
1605
- }
1606
- Returns: number
1607
- }
1608
- | {
1609
- Args: {
1610
- userid: string
1611
- appid: string
1612
- }
1613
- Returns: number
1614
- }
1615
- get_total_storage_size_org: {
1616
- Args: {
1617
- org_id: string
1618
- }
1619
- Returns: number
1620
- }
1621
- get_user_id:
1622
- | {
1623
- Args: {
1624
- apikey: string
1625
- }
1626
- Returns: string
1627
- }
1628
- | {
1629
- Args: {
1630
- apikey: string
1631
- app_id: string
1632
- }
1633
- Returns: string
1634
- }
1635
- get_user_main_org_id: {
1636
- Args: {
1637
- user_id: string
1638
- }
1639
- Returns: string
1640
- }
1641
- get_user_main_org_id_by_app_id: {
1642
- Args: {
1643
- app_id: string
1644
- }
1645
- Returns: string
1646
- }
1647
- get_versions_with_no_metadata: {
1648
- Args: Record<PropertyKey, never>
1649
- Returns: {
1650
- app_id: string
1651
- bucket_id: string | null
1652
- checksum: string | null
1653
- created_at: string | null
1654
- deleted: boolean
1655
- external_url: string | null
1656
- id: number
1657
- minUpdateVersion: string | null
1658
- name: string
1659
- native_packages: Json[] | null
1660
- owner_org: string
1661
- r2_path: string | null
1662
- session_key: string | null
1663
- storage_provider: string
1664
- updated_at: string | null
1665
- user_id: string | null
1666
- }[]
1667
- }
1668
- get_weekly_stats: {
1669
- Args: {
1670
- app_id: string
1671
- }
1672
- Returns: {
1673
- all_updates: number
1674
- failed_updates: number
1675
- open_app: number
1676
- }[]
1677
- }
1678
- has_app_right: {
1679
- Args: {
1680
- appid: string
1681
- right: Database['public']['Enums']['user_min_right']
1682
- }
1683
- Returns: boolean
1684
- }
1685
- has_app_right_userid: {
1686
- Args: {
1687
- appid: string
1688
- right: Database['public']['Enums']['user_min_right']
1689
- userid: string
1690
- }
1691
- Returns: boolean
1692
- }
1693
- http_post_helper: {
1694
- Args: {
1695
- function_name: string
1696
- function_type: string
1697
- body: Json
1698
- }
1699
- Returns: number
1700
- }
1701
- invite_user_to_org: {
1702
- Args: {
1703
- email: string
1704
- org_id: string
1705
- invite_type: Database['public']['Enums']['user_min_right']
1706
- }
1707
- Returns: string
1708
- }
1709
- is_admin:
1710
- | {
1711
- Args: Record<PropertyKey, never>
1712
- Returns: boolean
1713
- }
1714
- | {
1715
- Args: {
1716
- userid: string
1717
- }
1718
- Returns: boolean
1719
- }
1720
- is_allowed_action: {
1721
- Args: {
1722
- apikey: string
1723
- appid: string
1724
- }
1725
- Returns: boolean
1726
- }
1727
- is_allowed_action_org: {
1728
- Args: {
1729
- orgid: string
1730
- }
1731
- Returns: boolean
1732
- }
1733
- is_allowed_capgkey:
1734
- | {
1735
- Args: {
1736
- apikey: string
1737
- keymode: Database['public']['Enums']['key_mode'][]
1738
- }
1739
- Returns: boolean
1740
- }
1741
- | {
1742
- Args: {
1743
- apikey: string
1744
- keymode: Database['public']['Enums']['key_mode'][]
1745
- app_id: string
1746
- }
1747
- Returns: boolean
1748
- }
1749
- is_app_owner:
1750
- | {
1751
- Args: {
1752
- apikey: string
1753
- appid: string
1754
- }
1755
- Returns: boolean
1756
- }
1757
- | {
1758
- Args: {
1759
- appid: string
1760
- }
1761
- Returns: boolean
1762
- }
1763
- | {
1764
- Args: {
1765
- userid: string
1766
- appid: string
1767
- }
1768
- Returns: boolean
1769
- }
1770
- is_canceled_org: {
1771
- Args: {
1772
- orgid: string
1773
- }
1774
- Returns: boolean
1775
- }
1776
- is_good_plan_v5_org: {
1777
- Args: {
1778
- orgid: string
1779
- }
1780
- Returns: boolean
1781
- }
1782
- is_member_of_org: {
1783
- Args: {
1784
- user_id: string
1785
- org_id: string
1786
- }
1787
- Returns: boolean
1788
- }
1789
- is_not_deleted: {
1790
- Args: {
1791
- email_check: string
1792
- }
1793
- Returns: boolean
1794
- }
1795
- is_onboarded_org: {
1796
- Args: {
1797
- orgid: string
1798
- }
1799
- Returns: boolean
1800
- }
1801
- is_onboarding_needed_org: {
1802
- Args: {
1803
- orgid: string
1804
- }
1805
- Returns: boolean
1806
- }
1807
- is_owner_of_org: {
1808
- Args: {
1809
- user_id: string
1810
- org_id: string
1811
- }
1812
- Returns: boolean
1813
- }
1814
- is_paying_and_good_plan_org: {
1815
- Args: {
1816
- orgid: string
1817
- }
1818
- Returns: boolean
1819
- }
1820
- is_paying_org: {
1821
- Args: {
1822
- orgid: string
1823
- }
1824
- Returns: boolean
1825
- }
1826
- is_trial_org: {
1827
- Args: {
1828
- orgid: string
1829
- }
1830
- Returns: number
1831
- }
1832
- one_month_ahead: {
1833
- Args: Record<PropertyKey, never>
1834
- Returns: string
1835
- }
1836
- process_cron_stats_jobs: {
1837
- Args: Record<PropertyKey, never>
1838
- Returns: undefined
1839
- }
1840
- process_current_jobs_if_unlocked: {
1841
- Args: Record<PropertyKey, never>
1842
- Returns: number[]
1843
- }
1844
- process_failed_uploads: {
1845
- Args: Record<PropertyKey, never>
1846
- Returns: undefined
1847
- }
1848
- process_free_trial_expired: {
1849
- Args: Record<PropertyKey, never>
1850
- Returns: undefined
1851
- }
1852
- process_requested_jobs: {
1853
- Args: Record<PropertyKey, never>
1854
- Returns: undefined
1855
- }
1856
- process_subscribed_orgs: {
1857
- Args: Record<PropertyKey, never>
1858
- Returns: undefined
1859
- }
1860
- read_bandwidth_usage: {
1861
- Args: {
1862
- p_app_id: string
1863
- p_period_start: string
1864
- p_period_end: string
1865
- }
1866
- Returns: {
1867
- date: string
1868
- bandwidth: number
1869
- app_id: string
1870
- }[]
1871
- }
1872
- read_device_usage: {
1873
- Args: {
1874
- p_app_id: string
1875
- p_period_start: string
1876
- p_period_end: string
1877
- }
1878
- Returns: {
1879
- date: string
1880
- mau: number
1881
- app_id: string
1882
- }[]
1883
- }
1884
- read_storage_usage: {
1885
- Args: {
1886
- p_app_id: string
1887
- p_period_start: string
1888
- p_period_end: string
1889
- }
1890
- Returns: {
1891
- app_id: string
1892
- date: string
1893
- storage: number
1894
- }[]
1895
- }
1896
- read_version_usage: {
1897
- Args: {
1898
- p_app_id: string
1899
- p_period_start: string
1900
- p_period_end: string
1901
- }
1902
- Returns: {
1903
- app_id: string
1904
- version_id: number
1905
- date: string
1906
- get: number
1907
- fail: number
1908
- install: number
1909
- uninstall: number
1910
- }[]
1911
- }
1912
- reset_and_seed_data: {
1913
- Args: Record<PropertyKey, never>
1914
- Returns: undefined
1915
- }
1916
- reset_and_seed_stats_data: {
1917
- Args: Record<PropertyKey, never>
1918
- Returns: undefined
1919
- }
1920
- retry_failed_jobs: {
1921
- Args: Record<PropertyKey, never>
1922
- Returns: undefined
1923
- }
1924
- update_app_usage:
1925
- | {
1926
- Args: Record<PropertyKey, never>
1927
- Returns: undefined
1928
- }
1929
- | {
1930
- Args: {
1931
- minutes_interval: number
1932
- }
1933
- Returns: undefined
1934
- }
1935
- verify_mfa: {
1936
- Args: Record<PropertyKey, never>
1937
- Returns: boolean
1938
- }
1939
- }
1940
- Enums: {
1941
- app_mode: 'prod' | 'dev' | 'livereload'
1942
- disable_update: 'major' | 'minor' | 'patch' | 'version_number' | 'none'
1943
- key_mode: 'read' | 'write' | 'all' | 'upload'
1944
- pay_as_you_go_type: 'base' | 'units'
1945
- platform_os: 'ios' | 'android'
1946
- queue_job_status: 'inserted' | 'requested' | 'failed'
1947
- stats_action:
1948
- | 'delete'
1949
- | 'reset'
1950
- | 'set'
1951
- | 'get'
1952
- | 'set_fail'
1953
- | 'update_fail'
1954
- | 'download_fail'
1955
- | 'windows_path_fail'
1956
- | 'canonical_path_fail'
1957
- | 'directory_path_fail'
1958
- | 'unzip_fail'
1959
- | 'low_mem_fail'
1960
- | 'download_10'
1961
- | 'download_20'
1962
- | 'download_30'
1963
- | 'download_40'
1964
- | 'download_50'
1965
- | 'download_60'
1966
- | 'download_70'
1967
- | 'download_80'
1968
- | 'download_90'
1969
- | 'download_complete'
1970
- | 'decrypt_fail'
1971
- | 'app_moved_to_foreground'
1972
- | 'app_moved_to_background'
1973
- | 'uninstall'
1974
- | 'needPlanUpgrade'
1975
- | 'missingBundle'
1976
- | 'noNew'
1977
- | 'disablePlatformIos'
1978
- | 'disablePlatformAndroid'
1979
- | 'disableAutoUpdateToMajor'
1980
- | 'cannotUpdateViaPrivateChannel'
1981
- | 'disableAutoUpdateToMinor'
1982
- | 'disableAutoUpdateToPatch'
1983
- | 'channelMisconfigured'
1984
- | 'disableAutoUpdateMetadata'
1985
- | 'disableAutoUpdateUnderNative'
1986
- | 'disableDevBuild'
1987
- | 'disableEmulator'
1988
- | 'cannotGetBundle'
1989
- | 'checksum_fail'
1990
- | 'NoChannelOrOverride'
1991
- | 'setChannel'
1992
- | 'getChannel'
1993
- stripe_status:
1994
- | 'created'
1995
- | 'succeeded'
1996
- | 'updated'
1997
- | 'failed'
1998
- | 'deleted'
1999
- | 'canceled'
2000
- usage_mode: '5min' | 'day' | 'month' | 'cycle' | 'last_saved'
2001
- user_min_right:
2002
- | 'invite_read'
2003
- | 'invite_upload'
2004
- | 'invite_write'
2005
- | 'invite_admin'
2006
- | 'invite_super_admin'
2007
- | 'read'
2008
- | 'upload'
2009
- | 'write'
2010
- | 'admin'
2011
- | 'super_admin'
2012
- user_role: 'read' | 'upload' | 'write' | 'admin'
2013
- version_action: 'get' | 'fail' | 'install' | 'uninstall'
2014
- }
2015
- CompositeTypes: {
2016
- match_plan: {
2017
- name: string | null
2018
- }
2019
- orgs_table: {
2020
- id: string | null
2021
- created_by: string | null
2022
- created_at: string | null
2023
- updated_at: string | null
2024
- logo: string | null
2025
- name: string | null
2026
- }
2027
- owned_orgs: {
2028
- id: string | null
2029
- created_by: string | null
2030
- logo: string | null
2031
- name: string | null
2032
- role: string | null
2033
- }
2034
- stats_table: {
2035
- mau: number | null
2036
- bandwidth: number | null
2037
- storage: number | null
2038
- }
2039
- }
2040
- }
2041
- }
2042
-
2043
- type PublicSchema = Database[Extract<keyof Database, 'public'>]
2044
-
2045
- export type Tables<
2046
- PublicTableNameOrOptions extends
2047
- | keyof (PublicSchema['Tables'] & PublicSchema['Views'])
2048
- | { schema: keyof Database },
2049
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
2050
- ? keyof (Database[PublicTableNameOrOptions['schema']]['Tables'] &
2051
- Database[PublicTableNameOrOptions['schema']]['Views'])
2052
- : never = never,
2053
- > = PublicTableNameOrOptions extends { schema: keyof Database }
2054
- ? (Database[PublicTableNameOrOptions['schema']]['Tables'] &
2055
- Database[PublicTableNameOrOptions['schema']]['Views'])[TableName] extends {
2056
- Row: infer R
2057
- }
2058
- ? R
2059
- : never
2060
- : PublicTableNameOrOptions extends keyof (PublicSchema['Tables'] &
2061
- PublicSchema['Views'])
2062
- ? (PublicSchema['Tables'] &
2063
- PublicSchema['Views'])[PublicTableNameOrOptions] extends {
2064
- Row: infer R
2065
- }
2066
- ? R
2067
- : never
2068
- : never
2069
-
2070
- export type TablesInsert<
2071
- PublicTableNameOrOptions extends
2072
- | keyof PublicSchema['Tables']
2073
- | { schema: keyof Database },
2074
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
2075
- ? keyof Database[PublicTableNameOrOptions['schema']]['Tables']
2076
- : never = never,
2077
- > = PublicTableNameOrOptions extends { schema: keyof Database }
2078
- ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends {
2079
- Insert: infer I
2080
- }
2081
- ? I
2082
- : never
2083
- : PublicTableNameOrOptions extends keyof PublicSchema['Tables']
2084
- ? PublicSchema['Tables'][PublicTableNameOrOptions] extends {
2085
- Insert: infer I
2086
- }
2087
- ? I
2088
- : never
2089
- : never
2090
-
2091
- export type TablesUpdate<
2092
- PublicTableNameOrOptions extends
2093
- | keyof PublicSchema['Tables']
2094
- | { schema: keyof Database },
2095
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
2096
- ? keyof Database[PublicTableNameOrOptions['schema']]['Tables']
2097
- : never = never,
2098
- > = PublicTableNameOrOptions extends { schema: keyof Database }
2099
- ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends {
2100
- Update: infer U
2101
- }
2102
- ? U
2103
- : never
2104
- : PublicTableNameOrOptions extends keyof PublicSchema['Tables']
2105
- ? PublicSchema['Tables'][PublicTableNameOrOptions] extends {
2106
- Update: infer U
2107
- }
2108
- ? U
2109
- : never
2110
- : never
2111
-
2112
- export type Enums<
2113
- PublicEnumNameOrOptions extends
2114
- | keyof PublicSchema['Enums']
2115
- | { schema: keyof Database },
2116
- EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
2117
- ? keyof Database[PublicEnumNameOrOptions['schema']]['Enums']
2118
- : never = never,
2119
- > = PublicEnumNameOrOptions extends { schema: keyof Database }
2120
- ? Database[PublicEnumNameOrOptions['schema']]['Enums'][EnumName]
2121
- : PublicEnumNameOrOptions extends keyof PublicSchema['Enums']
2122
- ? PublicSchema['Enums'][PublicEnumNameOrOptions]
2123
- : never