@archildata/api-types 0.0.74 → 0.0.75
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/index.d.ts +91 -213
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -32,8 +32,8 @@ export interface paths {
|
|
|
32
32
|
cookie?: never;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
|
-
* Get metered usage over a window
|
|
36
|
-
* @description Returns what the account's meters recorded over a window, for the window as a whole and per interval, in each meter's own unit (vCPU-hours, GiB-hours, GiB-months
|
|
35
|
+
* Get metered usage and its cost over a window
|
|
36
|
+
* @description Returns what the account's meters recorded over a window, for the window as a whole and per interval, in each meter's own unit (such as vCPU-hours, GiB-hours, GiB-months or calls), and what that usage comes to at the account's rates, per meter and in total, before any grant and fixed fee: the cost of what was used, not what will be invoiced, which `/api/billing/summary` reports. The meters are the catalog's metered features, so a meter added there is reported from then on. A meter's rate is the price of the plan item its usage is billed from: the meter's own item, or the credit system whose rate card names it, at the plan's own prices and overrides; a meter the plan does not price has a zero rate, and a tiered item is priced at its first tier. Usage reaches billing once per reporter interval from every region, so an interval's figures can still grow for a few minutes after it ends, longer if a region's reporter is behind. The default window is the seven days (hourly: 24 hours) up to now; a window may be at most 31 days, and is widened to whole intervals. Money is in dollars, to the cent.
|
|
37
37
|
*/
|
|
38
38
|
get: operations["getBillingUsage"];
|
|
39
39
|
put?: never;
|
|
@@ -44,26 +44,6 @@ export interface paths {
|
|
|
44
44
|
patch?: never;
|
|
45
45
|
trace?: never;
|
|
46
46
|
};
|
|
47
|
-
"/api/billing/costs": {
|
|
48
|
-
parameters: {
|
|
49
|
-
query?: never;
|
|
50
|
-
header?: never;
|
|
51
|
-
path?: never;
|
|
52
|
-
cookie?: never;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Get the cost of metered usage over a window
|
|
56
|
-
* @description Returns the same usage as `/api/billing/usage` priced at the account's rates, for the window and per interval and meter, before the plan's included credits and base price: the cost of what was used, not what will be invoiced. Summed over the billing period it is the usage line of the invoice; `/api/billing/summary` applies the plan's base price and included credits on top. Money is in integer cents. On a plan that prices no usage, `priced` is false and every cost is zero.
|
|
57
|
-
*/
|
|
58
|
-
get: operations["getBillingCosts"];
|
|
59
|
-
put?: never;
|
|
60
|
-
post?: never;
|
|
61
|
-
delete?: never;
|
|
62
|
-
options?: never;
|
|
63
|
-
head?: never;
|
|
64
|
-
patch?: never;
|
|
65
|
-
trace?: never;
|
|
66
|
-
};
|
|
67
47
|
"/api/billing/summary": {
|
|
68
48
|
parameters: {
|
|
69
49
|
query?: never;
|
|
@@ -72,8 +52,8 @@ export interface paths {
|
|
|
72
52
|
cookie?: never;
|
|
73
53
|
};
|
|
74
54
|
/**
|
|
75
|
-
* Get a billing period's statement
|
|
76
|
-
* @description Returns a billing period's statement as
|
|
55
|
+
* Get a billing period's statement
|
|
56
|
+
* @description Returns a billing period's statement as billing itself states it: `lines`, each line invoiced for the period or previewed for its end (a fixed fee, a meter's usage billed past its grants, a credit taken off, anything else under its own name), and `billedCost`, their sum, which is what the period invoices or would if it ended now. On the current period also `credits`, the grants the account still draws on, and a projection to the period end at the recent daily pace. Nothing here is derived from the plan's terms: a plan billing can express, this route reports. Money is in dollars to the cent, before tax. A line is before discounts, as billing reports it, and what a reward takes off follows as an `other` line named `Discount`: off each line previewed for the period end, and off each invoice as a whole (its total under its lines' sum), on the span of the invoice's fixed fee when it has one, else of its first line on the period. So the sum is what the period invoiced, or will.
|
|
77
57
|
*/
|
|
78
58
|
get: operations["getBillingSummary"];
|
|
79
59
|
put?: never;
|
|
@@ -1283,8 +1263,10 @@ export interface components {
|
|
|
1283
1263
|
BillingUsageQuantity: {
|
|
1284
1264
|
/** @description In the meter's own unit. */
|
|
1285
1265
|
quantity: number;
|
|
1286
|
-
/** @description vCPU-hours, GiB-hours, GiB-months or calls. */
|
|
1266
|
+
/** @description The meter's unit, such as vCPU-hours, GiB-hours, GiB-months or calls. */
|
|
1287
1267
|
unit: string;
|
|
1268
|
+
/** @description Quantity at the account's rate, in dollars to the cent; zero for a meter the plan does not price. */
|
|
1269
|
+
cost: number;
|
|
1288
1270
|
};
|
|
1289
1271
|
BillingUsageInterval: {
|
|
1290
1272
|
/**
|
|
@@ -1297,12 +1279,14 @@ export interface components {
|
|
|
1297
1279
|
* @description Unix timestamp in seconds, exclusive.
|
|
1298
1280
|
*/
|
|
1299
1281
|
end: number;
|
|
1300
|
-
/** @description
|
|
1282
|
+
/** @description The interval's usage at the account's rates, in dollars to the cent; the sum of `features`. */
|
|
1283
|
+
cost: number;
|
|
1284
|
+
/** @description Quantity and cost per meter in the interval, keyed by feature id. */
|
|
1301
1285
|
features: {
|
|
1302
1286
|
[key: string]: components["schemas"]["BillingUsageQuantity"];
|
|
1303
1287
|
};
|
|
1304
1288
|
};
|
|
1305
|
-
/** @description The window as a whole, the summary the intervals break down. */
|
|
1289
|
+
/** @description The window as a whole, the summary the intervals break down. Its quantities are the intervals' sums; its costs are priced over the whole span and rounded once per meter, so they are the same at any granularity, while the intervals, each rounded on its own, can add up to a little less. */
|
|
1306
1290
|
BillingUsageWindow: {
|
|
1307
1291
|
/**
|
|
1308
1292
|
* Format: int64
|
|
@@ -1314,7 +1298,9 @@ export interface components {
|
|
|
1314
1298
|
* @description Unix timestamp in seconds, exclusive.
|
|
1315
1299
|
*/
|
|
1316
1300
|
end: number;
|
|
1317
|
-
/** @description
|
|
1301
|
+
/** @description Usage over the window at the account's rates, in dollars to the cent. */
|
|
1302
|
+
cost: number;
|
|
1303
|
+
/** @description Quantity and cost per meter over the window, keyed by feature id. */
|
|
1318
1304
|
features: {
|
|
1319
1305
|
[key: string]: components["schemas"]["BillingUsageQuantity"];
|
|
1320
1306
|
};
|
|
@@ -1323,50 +1309,45 @@ export interface components {
|
|
|
1323
1309
|
/** @enum {string} */
|
|
1324
1310
|
granularity: "1d" | "1h";
|
|
1325
1311
|
timezone: string;
|
|
1312
|
+
currency: string;
|
|
1313
|
+
/** @description Cost of one unit of each meter, in dollars per unit as a decimal (a rate can be well below a cent), keyed by feature id; zero for a meter the plan does not price. */
|
|
1314
|
+
ratesPerUnit: {
|
|
1315
|
+
[key: string]: number;
|
|
1316
|
+
};
|
|
1326
1317
|
window: components["schemas"]["BillingUsageWindow"];
|
|
1327
1318
|
/** @description Newest first, each the window's share of one interval. Intervals after now are left out. */
|
|
1328
1319
|
intervals: components["schemas"]["BillingUsageInterval"][];
|
|
1320
|
+
/** @description The current billing period, which `/api/billing/summary` sums; absent on a plan without one. */
|
|
1321
|
+
billingPeriod?: components["schemas"]["BillingPeriod"];
|
|
1329
1322
|
};
|
|
1330
1323
|
ApiResponse_BillingUsage: {
|
|
1331
1324
|
success: boolean;
|
|
1332
1325
|
data: components["schemas"]["BillingUsage"];
|
|
1333
1326
|
};
|
|
1334
|
-
|
|
1335
|
-
/** @description
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
* Format: int64
|
|
1340
|
-
* @description Quantity at the account's rate, in integer cents.
|
|
1341
|
-
*/
|
|
1342
|
-
costCents: number;
|
|
1327
|
+
BillingSummaryPlan: {
|
|
1328
|
+
/** @description The plan id, such as `enterprise`. */
|
|
1329
|
+
id: string;
|
|
1330
|
+
/** @description The plan's name as billing shows it. */
|
|
1331
|
+
name: string;
|
|
1343
1332
|
};
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
* Format: int64
|
|
1347
|
-
* @description Unix timestamp in seconds.
|
|
1348
|
-
*/
|
|
1349
|
-
start: number;
|
|
1333
|
+
/** @description One line of the period's statement, as billing invoiced it or previews it. */
|
|
1334
|
+
BillingLine: {
|
|
1350
1335
|
/**
|
|
1351
|
-
*
|
|
1352
|
-
* @
|
|
1353
|
-
*/
|
|
1354
|
-
end: number;
|
|
1355
|
-
/**
|
|
1356
|
-
* Format: int64
|
|
1357
|
-
* @description The interval's usage at the account's rates, in integer cents; the sum of `features`.
|
|
1336
|
+
* @description The key to branch on. `fixed` is a charge over the whole period (the plan's base price; an item paid for up front per period, such as a block of sandboxes, on its feature with its quantity); `usage` is a meter's usage billed past its grants, with its quantity; `credit` is a credit taken off, on the feature it draws, in money (what is left of the grant is in `credits`); `other` is anything else billed inside the period, such as a proration, a one-off purchase or a reward (`Discount`), carried with its own `name`.
|
|
1337
|
+
* @enum {string}
|
|
1358
1338
|
*/
|
|
1359
|
-
|
|
1360
|
-
/** @description
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1339
|
+
type: "fixed" | "usage" | "credit" | "other";
|
|
1340
|
+
/** @description On a `usage` or `credit` line, and a `fixed` line for an item paid up front, the feature it is on. */
|
|
1341
|
+
featureId?: string;
|
|
1342
|
+
/** @description The line's label as billing wrote it. */
|
|
1343
|
+
name: string;
|
|
1344
|
+
/** @description On a line with a `featureId`, the quantity billed, in `unit`. */
|
|
1345
|
+
quantity?: number;
|
|
1346
|
+
/** @description The quantity's unit, such as vCPU-hours or USD. */
|
|
1347
|
+
unit?: string;
|
|
1367
1348
|
/**
|
|
1368
1349
|
* Format: int64
|
|
1369
|
-
* @description Unix timestamp in seconds.
|
|
1350
|
+
* @description Unix timestamp in seconds; the span the line covers. A line is on the period its span ends in, or for an item billed over several periods (a yearly add-on) the period it starts in, and on no other.
|
|
1370
1351
|
*/
|
|
1371
1352
|
start: number;
|
|
1372
1353
|
/**
|
|
@@ -1374,139 +1355,64 @@ export interface components {
|
|
|
1374
1355
|
* @description Unix timestamp in seconds, exclusive.
|
|
1375
1356
|
*/
|
|
1376
1357
|
end: number;
|
|
1377
|
-
/**
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
costCents: number;
|
|
1382
|
-
/** @description Quantity and cost per meter over the window, keyed by feature id. */
|
|
1383
|
-
features: {
|
|
1384
|
-
[key: string]: components["schemas"]["BillingFeatureCost"];
|
|
1385
|
-
};
|
|
1386
|
-
};
|
|
1387
|
-
BillingCosts: {
|
|
1388
|
-
/** @enum {string} */
|
|
1389
|
-
granularity: "1d" | "1h";
|
|
1390
|
-
timezone: string;
|
|
1391
|
-
currency: string;
|
|
1392
|
-
/** @description False when the plan prices no usage; every cost is then zero. */
|
|
1393
|
-
priced: boolean;
|
|
1394
|
-
/** @description Cost of one unit of each meter, in cents per unit as a decimal (a rate can be below a cent), keyed by feature id. */
|
|
1395
|
-
ratesCentsPerUnit: {
|
|
1396
|
-
[key: string]: number;
|
|
1397
|
-
};
|
|
1398
|
-
window: components["schemas"]["BillingCostWindow"];
|
|
1399
|
-
/** @description Newest first, each the window's share of one interval. Intervals after now are left out. */
|
|
1400
|
-
intervals: components["schemas"]["BillingCostInterval"][];
|
|
1401
|
-
/** @description The current billing period, which `/api/billing/summary` sums; absent on a plan without one. */
|
|
1402
|
-
billingPeriod?: components["schemas"]["BillingPeriod"];
|
|
1403
|
-
};
|
|
1404
|
-
ApiResponse_BillingCosts: {
|
|
1405
|
-
success: boolean;
|
|
1406
|
-
data: components["schemas"]["BillingCosts"];
|
|
1407
|
-
};
|
|
1408
|
-
BillingSummaryPlan: {
|
|
1409
|
-
/** @description The plan id, such as `enterprise`. */
|
|
1410
|
-
id: string;
|
|
1411
|
-
/**
|
|
1412
|
-
* Format: int64
|
|
1413
|
-
* @description The recurring fee per billing period, in integer cents.
|
|
1414
|
-
*/
|
|
1415
|
-
basePriceCents: number;
|
|
1416
|
-
/** @description Credits the plan grants each period. */
|
|
1417
|
-
includedCredits: number;
|
|
1418
|
-
/**
|
|
1419
|
-
* Format: int64
|
|
1420
|
-
* @description What each credit past the granted ones costs, in integer cents.
|
|
1421
|
-
*/
|
|
1422
|
-
overagePricePerCreditCents: number;
|
|
1358
|
+
/** @description In dollars to the cent; negative for a credit. */
|
|
1359
|
+
amount: number;
|
|
1360
|
+
/** @description The invoice the line is on, one of `invoices`; absent for a line previewed for the period end and not invoiced yet. */
|
|
1361
|
+
invoiceId?: string;
|
|
1423
1362
|
};
|
|
1424
|
-
|
|
1425
|
-
|
|
1363
|
+
/** @description One grant the account draws before it is billed, described by when it refills or expires rather than by a kind. */
|
|
1364
|
+
BillingCreditGrant: {
|
|
1365
|
+
/** @description The feature the grant is on, such as `prepaid_credit`. */
|
|
1366
|
+
featureId: string;
|
|
1367
|
+
/** @description The feature's name, such as `Prepaid credit (USD)`. */
|
|
1368
|
+
name: string;
|
|
1369
|
+
/** @description The unit the grant is counted in, such as USD or disks. */
|
|
1370
|
+
unit: string;
|
|
1371
|
+
/** @description What the grant carries, per period for one that refills. */
|
|
1426
1372
|
granted: number;
|
|
1427
|
-
/** @description
|
|
1428
|
-
used: number;
|
|
1429
|
-
/** @description Credits left before overage, rounded to two decimals. */
|
|
1373
|
+
/** @description What is left on it, rounded to two decimals. */
|
|
1430
1374
|
remaining: number;
|
|
1431
|
-
};
|
|
1432
|
-
BillingAdjustment: {
|
|
1433
1375
|
/**
|
|
1434
|
-
*
|
|
1435
|
-
* @
|
|
1376
|
+
* Format: int64
|
|
1377
|
+
* @description Unix timestamp in seconds when the grant refills; null for a one-time grant.
|
|
1436
1378
|
*/
|
|
1437
|
-
|
|
1438
|
-
/** @description The line's label, such as `Included credits` or `Base price`. */
|
|
1439
|
-
name: string;
|
|
1379
|
+
resetsAt: number | null;
|
|
1440
1380
|
/**
|
|
1441
1381
|
* Format: int64
|
|
1442
|
-
* @description
|
|
1382
|
+
* @description Unix timestamp in seconds when the grant lapses; null when it does not.
|
|
1443
1383
|
*/
|
|
1444
|
-
|
|
1384
|
+
expiresAt: number | null;
|
|
1445
1385
|
};
|
|
1446
1386
|
BillingSummaryProjection: {
|
|
1447
|
-
/**
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
meteredCostCents: number;
|
|
1452
|
-
/**
|
|
1453
|
-
* Format: int64
|
|
1454
|
-
* @description What that usage would invoice, in integer cents.
|
|
1455
|
-
*/
|
|
1456
|
-
billedCostCents: number;
|
|
1457
|
-
/**
|
|
1458
|
-
* Format: int64
|
|
1459
|
-
* @description The pace the projection extends, in integer cents per day; `meteredCostCents` so far plus `dailyRateCents` × `daysRemaining`.
|
|
1460
|
-
*/
|
|
1461
|
-
dailyRateCents: number;
|
|
1462
|
-
/**
|
|
1463
|
-
* Format: int64
|
|
1464
|
-
* @description Unix timestamp in seconds; the pace is the mean over the elapsed UTC days from here to `paceEnd`, the last ones before now inside the period.
|
|
1465
|
-
*/
|
|
1466
|
-
paceStart: number;
|
|
1467
|
-
/**
|
|
1468
|
-
* Format: int64
|
|
1469
|
-
* @description Unix timestamp in seconds, exclusive.
|
|
1470
|
-
*/
|
|
1471
|
-
paceEnd: number;
|
|
1472
|
-
/** @description Days from now to the period end. */
|
|
1473
|
-
daysRemaining: number;
|
|
1387
|
+
/** @description What the period is projected to invoice, in dollars; what is billed so far, plus the usage still to come once it has drawn what is left of each grant. */
|
|
1388
|
+
billedCost: number;
|
|
1389
|
+
/** @description The pace the projection extends, in dollars of usage per day; the mean over the last three elapsed UTC days inside the period. */
|
|
1390
|
+
dailyRate: number;
|
|
1474
1391
|
};
|
|
1475
1392
|
BillingIssuedInvoice: {
|
|
1476
1393
|
id: string;
|
|
1477
|
-
/**
|
|
1478
|
-
|
|
1394
|
+
/**
|
|
1395
|
+
* @description The invoice's status with the billing processor. `draft` is a renewal the processor has not finalized yet, for about an hour after the period rolls; it already carries every line it will bill. Voided invoices are not listed.
|
|
1396
|
+
* @enum {string}
|
|
1397
|
+
*/
|
|
1398
|
+
status: "draft" | "open" | "paid" | "uncollectible";
|
|
1479
1399
|
/** @description The invoice as the billing processor hosts it. */
|
|
1480
1400
|
hostedInvoiceUrl?: string;
|
|
1481
1401
|
};
|
|
1482
1402
|
BillingSummary: {
|
|
1483
|
-
/** @description False when the plan prices no usage; the quantities are still reported, the amounts are zero, and `credit` and `projected` are absent. */
|
|
1484
|
-
priced: boolean;
|
|
1485
1403
|
currency: string;
|
|
1486
1404
|
/** @description The period read; the UTC calendar month for an account without a billing cycle. */
|
|
1487
1405
|
billingPeriod: components["schemas"]["BillingPeriod"];
|
|
1488
1406
|
plan: components["schemas"]["BillingSummaryPlan"];
|
|
1489
|
-
/** @description
|
|
1490
|
-
|
|
1491
|
-
/**
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
/** @description The metered cost by meter, with quantities, keyed by feature id. Sums to `meteredCostCents`. */
|
|
1497
|
-
meteredCostBreakdown: {
|
|
1498
|
-
[key: string]: components["schemas"]["BillingFeatureCost"];
|
|
1499
|
-
};
|
|
1500
|
-
/** @description The lines between `meteredCostCents` and `billedCostCents`, which sum to their difference. */
|
|
1501
|
-
adjustments: components["schemas"]["BillingAdjustment"][];
|
|
1502
|
-
/**
|
|
1503
|
-
* Format: int64
|
|
1504
|
-
* @description What the period invoices, or would if it ended now; `meteredCostCents` plus the adjustments, to the cent.
|
|
1505
|
-
*/
|
|
1506
|
-
billedCostCents: number;
|
|
1507
|
-
/** @description The period end at the recent daily pace; absent for a past period or without an elapsed day of usage. */
|
|
1407
|
+
/** @description The statement's lines, oldest invoice first, then the lines previewed for the period end: on the current period, what was billed as it opened (the base price, a proration) and what billing will bill as it closes (the usage past the grants, the credits taken off); on a past period, everything the invoices issued for it carry. Empty on a plan that bills nothing. */
|
|
1408
|
+
lines: components["schemas"]["BillingLine"][];
|
|
1409
|
+
/** @description What the period invoices, or would if it ended now; the lines' sum, to the cent. */
|
|
1410
|
+
billedCost: number;
|
|
1411
|
+
/** @description The grants the account still draws on, on the current period only: each with something left or that will refill. A spent one-time grant and an expired one are not listed; a past period lists none (its `credit` lines show the draw). This is a grant's standing, not a charge: a `credit` line in `lines` is what a grant took off this period's bill, in money, and the two need not pair up. A grant nothing has drawn from yet has no line; an included quantity (tool calls, disks) is spent without one, since billing invoices only the usage past it; and several grants on one feature draw as one line. */
|
|
1412
|
+
credits: components["schemas"]["BillingCreditGrant"][];
|
|
1413
|
+
/** @description The period end at the recent daily pace; absent for a past period, a plan that prices no usage, or without an elapsed day of usage. */
|
|
1508
1414
|
projected?: components["schemas"]["BillingSummaryProjection"];
|
|
1509
|
-
/** @description
|
|
1415
|
+
/** @description The invoices the lines with an `invoiceId` are on, oldest first. Absent when nothing is invoiced for the period yet. */
|
|
1510
1416
|
invoices?: components["schemas"]["BillingIssuedInvoice"][];
|
|
1511
1417
|
};
|
|
1512
1418
|
ApiResponse_BillingSummary: {
|
|
@@ -1529,8 +1435,8 @@ export interface components {
|
|
|
1529
1435
|
status: "not_applicable" | "invoice_open" | "action_required" | "missing_payment_method" | "healthy";
|
|
1530
1436
|
hasDefaultPaymentMethod: boolean;
|
|
1531
1437
|
openInvoiceId?: string;
|
|
1532
|
-
/**
|
|
1533
|
-
|
|
1438
|
+
/** @description What is still owed on the open invoice, in dollars to the cent. */
|
|
1439
|
+
amountRemaining?: number;
|
|
1534
1440
|
openInvoiceCurrency?: string;
|
|
1535
1441
|
/** Format: int64 */
|
|
1536
1442
|
openInvoiceDueDate?: number;
|
|
@@ -1559,8 +1465,11 @@ export interface components {
|
|
|
1559
1465
|
billingMode: "not_setup" | "self_serve";
|
|
1560
1466
|
/** @enum {string} */
|
|
1561
1467
|
plan: "free" | "developer" | "team" | "enterprise" | "unknown";
|
|
1562
|
-
/**
|
|
1563
|
-
|
|
1468
|
+
/**
|
|
1469
|
+
* @description Current subscription status; `none` without a paid subscription, `past_due` while a failing payment is retried and the plan is kept.
|
|
1470
|
+
* @enum {string}
|
|
1471
|
+
*/
|
|
1472
|
+
subscriptionStatus: "none" | "active" | "past_due";
|
|
1564
1473
|
billingPeriod?: components["schemas"]["BillingPeriod"];
|
|
1565
1474
|
/**
|
|
1566
1475
|
* Format: int64
|
|
@@ -1886,8 +1795,11 @@ export interface components {
|
|
|
1886
1795
|
BillingSubscriptionState: {
|
|
1887
1796
|
/** @enum {string} */
|
|
1888
1797
|
plan: "free" | "developer" | "team" | "enterprise" | "unknown";
|
|
1889
|
-
/**
|
|
1890
|
-
|
|
1798
|
+
/**
|
|
1799
|
+
* @description Current subscription status; `none` without a paid subscription, `past_due` while a failing payment is retried and the plan is kept.
|
|
1800
|
+
* @enum {string}
|
|
1801
|
+
*/
|
|
1802
|
+
subscriptionStatus: "none" | "active" | "past_due";
|
|
1891
1803
|
billingPeriod?: components["schemas"]["BillingPeriod"];
|
|
1892
1804
|
/** Format: int64 */
|
|
1893
1805
|
scheduledCancellationAt?: number;
|
|
@@ -3331,7 +3243,7 @@ export interface components {
|
|
|
3331
3243
|
UsageEnd: string;
|
|
3332
3244
|
/** @description A named window relative to now in `timezone`, instead of `start` and `end`. Weeks start on Monday. A window may run past now; the intervals after it are left out. */
|
|
3333
3245
|
UsageFor: "today" | "yesterday" | "this-week" | "last-week" | "this-month" | "last-month";
|
|
3334
|
-
/** @description Which billing period: `current` (the default), or a YYYY-MM-DD date (UTC) inside a past period that has been invoiced; the day a period starts on selects it. A past period
|
|
3246
|
+
/** @description Which billing period: `current` (the default), or a YYYY-MM-DD date (UTC) inside a past period that has been invoiced; the day a period starts on selects it. A past period's lines are read whole from the invoices issued for it, named in `invoices`, under the plan they were issued for, whatever the account is on now. */
|
|
3335
3247
|
SummaryPeriod: string;
|
|
3336
3248
|
/** @description Width of each interval. Days are aligned to `timezone`; hours are UTC. */
|
|
3337
3249
|
UsageGranularity: "1d" | "1h";
|
|
@@ -3412,7 +3324,7 @@ export interface operations {
|
|
|
3412
3324
|
};
|
|
3413
3325
|
requestBody?: never;
|
|
3414
3326
|
responses: {
|
|
3415
|
-
/** @description Usage over the window and per interval */
|
|
3327
|
+
/** @description Usage and its cost over the window and per interval */
|
|
3416
3328
|
200: {
|
|
3417
3329
|
headers: {
|
|
3418
3330
|
[name: string]: unknown;
|
|
@@ -3426,44 +3338,10 @@ export interface operations {
|
|
|
3426
3338
|
502: components["responses"]["InternalError"];
|
|
3427
3339
|
};
|
|
3428
3340
|
};
|
|
3429
|
-
getBillingCosts: {
|
|
3430
|
-
parameters: {
|
|
3431
|
-
query?: {
|
|
3432
|
-
/** @description Start of the window, inclusive: an RFC 3339 timestamp, or a YYYY-MM-DD date taken at midnight in `timezone`. Defaults to seven days (hourly: 24 hours) before `end`. Not with `for`. */
|
|
3433
|
-
start?: components["parameters"]["UsageStart"];
|
|
3434
|
-
/** @description End of the window, exclusive, in the same forms as `start`. Defaults to now. Not with `for`. */
|
|
3435
|
-
end?: components["parameters"]["UsageEnd"];
|
|
3436
|
-
/** @description A named window relative to now in `timezone`, instead of `start` and `end`. Weeks start on Monday. A window may run past now; the intervals after it are left out. */
|
|
3437
|
-
for?: components["parameters"]["UsageFor"];
|
|
3438
|
-
/** @description Width of each interval. Days are aligned to `timezone`; hours are UTC. */
|
|
3439
|
-
granularity?: components["parameters"]["UsageGranularity"];
|
|
3440
|
-
/** @description IANA timezone that day intervals and dates are aligned to. */
|
|
3441
|
-
timezone?: components["parameters"]["UsageTimezone"];
|
|
3442
|
-
};
|
|
3443
|
-
header?: never;
|
|
3444
|
-
path?: never;
|
|
3445
|
-
cookie?: never;
|
|
3446
|
-
};
|
|
3447
|
-
requestBody?: never;
|
|
3448
|
-
responses: {
|
|
3449
|
-
/** @description Cost over the window and per interval */
|
|
3450
|
-
200: {
|
|
3451
|
-
headers: {
|
|
3452
|
-
[name: string]: unknown;
|
|
3453
|
-
};
|
|
3454
|
-
content: {
|
|
3455
|
-
"application/json": components["schemas"]["ApiResponse_BillingCosts"];
|
|
3456
|
-
};
|
|
3457
|
-
};
|
|
3458
|
-
400: components["responses"]["ValidationError"];
|
|
3459
|
-
401: components["responses"]["Unauthorized"];
|
|
3460
|
-
502: components["responses"]["InternalError"];
|
|
3461
|
-
};
|
|
3462
|
-
};
|
|
3463
3341
|
getBillingSummary: {
|
|
3464
3342
|
parameters: {
|
|
3465
3343
|
query?: {
|
|
3466
|
-
/** @description Which billing period: `current` (the default), or a YYYY-MM-DD date (UTC) inside a past period that has been invoiced; the day a period starts on selects it. A past period
|
|
3344
|
+
/** @description Which billing period: `current` (the default), or a YYYY-MM-DD date (UTC) inside a past period that has been invoiced; the day a period starts on selects it. A past period's lines are read whole from the invoices issued for it, named in `invoices`, under the plan they were issued for, whatever the account is on now. */
|
|
3467
3345
|
period?: components["parameters"]["SummaryPeriod"];
|
|
3468
3346
|
};
|
|
3469
3347
|
header?: never;
|