@miosa/sdk 0.3.0 → 1.1.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/dist/index.d.ts CHANGED
@@ -214,6 +214,9 @@ interface ApiKeyCreateParams {
214
214
  expires_at?: string;
215
215
  expiresAt?: string;
216
216
  idempotencyKey?: string;
217
+ /** Scope this key to a single workspace. Omit for a tenant-wide key. */
218
+ workspaceId?: string;
219
+ workspace_id?: string;
217
220
  [key: string]: unknown;
218
221
  }
219
222
  declare class ApiKeys {
@@ -745,6 +748,12 @@ interface ComputerCreateParams {
745
748
  size?: ComputerSize;
746
749
  visibility?: ComputerVisibility;
747
750
  metadata?: Record<string, string>;
751
+ externalWorkspaceId?: string;
752
+ external_workspace_id?: string;
753
+ externalUserId?: string;
754
+ external_user_id?: string;
755
+ externalProjectId?: string;
756
+ external_project_id?: string;
748
757
  }
749
758
  interface ComputerUpdateParams {
750
759
  name?: string;
@@ -1349,6 +1358,507 @@ declare class Desktop$1 {
1349
1358
  launch(appName: string): Promise<DesktopActionResult>;
1350
1359
  }
1351
1360
 
1361
+ /**
1362
+ * Egress audit log — paginated query + live tail.
1363
+ *
1364
+ * Backed by:
1365
+ * GET /api/v1/egress/audit
1366
+ * GET /api/v1/egress/audit/:id
1367
+ *
1368
+ * `client.audit.tail()` long-polls the REST endpoint and yields new
1369
+ * events as they arrive. The sandbox-scoped variant
1370
+ * (`sandbox.audit.tail()`) upgrades to a live SSE connection backed by
1371
+ * `GET /sandboxes/:id/audit/stream` so the tail latency is
1372
+ * sub-second.
1373
+ */
1374
+
1375
+ interface EgressAuditEvent {
1376
+ id: string;
1377
+ action?: string;
1378
+ effect?: string;
1379
+ host?: string;
1380
+ method?: string;
1381
+ path?: string;
1382
+ status_code?: number;
1383
+ actor_id?: string;
1384
+ resource_id?: string;
1385
+ resource_type?: string;
1386
+ policy_id?: string;
1387
+ rule_id?: string;
1388
+ external_user_id?: string;
1389
+ external_workspace_id?: string;
1390
+ metadata?: Record<string, unknown>;
1391
+ inserted_at?: string;
1392
+ timestamp?: string;
1393
+ [key: string]: unknown;
1394
+ }
1395
+ interface AuditListParams {
1396
+ resourceId?: string;
1397
+ resource_id?: string;
1398
+ resourceType?: string;
1399
+ resource_type?: string;
1400
+ host?: string;
1401
+ action?: string;
1402
+ since?: string;
1403
+ until?: string;
1404
+ limit?: number;
1405
+ cursor?: string;
1406
+ externalUserId?: string;
1407
+ external_user_id?: string;
1408
+ externalWorkspaceId?: string;
1409
+ external_workspace_id?: string;
1410
+ }
1411
+ interface AuditTailParams extends AuditListParams {
1412
+ pollIntervalMs?: number;
1413
+ }
1414
+ declare class EgressAudit {
1415
+ protected readonly http: HttpClient;
1416
+ constructor(http: HttpClient);
1417
+ /** List audit events with optional filters. */
1418
+ list(params?: AuditListParams): Promise<EgressAuditEvent[]>;
1419
+ /** Get a single audit event by id. */
1420
+ get(id: string): Promise<EgressAuditEvent>;
1421
+ /**
1422
+ * Long-poll the audit endpoint and yield new events as they appear.
1423
+ *
1424
+ * Tenant-wide `client.audit.tail()` is REST-based long polling. A
1425
+ * live WebSocket / SSE tail is only available for the sandbox-scoped
1426
+ * variant — see {@link SandboxAudit.tail}.
1427
+ */
1428
+ tail(params?: AuditTailParams): AsyncIterableIterator<EgressAuditEvent>;
1429
+ }
1430
+ /**
1431
+ * Sandbox-bound view of {@link EgressAudit}. `list()` pre-scopes
1432
+ * `resource_id` + `resource_type="sandbox"`. `tail()` upgrades to the
1433
+ * per-sandbox SSE stream for sub-second tail latency.
1434
+ */
1435
+ declare class SandboxAudit {
1436
+ protected readonly http: HttpClient;
1437
+ protected readonly resourceId: string;
1438
+ protected readonly resourceType: string;
1439
+ private readonly delegate;
1440
+ constructor(http: HttpClient, resourceId: string);
1441
+ list(params?: AuditListParams): Promise<EgressAuditEvent[]>;
1442
+ get(id: string): Promise<EgressAuditEvent>;
1443
+ /** SSE tail of the sandbox-scoped audit stream. */
1444
+ tail(params?: AuditTailParams): AsyncIterableIterator<EgressAuditEvent>;
1445
+ }
1446
+ /** Computer-bound audit — same surface, `resource_type="computer"`. */
1447
+ declare class ComputerAudit extends SandboxAudit {
1448
+ protected readonly resourceType: string;
1449
+ }
1450
+
1451
+ /**
1452
+ * Egress network — policies, allowlist, suggestions.
1453
+ *
1454
+ * Backed by:
1455
+ * GET /api/v1/egress/policies
1456
+ * POST /api/v1/egress/policies
1457
+ * PATCH /api/v1/egress/policies/:id (or no id for tenant default)
1458
+ *
1459
+ * GET /api/v1/egress/allowlist
1460
+ * POST /api/v1/egress/allowlist
1461
+ * DELETE /api/v1/egress/allowlist/:id
1462
+ *
1463
+ * GET /api/v1/egress/audit/suggestions
1464
+ */
1465
+
1466
+ type EgressPolicyMode = "enforce" | "audit_only";
1467
+ type EgressRuleEffect = "allow" | "deny";
1468
+ interface EgressAllowlistRule {
1469
+ id: string;
1470
+ host: string;
1471
+ effect: EgressRuleEffect | string;
1472
+ methods?: string[];
1473
+ path_glob?: string | null;
1474
+ policy_id?: string | null;
1475
+ resource_id?: string | null;
1476
+ resource_type?: string | null;
1477
+ note?: string | null;
1478
+ created_at?: string;
1479
+ [key: string]: unknown;
1480
+ }
1481
+ interface EgressPolicyData {
1482
+ id: string;
1483
+ name?: string;
1484
+ mode: EgressPolicyMode | string;
1485
+ default_effect: EgressRuleEffect | string;
1486
+ description?: string | null;
1487
+ resource_id?: string | null;
1488
+ resource_type?: string | null;
1489
+ rules?: EgressAllowlistRule[];
1490
+ created_at?: string;
1491
+ updated_at?: string;
1492
+ [key: string]: unknown;
1493
+ }
1494
+ interface EgressSuggestion {
1495
+ host: string;
1496
+ methods?: string[];
1497
+ path_glob?: string | null;
1498
+ count?: number;
1499
+ first_seen?: string;
1500
+ last_seen?: string;
1501
+ resource_id?: string | null;
1502
+ [key: string]: unknown;
1503
+ }
1504
+ interface AllowParams {
1505
+ methods?: string[];
1506
+ pathGlob?: string;
1507
+ path_glob?: string;
1508
+ policyId?: string;
1509
+ policy_id?: string;
1510
+ resourceId?: string;
1511
+ resource_id?: string;
1512
+ resourceType?: string;
1513
+ resource_type?: string;
1514
+ note?: string;
1515
+ }
1516
+ interface PolicyCreateParams {
1517
+ name: string;
1518
+ mode?: EgressPolicyMode | string;
1519
+ defaultEffect?: EgressRuleEffect | string;
1520
+ default_effect?: EgressRuleEffect | string;
1521
+ resourceId?: string;
1522
+ resource_id?: string;
1523
+ resourceType?: string;
1524
+ resource_type?: string;
1525
+ description?: string;
1526
+ }
1527
+ interface PolicyUpdateParams {
1528
+ mode?: EgressPolicyMode | string;
1529
+ defaultEffect?: EgressRuleEffect | string;
1530
+ default_effect?: EgressRuleEffect | string;
1531
+ name?: string;
1532
+ description?: string;
1533
+ }
1534
+ interface ModeParams {
1535
+ policyId?: string;
1536
+ policy_id?: string;
1537
+ resourceId?: string;
1538
+ resource_id?: string;
1539
+ resourceType?: string;
1540
+ resource_type?: string;
1541
+ }
1542
+ interface SuggestionsParams {
1543
+ resourceId?: string;
1544
+ resource_id?: string;
1545
+ resourceType?: string;
1546
+ resource_type?: string;
1547
+ since?: string;
1548
+ }
1549
+ interface PolicyListParams {
1550
+ resourceId?: string;
1551
+ resource_id?: string;
1552
+ resourceType?: string;
1553
+ resource_type?: string;
1554
+ }
1555
+ interface RulesListParams {
1556
+ policyId?: string;
1557
+ policy_id?: string;
1558
+ resourceId?: string;
1559
+ resource_id?: string;
1560
+ resourceType?: string;
1561
+ resource_type?: string;
1562
+ }
1563
+ declare class EgressNetwork {
1564
+ protected readonly http: HttpClient;
1565
+ constructor(http: HttpClient);
1566
+ /** Add an `allow` rule for `host` to the allowlist. */
1567
+ allow(host: string, params?: AllowParams): Promise<EgressAllowlistRule>;
1568
+ /** Add a `deny` rule for `host` to the allowlist. */
1569
+ deny(host: string, params?: AllowParams): Promise<EgressAllowlistRule>;
1570
+ /** List allowlist rules. */
1571
+ rules(params?: RulesListParams): Promise<EgressAllowlistRule[]>;
1572
+ /** Delete an allowlist rule by id. */
1573
+ removeRule(ruleId: string): Promise<void>;
1574
+ /** List egress policies. */
1575
+ policies(params?: PolicyListParams): Promise<EgressPolicyData[]>;
1576
+ /** Create an egress policy. */
1577
+ createPolicy(params: PolicyCreateParams): Promise<EgressPolicyData>;
1578
+ /** Update an egress policy by id. */
1579
+ updatePolicy(policyId: string, params: PolicyUpdateParams): Promise<EgressPolicyData>;
1580
+ /** Set the policy to `mode="enforce"` — denied egress is blocked. */
1581
+ lockdown(params?: ModeParams): Promise<EgressPolicyData>;
1582
+ /** Set the policy to `mode="audit_only"` — log but do not block. */
1583
+ observe(params?: ModeParams): Promise<EgressPolicyData>;
1584
+ private setMode;
1585
+ /** AI-generated allowlist suggestions from recent denied egress. */
1586
+ suggestions(params?: SuggestionsParams): Promise<EgressSuggestion[]>;
1587
+ }
1588
+ /**
1589
+ * Sandbox-bound view of {@link EgressNetwork}. Pre-scopes
1590
+ * `resource_id` + `resource_type="sandbox"` on every call.
1591
+ */
1592
+ declare class SandboxNetwork {
1593
+ protected readonly resourceId: string;
1594
+ protected readonly resourceType: string;
1595
+ private readonly delegate;
1596
+ constructor(http: HttpClient, resourceId: string);
1597
+ private resolvedResourceId;
1598
+ private resolvedResourceType;
1599
+ allow(host: string, params?: AllowParams): Promise<EgressAllowlistRule>;
1600
+ deny(host: string, params?: AllowParams): Promise<EgressAllowlistRule>;
1601
+ rules(params?: RulesListParams): Promise<EgressAllowlistRule[]>;
1602
+ removeRule(ruleId: string): Promise<void>;
1603
+ lockdown(params?: {
1604
+ policyId?: string;
1605
+ }): Promise<EgressPolicyData>;
1606
+ observe(params?: {
1607
+ policyId?: string;
1608
+ }): Promise<EgressPolicyData>;
1609
+ suggestions(params?: {
1610
+ since?: string;
1611
+ }): Promise<EgressSuggestion[]>;
1612
+ policies(): Promise<EgressPolicyData[]>;
1613
+ }
1614
+ /** Computer-bound network — same surface, `resource_type="computer"`. */
1615
+ declare class ComputerNetwork extends SandboxNetwork {
1616
+ protected readonly resourceType: string;
1617
+ }
1618
+
1619
+ /**
1620
+ * Egress secrets — encrypted API key + OAuth credential vault.
1621
+ *
1622
+ * Backed by:
1623
+ * POST /api/v1/egress/secrets
1624
+ * GET /api/v1/egress/secrets
1625
+ * GET /api/v1/egress/secrets/:id
1626
+ * PATCH /api/v1/egress/secrets/:id (rotate)
1627
+ * DELETE /api/v1/egress/secrets/:id
1628
+ *
1629
+ * POST /api/v1/egress/bindings
1630
+ * GET /api/v1/egress/bindings
1631
+ * DELETE /api/v1/egress/bindings/:id
1632
+ *
1633
+ * GET /api/v1/egress/oauth/providers
1634
+ * POST /api/v1/egress/oauth/start
1635
+ * GET /api/v1/egress/oauth/status?state=...
1636
+ */
1637
+
1638
+ type EgressSecretType = "api_key" | "oauth_token" | "bearer" | "basic" | "generic";
1639
+ type EgressSecretScope = "user" | "workspace" | "tenant" | "external_user" | "external_workspace";
1640
+ interface EgressSecretData {
1641
+ id: string;
1642
+ name?: string;
1643
+ type?: EgressSecretType | string;
1644
+ scope?: EgressSecretScope | string;
1645
+ workspace_id?: string | null;
1646
+ owner_user_id?: string | null;
1647
+ external_user_id?: string | null;
1648
+ external_workspace_id?: string | null;
1649
+ resource_id?: string | null;
1650
+ resource_type?: string | null;
1651
+ masked_value?: string | null;
1652
+ expires_at?: string | null;
1653
+ metadata?: Record<string, unknown>;
1654
+ created_at?: string;
1655
+ updated_at?: string;
1656
+ [key: string]: unknown;
1657
+ }
1658
+ interface EgressBindingData {
1659
+ id: string;
1660
+ secret_id: string;
1661
+ resource_id: string;
1662
+ resource_type: string;
1663
+ expose_as_env: string;
1664
+ created_at?: string;
1665
+ [key: string]: unknown;
1666
+ }
1667
+ interface OauthProvider {
1668
+ name: string;
1669
+ display_name?: string;
1670
+ scopes?: string[];
1671
+ [key: string]: unknown;
1672
+ }
1673
+ interface SecretSetParams {
1674
+ name: string;
1675
+ value: string;
1676
+ type?: EgressSecretType | string;
1677
+ scope?: EgressSecretScope | string;
1678
+ exposeAsEnv?: string;
1679
+ expose_as_env?: string;
1680
+ workspaceId?: string;
1681
+ workspace_id?: string;
1682
+ ownerUserId?: string;
1683
+ owner_user_id?: string;
1684
+ externalUserId?: string;
1685
+ external_user_id?: string;
1686
+ externalWorkspaceId?: string;
1687
+ external_workspace_id?: string;
1688
+ resourceId?: string;
1689
+ resource_id?: string;
1690
+ resourceType?: string;
1691
+ resource_type?: string;
1692
+ refreshToken?: string;
1693
+ refresh_token?: string;
1694
+ expiresAt?: string;
1695
+ expires_at?: string;
1696
+ metadata?: Record<string, unknown>;
1697
+ }
1698
+ interface SecretListParams {
1699
+ scope?: string;
1700
+ type?: string;
1701
+ workspaceId?: string;
1702
+ workspace_id?: string;
1703
+ ownerUserId?: string;
1704
+ owner_user_id?: string;
1705
+ externalUserId?: string;
1706
+ external_user_id?: string;
1707
+ externalWorkspaceId?: string;
1708
+ external_workspace_id?: string;
1709
+ resourceId?: string;
1710
+ resource_id?: string;
1711
+ resourceType?: string;
1712
+ resource_type?: string;
1713
+ }
1714
+ interface SecretRotateParams {
1715
+ newValue?: string;
1716
+ new_value?: string;
1717
+ value?: string;
1718
+ refreshToken?: string;
1719
+ refresh_token?: string;
1720
+ expiresAt?: string;
1721
+ expires_at?: string;
1722
+ }
1723
+ interface BindingCreateParams {
1724
+ secretId?: string;
1725
+ secret_id?: string;
1726
+ resourceId?: string;
1727
+ resource_id?: string;
1728
+ resourceType?: string;
1729
+ resource_type?: string;
1730
+ exposeAsEnv?: string;
1731
+ expose_as_env?: string;
1732
+ }
1733
+ interface BindingListParams {
1734
+ resourceId?: string;
1735
+ resource_id?: string;
1736
+ resourceType?: string;
1737
+ resource_type?: string;
1738
+ secretId?: string;
1739
+ secret_id?: string;
1740
+ }
1741
+ interface OauthConnectParams {
1742
+ provider: string;
1743
+ exposeAsEnv?: string;
1744
+ expose_as_env?: string;
1745
+ scope?: string;
1746
+ ownerUserId?: string;
1747
+ owner_user_id?: string;
1748
+ externalUserId?: string;
1749
+ external_user_id?: string;
1750
+ externalWorkspaceId?: string;
1751
+ external_workspace_id?: string;
1752
+ resourceId?: string;
1753
+ resource_id?: string;
1754
+ resourceType?: string;
1755
+ resource_type?: string;
1756
+ redirectUri?: string;
1757
+ redirect_uri?: string;
1758
+ }
1759
+ interface OauthStartResult {
1760
+ authorize_url: string;
1761
+ authorizeUrl?: string;
1762
+ state: string;
1763
+ provider?: string;
1764
+ expires_at?: string;
1765
+ [key: string]: unknown;
1766
+ }
1767
+ interface OauthStatusResult {
1768
+ status: string;
1769
+ state?: string;
1770
+ secret_id?: string;
1771
+ error?: string;
1772
+ message?: string;
1773
+ [key: string]: unknown;
1774
+ }
1775
+ /**
1776
+ * A pending OAuth flow.
1777
+ *
1778
+ * The SDK does NOT auto-open a browser — the caller is responsible for
1779
+ * surfacing `authorizeUrl` to the end user. Once the user grants
1780
+ * consent, call `waitForCompletion()` to poll the upstream provider
1781
+ * status.
1782
+ */
1783
+ declare class OAuthFlow {
1784
+ readonly authorizeUrl: string;
1785
+ readonly state: string;
1786
+ readonly provider?: string;
1787
+ readonly data: OauthStartResult;
1788
+ private readonly http;
1789
+ constructor(http: HttpClient, payload: OauthStartResult, provider?: string);
1790
+ /**
1791
+ * Poll `GET /egress/oauth/status?state=...` until the flow completes.
1792
+ *
1793
+ * Returns the status payload once the upstream provider issues
1794
+ * tokens. Rejects with a `TimeoutError`-style Error if the flow does
1795
+ * not complete within `timeoutSec` seconds, or if the upstream
1796
+ * returns a failed status.
1797
+ */
1798
+ waitForCompletion(options?: {
1799
+ timeoutSec?: number;
1800
+ pollIntervalMs?: number;
1801
+ }): Promise<OauthStatusResult>;
1802
+ }
1803
+ declare class EgressSecrets {
1804
+ protected readonly http: HttpClient;
1805
+ constructor(http: HttpClient);
1806
+ /**
1807
+ * Create a secret. When `exposeAsEnv` is provided together with
1808
+ * `resourceId` the backend also creates a binding so the value is
1809
+ * injected as an env-var on that resource.
1810
+ */
1811
+ set(params: SecretSetParams): Promise<EgressSecretData>;
1812
+ /** List secrets. */
1813
+ list(params?: SecretListParams): Promise<EgressSecretData[]>;
1814
+ /** Get a single secret by id. */
1815
+ get(id: string): Promise<EgressSecretData>;
1816
+ /** Rotate the secret's value. */
1817
+ rotate(id: string, params: SecretRotateParams | string): Promise<EgressSecretData>;
1818
+ /** Delete a secret. */
1819
+ delete(id: string): Promise<void>;
1820
+ /** Bind a secret to a resource as an env var. */
1821
+ createBinding(params: BindingCreateParams): Promise<EgressBindingData>;
1822
+ /** List secret bindings. */
1823
+ listBindings(params?: BindingListParams): Promise<EgressBindingData[]>;
1824
+ /** Delete a binding. */
1825
+ deleteBinding(id: string): Promise<void>;
1826
+ /** List OAuth providers visible to the current tenant. */
1827
+ providers(): Promise<OauthProvider[]>;
1828
+ /**
1829
+ * Start an OAuth Connect flow.
1830
+ *
1831
+ * Returns an {@link OAuthFlow} — the caller must surface
1832
+ * `flow.authorizeUrl` to the end user (the SDK does NOT open the
1833
+ * browser) and then call `flow.waitForCompletion()` to receive the
1834
+ * resulting secret id.
1835
+ */
1836
+ connect(params: OauthConnectParams): Promise<OAuthFlow>;
1837
+ }
1838
+ /**
1839
+ * Sandbox-bound view of {@link EgressSecrets}. Pre-scopes
1840
+ * `resource_id` + `resource_type="sandbox"` on every call.
1841
+ */
1842
+ declare class SandboxSecrets {
1843
+ protected readonly resourceId: string;
1844
+ protected readonly resourceType: string;
1845
+ private readonly delegate;
1846
+ constructor(http: HttpClient, resourceId: string);
1847
+ private resolvedResourceId;
1848
+ private resolvedResourceType;
1849
+ set(params: SecretSetParams): Promise<EgressSecretData>;
1850
+ list(params?: SecretListParams): Promise<EgressSecretData[]>;
1851
+ get(id: string): Promise<EgressSecretData>;
1852
+ rotate(id: string, params: SecretRotateParams | string): Promise<EgressSecretData>;
1853
+ delete(id: string): Promise<void>;
1854
+ connect(params: OauthConnectParams): Promise<OAuthFlow>;
1855
+ listBindings(params?: BindingListParams): Promise<EgressBindingData[]>;
1856
+ }
1857
+ /** Computer-bound secrets — same shape, `resource_type="computer"`. */
1858
+ declare class ComputerSecrets extends SandboxSecrets {
1859
+ protected readonly resourceType: string;
1860
+ }
1861
+
1352
1862
  /** Options for `Exec.stream()`. */
1353
1863
  interface ExecStreamOptions {
1354
1864
  /** Command to execute. */
@@ -1650,6 +2160,12 @@ declare class Computer {
1650
2160
  readonly ports: ComputerPorts;
1651
2161
  /** Volume attachment — list, attach, detach. */
1652
2162
  readonly volumes: ComputerVolumes;
2163
+ /** Encrypted secrets + OAuth credentials scoped to this computer. */
2164
+ readonly secrets: ComputerSecrets;
2165
+ /** Egress allowlist + policies scoped to this computer. */
2166
+ readonly network: ComputerNetwork;
2167
+ /** Egress audit log + live tail scoped to this computer. */
2168
+ readonly audit: ComputerAudit;
1653
2169
  private readonly http;
1654
2170
  constructor(http: HttpClient, data: ComputerData);
1655
2171
  get id(): ComputerId;
@@ -1892,6 +2408,12 @@ interface CronJobCreateParams {
1892
2408
  name: string;
1893
2409
  schedule: string;
1894
2410
  idempotencyKey?: string;
2411
+ externalWorkspaceId?: string;
2412
+ external_workspace_id?: string;
2413
+ externalUserId?: string;
2414
+ external_user_id?: string;
2415
+ externalProjectId?: string;
2416
+ external_project_id?: string;
1895
2417
  [key: string]: unknown;
1896
2418
  }
1897
2419
  interface CronJobUpdateParams {
@@ -2075,7 +2597,7 @@ interface DeploymentData {
2075
2597
  * with `source_sandbox_id` on the version row. Will become nullable.
2076
2598
  */
2077
2599
  repo_url?: string;
2078
- repo_provider?: "github";
2600
+ repo_provider?: "github" | "gitlab" | "bitbucket";
2079
2601
  branch?: string;
2080
2602
  build_command?: string | null;
2081
2603
  run_command?: string | null;
@@ -2246,6 +2768,9 @@ interface DeploymentCreateParams extends ExternalAttribution {
2246
2768
  autoDeploy?: boolean;
2247
2769
  database?: DeploymentDatabaseRequest;
2248
2770
  metadata?: Record<string, unknown>;
2771
+ /** Pin build and runtime VMs to a specific DC. One of: "us-west", "us-east", "us-mia". */
2772
+ target_region?: string;
2773
+ targetRegion?: string;
2249
2774
  idempotencyKey?: string;
2250
2775
  }
2251
2776
  interface DeploymentUpdateParams {
@@ -2384,7 +2909,9 @@ declare class Deployments {
2384
2909
  rollback(deploymentId: string, params?: RollbackParams): Promise<DeploymentData>;
2385
2910
  listBuilds(deploymentId: string): Promise<DeploymentBuildData[]>;
2386
2911
  getBuild(deploymentId: string, buildId: string): Promise<DeploymentBuildData>;
2387
- listEnv(deploymentId: string): Promise<Record<string, unknown>[]>;
2912
+ listEnv(deploymentId: string, opts?: {
2913
+ environment?: string;
2914
+ }): Promise<Record<string, unknown>[]>;
2388
2915
  setEnv(deploymentId: string, vars: Record<string, string>, opts?: {
2389
2916
  environment?: string;
2390
2917
  }): Promise<Record<string, unknown>[]>;
@@ -2533,6 +3060,12 @@ interface CustomDomainCreateParams {
2533
3060
  redirect_policy?: "none" | "www_to_apex" | "apex_to_www";
2534
3061
  redirectPolicy?: "none" | "www_to_apex" | "apex_to_www";
2535
3062
  idempotencyKey?: string;
3063
+ externalWorkspaceId?: string;
3064
+ external_workspace_id?: string;
3065
+ externalUserId?: string;
3066
+ external_user_id?: string;
3067
+ externalProjectId?: string;
3068
+ external_project_id?: string;
2536
3069
  [key: string]: unknown;
2537
3070
  }
2538
3071
  declare class FlatCustomDomains {
@@ -2580,6 +3113,12 @@ interface FunctionCreateParams {
2580
3113
  timeoutSec?: number;
2581
3114
  env?: Record<string, string>;
2582
3115
  idempotencyKey?: string;
3116
+ externalWorkspaceId?: string;
3117
+ external_workspace_id?: string;
3118
+ externalUserId?: string;
3119
+ external_user_id?: string;
3120
+ externalProjectId?: string;
3121
+ external_project_id?: string;
2583
3122
  [key: string]: unknown;
2584
3123
  }
2585
3124
  interface FunctionUpdateParams {
@@ -2807,7 +3346,7 @@ type TunnelId = string & {
2807
3346
  type ClusterId = string & {
2808
3347
  readonly __brand: "ClusterId";
2809
3348
  };
2810
- type WorkspaceId = string & {
3349
+ type WorkspaceId$1 = string & {
2811
3350
  readonly __brand: "WorkspaceId";
2812
3351
  };
2813
3352
  type SecretId = string & {
@@ -3020,7 +3559,7 @@ interface AppInstallEvent {
3020
3559
  }
3021
3560
  type OcWorkspaceStatus = "creating" | "ready" | "running" | "stopped" | "error";
3022
3561
  interface OcWorkspaceData {
3023
- id: WorkspaceId;
3562
+ id: WorkspaceId$1;
3024
3563
  host_id: HostId;
3025
3564
  name: string;
3026
3565
  repo_url: string | null;
@@ -3045,7 +3584,7 @@ interface OcWorkspaceListResponse {
3045
3584
  }
3046
3585
  interface OcWorkspaceEvent {
3047
3586
  type: string;
3048
- workspace_id: WorkspaceId;
3587
+ workspace_id: WorkspaceId$1;
3049
3588
  data: unknown;
3050
3589
  timestamp: string;
3051
3590
  }
@@ -3521,28 +4060,28 @@ declare class OcWorkspaces {
3521
4060
  /**
3522
4061
  * Fetch a single workspace.
3523
4062
  */
3524
- get(hostId: HostId | string, workspaceId: WorkspaceId | string): Promise<OcWorkspaceData>;
4063
+ get(hostId: HostId | string, workspaceId: WorkspaceId$1 | string): Promise<OcWorkspaceData>;
3525
4064
  /**
3526
4065
  * Update workspace metadata (name, branch).
3527
4066
  */
3528
- update(hostId: HostId | string, workspaceId: WorkspaceId | string, params: OcWorkspaceUpdateParams): Promise<OcWorkspaceData>;
4067
+ update(hostId: HostId | string, workspaceId: WorkspaceId$1 | string, params: OcWorkspaceUpdateParams): Promise<OcWorkspaceData>;
3529
4068
  /**
3530
4069
  * Delete a workspace.
3531
4070
  */
3532
- delete(hostId: HostId | string, workspaceId: WorkspaceId | string): Promise<void>;
4071
+ delete(hostId: HostId | string, workspaceId: WorkspaceId$1 | string): Promise<void>;
3533
4072
  /**
3534
4073
  * Pull the latest changes from the remote repository.
3535
4074
  */
3536
- pull(hostId: HostId | string, workspaceId: WorkspaceId | string): Promise<OcWorkspaceData>;
4075
+ pull(hostId: HostId | string, workspaceId: WorkspaceId$1 | string): Promise<OcWorkspaceData>;
3537
4076
  /**
3538
4077
  * Open a terminal session scoped to the workspace root directory.
3539
4078
  * Returns a short-lived WebSocket ticket.
3540
4079
  */
3541
- openTerminal(hostId: HostId | string, workspaceId: WorkspaceId | string): Promise<WsTicket>;
4080
+ openTerminal(hostId: HostId | string, workspaceId: WorkspaceId$1 | string): Promise<WsTicket>;
3542
4081
  /**
3543
4082
  * Stream workspace setup / clone / install events.
3544
4083
  */
3545
- events(hostId: HostId | string, workspaceId: WorkspaceId | string): AsyncIterableIterator<OcWorkspaceEvent>;
4084
+ events(hostId: HostId | string, workspaceId: WorkspaceId$1 | string): AsyncIterableIterator<OcWorkspaceEvent>;
3546
4085
  }
3547
4086
 
3548
4087
  /**
@@ -3812,6 +4351,7 @@ interface SandboxCreateParams {
3812
4351
  tags?: string[];
3813
4352
  idempotencyKey?: string;
3814
4353
  idempotency_key?: string;
4354
+ slug?: string;
3815
4355
  externalWorkspaceId?: string;
3816
4356
  external_workspace_id?: string;
3817
4357
  externalUserId?: string;
@@ -3972,6 +4512,38 @@ interface SandboxFileEntry {
3972
4512
  modifiedAt?: string;
3973
4513
  [key: string]: unknown;
3974
4514
  }
4515
+ interface SandboxFileTreeNode {
4516
+ path: string;
4517
+ name: string;
4518
+ type: "file" | "dir";
4519
+ size?: number;
4520
+ modified_at?: string;
4521
+ children?: SandboxFileTreeNode[];
4522
+ }
4523
+ interface SandboxWriteManyEntry {
4524
+ path: string;
4525
+ content: string | Uint8Array;
4526
+ }
4527
+ interface SandboxWriteManyResult {
4528
+ written: Array<{
4529
+ path: string;
4530
+ size_bytes: number;
4531
+ }>;
4532
+ failed: Array<{
4533
+ path: string;
4534
+ error: string;
4535
+ }>;
4536
+ }
4537
+ interface SandboxFileChange {
4538
+ type: "created" | "modified" | "deleted";
4539
+ path: string;
4540
+ size_bytes?: number;
4541
+ }
4542
+ interface SandboxEnvVar {
4543
+ key: string;
4544
+ encrypted: boolean;
4545
+ value?: string;
4546
+ }
3975
4547
  interface SandboxFileList {
3976
4548
  path?: string;
3977
4549
  entries: SandboxFileEntry[];
@@ -4029,6 +4601,12 @@ declare class SandboxFiles {
4029
4601
  stat(path: string): Promise<SandboxFileStat>;
4030
4602
  upload(path: string, content: string | Uint8Array): Promise<void>;
4031
4603
  download(path: string): Promise<Uint8Array>;
4604
+ /** GET /api/v1/sandboxes/{id}/files/tree — recursive directory tree. */
4605
+ tree(path?: string, depth?: number): Promise<SandboxFileTreeNode>;
4606
+ /** POST /api/v1/sandboxes/{id}/files/write-many — write multiple files atomically. */
4607
+ writeMany(files: SandboxWriteManyEntry[]): Promise<SandboxWriteManyResult>;
4608
+ /** GET /api/v1/sandboxes/{id}/files/watch (SSE) — live file change events. */
4609
+ watch(): AsyncIterableIterator<SandboxFileChange>;
4032
4610
  }
4033
4611
  declare class SandboxPreview {
4034
4612
  private readonly sandbox;
@@ -4091,11 +4669,19 @@ declare class SandboxPreviews {
4091
4669
  declare class SandboxEnv {
4092
4670
  private readonly sandbox;
4093
4671
  constructor(sandbox: Sandbox);
4094
- /**
4095
- * Read-only listing of sandbox env vars.
4096
- * The backend has no per-name CRUD route; use Sandbox.create(env=...) to set values.
4097
- */
4098
- list(): Promise<Record<string, unknown>>;
4672
+ private get http();
4673
+ /** GET /api/v1/sandboxes/{id}/env → list of env vars. */
4674
+ get(): Promise<SandboxEnvVar[]>;
4675
+ /** @deprecated Use get() */
4676
+ list(): Promise<SandboxEnvVar[]>;
4677
+ /** PUT /api/v1/sandboxes/{id}/env — set (replace) env vars. */
4678
+ set(vars: Array<{
4679
+ key: string;
4680
+ value: string;
4681
+ encrypted?: boolean;
4682
+ }>): Promise<SandboxEnvVar[]>;
4683
+ /** DELETE /api/v1/sandboxes/{id}/env/{key} — remove a single env var. */
4684
+ delete(key: string): Promise<void>;
4099
4685
  }
4100
4686
  declare class SandboxTags {
4101
4687
  private readonly sandbox;
@@ -4123,6 +4709,12 @@ declare class Sandbox {
4123
4709
  readonly env: SandboxEnv;
4124
4710
  /** Tag replacement. */
4125
4711
  readonly tags: SandboxTags;
4712
+ /** Encrypted secrets + OAuth credentials scoped to this sandbox. */
4713
+ readonly secrets: SandboxSecrets;
4714
+ /** Egress allowlist + policies scoped to this sandbox. */
4715
+ readonly network: SandboxNetwork;
4716
+ /** Egress audit log + live tail scoped to this sandbox. */
4717
+ readonly audit: SandboxAudit;
4126
4718
  constructor(http: HttpClient, data: SandboxData);
4127
4719
  get id(): SandboxId;
4128
4720
  get state(): SandboxState;
@@ -4145,11 +4737,67 @@ declare class Sandbox {
4145
4737
  listSnapshots(): Promise<SandboxSnapshot[]>;
4146
4738
  restoreSnapshot(snapshotId: string): Promise<Sandbox>;
4147
4739
  deleteSnapshot(snapshotId: string): Promise<void>;
4740
+ /**
4741
+ * Fork (clone) this sandbox into a new sandbox via copy-on-write snapshot.
4742
+ * The original sandbox continues running unchanged.
4743
+ */
4744
+ fork(opts?: {
4745
+ name?: string;
4746
+ metadata?: Record<string, unknown>;
4747
+ }): Promise<Sandbox>;
4748
+ /**
4749
+ * PATCH /api/v1/sandboxes/{id} — update mutable sandbox fields.
4750
+ */
4751
+ update(params: {
4752
+ name?: string;
4753
+ slug?: string;
4754
+ tags?: string[];
4755
+ metadata?: Record<string, unknown>;
4756
+ always_on?: boolean;
4757
+ timeout_sec?: number;
4758
+ idle_timeout_sec?: number;
4759
+ }): Promise<Sandbox>;
4760
+ /**
4761
+ * POST /api/v1/sandboxes/{id}/preview-token → {token, url, expires_at, scope}
4762
+ */
4763
+ previewToken(expiresIn?: number, scope?: string): Promise<{
4764
+ token: string;
4765
+ url: string;
4766
+ expires_at: string;
4767
+ scope: string;
4768
+ [key: string]: unknown;
4769
+ }>;
4148
4770
  pause(): Promise<Sandbox>;
4149
4771
  resume(): Promise<Sandbox>;
4150
4772
  deploy(params?: SandboxDeployParams): Promise<Record<string, unknown>>;
4151
4773
  /** Check readiness of the sandbox (GET /sandboxes/:id/readiness). */
4152
4774
  readiness(): Promise<Record<string, unknown>>;
4775
+ /**
4776
+ * Block until the sandbox reports ready, or *timeout* seconds elapse.
4777
+ *
4778
+ * When `stream` is `true` (the default) this opens an SSE connection
4779
+ * to `GET /sandboxes/:id/readiness/stream` and waits for an
4780
+ * `event: ready` frame. The server emits `ready` immediately if the
4781
+ * sandbox is already ready, otherwise as soon as the readiness PubSub
4782
+ * message fires.
4783
+ *
4784
+ * Returns `true` once the sandbox is ready, `false` on `event: timeout`
4785
+ * or when the local timeout elapses before ready.
4786
+ *
4787
+ * If the SSE endpoint returns 404 (server pre-dates the streaming
4788
+ * endpoint) this transparently falls back to polling
4789
+ * {@link readiness} every 10 ms until ready or timeout.
4790
+ */
4791
+ waitUntilReady(options?: {
4792
+ timeout?: number;
4793
+ stream?: boolean;
4794
+ }): Promise<boolean>;
4795
+ /**
4796
+ * Returns `true` / `false` for terminal SSE events, or `null` if the
4797
+ * stream endpoint is unavailable (404 or transport error) so callers
4798
+ * can fall back to polling.
4799
+ */
4800
+ private tryReadinessStream;
4153
4801
  destroy(): Promise<void>;
4154
4802
  delete(): Promise<void>;
4155
4803
  private assertRunning;
@@ -4334,6 +4982,12 @@ interface BucketCreateParams {
4334
4982
  visibility?: "private" | "public";
4335
4983
  quota_bytes?: number;
4336
4984
  public?: boolean;
4985
+ externalWorkspaceId?: string;
4986
+ external_workspace_id?: string;
4987
+ externalUserId?: string;
4988
+ external_user_id?: string;
4989
+ externalProjectId?: string;
4990
+ external_project_id?: string;
4337
4991
  [key: string]: unknown;
4338
4992
  }
4339
4993
  interface ObjectListParams {
@@ -4377,7 +5031,134 @@ declare class Storage {
4377
5031
  }
4378
5032
 
4379
5033
  /**
4380
- * Tenantcurrent tenant info and plan/usage.
5034
+ * Org Invites email invite flow for org (tenant) membership.
5035
+ *
5036
+ * Public endpoints (no auth):
5037
+ * GET /invites/:token
5038
+ *
5039
+ * Authenticated endpoints (admin/owner role required for create/list/revoke):
5040
+ * POST /tenants/:id/invites
5041
+ * GET /tenants/:id/invites
5042
+ * DELETE /tenants/:id/invites/:invite_id
5043
+ * POST /invites/:token/accept
5044
+ */
5045
+
5046
+ type OrgRole = "owner" | "admin" | "member";
5047
+ interface OrgInvite {
5048
+ id: string;
5049
+ tenant_id: string;
5050
+ email: string;
5051
+ role: OrgRole;
5052
+ invited_by: string | null;
5053
+ expires_at: string;
5054
+ accepted_at: string | null;
5055
+ created_at: string;
5056
+ }
5057
+ interface OrgInviteCreated {
5058
+ invite_id: string;
5059
+ email: string;
5060
+ role: OrgRole;
5061
+ expires_at: string;
5062
+ /**
5063
+ * Full URL for the invite landing page. On white-label tenants this uses
5064
+ * the tenant's custom domain.
5065
+ */
5066
+ invite_url: string;
5067
+ }
5068
+ interface OrgInvitePreview {
5069
+ email: string;
5070
+ tenant_name: string;
5071
+ role: OrgRole;
5072
+ expires_at: string;
5073
+ expired: boolean;
5074
+ accepted: boolean;
5075
+ }
5076
+ interface TenantSummary {
5077
+ id: string;
5078
+ name: string;
5079
+ slug: string;
5080
+ owner_user_id: string | null;
5081
+ plan_id: string | null;
5082
+ plan_name: string | null;
5083
+ settings: Record<string, unknown>;
5084
+ inserted_at: string;
5085
+ updated_at: string;
5086
+ }
5087
+ interface CreateOrgInviteParams {
5088
+ email: string;
5089
+ role?: OrgRole;
5090
+ }
5091
+ interface OrgInviteCreatedResponse {
5092
+ data: OrgInviteCreated;
5093
+ }
5094
+ interface OrgInviteListResponse {
5095
+ data: OrgInvite[];
5096
+ total: number;
5097
+ }
5098
+ interface OrgInviteRevokeResponse {
5099
+ invite_id: string;
5100
+ revoked: boolean;
5101
+ }
5102
+ interface AcceptOrgInviteResponse {
5103
+ accepted: boolean;
5104
+ tenant_id: string;
5105
+ tenant: TenantSummary | null;
5106
+ }
5107
+ declare class OrgInvites {
5108
+ private readonly http;
5109
+ constructor(http: HttpClient);
5110
+ /**
5111
+ * Create an org invite and dispatch the invite email.
5112
+ *
5113
+ * The invite URL in the response is host-aware: on white-label tenants it
5114
+ * uses the custom domain so the recipient lands on the branded experience.
5115
+ * Requires `admin` or `owner` role in the tenant.
5116
+ *
5117
+ * `POST /tenants/:id/invites`
5118
+ */
5119
+ create(tenantId: string, params: CreateOrgInviteParams): Promise<OrgInviteCreated>;
5120
+ /**
5121
+ * List all pending (non-expired, non-accepted, non-revoked) org invites.
5122
+ *
5123
+ * Requires `admin` or `owner` role.
5124
+ *
5125
+ * `GET /tenants/:id/invites`
5126
+ */
5127
+ list(tenantId: string): Promise<OrgInvite[]>;
5128
+ /**
5129
+ * Revoke a pending org invite.
5130
+ *
5131
+ * Returns `409` when the invite was already legitimately accepted.
5132
+ * Requires `admin` or `owner` role.
5133
+ *
5134
+ * `DELETE /tenants/:id/invites/:invite_id`
5135
+ */
5136
+ revoke(tenantId: string, inviteId: string): Promise<OrgInviteRevokeResponse>;
5137
+ /**
5138
+ * Preview an org invite by token (no auth required).
5139
+ *
5140
+ * Returns `null` when the token is unknown or has been revoked.
5141
+ *
5142
+ * `GET /invites/:token`
5143
+ */
5144
+ preview(token: string): Promise<OrgInvitePreview | null>;
5145
+ /**
5146
+ * Accept an org invite on behalf of the authenticated user.
5147
+ *
5148
+ * The caller's JWT email must match the invite email (case-insensitive).
5149
+ * On success inserts a `tenant_members` row.
5150
+ *
5151
+ * Error responses:
5152
+ * - `400` — invalid or expired token.
5153
+ * - `422 EMAIL_MISMATCH` — JWT email does not match the invite email.
5154
+ *
5155
+ * `POST /invites/:token/accept`
5156
+ */
5157
+ accept(token: string): Promise<AcceptOrgInviteResponse>;
5158
+ }
5159
+
5160
+ /**
5161
+ * Tenant — current tenant info, preview domain, and branding.
4381
5162
  */
4382
5163
 
4383
5164
  interface TenantPlan {
@@ -4387,8 +5168,53 @@ interface TenantPlan {
4387
5168
  usage?: Record<string, unknown>;
4388
5169
  [key: string]: unknown;
4389
5170
  }
5171
+ interface PreviewDomainData {
5172
+ domain: string;
5173
+ verified_at?: string | null;
5174
+ cname_target?: string;
5175
+ [key: string]: unknown;
5176
+ }
5177
+ interface PreviewDomainVerifyResult {
5178
+ verified: boolean;
5179
+ target?: string;
5180
+ records?: unknown[];
5181
+ [key: string]: unknown;
5182
+ }
5183
+ interface BrandingData {
5184
+ product_name?: string;
5185
+ logo_url?: string;
5186
+ support_url?: string;
5187
+ support_email?: string;
5188
+ primary_color?: string;
5189
+ background_color?: string;
5190
+ [key: string]: unknown;
5191
+ }
5192
+ declare class PreviewDomain {
5193
+ private readonly http;
5194
+ constructor(http: HttpClient);
5195
+ /** GET /api/v1/tenant/preview-domain → {domain, verified_at, cname_target} */
5196
+ get(): Promise<PreviewDomainData>;
5197
+ /** PUT /api/v1/tenant/preview-domain — set the preview domain. */
5198
+ set(domain: string): Promise<PreviewDomainData>;
5199
+ /** POST /api/v1/tenant/preview-domain/verify → {verified, target, records} */
5200
+ verify(): Promise<PreviewDomainVerifyResult>;
5201
+ /** DELETE /api/v1/tenant/preview-domain */
5202
+ delete(): Promise<void>;
5203
+ }
5204
+ declare class Branding {
5205
+ private readonly http;
5206
+ constructor(http: HttpClient);
5207
+ /** GET /api/v1/tenant/branding */
5208
+ get(): Promise<BrandingData>;
5209
+ /** PUT /api/v1/tenant/branding — keys: product_name, logo_url, support_url, support_email, primary_color, background_color */
5210
+ set(branding: BrandingData): Promise<BrandingData>;
5211
+ /** DELETE /api/v1/tenant/branding */
5212
+ delete(): Promise<void>;
5213
+ }
4390
5214
  declare class Tenant {
4391
5215
  private readonly http;
5216
+ readonly preview_domain: PreviewDomain;
5217
+ readonly branding: Branding;
4392
5218
  constructor(http: HttpClient);
4393
5219
  /** Get the current tenant's plan, limits, and live usage counters. */
4394
5220
  current(): Promise<TenantPlan>;
@@ -4464,6 +5290,12 @@ interface VolumeCreateParams {
4464
5290
  sizeGb?: number;
4465
5291
  region?: string;
4466
5292
  idempotencyKey?: string;
5293
+ externalWorkspaceId?: string;
5294
+ external_workspace_id?: string;
5295
+ externalUserId?: string;
5296
+ external_user_id?: string;
5297
+ externalProjectId?: string;
5298
+ external_project_id?: string;
4467
5299
  [key: string]: unknown;
4468
5300
  }
4469
5301
  declare class Volumes {
@@ -4541,6 +5373,345 @@ declare class Webhooks {
4541
5373
  idempotencyKey?: string;
4542
5374
  }): Promise<Record<string, unknown>>;
4543
5375
  deliveries(webhookId: string): Promise<WebhookDeliveryData[]>;
5376
+ /**
5377
+ * Verify an incoming ``X-Miosa-Signature`` header.
5378
+ *
5379
+ * Header format: ``t=<unix_ts>,v1=<hex_hmac>``
5380
+ * HMAC body: ``<t>.<raw_payload>``
5381
+ *
5382
+ * Throws if timestamp is older than 5 minutes.
5383
+ * Returns true if signature matches.
5384
+ */
5385
+ static verifySignature(payload: string | Uint8Array, signatureHeader: string, secret: string): boolean;
5386
+ }
5387
+
5388
+ /**
5389
+ * Workspace Members — per-workspace user roster.
5390
+ *
5391
+ * Endpoints:
5392
+ * GET /workspaces/:id/members
5393
+ * POST /workspaces/:id/members
5394
+ * PATCH /workspaces/:id/members/:user_id
5395
+ * DELETE /workspaces/:id/members/:user_id
5396
+ */
5397
+
5398
+ /** Role a user can hold within a workspace. */
5399
+ type WorkspaceRole = "owner" | "admin" | "member" | "viewer";
5400
+ /**
5401
+ * Workspace member as returned by `list` — includes denormalised user fields
5402
+ * for display.
5403
+ */
5404
+ interface WorkspaceMember {
5405
+ user_id: string;
5406
+ email: string | null;
5407
+ name: string | null;
5408
+ avatar_url: string | null;
5409
+ role: WorkspaceRole;
5410
+ joined_at: string | null;
5411
+ added_by: string | null;
5412
+ }
5413
+ /** Raw workspace_members row returned after add/update operations. */
5414
+ interface WorkspaceMemberRecord {
5415
+ user_id: string;
5416
+ workspace_id: string;
5417
+ role: WorkspaceRole;
5418
+ joined_at: string | null;
5419
+ added_by: string | null;
5420
+ }
5421
+ interface AddWorkspaceMemberParams {
5422
+ /** UUID of the tenant user to add. Must already be an org member. */
5423
+ user_id: string;
5424
+ /** Role to assign; defaults to `"member"`. */
5425
+ role?: WorkspaceRole;
5426
+ }
5427
+ interface UpdateWorkspaceMemberRoleParams {
5428
+ role: WorkspaceRole;
5429
+ }
5430
+ interface WorkspaceMemberListResponse {
5431
+ data: WorkspaceMember[];
5432
+ }
5433
+ interface WorkspaceMemberRecordResponse {
5434
+ data: WorkspaceMemberRecord;
5435
+ }
5436
+ interface WorkspaceMemberDeleteResponse {
5437
+ deleted: boolean;
5438
+ }
5439
+ declare class WorkspaceMembers {
5440
+ private readonly http;
5441
+ constructor(http: HttpClient);
5442
+ /**
5443
+ * List all members of a workspace.
5444
+ *
5445
+ * `GET /workspaces/:id/members`
5446
+ */
5447
+ list(workspaceId: string): Promise<WorkspaceMember[]>;
5448
+ /**
5449
+ * Add an existing tenant user to a workspace.
5450
+ *
5451
+ * The `user_id` must already hold a `tenant_members` row for the parent org.
5452
+ * Use {@link WorkspaceInvites.create} to invite someone who is not yet an org
5453
+ * member.
5454
+ *
5455
+ * `POST /workspaces/:id/members`
5456
+ *
5457
+ * @throws `MiosaError` with code `NOT_TENANT_MEMBER` if the user is not an
5458
+ * org member.
5459
+ */
5460
+ add(workspaceId: string, params: AddWorkspaceMemberParams): Promise<WorkspaceMemberRecord>;
5461
+ /**
5462
+ * Change a workspace member's role.
5463
+ *
5464
+ * `PATCH /workspaces/:id/members/:user_id`
5465
+ */
5466
+ updateRole(workspaceId: string, userId: string, params: UpdateWorkspaceMemberRoleParams): Promise<WorkspaceMemberRecord>;
5467
+ /**
5468
+ * Remove a user from a workspace.
5469
+ *
5470
+ * The last `owner` of a workspace cannot be removed. Promote another member
5471
+ * to `owner` first using {@link updateRole}.
5472
+ *
5473
+ * `DELETE /workspaces/:id/members/:user_id`
5474
+ *
5475
+ * @throws `MiosaError` with code `LAST_OWNER` if the target is the sole owner.
5476
+ */
5477
+ remove(workspaceId: string, userId: string): Promise<WorkspaceMemberDeleteResponse>;
5478
+ }
5479
+
5480
+ /**
5481
+ * Workspace Invites — email invite flow for workspace access.
5482
+ *
5483
+ * Sending an invite to an email that already belongs to a tenant member
5484
+ * short-circuits to directly adding that user (returns `type: "added"`).
5485
+ * Accepting a workspace invite for an unknown email auto-creates both a
5486
+ * `tenant_members` and a `workspace_members` row atomically.
5487
+ *
5488
+ * Public endpoints (no auth):
5489
+ * GET /workspace-invites/:token
5490
+ *
5491
+ * Authenticated endpoints:
5492
+ * POST /workspaces/:id/invites
5493
+ * GET /workspaces/:id/invites
5494
+ * DELETE /workspaces/:id/invites/:invite_id
5495
+ * POST /workspace-invites/:token/accept
5496
+ */
5497
+
5498
+ interface WorkspaceInvite {
5499
+ id: string;
5500
+ workspace_id: string;
5501
+ tenant_id: string;
5502
+ email: string;
5503
+ role: WorkspaceRole;
5504
+ invited_by: string | null;
5505
+ expires_at: string;
5506
+ accepted_at: string | null;
5507
+ inserted_at: string;
5508
+ }
5509
+ interface WorkspaceInvitePreview {
5510
+ workspace_name: string;
5511
+ tenant_name: string;
5512
+ role: WorkspaceRole;
5513
+ email: string;
5514
+ expires_at: string;
5515
+ expired: boolean;
5516
+ revoked: boolean;
5517
+ accepted: boolean;
5518
+ }
5519
+ interface CreateWorkspaceInviteParams {
5520
+ email: string;
5521
+ role?: WorkspaceRole;
5522
+ }
5523
+ /** Returned when the email was unknown — an invite was created. */
5524
+ interface WorkspaceInviteCreatedResponse {
5525
+ data: WorkspaceInvite;
5526
+ type: "invited";
5527
+ }
5528
+ /** Returned when the email already had a tenant_members row — added directly. */
5529
+ interface WorkspaceMemberAddedResponse {
5530
+ data: WorkspaceMemberRecord;
5531
+ type: "added";
5532
+ }
5533
+ type CreateWorkspaceInviteResponse = WorkspaceInviteCreatedResponse | WorkspaceMemberAddedResponse;
5534
+ interface WorkspaceInviteListResponse {
5535
+ data: WorkspaceInvite[];
5536
+ total: number;
5537
+ }
5538
+ interface WorkspaceInviteRevokeResponse {
5539
+ invite_id: string;
5540
+ revoked: boolean;
5541
+ }
5542
+ interface AcceptWorkspaceInviteResponse {
5543
+ accepted: boolean;
5544
+ workspace_id: string;
5545
+ tenant_id: string;
5546
+ role: WorkspaceRole;
5547
+ }
5548
+ declare class WorkspaceInvites {
5549
+ private readonly http;
5550
+ constructor(http: HttpClient);
5551
+ /**
5552
+ * Create a workspace invite or add a member directly.
5553
+ *
5554
+ * If `email` already maps to a tenant member the user is added directly and
5555
+ * `type === "added"` is returned with a `WorkspaceMemberRecord`. Otherwise
5556
+ * an invite row is created and `type === "invited"` is returned.
5557
+ *
5558
+ * `POST /workspaces/:id/invites`
5559
+ */
5560
+ create(workspaceId: string, params: CreateWorkspaceInviteParams): Promise<CreateWorkspaceInviteResponse>;
5561
+ /**
5562
+ * List all pending (non-expired, non-accepted, non-revoked) workspace invites.
5563
+ *
5564
+ * `GET /workspaces/:id/invites`
5565
+ */
5566
+ list(workspaceId: string): Promise<WorkspaceInvite[]>;
5567
+ /**
5568
+ * Revoke a pending workspace invite.
5569
+ *
5570
+ * Already-revoked invites are idempotent (returns `revoked: true`). An invite
5571
+ * that was legitimately accepted throws `409 ALREADY_ACCEPTED`.
5572
+ *
5573
+ * `DELETE /workspaces/:id/invites/:invite_id`
5574
+ */
5575
+ revoke(workspaceId: string, inviteId: string): Promise<WorkspaceInviteRevokeResponse>;
5576
+ /**
5577
+ * Preview a workspace invite by token (no auth required).
5578
+ *
5579
+ * Use this to render the invite landing page before prompting the user to
5580
+ * log in or sign up. Returns `null` when the token is unknown or revoked.
5581
+ *
5582
+ * `GET /workspace-invites/:token`
5583
+ */
5584
+ preview(token: string): Promise<WorkspaceInvitePreview | null>;
5585
+ /**
5586
+ * Accept a workspace invite on behalf of the authenticated user.
5587
+ *
5588
+ * The caller's JWT email must match the invite email (case-insensitive).
5589
+ *
5590
+ * Error codes:
5591
+ * - `INVALID_TOKEN` (404) — token not found.
5592
+ * - `EXPIRED` (410) — invite TTL elapsed.
5593
+ * - `REVOKED` (409) — invite was revoked.
5594
+ * - `ALREADY_ACCEPTED` (409) — already used.
5595
+ * - `EMAIL_MISMATCH` (422) — JWT email differs from invite email.
5596
+ *
5597
+ * `POST /workspace-invites/:token/accept`
5598
+ */
5599
+ accept(token: string): Promise<AcceptWorkspaceInviteResponse>;
5600
+ }
5601
+
5602
+ /**
5603
+ * Workspaces resource — top-level tenant workspaces grouping computers.
5604
+ *
5605
+ * A workspace is a logical bucket of computers (handy for teams / projects).
5606
+ * Accessed via `miosa.workspaces` on the top-level client.
5607
+ *
5608
+ * @example
5609
+ * ```ts
5610
+ * const ws = await miosa.workspaces.create({ name: "prod" });
5611
+ * const computers = await miosa.workspaces.listComputers(ws.id);
5612
+ * ```
5613
+ */
5614
+
5615
+ type WorkspaceId = string & {
5616
+ readonly __brand: "WorkspaceId";
5617
+ };
5618
+ interface WorkspaceData {
5619
+ id: WorkspaceId;
5620
+ tenant_id: string;
5621
+ name: string;
5622
+ slug?: string | null;
5623
+ description?: string | null;
5624
+ metadata?: Record<string, unknown> | null;
5625
+ settings?: Record<string, unknown> | null;
5626
+ created_at?: string;
5627
+ updated_at?: string;
5628
+ [key: string]: unknown;
5629
+ }
5630
+ interface WorkspaceCreateParams {
5631
+ name: string;
5632
+ slug?: string;
5633
+ description?: string;
5634
+ metadata?: Record<string, unknown>;
5635
+ }
5636
+ interface WorkspaceUpdateParams {
5637
+ name?: string;
5638
+ description?: string;
5639
+ metadata?: Record<string, unknown>;
5640
+ }
5641
+ interface WorkspaceComputerTemplateCreateParams {
5642
+ name: string;
5643
+ templateType?: string;
5644
+ template_type?: string;
5645
+ description?: string;
5646
+ [key: string]: unknown;
5647
+ }
5648
+ declare class Workspaces {
5649
+ private readonly http;
5650
+ constructor(http: HttpClient);
5651
+ /**
5652
+ * Create a new workspace.
5653
+ */
5654
+ create(params: WorkspaceCreateParams): Promise<WorkspaceData>;
5655
+ /**
5656
+ * List all workspaces visible to the current credential.
5657
+ */
5658
+ list(): Promise<WorkspaceData[]>;
5659
+ /**
5660
+ * Get a single workspace by ID.
5661
+ */
5662
+ get(id: WorkspaceId | string): Promise<WorkspaceData>;
5663
+ /**
5664
+ * Update a workspace's metadata.
5665
+ */
5666
+ update(id: WorkspaceId | string, params: WorkspaceUpdateParams): Promise<WorkspaceData>;
5667
+ /**
5668
+ * Delete a workspace. Does not delete member computers.
5669
+ */
5670
+ delete(id: WorkspaceId | string): Promise<void>;
5671
+ /**
5672
+ * Update workspace-level settings.
5673
+ */
5674
+ updateSettings(id: WorkspaceId | string, settings: Record<string, unknown>): Promise<WorkspaceData>;
5675
+ /**
5676
+ * List all computers that belong to the given workspace.
5677
+ */
5678
+ listComputers(id: WorkspaceId | string): Promise<Computer[]>;
5679
+ /**
5680
+ * List all sandboxes that belong to this workspace.
5681
+ */
5682
+ listSandboxes(id: WorkspaceId | string): Promise<Record<string, unknown>[]>;
5683
+ /**
5684
+ * List all deployments that belong to this workspace.
5685
+ */
5686
+ listDeployments(id: WorkspaceId | string): Promise<Record<string, unknown>[]>;
5687
+ /**
5688
+ * List all managed databases that belong to this workspace.
5689
+ */
5690
+ listDatabases(id: WorkspaceId | string): Promise<Record<string, unknown>[]>;
5691
+ /**
5692
+ * List all projects that belong to this workspace.
5693
+ */
5694
+ listProjects(id: WorkspaceId | string): Promise<Record<string, unknown>[]>;
5695
+ /**
5696
+ * Return aggregate resource stats for this workspace.
5697
+ */
5698
+ stats(id: WorkspaceId | string): Promise<Record<string, unknown>>;
5699
+ /**
5700
+ * Return metered usage data for this workspace.
5701
+ */
5702
+ usage(id: WorkspaceId | string): Promise<Record<string, unknown>>;
5703
+ /**
5704
+ * Return activity feed for this workspace.
5705
+ */
5706
+ activity(id: WorkspaceId | string): Promise<Record<string, unknown>[]>;
5707
+ /**
5708
+ * List computer templates available in this workspace.
5709
+ */
5710
+ listComputerTemplates(id: WorkspaceId | string): Promise<Record<string, unknown>[]>;
5711
+ /**
5712
+ * Create a computer template scoped to this workspace.
5713
+ */
5714
+ createComputerTemplate(id: WorkspaceId | string, params: WorkspaceComputerTemplateCreateParams): Promise<Record<string, unknown>>;
4544
5715
  }
4545
5716
 
4546
5717
  /**
@@ -4557,6 +5728,20 @@ declare class Webhooks {
4557
5728
  * ```
4558
5729
  */
4559
5730
  declare class Miosa {
5731
+ /** Workspace CRUD — create, list, get, update, delete, and sub-resource queries. */
5732
+ readonly workspaces: Workspaces;
5733
+ /** Per-workspace user roster — list, add, update role, remove. */
5734
+ readonly workspaceMembers: WorkspaceMembers;
5735
+ /**
5736
+ * Workspace invite flow — create invite, list, revoke, preview, accept.
5737
+ * Sending to an email already in the org adds the user directly.
5738
+ */
5739
+ readonly workspaceInvites: WorkspaceInvites;
5740
+ /**
5741
+ * Org invite flow — create invite, list, revoke, preview, accept.
5742
+ * Requires admin/owner role for write operations.
5743
+ */
5744
+ readonly orgInvites: OrgInvites;
4560
5745
  /** Current tenant plan, limits, and live usage counters. */
4561
5746
  readonly tenant: Tenant;
4562
5747
  /** Datacenter regions, compute sizes, pricing, community templates. */
@@ -4641,6 +5826,12 @@ declare class Miosa {
4641
5826
  readonly builderSessions: BuilderSessions;
4642
5827
  /** Admin: fleet-wide snapshot index. */
4643
5828
  readonly snapshotsStandalone: SnapshotsStandalone;
5829
+ /** Encrypted secret + OAuth credential vault (`/egress/secrets`). */
5830
+ readonly secrets: EgressSecrets;
5831
+ /** Egress allowlist + policies — host-level firewall (`/egress/policies`). */
5832
+ readonly network: EgressNetwork;
5833
+ /** Egress audit log — every outbound request, paginated query + tail. */
5834
+ readonly audit: EgressAudit;
4644
5835
  private readonly http;
4645
5836
  constructor(config: MiosaClientConfig);
4646
5837
  }
@@ -4686,4 +5877,4 @@ declare class NetworkError extends MiosaError {
4686
5877
  constructor(message: string, cause: Error);
4687
5878
  }
4688
5879
 
4689
- export { type AddDomainParams, Admin, type AgentDispatchParams, type AgentEvent$1 as AgentEvent, type AgentEventType, type AgentSessionCreateParams, type AgentSessionData, type AgentSessionListResponse$1 as AgentSessionListResponse, type AgentSessionStatus$1 as AgentSessionStatus, Analytics, type AnalyticsFilters, type ApiKeyCreateParams, type ApiKeyCreateResult, type ApiKeyData, type ApiKeyId, type ApiKeyListParams, ApiKeys, type AppCatalogEntry, type AppInstallData, type AppInstallEvent, AuditLog, type AuditLogEvent, type AuditLogListParams, AuthError, type BenchmarkCompareParams, type BenchmarkCreateParams, Benchmarks, type BrandingUpdateParams, type BucketCreateParams, type BucketData, type BucketId, type BuilderSessionListParams, BuilderSessions, type BulkUserActionParams, type ChannelCreateParams, type ChannelData, type ChannelListParams, type ChannelUpdateParams, Channels, type ChatCompletionCreateParams, type ChatCompletionCreateStreamParams, Checkpoints, type ClickParams, type ClusterCreateParams, type ClusterData, type ClusterEvent, type ClusterId, type ClusterListResponse, type ClusterStatus, CommandCenter, Community, type CompletionCreateParams, type CompletionCreateStreamParams, Completions, Computer, ComputerAutoStop, type ComputerCreateParams, type ComputerData, ComputerEnv, type ComputerId, ComputerInbox, type ComputerListParams, type ComputerListResponse, ComputerLogs, type ComputerLogsGetParams, ComputerOsa, ComputerPorts, type ComputerSize, type ComputerStatus, type ComputerTemplateType, ComputerTerminal, type ComputerUpdateParams, type ComputerVisibility, ComputerVolumes, Computers, type CopyParams, type CreateAdminApiKeyParams, type CreditBalance, type CreditTransaction, type CreditTransactionListResponse, type CreditUsage, Credits, type CronJobCreateParams, type CronJobData, type CronJobExecutionData, type CronJobExecutionId, type CronJobId, type CronJobListParams, type CronJobUpdateParams, CronJobs, type CursorInfo, type CustomDomainCreateParams, type CustomDomainData, type CustomDomainId, type CustomDomainListParams, Dashboard, type DashboardSummary, type DatabaseCreateParams, type DatabaseCredentials, type DatabaseData, type DatabaseId, type DatabaseListParams, type DatabaseLogsParams, type DatabaseLogsResult, Databases, type DeploymentBuildData, type DeploymentCreateParams, type DeploymentData, DeploymentDomains, type DeploymentId, type DeploymentListParams, type DeploymentReleaseData, type DeploymentReleaseId, DeploymentReleases, DeploymentRuntimeInstances, type DeploymentServiceData, type DeploymentServiceId, type DeploymentServiceType, type DeploymentSourceType, type DeploymentState, type DeploymentUpdateParams, type DeploymentVersionData, type DeploymentVersionId, type DeploymentVersionKind, type DeploymentVersionState, DeploymentVersions, Deployments, Desktop$1 as Desktop, type DesktopActionResult, type DirEntry, type DirListResult, type DiscordSendTestParams, type DoubleClickParams, type DragParams, Email, EmailCampaigns, EmailInbox, EmailTemplates, type EmbeddingCreateParams, Embeddings, Exec, type ExecParams, type ExecPythonParams, type ExecResult, type ExternalAttribution, type ExternalKeyCreateParams, type ExternalKeyData, ExternalKeys, type FileDeleteParams, type FileDownloadParams, type FileEntry, type FileExportParams, type FileExportResult, type FileListParams, type FileListResult, type FileStat, Files, FlatCustomDomains, type FsEntry, type FsListResponse, type FsStat, type FunctionCreateParams, type FunctionData, type FunctionId, type FunctionInvokeParams, type FunctionListParams, type FunctionUpdateParams, Functions, type GithubRepo, type GithubSshKey, type HealthCheckCreateParams, type HealthCheckData, type HealthCheckId, type HealthCheckListParams, type HealthCheckUpdateParams, HealthChecks, type HostCreateParams, type HostData, type HostEvent, type HostId, type HostListResponse, type HostStatus, type HostUpdateParams, InsufficientCreditsError, type IntegrationCatalogEntry, type IntegrationData, Integrations, type JobData, type JobEvent, type JobEventType, type JobId, type JobListResponse, type JobRunParams, type JobStatus, type KeyParams, type LaunchParams, type LinearCreateIssueParams, type ListAdminApiKeysParams, type ListAdminComputersParams, type ListAdminTenantsParams, type ListAdminUsersParams, Mcp, type McpDispatchParams, Miosa, type MiosaClientConfig, MiosaError, type MkdirParams, Models, type MouseButton, NetworkError, NetworkPolicy, type NetworkPolicyData, type NetworkPolicyEffect, type NetworkPolicyProtocol, type NetworkPolicyRule, type NetworkPolicySetParams, NotFoundError, type NotificationPrefsUpdateParams, type ObjectListParams, type AgentEvent as OcAgentEvent, type OcAgentSessionData, type AgentSessionListResponse as OcAgentSessionListResponse, type OcWorkspaceCreateParams, type OcWorkspaceData, type OcWorkspaceEvent, type OcWorkspaceListResponse, type OcWorkspaceStatus, type OcWorkspaceUpdateParams, OpenComputers, type OverviewData, type PresignParams, type PresignResult, ProjectAuth, type ProjectAuthEnableParams, type ProjectAuthStatus, type ProjectAuthUpdateParams, type ProjectIntegrationCatalogEntry, type ProjectIntegrationCreateParams, type ProjectIntegrationData, type ProjectIntegrationListParams, type ProjectIntegrationUpdateParams, ProjectIntegrations, ProviderDefaults, type ProviderKeyUpsertParams, type PublishFromSandboxParams, type PublishParams, type PublishResult, RateLimitError, type RegionData, Regions, type RollbackParams, type RuntimeInstanceData, type RuntimeInstanceId, type RuntimeInstanceState, type RuntimeLogsResult, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, type SandboxBuildSpec, type SandboxBuildSpecError, type SandboxBuildSpecValidation, SandboxCommands, type SandboxCreateParams, type SandboxData, SandboxEnv, SandboxEvents, type SandboxExecOptions, type SandboxExecResult, SandboxFiles, type SandboxId, type SandboxListParams, SandboxPreview, SandboxPreviews, type SandboxState, SandboxTags, type SandboxTemplate, type SandboxTemplateBuild, type SandboxTemplateBuildCreateParams, type SandboxTemplateBuildResourceData, type SandboxTemplateBuildResourceId, type SandboxTemplateCreateParams, type SandboxTemplateList, type SandboxTemplateListParams, type SandboxTemplateResourceData, type SandboxTemplateResourceId, SandboxTemplates, SandboxTerminal, Sandboxes, ScopedFs, type ScrollDirection, type ScrollParams, type SecretCreateParams, type SecretData, type SecretId, type SecretUpdateParams, type SessionId, Settings, type SettingsUpdateParams, type SizeData, type SlackSendTestParams, type SnapshotCreateParams, type SnapshotData, type SnapshotListResponse, type SnapshotProgressEvent, type SnapshotRestoreResult, type SnapshotStatus, SnapshotsStandalone, Storage, type StorageObjectData, type TemplateBuildCreateParams, type TemplateCreateParams, type TemplateData, Tenant, type TenantId, type TenantPlan, type TerminalCreateParams, TimeoutError, type TimeseriesParams, type TunnelAuthMode, type TunnelCreateParams, type TunnelData, type TunnelId, type TunnelListResponse, type TunnelUpdateParams, type TypeParams, Usage, type UsageReportParams, type UsageSession, type UsageSessionsParams, type UsageSummary, ValidationError, type VersionListParams, type VolumeCreateParams, type VolumeData, type VolumeId, type VolumeListParams, Volumes, type WaitParams, type WebhookCreateParams, type WebhookData, type WebhookDeliveryData, type WebhookDeliveryId, type WebhookId, type WebhookListParams, type WebhookUpdateParams, Webhooks, type WindowFocusParams, type WindowInfo, type WorkspaceId, type WsTicket };
5880
+ export { type AcceptOrgInviteResponse, type AcceptWorkspaceInviteResponse, type AddDomainParams, type AddWorkspaceMemberParams, Admin, type AgentDispatchParams, type AgentEvent$1 as AgentEvent, type AgentEventType, type AgentSessionCreateParams, type AgentSessionData, type AgentSessionListResponse$1 as AgentSessionListResponse, type AgentSessionStatus$1 as AgentSessionStatus, type AllowParams, Analytics, type AnalyticsFilters, type ApiKeyCreateParams, type ApiKeyCreateResult, type ApiKeyData, type ApiKeyId, type ApiKeyListParams, ApiKeys, type AppCatalogEntry, type AppInstallData, type AppInstallEvent, type AuditListParams, AuditLog, type AuditLogEvent, type AuditLogListParams, type AuditTailParams, AuthError, type BenchmarkCompareParams, type BenchmarkCreateParams, Benchmarks, type BindingCreateParams, type BindingListParams, type BrandingUpdateParams, type BucketCreateParams, type BucketData, type BucketId, type BuilderSessionListParams, BuilderSessions, type BulkUserActionParams, type ChannelCreateParams, type ChannelData, type ChannelListParams, type ChannelUpdateParams, Channels, type ChatCompletionCreateParams, type ChatCompletionCreateStreamParams, Checkpoints, type ClickParams, type ClusterCreateParams, type ClusterData, type ClusterEvent, type ClusterId, type ClusterListResponse, type ClusterStatus, CommandCenter, Community, type CompletionCreateParams, type CompletionCreateStreamParams, Completions, Computer, ComputerAudit, ComputerAutoStop, type ComputerCreateParams, type ComputerData, ComputerEnv, type ComputerId, ComputerInbox, type ComputerListParams, type ComputerListResponse, ComputerLogs, type ComputerLogsGetParams, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, type ComputerSize, type ComputerStatus, type ComputerTemplateType, ComputerTerminal, type ComputerUpdateParams, type ComputerVisibility, ComputerVolumes, Computers, type CopyParams, type CreateAdminApiKeyParams, type CreateOrgInviteParams, type CreateWorkspaceInviteParams, type CreateWorkspaceInviteResponse, type CreditBalance, type CreditTransaction, type CreditTransactionListResponse, type CreditUsage, Credits, type CronJobCreateParams, type CronJobData, type CronJobExecutionData, type CronJobExecutionId, type CronJobId, type CronJobListParams, type CronJobUpdateParams, CronJobs, type CursorInfo, type CustomDomainCreateParams, type CustomDomainData, type CustomDomainId, type CustomDomainListParams, Dashboard, type DashboardSummary, type DatabaseCreateParams, type DatabaseCredentials, type DatabaseData, type DatabaseId, type DatabaseListParams, type DatabaseLogsParams, type DatabaseLogsResult, Databases, type DeploymentBuildData, type DeploymentCreateParams, type DeploymentData, DeploymentDomains, type DeploymentId, type DeploymentListParams, type DeploymentReleaseData, type DeploymentReleaseId, DeploymentReleases, DeploymentRuntimeInstances, type DeploymentServiceData, type DeploymentServiceId, type DeploymentServiceType, type DeploymentSourceType, type DeploymentState, type DeploymentUpdateParams, type DeploymentVersionData, type DeploymentVersionId, type DeploymentVersionKind, type DeploymentVersionState, DeploymentVersions, Deployments, Desktop$1 as Desktop, type DesktopActionResult, type DirEntry, type DirListResult, type DiscordSendTestParams, type DoubleClickParams, type DragParams, type EgressAllowlistRule, EgressAudit, type EgressAuditEvent, type EgressBindingData, EgressNetwork, type EgressPolicyData, type EgressPolicyMode, type EgressRuleEffect, type EgressSecretData, type EgressSecretScope, type EgressSecretType, EgressSecrets, type EgressSuggestion, Email, EmailCampaigns, EmailInbox, EmailTemplates, type EmbeddingCreateParams, Embeddings, Exec, type ExecParams, type ExecPythonParams, type ExecResult, type ExternalAttribution, type ExternalKeyCreateParams, type ExternalKeyData, ExternalKeys, type FileDeleteParams, type FileDownloadParams, type FileEntry, type FileExportParams, type FileExportResult, type FileListParams, type FileListResult, type FileStat, Files, FlatCustomDomains, type FsEntry, type FsListResponse, type FsStat, type FunctionCreateParams, type FunctionData, type FunctionId, type FunctionInvokeParams, type FunctionListParams, type FunctionUpdateParams, Functions, type GithubRepo, type GithubSshKey, type HealthCheckCreateParams, type HealthCheckData, type HealthCheckId, type HealthCheckListParams, type HealthCheckUpdateParams, HealthChecks, type HostCreateParams, type HostData, type HostEvent, type HostId, type HostListResponse, type HostStatus, type HostUpdateParams, InsufficientCreditsError, type IntegrationCatalogEntry, type IntegrationData, Integrations, type JobData, type JobEvent, type JobEventType, type JobId, type JobListResponse, type JobRunParams, type JobStatus, type KeyParams, type LaunchParams, type LinearCreateIssueParams, type ListAdminApiKeysParams, type ListAdminComputersParams, type ListAdminTenantsParams, type ListAdminUsersParams, Mcp, type McpDispatchParams, Miosa, type MiosaClientConfig, MiosaError, type MkdirParams, type ModeParams, Models, type MouseButton, NetworkError, NetworkPolicy, type NetworkPolicyData, type NetworkPolicyEffect, type NetworkPolicyProtocol, type NetworkPolicyRule, type NetworkPolicySetParams, NotFoundError, type NotificationPrefsUpdateParams, OAuthFlow, type OauthConnectParams, type OauthProvider, type OauthStartResult, type OauthStatusResult, type ObjectListParams, type AgentEvent as OcAgentEvent, type OcAgentSessionData, type AgentSessionListResponse as OcAgentSessionListResponse, type OcWorkspaceCreateParams, type OcWorkspaceData, type OcWorkspaceEvent, type OcWorkspaceListResponse, type OcWorkspaceStatus, type OcWorkspaceUpdateParams, OpenComputers, type OrgInvite, type OrgInviteCreated, type OrgInviteCreatedResponse, type OrgInviteListResponse, type OrgInvitePreview, type OrgInviteRevokeResponse, OrgInvites, type OrgRole, type OverviewData, type PolicyCreateParams, type PolicyListParams, type PolicyUpdateParams, type PresignParams, type PresignResult, ProjectAuth, type ProjectAuthEnableParams, type ProjectAuthStatus, type ProjectAuthUpdateParams, type ProjectIntegrationCatalogEntry, type ProjectIntegrationCreateParams, type ProjectIntegrationData, type ProjectIntegrationListParams, type ProjectIntegrationUpdateParams, ProjectIntegrations, ProviderDefaults, type ProviderKeyUpsertParams, type PublishFromSandboxParams, type PublishParams, type PublishResult, RateLimitError, type RegionData, Regions, type RollbackParams, type RulesListParams, type RuntimeInstanceData, type RuntimeInstanceId, type RuntimeInstanceState, type RuntimeLogsResult, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, SandboxAudit, type SandboxBuildSpec, type SandboxBuildSpecError, type SandboxBuildSpecValidation, SandboxCommands, type SandboxCreateParams, type SandboxData, SandboxEnv, SandboxEvents, type SandboxExecOptions, type SandboxExecResult, SandboxFiles, type SandboxId, type SandboxListParams, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, type SandboxState, SandboxTags, type SandboxTemplate, type SandboxTemplateBuild, type SandboxTemplateBuildCreateParams, type SandboxTemplateBuildResourceData, type SandboxTemplateBuildResourceId, type SandboxTemplateCreateParams, type SandboxTemplateList, type SandboxTemplateListParams, type SandboxTemplateResourceData, type SandboxTemplateResourceId, SandboxTemplates, SandboxTerminal, Sandboxes, ScopedFs, type ScrollDirection, type ScrollParams, type SecretCreateParams, type SecretData, type SecretId, type SecretListParams, type SecretRotateParams, type SecretSetParams, type SecretUpdateParams, type SessionId, Settings, type SettingsUpdateParams, type SizeData, type SlackSendTestParams, type SnapshotCreateParams, type SnapshotData, type SnapshotListResponse, type SnapshotProgressEvent, type SnapshotRestoreResult, type SnapshotStatus, SnapshotsStandalone, Storage, type StorageObjectData, type SuggestionsParams, type TemplateBuildCreateParams, type TemplateCreateParams, type TemplateData, Tenant, type TenantId, type TenantPlan, type TenantSummary, type WorkspaceId as TenantWorkspaceId, type TerminalCreateParams, TimeoutError, type TimeseriesParams, type TunnelAuthMode, type TunnelCreateParams, type TunnelData, type TunnelId, type TunnelListResponse, type TunnelUpdateParams, type TypeParams, type UpdateWorkspaceMemberRoleParams, Usage, type UsageReportParams, type UsageSession, type UsageSessionsParams, type UsageSummary, ValidationError, type VersionListParams, type VolumeCreateParams, type VolumeData, type VolumeId, type VolumeListParams, Volumes, type WaitParams, type WebhookCreateParams, type WebhookData, type WebhookDeliveryData, type WebhookDeliveryId, type WebhookId, type WebhookListParams, type WebhookUpdateParams, Webhooks, type WindowFocusParams, type WindowInfo, type WorkspaceComputerTemplateCreateParams, type WorkspaceCreateParams, type WorkspaceData, type WorkspaceId$1 as WorkspaceId, type WorkspaceInvite, type WorkspaceInviteCreatedResponse, type WorkspaceInviteListResponse, type WorkspaceInvitePreview, type WorkspaceInviteRevokeResponse, WorkspaceInvites, type WorkspaceMember, type WorkspaceMemberAddedResponse, type WorkspaceMemberDeleteResponse, type WorkspaceMemberListResponse, type WorkspaceMemberRecord, type WorkspaceMemberRecordResponse, WorkspaceMembers, type WorkspaceRole, type WorkspaceUpdateParams, Workspaces, type WsTicket };