@miosa/sdk 2.0.0 → 2.0.3
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/README.md +33 -0
- package/dist/index.d.ts +227 -1
- package/dist/index.js +489 -279
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -168,7 +168,7 @@ var TokenRefreshFailedError = class extends MiosaError {
|
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
// src/version.ts
|
|
171
|
-
var SDK_VERSION = "2.0.
|
|
171
|
+
var SDK_VERSION = "2.0.3";
|
|
172
172
|
var SDK_USER_AGENT = `@miosa/sdk/${SDK_VERSION}`;
|
|
173
173
|
|
|
174
174
|
// src/http.ts
|
|
@@ -1524,8 +1524,190 @@ var ApiKeys = class {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
};
|
|
1526
1526
|
|
|
1527
|
-
// src/resources/
|
|
1527
|
+
// src/resources/app-documents.ts
|
|
1528
1528
|
function unwrap8(payload) {
|
|
1529
|
+
return payload && typeof payload === "object" && "data" in payload ? payload.data : payload;
|
|
1530
|
+
}
|
|
1531
|
+
var AppDocuments = class {
|
|
1532
|
+
constructor(http) {
|
|
1533
|
+
this.http = http;
|
|
1534
|
+
}
|
|
1535
|
+
http;
|
|
1536
|
+
async list(workspaceId2) {
|
|
1537
|
+
const payload = await this.http.get(
|
|
1538
|
+
"/builder/apps",
|
|
1539
|
+
{ workspace_id: workspaceId2 }
|
|
1540
|
+
);
|
|
1541
|
+
return payload.data;
|
|
1542
|
+
}
|
|
1543
|
+
async get(id) {
|
|
1544
|
+
return unwrap8(
|
|
1545
|
+
await this.http.get(
|
|
1546
|
+
`/builder/apps/${id}`
|
|
1547
|
+
)
|
|
1548
|
+
);
|
|
1549
|
+
}
|
|
1550
|
+
async create(params) {
|
|
1551
|
+
const { workspaceId: workspaceId2, ...body5 } = params;
|
|
1552
|
+
return unwrap8(
|
|
1553
|
+
await this.http.post(
|
|
1554
|
+
"/builder/apps",
|
|
1555
|
+
{ ...body5, workspace_id: workspaceId2 }
|
|
1556
|
+
)
|
|
1557
|
+
);
|
|
1558
|
+
}
|
|
1559
|
+
async update(id, params) {
|
|
1560
|
+
return unwrap8(
|
|
1561
|
+
await this.http.patch(`/builder/apps/${id}`, params)
|
|
1562
|
+
);
|
|
1563
|
+
}
|
|
1564
|
+
async archive(id) {
|
|
1565
|
+
await this.http.delete(`/builder/apps/${id}`);
|
|
1566
|
+
}
|
|
1567
|
+
async diagnostics(id) {
|
|
1568
|
+
return unwrap8(
|
|
1569
|
+
await this.http.get(`/builder/apps/${id}/diagnostics`)
|
|
1570
|
+
);
|
|
1571
|
+
}
|
|
1572
|
+
async stageCandidate(id) {
|
|
1573
|
+
return unwrap8(
|
|
1574
|
+
await this.http.post(`/builder/apps/${id}/candidates`, {})
|
|
1575
|
+
);
|
|
1576
|
+
}
|
|
1577
|
+
async approveExactVersion(id, releaseId, reason) {
|
|
1578
|
+
return unwrap8(
|
|
1579
|
+
await this.http.post(`/builder/apps/${id}/approvals`, {
|
|
1580
|
+
reason,
|
|
1581
|
+
release_id: releaseId
|
|
1582
|
+
})
|
|
1583
|
+
);
|
|
1584
|
+
}
|
|
1585
|
+
async publishExactRelease(id) {
|
|
1586
|
+
const payload = await this.http.post(`/builder/apps/${id}/publish`, {});
|
|
1587
|
+
return unwrap8(payload).app;
|
|
1588
|
+
}
|
|
1589
|
+
async listData(id, collection) {
|
|
1590
|
+
const payload = await this.http.get(
|
|
1591
|
+
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}`
|
|
1592
|
+
);
|
|
1593
|
+
return payload.data;
|
|
1594
|
+
}
|
|
1595
|
+
async getData(id, collection, key) {
|
|
1596
|
+
return unwrap8(
|
|
1597
|
+
await this.http.get(
|
|
1598
|
+
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}`
|
|
1599
|
+
)
|
|
1600
|
+
);
|
|
1601
|
+
}
|
|
1602
|
+
async putData(id, collection, key, value, expectedVersion) {
|
|
1603
|
+
return unwrap8(
|
|
1604
|
+
await this.http.put(
|
|
1605
|
+
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}`,
|
|
1606
|
+
{ value, expected_version: expectedVersion }
|
|
1607
|
+
)
|
|
1608
|
+
);
|
|
1609
|
+
}
|
|
1610
|
+
async deleteData(id, collection, key, expectedVersion) {
|
|
1611
|
+
const suffix = expectedVersion === void 0 ? "" : `?expected_version=${encodeURIComponent(String(expectedVersion))}`;
|
|
1612
|
+
await this.http.delete(
|
|
1613
|
+
`/builder/apps/${encodeURIComponent(id)}/data/${encodeURIComponent(collection)}/${encodeURIComponent(key)}${suffix}`
|
|
1614
|
+
);
|
|
1615
|
+
}
|
|
1616
|
+
async authorizeAction(id, input) {
|
|
1617
|
+
return this.http.request(
|
|
1618
|
+
`/actions/apps/${encodeURIComponent(id)}/authorize`,
|
|
1619
|
+
{
|
|
1620
|
+
method: "POST",
|
|
1621
|
+
headers: {
|
|
1622
|
+
"x-miosa-app-callback-token": input.callbackToken
|
|
1623
|
+
},
|
|
1624
|
+
body: {
|
|
1625
|
+
release_id: input.releaseId,
|
|
1626
|
+
capability: input.capability,
|
|
1627
|
+
request_fingerprint: input.requestFingerprint,
|
|
1628
|
+
params_fingerprint: input.paramsFingerprint,
|
|
1629
|
+
connector_id: input.connectorId
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
);
|
|
1633
|
+
}
|
|
1634
|
+
async mintRuntimeToken(id) {
|
|
1635
|
+
return unwrap8(
|
|
1636
|
+
await this.http.post(
|
|
1637
|
+
`/builder/apps/${encodeURIComponent(id)}/runtime-token`,
|
|
1638
|
+
{}
|
|
1639
|
+
)
|
|
1640
|
+
);
|
|
1641
|
+
}
|
|
1642
|
+
async resolveBinding(id, bindingId, receiptId, callbackToken) {
|
|
1643
|
+
return unwrap8(
|
|
1644
|
+
await this.http.request(
|
|
1645
|
+
`/builder/apps/${encodeURIComponent(id)}/runtime/bindings/${encodeURIComponent(bindingId)}?receipt_id=${encodeURIComponent(receiptId)}`,
|
|
1646
|
+
{
|
|
1647
|
+
method: "GET",
|
|
1648
|
+
headers: {
|
|
1649
|
+
"x-miosa-app-callback-token": callbackToken
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
)
|
|
1653
|
+
);
|
|
1654
|
+
}
|
|
1655
|
+
async listAutomationRuns(id) {
|
|
1656
|
+
const payload = await this.http.get(
|
|
1657
|
+
`/builder/apps/${encodeURIComponent(id)}/automation-runs`
|
|
1658
|
+
);
|
|
1659
|
+
return payload.data;
|
|
1660
|
+
}
|
|
1661
|
+
async startAutomationRun(id, automationId, trigger = {}) {
|
|
1662
|
+
return unwrap8(
|
|
1663
|
+
await this.http.post(
|
|
1664
|
+
`/builder/apps/${encodeURIComponent(id)}/automations/${encodeURIComponent(automationId)}/runs`,
|
|
1665
|
+
{ trigger }
|
|
1666
|
+
)
|
|
1667
|
+
);
|
|
1668
|
+
}
|
|
1669
|
+
async claimAutomationStep(id, runId) {
|
|
1670
|
+
return unwrap8(
|
|
1671
|
+
await this.http.post(
|
|
1672
|
+
`/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/claim`,
|
|
1673
|
+
{}
|
|
1674
|
+
)
|
|
1675
|
+
);
|
|
1676
|
+
}
|
|
1677
|
+
async completeAutomationStep(id, runId, cursor, idempotencyKey11, output = null) {
|
|
1678
|
+
return unwrap8(
|
|
1679
|
+
await this.http.post(
|
|
1680
|
+
`/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/complete`,
|
|
1681
|
+
{
|
|
1682
|
+
cursor,
|
|
1683
|
+
idempotency_key: idempotencyKey11,
|
|
1684
|
+
output
|
|
1685
|
+
}
|
|
1686
|
+
)
|
|
1687
|
+
);
|
|
1688
|
+
}
|
|
1689
|
+
async failAutomationStep(id, runId, cursor, idempotencyKey11, reason) {
|
|
1690
|
+
return unwrap8(
|
|
1691
|
+
await this.http.post(
|
|
1692
|
+
`/builder/apps/${encodeURIComponent(id)}/automation-runs/${encodeURIComponent(runId)}/fail`,
|
|
1693
|
+
{
|
|
1694
|
+
cursor,
|
|
1695
|
+
idempotency_key: idempotencyKey11,
|
|
1696
|
+
reason
|
|
1697
|
+
}
|
|
1698
|
+
)
|
|
1699
|
+
);
|
|
1700
|
+
}
|
|
1701
|
+
async revokeApproval(id, approvalId) {
|
|
1702
|
+
await this.http.post(
|
|
1703
|
+
`/builder/apps/${id}/approvals/${approvalId}/revoke`,
|
|
1704
|
+
{}
|
|
1705
|
+
);
|
|
1706
|
+
}
|
|
1707
|
+
};
|
|
1708
|
+
|
|
1709
|
+
// src/resources/audit-log.ts
|
|
1710
|
+
function unwrap9(payload) {
|
|
1529
1711
|
if (payload && typeof payload === "object") {
|
|
1530
1712
|
const p = payload;
|
|
1531
1713
|
for (const k of ["data", "audit_log", "events", "items"]) {
|
|
@@ -1548,14 +1730,14 @@ var AuditLog = class {
|
|
|
1548
1730
|
async list(params = {}) {
|
|
1549
1731
|
const query3 = stripUndefined7(params);
|
|
1550
1732
|
const data = await this.http.get("/audit-log", query3);
|
|
1551
|
-
const result =
|
|
1733
|
+
const result = unwrap9(data);
|
|
1552
1734
|
if (Array.isArray(result)) return result;
|
|
1553
1735
|
return [];
|
|
1554
1736
|
}
|
|
1555
1737
|
};
|
|
1556
1738
|
|
|
1557
1739
|
// src/resources/benchmarks.ts
|
|
1558
|
-
function
|
|
1740
|
+
function unwrap10(data) {
|
|
1559
1741
|
if (data && typeof data === "object") {
|
|
1560
1742
|
const d = data;
|
|
1561
1743
|
for (const k of ["data", "benchmarks", "samples", "items"]) {
|
|
@@ -1587,7 +1769,7 @@ var Benchmarks = class {
|
|
|
1587
1769
|
return unwrapList(data);
|
|
1588
1770
|
}
|
|
1589
1771
|
async get(benchmarkId) {
|
|
1590
|
-
return
|
|
1772
|
+
return unwrap10(
|
|
1591
1773
|
await this.http.get(`/admin/benchmarks/${benchmarkId}`)
|
|
1592
1774
|
);
|
|
1593
1775
|
}
|
|
@@ -1596,10 +1778,10 @@ var Benchmarks = class {
|
|
|
1596
1778
|
const body5 = Object.fromEntries(
|
|
1597
1779
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
1598
1780
|
);
|
|
1599
|
-
return
|
|
1781
|
+
return unwrap10(await this.http.post("/admin/benchmarks", body5));
|
|
1600
1782
|
}
|
|
1601
1783
|
async cancel(benchmarkId) {
|
|
1602
|
-
return
|
|
1784
|
+
return unwrap10(
|
|
1603
1785
|
await this.http.post(`/admin/benchmarks/${benchmarkId}/cancel`)
|
|
1604
1786
|
);
|
|
1605
1787
|
}
|
|
@@ -1619,14 +1801,14 @@ var Benchmarks = class {
|
|
|
1619
1801
|
const body5 = Object.fromEntries(
|
|
1620
1802
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
1621
1803
|
);
|
|
1622
|
-
return
|
|
1804
|
+
return unwrap10(
|
|
1623
1805
|
await this.http.post("/admin/benchmarks/compare", body5)
|
|
1624
1806
|
);
|
|
1625
1807
|
}
|
|
1626
1808
|
};
|
|
1627
1809
|
|
|
1628
1810
|
// src/resources/builder-sessions.ts
|
|
1629
|
-
function
|
|
1811
|
+
function unwrap11(data) {
|
|
1630
1812
|
if (data && typeof data === "object") {
|
|
1631
1813
|
const d = data;
|
|
1632
1814
|
for (const k of ["data", "sessions", "items"]) {
|
|
@@ -1663,7 +1845,7 @@ var BuilderSessions = class {
|
|
|
1663
1845
|
return all.find((s) => s.id === sessionId) ?? {};
|
|
1664
1846
|
}
|
|
1665
1847
|
async updateTitle(sessionId, title) {
|
|
1666
|
-
return
|
|
1848
|
+
return unwrap11(
|
|
1667
1849
|
await this.http.patch(`/builder/sessions/${sessionId}/title`, {
|
|
1668
1850
|
title
|
|
1669
1851
|
})
|
|
@@ -1675,7 +1857,7 @@ var BuilderSessions = class {
|
|
|
1675
1857
|
};
|
|
1676
1858
|
|
|
1677
1859
|
// src/resources/channels.ts
|
|
1678
|
-
function
|
|
1860
|
+
function unwrap12(payload) {
|
|
1679
1861
|
if (payload && typeof payload === "object") {
|
|
1680
1862
|
const p = payload;
|
|
1681
1863
|
for (const k of ["data", "channels", "notifications", "items"]) {
|
|
@@ -1703,26 +1885,26 @@ var Channels = class {
|
|
|
1703
1885
|
async list(params = {}) {
|
|
1704
1886
|
const query3 = stripUndefined8(params);
|
|
1705
1887
|
const data = await this.http.get("/channels", query3);
|
|
1706
|
-
const result =
|
|
1888
|
+
const result = unwrap12(data);
|
|
1707
1889
|
if (Array.isArray(result)) return result;
|
|
1708
1890
|
return [];
|
|
1709
1891
|
}
|
|
1710
1892
|
/** Get a single channel. */
|
|
1711
1893
|
async get(channelId) {
|
|
1712
1894
|
const data = await this.http.get(`/channels/${channelId}`);
|
|
1713
|
-
return
|
|
1895
|
+
return unwrap12(data);
|
|
1714
1896
|
}
|
|
1715
1897
|
/** Create a new channel. */
|
|
1716
1898
|
async create(params) {
|
|
1717
1899
|
const body5 = stripUndefObj(params);
|
|
1718
1900
|
const data = await this.http.post("/channels", body5);
|
|
1719
|
-
return
|
|
1901
|
+
return unwrap12(data);
|
|
1720
1902
|
}
|
|
1721
1903
|
/** Update a channel. */
|
|
1722
1904
|
async update(channelId, params) {
|
|
1723
1905
|
const body5 = stripUndefObj(params);
|
|
1724
1906
|
const data = await this.http.patch(`/channels/${channelId}`, body5);
|
|
1725
|
-
return
|
|
1907
|
+
return unwrap12(data);
|
|
1726
1908
|
}
|
|
1727
1909
|
/** Delete a channel. */
|
|
1728
1910
|
async delete(channelId) {
|
|
@@ -1732,30 +1914,30 @@ var Channels = class {
|
|
|
1732
1914
|
/** Get notification preferences across all channels. */
|
|
1733
1915
|
async listNotifications() {
|
|
1734
1916
|
const data = await this.http.get("/channels/notifications");
|
|
1735
|
-
return
|
|
1917
|
+
return unwrap12(data);
|
|
1736
1918
|
}
|
|
1737
1919
|
/** Update notification preferences. */
|
|
1738
1920
|
async updateNotifications(params) {
|
|
1739
1921
|
const body5 = stripUndefObj(params);
|
|
1740
1922
|
const data = await this.http.put("/channels/notifications", body5);
|
|
1741
|
-
return
|
|
1923
|
+
return unwrap12(data);
|
|
1742
1924
|
}
|
|
1743
1925
|
/** Enable a channel. */
|
|
1744
1926
|
async enable(channelId) {
|
|
1745
1927
|
const data = await this.http.post(`/channels/${channelId}/enable`);
|
|
1746
|
-
return
|
|
1928
|
+
return unwrap12(data);
|
|
1747
1929
|
}
|
|
1748
1930
|
/** Disable a channel. */
|
|
1749
1931
|
async disable(channelId) {
|
|
1750
1932
|
const data = await this.http.post(
|
|
1751
1933
|
`/channels/${channelId}/disable`
|
|
1752
1934
|
);
|
|
1753
|
-
return
|
|
1935
|
+
return unwrap12(data);
|
|
1754
1936
|
}
|
|
1755
1937
|
};
|
|
1756
1938
|
|
|
1757
1939
|
// src/resources/cloud.ts
|
|
1758
|
-
function
|
|
1940
|
+
function unwrap13(payload) {
|
|
1759
1941
|
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
1760
1942
|
return payload.data;
|
|
1761
1943
|
}
|
|
@@ -1830,12 +2012,12 @@ var Cloud = class {
|
|
|
1830
2012
|
}
|
|
1831
2013
|
http;
|
|
1832
2014
|
async listAccounts() {
|
|
1833
|
-
return
|
|
2015
|
+
return unwrap13(
|
|
1834
2016
|
await this.http.get("/cloud/accounts")
|
|
1835
2017
|
);
|
|
1836
2018
|
}
|
|
1837
2019
|
async createAccount(params) {
|
|
1838
|
-
return
|
|
2020
|
+
return unwrap13(
|
|
1839
2021
|
await this.http.post(
|
|
1840
2022
|
"/cloud/accounts",
|
|
1841
2023
|
accountBody(params)
|
|
@@ -1843,7 +2025,7 @@ var Cloud = class {
|
|
|
1843
2025
|
);
|
|
1844
2026
|
}
|
|
1845
2027
|
async attachAwsRole(id, params) {
|
|
1846
|
-
return
|
|
2028
|
+
return unwrap13(
|
|
1847
2029
|
await this.http.post(
|
|
1848
2030
|
`/cloud/accounts/${encodeURIComponent(id)}/aws/role`,
|
|
1849
2031
|
stripUndefined9({
|
|
@@ -1854,7 +2036,7 @@ var Cloud = class {
|
|
|
1854
2036
|
);
|
|
1855
2037
|
}
|
|
1856
2038
|
async listRegions(params = {}) {
|
|
1857
|
-
return
|
|
2039
|
+
return unwrap13(
|
|
1858
2040
|
await this.http.get(
|
|
1859
2041
|
"/cloud/regions",
|
|
1860
2042
|
query(params)
|
|
@@ -1862,7 +2044,7 @@ var Cloud = class {
|
|
|
1862
2044
|
);
|
|
1863
2045
|
}
|
|
1864
2046
|
async createRegion(params) {
|
|
1865
|
-
return
|
|
2047
|
+
return unwrap13(
|
|
1866
2048
|
await this.http.post(
|
|
1867
2049
|
"/cloud/regions",
|
|
1868
2050
|
regionBody(params)
|
|
@@ -1870,12 +2052,12 @@ var Cloud = class {
|
|
|
1870
2052
|
);
|
|
1871
2053
|
}
|
|
1872
2054
|
async listPools(params = {}) {
|
|
1873
|
-
return
|
|
2055
|
+
return unwrap13(
|
|
1874
2056
|
await this.http.get("/cloud/pools", query(params))
|
|
1875
2057
|
);
|
|
1876
2058
|
}
|
|
1877
2059
|
async createPool(params) {
|
|
1878
|
-
return
|
|
2060
|
+
return unwrap13(
|
|
1879
2061
|
await this.http.post(
|
|
1880
2062
|
"/cloud/pools",
|
|
1881
2063
|
poolBody(params)
|
|
@@ -1883,7 +2065,7 @@ var Cloud = class {
|
|
|
1883
2065
|
);
|
|
1884
2066
|
}
|
|
1885
2067
|
async listPreflights(params = {}) {
|
|
1886
|
-
return
|
|
2068
|
+
return unwrap13(
|
|
1887
2069
|
await this.http.get(
|
|
1888
2070
|
"/cloud/preflights",
|
|
1889
2071
|
query(params)
|
|
@@ -1891,7 +2073,7 @@ var Cloud = class {
|
|
|
1891
2073
|
);
|
|
1892
2074
|
}
|
|
1893
2075
|
async recordPreflight(params) {
|
|
1894
|
-
return
|
|
2076
|
+
return unwrap13(
|
|
1895
2077
|
await this.http.post(
|
|
1896
2078
|
"/cloud/preflights",
|
|
1897
2079
|
preflightBody(params)
|
|
@@ -1901,7 +2083,7 @@ var Cloud = class {
|
|
|
1901
2083
|
};
|
|
1902
2084
|
|
|
1903
2085
|
// src/resources/command-center.ts
|
|
1904
|
-
function
|
|
2086
|
+
function unwrap14(data) {
|
|
1905
2087
|
if (data && typeof data === "object") {
|
|
1906
2088
|
const d = data;
|
|
1907
2089
|
for (const k of [
|
|
@@ -1935,7 +2117,7 @@ var CommandCenter = class {
|
|
|
1935
2117
|
http;
|
|
1936
2118
|
/** Top-level snapshot (GET /command-center). */
|
|
1937
2119
|
async overview() {
|
|
1938
|
-
return
|
|
2120
|
+
return unwrap14(await this.http.get("/command-center"));
|
|
1939
2121
|
}
|
|
1940
2122
|
async agents() {
|
|
1941
2123
|
return unwrapList3(await this.http.get("/command-center/agents"));
|
|
@@ -1946,13 +2128,13 @@ var CommandCenter = class {
|
|
|
1946
2128
|
);
|
|
1947
2129
|
}
|
|
1948
2130
|
async metrics() {
|
|
1949
|
-
return
|
|
2131
|
+
return unwrap14(await this.http.get("/command-center/metrics"));
|
|
1950
2132
|
}
|
|
1951
2133
|
async presets() {
|
|
1952
2134
|
return unwrapList3(await this.http.get("/command-center/presets"));
|
|
1953
2135
|
}
|
|
1954
2136
|
async tiers() {
|
|
1955
|
-
return
|
|
2137
|
+
return unwrap14(await this.http.get("/command-center/tiers"));
|
|
1956
2138
|
}
|
|
1957
2139
|
/** Stream live command-center events via SSE. */
|
|
1958
2140
|
events() {
|
|
@@ -1961,7 +2143,7 @@ var CommandCenter = class {
|
|
|
1961
2143
|
};
|
|
1962
2144
|
|
|
1963
2145
|
// src/resources/community.ts
|
|
1964
|
-
function
|
|
2146
|
+
function unwrap15(data) {
|
|
1965
2147
|
if (data && typeof data === "object") {
|
|
1966
2148
|
const d = data;
|
|
1967
2149
|
for (const k of ["data", "templates", "agents", "items"]) {
|
|
@@ -1993,7 +2175,7 @@ var Community = class {
|
|
|
1993
2175
|
return unwrapList4(await this.http.get("/community/agents", query3));
|
|
1994
2176
|
}
|
|
1995
2177
|
async getAgent(agentId) {
|
|
1996
|
-
return
|
|
2178
|
+
return unwrap15(await this.http.get(`/community/agents/${agentId}`));
|
|
1997
2179
|
}
|
|
1998
2180
|
// ── Templates ─────────────────────────────────────────────────────────
|
|
1999
2181
|
async listTemplates(filters = {}) {
|
|
@@ -2005,7 +2187,7 @@ var Community = class {
|
|
|
2005
2187
|
);
|
|
2006
2188
|
}
|
|
2007
2189
|
async getTemplate(templateId) {
|
|
2008
|
-
return
|
|
2190
|
+
return unwrap15(
|
|
2009
2191
|
await this.http.get(`/community/templates/${templateId}`)
|
|
2010
2192
|
);
|
|
2011
2193
|
}
|
|
@@ -2014,7 +2196,7 @@ var Community = class {
|
|
|
2014
2196
|
const body5 = Object.fromEntries(
|
|
2015
2197
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2016
2198
|
);
|
|
2017
|
-
return
|
|
2199
|
+
return unwrap15(
|
|
2018
2200
|
await this.http.post(
|
|
2019
2201
|
`/community/templates/${templateId}/install`,
|
|
2020
2202
|
body5
|
|
@@ -2029,7 +2211,7 @@ var Community = class {
|
|
|
2029
2211
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2030
2212
|
)
|
|
2031
2213
|
};
|
|
2032
|
-
return
|
|
2214
|
+
return unwrap15(
|
|
2033
2215
|
await this.http.post(
|
|
2034
2216
|
`/community/templates/${templateId}/rate`,
|
|
2035
2217
|
body5
|
|
@@ -2039,7 +2221,7 @@ var Community = class {
|
|
|
2039
2221
|
};
|
|
2040
2222
|
|
|
2041
2223
|
// src/resources/completions.ts
|
|
2042
|
-
function
|
|
2224
|
+
function unwrap16(data) {
|
|
2043
2225
|
if (data && typeof data === "object") {
|
|
2044
2226
|
const d = data;
|
|
2045
2227
|
if (Array.isArray(d.choices)) return d;
|
|
@@ -2065,7 +2247,7 @@ var Completions = class {
|
|
|
2065
2247
|
{ method: "POST", body: body5 }
|
|
2066
2248
|
);
|
|
2067
2249
|
}
|
|
2068
|
-
return this.http.post("/intelligence/completions", body5).then(
|
|
2250
|
+
return this.http.post("/intelligence/completions", body5).then(unwrap16);
|
|
2069
2251
|
}
|
|
2070
2252
|
chat(params) {
|
|
2071
2253
|
const body5 = buildBody(params);
|
|
@@ -2075,7 +2257,7 @@ var Completions = class {
|
|
|
2075
2257
|
{ method: "POST", body: body5 }
|
|
2076
2258
|
);
|
|
2077
2259
|
}
|
|
2078
|
-
return this.http.post("/intelligence/chat/completions", body5).then(
|
|
2260
|
+
return this.http.post("/intelligence/chat/completions", body5).then(unwrap16);
|
|
2079
2261
|
}
|
|
2080
2262
|
};
|
|
2081
2263
|
|
|
@@ -2198,7 +2380,7 @@ var Checkpoints = class {
|
|
|
2198
2380
|
};
|
|
2199
2381
|
|
|
2200
2382
|
// src/resources/computer-auto-stop.ts
|
|
2201
|
-
function
|
|
2383
|
+
function unwrap17(data) {
|
|
2202
2384
|
if (data && typeof data === "object") {
|
|
2203
2385
|
const d = data;
|
|
2204
2386
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2216,13 +2398,13 @@ var ComputerAutoStop = class {
|
|
|
2216
2398
|
computerId;
|
|
2217
2399
|
/** Return the current auto-stop configuration. */
|
|
2218
2400
|
async get() {
|
|
2219
|
-
return
|
|
2401
|
+
return unwrap17(
|
|
2220
2402
|
await this.http.get(`/computers/${this.computerId}/auto-stop`)
|
|
2221
2403
|
);
|
|
2222
2404
|
}
|
|
2223
2405
|
/** Set the idle timeout in seconds (0 disables auto-stop). */
|
|
2224
2406
|
async update(seconds) {
|
|
2225
|
-
return
|
|
2407
|
+
return unwrap17(
|
|
2226
2408
|
await this.http.patch(
|
|
2227
2409
|
`/computers/${this.computerId}/auto-stop`,
|
|
2228
2410
|
{ seconds }
|
|
@@ -2232,7 +2414,7 @@ var ComputerAutoStop = class {
|
|
|
2232
2414
|
};
|
|
2233
2415
|
|
|
2234
2416
|
// src/resources/computer-env.ts
|
|
2235
|
-
function
|
|
2417
|
+
function unwrap18(data) {
|
|
2236
2418
|
if (data && typeof data === "object") {
|
|
2237
2419
|
const d = data;
|
|
2238
2420
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2267,11 +2449,11 @@ var ComputerEnv = class {
|
|
|
2267
2449
|
}
|
|
2268
2450
|
/** Create a new env var. Use update() to change an existing one. */
|
|
2269
2451
|
async set(name, value) {
|
|
2270
|
-
return
|
|
2452
|
+
return unwrap18(await this.http.post(this.base(), { name, value }));
|
|
2271
2453
|
}
|
|
2272
2454
|
/** Patch the value of an existing env var by name. */
|
|
2273
2455
|
async update(name, value) {
|
|
2274
|
-
return
|
|
2456
|
+
return unwrap18(
|
|
2275
2457
|
await this.http.patch(`${this.base()}/${name}`, { value })
|
|
2276
2458
|
);
|
|
2277
2459
|
}
|
|
@@ -2288,7 +2470,7 @@ var ComputerEnv = class {
|
|
|
2288
2470
|
};
|
|
2289
2471
|
|
|
2290
2472
|
// src/resources/computer-logs.ts
|
|
2291
|
-
function
|
|
2473
|
+
function unwrap19(data) {
|
|
2292
2474
|
if (data && typeof data === "object") {
|
|
2293
2475
|
const d = data;
|
|
2294
2476
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2309,7 +2491,7 @@ var ComputerLogs = class {
|
|
|
2309
2491
|
const query3 = Object.fromEntries(
|
|
2310
2492
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
2311
2493
|
);
|
|
2312
|
-
return
|
|
2494
|
+
return unwrap19(
|
|
2313
2495
|
await this.http.get(`/computers/${this.computerId}/logs`, query3)
|
|
2314
2496
|
);
|
|
2315
2497
|
}
|
|
@@ -2322,7 +2504,7 @@ var ComputerLogs = class {
|
|
|
2322
2504
|
};
|
|
2323
2505
|
|
|
2324
2506
|
// src/resources/computer-osa.ts
|
|
2325
|
-
function
|
|
2507
|
+
function unwrap20(data) {
|
|
2326
2508
|
if (data && typeof data === "object") {
|
|
2327
2509
|
const d = data;
|
|
2328
2510
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2346,7 +2528,7 @@ var ComputerOsa = class {
|
|
|
2346
2528
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
2347
2529
|
)
|
|
2348
2530
|
};
|
|
2349
|
-
return
|
|
2531
|
+
return unwrap20(
|
|
2350
2532
|
await this.http.post(
|
|
2351
2533
|
`/computers/${this.computerId}/osa/task`,
|
|
2352
2534
|
body5
|
|
@@ -2355,13 +2537,13 @@ var ComputerOsa = class {
|
|
|
2355
2537
|
}
|
|
2356
2538
|
/** Cancel the currently-running OSA task, if any. */
|
|
2357
2539
|
async cancelTask() {
|
|
2358
|
-
return
|
|
2540
|
+
return unwrap20(
|
|
2359
2541
|
await this.http.delete(`/computers/${this.computerId}/osa/task`)
|
|
2360
2542
|
);
|
|
2361
2543
|
}
|
|
2362
2544
|
/** Return OSA's current task / configuration / health snapshot. */
|
|
2363
2545
|
async status() {
|
|
2364
|
-
return
|
|
2546
|
+
return unwrap20(
|
|
2365
2547
|
await this.http.get(`/computers/${this.computerId}/osa/status`)
|
|
2366
2548
|
);
|
|
2367
2549
|
}
|
|
@@ -2370,7 +2552,7 @@ var ComputerOsa = class {
|
|
|
2370
2552
|
const body5 = Object.fromEntries(
|
|
2371
2553
|
Object.entries(config).filter(([, v]) => v !== void 0)
|
|
2372
2554
|
);
|
|
2373
|
-
return
|
|
2555
|
+
return unwrap20(
|
|
2374
2556
|
await this.http.post(
|
|
2375
2557
|
`/computers/${this.computerId}/osa/configure`,
|
|
2376
2558
|
body5
|
|
@@ -2380,7 +2562,7 @@ var ComputerOsa = class {
|
|
|
2380
2562
|
};
|
|
2381
2563
|
|
|
2382
2564
|
// src/resources/computer-ports.ts
|
|
2383
|
-
function
|
|
2565
|
+
function unwrap21(data) {
|
|
2384
2566
|
if (data && typeof data === "object") {
|
|
2385
2567
|
const d = data;
|
|
2386
2568
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2425,14 +2607,14 @@ var ComputerPorts = class {
|
|
|
2425
2607
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2426
2608
|
)
|
|
2427
2609
|
};
|
|
2428
|
-
return
|
|
2610
|
+
return unwrap21(await this.http.post(this.base(), body5));
|
|
2429
2611
|
}
|
|
2430
2612
|
/** Patch visibility / auth options for port. */
|
|
2431
2613
|
async update(port, opts) {
|
|
2432
2614
|
const body5 = Object.fromEntries(
|
|
2433
2615
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
2434
2616
|
);
|
|
2435
|
-
return
|
|
2617
|
+
return unwrap21(
|
|
2436
2618
|
await this.http.patch(`${this.base()}/${port}`, body5)
|
|
2437
2619
|
);
|
|
2438
2620
|
}
|
|
@@ -2459,7 +2641,7 @@ var ComputerTerminal = class {
|
|
|
2459
2641
|
`/computers/${this.computerId}/terminal`,
|
|
2460
2642
|
body5
|
|
2461
2643
|
);
|
|
2462
|
-
return
|
|
2644
|
+
return unwrap22(raw);
|
|
2463
2645
|
}
|
|
2464
2646
|
/** Resize an existing PTY session. */
|
|
2465
2647
|
async resize(sessionId, cols, rows) {
|
|
@@ -2467,10 +2649,10 @@ var ComputerTerminal = class {
|
|
|
2467
2649
|
`/computers/${this.computerId}/pty/${sessionId}/resize`,
|
|
2468
2650
|
{ cols, rows }
|
|
2469
2651
|
);
|
|
2470
|
-
return
|
|
2652
|
+
return unwrap22(raw);
|
|
2471
2653
|
}
|
|
2472
2654
|
};
|
|
2473
|
-
function
|
|
2655
|
+
function unwrap22(data) {
|
|
2474
2656
|
if (data && typeof data === "object") {
|
|
2475
2657
|
const d = data;
|
|
2476
2658
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2481,7 +2663,7 @@ function unwrap21(data) {
|
|
|
2481
2663
|
}
|
|
2482
2664
|
|
|
2483
2665
|
// src/resources/computer-volumes.ts
|
|
2484
|
-
function
|
|
2666
|
+
function unwrap23(data) {
|
|
2485
2667
|
if (data && typeof data === "object") {
|
|
2486
2668
|
const d = data;
|
|
2487
2669
|
if ("data" in d && Object.keys(d).length <= 2) {
|
|
@@ -2515,7 +2697,7 @@ var ComputerVolumes = class {
|
|
|
2515
2697
|
}
|
|
2516
2698
|
/** Attach volumeId at mountPath inside the VM. */
|
|
2517
2699
|
async attach(volumeId, mountPath) {
|
|
2518
|
-
return
|
|
2700
|
+
return unwrap23(
|
|
2519
2701
|
await this.http.post(this.base(), {
|
|
2520
2702
|
volume_id: volumeId,
|
|
2521
2703
|
mount_path: mountPath
|
|
@@ -2529,7 +2711,7 @@ var ComputerVolumes = class {
|
|
|
2529
2711
|
};
|
|
2530
2712
|
|
|
2531
2713
|
// src/resources/connectors.ts
|
|
2532
|
-
function
|
|
2714
|
+
function unwrap24(payload) {
|
|
2533
2715
|
if (payload && typeof payload === "object") {
|
|
2534
2716
|
const p = payload;
|
|
2535
2717
|
for (const key of ["data", "binding"]) {
|
|
@@ -2740,7 +2922,7 @@ var Connectors = class {
|
|
|
2740
2922
|
const data = await this.http.get(
|
|
2741
2923
|
`/connect/connectors/${connectorPath(connector)}`
|
|
2742
2924
|
);
|
|
2743
|
-
return
|
|
2925
|
+
return unwrap24(data);
|
|
2744
2926
|
}
|
|
2745
2927
|
show(connector) {
|
|
2746
2928
|
return this.get(connector);
|
|
@@ -2751,7 +2933,7 @@ var Connectors = class {
|
|
|
2751
2933
|
"/connect/connectors",
|
|
2752
2934
|
bodyFromCreateParams(provider, params)
|
|
2753
2935
|
);
|
|
2754
|
-
return
|
|
2936
|
+
return unwrap24(data);
|
|
2755
2937
|
}
|
|
2756
2938
|
/** Request a runtime provider token for a connector. */
|
|
2757
2939
|
async getToken(connector, params = {}) {
|
|
@@ -2759,7 +2941,7 @@ var Connectors = class {
|
|
|
2759
2941
|
`/connect/token/${connectorPath(connector)}`,
|
|
2760
2942
|
tokenBody(params)
|
|
2761
2943
|
);
|
|
2762
|
-
return
|
|
2944
|
+
return unwrap24(data);
|
|
2763
2945
|
}
|
|
2764
2946
|
token(connector, params = {}) {
|
|
2765
2947
|
return this.getToken(connector, params);
|
|
@@ -2781,7 +2963,7 @@ var Connectors = class {
|
|
|
2781
2963
|
...externalAttributionParams(params)
|
|
2782
2964
|
})
|
|
2783
2965
|
);
|
|
2784
|
-
return
|
|
2966
|
+
return unwrap24(data);
|
|
2785
2967
|
}
|
|
2786
2968
|
/** List connector installations/grants. */
|
|
2787
2969
|
async installations(params = {}) {
|
|
@@ -2821,7 +3003,7 @@ var Connectors = class {
|
|
|
2821
3003
|
"/connect/defaults/materialize",
|
|
2822
3004
|
materializeDefaultsBody(params)
|
|
2823
3005
|
);
|
|
2824
|
-
return
|
|
3006
|
+
return unwrap24(data);
|
|
2825
3007
|
}
|
|
2826
3008
|
/** Create an inherited connector default for future runtime resources. */
|
|
2827
3009
|
async createDefault(params) {
|
|
@@ -2829,7 +3011,7 @@ var Connectors = class {
|
|
|
2829
3011
|
"/connect/defaults",
|
|
2830
3012
|
defaultBody(params)
|
|
2831
3013
|
);
|
|
2832
|
-
return
|
|
3014
|
+
return unwrap24(data);
|
|
2833
3015
|
}
|
|
2834
3016
|
/** Delete an inherited connector default. */
|
|
2835
3017
|
async deleteDefault(id) {
|
|
@@ -2849,7 +3031,7 @@ var Connectors = class {
|
|
|
2849
3031
|
"/connect/triggers",
|
|
2850
3032
|
triggerBody(params)
|
|
2851
3033
|
);
|
|
2852
|
-
return
|
|
3034
|
+
return unwrap24(data);
|
|
2853
3035
|
}
|
|
2854
3036
|
/** List inbound provider trigger delivery attempts. */
|
|
2855
3037
|
async triggerDeliveries(params = {}) {
|
|
@@ -2876,7 +3058,7 @@ var Connectors = class {
|
|
|
2876
3058
|
"/connect/project-links",
|
|
2877
3059
|
projectLinkBody(params)
|
|
2878
3060
|
);
|
|
2879
|
-
return
|
|
3061
|
+
return unwrap24(data);
|
|
2880
3062
|
}
|
|
2881
3063
|
/** Delete a project connector link. */
|
|
2882
3064
|
async deleteProjectLink(id) {
|
|
@@ -2912,7 +3094,7 @@ var RuntimeConnectors = class {
|
|
|
2912
3094
|
...externalAttributionParams(params)
|
|
2913
3095
|
})
|
|
2914
3096
|
);
|
|
2915
|
-
return
|
|
3097
|
+
return unwrap24(data);
|
|
2916
3098
|
}
|
|
2917
3099
|
/** Detach a connector binding by binding id or connector UID. */
|
|
2918
3100
|
async detach(bindingOrConnector) {
|
|
@@ -2921,7 +3103,7 @@ var RuntimeConnectors = class {
|
|
|
2921
3103
|
/** Sync or materialize connector placeholder env vars for this runtime resource. */
|
|
2922
3104
|
async sync() {
|
|
2923
3105
|
const data = await this.http.post(`${this.basePath}/sync`, {});
|
|
2924
|
-
return
|
|
3106
|
+
return unwrap24(data);
|
|
2925
3107
|
}
|
|
2926
3108
|
/** Verify a required connector is attached before agent work begins. */
|
|
2927
3109
|
async preflight(params = {}) {
|
|
@@ -2929,7 +3111,7 @@ var RuntimeConnectors = class {
|
|
|
2929
3111
|
`${this.basePath}/preflight`,
|
|
2930
3112
|
stripUndefined10(params)
|
|
2931
3113
|
);
|
|
2932
|
-
return
|
|
3114
|
+
return unwrap24(data);
|
|
2933
3115
|
}
|
|
2934
3116
|
};
|
|
2935
3117
|
var SandboxConnectors = class extends RuntimeConnectors {
|
|
@@ -3132,7 +3314,7 @@ var Desktop = class {
|
|
|
3132
3314
|
};
|
|
3133
3315
|
|
|
3134
3316
|
// src/resources/egressAudit.ts
|
|
3135
|
-
function
|
|
3317
|
+
function unwrap25(payload) {
|
|
3136
3318
|
if (payload && typeof payload === "object") {
|
|
3137
3319
|
const p = payload;
|
|
3138
3320
|
for (const k of ["data", "event", "items"]) {
|
|
@@ -3198,7 +3380,7 @@ var EgressAudit = class {
|
|
|
3198
3380
|
const data = await this.http.get(
|
|
3199
3381
|
`/egress/audit/${id}`
|
|
3200
3382
|
);
|
|
3201
|
-
return
|
|
3383
|
+
return unwrap25(data);
|
|
3202
3384
|
}
|
|
3203
3385
|
/**
|
|
3204
3386
|
* Long-poll the audit endpoint and yield new events as they appear.
|
|
@@ -3274,7 +3456,7 @@ var ComputerAudit = class extends SandboxAudit {
|
|
|
3274
3456
|
};
|
|
3275
3457
|
|
|
3276
3458
|
// src/resources/egressNetwork.ts
|
|
3277
|
-
function
|
|
3459
|
+
function unwrap26(payload) {
|
|
3278
3460
|
if (payload && typeof payload === "object") {
|
|
3279
3461
|
const p = payload;
|
|
3280
3462
|
for (const k of ["data", "policy", "rule", "items"]) {
|
|
@@ -3333,7 +3515,7 @@ var EgressNetwork = class {
|
|
|
3333
3515
|
"/egress/allowlist",
|
|
3334
3516
|
ruleBody(host, params, "allow")
|
|
3335
3517
|
);
|
|
3336
|
-
return
|
|
3518
|
+
return unwrap26(data);
|
|
3337
3519
|
}
|
|
3338
3520
|
/** Add a `deny` rule for `host` to the allowlist. */
|
|
3339
3521
|
async deny(host, params = {}) {
|
|
@@ -3341,7 +3523,7 @@ var EgressNetwork = class {
|
|
|
3341
3523
|
"/egress/allowlist",
|
|
3342
3524
|
ruleBody(host, params, "deny")
|
|
3343
3525
|
);
|
|
3344
|
-
return
|
|
3526
|
+
return unwrap26(data);
|
|
3345
3527
|
}
|
|
3346
3528
|
/** List allowlist rules. */
|
|
3347
3529
|
async rules(params = {}) {
|
|
@@ -3385,7 +3567,7 @@ var EgressNetwork = class {
|
|
|
3385
3567
|
"/egress/policies",
|
|
3386
3568
|
body5
|
|
3387
3569
|
);
|
|
3388
|
-
return
|
|
3570
|
+
return unwrap26(data);
|
|
3389
3571
|
}
|
|
3390
3572
|
/** Update an egress policy by id. */
|
|
3391
3573
|
async updatePolicy(policyId, params) {
|
|
@@ -3399,7 +3581,7 @@ var EgressNetwork = class {
|
|
|
3399
3581
|
`/egress/policies/${policyId}`,
|
|
3400
3582
|
body5
|
|
3401
3583
|
);
|
|
3402
|
-
return
|
|
3584
|
+
return unwrap26(data);
|
|
3403
3585
|
}
|
|
3404
3586
|
// ── mode helpers ──────────────────────────────────────────────────────────
|
|
3405
3587
|
/** Set the policy to `mode="enforce"` — denied egress is blocked. */
|
|
@@ -3426,7 +3608,7 @@ var EgressNetwork = class {
|
|
|
3426
3608
|
"/egress/policies",
|
|
3427
3609
|
body5
|
|
3428
3610
|
);
|
|
3429
|
-
return
|
|
3611
|
+
return unwrap26(data);
|
|
3430
3612
|
}
|
|
3431
3613
|
// ── suggestions ───────────────────────────────────────────────────────────
|
|
3432
3614
|
/** AI-generated allowlist suggestions from recent denied egress. */
|
|
@@ -3517,7 +3699,7 @@ var ComputerNetwork = class extends SandboxNetwork {
|
|
|
3517
3699
|
};
|
|
3518
3700
|
|
|
3519
3701
|
// src/resources/egressSecrets.ts
|
|
3520
|
-
function
|
|
3702
|
+
function unwrap27(payload) {
|
|
3521
3703
|
if (payload && typeof payload === "object") {
|
|
3522
3704
|
const p = payload;
|
|
3523
3705
|
for (const k of ["data", "secret", "binding", "items"]) {
|
|
@@ -3653,7 +3835,7 @@ var OAuthFlow = class {
|
|
|
3653
3835
|
const data = await this.http.get("/egress/oauth/status", {
|
|
3654
3836
|
state: this.state
|
|
3655
3837
|
});
|
|
3656
|
-
const payload =
|
|
3838
|
+
const payload = unwrap27(data) ?? {};
|
|
3657
3839
|
const status = payload.status;
|
|
3658
3840
|
if (status === "completed" || status === "ready" || status === "succeeded") {
|
|
3659
3841
|
return payload;
|
|
@@ -3685,7 +3867,7 @@ var EgressSecrets = class {
|
|
|
3685
3867
|
"/egress/secrets",
|
|
3686
3868
|
setBody(params)
|
|
3687
3869
|
);
|
|
3688
|
-
return
|
|
3870
|
+
return unwrap27(data);
|
|
3689
3871
|
}
|
|
3690
3872
|
/** List secrets. */
|
|
3691
3873
|
async list(params = {}) {
|
|
@@ -3700,7 +3882,7 @@ var EgressSecrets = class {
|
|
|
3700
3882
|
const data = await this.http.get(
|
|
3701
3883
|
`/egress/secrets/${id}`
|
|
3702
3884
|
);
|
|
3703
|
-
return
|
|
3885
|
+
return unwrap27(data);
|
|
3704
3886
|
}
|
|
3705
3887
|
/** Rotate the secret's value. */
|
|
3706
3888
|
async rotate(id, params) {
|
|
@@ -3709,7 +3891,7 @@ var EgressSecrets = class {
|
|
|
3709
3891
|
`/egress/secrets/${id}`,
|
|
3710
3892
|
body5
|
|
3711
3893
|
);
|
|
3712
|
-
return
|
|
3894
|
+
return unwrap27(data);
|
|
3713
3895
|
}
|
|
3714
3896
|
/** Delete a secret. */
|
|
3715
3897
|
async delete(id) {
|
|
@@ -3722,7 +3904,7 @@ var EgressSecrets = class {
|
|
|
3722
3904
|
"/egress/bindings",
|
|
3723
3905
|
bindingBody(params)
|
|
3724
3906
|
);
|
|
3725
|
-
return
|
|
3907
|
+
return unwrap27(data);
|
|
3726
3908
|
}
|
|
3727
3909
|
/** List secret bindings. */
|
|
3728
3910
|
async listBindings(params = {}) {
|
|
@@ -3755,7 +3937,7 @@ var EgressSecrets = class {
|
|
|
3755
3937
|
"/egress/oauth/start",
|
|
3756
3938
|
oauthBody(params)
|
|
3757
3939
|
);
|
|
3758
|
-
const payload =
|
|
3940
|
+
const payload = unwrap27(data) ?? {};
|
|
3759
3941
|
return new OAuthFlow(this.http, payload, params.provider);
|
|
3760
3942
|
}
|
|
3761
3943
|
};
|
|
@@ -4919,7 +5101,7 @@ var Credits = class {
|
|
|
4919
5101
|
return this.http.get("/credits/usage");
|
|
4920
5102
|
}
|
|
4921
5103
|
};
|
|
4922
|
-
function
|
|
5104
|
+
function unwrap28(payload) {
|
|
4923
5105
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
4924
5106
|
return payload.data;
|
|
4925
5107
|
}
|
|
@@ -4955,7 +5137,7 @@ var CronJobs = class {
|
|
|
4955
5137
|
}
|
|
4956
5138
|
async get(jobId) {
|
|
4957
5139
|
const data = await this.http.get(`/cron-jobs/${jobId}`);
|
|
4958
|
-
return
|
|
5140
|
+
return unwrap28(data);
|
|
4959
5141
|
}
|
|
4960
5142
|
async create(params) {
|
|
4961
5143
|
const { idempotencyKey: ikey, ...rest } = params;
|
|
@@ -4965,12 +5147,12 @@ var CronJobs = class {
|
|
|
4965
5147
|
body: body5,
|
|
4966
5148
|
headers: { "Idempotency-Key": idempotencyKey2(ikey) }
|
|
4967
5149
|
});
|
|
4968
|
-
return
|
|
5150
|
+
return unwrap28(data);
|
|
4969
5151
|
}
|
|
4970
5152
|
async update(jobId, params) {
|
|
4971
5153
|
const body5 = stripUndefined14(params);
|
|
4972
5154
|
const data = await this.http.patch(`/cron-jobs/${jobId}`, body5);
|
|
4973
|
-
return
|
|
5155
|
+
return unwrap28(data);
|
|
4974
5156
|
}
|
|
4975
5157
|
async delete(jobId) {
|
|
4976
5158
|
await this.http.delete(`/cron-jobs/${jobId}`);
|
|
@@ -4978,11 +5160,11 @@ var CronJobs = class {
|
|
|
4978
5160
|
// ── Control ────────────────────────────────────────────────────────────────
|
|
4979
5161
|
async pause(jobId) {
|
|
4980
5162
|
const data = await this.http.post(`/cron-jobs/${jobId}/pause`);
|
|
4981
|
-
return
|
|
5163
|
+
return unwrap28(data);
|
|
4982
5164
|
}
|
|
4983
5165
|
async resume(jobId) {
|
|
4984
5166
|
const data = await this.http.post(`/cron-jobs/${jobId}/resume`);
|
|
4985
|
-
return
|
|
5167
|
+
return unwrap28(data);
|
|
4986
5168
|
}
|
|
4987
5169
|
async runNow(jobId, opts = {}) {
|
|
4988
5170
|
const data = await this.http.request(
|
|
@@ -4992,7 +5174,7 @@ var CronJobs = class {
|
|
|
4992
5174
|
headers: { "Idempotency-Key": idempotencyKey2(opts.idempotencyKey) }
|
|
4993
5175
|
}
|
|
4994
5176
|
);
|
|
4995
|
-
return
|
|
5177
|
+
return unwrap28(data);
|
|
4996
5178
|
}
|
|
4997
5179
|
// ── Execution history ──────────────────────────────────────────────────────
|
|
4998
5180
|
async listExecutions(jobId) {
|
|
@@ -5007,12 +5189,12 @@ var CronJobs = class {
|
|
|
5007
5189
|
const data = await this.http.get(
|
|
5008
5190
|
`/cron-jobs/${jobId}/executions/${executionId}`
|
|
5009
5191
|
);
|
|
5010
|
-
return
|
|
5192
|
+
return unwrap28(data);
|
|
5011
5193
|
}
|
|
5012
5194
|
};
|
|
5013
5195
|
|
|
5014
5196
|
// src/resources/dashboard.ts
|
|
5015
|
-
function
|
|
5197
|
+
function unwrap29(payload) {
|
|
5016
5198
|
if (payload && typeof payload === "object") {
|
|
5017
5199
|
const p = payload;
|
|
5018
5200
|
for (const k of ["data", "dashboard", "overview", "items"]) {
|
|
@@ -5029,15 +5211,15 @@ var Dashboard = class {
|
|
|
5029
5211
|
/** Aggregated user dashboard payload. */
|
|
5030
5212
|
async summary() {
|
|
5031
5213
|
const data = await this.http.get("/dashboard");
|
|
5032
|
-
return
|
|
5214
|
+
return unwrap29(data);
|
|
5033
5215
|
}
|
|
5034
5216
|
/** Status / health overview (public endpoint). */
|
|
5035
5217
|
async overview() {
|
|
5036
5218
|
const data = await this.http.get("/overview");
|
|
5037
|
-
return
|
|
5219
|
+
return unwrap29(data);
|
|
5038
5220
|
}
|
|
5039
5221
|
};
|
|
5040
|
-
function
|
|
5222
|
+
function unwrap30(payload) {
|
|
5041
5223
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
5042
5224
|
return payload.data;
|
|
5043
5225
|
}
|
|
@@ -5073,7 +5255,7 @@ var Databases = class {
|
|
|
5073
5255
|
}
|
|
5074
5256
|
async get(databaseId) {
|
|
5075
5257
|
const data = await this.http.get(`/databases/${databaseId}`);
|
|
5076
|
-
return
|
|
5258
|
+
return unwrap30(data);
|
|
5077
5259
|
}
|
|
5078
5260
|
async create(params) {
|
|
5079
5261
|
const {
|
|
@@ -5097,7 +5279,7 @@ var Databases = class {
|
|
|
5097
5279
|
)
|
|
5098
5280
|
}
|
|
5099
5281
|
});
|
|
5100
|
-
return
|
|
5282
|
+
return unwrap30(data);
|
|
5101
5283
|
}
|
|
5102
5284
|
async delete(databaseId) {
|
|
5103
5285
|
await this.http.delete(`/databases/${databaseId}`);
|
|
@@ -5107,24 +5289,24 @@ var Databases = class {
|
|
|
5107
5289
|
const data = await this.http.post(
|
|
5108
5290
|
`/databases/${databaseId}/start`
|
|
5109
5291
|
);
|
|
5110
|
-
return
|
|
5292
|
+
return unwrap30(data);
|
|
5111
5293
|
}
|
|
5112
5294
|
async stop(databaseId) {
|
|
5113
5295
|
const data = await this.http.post(`/databases/${databaseId}/stop`);
|
|
5114
|
-
return
|
|
5296
|
+
return unwrap30(data);
|
|
5115
5297
|
}
|
|
5116
5298
|
async restart(databaseId) {
|
|
5117
5299
|
const data = await this.http.post(
|
|
5118
5300
|
`/databases/${databaseId}/restart`
|
|
5119
5301
|
);
|
|
5120
|
-
return
|
|
5302
|
+
return unwrap30(data);
|
|
5121
5303
|
}
|
|
5122
5304
|
// ── Credentials + logs ────────────────────────────────────────────────────
|
|
5123
5305
|
async credentials(databaseId) {
|
|
5124
5306
|
const data = await this.http.get(
|
|
5125
5307
|
`/databases/${databaseId}/credentials`
|
|
5126
5308
|
);
|
|
5127
|
-
return
|
|
5309
|
+
return unwrap30(data);
|
|
5128
5310
|
}
|
|
5129
5311
|
async logs(databaseId, params = {}) {
|
|
5130
5312
|
const query3 = stripUndefined15({
|
|
@@ -5154,7 +5336,7 @@ function attributionBody(p) {
|
|
|
5154
5336
|
function idempotencyKey4(key) {
|
|
5155
5337
|
return key ?? randomUUID();
|
|
5156
5338
|
}
|
|
5157
|
-
function
|
|
5339
|
+
function unwrap31(payload) {
|
|
5158
5340
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
5159
5341
|
return payload.data;
|
|
5160
5342
|
}
|
|
@@ -5263,7 +5445,7 @@ var DeploymentVersions = class {
|
|
|
5263
5445
|
const data = await this.http.get(
|
|
5264
5446
|
`/deployments/${this.deploymentId}/versions/${versionId}`
|
|
5265
5447
|
);
|
|
5266
|
-
return
|
|
5448
|
+
return unwrap31(data);
|
|
5267
5449
|
}
|
|
5268
5450
|
async promote(versionId, opts = {}) {
|
|
5269
5451
|
const body5 = stripUndefined16({ environment: opts.environment });
|
|
@@ -5275,7 +5457,14 @@ var DeploymentVersions = class {
|
|
|
5275
5457
|
headers: { "Idempotency-Key": idempotencyKey4(opts.idempotencyKey) }
|
|
5276
5458
|
}
|
|
5277
5459
|
);
|
|
5278
|
-
return
|
|
5460
|
+
return unwrap31(data);
|
|
5461
|
+
}
|
|
5462
|
+
async prepareMigrationBackup(versionId) {
|
|
5463
|
+
const data = await this.http.request(
|
|
5464
|
+
`/deployments/${this.deploymentId}/versions/${versionId}/migration-backup`,
|
|
5465
|
+
{ method: "POST", body: {} }
|
|
5466
|
+
);
|
|
5467
|
+
return unwrap31(data);
|
|
5279
5468
|
}
|
|
5280
5469
|
};
|
|
5281
5470
|
var DeploymentReleases = class {
|
|
@@ -5295,7 +5484,19 @@ var DeploymentReleases = class {
|
|
|
5295
5484
|
const data = await this.http.get(
|
|
5296
5485
|
`/deployments/${this.deploymentId}/releases/${releaseId}`
|
|
5297
5486
|
);
|
|
5298
|
-
return
|
|
5487
|
+
return unwrap31(data);
|
|
5488
|
+
}
|
|
5489
|
+
async promote(releaseId, idempotencyKey11) {
|
|
5490
|
+
const key = idempotencyKey11 ?? `promote:${this.deploymentId}:${releaseId}`;
|
|
5491
|
+
const data = await this.http.request(
|
|
5492
|
+
`/deployments/${this.deploymentId}/releases/${releaseId}/promote`,
|
|
5493
|
+
{
|
|
5494
|
+
method: "POST",
|
|
5495
|
+
body: {},
|
|
5496
|
+
headers: { "Idempotency-Key": key }
|
|
5497
|
+
}
|
|
5498
|
+
);
|
|
5499
|
+
return unwrap31(data);
|
|
5299
5500
|
}
|
|
5300
5501
|
};
|
|
5301
5502
|
var DeploymentRuntimeInstances = class {
|
|
@@ -5315,14 +5516,14 @@ var DeploymentRuntimeInstances = class {
|
|
|
5315
5516
|
const data = await this.http.get(
|
|
5316
5517
|
`/deployments/${this.deploymentId}/runtime-instances/${instanceId}`
|
|
5317
5518
|
);
|
|
5318
|
-
return
|
|
5519
|
+
return unwrap31(data);
|
|
5319
5520
|
}
|
|
5320
5521
|
async logs(instanceId, lines = 100) {
|
|
5321
5522
|
const data = await this.http.get(
|
|
5322
5523
|
`/deployments/${this.deploymentId}/runtime-instances/${instanceId}/logs`,
|
|
5323
5524
|
{ lines }
|
|
5324
5525
|
);
|
|
5325
|
-
const unwrapped =
|
|
5526
|
+
const unwrapped = unwrap31(data);
|
|
5326
5527
|
const result = { logs: String(unwrapped.logs ?? "") };
|
|
5327
5528
|
if (typeof unwrapped.runtime_instance_id === "string") {
|
|
5328
5529
|
result.runtime_instance_id = unwrapped.runtime_instance_id;
|
|
@@ -5357,7 +5558,7 @@ var DeploymentDomains = class {
|
|
|
5357
5558
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5358
5559
|
}
|
|
5359
5560
|
);
|
|
5360
|
-
return
|
|
5561
|
+
return unwrap31(data);
|
|
5361
5562
|
}
|
|
5362
5563
|
async list(filters = {}) {
|
|
5363
5564
|
const data = await this.http.get(
|
|
@@ -5370,7 +5571,7 @@ var DeploymentDomains = class {
|
|
|
5370
5571
|
const data = await this.http.post(
|
|
5371
5572
|
`/deployments/${this.deploymentId}/domains/${domainId}/verify`
|
|
5372
5573
|
);
|
|
5373
|
-
return
|
|
5574
|
+
return unwrap31(data);
|
|
5374
5575
|
}
|
|
5375
5576
|
async delete(domainId) {
|
|
5376
5577
|
await this.http.delete(
|
|
@@ -5400,7 +5601,7 @@ var Deployments = class {
|
|
|
5400
5601
|
}
|
|
5401
5602
|
async get(deploymentId) {
|
|
5402
5603
|
const data = await this.http.get(`/deployments/${deploymentId}`);
|
|
5403
|
-
return
|
|
5604
|
+
return unwrap31(data);
|
|
5404
5605
|
}
|
|
5405
5606
|
async create(params) {
|
|
5406
5607
|
const body5 = stripUndefined16({
|
|
@@ -5419,7 +5620,7 @@ var Deployments = class {
|
|
|
5419
5620
|
body: body5,
|
|
5420
5621
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5421
5622
|
});
|
|
5422
|
-
return
|
|
5623
|
+
return unwrap31(data);
|
|
5423
5624
|
}
|
|
5424
5625
|
/**
|
|
5425
5626
|
* Create a deployment that runs on the workspace's dedicated App Engine
|
|
@@ -5463,7 +5664,7 @@ var Deployments = class {
|
|
|
5463
5664
|
const rawHost = await this.http.get(
|
|
5464
5665
|
`/docker-deploy/hosts/${hostId}`
|
|
5465
5666
|
);
|
|
5466
|
-
host =
|
|
5667
|
+
host = unwrap31(
|
|
5467
5668
|
rawHost
|
|
5468
5669
|
);
|
|
5469
5670
|
addDoctorCheck(
|
|
@@ -5614,7 +5815,7 @@ var Deployments = class {
|
|
|
5614
5815
|
const rawHost = await this.http.get(
|
|
5615
5816
|
`/docker-deploy/hosts/${hostId}`
|
|
5616
5817
|
);
|
|
5617
|
-
const host =
|
|
5818
|
+
const host = unwrap31(
|
|
5618
5819
|
rawHost
|
|
5619
5820
|
);
|
|
5620
5821
|
addProofCheck(
|
|
@@ -5721,7 +5922,7 @@ var Deployments = class {
|
|
|
5721
5922
|
`/deployments/${deploymentId}`,
|
|
5722
5923
|
body5
|
|
5723
5924
|
);
|
|
5724
|
-
return
|
|
5925
|
+
return unwrap31(data);
|
|
5725
5926
|
}
|
|
5726
5927
|
async delete(deploymentId) {
|
|
5727
5928
|
await this.http.delete(`/deployments/${deploymentId}`);
|
|
@@ -5741,7 +5942,7 @@ var Deployments = class {
|
|
|
5741
5942
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5742
5943
|
}
|
|
5743
5944
|
);
|
|
5744
|
-
return
|
|
5945
|
+
return unwrap31(data);
|
|
5745
5946
|
}
|
|
5746
5947
|
/**
|
|
5747
5948
|
* Backward-compatible bridge: POST /sandboxes/:id/deploy. Works today;
|
|
@@ -5766,7 +5967,7 @@ var Deployments = class {
|
|
|
5766
5967
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5767
5968
|
}
|
|
5768
5969
|
);
|
|
5769
|
-
return
|
|
5970
|
+
return unwrap31(data);
|
|
5770
5971
|
}
|
|
5771
5972
|
async rollback(deploymentId, params = {}) {
|
|
5772
5973
|
const body5 = stripUndefined16({
|
|
@@ -5780,7 +5981,7 @@ var Deployments = class {
|
|
|
5780
5981
|
headers: { "Idempotency-Key": idempotencyKey4(params.idempotencyKey) }
|
|
5781
5982
|
}
|
|
5782
5983
|
);
|
|
5783
|
-
return
|
|
5984
|
+
return unwrap31(data);
|
|
5784
5985
|
}
|
|
5785
5986
|
async listBuilds(deploymentId) {
|
|
5786
5987
|
const data = await this.http.get(
|
|
@@ -5792,7 +5993,7 @@ var Deployments = class {
|
|
|
5792
5993
|
const data = await this.http.get(
|
|
5793
5994
|
`/deployments/${deploymentId}/builds/${buildId}`
|
|
5794
5995
|
);
|
|
5795
|
-
return
|
|
5996
|
+
return unwrap31(data);
|
|
5796
5997
|
}
|
|
5797
5998
|
async listEnv(deploymentId) {
|
|
5798
5999
|
const data = await this.http.get(
|
|
@@ -5838,7 +6039,7 @@ var RUNTIME_BINARIES = {
|
|
|
5838
6039
|
pi: ["pi"],
|
|
5839
6040
|
custom: []
|
|
5840
6041
|
};
|
|
5841
|
-
function
|
|
6042
|
+
function unwrap32(payload, keys = ["data"]) {
|
|
5842
6043
|
if (payload && typeof payload === "object") {
|
|
5843
6044
|
const p = payload;
|
|
5844
6045
|
for (const key of keys) {
|
|
@@ -5897,7 +6098,7 @@ var Devices = class {
|
|
|
5897
6098
|
/** Show one unified device by id. */
|
|
5898
6099
|
async get(id) {
|
|
5899
6100
|
const data = await this.http.get(`/devices/${devicePath(id)}`);
|
|
5900
|
-
return
|
|
6101
|
+
return unwrap32(data);
|
|
5901
6102
|
}
|
|
5902
6103
|
show(id) {
|
|
5903
6104
|
return this.get(id);
|
|
@@ -5907,7 +6108,7 @@ var Devices = class {
|
|
|
5907
6108
|
const data = await this.http.get(
|
|
5908
6109
|
`/devices/${devicePath(id)}/capabilities`
|
|
5909
6110
|
);
|
|
5910
|
-
return
|
|
6111
|
+
return unwrap32(data);
|
|
5911
6112
|
}
|
|
5912
6113
|
/** Execute a command inside the device. */
|
|
5913
6114
|
async exec(id, params) {
|
|
@@ -5920,7 +6121,7 @@ var Devices = class {
|
|
|
5920
6121
|
env: params.env
|
|
5921
6122
|
})
|
|
5922
6123
|
);
|
|
5923
|
-
return
|
|
6124
|
+
return unwrap32(data);
|
|
5924
6125
|
}
|
|
5925
6126
|
/** List files inside the device filesystem. */
|
|
5926
6127
|
async listFiles(id, params = {}) {
|
|
@@ -5936,7 +6137,7 @@ var Devices = class {
|
|
|
5936
6137
|
`/devices/${devicePath(id)}/files/read`,
|
|
5937
6138
|
queryFromFileParams(params)
|
|
5938
6139
|
);
|
|
5939
|
-
return
|
|
6140
|
+
return unwrap32(data);
|
|
5940
6141
|
}
|
|
5941
6142
|
/** Write a text or base64 payload into the device filesystem. */
|
|
5942
6143
|
async writeFile(id, params) {
|
|
@@ -5948,7 +6149,7 @@ var Devices = class {
|
|
|
5948
6149
|
content_base64: pickFirst5(params.contentBase64, params.content_base64)
|
|
5949
6150
|
})
|
|
5950
6151
|
);
|
|
5951
|
-
return
|
|
6152
|
+
return unwrap32(data);
|
|
5952
6153
|
}
|
|
5953
6154
|
/** Expose a device port through MIOSA routing. */
|
|
5954
6155
|
async expose(id, params) {
|
|
@@ -5956,44 +6157,44 @@ var Devices = class {
|
|
|
5956
6157
|
`/devices/${devicePath(id)}/expose`,
|
|
5957
6158
|
{ port: params.port }
|
|
5958
6159
|
);
|
|
5959
|
-
return
|
|
6160
|
+
return unwrap32(data);
|
|
5960
6161
|
}
|
|
5961
6162
|
/** Return browser/desktop connection details for a computer-backed device. */
|
|
5962
6163
|
async browser(id) {
|
|
5963
6164
|
const data = await this.http.get(`/devices/${devicePath(id)}/browser`);
|
|
5964
|
-
return
|
|
6165
|
+
return unwrap32(data);
|
|
5965
6166
|
}
|
|
5966
6167
|
async pause(id) {
|
|
5967
6168
|
const data = await this.http.post(
|
|
5968
6169
|
`/devices/${devicePath(id)}/pause`,
|
|
5969
6170
|
{}
|
|
5970
6171
|
);
|
|
5971
|
-
return
|
|
6172
|
+
return unwrap32(data);
|
|
5972
6173
|
}
|
|
5973
6174
|
async stop(id) {
|
|
5974
6175
|
const data = await this.http.post(
|
|
5975
6176
|
`/devices/${devicePath(id)}/stop`,
|
|
5976
6177
|
{}
|
|
5977
6178
|
);
|
|
5978
|
-
return
|
|
6179
|
+
return unwrap32(data);
|
|
5979
6180
|
}
|
|
5980
6181
|
async resume(id) {
|
|
5981
6182
|
const data = await this.http.post(
|
|
5982
6183
|
`/devices/${devicePath(id)}/resume`,
|
|
5983
6184
|
{}
|
|
5984
6185
|
);
|
|
5985
|
-
return
|
|
6186
|
+
return unwrap32(data);
|
|
5986
6187
|
}
|
|
5987
6188
|
async extend(id, params) {
|
|
5988
6189
|
const data = await this.http.post(
|
|
5989
6190
|
`/devices/${devicePath(id)}/extend`,
|
|
5990
6191
|
{ timeout_sec: pickFirst5(params.timeoutSec, params.timeout_sec) }
|
|
5991
6192
|
);
|
|
5992
|
-
return
|
|
6193
|
+
return unwrap32(data);
|
|
5993
6194
|
}
|
|
5994
6195
|
async destroy(id) {
|
|
5995
6196
|
const data = await this.http.delete(`/devices/${devicePath(id)}`);
|
|
5996
|
-
return
|
|
6197
|
+
return unwrap32(data);
|
|
5997
6198
|
}
|
|
5998
6199
|
/**
|
|
5999
6200
|
* Write a MIOSA runtime bootstrap manifest and optionally install/probe
|
|
@@ -6163,7 +6364,7 @@ var DockerDeploy = class {
|
|
|
6163
6364
|
};
|
|
6164
6365
|
|
|
6165
6366
|
// src/resources/email.ts
|
|
6166
|
-
function
|
|
6367
|
+
function unwrap33(data) {
|
|
6167
6368
|
if (data && typeof data === "object") {
|
|
6168
6369
|
const d = data;
|
|
6169
6370
|
for (const k of [
|
|
@@ -6215,12 +6416,12 @@ var EmailCampaigns = class {
|
|
|
6215
6416
|
);
|
|
6216
6417
|
}
|
|
6217
6418
|
async create(attrs) {
|
|
6218
|
-
return
|
|
6419
|
+
return unwrap33(
|
|
6219
6420
|
await this.http.post("/admin/email-campaigns", strip(attrs))
|
|
6220
6421
|
);
|
|
6221
6422
|
}
|
|
6222
6423
|
async recipientCount(filters = {}) {
|
|
6223
|
-
return
|
|
6424
|
+
return unwrap33(
|
|
6224
6425
|
await this.http.get(
|
|
6225
6426
|
"/admin/email-campaigns/recipient-count",
|
|
6226
6427
|
filters
|
|
@@ -6228,7 +6429,7 @@ var EmailCampaigns = class {
|
|
|
6228
6429
|
);
|
|
6229
6430
|
}
|
|
6230
6431
|
async send(campaignId, opts = {}) {
|
|
6231
|
-
return
|
|
6432
|
+
return unwrap33(
|
|
6232
6433
|
await this.http.post(
|
|
6233
6434
|
`/admin/email-campaigns/${campaignId}/send`,
|
|
6234
6435
|
strip(opts)
|
|
@@ -6236,7 +6437,7 @@ var EmailCampaigns = class {
|
|
|
6236
6437
|
);
|
|
6237
6438
|
}
|
|
6238
6439
|
async cancel(campaignId) {
|
|
6239
|
-
return
|
|
6440
|
+
return unwrap33(
|
|
6240
6441
|
await this.http.post(
|
|
6241
6442
|
`/admin/email-campaigns/${campaignId}/cancel`
|
|
6242
6443
|
)
|
|
@@ -6262,7 +6463,7 @@ var EmailTemplates = class {
|
|
|
6262
6463
|
);
|
|
6263
6464
|
}
|
|
6264
6465
|
async create(key, attrs = {}) {
|
|
6265
|
-
return
|
|
6466
|
+
return unwrap33(
|
|
6266
6467
|
await this.http.post("/admin/email-templates", {
|
|
6267
6468
|
key,
|
|
6268
6469
|
...strip(attrs)
|
|
@@ -6270,7 +6471,7 @@ var EmailTemplates = class {
|
|
|
6270
6471
|
);
|
|
6271
6472
|
}
|
|
6272
6473
|
async update(key, attrs) {
|
|
6273
|
-
return
|
|
6474
|
+
return unwrap33(
|
|
6274
6475
|
await this.http.put(
|
|
6275
6476
|
`/admin/email-templates/${key}`,
|
|
6276
6477
|
strip(attrs)
|
|
@@ -6278,7 +6479,7 @@ var EmailTemplates = class {
|
|
|
6278
6479
|
);
|
|
6279
6480
|
}
|
|
6280
6481
|
async reset(key) {
|
|
6281
|
-
return
|
|
6482
|
+
return unwrap33(
|
|
6282
6483
|
await this.http.post(`/admin/email-templates/${key}/reset`)
|
|
6283
6484
|
);
|
|
6284
6485
|
}
|
|
@@ -6294,17 +6495,17 @@ var EmailInbox = class {
|
|
|
6294
6495
|
);
|
|
6295
6496
|
}
|
|
6296
6497
|
async send(attrs) {
|
|
6297
|
-
return
|
|
6498
|
+
return unwrap33(
|
|
6298
6499
|
await this.http.post("/admin/email-inbox/send", strip(attrs))
|
|
6299
6500
|
);
|
|
6300
6501
|
}
|
|
6301
6502
|
async markRead(messageId) {
|
|
6302
|
-
return
|
|
6503
|
+
return unwrap33(
|
|
6303
6504
|
await this.http.post(`/admin/email-inbox/${messageId}/read`)
|
|
6304
6505
|
);
|
|
6305
6506
|
}
|
|
6306
6507
|
async archive(messageId) {
|
|
6307
|
-
return
|
|
6508
|
+
return unwrap33(
|
|
6308
6509
|
await this.http.post(`/admin/email-inbox/${messageId}/archive`)
|
|
6309
6510
|
);
|
|
6310
6511
|
}
|
|
@@ -6344,7 +6545,7 @@ var Embeddings = class {
|
|
|
6344
6545
|
};
|
|
6345
6546
|
|
|
6346
6547
|
// src/resources/external-keys.ts
|
|
6347
|
-
function
|
|
6548
|
+
function unwrap34(payload) {
|
|
6348
6549
|
if (payload && typeof payload === "object") {
|
|
6349
6550
|
const p = payload;
|
|
6350
6551
|
for (const k of ["data", "external_keys", "items"]) {
|
|
@@ -6366,7 +6567,7 @@ var ExternalKeys = class {
|
|
|
6366
6567
|
/** List configured external keys. */
|
|
6367
6568
|
async list() {
|
|
6368
6569
|
const data = await this.http.get("/external-keys");
|
|
6369
|
-
const result =
|
|
6570
|
+
const result = unwrap34(data);
|
|
6370
6571
|
if (Array.isArray(result)) return result;
|
|
6371
6572
|
return [];
|
|
6372
6573
|
}
|
|
@@ -6374,14 +6575,14 @@ var ExternalKeys = class {
|
|
|
6374
6575
|
async create(params) {
|
|
6375
6576
|
const body5 = stripUndefined18(params);
|
|
6376
6577
|
const data = await this.http.post("/external-keys", body5);
|
|
6377
|
-
return
|
|
6578
|
+
return unwrap34(data);
|
|
6378
6579
|
}
|
|
6379
6580
|
/** Resolve (preview) the stored key for a provider. */
|
|
6380
6581
|
async resolve(provider) {
|
|
6381
6582
|
const data = await this.http.get(
|
|
6382
6583
|
`/external-keys/${provider}/resolve`
|
|
6383
6584
|
);
|
|
6384
|
-
return
|
|
6585
|
+
return unwrap34(data);
|
|
6385
6586
|
}
|
|
6386
6587
|
/**
|
|
6387
6588
|
* Delete the stored key for a provider.
|
|
@@ -6391,7 +6592,7 @@ var ExternalKeys = class {
|
|
|
6391
6592
|
await this.http.delete(`/external-keys/${provider}`);
|
|
6392
6593
|
}
|
|
6393
6594
|
};
|
|
6394
|
-
function
|
|
6595
|
+
function unwrap35(payload) {
|
|
6395
6596
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6396
6597
|
return payload.data;
|
|
6397
6598
|
}
|
|
@@ -6444,13 +6645,13 @@ var FlatCustomDomains = class {
|
|
|
6444
6645
|
body: body5,
|
|
6445
6646
|
headers: { "Idempotency-Key": idempotencyKey5(ikey) }
|
|
6446
6647
|
});
|
|
6447
|
-
return
|
|
6648
|
+
return unwrap35(data);
|
|
6448
6649
|
}
|
|
6449
6650
|
async delete(domainId) {
|
|
6450
6651
|
await this.http.delete(`/custom-domains/${domainId}`);
|
|
6451
6652
|
}
|
|
6452
6653
|
};
|
|
6453
|
-
function
|
|
6654
|
+
function unwrap36(payload) {
|
|
6454
6655
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6455
6656
|
return payload.data;
|
|
6456
6657
|
}
|
|
@@ -6486,7 +6687,7 @@ var Functions = class {
|
|
|
6486
6687
|
}
|
|
6487
6688
|
async get(functionId) {
|
|
6488
6689
|
const data = await this.http.get(`/functions/${functionId}`);
|
|
6489
|
-
return
|
|
6690
|
+
return unwrap36(data);
|
|
6490
6691
|
}
|
|
6491
6692
|
async create(params) {
|
|
6492
6693
|
const { idempotencyKey: ikey, memoryMb, timeoutSec, ...rest } = params;
|
|
@@ -6500,7 +6701,7 @@ var Functions = class {
|
|
|
6500
6701
|
body: body5,
|
|
6501
6702
|
headers: { "Idempotency-Key": idempotencyKey6(ikey) }
|
|
6502
6703
|
});
|
|
6503
|
-
return
|
|
6704
|
+
return unwrap36(data);
|
|
6504
6705
|
}
|
|
6505
6706
|
async update(functionId, params) {
|
|
6506
6707
|
const { memoryMb, timeoutSec, ...rest } = params;
|
|
@@ -6513,7 +6714,7 @@ var Functions = class {
|
|
|
6513
6714
|
`/functions/${functionId}`,
|
|
6514
6715
|
body5
|
|
6515
6716
|
);
|
|
6516
|
-
return
|
|
6717
|
+
return unwrap36(data);
|
|
6517
6718
|
}
|
|
6518
6719
|
async delete(functionId) {
|
|
6519
6720
|
await this.http.delete(`/functions/${functionId}`);
|
|
@@ -6534,7 +6735,7 @@ var Functions = class {
|
|
|
6534
6735
|
return data ?? {};
|
|
6535
6736
|
}
|
|
6536
6737
|
};
|
|
6537
|
-
function
|
|
6738
|
+
function unwrap37(payload) {
|
|
6538
6739
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
6539
6740
|
return payload.data;
|
|
6540
6741
|
}
|
|
@@ -6570,7 +6771,7 @@ var HealthChecks = class {
|
|
|
6570
6771
|
}
|
|
6571
6772
|
async get(checkId) {
|
|
6572
6773
|
const data = await this.http.get(`/health-checks/${checkId}`);
|
|
6573
|
-
return
|
|
6774
|
+
return unwrap37(data);
|
|
6574
6775
|
}
|
|
6575
6776
|
async create(params) {
|
|
6576
6777
|
const {
|
|
@@ -6591,7 +6792,7 @@ var HealthChecks = class {
|
|
|
6591
6792
|
body: body5,
|
|
6592
6793
|
headers: { "Idempotency-Key": idempotencyKey7(ikey) }
|
|
6593
6794
|
});
|
|
6594
|
-
return
|
|
6795
|
+
return unwrap37(data);
|
|
6595
6796
|
}
|
|
6596
6797
|
async update(checkId, params) {
|
|
6597
6798
|
const { intervalSec, timeoutSec, expectedStatus, ...rest } = params;
|
|
@@ -6605,7 +6806,7 @@ var HealthChecks = class {
|
|
|
6605
6806
|
`/health-checks/${checkId}`,
|
|
6606
6807
|
body5
|
|
6607
6808
|
);
|
|
6608
|
-
return
|
|
6809
|
+
return unwrap37(data);
|
|
6609
6810
|
}
|
|
6610
6811
|
async delete(checkId) {
|
|
6611
6812
|
await this.http.delete(`/health-checks/${checkId}`);
|
|
@@ -6613,7 +6814,7 @@ var HealthChecks = class {
|
|
|
6613
6814
|
};
|
|
6614
6815
|
|
|
6615
6816
|
// src/resources/integrations.ts
|
|
6616
|
-
function
|
|
6817
|
+
function unwrap38(payload) {
|
|
6617
6818
|
if (payload && typeof payload === "object") {
|
|
6618
6819
|
const p = payload;
|
|
6619
6820
|
for (const k of ["data", "integrations", "catalog", "items"]) {
|
|
@@ -6623,7 +6824,7 @@ function unwrap37(payload) {
|
|
|
6623
6824
|
return payload;
|
|
6624
6825
|
}
|
|
6625
6826
|
function listItems8(payload) {
|
|
6626
|
-
const result =
|
|
6827
|
+
const result = unwrap38(payload);
|
|
6627
6828
|
if (Array.isArray(result)) return result;
|
|
6628
6829
|
return [];
|
|
6629
6830
|
}
|
|
@@ -6652,14 +6853,14 @@ var Integrations = class {
|
|
|
6652
6853
|
const data = await this.http.get(
|
|
6653
6854
|
`/integrations/${provider}/start`
|
|
6654
6855
|
);
|
|
6655
|
-
return
|
|
6856
|
+
return unwrap38(data);
|
|
6656
6857
|
}
|
|
6657
6858
|
/** Force-refresh the access token for a provider. */
|
|
6658
6859
|
async refresh(provider) {
|
|
6659
6860
|
const data = await this.http.post(
|
|
6660
6861
|
`/integrations/${provider}/refresh`
|
|
6661
6862
|
);
|
|
6662
|
-
return
|
|
6863
|
+
return unwrap38(data);
|
|
6663
6864
|
}
|
|
6664
6865
|
/** Disconnect (revoke) an integration. */
|
|
6665
6866
|
async disconnect(provider) {
|
|
@@ -6684,7 +6885,7 @@ var Integrations = class {
|
|
|
6684
6885
|
"/integrations/slack/send-test",
|
|
6685
6886
|
body5
|
|
6686
6887
|
);
|
|
6687
|
-
return
|
|
6888
|
+
return unwrap38(data);
|
|
6688
6889
|
}
|
|
6689
6890
|
/** Send a test message to the connected Discord channel. */
|
|
6690
6891
|
async discordSendTest(params = {}) {
|
|
@@ -6693,13 +6894,13 @@ var Integrations = class {
|
|
|
6693
6894
|
"/integrations/discord/send-test",
|
|
6694
6895
|
body5
|
|
6695
6896
|
);
|
|
6696
|
-
return
|
|
6897
|
+
return unwrap38(data);
|
|
6697
6898
|
}
|
|
6698
6899
|
// ── Linear dedicated controller ────────────────────────────────────────────
|
|
6699
6900
|
/** Begin Linear OAuth — Linear has provider-specific error shapes. */
|
|
6700
6901
|
async linearStart() {
|
|
6701
6902
|
const data = await this.http.get("/integrations/linear/start");
|
|
6702
|
-
return
|
|
6903
|
+
return unwrap38(data);
|
|
6703
6904
|
}
|
|
6704
6905
|
/** Create a Linear issue via the connected workspace. */
|
|
6705
6906
|
async linearCreateIssue(params = {}) {
|
|
@@ -6708,12 +6909,12 @@ var Integrations = class {
|
|
|
6708
6909
|
"/integrations/linear/create-issue",
|
|
6709
6910
|
body5
|
|
6710
6911
|
);
|
|
6711
|
-
return
|
|
6912
|
+
return unwrap38(data);
|
|
6712
6913
|
}
|
|
6713
6914
|
};
|
|
6714
6915
|
|
|
6715
6916
|
// src/resources/mcp.ts
|
|
6716
|
-
function
|
|
6917
|
+
function unwrap39(payload) {
|
|
6717
6918
|
if (payload && typeof payload === "object") {
|
|
6718
6919
|
const p = payload;
|
|
6719
6920
|
for (const k of ["data", "mcp", "result", "items"]) {
|
|
@@ -6739,7 +6940,7 @@ var Mcp = class {
|
|
|
6739
6940
|
"/mcp",
|
|
6740
6941
|
Object.keys(body5).length > 0 ? body5 : void 0
|
|
6741
6942
|
);
|
|
6742
|
-
return
|
|
6943
|
+
return unwrap39(data);
|
|
6743
6944
|
}
|
|
6744
6945
|
/**
|
|
6745
6946
|
* Open the MCP listen channel (GET).
|
|
@@ -6749,7 +6950,7 @@ var Mcp = class {
|
|
|
6749
6950
|
*/
|
|
6750
6951
|
async listen() {
|
|
6751
6952
|
const data = await this.http.get("/mcp");
|
|
6752
|
-
return
|
|
6953
|
+
return unwrap39(data);
|
|
6753
6954
|
}
|
|
6754
6955
|
/** Close (terminate) the MCP session. */
|
|
6755
6956
|
async close() {
|
|
@@ -6758,7 +6959,7 @@ var Mcp = class {
|
|
|
6758
6959
|
};
|
|
6759
6960
|
|
|
6760
6961
|
// src/resources/models.ts
|
|
6761
|
-
function
|
|
6962
|
+
function unwrap40(data) {
|
|
6762
6963
|
if (Array.isArray(data)) return data;
|
|
6763
6964
|
if (data && typeof data === "object") {
|
|
6764
6965
|
const d = data;
|
|
@@ -6779,7 +6980,7 @@ var Models = class {
|
|
|
6779
6980
|
Object.entries(filters).filter(([, v]) => v !== void 0)
|
|
6780
6981
|
);
|
|
6781
6982
|
const data = await this.http.get("/intelligence/models", query3);
|
|
6782
|
-
return
|
|
6983
|
+
return unwrap40(data);
|
|
6783
6984
|
}
|
|
6784
6985
|
/**
|
|
6785
6986
|
* Get a single model by id.
|
|
@@ -7435,7 +7636,7 @@ function requestBody(params) {
|
|
|
7435
7636
|
config: authConfig(params)
|
|
7436
7637
|
});
|
|
7437
7638
|
}
|
|
7438
|
-
function
|
|
7639
|
+
function unwrap41(payload) {
|
|
7439
7640
|
if (payload && typeof payload === "object") {
|
|
7440
7641
|
const p = payload;
|
|
7441
7642
|
for (const k of ["data", "project_auth", "config", "items"]) {
|
|
@@ -7460,13 +7661,13 @@ var ProjectAuth = class {
|
|
|
7460
7661
|
"/project-auth/status",
|
|
7461
7662
|
resourcePayload(params)
|
|
7462
7663
|
);
|
|
7463
|
-
return
|
|
7664
|
+
return unwrap41(data);
|
|
7464
7665
|
}
|
|
7465
7666
|
/** Enable project auth. */
|
|
7466
7667
|
async enable(params) {
|
|
7467
7668
|
const body5 = requestBody(params);
|
|
7468
7669
|
const data = await this.http.post("/project-auth/enable", body5);
|
|
7469
|
-
return
|
|
7670
|
+
return unwrap41(data);
|
|
7470
7671
|
}
|
|
7471
7672
|
/** Disable project auth. */
|
|
7472
7673
|
async disable(params) {
|
|
@@ -7474,18 +7675,18 @@ var ProjectAuth = class {
|
|
|
7474
7675
|
"/project-auth/disable",
|
|
7475
7676
|
resourcePayload(params)
|
|
7476
7677
|
);
|
|
7477
|
-
return
|
|
7678
|
+
return unwrap41(data);
|
|
7478
7679
|
}
|
|
7479
7680
|
/** Update project-auth configuration. */
|
|
7480
7681
|
async update(params) {
|
|
7481
7682
|
const body5 = requestBody(params);
|
|
7482
7683
|
const data = await this.http.patch("/project-auth/config", body5);
|
|
7483
|
-
return
|
|
7684
|
+
return unwrap41(data);
|
|
7484
7685
|
}
|
|
7485
7686
|
};
|
|
7486
7687
|
|
|
7487
7688
|
// src/resources/project-integrations.ts
|
|
7488
|
-
function
|
|
7689
|
+
function unwrap42(payload) {
|
|
7489
7690
|
if (payload && typeof payload === "object") {
|
|
7490
7691
|
const p = payload;
|
|
7491
7692
|
for (const k of ["data", "project_integrations", "catalog", "items"]) {
|
|
@@ -7495,7 +7696,7 @@ function unwrap41(payload) {
|
|
|
7495
7696
|
return payload;
|
|
7496
7697
|
}
|
|
7497
7698
|
function listItems9(payload) {
|
|
7498
|
-
const result =
|
|
7699
|
+
const result = unwrap42(payload);
|
|
7499
7700
|
if (Array.isArray(result)) return result;
|
|
7500
7701
|
return [];
|
|
7501
7702
|
}
|
|
@@ -7530,13 +7731,13 @@ var ProjectIntegrations = class {
|
|
|
7530
7731
|
const data = await this.http.get(
|
|
7531
7732
|
`/project-integrations/${integrationId}`
|
|
7532
7733
|
);
|
|
7533
|
-
return
|
|
7734
|
+
return unwrap42(data);
|
|
7534
7735
|
}
|
|
7535
7736
|
/** Create a project integration. */
|
|
7536
7737
|
async create(params) {
|
|
7537
7738
|
const body5 = stripUndefObj2(params);
|
|
7538
7739
|
const data = await this.http.post("/project-integrations", body5);
|
|
7539
|
-
return
|
|
7740
|
+
return unwrap42(data);
|
|
7540
7741
|
}
|
|
7541
7742
|
/** Update a project integration. */
|
|
7542
7743
|
async update(integrationId, params) {
|
|
@@ -7545,7 +7746,7 @@ var ProjectIntegrations = class {
|
|
|
7545
7746
|
`/project-integrations/${integrationId}`,
|
|
7546
7747
|
body5
|
|
7547
7748
|
);
|
|
7548
|
-
return
|
|
7749
|
+
return unwrap42(data);
|
|
7549
7750
|
}
|
|
7550
7751
|
/** Delete a project integration. */
|
|
7551
7752
|
async delete(integrationId) {
|
|
@@ -7554,7 +7755,7 @@ var ProjectIntegrations = class {
|
|
|
7554
7755
|
};
|
|
7555
7756
|
|
|
7556
7757
|
// src/resources/provider-defaults.ts
|
|
7557
|
-
function
|
|
7758
|
+
function unwrap43(data) {
|
|
7558
7759
|
if (data && typeof data === "object") {
|
|
7559
7760
|
const d = data;
|
|
7560
7761
|
for (const k of ["data", "defaults", "provider_defaults", "config"]) {
|
|
@@ -7570,7 +7771,7 @@ var ProviderDefaults = class {
|
|
|
7570
7771
|
http;
|
|
7571
7772
|
/** Get the current fleet-wide provider defaults. */
|
|
7572
7773
|
async list() {
|
|
7573
|
-
return
|
|
7774
|
+
return unwrap43(await this.http.get("/admin/provider-defaults"));
|
|
7574
7775
|
}
|
|
7575
7776
|
/** Return the defaults entry for a single provider, or {} if missing. */
|
|
7576
7777
|
async get(provider) {
|
|
@@ -7586,13 +7787,13 @@ var ProviderDefaults = class {
|
|
|
7586
7787
|
const body5 = Object.fromEntries(
|
|
7587
7788
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
7588
7789
|
);
|
|
7589
|
-
return
|
|
7790
|
+
return unwrap43(
|
|
7590
7791
|
await this.http.put("/admin/provider-defaults", body5)
|
|
7591
7792
|
);
|
|
7592
7793
|
}
|
|
7593
7794
|
// ── Per-tenant overrides ────────────────────────────────────────────────
|
|
7594
7795
|
async getTenant(tenantId) {
|
|
7595
|
-
return
|
|
7796
|
+
return unwrap43(
|
|
7596
7797
|
await this.http.get(
|
|
7597
7798
|
`/admin/tenants/${tenantId}/provider-config`
|
|
7598
7799
|
)
|
|
@@ -7602,7 +7803,7 @@ var ProviderDefaults = class {
|
|
|
7602
7803
|
const body5 = Object.fromEntries(
|
|
7603
7804
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
7604
7805
|
);
|
|
7605
|
-
return
|
|
7806
|
+
return unwrap43(
|
|
7606
7807
|
await this.http.put(
|
|
7607
7808
|
`/admin/tenants/${tenantId}/provider-config`,
|
|
7608
7809
|
body5
|
|
@@ -7615,7 +7816,7 @@ var ProviderDefaults = class {
|
|
|
7615
7816
|
};
|
|
7616
7817
|
|
|
7617
7818
|
// src/resources/regions.ts
|
|
7618
|
-
function
|
|
7819
|
+
function unwrap44(payload) {
|
|
7619
7820
|
if (payload && typeof payload === "object") {
|
|
7620
7821
|
const p = payload;
|
|
7621
7822
|
for (const k of [
|
|
@@ -7632,7 +7833,7 @@ function unwrap43(payload) {
|
|
|
7632
7833
|
return payload;
|
|
7633
7834
|
}
|
|
7634
7835
|
function listItems10(payload) {
|
|
7635
|
-
const result =
|
|
7836
|
+
const result = unwrap44(payload);
|
|
7636
7837
|
if (Array.isArray(result)) return result;
|
|
7637
7838
|
return [];
|
|
7638
7839
|
}
|
|
@@ -7649,7 +7850,7 @@ var Regions = class {
|
|
|
7649
7850
|
/** Get canonical compute catalog, including product templates and readiness. */
|
|
7650
7851
|
async catalog() {
|
|
7651
7852
|
const data = await this.http.get("/compute/catalog");
|
|
7652
|
-
return
|
|
7853
|
+
return unwrap44(data);
|
|
7653
7854
|
}
|
|
7654
7855
|
/** List available compute sizes. */
|
|
7655
7856
|
async listSizes() {
|
|
@@ -7659,7 +7860,7 @@ var Regions = class {
|
|
|
7659
7860
|
/** Get static compute pricing data. */
|
|
7660
7861
|
async pricing() {
|
|
7661
7862
|
const data = await this.http.get("/compute/pricing");
|
|
7662
|
-
return
|
|
7863
|
+
return unwrap44(data);
|
|
7663
7864
|
}
|
|
7664
7865
|
/** List community computer templates. */
|
|
7665
7866
|
async listTemplates() {
|
|
@@ -7671,12 +7872,12 @@ var Regions = class {
|
|
|
7671
7872
|
const data = await this.http.get(
|
|
7672
7873
|
`/compute/templates/${templateId}`
|
|
7673
7874
|
);
|
|
7674
|
-
return
|
|
7875
|
+
return unwrap44(data);
|
|
7675
7876
|
}
|
|
7676
7877
|
};
|
|
7677
7878
|
|
|
7678
7879
|
// src/resources/runtime-env.ts
|
|
7679
|
-
function
|
|
7880
|
+
function unwrap45(payload) {
|
|
7680
7881
|
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
7681
7882
|
return payload.data;
|
|
7682
7883
|
}
|
|
@@ -7729,11 +7930,11 @@ var RuntimeEnv = class {
|
|
|
7729
7930
|
"/runtime-env",
|
|
7730
7931
|
query2(params)
|
|
7731
7932
|
);
|
|
7732
|
-
return
|
|
7933
|
+
return unwrap45(response).map(normalize2);
|
|
7733
7934
|
}
|
|
7734
7935
|
async get(id) {
|
|
7735
7936
|
return normalize2(
|
|
7736
|
-
|
|
7937
|
+
unwrap45(
|
|
7737
7938
|
await this.http.get(
|
|
7738
7939
|
`/runtime-env/${encodeURIComponent(id)}`
|
|
7739
7940
|
)
|
|
@@ -7742,7 +7943,7 @@ var RuntimeEnv = class {
|
|
|
7742
7943
|
}
|
|
7743
7944
|
async set(params) {
|
|
7744
7945
|
return normalize2(
|
|
7745
|
-
|
|
7946
|
+
unwrap45(
|
|
7746
7947
|
await this.http.post(
|
|
7747
7948
|
"/runtime-env",
|
|
7748
7949
|
body4(params)
|
|
@@ -7756,7 +7957,7 @@ var RuntimeEnv = class {
|
|
|
7756
7957
|
};
|
|
7757
7958
|
|
|
7758
7959
|
// src/resources/runtime-capabilities.ts
|
|
7759
|
-
function
|
|
7960
|
+
function unwrap46(payload) {
|
|
7760
7961
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
7761
7962
|
return payload.data;
|
|
7762
7963
|
}
|
|
@@ -7768,7 +7969,7 @@ var RuntimeCapabilitiesResource = class {
|
|
|
7768
7969
|
}
|
|
7769
7970
|
http;
|
|
7770
7971
|
async get() {
|
|
7771
|
-
return
|
|
7972
|
+
return unwrap46(
|
|
7772
7973
|
await this.http.get("/runtime-capabilities")
|
|
7773
7974
|
);
|
|
7774
7975
|
}
|
|
@@ -7798,7 +7999,7 @@ var AGENT_WORKSPACE_KEEP_LAST_SNAPSHOTS = 1;
|
|
|
7798
7999
|
function isLegacyForkParams(opts) {
|
|
7799
8000
|
return "name" in opts || "metadata" in opts;
|
|
7800
8001
|
}
|
|
7801
|
-
function
|
|
8002
|
+
function unwrap47(payload) {
|
|
7802
8003
|
if (payload !== null && typeof payload === "object" && "data" in payload && payload.data !== void 0) {
|
|
7803
8004
|
return payload.data;
|
|
7804
8005
|
}
|
|
@@ -7901,6 +8102,12 @@ function createBody(params = {}) {
|
|
|
7901
8102
|
slug: params.slug,
|
|
7902
8103
|
agent_runtime_profile_id: params.agentRuntimeProfileId ?? params.agent_runtime_profile_id ?? params.agentProfileId ?? params.agent_profile_id,
|
|
7903
8104
|
skip_agent_runtime_profile: params.skipRuntimeProfile ?? params.skip_agent_runtime_profile,
|
|
8105
|
+
workspace_id: params.workspaceId ?? params.workspace_id,
|
|
8106
|
+
workspace_slug: params.workspaceSlug ?? params.workspace_slug,
|
|
8107
|
+
workspace_name: params.workspaceName ?? params.workspace_name,
|
|
8108
|
+
project_id: params.projectId ?? params.project_id,
|
|
8109
|
+
project_slug: params.projectSlug ?? params.project_slug,
|
|
8110
|
+
project_name: params.projectName ?? params.project_name,
|
|
7904
8111
|
external_workspace_id: params.externalWorkspaceId ?? params.external_workspace_id,
|
|
7905
8112
|
external_user_id: params.externalUserId ?? params.external_user_id,
|
|
7906
8113
|
external_project_id: params.externalProjectId ?? params.external_project_id
|
|
@@ -8059,7 +8266,7 @@ var SandboxTerminal = class {
|
|
|
8059
8266
|
const body5 = Object.fromEntries(
|
|
8060
8267
|
Object.entries(params).filter(([, v]) => v !== void 0)
|
|
8061
8268
|
);
|
|
8062
|
-
const response =
|
|
8269
|
+
const response = unwrap47(
|
|
8063
8270
|
await this.sandbox.http.post(`/sandboxes/${this.sandbox.id}/terminal`, body5)
|
|
8064
8271
|
);
|
|
8065
8272
|
return response;
|
|
@@ -8117,7 +8324,7 @@ var SandboxPreviews = class {
|
|
|
8117
8324
|
Object.entries(opts).filter(([, v]) => v !== void 0)
|
|
8118
8325
|
)
|
|
8119
8326
|
};
|
|
8120
|
-
return
|
|
8327
|
+
return unwrap47(
|
|
8121
8328
|
await this.http.post(
|
|
8122
8329
|
`/sandboxes/${this.sandbox.id}/previews`,
|
|
8123
8330
|
body5
|
|
@@ -8125,7 +8332,7 @@ var SandboxPreviews = class {
|
|
|
8125
8332
|
);
|
|
8126
8333
|
}
|
|
8127
8334
|
async get(previewId) {
|
|
8128
|
-
return
|
|
8335
|
+
return unwrap47(
|
|
8129
8336
|
await this.http.get(
|
|
8130
8337
|
`/sandboxes/${this.sandbox.id}/previews/${previewId}`
|
|
8131
8338
|
)
|
|
@@ -8138,7 +8345,7 @@ var SandboxPreviews = class {
|
|
|
8138
8345
|
}
|
|
8139
8346
|
/** Mint a share token for previewId. */
|
|
8140
8347
|
async share(previewId, opts = {}) {
|
|
8141
|
-
return
|
|
8348
|
+
return unwrap47(
|
|
8142
8349
|
await this.http.post(
|
|
8143
8350
|
`/sandboxes/${this.sandbox.id}/previews/${previewId}/share`,
|
|
8144
8351
|
{ ttl_seconds: opts.ttl_seconds ?? opts.expires_in_sec ?? 3600 }
|
|
@@ -8207,7 +8414,7 @@ var SandboxTags = class {
|
|
|
8207
8414
|
sandbox;
|
|
8208
8415
|
/** Replace the full tag list with tags. */
|
|
8209
8416
|
async set(tags) {
|
|
8210
|
-
return
|
|
8417
|
+
return unwrap47(
|
|
8211
8418
|
await this.sandbox.http.patch(`/sandboxes/${this.sandbox.id}/tags`, { tags })
|
|
8212
8419
|
);
|
|
8213
8420
|
}
|
|
@@ -8281,7 +8488,7 @@ var Sandbox = class _Sandbox {
|
|
|
8281
8488
|
return this.data.template_id ?? this.data.image_id ?? "";
|
|
8282
8489
|
}
|
|
8283
8490
|
async refresh() {
|
|
8284
|
-
this.data =
|
|
8491
|
+
this.data = unwrap47(
|
|
8285
8492
|
await this.http.get(`/sandboxes/${this.id}`)
|
|
8286
8493
|
);
|
|
8287
8494
|
return this;
|
|
@@ -8323,7 +8530,7 @@ var Sandbox = class _Sandbox {
|
|
|
8323
8530
|
}
|
|
8324
8531
|
async runExec(command, options) {
|
|
8325
8532
|
this.assertRunning("exec");
|
|
8326
|
-
const response =
|
|
8533
|
+
const response = unwrap47(
|
|
8327
8534
|
await this.http.post(
|
|
8328
8535
|
`/sandboxes/${this.id}/exec`,
|
|
8329
8536
|
execBody(command, options)
|
|
@@ -8368,7 +8575,7 @@ var Sandbox = class _Sandbox {
|
|
|
8368
8575
|
}
|
|
8369
8576
|
async createExport(params) {
|
|
8370
8577
|
const body5 = typeof params === "string" ? { path: params } : Array.isArray(params) ? { paths: params } : params;
|
|
8371
|
-
const response =
|
|
8578
|
+
const response = unwrap47(
|
|
8372
8579
|
await this.http.post(
|
|
8373
8580
|
`/sandboxes/${this.id}/exports`,
|
|
8374
8581
|
body5
|
|
@@ -8393,7 +8600,7 @@ var Sandbox = class _Sandbox {
|
|
|
8393
8600
|
}
|
|
8394
8601
|
async listFiles(path = "/workspace") {
|
|
8395
8602
|
this.assertRunning("files.list");
|
|
8396
|
-
const response =
|
|
8603
|
+
const response = unwrap47(
|
|
8397
8604
|
await this.http.get(
|
|
8398
8605
|
`/sandboxes/${this.id}/files`,
|
|
8399
8606
|
{ path }
|
|
@@ -8403,7 +8610,7 @@ var Sandbox = class _Sandbox {
|
|
|
8403
8610
|
}
|
|
8404
8611
|
async statFile(path) {
|
|
8405
8612
|
this.assertRunning("files.stat");
|
|
8406
|
-
return
|
|
8613
|
+
return unwrap47(
|
|
8407
8614
|
await this.http.post(
|
|
8408
8615
|
`/sandboxes/${this.id}/files/stat`,
|
|
8409
8616
|
{ path }
|
|
@@ -8423,7 +8630,7 @@ var Sandbox = class _Sandbox {
|
|
|
8423
8630
|
}
|
|
8424
8631
|
async exposeInfo(port) {
|
|
8425
8632
|
this.assertRunning("expose");
|
|
8426
|
-
const response =
|
|
8633
|
+
const response = unwrap47(
|
|
8427
8634
|
await this.http.post(
|
|
8428
8635
|
`/sandboxes/${this.id}/expose`,
|
|
8429
8636
|
port === void 0 ? {} : { port }
|
|
@@ -8433,7 +8640,7 @@ var Sandbox = class _Sandbox {
|
|
|
8433
8640
|
}
|
|
8434
8641
|
async startTemplate(options = {}) {
|
|
8435
8642
|
this.assertRunning("startTemplate");
|
|
8436
|
-
return
|
|
8643
|
+
return unwrap47(
|
|
8437
8644
|
await this.http.post(
|
|
8438
8645
|
`/sandboxes/${this.id}/template/start`,
|
|
8439
8646
|
options
|
|
@@ -8441,7 +8648,7 @@ var Sandbox = class _Sandbox {
|
|
|
8441
8648
|
);
|
|
8442
8649
|
}
|
|
8443
8650
|
async getArtifacts() {
|
|
8444
|
-
return
|
|
8651
|
+
return unwrap47(
|
|
8445
8652
|
await this.http.get(
|
|
8446
8653
|
`/sandboxes/${this.id}/artifacts`
|
|
8447
8654
|
)
|
|
@@ -8452,7 +8659,7 @@ var Sandbox = class _Sandbox {
|
|
|
8452
8659
|
`/sandboxes/${this.id}/logs`,
|
|
8453
8660
|
{ lines }
|
|
8454
8661
|
);
|
|
8455
|
-
return
|
|
8662
|
+
return unwrap47(response);
|
|
8456
8663
|
}
|
|
8457
8664
|
streamLogs() {
|
|
8458
8665
|
return this.http.stream(
|
|
@@ -8460,7 +8667,7 @@ var Sandbox = class _Sandbox {
|
|
|
8460
8667
|
);
|
|
8461
8668
|
}
|
|
8462
8669
|
async metrics(window2 = "1h") {
|
|
8463
|
-
return
|
|
8670
|
+
return unwrap47(
|
|
8464
8671
|
await this.http.get(
|
|
8465
8672
|
`/sandboxes/${this.id}/metrics`,
|
|
8466
8673
|
{ window: window2 }
|
|
@@ -8472,7 +8679,7 @@ var Sandbox = class _Sandbox {
|
|
|
8472
8679
|
}
|
|
8473
8680
|
async createSnapshot(comment) {
|
|
8474
8681
|
this.assertRunning("snapshots.create");
|
|
8475
|
-
return
|
|
8682
|
+
return unwrap47(
|
|
8476
8683
|
await this.http.post(
|
|
8477
8684
|
`/sandboxes/${this.id}/snapshots`,
|
|
8478
8685
|
comment ? { comment } : {}
|
|
@@ -8480,14 +8687,14 @@ var Sandbox = class _Sandbox {
|
|
|
8480
8687
|
);
|
|
8481
8688
|
}
|
|
8482
8689
|
async listSnapshots() {
|
|
8483
|
-
return
|
|
8690
|
+
return unwrap47(
|
|
8484
8691
|
await this.http.get(
|
|
8485
8692
|
`/sandboxes/${this.id}/snapshots`
|
|
8486
8693
|
)
|
|
8487
8694
|
);
|
|
8488
8695
|
}
|
|
8489
8696
|
async restoreSnapshot(snapshotId) {
|
|
8490
|
-
const data =
|
|
8697
|
+
const data = unwrap47(
|
|
8491
8698
|
await this.http.post(
|
|
8492
8699
|
`/sandboxes/${this.id}/restore/${snapshotId}`,
|
|
8493
8700
|
{}
|
|
@@ -8508,7 +8715,7 @@ var Sandbox = class _Sandbox {
|
|
|
8508
8715
|
template_id: opts.templateId ?? opts.template_id
|
|
8509
8716
|
});
|
|
8510
8717
|
const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
|
|
8511
|
-
const data =
|
|
8718
|
+
const data = unwrap47(
|
|
8512
8719
|
await this.http.request(
|
|
8513
8720
|
`/sandboxes/${this.id}/fork`,
|
|
8514
8721
|
{
|
|
@@ -8530,7 +8737,7 @@ var Sandbox = class _Sandbox {
|
|
|
8530
8737
|
metadata: opts.metadata
|
|
8531
8738
|
});
|
|
8532
8739
|
const idempotencyKey11 = opts.idempotencyKey ?? opts.idempotency_key;
|
|
8533
|
-
const data =
|
|
8740
|
+
const data = unwrap47(
|
|
8534
8741
|
await this.http.request(
|
|
8535
8742
|
`/sandboxes/${this.id}/fork`,
|
|
8536
8743
|
{
|
|
@@ -8566,7 +8773,7 @@ var Sandbox = class _Sandbox {
|
|
|
8566
8773
|
timeout_sec: params.timeout_sec ?? params.timeoutSec,
|
|
8567
8774
|
idle_timeout_sec: params.idle_timeout_sec ?? params.idleTimeoutSec
|
|
8568
8775
|
});
|
|
8569
|
-
const data =
|
|
8776
|
+
const data = unwrap47(
|
|
8570
8777
|
await this.http.patch(
|
|
8571
8778
|
`/sandboxes/${this.id}`,
|
|
8572
8779
|
body5
|
|
@@ -8576,7 +8783,7 @@ var Sandbox = class _Sandbox {
|
|
|
8576
8783
|
return this;
|
|
8577
8784
|
}
|
|
8578
8785
|
async extend(timeoutSec) {
|
|
8579
|
-
const data =
|
|
8786
|
+
const data = unwrap47(
|
|
8580
8787
|
await this.http.post(
|
|
8581
8788
|
`/sandboxes/${this.id}/extend`,
|
|
8582
8789
|
timeoutSec === void 0 ? {} : { timeout_sec: timeoutSec }
|
|
@@ -8586,7 +8793,7 @@ var Sandbox = class _Sandbox {
|
|
|
8586
8793
|
return this;
|
|
8587
8794
|
}
|
|
8588
8795
|
async usage() {
|
|
8589
|
-
return
|
|
8796
|
+
return unwrap47(
|
|
8590
8797
|
await this.http.get(
|
|
8591
8798
|
`/sandboxes/${this.id}/usage`
|
|
8592
8799
|
)
|
|
@@ -8606,7 +8813,7 @@ var Sandbox = class _Sandbox {
|
|
|
8606
8813
|
return raw;
|
|
8607
8814
|
}
|
|
8608
8815
|
async pause() {
|
|
8609
|
-
const data =
|
|
8816
|
+
const data = unwrap47(
|
|
8610
8817
|
await this.http.post(
|
|
8611
8818
|
`/sandboxes/${this.id}/pause`,
|
|
8612
8819
|
{}
|
|
@@ -8627,7 +8834,7 @@ var Sandbox = class _Sandbox {
|
|
|
8627
8834
|
`/sandboxes/${this.id}/resume`,
|
|
8628
8835
|
{}
|
|
8629
8836
|
);
|
|
8630
|
-
const data =
|
|
8837
|
+
const data = unwrap47(response);
|
|
8631
8838
|
this.data = { ...this.data, ...data };
|
|
8632
8839
|
return this;
|
|
8633
8840
|
}
|
|
@@ -8658,7 +8865,7 @@ var Sandbox = class _Sandbox {
|
|
|
8658
8865
|
if (idempotencyKey11) {
|
|
8659
8866
|
requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
|
|
8660
8867
|
}
|
|
8661
|
-
return
|
|
8868
|
+
return unwrap47(
|
|
8662
8869
|
await this.http.request(
|
|
8663
8870
|
`/sandboxes/${this.id}/deploy`,
|
|
8664
8871
|
requestOptions
|
|
@@ -8670,7 +8877,7 @@ var Sandbox = class _Sandbox {
|
|
|
8670
8877
|
}
|
|
8671
8878
|
/** Check readiness of the sandbox (GET /sandboxes/:id/readiness). */
|
|
8672
8879
|
async readiness() {
|
|
8673
|
-
return
|
|
8880
|
+
return unwrap47(
|
|
8674
8881
|
await this.http.get(
|
|
8675
8882
|
`/sandboxes/${this.id}/readiness`
|
|
8676
8883
|
)
|
|
@@ -8838,7 +9045,7 @@ var Sandboxes = class {
|
|
|
8838
9045
|
if (idempotencyKey11) {
|
|
8839
9046
|
requestOptions.headers = { "Idempotency-Key": idempotencyKey11 };
|
|
8840
9047
|
}
|
|
8841
|
-
const data =
|
|
9048
|
+
const data = unwrap47(
|
|
8842
9049
|
await this.http.request(
|
|
8843
9050
|
"/sandboxes",
|
|
8844
9051
|
requestOptions
|
|
@@ -8857,7 +9064,7 @@ var Sandboxes = class {
|
|
|
8857
9064
|
return listItems11(data).map((item) => new Sandbox(this.http, item));
|
|
8858
9065
|
}
|
|
8859
9066
|
async get(id) {
|
|
8860
|
-
const data =
|
|
9067
|
+
const data = unwrap47(
|
|
8861
9068
|
await this.http.get(`/sandboxes/${id}`)
|
|
8862
9069
|
);
|
|
8863
9070
|
return new Sandbox(this.http, data);
|
|
@@ -8885,7 +9092,7 @@ var Sandboxes = class {
|
|
|
8885
9092
|
return this.get(id);
|
|
8886
9093
|
}
|
|
8887
9094
|
async getByName(name) {
|
|
8888
|
-
const data =
|
|
9095
|
+
const data = unwrap47(
|
|
8889
9096
|
await this.http.get(
|
|
8890
9097
|
`/sandboxes/by-name/${encodeURIComponent(name)}`
|
|
8891
9098
|
)
|
|
@@ -8932,7 +9139,7 @@ var Sandboxes = class {
|
|
|
8932
9139
|
);
|
|
8933
9140
|
}
|
|
8934
9141
|
async validateBuildSpec(buildSpec) {
|
|
8935
|
-
return
|
|
9142
|
+
return unwrap47(
|
|
8936
9143
|
await this.http.post(
|
|
8937
9144
|
"/sandbox-templates/validate",
|
|
8938
9145
|
{
|
|
@@ -8952,7 +9159,7 @@ var Sandboxes = class {
|
|
|
8952
9159
|
metadata: params.metadata
|
|
8953
9160
|
})
|
|
8954
9161
|
);
|
|
8955
|
-
return
|
|
9162
|
+
return unwrap47(response);
|
|
8956
9163
|
}
|
|
8957
9164
|
async createTemplateBuild(templateId, params = {}) {
|
|
8958
9165
|
const response = await this.http.post(
|
|
@@ -8962,19 +9169,19 @@ var Sandboxes = class {
|
|
|
8962
9169
|
metadata: params.metadata
|
|
8963
9170
|
})
|
|
8964
9171
|
);
|
|
8965
|
-
return
|
|
9172
|
+
return unwrap47(response);
|
|
8966
9173
|
}
|
|
8967
9174
|
async listTemplateBuilds(templateId) {
|
|
8968
9175
|
const response = await this.http.get(
|
|
8969
9176
|
`/sandbox-templates/${templateId}/builds`
|
|
8970
9177
|
);
|
|
8971
|
-
return
|
|
9178
|
+
return unwrap47(response);
|
|
8972
9179
|
}
|
|
8973
9180
|
async getTemplateBuild(buildId) {
|
|
8974
9181
|
const response = await this.http.get(
|
|
8975
9182
|
`/sandbox-template-builds/${buildId}`
|
|
8976
9183
|
);
|
|
8977
|
-
return
|
|
9184
|
+
return unwrap47(response);
|
|
8978
9185
|
}
|
|
8979
9186
|
};
|
|
8980
9187
|
function toBase642(bytes) {
|
|
@@ -9006,7 +9213,7 @@ function previewInfoFromResponse(response) {
|
|
|
9006
9213
|
)
|
|
9007
9214
|
};
|
|
9008
9215
|
}
|
|
9009
|
-
function
|
|
9216
|
+
function unwrap48(payload) {
|
|
9010
9217
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9011
9218
|
return payload.data;
|
|
9012
9219
|
}
|
|
@@ -9049,7 +9256,7 @@ var SandboxTemplates = class {
|
|
|
9049
9256
|
const data = await this.http.get(
|
|
9050
9257
|
`/sandbox-templates/${templateId}`
|
|
9051
9258
|
);
|
|
9052
|
-
return
|
|
9259
|
+
return unwrap48(data);
|
|
9053
9260
|
}
|
|
9054
9261
|
async create(params) {
|
|
9055
9262
|
const {
|
|
@@ -9069,7 +9276,7 @@ var SandboxTemplates = class {
|
|
|
9069
9276
|
body: body5,
|
|
9070
9277
|
headers: { "Idempotency-Key": idempotencyKey8(ikey) }
|
|
9071
9278
|
});
|
|
9072
|
-
return
|
|
9279
|
+
return unwrap48(data);
|
|
9073
9280
|
}
|
|
9074
9281
|
async buildSpecSchema() {
|
|
9075
9282
|
const data = await this.http.get("/sandbox-templates/build-spec");
|
|
@@ -9102,12 +9309,12 @@ var SandboxTemplates = class {
|
|
|
9102
9309
|
headers: { "Idempotency-Key": idempotencyKey8(ikey) }
|
|
9103
9310
|
}
|
|
9104
9311
|
);
|
|
9105
|
-
return
|
|
9312
|
+
return unwrap48(data);
|
|
9106
9313
|
}
|
|
9107
9314
|
};
|
|
9108
9315
|
|
|
9109
9316
|
// src/resources/settings.ts
|
|
9110
|
-
function
|
|
9317
|
+
function unwrap49(payload) {
|
|
9111
9318
|
if (payload && typeof payload === "object") {
|
|
9112
9319
|
const p = payload;
|
|
9113
9320
|
for (const k of [
|
|
@@ -9123,7 +9330,7 @@ function unwrap48(payload) {
|
|
|
9123
9330
|
return payload;
|
|
9124
9331
|
}
|
|
9125
9332
|
function listItems13(payload) {
|
|
9126
|
-
const result =
|
|
9333
|
+
const result = unwrap49(payload);
|
|
9127
9334
|
if (Array.isArray(result)) return result;
|
|
9128
9335
|
return [];
|
|
9129
9336
|
}
|
|
@@ -9140,46 +9347,46 @@ var Settings = class {
|
|
|
9140
9347
|
/** Get the current tenant settings. */
|
|
9141
9348
|
async get() {
|
|
9142
9349
|
const data = await this.http.get("/settings");
|
|
9143
|
-
return
|
|
9350
|
+
return unwrap49(data);
|
|
9144
9351
|
}
|
|
9145
9352
|
/** Update tenant settings. */
|
|
9146
9353
|
async update(params) {
|
|
9147
9354
|
const body5 = stripUndefined28(params);
|
|
9148
9355
|
const data = await this.http.put("/settings", body5);
|
|
9149
|
-
return
|
|
9356
|
+
return unwrap49(data);
|
|
9150
9357
|
}
|
|
9151
9358
|
// ── Branding ──────────────────────────────────────────────────────────────
|
|
9152
9359
|
/** Get tenant branding (logo, colors, custom wordmark). */
|
|
9153
9360
|
async getBranding() {
|
|
9154
9361
|
const data = await this.http.get("/settings/branding");
|
|
9155
|
-
return
|
|
9362
|
+
return unwrap49(data);
|
|
9156
9363
|
}
|
|
9157
9364
|
/** Update tenant branding. */
|
|
9158
9365
|
async updateBranding(params) {
|
|
9159
9366
|
const body5 = stripUndefined28(params);
|
|
9160
9367
|
const data = await this.http.put("/settings/branding", body5);
|
|
9161
|
-
return
|
|
9368
|
+
return unwrap49(data);
|
|
9162
9369
|
}
|
|
9163
9370
|
// ── Read-only reference data ───────────────────────────────────────────────
|
|
9164
9371
|
/** Get tenant-scoped compute pricing. */
|
|
9165
9372
|
async computePricing() {
|
|
9166
9373
|
const data = await this.http.get("/settings/compute-pricing");
|
|
9167
|
-
return
|
|
9374
|
+
return unwrap49(data);
|
|
9168
9375
|
}
|
|
9169
9376
|
/** Get tenant-scoped GPU pricing. */
|
|
9170
9377
|
async gpuPricing() {
|
|
9171
9378
|
const data = await this.http.get("/settings/gpu-pricing");
|
|
9172
|
-
return
|
|
9379
|
+
return unwrap49(data);
|
|
9173
9380
|
}
|
|
9174
9381
|
/** List models available to this tenant. */
|
|
9175
9382
|
async availableModels() {
|
|
9176
9383
|
const data = await this.http.get("/settings/available-models");
|
|
9177
|
-
return
|
|
9384
|
+
return unwrap49(data);
|
|
9178
9385
|
}
|
|
9179
9386
|
/** List regions enabled for this tenant. */
|
|
9180
9387
|
async regions() {
|
|
9181
9388
|
const data = await this.http.get("/settings/regions");
|
|
9182
|
-
return
|
|
9389
|
+
return unwrap49(data);
|
|
9183
9390
|
}
|
|
9184
9391
|
// ── BYOK provider keys ────────────────────────────────────────────────────
|
|
9185
9392
|
/** List tenant-level BYOK provider keys (Anthropic, OpenAI, etc.). */
|
|
@@ -9194,7 +9401,7 @@ var Settings = class {
|
|
|
9194
9401
|
`/settings/provider-keys/${provider}`,
|
|
9195
9402
|
body5
|
|
9196
9403
|
);
|
|
9197
|
-
return
|
|
9404
|
+
return unwrap49(data);
|
|
9198
9405
|
}
|
|
9199
9406
|
/** Delete a BYOK provider key. */
|
|
9200
9407
|
async deleteProviderKey(provider) {
|
|
@@ -9203,7 +9410,7 @@ var Settings = class {
|
|
|
9203
9410
|
};
|
|
9204
9411
|
|
|
9205
9412
|
// src/resources/snapshots-standalone.ts
|
|
9206
|
-
function
|
|
9413
|
+
function unwrap50(data) {
|
|
9207
9414
|
if (data && typeof data === "object") {
|
|
9208
9415
|
const d = data;
|
|
9209
9416
|
for (const k of ["data", "snapshots", "items"]) {
|
|
@@ -9234,14 +9441,14 @@ var SnapshotsStandalone = class {
|
|
|
9234
9441
|
return unwrapList14(await this.http.get("/admin/snapshots", query3));
|
|
9235
9442
|
}
|
|
9236
9443
|
async get(snapshotId) {
|
|
9237
|
-
return
|
|
9444
|
+
return unwrap50(
|
|
9238
9445
|
await this.http.get(`/admin/snapshots/${snapshotId}`)
|
|
9239
9446
|
);
|
|
9240
9447
|
}
|
|
9241
9448
|
};
|
|
9242
9449
|
|
|
9243
9450
|
// src/resources/storage.ts
|
|
9244
|
-
function
|
|
9451
|
+
function unwrap51(payload) {
|
|
9245
9452
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9246
9453
|
return payload.data;
|
|
9247
9454
|
}
|
|
@@ -9280,11 +9487,11 @@ var Storage = class {
|
|
|
9280
9487
|
...rest
|
|
9281
9488
|
});
|
|
9282
9489
|
const data = await this.http.post("/storage/buckets", body5);
|
|
9283
|
-
return
|
|
9490
|
+
return unwrap51(data);
|
|
9284
9491
|
}
|
|
9285
9492
|
async getBucket(bucketId) {
|
|
9286
9493
|
const data = await this.http.get(`/storage/buckets/${bucketId}`);
|
|
9287
|
-
return
|
|
9494
|
+
return unwrap51(data);
|
|
9288
9495
|
}
|
|
9289
9496
|
async deleteBucket(bucketId) {
|
|
9290
9497
|
await this.http.delete(`/storage/buckets/${bucketId}`);
|
|
@@ -9334,7 +9541,7 @@ var Storage = class {
|
|
|
9334
9541
|
`/storage/buckets/${bucketId}/presign`,
|
|
9335
9542
|
body5
|
|
9336
9543
|
);
|
|
9337
|
-
return
|
|
9544
|
+
return unwrap51(data);
|
|
9338
9545
|
}
|
|
9339
9546
|
};
|
|
9340
9547
|
|
|
@@ -9474,7 +9681,7 @@ var Organizations = class {
|
|
|
9474
9681
|
};
|
|
9475
9682
|
|
|
9476
9683
|
// src/resources/tenant.ts
|
|
9477
|
-
function
|
|
9684
|
+
function unwrap52(payload) {
|
|
9478
9685
|
if (payload && typeof payload === "object") {
|
|
9479
9686
|
const p = payload;
|
|
9480
9687
|
for (const k of ["data", "tenant", "branding", "items"]) {
|
|
@@ -9496,14 +9703,14 @@ var PreviewDomain = class {
|
|
|
9496
9703
|
/** Get the tenant's white-label preview domain settings. */
|
|
9497
9704
|
async get() {
|
|
9498
9705
|
const data = await this.http.get("/tenant/preview-domain");
|
|
9499
|
-
return
|
|
9706
|
+
return unwrap52(data);
|
|
9500
9707
|
}
|
|
9501
9708
|
/** Set the tenant's white-label preview domain. */
|
|
9502
9709
|
async set(domain) {
|
|
9503
9710
|
const data = await this.http.put("/tenant/preview-domain", {
|
|
9504
9711
|
preview_domain: domain
|
|
9505
9712
|
});
|
|
9506
|
-
return
|
|
9713
|
+
return unwrap52(data);
|
|
9507
9714
|
}
|
|
9508
9715
|
/** Re-run DNS verification for the configured preview domain. */
|
|
9509
9716
|
async verify() {
|
|
@@ -9511,7 +9718,7 @@ var PreviewDomain = class {
|
|
|
9511
9718
|
"/tenant/preview-domain/verify",
|
|
9512
9719
|
{}
|
|
9513
9720
|
);
|
|
9514
|
-
return
|
|
9721
|
+
return unwrap52(data);
|
|
9515
9722
|
}
|
|
9516
9723
|
/** Remove the tenant's custom preview domain. */
|
|
9517
9724
|
async delete() {
|
|
@@ -9526,14 +9733,14 @@ var Branding = class {
|
|
|
9526
9733
|
/** Get tenant branding used by white-label hosted surfaces. */
|
|
9527
9734
|
async get() {
|
|
9528
9735
|
const data = await this.http.get("/tenant/branding");
|
|
9529
|
-
return
|
|
9736
|
+
return unwrap52(data);
|
|
9530
9737
|
}
|
|
9531
9738
|
/** Update tenant branding used by white-label hosted surfaces. */
|
|
9532
9739
|
async set(params) {
|
|
9533
9740
|
const data = await this.http.put("/tenant/branding", {
|
|
9534
9741
|
branding: stripUndefined30(params)
|
|
9535
9742
|
});
|
|
9536
|
-
return
|
|
9743
|
+
return unwrap52(data);
|
|
9537
9744
|
}
|
|
9538
9745
|
/** Reset tenant branding to platform defaults. */
|
|
9539
9746
|
async delete() {
|
|
@@ -9555,7 +9762,7 @@ var Tenant = class {
|
|
|
9555
9762
|
/** Get the current tenant's plan, limits, and live usage counters. */
|
|
9556
9763
|
async current() {
|
|
9557
9764
|
const data = await this.http.get("/tenant/plan");
|
|
9558
|
-
return
|
|
9765
|
+
return unwrap52(data);
|
|
9559
9766
|
}
|
|
9560
9767
|
/** Convenience alias for `tenant.branding.get()`. */
|
|
9561
9768
|
async getBranding() {
|
|
@@ -9616,7 +9823,7 @@ var Templates = class {
|
|
|
9616
9823
|
};
|
|
9617
9824
|
|
|
9618
9825
|
// src/resources/usage.ts
|
|
9619
|
-
function
|
|
9826
|
+
function unwrap53(payload) {
|
|
9620
9827
|
if (payload && typeof payload === "object") {
|
|
9621
9828
|
const p = payload;
|
|
9622
9829
|
for (const k of ["data", "usage", "sessions", "summary", "items"]) {
|
|
@@ -9638,13 +9845,13 @@ var Usage = class {
|
|
|
9638
9845
|
/** Get the current period usage summary. */
|
|
9639
9846
|
async current() {
|
|
9640
9847
|
const data = await this.http.get("/usage/summary");
|
|
9641
|
-
return
|
|
9848
|
+
return unwrap53(data);
|
|
9642
9849
|
}
|
|
9643
9850
|
/** List per-session metering events. */
|
|
9644
9851
|
async sessions(params = {}) {
|
|
9645
9852
|
const query3 = stripUndefined31(params);
|
|
9646
9853
|
const data = await this.http.get("/usage/sessions", query3);
|
|
9647
|
-
const result =
|
|
9854
|
+
const result = unwrap53(data);
|
|
9648
9855
|
if (Array.isArray(result)) return result;
|
|
9649
9856
|
return [];
|
|
9650
9857
|
}
|
|
@@ -9652,10 +9859,10 @@ var Usage = class {
|
|
|
9652
9859
|
async report(params = {}) {
|
|
9653
9860
|
const query3 = stripUndefined31(params);
|
|
9654
9861
|
const data = await this.http.get("/usage/summary", query3);
|
|
9655
|
-
return
|
|
9862
|
+
return unwrap53(data);
|
|
9656
9863
|
}
|
|
9657
9864
|
};
|
|
9658
|
-
function
|
|
9865
|
+
function unwrap54(payload) {
|
|
9659
9866
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9660
9867
|
return payload.data;
|
|
9661
9868
|
}
|
|
@@ -9691,7 +9898,7 @@ var Volumes = class {
|
|
|
9691
9898
|
}
|
|
9692
9899
|
async get(volumeId) {
|
|
9693
9900
|
const data = await this.http.get(`/volumes/${volumeId}`);
|
|
9694
|
-
return
|
|
9901
|
+
return unwrap54(data);
|
|
9695
9902
|
}
|
|
9696
9903
|
async create(params) {
|
|
9697
9904
|
const { idempotencyKey: ikey, sizeGb, ...rest } = params;
|
|
@@ -9704,7 +9911,7 @@ var Volumes = class {
|
|
|
9704
9911
|
body: body5,
|
|
9705
9912
|
headers: { "Idempotency-Key": idempotencyKey9(ikey) }
|
|
9706
9913
|
});
|
|
9707
|
-
return
|
|
9914
|
+
return unwrap54(data);
|
|
9708
9915
|
}
|
|
9709
9916
|
async delete(volumeId) {
|
|
9710
9917
|
await this.http.delete(`/volumes/${volumeId}`);
|
|
@@ -9735,7 +9942,7 @@ var Volumes = class {
|
|
|
9735
9942
|
`/computers/${computerId}/volumes`,
|
|
9736
9943
|
body5
|
|
9737
9944
|
);
|
|
9738
|
-
return
|
|
9945
|
+
return unwrap54(data);
|
|
9739
9946
|
}
|
|
9740
9947
|
async detach(computerId, attachmentId) {
|
|
9741
9948
|
await this.http.delete(
|
|
@@ -9743,7 +9950,7 @@ var Volumes = class {
|
|
|
9743
9950
|
);
|
|
9744
9951
|
}
|
|
9745
9952
|
};
|
|
9746
|
-
function
|
|
9953
|
+
function unwrap55(payload) {
|
|
9747
9954
|
if (payload && typeof payload === "object" && "data" in payload) {
|
|
9748
9955
|
return payload.data;
|
|
9749
9956
|
}
|
|
@@ -9810,7 +10017,7 @@ var Webhooks = class {
|
|
|
9810
10017
|
}
|
|
9811
10018
|
async get(webhookId) {
|
|
9812
10019
|
const data = await this.http.get(`/webhooks/${webhookId}`);
|
|
9813
|
-
return
|
|
10020
|
+
return unwrap55(data);
|
|
9814
10021
|
}
|
|
9815
10022
|
async create(params) {
|
|
9816
10023
|
const { idempotencyKey: ikey, ...rest } = params;
|
|
@@ -9820,12 +10027,12 @@ var Webhooks = class {
|
|
|
9820
10027
|
body: body5,
|
|
9821
10028
|
headers: { "Idempotency-Key": idempotencyKey10(ikey) }
|
|
9822
10029
|
});
|
|
9823
|
-
return
|
|
10030
|
+
return unwrap55(data);
|
|
9824
10031
|
}
|
|
9825
10032
|
async update(webhookId, params) {
|
|
9826
10033
|
const body5 = stripUndefined33(params);
|
|
9827
10034
|
const data = await this.http.patch(`/webhooks/${webhookId}`, body5);
|
|
9828
|
-
return
|
|
10035
|
+
return unwrap55(data);
|
|
9829
10036
|
}
|
|
9830
10037
|
async delete(webhookId) {
|
|
9831
10038
|
await this.http.delete(`/webhooks/${webhookId}`);
|
|
@@ -9838,7 +10045,7 @@ var Webhooks = class {
|
|
|
9838
10045
|
headers: { "Idempotency-Key": idempotencyKey10(opts.idempotencyKey) }
|
|
9839
10046
|
}
|
|
9840
10047
|
);
|
|
9841
|
-
return
|
|
10048
|
+
return unwrap55(data);
|
|
9842
10049
|
}
|
|
9843
10050
|
async deliveries(webhookId) {
|
|
9844
10051
|
const data = await this.http.get(
|
|
@@ -10045,6 +10252,8 @@ var Miosa = class {
|
|
|
10045
10252
|
projectIntegrations;
|
|
10046
10253
|
/** Built-in auth for generated apps inside sandboxes/deployments. */
|
|
10047
10254
|
projectAuth;
|
|
10255
|
+
/** Durable generated App Documents, exact-version reviews, and publication bindings. */
|
|
10256
|
+
appDocuments;
|
|
10048
10257
|
/** BYOK encrypted per-user provider keys. */
|
|
10049
10258
|
externalKeys;
|
|
10050
10259
|
/** Model Context Protocol — JSON-RPC dispatch + streaming channel. */
|
|
@@ -10176,6 +10385,7 @@ var Miosa = class {
|
|
|
10176
10385
|
this.integrations = new Integrations(this.http);
|
|
10177
10386
|
this.projectIntegrations = new ProjectIntegrations(this.http);
|
|
10178
10387
|
this.projectAuth = new ProjectAuth(this.http);
|
|
10388
|
+
this.appDocuments = new AppDocuments(this.http);
|
|
10179
10389
|
this.externalKeys = new ExternalKeys(this.http);
|
|
10180
10390
|
this.mcp = new Mcp(this.http);
|
|
10181
10391
|
this.runs = new Runs(this.http);
|
|
@@ -10709,6 +10919,6 @@ var AppAuth = class {
|
|
|
10709
10919
|
}
|
|
10710
10920
|
};
|
|
10711
10921
|
|
|
10712
|
-
export { AGENT_BUILD_KIND_SPECS, Admin, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, OrganizationMembers, Organizations, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
|
|
10922
|
+
export { AGENT_BUILD_KIND_SPECS, Admin, AgentRuntimeProfiles, Analytics, ApiKeys, AppAuth, AppDocuments, AuditLog, AuthError, Benchmarks, BuilderSessions, Channels, Checkpoints, Cloud, CommandCenter, Community, Completions, Computer, ComputerAudit, ComputerAutoStop, ComputerConnectors, ComputerEnv, ComputerInbox, ComputerLogs, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, ComputerTerminal, ComputerVolumes, Computers, Connectors, Credits, CronJobs, DEFAULT_AGENT_BUILD_OUTPUT_ROOT, DEFAULT_AGENT_BUILD_PACKET_VERSION, Dashboard, Databases, DeploymentConnectors, DeploymentDomains, DeploymentReleases, DeploymentRuntimeInstances, DeploymentVersions, Deployments, Desktop, Devices, DockerDeploy, EgressAudit, EgressHostNotAllowedError, EgressNetwork, EgressSecrets, Email, EmailCampaigns, EmailInbox, EmailTemplates, Embeddings, Exec, ExternalKeys, Files, FlatCustomDomains, Functions, HealthChecks, InstallationRequiredError, InsufficientCreditsError, Integrations, ManagedProviderBindingOnlyError, Mcp, Miosa, MiosaError, Models, NetworkError, NetworkPolicy, NotFoundError, OAuthFlow, OpenComputers, OrgInvites, OrganizationMembers, Organizations, ProjectAuth, ProjectIntegrations, ProjectNotLinkedError, ProviderDefaults, RateLimitError, Regions, RunGroups, Runs, RuntimeCapabilitiesResource, RuntimeEnv, SANDBOX_TEMPLATE, Sandbox, SandboxAudit, SandboxCommands, SandboxConnectors, SandboxEnv, SandboxEvents, SandboxFiles, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, SandboxTags, SandboxTemplates, SandboxTerminal, Sandboxes, ScopeNotAllowedError, ScopedFs, Settings, SnapshotsStandalone, Storage, SubjectNotAllowedError, Templates, Tenant, TimeoutError, TokenRefreshFailedError, Usage, UserAuthorizationRequiredError, ValidationError, Volumes, Webhooks, WorkspaceInvites, WorkspaceMembers, createAgentBuildExecutionPacket, createAgentBuildExpectedOutputs, createAgentBuildPrompt, createBuildRunParams, getAgentBuildKindSpec, resolveAgentBuildKind, verifySignature };
|
|
10713
10923
|
//# sourceMappingURL=index.js.map
|
|
10714
10924
|
//# sourceMappingURL=index.js.map
|