@shardflux/sdk 0.11.0 → 0.12.0
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/CHANGELOG.md +68 -27
- package/README.md +123 -61
- package/dist/account.d.ts +3 -3
- package/dist/account.js +2 -2
- package/dist/cell.d.ts +36 -21
- package/dist/cell.js +49 -20
- package/dist/client.d.ts +56 -35
- package/dist/client.js +89 -21
- package/dist/egress.d.ts +3 -3
- package/dist/errors.d.ts +51 -22
- package/dist/errors.js +61 -16
- package/dist/executions.d.ts +2 -2
- package/dist/feedback.d.ts +3 -3
- package/dist/feedback.js +1 -1
- package/dist/generated/app-api.d.ts +1579 -30
- package/dist/generated/cell-api.d.ts +66 -0
- package/dist/http.d.ts +7 -11
- package/dist/http.js +32 -21
- package/dist/index.d.ts +10 -5
- package/dist/index.js +4 -2
- package/dist/lifecycle.d.ts +19 -2
- package/dist/lifecycle.js +9 -2
- package/dist/progress.d.ts +83 -22
- package/dist/progress.js +71 -10
- package/dist/tar.d.ts +1 -1
- package/dist/tar.js +1 -1
- package/dist/template-file.d.ts +1 -1
- package/dist/template-file.js +1 -1
- package/dist/templates.d.ts +21 -21
- package/dist/templates.js +8 -8
- package/dist/tools.d.ts +3 -3
- package/dist/tools.js +4 -4
- package/dist/version-check.d.ts +1 -1
- package/dist/volumes.d.ts +1 -1
- package/dist/workspace.d.ts +42 -27
- package/dist/workspace.js +45 -22
- package/package.json +4 -1
|
@@ -168,7 +168,7 @@ export interface paths {
|
|
|
168
168
|
put?: never;
|
|
169
169
|
/**
|
|
170
170
|
* Register with email and password
|
|
171
|
-
* @description Always 202 with the same body whether or not the address is already registered (no enumeration). A verification email is sent to new or still-unverified addresses.
|
|
171
|
+
* @description Always 202 with the same body whether or not the address is already registered (no enumeration). A verification email is sent to new or still-unverified addresses. An address at a disposable-email domain (or a subdomain of one) is 422 validation_failed with details.reason `email_disposable`.
|
|
172
172
|
*/
|
|
173
173
|
post: operations["postApiAuthRegister"];
|
|
174
174
|
delete?: never;
|
|
@@ -188,7 +188,7 @@ export interface paths {
|
|
|
188
188
|
put?: never;
|
|
189
189
|
/**
|
|
190
190
|
* Consume an email verification token
|
|
191
|
-
* @description Single use. The emailed link is a frontend page (`/auth/verify-email#token=...`); GET never consumes. The first verification signs out every session, disables any MFA enrolled while unverified and invalidates the other open verification links. A link sent by a registration applies the password chosen in that same registration (`status: verified
|
|
191
|
+
* @description Single use. The emailed link is a frontend page (`/auth/verify-email#token=...`); GET never consumes. The first verification signs out every session, disables any MFA enrolled while unverified and invalidates the other open verification links. A link sent by a registration applies the password chosen in that same registration (`status: verified`). A link from "resend" carries no password, so the stored one (set by an unverified registrant) is discarded: the response is `status: password_reset_required` with a single-use `reset_token` for POST /api/auth/password/reset/confirm, and no sign-in is possible until a password is set. Consumed in the browser whose registration sent the link (its __Host-sf_signup cookie), a `verified` link also signs that browser in: `signed_in: true` with the new session cookie and its `csrf_token`. Anywhere else `signed_in` is false: sign in.
|
|
192
192
|
*/
|
|
193
193
|
post: operations["postApiAuthVerifyEmail"];
|
|
194
194
|
delete?: never;
|
|
@@ -416,7 +416,7 @@ export interface paths {
|
|
|
416
416
|
put?: never;
|
|
417
417
|
/**
|
|
418
418
|
* Start changing the sign-in email (requires step-up)
|
|
419
|
-
* @description Sends a confirmation link to the new address and a notice to the current one. Nothing changes until confirmed. Always 202.
|
|
419
|
+
* @description Sends a confirmation link to the new address and a notice to the current one. Nothing changes until confirmed. Always 202 for a valid address; a disposable-email domain (or a subdomain of one) is 422 validation_failed with details.reason `email_disposable`.
|
|
420
420
|
*/
|
|
421
421
|
post: operations["postApiAuthEmailChange"];
|
|
422
422
|
delete?: never;
|
|
@@ -556,7 +556,7 @@ export interface paths {
|
|
|
556
556
|
put?: never;
|
|
557
557
|
/**
|
|
558
558
|
* Register with email and password
|
|
559
|
-
* @description Always 202 with the same body whether or not the address is already registered (no enumeration). A verification email is sent to new or still-unverified addresses.
|
|
559
|
+
* @description Always 202 with the same body whether or not the address is already registered (no enumeration). A verification email is sent to new or still-unverified addresses. An address at a disposable-email domain (or a subdomain of one) is 422 validation_failed with details.reason `email_disposable`.
|
|
560
560
|
*/
|
|
561
561
|
post: operations["postV1AuthRegister"];
|
|
562
562
|
delete?: never;
|
|
@@ -576,7 +576,7 @@ export interface paths {
|
|
|
576
576
|
put?: never;
|
|
577
577
|
/**
|
|
578
578
|
* Consume an email verification token
|
|
579
|
-
* @description Single use. The emailed link is a frontend page (`/auth/verify-email#token=...`); GET never consumes. The first verification signs out every session, disables any MFA enrolled while unverified and invalidates the other open verification links. A link sent by a registration applies the password chosen in that same registration (`status: verified
|
|
579
|
+
* @description Single use. The emailed link is a frontend page (`/auth/verify-email#token=...`); GET never consumes. The first verification signs out every session, disables any MFA enrolled while unverified and invalidates the other open verification links. A link sent by a registration applies the password chosen in that same registration (`status: verified`). A link from "resend" carries no password, so the stored one (set by an unverified registrant) is discarded: the response is `status: password_reset_required` with a single-use `reset_token` for POST /v1/auth/password/reset/confirm, and no sign-in is possible until a password is set. Sign in afterwards.
|
|
580
580
|
*/
|
|
581
581
|
post: operations["postV1AuthVerifyEmail"];
|
|
582
582
|
delete?: never;
|
|
@@ -804,7 +804,7 @@ export interface paths {
|
|
|
804
804
|
put?: never;
|
|
805
805
|
/**
|
|
806
806
|
* Start changing the sign-in email (requires step-up)
|
|
807
|
-
* @description Sends a confirmation link to the new address and a notice to the current one. Nothing changes until confirmed. Always 202.
|
|
807
|
+
* @description Sends a confirmation link to the new address and a notice to the current one. Nothing changes until confirmed. Always 202 for a valid address; a disposable-email domain (or a subdomain of one) is 422 validation_failed with details.reason `email_disposable`.
|
|
808
808
|
*/
|
|
809
809
|
post: operations["postV1AuthEmailChange"];
|
|
810
810
|
delete?: never;
|
|
@@ -1366,7 +1366,7 @@ export interface paths {
|
|
|
1366
1366
|
put?: never;
|
|
1367
1367
|
/**
|
|
1368
1368
|
* Open a workspace by key (create on first use, reconnect or resume afterwards)
|
|
1369
|
-
* @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress,
|
|
1369
|
+
* @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, key whose deletion is still in progress (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation. `mode` (contracts §29): omitted = processful for a new key and the stored mode for an existing one; `file_first` creates a workspace whose state is a versioned file tree with no VM between executions: it is ready at once (200 with a tool token, `observed_state` running, `tree_revision` 0, no operation), needs a layered template version (409 layout_unsupported otherwise) and is persistent (`lifetime: session` or `idle_policy` with it are 422 not_supported_for_mode); each open of a file-first key re-resolves the size of its execution VMs from `caps`, the template and the plan. 422 mode_not_available while the deployment does not offer file-first workspaces; reopening a key with another mode is 409 mode_mismatch.
|
|
1370
1370
|
*/
|
|
1371
1371
|
post: operations["postV1WorkspacesOpen"];
|
|
1372
1372
|
delete?: never;
|
|
@@ -1428,7 +1428,7 @@ export interface paths {
|
|
|
1428
1428
|
post?: never;
|
|
1429
1429
|
/**
|
|
1430
1430
|
* Delete a workspace (tombstone now, storage cleanup by the cell)
|
|
1431
|
-
* @description Sets desired_state=deleted and deleted_at, revokes tool access immediately (workspace revocation watermark, agent sessions revoked) and creates a `delete` operation for the cell. A file-first workspace’s tree revisions are deleted with the tombstone and the cell deletes its stored files (contracts §29). Repeating returns the same operation.
|
|
1431
|
+
* @description Sets desired_state=deleted and deleted_at, revokes tool access immediately (workspace revocation watermark, agent sessions revoked) and creates a `delete` operation for the cell. A file-first workspace’s tree revisions are deleted with the tombstone and the cell deletes its stored files (contracts §29). Repeating returns the same operation. After deletion finishes (observed_state deleted), the key can open a new workspace ID; old IDs and tokens remain deleted. Supports Idempotency-Key.
|
|
1432
1432
|
*/
|
|
1433
1433
|
delete: operations["deleteV1WorkspacesWorkspaceId"];
|
|
1434
1434
|
options?: never;
|
|
@@ -1456,6 +1456,23 @@ export interface paths {
|
|
|
1456
1456
|
patch?: never;
|
|
1457
1457
|
trace?: never;
|
|
1458
1458
|
};
|
|
1459
|
+
"/v1/workspaces/{workspace_id}/labels": {
|
|
1460
|
+
parameters: {
|
|
1461
|
+
query?: never;
|
|
1462
|
+
header?: never;
|
|
1463
|
+
path?: never;
|
|
1464
|
+
cookie?: never;
|
|
1465
|
+
};
|
|
1466
|
+
get?: never;
|
|
1467
|
+
/** Replace workspace labels */
|
|
1468
|
+
put: operations["putV1WorkspacesWorkspaceIdLabels"];
|
|
1469
|
+
post?: never;
|
|
1470
|
+
delete?: never;
|
|
1471
|
+
options?: never;
|
|
1472
|
+
head?: never;
|
|
1473
|
+
patch?: never;
|
|
1474
|
+
trace?: never;
|
|
1475
|
+
};
|
|
1459
1476
|
"/v1/workspaces/{workspace_id}/idle-policy": {
|
|
1460
1477
|
parameters: {
|
|
1461
1478
|
query?: never;
|
|
@@ -1507,7 +1524,7 @@ export interface paths {
|
|
|
1507
1524
|
put?: never;
|
|
1508
1525
|
/**
|
|
1509
1526
|
* Resume a suspended workspace (admitted like a start)
|
|
1510
|
-
* @description Creates a `resume` operation
|
|
1527
|
+
* @description Creates a `resume` operation for a suspended workspace, or an `open` recovery for a failed workspace (same ID and disk, no reset), or returns the active resume/open (concurrent wakes join one operation); 202 with it: poll GET /operations/{id}. Errors: 409 already_running or not_suspended, operation_in_progress (a suspend or another operation is active; details.active_operation_id), workspace_deleted, not_supported_for_mode (file-first, contracts §29); 402/403 as for open (admitted like a start). Supports Idempotency-Key. Held resume (contracts §22.6): with `Prefer: wait=<seconds>` (at most 20) the response is held until the operation is terminal or the wait elapses, exactly like a held open (§22.3); success answers 200 with the running workspace, the succeeded operation, `cell_endpoint` and a tool token for `agent_label`/`tools` (minted while the restore is in flight, at the new ownership epoch), `Preference-Applied: wait=<seconds>`; anything else is 202 with the fresh operation. With the preference a workspace that is already running answers 200 at once (operation null, a token) instead of 409 already_running. Without `Preference-Applied` the server did not wait: poll the operation. `tools` beyond the principal’s tool permissions are 403 (nothing is created); a token the API cannot issue otherwise is `tool_token: null`.
|
|
1511
1528
|
*/
|
|
1512
1529
|
post: operations["postV1WorkspacesWorkspaceIdResume"];
|
|
1513
1530
|
delete?: never;
|
|
@@ -1547,7 +1564,7 @@ export interface paths {
|
|
|
1547
1564
|
put?: never;
|
|
1548
1565
|
/**
|
|
1549
1566
|
* Suspend the workspace if it stays idle for after_seconds from now (e.g. at the end of an agent turn)
|
|
1550
|
-
* @description Records a deferred suspend for the cell’s idle loop: once the workspace has been idle for after_seconds (
|
|
1567
|
+
* @description Records a deferred suspend for the cell’s idle loop: once the workspace has been idle for after_seconds (0..3600; 0 = as soon as it is idle), it is suspended (within a few seconds of activity flush grace), at `not_before` (= now + after_seconds) at the earliest. A tool call after the request (the next turn) or a resume cancels it for good. Other work only defers it: a command still running, an attached exec/PTY stream or a keepalive postpones the suspend until after_seconds after it ends. It applies under every idle policy (`never` included) and only ever shortens the policy’s wait; a policy that suspends sooner still does. Repeating replaces the pending request (the new `requested_at` counts); DELETE cancels it; `idle.suspend_request` on the workspace shows it. 202 {workspace, operation: null, suspend_request}; when a suspend is already in progress, 202 {workspace, operation: that suspend, suspend_request: null} and nothing is recorded. The suspend, when it happens, is a system `suspend` operation with input.reason requested_after_idle (input.requested_at, input.after_seconds). Errors: 409 session_lifetime, workspace_deleted, operation_in_progress (another lifecycle operation is active), not_running, not_supported_for_mode (file-first, contracts §29). Supports Idempotency-Key.
|
|
1551
1568
|
*/
|
|
1552
1569
|
post: operations["postV1WorkspacesWorkspaceIdSuspendWhenIdle"];
|
|
1553
1570
|
/**
|
|
@@ -1742,7 +1759,7 @@ export interface paths {
|
|
|
1742
1759
|
put?: never;
|
|
1743
1760
|
/**
|
|
1744
1761
|
* Open a workspace by key (create on first use, reconnect or resume afterwards)
|
|
1745
|
-
* @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress,
|
|
1762
|
+
* @description New keys resolve `template` to its latest published version; reopening never changes or resets the workspace (the response reports the template version actually used). 200 when the workspace is already running and ready (with `cell_endpoint` and a tool token); otherwise 202 with the operation to poll. A running workspace whose startup failed (`startup.state` failed, contracts §24.4) is not ready: the open is 202 with an `open` operation (input.startup_retry) that runs the failed step again. Concurrent opens of one key share one workspace and one operation. `secrets` (optional) binds secret names injected into every exec/PTY start: it sets the binding of a new key and replaces it on an existing key (omitted = unchanged); an unknown or unusable name is 422 details.reason secret_not_available with details.names (nothing is created or changed). The template version’s secret inputs (contracts §24.3) join the binding on create and whenever `secrets` is given; a required one this workspace may not use is 422 input_required (details.kind secret); a bound name equal to a template env key or text input is 422 env_collision (details.name). `inputs` (optional): the version’s text inputs {NAME: string}; stored on create (else the declared default) and replaced on an existing key (omitted = unchanged); 422 input_unknown, input_invalid or input_required (details.names). `lifetime` (contracts §19.11): omitted = the version’s default (else persistent); `session` workspaces are discarded when the session ends (close(), idle timeout), after which the key opens a NEW workspace; reopening a live key with another lifetime is 409 lifetime_mismatch. A new workspace is `layered` when its version supports it and layered opens are enabled (`disk_layout`). Errors: 404 template/key outside scope, 402 `entitlement_required`, 403 `quota_exceeded` (details.limit), 409 operation in progress, key whose deletion is still in progress (workspace_deleted) or lifetime_mismatch, 422 reserved_key_prefix (keys starting with sf:). Supports Idempotency-Key. Held open (contracts §22.3): with `Prefer: wait=<seconds>` (at most 20) an open whose outcome is an operation is held until the operation is terminal or the wait elapses; success answers 200 with the running workspace, the succeeded operation and a tool token (`Preference-Applied: wait=<seconds>`), anything else 202 with the fresh operation. Without `Preference-Applied` the server did not wait: poll the operation. `mode` (contracts §29): omitted = processful for a new key and the stored mode for an existing one; `file_first` creates a workspace whose state is a versioned file tree with no VM between executions: it is ready at once (200 with a tool token, `observed_state` running, `tree_revision` 0, no operation), needs a layered template version (409 layout_unsupported otherwise) and is persistent (`lifetime: session` or `idle_policy` with it are 422 not_supported_for_mode); each open of a file-first key re-resolves the size of its execution VMs from `caps`, the template and the plan. 422 mode_not_available while the deployment does not offer file-first workspaces; reopening a key with another mode is 409 mode_mismatch.
|
|
1746
1763
|
*/
|
|
1747
1764
|
post: operations["postApiV1WorkspacesOpen"];
|
|
1748
1765
|
delete?: never;
|
|
@@ -1804,7 +1821,7 @@ export interface paths {
|
|
|
1804
1821
|
post?: never;
|
|
1805
1822
|
/**
|
|
1806
1823
|
* Delete a workspace (tombstone now, storage cleanup by the cell)
|
|
1807
|
-
* @description Sets desired_state=deleted and deleted_at, revokes tool access immediately (workspace revocation watermark, agent sessions revoked) and creates a `delete` operation for the cell. A file-first workspace’s tree revisions are deleted with the tombstone and the cell deletes its stored files (contracts §29). Repeating returns the same operation.
|
|
1824
|
+
* @description Sets desired_state=deleted and deleted_at, revokes tool access immediately (workspace revocation watermark, agent sessions revoked) and creates a `delete` operation for the cell. A file-first workspace’s tree revisions are deleted with the tombstone and the cell deletes its stored files (contracts §29). Repeating returns the same operation. After deletion finishes (observed_state deleted), the key can open a new workspace ID; old IDs and tokens remain deleted. Supports Idempotency-Key.
|
|
1808
1825
|
*/
|
|
1809
1826
|
delete: operations["deleteApiV1WorkspacesWorkspaceId"];
|
|
1810
1827
|
options?: never;
|
|
@@ -1832,6 +1849,23 @@ export interface paths {
|
|
|
1832
1849
|
patch?: never;
|
|
1833
1850
|
trace?: never;
|
|
1834
1851
|
};
|
|
1852
|
+
"/api/v1/workspaces/{workspace_id}/labels": {
|
|
1853
|
+
parameters: {
|
|
1854
|
+
query?: never;
|
|
1855
|
+
header?: never;
|
|
1856
|
+
path?: never;
|
|
1857
|
+
cookie?: never;
|
|
1858
|
+
};
|
|
1859
|
+
get?: never;
|
|
1860
|
+
/** Replace workspace labels */
|
|
1861
|
+
put: operations["putApiV1WorkspacesWorkspaceIdLabels"];
|
|
1862
|
+
post?: never;
|
|
1863
|
+
delete?: never;
|
|
1864
|
+
options?: never;
|
|
1865
|
+
head?: never;
|
|
1866
|
+
patch?: never;
|
|
1867
|
+
trace?: never;
|
|
1868
|
+
};
|
|
1835
1869
|
"/api/v1/workspaces/{workspace_id}/idle-policy": {
|
|
1836
1870
|
parameters: {
|
|
1837
1871
|
query?: never;
|
|
@@ -1883,7 +1917,7 @@ export interface paths {
|
|
|
1883
1917
|
put?: never;
|
|
1884
1918
|
/**
|
|
1885
1919
|
* Resume a suspended workspace (admitted like a start)
|
|
1886
|
-
* @description Creates a `resume` operation
|
|
1920
|
+
* @description Creates a `resume` operation for a suspended workspace, or an `open` recovery for a failed workspace (same ID and disk, no reset), or returns the active resume/open (concurrent wakes join one operation); 202 with it: poll GET /operations/{id}. Errors: 409 already_running or not_suspended, operation_in_progress (a suspend or another operation is active; details.active_operation_id), workspace_deleted, not_supported_for_mode (file-first, contracts §29); 402/403 as for open (admitted like a start). Supports Idempotency-Key. Held resume (contracts §22.6): with `Prefer: wait=<seconds>` (at most 20) the response is held until the operation is terminal or the wait elapses, exactly like a held open (§22.3); success answers 200 with the running workspace, the succeeded operation, `cell_endpoint` and a tool token for `agent_label`/`tools` (minted while the restore is in flight, at the new ownership epoch), `Preference-Applied: wait=<seconds>`; anything else is 202 with the fresh operation. With the preference a workspace that is already running answers 200 at once (operation null, a token) instead of 409 already_running. Without `Preference-Applied` the server did not wait: poll the operation. `tools` beyond the principal’s tool permissions are 403 (nothing is created); a token the API cannot issue otherwise is `tool_token: null`.
|
|
1887
1921
|
*/
|
|
1888
1922
|
post: operations["postApiV1WorkspacesWorkspaceIdResume"];
|
|
1889
1923
|
delete?: never;
|
|
@@ -1923,7 +1957,7 @@ export interface paths {
|
|
|
1923
1957
|
put?: never;
|
|
1924
1958
|
/**
|
|
1925
1959
|
* Suspend the workspace if it stays idle for after_seconds from now (e.g. at the end of an agent turn)
|
|
1926
|
-
* @description Records a deferred suspend for the cell’s idle loop: once the workspace has been idle for after_seconds (
|
|
1960
|
+
* @description Records a deferred suspend for the cell’s idle loop: once the workspace has been idle for after_seconds (0..3600; 0 = as soon as it is idle), it is suspended (within a few seconds of activity flush grace), at `not_before` (= now + after_seconds) at the earliest. A tool call after the request (the next turn) or a resume cancels it for good. Other work only defers it: a command still running, an attached exec/PTY stream or a keepalive postpones the suspend until after_seconds after it ends. It applies under every idle policy (`never` included) and only ever shortens the policy’s wait; a policy that suspends sooner still does. Repeating replaces the pending request (the new `requested_at` counts); DELETE cancels it; `idle.suspend_request` on the workspace shows it. 202 {workspace, operation: null, suspend_request}; when a suspend is already in progress, 202 {workspace, operation: that suspend, suspend_request: null} and nothing is recorded. The suspend, when it happens, is a system `suspend` operation with input.reason requested_after_idle (input.requested_at, input.after_seconds). Errors: 409 session_lifetime, workspace_deleted, operation_in_progress (another lifecycle operation is active), not_running, not_supported_for_mode (file-first, contracts §29). Supports Idempotency-Key.
|
|
1927
1961
|
*/
|
|
1928
1962
|
post: operations["postApiV1WorkspacesWorkspaceIdSuspendWhenIdle"];
|
|
1929
1963
|
/**
|
|
@@ -4973,7 +5007,10 @@ export interface paths {
|
|
|
4973
5007
|
path?: never;
|
|
4974
5008
|
cookie?: never;
|
|
4975
5009
|
};
|
|
4976
|
-
/**
|
|
5010
|
+
/**
|
|
5011
|
+
* Confirms operator access (MFA + step-up + grant) and the grant role
|
|
5012
|
+
* @description `role` = `viewer` (every operator read) or `operator` (reads and the mutating operator routes).
|
|
5013
|
+
*/
|
|
4977
5014
|
get: operations["getApiV1OperatorWhoami"];
|
|
4978
5015
|
put?: never;
|
|
4979
5016
|
post?: never;
|
|
@@ -5179,6 +5216,26 @@ export interface paths {
|
|
|
5179
5216
|
patch?: never;
|
|
5180
5217
|
trace?: never;
|
|
5181
5218
|
};
|
|
5219
|
+
"/api/v1/operator/operations/{id}": {
|
|
5220
|
+
parameters: {
|
|
5221
|
+
query?: never;
|
|
5222
|
+
header?: never;
|
|
5223
|
+
path?: never;
|
|
5224
|
+
cookie?: never;
|
|
5225
|
+
};
|
|
5226
|
+
/**
|
|
5227
|
+
* One lifecycle operation with its input, result and error
|
|
5228
|
+
* @description Any state (succeeded included). input, result and error are returned when their JSON is at most 16384 bytes; larger ones are null and named in `truncated`. These are the fields customers see on their own operations (no secrets are stored in them).
|
|
5229
|
+
*/
|
|
5230
|
+
get: operations["getApiV1OperatorOperationsId"];
|
|
5231
|
+
put?: never;
|
|
5232
|
+
post?: never;
|
|
5233
|
+
delete?: never;
|
|
5234
|
+
options?: never;
|
|
5235
|
+
head?: never;
|
|
5236
|
+
patch?: never;
|
|
5237
|
+
trace?: never;
|
|
5238
|
+
};
|
|
5182
5239
|
"/api/v1/operator/restrictions": {
|
|
5183
5240
|
parameters: {
|
|
5184
5241
|
query?: never;
|
|
@@ -5347,6 +5404,126 @@ export interface paths {
|
|
|
5347
5404
|
patch?: never;
|
|
5348
5405
|
trace?: never;
|
|
5349
5406
|
};
|
|
5407
|
+
"/api/v1/operator/status": {
|
|
5408
|
+
parameters: {
|
|
5409
|
+
query?: never;
|
|
5410
|
+
header?: never;
|
|
5411
|
+
path?: never;
|
|
5412
|
+
cookie?: never;
|
|
5413
|
+
};
|
|
5414
|
+
/**
|
|
5415
|
+
* Status page: summary cards, component health, recent fleet warnings and alerts
|
|
5416
|
+
* @description One consistent read (REPEATABLE READ, statement timeout). Health thresholds follow the CloudWatch alarms (docs/runbooks/alarms.md). Viewer or operator role.
|
|
5417
|
+
*/
|
|
5418
|
+
get: operations["getApiV1OperatorStatus"];
|
|
5419
|
+
put?: never;
|
|
5420
|
+
post?: never;
|
|
5421
|
+
delete?: never;
|
|
5422
|
+
options?: never;
|
|
5423
|
+
head?: never;
|
|
5424
|
+
patch?: never;
|
|
5425
|
+
trace?: never;
|
|
5426
|
+
};
|
|
5427
|
+
"/api/v1/operator/capacity": {
|
|
5428
|
+
parameters: {
|
|
5429
|
+
query?: never;
|
|
5430
|
+
header?: never;
|
|
5431
|
+
path?: never;
|
|
5432
|
+
cookie?: never;
|
|
5433
|
+
};
|
|
5434
|
+
/**
|
|
5435
|
+
* Fleet and capacity: managed pools (last plan), operations waiting for capacity, capacity actions and drains
|
|
5436
|
+
* @description One consistent read (REPEATABLE READ, statement timeout). Host rows: GET /operator/hosts. Viewer or operator role.
|
|
5437
|
+
*/
|
|
5438
|
+
get: operations["getApiV1OperatorCapacity"];
|
|
5439
|
+
put?: never;
|
|
5440
|
+
post?: never;
|
|
5441
|
+
delete?: never;
|
|
5442
|
+
options?: never;
|
|
5443
|
+
head?: never;
|
|
5444
|
+
patch?: never;
|
|
5445
|
+
trace?: never;
|
|
5446
|
+
};
|
|
5447
|
+
"/api/v1/operator/history": {
|
|
5448
|
+
parameters: {
|
|
5449
|
+
query?: never;
|
|
5450
|
+
header?: never;
|
|
5451
|
+
path?: never;
|
|
5452
|
+
cookie?: never;
|
|
5453
|
+
};
|
|
5454
|
+
/**
|
|
5455
|
+
* Hourly-rollup history for trend charts beyond 7 d (lifecycle latency, host PSI)
|
|
5456
|
+
* @description Series from the hourly rollups (migration 0080, kept 90 d). Buckets: 1 h for 7d, 6 h for 30d, 1 d for 90d (UTC-aligned, sparse). Latency percentiles of multi-hour buckets are the weighted median of the hourly percentiles; PSI avg is sample-weighted, max is the maximum.
|
|
5457
|
+
*/
|
|
5458
|
+
get: operations["getApiV1OperatorHistory"];
|
|
5459
|
+
put?: never;
|
|
5460
|
+
post?: never;
|
|
5461
|
+
delete?: never;
|
|
5462
|
+
options?: never;
|
|
5463
|
+
head?: never;
|
|
5464
|
+
patch?: never;
|
|
5465
|
+
trace?: never;
|
|
5466
|
+
};
|
|
5467
|
+
"/api/v1/operator/metrics": {
|
|
5468
|
+
parameters: {
|
|
5469
|
+
query?: never;
|
|
5470
|
+
header?: never;
|
|
5471
|
+
path?: never;
|
|
5472
|
+
cookie?: never;
|
|
5473
|
+
};
|
|
5474
|
+
/**
|
|
5475
|
+
* Request-level CloudWatch series (API, load balancer and gateway p95, 5xx, SQS depth and age)
|
|
5476
|
+
* @description GetMetricData over the window (1h: 60 s periods, 24h: 300 s, 7d: 1800 s; at most 360 points per series), cached 60 s. CloudWatch errors answer 200 with status degraded, empty series and a typed error.
|
|
5477
|
+
*/
|
|
5478
|
+
get: operations["getApiV1OperatorMetrics"];
|
|
5479
|
+
put?: never;
|
|
5480
|
+
post?: never;
|
|
5481
|
+
delete?: never;
|
|
5482
|
+
options?: never;
|
|
5483
|
+
head?: never;
|
|
5484
|
+
patch?: never;
|
|
5485
|
+
trace?: never;
|
|
5486
|
+
};
|
|
5487
|
+
"/api/v1/operator/performance": {
|
|
5488
|
+
parameters: {
|
|
5489
|
+
query?: never;
|
|
5490
|
+
header?: never;
|
|
5491
|
+
path?: never;
|
|
5492
|
+
cookie?: never;
|
|
5493
|
+
};
|
|
5494
|
+
/**
|
|
5495
|
+
* Lifecycle latency, start/resume paths, checkpoints, capacity waits, tool calls and reliability
|
|
5496
|
+
* @description Operator dashboard Performance page. Percentiles are percentile_cont (linear interpolation); the window figures come from one database snapshot, the trend, checkpoints and tool calls from a second one taken concurrently. Durations in milliseconds, sizes in bytes. Windows are rolling (now − window, now].
|
|
5497
|
+
*/
|
|
5498
|
+
get: operations["getApiV1OperatorPerformance"];
|
|
5499
|
+
put?: never;
|
|
5500
|
+
post?: never;
|
|
5501
|
+
delete?: never;
|
|
5502
|
+
options?: never;
|
|
5503
|
+
head?: never;
|
|
5504
|
+
patch?: never;
|
|
5505
|
+
trace?: never;
|
|
5506
|
+
};
|
|
5507
|
+
"/api/v1/operator/business": {
|
|
5508
|
+
parameters: {
|
|
5509
|
+
query?: never;
|
|
5510
|
+
header?: never;
|
|
5511
|
+
path?: never;
|
|
5512
|
+
cookie?: never;
|
|
5513
|
+
};
|
|
5514
|
+
/**
|
|
5515
|
+
* Growth, subscriptions, MRR, revenue, conversion and usage across organizations
|
|
5516
|
+
* @description Operator dashboard Customers and revenue page. One database snapshot; billing figures are this environment’s billing mode only; nothing is excluded (internal and test organizations count). Windows are rolling (now − window, now].
|
|
5517
|
+
*/
|
|
5518
|
+
get: operations["getApiV1OperatorBusiness"];
|
|
5519
|
+
put?: never;
|
|
5520
|
+
post?: never;
|
|
5521
|
+
delete?: never;
|
|
5522
|
+
options?: never;
|
|
5523
|
+
head?: never;
|
|
5524
|
+
patch?: never;
|
|
5525
|
+
trace?: never;
|
|
5526
|
+
};
|
|
5350
5527
|
}
|
|
5351
5528
|
export type webhooks = Record<string, never>;
|
|
5352
5529
|
export interface components {
|
|
@@ -5405,6 +5582,55 @@ export interface components {
|
|
|
5405
5582
|
[key: string]: unknown;
|
|
5406
5583
|
};
|
|
5407
5584
|
result?: {
|
|
5585
|
+
/** @description suspend and fork: whether the capture is in durable storage. false while `durability.state` is pending (the suspend completed on its host) or lost; true once it committed. Absent on other kinds. */
|
|
5586
|
+
durable?: boolean;
|
|
5587
|
+
/** @description suspend: `local_commit` when the suspend completed on its host and the durable copy followed in the background. */
|
|
5588
|
+
suspend_path?: string;
|
|
5589
|
+
durability?: {
|
|
5590
|
+
/**
|
|
5591
|
+
* @description pending: sealed on its host, the durable copy is being written; durable: the copy committed; lost: the copy could not be made and the previous recovery point stays current.
|
|
5592
|
+
* @enum {string}
|
|
5593
|
+
*/
|
|
5594
|
+
state: "pending" | "durable" | "lost";
|
|
5595
|
+
/** @description The checkpoint being made durable. */
|
|
5596
|
+
checkpoint_id?: string;
|
|
5597
|
+
/** @description Its generation on the host. */
|
|
5598
|
+
generation_id?: string;
|
|
5599
|
+
/** @description RFC 3339: when the suspend (or fork) completed on its host. */
|
|
5600
|
+
local_commit_at?: string;
|
|
5601
|
+
/** @description RFC 3339: when the durable copy is expected to have committed (local_commit_at + the deadline). */
|
|
5602
|
+
durable_by?: string;
|
|
5603
|
+
/** @description RFC 3339 (state durable): when the durable copy committed. */
|
|
5604
|
+
durable_at?: string;
|
|
5605
|
+
/** @description State durable: local_commit_at to durable_at, in milliseconds. */
|
|
5606
|
+
local_commit_to_durable_ms?: number;
|
|
5607
|
+
/** @description RFC 3339: set once durable_by passed while the copy was still pending; it keeps retrying. */
|
|
5608
|
+
overdue_at?: string;
|
|
5609
|
+
/** @description State lost: why, e.g. host_lost. */
|
|
5610
|
+
reason?: string;
|
|
5611
|
+
/** @description State lost: the error code of the failed copy. */
|
|
5612
|
+
code?: string;
|
|
5613
|
+
recovery_point_checkpoint_id?: string | null;
|
|
5614
|
+
} & {
|
|
5615
|
+
[key: string]: unknown;
|
|
5616
|
+
};
|
|
5617
|
+
lost_suspend?: {
|
|
5618
|
+
/** @description The suspend checkpoint whose durable copy was lost. */
|
|
5619
|
+
checkpoint_id: string;
|
|
5620
|
+
/** @description Its generation on the host. */
|
|
5621
|
+
generation_id?: string;
|
|
5622
|
+
/** @description Why it was lost, e.g. host_lost. */
|
|
5623
|
+
reason?: string;
|
|
5624
|
+
/** @description RFC 3339: when that suspend captured the workspace. */
|
|
5625
|
+
suspended_at?: string;
|
|
5626
|
+
/** @description The earlier durable checkpoint this resume restored. */
|
|
5627
|
+
restored_checkpoint_id?: string;
|
|
5628
|
+
/** @description RFC 3339: when the restored checkpoint committed; the workspace state is as of then. */
|
|
5629
|
+
state_as_of?: string;
|
|
5630
|
+
} & {
|
|
5631
|
+
[key: string]: unknown;
|
|
5632
|
+
};
|
|
5633
|
+
} & {
|
|
5408
5634
|
[key: string]: unknown;
|
|
5409
5635
|
};
|
|
5410
5636
|
};
|
|
@@ -6525,6 +6751,10 @@ export interface components {
|
|
|
6525
6751
|
*/
|
|
6526
6752
|
project_id: string;
|
|
6527
6753
|
workspace_key: string;
|
|
6754
|
+
/** @description Searchable workspace metadata; not secrets. At most 50 labels. */
|
|
6755
|
+
labels: {
|
|
6756
|
+
[key: string]: string;
|
|
6757
|
+
};
|
|
6528
6758
|
/**
|
|
6529
6759
|
* Format: uuid
|
|
6530
6760
|
* @description UUIDv7, lowercase canonical form.
|
|
@@ -7345,6 +7575,10 @@ export interface operations {
|
|
|
7345
7575
|
status: "verified" | "password_reset_required";
|
|
7346
7576
|
/** @description Present with password_reset_required: single-use token for POST /api/auth/password/reset/confirm. */
|
|
7347
7577
|
reset_token?: string;
|
|
7578
|
+
/** @description True when this response opened a session (the registering browser); false: sign in. */
|
|
7579
|
+
signed_in: boolean;
|
|
7580
|
+
/** @description Send as X-CSRF-Token on subsequent mutations. */
|
|
7581
|
+
csrf_token?: string;
|
|
7348
7582
|
};
|
|
7349
7583
|
};
|
|
7350
7584
|
};
|
|
@@ -8344,7 +8578,7 @@ export interface operations {
|
|
|
8344
8578
|
content: {
|
|
8345
8579
|
"application/json": {
|
|
8346
8580
|
status: "verified" | "password_reset_required";
|
|
8347
|
-
/** @description Present with password_reset_required: single-use token for POST /
|
|
8581
|
+
/** @description Present with password_reset_required: single-use token for POST /v1/auth/password/reset/confirm. */
|
|
8348
8582
|
reset_token?: string;
|
|
8349
8583
|
};
|
|
8350
8584
|
};
|
|
@@ -11352,6 +11586,10 @@ export interface operations {
|
|
|
11352
11586
|
"application/json": {
|
|
11353
11587
|
/** @description Stable workspace key, unique per organization (e.g. `${customerId}/${projectId}`). */
|
|
11354
11588
|
key: string;
|
|
11589
|
+
/** @description Searchable workspace metadata; not secrets. At most 50 labels. */
|
|
11590
|
+
labels?: {
|
|
11591
|
+
[key: string]: string;
|
|
11592
|
+
};
|
|
11355
11593
|
/** @description Template slug; new workspaces use its latest published version. */
|
|
11356
11594
|
template: string;
|
|
11357
11595
|
/** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
|
|
@@ -11443,6 +11681,8 @@ export interface operations {
|
|
|
11443
11681
|
state?: "creating" | "starting" | "running" | "suspending" | "suspended" | "resuming" | "forking" | "stopping" | "failed" | "deleting" | "deleted";
|
|
11444
11682
|
desired_state?: "running" | "suspended" | "deleted";
|
|
11445
11683
|
key_prefix?: string;
|
|
11684
|
+
/** @description JSON object of exact label matches; all pairs must match. */
|
|
11685
|
+
labels?: string;
|
|
11446
11686
|
include_deleted?: boolean;
|
|
11447
11687
|
/** @description persistent (default), session or any. Key lookups pass any. */
|
|
11448
11688
|
lifetime?: "persistent" | "session" | "any";
|
|
@@ -11498,6 +11738,8 @@ export interface operations {
|
|
|
11498
11738
|
state?: "creating" | "starting" | "running" | "suspending" | "suspended" | "resuming" | "forking" | "stopping" | "failed" | "deleting" | "deleted";
|
|
11499
11739
|
desired_state?: "running" | "suspended" | "deleted";
|
|
11500
11740
|
key_prefix?: string;
|
|
11741
|
+
/** @description JSON object of exact label matches; all pairs must match. */
|
|
11742
|
+
labels?: string;
|
|
11501
11743
|
include_deleted?: boolean;
|
|
11502
11744
|
/** @description persistent (default), session or any. Key lookups pass any. */
|
|
11503
11745
|
lifetime?: "persistent" | "session" | "any";
|
|
@@ -11671,6 +11913,56 @@ export interface operations {
|
|
|
11671
11913
|
};
|
|
11672
11914
|
};
|
|
11673
11915
|
};
|
|
11916
|
+
putV1WorkspacesWorkspaceIdLabels: {
|
|
11917
|
+
parameters: {
|
|
11918
|
+
query?: never;
|
|
11919
|
+
header?: never;
|
|
11920
|
+
path: {
|
|
11921
|
+
/** @description UUIDv7, lowercase canonical form. */
|
|
11922
|
+
workspace_id: string;
|
|
11923
|
+
};
|
|
11924
|
+
cookie?: never;
|
|
11925
|
+
};
|
|
11926
|
+
requestBody: {
|
|
11927
|
+
content: {
|
|
11928
|
+
"application/json": {
|
|
11929
|
+
/** @description Searchable workspace metadata; not secrets. At most 50 labels. */
|
|
11930
|
+
labels: {
|
|
11931
|
+
[key: string]: string;
|
|
11932
|
+
};
|
|
11933
|
+
};
|
|
11934
|
+
};
|
|
11935
|
+
};
|
|
11936
|
+
responses: {
|
|
11937
|
+
/** @description Default Response */
|
|
11938
|
+
200: {
|
|
11939
|
+
headers: {
|
|
11940
|
+
[name: string]: unknown;
|
|
11941
|
+
};
|
|
11942
|
+
content: {
|
|
11943
|
+
"application/json": components["schemas"]["Workspace"];
|
|
11944
|
+
};
|
|
11945
|
+
};
|
|
11946
|
+
/** @description Default Response */
|
|
11947
|
+
"4XX": {
|
|
11948
|
+
headers: {
|
|
11949
|
+
[name: string]: unknown;
|
|
11950
|
+
};
|
|
11951
|
+
content: {
|
|
11952
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
11953
|
+
};
|
|
11954
|
+
};
|
|
11955
|
+
/** @description Default Response */
|
|
11956
|
+
"5XX": {
|
|
11957
|
+
headers: {
|
|
11958
|
+
[name: string]: unknown;
|
|
11959
|
+
};
|
|
11960
|
+
content: {
|
|
11961
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
11962
|
+
};
|
|
11963
|
+
};
|
|
11964
|
+
};
|
|
11965
|
+
};
|
|
11674
11966
|
putV1WorkspacesWorkspaceIdIdlePolicy: {
|
|
11675
11967
|
parameters: {
|
|
11676
11968
|
query?: never;
|
|
@@ -11895,7 +12187,7 @@ export interface operations {
|
|
|
11895
12187
|
requestBody: {
|
|
11896
12188
|
content: {
|
|
11897
12189
|
"application/json": {
|
|
11898
|
-
/** @description Seconds from now the workspace must stay idle before it is suspended (
|
|
12190
|
+
/** @description Seconds from now the workspace must stay idle before it is suspended (0..3600; 0 = as soon as it is idle). */
|
|
11899
12191
|
after_seconds: number;
|
|
11900
12192
|
};
|
|
11901
12193
|
};
|
|
@@ -12420,6 +12712,8 @@ export interface operations {
|
|
|
12420
12712
|
plan_key: string;
|
|
12421
12713
|
catalog_version: string;
|
|
12422
12714
|
source: "override" | "subscription" | "trial" | "default";
|
|
12715
|
+
/** @description When this plan grant stops applying (a trial or partner grant); null when it lasts until changed. */
|
|
12716
|
+
ends_at: string | null;
|
|
12423
12717
|
} | null;
|
|
12424
12718
|
/** @description Resolved plan limits (null = unlimited). */
|
|
12425
12719
|
limits: {
|
|
@@ -12478,6 +12772,10 @@ export interface operations {
|
|
|
12478
12772
|
"application/json": {
|
|
12479
12773
|
/** @description Stable workspace key, unique per organization (e.g. `${customerId}/${projectId}`). */
|
|
12480
12774
|
key: string;
|
|
12775
|
+
/** @description Searchable workspace metadata; not secrets. At most 50 labels. */
|
|
12776
|
+
labels?: {
|
|
12777
|
+
[key: string]: string;
|
|
12778
|
+
};
|
|
12481
12779
|
/** @description Template slug; new workspaces use its latest published version. */
|
|
12482
12780
|
template: string;
|
|
12483
12781
|
/** @description Optional user caps; the ceiling is min(template, cap, plan). Absent fields add no restriction. */
|
|
@@ -12569,6 +12867,8 @@ export interface operations {
|
|
|
12569
12867
|
state?: "creating" | "starting" | "running" | "suspending" | "suspended" | "resuming" | "forking" | "stopping" | "failed" | "deleting" | "deleted";
|
|
12570
12868
|
desired_state?: "running" | "suspended" | "deleted";
|
|
12571
12869
|
key_prefix?: string;
|
|
12870
|
+
/** @description JSON object of exact label matches; all pairs must match. */
|
|
12871
|
+
labels?: string;
|
|
12572
12872
|
include_deleted?: boolean;
|
|
12573
12873
|
/** @description persistent (default), session or any. Key lookups pass any. */
|
|
12574
12874
|
lifetime?: "persistent" | "session" | "any";
|
|
@@ -12624,6 +12924,8 @@ export interface operations {
|
|
|
12624
12924
|
state?: "creating" | "starting" | "running" | "suspending" | "suspended" | "resuming" | "forking" | "stopping" | "failed" | "deleting" | "deleted";
|
|
12625
12925
|
desired_state?: "running" | "suspended" | "deleted";
|
|
12626
12926
|
key_prefix?: string;
|
|
12927
|
+
/** @description JSON object of exact label matches; all pairs must match. */
|
|
12928
|
+
labels?: string;
|
|
12627
12929
|
include_deleted?: boolean;
|
|
12628
12930
|
/** @description persistent (default), session or any. Key lookups pass any. */
|
|
12629
12931
|
lifetime?: "persistent" | "session" | "any";
|
|
@@ -12797,6 +13099,56 @@ export interface operations {
|
|
|
12797
13099
|
};
|
|
12798
13100
|
};
|
|
12799
13101
|
};
|
|
13102
|
+
putApiV1WorkspacesWorkspaceIdLabels: {
|
|
13103
|
+
parameters: {
|
|
13104
|
+
query?: never;
|
|
13105
|
+
header?: never;
|
|
13106
|
+
path: {
|
|
13107
|
+
/** @description UUIDv7, lowercase canonical form. */
|
|
13108
|
+
workspace_id: string;
|
|
13109
|
+
};
|
|
13110
|
+
cookie?: never;
|
|
13111
|
+
};
|
|
13112
|
+
requestBody: {
|
|
13113
|
+
content: {
|
|
13114
|
+
"application/json": {
|
|
13115
|
+
/** @description Searchable workspace metadata; not secrets. At most 50 labels. */
|
|
13116
|
+
labels: {
|
|
13117
|
+
[key: string]: string;
|
|
13118
|
+
};
|
|
13119
|
+
};
|
|
13120
|
+
};
|
|
13121
|
+
};
|
|
13122
|
+
responses: {
|
|
13123
|
+
/** @description Default Response */
|
|
13124
|
+
200: {
|
|
13125
|
+
headers: {
|
|
13126
|
+
[name: string]: unknown;
|
|
13127
|
+
};
|
|
13128
|
+
content: {
|
|
13129
|
+
"application/json": components["schemas"]["Workspace"];
|
|
13130
|
+
};
|
|
13131
|
+
};
|
|
13132
|
+
/** @description Default Response */
|
|
13133
|
+
"4XX": {
|
|
13134
|
+
headers: {
|
|
13135
|
+
[name: string]: unknown;
|
|
13136
|
+
};
|
|
13137
|
+
content: {
|
|
13138
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
13139
|
+
};
|
|
13140
|
+
};
|
|
13141
|
+
/** @description Default Response */
|
|
13142
|
+
"5XX": {
|
|
13143
|
+
headers: {
|
|
13144
|
+
[name: string]: unknown;
|
|
13145
|
+
};
|
|
13146
|
+
content: {
|
|
13147
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
13148
|
+
};
|
|
13149
|
+
};
|
|
13150
|
+
};
|
|
13151
|
+
};
|
|
12800
13152
|
putApiV1WorkspacesWorkspaceIdIdlePolicy: {
|
|
12801
13153
|
parameters: {
|
|
12802
13154
|
query?: never;
|
|
@@ -13021,7 +13373,7 @@ export interface operations {
|
|
|
13021
13373
|
requestBody: {
|
|
13022
13374
|
content: {
|
|
13023
13375
|
"application/json": {
|
|
13024
|
-
/** @description Seconds from now the workspace must stay idle before it is suspended (
|
|
13376
|
+
/** @description Seconds from now the workspace must stay idle before it is suspended (0..3600; 0 = as soon as it is idle). */
|
|
13025
13377
|
after_seconds: number;
|
|
13026
13378
|
};
|
|
13027
13379
|
};
|
|
@@ -13619,6 +13971,8 @@ export interface operations {
|
|
|
13619
13971
|
plan_key: string;
|
|
13620
13972
|
catalog_version: string;
|
|
13621
13973
|
source: "override" | "subscription" | "trial" | "default";
|
|
13974
|
+
/** @description When this plan grant stops applying (a trial or partner grant); null when it lasts until changed. */
|
|
13975
|
+
ends_at: string | null;
|
|
13622
13976
|
} | null;
|
|
13623
13977
|
/** @description Resolved plan limits (null = unlimited). */
|
|
13624
13978
|
limits: {
|
|
@@ -27309,8 +27663,8 @@ export interface operations {
|
|
|
27309
27663
|
* @description RFC 3339 UTC timestamp with Z.
|
|
27310
27664
|
*/
|
|
27311
27665
|
resets_at: string;
|
|
27312
|
-
/** @description The entitling subscription period, else the calendar month (UTC). */
|
|
27313
|
-
source: "subscription" | "calendar_month";
|
|
27666
|
+
/** @description The entitling subscription period; `grant`: the window of a time-limited plan grant (a trial or partner grant), which ends at `end` rather than resetting; else the calendar month (UTC), counted from the end of a trial or partner grant that ended in it. */
|
|
27667
|
+
source: "subscription" | "calendar_month" | "grant";
|
|
27314
27668
|
/**
|
|
27315
27669
|
* Format: date-time
|
|
27316
27670
|
* @description First hour whose usage counts in this period (RFC 3339 UTC). Usage is metered per UTC hour, and each hour belongs to the period that contains its start (the hour's ledger rows keep the plan in force at that instant and are sent to Stripe with that timestamp). When the period starts inside an hour (after a plan change, or a subscription created mid-hour), that hour's usage counts toward the previous period, so counted_from is `start` rounded up to the next full hour; on a full hour it equals `start`. Before counted_from passes, the period has no counted usage (`estimate_status` no_data) even while workspaces run: their usage is in the usage series under the hour containing `start`.
|
|
@@ -27693,8 +28047,8 @@ export interface operations {
|
|
|
27693
28047
|
* @description RFC 3339 UTC timestamp with Z.
|
|
27694
28048
|
*/
|
|
27695
28049
|
resets_at: string;
|
|
27696
|
-
/** @description The entitling subscription period, else the calendar month (UTC). */
|
|
27697
|
-
source: "subscription" | "calendar_month";
|
|
28050
|
+
/** @description The entitling subscription period; `grant`: the window of a time-limited plan grant (a trial or partner grant), which ends at `end` rather than resetting; else the calendar month (UTC), counted from the end of a trial or partner grant that ended in it. */
|
|
28051
|
+
source: "subscription" | "calendar_month" | "grant";
|
|
27698
28052
|
/**
|
|
27699
28053
|
* Format: date-time
|
|
27700
28054
|
* @description First hour whose usage counts in this period (RFC 3339 UTC). Usage is metered per UTC hour, and each hour belongs to the period that contains its start (the hour's ledger rows keep the plan in force at that instant and are sent to Stripe with that timestamp). When the period starts inside an hour (after a plan change, or a subscription created mid-hour), that hour's usage counts toward the previous period, so counted_from is `start` rounded up to the next full hour; on a full hour it equals `start`. Before counted_from passes, the period has no counted usage (`estimate_status` no_data) even while workspaces run: their usage is in the usage series under the hour containing `start`.
|
|
@@ -28020,8 +28374,8 @@ export interface operations {
|
|
|
28020
28374
|
* @description RFC 3339 UTC timestamp with Z.
|
|
28021
28375
|
*/
|
|
28022
28376
|
resets_at: string;
|
|
28023
|
-
/** @description The entitling subscription period, else the calendar month (UTC). */
|
|
28024
|
-
source: "subscription" | "calendar_month";
|
|
28377
|
+
/** @description The entitling subscription period; `grant`: the window of a time-limited plan grant (a trial or partner grant), which ends at `end` rather than resetting; else the calendar month (UTC), counted from the end of a trial or partner grant that ended in it. */
|
|
28378
|
+
source: "subscription" | "calendar_month" | "grant";
|
|
28025
28379
|
/**
|
|
28026
28380
|
* Format: date-time
|
|
28027
28381
|
* @description First hour whose usage counts in this period (RFC 3339 UTC). Usage is metered per UTC hour, and each hour belongs to the period that contains its start (the hour's ledger rows keep the plan in force at that instant and are sent to Stripe with that timestamp). When the period starts inside an hour (after a plan change, or a subscription created mid-hour), that hour's usage counts toward the previous period, so counted_from is `start` rounded up to the next full hour; on a full hour it equals `start`. Before counted_from passes, the period has no counted usage (`estimate_status` no_data) even while workspaces run: their usage is in the usage series under the hour containing `start`.
|
|
@@ -28364,8 +28718,8 @@ export interface operations {
|
|
|
28364
28718
|
* @description RFC 3339 UTC timestamp with Z.
|
|
28365
28719
|
*/
|
|
28366
28720
|
resets_at: string;
|
|
28367
|
-
/** @description The entitling subscription period, else the calendar month (UTC). */
|
|
28368
|
-
source: "subscription" | "calendar_month";
|
|
28721
|
+
/** @description The entitling subscription period; `grant`: the window of a time-limited plan grant (a trial or partner grant), which ends at `end` rather than resetting; else the calendar month (UTC), counted from the end of a trial or partner grant that ended in it. */
|
|
28722
|
+
source: "subscription" | "calendar_month" | "grant";
|
|
28369
28723
|
/**
|
|
28370
28724
|
* Format: date-time
|
|
28371
28725
|
* @description First hour whose usage counts in this period (RFC 3339 UTC). Usage is metered per UTC hour, and each hour belongs to the period that contains its start (the hour's ledger rows keep the plan in force at that instant and are sent to Stripe with that timestamp). When the period starts inside an hour (after a plan change, or a subscription created mid-hour), that hour's usage counts toward the previous period, so counted_from is `start` rounded up to the next full hour; on a full hour it equals `start`. Before counted_from passes, the period has no counted usage (`estimate_status` no_data) even while workspaces run: their usage is in the usage series under the hour containing `start`.
|
|
@@ -28748,8 +29102,8 @@ export interface operations {
|
|
|
28748
29102
|
* @description RFC 3339 UTC timestamp with Z.
|
|
28749
29103
|
*/
|
|
28750
29104
|
resets_at: string;
|
|
28751
|
-
/** @description The entitling subscription period, else the calendar month (UTC). */
|
|
28752
|
-
source: "subscription" | "calendar_month";
|
|
29105
|
+
/** @description The entitling subscription period; `grant`: the window of a time-limited plan grant (a trial or partner grant), which ends at `end` rather than resetting; else the calendar month (UTC), counted from the end of a trial or partner grant that ended in it. */
|
|
29106
|
+
source: "subscription" | "calendar_month" | "grant";
|
|
28753
29107
|
/**
|
|
28754
29108
|
* Format: date-time
|
|
28755
29109
|
* @description First hour whose usage counts in this period (RFC 3339 UTC). Usage is metered per UTC hour, and each hour belongs to the period that contains its start (the hour's ledger rows keep the plan in force at that instant and are sent to Stripe with that timestamp). When the period starts inside an hour (after a plan change, or a subscription created mid-hour), that hour's usage counts toward the previous period, so counted_from is `start` rounded up to the next full hour; on a full hour it equals `start`. Before counted_from passes, the period has no counted usage (`estimate_status` no_data) even while workspaces run: their usage is in the usage series under the hour containing `start`.
|
|
@@ -29075,8 +29429,8 @@ export interface operations {
|
|
|
29075
29429
|
* @description RFC 3339 UTC timestamp with Z.
|
|
29076
29430
|
*/
|
|
29077
29431
|
resets_at: string;
|
|
29078
|
-
/** @description The entitling subscription period, else the calendar month (UTC). */
|
|
29079
|
-
source: "subscription" | "calendar_month";
|
|
29432
|
+
/** @description The entitling subscription period; `grant`: the window of a time-limited plan grant (a trial or partner grant), which ends at `end` rather than resetting; else the calendar month (UTC), counted from the end of a trial or partner grant that ended in it. */
|
|
29433
|
+
source: "subscription" | "calendar_month" | "grant";
|
|
29080
29434
|
/**
|
|
29081
29435
|
* Format: date-time
|
|
29082
29436
|
* @description First hour whose usage counts in this period (RFC 3339 UTC). Usage is metered per UTC hour, and each hour belongs to the period that contains its start (the hour's ledger rows keep the plan in force at that instant and are sent to Stripe with that timestamp). When the period starts inside an hour (after a plan change, or a subscription created mid-hour), that hour's usage counts toward the previous period, so counted_from is `start` rounded up to the next full hour; on a full hour it equals `start`. Before counted_from passes, the period has no counted usage (`estimate_status` no_data) even while workspaces run: their usage is in the usage series under the hour containing `start`.
|
|
@@ -32046,6 +32400,7 @@ export interface operations {
|
|
|
32046
32400
|
allowances: {
|
|
32047
32401
|
[key: string]: unknown;
|
|
32048
32402
|
};
|
|
32403
|
+
grant_days: number | null;
|
|
32049
32404
|
prices: {
|
|
32050
32405
|
interval: "month" | "year";
|
|
32051
32406
|
/** @description Price in the currency’s minor unit (cents). */
|
|
@@ -32115,6 +32470,8 @@ export interface operations {
|
|
|
32115
32470
|
plan_key: string;
|
|
32116
32471
|
catalog_version: string;
|
|
32117
32472
|
source: "override" | "subscription" | "trial" | "default";
|
|
32473
|
+
/** @description When this plan grant stops applying (a trial or partner grant); null when it lasts until changed. */
|
|
32474
|
+
ends_at: string | null;
|
|
32118
32475
|
} | null;
|
|
32119
32476
|
subscription: {
|
|
32120
32477
|
/**
|
|
@@ -32472,6 +32829,7 @@ export interface operations {
|
|
|
32472
32829
|
allowances: {
|
|
32473
32830
|
[key: string]: unknown;
|
|
32474
32831
|
};
|
|
32832
|
+
grant_days: number | null;
|
|
32475
32833
|
prices: {
|
|
32476
32834
|
interval: "month" | "year";
|
|
32477
32835
|
/** @description Price in the currency’s minor unit (cents). */
|
|
@@ -32541,6 +32899,8 @@ export interface operations {
|
|
|
32541
32899
|
plan_key: string;
|
|
32542
32900
|
catalog_version: string;
|
|
32543
32901
|
source: "override" | "subscription" | "trial" | "default";
|
|
32902
|
+
/** @description When this plan grant stops applying (a trial or partner grant); null when it lasts until changed. */
|
|
32903
|
+
ends_at: string | null;
|
|
32544
32904
|
} | null;
|
|
32545
32905
|
subscription: {
|
|
32546
32906
|
/**
|
|
@@ -32926,6 +33286,7 @@ export interface operations {
|
|
|
32926
33286
|
user_id: string;
|
|
32927
33287
|
/** @enum {boolean} */
|
|
32928
33288
|
operator: true;
|
|
33289
|
+
role: "viewer" | "operator";
|
|
32929
33290
|
/**
|
|
32930
33291
|
* Format: date-time
|
|
32931
33292
|
* @description RFC 3339 UTC timestamp with Z.
|
|
@@ -33498,6 +33859,10 @@ export interface operations {
|
|
|
33498
33859
|
controller_leases: {
|
|
33499
33860
|
total: number;
|
|
33500
33861
|
expired: number;
|
|
33862
|
+
/** @description Leases whose loop_state is late. */
|
|
33863
|
+
late: number;
|
|
33864
|
+
/** @description Leases whose loop_state is stalled (what Status alerts on). */
|
|
33865
|
+
stalled: number;
|
|
33501
33866
|
leases: {
|
|
33502
33867
|
name: string;
|
|
33503
33868
|
holder: string;
|
|
@@ -33519,6 +33884,13 @@ export interface operations {
|
|
|
33519
33884
|
expires_at: string;
|
|
33520
33885
|
expired: boolean;
|
|
33521
33886
|
renewed_age_seconds: number;
|
|
33887
|
+
/**
|
|
33888
|
+
* @description Against the loop's cell-loop-stalled CloudWatch alarm threshold: running (held), handover (no holder for at most one interval + 60 s, e.g. a deploy's release), late (no holder for longer, not stalled yet), stalled (no renewal for longer than the threshold).
|
|
33889
|
+
* @enum {string}
|
|
33890
|
+
*/
|
|
33891
|
+
loop_state: "running" | "handover" | "late" | "stalled";
|
|
33892
|
+
/** @description The loop's alarm threshold: stalled past this many seconds without a renewal. */
|
|
33893
|
+
stall_after_seconds: number;
|
|
33522
33894
|
}[];
|
|
33523
33895
|
};
|
|
33524
33896
|
stale_after_seconds: number;
|
|
@@ -33893,6 +34265,100 @@ export interface operations {
|
|
|
33893
34265
|
};
|
|
33894
34266
|
};
|
|
33895
34267
|
};
|
|
34268
|
+
getApiV1OperatorOperationsId: {
|
|
34269
|
+
parameters: {
|
|
34270
|
+
query?: never;
|
|
34271
|
+
header?: never;
|
|
34272
|
+
path: {
|
|
34273
|
+
/** @description UUIDv7, lowercase canonical form. */
|
|
34274
|
+
id: string;
|
|
34275
|
+
};
|
|
34276
|
+
cookie?: never;
|
|
34277
|
+
};
|
|
34278
|
+
requestBody?: never;
|
|
34279
|
+
responses: {
|
|
34280
|
+
/** @description Default Response */
|
|
34281
|
+
200: {
|
|
34282
|
+
headers: {
|
|
34283
|
+
[name: string]: unknown;
|
|
34284
|
+
};
|
|
34285
|
+
content: {
|
|
34286
|
+
"application/json": {
|
|
34287
|
+
/**
|
|
34288
|
+
* Format: uuid
|
|
34289
|
+
* @description UUIDv7, lowercase canonical form.
|
|
34290
|
+
*/
|
|
34291
|
+
id: string;
|
|
34292
|
+
kind: string;
|
|
34293
|
+
state: string;
|
|
34294
|
+
state_reason: string | null;
|
|
34295
|
+
/**
|
|
34296
|
+
* Format: uuid
|
|
34297
|
+
* @description UUIDv7, lowercase canonical form.
|
|
34298
|
+
*/
|
|
34299
|
+
organization_id: string;
|
|
34300
|
+
workspace_id: string | null;
|
|
34301
|
+
principal_type: string;
|
|
34302
|
+
principal_id: string | null;
|
|
34303
|
+
request_id: string | null;
|
|
34304
|
+
/**
|
|
34305
|
+
* Format: date-time
|
|
34306
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
34307
|
+
*/
|
|
34308
|
+
created_at: string;
|
|
34309
|
+
/**
|
|
34310
|
+
* Format: date-time
|
|
34311
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
34312
|
+
*/
|
|
34313
|
+
updated_at: string;
|
|
34314
|
+
started_at: string | null;
|
|
34315
|
+
completed_at: string | null;
|
|
34316
|
+
/** @description now - created_at. */
|
|
34317
|
+
age_seconds: number;
|
|
34318
|
+
/** @description Claims so far (the claim fencing token). */
|
|
34319
|
+
attempt: number;
|
|
34320
|
+
claimed_by: string | null;
|
|
34321
|
+
claim_expires_at: string | null;
|
|
34322
|
+
/** @description Claimed but the lease expired (controller crashed or stalled). */
|
|
34323
|
+
claim_expired: boolean;
|
|
34324
|
+
next_attempt_at: string | null;
|
|
34325
|
+
reservation_ids: string[];
|
|
34326
|
+
volume_id: string | null;
|
|
34327
|
+
depends_on_operation_id: string | null;
|
|
34328
|
+
input: {
|
|
34329
|
+
[key: string]: unknown;
|
|
34330
|
+
} | null;
|
|
34331
|
+
result: {
|
|
34332
|
+
[key: string]: unknown;
|
|
34333
|
+
} | null;
|
|
34334
|
+
error: {
|
|
34335
|
+
[key: string]: unknown;
|
|
34336
|
+
} | null;
|
|
34337
|
+
/** @description Fields left out because their JSON is larger than 16384 bytes. */
|
|
34338
|
+
truncated: ("input" | "result" | "error")[];
|
|
34339
|
+
};
|
|
34340
|
+
};
|
|
34341
|
+
};
|
|
34342
|
+
/** @description Default Response */
|
|
34343
|
+
"4XX": {
|
|
34344
|
+
headers: {
|
|
34345
|
+
[name: string]: unknown;
|
|
34346
|
+
};
|
|
34347
|
+
content: {
|
|
34348
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
34349
|
+
};
|
|
34350
|
+
};
|
|
34351
|
+
/** @description Default Response */
|
|
34352
|
+
"5XX": {
|
|
34353
|
+
headers: {
|
|
34354
|
+
[name: string]: unknown;
|
|
34355
|
+
};
|
|
34356
|
+
content: {
|
|
34357
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
34358
|
+
};
|
|
34359
|
+
};
|
|
34360
|
+
};
|
|
34361
|
+
};
|
|
33896
34362
|
getApiV1OperatorRestrictions: {
|
|
33897
34363
|
parameters: {
|
|
33898
34364
|
query?: {
|
|
@@ -35240,4 +35706,1087 @@ export interface operations {
|
|
|
35240
35706
|
};
|
|
35241
35707
|
};
|
|
35242
35708
|
};
|
|
35709
|
+
getApiV1OperatorStatus: {
|
|
35710
|
+
parameters: {
|
|
35711
|
+
query?: never;
|
|
35712
|
+
header?: never;
|
|
35713
|
+
path?: never;
|
|
35714
|
+
cookie?: never;
|
|
35715
|
+
};
|
|
35716
|
+
requestBody?: never;
|
|
35717
|
+
responses: {
|
|
35718
|
+
/** @description Default Response */
|
|
35719
|
+
200: {
|
|
35720
|
+
headers: {
|
|
35721
|
+
[name: string]: unknown;
|
|
35722
|
+
};
|
|
35723
|
+
content: {
|
|
35724
|
+
"application/json": {
|
|
35725
|
+
/**
|
|
35726
|
+
* Format: date-time
|
|
35727
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
35728
|
+
*/
|
|
35729
|
+
generated_at: string;
|
|
35730
|
+
cards: {
|
|
35731
|
+
hosts: {
|
|
35732
|
+
ready: number;
|
|
35733
|
+
/** @description Hosts that are not terminated. */
|
|
35734
|
+
total: number;
|
|
35735
|
+
};
|
|
35736
|
+
running_workspaces: number;
|
|
35737
|
+
waiting_for_capacity: {
|
|
35738
|
+
/** @description Operations in capacity_pending (starts, resumes, forks, restores, moves, volume work). */
|
|
35739
|
+
count: number;
|
|
35740
|
+
oldest_age_seconds: number | null;
|
|
35741
|
+
};
|
|
35742
|
+
failed_operations_last_hour: number;
|
|
35743
|
+
};
|
|
35744
|
+
/** @description One row per component, in this order: cell_loops, database, hosts, capacity, operations, billing, usage, mail. */
|
|
35745
|
+
health: {
|
|
35746
|
+
/** @enum {string} */
|
|
35747
|
+
component: "cell_loops" | "database" | "hosts" | "capacity" | "operations" | "billing" | "usage" | "mail";
|
|
35748
|
+
/** @enum {string} */
|
|
35749
|
+
state: "ok" | "warn" | "alert";
|
|
35750
|
+
/** @description One line: what is wrong (or the healthy figures). */
|
|
35751
|
+
detail: string;
|
|
35752
|
+
since: string | null;
|
|
35753
|
+
}[];
|
|
35754
|
+
fleet_events: {
|
|
35755
|
+
window_hours: number;
|
|
35756
|
+
/** @description Warning and alert events in the window. */
|
|
35757
|
+
total: number;
|
|
35758
|
+
truncated: boolean;
|
|
35759
|
+
/** @description Newest first, at most 50. */
|
|
35760
|
+
data: {
|
|
35761
|
+
/**
|
|
35762
|
+
* Format: uuid
|
|
35763
|
+
* @description UUIDv7, lowercase canonical form.
|
|
35764
|
+
*/
|
|
35765
|
+
id: string;
|
|
35766
|
+
cell_id: string;
|
|
35767
|
+
pool: string | null;
|
|
35768
|
+
host_id: string | null;
|
|
35769
|
+
instance_id: string | null;
|
|
35770
|
+
kind: string;
|
|
35771
|
+
severity: "warning" | "alert";
|
|
35772
|
+
message: string;
|
|
35773
|
+
details: {
|
|
35774
|
+
[key: string]: unknown;
|
|
35775
|
+
} | null;
|
|
35776
|
+
/**
|
|
35777
|
+
* Format: date-time
|
|
35778
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
35779
|
+
*/
|
|
35780
|
+
created_at: string;
|
|
35781
|
+
}[];
|
|
35782
|
+
};
|
|
35783
|
+
cloudwatch_dashboard_url: string | null;
|
|
35784
|
+
};
|
|
35785
|
+
};
|
|
35786
|
+
};
|
|
35787
|
+
/** @description Default Response */
|
|
35788
|
+
"4XX": {
|
|
35789
|
+
headers: {
|
|
35790
|
+
[name: string]: unknown;
|
|
35791
|
+
};
|
|
35792
|
+
content: {
|
|
35793
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
35794
|
+
};
|
|
35795
|
+
};
|
|
35796
|
+
/** @description Default Response */
|
|
35797
|
+
"5XX": {
|
|
35798
|
+
headers: {
|
|
35799
|
+
[name: string]: unknown;
|
|
35800
|
+
};
|
|
35801
|
+
content: {
|
|
35802
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
35803
|
+
};
|
|
35804
|
+
};
|
|
35805
|
+
};
|
|
35806
|
+
};
|
|
35807
|
+
getApiV1OperatorCapacity: {
|
|
35808
|
+
parameters: {
|
|
35809
|
+
query?: {
|
|
35810
|
+
/** @description Window as hours or days, e.g. `1h`, `24h`, `7d`; at most `30d` (720h). */
|
|
35811
|
+
window?: string;
|
|
35812
|
+
/** @description Timeline rows. */
|
|
35813
|
+
limit?: number;
|
|
35814
|
+
};
|
|
35815
|
+
header?: never;
|
|
35816
|
+
path?: never;
|
|
35817
|
+
cookie?: never;
|
|
35818
|
+
};
|
|
35819
|
+
requestBody?: never;
|
|
35820
|
+
responses: {
|
|
35821
|
+
/** @description Default Response */
|
|
35822
|
+
200: {
|
|
35823
|
+
headers: {
|
|
35824
|
+
[name: string]: unknown;
|
|
35825
|
+
};
|
|
35826
|
+
content: {
|
|
35827
|
+
"application/json": {
|
|
35828
|
+
/**
|
|
35829
|
+
* Format: date-time
|
|
35830
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
35831
|
+
*/
|
|
35832
|
+
generated_at: string;
|
|
35833
|
+
window: {
|
|
35834
|
+
value: string;
|
|
35835
|
+
seconds: number;
|
|
35836
|
+
/**
|
|
35837
|
+
* Format: date-time
|
|
35838
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
35839
|
+
*/
|
|
35840
|
+
since: string;
|
|
35841
|
+
};
|
|
35842
|
+
/** @description Managed pools by cell and pool (at most 100). */
|
|
35843
|
+
pools: {
|
|
35844
|
+
cell_id: string;
|
|
35845
|
+
pool: string;
|
|
35846
|
+
asg_name: string;
|
|
35847
|
+
computed_at: string | null;
|
|
35848
|
+
reconciled_at: string | null;
|
|
35849
|
+
plan_error: string | null;
|
|
35850
|
+
instance_type: string | null;
|
|
35851
|
+
/** @description min/desired/max from pool_capacity; the rest from the plan’s supply (last tick). */
|
|
35852
|
+
hosts: {
|
|
35853
|
+
min: number;
|
|
35854
|
+
/** @description The controller’s persisted target (pool_capacity.desired_hosts). */
|
|
35855
|
+
desired: number;
|
|
35856
|
+
max: number;
|
|
35857
|
+
asg_desired: number | null;
|
|
35858
|
+
asg_max: number | null;
|
|
35859
|
+
ready: number | null;
|
|
35860
|
+
pending: number | null;
|
|
35861
|
+
draining: number | null;
|
|
35862
|
+
cordoned: number | null;
|
|
35863
|
+
drained: number | null;
|
|
35864
|
+
suspect: number | null;
|
|
35865
|
+
unhealthy: number | null;
|
|
35866
|
+
terminating: number | null;
|
|
35867
|
+
stuck: number | null;
|
|
35868
|
+
unfulfilled: number | null;
|
|
35869
|
+
planned: number | null;
|
|
35870
|
+
};
|
|
35871
|
+
/** @description Host targets by dimension; target = unclamped reduced by the clamp. */
|
|
35872
|
+
targets: {
|
|
35873
|
+
min_hosts: number | null;
|
|
35874
|
+
memory: number | null;
|
|
35875
|
+
packing: number | null;
|
|
35876
|
+
cpu: number | null;
|
|
35877
|
+
disk: number | null;
|
|
35878
|
+
unclamped: number | null;
|
|
35879
|
+
target: number | null;
|
|
35880
|
+
};
|
|
35881
|
+
desired_now: number | null;
|
|
35882
|
+
desired_after: number | null;
|
|
35883
|
+
desired_after_unclamped: number | null;
|
|
35884
|
+
need_new_unclamped: number | null;
|
|
35885
|
+
clamp: {
|
|
35886
|
+
reason: string | null;
|
|
35887
|
+
bound: string | null;
|
|
35888
|
+
cap: number | null;
|
|
35889
|
+
/** @description Counts keyed by value. */
|
|
35890
|
+
caps: {
|
|
35891
|
+
[key: string]: number;
|
|
35892
|
+
};
|
|
35893
|
+
};
|
|
35894
|
+
/** @description Plan C, Q, G, R and U (MiB). */
|
|
35895
|
+
ram: {
|
|
35896
|
+
committed_mib: number | null;
|
|
35897
|
+
queued_mib: number | null;
|
|
35898
|
+
growth_mib: number | null;
|
|
35899
|
+
reserve_mib: number | null;
|
|
35900
|
+
usable_per_host_mib: number | null;
|
|
35901
|
+
/** @description Sum of allocatable RAM of the pool’s ready hosts now (live, like /cells capacity.ready). */
|
|
35902
|
+
ready_allocatable_mib: number;
|
|
35903
|
+
};
|
|
35904
|
+
cpu: {
|
|
35905
|
+
committed_millis: number | null;
|
|
35906
|
+
queued_millis: number | null;
|
|
35907
|
+
};
|
|
35908
|
+
disk: {
|
|
35909
|
+
committed_gib: number | null;
|
|
35910
|
+
queued_gib: number | null;
|
|
35911
|
+
};
|
|
35912
|
+
/** @description Eligible queued demand the plan counted. */
|
|
35913
|
+
queued: {
|
|
35914
|
+
items: number | null;
|
|
35915
|
+
/** @description The controller bounded its queue. */
|
|
35916
|
+
truncated: boolean;
|
|
35917
|
+
};
|
|
35918
|
+
high_watermark: number | null;
|
|
35919
|
+
pressure: string[];
|
|
35920
|
+
/** @description Counts keyed by value. */
|
|
35921
|
+
excluded: {
|
|
35922
|
+
[key: string]: number;
|
|
35923
|
+
};
|
|
35924
|
+
notes: string[];
|
|
35925
|
+
capacity_pending_reason: string | null;
|
|
35926
|
+
capacity_pending_since: string | null;
|
|
35927
|
+
alert_state: string;
|
|
35928
|
+
alert_raised_at: string | null;
|
|
35929
|
+
scale_out_enabled: boolean;
|
|
35930
|
+
scale_in_enabled: boolean;
|
|
35931
|
+
}[];
|
|
35932
|
+
/** @description Operations in capacity_pending. */
|
|
35933
|
+
waiting_starts: {
|
|
35934
|
+
total: number;
|
|
35935
|
+
truncated: boolean;
|
|
35936
|
+
/** @description Oldest first, at most 200. */
|
|
35937
|
+
data: {
|
|
35938
|
+
/**
|
|
35939
|
+
* Format: uuid
|
|
35940
|
+
* @description UUIDv7, lowercase canonical form.
|
|
35941
|
+
*/
|
|
35942
|
+
operation_id: string;
|
|
35943
|
+
kind: string;
|
|
35944
|
+
/**
|
|
35945
|
+
* Format: uuid
|
|
35946
|
+
* @description UUIDv7, lowercase canonical form.
|
|
35947
|
+
*/
|
|
35948
|
+
organization_id: string;
|
|
35949
|
+
workspace_id: string | null;
|
|
35950
|
+
reason: string | null;
|
|
35951
|
+
/**
|
|
35952
|
+
* Format: date-time
|
|
35953
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
35954
|
+
*/
|
|
35955
|
+
created_at: string;
|
|
35956
|
+
age_seconds: number;
|
|
35957
|
+
deadline_at: string | null;
|
|
35958
|
+
required: {
|
|
35959
|
+
cpu_millis: number;
|
|
35960
|
+
memory_mib: number;
|
|
35961
|
+
disk_gib: number;
|
|
35962
|
+
} | null;
|
|
35963
|
+
scale_out: string | null;
|
|
35964
|
+
attempt: number;
|
|
35965
|
+
next_attempt_at: string | null;
|
|
35966
|
+
}[];
|
|
35967
|
+
};
|
|
35968
|
+
timeline: {
|
|
35969
|
+
limit: number;
|
|
35970
|
+
truncated: boolean;
|
|
35971
|
+
/** @description Capacity actions and drains active in the window (not finished before it), newest start first. */
|
|
35972
|
+
data: {
|
|
35973
|
+
type: "capacity_action" | "drain";
|
|
35974
|
+
/**
|
|
35975
|
+
* Format: uuid
|
|
35976
|
+
* @description UUIDv7, lowercase canonical form.
|
|
35977
|
+
*/
|
|
35978
|
+
id: string;
|
|
35979
|
+
cell_id: string;
|
|
35980
|
+
pool: string | null;
|
|
35981
|
+
/** @description launch | retire | replace (capacity actions); drain | cordon (drains). */
|
|
35982
|
+
kind: string;
|
|
35983
|
+
state: string;
|
|
35984
|
+
reason: string | null;
|
|
35985
|
+
host_id: string | null;
|
|
35986
|
+
instance_ids: string[];
|
|
35987
|
+
replaces_instance_id: string | null;
|
|
35988
|
+
desired_before: number | null;
|
|
35989
|
+
desired_after: number | null;
|
|
35990
|
+
retire: boolean | null;
|
|
35991
|
+
blocked_reason: string | null;
|
|
35992
|
+
abort_reason: string | null;
|
|
35993
|
+
error: {
|
|
35994
|
+
[key: string]: unknown;
|
|
35995
|
+
} | null;
|
|
35996
|
+
/**
|
|
35997
|
+
* Format: date-time
|
|
35998
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
35999
|
+
*/
|
|
36000
|
+
started_at: string;
|
|
36001
|
+
completed_at: string | null;
|
|
36002
|
+
/**
|
|
36003
|
+
* Format: date-time
|
|
36004
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36005
|
+
*/
|
|
36006
|
+
updated_at: string;
|
|
36007
|
+
}[];
|
|
36008
|
+
};
|
|
36009
|
+
};
|
|
36010
|
+
};
|
|
36011
|
+
};
|
|
36012
|
+
/** @description Default Response */
|
|
36013
|
+
"4XX": {
|
|
36014
|
+
headers: {
|
|
36015
|
+
[name: string]: unknown;
|
|
36016
|
+
};
|
|
36017
|
+
content: {
|
|
36018
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36019
|
+
};
|
|
36020
|
+
};
|
|
36021
|
+
/** @description Default Response */
|
|
36022
|
+
"5XX": {
|
|
36023
|
+
headers: {
|
|
36024
|
+
[name: string]: unknown;
|
|
36025
|
+
};
|
|
36026
|
+
content: {
|
|
36027
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36028
|
+
};
|
|
36029
|
+
};
|
|
36030
|
+
};
|
|
36031
|
+
};
|
|
36032
|
+
getApiV1OperatorHistory: {
|
|
36033
|
+
parameters: {
|
|
36034
|
+
query: {
|
|
36035
|
+
/** @description latency: per operation kind; psi: fleet and top hosts. */
|
|
36036
|
+
metric: "latency" | "psi";
|
|
36037
|
+
window?: "7d" | "30d" | "90d";
|
|
36038
|
+
kind?: "open" | "suspend" | "resume" | "fork" | "snapshot" | "restore" | "delete" | "move" | "resize" | "volume_create" | "volume_attach" | "volume_detach" | "volume_delete" | "reset" | "layer_snapshot";
|
|
36039
|
+
};
|
|
36040
|
+
header?: never;
|
|
36041
|
+
path?: never;
|
|
36042
|
+
cookie?: never;
|
|
36043
|
+
};
|
|
36044
|
+
requestBody?: never;
|
|
36045
|
+
responses: {
|
|
36046
|
+
/** @description Default Response */
|
|
36047
|
+
200: {
|
|
36048
|
+
headers: {
|
|
36049
|
+
[name: string]: unknown;
|
|
36050
|
+
};
|
|
36051
|
+
content: {
|
|
36052
|
+
"application/json": {
|
|
36053
|
+
/** @enum {string} */
|
|
36054
|
+
metric: "latency";
|
|
36055
|
+
window: "7d" | "30d" | "90d";
|
|
36056
|
+
/** @description Bucket length in seconds: 3600 (7d), 21600 (30d), 86400 (90d). */
|
|
36057
|
+
bucket_seconds: number;
|
|
36058
|
+
/**
|
|
36059
|
+
* Format: date-time
|
|
36060
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36061
|
+
*/
|
|
36062
|
+
start: string;
|
|
36063
|
+
/**
|
|
36064
|
+
* Format: date-time
|
|
36065
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36066
|
+
*/
|
|
36067
|
+
end: string;
|
|
36068
|
+
/**
|
|
36069
|
+
* Format: date-time
|
|
36070
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36071
|
+
*/
|
|
36072
|
+
generated_at: string;
|
|
36073
|
+
/** @description Rollup job cursor: every hour before next_hour is computed. null before the first run. */
|
|
36074
|
+
rollup: {
|
|
36075
|
+
next_hour: string | null;
|
|
36076
|
+
last_run_at: string | null;
|
|
36077
|
+
/** @description Hourly rows are kept this many days. */
|
|
36078
|
+
retention_days: number;
|
|
36079
|
+
};
|
|
36080
|
+
/** @description How hourly rows were combined into buckets. */
|
|
36081
|
+
aggregation: string;
|
|
36082
|
+
kinds: {
|
|
36083
|
+
kind: string;
|
|
36084
|
+
points: {
|
|
36085
|
+
/**
|
|
36086
|
+
* Format: date-time
|
|
36087
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36088
|
+
*/
|
|
36089
|
+
t: string;
|
|
36090
|
+
/** @description Some hour of this bucket is not rolled up yet (the current bucket). */
|
|
36091
|
+
partial: boolean;
|
|
36092
|
+
/** @description Hourly rows with completions in the bucket. */
|
|
36093
|
+
hours: number;
|
|
36094
|
+
/** @description Succeeded + failed operations completed in the bucket (canceled excluded). */
|
|
36095
|
+
completed: number;
|
|
36096
|
+
succeeded: number;
|
|
36097
|
+
failed: number;
|
|
36098
|
+
/** @description Succeeded operations with started_at (population of queue and run). */
|
|
36099
|
+
timed: number;
|
|
36100
|
+
success_rate: number | null;
|
|
36101
|
+
/** @description Total (completed_at - created_at) over succeeded operations: weighted median of the bucket's hourly percentiles (exact for 1 h buckets). */
|
|
36102
|
+
total: {
|
|
36103
|
+
p50: number | null;
|
|
36104
|
+
p95: number | null;
|
|
36105
|
+
p99: number | null;
|
|
36106
|
+
};
|
|
36107
|
+
/** @description Queue wait (started_at - created_at) over succeeded operations: weighted median of the bucket's hourly percentiles (exact for 1 h buckets). */
|
|
36108
|
+
queue: {
|
|
36109
|
+
p50: number | null;
|
|
36110
|
+
p95: number | null;
|
|
36111
|
+
p99: number | null;
|
|
36112
|
+
};
|
|
36113
|
+
/** @description Run time (completed_at - started_at) over succeeded operations: weighted median of the bucket's hourly percentiles (exact for 1 h buckets). */
|
|
36114
|
+
run: {
|
|
36115
|
+
p50: number | null;
|
|
36116
|
+
p95: number | null;
|
|
36117
|
+
p99: number | null;
|
|
36118
|
+
};
|
|
36119
|
+
}[];
|
|
36120
|
+
}[];
|
|
36121
|
+
} | {
|
|
36122
|
+
/** @enum {string} */
|
|
36123
|
+
metric: "psi";
|
|
36124
|
+
window: "7d" | "30d" | "90d";
|
|
36125
|
+
/** @description Bucket length in seconds: 3600 (7d), 21600 (30d), 86400 (90d). */
|
|
36126
|
+
bucket_seconds: number;
|
|
36127
|
+
/**
|
|
36128
|
+
* Format: date-time
|
|
36129
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36130
|
+
*/
|
|
36131
|
+
start: string;
|
|
36132
|
+
/**
|
|
36133
|
+
* Format: date-time
|
|
36134
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36135
|
+
*/
|
|
36136
|
+
end: string;
|
|
36137
|
+
/**
|
|
36138
|
+
* Format: date-time
|
|
36139
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36140
|
+
*/
|
|
36141
|
+
generated_at: string;
|
|
36142
|
+
/** @description Rollup job cursor: every hour before next_hour is computed. null before the first run. */
|
|
36143
|
+
rollup: {
|
|
36144
|
+
next_hour: string | null;
|
|
36145
|
+
last_run_at: string | null;
|
|
36146
|
+
/** @description Hourly rows are kept this many days. */
|
|
36147
|
+
retention_days: number;
|
|
36148
|
+
};
|
|
36149
|
+
/** @description How hourly rows were combined into buckets. */
|
|
36150
|
+
aggregation: string;
|
|
36151
|
+
/** @description All hosts together. */
|
|
36152
|
+
fleet: {
|
|
36153
|
+
/**
|
|
36154
|
+
* Format: date-time
|
|
36155
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36156
|
+
*/
|
|
36157
|
+
t: string;
|
|
36158
|
+
/** @description Some hour of this bucket is not rolled up yet (the current bucket). */
|
|
36159
|
+
partial: boolean;
|
|
36160
|
+
/** @description Heartbeat readings sampled (about one per host per minute). */
|
|
36161
|
+
samples: number;
|
|
36162
|
+
memory: {
|
|
36163
|
+
avg: number | null;
|
|
36164
|
+
max: number | null;
|
|
36165
|
+
};
|
|
36166
|
+
cpu: {
|
|
36167
|
+
avg: number | null;
|
|
36168
|
+
max: number | null;
|
|
36169
|
+
};
|
|
36170
|
+
io: {
|
|
36171
|
+
avg: number | null;
|
|
36172
|
+
max: number | null;
|
|
36173
|
+
};
|
|
36174
|
+
/** @description Hosts with samples in the bucket. */
|
|
36175
|
+
hosts: number;
|
|
36176
|
+
}[];
|
|
36177
|
+
hosts: {
|
|
36178
|
+
/**
|
|
36179
|
+
* Format: uuid
|
|
36180
|
+
* @description UUIDv7, lowercase canonical form.
|
|
36181
|
+
*/
|
|
36182
|
+
host_id: string;
|
|
36183
|
+
instance_id: string;
|
|
36184
|
+
cell_id: string;
|
|
36185
|
+
pool: string;
|
|
36186
|
+
peak: number | null;
|
|
36187
|
+
points: {
|
|
36188
|
+
/**
|
|
36189
|
+
* Format: date-time
|
|
36190
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36191
|
+
*/
|
|
36192
|
+
t: string;
|
|
36193
|
+
/** @description Some hour of this bucket is not rolled up yet (the current bucket). */
|
|
36194
|
+
partial: boolean;
|
|
36195
|
+
/** @description Heartbeat readings sampled (about one per host per minute). */
|
|
36196
|
+
samples: number;
|
|
36197
|
+
memory: {
|
|
36198
|
+
avg: number | null;
|
|
36199
|
+
max: number | null;
|
|
36200
|
+
};
|
|
36201
|
+
cpu: {
|
|
36202
|
+
avg: number | null;
|
|
36203
|
+
max: number | null;
|
|
36204
|
+
};
|
|
36205
|
+
io: {
|
|
36206
|
+
avg: number | null;
|
|
36207
|
+
max: number | null;
|
|
36208
|
+
};
|
|
36209
|
+
}[];
|
|
36210
|
+
}[];
|
|
36211
|
+
/** @description Hosts with samples in the window. */
|
|
36212
|
+
hosts_total: number;
|
|
36213
|
+
/** @description More than 10 hosts had samples; only the ones with the highest peak are listed. */
|
|
36214
|
+
hosts_truncated: boolean;
|
|
36215
|
+
};
|
|
36216
|
+
};
|
|
36217
|
+
};
|
|
36218
|
+
/** @description Default Response */
|
|
36219
|
+
"4XX": {
|
|
36220
|
+
headers: {
|
|
36221
|
+
[name: string]: unknown;
|
|
36222
|
+
};
|
|
36223
|
+
content: {
|
|
36224
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36225
|
+
};
|
|
36226
|
+
};
|
|
36227
|
+
/** @description Default Response */
|
|
36228
|
+
"5XX": {
|
|
36229
|
+
headers: {
|
|
36230
|
+
[name: string]: unknown;
|
|
36231
|
+
};
|
|
36232
|
+
content: {
|
|
36233
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36234
|
+
};
|
|
36235
|
+
};
|
|
36236
|
+
};
|
|
36237
|
+
};
|
|
36238
|
+
getApiV1OperatorMetrics: {
|
|
36239
|
+
parameters: {
|
|
36240
|
+
query?: {
|
|
36241
|
+
window?: "1h" | "24h" | "7d";
|
|
36242
|
+
};
|
|
36243
|
+
header?: never;
|
|
36244
|
+
path?: never;
|
|
36245
|
+
cookie?: never;
|
|
36246
|
+
};
|
|
36247
|
+
requestBody?: never;
|
|
36248
|
+
responses: {
|
|
36249
|
+
/** @description Default Response */
|
|
36250
|
+
200: {
|
|
36251
|
+
headers: {
|
|
36252
|
+
[name: string]: unknown;
|
|
36253
|
+
};
|
|
36254
|
+
content: {
|
|
36255
|
+
"application/json": {
|
|
36256
|
+
window: "1h" | "24h" | "7d";
|
|
36257
|
+
/** @description CloudWatch period: 60 (1h), 300 (24h), 1800 (7d). */
|
|
36258
|
+
period_seconds: number;
|
|
36259
|
+
/**
|
|
36260
|
+
* Format: date-time
|
|
36261
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36262
|
+
*/
|
|
36263
|
+
start: string;
|
|
36264
|
+
/**
|
|
36265
|
+
* Format: date-time
|
|
36266
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36267
|
+
*/
|
|
36268
|
+
end: string;
|
|
36269
|
+
/**
|
|
36270
|
+
* Format: date-time
|
|
36271
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36272
|
+
*/
|
|
36273
|
+
fetched_at: string;
|
|
36274
|
+
/** @description Served from the 60 s in-process cache. */
|
|
36275
|
+
cached: boolean;
|
|
36276
|
+
region: string | null;
|
|
36277
|
+
dashboard_url: string | null;
|
|
36278
|
+
/** @description ok: every series complete; partial: some series not complete; degraded: CloudWatch could not be read (series empty, see error). */
|
|
36279
|
+
status: "ok" | "partial" | "degraded";
|
|
36280
|
+
error: {
|
|
36281
|
+
code: "not_configured" | "access_denied" | "throttled" | "invalid_query" | "no_credentials" | "timeout" | "unavailable";
|
|
36282
|
+
message: string;
|
|
36283
|
+
} | null;
|
|
36284
|
+
series: {
|
|
36285
|
+
/** @description Stable series id (api_latency_p95, edge_latency_p95, api_requests, api_5xx, edge_5xx, gateway_latency_p95, gateway_requests, sqs_depth_<topic>, sqs_age_<topic>, sqs_dlq_depth_<topic>). */
|
|
36286
|
+
id: string;
|
|
36287
|
+
group: "api" | "gateway" | "sqs";
|
|
36288
|
+
label: string;
|
|
36289
|
+
/** @description seconds (latency, message age) or count per period (requests, 5xx) / sampled maximum (queue depth). */
|
|
36290
|
+
unit: "seconds" | "count";
|
|
36291
|
+
/** @description CloudWatch namespace. */
|
|
36292
|
+
namespace: string;
|
|
36293
|
+
/** @description CloudWatch metric name. */
|
|
36294
|
+
metric: string;
|
|
36295
|
+
/** @description CloudWatch dimensions (name -> value). */
|
|
36296
|
+
dimensions: {
|
|
36297
|
+
[key: string]: string;
|
|
36298
|
+
};
|
|
36299
|
+
/** @description CloudWatch statistic (p95, Sum, Maximum). */
|
|
36300
|
+
stat: string;
|
|
36301
|
+
/** @description GetMetricData StatusCode of this series; missing = not in the response. */
|
|
36302
|
+
status: "complete" | "partial_data" | "internal_error" | "forbidden" | "missing";
|
|
36303
|
+
/** @description Period start of each point, ascending. */
|
|
36304
|
+
timestamps: string[];
|
|
36305
|
+
/** @description One value per timestamp, in `unit`. */
|
|
36306
|
+
values: number[];
|
|
36307
|
+
}[];
|
|
36308
|
+
};
|
|
36309
|
+
};
|
|
36310
|
+
};
|
|
36311
|
+
/** @description Default Response */
|
|
36312
|
+
"4XX": {
|
|
36313
|
+
headers: {
|
|
36314
|
+
[name: string]: unknown;
|
|
36315
|
+
};
|
|
36316
|
+
content: {
|
|
36317
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36318
|
+
};
|
|
36319
|
+
};
|
|
36320
|
+
/** @description Default Response */
|
|
36321
|
+
"5XX": {
|
|
36322
|
+
headers: {
|
|
36323
|
+
[name: string]: unknown;
|
|
36324
|
+
};
|
|
36325
|
+
content: {
|
|
36326
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36327
|
+
};
|
|
36328
|
+
};
|
|
36329
|
+
};
|
|
36330
|
+
};
|
|
36331
|
+
getApiV1OperatorPerformance: {
|
|
36332
|
+
parameters: {
|
|
36333
|
+
query?: {
|
|
36334
|
+
/** @description Rolling window (at most 30 days). */
|
|
36335
|
+
window?: "1h" | "24h" | "7d" | "30d";
|
|
36336
|
+
};
|
|
36337
|
+
header?: never;
|
|
36338
|
+
path?: never;
|
|
36339
|
+
cookie?: never;
|
|
36340
|
+
};
|
|
36341
|
+
requestBody?: never;
|
|
36342
|
+
responses: {
|
|
36343
|
+
/** @description Default Response */
|
|
36344
|
+
200: {
|
|
36345
|
+
headers: {
|
|
36346
|
+
[name: string]: unknown;
|
|
36347
|
+
};
|
|
36348
|
+
content: {
|
|
36349
|
+
"application/json": {
|
|
36350
|
+
/**
|
|
36351
|
+
* Format: date-time
|
|
36352
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36353
|
+
*/
|
|
36354
|
+
generated_at: string;
|
|
36355
|
+
window: "1h" | "24h" | "7d" | "30d";
|
|
36356
|
+
window_seconds: number;
|
|
36357
|
+
/**
|
|
36358
|
+
* Format: date-time
|
|
36359
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36360
|
+
*/
|
|
36361
|
+
window_start: string;
|
|
36362
|
+
/** @description Latency of succeeded operations of open, resume, suspend, fork and delete (always all five, in that order). */
|
|
36363
|
+
lifecycle: {
|
|
36364
|
+
/** @description Operation kind. */
|
|
36365
|
+
kind: string;
|
|
36366
|
+
/** @description Operations of this kind that succeeded within the window (completed_at in the window; created_at may be earlier). */
|
|
36367
|
+
samples: number;
|
|
36368
|
+
/** @description Of those, operations without started_at: counted in total_ms, not in queue_wait_ms or run_ms. */
|
|
36369
|
+
missing_started_at: number;
|
|
36370
|
+
/** @description started_at − created_at: waiting to be claimed, for an older operation of the workspace, and for capacity. */
|
|
36371
|
+
queue_wait_ms: {
|
|
36372
|
+
p50: number | null;
|
|
36373
|
+
p95: number | null;
|
|
36374
|
+
p99: number | null;
|
|
36375
|
+
};
|
|
36376
|
+
/** @description completed_at − started_at: the cell executing it. */
|
|
36377
|
+
run_ms: {
|
|
36378
|
+
p50: number | null;
|
|
36379
|
+
p95: number | null;
|
|
36380
|
+
p99: number | null;
|
|
36381
|
+
};
|
|
36382
|
+
/** @description completed_at − created_at: the server-side operation time. */
|
|
36383
|
+
total_ms: {
|
|
36384
|
+
p50: number | null;
|
|
36385
|
+
p95: number | null;
|
|
36386
|
+
p99: number | null;
|
|
36387
|
+
};
|
|
36388
|
+
}[];
|
|
36389
|
+
/** @description Daily p50/p95 of the total operation time of the lifecycle kinds. */
|
|
36390
|
+
trend: {
|
|
36391
|
+
/** @description UTC days shown: max(7, window in days); the 1 h and 24 h windows still show a week. */
|
|
36392
|
+
days: number;
|
|
36393
|
+
/**
|
|
36394
|
+
* Format: date-time
|
|
36395
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36396
|
+
*/
|
|
36397
|
+
since: string;
|
|
36398
|
+
series: {
|
|
36399
|
+
kind: string;
|
|
36400
|
+
/** @description One point per UTC day, oldest first; days without operations have samples 0. */
|
|
36401
|
+
points: {
|
|
36402
|
+
/** @description UTC day. */
|
|
36403
|
+
day: string;
|
|
36404
|
+
/** @description Succeeded operations completed that day. */
|
|
36405
|
+
samples: number;
|
|
36406
|
+
total_p50_ms: number | null;
|
|
36407
|
+
total_p95_ms: number | null;
|
|
36408
|
+
}[];
|
|
36409
|
+
}[];
|
|
36410
|
+
/** @description Comparison lines (docs/progress/startup-latency.md); only kinds with a recorded baseline. */
|
|
36411
|
+
baselines: {
|
|
36412
|
+
kind: string;
|
|
36413
|
+
/** @description Benchmark p50 of the server operation time, milliseconds. */
|
|
36414
|
+
p50_ms: number;
|
|
36415
|
+
/** @description Benchmark p95, milliseconds. */
|
|
36416
|
+
p95_ms: number;
|
|
36417
|
+
samples: number;
|
|
36418
|
+
/** @description UTC day of the benchmark run. */
|
|
36419
|
+
measured_on: string;
|
|
36420
|
+
environment: string;
|
|
36421
|
+
/** @description What the benchmark measured. */
|
|
36422
|
+
scenario: string;
|
|
36423
|
+
/** @description Where the numbers come from (progress document and receipt). */
|
|
36424
|
+
source: string;
|
|
36425
|
+
}[];
|
|
36426
|
+
};
|
|
36427
|
+
paths: {
|
|
36428
|
+
open: {
|
|
36429
|
+
/** @description Succeeded opens within the window. */
|
|
36430
|
+
succeeded: number;
|
|
36431
|
+
/** @description result.start_path: warm (cloned from the host’s warm snapshot) or boot; warm and boot always present. */
|
|
36432
|
+
by_path: {
|
|
36433
|
+
/** @description Path the cell recorded in the operation result; `unrecorded` when the result has none. */
|
|
36434
|
+
path: string;
|
|
36435
|
+
/** @description Succeeded operations that took this path within the window. */
|
|
36436
|
+
count: number;
|
|
36437
|
+
/** @description Server-side operation time (completed_at − created_at). */
|
|
36438
|
+
total_ms: {
|
|
36439
|
+
p50: number | null;
|
|
36440
|
+
p95: number | null;
|
|
36441
|
+
};
|
|
36442
|
+
/** @description Host VM start to guest ready (result.boot_to_ready_ms), for results that carry it. */
|
|
36443
|
+
boot_to_ready_ms: {
|
|
36444
|
+
p50: number | null;
|
|
36445
|
+
p95: number | null;
|
|
36446
|
+
};
|
|
36447
|
+
}[];
|
|
36448
|
+
warm_fallback: {
|
|
36449
|
+
/** @description Succeeded opens whose result carries warm_fallback (a warm-allowed start booted instead). */
|
|
36450
|
+
count: number;
|
|
36451
|
+
rate: number | null;
|
|
36452
|
+
/** @description Counts keyed by value. */
|
|
36453
|
+
by_reason: {
|
|
36454
|
+
[key: string]: number;
|
|
36455
|
+
};
|
|
36456
|
+
};
|
|
36457
|
+
};
|
|
36458
|
+
resume: {
|
|
36459
|
+
/** @description Succeeded resumes within the window. */
|
|
36460
|
+
succeeded: number;
|
|
36461
|
+
/** @description result.resume_path; local_cache, prestaged and download always present, cold_boot and others when they occurred. */
|
|
36462
|
+
by_path: {
|
|
36463
|
+
/** @description Path the cell recorded in the operation result; `unrecorded` when the result has none. */
|
|
36464
|
+
path: string;
|
|
36465
|
+
/** @description Succeeded operations that took this path within the window. */
|
|
36466
|
+
count: number;
|
|
36467
|
+
/** @description Server-side operation time (completed_at − created_at). */
|
|
36468
|
+
total_ms: {
|
|
36469
|
+
p50: number | null;
|
|
36470
|
+
p95: number | null;
|
|
36471
|
+
};
|
|
36472
|
+
/** @description Host VM start to guest ready (result.boot_to_ready_ms), for results that carry it. */
|
|
36473
|
+
boot_to_ready_ms: {
|
|
36474
|
+
p50: number | null;
|
|
36475
|
+
p95: number | null;
|
|
36476
|
+
};
|
|
36477
|
+
/** @description DownloadGeneration time (result.download.download_ms), for prestaged/download/cold_boot. */
|
|
36478
|
+
download_ms: {
|
|
36479
|
+
p50: number | null;
|
|
36480
|
+
p95: number | null;
|
|
36481
|
+
};
|
|
36482
|
+
}[];
|
|
36483
|
+
};
|
|
36484
|
+
};
|
|
36485
|
+
/** @description By checkpoint kind (suspend always present). */
|
|
36486
|
+
checkpoints: {
|
|
36487
|
+
/** @description Checkpoint kind: suspend | snapshot | fork_source | layer_capture. */
|
|
36488
|
+
kind: string;
|
|
36489
|
+
/** @description Checkpoints committed (durable) within the window. */
|
|
36490
|
+
committed: number;
|
|
36491
|
+
/** @description Checkpoints that failed within the window. */
|
|
36492
|
+
failed: number;
|
|
36493
|
+
/** @description Stored size of the committed generation (all objects). */
|
|
36494
|
+
total_bytes: {
|
|
36495
|
+
p50: number | null;
|
|
36496
|
+
p95: number | null;
|
|
36497
|
+
};
|
|
36498
|
+
/** @description Bytes the upload moved (chunked uploads skip reused chunks; single-object uploads send everything). */
|
|
36499
|
+
uploaded_bytes: {
|
|
36500
|
+
p50: number | null;
|
|
36501
|
+
p95: number | null;
|
|
36502
|
+
};
|
|
36503
|
+
/** @description Host snapshot RPC (the VM is paused for part of it). */
|
|
36504
|
+
snapshot_ms: {
|
|
36505
|
+
p50: number | null;
|
|
36506
|
+
p95: number | null;
|
|
36507
|
+
};
|
|
36508
|
+
/** @description Upload to the durable store. */
|
|
36509
|
+
upload_ms: {
|
|
36510
|
+
p50: number | null;
|
|
36511
|
+
p95: number | null;
|
|
36512
|
+
};
|
|
36513
|
+
/** @description Checkpoint created → committed (snapshot, upload and verification). */
|
|
36514
|
+
capture_to_durable_ms: {
|
|
36515
|
+
p50: number | null;
|
|
36516
|
+
p95: number | null;
|
|
36517
|
+
};
|
|
36518
|
+
/** @description Per-checkpoint upload throughput: uploaded_bytes / upload_ms (MiB = 2^20 bytes). */
|
|
36519
|
+
upload_mib_per_s: {
|
|
36520
|
+
p50: number | null;
|
|
36521
|
+
p95: number | null;
|
|
36522
|
+
};
|
|
36523
|
+
upload_mib_per_s_overall: number | null;
|
|
36524
|
+
}[];
|
|
36525
|
+
/** @description Operations that left capacity_pending before migration 0079 have no first_capacity_pending_at and count as not waited. */
|
|
36526
|
+
capacity_waits: {
|
|
36527
|
+
/** @description Operations completed (succeeded or failed) within the window that waited for capacity (first_capacity_pending_at set). */
|
|
36528
|
+
waited: number;
|
|
36529
|
+
/** @description Time from first entering capacity_pending until started_at (completed_at when the operation failed there). */
|
|
36530
|
+
wait_ms: {
|
|
36531
|
+
p50: number | null;
|
|
36532
|
+
p95: number | null;
|
|
36533
|
+
max: number | null;
|
|
36534
|
+
};
|
|
36535
|
+
/** @description Starts failed capacity_unavailable within the window (waited past the capacity deadline, default 15 min). */
|
|
36536
|
+
capacity_unavailable: number;
|
|
36537
|
+
/** @description Operations failed invalid_resources within the window. */
|
|
36538
|
+
invalid_resources: number;
|
|
36539
|
+
/** @description Of those, error.details.reason exceeds_host_class (larger than any host the pool can have). */
|
|
36540
|
+
exceeds_host_class: number;
|
|
36541
|
+
};
|
|
36542
|
+
/** @description From app.operator_tool_audit (all organizations), most calls first. */
|
|
36543
|
+
tool_calls: {
|
|
36544
|
+
/** @description exec | files | pty | process | git | browser. */
|
|
36545
|
+
tool: string;
|
|
36546
|
+
/** @description Tool calls within the window (every outcome). */
|
|
36547
|
+
calls: number;
|
|
36548
|
+
/** @description Calls with outcome error. */
|
|
36549
|
+
errors: number;
|
|
36550
|
+
/** @description Calls with outcome denied (authorization or stale ownership); not errors. */
|
|
36551
|
+
denied: number;
|
|
36552
|
+
error_rate: number | null;
|
|
36553
|
+
/** @description Gateway call duration. For stream actions (exec.attach, pty.attach, exec.output) it is the stream’s lifetime. */
|
|
36554
|
+
latency_ms: {
|
|
36555
|
+
p50: number | null;
|
|
36556
|
+
p95: number | null;
|
|
36557
|
+
};
|
|
36558
|
+
/** @description Per action, most calls first. */
|
|
36559
|
+
actions: {
|
|
36560
|
+
/** @description Gateway action, e.g. exec.start, files.read. */
|
|
36561
|
+
action: string;
|
|
36562
|
+
/** @description Tool calls within the window (every outcome). */
|
|
36563
|
+
calls: number;
|
|
36564
|
+
/** @description Calls with outcome error. */
|
|
36565
|
+
errors: number;
|
|
36566
|
+
/** @description Calls with outcome denied (authorization or stale ownership); not errors. */
|
|
36567
|
+
denied: number;
|
|
36568
|
+
error_rate: number | null;
|
|
36569
|
+
/** @description Gateway call duration. For stream actions (exec.attach, pty.attach, exec.output) it is the stream’s lifetime. */
|
|
36570
|
+
latency_ms: {
|
|
36571
|
+
p50: number | null;
|
|
36572
|
+
p95: number | null;
|
|
36573
|
+
};
|
|
36574
|
+
}[];
|
|
36575
|
+
}[];
|
|
36576
|
+
/** @description Operations completed within the window, per kind: the five lifecycle kinds always, others when they occurred. */
|
|
36577
|
+
reliability: {
|
|
36578
|
+
kind: string;
|
|
36579
|
+
succeeded: number;
|
|
36580
|
+
failed: number;
|
|
36581
|
+
success_rate: number | null;
|
|
36582
|
+
}[];
|
|
36583
|
+
};
|
|
36584
|
+
};
|
|
36585
|
+
};
|
|
36586
|
+
/** @description Default Response */
|
|
36587
|
+
"4XX": {
|
|
36588
|
+
headers: {
|
|
36589
|
+
[name: string]: unknown;
|
|
36590
|
+
};
|
|
36591
|
+
content: {
|
|
36592
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36593
|
+
};
|
|
36594
|
+
};
|
|
36595
|
+
/** @description Default Response */
|
|
36596
|
+
"5XX": {
|
|
36597
|
+
headers: {
|
|
36598
|
+
[name: string]: unknown;
|
|
36599
|
+
};
|
|
36600
|
+
content: {
|
|
36601
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36602
|
+
};
|
|
36603
|
+
};
|
|
36604
|
+
};
|
|
36605
|
+
};
|
|
36606
|
+
getApiV1OperatorBusiness: {
|
|
36607
|
+
parameters: {
|
|
36608
|
+
query?: {
|
|
36609
|
+
/** @description Rolling window (at most 30 days). */
|
|
36610
|
+
window?: "7d" | "30d";
|
|
36611
|
+
};
|
|
36612
|
+
header?: never;
|
|
36613
|
+
path?: never;
|
|
36614
|
+
cookie?: never;
|
|
36615
|
+
};
|
|
36616
|
+
requestBody?: never;
|
|
36617
|
+
responses: {
|
|
36618
|
+
/** @description Default Response */
|
|
36619
|
+
200: {
|
|
36620
|
+
headers: {
|
|
36621
|
+
[name: string]: unknown;
|
|
36622
|
+
};
|
|
36623
|
+
content: {
|
|
36624
|
+
"application/json": {
|
|
36625
|
+
/**
|
|
36626
|
+
* Format: date-time
|
|
36627
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36628
|
+
*/
|
|
36629
|
+
generated_at: string;
|
|
36630
|
+
window: "7d" | "30d";
|
|
36631
|
+
window_seconds: number;
|
|
36632
|
+
/**
|
|
36633
|
+
* Format: date-time
|
|
36634
|
+
* @description RFC 3339 UTC timestamp with Z.
|
|
36635
|
+
*/
|
|
36636
|
+
window_start: string;
|
|
36637
|
+
/** @description Stripe mode of every billing figure (this environment’s). */
|
|
36638
|
+
billing_mode: "test" | "live";
|
|
36639
|
+
/** @description The plan counted as free: DEFAULT_PLAN_KEY, the plan every new organization gets. */
|
|
36640
|
+
free_plan_key: string;
|
|
36641
|
+
growth: {
|
|
36642
|
+
/** @description Every UTC day the window touches, oldest first (the first and last day are partial). */
|
|
36643
|
+
daily: {
|
|
36644
|
+
/** @description UTC day. */
|
|
36645
|
+
day: string;
|
|
36646
|
+
/** @description Users created that day (within the window). */
|
|
36647
|
+
signups: number;
|
|
36648
|
+
/** @description Of those, users whose email is verified now. */
|
|
36649
|
+
verified_signups: number;
|
|
36650
|
+
/** @description Organizations created that day (including since deleted). */
|
|
36651
|
+
organizations_created: number;
|
|
36652
|
+
}[];
|
|
36653
|
+
users: {
|
|
36654
|
+
/** @description Every user row (all time). */
|
|
36655
|
+
total: number;
|
|
36656
|
+
/** @description Users with a verified email (all time). */
|
|
36657
|
+
verified: number;
|
|
36658
|
+
signups_in_window: number;
|
|
36659
|
+
verified_signups_in_window: number;
|
|
36660
|
+
};
|
|
36661
|
+
organizations: {
|
|
36662
|
+
/** @description Organizations not deleted (all time). */
|
|
36663
|
+
total: number;
|
|
36664
|
+
/** @description Deleted organizations (all time), not in total. */
|
|
36665
|
+
deleted: number;
|
|
36666
|
+
/** @description Created within the window, including since deleted. */
|
|
36667
|
+
created_in_window: number;
|
|
36668
|
+
};
|
|
36669
|
+
/** @description Distinct organizations with an operation that completed (succeeded or failed) in the last 7 / 30 days or is still queued, capacity_pending or running. Fixed windows, independent of `window`. */
|
|
36670
|
+
active_organizations: {
|
|
36671
|
+
last_7d: number;
|
|
36672
|
+
last_30d: number;
|
|
36673
|
+
};
|
|
36674
|
+
};
|
|
36675
|
+
money: {
|
|
36676
|
+
/** @description Organizations not deleted, by the plan in effect now (the entitlement resolver’s rule: override > subscription > trial > default, newest first). Most first. */
|
|
36677
|
+
organizations_by_plan: {
|
|
36678
|
+
/** @description `none` when no plan entitlement is in effect. */
|
|
36679
|
+
plan_key: string;
|
|
36680
|
+
organizations: number;
|
|
36681
|
+
}[];
|
|
36682
|
+
/** @description Stripe subscription projections of this billing mode, excluding canceled and incomplete_expired. */
|
|
36683
|
+
subscriptions: {
|
|
36684
|
+
/** @description Status active or past_due on a price above zero (what MRR counts). */
|
|
36685
|
+
paying: number;
|
|
36686
|
+
/** @description Of the paying ones, set to cancel (cancel_at_period_end or cancel_at): still in MRR until they end. */
|
|
36687
|
+
canceling: number;
|
|
36688
|
+
trialing: number;
|
|
36689
|
+
/** @description Status past_due (payment failed, Stripe retrying). */
|
|
36690
|
+
past_due: number;
|
|
36691
|
+
/** @description Status unpaid (retries exhausted; not in MRR). */
|
|
36692
|
+
unpaid: number;
|
|
36693
|
+
/** @description Entitlement state grace: past due, still within payment_grace_days. */
|
|
36694
|
+
grace: number;
|
|
36695
|
+
/** @description Entitlement state restricted: new starts refused for non-payment. */
|
|
36696
|
+
restricted: number;
|
|
36697
|
+
/** @description Active/past_due subscriptions whose Stripe price is not one of the catalog’s monthly/yearly prices: not in MRR. */
|
|
36698
|
+
unpriced: number;
|
|
36699
|
+
};
|
|
36700
|
+
/** @description Monthly recurring revenue per currency: the list price (plan_prices.unit_amount_minor) of every paying subscription, a yearly price divided by 12, rounded to minor units. Before discounts and tax; overage and usage charges are not recurring and not included. */
|
|
36701
|
+
mrr: {
|
|
36702
|
+
/** @description ISO 4217, lower case (plan_prices / invoice currency). */
|
|
36703
|
+
currency: string;
|
|
36704
|
+
/** @description Minor units (cents for usd). */
|
|
36705
|
+
amount_minor: number;
|
|
36706
|
+
subscriptions: number;
|
|
36707
|
+
}[];
|
|
36708
|
+
/** @description Collected in the last 30 days (fixed, independent of `window`): amount_paid of invoices with status paid and paid_at in the last 30 days, per currency. Includes overage settlement invoices. */
|
|
36709
|
+
revenue_30d: {
|
|
36710
|
+
/** @description ISO 4217, lower case (plan_prices / invoice currency). */
|
|
36711
|
+
currency: string;
|
|
36712
|
+
/** @description Minor units (cents for usd). */
|
|
36713
|
+
amount_minor: number;
|
|
36714
|
+
invoices: number;
|
|
36715
|
+
}[];
|
|
36716
|
+
conversion: {
|
|
36717
|
+
/** @description Stripe trials. The catalog configures no trial today, so this stays empty until one is offered; free_to_paid is the funnel in use. */
|
|
36718
|
+
trial_to_paid: {
|
|
36719
|
+
/** @description Subscriptions whose Stripe trial ended (trial_end) within the window. */
|
|
36720
|
+
trials_ended: number;
|
|
36721
|
+
/** @description Of those, subscriptions with a paid invoice (status paid, amount_paid > 0) at or after trial_end. */
|
|
36722
|
+
converted: number;
|
|
36723
|
+
rate: number | null;
|
|
36724
|
+
};
|
|
36725
|
+
/** @description New organizations that became paying customers. */
|
|
36726
|
+
free_to_paid: {
|
|
36727
|
+
/** @description Organizations created within the window (every organization starts on the free plan). */
|
|
36728
|
+
cohort: number;
|
|
36729
|
+
/** @description Of those, organizations that have paid an invoice (status paid, amount_paid > 0) in this billing mode. */
|
|
36730
|
+
converted: number;
|
|
36731
|
+
rate: number | null;
|
|
36732
|
+
};
|
|
36733
|
+
};
|
|
36734
|
+
};
|
|
36735
|
+
usage: {
|
|
36736
|
+
/** @description Every meter; hours whose start is within the window (the current hour as far as rolled up). */
|
|
36737
|
+
meters: {
|
|
36738
|
+
/** @description Usage meter (usage_org_hourly). */
|
|
36739
|
+
meter: string;
|
|
36740
|
+
/** @description hours: CPU hours (cpu_seconds / 3600); gib_hours: GiB-hours (gib_seconds / 3600); gb: decimal gigabytes (bytes / 1e9). */
|
|
36741
|
+
unit: "hours" | "gib_hours" | "gb";
|
|
36742
|
+
/** @description Raw (unrounded) usage within the window, in `unit`. */
|
|
36743
|
+
quantity: number;
|
|
36744
|
+
/** @description Organizations with usage on this meter. */
|
|
36745
|
+
organizations: number;
|
|
36746
|
+
/** @description Part of quantity from organizations on the free plan now. */
|
|
36747
|
+
free_plan_quantity: number;
|
|
36748
|
+
free_plan_share: number | null;
|
|
36749
|
+
}[];
|
|
36750
|
+
/** @description At most 10 organizations, ranked by RAM GiB-hours (the main cost driver), then CPU hours. */
|
|
36751
|
+
top_organizations: {
|
|
36752
|
+
/**
|
|
36753
|
+
* Format: uuid
|
|
36754
|
+
* @description UUIDv7, lowercase canonical form.
|
|
36755
|
+
*/
|
|
36756
|
+
organization_id: string;
|
|
36757
|
+
name: string;
|
|
36758
|
+
plan_key: string | null;
|
|
36759
|
+
/** @description The organization has been deleted since (its usage still counts). */
|
|
36760
|
+
deleted: boolean;
|
|
36761
|
+
cpu_hours: number;
|
|
36762
|
+
/** @description memory_gib_seconds / 3600: the workspace RAM allocation while running. */
|
|
36763
|
+
ram_gib_hours: number;
|
|
36764
|
+
/** @description storage_gib_seconds / 3600 (private disk + retained snapshots). */
|
|
36765
|
+
storage_gib_hours: number;
|
|
36766
|
+
egress_gb: number;
|
|
36767
|
+
}[];
|
|
36768
|
+
};
|
|
36769
|
+
};
|
|
36770
|
+
};
|
|
36771
|
+
};
|
|
36772
|
+
/** @description Default Response */
|
|
36773
|
+
"4XX": {
|
|
36774
|
+
headers: {
|
|
36775
|
+
[name: string]: unknown;
|
|
36776
|
+
};
|
|
36777
|
+
content: {
|
|
36778
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36779
|
+
};
|
|
36780
|
+
};
|
|
36781
|
+
/** @description Default Response */
|
|
36782
|
+
"5XX": {
|
|
36783
|
+
headers: {
|
|
36784
|
+
[name: string]: unknown;
|
|
36785
|
+
};
|
|
36786
|
+
content: {
|
|
36787
|
+
"application/json": components["schemas"]["ErrorBody"];
|
|
36788
|
+
};
|
|
36789
|
+
};
|
|
36790
|
+
};
|
|
36791
|
+
};
|
|
35243
36792
|
}
|