@archildata/api-types 0.0.63 → 0.0.65
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 +413 -13
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4,6 +4,66 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export interface paths {
|
|
7
|
+
"/api/billing/subscription": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Get the subscription's state and the actions it allows
|
|
16
|
+
* @description Returns the selected account's subscription state and available actions. Accounts that share billing also share subscription and open-invoice information.
|
|
17
|
+
*/
|
|
18
|
+
get: operations["getBillingSubscription"];
|
|
19
|
+
put?: never;
|
|
20
|
+
post?: never;
|
|
21
|
+
delete?: never;
|
|
22
|
+
options?: never;
|
|
23
|
+
head?: never;
|
|
24
|
+
patch?: never;
|
|
25
|
+
trace?: never;
|
|
26
|
+
};
|
|
27
|
+
"/api/billing/usage": {
|
|
28
|
+
parameters: {
|
|
29
|
+
query?: never;
|
|
30
|
+
header?: never;
|
|
31
|
+
path?: never;
|
|
32
|
+
cookie?: never;
|
|
33
|
+
};
|
|
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, calls) with no prices applied. 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.
|
|
37
|
+
*/
|
|
38
|
+
get: operations["getBillingUsage"];
|
|
39
|
+
put?: never;
|
|
40
|
+
post?: never;
|
|
41
|
+
delete?: never;
|
|
42
|
+
options?: never;
|
|
43
|
+
head?: never;
|
|
44
|
+
patch?: never;
|
|
45
|
+
trace?: never;
|
|
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
|
+
};
|
|
7
67
|
"/api/billing/summary": {
|
|
8
68
|
parameters: {
|
|
9
69
|
query?: never;
|
|
@@ -12,8 +72,8 @@ export interface paths {
|
|
|
12
72
|
cookie?: never;
|
|
13
73
|
};
|
|
14
74
|
/**
|
|
15
|
-
* Get billing
|
|
16
|
-
* @description Returns the
|
|
75
|
+
* Get a billing period's statement as a sum
|
|
76
|
+
* @description Returns a billing period's statement as a sum: `meteredCostCents`, the period's usage at the account's rates with a breakdown by meter; `adjustments`, the lines the plan applies (the included credits taken off, the base price added); and `billedCostCents`, what they come to, which is what the period invoices or would if it ended now. Also the account's standing on the plan's credit pool and, for the current period, a projection to its end at the recent daily pace. A past period's lines are read from the invoices issued for it. The only billing route where the plan's base price and included credits enter. Money is in integer cents. On a plan that prices no usage, `priced` is false and the amounts are zero.
|
|
17
77
|
*/
|
|
18
78
|
get: operations["getBillingSummary"];
|
|
19
79
|
put?: never;
|
|
@@ -325,7 +385,8 @@ export interface paths {
|
|
|
325
385
|
};
|
|
326
386
|
/**
|
|
327
387
|
* Get the account credit balance
|
|
328
|
-
* @
|
|
388
|
+
* @deprecated
|
|
389
|
+
* @description Deprecated: the plan's credit pool on `/api/billing/summary` replaces the Stripe customer balance, and credit notes are on each invoice under `/api/billing/invoices/{invoiceID}`; this route goes once the console no longer calls it. Returns the customer credit balance and one page of balance transactions, newest first, such as credit notes applied to the balance. Pass nextCursor as cursor to continue.
|
|
329
390
|
*/
|
|
330
391
|
get: operations["getBillingCredits"];
|
|
331
392
|
put?: never;
|
|
@@ -1195,6 +1256,239 @@ export interface components {
|
|
|
1195
1256
|
*/
|
|
1196
1257
|
end: number;
|
|
1197
1258
|
};
|
|
1259
|
+
BillingUsageQuantity: {
|
|
1260
|
+
/** @description In the meter's own unit. */
|
|
1261
|
+
quantity: number;
|
|
1262
|
+
/** @description vCPU-hours, GiB-hours, GiB-months or calls. */
|
|
1263
|
+
unit: string;
|
|
1264
|
+
};
|
|
1265
|
+
BillingUsageInterval: {
|
|
1266
|
+
/**
|
|
1267
|
+
* Format: int64
|
|
1268
|
+
* @description Unix timestamp in seconds.
|
|
1269
|
+
*/
|
|
1270
|
+
start: number;
|
|
1271
|
+
/**
|
|
1272
|
+
* Format: int64
|
|
1273
|
+
* @description Unix timestamp in seconds, exclusive.
|
|
1274
|
+
*/
|
|
1275
|
+
end: number;
|
|
1276
|
+
/** @description Quantity per meter in the interval, keyed by feature id. */
|
|
1277
|
+
features: {
|
|
1278
|
+
[key: string]: components["schemas"]["BillingUsageQuantity"];
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
/** @description The window as a whole, the summary the intervals break down. */
|
|
1282
|
+
BillingUsageWindow: {
|
|
1283
|
+
/**
|
|
1284
|
+
* Format: int64
|
|
1285
|
+
* @description Unix timestamp in seconds.
|
|
1286
|
+
*/
|
|
1287
|
+
start: number;
|
|
1288
|
+
/**
|
|
1289
|
+
* Format: int64
|
|
1290
|
+
* @description Unix timestamp in seconds, exclusive.
|
|
1291
|
+
*/
|
|
1292
|
+
end: number;
|
|
1293
|
+
/** @description Quantity per meter over the window, keyed by feature id; the intervals' sums. */
|
|
1294
|
+
features: {
|
|
1295
|
+
[key: string]: components["schemas"]["BillingUsageQuantity"];
|
|
1296
|
+
};
|
|
1297
|
+
};
|
|
1298
|
+
BillingUsage: {
|
|
1299
|
+
/** @enum {string} */
|
|
1300
|
+
granularity: "1d" | "1h";
|
|
1301
|
+
timezone: string;
|
|
1302
|
+
window: components["schemas"]["BillingUsageWindow"];
|
|
1303
|
+
/** @description Newest first, each the window's share of one interval. Intervals after now are left out. */
|
|
1304
|
+
intervals: components["schemas"]["BillingUsageInterval"][];
|
|
1305
|
+
};
|
|
1306
|
+
ApiResponse_BillingUsage: {
|
|
1307
|
+
success: boolean;
|
|
1308
|
+
data: components["schemas"]["BillingUsage"];
|
|
1309
|
+
};
|
|
1310
|
+
BillingFeatureCost: {
|
|
1311
|
+
/** @description In the meter's own unit. */
|
|
1312
|
+
quantity: number;
|
|
1313
|
+
unit: string;
|
|
1314
|
+
/**
|
|
1315
|
+
* Format: int64
|
|
1316
|
+
* @description Quantity at the account's rate, in integer cents.
|
|
1317
|
+
*/
|
|
1318
|
+
costCents: number;
|
|
1319
|
+
};
|
|
1320
|
+
BillingCostInterval: {
|
|
1321
|
+
/**
|
|
1322
|
+
* Format: int64
|
|
1323
|
+
* @description Unix timestamp in seconds.
|
|
1324
|
+
*/
|
|
1325
|
+
start: number;
|
|
1326
|
+
/**
|
|
1327
|
+
* Format: int64
|
|
1328
|
+
* @description Unix timestamp in seconds, exclusive.
|
|
1329
|
+
*/
|
|
1330
|
+
end: number;
|
|
1331
|
+
/**
|
|
1332
|
+
* Format: int64
|
|
1333
|
+
* @description The interval's usage at the account's rates, in integer cents; the sum of `features`.
|
|
1334
|
+
*/
|
|
1335
|
+
costCents: number;
|
|
1336
|
+
/** @description Quantity and cost per meter in the interval, keyed by feature id. */
|
|
1337
|
+
features: {
|
|
1338
|
+
[key: string]: components["schemas"]["BillingFeatureCost"];
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
/** @description The window as a whole, the summary the intervals break down. Its figures are priced over the whole span and rounded once per meter, so they are the same at any granularity and agree with `summary` over the billing period; the intervals, each rounded on its own, can add up to a little less. */
|
|
1342
|
+
BillingCostWindow: {
|
|
1343
|
+
/**
|
|
1344
|
+
* Format: int64
|
|
1345
|
+
* @description Unix timestamp in seconds.
|
|
1346
|
+
*/
|
|
1347
|
+
start: number;
|
|
1348
|
+
/**
|
|
1349
|
+
* Format: int64
|
|
1350
|
+
* @description Unix timestamp in seconds, exclusive.
|
|
1351
|
+
*/
|
|
1352
|
+
end: number;
|
|
1353
|
+
/**
|
|
1354
|
+
* Format: int64
|
|
1355
|
+
* @description Usage over the window at the account's rates, in integer cents.
|
|
1356
|
+
*/
|
|
1357
|
+
costCents: number;
|
|
1358
|
+
/** @description Quantity and cost per meter over the window, keyed by feature id. */
|
|
1359
|
+
features: {
|
|
1360
|
+
[key: string]: components["schemas"]["BillingFeatureCost"];
|
|
1361
|
+
};
|
|
1362
|
+
};
|
|
1363
|
+
BillingCosts: {
|
|
1364
|
+
/** @enum {string} */
|
|
1365
|
+
granularity: "1d" | "1h";
|
|
1366
|
+
timezone: string;
|
|
1367
|
+
currency: string;
|
|
1368
|
+
/** @description False when the plan prices no usage; every cost is then zero. */
|
|
1369
|
+
priced: boolean;
|
|
1370
|
+
/** @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. */
|
|
1371
|
+
ratesCentsPerUnit: {
|
|
1372
|
+
[key: string]: number;
|
|
1373
|
+
};
|
|
1374
|
+
window: components["schemas"]["BillingCostWindow"];
|
|
1375
|
+
/** @description Newest first, each the window's share of one interval. Intervals after now are left out. */
|
|
1376
|
+
intervals: components["schemas"]["BillingCostInterval"][];
|
|
1377
|
+
/** @description The current billing period, which `/api/billing/summary` sums; absent on a plan without one. */
|
|
1378
|
+
billingPeriod?: components["schemas"]["BillingPeriod"];
|
|
1379
|
+
};
|
|
1380
|
+
ApiResponse_BillingCosts: {
|
|
1381
|
+
success: boolean;
|
|
1382
|
+
data: components["schemas"]["BillingCosts"];
|
|
1383
|
+
};
|
|
1384
|
+
BillingSummaryPlan: {
|
|
1385
|
+
/** @description The plan id, such as `enterprise`. */
|
|
1386
|
+
id: string;
|
|
1387
|
+
/**
|
|
1388
|
+
* Format: int64
|
|
1389
|
+
* @description The recurring fee per billing period, in integer cents.
|
|
1390
|
+
*/
|
|
1391
|
+
basePriceCents: number;
|
|
1392
|
+
/** @description Credits the plan grants each period. */
|
|
1393
|
+
includedCredits: number;
|
|
1394
|
+
/**
|
|
1395
|
+
* Format: int64
|
|
1396
|
+
* @description What each credit past the granted ones costs, in integer cents.
|
|
1397
|
+
*/
|
|
1398
|
+
overagePricePerCreditCents: number;
|
|
1399
|
+
};
|
|
1400
|
+
BillingCreditStanding: {
|
|
1401
|
+
/** @description Credits the period grants. */
|
|
1402
|
+
granted: number;
|
|
1403
|
+
/** @description Credits drawn so far, rounded to two decimals. */
|
|
1404
|
+
used: number;
|
|
1405
|
+
/** @description Credits left before overage, rounded to two decimals. */
|
|
1406
|
+
remaining: number;
|
|
1407
|
+
};
|
|
1408
|
+
BillingAdjustment: {
|
|
1409
|
+
/**
|
|
1410
|
+
* @description Which plan term the line applies; the key to branch on. `other` is a line the processor billed on a past period that is neither, such as a proration, carried with its own `name`.
|
|
1411
|
+
* @enum {string}
|
|
1412
|
+
*/
|
|
1413
|
+
type: "included_credits" | "base_price" | "other";
|
|
1414
|
+
/** @description The line's label, such as `Included credits` or `Base price`. */
|
|
1415
|
+
name: string;
|
|
1416
|
+
/**
|
|
1417
|
+
* Format: int64
|
|
1418
|
+
* @description In integer cents; negative for a discount.
|
|
1419
|
+
*/
|
|
1420
|
+
amountCents: number;
|
|
1421
|
+
};
|
|
1422
|
+
BillingSummaryProjection: {
|
|
1423
|
+
/**
|
|
1424
|
+
* Format: int64
|
|
1425
|
+
* @description Usage at the account's rates the period is projected to reach, in integer cents.
|
|
1426
|
+
*/
|
|
1427
|
+
meteredCostCents: number;
|
|
1428
|
+
/**
|
|
1429
|
+
* Format: int64
|
|
1430
|
+
* @description What that usage would invoice, in integer cents.
|
|
1431
|
+
*/
|
|
1432
|
+
billedCostCents: number;
|
|
1433
|
+
/**
|
|
1434
|
+
* Format: int64
|
|
1435
|
+
* @description The pace the projection extends, in integer cents per day; `meteredCostCents` so far plus `dailyRateCents` × `daysRemaining`.
|
|
1436
|
+
*/
|
|
1437
|
+
dailyRateCents: number;
|
|
1438
|
+
/**
|
|
1439
|
+
* Format: int64
|
|
1440
|
+
* @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.
|
|
1441
|
+
*/
|
|
1442
|
+
paceStart: number;
|
|
1443
|
+
/**
|
|
1444
|
+
* Format: int64
|
|
1445
|
+
* @description Unix timestamp in seconds, exclusive.
|
|
1446
|
+
*/
|
|
1447
|
+
paceEnd: number;
|
|
1448
|
+
/** @description Days from now to the period end. */
|
|
1449
|
+
daysRemaining: number;
|
|
1450
|
+
};
|
|
1451
|
+
BillingIssuedInvoice: {
|
|
1452
|
+
id: string;
|
|
1453
|
+
/** @description open, paid or uncollectible. */
|
|
1454
|
+
status: string;
|
|
1455
|
+
/** @description The invoice as the billing processor hosts it. */
|
|
1456
|
+
hostedInvoiceUrl?: string;
|
|
1457
|
+
};
|
|
1458
|
+
BillingSummary: {
|
|
1459
|
+
/** @description False when the plan prices no usage; the quantities are still reported, the amounts are zero, and `credit` and `projected` are absent. */
|
|
1460
|
+
priced: boolean;
|
|
1461
|
+
currency: string;
|
|
1462
|
+
/** @description The period read; the UTC calendar month for an account without a billing cycle. */
|
|
1463
|
+
billingPeriod: components["schemas"]["BillingPeriod"];
|
|
1464
|
+
plan: components["schemas"]["BillingSummaryPlan"];
|
|
1465
|
+
/** @description Billing's own standing on the plan's credit pool, in credits, on the current period only (a past period's is not kept; its `adjustments` show the credits drawn). `used` equals `meteredCostCents` at the overage price unless a usage report arrived after a period boundary, which billing credits to the period it arrived in. */
|
|
1466
|
+
credit?: components["schemas"]["BillingCreditStanding"];
|
|
1467
|
+
/**
|
|
1468
|
+
* Format: int64
|
|
1469
|
+
* @description The period's usage at the account's rates, before any adjustment, in integer cents; the sum of `meteredCostBreakdown`. On a past period, as its invoice billed it.
|
|
1470
|
+
*/
|
|
1471
|
+
meteredCostCents: number;
|
|
1472
|
+
/** @description The metered cost by meter, with quantities, keyed by feature id. Sums to `meteredCostCents`. */
|
|
1473
|
+
meteredCostBreakdown: {
|
|
1474
|
+
[key: string]: components["schemas"]["BillingFeatureCost"];
|
|
1475
|
+
};
|
|
1476
|
+
/** @description The lines between `meteredCostCents` and `billedCostCents`, which sum to their difference. */
|
|
1477
|
+
adjustments: components["schemas"]["BillingAdjustment"][];
|
|
1478
|
+
/**
|
|
1479
|
+
* Format: int64
|
|
1480
|
+
* @description What the period invoices, or would if it ended now; `meteredCostCents` plus the adjustments, to the cent.
|
|
1481
|
+
*/
|
|
1482
|
+
billedCostCents: number;
|
|
1483
|
+
/** @description The period end at the recent daily pace; absent for a past period or without an elapsed day of usage. */
|
|
1484
|
+
projected?: components["schemas"]["BillingSummaryProjection"];
|
|
1485
|
+
/** @description On a past period, the invoices its lines were read from, oldest first; the base price is billed as a period starts and the usage as it ends. Absent on the current period, which is not invoiced yet. */
|
|
1486
|
+
invoices?: components["schemas"]["BillingIssuedInvoice"][];
|
|
1487
|
+
};
|
|
1488
|
+
ApiResponse_BillingSummary: {
|
|
1489
|
+
success: boolean;
|
|
1490
|
+
data: components["schemas"]["BillingSummary"];
|
|
1491
|
+
};
|
|
1198
1492
|
BillingScheduledChange: {
|
|
1199
1493
|
/** @enum {string} */
|
|
1200
1494
|
type: "schedule_transition" | "plan_change";
|
|
@@ -1224,7 +1518,7 @@ export interface components {
|
|
|
1224
1518
|
/** @description Unfinished purchase or plan change awaiting payment; resume it with GET /api/billing/operations/{operationID}. */
|
|
1225
1519
|
pendingOperationId?: string;
|
|
1226
1520
|
};
|
|
1227
|
-
|
|
1521
|
+
BillingSubscriptionActions: {
|
|
1228
1522
|
canStartCheckout: boolean;
|
|
1229
1523
|
canManagePaymentMethods: boolean;
|
|
1230
1524
|
canUpdateBillingProfile: boolean;
|
|
@@ -1235,7 +1529,7 @@ export interface components {
|
|
|
1235
1529
|
canPayOpenInvoice: boolean;
|
|
1236
1530
|
canWithdrawScheduledChange: boolean;
|
|
1237
1531
|
};
|
|
1238
|
-
|
|
1532
|
+
BillingSubscription: {
|
|
1239
1533
|
billingOwner: components["schemas"]["BillingOwner"];
|
|
1240
1534
|
/** @enum {string} */
|
|
1241
1535
|
billingMode: "not_setup" | "self_serve" | "managed";
|
|
@@ -1252,12 +1546,12 @@ export interface components {
|
|
|
1252
1546
|
scheduledChange?: components["schemas"]["BillingScheduledChange"];
|
|
1253
1547
|
hasPendingUpdate: boolean;
|
|
1254
1548
|
paymentHealth: components["schemas"]["BillingPaymentHealth"];
|
|
1255
|
-
actions: components["schemas"]["
|
|
1549
|
+
actions: components["schemas"]["BillingSubscriptionActions"];
|
|
1256
1550
|
};
|
|
1257
|
-
|
|
1551
|
+
ApiResponse_BillingSubscription: {
|
|
1258
1552
|
/** @example true */
|
|
1259
1553
|
success: boolean;
|
|
1260
|
-
data: components["schemas"]["
|
|
1554
|
+
data: components["schemas"]["BillingSubscription"];
|
|
1261
1555
|
};
|
|
1262
1556
|
BillingPaymentMethod: {
|
|
1263
1557
|
id: string;
|
|
@@ -1466,7 +1760,7 @@ export interface components {
|
|
|
1466
1760
|
consent: true;
|
|
1467
1761
|
paymentMethodId?: string;
|
|
1468
1762
|
setupIntentId?: string;
|
|
1469
|
-
/** @description Start Team on its free trial instead of billing it now. The card in paymentMethodId or setupIntentId is charged when the trial ends. Team only. Refused with trial_unavailable once the account has had the trial
|
|
1763
|
+
/** @description Start Team on its free trial instead of billing it now. The card in paymentMethodId or setupIntentId is charged when the trial ends. Team only. Refused with trial_unavailable once the account has had the trial. */
|
|
1470
1764
|
trial?: boolean;
|
|
1471
1765
|
};
|
|
1472
1766
|
BillingChangeRequest: {
|
|
@@ -2926,6 +3220,18 @@ export interface components {
|
|
|
2926
3220
|
};
|
|
2927
3221
|
};
|
|
2928
3222
|
parameters: {
|
|
3223
|
+
/** @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`. */
|
|
3224
|
+
UsageStart: string;
|
|
3225
|
+
/** @description End of the window, exclusive, in the same forms as `start`. Defaults to now. Not with `for`. */
|
|
3226
|
+
UsageEnd: string;
|
|
3227
|
+
/** @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. */
|
|
3228
|
+
UsageFor: "today" | "yesterday" | "this-week" | "last-week" | "this-month" | "last-month";
|
|
3229
|
+
/** @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 is read whole from the invoices issued for it, named in `invoices`: its metered quantities and cost as billed, the included credits taken off, the base price, and any other line under its own name. */
|
|
3230
|
+
SummaryPeriod: string;
|
|
3231
|
+
/** @description Width of each interval. Days are aligned to `timezone`; hours are UTC. */
|
|
3232
|
+
UsageGranularity: "1d" | "1h";
|
|
3233
|
+
/** @description IANA timezone that day intervals and dates are aligned to. */
|
|
3234
|
+
UsageTimezone: string;
|
|
2929
3235
|
/** @description Disk ID (format `dsk-{16 hex chars}`) */
|
|
2930
3236
|
DiskId: string;
|
|
2931
3237
|
/** @description Sandbox UUID */
|
|
@@ -2943,7 +3249,7 @@ export interface components {
|
|
|
2943
3249
|
}
|
|
2944
3250
|
export type $defs = Record<string, never>;
|
|
2945
3251
|
export interface operations {
|
|
2946
|
-
|
|
3252
|
+
getBillingSubscription: {
|
|
2947
3253
|
parameters: {
|
|
2948
3254
|
query?: never;
|
|
2949
3255
|
header?: never;
|
|
@@ -2952,13 +3258,13 @@ export interface operations {
|
|
|
2952
3258
|
};
|
|
2953
3259
|
requestBody?: never;
|
|
2954
3260
|
responses: {
|
|
2955
|
-
/** @description
|
|
3261
|
+
/** @description Subscription state */
|
|
2956
3262
|
200: {
|
|
2957
3263
|
headers: {
|
|
2958
3264
|
[name: string]: unknown;
|
|
2959
3265
|
};
|
|
2960
3266
|
content: {
|
|
2961
|
-
"application/json": components["schemas"]["
|
|
3267
|
+
"application/json": components["schemas"]["ApiResponse_BillingSubscription"];
|
|
2962
3268
|
};
|
|
2963
3269
|
};
|
|
2964
3270
|
/** @description Missing, invalid, or disallowed credential */
|
|
@@ -2981,6 +3287,100 @@ export interface operations {
|
|
|
2981
3287
|
};
|
|
2982
3288
|
};
|
|
2983
3289
|
};
|
|
3290
|
+
getBillingUsage: {
|
|
3291
|
+
parameters: {
|
|
3292
|
+
query?: {
|
|
3293
|
+
/** @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`. */
|
|
3294
|
+
start?: components["parameters"]["UsageStart"];
|
|
3295
|
+
/** @description End of the window, exclusive, in the same forms as `start`. Defaults to now. Not with `for`. */
|
|
3296
|
+
end?: components["parameters"]["UsageEnd"];
|
|
3297
|
+
/** @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. */
|
|
3298
|
+
for?: components["parameters"]["UsageFor"];
|
|
3299
|
+
/** @description Width of each interval. Days are aligned to `timezone`; hours are UTC. */
|
|
3300
|
+
granularity?: components["parameters"]["UsageGranularity"];
|
|
3301
|
+
/** @description IANA timezone that day intervals and dates are aligned to. */
|
|
3302
|
+
timezone?: components["parameters"]["UsageTimezone"];
|
|
3303
|
+
};
|
|
3304
|
+
header?: never;
|
|
3305
|
+
path?: never;
|
|
3306
|
+
cookie?: never;
|
|
3307
|
+
};
|
|
3308
|
+
requestBody?: never;
|
|
3309
|
+
responses: {
|
|
3310
|
+
/** @description Usage over the window and per interval */
|
|
3311
|
+
200: {
|
|
3312
|
+
headers: {
|
|
3313
|
+
[name: string]: unknown;
|
|
3314
|
+
};
|
|
3315
|
+
content: {
|
|
3316
|
+
"application/json": components["schemas"]["ApiResponse_BillingUsage"];
|
|
3317
|
+
};
|
|
3318
|
+
};
|
|
3319
|
+
400: components["responses"]["ValidationError"];
|
|
3320
|
+
401: components["responses"]["Unauthorized"];
|
|
3321
|
+
502: components["responses"]["InternalError"];
|
|
3322
|
+
};
|
|
3323
|
+
};
|
|
3324
|
+
getBillingCosts: {
|
|
3325
|
+
parameters: {
|
|
3326
|
+
query?: {
|
|
3327
|
+
/** @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`. */
|
|
3328
|
+
start?: components["parameters"]["UsageStart"];
|
|
3329
|
+
/** @description End of the window, exclusive, in the same forms as `start`. Defaults to now. Not with `for`. */
|
|
3330
|
+
end?: components["parameters"]["UsageEnd"];
|
|
3331
|
+
/** @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. */
|
|
3332
|
+
for?: components["parameters"]["UsageFor"];
|
|
3333
|
+
/** @description Width of each interval. Days are aligned to `timezone`; hours are UTC. */
|
|
3334
|
+
granularity?: components["parameters"]["UsageGranularity"];
|
|
3335
|
+
/** @description IANA timezone that day intervals and dates are aligned to. */
|
|
3336
|
+
timezone?: components["parameters"]["UsageTimezone"];
|
|
3337
|
+
};
|
|
3338
|
+
header?: never;
|
|
3339
|
+
path?: never;
|
|
3340
|
+
cookie?: never;
|
|
3341
|
+
};
|
|
3342
|
+
requestBody?: never;
|
|
3343
|
+
responses: {
|
|
3344
|
+
/** @description Cost over the window and per interval */
|
|
3345
|
+
200: {
|
|
3346
|
+
headers: {
|
|
3347
|
+
[name: string]: unknown;
|
|
3348
|
+
};
|
|
3349
|
+
content: {
|
|
3350
|
+
"application/json": components["schemas"]["ApiResponse_BillingCosts"];
|
|
3351
|
+
};
|
|
3352
|
+
};
|
|
3353
|
+
400: components["responses"]["ValidationError"];
|
|
3354
|
+
401: components["responses"]["Unauthorized"];
|
|
3355
|
+
502: components["responses"]["InternalError"];
|
|
3356
|
+
};
|
|
3357
|
+
};
|
|
3358
|
+
getBillingSummary: {
|
|
3359
|
+
parameters: {
|
|
3360
|
+
query?: {
|
|
3361
|
+
/** @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 is read whole from the invoices issued for it, named in `invoices`: its metered quantities and cost as billed, the included credits taken off, the base price, and any other line under its own name. */
|
|
3362
|
+
period?: components["parameters"]["SummaryPeriod"];
|
|
3363
|
+
};
|
|
3364
|
+
header?: never;
|
|
3365
|
+
path?: never;
|
|
3366
|
+
cookie?: never;
|
|
3367
|
+
};
|
|
3368
|
+
requestBody?: never;
|
|
3369
|
+
responses: {
|
|
3370
|
+
/** @description The period's statement as a sum, with a projection for the current period */
|
|
3371
|
+
200: {
|
|
3372
|
+
headers: {
|
|
3373
|
+
[name: string]: unknown;
|
|
3374
|
+
};
|
|
3375
|
+
content: {
|
|
3376
|
+
"application/json": components["schemas"]["ApiResponse_BillingSummary"];
|
|
3377
|
+
};
|
|
3378
|
+
};
|
|
3379
|
+
400: components["responses"]["ValidationError"];
|
|
3380
|
+
401: components["responses"]["Unauthorized"];
|
|
3381
|
+
502: components["responses"]["InternalError"];
|
|
3382
|
+
};
|
|
3383
|
+
};
|
|
2984
3384
|
listBillingPaymentMethods: {
|
|
2985
3385
|
parameters: {
|
|
2986
3386
|
query?: {
|
|
@@ -3405,7 +3805,7 @@ export interface operations {
|
|
|
3405
3805
|
400: components["responses"]["ValidationError"];
|
|
3406
3806
|
401: components["responses"]["Unauthorized"];
|
|
3407
3807
|
404: components["responses"]["NotFound"];
|
|
3408
|
-
/** @description The account already has a subscription (`already_subscribed`), the operationId was used for a different request (`operation_conflict`), or the setup is incomplete (`setup_incomplete`); the current state is in data. A trial is refused when the account has had it (`trial_unavailable`)
|
|
3808
|
+
/** @description The account already has a subscription (`already_subscribed`), the operationId was used for a different request (`operation_conflict`), or the setup is incomplete (`setup_incomplete`); the current state is in data. A trial is refused when the account has had it (`trial_unavailable`). */
|
|
3409
3809
|
409: {
|
|
3410
3810
|
headers: {
|
|
3411
3811
|
[name: string]: unknown;
|