@archildata/api-types 0.0.77 → 0.0.79

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 +94 -10
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -516,6 +516,10 @@ export interface paths {
516
516
  * @description Adds an authorized user to a disk. Users can authenticate via:
517
517
  * - **token**: A shared token with a nickname and 4-character suffix
518
518
  * - **awssts**: AWS STS role assumption with an IAM principal ARN
519
+ * - **s3**: An S3 access key pair for the disk's S3-compatible endpoint.
520
+ * The server generates both keys; the secret key is returned only in
521
+ * this response. The credential covers the whole disk, so keep it on
522
+ * your server and hand clients presigned URLs instead of the keys.
519
523
  */
520
524
  post: operations["addDiskUser"];
521
525
  delete?: never;
@@ -2026,7 +2030,7 @@ export interface components {
2026
2030
  readonly managed?: boolean;
2027
2031
  };
2028
2032
  SandboxTimeoutRequest: {
2029
- /** @description Seconds from now until a running sandbox expires, capped at 24 hours after its session started, and the lifetime budget for its next powered-on session. */
2033
+ /** @description Seconds from now until a running sandbox expires, capped at the plan's session ceiling (24 hours at most) after its session started, and the lifetime budget for its next powered-on session. Held to the plan's session ceiling and to what is left of its sandbox allowance (403). */
2030
2034
  timeout?: number;
2031
2035
  /** @description Seconds without a direct process connection before the sandbox pauses. Zero disables idle expiry. */
2032
2036
  idle_ttl_seconds?: number;
@@ -2039,7 +2043,7 @@ export interface components {
2039
2043
  status: components["schemas"]["SandboxState"];
2040
2044
  vcpu_count: number;
2041
2045
  mem_size_mib: number;
2042
- /** @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume. Defaults to 24 hours. The timeout endpoint can move the deadline, but no session runs longer than 24 hours. */
2046
+ /** @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume. Defaults to 24 hours, or to the longest session the plan allows; a start, resume or fork lowers a stored value the plan no longer allows. The timeout endpoint can move the deadline, but no session runs longer than 24 hours. */
2043
2047
  max_ttl_seconds: number;
2044
2048
  /** @description Seconds without a direct process connection before the sandbox pauses, preserving memory and processes for resume. Zero disables idle expiry. */
2045
2049
  idle_ttl_seconds: number;
@@ -2255,7 +2259,7 @@ export interface components {
2255
2259
  /** @description Archil disks mounted inside the guest for the first session; `start` can replace them for later sessions. Inherited by forks. A sandbox with mounts must be stopped before it can be forked. */
2256
2260
  mounts?: components["schemas"]["SandboxMount"][];
2257
2261
  /**
2258
- * @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume.
2262
+ * @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume. An omitted value is lowered to the longest session the plan allows for the sandbox's size (its session ceiling, then the remaining monthly allowance); an explicit value past that is refused with 403 (`sandbox_ttl_limit_exceeded` or `allowance_insufficient`).
2259
2263
  * @default 86400
2260
2264
  */
2261
2265
  max_ttl_seconds: number;
@@ -2574,7 +2578,25 @@ export interface components {
2574
2578
  /** @description When true, the credential grants read-only access. Mounts authenticated with this credential reject writes with EROFS. */
2575
2579
  readOnly?: boolean;
2576
2580
  };
2577
- DiskUser: components["schemas"]["TokenUser"] | components["schemas"]["AwsStsUser"];
2581
+ /** @description S3 access key pair for the disk's S3-compatible endpoint. Both keys are generated by the server. The credential grants access to every object on the disk; there is no per-prefix scoping, so do not expose the keys to browsers or other untrusted clients. Sign presigned URLs with them server-side instead. */
2582
+ S3User: {
2583
+ /**
2584
+ * @description discriminator enum property added by openapi-typescript
2585
+ * @enum {string}
2586
+ */
2587
+ type: "s3";
2588
+ nickname?: string;
2589
+ /** @description Optional time-to-live as a Go duration string (e.g. "1h", "30m"). Maximum 365 days ("8760h"). Requests signed with an expired key, including presigned URLs, are rejected. Mutually exclusive with expiresAt. */
2590
+ ttl?: string;
2591
+ /**
2592
+ * Format: date-time
2593
+ * @description Optional absolute expiration time as an RFC3339 timestamp. Must be in the future. Mutually exclusive with ttl.
2594
+ */
2595
+ expiresAt?: string;
2596
+ /** @description When true, the credential may only issue GET and HEAD requests. Writes, deletes, and multipart operations are rejected with AccessDenied. */
2597
+ readOnly?: boolean;
2598
+ };
2599
+ DiskUser: components["schemas"]["TokenUser"] | components["schemas"]["AwsStsUser"] | components["schemas"]["S3User"];
2578
2600
  DiskResponse: {
2579
2601
  /**
2580
2602
  * @description Disk ID
@@ -2710,7 +2732,7 @@ export interface components {
2710
2732
  };
2711
2733
  AuthorizedUser: {
2712
2734
  /** @enum {string} */
2713
- type?: "token" | "awssts";
2735
+ type?: "token" | "awssts" | "s3";
2714
2736
  /**
2715
2737
  * @deprecated
2716
2738
  * @description Use identifier instead. Only populated for awssts type (the IAM ARN).
@@ -2720,7 +2742,11 @@ export interface components {
2720
2742
  tokenSuffix?: string;
2721
2743
  /** @description The generated mount token. Only present in the response when the server generates the token (i.e. principal was not provided). This value is shown exactly once and cannot be retrieved again. */
2722
2744
  token?: string;
2723
- /** @description Stable identifier for this user, returned in creation and list responses. Use this value with DELETE /api/disks/{id}/users/{type}?identifier={identifier} to remove the user. For awssts users, this is the IAM ARN. */
2745
+ /** @description The S3 access key ID. Only present for s3 users. */
2746
+ s3AccessKeyId?: string;
2747
+ /** @description The generated S3 secret access key. Only present in the creation response for s3 users. This value is shown exactly once and cannot be retrieved again. */
2748
+ s3SecretKey?: string;
2749
+ /** @description Stable identifier for this user, returned in creation and list responses. Use this value with DELETE /api/disks/{id}/users/{type}?identifier={identifier} to remove the user. For awssts users, this is the IAM ARN; for s3 users, the access key ID. */
2724
2750
  identifier?: string;
2725
2751
  /** Format: date-time */
2726
2752
  createdAt?: string;
@@ -2739,10 +2765,10 @@ export interface components {
2739
2765
  /** @description Whether this token grants read-only access. */
2740
2766
  readOnly?: boolean;
2741
2767
  /**
2742
- * @description Current lifecycle status of the token.
2768
+ * @description Current lifecycle status of the token. `in_use` means a one-use token is being consumed by a mount that is still in progress.
2743
2769
  * @enum {string}
2744
2770
  */
2745
- status?: "active" | "expired" | "consumed";
2771
+ status?: "active" | "expired" | "consumed" | "in_use";
2746
2772
  };
2747
2773
  /** @description All API responses use a standard envelope with `success: boolean` and `data` (on success) or `error: string` (on failure). The ApiResponse_* schemas each define the specific `data` shape for their endpoint. */
2748
2774
  ApiResponse_DiskList: {
@@ -3313,6 +3339,42 @@ export interface components {
3313
3339
  "application/json": components["schemas"]["ErrorResponse"];
3314
3340
  };
3315
3341
  };
3342
+ /**
3343
+ * @description The account's plan has used its serverless tool call allowance for
3344
+ * the month. `code` is `allowance_exhausted`; `data` carries the
3345
+ * `feature`, the `limit` the plan grants, the `remaining` balance and
3346
+ * `nextResetAt` (Unix seconds). Paid plans are never refused.
3347
+ */
3348
+ ToolCallAllowanceExhausted: {
3349
+ headers: {
3350
+ [name: string]: unknown;
3351
+ };
3352
+ content: {
3353
+ "application/json": components["schemas"]["ErrorResponse"];
3354
+ };
3355
+ };
3356
+ /**
3357
+ * @description The account's plan cannot cover this sandbox session. `code` is
3358
+ * `sandbox_ttl_limit_exceeded` (an explicit `max_ttl_seconds` is
3359
+ * longer than the plan's ceiling; `data.limit` is the ceiling in
3360
+ * minutes), `allowance_insufficient` (the session's vCPU-hours or
3361
+ * GiB-hours, allocation × timeout, exceed what is left of the month's
3362
+ * allowance; `data` carries `feature`, `limit`, `remaining`,
3363
+ * `requested` and `nextResetAt`) or `allowance_exhausted` (an
3364
+ * allowance is used up). A timeout the caller did not choose is
3365
+ * lowered to fit the plan rather than refused; a fork is judged as
3366
+ * one launch of the source's shape, and the fitted timeout applies to
3367
+ * the child and to the resumed source alike. Paid plans are never
3368
+ * refused.
3369
+ */
3370
+ SandboxPlanLimit: {
3371
+ headers: {
3372
+ [name: string]: unknown;
3373
+ };
3374
+ content: {
3375
+ "application/json": components["schemas"]["ErrorResponse"];
3376
+ };
3377
+ };
3316
3378
  };
3317
3379
  parameters: {
3318
3380
  /** @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`. */
@@ -4516,7 +4578,7 @@ export interface operations {
4516
4578
  removeDiskUser: {
4517
4579
  parameters: {
4518
4580
  query?: {
4519
- /** @description Identifier of the user to remove, as returned in the creation or list response. For awssts users, this is the IAM ARN. */
4581
+ /** @description Identifier of the user to remove, as returned in the creation or list response. For awssts users, this is the IAM ARN; for s3 users, the access key ID. */
4520
4582
  identifier?: string;
4521
4583
  /**
4522
4584
  * @deprecated
@@ -4529,7 +4591,7 @@ export interface operations {
4529
4591
  /** @description Disk ID (format `dsk-{16 hex chars}`) */
4530
4592
  id: components["parameters"]["DiskId"];
4531
4593
  /** @description The type of user authentication */
4532
- userType: "token" | "awssts";
4594
+ userType: "token" | "awssts" | "s3";
4533
4595
  };
4534
4596
  cookie?: never;
4535
4597
  };
@@ -4802,6 +4864,7 @@ export interface operations {
4802
4864
  };
4803
4865
  400: components["responses"]["ValidationError"];
4804
4866
  401: components["responses"]["Unauthorized"];
4867
+ 403: components["responses"]["ToolCallAllowanceExhausted"];
4805
4868
  404: components["responses"]["NotFound"];
4806
4869
  500: components["responses"]["InternalError"];
4807
4870
  /** @description Command timed out */
@@ -4901,6 +4964,7 @@ export interface operations {
4901
4964
  };
4902
4965
  400: components["responses"]["ValidationError"];
4903
4966
  401: components["responses"]["Unauthorized"];
4967
+ 403: components["responses"]["ToolCallAllowanceExhausted"];
4904
4968
  404: components["responses"]["NotFound"];
4905
4969
  500: components["responses"]["InternalError"];
4906
4970
  /** @description Command timed out */
@@ -5099,6 +5163,7 @@ export interface operations {
5099
5163
  };
5100
5164
  400: components["responses"]["ValidationError"];
5101
5165
  401: components["responses"]["Unauthorized"];
5166
+ 403: components["responses"]["SandboxPlanLimit"];
5102
5167
  404: components["responses"]["NotFound"];
5103
5168
  /** @description The requested sandbox name already exists in the account, or the requested `image_id` has no finished build yet */
5104
5169
  409: {
@@ -5495,6 +5560,7 @@ export interface operations {
5495
5560
  };
5496
5561
  400: components["responses"]["ValidationError"];
5497
5562
  401: components["responses"]["Unauthorized"];
5563
+ 403: components["responses"]["SandboxPlanLimit"];
5498
5564
  404: components["responses"]["NotFound"];
5499
5565
  /** @description The source cannot be paused or its fork checkpoint is unavailable */
5500
5566
  409: {
@@ -5544,6 +5610,7 @@ export interface operations {
5544
5610
  };
5545
5611
  400: components["responses"]["ValidationError"];
5546
5612
  401: components["responses"]["Unauthorized"];
5613
+ 403: components["responses"]["SandboxPlanLimit"];
5547
5614
  404: components["responses"]["NotFound"];
5548
5615
  /** @description The sandbox is not paused, is shutting down, or a cold start is already in progress */
5549
5616
  409: {
@@ -5662,6 +5729,22 @@ export interface operations {
5662
5729
  };
5663
5730
  400: components["responses"]["ValidationError"];
5664
5731
  401: components["responses"]["Unauthorized"];
5732
+ /**
5733
+ * @description The account's plan cannot cover the new session timeout: it is
5734
+ * longer than the plan's ceiling (`sandbox_ttl_limit_exceeded`), or
5735
+ * the sandbox's allocation over it exceeds what is left of the
5736
+ * month's allowance (`allowance_insufficient`, `allowance_exhausted`).
5737
+ * `data` carries the `feature`, `limit`, `remaining` and
5738
+ * `nextResetAt`. Paid plans are never refused.
5739
+ */
5740
+ 403: {
5741
+ headers: {
5742
+ [name: string]: unknown;
5743
+ };
5744
+ content: {
5745
+ "application/json": components["schemas"]["ErrorResponse"];
5746
+ };
5747
+ };
5665
5748
  404: components["responses"]["NotFound"];
5666
5749
  /** @description The sandbox is transitioning or its timeout changed concurrently */
5667
5750
  409: {
@@ -5715,6 +5798,7 @@ export interface operations {
5715
5798
  };
5716
5799
  400: components["responses"]["ValidationError"];
5717
5800
  401: components["responses"]["Unauthorized"];
5801
+ 403: components["responses"]["SandboxPlanLimit"];
5718
5802
  404: components["responses"]["NotFound"];
5719
5803
  /** @description The previous VM is stopping or pausing, or a resume is already in progress */
5720
5804
  409: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.77",
3
+ "version": "0.0.79",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",