@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
|
@@ -219,11 +219,13 @@ export type Database = {
|
|
|
219
219
|
apps: {
|
|
220
220
|
Row: {
|
|
221
221
|
app_id: string;
|
|
222
|
+
channel_device_count: number;
|
|
222
223
|
created_at: string | null;
|
|
223
224
|
default_upload_channel: string;
|
|
224
225
|
icon_url: string;
|
|
225
226
|
id: string | null;
|
|
226
227
|
last_version: string | null;
|
|
228
|
+
manifest_bundle_count: number;
|
|
227
229
|
name: string | null;
|
|
228
230
|
owner_org: string;
|
|
229
231
|
retention: number;
|
|
@@ -233,11 +235,13 @@ export type Database = {
|
|
|
233
235
|
};
|
|
234
236
|
Insert: {
|
|
235
237
|
app_id: string;
|
|
238
|
+
channel_device_count?: number;
|
|
236
239
|
created_at?: string | null;
|
|
237
240
|
default_upload_channel?: string;
|
|
238
241
|
icon_url: string;
|
|
239
242
|
id?: string | null;
|
|
240
243
|
last_version?: string | null;
|
|
244
|
+
manifest_bundle_count?: number;
|
|
241
245
|
name?: string | null;
|
|
242
246
|
owner_org: string;
|
|
243
247
|
retention?: number;
|
|
@@ -247,11 +251,13 @@ export type Database = {
|
|
|
247
251
|
};
|
|
248
252
|
Update: {
|
|
249
253
|
app_id?: string;
|
|
254
|
+
channel_device_count?: number;
|
|
250
255
|
created_at?: string | null;
|
|
251
256
|
default_upload_channel?: string;
|
|
252
257
|
icon_url?: string;
|
|
253
258
|
id?: string | null;
|
|
254
259
|
last_version?: string | null;
|
|
260
|
+
manifest_bundle_count?: number;
|
|
255
261
|
name?: string | null;
|
|
256
262
|
owner_org?: string;
|
|
257
263
|
retention?: number;
|
|
@@ -304,10 +310,10 @@ export type Database = {
|
|
|
304
310
|
Row: {
|
|
305
311
|
created_at: string;
|
|
306
312
|
id: number;
|
|
313
|
+
org_id: string | null;
|
|
307
314
|
price_per_unit: number;
|
|
308
315
|
step_max: number;
|
|
309
316
|
step_min: number;
|
|
310
|
-
stripe_id: string | null;
|
|
311
317
|
type: string;
|
|
312
318
|
unit_factor: number;
|
|
313
319
|
updated_at: string;
|
|
@@ -315,10 +321,10 @@ export type Database = {
|
|
|
315
321
|
Insert: {
|
|
316
322
|
created_at?: string;
|
|
317
323
|
id?: number;
|
|
324
|
+
org_id?: string | null;
|
|
318
325
|
price_per_unit: number;
|
|
319
326
|
step_max: number;
|
|
320
327
|
step_min: number;
|
|
321
|
-
stripe_id?: string | null;
|
|
322
328
|
type: string;
|
|
323
329
|
unit_factor?: number;
|
|
324
330
|
updated_at?: string;
|
|
@@ -326,15 +332,23 @@ export type Database = {
|
|
|
326
332
|
Update: {
|
|
327
333
|
created_at?: string;
|
|
328
334
|
id?: number;
|
|
335
|
+
org_id?: string | null;
|
|
329
336
|
price_per_unit?: number;
|
|
330
337
|
step_max?: number;
|
|
331
338
|
step_min?: number;
|
|
332
|
-
stripe_id?: string | null;
|
|
333
339
|
type?: string;
|
|
334
340
|
unit_factor?: number;
|
|
335
341
|
updated_at?: string;
|
|
336
342
|
};
|
|
337
|
-
Relationships: [
|
|
343
|
+
Relationships: [
|
|
344
|
+
{
|
|
345
|
+
foreignKeyName: "capgo_credits_steps_org_id_fkey";
|
|
346
|
+
columns: ["org_id"];
|
|
347
|
+
isOneToOne: false;
|
|
348
|
+
referencedRelation: "orgs";
|
|
349
|
+
referencedColumns: ["id"];
|
|
350
|
+
}
|
|
351
|
+
];
|
|
338
352
|
};
|
|
339
353
|
channel_devices: {
|
|
340
354
|
Row: {
|
|
@@ -695,6 +709,7 @@ export type Database = {
|
|
|
695
709
|
Row: {
|
|
696
710
|
app_id: string;
|
|
697
711
|
custom_id: string;
|
|
712
|
+
default_channel: string | null;
|
|
698
713
|
device_id: string;
|
|
699
714
|
id: number;
|
|
700
715
|
is_emulator: boolean | null;
|
|
@@ -710,6 +725,7 @@ export type Database = {
|
|
|
710
725
|
Insert: {
|
|
711
726
|
app_id: string;
|
|
712
727
|
custom_id?: string;
|
|
728
|
+
default_channel?: string | null;
|
|
713
729
|
device_id: string;
|
|
714
730
|
id?: never;
|
|
715
731
|
is_emulator?: boolean | null;
|
|
@@ -725,6 +741,7 @@ export type Database = {
|
|
|
725
741
|
Update: {
|
|
726
742
|
app_id?: string;
|
|
727
743
|
custom_id?: string;
|
|
744
|
+
default_channel?: string | null;
|
|
728
745
|
device_id?: string;
|
|
729
746
|
id?: never;
|
|
730
747
|
is_emulator?: boolean | null;
|
|
@@ -1285,6 +1302,210 @@ export type Database = {
|
|
|
1285
1302
|
}
|
|
1286
1303
|
];
|
|
1287
1304
|
};
|
|
1305
|
+
usage_credit_consumptions: {
|
|
1306
|
+
Row: {
|
|
1307
|
+
applied_at: string;
|
|
1308
|
+
credits_used: number;
|
|
1309
|
+
grant_id: string;
|
|
1310
|
+
id: number;
|
|
1311
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1312
|
+
org_id: string;
|
|
1313
|
+
overage_event_id: string | null;
|
|
1314
|
+
};
|
|
1315
|
+
Insert: {
|
|
1316
|
+
applied_at?: string;
|
|
1317
|
+
credits_used: number;
|
|
1318
|
+
grant_id: string;
|
|
1319
|
+
id?: number;
|
|
1320
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1321
|
+
org_id: string;
|
|
1322
|
+
overage_event_id?: string | null;
|
|
1323
|
+
};
|
|
1324
|
+
Update: {
|
|
1325
|
+
applied_at?: string;
|
|
1326
|
+
credits_used?: number;
|
|
1327
|
+
grant_id?: string;
|
|
1328
|
+
id?: number;
|
|
1329
|
+
metric?: Database["public"]["Enums"]["credit_metric_type"];
|
|
1330
|
+
org_id?: string;
|
|
1331
|
+
overage_event_id?: string | null;
|
|
1332
|
+
};
|
|
1333
|
+
Relationships: [
|
|
1334
|
+
{
|
|
1335
|
+
foreignKeyName: "usage_credit_consumptions_grant_id_fkey";
|
|
1336
|
+
columns: ["grant_id"];
|
|
1337
|
+
isOneToOne: false;
|
|
1338
|
+
referencedRelation: "usage_credit_grants";
|
|
1339
|
+
referencedColumns: ["id"];
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
foreignKeyName: "usage_credit_consumptions_org_id_fkey";
|
|
1343
|
+
columns: ["org_id"];
|
|
1344
|
+
isOneToOne: false;
|
|
1345
|
+
referencedRelation: "orgs";
|
|
1346
|
+
referencedColumns: ["id"];
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
foreignKeyName: "usage_credit_consumptions_overage_event_id_fkey";
|
|
1350
|
+
columns: ["overage_event_id"];
|
|
1351
|
+
isOneToOne: false;
|
|
1352
|
+
referencedRelation: "usage_overage_events";
|
|
1353
|
+
referencedColumns: ["id"];
|
|
1354
|
+
}
|
|
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: 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?: 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?: Json | null;
|
|
1390
|
+
};
|
|
1391
|
+
Relationships: [
|
|
1392
|
+
{
|
|
1393
|
+
foreignKeyName: "usage_credit_grants_org_id_fkey";
|
|
1394
|
+
columns: ["org_id"];
|
|
1395
|
+
isOneToOne: false;
|
|
1396
|
+
referencedRelation: "orgs";
|
|
1397
|
+
referencedColumns: ["id"];
|
|
1398
|
+
}
|
|
1399
|
+
];
|
|
1400
|
+
};
|
|
1401
|
+
usage_credit_transactions: {
|
|
1402
|
+
Row: {
|
|
1403
|
+
amount: number;
|
|
1404
|
+
balance_after: number | null;
|
|
1405
|
+
description: string | null;
|
|
1406
|
+
grant_id: string | null;
|
|
1407
|
+
id: number;
|
|
1408
|
+
occurred_at: string;
|
|
1409
|
+
org_id: string;
|
|
1410
|
+
source_ref: Json | null;
|
|
1411
|
+
transaction_type: Database["public"]["Enums"]["credit_transaction_type"];
|
|
1412
|
+
};
|
|
1413
|
+
Insert: {
|
|
1414
|
+
amount: number;
|
|
1415
|
+
balance_after?: number | null;
|
|
1416
|
+
description?: string | null;
|
|
1417
|
+
grant_id?: string | null;
|
|
1418
|
+
id?: number;
|
|
1419
|
+
occurred_at?: string;
|
|
1420
|
+
org_id: string;
|
|
1421
|
+
source_ref?: Json | null;
|
|
1422
|
+
transaction_type: Database["public"]["Enums"]["credit_transaction_type"];
|
|
1423
|
+
};
|
|
1424
|
+
Update: {
|
|
1425
|
+
amount?: number;
|
|
1426
|
+
balance_after?: number | null;
|
|
1427
|
+
description?: string | null;
|
|
1428
|
+
grant_id?: string | null;
|
|
1429
|
+
id?: number;
|
|
1430
|
+
occurred_at?: string;
|
|
1431
|
+
org_id?: string;
|
|
1432
|
+
source_ref?: Json | null;
|
|
1433
|
+
transaction_type?: Database["public"]["Enums"]["credit_transaction_type"];
|
|
1434
|
+
};
|
|
1435
|
+
Relationships: [
|
|
1436
|
+
{
|
|
1437
|
+
foreignKeyName: "usage_credit_transactions_grant_id_fkey";
|
|
1438
|
+
columns: ["grant_id"];
|
|
1439
|
+
isOneToOne: false;
|
|
1440
|
+
referencedRelation: "usage_credit_grants";
|
|
1441
|
+
referencedColumns: ["id"];
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
foreignKeyName: "usage_credit_transactions_org_id_fkey";
|
|
1445
|
+
columns: ["org_id"];
|
|
1446
|
+
isOneToOne: false;
|
|
1447
|
+
referencedRelation: "orgs";
|
|
1448
|
+
referencedColumns: ["id"];
|
|
1449
|
+
}
|
|
1450
|
+
];
|
|
1451
|
+
};
|
|
1452
|
+
usage_overage_events: {
|
|
1453
|
+
Row: {
|
|
1454
|
+
billing_cycle_end: string | null;
|
|
1455
|
+
billing_cycle_start: string | null;
|
|
1456
|
+
created_at: string;
|
|
1457
|
+
credit_step_id: number | null;
|
|
1458
|
+
credits_debited: number;
|
|
1459
|
+
credits_estimated: number;
|
|
1460
|
+
details: Json | null;
|
|
1461
|
+
id: string;
|
|
1462
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1463
|
+
org_id: string;
|
|
1464
|
+
overage_amount: number;
|
|
1465
|
+
};
|
|
1466
|
+
Insert: {
|
|
1467
|
+
billing_cycle_end?: string | null;
|
|
1468
|
+
billing_cycle_start?: string | null;
|
|
1469
|
+
created_at?: string;
|
|
1470
|
+
credit_step_id?: number | null;
|
|
1471
|
+
credits_debited?: number;
|
|
1472
|
+
credits_estimated: number;
|
|
1473
|
+
details?: Json | null;
|
|
1474
|
+
id?: string;
|
|
1475
|
+
metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1476
|
+
org_id: string;
|
|
1477
|
+
overage_amount: number;
|
|
1478
|
+
};
|
|
1479
|
+
Update: {
|
|
1480
|
+
billing_cycle_end?: string | null;
|
|
1481
|
+
billing_cycle_start?: string | null;
|
|
1482
|
+
created_at?: string;
|
|
1483
|
+
credit_step_id?: number | null;
|
|
1484
|
+
credits_debited?: number;
|
|
1485
|
+
credits_estimated?: number;
|
|
1486
|
+
details?: Json | null;
|
|
1487
|
+
id?: string;
|
|
1488
|
+
metric?: Database["public"]["Enums"]["credit_metric_type"];
|
|
1489
|
+
org_id?: string;
|
|
1490
|
+
overage_amount?: number;
|
|
1491
|
+
};
|
|
1492
|
+
Relationships: [
|
|
1493
|
+
{
|
|
1494
|
+
foreignKeyName: "usage_overage_events_credit_step_id_fkey";
|
|
1495
|
+
columns: ["credit_step_id"];
|
|
1496
|
+
isOneToOne: false;
|
|
1497
|
+
referencedRelation: "capgo_credits_steps";
|
|
1498
|
+
referencedColumns: ["id"];
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
foreignKeyName: "usage_overage_events_org_id_fkey";
|
|
1502
|
+
columns: ["org_id"];
|
|
1503
|
+
isOneToOne: false;
|
|
1504
|
+
referencedRelation: "orgs";
|
|
1505
|
+
referencedColumns: ["id"];
|
|
1506
|
+
}
|
|
1507
|
+
];
|
|
1508
|
+
};
|
|
1288
1509
|
users: {
|
|
1289
1510
|
Row: {
|
|
1290
1511
|
ban_time: string | null;
|
|
@@ -1371,7 +1592,23 @@ export type Database = {
|
|
|
1371
1592
|
};
|
|
1372
1593
|
};
|
|
1373
1594
|
Views: {
|
|
1374
|
-
|
|
1595
|
+
usage_credit_balances: {
|
|
1596
|
+
Row: {
|
|
1597
|
+
available_credits: number | null;
|
|
1598
|
+
next_expiration: string | null;
|
|
1599
|
+
org_id: string | null;
|
|
1600
|
+
total_credits: number | null;
|
|
1601
|
+
};
|
|
1602
|
+
Relationships: [
|
|
1603
|
+
{
|
|
1604
|
+
foreignKeyName: "usage_credit_grants_org_id_fkey";
|
|
1605
|
+
columns: ["org_id"];
|
|
1606
|
+
isOneToOne: false;
|
|
1607
|
+
referencedRelation: "orgs";
|
|
1608
|
+
referencedColumns: ["id"];
|
|
1609
|
+
}
|
|
1610
|
+
];
|
|
1611
|
+
};
|
|
1375
1612
|
};
|
|
1376
1613
|
Functions: {
|
|
1377
1614
|
accept_invitation_to_org: {
|
|
@@ -1380,6 +1617,37 @@ export type Database = {
|
|
|
1380
1617
|
};
|
|
1381
1618
|
Returns: string;
|
|
1382
1619
|
};
|
|
1620
|
+
apply_usage_overage: {
|
|
1621
|
+
Args: {
|
|
1622
|
+
p_billing_cycle_end: string;
|
|
1623
|
+
p_billing_cycle_start: string;
|
|
1624
|
+
p_details?: Json;
|
|
1625
|
+
p_metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1626
|
+
p_org_id: string;
|
|
1627
|
+
p_overage_amount: number;
|
|
1628
|
+
};
|
|
1629
|
+
Returns: {
|
|
1630
|
+
credit_step_id: number;
|
|
1631
|
+
credits_applied: number;
|
|
1632
|
+
credits_remaining: number;
|
|
1633
|
+
credits_required: number;
|
|
1634
|
+
overage_amount: number;
|
|
1635
|
+
overage_covered: number;
|
|
1636
|
+
overage_event_id: string;
|
|
1637
|
+
overage_unpaid: number;
|
|
1638
|
+
}[];
|
|
1639
|
+
};
|
|
1640
|
+
calculate_credit_cost: {
|
|
1641
|
+
Args: {
|
|
1642
|
+
p_metric: Database["public"]["Enums"]["credit_metric_type"];
|
|
1643
|
+
p_overage_amount: number;
|
|
1644
|
+
};
|
|
1645
|
+
Returns: {
|
|
1646
|
+
credit_cost_per_unit: number;
|
|
1647
|
+
credit_step_id: number;
|
|
1648
|
+
credits_required: number;
|
|
1649
|
+
}[];
|
|
1650
|
+
};
|
|
1383
1651
|
check_min_rights: {
|
|
1384
1652
|
Args: {
|
|
1385
1653
|
app_id: string;
|
|
@@ -1414,13 +1682,13 @@ export type Database = {
|
|
|
1414
1682
|
};
|
|
1415
1683
|
convert_bytes_to_gb: {
|
|
1416
1684
|
Args: {
|
|
1417
|
-
|
|
1685
|
+
bytes_value: number;
|
|
1418
1686
|
};
|
|
1419
1687
|
Returns: number;
|
|
1420
1688
|
};
|
|
1421
1689
|
convert_bytes_to_mb: {
|
|
1422
1690
|
Args: {
|
|
1423
|
-
|
|
1691
|
+
bytes_value: number;
|
|
1424
1692
|
};
|
|
1425
1693
|
Returns: number;
|
|
1426
1694
|
};
|
|
@@ -1505,6 +1773,10 @@ export type Database = {
|
|
|
1505
1773
|
};
|
|
1506
1774
|
Returns: boolean;
|
|
1507
1775
|
};
|
|
1776
|
+
expire_usage_credits: {
|
|
1777
|
+
Args: never;
|
|
1778
|
+
Returns: number;
|
|
1779
|
+
};
|
|
1508
1780
|
find_best_plan_v3: {
|
|
1509
1781
|
Args: {
|
|
1510
1782
|
bandwidth: number;
|
|
@@ -1789,6 +2061,9 @@ export type Database = {
|
|
|
1789
2061
|
app_count: number;
|
|
1790
2062
|
can_use_more: boolean;
|
|
1791
2063
|
created_by: string;
|
|
2064
|
+
credit_available: number;
|
|
2065
|
+
credit_next_expiration: string;
|
|
2066
|
+
credit_total: number;
|
|
1792
2067
|
gid: string;
|
|
1793
2068
|
is_canceled: boolean;
|
|
1794
2069
|
is_yearly: boolean;
|
|
@@ -1811,6 +2086,9 @@ export type Database = {
|
|
|
1811
2086
|
app_count: number;
|
|
1812
2087
|
can_use_more: boolean;
|
|
1813
2088
|
created_by: string;
|
|
2089
|
+
credit_available: number;
|
|
2090
|
+
credit_next_expiration: string;
|
|
2091
|
+
credit_total: number;
|
|
1814
2092
|
gid: string;
|
|
1815
2093
|
is_canceled: boolean;
|
|
1816
2094
|
is_yearly: boolean;
|
|
@@ -2213,6 +2491,16 @@ export type Database = {
|
|
|
2213
2491
|
Args: never;
|
|
2214
2492
|
Returns: undefined;
|
|
2215
2493
|
};
|
|
2494
|
+
process_all_cron_tasks: {
|
|
2495
|
+
Args: never;
|
|
2496
|
+
Returns: undefined;
|
|
2497
|
+
};
|
|
2498
|
+
process_channel_device_counts_queue: {
|
|
2499
|
+
Args: {
|
|
2500
|
+
batch_size?: number;
|
|
2501
|
+
};
|
|
2502
|
+
Returns: number;
|
|
2503
|
+
};
|
|
2216
2504
|
process_cron_stats_jobs: {
|
|
2217
2505
|
Args: never;
|
|
2218
2506
|
Returns: undefined;
|
|
@@ -2234,10 +2522,22 @@ export type Database = {
|
|
|
2234
2522
|
Returns: undefined;
|
|
2235
2523
|
};
|
|
2236
2524
|
process_function_queue: {
|
|
2525
|
+
Args: {
|
|
2526
|
+
batch_size?: number;
|
|
2527
|
+
queue_names: string[];
|
|
2528
|
+
};
|
|
2529
|
+
Returns: undefined;
|
|
2530
|
+
} | {
|
|
2237
2531
|
Args: {
|
|
2238
2532
|
batch_size?: number;
|
|
2239
2533
|
queue_name: string;
|
|
2240
2534
|
};
|
|
2535
|
+
Returns: undefined;
|
|
2536
|
+
};
|
|
2537
|
+
process_manifest_bundle_counts_queue: {
|
|
2538
|
+
Args: {
|
|
2539
|
+
batch_size?: number;
|
|
2540
|
+
};
|
|
2241
2541
|
Returns: number;
|
|
2242
2542
|
};
|
|
2243
2543
|
process_stats_email_monthly: {
|
|
@@ -2407,11 +2707,13 @@ export type Database = {
|
|
|
2407
2707
|
Enums: {
|
|
2408
2708
|
action_type: "mau" | "storage" | "bandwidth";
|
|
2409
2709
|
app_mode: "prod" | "dev" | "livereload";
|
|
2710
|
+
credit_metric_type: "mau" | "bandwidth" | "storage";
|
|
2711
|
+
credit_transaction_type: "grant" | "purchase" | "manual_grant" | "deduction" | "expiry" | "refund";
|
|
2410
2712
|
disable_update: "major" | "minor" | "patch" | "version_number" | "none";
|
|
2411
2713
|
key_mode: "read" | "write" | "all" | "upload";
|
|
2412
2714
|
pay_as_you_go_type: "base" | "units";
|
|
2413
2715
|
platform_os: "ios" | "android";
|
|
2414
|
-
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";
|
|
2716
|
+
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";
|
|
2415
2717
|
stripe_status: "created" | "succeeded" | "updated" | "failed" | "deleted" | "canceled";
|
|
2416
2718
|
usage_mode: "5min" | "day" | "month" | "cycle" | "last_saved";
|
|
2417
2719
|
user_min_right: "invite_read" | "invite_upload" | "invite_write" | "invite_admin" | "invite_super_admin" | "read" | "upload" | "write" | "admin" | "super_admin";
|
|
@@ -2509,11 +2811,13 @@ export declare const Constants: {
|
|
|
2509
2811
|
readonly Enums: {
|
|
2510
2812
|
readonly action_type: readonly ["mau", "storage", "bandwidth"];
|
|
2511
2813
|
readonly app_mode: readonly ["prod", "dev", "livereload"];
|
|
2814
|
+
readonly credit_metric_type: readonly ["mau", "bandwidth", "storage"];
|
|
2815
|
+
readonly credit_transaction_type: readonly ["grant", "purchase", "manual_grant", "deduction", "expiry", "refund"];
|
|
2512
2816
|
readonly disable_update: readonly ["major", "minor", "patch", "version_number", "none"];
|
|
2513
2817
|
readonly key_mode: readonly ["read", "write", "all", "upload"];
|
|
2514
2818
|
readonly pay_as_you_go_type: readonly ["base", "units"];
|
|
2515
2819
|
readonly platform_os: readonly ["ios", "android"];
|
|
2516
|
-
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", "ping", "InvalidIp", "blocked_by_server_url"];
|
|
2820
|
+
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", "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"];
|
|
2517
2821
|
readonly stripe_status: readonly ["created", "succeeded", "updated", "failed", "deleted", "canceled"];
|
|
2518
2822
|
readonly usage_mode: readonly ["5min", "day", "month", "cycle", "last_saved"];
|
|
2519
2823
|
readonly user_min_right: readonly ["invite_read", "invite_upload", "invite_write", "invite_admin", "invite_super_admin", "read", "upload", "write", "admin", "super_admin"];
|