@archildata/api-types 0.0.82 → 0.0.84
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 +247 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -242,6 +242,46 @@ export interface paths {
|
|
|
242
242
|
patch?: never;
|
|
243
243
|
trace?: never;
|
|
244
244
|
};
|
|
245
|
+
"/api/billing/redeem/preview": {
|
|
246
|
+
parameters: {
|
|
247
|
+
query?: never;
|
|
248
|
+
header?: never;
|
|
249
|
+
path?: never;
|
|
250
|
+
cookie?: never;
|
|
251
|
+
};
|
|
252
|
+
get?: never;
|
|
253
|
+
put?: never;
|
|
254
|
+
/**
|
|
255
|
+
* Describe the reward a promo code belongs to
|
|
256
|
+
* @description Looks up the Autumn reward that owns a promo code, so the console can describe it before redeeming: its name, whether it is a feature grant or a plan discount (coupon), how long a grant lasts, and whether it must be redeemed in a team workspace. Codes are compared exactly, case included. Whether this account may still redeem the code is answered by POST /api/billing/redeem.
|
|
257
|
+
*/
|
|
258
|
+
post: operations["previewBillingCode"];
|
|
259
|
+
delete?: never;
|
|
260
|
+
options?: never;
|
|
261
|
+
head?: never;
|
|
262
|
+
patch?: never;
|
|
263
|
+
trace?: never;
|
|
264
|
+
};
|
|
265
|
+
"/api/billing/redeem": {
|
|
266
|
+
parameters: {
|
|
267
|
+
query?: never;
|
|
268
|
+
header?: never;
|
|
269
|
+
path?: never;
|
|
270
|
+
cookie?: never;
|
|
271
|
+
};
|
|
272
|
+
get?: never;
|
|
273
|
+
put?: never;
|
|
274
|
+
/**
|
|
275
|
+
* Redeem a promo code
|
|
276
|
+
* @description Redeems an Autumn feature-grant promo code for the selected account: Autumn checks the code and grants the reward's features on top of the account's plan until they lapse. A grant that includes workspaces is redeemed in a team workspace. Codes are compared exactly, case included, and an account redeems a code once. A plan discount (coupon) code is applied when buying a plan instead.
|
|
277
|
+
*/
|
|
278
|
+
post: operations["redeemBillingCode"];
|
|
279
|
+
delete?: never;
|
|
280
|
+
options?: never;
|
|
281
|
+
head?: never;
|
|
282
|
+
patch?: never;
|
|
283
|
+
trace?: never;
|
|
284
|
+
};
|
|
245
285
|
"/api/billing/subscription/change": {
|
|
246
286
|
parameters: {
|
|
247
287
|
query?: never;
|
|
@@ -915,6 +955,26 @@ export interface paths {
|
|
|
915
955
|
patch?: never;
|
|
916
956
|
trace?: never;
|
|
917
957
|
};
|
|
958
|
+
"/api/sandboxes/{sid}/usage": {
|
|
959
|
+
parameters: {
|
|
960
|
+
query?: never;
|
|
961
|
+
header?: never;
|
|
962
|
+
path?: never;
|
|
963
|
+
cookie?: never;
|
|
964
|
+
};
|
|
965
|
+
/**
|
|
966
|
+
* Get a sandbox's usage and cost
|
|
967
|
+
* @description Returns the vCPU-hours and memory GiB-hours a sandbox has been billed for over its life, and what that comes to at the account's rates. A sandbox is billed for its allocated vCPUs and memory for every minute it runs, whatever it actually uses; paused and stopped time is free. The figures grow about once a minute while the sandbox runs. Rates are the account's plan prices, including any customer-specific ones, and the cost is gross usage before included allowances and prepaid credit, as in `/api/billing/usage`; a plan that does not price sandbox usage has zero rates. A plan change reaches the rates within a minute. Usage stays readable after the sandbox is deleted, for as long as usage records are retained (90 days by default). Hours and dollars carry six decimal places.
|
|
968
|
+
*/
|
|
969
|
+
get: operations["getSandboxUsage"];
|
|
970
|
+
put?: never;
|
|
971
|
+
post?: never;
|
|
972
|
+
delete?: never;
|
|
973
|
+
options?: never;
|
|
974
|
+
head?: never;
|
|
975
|
+
patch?: never;
|
|
976
|
+
trace?: never;
|
|
977
|
+
};
|
|
918
978
|
"/api/sandboxes/{sid}/connections": {
|
|
919
979
|
parameters: {
|
|
920
980
|
query?: never;
|
|
@@ -1712,6 +1772,40 @@ export interface components {
|
|
|
1712
1772
|
/** @description Preview the purchase with the intro offer, as BillingSubscribeRequest. */
|
|
1713
1773
|
introOffer?: boolean;
|
|
1714
1774
|
};
|
|
1775
|
+
BillingRedeemRequest: {
|
|
1776
|
+
/** @description The promo code, exactly as issued. */
|
|
1777
|
+
code: string;
|
|
1778
|
+
};
|
|
1779
|
+
ApiResponse_BillingRedeemPreview: {
|
|
1780
|
+
/** @example true */
|
|
1781
|
+
success: boolean;
|
|
1782
|
+
data: {
|
|
1783
|
+
rewardId: string;
|
|
1784
|
+
/** @description The reward's name in the catalog, shown to the customer. */
|
|
1785
|
+
name: string;
|
|
1786
|
+
/**
|
|
1787
|
+
* @description A feature grant redeemed on its own, or a discount on a plan purchase.
|
|
1788
|
+
* @enum {string}
|
|
1789
|
+
*/
|
|
1790
|
+
kind: "grant" | "coupon";
|
|
1791
|
+
/** @description How long a grant's features last; absent when none lapse, and for a coupon. */
|
|
1792
|
+
lasts?: {
|
|
1793
|
+
/** @enum {string} */
|
|
1794
|
+
unit: "day" | "week" | "month" | "year";
|
|
1795
|
+
count: number;
|
|
1796
|
+
};
|
|
1797
|
+
/** @description The grant includes workspaces, so it is redeemed in a team workspace. */
|
|
1798
|
+
requiresWorkspace: boolean;
|
|
1799
|
+
};
|
|
1800
|
+
};
|
|
1801
|
+
ApiResponse_BillingRedeemResult: {
|
|
1802
|
+
/** @example true */
|
|
1803
|
+
success: boolean;
|
|
1804
|
+
data: {
|
|
1805
|
+
/** @description The Autumn reward the code redeemed. */
|
|
1806
|
+
rewardId: string;
|
|
1807
|
+
};
|
|
1808
|
+
};
|
|
1715
1809
|
BillingSubscribeRequest: {
|
|
1716
1810
|
/** @enum {string} */
|
|
1717
1811
|
plan: "developer" | "team";
|
|
@@ -2234,6 +2328,51 @@ export interface components {
|
|
|
2234
2328
|
success: boolean;
|
|
2235
2329
|
data: components["schemas"]["SandboxNetwork"];
|
|
2236
2330
|
};
|
|
2331
|
+
SandboxUsage: {
|
|
2332
|
+
sandbox_id: string;
|
|
2333
|
+
/**
|
|
2334
|
+
* Format: date-time
|
|
2335
|
+
* @description When the usage was read.
|
|
2336
|
+
*/
|
|
2337
|
+
as_of: string;
|
|
2338
|
+
/**
|
|
2339
|
+
* Format: double
|
|
2340
|
+
* @description Allocated vCPUs times hours running.
|
|
2341
|
+
* @example 3
|
|
2342
|
+
*/
|
|
2343
|
+
vcpu_hours: number;
|
|
2344
|
+
/**
|
|
2345
|
+
* Format: double
|
|
2346
|
+
* @description Allocated memory in GiB times hours running.
|
|
2347
|
+
* @example 6
|
|
2348
|
+
*/
|
|
2349
|
+
memory_gib_hours: number;
|
|
2350
|
+
rates: {
|
|
2351
|
+
/**
|
|
2352
|
+
* Format: double
|
|
2353
|
+
* @description Dollars per vCPU-hour at the account's rates.
|
|
2354
|
+
* @example 0.055
|
|
2355
|
+
*/
|
|
2356
|
+
vcpu_hour: number;
|
|
2357
|
+
/**
|
|
2358
|
+
* Format: double
|
|
2359
|
+
* @description Dollars per GiB-hour at the account's rates.
|
|
2360
|
+
* @example 0.02
|
|
2361
|
+
*/
|
|
2362
|
+
memory_gib_hour: number;
|
|
2363
|
+
};
|
|
2364
|
+
/**
|
|
2365
|
+
* Format: double
|
|
2366
|
+
* @description Dollars, before included allowances and prepaid credit.
|
|
2367
|
+
* @example 0.285
|
|
2368
|
+
*/
|
|
2369
|
+
cost: number;
|
|
2370
|
+
};
|
|
2371
|
+
ApiResponse_SandboxUsage: {
|
|
2372
|
+
/** @example true */
|
|
2373
|
+
success: boolean;
|
|
2374
|
+
data: components["schemas"]["SandboxUsage"];
|
|
2375
|
+
};
|
|
2237
2376
|
CreateSandboxRequest: {
|
|
2238
2377
|
/** @description Sandbox name, unique within the account. A random word-list name is generated when omitted. */
|
|
2239
2378
|
name?: string;
|
|
@@ -3945,6 +4084,87 @@ export interface operations {
|
|
|
3945
4084
|
};
|
|
3946
4085
|
};
|
|
3947
4086
|
};
|
|
4087
|
+
previewBillingCode: {
|
|
4088
|
+
parameters: {
|
|
4089
|
+
query?: never;
|
|
4090
|
+
header?: never;
|
|
4091
|
+
path?: never;
|
|
4092
|
+
cookie?: never;
|
|
4093
|
+
};
|
|
4094
|
+
requestBody: {
|
|
4095
|
+
content: {
|
|
4096
|
+
"application/json": components["schemas"]["BillingRedeemRequest"];
|
|
4097
|
+
};
|
|
4098
|
+
};
|
|
4099
|
+
responses: {
|
|
4100
|
+
/** @description The reward the code belongs to */
|
|
4101
|
+
200: {
|
|
4102
|
+
headers: {
|
|
4103
|
+
[name: string]: unknown;
|
|
4104
|
+
};
|
|
4105
|
+
content: {
|
|
4106
|
+
"application/json": components["schemas"]["ApiResponse_BillingRedeemPreview"];
|
|
4107
|
+
};
|
|
4108
|
+
};
|
|
4109
|
+
/** @description The request is malformed (`invalid_billing_request`) or no reward has the code (`invalid_code`) */
|
|
4110
|
+
400: {
|
|
4111
|
+
headers: {
|
|
4112
|
+
[name: string]: unknown;
|
|
4113
|
+
};
|
|
4114
|
+
content: {
|
|
4115
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
4116
|
+
};
|
|
4117
|
+
};
|
|
4118
|
+
401: components["responses"]["Unauthorized"];
|
|
4119
|
+
404: components["responses"]["NotFound"];
|
|
4120
|
+
502: components["responses"]["InternalError"];
|
|
4121
|
+
};
|
|
4122
|
+
};
|
|
4123
|
+
redeemBillingCode: {
|
|
4124
|
+
parameters: {
|
|
4125
|
+
query?: never;
|
|
4126
|
+
header?: never;
|
|
4127
|
+
path?: never;
|
|
4128
|
+
cookie?: never;
|
|
4129
|
+
};
|
|
4130
|
+
requestBody: {
|
|
4131
|
+
content: {
|
|
4132
|
+
"application/json": components["schemas"]["BillingRedeemRequest"];
|
|
4133
|
+
};
|
|
4134
|
+
};
|
|
4135
|
+
responses: {
|
|
4136
|
+
/** @description The reward the code granted */
|
|
4137
|
+
200: {
|
|
4138
|
+
headers: {
|
|
4139
|
+
[name: string]: unknown;
|
|
4140
|
+
};
|
|
4141
|
+
content: {
|
|
4142
|
+
"application/json": components["schemas"]["ApiResponse_BillingRedeemResult"];
|
|
4143
|
+
};
|
|
4144
|
+
};
|
|
4145
|
+
/** @description The request is malformed (`invalid_billing_request`) or no reward has the code (`invalid_code`) */
|
|
4146
|
+
400: {
|
|
4147
|
+
headers: {
|
|
4148
|
+
[name: string]: unknown;
|
|
4149
|
+
};
|
|
4150
|
+
content: {
|
|
4151
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
4152
|
+
};
|
|
4153
|
+
};
|
|
4154
|
+
401: components["responses"]["Unauthorized"];
|
|
4155
|
+
404: components["responses"]["NotFound"];
|
|
4156
|
+
/** @description The grant needs a team workspace (`workspace_required`), the account has redeemed this code before (`already_redeemed`), the code's uses are spent (`code_used_up`), or the code is a plan discount (`checkout_required`) */
|
|
4157
|
+
409: {
|
|
4158
|
+
headers: {
|
|
4159
|
+
[name: string]: unknown;
|
|
4160
|
+
};
|
|
4161
|
+
content: {
|
|
4162
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
4163
|
+
};
|
|
4164
|
+
};
|
|
4165
|
+
502: components["responses"]["InternalError"];
|
|
4166
|
+
};
|
|
4167
|
+
};
|
|
3948
4168
|
changeBillingSubscription: {
|
|
3949
4169
|
parameters: {
|
|
3950
4170
|
query?: never;
|
|
@@ -5295,6 +5515,33 @@ export interface operations {
|
|
|
5295
5515
|
500: components["responses"]["InternalError"];
|
|
5296
5516
|
};
|
|
5297
5517
|
};
|
|
5518
|
+
getSandboxUsage: {
|
|
5519
|
+
parameters: {
|
|
5520
|
+
query?: never;
|
|
5521
|
+
header?: never;
|
|
5522
|
+
path: {
|
|
5523
|
+
/** @description Sandbox UUID */
|
|
5524
|
+
sid: components["parameters"]["SandboxId"];
|
|
5525
|
+
};
|
|
5526
|
+
cookie?: never;
|
|
5527
|
+
};
|
|
5528
|
+
requestBody?: never;
|
|
5529
|
+
responses: {
|
|
5530
|
+
/** @description The sandbox's usage and cost */
|
|
5531
|
+
200: {
|
|
5532
|
+
headers: {
|
|
5533
|
+
[name: string]: unknown;
|
|
5534
|
+
};
|
|
5535
|
+
content: {
|
|
5536
|
+
"application/json": components["schemas"]["ApiResponse_SandboxUsage"];
|
|
5537
|
+
};
|
|
5538
|
+
};
|
|
5539
|
+
401: components["responses"]["Unauthorized"];
|
|
5540
|
+
404: components["responses"]["NotFound"];
|
|
5541
|
+
500: components["responses"]["InternalError"];
|
|
5542
|
+
503: components["responses"]["RetryableUnavailable"];
|
|
5543
|
+
};
|
|
5544
|
+
};
|
|
5298
5545
|
createSandboxConnection: {
|
|
5299
5546
|
parameters: {
|
|
5300
5547
|
query?: never;
|