@archildata/api-types 0.0.81 → 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 +98 -3
  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;
@@ -2975,7 +3040,7 @@ export interface components {
2975
3040
  baseImage?: string;
2976
3041
  /** @description An image from the images API, for images that need registry credentials. The exec runs the image's current `digest`. Mutually exclusive with `baseImage`. */
2977
3042
  imageId?: string;
2978
- /** @description vCPUs for the command's VM. Defaults to 2. An exec larger than the default size (2 vCPU, 4096 MiB) bills as that many multiples of a call, by whichever of vCPU and memory is the larger multiple, rounded up. */
3043
+ /** @description vCPUs for the command's VM. Defaults to 2. An exec larger than the default size (2 vCPU, 4096 MiB) bills as that many multiples of a call, by whichever of vCPU and memory is the larger multiple, rounded up. The Free plan allows only the default size. */
2979
3044
  vcpuCount?: number;
2980
3045
  /** @description Memory in MiB for the command's VM. Defaults to 4096. Billed as described for `vcpuCount`. */
2981
3046
  memSizeMib?: number;
@@ -3053,7 +3118,7 @@ export interface components {
3053
3118
  baseImage?: string;
3054
3119
  /** @description An image from the images API, for images that need registry credentials. The exec runs the image's current `digest`. Mutually exclusive with `baseImage`. */
3055
3120
  imageId?: string;
3056
- /** @description vCPUs for the command's VM. Defaults to 2. An exec larger than the default size (2 vCPU, 4096 MiB) bills as that many multiples of a call, by whichever of vCPU and memory is the larger multiple, rounded up. */
3121
+ /** @description vCPUs for the command's VM. Defaults to 2. An exec larger than the default size (2 vCPU, 4096 MiB) bills as that many multiples of a call, by whichever of vCPU and memory is the larger multiple, rounded up. The Free plan allows only the default size. */
3057
3122
  vcpuCount?: number;
3058
3123
  /** @description Memory in MiB for the command's VM. Defaults to 4096. Billed as described for `vcpuCount`. */
3059
3124
  memSizeMib?: number;
@@ -3372,7 +3437,10 @@ export interface components {
3372
3437
  * @description The account's plan has used its serverless tool call allowance for
3373
3438
  * the month. `code` is `allowance_exhausted`; `data` carries the
3374
3439
  * `feature`, the `limit` the plan grants, the `remaining` balance and
3375
- * `nextResetAt` (Unix seconds). Paid plans are never refused.
3440
+ * `nextResetAt` (Unix seconds). An exec larger than the plan allows is
3441
+ * refused with `tool_call_size_limit_exceeded`; `data.limit` is the
3442
+ * largest size in calls and `data.requested` the size asked for. Paid
3443
+ * plans are never refused.
3376
3444
  */
3377
3445
  ToolCallAllowanceExhausted: {
3378
3446
  headers: {
@@ -5292,6 +5360,33 @@ export interface operations {
5292
5360
  500: components["responses"]["InternalError"];
5293
5361
  };
5294
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
+ };
5295
5390
  createSandboxConnection: {
5296
5391
  parameters: {
5297
5392
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.81",
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",