@capgo/cli 7.62.2 → 7.64.0

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 (109) hide show
  1. package/README.md +33 -2
  2. package/dist/index.js +413 -392
  3. package/dist/package.json +2 -3
  4. package/dist/src/api/app.d.ts +2 -2
  5. package/dist/src/api/channels.d.ts +952 -63
  6. package/dist/src/api/cryptoV2.d.ts +0 -1
  7. package/dist/src/api/update.d.ts +0 -1
  8. package/dist/src/api/versions.d.ts +0 -1
  9. package/dist/src/app/add.d.ts +0 -1
  10. package/dist/src/app/debug.d.ts +0 -1
  11. package/dist/src/app/delete.d.ts +0 -1
  12. package/dist/src/app/info.d.ts +0 -1
  13. package/dist/src/app/list.d.ts +0 -1
  14. package/dist/src/app/set.d.ts +0 -1
  15. package/dist/src/app/setting.d.ts +0 -1
  16. package/dist/src/build/credentials-command.d.ts +0 -1
  17. package/dist/src/build/credentials.d.ts +0 -1
  18. package/dist/src/build/request.d.ts +0 -1
  19. package/dist/src/bundle/check.d.ts +0 -1
  20. package/dist/src/bundle/cleanup.d.ts +0 -1
  21. package/dist/src/bundle/compatibility.d.ts +0 -1
  22. package/dist/src/bundle/decryptV2.d.ts +0 -1
  23. package/dist/src/bundle/delete.d.ts +0 -1
  24. package/dist/src/bundle/encryptV2.d.ts +0 -1
  25. package/dist/src/bundle/list.d.ts +0 -1
  26. package/dist/src/bundle/partial.d.ts +0 -1
  27. package/dist/src/bundle/unlink.d.ts +0 -1
  28. package/dist/src/bundle/upload.d.ts +0 -1
  29. package/dist/src/bundle/upload_interface.d.ts +0 -1
  30. package/dist/src/bundle/zip.d.ts +0 -1
  31. package/dist/src/channel/add.d.ts +0 -1
  32. package/dist/src/channel/currentBundle.d.ts +0 -1
  33. package/dist/src/channel/delete.d.ts +0 -1
  34. package/dist/src/channel/list.d.ts +0 -1
  35. package/dist/src/channel/set.d.ts +0 -1
  36. package/dist/src/checksum.d.ts +0 -1
  37. package/dist/src/config/index.d.ts +0 -1
  38. package/dist/src/docs.d.ts +0 -1
  39. package/dist/src/index.d.ts +0 -1
  40. package/dist/src/init.d.ts +0 -1
  41. package/dist/src/keyV2.d.ts +0 -1
  42. package/dist/src/login.d.ts +0 -1
  43. package/dist/src/mcp/server.d.ts +0 -1
  44. package/dist/src/organization/add.d.ts +3 -1
  45. package/dist/src/organization/delete.d.ts +0 -1
  46. package/dist/src/organization/index.d.ts +1 -1
  47. package/dist/src/organization/list.d.ts +4 -1
  48. package/dist/src/organization/members.d.ts +11 -0
  49. package/dist/src/organization/set.d.ts +2 -1
  50. package/dist/src/sdk.d.ts +6 -1
  51. package/dist/src/sdk.js +319 -308
  52. package/dist/src/types/supabase.types.d.ts +508 -29
  53. package/dist/src/user/account.d.ts +0 -1
  54. package/dist/src/utils/latest-version.d.ts +0 -1
  55. package/dist/src/utils/security_policy_errors.d.ts +50 -0
  56. package/dist/src/utils.d.ts +477 -27
  57. package/dist/src/versionHelpers.d.ts +0 -1
  58. package/package.json +2 -3
  59. package/dist/src/api/app.d.ts.map +0 -1
  60. package/dist/src/api/channels.d.ts.map +0 -1
  61. package/dist/src/api/cryptoV2.d.ts.map +0 -1
  62. package/dist/src/api/update.d.ts.map +0 -1
  63. package/dist/src/api/versions.d.ts.map +0 -1
  64. package/dist/src/app/add.d.ts.map +0 -1
  65. package/dist/src/app/debug.d.ts.map +0 -1
  66. package/dist/src/app/delete.d.ts.map +0 -1
  67. package/dist/src/app/info.d.ts.map +0 -1
  68. package/dist/src/app/list.d.ts.map +0 -1
  69. package/dist/src/app/set.d.ts.map +0 -1
  70. package/dist/src/app/setting.d.ts.map +0 -1
  71. package/dist/src/build/credentials-command.d.ts.map +0 -1
  72. package/dist/src/build/credentials.d.ts.map +0 -1
  73. package/dist/src/build/request.d.ts.map +0 -1
  74. package/dist/src/bundle/check.d.ts.map +0 -1
  75. package/dist/src/bundle/cleanup.d.ts.map +0 -1
  76. package/dist/src/bundle/compatibility.d.ts.map +0 -1
  77. package/dist/src/bundle/decryptV2.d.ts.map +0 -1
  78. package/dist/src/bundle/delete.d.ts.map +0 -1
  79. package/dist/src/bundle/encryptV2.d.ts.map +0 -1
  80. package/dist/src/bundle/list.d.ts.map +0 -1
  81. package/dist/src/bundle/partial.d.ts.map +0 -1
  82. package/dist/src/bundle/unlink.d.ts.map +0 -1
  83. package/dist/src/bundle/upload.d.ts.map +0 -1
  84. package/dist/src/bundle/upload_interface.d.ts.map +0 -1
  85. package/dist/src/bundle/zip.d.ts.map +0 -1
  86. package/dist/src/channel/add.d.ts.map +0 -1
  87. package/dist/src/channel/currentBundle.d.ts.map +0 -1
  88. package/dist/src/channel/delete.d.ts.map +0 -1
  89. package/dist/src/channel/list.d.ts.map +0 -1
  90. package/dist/src/channel/set.d.ts.map +0 -1
  91. package/dist/src/checksum.d.ts.map +0 -1
  92. package/dist/src/config/index.d.ts.map +0 -1
  93. package/dist/src/docs.d.ts.map +0 -1
  94. package/dist/src/index.d.ts.map +0 -1
  95. package/dist/src/init.d.ts.map +0 -1
  96. package/dist/src/keyV2.d.ts.map +0 -1
  97. package/dist/src/login.d.ts.map +0 -1
  98. package/dist/src/mcp/server.d.ts.map +0 -1
  99. package/dist/src/organization/add.d.ts.map +0 -1
  100. package/dist/src/organization/delete.d.ts.map +0 -1
  101. package/dist/src/organization/index.d.ts.map +0 -1
  102. package/dist/src/organization/list.d.ts.map +0 -1
  103. package/dist/src/organization/set.d.ts.map +0 -1
  104. package/dist/src/sdk.d.ts.map +0 -1
  105. package/dist/src/types/supabase.types.d.ts.map +0 -1
  106. package/dist/src/user/account.d.ts.map +0 -1
  107. package/dist/src/utils/latest-version.d.ts.map +0 -1
  108. package/dist/src/utils.d.ts.map +0 -1
  109. package/dist/src/versionHelpers.d.ts.map +0 -1
@@ -12,7 +12,7 @@ export declare function findUnknownVersion(supabase: SupabaseClient<Database>, a
12
12
  id: number;
13
13
  }>;
14
14
  export declare function createChannel(supabase: SupabaseClient<Database>, update: Database['public']['Tables']['channels']['Insert']): import("@supabase/postgrest-js").PostgrestBuilder<{
15
- PostgrestVersion: "13.0.5";
15
+ PostgrestVersion: "12";
16
16
  }, {
17
17
  allow_dev: boolean;
18
18
  allow_device: boolean;
@@ -34,10 +34,10 @@ export declare function createChannel(supabase: SupabaseClient<Database>, update
34
34
  version: number;
35
35
  }, false>;
36
36
  export declare function delChannel(supabase: SupabaseClient<Database>, name: string, appId: string, _userId: string): import("@supabase/postgrest-js").PostgrestBuilder<{
37
- PostgrestVersion: "13.0.5";
37
+ PostgrestVersion: "12";
38
38
  }, never, false>;
39
39
  export declare function findChannel(supabase: SupabaseClient<Database>, appId: string, name: string): import("@supabase/postgrest-js").PostgrestBuilder<{
40
- PostgrestVersion: "13.0.5";
40
+ PostgrestVersion: "12";
41
41
  }, {
42
42
  allow_dev: boolean;
43
43
  allow_device: boolean;
@@ -59,7 +59,7 @@ export declare function findChannel(supabase: SupabaseClient<Database>, appId: s
59
59
  version: number;
60
60
  }, false>;
61
61
  export declare function findChannelDevices(supabase: SupabaseClient<Database>, appId: string, channelId: number): import("@supabase/postgrest-js").PostgrestFilterBuilder<{
62
- PostgrestVersion: "13.0.5";
62
+ PostgrestVersion: "12";
63
63
  }, {
64
64
  Tables: {
65
65
  apikeys: {
@@ -335,6 +335,57 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
335
335
  referencedColumns: ["id"];
336
336
  }];
337
337
  };
338
+ audit_logs: {
339
+ Row: {
340
+ changed_fields: string[] | null;
341
+ created_at: string;
342
+ id: number;
343
+ new_record: import("../types/supabase.types").Json | null;
344
+ old_record: import("../types/supabase.types").Json | null;
345
+ operation: string;
346
+ org_id: string;
347
+ record_id: string;
348
+ table_name: string;
349
+ user_id: string | null;
350
+ };
351
+ Insert: {
352
+ changed_fields?: string[] | null;
353
+ created_at?: string;
354
+ id?: number;
355
+ new_record?: import("../types/supabase.types").Json | null;
356
+ old_record?: import("../types/supabase.types").Json | null;
357
+ operation: string;
358
+ org_id: string;
359
+ record_id: string;
360
+ table_name: string;
361
+ user_id?: string | null;
362
+ };
363
+ Update: {
364
+ changed_fields?: string[] | null;
365
+ created_at?: string;
366
+ id?: number;
367
+ new_record?: import("../types/supabase.types").Json | null;
368
+ old_record?: import("../types/supabase.types").Json | null;
369
+ operation?: string;
370
+ org_id?: string;
371
+ record_id?: string;
372
+ table_name?: string;
373
+ user_id?: string | null;
374
+ };
375
+ Relationships: [{
376
+ foreignKeyName: "audit_logs_org_id_fkey";
377
+ columns: ["org_id"];
378
+ isOneToOne: false;
379
+ referencedRelation: "orgs";
380
+ referencedColumns: ["id"];
381
+ }, {
382
+ foreignKeyName: "audit_logs_user_id_fkey";
383
+ columns: ["user_id"];
384
+ isOneToOne: false;
385
+ referencedRelation: "users";
386
+ referencedColumns: ["id"];
387
+ }];
388
+ };
338
389
  bandwidth_usage: {
339
390
  Row: {
340
391
  app_id: string;
@@ -390,13 +441,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
390
441
  platform?: string;
391
442
  user_id?: string | null;
392
443
  };
393
- Relationships: [{
394
- foreignKeyName: "build_logs_org_id_fkey";
395
- columns: ["org_id"];
396
- isOneToOne: false;
397
- referencedRelation: "orgs";
398
- referencedColumns: ["id"];
399
- }];
444
+ Relationships: [];
400
445
  };
401
446
  build_requests: {
402
447
  Row: {
@@ -638,6 +683,69 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
638
683
  referencedColumns: ["id"];
639
684
  }];
640
685
  };
686
+ cron_tasks: {
687
+ Row: {
688
+ batch_size: number | null;
689
+ created_at: string;
690
+ description: string | null;
691
+ enabled: boolean;
692
+ hour_interval: number | null;
693
+ id: number;
694
+ minute_interval: number | null;
695
+ name: string;
696
+ payload: import("../types/supabase.types").Json | null;
697
+ run_at_hour: number | null;
698
+ run_at_minute: number | null;
699
+ run_at_second: number | null;
700
+ run_on_day: number | null;
701
+ run_on_dow: number | null;
702
+ second_interval: number | null;
703
+ target: string;
704
+ task_type: Database["public"]["Enums"]["cron_task_type"];
705
+ updated_at: string;
706
+ };
707
+ Insert: {
708
+ batch_size?: number | null;
709
+ created_at?: string;
710
+ description?: string | null;
711
+ enabled?: boolean;
712
+ hour_interval?: number | null;
713
+ id?: number;
714
+ minute_interval?: number | null;
715
+ name: string;
716
+ payload?: import("../types/supabase.types").Json | null;
717
+ run_at_hour?: number | null;
718
+ run_at_minute?: number | null;
719
+ run_at_second?: number | null;
720
+ run_on_day?: number | null;
721
+ run_on_dow?: number | null;
722
+ second_interval?: number | null;
723
+ target: string;
724
+ task_type?: Database["public"]["Enums"]["cron_task_type"];
725
+ updated_at?: string;
726
+ };
727
+ Update: {
728
+ batch_size?: number | null;
729
+ created_at?: string;
730
+ description?: string | null;
731
+ enabled?: boolean;
732
+ hour_interval?: number | null;
733
+ id?: number;
734
+ minute_interval?: number | null;
735
+ name?: string;
736
+ payload?: import("../types/supabase.types").Json | null;
737
+ run_at_hour?: number | null;
738
+ run_at_minute?: number | null;
739
+ run_at_second?: number | null;
740
+ run_on_day?: number | null;
741
+ run_on_dow?: number | null;
742
+ second_interval?: number | null;
743
+ target?: string;
744
+ task_type?: Database["public"]["Enums"]["cron_task_type"];
745
+ updated_at?: string;
746
+ };
747
+ Relationships: [];
748
+ };
641
749
  daily_bandwidth: {
642
750
  Row: {
643
751
  app_id: string;
@@ -808,6 +916,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
808
916
  created_by: string;
809
917
  deployed_at: string | null;
810
918
  id: number;
919
+ install_stats_email_sent_at: string | null;
811
920
  owner_org: string;
812
921
  updated_at: string | null;
813
922
  version_id: number;
@@ -819,6 +928,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
819
928
  created_by: string;
820
929
  deployed_at?: string | null;
821
930
  id?: number;
931
+ install_stats_email_sent_at?: string | null;
822
932
  owner_org: string;
823
933
  updated_at?: string | null;
824
934
  version_id: number;
@@ -830,6 +940,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
830
940
  created_by?: string;
831
941
  deployed_at?: string | null;
832
942
  id?: number;
943
+ install_stats_email_sent_at?: string | null;
833
944
  owner_org?: string;
834
945
  updated_at?: string | null;
835
946
  version_id?: number;
@@ -949,7 +1060,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
949
1060
  credits_consumed: number;
950
1061
  date_id: string;
951
1062
  devices_last_month: number | null;
952
- mrrr: number;
1063
+ mrr: number;
953
1064
  need_upgrade: number | null;
954
1065
  new_paying_orgs: number;
955
1066
  not_paying: number | null;
@@ -957,7 +1068,6 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
957
1068
  paying: number | null;
958
1069
  paying_monthly: number | null;
959
1070
  paying_yearly: number | null;
960
- plan_enterprise: number | null;
961
1071
  plan_enterprise_monthly: number;
962
1072
  plan_enterprise_yearly: number;
963
1073
  plan_maker: number | null;
@@ -994,7 +1104,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
994
1104
  credits_consumed?: number;
995
1105
  date_id: string;
996
1106
  devices_last_month?: number | null;
997
- mrrr?: number;
1107
+ mrr?: number;
998
1108
  need_upgrade?: number | null;
999
1109
  new_paying_orgs?: number;
1000
1110
  not_paying?: number | null;
@@ -1002,7 +1112,6 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1002
1112
  paying?: number | null;
1003
1113
  paying_monthly?: number | null;
1004
1114
  paying_yearly?: number | null;
1005
- plan_enterprise?: number | null;
1006
1115
  plan_enterprise_monthly?: number;
1007
1116
  plan_enterprise_yearly?: number;
1008
1117
  plan_maker?: number | null;
@@ -1039,7 +1148,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1039
1148
  credits_consumed?: number;
1040
1149
  date_id?: string;
1041
1150
  devices_last_month?: number | null;
1042
- mrrr?: number;
1151
+ mrr?: number;
1043
1152
  need_upgrade?: number | null;
1044
1153
  new_paying_orgs?: number;
1045
1154
  not_paying?: number | null;
@@ -1047,7 +1156,6 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1047
1156
  paying?: number | null;
1048
1157
  paying_monthly?: number | null;
1049
1158
  paying_yearly?: number | null;
1050
- plan_enterprise?: number | null;
1051
1159
  plan_enterprise_monthly?: number;
1052
1160
  plan_enterprise_yearly?: number;
1053
1161
  plan_maker?: number | null;
@@ -1207,11 +1315,14 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1207
1315
  created_at: string | null;
1208
1316
  created_by: string;
1209
1317
  customer_id: string | null;
1318
+ email_preferences: import("../types/supabase.types").Json;
1319
+ enforcing_2fa: boolean;
1210
1320
  id: string;
1211
1321
  last_stats_updated_at: string | null;
1212
1322
  logo: string | null;
1213
1323
  management_email: string;
1214
1324
  name: string;
1325
+ password_policy_config: import("../types/supabase.types").Json | null;
1215
1326
  stats_updated_at: string | null;
1216
1327
  updated_at: string | null;
1217
1328
  };
@@ -1219,11 +1330,14 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1219
1330
  created_at?: string | null;
1220
1331
  created_by: string;
1221
1332
  customer_id?: string | null;
1333
+ email_preferences?: import("../types/supabase.types").Json;
1334
+ enforcing_2fa?: boolean;
1222
1335
  id?: string;
1223
1336
  last_stats_updated_at?: string | null;
1224
1337
  logo?: string | null;
1225
1338
  management_email: string;
1226
1339
  name: string;
1340
+ password_policy_config?: import("../types/supabase.types").Json | null;
1227
1341
  stats_updated_at?: string | null;
1228
1342
  updated_at?: string | null;
1229
1343
  };
@@ -1231,11 +1345,14 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1231
1345
  created_at?: string | null;
1232
1346
  created_by?: string;
1233
1347
  customer_id?: string | null;
1348
+ email_preferences?: import("../types/supabase.types").Json;
1349
+ enforcing_2fa?: boolean;
1234
1350
  id?: string;
1235
1351
  last_stats_updated_at?: string | null;
1236
1352
  logo?: string | null;
1237
1353
  management_email?: string;
1238
1354
  name?: string;
1355
+ password_policy_config?: import("../types/supabase.types").Json | null;
1239
1356
  stats_updated_at?: string | null;
1240
1357
  updated_at?: string | null;
1241
1358
  };
@@ -1706,12 +1823,49 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1706
1823
  referencedColumns: ["id"];
1707
1824
  }];
1708
1825
  };
1826
+ user_password_compliance: {
1827
+ Row: {
1828
+ created_at: string;
1829
+ id: number;
1830
+ org_id: string;
1831
+ policy_hash: string;
1832
+ updated_at: string;
1833
+ user_id: string;
1834
+ validated_at: string;
1835
+ };
1836
+ Insert: {
1837
+ created_at?: string;
1838
+ id?: number;
1839
+ org_id: string;
1840
+ policy_hash: string;
1841
+ updated_at?: string;
1842
+ user_id: string;
1843
+ validated_at?: string;
1844
+ };
1845
+ Update: {
1846
+ created_at?: string;
1847
+ id?: number;
1848
+ org_id?: string;
1849
+ policy_hash?: string;
1850
+ updated_at?: string;
1851
+ user_id?: string;
1852
+ validated_at?: string;
1853
+ };
1854
+ Relationships: [{
1855
+ foreignKeyName: "user_password_compliance_org_id_fkey";
1856
+ columns: ["org_id"];
1857
+ isOneToOne: false;
1858
+ referencedRelation: "orgs";
1859
+ referencedColumns: ["id"];
1860
+ }];
1861
+ };
1709
1862
  users: {
1710
1863
  Row: {
1711
1864
  ban_time: string | null;
1712
1865
  country: string | null;
1713
1866
  created_at: string | null;
1714
1867
  email: string;
1868
+ email_preferences: import("../types/supabase.types").Json;
1715
1869
  enable_notifications: boolean;
1716
1870
  first_name: string | null;
1717
1871
  id: string;
@@ -1725,6 +1879,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1725
1879
  country?: string | null;
1726
1880
  created_at?: string | null;
1727
1881
  email: string;
1882
+ email_preferences?: import("../types/supabase.types").Json;
1728
1883
  enable_notifications?: boolean;
1729
1884
  first_name?: string | null;
1730
1885
  id: string;
@@ -1738,6 +1893,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1738
1893
  country?: string | null;
1739
1894
  created_at?: string | null;
1740
1895
  email?: string;
1896
+ email_preferences?: import("../types/supabase.types").Json;
1741
1897
  enable_notifications?: boolean;
1742
1898
  first_name?: string | null;
1743
1899
  id?: string;
@@ -1790,6 +1946,126 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1790
1946
  };
1791
1947
  Relationships: [];
1792
1948
  };
1949
+ webhook_deliveries: {
1950
+ Row: {
1951
+ attempt_count: number;
1952
+ audit_log_id: number | null;
1953
+ completed_at: string | null;
1954
+ created_at: string;
1955
+ duration_ms: number | null;
1956
+ event_type: string;
1957
+ id: string;
1958
+ max_attempts: number;
1959
+ next_retry_at: string | null;
1960
+ org_id: string;
1961
+ request_payload: import("../types/supabase.types").Json;
1962
+ response_body: string | null;
1963
+ response_headers: import("../types/supabase.types").Json | null;
1964
+ response_status: number | null;
1965
+ status: string;
1966
+ webhook_id: string;
1967
+ };
1968
+ Insert: {
1969
+ attempt_count?: number;
1970
+ audit_log_id?: number | null;
1971
+ completed_at?: string | null;
1972
+ created_at?: string;
1973
+ duration_ms?: number | null;
1974
+ event_type: string;
1975
+ id?: string;
1976
+ max_attempts?: number;
1977
+ next_retry_at?: string | null;
1978
+ org_id: string;
1979
+ request_payload: import("../types/supabase.types").Json;
1980
+ response_body?: string | null;
1981
+ response_headers?: import("../types/supabase.types").Json | null;
1982
+ response_status?: number | null;
1983
+ status?: string;
1984
+ webhook_id: string;
1985
+ };
1986
+ Update: {
1987
+ attempt_count?: number;
1988
+ audit_log_id?: number | null;
1989
+ completed_at?: string | null;
1990
+ created_at?: string;
1991
+ duration_ms?: number | null;
1992
+ event_type?: string;
1993
+ id?: string;
1994
+ max_attempts?: number;
1995
+ next_retry_at?: string | null;
1996
+ org_id?: string;
1997
+ request_payload?: import("../types/supabase.types").Json;
1998
+ response_body?: string | null;
1999
+ response_headers?: import("../types/supabase.types").Json | null;
2000
+ response_status?: number | null;
2001
+ status?: string;
2002
+ webhook_id?: string;
2003
+ };
2004
+ Relationships: [{
2005
+ foreignKeyName: "webhook_deliveries_org_id_fkey";
2006
+ columns: ["org_id"];
2007
+ isOneToOne: false;
2008
+ referencedRelation: "orgs";
2009
+ referencedColumns: ["id"];
2010
+ }, {
2011
+ foreignKeyName: "webhook_deliveries_webhook_id_fkey";
2012
+ columns: ["webhook_id"];
2013
+ isOneToOne: false;
2014
+ referencedRelation: "webhooks";
2015
+ referencedColumns: ["id"];
2016
+ }];
2017
+ };
2018
+ webhooks: {
2019
+ Row: {
2020
+ created_at: string;
2021
+ created_by: string | null;
2022
+ enabled: boolean;
2023
+ events: string[];
2024
+ id: string;
2025
+ name: string;
2026
+ org_id: string;
2027
+ secret: string;
2028
+ updated_at: string;
2029
+ url: string;
2030
+ };
2031
+ Insert: {
2032
+ created_at?: string;
2033
+ created_by?: string | null;
2034
+ enabled?: boolean;
2035
+ events: string[];
2036
+ id?: string;
2037
+ name: string;
2038
+ org_id: string;
2039
+ secret?: string;
2040
+ updated_at?: string;
2041
+ url: string;
2042
+ };
2043
+ Update: {
2044
+ created_at?: string;
2045
+ created_by?: string | null;
2046
+ enabled?: boolean;
2047
+ events?: string[];
2048
+ id?: string;
2049
+ name?: string;
2050
+ org_id?: string;
2051
+ secret?: string;
2052
+ updated_at?: string;
2053
+ url?: string;
2054
+ };
2055
+ Relationships: [{
2056
+ foreignKeyName: "webhooks_created_by_fkey";
2057
+ columns: ["created_by"];
2058
+ isOneToOne: false;
2059
+ referencedRelation: "users";
2060
+ referencedColumns: ["id"];
2061
+ }, {
2062
+ foreignKeyName: "webhooks_org_id_fkey";
2063
+ columns: ["org_id"];
2064
+ isOneToOne: false;
2065
+ referencedRelation: "orgs";
2066
+ referencedColumns: ["id"];
2067
+ }];
2068
+ };
1793
2069
  };
1794
2070
  Views: {
1795
2071
  usage_credit_balances: {
@@ -1884,6 +2160,27 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1884
2160
  };
1885
2161
  Returns: boolean;
1886
2162
  };
2163
+ check_org_members_2fa_enabled: {
2164
+ Args: {
2165
+ org_id: string;
2166
+ };
2167
+ Returns: {
2168
+ "2fa_enabled": boolean;
2169
+ user_id: string;
2170
+ }[];
2171
+ };
2172
+ check_org_members_password_policy: {
2173
+ Args: {
2174
+ org_id: string;
2175
+ };
2176
+ Returns: {
2177
+ email: string;
2178
+ first_name: string;
2179
+ last_name: string;
2180
+ password_policy_compliant: boolean;
2181
+ user_id: string;
2182
+ }[];
2183
+ };
1887
2184
  check_revert_to_builtin_version: {
1888
2185
  Args: {
1889
2186
  appid: string;
@@ -1894,10 +2191,22 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1894
2191
  Args: never;
1895
2192
  Returns: undefined;
1896
2193
  };
2194
+ cleanup_job_run_details_7days: {
2195
+ Args: never;
2196
+ Returns: undefined;
2197
+ };
2198
+ cleanup_old_audit_logs: {
2199
+ Args: never;
2200
+ Returns: undefined;
2201
+ };
1897
2202
  cleanup_queue_messages: {
1898
2203
  Args: never;
1899
2204
  Returns: undefined;
1900
2205
  };
2206
+ cleanup_webhook_deliveries: {
2207
+ Args: never;
2208
+ Returns: undefined;
2209
+ };
1901
2210
  convert_bytes_to_gb: {
1902
2211
  Args: {
1903
2212
  bytes_value: number;
@@ -2106,14 +2415,6 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2106
2415
  subscription_anchor_start: string;
2107
2416
  }[];
2108
2417
  };
2109
- get_d1_sync_url: {
2110
- Args: never;
2111
- Returns: string;
2112
- };
2113
- get_d1_webhook_signature: {
2114
- Args: never;
2115
- Returns: string;
2116
- };
2117
2418
  get_db_url: {
2118
2419
  Args: never;
2119
2420
  Returns: string;
@@ -2338,6 +2639,69 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2338
2639
  trial_left: number;
2339
2640
  }[];
2340
2641
  };
2642
+ get_orgs_v7: {
2643
+ Args: never;
2644
+ Returns: {
2645
+ "2fa_has_access": boolean;
2646
+ app_count: number;
2647
+ can_use_more: boolean;
2648
+ created_by: string;
2649
+ credit_available: number;
2650
+ credit_next_expiration: string;
2651
+ credit_total: number;
2652
+ enforcing_2fa: boolean;
2653
+ gid: string;
2654
+ is_canceled: boolean;
2655
+ is_yearly: boolean;
2656
+ logo: string;
2657
+ management_email: string;
2658
+ name: string;
2659
+ next_stats_update_at: string;
2660
+ password_has_access: boolean;
2661
+ password_policy_config: import("../types/supabase.types").Json;
2662
+ paying: boolean;
2663
+ role: string;
2664
+ stats_updated_at: string;
2665
+ subscription_end: string;
2666
+ subscription_start: string;
2667
+ trial_left: number;
2668
+ }[];
2669
+ } | {
2670
+ Args: {
2671
+ userid: string;
2672
+ };
2673
+ Returns: {
2674
+ "2fa_has_access": boolean;
2675
+ app_count: number;
2676
+ can_use_more: boolean;
2677
+ created_by: string;
2678
+ credit_available: number;
2679
+ credit_next_expiration: string;
2680
+ credit_total: number;
2681
+ enforcing_2fa: boolean;
2682
+ gid: string;
2683
+ is_canceled: boolean;
2684
+ is_yearly: boolean;
2685
+ logo: string;
2686
+ management_email: string;
2687
+ name: string;
2688
+ next_stats_update_at: string;
2689
+ password_has_access: boolean;
2690
+ password_policy_config: import("../types/supabase.types").Json;
2691
+ paying: boolean;
2692
+ role: string;
2693
+ stats_updated_at: string;
2694
+ subscription_end: string;
2695
+ subscription_start: string;
2696
+ trial_left: number;
2697
+ }[];
2698
+ };
2699
+ get_password_policy_hash: {
2700
+ Args: {
2701
+ policy_config: import("../types/supabase.types").Json;
2702
+ };
2703
+ Returns: string;
2704
+ };
2341
2705
  get_plan_usage_percent_detailed: {
2342
2706
  Args: {
2343
2707
  orgid: string;
@@ -2447,6 +2811,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2447
2811
  Returns: {
2448
2812
  app_id: string;
2449
2813
  checksum: string | null;
2814
+ cli_version: string | null;
2450
2815
  comment: string | null;
2451
2816
  created_at: string | null;
2452
2817
  deleted: boolean;
@@ -2483,6 +2848,15 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2483
2848
  open_app: number;
2484
2849
  }[];
2485
2850
  };
2851
+ has_2fa_enabled: {
2852
+ Args: never;
2853
+ Returns: boolean;
2854
+ } | {
2855
+ Args: {
2856
+ user_id: string;
2857
+ };
2858
+ Returns: boolean;
2859
+ };
2486
2860
  has_app_right: {
2487
2861
  Args: {
2488
2862
  appid: string;
@@ -2741,7 +3115,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2741
3115
  Args: never;
2742
3116
  Returns: undefined;
2743
3117
  };
2744
- process_d1_replication_batch: {
3118
+ process_deploy_install_stats_email: {
2745
3119
  Args: never;
2746
3120
  Returns: undefined;
2747
3121
  };
@@ -2847,22 +3221,85 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2847
3221
  };
2848
3222
  Returns: string;
2849
3223
  };
2850
- remove_old_jobs: {
2851
- Args: never;
2852
- Returns: undefined;
2853
- };
2854
- rescind_invitation: {
3224
+ reject_access_due_to_2fa: {
2855
3225
  Args: {
2856
- email: string;
2857
3226
  org_id: string;
3227
+ user_id: string;
2858
3228
  };
2859
- Returns: string;
3229
+ Returns: boolean;
2860
3230
  };
2861
- seed_get_app_metrics_caches: {
3231
+ reject_access_due_to_2fa_for_app: {
2862
3232
  Args: {
2863
- p_end_date: string;
2864
- p_org_id: string;
2865
- p_start_date: string;
3233
+ app_id: string;
3234
+ };
3235
+ Returns: boolean;
3236
+ };
3237
+ reject_access_due_to_2fa_for_org: {
3238
+ Args: {
3239
+ org_id: string;
3240
+ };
3241
+ Returns: boolean;
3242
+ };
3243
+ reject_access_due_to_password_policy: {
3244
+ Args: {
3245
+ org_id: string;
3246
+ user_id: string;
3247
+ };
3248
+ Returns: boolean;
3249
+ };
3250
+ remove_old_jobs: {
3251
+ Args: never;
3252
+ Returns: undefined;
3253
+ };
3254
+ rescind_invitation: {
3255
+ Args: {
3256
+ email: string;
3257
+ org_id: string;
3258
+ };
3259
+ Returns: string;
3260
+ };
3261
+ reset_and_seed_app_data: {
3262
+ Args: {
3263
+ p_admin_user_id?: string;
3264
+ p_app_id: string;
3265
+ p_org_id?: string;
3266
+ p_plan_product_id?: string;
3267
+ p_stripe_customer_id?: string;
3268
+ p_user_id?: string;
3269
+ };
3270
+ Returns: undefined;
3271
+ };
3272
+ reset_and_seed_app_stats_data: {
3273
+ Args: {
3274
+ p_app_id: string;
3275
+ };
3276
+ Returns: undefined;
3277
+ };
3278
+ reset_and_seed_data: {
3279
+ Args: never;
3280
+ Returns: undefined;
3281
+ };
3282
+ reset_and_seed_stats_data: {
3283
+ Args: never;
3284
+ Returns: undefined;
3285
+ };
3286
+ reset_app_data: {
3287
+ Args: {
3288
+ p_app_id: string;
3289
+ };
3290
+ Returns: undefined;
3291
+ };
3292
+ reset_app_stats_data: {
3293
+ Args: {
3294
+ p_app_id: string;
3295
+ };
3296
+ Returns: undefined;
3297
+ };
3298
+ seed_get_app_metrics_caches: {
3299
+ Args: {
3300
+ p_end_date: string;
3301
+ p_org_id: string;
3302
+ p_start_date: string;
2866
3303
  };
2867
3304
  Returns: {
2868
3305
  cached_at: string;
@@ -2959,6 +3396,13 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2959
3396
  };
2960
3397
  Returns: boolean;
2961
3398
  };
3399
+ user_meets_password_policy: {
3400
+ Args: {
3401
+ org_id: string;
3402
+ user_id: string;
3403
+ };
3404
+ Returns: boolean;
3405
+ };
2962
3406
  verify_mfa: {
2963
3407
  Args: never;
2964
3408
  Returns: boolean;
@@ -2968,10 +3412,11 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2968
3412
  action_type: "mau" | "storage" | "bandwidth" | "build_time";
2969
3413
  credit_metric_type: "mau" | "bandwidth" | "storage" | "build_time";
2970
3414
  credit_transaction_type: "grant" | "purchase" | "manual_grant" | "deduction" | "expiry" | "refund";
3415
+ cron_task_type: "function" | "queue" | "function_queue";
2971
3416
  disable_update: "major" | "minor" | "patch" | "version_number" | "none";
2972
3417
  key_mode: "read" | "write" | "all" | "upload";
2973
3418
  platform_os: "ios" | "android";
2974
- stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableProdBuild" | "disableEmulator" | "disableDevice" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "ping" | "InvalidIp" | "blocked_by_server_url" | "download_manifest_start" | "download_manifest_complete" | "download_zip_start" | "download_zip_complete" | "download_manifest_file_fail" | "download_manifest_checksum_fail" | "download_manifest_brotli_fail" | "backend_refusal" | "download_0";
3419
+ stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableProdBuild" | "disableEmulator" | "disableDevice" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "keyMismatch" | "ping" | "InvalidIp" | "blocked_by_server_url" | "download_manifest_start" | "download_manifest_complete" | "download_zip_start" | "download_zip_complete" | "download_manifest_file_fail" | "download_manifest_checksum_fail" | "download_manifest_brotli_fail" | "backend_refusal" | "download_0";
2975
3420
  stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
2976
3421
  user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
2977
3422
  user_role: "read" | "upload" | "write" | "admin";
@@ -3039,7 +3484,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
3039
3484
  referencedColumns: ["id"];
3040
3485
  }], "GET">;
3041
3486
  export declare function delChannelDevices(supabase: SupabaseClient<Database>, appId: string, channelId: number): import("@supabase/postgrest-js").PostgrestFilterBuilder<{
3042
- PostgrestVersion: "13.0.5";
3487
+ PostgrestVersion: "12";
3043
3488
  }, {
3044
3489
  Tables: {
3045
3490
  apikeys: {
@@ -3315,6 +3760,57 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3315
3760
  referencedColumns: ["id"];
3316
3761
  }];
3317
3762
  };
3763
+ audit_logs: {
3764
+ Row: {
3765
+ changed_fields: string[] | null;
3766
+ created_at: string;
3767
+ id: number;
3768
+ new_record: import("../types/supabase.types").Json | null;
3769
+ old_record: import("../types/supabase.types").Json | null;
3770
+ operation: string;
3771
+ org_id: string;
3772
+ record_id: string;
3773
+ table_name: string;
3774
+ user_id: string | null;
3775
+ };
3776
+ Insert: {
3777
+ changed_fields?: string[] | null;
3778
+ created_at?: string;
3779
+ id?: number;
3780
+ new_record?: import("../types/supabase.types").Json | null;
3781
+ old_record?: import("../types/supabase.types").Json | null;
3782
+ operation: string;
3783
+ org_id: string;
3784
+ record_id: string;
3785
+ table_name: string;
3786
+ user_id?: string | null;
3787
+ };
3788
+ Update: {
3789
+ changed_fields?: string[] | null;
3790
+ created_at?: string;
3791
+ id?: number;
3792
+ new_record?: import("../types/supabase.types").Json | null;
3793
+ old_record?: import("../types/supabase.types").Json | null;
3794
+ operation?: string;
3795
+ org_id?: string;
3796
+ record_id?: string;
3797
+ table_name?: string;
3798
+ user_id?: string | null;
3799
+ };
3800
+ Relationships: [{
3801
+ foreignKeyName: "audit_logs_org_id_fkey";
3802
+ columns: ["org_id"];
3803
+ isOneToOne: false;
3804
+ referencedRelation: "orgs";
3805
+ referencedColumns: ["id"];
3806
+ }, {
3807
+ foreignKeyName: "audit_logs_user_id_fkey";
3808
+ columns: ["user_id"];
3809
+ isOneToOne: false;
3810
+ referencedRelation: "users";
3811
+ referencedColumns: ["id"];
3812
+ }];
3813
+ };
3318
3814
  bandwidth_usage: {
3319
3815
  Row: {
3320
3816
  app_id: string;
@@ -3370,13 +3866,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3370
3866
  platform?: string;
3371
3867
  user_id?: string | null;
3372
3868
  };
3373
- Relationships: [{
3374
- foreignKeyName: "build_logs_org_id_fkey";
3375
- columns: ["org_id"];
3376
- isOneToOne: false;
3377
- referencedRelation: "orgs";
3378
- referencedColumns: ["id"];
3379
- }];
3869
+ Relationships: [];
3380
3870
  };
3381
3871
  build_requests: {
3382
3872
  Row: {
@@ -3618,6 +4108,69 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3618
4108
  referencedColumns: ["id"];
3619
4109
  }];
3620
4110
  };
4111
+ cron_tasks: {
4112
+ Row: {
4113
+ batch_size: number | null;
4114
+ created_at: string;
4115
+ description: string | null;
4116
+ enabled: boolean;
4117
+ hour_interval: number | null;
4118
+ id: number;
4119
+ minute_interval: number | null;
4120
+ name: string;
4121
+ payload: import("../types/supabase.types").Json | null;
4122
+ run_at_hour: number | null;
4123
+ run_at_minute: number | null;
4124
+ run_at_second: number | null;
4125
+ run_on_day: number | null;
4126
+ run_on_dow: number | null;
4127
+ second_interval: number | null;
4128
+ target: string;
4129
+ task_type: Database["public"]["Enums"]["cron_task_type"];
4130
+ updated_at: string;
4131
+ };
4132
+ Insert: {
4133
+ batch_size?: number | null;
4134
+ created_at?: string;
4135
+ description?: string | null;
4136
+ enabled?: boolean;
4137
+ hour_interval?: number | null;
4138
+ id?: number;
4139
+ minute_interval?: number | null;
4140
+ name: string;
4141
+ payload?: import("../types/supabase.types").Json | null;
4142
+ run_at_hour?: number | null;
4143
+ run_at_minute?: number | null;
4144
+ run_at_second?: number | null;
4145
+ run_on_day?: number | null;
4146
+ run_on_dow?: number | null;
4147
+ second_interval?: number | null;
4148
+ target: string;
4149
+ task_type?: Database["public"]["Enums"]["cron_task_type"];
4150
+ updated_at?: string;
4151
+ };
4152
+ Update: {
4153
+ batch_size?: number | null;
4154
+ created_at?: string;
4155
+ description?: string | null;
4156
+ enabled?: boolean;
4157
+ hour_interval?: number | null;
4158
+ id?: number;
4159
+ minute_interval?: number | null;
4160
+ name?: string;
4161
+ payload?: import("../types/supabase.types").Json | null;
4162
+ run_at_hour?: number | null;
4163
+ run_at_minute?: number | null;
4164
+ run_at_second?: number | null;
4165
+ run_on_day?: number | null;
4166
+ run_on_dow?: number | null;
4167
+ second_interval?: number | null;
4168
+ target?: string;
4169
+ task_type?: Database["public"]["Enums"]["cron_task_type"];
4170
+ updated_at?: string;
4171
+ };
4172
+ Relationships: [];
4173
+ };
3621
4174
  daily_bandwidth: {
3622
4175
  Row: {
3623
4176
  app_id: string;
@@ -3788,6 +4341,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3788
4341
  created_by: string;
3789
4342
  deployed_at: string | null;
3790
4343
  id: number;
4344
+ install_stats_email_sent_at: string | null;
3791
4345
  owner_org: string;
3792
4346
  updated_at: string | null;
3793
4347
  version_id: number;
@@ -3799,6 +4353,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3799
4353
  created_by: string;
3800
4354
  deployed_at?: string | null;
3801
4355
  id?: number;
4356
+ install_stats_email_sent_at?: string | null;
3802
4357
  owner_org: string;
3803
4358
  updated_at?: string | null;
3804
4359
  version_id: number;
@@ -3810,6 +4365,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3810
4365
  created_by?: string;
3811
4366
  deployed_at?: string | null;
3812
4367
  id?: number;
4368
+ install_stats_email_sent_at?: string | null;
3813
4369
  owner_org?: string;
3814
4370
  updated_at?: string | null;
3815
4371
  version_id?: number;
@@ -3929,7 +4485,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3929
4485
  credits_consumed: number;
3930
4486
  date_id: string;
3931
4487
  devices_last_month: number | null;
3932
- mrrr: number;
4488
+ mrr: number;
3933
4489
  need_upgrade: number | null;
3934
4490
  new_paying_orgs: number;
3935
4491
  not_paying: number | null;
@@ -3937,7 +4493,6 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3937
4493
  paying: number | null;
3938
4494
  paying_monthly: number | null;
3939
4495
  paying_yearly: number | null;
3940
- plan_enterprise: number | null;
3941
4496
  plan_enterprise_monthly: number;
3942
4497
  plan_enterprise_yearly: number;
3943
4498
  plan_maker: number | null;
@@ -3974,7 +4529,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3974
4529
  credits_consumed?: number;
3975
4530
  date_id: string;
3976
4531
  devices_last_month?: number | null;
3977
- mrrr?: number;
4532
+ mrr?: number;
3978
4533
  need_upgrade?: number | null;
3979
4534
  new_paying_orgs?: number;
3980
4535
  not_paying?: number | null;
@@ -3982,7 +4537,6 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3982
4537
  paying?: number | null;
3983
4538
  paying_monthly?: number | null;
3984
4539
  paying_yearly?: number | null;
3985
- plan_enterprise?: number | null;
3986
4540
  plan_enterprise_monthly?: number;
3987
4541
  plan_enterprise_yearly?: number;
3988
4542
  plan_maker?: number | null;
@@ -4019,7 +4573,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4019
4573
  credits_consumed?: number;
4020
4574
  date_id?: string;
4021
4575
  devices_last_month?: number | null;
4022
- mrrr?: number;
4576
+ mrr?: number;
4023
4577
  need_upgrade?: number | null;
4024
4578
  new_paying_orgs?: number;
4025
4579
  not_paying?: number | null;
@@ -4027,7 +4581,6 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4027
4581
  paying?: number | null;
4028
4582
  paying_monthly?: number | null;
4029
4583
  paying_yearly?: number | null;
4030
- plan_enterprise?: number | null;
4031
4584
  plan_enterprise_monthly?: number;
4032
4585
  plan_enterprise_yearly?: number;
4033
4586
  plan_maker?: number | null;
@@ -4187,11 +4740,14 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4187
4740
  created_at: string | null;
4188
4741
  created_by: string;
4189
4742
  customer_id: string | null;
4743
+ email_preferences: import("../types/supabase.types").Json;
4744
+ enforcing_2fa: boolean;
4190
4745
  id: string;
4191
4746
  last_stats_updated_at: string | null;
4192
4747
  logo: string | null;
4193
4748
  management_email: string;
4194
4749
  name: string;
4750
+ password_policy_config: import("../types/supabase.types").Json | null;
4195
4751
  stats_updated_at: string | null;
4196
4752
  updated_at: string | null;
4197
4753
  };
@@ -4199,11 +4755,14 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4199
4755
  created_at?: string | null;
4200
4756
  created_by: string;
4201
4757
  customer_id?: string | null;
4758
+ email_preferences?: import("../types/supabase.types").Json;
4759
+ enforcing_2fa?: boolean;
4202
4760
  id?: string;
4203
4761
  last_stats_updated_at?: string | null;
4204
4762
  logo?: string | null;
4205
4763
  management_email: string;
4206
4764
  name: string;
4765
+ password_policy_config?: import("../types/supabase.types").Json | null;
4207
4766
  stats_updated_at?: string | null;
4208
4767
  updated_at?: string | null;
4209
4768
  };
@@ -4211,11 +4770,14 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4211
4770
  created_at?: string | null;
4212
4771
  created_by?: string;
4213
4772
  customer_id?: string | null;
4773
+ email_preferences?: import("../types/supabase.types").Json;
4774
+ enforcing_2fa?: boolean;
4214
4775
  id?: string;
4215
4776
  last_stats_updated_at?: string | null;
4216
4777
  logo?: string | null;
4217
4778
  management_email?: string;
4218
4779
  name?: string;
4780
+ password_policy_config?: import("../types/supabase.types").Json | null;
4219
4781
  stats_updated_at?: string | null;
4220
4782
  updated_at?: string | null;
4221
4783
  };
@@ -4686,12 +5248,49 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4686
5248
  referencedColumns: ["id"];
4687
5249
  }];
4688
5250
  };
5251
+ user_password_compliance: {
5252
+ Row: {
5253
+ created_at: string;
5254
+ id: number;
5255
+ org_id: string;
5256
+ policy_hash: string;
5257
+ updated_at: string;
5258
+ user_id: string;
5259
+ validated_at: string;
5260
+ };
5261
+ Insert: {
5262
+ created_at?: string;
5263
+ id?: number;
5264
+ org_id: string;
5265
+ policy_hash: string;
5266
+ updated_at?: string;
5267
+ user_id: string;
5268
+ validated_at?: string;
5269
+ };
5270
+ Update: {
5271
+ created_at?: string;
5272
+ id?: number;
5273
+ org_id?: string;
5274
+ policy_hash?: string;
5275
+ updated_at?: string;
5276
+ user_id?: string;
5277
+ validated_at?: string;
5278
+ };
5279
+ Relationships: [{
5280
+ foreignKeyName: "user_password_compliance_org_id_fkey";
5281
+ columns: ["org_id"];
5282
+ isOneToOne: false;
5283
+ referencedRelation: "orgs";
5284
+ referencedColumns: ["id"];
5285
+ }];
5286
+ };
4689
5287
  users: {
4690
5288
  Row: {
4691
5289
  ban_time: string | null;
4692
5290
  country: string | null;
4693
5291
  created_at: string | null;
4694
5292
  email: string;
5293
+ email_preferences: import("../types/supabase.types").Json;
4695
5294
  enable_notifications: boolean;
4696
5295
  first_name: string | null;
4697
5296
  id: string;
@@ -4705,6 +5304,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4705
5304
  country?: string | null;
4706
5305
  created_at?: string | null;
4707
5306
  email: string;
5307
+ email_preferences?: import("../types/supabase.types").Json;
4708
5308
  enable_notifications?: boolean;
4709
5309
  first_name?: string | null;
4710
5310
  id: string;
@@ -4718,6 +5318,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4718
5318
  country?: string | null;
4719
5319
  created_at?: string | null;
4720
5320
  email?: string;
5321
+ email_preferences?: import("../types/supabase.types").Json;
4721
5322
  enable_notifications?: boolean;
4722
5323
  first_name?: string | null;
4723
5324
  id?: string;
@@ -4770,6 +5371,126 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4770
5371
  };
4771
5372
  Relationships: [];
4772
5373
  };
5374
+ webhook_deliveries: {
5375
+ Row: {
5376
+ attempt_count: number;
5377
+ audit_log_id: number | null;
5378
+ completed_at: string | null;
5379
+ created_at: string;
5380
+ duration_ms: number | null;
5381
+ event_type: string;
5382
+ id: string;
5383
+ max_attempts: number;
5384
+ next_retry_at: string | null;
5385
+ org_id: string;
5386
+ request_payload: import("../types/supabase.types").Json;
5387
+ response_body: string | null;
5388
+ response_headers: import("../types/supabase.types").Json | null;
5389
+ response_status: number | null;
5390
+ status: string;
5391
+ webhook_id: string;
5392
+ };
5393
+ Insert: {
5394
+ attempt_count?: number;
5395
+ audit_log_id?: number | null;
5396
+ completed_at?: string | null;
5397
+ created_at?: string;
5398
+ duration_ms?: number | null;
5399
+ event_type: string;
5400
+ id?: string;
5401
+ max_attempts?: number;
5402
+ next_retry_at?: string | null;
5403
+ org_id: string;
5404
+ request_payload: import("../types/supabase.types").Json;
5405
+ response_body?: string | null;
5406
+ response_headers?: import("../types/supabase.types").Json | null;
5407
+ response_status?: number | null;
5408
+ status?: string;
5409
+ webhook_id: string;
5410
+ };
5411
+ Update: {
5412
+ attempt_count?: number;
5413
+ audit_log_id?: number | null;
5414
+ completed_at?: string | null;
5415
+ created_at?: string;
5416
+ duration_ms?: number | null;
5417
+ event_type?: string;
5418
+ id?: string;
5419
+ max_attempts?: number;
5420
+ next_retry_at?: string | null;
5421
+ org_id?: string;
5422
+ request_payload?: import("../types/supabase.types").Json;
5423
+ response_body?: string | null;
5424
+ response_headers?: import("../types/supabase.types").Json | null;
5425
+ response_status?: number | null;
5426
+ status?: string;
5427
+ webhook_id?: string;
5428
+ };
5429
+ Relationships: [{
5430
+ foreignKeyName: "webhook_deliveries_org_id_fkey";
5431
+ columns: ["org_id"];
5432
+ isOneToOne: false;
5433
+ referencedRelation: "orgs";
5434
+ referencedColumns: ["id"];
5435
+ }, {
5436
+ foreignKeyName: "webhook_deliveries_webhook_id_fkey";
5437
+ columns: ["webhook_id"];
5438
+ isOneToOne: false;
5439
+ referencedRelation: "webhooks";
5440
+ referencedColumns: ["id"];
5441
+ }];
5442
+ };
5443
+ webhooks: {
5444
+ Row: {
5445
+ created_at: string;
5446
+ created_by: string | null;
5447
+ enabled: boolean;
5448
+ events: string[];
5449
+ id: string;
5450
+ name: string;
5451
+ org_id: string;
5452
+ secret: string;
5453
+ updated_at: string;
5454
+ url: string;
5455
+ };
5456
+ Insert: {
5457
+ created_at?: string;
5458
+ created_by?: string | null;
5459
+ enabled?: boolean;
5460
+ events: string[];
5461
+ id?: string;
5462
+ name: string;
5463
+ org_id: string;
5464
+ secret?: string;
5465
+ updated_at?: string;
5466
+ url: string;
5467
+ };
5468
+ Update: {
5469
+ created_at?: string;
5470
+ created_by?: string | null;
5471
+ enabled?: boolean;
5472
+ events?: string[];
5473
+ id?: string;
5474
+ name?: string;
5475
+ org_id?: string;
5476
+ secret?: string;
5477
+ updated_at?: string;
5478
+ url?: string;
5479
+ };
5480
+ Relationships: [{
5481
+ foreignKeyName: "webhooks_created_by_fkey";
5482
+ columns: ["created_by"];
5483
+ isOneToOne: false;
5484
+ referencedRelation: "users";
5485
+ referencedColumns: ["id"];
5486
+ }, {
5487
+ foreignKeyName: "webhooks_org_id_fkey";
5488
+ columns: ["org_id"];
5489
+ isOneToOne: false;
5490
+ referencedRelation: "orgs";
5491
+ referencedColumns: ["id"];
5492
+ }];
5493
+ };
4773
5494
  };
4774
5495
  Views: {
4775
5496
  usage_credit_balances: {
@@ -4864,6 +5585,27 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4864
5585
  };
4865
5586
  Returns: boolean;
4866
5587
  };
5588
+ check_org_members_2fa_enabled: {
5589
+ Args: {
5590
+ org_id: string;
5591
+ };
5592
+ Returns: {
5593
+ "2fa_enabled": boolean;
5594
+ user_id: string;
5595
+ }[];
5596
+ };
5597
+ check_org_members_password_policy: {
5598
+ Args: {
5599
+ org_id: string;
5600
+ };
5601
+ Returns: {
5602
+ email: string;
5603
+ first_name: string;
5604
+ last_name: string;
5605
+ password_policy_compliant: boolean;
5606
+ user_id: string;
5607
+ }[];
5608
+ };
4867
5609
  check_revert_to_builtin_version: {
4868
5610
  Args: {
4869
5611
  appid: string;
@@ -4874,10 +5616,22 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4874
5616
  Args: never;
4875
5617
  Returns: undefined;
4876
5618
  };
5619
+ cleanup_job_run_details_7days: {
5620
+ Args: never;
5621
+ Returns: undefined;
5622
+ };
5623
+ cleanup_old_audit_logs: {
5624
+ Args: never;
5625
+ Returns: undefined;
5626
+ };
4877
5627
  cleanup_queue_messages: {
4878
5628
  Args: never;
4879
5629
  Returns: undefined;
4880
5630
  };
5631
+ cleanup_webhook_deliveries: {
5632
+ Args: never;
5633
+ Returns: undefined;
5634
+ };
4881
5635
  convert_bytes_to_gb: {
4882
5636
  Args: {
4883
5637
  bytes_value: number;
@@ -5086,14 +5840,6 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5086
5840
  subscription_anchor_start: string;
5087
5841
  }[];
5088
5842
  };
5089
- get_d1_sync_url: {
5090
- Args: never;
5091
- Returns: string;
5092
- };
5093
- get_d1_webhook_signature: {
5094
- Args: never;
5095
- Returns: string;
5096
- };
5097
5843
  get_db_url: {
5098
5844
  Args: never;
5099
5845
  Returns: string;
@@ -5318,6 +6064,69 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5318
6064
  trial_left: number;
5319
6065
  }[];
5320
6066
  };
6067
+ get_orgs_v7: {
6068
+ Args: never;
6069
+ Returns: {
6070
+ "2fa_has_access": boolean;
6071
+ app_count: number;
6072
+ can_use_more: boolean;
6073
+ created_by: string;
6074
+ credit_available: number;
6075
+ credit_next_expiration: string;
6076
+ credit_total: number;
6077
+ enforcing_2fa: boolean;
6078
+ gid: string;
6079
+ is_canceled: boolean;
6080
+ is_yearly: boolean;
6081
+ logo: string;
6082
+ management_email: string;
6083
+ name: string;
6084
+ next_stats_update_at: string;
6085
+ password_has_access: boolean;
6086
+ password_policy_config: import("../types/supabase.types").Json;
6087
+ paying: boolean;
6088
+ role: string;
6089
+ stats_updated_at: string;
6090
+ subscription_end: string;
6091
+ subscription_start: string;
6092
+ trial_left: number;
6093
+ }[];
6094
+ } | {
6095
+ Args: {
6096
+ userid: string;
6097
+ };
6098
+ Returns: {
6099
+ "2fa_has_access": boolean;
6100
+ app_count: number;
6101
+ can_use_more: boolean;
6102
+ created_by: string;
6103
+ credit_available: number;
6104
+ credit_next_expiration: string;
6105
+ credit_total: number;
6106
+ enforcing_2fa: boolean;
6107
+ gid: string;
6108
+ is_canceled: boolean;
6109
+ is_yearly: boolean;
6110
+ logo: string;
6111
+ management_email: string;
6112
+ name: string;
6113
+ next_stats_update_at: string;
6114
+ password_has_access: boolean;
6115
+ password_policy_config: import("../types/supabase.types").Json;
6116
+ paying: boolean;
6117
+ role: string;
6118
+ stats_updated_at: string;
6119
+ subscription_end: string;
6120
+ subscription_start: string;
6121
+ trial_left: number;
6122
+ }[];
6123
+ };
6124
+ get_password_policy_hash: {
6125
+ Args: {
6126
+ policy_config: import("../types/supabase.types").Json;
6127
+ };
6128
+ Returns: string;
6129
+ };
5321
6130
  get_plan_usage_percent_detailed: {
5322
6131
  Args: {
5323
6132
  orgid: string;
@@ -5427,6 +6236,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5427
6236
  Returns: {
5428
6237
  app_id: string;
5429
6238
  checksum: string | null;
6239
+ cli_version: string | null;
5430
6240
  comment: string | null;
5431
6241
  created_at: string | null;
5432
6242
  deleted: boolean;
@@ -5463,6 +6273,15 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5463
6273
  open_app: number;
5464
6274
  }[];
5465
6275
  };
6276
+ has_2fa_enabled: {
6277
+ Args: never;
6278
+ Returns: boolean;
6279
+ } | {
6280
+ Args: {
6281
+ user_id: string;
6282
+ };
6283
+ Returns: boolean;
6284
+ };
5466
6285
  has_app_right: {
5467
6286
  Args: {
5468
6287
  appid: string;
@@ -5721,7 +6540,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5721
6540
  Args: never;
5722
6541
  Returns: undefined;
5723
6542
  };
5724
- process_d1_replication_batch: {
6543
+ process_deploy_install_stats_email: {
5725
6544
  Args: never;
5726
6545
  Returns: undefined;
5727
6546
  };
@@ -5827,6 +6646,32 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5827
6646
  };
5828
6647
  Returns: string;
5829
6648
  };
6649
+ reject_access_due_to_2fa: {
6650
+ Args: {
6651
+ org_id: string;
6652
+ user_id: string;
6653
+ };
6654
+ Returns: boolean;
6655
+ };
6656
+ reject_access_due_to_2fa_for_app: {
6657
+ Args: {
6658
+ app_id: string;
6659
+ };
6660
+ Returns: boolean;
6661
+ };
6662
+ reject_access_due_to_2fa_for_org: {
6663
+ Args: {
6664
+ org_id: string;
6665
+ };
6666
+ Returns: boolean;
6667
+ };
6668
+ reject_access_due_to_password_policy: {
6669
+ Args: {
6670
+ org_id: string;
6671
+ user_id: string;
6672
+ };
6673
+ Returns: boolean;
6674
+ };
5830
6675
  remove_old_jobs: {
5831
6676
  Args: never;
5832
6677
  Returns: undefined;
@@ -5838,6 +6683,43 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5838
6683
  };
5839
6684
  Returns: string;
5840
6685
  };
6686
+ reset_and_seed_app_data: {
6687
+ Args: {
6688
+ p_admin_user_id?: string;
6689
+ p_app_id: string;
6690
+ p_org_id?: string;
6691
+ p_plan_product_id?: string;
6692
+ p_stripe_customer_id?: string;
6693
+ p_user_id?: string;
6694
+ };
6695
+ Returns: undefined;
6696
+ };
6697
+ reset_and_seed_app_stats_data: {
6698
+ Args: {
6699
+ p_app_id: string;
6700
+ };
6701
+ Returns: undefined;
6702
+ };
6703
+ reset_and_seed_data: {
6704
+ Args: never;
6705
+ Returns: undefined;
6706
+ };
6707
+ reset_and_seed_stats_data: {
6708
+ Args: never;
6709
+ Returns: undefined;
6710
+ };
6711
+ reset_app_data: {
6712
+ Args: {
6713
+ p_app_id: string;
6714
+ };
6715
+ Returns: undefined;
6716
+ };
6717
+ reset_app_stats_data: {
6718
+ Args: {
6719
+ p_app_id: string;
6720
+ };
6721
+ Returns: undefined;
6722
+ };
5841
6723
  seed_get_app_metrics_caches: {
5842
6724
  Args: {
5843
6725
  p_end_date: string;
@@ -5939,6 +6821,13 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5939
6821
  };
5940
6822
  Returns: boolean;
5941
6823
  };
6824
+ user_meets_password_policy: {
6825
+ Args: {
6826
+ org_id: string;
6827
+ user_id: string;
6828
+ };
6829
+ Returns: boolean;
6830
+ };
5942
6831
  verify_mfa: {
5943
6832
  Args: never;
5944
6833
  Returns: boolean;
@@ -5948,10 +6837,11 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5948
6837
  action_type: "mau" | "storage" | "bandwidth" | "build_time";
5949
6838
  credit_metric_type: "mau" | "bandwidth" | "storage" | "build_time";
5950
6839
  credit_transaction_type: "grant" | "purchase" | "manual_grant" | "deduction" | "expiry" | "refund";
6840
+ cron_task_type: "function" | "queue" | "function_queue";
5951
6841
  disable_update: "major" | "minor" | "patch" | "version_number" | "none";
5952
6842
  key_mode: "read" | "write" | "all" | "upload";
5953
6843
  platform_os: "ios" | "android";
5954
- stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableProdBuild" | "disableEmulator" | "disableDevice" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "ping" | "InvalidIp" | "blocked_by_server_url" | "download_manifest_start" | "download_manifest_complete" | "download_zip_start" | "download_zip_complete" | "download_manifest_file_fail" | "download_manifest_checksum_fail" | "download_manifest_brotli_fail" | "backend_refusal" | "download_0";
6844
+ stats_action: "delete" | "reset" | "set" | "get" | "set_fail" | "update_fail" | "download_fail" | "windows_path_fail" | "canonical_path_fail" | "directory_path_fail" | "unzip_fail" | "low_mem_fail" | "download_10" | "download_20" | "download_30" | "download_40" | "download_50" | "download_60" | "download_70" | "download_80" | "download_90" | "download_complete" | "decrypt_fail" | "app_moved_to_foreground" | "app_moved_to_background" | "uninstall" | "needPlanUpgrade" | "missingBundle" | "noNew" | "disablePlatformIos" | "disablePlatformAndroid" | "disableAutoUpdateToMajor" | "cannotUpdateViaPrivateChannel" | "disableAutoUpdateToMinor" | "disableAutoUpdateToPatch" | "channelMisconfigured" | "disableAutoUpdateMetadata" | "disableAutoUpdateUnderNative" | "disableDevBuild" | "disableProdBuild" | "disableEmulator" | "disableDevice" | "cannotGetBundle" | "checksum_fail" | "NoChannelOrOverride" | "setChannel" | "getChannel" | "rateLimited" | "disableAutoUpdate" | "keyMismatch" | "ping" | "InvalidIp" | "blocked_by_server_url" | "download_manifest_start" | "download_manifest_complete" | "download_zip_start" | "download_zip_complete" | "download_manifest_file_fail" | "download_manifest_checksum_fail" | "download_manifest_brotli_fail" | "backend_refusal" | "download_0";
5955
6845
  stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
5956
6846
  user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
5957
6847
  user_role: "read" | "upload" | "write" | "admin";
@@ -6042,4 +6932,3 @@ export interface Channel {
6042
6932
  export declare function displayChannels(data: Channel[], silent?: boolean): void;
6043
6933
  export declare function getActiveChannels(supabase: SupabaseClient<Database>, appid: string, silent?: boolean): Promise<Channel[]>;
6044
6934
  export {};
6045
- //# sourceMappingURL=channels.d.ts.map