@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/README.md +32 -1
- package/dist/index.js +208 -203
- package/dist/package.json +1 -1
- package/dist/src/api/channels.d.ts +179 -89
- package/dist/src/organization/add.d.ts +3 -0
- package/dist/src/organization/list.d.ts +1 -0
- package/dist/src/organization/members.d.ts +1 -0
- package/dist/src/organization/set.d.ts +21 -0
- package/dist/src/sdk.js +172 -172
- package/dist/src/types/supabase.types.d.ts +92 -70
- package/dist/src/utils.d.ts +92 -44
- package/package.json +1 -1
package/dist/src/utils.d.ts
CHANGED
|
@@ -131,8 +131,10 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
131
131
|
apikeys: {
|
|
132
132
|
Row: {
|
|
133
133
|
created_at: string | null;
|
|
134
|
+
expires_at: string | null;
|
|
134
135
|
id: number;
|
|
135
|
-
key: string;
|
|
136
|
+
key: string | null;
|
|
137
|
+
key_hash: string | null;
|
|
136
138
|
limited_to_apps: string[] | null;
|
|
137
139
|
limited_to_orgs: string[] | null;
|
|
138
140
|
mode: Database["public"]["Enums"]["key_mode"];
|
|
@@ -142,8 +144,10 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
142
144
|
};
|
|
143
145
|
Insert: {
|
|
144
146
|
created_at?: string | null;
|
|
147
|
+
expires_at?: string | null;
|
|
145
148
|
id?: number;
|
|
146
|
-
key
|
|
149
|
+
key?: string | null;
|
|
150
|
+
key_hash?: string | null;
|
|
147
151
|
limited_to_apps?: string[] | null;
|
|
148
152
|
limited_to_orgs?: string[] | null;
|
|
149
153
|
mode: Database["public"]["Enums"]["key_mode"];
|
|
@@ -153,8 +157,10 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
153
157
|
};
|
|
154
158
|
Update: {
|
|
155
159
|
created_at?: string | null;
|
|
160
|
+
expires_at?: string | null;
|
|
156
161
|
id?: number;
|
|
157
|
-
key?: string;
|
|
162
|
+
key?: string | null;
|
|
163
|
+
key_hash?: string | null;
|
|
158
164
|
limited_to_apps?: string[] | null;
|
|
159
165
|
limited_to_orgs?: string[] | null;
|
|
160
166
|
mode?: Database["public"]["Enums"]["key_mode"];
|
|
@@ -248,7 +254,10 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
248
254
|
session_key?: string | null;
|
|
249
255
|
storage_provider?: string;
|
|
250
256
|
updated_at?: string | null;
|
|
251
|
-
user_id
|
|
257
|
+
user_id? /**
|
|
258
|
+
* Event tags
|
|
259
|
+
* example: { username: "mattie" }
|
|
260
|
+
*/: string | null;
|
|
252
261
|
};
|
|
253
262
|
Update: {
|
|
254
263
|
app_id?: string;
|
|
@@ -507,7 +516,13 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
507
516
|
platform?: string;
|
|
508
517
|
user_id?: string | null;
|
|
509
518
|
};
|
|
510
|
-
Relationships: [
|
|
519
|
+
Relationships: [{
|
|
520
|
+
foreignKeyName: "build_logs_org_id_fkey";
|
|
521
|
+
columns: ["org_id"];
|
|
522
|
+
isOneToOne: false;
|
|
523
|
+
referencedRelation: "orgs";
|
|
524
|
+
referencedColumns: ["id"];
|
|
525
|
+
}];
|
|
511
526
|
};
|
|
512
527
|
build_requests: {
|
|
513
528
|
Row: {
|
|
@@ -1134,6 +1149,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1134
1149
|
paying: number | null;
|
|
1135
1150
|
paying_monthly: number | null;
|
|
1136
1151
|
paying_yearly: number | null;
|
|
1152
|
+
plan_enterprise: number | null;
|
|
1137
1153
|
plan_enterprise_monthly: number;
|
|
1138
1154
|
plan_enterprise_yearly: number;
|
|
1139
1155
|
plan_maker: number | null;
|
|
@@ -1178,6 +1194,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1178
1194
|
paying?: number | null;
|
|
1179
1195
|
paying_monthly?: number | null;
|
|
1180
1196
|
paying_yearly?: number | null;
|
|
1197
|
+
plan_enterprise?: number | null;
|
|
1181
1198
|
plan_enterprise_monthly?: number;
|
|
1182
1199
|
plan_enterprise_yearly?: number;
|
|
1183
1200
|
plan_maker?: number | null;
|
|
@@ -1222,6 +1239,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1222
1239
|
paying?: number | null;
|
|
1223
1240
|
paying_monthly?: number | null;
|
|
1224
1241
|
paying_yearly?: number | null;
|
|
1242
|
+
plan_enterprise?: number | null;
|
|
1225
1243
|
plan_enterprise_monthly?: number;
|
|
1226
1244
|
plan_enterprise_yearly?: number;
|
|
1227
1245
|
plan_maker?: number | null;
|
|
@@ -1382,13 +1400,16 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1382
1400
|
created_by: string;
|
|
1383
1401
|
customer_id: string | null;
|
|
1384
1402
|
email_preferences: import("./types/supabase.types").Json;
|
|
1403
|
+
enforce_hashed_api_keys: boolean;
|
|
1385
1404
|
enforcing_2fa: boolean;
|
|
1386
1405
|
id: string;
|
|
1387
1406
|
last_stats_updated_at: string | null;
|
|
1388
1407
|
logo: string | null;
|
|
1389
1408
|
management_email: string;
|
|
1409
|
+
max_apikey_expiration_days: number | null;
|
|
1390
1410
|
name: string;
|
|
1391
1411
|
password_policy_config: import("./types/supabase.types").Json | null;
|
|
1412
|
+
require_apikey_expiration: boolean;
|
|
1392
1413
|
stats_updated_at: string | null;
|
|
1393
1414
|
updated_at: string | null;
|
|
1394
1415
|
};
|
|
@@ -1397,13 +1418,16 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1397
1418
|
created_by: string;
|
|
1398
1419
|
customer_id?: string | null;
|
|
1399
1420
|
email_preferences?: import("./types/supabase.types").Json;
|
|
1421
|
+
enforce_hashed_api_keys?: boolean;
|
|
1400
1422
|
enforcing_2fa?: boolean;
|
|
1401
1423
|
id?: string;
|
|
1402
1424
|
last_stats_updated_at?: string | null;
|
|
1403
1425
|
logo?: string | null;
|
|
1404
1426
|
management_email: string;
|
|
1427
|
+
max_apikey_expiration_days?: number | null;
|
|
1405
1428
|
name: string;
|
|
1406
1429
|
password_policy_config?: import("./types/supabase.types").Json | null;
|
|
1430
|
+
require_apikey_expiration?: boolean;
|
|
1407
1431
|
stats_updated_at?: string | null;
|
|
1408
1432
|
updated_at?: string | null;
|
|
1409
1433
|
};
|
|
@@ -1412,13 +1436,16 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
1412
1436
|
created_by?: string;
|
|
1413
1437
|
customer_id?: string | null;
|
|
1414
1438
|
email_preferences?: import("./types/supabase.types").Json;
|
|
1439
|
+
enforce_hashed_api_keys?: boolean;
|
|
1415
1440
|
enforcing_2fa?: boolean;
|
|
1416
1441
|
id?: string;
|
|
1417
1442
|
last_stats_updated_at?: string | null;
|
|
1418
1443
|
logo?: string | null;
|
|
1419
1444
|
management_email?: string;
|
|
1445
|
+
max_apikey_expiration_days?: number | null;
|
|
1420
1446
|
name?: string;
|
|
1421
1447
|
password_policy_config?: import("./types/supabase.types").Json | null;
|
|
1448
|
+
require_apikey_expiration?: boolean;
|
|
1422
1449
|
stats_updated_at?: string | null;
|
|
1423
1450
|
updated_at?: string | null;
|
|
1424
1451
|
};
|
|
@@ -2226,6 +2253,13 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
2226
2253
|
};
|
|
2227
2254
|
Returns: boolean;
|
|
2228
2255
|
};
|
|
2256
|
+
check_org_hashed_key_enforcement: {
|
|
2257
|
+
Args: {
|
|
2258
|
+
apikey_row: Database["public"]["Tables"]["apikeys"]["Row"];
|
|
2259
|
+
org_id: string;
|
|
2260
|
+
};
|
|
2261
|
+
Returns: boolean;
|
|
2262
|
+
};
|
|
2229
2263
|
check_org_members_2fa_enabled: {
|
|
2230
2264
|
Args: {
|
|
2231
2265
|
org_id: string;
|
|
@@ -2253,6 +2287,10 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
2253
2287
|
};
|
|
2254
2288
|
Returns: number;
|
|
2255
2289
|
};
|
|
2290
|
+
cleanup_expired_apikeys: {
|
|
2291
|
+
Args: never;
|
|
2292
|
+
Returns: undefined;
|
|
2293
|
+
};
|
|
2256
2294
|
cleanup_frequent_job_details: {
|
|
2257
2295
|
Args: never;
|
|
2258
2296
|
Returns: undefined;
|
|
@@ -2370,6 +2408,30 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
2370
2408
|
Args: never;
|
|
2371
2409
|
Returns: number;
|
|
2372
2410
|
};
|
|
2411
|
+
find_apikey_by_value: {
|
|
2412
|
+
Args: {
|
|
2413
|
+
key_value: string;
|
|
2414
|
+
};
|
|
2415
|
+
Returns: {
|
|
2416
|
+
created_at: string | null;
|
|
2417
|
+
expires_at: string | null;
|
|
2418
|
+
id: number;
|
|
2419
|
+
key: string | null;
|
|
2420
|
+
key_hash: string | null;
|
|
2421
|
+
limited_to_apps: string[] | null;
|
|
2422
|
+
limited_to_orgs: string[] | null;
|
|
2423
|
+
mode: Database["public"]["Enums"]["key_mode"];
|
|
2424
|
+
name: string;
|
|
2425
|
+
updated_at: string | null;
|
|
2426
|
+
user_id: string;
|
|
2427
|
+
}[];
|
|
2428
|
+
SetofOptions: {
|
|
2429
|
+
from: "*";
|
|
2430
|
+
to: "apikeys";
|
|
2431
|
+
isOneToOne: false;
|
|
2432
|
+
isSetofReturn: true;
|
|
2433
|
+
};
|
|
2434
|
+
};
|
|
2373
2435
|
find_best_plan_v3: {
|
|
2374
2436
|
Args: {
|
|
2375
2437
|
bandwidth: number;
|
|
@@ -2670,9 +2732,11 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
2670
2732
|
is_yearly: boolean;
|
|
2671
2733
|
logo: string;
|
|
2672
2734
|
management_email: string;
|
|
2735
|
+
max_apikey_expiration_days: number;
|
|
2673
2736
|
name: string;
|
|
2674
2737
|
next_stats_update_at: string;
|
|
2675
2738
|
paying: boolean;
|
|
2739
|
+
require_apikey_expiration: boolean;
|
|
2676
2740
|
role: string;
|
|
2677
2741
|
stats_updated_at: string;
|
|
2678
2742
|
subscription_end: string;
|
|
@@ -2695,9 +2759,11 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
2695
2759
|
is_yearly: boolean;
|
|
2696
2760
|
logo: string;
|
|
2697
2761
|
management_email: string;
|
|
2762
|
+
max_apikey_expiration_days: number;
|
|
2698
2763
|
name: string;
|
|
2699
2764
|
next_stats_update_at: string;
|
|
2700
2765
|
paying: boolean;
|
|
2766
|
+
require_apikey_expiration: boolean;
|
|
2701
2767
|
role: string;
|
|
2702
2768
|
stats_updated_at: string;
|
|
2703
2769
|
subscription_end: string;
|
|
@@ -2715,6 +2781,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
2715
2781
|
credit_available: number;
|
|
2716
2782
|
credit_next_expiration: string;
|
|
2717
2783
|
credit_total: number;
|
|
2784
|
+
enforce_hashed_api_keys: boolean;
|
|
2718
2785
|
enforcing_2fa: boolean;
|
|
2719
2786
|
gid: string;
|
|
2720
2787
|
is_canceled: boolean;
|
|
@@ -2744,6 +2811,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
2744
2811
|
credit_available: number;
|
|
2745
2812
|
credit_next_expiration: string;
|
|
2746
2813
|
credit_total: number;
|
|
2814
|
+
enforce_hashed_api_keys: boolean;
|
|
2747
2815
|
enforcing_2fa: boolean;
|
|
2748
2816
|
gid: string;
|
|
2749
2817
|
is_canceled: boolean;
|
|
@@ -3004,6 +3072,12 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
3004
3072
|
};
|
|
3005
3073
|
Returns: boolean;
|
|
3006
3074
|
};
|
|
3075
|
+
is_apikey_expired: {
|
|
3076
|
+
Args: {
|
|
3077
|
+
key_expires_at: string;
|
|
3078
|
+
};
|
|
3079
|
+
Returns: boolean;
|
|
3080
|
+
};
|
|
3007
3081
|
is_app_owner: {
|
|
3008
3082
|
Args: {
|
|
3009
3083
|
apikey: string;
|
|
@@ -3167,6 +3241,10 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
3167
3241
|
Args: never;
|
|
3168
3242
|
Returns: undefined;
|
|
3169
3243
|
};
|
|
3244
|
+
process_billing_period_stats_email: {
|
|
3245
|
+
Args: never;
|
|
3246
|
+
Returns: undefined;
|
|
3247
|
+
};
|
|
3170
3248
|
process_channel_device_counts_queue: {
|
|
3171
3249
|
Args: {
|
|
3172
3250
|
batch_size?: number;
|
|
@@ -3324,43 +3402,6 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
3324
3402
|
};
|
|
3325
3403
|
Returns: string;
|
|
3326
3404
|
};
|
|
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
|
-
};
|
|
3364
3405
|
seed_get_app_metrics_caches: {
|
|
3365
3406
|
Args: {
|
|
3366
3407
|
p_end_date: string;
|
|
@@ -3469,6 +3510,13 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
3469
3510
|
};
|
|
3470
3511
|
Returns: boolean;
|
|
3471
3512
|
};
|
|
3513
|
+
verify_api_key_hash: {
|
|
3514
|
+
Args: {
|
|
3515
|
+
plain_key: string;
|
|
3516
|
+
stored_hash: string;
|
|
3517
|
+
};
|
|
3518
|
+
Returns: boolean;
|
|
3519
|
+
};
|
|
3472
3520
|
verify_mfa: {
|
|
3473
3521
|
Args: never;
|
|
3474
3522
|
Returns: boolean;
|
|
@@ -3482,7 +3530,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
3482
3530
|
disable_update: "major" | "minor" | "patch" | "version_number" | "none";
|
|
3483
3531
|
key_mode: "read" | "write" | "all" | "upload";
|
|
3484
3532
|
platform_os: "ios" | "android";
|
|
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" | "
|
|
3533
|
+
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";
|
|
3486
3534
|
stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
|
|
3487
3535
|
user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
|
|
3488
3536
|
user_role: "read" | "upload" | "write" | "admin";
|
|
@@ -3521,7 +3569,7 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
3521
3569
|
};
|
|
3522
3570
|
};
|
|
3523
3571
|
}, {
|
|
3524
|
-
PostgrestVersion: "
|
|
3572
|
+
PostgrestVersion: "14.1";
|
|
3525
3573
|
}>>;
|
|
3526
3574
|
export declare function checkKey(supabase: SupabaseClient<Database>, apikey: string, keymode: Database['public']['Enums']['key_mode'][]): Promise<void>;
|
|
3527
3575
|
export declare function isPayingOrg(supabase: SupabaseClient<Database>, orgId: string): Promise<boolean>;
|