@archildata/api-types 0.0.82 → 0.0.83

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.
Files changed (2) hide show
  1. package/index.d.ts +92 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -915,6 +915,26 @@ export interface paths {
915
915
  patch?: never;
916
916
  trace?: never;
917
917
  };
918
+ "/api/sandboxes/{sid}/usage": {
919
+ parameters: {
920
+ query?: never;
921
+ header?: never;
922
+ path?: never;
923
+ cookie?: never;
924
+ };
925
+ /**
926
+ * Get a sandbox's usage and cost
927
+ * @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.
928
+ */
929
+ get: operations["getSandboxUsage"];
930
+ put?: never;
931
+ post?: never;
932
+ delete?: never;
933
+ options?: never;
934
+ head?: never;
935
+ patch?: never;
936
+ trace?: never;
937
+ };
918
938
  "/api/sandboxes/{sid}/connections": {
919
939
  parameters: {
920
940
  query?: never;
@@ -2234,6 +2254,51 @@ export interface components {
2234
2254
  success: boolean;
2235
2255
  data: components["schemas"]["SandboxNetwork"];
2236
2256
  };
2257
+ SandboxUsage: {
2258
+ sandbox_id: string;
2259
+ /**
2260
+ * Format: date-time
2261
+ * @description When the usage was read.
2262
+ */
2263
+ as_of: string;
2264
+ /**
2265
+ * Format: double
2266
+ * @description Allocated vCPUs times hours running.
2267
+ * @example 3
2268
+ */
2269
+ vcpu_hours: number;
2270
+ /**
2271
+ * Format: double
2272
+ * @description Allocated memory in GiB times hours running.
2273
+ * @example 6
2274
+ */
2275
+ memory_gib_hours: number;
2276
+ rates: {
2277
+ /**
2278
+ * Format: double
2279
+ * @description Dollars per vCPU-hour at the account's rates.
2280
+ * @example 0.055
2281
+ */
2282
+ vcpu_hour: number;
2283
+ /**
2284
+ * Format: double
2285
+ * @description Dollars per GiB-hour at the account's rates.
2286
+ * @example 0.02
2287
+ */
2288
+ memory_gib_hour: number;
2289
+ };
2290
+ /**
2291
+ * Format: double
2292
+ * @description Dollars, before included allowances and prepaid credit.
2293
+ * @example 0.285
2294
+ */
2295
+ cost: number;
2296
+ };
2297
+ ApiResponse_SandboxUsage: {
2298
+ /** @example true */
2299
+ success: boolean;
2300
+ data: components["schemas"]["SandboxUsage"];
2301
+ };
2237
2302
  CreateSandboxRequest: {
2238
2303
  /** @description Sandbox name, unique within the account. A random word-list name is generated when omitted. */
2239
2304
  name?: string;
@@ -5295,6 +5360,33 @@ export interface operations {
5295
5360
  500: components["responses"]["InternalError"];
5296
5361
  };
5297
5362
  };
5363
+ getSandboxUsage: {
5364
+ parameters: {
5365
+ query?: never;
5366
+ header?: never;
5367
+ path: {
5368
+ /** @description Sandbox UUID */
5369
+ sid: components["parameters"]["SandboxId"];
5370
+ };
5371
+ cookie?: never;
5372
+ };
5373
+ requestBody?: never;
5374
+ responses: {
5375
+ /** @description The sandbox's usage and cost */
5376
+ 200: {
5377
+ headers: {
5378
+ [name: string]: unknown;
5379
+ };
5380
+ content: {
5381
+ "application/json": components["schemas"]["ApiResponse_SandboxUsage"];
5382
+ };
5383
+ };
5384
+ 401: components["responses"]["Unauthorized"];
5385
+ 404: components["responses"]["NotFound"];
5386
+ 500: components["responses"]["InternalError"];
5387
+ 503: components["responses"]["RetryableUnavailable"];
5388
+ };
5389
+ };
5298
5390
  createSandboxConnection: {
5299
5391
  parameters: {
5300
5392
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.82",
3
+ "version": "0.0.83",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",