@capgo/cli 7.64.0 → 7.65.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.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "7.64.0",
3
+ "version": "7.65.0",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "author": "Martin martin@capgo.app",
6
6
  "license": "Apache 2.0",
@@ -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: "12";
15
+ PostgrestVersion: "14.1";
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: "12";
37
+ PostgrestVersion: "14.1";
38
38
  }, never, false>;
39
39
  export declare function findChannel(supabase: SupabaseClient<Database>, appId: string, name: string): import("@supabase/postgrest-js").PostgrestBuilder<{
40
- PostgrestVersion: "12";
40
+ PostgrestVersion: "14.1";
41
41
  }, {
42
42
  allow_dev: boolean;
43
43
  allow_device: boolean;
@@ -59,14 +59,16 @@ 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: "12";
62
+ PostgrestVersion: "14.1";
63
63
  }, {
64
64
  Tables: {
65
65
  apikeys: {
66
66
  Row: {
67
67
  created_at: string | null;
68
+ expires_at: string | null;
68
69
  id: number;
69
- key: string;
70
+ key: string | null;
71
+ key_hash: string | null;
70
72
  limited_to_apps: string[] | null;
71
73
  limited_to_orgs: string[] | null;
72
74
  mode: Database["public"]["Enums"]["key_mode"];
@@ -76,8 +78,10 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
76
78
  };
77
79
  Insert: {
78
80
  created_at?: string | null;
81
+ expires_at?: string | null;
79
82
  id?: number;
80
- key: string;
83
+ key?: string | null;
84
+ key_hash?: string | null;
81
85
  limited_to_apps?: string[] | null;
82
86
  limited_to_orgs?: string[] | null;
83
87
  mode: Database["public"]["Enums"]["key_mode"];
@@ -87,8 +91,10 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
87
91
  };
88
92
  Update: {
89
93
  created_at?: string | null;
94
+ expires_at?: string | null;
90
95
  id?: number;
91
- key?: string;
96
+ key?: string | null;
97
+ key_hash?: string | null;
92
98
  limited_to_apps?: string[] | null;
93
99
  limited_to_orgs?: string[] | null;
94
100
  mode?: Database["public"]["Enums"]["key_mode"];
@@ -441,7 +447,13 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
441
447
  platform?: string;
442
448
  user_id?: string | null;
443
449
  };
444
- Relationships: [];
450
+ Relationships: [{
451
+ foreignKeyName: "build_logs_org_id_fkey";
452
+ columns: ["org_id"];
453
+ isOneToOne: false;
454
+ referencedRelation: "orgs";
455
+ referencedColumns: ["id"];
456
+ }];
445
457
  };
446
458
  build_requests: {
447
459
  Row: {
@@ -1068,6 +1080,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1068
1080
  paying: number | null;
1069
1081
  paying_monthly: number | null;
1070
1082
  paying_yearly: number | null;
1083
+ plan_enterprise: number | null;
1071
1084
  plan_enterprise_monthly: number;
1072
1085
  plan_enterprise_yearly: number;
1073
1086
  plan_maker: number | null;
@@ -1112,6 +1125,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1112
1125
  paying?: number | null;
1113
1126
  paying_monthly?: number | null;
1114
1127
  paying_yearly?: number | null;
1128
+ plan_enterprise?: number | null;
1115
1129
  plan_enterprise_monthly?: number;
1116
1130
  plan_enterprise_yearly?: number;
1117
1131
  plan_maker?: number | null;
@@ -1156,6 +1170,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1156
1170
  paying?: number | null;
1157
1171
  paying_monthly?: number | null;
1158
1172
  paying_yearly?: number | null;
1173
+ plan_enterprise?: number | null;
1159
1174
  plan_enterprise_monthly?: number;
1160
1175
  plan_enterprise_yearly?: number;
1161
1176
  plan_maker?: number | null;
@@ -1316,13 +1331,16 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1316
1331
  created_by: string;
1317
1332
  customer_id: string | null;
1318
1333
  email_preferences: import("../types/supabase.types").Json;
1334
+ enforce_hashed_api_keys: boolean;
1319
1335
  enforcing_2fa: boolean;
1320
1336
  id: string;
1321
1337
  last_stats_updated_at: string | null;
1322
1338
  logo: string | null;
1323
1339
  management_email: string;
1340
+ max_apikey_expiration_days: number | null;
1324
1341
  name: string;
1325
1342
  password_policy_config: import("../types/supabase.types").Json | null;
1343
+ require_apikey_expiration: boolean;
1326
1344
  stats_updated_at: string | null;
1327
1345
  updated_at: string | null;
1328
1346
  };
@@ -1331,13 +1349,16 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1331
1349
  created_by: string;
1332
1350
  customer_id?: string | null;
1333
1351
  email_preferences?: import("../types/supabase.types").Json;
1352
+ enforce_hashed_api_keys?: boolean;
1334
1353
  enforcing_2fa?: boolean;
1335
1354
  id?: string;
1336
1355
  last_stats_updated_at?: string | null;
1337
1356
  logo?: string | null;
1338
1357
  management_email: string;
1358
+ max_apikey_expiration_days?: number | null;
1339
1359
  name: string;
1340
1360
  password_policy_config?: import("../types/supabase.types").Json | null;
1361
+ require_apikey_expiration?: boolean;
1341
1362
  stats_updated_at?: string | null;
1342
1363
  updated_at?: string | null;
1343
1364
  };
@@ -1346,13 +1367,16 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
1346
1367
  created_by?: string;
1347
1368
  customer_id?: string | null;
1348
1369
  email_preferences?: import("../types/supabase.types").Json;
1370
+ enforce_hashed_api_keys?: boolean;
1349
1371
  enforcing_2fa?: boolean;
1350
1372
  id?: string;
1351
1373
  last_stats_updated_at?: string | null;
1352
1374
  logo?: string | null;
1353
1375
  management_email?: string;
1376
+ max_apikey_expiration_days?: number | null;
1354
1377
  name?: string;
1355
1378
  password_policy_config?: import("../types/supabase.types").Json | null;
1379
+ require_apikey_expiration?: boolean;
1356
1380
  stats_updated_at?: string | null;
1357
1381
  updated_at?: string | null;
1358
1382
  };
@@ -2160,6 +2184,13 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2160
2184
  };
2161
2185
  Returns: boolean;
2162
2186
  };
2187
+ check_org_hashed_key_enforcement: {
2188
+ Args: {
2189
+ apikey_row: Database["public"]["Tables"]["apikeys"]["Row"];
2190
+ org_id: string;
2191
+ };
2192
+ Returns: boolean;
2193
+ };
2163
2194
  check_org_members_2fa_enabled: {
2164
2195
  Args: {
2165
2196
  org_id: string;
@@ -2187,6 +2218,10 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2187
2218
  };
2188
2219
  Returns: number;
2189
2220
  };
2221
+ cleanup_expired_apikeys: {
2222
+ Args: never;
2223
+ Returns: undefined;
2224
+ };
2190
2225
  cleanup_frequent_job_details: {
2191
2226
  Args: never;
2192
2227
  Returns: undefined;
@@ -2304,6 +2339,30 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2304
2339
  Args: never;
2305
2340
  Returns: number;
2306
2341
  };
2342
+ find_apikey_by_value: {
2343
+ Args: {
2344
+ key_value: string;
2345
+ };
2346
+ Returns: {
2347
+ created_at: string | null;
2348
+ expires_at: string | null;
2349
+ id: number;
2350
+ key: string | null;
2351
+ key_hash: string | null;
2352
+ limited_to_apps: string[] | null;
2353
+ limited_to_orgs: string[] | null;
2354
+ mode: Database["public"]["Enums"]["key_mode"];
2355
+ name: string;
2356
+ updated_at: string | null;
2357
+ user_id: string;
2358
+ }[];
2359
+ SetofOptions: {
2360
+ from: "*";
2361
+ to: "apikeys";
2362
+ isOneToOne: false;
2363
+ isSetofReturn: true;
2364
+ };
2365
+ };
2307
2366
  find_best_plan_v3: {
2308
2367
  Args: {
2309
2368
  bandwidth: number;
@@ -2604,9 +2663,11 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2604
2663
  is_yearly: boolean;
2605
2664
  logo: string;
2606
2665
  management_email: string;
2666
+ max_apikey_expiration_days: number;
2607
2667
  name: string;
2608
2668
  next_stats_update_at: string;
2609
2669
  paying: boolean;
2670
+ require_apikey_expiration: boolean;
2610
2671
  role: string;
2611
2672
  stats_updated_at: string;
2612
2673
  subscription_end: string;
@@ -2629,9 +2690,11 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2629
2690
  is_yearly: boolean;
2630
2691
  logo: string;
2631
2692
  management_email: string;
2693
+ max_apikey_expiration_days: number;
2632
2694
  name: string;
2633
2695
  next_stats_update_at: string;
2634
2696
  paying: boolean;
2697
+ require_apikey_expiration: boolean;
2635
2698
  role: string;
2636
2699
  stats_updated_at: string;
2637
2700
  subscription_end: string;
@@ -2649,6 +2712,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2649
2712
  credit_available: number;
2650
2713
  credit_next_expiration: string;
2651
2714
  credit_total: number;
2715
+ enforce_hashed_api_keys: boolean;
2652
2716
  enforcing_2fa: boolean;
2653
2717
  gid: string;
2654
2718
  is_canceled: boolean;
@@ -2678,6 +2742,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2678
2742
  credit_available: number;
2679
2743
  credit_next_expiration: string;
2680
2744
  credit_total: number;
2745
+ enforce_hashed_api_keys: boolean;
2681
2746
  enforcing_2fa: boolean;
2682
2747
  gid: string;
2683
2748
  is_canceled: boolean;
@@ -2938,6 +3003,12 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
2938
3003
  };
2939
3004
  Returns: boolean;
2940
3005
  };
3006
+ is_apikey_expired: {
3007
+ Args: {
3008
+ key_expires_at: string;
3009
+ };
3010
+ Returns: boolean;
3011
+ };
2941
3012
  is_app_owner: {
2942
3013
  Args: {
2943
3014
  apikey: string;
@@ -3101,6 +3172,10 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
3101
3172
  Args: never;
3102
3173
  Returns: undefined;
3103
3174
  };
3175
+ process_billing_period_stats_email: {
3176
+ Args: never;
3177
+ Returns: undefined;
3178
+ };
3104
3179
  process_channel_device_counts_queue: {
3105
3180
  Args: {
3106
3181
  batch_size?: number;
@@ -3258,43 +3333,6 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
3258
3333
  };
3259
3334
  Returns: string;
3260
3335
  };
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
3336
  seed_get_app_metrics_caches: {
3299
3337
  Args: {
3300
3338
  p_end_date: string;
@@ -3403,6 +3441,13 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
3403
3441
  };
3404
3442
  Returns: boolean;
3405
3443
  };
3444
+ verify_api_key_hash: {
3445
+ Args: {
3446
+ plain_key: string;
3447
+ stored_hash: string;
3448
+ };
3449
+ Returns: boolean;
3450
+ };
3406
3451
  verify_mfa: {
3407
3452
  Args: never;
3408
3453
  Returns: boolean;
@@ -3416,7 +3461,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
3416
3461
  disable_update: "major" | "minor" | "patch" | "version_number" | "none";
3417
3462
  key_mode: "read" | "write" | "all" | "upload";
3418
3463
  platform_os: "ios" | "android";
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";
3464
+ 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" | "disableEmulator" | "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" | "disableProdBuild" | "disableDevice";
3420
3465
  stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
3421
3466
  user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
3422
3467
  user_role: "read" | "upload" | "write" | "admin";
@@ -3484,14 +3529,16 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
3484
3529
  referencedColumns: ["id"];
3485
3530
  }], "GET">;
3486
3531
  export declare function delChannelDevices(supabase: SupabaseClient<Database>, appId: string, channelId: number): import("@supabase/postgrest-js").PostgrestFilterBuilder<{
3487
- PostgrestVersion: "12";
3532
+ PostgrestVersion: "14.1";
3488
3533
  }, {
3489
3534
  Tables: {
3490
3535
  apikeys: {
3491
3536
  Row: {
3492
3537
  created_at: string | null;
3538
+ expires_at: string | null;
3493
3539
  id: number;
3494
- key: string;
3540
+ key: string | null;
3541
+ key_hash: string | null;
3495
3542
  limited_to_apps: string[] | null;
3496
3543
  limited_to_orgs: string[] | null;
3497
3544
  mode: Database["public"]["Enums"]["key_mode"];
@@ -3501,8 +3548,10 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3501
3548
  };
3502
3549
  Insert: {
3503
3550
  created_at?: string | null;
3551
+ expires_at?: string | null;
3504
3552
  id?: number;
3505
- key: string;
3553
+ key?: string | null;
3554
+ key_hash?: string | null;
3506
3555
  limited_to_apps?: string[] | null;
3507
3556
  limited_to_orgs?: string[] | null;
3508
3557
  mode: Database["public"]["Enums"]["key_mode"];
@@ -3512,8 +3561,10 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3512
3561
  };
3513
3562
  Update: {
3514
3563
  created_at?: string | null;
3564
+ expires_at?: string | null;
3515
3565
  id?: number;
3516
- key?: string;
3566
+ key?: string | null;
3567
+ key_hash?: string | null;
3517
3568
  limited_to_apps?: string[] | null;
3518
3569
  limited_to_orgs?: string[] | null;
3519
3570
  mode?: Database["public"]["Enums"]["key_mode"];
@@ -3866,7 +3917,13 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
3866
3917
  platform?: string;
3867
3918
  user_id?: string | null;
3868
3919
  };
3869
- Relationships: [];
3920
+ Relationships: [{
3921
+ foreignKeyName: "build_logs_org_id_fkey";
3922
+ columns: ["org_id"];
3923
+ isOneToOne: false;
3924
+ referencedRelation: "orgs";
3925
+ referencedColumns: ["id"];
3926
+ }];
3870
3927
  };
3871
3928
  build_requests: {
3872
3929
  Row: {
@@ -4493,6 +4550,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4493
4550
  paying: number | null;
4494
4551
  paying_monthly: number | null;
4495
4552
  paying_yearly: number | null;
4553
+ plan_enterprise: number | null;
4496
4554
  plan_enterprise_monthly: number;
4497
4555
  plan_enterprise_yearly: number;
4498
4556
  plan_maker: number | null;
@@ -4537,6 +4595,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4537
4595
  paying?: number | null;
4538
4596
  paying_monthly?: number | null;
4539
4597
  paying_yearly?: number | null;
4598
+ plan_enterprise?: number | null;
4540
4599
  plan_enterprise_monthly?: number;
4541
4600
  plan_enterprise_yearly?: number;
4542
4601
  plan_maker?: number | null;
@@ -4581,6 +4640,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4581
4640
  paying?: number | null;
4582
4641
  paying_monthly?: number | null;
4583
4642
  paying_yearly?: number | null;
4643
+ plan_enterprise?: number | null;
4584
4644
  plan_enterprise_monthly?: number;
4585
4645
  plan_enterprise_yearly?: number;
4586
4646
  plan_maker?: number | null;
@@ -4741,13 +4801,16 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4741
4801
  created_by: string;
4742
4802
  customer_id: string | null;
4743
4803
  email_preferences: import("../types/supabase.types").Json;
4804
+ enforce_hashed_api_keys: boolean;
4744
4805
  enforcing_2fa: boolean;
4745
4806
  id: string;
4746
4807
  last_stats_updated_at: string | null;
4747
4808
  logo: string | null;
4748
4809
  management_email: string;
4810
+ max_apikey_expiration_days: number | null;
4749
4811
  name: string;
4750
4812
  password_policy_config: import("../types/supabase.types").Json | null;
4813
+ require_apikey_expiration: boolean;
4751
4814
  stats_updated_at: string | null;
4752
4815
  updated_at: string | null;
4753
4816
  };
@@ -4756,13 +4819,16 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4756
4819
  created_by: string;
4757
4820
  customer_id?: string | null;
4758
4821
  email_preferences?: import("../types/supabase.types").Json;
4822
+ enforce_hashed_api_keys?: boolean;
4759
4823
  enforcing_2fa?: boolean;
4760
4824
  id?: string;
4761
4825
  last_stats_updated_at?: string | null;
4762
4826
  logo?: string | null;
4763
4827
  management_email: string;
4828
+ max_apikey_expiration_days?: number | null;
4764
4829
  name: string;
4765
4830
  password_policy_config?: import("../types/supabase.types").Json | null;
4831
+ require_apikey_expiration?: boolean;
4766
4832
  stats_updated_at?: string | null;
4767
4833
  updated_at?: string | null;
4768
4834
  };
@@ -4771,13 +4837,16 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
4771
4837
  created_by?: string;
4772
4838
  customer_id?: string | null;
4773
4839
  email_preferences?: import("../types/supabase.types").Json;
4840
+ enforce_hashed_api_keys?: boolean;
4774
4841
  enforcing_2fa?: boolean;
4775
4842
  id?: string;
4776
4843
  last_stats_updated_at?: string | null;
4777
4844
  logo?: string | null;
4778
4845
  management_email?: string;
4846
+ max_apikey_expiration_days?: number | null;
4779
4847
  name?: string;
4780
4848
  password_policy_config?: import("../types/supabase.types").Json | null;
4849
+ require_apikey_expiration?: boolean;
4781
4850
  stats_updated_at?: string | null;
4782
4851
  updated_at?: string | null;
4783
4852
  };
@@ -5585,6 +5654,13 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5585
5654
  };
5586
5655
  Returns: boolean;
5587
5656
  };
5657
+ check_org_hashed_key_enforcement: {
5658
+ Args: {
5659
+ apikey_row: Database["public"]["Tables"]["apikeys"]["Row"];
5660
+ org_id: string;
5661
+ };
5662
+ Returns: boolean;
5663
+ };
5588
5664
  check_org_members_2fa_enabled: {
5589
5665
  Args: {
5590
5666
  org_id: string;
@@ -5612,6 +5688,10 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5612
5688
  };
5613
5689
  Returns: number;
5614
5690
  };
5691
+ cleanup_expired_apikeys: {
5692
+ Args: never;
5693
+ Returns: undefined;
5694
+ };
5615
5695
  cleanup_frequent_job_details: {
5616
5696
  Args: never;
5617
5697
  Returns: undefined;
@@ -5729,6 +5809,30 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
5729
5809
  Args: never;
5730
5810
  Returns: number;
5731
5811
  };
5812
+ find_apikey_by_value: {
5813
+ Args: {
5814
+ key_value: string;
5815
+ };
5816
+ Returns: {
5817
+ created_at: string | null;
5818
+ expires_at: string | null;
5819
+ id: number;
5820
+ key: string | null;
5821
+ key_hash: string | null;
5822
+ limited_to_apps: string[] | null;
5823
+ limited_to_orgs: string[] | null;
5824
+ mode: Database["public"]["Enums"]["key_mode"];
5825
+ name: string;
5826
+ updated_at: string | null;
5827
+ user_id: string;
5828
+ }[];
5829
+ SetofOptions: {
5830
+ from: "*";
5831
+ to: "apikeys";
5832
+ isOneToOne: false;
5833
+ isSetofReturn: true;
5834
+ };
5835
+ };
5732
5836
  find_best_plan_v3: {
5733
5837
  Args: {
5734
5838
  bandwidth: number;
@@ -6029,9 +6133,11 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
6029
6133
  is_yearly: boolean;
6030
6134
  logo: string;
6031
6135
  management_email: string;
6136
+ max_apikey_expiration_days: number;
6032
6137
  name: string;
6033
6138
  next_stats_update_at: string;
6034
6139
  paying: boolean;
6140
+ require_apikey_expiration: boolean;
6035
6141
  role: string;
6036
6142
  stats_updated_at: string;
6037
6143
  subscription_end: string;
@@ -6054,9 +6160,11 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
6054
6160
  is_yearly: boolean;
6055
6161
  logo: string;
6056
6162
  management_email: string;
6163
+ max_apikey_expiration_days: number;
6057
6164
  name: string;
6058
6165
  next_stats_update_at: string;
6059
6166
  paying: boolean;
6167
+ require_apikey_expiration: boolean;
6060
6168
  role: string;
6061
6169
  stats_updated_at: string;
6062
6170
  subscription_end: string;
@@ -6074,6 +6182,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
6074
6182
  credit_available: number;
6075
6183
  credit_next_expiration: string;
6076
6184
  credit_total: number;
6185
+ enforce_hashed_api_keys: boolean;
6077
6186
  enforcing_2fa: boolean;
6078
6187
  gid: string;
6079
6188
  is_canceled: boolean;
@@ -6103,6 +6212,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
6103
6212
  credit_available: number;
6104
6213
  credit_next_expiration: string;
6105
6214
  credit_total: number;
6215
+ enforce_hashed_api_keys: boolean;
6106
6216
  enforcing_2fa: boolean;
6107
6217
  gid: string;
6108
6218
  is_canceled: boolean;
@@ -6363,6 +6473,12 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
6363
6473
  };
6364
6474
  Returns: boolean;
6365
6475
  };
6476
+ is_apikey_expired: {
6477
+ Args: {
6478
+ key_expires_at: string;
6479
+ };
6480
+ Returns: boolean;
6481
+ };
6366
6482
  is_app_owner: {
6367
6483
  Args: {
6368
6484
  apikey: string;
@@ -6526,6 +6642,10 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
6526
6642
  Args: never;
6527
6643
  Returns: undefined;
6528
6644
  };
6645
+ process_billing_period_stats_email: {
6646
+ Args: never;
6647
+ Returns: undefined;
6648
+ };
6529
6649
  process_channel_device_counts_queue: {
6530
6650
  Args: {
6531
6651
  batch_size?: number;
@@ -6683,43 +6803,6 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
6683
6803
  };
6684
6804
  Returns: string;
6685
6805
  };
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
- };
6723
6806
  seed_get_app_metrics_caches: {
6724
6807
  Args: {
6725
6808
  p_end_date: string;
@@ -6828,6 +6911,13 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
6828
6911
  };
6829
6912
  Returns: boolean;
6830
6913
  };
6914
+ verify_api_key_hash: {
6915
+ Args: {
6916
+ plain_key: string;
6917
+ stored_hash: string;
6918
+ };
6919
+ Returns: boolean;
6920
+ };
6831
6921
  verify_mfa: {
6832
6922
  Args: never;
6833
6923
  Returns: boolean;
@@ -6841,7 +6931,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
6841
6931
  disable_update: "major" | "minor" | "patch" | "version_number" | "none";
6842
6932
  key_mode: "read" | "write" | "all" | "upload";
6843
6933
  platform_os: "ios" | "android";
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";
6934
+ 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" | "disableEmulator" | "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" | "disableProdBuild" | "disableDevice";
6845
6935
  stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
6846
6936
  user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
6847
6937
  user_role: "read" | "upload" | "write" | "admin";
@@ -8,13 +8,16 @@ export declare function addOrganizationInternal(options: OptionsOrganization, si
8
8
  created_by: string;
9
9
  customer_id: string | null;
10
10
  email_preferences: import("../types/supabase.types").Json;
11
+ enforce_hashed_api_keys: boolean;
11
12
  enforcing_2fa: boolean;
12
13
  id: string;
13
14
  last_stats_updated_at: string | null;
14
15
  logo: string | null;
15
16
  management_email: string;
17
+ max_apikey_expiration_days: number | null;
16
18
  name: string;
17
19
  password_policy_config: import("../types/supabase.types").Json | null;
20
+ require_apikey_expiration: boolean;
18
21
  stats_updated_at: string | null;
19
22
  updated_at: string | null;
20
23
  }>;