@capgo/cli 7.63.0 → 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 +131 -14
  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/{organisation → organization}/add.d.ts +3 -1
  45. package/dist/src/{organisation → organization}/delete.d.ts +0 -1
  46. package/dist/src/{organisation → organization}/index.d.ts +1 -1
  47. package/dist/src/{organisation → organization}/list.d.ts +4 -1
  48. package/dist/src/organization/members.d.ts +11 -0
  49. package/dist/src/{organisation → 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/organisation/add.d.ts.map +0 -1
  100. package/dist/src/organisation/delete.d.ts.map +0 -1
  101. package/dist/src/organisation/index.d.ts.map +0 -1
  102. package/dist/src/organisation/list.d.ts.map +0 -1
  103. package/dist/src/organisation/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
@@ -19,9 +19,14 @@ export declare const MAX_UPLOAD_LENGTH_BYTES: number;
19
19
  export declare const MAX_CHUNK_SIZE_BYTES: number;
20
20
  export declare const PACKNAME = "package.json";
21
21
  export type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
22
- export type Organization = ArrayElement<Database['public']['Functions']['get_orgs_v6']['Returns']>;
22
+ export type Organization = ArrayElement<Database['public']['Functions']['get_orgs_v7']['Returns']>;
23
23
  export declare const regexSemver: RegExp;
24
- export declare const formatError: (error: any) => string;
24
+ /**
25
+ * Format an error for display. If it's a security policy error,
26
+ * returns a human-readable message with actionable steps.
27
+ */
28
+ export declare function formatError(error: any): string;
29
+ export declare function check2FAAccessForOrg(supabase: SupabaseClient<Database>, orgId: string, silent?: boolean): Promise<void>;
25
30
  type TagKey = Lowercase<string>;
26
31
  /** Tag Type */
27
32
  type Tags = Record<TagKey, string | number | boolean>;
@@ -396,6 +401,57 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
396
401
  referencedColumns: ["id"];
397
402
  }];
398
403
  };
404
+ audit_logs: {
405
+ Row: {
406
+ changed_fields: string[] | null;
407
+ created_at: string;
408
+ id: number;
409
+ new_record: import("./types/supabase.types").Json | null;
410
+ old_record: import("./types/supabase.types").Json | null;
411
+ operation: string;
412
+ org_id: string;
413
+ record_id: string;
414
+ table_name: string;
415
+ user_id: string | null;
416
+ };
417
+ Insert: {
418
+ changed_fields?: string[] | null;
419
+ created_at?: string;
420
+ id?: number;
421
+ new_record?: import("./types/supabase.types").Json | null;
422
+ old_record?: import("./types/supabase.types").Json | null;
423
+ operation: string;
424
+ org_id: string;
425
+ record_id: string;
426
+ table_name: string;
427
+ user_id?: string | null;
428
+ };
429
+ Update: {
430
+ changed_fields?: string[] | null;
431
+ created_at?: string;
432
+ id?: number;
433
+ new_record?: import("./types/supabase.types").Json | null;
434
+ old_record?: import("./types/supabase.types").Json | null;
435
+ operation?: string;
436
+ org_id?: string;
437
+ record_id?: string;
438
+ table_name?: string;
439
+ user_id?: string | null;
440
+ };
441
+ Relationships: [{
442
+ foreignKeyName: "audit_logs_org_id_fkey";
443
+ columns: ["org_id"];
444
+ isOneToOne: false;
445
+ referencedRelation: "orgs";
446
+ referencedColumns: ["id"];
447
+ }, {
448
+ foreignKeyName: "audit_logs_user_id_fkey";
449
+ columns: ["user_id"];
450
+ isOneToOne: false;
451
+ referencedRelation: "users";
452
+ referencedColumns: ["id"];
453
+ }];
454
+ };
399
455
  bandwidth_usage: {
400
456
  Row: {
401
457
  app_id: string;
@@ -451,13 +507,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
451
507
  platform?: string;
452
508
  user_id?: string | null;
453
509
  };
454
- Relationships: [{
455
- foreignKeyName: "build_logs_org_id_fkey";
456
- columns: ["org_id"];
457
- isOneToOne: false;
458
- referencedRelation: "orgs";
459
- referencedColumns: ["id"];
460
- }];
510
+ Relationships: [];
461
511
  };
462
512
  build_requests: {
463
513
  Row: {
@@ -699,6 +749,69 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
699
749
  referencedColumns: ["id"];
700
750
  }];
701
751
  };
752
+ cron_tasks: {
753
+ Row: {
754
+ batch_size: number | null;
755
+ created_at: string;
756
+ description: string | null;
757
+ enabled: boolean;
758
+ hour_interval: number | null;
759
+ id: number;
760
+ minute_interval: number | null;
761
+ name: string;
762
+ payload: import("./types/supabase.types").Json | null;
763
+ run_at_hour: number | null;
764
+ run_at_minute: number | null;
765
+ run_at_second: number | null;
766
+ run_on_day: number | null;
767
+ run_on_dow: number | null;
768
+ second_interval: number | null;
769
+ target: string;
770
+ task_type: Database["public"]["Enums"]["cron_task_type"];
771
+ updated_at: string;
772
+ };
773
+ Insert: {
774
+ batch_size?: number | null;
775
+ created_at?: string;
776
+ description?: string | null;
777
+ enabled?: boolean;
778
+ hour_interval?: number | null;
779
+ id?: number;
780
+ minute_interval?: number | null;
781
+ name: string;
782
+ payload?: import("./types/supabase.types").Json | null;
783
+ run_at_hour?: number | null;
784
+ run_at_minute?: number | null;
785
+ run_at_second?: number | null;
786
+ run_on_day?: number | null;
787
+ run_on_dow?: number | null;
788
+ second_interval?: number | null;
789
+ target: string;
790
+ task_type?: Database["public"]["Enums"]["cron_task_type"];
791
+ updated_at?: string;
792
+ };
793
+ Update: {
794
+ batch_size?: number | null;
795
+ created_at?: string;
796
+ description?: string | null;
797
+ enabled?: boolean;
798
+ hour_interval?: number | null;
799
+ id?: number;
800
+ minute_interval?: number | null;
801
+ name?: string;
802
+ payload?: import("./types/supabase.types").Json | null;
803
+ run_at_hour?: number | null;
804
+ run_at_minute?: number | null;
805
+ run_at_second?: number | null;
806
+ run_on_day?: number | null;
807
+ run_on_dow?: number | null;
808
+ second_interval?: number | null;
809
+ target?: string;
810
+ task_type?: Database["public"]["Enums"]["cron_task_type"];
811
+ updated_at?: string;
812
+ };
813
+ Relationships: [];
814
+ };
702
815
  daily_bandwidth: {
703
816
  Row: {
704
817
  app_id: string;
@@ -869,6 +982,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
869
982
  created_by: string;
870
983
  deployed_at: string | null;
871
984
  id: number;
985
+ install_stats_email_sent_at: string | null;
872
986
  owner_org: string;
873
987
  updated_at: string | null;
874
988
  version_id: number;
@@ -880,6 +994,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
880
994
  created_by: string;
881
995
  deployed_at?: string | null;
882
996
  id?: number;
997
+ install_stats_email_sent_at?: string | null;
883
998
  owner_org: string;
884
999
  updated_at?: string | null;
885
1000
  version_id: number;
@@ -891,6 +1006,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
891
1006
  created_by?: string;
892
1007
  deployed_at?: string | null;
893
1008
  id?: number;
1009
+ install_stats_email_sent_at?: string | null;
894
1010
  owner_org?: string;
895
1011
  updated_at?: string | null;
896
1012
  version_id?: number;
@@ -1010,7 +1126,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1010
1126
  credits_consumed: number;
1011
1127
  date_id: string;
1012
1128
  devices_last_month: number | null;
1013
- mrrr: number;
1129
+ mrr: number;
1014
1130
  need_upgrade: number | null;
1015
1131
  new_paying_orgs: number;
1016
1132
  not_paying: number | null;
@@ -1018,7 +1134,6 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1018
1134
  paying: number | null;
1019
1135
  paying_monthly: number | null;
1020
1136
  paying_yearly: number | null;
1021
- plan_enterprise: number | null;
1022
1137
  plan_enterprise_monthly: number;
1023
1138
  plan_enterprise_yearly: number;
1024
1139
  plan_maker: number | null;
@@ -1055,7 +1170,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1055
1170
  credits_consumed?: number;
1056
1171
  date_id: string;
1057
1172
  devices_last_month?: number | null;
1058
- mrrr?: number;
1173
+ mrr?: number;
1059
1174
  need_upgrade?: number | null;
1060
1175
  new_paying_orgs?: number;
1061
1176
  not_paying?: number | null;
@@ -1063,7 +1178,6 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1063
1178
  paying?: number | null;
1064
1179
  paying_monthly?: number | null;
1065
1180
  paying_yearly?: number | null;
1066
- plan_enterprise?: number | null;
1067
1181
  plan_enterprise_monthly?: number;
1068
1182
  plan_enterprise_yearly?: number;
1069
1183
  plan_maker?: number | null;
@@ -1100,7 +1214,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1100
1214
  credits_consumed?: number;
1101
1215
  date_id?: string;
1102
1216
  devices_last_month?: number | null;
1103
- mrrr?: number;
1217
+ mrr?: number;
1104
1218
  need_upgrade?: number | null;
1105
1219
  new_paying_orgs?: number;
1106
1220
  not_paying?: number | null;
@@ -1108,7 +1222,6 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1108
1222
  paying?: number | null;
1109
1223
  paying_monthly?: number | null;
1110
1224
  paying_yearly?: number | null;
1111
- plan_enterprise?: number | null;
1112
1225
  plan_enterprise_monthly?: number;
1113
1226
  plan_enterprise_yearly?: number;
1114
1227
  plan_maker?: number | null;
@@ -1268,11 +1381,14 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1268
1381
  created_at: string | null;
1269
1382
  created_by: string;
1270
1383
  customer_id: string | null;
1384
+ email_preferences: import("./types/supabase.types").Json;
1385
+ enforcing_2fa: boolean;
1271
1386
  id: string;
1272
1387
  last_stats_updated_at: string | null;
1273
1388
  logo: string | null;
1274
1389
  management_email: string;
1275
1390
  name: string;
1391
+ password_policy_config: import("./types/supabase.types").Json | null;
1276
1392
  stats_updated_at: string | null;
1277
1393
  updated_at: string | null;
1278
1394
  };
@@ -1280,11 +1396,14 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1280
1396
  created_at?: string | null;
1281
1397
  created_by: string;
1282
1398
  customer_id?: string | null;
1399
+ email_preferences?: import("./types/supabase.types").Json;
1400
+ enforcing_2fa?: boolean;
1283
1401
  id?: string;
1284
1402
  last_stats_updated_at?: string | null;
1285
1403
  logo?: string | null;
1286
1404
  management_email: string;
1287
1405
  name: string;
1406
+ password_policy_config?: import("./types/supabase.types").Json | null;
1288
1407
  stats_updated_at?: string | null;
1289
1408
  updated_at?: string | null;
1290
1409
  };
@@ -1292,11 +1411,14 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1292
1411
  created_at?: string | null;
1293
1412
  created_by?: string;
1294
1413
  customer_id?: string | null;
1414
+ email_preferences?: import("./types/supabase.types").Json;
1415
+ enforcing_2fa?: boolean;
1295
1416
  id?: string;
1296
1417
  last_stats_updated_at?: string | null;
1297
1418
  logo?: string | null;
1298
1419
  management_email?: string;
1299
1420
  name?: string;
1421
+ password_policy_config?: import("./types/supabase.types").Json | null;
1300
1422
  stats_updated_at?: string | null;
1301
1423
  updated_at?: string | null;
1302
1424
  };
@@ -1767,12 +1889,49 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1767
1889
  referencedColumns: ["id"];
1768
1890
  }];
1769
1891
  };
1892
+ user_password_compliance: {
1893
+ Row: {
1894
+ created_at: string;
1895
+ id: number;
1896
+ org_id: string;
1897
+ policy_hash: string;
1898
+ updated_at: string;
1899
+ user_id: string;
1900
+ validated_at: string;
1901
+ };
1902
+ Insert: {
1903
+ created_at?: string;
1904
+ id?: number;
1905
+ org_id: string;
1906
+ policy_hash: string;
1907
+ updated_at?: string;
1908
+ user_id: string;
1909
+ validated_at?: string;
1910
+ };
1911
+ Update: {
1912
+ created_at?: string;
1913
+ id?: number;
1914
+ org_id?: string;
1915
+ policy_hash?: string;
1916
+ updated_at?: string;
1917
+ user_id?: string;
1918
+ validated_at?: string;
1919
+ };
1920
+ Relationships: [{
1921
+ foreignKeyName: "user_password_compliance_org_id_fkey";
1922
+ columns: ["org_id"];
1923
+ isOneToOne: false;
1924
+ referencedRelation: "orgs";
1925
+ referencedColumns: ["id"];
1926
+ }];
1927
+ };
1770
1928
  users: {
1771
1929
  Row: {
1772
1930
  ban_time: string | null;
1773
1931
  country: string | null;
1774
1932
  created_at: string | null;
1775
1933
  email: string;
1934
+ email_preferences: import("./types/supabase.types").Json;
1776
1935
  enable_notifications: boolean;
1777
1936
  first_name: string | null;
1778
1937
  id: string;
@@ -1786,6 +1945,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1786
1945
  country?: string | null;
1787
1946
  created_at?: string | null;
1788
1947
  email: string;
1948
+ email_preferences?: import("./types/supabase.types").Json;
1789
1949
  enable_notifications?: boolean;
1790
1950
  first_name?: string | null;
1791
1951
  id: string;
@@ -1799,6 +1959,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1799
1959
  country?: string | null;
1800
1960
  created_at?: string | null;
1801
1961
  email?: string;
1962
+ email_preferences?: import("./types/supabase.types").Json;
1802
1963
  enable_notifications?: boolean;
1803
1964
  first_name?: string | null;
1804
1965
  id?: string;
@@ -1851,6 +2012,126 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1851
2012
  };
1852
2013
  Relationships: [];
1853
2014
  };
2015
+ webhook_deliveries: {
2016
+ Row: {
2017
+ attempt_count: number;
2018
+ audit_log_id: number | null;
2019
+ completed_at: string | null;
2020
+ created_at: string;
2021
+ duration_ms: number | null;
2022
+ event_type: string;
2023
+ id: string;
2024
+ max_attempts: number;
2025
+ next_retry_at: string | null;
2026
+ org_id: string;
2027
+ request_payload: import("./types/supabase.types").Json;
2028
+ response_body: string | null;
2029
+ response_headers: import("./types/supabase.types").Json | null;
2030
+ response_status: number | null;
2031
+ status: string;
2032
+ webhook_id: string;
2033
+ };
2034
+ Insert: {
2035
+ attempt_count?: number;
2036
+ audit_log_id?: number | null;
2037
+ completed_at?: string | null;
2038
+ created_at?: string;
2039
+ duration_ms?: number | null;
2040
+ event_type: string;
2041
+ id?: string;
2042
+ max_attempts?: number;
2043
+ next_retry_at?: string | null;
2044
+ org_id: string;
2045
+ request_payload: import("./types/supabase.types").Json;
2046
+ response_body?: string | null;
2047
+ response_headers?: import("./types/supabase.types").Json | null;
2048
+ response_status?: number | null;
2049
+ status?: string;
2050
+ webhook_id: string;
2051
+ };
2052
+ Update: {
2053
+ attempt_count?: number;
2054
+ audit_log_id?: number | null;
2055
+ completed_at?: string | null;
2056
+ created_at?: string;
2057
+ duration_ms?: number | null;
2058
+ event_type?: string;
2059
+ id?: string;
2060
+ max_attempts?: number;
2061
+ next_retry_at?: string | null;
2062
+ org_id?: string;
2063
+ request_payload?: import("./types/supabase.types").Json;
2064
+ response_body?: string | null;
2065
+ response_headers?: import("./types/supabase.types").Json | null;
2066
+ response_status?: number | null;
2067
+ status?: string;
2068
+ webhook_id?: string;
2069
+ };
2070
+ Relationships: [{
2071
+ foreignKeyName: "webhook_deliveries_org_id_fkey";
2072
+ columns: ["org_id"];
2073
+ isOneToOne: false;
2074
+ referencedRelation: "orgs";
2075
+ referencedColumns: ["id"];
2076
+ }, {
2077
+ foreignKeyName: "webhook_deliveries_webhook_id_fkey";
2078
+ columns: ["webhook_id"];
2079
+ isOneToOne: false;
2080
+ referencedRelation: "webhooks";
2081
+ referencedColumns: ["id"];
2082
+ }];
2083
+ };
2084
+ webhooks: {
2085
+ Row: {
2086
+ created_at: string;
2087
+ created_by: string | null;
2088
+ enabled: boolean;
2089
+ events: string[];
2090
+ id: string;
2091
+ name: string;
2092
+ org_id: string;
2093
+ secret: string;
2094
+ updated_at: string;
2095
+ url: string;
2096
+ };
2097
+ Insert: {
2098
+ created_at?: string;
2099
+ created_by?: string | null;
2100
+ enabled?: boolean;
2101
+ events: string[];
2102
+ id?: string;
2103
+ name: string;
2104
+ org_id: string;
2105
+ secret?: string;
2106
+ updated_at?: string;
2107
+ url: string;
2108
+ };
2109
+ Update: {
2110
+ created_at?: string;
2111
+ created_by?: string | null;
2112
+ enabled?: boolean;
2113
+ events?: string[];
2114
+ id?: string;
2115
+ name?: string;
2116
+ org_id?: string;
2117
+ secret?: string;
2118
+ updated_at?: string;
2119
+ url?: string;
2120
+ };
2121
+ Relationships: [{
2122
+ foreignKeyName: "webhooks_created_by_fkey";
2123
+ columns: ["created_by"];
2124
+ isOneToOne: false;
2125
+ referencedRelation: "users";
2126
+ referencedColumns: ["id"];
2127
+ }, {
2128
+ foreignKeyName: "webhooks_org_id_fkey";
2129
+ columns: ["org_id"];
2130
+ isOneToOne: false;
2131
+ referencedRelation: "orgs";
2132
+ referencedColumns: ["id"];
2133
+ }];
2134
+ };
1854
2135
  };
1855
2136
  Views: {
1856
2137
  usage_credit_balances: {
@@ -1945,6 +2226,27 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1945
2226
  };
1946
2227
  Returns: boolean;
1947
2228
  };
2229
+ check_org_members_2fa_enabled: {
2230
+ Args: {
2231
+ org_id: string;
2232
+ };
2233
+ Returns: {
2234
+ "2fa_enabled": boolean;
2235
+ user_id: string;
2236
+ }[];
2237
+ };
2238
+ check_org_members_password_policy: {
2239
+ Args: {
2240
+ org_id: string;
2241
+ };
2242
+ Returns: {
2243
+ email: string;
2244
+ first_name: string;
2245
+ last_name: string;
2246
+ password_policy_compliant: boolean;
2247
+ user_id: string;
2248
+ }[];
2249
+ };
1948
2250
  check_revert_to_builtin_version: {
1949
2251
  Args: {
1950
2252
  appid: string;
@@ -1955,10 +2257,22 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
1955
2257
  Args: never;
1956
2258
  Returns: undefined;
1957
2259
  };
2260
+ cleanup_job_run_details_7days: {
2261
+ Args: never;
2262
+ Returns: undefined;
2263
+ };
2264
+ cleanup_old_audit_logs: {
2265
+ Args: never;
2266
+ Returns: undefined;
2267
+ };
1958
2268
  cleanup_queue_messages: {
1959
2269
  Args: never;
1960
2270
  Returns: undefined;
1961
2271
  };
2272
+ cleanup_webhook_deliveries: {
2273
+ Args: never;
2274
+ Returns: undefined;
2275
+ };
1962
2276
  convert_bytes_to_gb: {
1963
2277
  Args: {
1964
2278
  bytes_value: number;
@@ -2167,14 +2481,6 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2167
2481
  subscription_anchor_start: string;
2168
2482
  }[];
2169
2483
  };
2170
- get_d1_sync_url: {
2171
- Args: never;
2172
- Returns: string;
2173
- };
2174
- get_d1_webhook_signature: {
2175
- Args: never;
2176
- Returns: string;
2177
- };
2178
2484
  get_db_url: {
2179
2485
  Args: never;
2180
2486
  Returns: string;
@@ -2399,6 +2705,69 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2399
2705
  trial_left: number;
2400
2706
  }[];
2401
2707
  };
2708
+ get_orgs_v7: {
2709
+ Args: never;
2710
+ Returns: {
2711
+ "2fa_has_access": boolean;
2712
+ app_count: number;
2713
+ can_use_more: boolean;
2714
+ created_by: string;
2715
+ credit_available: number;
2716
+ credit_next_expiration: string;
2717
+ credit_total: number;
2718
+ enforcing_2fa: boolean;
2719
+ gid: string;
2720
+ is_canceled: boolean;
2721
+ is_yearly: boolean;
2722
+ logo: string;
2723
+ management_email: string;
2724
+ name: string;
2725
+ next_stats_update_at: string;
2726
+ password_has_access: boolean;
2727
+ password_policy_config: import("./types/supabase.types").Json;
2728
+ paying: boolean;
2729
+ role: string;
2730
+ stats_updated_at: string;
2731
+ subscription_end: string;
2732
+ subscription_start: string;
2733
+ trial_left: number;
2734
+ }[];
2735
+ } | {
2736
+ Args: {
2737
+ userid: string;
2738
+ };
2739
+ Returns: {
2740
+ "2fa_has_access": boolean;
2741
+ app_count: number;
2742
+ can_use_more: boolean;
2743
+ created_by: string;
2744
+ credit_available: number;
2745
+ credit_next_expiration: string;
2746
+ credit_total: number;
2747
+ enforcing_2fa: boolean;
2748
+ gid: string;
2749
+ is_canceled: boolean;
2750
+ is_yearly: boolean;
2751
+ logo: string;
2752
+ management_email: string;
2753
+ name: string;
2754
+ next_stats_update_at: string;
2755
+ password_has_access: boolean;
2756
+ password_policy_config: import("./types/supabase.types").Json;
2757
+ paying: boolean;
2758
+ role: string;
2759
+ stats_updated_at: string;
2760
+ subscription_end: string;
2761
+ subscription_start: string;
2762
+ trial_left: number;
2763
+ }[];
2764
+ };
2765
+ get_password_policy_hash: {
2766
+ Args: {
2767
+ policy_config: import("./types/supabase.types").Json;
2768
+ };
2769
+ Returns: string;
2770
+ };
2402
2771
  get_plan_usage_percent_detailed: {
2403
2772
  Args: {
2404
2773
  orgid: string;
@@ -2508,6 +2877,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2508
2877
  Returns: {
2509
2878
  app_id: string;
2510
2879
  checksum: string | null;
2880
+ cli_version: string | null;
2511
2881
  comment: string | null;
2512
2882
  created_at: string | null;
2513
2883
  deleted: boolean;
@@ -2544,6 +2914,15 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2544
2914
  open_app: number;
2545
2915
  }[];
2546
2916
  };
2917
+ has_2fa_enabled: {
2918
+ Args: never;
2919
+ Returns: boolean;
2920
+ } | {
2921
+ Args: {
2922
+ user_id: string;
2923
+ };
2924
+ Returns: boolean;
2925
+ };
2547
2926
  has_app_right: {
2548
2927
  Args: {
2549
2928
  appid: string;
@@ -2802,7 +3181,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2802
3181
  Args: never;
2803
3182
  Returns: undefined;
2804
3183
  };
2805
- process_d1_replication_batch: {
3184
+ process_deploy_install_stats_email: {
2806
3185
  Args: never;
2807
3186
  Returns: undefined;
2808
3187
  };
@@ -2908,6 +3287,32 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2908
3287
  };
2909
3288
  Returns: string;
2910
3289
  };
3290
+ reject_access_due_to_2fa: {
3291
+ Args: {
3292
+ org_id: string;
3293
+ user_id: string;
3294
+ };
3295
+ Returns: boolean;
3296
+ };
3297
+ reject_access_due_to_2fa_for_app: {
3298
+ Args: {
3299
+ app_id: string;
3300
+ };
3301
+ Returns: boolean;
3302
+ };
3303
+ reject_access_due_to_2fa_for_org: {
3304
+ Args: {
3305
+ org_id: string;
3306
+ };
3307
+ Returns: boolean;
3308
+ };
3309
+ reject_access_due_to_password_policy: {
3310
+ Args: {
3311
+ org_id: string;
3312
+ user_id: string;
3313
+ };
3314
+ Returns: boolean;
3315
+ };
2911
3316
  remove_old_jobs: {
2912
3317
  Args: never;
2913
3318
  Returns: undefined;
@@ -2919,6 +3324,43 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
2919
3324
  };
2920
3325
  Returns: string;
2921
3326
  };
3327
+ reset_and_seed_app_data: {
3328
+ Args: {
3329
+ p_admin_user_id?: string;
3330
+ p_app_id: string;
3331
+ p_org_id?: string;
3332
+ p_plan_product_id?: string;
3333
+ p_stripe_customer_id?: string;
3334
+ p_user_id?: string;
3335
+ };
3336
+ Returns: undefined;
3337
+ };
3338
+ reset_and_seed_app_stats_data: {
3339
+ Args: {
3340
+ p_app_id: string;
3341
+ };
3342
+ Returns: undefined;
3343
+ };
3344
+ reset_and_seed_data: {
3345
+ Args: never;
3346
+ Returns: undefined;
3347
+ };
3348
+ reset_and_seed_stats_data: {
3349
+ Args: never;
3350
+ Returns: undefined;
3351
+ };
3352
+ reset_app_data: {
3353
+ Args: {
3354
+ p_app_id: string;
3355
+ };
3356
+ Returns: undefined;
3357
+ };
3358
+ reset_app_stats_data: {
3359
+ Args: {
3360
+ p_app_id: string;
3361
+ };
3362
+ Returns: undefined;
3363
+ };
2922
3364
  seed_get_app_metrics_caches: {
2923
3365
  Args: {
2924
3366
  p_end_date: string;
@@ -3020,6 +3462,13 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
3020
3462
  };
3021
3463
  Returns: boolean;
3022
3464
  };
3465
+ user_meets_password_policy: {
3466
+ Args: {
3467
+ org_id: string;
3468
+ user_id: string;
3469
+ };
3470
+ Returns: boolean;
3471
+ };
3023
3472
  verify_mfa: {
3024
3473
  Args: never;
3025
3474
  Returns: boolean;
@@ -3029,10 +3478,11 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
3029
3478
  action_type: "mau" | "storage" | "bandwidth" | "build_time";
3030
3479
  credit_metric_type: "mau" | "bandwidth" | "storage" | "build_time";
3031
3480
  credit_transaction_type: "grant" | "purchase" | "manual_grant" | "deduction" | "expiry" | "refund";
3481
+ cron_task_type: "function" | "queue" | "function_queue";
3032
3482
  disable_update: "major" | "minor" | "patch" | "version_number" | "none";
3033
3483
  key_mode: "read" | "write" | "all" | "upload";
3034
3484
  platform_os: "ios" | "android";
3035
- 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";
3485
+ 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";
3036
3486
  stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
3037
3487
  user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
3038
3488
  user_role: "read" | "upload" | "write" | "admin";
@@ -3071,7 +3521,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
3071
3521
  };
3072
3522
  };
3073
3523
  }, {
3074
- PostgrestVersion: "13.0.5";
3524
+ PostgrestVersion: "12";
3075
3525
  }>>;
3076
3526
  export declare function checkKey(supabase: SupabaseClient<Database>, apikey: string, keymode: Database['public']['Enums']['key_mode'][]): Promise<void>;
3077
3527
  export declare function isPayingOrg(supabase: SupabaseClient<Database>, orgId: string): Promise<boolean>;
@@ -3147,6 +3597,7 @@ export declare function updateOrCreateChannel(supabase: SupabaseClient<Database>
3147
3597
  version: number;
3148
3598
  }>>;
3149
3599
  export declare function sendEvent(capgkey: string, payload: TrackOptions, verbose?: boolean): Promise<void>;
3600
+ export declare function show2FADeniedError(organizationName?: string): never;
3150
3601
  export declare function getOrganization(supabase: SupabaseClient<Database>, roles: string[]): Promise<Organization>;
3151
3602
  export declare function verifyUser(supabase: SupabaseClient<Database>, apikey: string, keymod?: Database['public']['Enums']['key_mode'][]): Promise<string>;
3152
3603
  export declare function getOrganizationId(supabase: SupabaseClient<Database>, appId: string): Promise<string>;
@@ -3215,4 +3666,3 @@ export declare function checkCompatibilityNativePackages(supabase: SupabaseClien
3215
3666
  }>;
3216
3667
  export declare function promptAndSyncCapacitor(isInit?: boolean, orgId?: string, apikey?: string): Promise<void>;
3217
3668
  export {};
3218
- //# sourceMappingURL=utils.d.ts.map