@capgo/cli 8.0.0-alpha.1 → 8.0.0-alpha.3
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 +1 -0
- package/dist/index.js +238 -411
- package/dist/package.json +89 -93
- package/dist/src/api/channels.d.ts +592 -16
- package/dist/src/api/channels.d.ts.map +1 -1
- package/dist/src/api/update.d.ts.map +1 -1
- package/dist/src/app/add.d.ts +2 -8
- package/dist/src/app/add.d.ts.map +1 -1
- package/dist/src/app/debug.d.ts +1 -1
- package/dist/src/app/debug.d.ts.map +1 -1
- package/dist/src/app/delete.d.ts +2 -1
- package/dist/src/app/delete.d.ts.map +1 -1
- package/dist/src/app/info.d.ts +9 -1
- package/dist/src/app/info.d.ts.map +1 -1
- package/dist/src/app/list.d.ts +19 -1
- package/dist/src/app/list.d.ts.map +1 -1
- package/dist/src/app/set.d.ts +2 -1
- package/dist/src/app/set.d.ts.map +1 -1
- package/dist/src/app/setting.d.ts +2 -1
- package/dist/src/app/setting.d.ts.map +1 -1
- package/dist/src/bundle/cleanup.d.ts +5 -1
- package/dist/src/bundle/cleanup.d.ts.map +1 -1
- package/dist/src/bundle/compatibility.d.ts +4 -4
- package/dist/src/bundle/compatibility.d.ts.map +1 -1
- package/dist/src/bundle/delete.d.ts +2 -1
- package/dist/src/bundle/delete.d.ts.map +1 -1
- package/dist/src/bundle/partial.d.ts +2 -2
- package/dist/src/bundle/partial.d.ts.map +1 -1
- package/dist/src/bundle/upload.d.ts +3 -3
- package/dist/src/bundle/upload.d.ts.map +1 -1
- package/dist/src/bundle/upload_interface.d.ts +1 -0
- package/dist/src/bundle/upload_interface.d.ts.map +1 -1
- package/dist/src/bundle/zip.d.ts.map +1 -1
- package/dist/src/channel/add.d.ts +2 -2
- package/dist/src/channel/add.d.ts.map +1 -1
- package/dist/src/channel/currentBundle.d.ts +2 -1
- package/dist/src/channel/currentBundle.d.ts.map +1 -1
- package/dist/src/channel/delete.d.ts +2 -1
- package/dist/src/channel/delete.d.ts.map +1 -1
- package/dist/src/channel/list.d.ts +2 -1
- package/dist/src/channel/list.d.ts.map +1 -1
- package/dist/src/channel/set.d.ts +2 -1
- package/dist/src/channel/set.d.ts.map +1 -1
- package/dist/src/checksum.d.ts +9 -0
- package/dist/src/checksum.d.ts.map +1 -0
- package/dist/src/init.d.ts.map +1 -1
- package/dist/src/keyV2.d.ts +2 -3
- package/dist/src/keyV2.d.ts.map +1 -1
- package/dist/src/login.d.ts +2 -2
- package/dist/src/login.d.ts.map +1 -1
- package/dist/src/organisation/list.d.ts +3 -0
- package/dist/src/organisation/list.d.ts.map +1 -1
- package/dist/src/sdk.d.ts +107 -4
- package/dist/src/sdk.d.ts.map +1 -1
- package/dist/src/sdk.js +247 -310
- package/dist/src/types/supabase.types.d.ts +313 -9
- package/dist/src/types/supabase.types.d.ts.map +1 -1
- package/dist/src/utils/latest-version.d.ts +7 -0
- package/dist/src/utils/latest-version.d.ts.map +1 -0
- package/dist/src/utils.d.ts +302 -21
- package/dist/src/utils.d.ts.map +1 -1
- package/package.json +11 -15
- package/dist/src/api/app.js +0 -45
- package/dist/src/api/app.js.map +0 -1
- package/dist/src/api/channels.js +0 -167
- package/dist/src/api/channels.js.map +0 -1
- package/dist/src/api/cryptoV2.js +0 -102
- package/dist/src/api/cryptoV2.js.map +0 -1
- package/dist/src/api/update.js +0 -14
- package/dist/src/api/update.js.map +0 -1
- package/dist/src/api/versions.js +0 -92
- package/dist/src/api/versions.js.map +0 -1
- package/dist/src/app/add.js +0 -150
- package/dist/src/app/add.js.map +0 -1
- package/dist/src/app/debug.js +0 -222
- package/dist/src/app/debug.js.map +0 -1
- package/dist/src/app/delete.js +0 -89
- package/dist/src/app/delete.js.map +0 -1
- package/dist/src/app/info.js +0 -84
- package/dist/src/app/info.js.map +0 -1
- package/dist/src/app/list.js +0 -48
- package/dist/src/app/list.js.map +0 -1
- package/dist/src/app/set.js +0 -96
- package/dist/src/app/set.js.map +0 -1
- package/dist/src/app/setting.js +0 -50
- package/dist/src/app/setting.js.map +0 -1
- package/dist/src/bundle/check.js +0 -30
- package/dist/src/bundle/check.js.map +0 -1
- package/dist/src/bundle/cleanup.js +0 -105
- package/dist/src/bundle/cleanup.js.map +0 -1
- package/dist/src/bundle/compatibility.js +0 -62
- package/dist/src/bundle/compatibility.js.map +0 -1
- package/dist/src/bundle/decryptV2.js +0 -76
- package/dist/src/bundle/decryptV2.js.map +0 -1
- package/dist/src/bundle/delete.js +0 -40
- package/dist/src/bundle/delete.js.map +0 -1
- package/dist/src/bundle/encryptV2.js +0 -108
- package/dist/src/bundle/encryptV2.js.map +0 -1
- package/dist/src/bundle/list.js +0 -36
- package/dist/src/bundle/list.js.map +0 -1
- package/dist/src/bundle/partial.js +0 -332
- package/dist/src/bundle/partial.js.map +0 -1
- package/dist/src/bundle/unlink.js +0 -70
- package/dist/src/bundle/unlink.js.map +0 -1
- package/dist/src/bundle/upload.js +0 -700
- package/dist/src/bundle/upload.js.map +0 -1
- package/dist/src/bundle/upload_interface.js +0 -2
- package/dist/src/bundle/upload_interface.js.map +0 -1
- package/dist/src/bundle/zip.js +0 -148
- package/dist/src/bundle/zip.js.map +0 -1
- package/dist/src/channel/add.js +0 -68
- package/dist/src/channel/add.js.map +0 -1
- package/dist/src/channel/currentBundle.js +0 -54
- package/dist/src/channel/currentBundle.js.map +0 -1
- package/dist/src/channel/delete.js +0 -77
- package/dist/src/channel/delete.js.map +0 -1
- package/dist/src/channel/list.js +0 -45
- package/dist/src/channel/list.js.map +0 -1
- package/dist/src/channel/set.js +0 -220
- package/dist/src/channel/set.js.map +0 -1
- package/dist/src/config/index.js +0 -31
- package/dist/src/config/index.js.map +0 -1
- package/dist/src/docs.js +0 -280
- package/dist/src/docs.js.map +0 -1
- package/dist/src/index.js +0 -504
- package/dist/src/index.js.map +0 -1
- package/dist/src/init.js +0 -797
- package/dist/src/init.js.map +0 -1
- package/dist/src/keyV2.js +0 -163
- package/dist/src/keyV2.js.map +0 -1
- package/dist/src/login.js +0 -51
- package/dist/src/login.js.map +0 -1
- package/dist/src/organisation/add.js +0 -82
- package/dist/src/organisation/add.js.map +0 -1
- package/dist/src/organisation/delete.js +0 -91
- package/dist/src/organisation/delete.js.map +0 -1
- package/dist/src/organisation/index.js +0 -5
- package/dist/src/organisation/index.js.map +0 -1
- package/dist/src/organisation/list.js +0 -60
- package/dist/src/organisation/list.js.map +0 -1
- package/dist/src/organisation/set.js +0 -95
- package/dist/src/organisation/set.js.map +0 -1
- package/dist/src/sdk.js.map +0 -1
- package/dist/src/types/supabase.types.js +0 -88
- package/dist/src/types/supabase.types.js.map +0 -1
- package/dist/src/user/account.js +0 -31
- package/dist/src/user/account.js.map +0 -1
- package/dist/src/utils.js +0 -1184
- package/dist/src/utils.js.map +0 -1
|
@@ -259,11 +259,13 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
259
259
|
apps: {
|
|
260
260
|
Row: {
|
|
261
261
|
app_id: string;
|
|
262
|
+
channel_device_count: number;
|
|
262
263
|
created_at: string | null;
|
|
263
264
|
default_upload_channel: string;
|
|
264
265
|
icon_url: string;
|
|
265
266
|
id: string | null;
|
|
266
267
|
last_version: string | null;
|
|
268
|
+
manifest_bundle_count: number;
|
|
267
269
|
name: string | null;
|
|
268
270
|
owner_org: string;
|
|
269
271
|
retention: number;
|
|
@@ -273,11 +275,13 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
273
275
|
};
|
|
274
276
|
Insert: {
|
|
275
277
|
app_id: string;
|
|
278
|
+
channel_device_count?: number;
|
|
276
279
|
created_at?: string | null;
|
|
277
280
|
default_upload_channel?: string;
|
|
278
281
|
icon_url: string;
|
|
279
282
|
id?: string | null;
|
|
280
283
|
last_version?: string | null;
|
|
284
|
+
manifest_bundle_count?: number;
|
|
281
285
|
name?: string | null;
|
|
282
286
|
owner_org: string;
|
|
283
287
|
retention?: number;
|
|
@@ -287,11 +291,13 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
287
291
|
};
|
|
288
292
|
Update: {
|
|
289
293
|
app_id?: string;
|
|
294
|
+
channel_device_count?: number;
|
|
290
295
|
created_at?: string | null;
|
|
291
296
|
default_upload_channel?: string;
|
|
292
297
|
icon_url?: string;
|
|
293
298
|
id?: string | null;
|
|
294
299
|
last_version?: string | null;
|
|
300
|
+
manifest_bundle_count?: number;
|
|
295
301
|
name?: string | null;
|
|
296
302
|
owner_org?: string;
|
|
297
303
|
retention?: number;
|
|
@@ -341,10 +347,10 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
341
347
|
Row: {
|
|
342
348
|
created_at: string;
|
|
343
349
|
id: number;
|
|
350
|
+
org_id: string | null;
|
|
344
351
|
price_per_unit: number;
|
|
345
352
|
step_max: number;
|
|
346
353
|
step_min: number;
|
|
347
|
-
stripe_id: string | null;
|
|
348
354
|
type: string;
|
|
349
355
|
unit_factor: number;
|
|
350
356
|
updated_at: string;
|
|
@@ -352,10 +358,10 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
352
358
|
Insert: {
|
|
353
359
|
created_at?: string;
|
|
354
360
|
id?: number;
|
|
361
|
+
org_id?: string | null;
|
|
355
362
|
price_per_unit: number;
|
|
356
363
|
step_max: number;
|
|
357
364
|
step_min: number;
|
|
358
|
-
stripe_id?: string | null;
|
|
359
365
|
type: string;
|
|
360
366
|
unit_factor?: number;
|
|
361
367
|
updated_at?: string;
|
|
@@ -363,15 +369,21 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
363
369
|
Update: {
|
|
364
370
|
created_at?: string;
|
|
365
371
|
id?: number;
|
|
372
|
+
org_id?: string | null;
|
|
366
373
|
price_per_unit?: number;
|
|
367
374
|
step_max?: number;
|
|
368
375
|
step_min?: number;
|
|
369
|
-
stripe_id?: string | null;
|
|
370
376
|
type?: string;
|
|
371
377
|
unit_factor?: number;
|
|
372
378
|
updated_at?: string;
|
|
373
379
|
};
|
|
374
|
-
Relationships: [
|
|
380
|
+
Relationships: [{
|
|
381
|
+
foreignKeyName: "capgo_credits_steps_org_id_fkey";
|
|
382
|
+
columns: ["org_id"];
|
|
383
|
+
isOneToOne: false;
|
|
384
|
+
referencedRelation: "orgs";
|
|
385
|
+
referencedColumns: ["id"];
|
|
386
|
+
}];
|
|
375
387
|
};
|
|
376
388
|
channel_devices: {
|
|
377
389
|
Row: {
|
|
@@ -719,6 +731,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
719
731
|
Row: {
|
|
720
732
|
app_id: string;
|
|
721
733
|
custom_id: string;
|
|
734
|
+
default_channel: string | null;
|
|
722
735
|
device_id: string;
|
|
723
736
|
id: number;
|
|
724
737
|
is_emulator: boolean | null;
|
|
@@ -734,6 +747,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
734
747
|
Insert: {
|
|
735
748
|
app_id: string;
|
|
736
749
|
custom_id?: string;
|
|
750
|
+
default_channel?: string | null;
|
|
737
751
|
device_id: string;
|
|
738
752
|
id?: never;
|
|
739
753
|
is_emulator?: boolean | null;
|
|
@@ -749,6 +763,7 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
749
763
|
Update: {
|
|
750
764
|
app_id?: string;
|
|
751
765
|
custom_id?: string;
|
|
766
|
+
default_channel?: string | null;
|
|
752
767
|
device_id?: string;
|
|
753
768
|
id?: never;
|
|
754
769
|
is_emulator?: boolean | null;
|
|
@@ -1291,6 +1306,198 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
1291
1306
|
referencedColumns: ["id"];
|
|
1292
1307
|
}];
|
|
1293
1308
|
};
|
|
1309
|
+
usage_credit_consumptions: {
|
|
1310
|
+
Row: {
|
|
1311
|
+
applied_at: string;
|
|
1312
|
+
credits_used: number;
|
|
1313
|
+
grant_id: string;
|
|
1314
|
+
id: number;
|
|
1315
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1316
|
+
org_id: string;
|
|
1317
|
+
overage_event_id: string | null;
|
|
1318
|
+
};
|
|
1319
|
+
Insert: {
|
|
1320
|
+
applied_at?: string;
|
|
1321
|
+
credits_used: number;
|
|
1322
|
+
grant_id: string;
|
|
1323
|
+
id?: number;
|
|
1324
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1325
|
+
org_id: string;
|
|
1326
|
+
overage_event_id?: string | null;
|
|
1327
|
+
};
|
|
1328
|
+
Update: {
|
|
1329
|
+
applied_at?: string;
|
|
1330
|
+
credits_used?: number;
|
|
1331
|
+
grant_id?: string;
|
|
1332
|
+
id?: number;
|
|
1333
|
+
metric?: Database["public"]["Enums"]["credit_metric_type"];
|
|
1334
|
+
org_id?: string;
|
|
1335
|
+
overage_event_id?: string | null;
|
|
1336
|
+
};
|
|
1337
|
+
Relationships: [{
|
|
1338
|
+
foreignKeyName: "usage_credit_consumptions_grant_id_fkey";
|
|
1339
|
+
columns: ["grant_id"];
|
|
1340
|
+
isOneToOne: false;
|
|
1341
|
+
referencedRelation: "usage_credit_grants";
|
|
1342
|
+
referencedColumns: ["id"];
|
|
1343
|
+
}, {
|
|
1344
|
+
foreignKeyName: "usage_credit_consumptions_org_id_fkey";
|
|
1345
|
+
columns: ["org_id"];
|
|
1346
|
+
isOneToOne: false;
|
|
1347
|
+
referencedRelation: "orgs";
|
|
1348
|
+
referencedColumns: ["id"];
|
|
1349
|
+
}, {
|
|
1350
|
+
foreignKeyName: "usage_credit_consumptions_overage_event_id_fkey";
|
|
1351
|
+
columns: ["overage_event_id"];
|
|
1352
|
+
isOneToOne: false;
|
|
1353
|
+
referencedRelation: "usage_overage_events";
|
|
1354
|
+
referencedColumns: ["id"];
|
|
1355
|
+
}];
|
|
1356
|
+
};
|
|
1357
|
+
usage_credit_grants: {
|
|
1358
|
+
Row: {
|
|
1359
|
+
credits_consumed: number;
|
|
1360
|
+
credits_total: number;
|
|
1361
|
+
expires_at: string;
|
|
1362
|
+
granted_at: string;
|
|
1363
|
+
id: string;
|
|
1364
|
+
notes: string | null;
|
|
1365
|
+
org_id: string;
|
|
1366
|
+
source: string;
|
|
1367
|
+
source_ref: import("../types/supabase.types").Json | null;
|
|
1368
|
+
};
|
|
1369
|
+
Insert: {
|
|
1370
|
+
credits_consumed?: number;
|
|
1371
|
+
credits_total: number;
|
|
1372
|
+
expires_at?: string;
|
|
1373
|
+
granted_at?: string;
|
|
1374
|
+
id?: string;
|
|
1375
|
+
notes?: string | null;
|
|
1376
|
+
org_id: string;
|
|
1377
|
+
source?: string;
|
|
1378
|
+
source_ref?: import("../types/supabase.types").Json | null;
|
|
1379
|
+
};
|
|
1380
|
+
Update: {
|
|
1381
|
+
credits_consumed?: number;
|
|
1382
|
+
credits_total?: number;
|
|
1383
|
+
expires_at?: string;
|
|
1384
|
+
granted_at?: string;
|
|
1385
|
+
id?: string;
|
|
1386
|
+
notes?: string | null;
|
|
1387
|
+
org_id?: string;
|
|
1388
|
+
source?: string;
|
|
1389
|
+
source_ref?: import("../types/supabase.types").Json | null;
|
|
1390
|
+
};
|
|
1391
|
+
Relationships: [{
|
|
1392
|
+
foreignKeyName: "usage_credit_grants_org_id_fkey";
|
|
1393
|
+
columns: ["org_id"];
|
|
1394
|
+
isOneToOne: false;
|
|
1395
|
+
referencedRelation: "orgs";
|
|
1396
|
+
referencedColumns: ["id"];
|
|
1397
|
+
}];
|
|
1398
|
+
};
|
|
1399
|
+
usage_credit_transactions: {
|
|
1400
|
+
Row: {
|
|
1401
|
+
amount: number;
|
|
1402
|
+
balance_after: number | null;
|
|
1403
|
+
description: string | null;
|
|
1404
|
+
grant_id: string | null;
|
|
1405
|
+
id: number;
|
|
1406
|
+
occurred_at: string;
|
|
1407
|
+
org_id: string;
|
|
1408
|
+
source_ref: import("../types/supabase.types").Json | null;
|
|
1409
|
+
transaction_type: Database["public"]["Enums"]["credit_transaction_type"];
|
|
1410
|
+
};
|
|
1411
|
+
Insert: {
|
|
1412
|
+
amount: number;
|
|
1413
|
+
balance_after?: number | null;
|
|
1414
|
+
description?: string | null;
|
|
1415
|
+
grant_id?: string | null;
|
|
1416
|
+
id?: number;
|
|
1417
|
+
occurred_at?: string;
|
|
1418
|
+
org_id: string;
|
|
1419
|
+
source_ref?: import("../types/supabase.types").Json | null;
|
|
1420
|
+
transaction_type: Database["public"]["Enums"]["credit_transaction_type"];
|
|
1421
|
+
};
|
|
1422
|
+
Update: {
|
|
1423
|
+
amount?: number;
|
|
1424
|
+
balance_after?: number | null;
|
|
1425
|
+
description?: string | null;
|
|
1426
|
+
grant_id?: string | null;
|
|
1427
|
+
id?: number;
|
|
1428
|
+
occurred_at?: string;
|
|
1429
|
+
org_id?: string;
|
|
1430
|
+
source_ref?: import("../types/supabase.types").Json | null;
|
|
1431
|
+
transaction_type?: Database["public"]["Enums"]["credit_transaction_type"];
|
|
1432
|
+
};
|
|
1433
|
+
Relationships: [{
|
|
1434
|
+
foreignKeyName: "usage_credit_transactions_grant_id_fkey";
|
|
1435
|
+
columns: ["grant_id"];
|
|
1436
|
+
isOneToOne: false;
|
|
1437
|
+
referencedRelation: "usage_credit_grants";
|
|
1438
|
+
referencedColumns: ["id"];
|
|
1439
|
+
}, {
|
|
1440
|
+
foreignKeyName: "usage_credit_transactions_org_id_fkey";
|
|
1441
|
+
columns: ["org_id"];
|
|
1442
|
+
isOneToOne: false;
|
|
1443
|
+
referencedRelation: "orgs";
|
|
1444
|
+
referencedColumns: ["id"];
|
|
1445
|
+
}];
|
|
1446
|
+
};
|
|
1447
|
+
usage_overage_events: {
|
|
1448
|
+
Row: {
|
|
1449
|
+
billing_cycle_end: string | null;
|
|
1450
|
+
billing_cycle_start: string | null;
|
|
1451
|
+
created_at: string;
|
|
1452
|
+
credit_step_id: number | null;
|
|
1453
|
+
credits_debited: number;
|
|
1454
|
+
credits_estimated: number;
|
|
1455
|
+
details: import("../types/supabase.types").Json | null;
|
|
1456
|
+
id: string;
|
|
1457
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1458
|
+
org_id: string;
|
|
1459
|
+
overage_amount: number;
|
|
1460
|
+
};
|
|
1461
|
+
Insert: {
|
|
1462
|
+
billing_cycle_end?: string | null;
|
|
1463
|
+
billing_cycle_start?: string | null;
|
|
1464
|
+
created_at?: string;
|
|
1465
|
+
credit_step_id?: number | null;
|
|
1466
|
+
credits_debited?: number;
|
|
1467
|
+
credits_estimated: number;
|
|
1468
|
+
details?: import("../types/supabase.types").Json | null;
|
|
1469
|
+
id?: string;
|
|
1470
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1471
|
+
org_id: string;
|
|
1472
|
+
overage_amount: number;
|
|
1473
|
+
};
|
|
1474
|
+
Update: {
|
|
1475
|
+
billing_cycle_end?: string | null;
|
|
1476
|
+
billing_cycle_start?: string | null;
|
|
1477
|
+
created_at?: string;
|
|
1478
|
+
credit_step_id?: number | null;
|
|
1479
|
+
credits_debited?: number;
|
|
1480
|
+
credits_estimated?: number;
|
|
1481
|
+
details?: import("../types/supabase.types").Json | null;
|
|
1482
|
+
id?: string;
|
|
1483
|
+
metric?: Database["public"]["Enums"]["credit_metric_type"];
|
|
1484
|
+
org_id?: string;
|
|
1485
|
+
overage_amount?: number;
|
|
1486
|
+
};
|
|
1487
|
+
Relationships: [{
|
|
1488
|
+
foreignKeyName: "usage_overage_events_credit_step_id_fkey";
|
|
1489
|
+
columns: ["credit_step_id"];
|
|
1490
|
+
isOneToOne: false;
|
|
1491
|
+
referencedRelation: "capgo_credits_steps";
|
|
1492
|
+
referencedColumns: ["id"];
|
|
1493
|
+
}, {
|
|
1494
|
+
foreignKeyName: "usage_overage_events_org_id_fkey";
|
|
1495
|
+
columns: ["org_id"];
|
|
1496
|
+
isOneToOne: false;
|
|
1497
|
+
referencedRelation: "orgs";
|
|
1498
|
+
referencedColumns: ["id"];
|
|
1499
|
+
}];
|
|
1500
|
+
};
|
|
1294
1501
|
users: {
|
|
1295
1502
|
Row: {
|
|
1296
1503
|
ban_time: string | null;
|
|
@@ -1376,7 +1583,23 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
1376
1583
|
Relationships: [];
|
|
1377
1584
|
};
|
|
1378
1585
|
};
|
|
1379
|
-
Views: {
|
|
1586
|
+
Views: {
|
|
1587
|
+
usage_credit_balances: {
|
|
1588
|
+
Row: {
|
|
1589
|
+
available_credits: number | null;
|
|
1590
|
+
next_expiration: string | null;
|
|
1591
|
+
org_id: string | null;
|
|
1592
|
+
total_credits: number | null;
|
|
1593
|
+
};
|
|
1594
|
+
Relationships: [{
|
|
1595
|
+
foreignKeyName: "usage_credit_grants_org_id_fkey";
|
|
1596
|
+
columns: ["org_id"];
|
|
1597
|
+
isOneToOne: false;
|
|
1598
|
+
referencedRelation: "orgs";
|
|
1599
|
+
referencedColumns: ["id"];
|
|
1600
|
+
}];
|
|
1601
|
+
};
|
|
1602
|
+
};
|
|
1380
1603
|
Functions: {
|
|
1381
1604
|
accept_invitation_to_org: {
|
|
1382
1605
|
Args: {
|
|
@@ -1384,6 +1607,37 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
1384
1607
|
};
|
|
1385
1608
|
Returns: string;
|
|
1386
1609
|
};
|
|
1610
|
+
apply_usage_overage: {
|
|
1611
|
+
Args: {
|
|
1612
|
+
p_billing_cycle_end: string;
|
|
1613
|
+
p_billing_cycle_start: string;
|
|
1614
|
+
p_details?: import("../types/supabase.types").Json;
|
|
1615
|
+
p_metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1616
|
+
p_org_id: string;
|
|
1617
|
+
p_overage_amount: number;
|
|
1618
|
+
};
|
|
1619
|
+
Returns: {
|
|
1620
|
+
credit_step_id: number;
|
|
1621
|
+
credits_applied: number;
|
|
1622
|
+
credits_remaining: number;
|
|
1623
|
+
credits_required: number;
|
|
1624
|
+
overage_amount: number;
|
|
1625
|
+
overage_covered: number;
|
|
1626
|
+
overage_event_id: string;
|
|
1627
|
+
overage_unpaid: number;
|
|
1628
|
+
}[];
|
|
1629
|
+
};
|
|
1630
|
+
calculate_credit_cost: {
|
|
1631
|
+
Args: {
|
|
1632
|
+
p_metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1633
|
+
p_overage_amount: number;
|
|
1634
|
+
};
|
|
1635
|
+
Returns: {
|
|
1636
|
+
credit_cost_per_unit: number;
|
|
1637
|
+
credit_step_id: number;
|
|
1638
|
+
credits_required: number;
|
|
1639
|
+
}[];
|
|
1640
|
+
};
|
|
1387
1641
|
check_min_rights: {
|
|
1388
1642
|
Args: {
|
|
1389
1643
|
app_id: string;
|
|
@@ -1418,13 +1672,13 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
1418
1672
|
};
|
|
1419
1673
|
convert_bytes_to_gb: {
|
|
1420
1674
|
Args: {
|
|
1421
|
-
|
|
1675
|
+
bytes_value: number;
|
|
1422
1676
|
};
|
|
1423
1677
|
Returns: number;
|
|
1424
1678
|
};
|
|
1425
1679
|
convert_bytes_to_mb: {
|
|
1426
1680
|
Args: {
|
|
1427
|
-
|
|
1681
|
+
bytes_value: number;
|
|
1428
1682
|
};
|
|
1429
1683
|
Returns: number;
|
|
1430
1684
|
};
|
|
@@ -1509,6 +1763,10 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
1509
1763
|
};
|
|
1510
1764
|
Returns: boolean;
|
|
1511
1765
|
};
|
|
1766
|
+
expire_usage_credits: {
|
|
1767
|
+
Args: never;
|
|
1768
|
+
Returns: number;
|
|
1769
|
+
};
|
|
1512
1770
|
find_best_plan_v3: {
|
|
1513
1771
|
Args: {
|
|
1514
1772
|
bandwidth: number;
|
|
@@ -1793,6 +2051,9 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
1793
2051
|
app_count: number;
|
|
1794
2052
|
can_use_more: boolean;
|
|
1795
2053
|
created_by: string;
|
|
2054
|
+
credit_available: number;
|
|
2055
|
+
credit_next_expiration: string;
|
|
2056
|
+
credit_total: number;
|
|
1796
2057
|
gid: string;
|
|
1797
2058
|
is_canceled: boolean;
|
|
1798
2059
|
is_yearly: boolean;
|
|
@@ -1815,6 +2076,9 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
1815
2076
|
app_count: number;
|
|
1816
2077
|
can_use_more: boolean;
|
|
1817
2078
|
created_by: string;
|
|
2079
|
+
credit_available: number;
|
|
2080
|
+
credit_next_expiration: string;
|
|
2081
|
+
credit_total: number;
|
|
1818
2082
|
gid: string;
|
|
1819
2083
|
is_canceled: boolean;
|
|
1820
2084
|
is_yearly: boolean;
|
|
@@ -2217,6 +2481,16 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
2217
2481
|
Args: never;
|
|
2218
2482
|
Returns: undefined;
|
|
2219
2483
|
};
|
|
2484
|
+
process_all_cron_tasks: {
|
|
2485
|
+
Args: never;
|
|
2486
|
+
Returns: undefined;
|
|
2487
|
+
};
|
|
2488
|
+
process_channel_device_counts_queue: {
|
|
2489
|
+
Args: {
|
|
2490
|
+
batch_size?: number;
|
|
2491
|
+
};
|
|
2492
|
+
Returns: number;
|
|
2493
|
+
};
|
|
2220
2494
|
process_cron_stats_jobs: {
|
|
2221
2495
|
Args: never;
|
|
2222
2496
|
Returns: undefined;
|
|
@@ -2238,10 +2512,22 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
2238
2512
|
Returns: undefined;
|
|
2239
2513
|
};
|
|
2240
2514
|
process_function_queue: {
|
|
2515
|
+
Args: {
|
|
2516
|
+
batch_size?: number;
|
|
2517
|
+
queue_names: string[];
|
|
2518
|
+
};
|
|
2519
|
+
Returns: undefined;
|
|
2520
|
+
} | {
|
|
2241
2521
|
Args: {
|
|
2242
2522
|
batch_size?: number;
|
|
2243
2523
|
queue_name: string;
|
|
2244
2524
|
};
|
|
2525
|
+
Returns: undefined;
|
|
2526
|
+
};
|
|
2527
|
+
process_manifest_bundle_counts_queue: {
|
|
2528
|
+
Args: {
|
|
2529
|
+
batch_size?: number;
|
|
2530
|
+
};
|
|
2245
2531
|
Returns: number;
|
|
2246
2532
|
};
|
|
2247
2533
|
process_stats_email_monthly: {
|
|
@@ -2411,11 +2697,13 @@ export declare function findChannelDevices(supabase: SupabaseClient<Database>, a
|
|
|
2411
2697
|
Enums: {
|
|
2412
2698
|
action_type: "mau" | "storage" | "bandwidth";
|
|
2413
2699
|
app_mode: "prod" | "dev" | "livereload";
|
|
2700
|
+
credit_metric_type: "mau" | "bandwidth" | "storage";
|
|
2701
|
+
credit_transaction_type: "grant" | "purchase" | "manual_grant" | "deduction" | "expiry" | "refund";
|
|
2414
2702
|
disable_update: "major" | "minor" | "patch" | "version_number" | "none";
|
|
2415
2703
|
key_mode: "read" | "write" | "all" | "upload";
|
|
2416
2704
|
pay_as_you_go_type: "base" | "units";
|
|
2417
2705
|
platform_os: "ios" | "android";
|
|
2418
|
-
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" | "ping" | "InvalidIp" | "blocked_by_server_url";
|
|
2706
|
+
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" | "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";
|
|
2419
2707
|
stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
|
|
2420
2708
|
usage_mode: "5min" | "day" | "month" | "cycle" | "last_saved";
|
|
2421
2709
|
user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
|
|
@@ -2691,11 +2979,13 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
2691
2979
|
apps: {
|
|
2692
2980
|
Row: {
|
|
2693
2981
|
app_id: string;
|
|
2982
|
+
channel_device_count: number;
|
|
2694
2983
|
created_at: string | null;
|
|
2695
2984
|
default_upload_channel: string;
|
|
2696
2985
|
icon_url: string;
|
|
2697
2986
|
id: string | null;
|
|
2698
2987
|
last_version: string | null;
|
|
2988
|
+
manifest_bundle_count: number;
|
|
2699
2989
|
name: string | null;
|
|
2700
2990
|
owner_org: string;
|
|
2701
2991
|
retention: number;
|
|
@@ -2705,11 +2995,13 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
2705
2995
|
};
|
|
2706
2996
|
Insert: {
|
|
2707
2997
|
app_id: string;
|
|
2998
|
+
channel_device_count?: number;
|
|
2708
2999
|
created_at?: string | null;
|
|
2709
3000
|
default_upload_channel?: string;
|
|
2710
3001
|
icon_url: string;
|
|
2711
3002
|
id?: string | null;
|
|
2712
3003
|
last_version?: string | null;
|
|
3004
|
+
manifest_bundle_count?: number;
|
|
2713
3005
|
name?: string | null;
|
|
2714
3006
|
owner_org: string;
|
|
2715
3007
|
retention?: number;
|
|
@@ -2719,11 +3011,13 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
2719
3011
|
};
|
|
2720
3012
|
Update: {
|
|
2721
3013
|
app_id?: string;
|
|
3014
|
+
channel_device_count?: number;
|
|
2722
3015
|
created_at?: string | null;
|
|
2723
3016
|
default_upload_channel?: string;
|
|
2724
3017
|
icon_url?: string;
|
|
2725
3018
|
id?: string | null;
|
|
2726
3019
|
last_version?: string | null;
|
|
3020
|
+
manifest_bundle_count?: number;
|
|
2727
3021
|
name?: string | null;
|
|
2728
3022
|
owner_org?: string;
|
|
2729
3023
|
retention?: number;
|
|
@@ -2773,10 +3067,10 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
2773
3067
|
Row: {
|
|
2774
3068
|
created_at: string;
|
|
2775
3069
|
id: number;
|
|
3070
|
+
org_id: string | null;
|
|
2776
3071
|
price_per_unit: number;
|
|
2777
3072
|
step_max: number;
|
|
2778
3073
|
step_min: number;
|
|
2779
|
-
stripe_id: string | null;
|
|
2780
3074
|
type: string;
|
|
2781
3075
|
unit_factor: number;
|
|
2782
3076
|
updated_at: string;
|
|
@@ -2784,10 +3078,10 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
2784
3078
|
Insert: {
|
|
2785
3079
|
created_at?: string;
|
|
2786
3080
|
id?: number;
|
|
3081
|
+
org_id?: string | null;
|
|
2787
3082
|
price_per_unit: number;
|
|
2788
3083
|
step_max: number;
|
|
2789
3084
|
step_min: number;
|
|
2790
|
-
stripe_id?: string | null;
|
|
2791
3085
|
type: string;
|
|
2792
3086
|
unit_factor?: number;
|
|
2793
3087
|
updated_at?: string;
|
|
@@ -2795,15 +3089,21 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
2795
3089
|
Update: {
|
|
2796
3090
|
created_at?: string;
|
|
2797
3091
|
id?: number;
|
|
3092
|
+
org_id?: string | null;
|
|
2798
3093
|
price_per_unit?: number;
|
|
2799
3094
|
step_max?: number;
|
|
2800
3095
|
step_min?: number;
|
|
2801
|
-
stripe_id?: string | null;
|
|
2802
3096
|
type?: string;
|
|
2803
3097
|
unit_factor?: number;
|
|
2804
3098
|
updated_at?: string;
|
|
2805
3099
|
};
|
|
2806
|
-
Relationships: [
|
|
3100
|
+
Relationships: [{
|
|
3101
|
+
foreignKeyName: "capgo_credits_steps_org_id_fkey";
|
|
3102
|
+
columns: ["org_id"];
|
|
3103
|
+
isOneToOne: false;
|
|
3104
|
+
referencedRelation: "orgs";
|
|
3105
|
+
referencedColumns: ["id"];
|
|
3106
|
+
}];
|
|
2807
3107
|
};
|
|
2808
3108
|
channel_devices: {
|
|
2809
3109
|
Row: {
|
|
@@ -3151,6 +3451,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3151
3451
|
Row: {
|
|
3152
3452
|
app_id: string;
|
|
3153
3453
|
custom_id: string;
|
|
3454
|
+
default_channel: string | null;
|
|
3154
3455
|
device_id: string;
|
|
3155
3456
|
id: number;
|
|
3156
3457
|
is_emulator: boolean | null;
|
|
@@ -3166,6 +3467,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3166
3467
|
Insert: {
|
|
3167
3468
|
app_id: string;
|
|
3168
3469
|
custom_id?: string;
|
|
3470
|
+
default_channel?: string | null;
|
|
3169
3471
|
device_id: string;
|
|
3170
3472
|
id?: never;
|
|
3171
3473
|
is_emulator?: boolean | null;
|
|
@@ -3181,6 +3483,7 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3181
3483
|
Update: {
|
|
3182
3484
|
app_id?: string;
|
|
3183
3485
|
custom_id?: string;
|
|
3486
|
+
default_channel?: string | null;
|
|
3184
3487
|
device_id?: string;
|
|
3185
3488
|
id?: never;
|
|
3186
3489
|
is_emulator?: boolean | null;
|
|
@@ -3723,6 +4026,198 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3723
4026
|
referencedColumns: ["id"];
|
|
3724
4027
|
}];
|
|
3725
4028
|
};
|
|
4029
|
+
usage_credit_consumptions: {
|
|
4030
|
+
Row: {
|
|
4031
|
+
applied_at: string;
|
|
4032
|
+
credits_used: number;
|
|
4033
|
+
grant_id: string;
|
|
4034
|
+
id: number;
|
|
4035
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
4036
|
+
org_id: string;
|
|
4037
|
+
overage_event_id: string | null;
|
|
4038
|
+
};
|
|
4039
|
+
Insert: {
|
|
4040
|
+
applied_at?: string;
|
|
4041
|
+
credits_used: number;
|
|
4042
|
+
grant_id: string;
|
|
4043
|
+
id?: number;
|
|
4044
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
4045
|
+
org_id: string;
|
|
4046
|
+
overage_event_id?: string | null;
|
|
4047
|
+
};
|
|
4048
|
+
Update: {
|
|
4049
|
+
applied_at?: string;
|
|
4050
|
+
credits_used?: number;
|
|
4051
|
+
grant_id?: string;
|
|
4052
|
+
id?: number;
|
|
4053
|
+
metric?: Database["public"]["Enums"]["credit_metric_type"];
|
|
4054
|
+
org_id?: string;
|
|
4055
|
+
overage_event_id?: string | null;
|
|
4056
|
+
};
|
|
4057
|
+
Relationships: [{
|
|
4058
|
+
foreignKeyName: "usage_credit_consumptions_grant_id_fkey";
|
|
4059
|
+
columns: ["grant_id"];
|
|
4060
|
+
isOneToOne: false;
|
|
4061
|
+
referencedRelation: "usage_credit_grants";
|
|
4062
|
+
referencedColumns: ["id"];
|
|
4063
|
+
}, {
|
|
4064
|
+
foreignKeyName: "usage_credit_consumptions_org_id_fkey";
|
|
4065
|
+
columns: ["org_id"];
|
|
4066
|
+
isOneToOne: false;
|
|
4067
|
+
referencedRelation: "orgs";
|
|
4068
|
+
referencedColumns: ["id"];
|
|
4069
|
+
}, {
|
|
4070
|
+
foreignKeyName: "usage_credit_consumptions_overage_event_id_fkey";
|
|
4071
|
+
columns: ["overage_event_id"];
|
|
4072
|
+
isOneToOne: false;
|
|
4073
|
+
referencedRelation: "usage_overage_events";
|
|
4074
|
+
referencedColumns: ["id"];
|
|
4075
|
+
}];
|
|
4076
|
+
};
|
|
4077
|
+
usage_credit_grants: {
|
|
4078
|
+
Row: {
|
|
4079
|
+
credits_consumed: number;
|
|
4080
|
+
credits_total: number;
|
|
4081
|
+
expires_at: string;
|
|
4082
|
+
granted_at: string;
|
|
4083
|
+
id: string;
|
|
4084
|
+
notes: string | null;
|
|
4085
|
+
org_id: string;
|
|
4086
|
+
source: string;
|
|
4087
|
+
source_ref: import("../types/supabase.types").Json | null;
|
|
4088
|
+
};
|
|
4089
|
+
Insert: {
|
|
4090
|
+
credits_consumed?: number;
|
|
4091
|
+
credits_total: number;
|
|
4092
|
+
expires_at?: string;
|
|
4093
|
+
granted_at?: string;
|
|
4094
|
+
id?: string;
|
|
4095
|
+
notes?: string | null;
|
|
4096
|
+
org_id: string;
|
|
4097
|
+
source?: string;
|
|
4098
|
+
source_ref?: import("../types/supabase.types").Json | null;
|
|
4099
|
+
};
|
|
4100
|
+
Update: {
|
|
4101
|
+
credits_consumed?: number;
|
|
4102
|
+
credits_total?: number;
|
|
4103
|
+
expires_at?: string;
|
|
4104
|
+
granted_at?: string;
|
|
4105
|
+
id?: string;
|
|
4106
|
+
notes?: string | null;
|
|
4107
|
+
org_id?: string;
|
|
4108
|
+
source?: string;
|
|
4109
|
+
source_ref?: import("../types/supabase.types").Json | null;
|
|
4110
|
+
};
|
|
4111
|
+
Relationships: [{
|
|
4112
|
+
foreignKeyName: "usage_credit_grants_org_id_fkey";
|
|
4113
|
+
columns: ["org_id"];
|
|
4114
|
+
isOneToOne: false;
|
|
4115
|
+
referencedRelation: "orgs";
|
|
4116
|
+
referencedColumns: ["id"];
|
|
4117
|
+
}];
|
|
4118
|
+
};
|
|
4119
|
+
usage_credit_transactions: {
|
|
4120
|
+
Row: {
|
|
4121
|
+
amount: number;
|
|
4122
|
+
balance_after: number | null;
|
|
4123
|
+
description: string | null;
|
|
4124
|
+
grant_id: string | null;
|
|
4125
|
+
id: number;
|
|
4126
|
+
occurred_at: string;
|
|
4127
|
+
org_id: string;
|
|
4128
|
+
source_ref: import("../types/supabase.types").Json | null;
|
|
4129
|
+
transaction_type: Database["public"]["Enums"]["credit_transaction_type"];
|
|
4130
|
+
};
|
|
4131
|
+
Insert: {
|
|
4132
|
+
amount: number;
|
|
4133
|
+
balance_after?: number | null;
|
|
4134
|
+
description?: string | null;
|
|
4135
|
+
grant_id?: string | null;
|
|
4136
|
+
id?: number;
|
|
4137
|
+
occurred_at?: string;
|
|
4138
|
+
org_id: string;
|
|
4139
|
+
source_ref?: import("../types/supabase.types").Json | null;
|
|
4140
|
+
transaction_type: Database["public"]["Enums"]["credit_transaction_type"];
|
|
4141
|
+
};
|
|
4142
|
+
Update: {
|
|
4143
|
+
amount?: number;
|
|
4144
|
+
balance_after?: number | null;
|
|
4145
|
+
description?: string | null;
|
|
4146
|
+
grant_id?: string | null;
|
|
4147
|
+
id?: number;
|
|
4148
|
+
occurred_at?: string;
|
|
4149
|
+
org_id?: string;
|
|
4150
|
+
source_ref?: import("../types/supabase.types").Json | null;
|
|
4151
|
+
transaction_type?: Database["public"]["Enums"]["credit_transaction_type"];
|
|
4152
|
+
};
|
|
4153
|
+
Relationships: [{
|
|
4154
|
+
foreignKeyName: "usage_credit_transactions_grant_id_fkey";
|
|
4155
|
+
columns: ["grant_id"];
|
|
4156
|
+
isOneToOne: false;
|
|
4157
|
+
referencedRelation: "usage_credit_grants";
|
|
4158
|
+
referencedColumns: ["id"];
|
|
4159
|
+
}, {
|
|
4160
|
+
foreignKeyName: "usage_credit_transactions_org_id_fkey";
|
|
4161
|
+
columns: ["org_id"];
|
|
4162
|
+
isOneToOne: false;
|
|
4163
|
+
referencedRelation: "orgs";
|
|
4164
|
+
referencedColumns: ["id"];
|
|
4165
|
+
}];
|
|
4166
|
+
};
|
|
4167
|
+
usage_overage_events: {
|
|
4168
|
+
Row: {
|
|
4169
|
+
billing_cycle_end: string | null;
|
|
4170
|
+
billing_cycle_start: string | null;
|
|
4171
|
+
created_at: string;
|
|
4172
|
+
credit_step_id: number | null;
|
|
4173
|
+
credits_debited: number;
|
|
4174
|
+
credits_estimated: number;
|
|
4175
|
+
details: import("../types/supabase.types").Json | null;
|
|
4176
|
+
id: string;
|
|
4177
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
4178
|
+
org_id: string;
|
|
4179
|
+
overage_amount: number;
|
|
4180
|
+
};
|
|
4181
|
+
Insert: {
|
|
4182
|
+
billing_cycle_end?: string | null;
|
|
4183
|
+
billing_cycle_start?: string | null;
|
|
4184
|
+
created_at?: string;
|
|
4185
|
+
credit_step_id?: number | null;
|
|
4186
|
+
credits_debited?: number;
|
|
4187
|
+
credits_estimated: number;
|
|
4188
|
+
details?: import("../types/supabase.types").Json | null;
|
|
4189
|
+
id?: string;
|
|
4190
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
4191
|
+
org_id: string;
|
|
4192
|
+
overage_amount: number;
|
|
4193
|
+
};
|
|
4194
|
+
Update: {
|
|
4195
|
+
billing_cycle_end?: string | null;
|
|
4196
|
+
billing_cycle_start?: string | null;
|
|
4197
|
+
created_at?: string;
|
|
4198
|
+
credit_step_id?: number | null;
|
|
4199
|
+
credits_debited?: number;
|
|
4200
|
+
credits_estimated?: number;
|
|
4201
|
+
details?: import("../types/supabase.types").Json | null;
|
|
4202
|
+
id?: string;
|
|
4203
|
+
metric?: Database["public"]["Enums"]["credit_metric_type"];
|
|
4204
|
+
org_id?: string;
|
|
4205
|
+
overage_amount?: number;
|
|
4206
|
+
};
|
|
4207
|
+
Relationships: [{
|
|
4208
|
+
foreignKeyName: "usage_overage_events_credit_step_id_fkey";
|
|
4209
|
+
columns: ["credit_step_id"];
|
|
4210
|
+
isOneToOne: false;
|
|
4211
|
+
referencedRelation: "capgo_credits_steps";
|
|
4212
|
+
referencedColumns: ["id"];
|
|
4213
|
+
}, {
|
|
4214
|
+
foreignKeyName: "usage_overage_events_org_id_fkey";
|
|
4215
|
+
columns: ["org_id"];
|
|
4216
|
+
isOneToOne: false;
|
|
4217
|
+
referencedRelation: "orgs";
|
|
4218
|
+
referencedColumns: ["id"];
|
|
4219
|
+
}];
|
|
4220
|
+
};
|
|
3726
4221
|
users: {
|
|
3727
4222
|
Row: {
|
|
3728
4223
|
ban_time: string | null;
|
|
@@ -3808,7 +4303,23 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3808
4303
|
Relationships: [];
|
|
3809
4304
|
};
|
|
3810
4305
|
};
|
|
3811
|
-
Views: {
|
|
4306
|
+
Views: {
|
|
4307
|
+
usage_credit_balances: {
|
|
4308
|
+
Row: {
|
|
4309
|
+
available_credits: number | null;
|
|
4310
|
+
next_expiration: string | null;
|
|
4311
|
+
org_id: string | null;
|
|
4312
|
+
total_credits: number | null;
|
|
4313
|
+
};
|
|
4314
|
+
Relationships: [{
|
|
4315
|
+
foreignKeyName: "usage_credit_grants_org_id_fkey";
|
|
4316
|
+
columns: ["org_id"];
|
|
4317
|
+
isOneToOne: false;
|
|
4318
|
+
referencedRelation: "orgs";
|
|
4319
|
+
referencedColumns: ["id"];
|
|
4320
|
+
}];
|
|
4321
|
+
};
|
|
4322
|
+
};
|
|
3812
4323
|
Functions: {
|
|
3813
4324
|
accept_invitation_to_org: {
|
|
3814
4325
|
Args: {
|
|
@@ -3816,6 +4327,37 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3816
4327
|
};
|
|
3817
4328
|
Returns: string;
|
|
3818
4329
|
};
|
|
4330
|
+
apply_usage_overage: {
|
|
4331
|
+
Args: {
|
|
4332
|
+
p_billing_cycle_end: string;
|
|
4333
|
+
p_billing_cycle_start: string;
|
|
4334
|
+
p_details?: import("../types/supabase.types").Json;
|
|
4335
|
+
p_metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
4336
|
+
p_org_id: string;
|
|
4337
|
+
p_overage_amount: number;
|
|
4338
|
+
};
|
|
4339
|
+
Returns: {
|
|
4340
|
+
credit_step_id: number;
|
|
4341
|
+
credits_applied: number;
|
|
4342
|
+
credits_remaining: number;
|
|
4343
|
+
credits_required: number;
|
|
4344
|
+
overage_amount: number;
|
|
4345
|
+
overage_covered: number;
|
|
4346
|
+
overage_event_id: string;
|
|
4347
|
+
overage_unpaid: number;
|
|
4348
|
+
}[];
|
|
4349
|
+
};
|
|
4350
|
+
calculate_credit_cost: {
|
|
4351
|
+
Args: {
|
|
4352
|
+
p_metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
4353
|
+
p_overage_amount: number;
|
|
4354
|
+
};
|
|
4355
|
+
Returns: {
|
|
4356
|
+
credit_cost_per_unit: number;
|
|
4357
|
+
credit_step_id: number;
|
|
4358
|
+
credits_required: number;
|
|
4359
|
+
}[];
|
|
4360
|
+
};
|
|
3819
4361
|
check_min_rights: {
|
|
3820
4362
|
Args: {
|
|
3821
4363
|
app_id: string;
|
|
@@ -3850,13 +4392,13 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3850
4392
|
};
|
|
3851
4393
|
convert_bytes_to_gb: {
|
|
3852
4394
|
Args: {
|
|
3853
|
-
|
|
4395
|
+
bytes_value: number;
|
|
3854
4396
|
};
|
|
3855
4397
|
Returns: number;
|
|
3856
4398
|
};
|
|
3857
4399
|
convert_bytes_to_mb: {
|
|
3858
4400
|
Args: {
|
|
3859
|
-
|
|
4401
|
+
bytes_value: number;
|
|
3860
4402
|
};
|
|
3861
4403
|
Returns: number;
|
|
3862
4404
|
};
|
|
@@ -3941,6 +4483,10 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
3941
4483
|
};
|
|
3942
4484
|
Returns: boolean;
|
|
3943
4485
|
};
|
|
4486
|
+
expire_usage_credits: {
|
|
4487
|
+
Args: never;
|
|
4488
|
+
Returns: number;
|
|
4489
|
+
};
|
|
3944
4490
|
find_best_plan_v3: {
|
|
3945
4491
|
Args: {
|
|
3946
4492
|
bandwidth: number;
|
|
@@ -4225,6 +4771,9 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
4225
4771
|
app_count: number;
|
|
4226
4772
|
can_use_more: boolean;
|
|
4227
4773
|
created_by: string;
|
|
4774
|
+
credit_available: number;
|
|
4775
|
+
credit_next_expiration: string;
|
|
4776
|
+
credit_total: number;
|
|
4228
4777
|
gid: string;
|
|
4229
4778
|
is_canceled: boolean;
|
|
4230
4779
|
is_yearly: boolean;
|
|
@@ -4247,6 +4796,9 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
4247
4796
|
app_count: number;
|
|
4248
4797
|
can_use_more: boolean;
|
|
4249
4798
|
created_by: string;
|
|
4799
|
+
credit_available: number;
|
|
4800
|
+
credit_next_expiration: string;
|
|
4801
|
+
credit_total: number;
|
|
4250
4802
|
gid: string;
|
|
4251
4803
|
is_canceled: boolean;
|
|
4252
4804
|
is_yearly: boolean;
|
|
@@ -4649,6 +5201,16 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
4649
5201
|
Args: never;
|
|
4650
5202
|
Returns: undefined;
|
|
4651
5203
|
};
|
|
5204
|
+
process_all_cron_tasks: {
|
|
5205
|
+
Args: never;
|
|
5206
|
+
Returns: undefined;
|
|
5207
|
+
};
|
|
5208
|
+
process_channel_device_counts_queue: {
|
|
5209
|
+
Args: {
|
|
5210
|
+
batch_size?: number;
|
|
5211
|
+
};
|
|
5212
|
+
Returns: number;
|
|
5213
|
+
};
|
|
4652
5214
|
process_cron_stats_jobs: {
|
|
4653
5215
|
Args: never;
|
|
4654
5216
|
Returns: undefined;
|
|
@@ -4670,10 +5232,22 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
4670
5232
|
Returns: undefined;
|
|
4671
5233
|
};
|
|
4672
5234
|
process_function_queue: {
|
|
5235
|
+
Args: {
|
|
5236
|
+
batch_size?: number;
|
|
5237
|
+
queue_names: string[];
|
|
5238
|
+
};
|
|
5239
|
+
Returns: undefined;
|
|
5240
|
+
} | {
|
|
4673
5241
|
Args: {
|
|
4674
5242
|
batch_size?: number;
|
|
4675
5243
|
queue_name: string;
|
|
4676
5244
|
};
|
|
5245
|
+
Returns: undefined;
|
|
5246
|
+
};
|
|
5247
|
+
process_manifest_bundle_counts_queue: {
|
|
5248
|
+
Args: {
|
|
5249
|
+
batch_size?: number;
|
|
5250
|
+
};
|
|
4677
5251
|
Returns: number;
|
|
4678
5252
|
};
|
|
4679
5253
|
process_stats_email_monthly: {
|
|
@@ -4843,11 +5417,13 @@ export declare function delChannelDevices(supabase: SupabaseClient<Database>, ap
|
|
|
4843
5417
|
Enums: {
|
|
4844
5418
|
action_type: "mau" | "storage" | "bandwidth";
|
|
4845
5419
|
app_mode: "prod" | "dev" | "livereload";
|
|
5420
|
+
credit_metric_type: "mau" | "bandwidth" | "storage";
|
|
5421
|
+
credit_transaction_type: "grant" | "purchase" | "manual_grant" | "deduction" | "expiry" | "refund";
|
|
4846
5422
|
disable_update: "major" | "minor" | "patch" | "version_number" | "none";
|
|
4847
5423
|
key_mode: "read" | "write" | "all" | "upload";
|
|
4848
5424
|
pay_as_you_go_type: "base" | "units";
|
|
4849
5425
|
platform_os: "ios" | "android";
|
|
4850
|
-
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" | "ping" | "InvalidIp" | "blocked_by_server_url";
|
|
5426
|
+
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" | "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";
|
|
4851
5427
|
stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
|
|
4852
5428
|
usage_mode: "5min" | "day" | "month" | "cycle" | "last_saved";
|
|
4853
5429
|
user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
|