@capgo/cli 7.64.1 → 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.
@@ -2,38 +2,18 @@ export type Json = string | number | boolean | null | {
2
2
  [key: string]: Json | undefined;
3
3
  } | Json[];
4
4
  export type Database = {
5
- graphql_public: {
6
- Tables: {
7
- [_ in never]: never;
8
- };
9
- Views: {
10
- [_ in never]: never;
11
- };
12
- Functions: {
13
- graphql: {
14
- Args: {
15
- extensions?: Json;
16
- operationName?: string;
17
- query?: string;
18
- variables?: Json;
19
- };
20
- Returns: Json;
21
- };
22
- };
23
- Enums: {
24
- [_ in never]: never;
25
- };
26
- CompositeTypes: {
27
- [_ in never]: never;
28
- };
5
+ __InternalSupabase: {
6
+ PostgrestVersion: "14.1";
29
7
  };
30
8
  public: {
31
9
  Tables: {
32
10
  apikeys: {
33
11
  Row: {
34
12
  created_at: string | null;
13
+ expires_at: string | null;
35
14
  id: number;
36
- key: string;
15
+ key: string | null;
16
+ key_hash: string | null;
37
17
  limited_to_apps: string[] | null;
38
18
  limited_to_orgs: string[] | null;
39
19
  mode: Database["public"]["Enums"]["key_mode"];
@@ -43,8 +23,10 @@ export type Database = {
43
23
  };
44
24
  Insert: {
45
25
  created_at?: string | null;
26
+ expires_at?: string | null;
46
27
  id?: number;
47
- key: string;
28
+ key?: string | null;
29
+ key_hash?: string | null;
48
30
  limited_to_apps?: string[] | null;
49
31
  limited_to_orgs?: string[] | null;
50
32
  mode: Database["public"]["Enums"]["key_mode"];
@@ -54,8 +36,10 @@ export type Database = {
54
36
  };
55
37
  Update: {
56
38
  created_at?: string | null;
39
+ expires_at?: string | null;
57
40
  id?: number;
58
- key?: string;
41
+ key?: string | null;
42
+ key_hash?: string | null;
59
43
  limited_to_apps?: string[] | null;
60
44
  limited_to_orgs?: string[] | null;
61
45
  mode?: Database["public"]["Enums"]["key_mode"];
@@ -425,7 +409,15 @@ export type Database = {
425
409
  platform?: string;
426
410
  user_id?: string | null;
427
411
  };
428
- Relationships: [];
412
+ Relationships: [
413
+ {
414
+ foreignKeyName: "build_logs_org_id_fkey";
415
+ columns: ["org_id"];
416
+ isOneToOne: false;
417
+ referencedRelation: "orgs";
418
+ referencedColumns: ["id"];
419
+ }
420
+ ];
429
421
  };
430
422
  build_requests: {
431
423
  Row: {
@@ -1072,6 +1064,7 @@ export type Database = {
1072
1064
  paying: number | null;
1073
1065
  paying_monthly: number | null;
1074
1066
  paying_yearly: number | null;
1067
+ plan_enterprise: number | null;
1075
1068
  plan_enterprise_monthly: number;
1076
1069
  plan_enterprise_yearly: number;
1077
1070
  plan_maker: number | null;
@@ -1116,6 +1109,7 @@ export type Database = {
1116
1109
  paying?: number | null;
1117
1110
  paying_monthly?: number | null;
1118
1111
  paying_yearly?: number | null;
1112
+ plan_enterprise?: number | null;
1119
1113
  plan_enterprise_monthly?: number;
1120
1114
  plan_enterprise_yearly?: number;
1121
1115
  plan_maker?: number | null;
@@ -1160,6 +1154,7 @@ export type Database = {
1160
1154
  paying?: number | null;
1161
1155
  paying_monthly?: number | null;
1162
1156
  paying_yearly?: number | null;
1157
+ plan_enterprise?: number | null;
1163
1158
  plan_enterprise_monthly?: number;
1164
1159
  plan_enterprise_yearly?: number;
1165
1160
  plan_maker?: number | null;
@@ -1329,13 +1324,16 @@ export type Database = {
1329
1324
  created_by: string;
1330
1325
  customer_id: string | null;
1331
1326
  email_preferences: Json;
1327
+ enforce_hashed_api_keys: boolean;
1332
1328
  enforcing_2fa: boolean;
1333
1329
  id: string;
1334
1330
  last_stats_updated_at: string | null;
1335
1331
  logo: string | null;
1336
1332
  management_email: string;
1333
+ max_apikey_expiration_days: number | null;
1337
1334
  name: string;
1338
1335
  password_policy_config: Json | null;
1336
+ require_apikey_expiration: boolean;
1339
1337
  stats_updated_at: string | null;
1340
1338
  updated_at: string | null;
1341
1339
  };
@@ -1344,13 +1342,16 @@ export type Database = {
1344
1342
  created_by: string;
1345
1343
  customer_id?: string | null;
1346
1344
  email_preferences?: Json;
1345
+ enforce_hashed_api_keys?: boolean;
1347
1346
  enforcing_2fa?: boolean;
1348
1347
  id?: string;
1349
1348
  last_stats_updated_at?: string | null;
1350
1349
  logo?: string | null;
1351
1350
  management_email: string;
1351
+ max_apikey_expiration_days?: number | null;
1352
1352
  name: string;
1353
1353
  password_policy_config?: Json | null;
1354
+ require_apikey_expiration?: boolean;
1354
1355
  stats_updated_at?: string | null;
1355
1356
  updated_at?: string | null;
1356
1357
  };
@@ -1359,13 +1360,16 @@ export type Database = {
1359
1360
  created_by?: string;
1360
1361
  customer_id?: string | null;
1361
1362
  email_preferences?: Json;
1363
+ enforce_hashed_api_keys?: boolean;
1362
1364
  enforcing_2fa?: boolean;
1363
1365
  id?: string;
1364
1366
  last_stats_updated_at?: string | null;
1365
1367
  logo?: string | null;
1366
1368
  management_email?: string;
1369
+ max_apikey_expiration_days?: number | null;
1367
1370
  name?: string;
1368
1371
  password_policy_config?: Json | null;
1372
+ require_apikey_expiration?: boolean;
1369
1373
  stats_updated_at?: string | null;
1370
1374
  updated_at?: string | null;
1371
1375
  };
@@ -2204,6 +2208,13 @@ export type Database = {
2204
2208
  };
2205
2209
  Returns: boolean;
2206
2210
  };
2211
+ check_org_hashed_key_enforcement: {
2212
+ Args: {
2213
+ apikey_row: Database["public"]["Tables"]["apikeys"]["Row"];
2214
+ org_id: string;
2215
+ };
2216
+ Returns: boolean;
2217
+ };
2207
2218
  check_org_members_2fa_enabled: {
2208
2219
  Args: {
2209
2220
  org_id: string;
@@ -2231,6 +2242,10 @@ export type Database = {
2231
2242
  };
2232
2243
  Returns: number;
2233
2244
  };
2245
+ cleanup_expired_apikeys: {
2246
+ Args: never;
2247
+ Returns: undefined;
2248
+ };
2234
2249
  cleanup_frequent_job_details: {
2235
2250
  Args: never;
2236
2251
  Returns: undefined;
@@ -2348,6 +2363,30 @@ export type Database = {
2348
2363
  Args: never;
2349
2364
  Returns: number;
2350
2365
  };
2366
+ find_apikey_by_value: {
2367
+ Args: {
2368
+ key_value: string;
2369
+ };
2370
+ Returns: {
2371
+ created_at: string | null;
2372
+ expires_at: string | null;
2373
+ id: number;
2374
+ key: string | null;
2375
+ key_hash: string | null;
2376
+ limited_to_apps: string[] | null;
2377
+ limited_to_orgs: string[] | null;
2378
+ mode: Database["public"]["Enums"]["key_mode"];
2379
+ name: string;
2380
+ updated_at: string | null;
2381
+ user_id: string;
2382
+ }[];
2383
+ SetofOptions: {
2384
+ from: "*";
2385
+ to: "apikeys";
2386
+ isOneToOne: false;
2387
+ isSetofReturn: true;
2388
+ };
2389
+ };
2351
2390
  find_best_plan_v3: {
2352
2391
  Args: {
2353
2392
  bandwidth: number;
@@ -2648,9 +2687,11 @@ export type Database = {
2648
2687
  is_yearly: boolean;
2649
2688
  logo: string;
2650
2689
  management_email: string;
2690
+ max_apikey_expiration_days: number;
2651
2691
  name: string;
2652
2692
  next_stats_update_at: string;
2653
2693
  paying: boolean;
2694
+ require_apikey_expiration: boolean;
2654
2695
  role: string;
2655
2696
  stats_updated_at: string;
2656
2697
  subscription_end: string;
@@ -2673,9 +2714,11 @@ export type Database = {
2673
2714
  is_yearly: boolean;
2674
2715
  logo: string;
2675
2716
  management_email: string;
2717
+ max_apikey_expiration_days: number;
2676
2718
  name: string;
2677
2719
  next_stats_update_at: string;
2678
2720
  paying: boolean;
2721
+ require_apikey_expiration: boolean;
2679
2722
  role: string;
2680
2723
  stats_updated_at: string;
2681
2724
  subscription_end: string;
@@ -2693,6 +2736,7 @@ export type Database = {
2693
2736
  credit_available: number;
2694
2737
  credit_next_expiration: string;
2695
2738
  credit_total: number;
2739
+ enforce_hashed_api_keys: boolean;
2696
2740
  enforcing_2fa: boolean;
2697
2741
  gid: string;
2698
2742
  is_canceled: boolean;
@@ -2722,6 +2766,7 @@ export type Database = {
2722
2766
  credit_available: number;
2723
2767
  credit_next_expiration: string;
2724
2768
  credit_total: number;
2769
+ enforce_hashed_api_keys: boolean;
2725
2770
  enforcing_2fa: boolean;
2726
2771
  gid: string;
2727
2772
  is_canceled: boolean;
@@ -2982,6 +3027,12 @@ export type Database = {
2982
3027
  };
2983
3028
  Returns: boolean;
2984
3029
  };
3030
+ is_apikey_expired: {
3031
+ Args: {
3032
+ key_expires_at: string;
3033
+ };
3034
+ Returns: boolean;
3035
+ };
2985
3036
  is_app_owner: {
2986
3037
  Args: {
2987
3038
  apikey: string;
@@ -3145,6 +3196,10 @@ export type Database = {
3145
3196
  Args: never;
3146
3197
  Returns: undefined;
3147
3198
  };
3199
+ process_billing_period_stats_email: {
3200
+ Args: never;
3201
+ Returns: undefined;
3202
+ };
3148
3203
  process_channel_device_counts_queue: {
3149
3204
  Args: {
3150
3205
  batch_size?: number;
@@ -3302,43 +3357,6 @@ export type Database = {
3302
3357
  };
3303
3358
  Returns: string;
3304
3359
  };
3305
- reset_and_seed_app_data: {
3306
- Args: {
3307
- p_admin_user_id?: string;
3308
- p_app_id: string;
3309
- p_org_id?: string;
3310
- p_plan_product_id?: string;
3311
- p_stripe_customer_id?: string;
3312
- p_user_id?: string;
3313
- };
3314
- Returns: undefined;
3315
- };
3316
- reset_and_seed_app_stats_data: {
3317
- Args: {
3318
- p_app_id: string;
3319
- };
3320
- Returns: undefined;
3321
- };
3322
- reset_and_seed_data: {
3323
- Args: never;
3324
- Returns: undefined;
3325
- };
3326
- reset_and_seed_stats_data: {
3327
- Args: never;
3328
- Returns: undefined;
3329
- };
3330
- reset_app_data: {
3331
- Args: {
3332
- p_app_id: string;
3333
- };
3334
- Returns: undefined;
3335
- };
3336
- reset_app_stats_data: {
3337
- Args: {
3338
- p_app_id: string;
3339
- };
3340
- Returns: undefined;
3341
- };
3342
3360
  seed_get_app_metrics_caches: {
3343
3361
  Args: {
3344
3362
  p_end_date: string;
@@ -3447,6 +3465,13 @@ export type Database = {
3447
3465
  };
3448
3466
  Returns: boolean;
3449
3467
  };
3468
+ verify_api_key_hash: {
3469
+ Args: {
3470
+ plain_key: string;
3471
+ stored_hash: string;
3472
+ };
3473
+ Returns: boolean;
3474
+ };
3450
3475
  verify_mfa: {
3451
3476
  Args: never;
3452
3477
  Returns: boolean;
@@ -3460,7 +3485,7 @@ export type Database = {
3460
3485
  disable_update: "major" | "minor" | "patch" | "version_number" | "none";
3461
3486
  key_mode: "read" | "write" | "all" | "upload";
3462
3487
  platform_os: "ios" | "android";
3463
- 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";
3488
+ 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";
3464
3489
  stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
3465
3490
  user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
3466
3491
  user_role: "read" | "upload" | "write" | "admin";
@@ -3550,9 +3575,6 @@ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof Defaul
3550
3575
  schema: keyof DatabaseWithoutInternals;
3551
3576
  } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
3552
3577
  export declare const Constants: {
3553
- readonly graphql_public: {
3554
- readonly Enums: {};
3555
- };
3556
3578
  readonly public: {
3557
3579
  readonly Enums: {
3558
3580
  readonly action_type: readonly ["mau", "storage", "bandwidth", "build_time"];
@@ -3562,7 +3584,7 @@ export declare const Constants: {
3562
3584
  readonly disable_update: readonly ["major", "minor", "patch", "version_number", "none"];
3563
3585
  readonly key_mode: readonly ["read", "write", "all", "upload"];
3564
3586
  readonly platform_os: readonly ["ios", "android"];
3565
- readonly stats_action: readonly ["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"];
3587
+ readonly stats_action: readonly ["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"];
3566
3588
  readonly stripe_status: readonly ["created", "succeeded", "updated", "failed", "deleted", "canceled"];
3567
3589
  readonly user_min_right: readonly ["invite_read", "invite_upload", "invite_write", "invite_admin", "invite_super_admin", "read", "upload", "write", "admin", "super_admin"];
3568
3590
  readonly user_role: readonly ["read", "upload", "write", "admin"];