@sixb/client 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +2 -2
  2. package/dist/agent-streams.d.ts +26 -3
  3. package/dist/agent-streams.d.ts.map +1 -1
  4. package/dist/api.d.ts +6 -2
  5. package/dist/api.d.ts.map +1 -1
  6. package/dist/browser.d.ts +1 -1
  7. package/dist/browser.d.ts.map +1 -1
  8. package/dist/browser.js +2 -2
  9. package/dist/browser.js.map +1 -1
  10. package/dist/{chunk-2vsyqn32.js → chunk-5vp5zr0d.js} +1 -1
  11. package/dist/{chunk-1mnf48s9.js → chunk-ctf97s25.js} +2 -2
  12. package/dist/{chunk-w527w02k.js → chunk-mpgzkmwc.js} +2 -74
  13. package/dist/chunk-mpgzkmwc.js.map +10 -0
  14. package/dist/{chunk-h8bd95xf.js → chunk-skkt217g.js} +50 -2
  15. package/dist/chunk-skkt217g.js.map +19 -0
  16. package/dist/{chunk-hkrfakyt.js → chunk-tsdnw994.js} +2 -2
  17. package/dist/{chunk-dkd2wgva.js → chunk-v4jdc1nb.js} +40 -28
  18. package/dist/{chunk-dkd2wgva.js.map → chunk-v4jdc1nb.js.map} +3 -3
  19. package/dist/{chunk-6w5w9e75.js → chunk-zfne7wxr.js} +27 -12
  20. package/dist/chunk-zfne7wxr.js.map +10 -0
  21. package/dist/client-provider.d.ts +8 -0
  22. package/dist/client-provider.d.ts.map +1 -0
  23. package/dist/connectors/connection.d.ts +50 -0
  24. package/dist/connectors/connection.d.ts.map +1 -0
  25. package/dist/connectors/index.d.ts +4 -0
  26. package/dist/connectors/index.d.ts.map +1 -0
  27. package/dist/connectors/mutations.d.ts +62 -0
  28. package/dist/connectors/mutations.d.ts.map +1 -0
  29. package/dist/connectors/queries.d.ts +536 -0
  30. package/dist/connectors/queries.d.ts.map +1 -0
  31. package/dist/generated/@tanstack/react-query.gen.d.ts +3508 -735
  32. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  33. package/dist/generated/index.d.ts +2 -2
  34. package/dist/generated/index.d.ts.map +1 -1
  35. package/dist/generated/sdk.gen.d.ts +33 -1
  36. package/dist/generated/sdk.gen.d.ts.map +1 -1
  37. package/dist/generated/types.gen.d.ts +1819 -198
  38. package/dist/generated/types.gen.d.ts.map +1 -1
  39. package/dist/hooks.d.ts +2 -0
  40. package/dist/hooks.d.ts.map +1 -1
  41. package/dist/hooks.js +1118 -351
  42. package/dist/hooks.js.map +11 -6
  43. package/dist/index.js +25 -11
  44. package/dist/index.js.map +1 -1
  45. package/dist/logs.js +3 -3
  46. package/dist/models.d.ts +0 -31
  47. package/dist/models.d.ts.map +1 -1
  48. package/dist/models.js +19 -7
  49. package/dist/models.js.map +1 -1
  50. package/dist/query-hooks.d.ts +2 -6
  51. package/dist/query-hooks.d.ts.map +1 -1
  52. package/dist/query.js +3 -3
  53. package/dist/useAgentActivityStream.d.ts +14 -0
  54. package/dist/useAgentActivityStream.d.ts.map +1 -0
  55. package/package.json +6 -2
  56. package/src/agent-streams.ts +68 -45
  57. package/src/api.ts +26 -2
  58. package/src/browser.ts +1 -1
  59. package/src/client-provider.ts +12 -0
  60. package/src/connectors/connection.ts +443 -0
  61. package/src/connectors/index.ts +12 -0
  62. package/src/connectors/mutations.ts +417 -0
  63. package/src/connectors/queries.ts +150 -0
  64. package/src/generated/@tanstack/react-query.gen.ts +245 -0
  65. package/src/generated/index.ts +48 -0
  66. package/src/generated/sdk.gen.ts +160 -0
  67. package/src/generated/types.gen.ts +2417 -230
  68. package/src/hooks.ts +6 -0
  69. package/src/models.ts +0 -103
  70. package/src/query-hooks.ts +8 -14
  71. package/src/useAgentActivityStream.ts +48 -0
  72. package/dist/chunk-6w5w9e75.js.map +0 -10
  73. package/dist/chunk-h8bd95xf.js.map +0 -19
  74. package/dist/chunk-w527w02k.js.map +0 -10
  75. /package/dist/{chunk-2vsyqn32.js.map → chunk-5vp5zr0d.js.map} +0 -0
  76. /package/dist/{chunk-1mnf48s9.js.map → chunk-ctf97s25.js.map} +0 -0
  77. /package/dist/{chunk-hkrfakyt.js.map → chunk-tsdnw994.js.map} +0 -0
@@ -1458,54 +1458,1017 @@ export type ListConnectorsResponses = {
1458
1458
  200: Array<{
1459
1459
  id: string;
1460
1460
  type: string;
1461
+ connection: {
1462
+ authentication: "oauth2";
1463
+ } | null;
1464
+ syncIds: Array<string>;
1465
+ webhooks: Array<{
1466
+ id: string;
1467
+ method: "POST";
1468
+ route: string;
1469
+ bodyFormat: "json" | "text" | "raw";
1470
+ hasVerify: boolean;
1471
+ hasIdempotency: boolean;
1472
+ }>;
1473
+ }>;
1474
+ };
1475
+ export type ListConnectorsResponse = ListConnectorsResponses[keyof ListConnectorsResponses];
1476
+ export type GetConnectorData = {
1477
+ body?: never;
1478
+ path: {
1479
+ connectorId: string;
1480
+ };
1481
+ query?: never;
1482
+ url: "/api/connectors/{connectorId}";
1483
+ };
1484
+ export type GetConnectorErrors = {
1485
+ /**
1486
+ * Response for status 404
1487
+ */
1488
+ 404: {
1489
+ error: string;
1490
+ };
1491
+ };
1492
+ export type GetConnectorError = GetConnectorErrors[keyof GetConnectorErrors];
1493
+ export type GetConnectorResponses = {
1494
+ /**
1495
+ * Response for status 200
1496
+ */
1497
+ 200: {
1498
+ id: string;
1499
+ type: string;
1500
+ connection: {
1501
+ authentication: "oauth2";
1502
+ } | null;
1461
1503
  syncIds: Array<string>;
1462
1504
  webhooks: Array<{
1463
1505
  id: string;
1464
- method: "POST";
1465
- route: string;
1466
- bodyFormat: "json" | "text" | "raw";
1467
- hasVerify: boolean;
1468
- hasIdempotency: boolean;
1506
+ method: "POST";
1507
+ route: string;
1508
+ bodyFormat: "json" | "text" | "raw";
1509
+ hasVerify: boolean;
1510
+ hasIdempotency: boolean;
1511
+ }>;
1512
+ };
1513
+ };
1514
+ export type GetConnectorResponse = GetConnectorResponses[keyof GetConnectorResponses];
1515
+ export type ListConnectorConnectionsData = {
1516
+ body?: never;
1517
+ path: {
1518
+ connectorId: string;
1519
+ };
1520
+ query?: never;
1521
+ url: "/api/connectors/{connectorId}/connections";
1522
+ };
1523
+ export type ListConnectorConnectionsErrors = {
1524
+ /**
1525
+ * Response for status 400
1526
+ */
1527
+ 400: {
1528
+ error: string;
1529
+ /**
1530
+ * Stable machine-readable failure code for programmatic handling.
1531
+ */
1532
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid";
1533
+ };
1534
+ /**
1535
+ * Response for status 403
1536
+ */
1537
+ 403: {
1538
+ error: string;
1539
+ };
1540
+ /**
1541
+ * Response for status 404
1542
+ */
1543
+ 404: {
1544
+ error: string;
1545
+ /**
1546
+ * Stable machine-readable failure code for programmatic handling.
1547
+ */
1548
+ code?: "connector.not_found";
1549
+ };
1550
+ /**
1551
+ * Response for status 500
1552
+ */
1553
+ 500: {
1554
+ error: string;
1555
+ /**
1556
+ * Stable machine-readable failure code for programmatic handling.
1557
+ */
1558
+ code?: "internal.unexpected";
1559
+ };
1560
+ };
1561
+ export type ListConnectorConnectionsError = ListConnectorConnectionsErrors[keyof ListConnectorConnectionsErrors];
1562
+ export type ListConnectorConnectionsResponses = {
1563
+ /**
1564
+ * Response for status 200
1565
+ */
1566
+ 200: Array<{
1567
+ id: string;
1568
+ connectorId: string;
1569
+ owner: {
1570
+ type: "project";
1571
+ };
1572
+ slot: string;
1573
+ account: {
1574
+ id: string;
1575
+ label: string;
1576
+ description?: string;
1577
+ avatarUrl?: string;
1578
+ };
1579
+ status: "connected" | "needs_reauthorization" | "disconnected";
1580
+ }>;
1581
+ };
1582
+ export type ListConnectorConnectionsResponse = ListConnectorConnectionsResponses[keyof ListConnectorConnectionsResponses];
1583
+ export type DisconnectConnectorConnectionData = {
1584
+ body?: never;
1585
+ path: {
1586
+ connectorId: string;
1587
+ connectionId: string;
1588
+ };
1589
+ query?: never;
1590
+ url: "/api/connectors/{connectorId}/connections/{connectionId}";
1591
+ };
1592
+ export type DisconnectConnectorConnectionErrors = {
1593
+ /**
1594
+ * Response for status 400
1595
+ */
1596
+ 400: {
1597
+ error: string;
1598
+ /**
1599
+ * Stable machine-readable failure code for programmatic handling.
1600
+ */
1601
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid";
1602
+ };
1603
+ /**
1604
+ * Response for status 403
1605
+ */
1606
+ 403: {
1607
+ error: string;
1608
+ };
1609
+ /**
1610
+ * Response for status 404
1611
+ */
1612
+ 404: {
1613
+ error: string;
1614
+ /**
1615
+ * Stable machine-readable failure code for programmatic handling.
1616
+ */
1617
+ code?: "connector.not_found";
1618
+ };
1619
+ /**
1620
+ * Response for status 409
1621
+ */
1622
+ 409: {
1623
+ error: string;
1624
+ /**
1625
+ * Stable machine-readable failure code for programmatic handling.
1626
+ */
1627
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending";
1628
+ };
1629
+ /**
1630
+ * Response for status 500
1631
+ */
1632
+ 500: {
1633
+ error: string;
1634
+ /**
1635
+ * Stable machine-readable failure code for programmatic handling.
1636
+ */
1637
+ code?: "internal.unexpected";
1638
+ };
1639
+ };
1640
+ export type DisconnectConnectorConnectionError = DisconnectConnectorConnectionErrors[keyof DisconnectConnectorConnectionErrors];
1641
+ export type DisconnectConnectorConnectionResponses = {
1642
+ /**
1643
+ * Response for status 200
1644
+ */
1645
+ 200: {
1646
+ success: boolean;
1647
+ };
1648
+ };
1649
+ export type DisconnectConnectorConnectionResponse = DisconnectConnectorConnectionResponses[keyof DisconnectConnectorConnectionResponses];
1650
+ export type RevokeConnectorConnectionData = {
1651
+ body?: never;
1652
+ path: {
1653
+ connectorId: string;
1654
+ connectionId: string;
1655
+ };
1656
+ query?: never;
1657
+ url: "/api/connectors/{connectorId}/connections/{connectionId}/revoke";
1658
+ };
1659
+ export type RevokeConnectorConnectionErrors = {
1660
+ /**
1661
+ * Response for status 400
1662
+ */
1663
+ 400: {
1664
+ error: string;
1665
+ /**
1666
+ * Stable machine-readable failure code for programmatic handling.
1667
+ */
1668
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid";
1669
+ };
1670
+ /**
1671
+ * Response for status 403
1672
+ */
1673
+ 403: {
1674
+ error: string;
1675
+ };
1676
+ /**
1677
+ * Response for status 404
1678
+ */
1679
+ 404: {
1680
+ error: string;
1681
+ /**
1682
+ * Stable machine-readable failure code for programmatic handling.
1683
+ */
1684
+ code?: "connector.not_found";
1685
+ };
1686
+ /**
1687
+ * Response for status 409
1688
+ */
1689
+ 409: {
1690
+ error: string;
1691
+ /**
1692
+ * Stable machine-readable failure code for programmatic handling.
1693
+ */
1694
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending";
1695
+ };
1696
+ /**
1697
+ * Response for status 500
1698
+ */
1699
+ 500: {
1700
+ error: string;
1701
+ /**
1702
+ * Stable machine-readable failure code for programmatic handling.
1703
+ */
1704
+ code?: "internal.unexpected";
1705
+ };
1706
+ /**
1707
+ * Response for status 502
1708
+ */
1709
+ 502: {
1710
+ error: string;
1711
+ /**
1712
+ * Stable machine-readable failure code for programmatic handling.
1713
+ */
1714
+ code?: "connector.adapter_invalid" | "connector.provider_failed";
1715
+ };
1716
+ /**
1717
+ * Response for status 503
1718
+ */
1719
+ 503: {
1720
+ error: string;
1721
+ /**
1722
+ * Stable machine-readable failure code for programmatic handling.
1723
+ */
1724
+ code?: "connector.credentials_unavailable" | "connector.provider_unavailable";
1725
+ };
1726
+ };
1727
+ export type RevokeConnectorConnectionError = RevokeConnectorConnectionErrors[keyof RevokeConnectorConnectionErrors];
1728
+ export type RevokeConnectorConnectionResponses = {
1729
+ /**
1730
+ * Response for status 200
1731
+ */
1732
+ 200: {
1733
+ affectedConnections: Array<{
1734
+ id: string;
1735
+ connectorId: string;
1736
+ owner: {
1737
+ type: "project";
1738
+ };
1739
+ slot: string;
1740
+ account: {
1741
+ id: string;
1742
+ label: string;
1743
+ description?: string;
1744
+ avatarUrl?: string;
1745
+ };
1746
+ status: "connected" | "needs_reauthorization" | "disconnected";
1747
+ }>;
1748
+ };
1749
+ };
1750
+ export type RevokeConnectorConnectionResponse = RevokeConnectorConnectionResponses[keyof RevokeConnectorConnectionResponses];
1751
+ export type StartConnectorConnectionRunData = {
1752
+ body: {
1753
+ slot: string;
1754
+ returnTo: string;
1755
+ };
1756
+ path: {
1757
+ connectorId: string;
1758
+ };
1759
+ query?: never;
1760
+ url: "/api/connectors/{connectorId}/connection-runs";
1761
+ };
1762
+ export type StartConnectorConnectionRunErrors = {
1763
+ /**
1764
+ * Response for status 400
1765
+ */
1766
+ 400: {
1767
+ error: string;
1768
+ /**
1769
+ * Stable machine-readable failure code for programmatic handling.
1770
+ */
1771
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid";
1772
+ };
1773
+ /**
1774
+ * Response for status 403
1775
+ */
1776
+ 403: {
1777
+ error: string;
1778
+ };
1779
+ /**
1780
+ * Response for status 404
1781
+ */
1782
+ 404: {
1783
+ error: string;
1784
+ /**
1785
+ * Stable machine-readable failure code for programmatic handling.
1786
+ */
1787
+ code?: "connector.not_found";
1788
+ };
1789
+ /**
1790
+ * Response for status 409
1791
+ */
1792
+ 409: {
1793
+ error: string;
1794
+ /**
1795
+ * Stable machine-readable failure code for programmatic handling.
1796
+ */
1797
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending";
1798
+ };
1799
+ /**
1800
+ * Response for status 500
1801
+ */
1802
+ 500: {
1803
+ error: string;
1804
+ /**
1805
+ * Stable machine-readable failure code for programmatic handling.
1806
+ */
1807
+ code?: "internal.unexpected";
1808
+ };
1809
+ /**
1810
+ * Response for status 502
1811
+ */
1812
+ 502: {
1813
+ error: string;
1814
+ /**
1815
+ * Stable machine-readable failure code for programmatic handling.
1816
+ */
1817
+ code?: "connector.adapter_invalid" | "connector.provider_failed";
1818
+ };
1819
+ /**
1820
+ * Response for status 503
1821
+ */
1822
+ 503: {
1823
+ error: string;
1824
+ /**
1825
+ * Stable machine-readable failure code for programmatic handling.
1826
+ */
1827
+ code?: "connector.credentials_unavailable" | "connector.provider_unavailable";
1828
+ };
1829
+ };
1830
+ export type StartConnectorConnectionRunError = StartConnectorConnectionRunErrors[keyof StartConnectorConnectionRunErrors];
1831
+ export type StartConnectorConnectionRunResponses = {
1832
+ /**
1833
+ * Response for status 201
1834
+ */
1835
+ 201: {
1836
+ runId: string;
1837
+ authorizationUrl: string;
1838
+ affectedConnections: Array<{
1839
+ id: string;
1840
+ connectorId: string;
1841
+ owner: {
1842
+ type: "project";
1843
+ };
1844
+ slot: string;
1845
+ account: {
1846
+ id: string;
1847
+ label: string;
1848
+ description?: string;
1849
+ avatarUrl?: string;
1850
+ };
1851
+ status: "connected" | "needs_reauthorization" | "disconnected";
1852
+ }>;
1853
+ };
1854
+ };
1855
+ export type StartConnectorConnectionRunResponse = StartConnectorConnectionRunResponses[keyof StartConnectorConnectionRunResponses];
1856
+ export type GetConnectorConnectionRunData = {
1857
+ body?: never;
1858
+ path: {
1859
+ connectorId: string;
1860
+ runId: string;
1861
+ };
1862
+ query?: never;
1863
+ url: "/api/connectors/{connectorId}/connection-runs/{runId}";
1864
+ };
1865
+ export type GetConnectorConnectionRunErrors = {
1866
+ /**
1867
+ * Response for status 400
1868
+ */
1869
+ 400: {
1870
+ error: string;
1871
+ /**
1872
+ * Stable machine-readable failure code for programmatic handling.
1873
+ */
1874
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid";
1875
+ };
1876
+ /**
1877
+ * Response for status 403
1878
+ */
1879
+ 403: {
1880
+ error: string;
1881
+ };
1882
+ /**
1883
+ * Response for status 404
1884
+ */
1885
+ 404: {
1886
+ error: string;
1887
+ /**
1888
+ * Stable machine-readable failure code for programmatic handling.
1889
+ */
1890
+ code?: "connector.not_found";
1891
+ };
1892
+ /**
1893
+ * Response for status 500
1894
+ */
1895
+ 500: {
1896
+ error: string;
1897
+ /**
1898
+ * Stable machine-readable failure code for programmatic handling.
1899
+ */
1900
+ code?: "internal.unexpected";
1901
+ };
1902
+ };
1903
+ export type GetConnectorConnectionRunError = GetConnectorConnectionRunErrors[keyof GetConnectorConnectionRunErrors];
1904
+ export type GetConnectorConnectionRunResponses = {
1905
+ /**
1906
+ * Response for status 200
1907
+ */
1908
+ 200: {
1909
+ id: string;
1910
+ connectorId: string;
1911
+ kind: "connect" | "reauthorize";
1912
+ owner: {
1913
+ type: "project";
1914
+ };
1915
+ slot: string;
1916
+ createdAt: string;
1917
+ updatedAt: string;
1918
+ status: "waiting";
1919
+ waitingFor: "provider_authorization";
1920
+ expiresAt: string;
1921
+ } | {
1922
+ id: string;
1923
+ connectorId: string;
1924
+ kind: "connect" | "reauthorize";
1925
+ owner: {
1926
+ type: "project";
1927
+ };
1928
+ slot: string;
1929
+ createdAt: string;
1930
+ updatedAt: string;
1931
+ status: "running";
1932
+ } | {
1933
+ id: string;
1934
+ connectorId: string;
1935
+ kind: "connect" | "reauthorize";
1936
+ owner: {
1937
+ type: "project";
1938
+ };
1939
+ slot: string;
1940
+ createdAt: string;
1941
+ updatedAt: string;
1942
+ status: "waiting";
1943
+ waitingFor: "account_selection";
1944
+ accounts: Array<{
1945
+ id: string;
1946
+ label: string;
1947
+ description?: string;
1948
+ avatarUrl?: string;
1949
+ }>;
1950
+ expiresAt: string;
1951
+ } | {
1952
+ id: string;
1953
+ connectorId: string;
1954
+ kind: "connect" | "reauthorize";
1955
+ owner: {
1956
+ type: "project";
1957
+ };
1958
+ slot: string;
1959
+ createdAt: string;
1960
+ updatedAt: string;
1961
+ status: "succeeded";
1962
+ connections: Array<{
1963
+ id: string;
1964
+ connectorId: string;
1965
+ owner: {
1966
+ type: "project";
1967
+ };
1968
+ slot: string;
1969
+ account: {
1970
+ id: string;
1971
+ label: string;
1972
+ description?: string;
1973
+ avatarUrl?: string;
1974
+ };
1975
+ status: "connected" | "needs_reauthorization" | "disconnected";
1976
+ }>;
1977
+ finishedAt: string;
1978
+ } | {
1979
+ id: string;
1980
+ connectorId: string;
1981
+ kind: "connect" | "reauthorize";
1982
+ owner: {
1983
+ type: "project";
1984
+ };
1985
+ slot: string;
1986
+ createdAt: string;
1987
+ updatedAt: string;
1988
+ status: "failed";
1989
+ error: {
1990
+ code: "internal.unexpected" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable";
1991
+ message: string;
1992
+ retryable: boolean;
1993
+ at: string;
1994
+ /**
1995
+ * Any JSON-compatible value.
1996
+ */
1997
+ details?: string | number | boolean | Array<unknown> | {
1998
+ [key: string]: unknown;
1999
+ } | null;
2000
+ truncated?: true;
2001
+ };
2002
+ finishedAt: string;
2003
+ } | {
2004
+ id: string;
2005
+ connectorId: string;
2006
+ kind: "connect" | "reauthorize";
2007
+ owner: {
2008
+ type: "project";
2009
+ };
2010
+ slot: string;
2011
+ createdAt: string;
2012
+ updatedAt: string;
2013
+ status: "cancelled" | "expired";
2014
+ finishedAt: string;
2015
+ };
2016
+ };
2017
+ export type GetConnectorConnectionRunResponse = GetConnectorConnectionRunResponses[keyof GetConnectorConnectionRunResponses];
2018
+ export type AddConnectorConnectionData = {
2019
+ body: {
2020
+ slot: string;
2021
+ };
2022
+ path: {
2023
+ connectorId: string;
2024
+ connectionId: string;
2025
+ };
2026
+ query?: never;
2027
+ url: "/api/connectors/{connectorId}/connections/{connectionId}/connection-runs";
2028
+ };
2029
+ export type AddConnectorConnectionErrors = {
2030
+ /**
2031
+ * Response for status 400
2032
+ */
2033
+ 400: {
2034
+ error: string;
2035
+ /**
2036
+ * Stable machine-readable failure code for programmatic handling.
2037
+ */
2038
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid";
2039
+ };
2040
+ /**
2041
+ * Response for status 403
2042
+ */
2043
+ 403: {
2044
+ error: string;
2045
+ };
2046
+ /**
2047
+ * Response for status 404
2048
+ */
2049
+ 404: {
2050
+ error: string;
2051
+ /**
2052
+ * Stable machine-readable failure code for programmatic handling.
2053
+ */
2054
+ code?: "connector.not_found";
2055
+ };
2056
+ /**
2057
+ * Response for status 409
2058
+ */
2059
+ 409: {
2060
+ error: string;
2061
+ /**
2062
+ * Stable machine-readable failure code for programmatic handling.
2063
+ */
2064
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending";
2065
+ };
2066
+ /**
2067
+ * Response for status 500
2068
+ */
2069
+ 500: {
2070
+ error: string;
2071
+ /**
2072
+ * Stable machine-readable failure code for programmatic handling.
2073
+ */
2074
+ code?: "internal.unexpected";
2075
+ };
2076
+ };
2077
+ export type AddConnectorConnectionError = AddConnectorConnectionErrors[keyof AddConnectorConnectionErrors];
2078
+ export type AddConnectorConnectionResponses = {
2079
+ /**
2080
+ * Response for status 201
2081
+ */
2082
+ 201: {
2083
+ id: string;
2084
+ connectorId: string;
2085
+ kind: "connect" | "reauthorize";
2086
+ owner: {
2087
+ type: "project";
2088
+ };
2089
+ slot: string;
2090
+ createdAt: string;
2091
+ updatedAt: string;
2092
+ status: "waiting";
2093
+ waitingFor: "provider_authorization";
2094
+ expiresAt: string;
2095
+ } | {
2096
+ id: string;
2097
+ connectorId: string;
2098
+ kind: "connect" | "reauthorize";
2099
+ owner: {
2100
+ type: "project";
2101
+ };
2102
+ slot: string;
2103
+ createdAt: string;
2104
+ updatedAt: string;
2105
+ status: "running";
2106
+ } | {
2107
+ id: string;
2108
+ connectorId: string;
2109
+ kind: "connect" | "reauthorize";
2110
+ owner: {
2111
+ type: "project";
2112
+ };
2113
+ slot: string;
2114
+ createdAt: string;
2115
+ updatedAt: string;
2116
+ status: "waiting";
2117
+ waitingFor: "account_selection";
2118
+ accounts: Array<{
2119
+ id: string;
2120
+ label: string;
2121
+ description?: string;
2122
+ avatarUrl?: string;
1469
2123
  }>;
1470
- }>;
2124
+ expiresAt: string;
2125
+ } | {
2126
+ id: string;
2127
+ connectorId: string;
2128
+ kind: "connect" | "reauthorize";
2129
+ owner: {
2130
+ type: "project";
2131
+ };
2132
+ slot: string;
2133
+ createdAt: string;
2134
+ updatedAt: string;
2135
+ status: "succeeded";
2136
+ connections: Array<{
2137
+ id: string;
2138
+ connectorId: string;
2139
+ owner: {
2140
+ type: "project";
2141
+ };
2142
+ slot: string;
2143
+ account: {
2144
+ id: string;
2145
+ label: string;
2146
+ description?: string;
2147
+ avatarUrl?: string;
2148
+ };
2149
+ status: "connected" | "needs_reauthorization" | "disconnected";
2150
+ }>;
2151
+ finishedAt: string;
2152
+ } | {
2153
+ id: string;
2154
+ connectorId: string;
2155
+ kind: "connect" | "reauthorize";
2156
+ owner: {
2157
+ type: "project";
2158
+ };
2159
+ slot: string;
2160
+ createdAt: string;
2161
+ updatedAt: string;
2162
+ status: "failed";
2163
+ error: {
2164
+ code: "internal.unexpected" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable";
2165
+ message: string;
2166
+ retryable: boolean;
2167
+ at: string;
2168
+ /**
2169
+ * Any JSON-compatible value.
2170
+ */
2171
+ details?: string | number | boolean | Array<unknown> | {
2172
+ [key: string]: unknown;
2173
+ } | null;
2174
+ truncated?: true;
2175
+ };
2176
+ finishedAt: string;
2177
+ } | {
2178
+ id: string;
2179
+ connectorId: string;
2180
+ kind: "connect" | "reauthorize";
2181
+ owner: {
2182
+ type: "project";
2183
+ };
2184
+ slot: string;
2185
+ createdAt: string;
2186
+ updatedAt: string;
2187
+ status: "cancelled" | "expired";
2188
+ finishedAt: string;
2189
+ };
1471
2190
  };
1472
- export type ListConnectorsResponse = ListConnectorsResponses[keyof ListConnectorsResponses];
1473
- export type GetConnectorData = {
1474
- body?: never;
2191
+ export type AddConnectorConnectionResponse = AddConnectorConnectionResponses[keyof AddConnectorConnectionResponses];
2192
+ export type SelectConnectorConnectionRunAccountData = {
2193
+ body: {
2194
+ accountId: string;
2195
+ replace?: boolean;
2196
+ };
1475
2197
  path: {
1476
2198
  connectorId: string;
2199
+ runId: string;
1477
2200
  };
1478
2201
  query?: never;
1479
- url: "/api/connectors/{connectorId}";
2202
+ url: "/api/connectors/{connectorId}/connection-runs/{runId}/selection";
1480
2203
  };
1481
- export type GetConnectorErrors = {
2204
+ export type SelectConnectorConnectionRunAccountErrors = {
2205
+ /**
2206
+ * Response for status 400
2207
+ */
2208
+ 400: {
2209
+ error: string;
2210
+ /**
2211
+ * Stable machine-readable failure code for programmatic handling.
2212
+ */
2213
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid";
2214
+ };
2215
+ /**
2216
+ * Response for status 403
2217
+ */
2218
+ 403: {
2219
+ error: string;
2220
+ };
1482
2221
  /**
1483
2222
  * Response for status 404
1484
2223
  */
1485
2224
  404: {
1486
2225
  error: string;
2226
+ /**
2227
+ * Stable machine-readable failure code for programmatic handling.
2228
+ */
2229
+ code?: "connector.not_found";
2230
+ };
2231
+ /**
2232
+ * Response for status 409
2233
+ */
2234
+ 409: {
2235
+ error: string;
2236
+ /**
2237
+ * Stable machine-readable failure code for programmatic handling.
2238
+ */
2239
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending";
2240
+ };
2241
+ /**
2242
+ * Response for status 500
2243
+ */
2244
+ 500: {
2245
+ error: string;
2246
+ /**
2247
+ * Stable machine-readable failure code for programmatic handling.
2248
+ */
2249
+ code?: "internal.unexpected";
1487
2250
  };
1488
2251
  };
1489
- export type GetConnectorError = GetConnectorErrors[keyof GetConnectorErrors];
1490
- export type GetConnectorResponses = {
2252
+ export type SelectConnectorConnectionRunAccountError = SelectConnectorConnectionRunAccountErrors[keyof SelectConnectorConnectionRunAccountErrors];
2253
+ export type SelectConnectorConnectionRunAccountResponses = {
1491
2254
  /**
1492
2255
  * Response for status 200
1493
2256
  */
1494
2257
  200: {
1495
2258
  id: string;
1496
- type: string;
1497
- syncIds: Array<string>;
1498
- webhooks: Array<{
2259
+ connectorId: string;
2260
+ kind: "connect" | "reauthorize";
2261
+ owner: {
2262
+ type: "project";
2263
+ };
2264
+ slot: string;
2265
+ createdAt: string;
2266
+ updatedAt: string;
2267
+ status: "waiting";
2268
+ waitingFor: "provider_authorization";
2269
+ expiresAt: string;
2270
+ } | {
2271
+ id: string;
2272
+ connectorId: string;
2273
+ kind: "connect" | "reauthorize";
2274
+ owner: {
2275
+ type: "project";
2276
+ };
2277
+ slot: string;
2278
+ createdAt: string;
2279
+ updatedAt: string;
2280
+ status: "running";
2281
+ } | {
2282
+ id: string;
2283
+ connectorId: string;
2284
+ kind: "connect" | "reauthorize";
2285
+ owner: {
2286
+ type: "project";
2287
+ };
2288
+ slot: string;
2289
+ createdAt: string;
2290
+ updatedAt: string;
2291
+ status: "waiting";
2292
+ waitingFor: "account_selection";
2293
+ accounts: Array<{
1499
2294
  id: string;
1500
- method: "POST";
1501
- route: string;
1502
- bodyFormat: "json" | "text" | "raw";
1503
- hasVerify: boolean;
1504
- hasIdempotency: boolean;
2295
+ label: string;
2296
+ description?: string;
2297
+ avatarUrl?: string;
1505
2298
  }>;
2299
+ expiresAt: string;
2300
+ } | {
2301
+ id: string;
2302
+ connectorId: string;
2303
+ kind: "connect" | "reauthorize";
2304
+ owner: {
2305
+ type: "project";
2306
+ };
2307
+ slot: string;
2308
+ createdAt: string;
2309
+ updatedAt: string;
2310
+ status: "succeeded";
2311
+ connections: Array<{
2312
+ id: string;
2313
+ connectorId: string;
2314
+ owner: {
2315
+ type: "project";
2316
+ };
2317
+ slot: string;
2318
+ account: {
2319
+ id: string;
2320
+ label: string;
2321
+ description?: string;
2322
+ avatarUrl?: string;
2323
+ };
2324
+ status: "connected" | "needs_reauthorization" | "disconnected";
2325
+ }>;
2326
+ finishedAt: string;
2327
+ } | {
2328
+ id: string;
2329
+ connectorId: string;
2330
+ kind: "connect" | "reauthorize";
2331
+ owner: {
2332
+ type: "project";
2333
+ };
2334
+ slot: string;
2335
+ createdAt: string;
2336
+ updatedAt: string;
2337
+ status: "failed";
2338
+ error: {
2339
+ code: "internal.unexpected" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable";
2340
+ message: string;
2341
+ retryable: boolean;
2342
+ at: string;
2343
+ /**
2344
+ * Any JSON-compatible value.
2345
+ */
2346
+ details?: string | number | boolean | Array<unknown> | {
2347
+ [key: string]: unknown;
2348
+ } | null;
2349
+ truncated?: true;
2350
+ };
2351
+ finishedAt: string;
2352
+ } | {
2353
+ id: string;
2354
+ connectorId: string;
2355
+ kind: "connect" | "reauthorize";
2356
+ owner: {
2357
+ type: "project";
2358
+ };
2359
+ slot: string;
2360
+ createdAt: string;
2361
+ updatedAt: string;
2362
+ status: "cancelled" | "expired";
2363
+ finishedAt: string;
1506
2364
  };
1507
2365
  };
1508
- export type GetConnectorResponse = GetConnectorResponses[keyof GetConnectorResponses];
2366
+ export type SelectConnectorConnectionRunAccountResponse = SelectConnectorConnectionRunAccountResponses[keyof SelectConnectorConnectionRunAccountResponses];
2367
+ export type ReauthorizeConnectorConnectionData = {
2368
+ body: {
2369
+ returnTo: string;
2370
+ };
2371
+ path: {
2372
+ connectorId: string;
2373
+ connectionId: string;
2374
+ };
2375
+ query?: never;
2376
+ url: "/api/connectors/{connectorId}/connections/{connectionId}/reauthorize";
2377
+ };
2378
+ export type ReauthorizeConnectorConnectionErrors = {
2379
+ /**
2380
+ * Response for status 400
2381
+ */
2382
+ 400: {
2383
+ error: string;
2384
+ /**
2385
+ * Stable machine-readable failure code for programmatic handling.
2386
+ */
2387
+ code?: "connector.authorization_invalid" | "connector.configuration_invalid";
2388
+ };
2389
+ /**
2390
+ * Response for status 403
2391
+ */
2392
+ 403: {
2393
+ error: string;
2394
+ };
2395
+ /**
2396
+ * Response for status 404
2397
+ */
2398
+ 404: {
2399
+ error: string;
2400
+ /**
2401
+ * Stable machine-readable failure code for programmatic handling.
2402
+ */
2403
+ code?: "connector.not_found";
2404
+ };
2405
+ /**
2406
+ * Response for status 409
2407
+ */
2408
+ 409: {
2409
+ error: string;
2410
+ /**
2411
+ * Stable machine-readable failure code for programmatic handling.
2412
+ */
2413
+ code?: "connector.authorization_required" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.replacement_required" | "connector.revocation_pending";
2414
+ };
2415
+ /**
2416
+ * Response for status 500
2417
+ */
2418
+ 500: {
2419
+ error: string;
2420
+ /**
2421
+ * Stable machine-readable failure code for programmatic handling.
2422
+ */
2423
+ code?: "internal.unexpected";
2424
+ };
2425
+ /**
2426
+ * Response for status 502
2427
+ */
2428
+ 502: {
2429
+ error: string;
2430
+ /**
2431
+ * Stable machine-readable failure code for programmatic handling.
2432
+ */
2433
+ code?: "connector.adapter_invalid" | "connector.provider_failed";
2434
+ };
2435
+ /**
2436
+ * Response for status 503
2437
+ */
2438
+ 503: {
2439
+ error: string;
2440
+ /**
2441
+ * Stable machine-readable failure code for programmatic handling.
2442
+ */
2443
+ code?: "connector.credentials_unavailable" | "connector.provider_unavailable";
2444
+ };
2445
+ };
2446
+ export type ReauthorizeConnectorConnectionError = ReauthorizeConnectorConnectionErrors[keyof ReauthorizeConnectorConnectionErrors];
2447
+ export type ReauthorizeConnectorConnectionResponses = {
2448
+ /**
2449
+ * Response for status 201
2450
+ */
2451
+ 201: {
2452
+ runId: string;
2453
+ authorizationUrl: string;
2454
+ affectedConnections: Array<{
2455
+ id: string;
2456
+ connectorId: string;
2457
+ owner: {
2458
+ type: "project";
2459
+ };
2460
+ slot: string;
2461
+ account: {
2462
+ id: string;
2463
+ label: string;
2464
+ description?: string;
2465
+ avatarUrl?: string;
2466
+ };
2467
+ status: "connected" | "needs_reauthorization" | "disconnected";
2468
+ }>;
2469
+ };
2470
+ };
2471
+ export type ReauthorizeConnectorConnectionResponse = ReauthorizeConnectorConnectionResponses[keyof ReauthorizeConnectorConnectionResponses];
1509
2472
  export type ListDatasetsData = {
1510
2473
  body?: never;
1511
2474
  path?: never;
@@ -1573,6 +2536,10 @@ export type GetDatasetErrors = {
1573
2536
  */
1574
2537
  404: {
1575
2538
  error: string;
2539
+ /**
2540
+ * Stable machine-readable failure code for programmatic handling.
2541
+ */
2542
+ code: "dataset.not_found";
1576
2543
  };
1577
2544
  };
1578
2545
  export type GetDatasetError = GetDatasetErrors[keyof GetDatasetErrors];
@@ -1630,6 +2597,10 @@ export type ListDatasetVersionsErrors = {
1630
2597
  */
1631
2598
  404: {
1632
2599
  error: string;
2600
+ /**
2601
+ * Stable machine-readable failure code for programmatic handling.
2602
+ */
2603
+ code: "dataset.not_found";
1633
2604
  };
1634
2605
  };
1635
2606
  export type ListDatasetVersionsError = ListDatasetVersionsErrors[keyof ListDatasetVersionsErrors];
@@ -1688,6 +2659,10 @@ export type GetDatasetVersionErrors = {
1688
2659
  */
1689
2660
  404: {
1690
2661
  error: string;
2662
+ /**
2663
+ * Stable machine-readable failure code for programmatic handling.
2664
+ */
2665
+ code: "dataset.not_found" | "dataset.version_not_found";
1691
2666
  };
1692
2667
  };
1693
2668
  export type GetDatasetVersionError = GetDatasetVersionErrors[keyof GetDatasetVersionErrors];
@@ -1747,6 +2722,10 @@ export type ListDatasetRowsErrors = {
1747
2722
  */
1748
2723
  404: {
1749
2724
  error: string;
2725
+ /**
2726
+ * Stable machine-readable failure code for programmatic handling.
2727
+ */
2728
+ code: "dataset.not_found" | "dataset.version_not_found";
1750
2729
  };
1751
2730
  };
1752
2731
  export type ListDatasetRowsError = ListDatasetRowsErrors[keyof ListDatasetRowsErrors];
@@ -1837,8 +2816,9 @@ export type ListSyncsResponses = {
1837
2816
  syncId: string;
1838
2817
  datasetId: string;
1839
2818
  mode: "snapshot" | "append" | "merge";
1840
- status: "running" | "succeeded" | "failed" | "cancelled";
1841
- startedAt: string;
2819
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2820
+ queuedAt: string;
2821
+ startedAt?: string;
1842
2822
  finishedAt?: string;
1843
2823
  rowsRead?: number;
1844
2824
  output?: {
@@ -1848,8 +2828,17 @@ export type ListSyncsResponses = {
1848
2828
  expectedLatestVersionId?: string;
1849
2829
  commitMessage?: string;
1850
2830
  error?: {
1851
- name?: string;
2831
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed";
1852
2832
  message: string;
2833
+ retryable: boolean;
2834
+ at: string;
2835
+ /**
2836
+ * Any JSON-compatible value.
2837
+ */
2838
+ details?: string | number | boolean | Array<unknown> | {
2839
+ [key: string]: unknown;
2840
+ } | null;
2841
+ truncated?: true;
1853
2842
  };
1854
2843
  } | null;
1855
2844
  }>;
@@ -1909,8 +2898,9 @@ export type GetSyncResponses = {
1909
2898
  syncId: string;
1910
2899
  datasetId: string;
1911
2900
  mode: "snapshot" | "append" | "merge";
1912
- status: "running" | "succeeded" | "failed" | "cancelled";
1913
- startedAt: string;
2901
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2902
+ queuedAt: string;
2903
+ startedAt?: string;
1914
2904
  finishedAt?: string;
1915
2905
  rowsRead?: number;
1916
2906
  output?: {
@@ -1920,8 +2910,17 @@ export type GetSyncResponses = {
1920
2910
  expectedLatestVersionId?: string;
1921
2911
  commitMessage?: string;
1922
2912
  error?: {
1923
- name?: string;
2913
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed";
1924
2914
  message: string;
2915
+ retryable: boolean;
2916
+ at: string;
2917
+ /**
2918
+ * Any JSON-compatible value.
2919
+ */
2920
+ details?: string | number | boolean | Array<unknown> | {
2921
+ [key: string]: unknown;
2922
+ } | null;
2923
+ truncated?: true;
1925
2924
  };
1926
2925
  } | null;
1927
2926
  };
@@ -1933,7 +2932,7 @@ export type ListSyncRunsData = {
1933
2932
  query?: {
1934
2933
  syncId?: string;
1935
2934
  datasetId?: string;
1936
- status?: "running" | "succeeded" | "failed" | "cancelled";
2935
+ status?: "queued" | "running" | "succeeded" | "failed" | "cancelled";
1937
2936
  startedAfter?: string;
1938
2937
  startedBefore?: string;
1939
2938
  limit?: string;
@@ -1968,8 +2967,9 @@ export type ListSyncRunsResponses = {
1968
2967
  syncId: string;
1969
2968
  datasetId: string;
1970
2969
  mode: "snapshot" | "append" | "merge";
1971
- status: "running" | "succeeded" | "failed" | "cancelled";
1972
- startedAt: string;
2970
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2971
+ queuedAt: string;
2972
+ startedAt?: string;
1973
2973
  finishedAt?: string;
1974
2974
  rowsRead?: number;
1975
2975
  output?: {
@@ -1979,8 +2979,17 @@ export type ListSyncRunsResponses = {
1979
2979
  expectedLatestVersionId?: string;
1980
2980
  commitMessage?: string;
1981
2981
  error?: {
1982
- name?: string;
2982
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "sync.execution_failed";
1983
2983
  message: string;
2984
+ retryable: boolean;
2985
+ at: string;
2986
+ /**
2987
+ * Any JSON-compatible value.
2988
+ */
2989
+ details?: string | number | boolean | Array<unknown> | {
2990
+ [key: string]: unknown;
2991
+ } | null;
2992
+ truncated?: true;
1984
2993
  };
1985
2994
  }>;
1986
2995
  hasMore: boolean;
@@ -2097,16 +3106,26 @@ export type ListPipelinesResponses = {
2097
3106
  id: string;
2098
3107
  projectId: string;
2099
3108
  pipelineId: string;
2100
- status: "running" | "succeeded" | "failed" | "cancelled";
2101
- startedAt: string;
3109
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3110
+ queuedAt: string;
3111
+ startedAt?: string;
2102
3112
  finishedAt?: string;
2103
3113
  output?: {
2104
3114
  datasetId: string;
2105
3115
  versionId: string;
2106
3116
  };
2107
3117
  error?: {
2108
- name?: string;
3118
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "pipeline.step_failed";
2109
3119
  message: string;
3120
+ retryable: boolean;
3121
+ at: string;
3122
+ /**
3123
+ * Any JSON-compatible value.
3124
+ */
3125
+ details?: string | number | boolean | Array<unknown> | {
3126
+ [key: string]: unknown;
3127
+ } | null;
3128
+ truncated?: true;
2110
3129
  };
2111
3130
  } | null;
2112
3131
  }>;
@@ -2188,16 +3207,26 @@ export type GetPipelineResponses = {
2188
3207
  id: string;
2189
3208
  projectId: string;
2190
3209
  pipelineId: string;
2191
- status: "running" | "succeeded" | "failed" | "cancelled";
2192
- startedAt: string;
3210
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3211
+ queuedAt: string;
3212
+ startedAt?: string;
2193
3213
  finishedAt?: string;
2194
3214
  output?: {
2195
3215
  datasetId: string;
2196
3216
  versionId: string;
2197
3217
  };
2198
3218
  error?: {
2199
- name?: string;
3219
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "pipeline.step_failed";
2200
3220
  message: string;
3221
+ retryable: boolean;
3222
+ at: string;
3223
+ /**
3224
+ * Any JSON-compatible value.
3225
+ */
3226
+ details?: string | number | boolean | Array<unknown> | {
3227
+ [key: string]: unknown;
3228
+ } | null;
3229
+ truncated?: true;
2201
3230
  };
2202
3231
  } | null;
2203
3232
  };
@@ -2208,7 +3237,7 @@ export type ListPipelineRunsData = {
2208
3237
  path?: never;
2209
3238
  query?: {
2210
3239
  pipelineId?: string;
2211
- status?: "running" | "succeeded" | "failed" | "cancelled";
3240
+ status?: "queued" | "running" | "succeeded" | "failed" | "cancelled";
2212
3241
  startedAfter?: string;
2213
3242
  startedBefore?: string;
2214
3243
  limit?: string;
@@ -2241,16 +3270,26 @@ export type ListPipelineRunsResponses = {
2241
3270
  id: string;
2242
3271
  projectId: string;
2243
3272
  pipelineId: string;
2244
- status: "running" | "succeeded" | "failed" | "cancelled";
2245
- startedAt: string;
3273
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3274
+ queuedAt: string;
3275
+ startedAt?: string;
2246
3276
  finishedAt?: string;
2247
3277
  output?: {
2248
3278
  datasetId: string;
2249
3279
  versionId: string;
2250
3280
  };
2251
3281
  error?: {
2252
- name?: string;
3282
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "pipeline.step_failed";
2253
3283
  message: string;
3284
+ retryable: boolean;
3285
+ at: string;
3286
+ /**
3287
+ * Any JSON-compatible value.
3288
+ */
3289
+ details?: string | number | boolean | Array<unknown> | {
3290
+ [key: string]: unknown;
3291
+ } | null;
3292
+ truncated?: true;
2254
3293
  };
2255
3294
  }>;
2256
3295
  hasMore: boolean;
@@ -2296,16 +3335,26 @@ export type GetPipelineRunResponses = {
2296
3335
  id: string;
2297
3336
  projectId: string;
2298
3337
  pipelineId: string;
2299
- status: "running" | "succeeded" | "failed" | "cancelled";
2300
- startedAt: string;
3338
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
3339
+ queuedAt: string;
3340
+ startedAt?: string;
2301
3341
  finishedAt?: string;
2302
3342
  output?: {
2303
3343
  datasetId: string;
2304
3344
  versionId: string;
2305
3345
  };
2306
3346
  error?: {
2307
- name?: string;
3347
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "pipeline.step_failed";
2308
3348
  message: string;
3349
+ retryable: boolean;
3350
+ at: string;
3351
+ /**
3352
+ * Any JSON-compatible value.
3353
+ */
3354
+ details?: string | number | boolean | Array<unknown> | {
3355
+ [key: string]: unknown;
3356
+ } | null;
3357
+ truncated?: true;
2309
3358
  };
2310
3359
  };
2311
3360
  steps: Array<{
@@ -2329,8 +3378,17 @@ export type GetPipelineRunResponses = {
2329
3378
  };
2330
3379
  rowsWritten?: number;
2331
3380
  error?: {
2332
- name?: string;
3381
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "pipeline.step_failed";
2333
3382
  message: string;
3383
+ retryable: boolean;
3384
+ at: string;
3385
+ /**
3386
+ * Any JSON-compatible value.
3387
+ */
3388
+ details?: string | number | boolean | Array<unknown> | {
3389
+ [key: string]: unknown;
3390
+ } | null;
3391
+ truncated?: true;
2334
3392
  };
2335
3393
  }>;
2336
3394
  };
@@ -2461,7 +3519,19 @@ export type ListWorkflowsResponses = {
2461
3519
  queuedAt?: string;
2462
3520
  startedAt: string;
2463
3521
  finishedAt?: string;
2464
- error?: string;
3522
+ error?: {
3523
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
3524
+ message: string;
3525
+ retryable: boolean;
3526
+ at: string;
3527
+ /**
3528
+ * Any JSON-compatible value.
3529
+ */
3530
+ details?: string | number | boolean | Array<unknown> | {
3531
+ [key: string]: unknown;
3532
+ } | null;
3533
+ truncated?: true;
3534
+ };
2465
3535
  requestedBy: {
2466
3536
  principalType: "user" | "serviceAccount" | "system";
2467
3537
  principalId: string;
@@ -2565,7 +3635,19 @@ export type GetWorkflowResponses = {
2565
3635
  queuedAt?: string;
2566
3636
  startedAt: string;
2567
3637
  finishedAt?: string;
2568
- error?: string;
3638
+ error?: {
3639
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
3640
+ message: string;
3641
+ retryable: boolean;
3642
+ at: string;
3643
+ /**
3644
+ * Any JSON-compatible value.
3645
+ */
3646
+ details?: string | number | boolean | Array<unknown> | {
3647
+ [key: string]: unknown;
3648
+ } | null;
3649
+ truncated?: true;
3650
+ };
2569
3651
  requestedBy: {
2570
3652
  principalType: "user" | "serviceAccount" | "system";
2571
3653
  principalId: string;
@@ -2938,7 +4020,19 @@ export type ListWorkflowRunsResponses = {
2938
4020
  queuedAt?: string;
2939
4021
  startedAt: string;
2940
4022
  finishedAt?: string;
2941
- error?: string;
4023
+ error?: {
4024
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
4025
+ message: string;
4026
+ retryable: boolean;
4027
+ at: string;
4028
+ /**
4029
+ * Any JSON-compatible value.
4030
+ */
4031
+ details?: string | number | boolean | Array<unknown> | {
4032
+ [key: string]: unknown;
4033
+ } | null;
4034
+ truncated?: true;
4035
+ };
2942
4036
  requestedBy: {
2943
4037
  principalType: "user" | "serviceAccount" | "system";
2944
4038
  principalId: string;
@@ -2991,7 +4085,19 @@ export type GetWorkflowRunResponses = {
2991
4085
  queuedAt?: string;
2992
4086
  startedAt: string;
2993
4087
  finishedAt?: string;
2994
- error?: string;
4088
+ error?: {
4089
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
4090
+ message: string;
4091
+ retryable: boolean;
4092
+ at: string;
4093
+ /**
4094
+ * Any JSON-compatible value.
4095
+ */
4096
+ details?: string | number | boolean | Array<unknown> | {
4097
+ [key: string]: unknown;
4098
+ } | null;
4099
+ truncated?: true;
4100
+ };
2995
4101
  requestedBy: {
2996
4102
  principalType: "user" | "serviceAccount" | "system";
2997
4103
  principalId: string;
@@ -3029,7 +4135,19 @@ export type GetWorkflowRunResponses = {
3029
4135
  [key: string]: unknown;
3030
4136
  } | null;
3031
4137
  };
3032
- error?: string;
4138
+ error?: {
4139
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
4140
+ message: string;
4141
+ retryable: boolean;
4142
+ at: string;
4143
+ /**
4144
+ * Any JSON-compatible value.
4145
+ */
4146
+ details?: string | number | boolean | Array<unknown> | {
4147
+ [key: string]: unknown;
4148
+ } | null;
4149
+ truncated?: true;
4150
+ };
3033
4151
  agentExecution?: {
3034
4152
  agentId: string;
3035
4153
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -3037,7 +4155,15 @@ export type GetWorkflowRunResponses = {
3037
4155
  modelId?: string;
3038
4156
  finishReason?: string;
3039
4157
  usage?: {
3040
- [key: string]: unknown;
4158
+ inputTokens?: number;
4159
+ outputTokens?: number;
4160
+ totalTokens?: number;
4161
+ uncachedInputTokens?: number;
4162
+ cacheReadInputTokens?: number;
4163
+ cacheWriteInputTokens?: number;
4164
+ textOutputTokens?: number;
4165
+ reasoningOutputTokens?: number;
4166
+ reportingStatus: "complete" | "partial" | "unavailable";
3041
4167
  };
3042
4168
  startedAt?: string;
3043
4169
  completedAt?: string;
@@ -3087,19 +4213,35 @@ export type GetWorkflowAgentNodeExecutionResponses = {
3087
4213
  modelId?: string;
3088
4214
  finishReason?: string;
3089
4215
  usage?: {
3090
- [key: string]: unknown;
4216
+ inputTokens?: number;
4217
+ outputTokens?: number;
4218
+ totalTokens?: number;
4219
+ uncachedInputTokens?: number;
4220
+ cacheReadInputTokens?: number;
4221
+ cacheWriteInputTokens?: number;
4222
+ textOutputTokens?: number;
4223
+ reasoningOutputTokens?: number;
4224
+ reportingStatus: "complete" | "partial" | "unavailable";
3091
4225
  };
3092
4226
  startedAt?: string;
3093
4227
  completedAt?: string;
3094
4228
  nodeRunId: string;
3095
4229
  prompt: string;
3096
- executionPrincipal?: {
3097
- principalType: "user" | "serviceAccount" | "system";
3098
- principalId: string;
3099
- };
3100
4230
  trace?: Array<unknown>;
3101
4231
  diagnostics?: Array<unknown>;
3102
- error?: string;
4232
+ error?: {
4233
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
4234
+ message: string;
4235
+ retryable: boolean;
4236
+ at: string;
4237
+ /**
4238
+ * Any JSON-compatible value.
4239
+ */
4240
+ details?: string | number | boolean | Array<unknown> | {
4241
+ [key: string]: unknown;
4242
+ } | null;
4243
+ truncated?: true;
4244
+ };
3103
4245
  createdAt: string;
3104
4246
  };
3105
4247
  };
@@ -3148,7 +4290,19 @@ export type CancelWorkflowRunResponses = {
3148
4290
  queuedAt?: string;
3149
4291
  startedAt: string;
3150
4292
  finishedAt?: string;
3151
- error?: string;
4293
+ error?: {
4294
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
4295
+ message: string;
4296
+ retryable: boolean;
4297
+ at: string;
4298
+ /**
4299
+ * Any JSON-compatible value.
4300
+ */
4301
+ details?: string | number | boolean | Array<unknown> | {
4302
+ [key: string]: unknown;
4303
+ } | null;
4304
+ truncated?: true;
4305
+ };
3152
4306
  requestedBy: {
3153
4307
  principalType: "user" | "serviceAccount" | "system";
3154
4308
  principalId: string;
@@ -3186,7 +4340,19 @@ export type CancelWorkflowRunResponses = {
3186
4340
  [key: string]: unknown;
3187
4341
  } | null;
3188
4342
  };
3189
- error?: string;
4343
+ error?: {
4344
+ code: "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed";
4345
+ message: string;
4346
+ retryable: boolean;
4347
+ at: string;
4348
+ /**
4349
+ * Any JSON-compatible value.
4350
+ */
4351
+ details?: string | number | boolean | Array<unknown> | {
4352
+ [key: string]: unknown;
4353
+ } | null;
4354
+ truncated?: true;
4355
+ };
3190
4356
  agentExecution?: {
3191
4357
  agentId: string;
3192
4358
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -3194,7 +4360,15 @@ export type CancelWorkflowRunResponses = {
3194
4360
  modelId?: string;
3195
4361
  finishReason?: string;
3196
4362
  usage?: {
3197
- [key: string]: unknown;
4363
+ inputTokens?: number;
4364
+ outputTokens?: number;
4365
+ totalTokens?: number;
4366
+ uncachedInputTokens?: number;
4367
+ cacheReadInputTokens?: number;
4368
+ cacheWriteInputTokens?: number;
4369
+ textOutputTokens?: number;
4370
+ reasoningOutputTokens?: number;
4371
+ reportingStatus: "complete" | "partial" | "unavailable";
3198
4372
  };
3199
4373
  startedAt?: string;
3200
4374
  completedAt?: string;
@@ -4698,9 +5872,16 @@ export type ListActionRunsResponses = {
4698
5872
  startedAt?: string;
4699
5873
  finishedAt?: string;
4700
5874
  error?: {
4701
- name?: string;
5875
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "action.phase_failed";
4702
5876
  message: string;
4703
- phase?: "request" | "enqueue" | "validation" | "writeback" | "edits" | "commit" | "effects" | "cancelled";
5877
+ retryable: boolean;
5878
+ at: string;
5879
+ details: {
5880
+ actionId: string;
5881
+ runId: string;
5882
+ phase: "request" | "enqueue" | "validation" | "writeback" | "edits" | "commit" | "effects" | "cancelled";
5883
+ };
5884
+ truncated?: true;
4704
5885
  };
4705
5886
  }>;
4706
5887
  hasMore: boolean;
@@ -4758,30 +5939,62 @@ export type GetActionRunResponses = {
4758
5939
  startedAt?: string;
4759
5940
  finishedAt?: string;
4760
5941
  error?: {
4761
- name?: string;
5942
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "action.phase_failed";
4762
5943
  message: string;
4763
- phase?: "request" | "enqueue" | "validation" | "writeback" | "edits" | "commit" | "effects" | "cancelled";
5944
+ retryable: boolean;
5945
+ at: string;
5946
+ details: {
5947
+ actionId: string;
5948
+ runId: string;
5949
+ phase: "request" | "enqueue" | "validation" | "writeback" | "edits" | "commit" | "effects" | "cancelled";
5950
+ };
5951
+ truncated?: true;
4764
5952
  };
4765
5953
  params: {
4766
5954
  [key: string]: unknown;
4767
5955
  };
4768
5956
  writeback?: {
4769
- status: "succeeded" | "failed";
5957
+ status: "succeeded";
4770
5958
  completedAt: string;
4771
- result?: unknown;
4772
- error?: {
4773
- name?: string;
5959
+ /**
5960
+ * Any JSON-compatible value.
5961
+ */
5962
+ result: string | number | boolean | Array<unknown> | {
5963
+ [key: string]: unknown;
5964
+ } | null;
5965
+ } | {
5966
+ status: "failed";
5967
+ completedAt: string;
5968
+ error: {
5969
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "action.phase_failed";
4774
5970
  message: string;
4775
- phase?: "request" | "enqueue" | "validation" | "writeback" | "edits" | "commit" | "effects" | "cancelled";
5971
+ retryable: boolean;
5972
+ at: string;
5973
+ details: {
5974
+ actionId: string;
5975
+ runId: string;
5976
+ phase: "writeback";
5977
+ };
5978
+ truncated?: true;
4776
5979
  };
4777
5980
  };
4778
5981
  effects?: {
4779
- status: "succeeded" | "failed";
5982
+ status: "succeeded";
4780
5983
  completedAt: string;
4781
- error?: {
4782
- name?: string;
5984
+ } | {
5985
+ status: "failed";
5986
+ completedAt: string;
5987
+ error: {
5988
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "action.phase_failed";
4783
5989
  message: string;
4784
- phase?: "request" | "enqueue" | "validation" | "writeback" | "edits" | "commit" | "effects" | "cancelled";
5990
+ retryable: boolean;
5991
+ at: string;
5992
+ details: {
5993
+ actionId: string;
5994
+ runId: string;
5995
+ phase: "effects";
5996
+ };
5997
+ truncated?: true;
4785
5998
  };
4786
5999
  };
4787
6000
  };
@@ -5353,12 +6566,8 @@ export type PostAgentThreadMessageResponses = {
5353
6566
  threadId: string;
5354
6567
  agentId: string;
5355
6568
  triggerMessageId: string;
5356
- requestedByPrincipal: {
5357
- type: "user" | "serviceAccount" | "system";
5358
- id: string;
5359
- };
5360
- executionPrincipal?: {
5361
- type: "user" | "serviceAccount" | "system";
6569
+ requestedBy?: {
6570
+ type: "user" | "serviceAccount";
5362
6571
  id: string;
5363
6572
  };
5364
6573
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -5368,8 +6577,12 @@ export type PostAgentThreadMessageResponses = {
5368
6577
  inputTokens?: number;
5369
6578
  outputTokens?: number;
5370
6579
  totalTokens?: number;
5371
- reasoningTokens?: number;
5372
- cachedInputTokens?: number;
6580
+ uncachedInputTokens?: number;
6581
+ cacheReadInputTokens?: number;
6582
+ cacheWriteInputTokens?: number;
6583
+ textOutputTokens?: number;
6584
+ reasoningOutputTokens?: number;
6585
+ reportingStatus: "complete" | "partial" | "unavailable";
5373
6586
  };
5374
6587
  diagnostics?: Array<{
5375
6588
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -5378,7 +6591,19 @@ export type PostAgentThreadMessageResponses = {
5378
6591
  path?: string;
5379
6592
  message: string;
5380
6593
  }>;
5381
- error?: string;
6594
+ error?: {
6595
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
6596
+ message: string;
6597
+ retryable: boolean;
6598
+ at: string;
6599
+ /**
6600
+ * Any JSON-compatible value.
6601
+ */
6602
+ details?: string | number | boolean | Array<unknown> | {
6603
+ [key: string]: unknown;
6604
+ } | null;
6605
+ truncated?: true;
6606
+ };
5382
6607
  attempt: number;
5383
6608
  streamId: string;
5384
6609
  createdAt: string;
@@ -5519,12 +6744,8 @@ export type CancelAgentRunResponses = {
5519
6744
  threadId: string;
5520
6745
  agentId: string;
5521
6746
  triggerMessageId: string;
5522
- requestedByPrincipal: {
5523
- type: "user" | "serviceAccount" | "system";
5524
- id: string;
5525
- };
5526
- executionPrincipal?: {
5527
- type: "user" | "serviceAccount" | "system";
6747
+ requestedBy?: {
6748
+ type: "user" | "serviceAccount";
5528
6749
  id: string;
5529
6750
  };
5530
6751
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -5534,8 +6755,12 @@ export type CancelAgentRunResponses = {
5534
6755
  inputTokens?: number;
5535
6756
  outputTokens?: number;
5536
6757
  totalTokens?: number;
5537
- reasoningTokens?: number;
5538
- cachedInputTokens?: number;
6758
+ uncachedInputTokens?: number;
6759
+ cacheReadInputTokens?: number;
6760
+ cacheWriteInputTokens?: number;
6761
+ textOutputTokens?: number;
6762
+ reasoningOutputTokens?: number;
6763
+ reportingStatus: "complete" | "partial" | "unavailable";
5539
6764
  };
5540
6765
  diagnostics?: Array<{
5541
6766
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -5544,7 +6769,19 @@ export type CancelAgentRunResponses = {
5544
6769
  path?: string;
5545
6770
  message: string;
5546
6771
  }>;
5547
- error?: string;
6772
+ error?: {
6773
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
6774
+ message: string;
6775
+ retryable: boolean;
6776
+ at: string;
6777
+ /**
6778
+ * Any JSON-compatible value.
6779
+ */
6780
+ details?: string | number | boolean | Array<unknown> | {
6781
+ [key: string]: unknown;
6782
+ } | null;
6783
+ truncated?: true;
6784
+ };
5548
6785
  attempt: number;
5549
6786
  streamId: string;
5550
6787
  createdAt: string;
@@ -5601,12 +6838,8 @@ export type RetryAgentRunResponses = {
5601
6838
  threadId: string;
5602
6839
  agentId: string;
5603
6840
  triggerMessageId: string;
5604
- requestedByPrincipal: {
5605
- type: "user" | "serviceAccount" | "system";
5606
- id: string;
5607
- };
5608
- executionPrincipal?: {
5609
- type: "user" | "serviceAccount" | "system";
6841
+ requestedBy?: {
6842
+ type: "user" | "serviceAccount";
5610
6843
  id: string;
5611
6844
  };
5612
6845
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -5616,8 +6849,12 @@ export type RetryAgentRunResponses = {
5616
6849
  inputTokens?: number;
5617
6850
  outputTokens?: number;
5618
6851
  totalTokens?: number;
5619
- reasoningTokens?: number;
5620
- cachedInputTokens?: number;
6852
+ uncachedInputTokens?: number;
6853
+ cacheReadInputTokens?: number;
6854
+ cacheWriteInputTokens?: number;
6855
+ textOutputTokens?: number;
6856
+ reasoningOutputTokens?: number;
6857
+ reportingStatus: "complete" | "partial" | "unavailable";
5621
6858
  };
5622
6859
  diagnostics?: Array<{
5623
6860
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -5626,7 +6863,19 @@ export type RetryAgentRunResponses = {
5626
6863
  path?: string;
5627
6864
  message: string;
5628
6865
  }>;
5629
- error?: string;
6866
+ error?: {
6867
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
6868
+ message: string;
6869
+ retryable: boolean;
6870
+ at: string;
6871
+ /**
6872
+ * Any JSON-compatible value.
6873
+ */
6874
+ details?: string | number | boolean | Array<unknown> | {
6875
+ [key: string]: unknown;
6876
+ } | null;
6877
+ truncated?: true;
6878
+ };
5630
6879
  attempt: number;
5631
6880
  streamId: string;
5632
6881
  createdAt: string;
@@ -5681,12 +6930,8 @@ export type ListAgentThreadRunsResponses = {
5681
6930
  threadId: string;
5682
6931
  agentId: string;
5683
6932
  triggerMessageId: string;
5684
- requestedByPrincipal: {
5685
- type: "user" | "serviceAccount" | "system";
5686
- id: string;
5687
- };
5688
- executionPrincipal?: {
5689
- type: "user" | "serviceAccount" | "system";
6933
+ requestedBy?: {
6934
+ type: "user" | "serviceAccount";
5690
6935
  id: string;
5691
6936
  };
5692
6937
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -5696,8 +6941,12 @@ export type ListAgentThreadRunsResponses = {
5696
6941
  inputTokens?: number;
5697
6942
  outputTokens?: number;
5698
6943
  totalTokens?: number;
5699
- reasoningTokens?: number;
5700
- cachedInputTokens?: number;
6944
+ uncachedInputTokens?: number;
6945
+ cacheReadInputTokens?: number;
6946
+ cacheWriteInputTokens?: number;
6947
+ textOutputTokens?: number;
6948
+ reasoningOutputTokens?: number;
6949
+ reportingStatus: "complete" | "partial" | "unavailable";
5701
6950
  };
5702
6951
  diagnostics?: Array<{
5703
6952
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -5706,7 +6955,19 @@ export type ListAgentThreadRunsResponses = {
5706
6955
  path?: string;
5707
6956
  message: string;
5708
6957
  }>;
5709
- error?: string;
6958
+ error?: {
6959
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
6960
+ message: string;
6961
+ retryable: boolean;
6962
+ at: string;
6963
+ /**
6964
+ * Any JSON-compatible value.
6965
+ */
6966
+ details?: string | number | boolean | Array<unknown> | {
6967
+ [key: string]: unknown;
6968
+ } | null;
6969
+ truncated?: true;
6970
+ };
5710
6971
  attempt: number;
5711
6972
  streamId: string;
5712
6973
  createdAt: string;
@@ -5757,12 +7018,8 @@ export type GetAgentRunResponses = {
5757
7018
  threadId: string;
5758
7019
  agentId: string;
5759
7020
  triggerMessageId: string;
5760
- requestedByPrincipal: {
5761
- type: "user" | "serviceAccount" | "system";
5762
- id: string;
5763
- };
5764
- executionPrincipal?: {
5765
- type: "user" | "serviceAccount" | "system";
7021
+ requestedBy?: {
7022
+ type: "user" | "serviceAccount";
5766
7023
  id: string;
5767
7024
  };
5768
7025
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
@@ -5772,8 +7029,12 @@ export type GetAgentRunResponses = {
5772
7029
  inputTokens?: number;
5773
7030
  outputTokens?: number;
5774
7031
  totalTokens?: number;
5775
- reasoningTokens?: number;
5776
- cachedInputTokens?: number;
7032
+ uncachedInputTokens?: number;
7033
+ cacheReadInputTokens?: number;
7034
+ cacheWriteInputTokens?: number;
7035
+ textOutputTokens?: number;
7036
+ reasoningOutputTokens?: number;
7037
+ reportingStatus: "complete" | "partial" | "unavailable";
5777
7038
  };
5778
7039
  diagnostics?: Array<{
5779
7040
  code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
@@ -5782,7 +7043,19 @@ export type GetAgentRunResponses = {
5782
7043
  path?: string;
5783
7044
  message: string;
5784
7045
  }>;
5785
- error?: string;
7046
+ error?: {
7047
+ code: "internal.unexpected" | "runtime.cancelled" | "agent.execution_failed";
7048
+ message: string;
7049
+ retryable: boolean;
7050
+ at: string;
7051
+ /**
7052
+ * Any JSON-compatible value.
7053
+ */
7054
+ details?: string | number | boolean | Array<unknown> | {
7055
+ [key: string]: unknown;
7056
+ } | null;
7057
+ truncated?: true;
7058
+ };
5786
7059
  attempt: number;
5787
7060
  streamId: string;
5788
7061
  createdAt: string;
@@ -6847,15 +8120,29 @@ export type ListProjectionsResponses = {
6847
8120
  latestRun: {
6848
8121
  id: string;
6849
8122
  projectId: string;
6850
- status: "running" | "succeeded" | "failed" | "cancelled";
8123
+ executionId: string;
8124
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6851
8125
  attempt: number;
6852
8126
  progress: {
6853
8127
  sourceRowsRead: number;
6854
8128
  sourceRowsSkipped: number;
6855
8129
  };
6856
- startedAt: string;
8130
+ queuedAt: string;
8131
+ startedAt?: string;
6857
8132
  finishedAt?: string;
6858
- errorMessage?: string;
8133
+ error?: {
8134
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8135
+ message: string;
8136
+ retryable: boolean;
8137
+ at: string;
8138
+ /**
8139
+ * Any JSON-compatible value.
8140
+ */
8141
+ details?: string | number | boolean | Array<unknown> | {
8142
+ [key: string]: unknown;
8143
+ } | null;
8144
+ truncated?: true;
8145
+ };
6859
8146
  identity: {
6860
8147
  projectionId: string;
6861
8148
  datasetVersion: {
@@ -6875,15 +8162,29 @@ export type ListProjectionsResponses = {
6875
8162
  } | {
6876
8163
  id: string;
6877
8164
  projectId: string;
6878
- status: "running" | "succeeded" | "failed" | "cancelled";
8165
+ executionId: string;
8166
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6879
8167
  attempt: number;
6880
8168
  progress: {
6881
8169
  sourceRowsRead: number;
6882
8170
  sourceRowsSkipped: number;
6883
8171
  };
6884
- startedAt: string;
8172
+ queuedAt: string;
8173
+ startedAt?: string;
6885
8174
  finishedAt?: string;
6886
- errorMessage?: string;
8175
+ error?: {
8176
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8177
+ message: string;
8178
+ retryable: boolean;
8179
+ at: string;
8180
+ /**
8181
+ * Any JSON-compatible value.
8182
+ */
8183
+ details?: string | number | boolean | Array<unknown> | {
8184
+ [key: string]: unknown;
8185
+ } | null;
8186
+ truncated?: true;
8187
+ };
6887
8188
  identity: {
6888
8189
  projectionId: string;
6889
8190
  datasetVersion: {
@@ -6904,15 +8205,29 @@ export type ListProjectionsResponses = {
6904
8205
  } | {
6905
8206
  id: string;
6906
8207
  projectId: string;
6907
- status: "running" | "succeeded" | "failed" | "cancelled";
8208
+ executionId: string;
8209
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6908
8210
  attempt: number;
6909
8211
  progress: {
6910
8212
  sourceRowsRead: number;
6911
8213
  sourceRowsSkipped: number;
6912
8214
  };
6913
- startedAt: string;
8215
+ queuedAt: string;
8216
+ startedAt?: string;
6914
8217
  finishedAt?: string;
6915
- errorMessage?: string;
8218
+ error?: {
8219
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8220
+ message: string;
8221
+ retryable: boolean;
8222
+ at: string;
8223
+ /**
8224
+ * Any JSON-compatible value.
8225
+ */
8226
+ details?: string | number | boolean | Array<unknown> | {
8227
+ [key: string]: unknown;
8228
+ } | null;
8229
+ truncated?: true;
8230
+ };
6916
8231
  identity: {
6917
8232
  projectionId: string;
6918
8233
  datasetVersion: {
@@ -6943,15 +8258,29 @@ export type ListProjectionsResponses = {
6943
8258
  latestRun: {
6944
8259
  id: string;
6945
8260
  projectId: string;
6946
- status: "running" | "succeeded" | "failed" | "cancelled";
8261
+ executionId: string;
8262
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6947
8263
  attempt: number;
6948
8264
  progress: {
6949
8265
  sourceRowsRead: number;
6950
8266
  sourceRowsSkipped: number;
6951
8267
  };
6952
- startedAt: string;
6953
- finishedAt?: string;
6954
- errorMessage?: string;
8268
+ queuedAt: string;
8269
+ startedAt?: string;
8270
+ finishedAt?: string;
8271
+ error?: {
8272
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8273
+ message: string;
8274
+ retryable: boolean;
8275
+ at: string;
8276
+ /**
8277
+ * Any JSON-compatible value.
8278
+ */
8279
+ details?: string | number | boolean | Array<unknown> | {
8280
+ [key: string]: unknown;
8281
+ } | null;
8282
+ truncated?: true;
8283
+ };
6955
8284
  identity: {
6956
8285
  projectionId: string;
6957
8286
  datasetVersion: {
@@ -6971,15 +8300,29 @@ export type ListProjectionsResponses = {
6971
8300
  } | {
6972
8301
  id: string;
6973
8302
  projectId: string;
6974
- status: "running" | "succeeded" | "failed" | "cancelled";
8303
+ executionId: string;
8304
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
6975
8305
  attempt: number;
6976
8306
  progress: {
6977
8307
  sourceRowsRead: number;
6978
8308
  sourceRowsSkipped: number;
6979
8309
  };
6980
- startedAt: string;
8310
+ queuedAt: string;
8311
+ startedAt?: string;
6981
8312
  finishedAt?: string;
6982
- errorMessage?: string;
8313
+ error?: {
8314
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8315
+ message: string;
8316
+ retryable: boolean;
8317
+ at: string;
8318
+ /**
8319
+ * Any JSON-compatible value.
8320
+ */
8321
+ details?: string | number | boolean | Array<unknown> | {
8322
+ [key: string]: unknown;
8323
+ } | null;
8324
+ truncated?: true;
8325
+ };
6983
8326
  identity: {
6984
8327
  projectionId: string;
6985
8328
  datasetVersion: {
@@ -7000,15 +8343,29 @@ export type ListProjectionsResponses = {
7000
8343
  } | {
7001
8344
  id: string;
7002
8345
  projectId: string;
7003
- status: "running" | "succeeded" | "failed" | "cancelled";
8346
+ executionId: string;
8347
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7004
8348
  attempt: number;
7005
8349
  progress: {
7006
8350
  sourceRowsRead: number;
7007
8351
  sourceRowsSkipped: number;
7008
8352
  };
7009
- startedAt: string;
8353
+ queuedAt: string;
8354
+ startedAt?: string;
7010
8355
  finishedAt?: string;
7011
- errorMessage?: string;
8356
+ error?: {
8357
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8358
+ message: string;
8359
+ retryable: boolean;
8360
+ at: string;
8361
+ /**
8362
+ * Any JSON-compatible value.
8363
+ */
8364
+ details?: string | number | boolean | Array<unknown> | {
8365
+ [key: string]: unknown;
8366
+ } | null;
8367
+ truncated?: true;
8368
+ };
7012
8369
  identity: {
7013
8370
  projectionId: string;
7014
8371
  datasetVersion: {
@@ -7040,15 +8397,29 @@ export type ListProjectionsResponses = {
7040
8397
  latestRun: {
7041
8398
  id: string;
7042
8399
  projectId: string;
7043
- status: "running" | "succeeded" | "failed" | "cancelled";
8400
+ executionId: string;
8401
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7044
8402
  attempt: number;
7045
8403
  progress: {
7046
8404
  sourceRowsRead: number;
7047
8405
  sourceRowsSkipped: number;
7048
8406
  };
7049
- startedAt: string;
8407
+ queuedAt: string;
8408
+ startedAt?: string;
7050
8409
  finishedAt?: string;
7051
- errorMessage?: string;
8410
+ error?: {
8411
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8412
+ message: string;
8413
+ retryable: boolean;
8414
+ at: string;
8415
+ /**
8416
+ * Any JSON-compatible value.
8417
+ */
8418
+ details?: string | number | boolean | Array<unknown> | {
8419
+ [key: string]: unknown;
8420
+ } | null;
8421
+ truncated?: true;
8422
+ };
7052
8423
  identity: {
7053
8424
  projectionId: string;
7054
8425
  datasetVersion: {
@@ -7068,15 +8439,29 @@ export type ListProjectionsResponses = {
7068
8439
  } | {
7069
8440
  id: string;
7070
8441
  projectId: string;
7071
- status: "running" | "succeeded" | "failed" | "cancelled";
8442
+ executionId: string;
8443
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7072
8444
  attempt: number;
7073
8445
  progress: {
7074
8446
  sourceRowsRead: number;
7075
8447
  sourceRowsSkipped: number;
7076
8448
  };
7077
- startedAt: string;
8449
+ queuedAt: string;
8450
+ startedAt?: string;
7078
8451
  finishedAt?: string;
7079
- errorMessage?: string;
8452
+ error?: {
8453
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8454
+ message: string;
8455
+ retryable: boolean;
8456
+ at: string;
8457
+ /**
8458
+ * Any JSON-compatible value.
8459
+ */
8460
+ details?: string | number | boolean | Array<unknown> | {
8461
+ [key: string]: unknown;
8462
+ } | null;
8463
+ truncated?: true;
8464
+ };
7080
8465
  identity: {
7081
8466
  projectionId: string;
7082
8467
  datasetVersion: {
@@ -7097,15 +8482,29 @@ export type ListProjectionsResponses = {
7097
8482
  } | {
7098
8483
  id: string;
7099
8484
  projectId: string;
7100
- status: "running" | "succeeded" | "failed" | "cancelled";
8485
+ executionId: string;
8486
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7101
8487
  attempt: number;
7102
8488
  progress: {
7103
8489
  sourceRowsRead: number;
7104
8490
  sourceRowsSkipped: number;
7105
8491
  };
7106
- startedAt: string;
8492
+ queuedAt: string;
8493
+ startedAt?: string;
7107
8494
  finishedAt?: string;
7108
- errorMessage?: string;
8495
+ error?: {
8496
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8497
+ message: string;
8498
+ retryable: boolean;
8499
+ at: string;
8500
+ /**
8501
+ * Any JSON-compatible value.
8502
+ */
8503
+ details?: string | number | boolean | Array<unknown> | {
8504
+ [key: string]: unknown;
8505
+ } | null;
8506
+ truncated?: true;
8507
+ };
7109
8508
  identity: {
7110
8509
  projectionId: string;
7111
8510
  datasetVersion: {
@@ -7167,15 +8566,29 @@ export type GetProjectionResponses = {
7167
8566
  latestRun: {
7168
8567
  id: string;
7169
8568
  projectId: string;
7170
- status: "running" | "succeeded" | "failed" | "cancelled";
8569
+ executionId: string;
8570
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7171
8571
  attempt: number;
7172
8572
  progress: {
7173
8573
  sourceRowsRead: number;
7174
8574
  sourceRowsSkipped: number;
7175
8575
  };
7176
- startedAt: string;
8576
+ queuedAt: string;
8577
+ startedAt?: string;
7177
8578
  finishedAt?: string;
7178
- errorMessage?: string;
8579
+ error?: {
8580
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8581
+ message: string;
8582
+ retryable: boolean;
8583
+ at: string;
8584
+ /**
8585
+ * Any JSON-compatible value.
8586
+ */
8587
+ details?: string | number | boolean | Array<unknown> | {
8588
+ [key: string]: unknown;
8589
+ } | null;
8590
+ truncated?: true;
8591
+ };
7179
8592
  identity: {
7180
8593
  projectionId: string;
7181
8594
  datasetVersion: {
@@ -7195,15 +8608,29 @@ export type GetProjectionResponses = {
7195
8608
  } | {
7196
8609
  id: string;
7197
8610
  projectId: string;
7198
- status: "running" | "succeeded" | "failed" | "cancelled";
8611
+ executionId: string;
8612
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7199
8613
  attempt: number;
7200
8614
  progress: {
7201
8615
  sourceRowsRead: number;
7202
8616
  sourceRowsSkipped: number;
7203
8617
  };
7204
- startedAt: string;
8618
+ queuedAt: string;
8619
+ startedAt?: string;
7205
8620
  finishedAt?: string;
7206
- errorMessage?: string;
8621
+ error?: {
8622
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8623
+ message: string;
8624
+ retryable: boolean;
8625
+ at: string;
8626
+ /**
8627
+ * Any JSON-compatible value.
8628
+ */
8629
+ details?: string | number | boolean | Array<unknown> | {
8630
+ [key: string]: unknown;
8631
+ } | null;
8632
+ truncated?: true;
8633
+ };
7207
8634
  identity: {
7208
8635
  projectionId: string;
7209
8636
  datasetVersion: {
@@ -7224,15 +8651,29 @@ export type GetProjectionResponses = {
7224
8651
  } | {
7225
8652
  id: string;
7226
8653
  projectId: string;
7227
- status: "running" | "succeeded" | "failed" | "cancelled";
8654
+ executionId: string;
8655
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7228
8656
  attempt: number;
7229
8657
  progress: {
7230
8658
  sourceRowsRead: number;
7231
8659
  sourceRowsSkipped: number;
7232
8660
  };
7233
- startedAt: string;
8661
+ queuedAt: string;
8662
+ startedAt?: string;
7234
8663
  finishedAt?: string;
7235
- errorMessage?: string;
8664
+ error?: {
8665
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8666
+ message: string;
8667
+ retryable: boolean;
8668
+ at: string;
8669
+ /**
8670
+ * Any JSON-compatible value.
8671
+ */
8672
+ details?: string | number | boolean | Array<unknown> | {
8673
+ [key: string]: unknown;
8674
+ } | null;
8675
+ truncated?: true;
8676
+ };
7236
8677
  identity: {
7237
8678
  projectionId: string;
7238
8679
  datasetVersion: {
@@ -7262,15 +8703,29 @@ export type GetProjectionResponses = {
7262
8703
  latestRun: {
7263
8704
  id: string;
7264
8705
  projectId: string;
7265
- status: "running" | "succeeded" | "failed" | "cancelled";
8706
+ executionId: string;
8707
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7266
8708
  attempt: number;
7267
8709
  progress: {
7268
8710
  sourceRowsRead: number;
7269
8711
  sourceRowsSkipped: number;
7270
8712
  };
7271
- startedAt: string;
8713
+ queuedAt: string;
8714
+ startedAt?: string;
7272
8715
  finishedAt?: string;
7273
- errorMessage?: string;
8716
+ error?: {
8717
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8718
+ message: string;
8719
+ retryable: boolean;
8720
+ at: string;
8721
+ /**
8722
+ * Any JSON-compatible value.
8723
+ */
8724
+ details?: string | number | boolean | Array<unknown> | {
8725
+ [key: string]: unknown;
8726
+ } | null;
8727
+ truncated?: true;
8728
+ };
7274
8729
  identity: {
7275
8730
  projectionId: string;
7276
8731
  datasetVersion: {
@@ -7290,15 +8745,29 @@ export type GetProjectionResponses = {
7290
8745
  } | {
7291
8746
  id: string;
7292
8747
  projectId: string;
7293
- status: "running" | "succeeded" | "failed" | "cancelled";
8748
+ executionId: string;
8749
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7294
8750
  attempt: number;
7295
8751
  progress: {
7296
8752
  sourceRowsRead: number;
7297
8753
  sourceRowsSkipped: number;
7298
8754
  };
7299
- startedAt: string;
8755
+ queuedAt: string;
8756
+ startedAt?: string;
7300
8757
  finishedAt?: string;
7301
- errorMessage?: string;
8758
+ error?: {
8759
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8760
+ message: string;
8761
+ retryable: boolean;
8762
+ at: string;
8763
+ /**
8764
+ * Any JSON-compatible value.
8765
+ */
8766
+ details?: string | number | boolean | Array<unknown> | {
8767
+ [key: string]: unknown;
8768
+ } | null;
8769
+ truncated?: true;
8770
+ };
7302
8771
  identity: {
7303
8772
  projectionId: string;
7304
8773
  datasetVersion: {
@@ -7319,15 +8788,29 @@ export type GetProjectionResponses = {
7319
8788
  } | {
7320
8789
  id: string;
7321
8790
  projectId: string;
7322
- status: "running" | "succeeded" | "failed" | "cancelled";
8791
+ executionId: string;
8792
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7323
8793
  attempt: number;
7324
8794
  progress: {
7325
8795
  sourceRowsRead: number;
7326
8796
  sourceRowsSkipped: number;
7327
8797
  };
7328
- startedAt: string;
8798
+ queuedAt: string;
8799
+ startedAt?: string;
7329
8800
  finishedAt?: string;
7330
- errorMessage?: string;
8801
+ error?: {
8802
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8803
+ message: string;
8804
+ retryable: boolean;
8805
+ at: string;
8806
+ /**
8807
+ * Any JSON-compatible value.
8808
+ */
8809
+ details?: string | number | boolean | Array<unknown> | {
8810
+ [key: string]: unknown;
8811
+ } | null;
8812
+ truncated?: true;
8813
+ };
7331
8814
  identity: {
7332
8815
  projectionId: string;
7333
8816
  datasetVersion: {
@@ -7358,15 +8841,29 @@ export type GetProjectionResponses = {
7358
8841
  latestRun: {
7359
8842
  id: string;
7360
8843
  projectId: string;
7361
- status: "running" | "succeeded" | "failed" | "cancelled";
8844
+ executionId: string;
8845
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7362
8846
  attempt: number;
7363
8847
  progress: {
7364
8848
  sourceRowsRead: number;
7365
8849
  sourceRowsSkipped: number;
7366
8850
  };
7367
- startedAt: string;
8851
+ queuedAt: string;
8852
+ startedAt?: string;
7368
8853
  finishedAt?: string;
7369
- errorMessage?: string;
8854
+ error?: {
8855
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8856
+ message: string;
8857
+ retryable: boolean;
8858
+ at: string;
8859
+ /**
8860
+ * Any JSON-compatible value.
8861
+ */
8862
+ details?: string | number | boolean | Array<unknown> | {
8863
+ [key: string]: unknown;
8864
+ } | null;
8865
+ truncated?: true;
8866
+ };
7370
8867
  identity: {
7371
8868
  projectionId: string;
7372
8869
  datasetVersion: {
@@ -7386,15 +8883,29 @@ export type GetProjectionResponses = {
7386
8883
  } | {
7387
8884
  id: string;
7388
8885
  projectId: string;
7389
- status: "running" | "succeeded" | "failed" | "cancelled";
8886
+ executionId: string;
8887
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7390
8888
  attempt: number;
7391
8889
  progress: {
7392
8890
  sourceRowsRead: number;
7393
8891
  sourceRowsSkipped: number;
7394
8892
  };
7395
- startedAt: string;
8893
+ queuedAt: string;
8894
+ startedAt?: string;
7396
8895
  finishedAt?: string;
7397
- errorMessage?: string;
8896
+ error?: {
8897
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8898
+ message: string;
8899
+ retryable: boolean;
8900
+ at: string;
8901
+ /**
8902
+ * Any JSON-compatible value.
8903
+ */
8904
+ details?: string | number | boolean | Array<unknown> | {
8905
+ [key: string]: unknown;
8906
+ } | null;
8907
+ truncated?: true;
8908
+ };
7398
8909
  identity: {
7399
8910
  projectionId: string;
7400
8911
  datasetVersion: {
@@ -7415,15 +8926,29 @@ export type GetProjectionResponses = {
7415
8926
  } | {
7416
8927
  id: string;
7417
8928
  projectId: string;
7418
- status: "running" | "succeeded" | "failed" | "cancelled";
8929
+ executionId: string;
8930
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7419
8931
  attempt: number;
7420
8932
  progress: {
7421
8933
  sourceRowsRead: number;
7422
8934
  sourceRowsSkipped: number;
7423
8935
  };
7424
- startedAt: string;
8936
+ queuedAt: string;
8937
+ startedAt?: string;
7425
8938
  finishedAt?: string;
7426
- errorMessage?: string;
8939
+ error?: {
8940
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
8941
+ message: string;
8942
+ retryable: boolean;
8943
+ at: string;
8944
+ /**
8945
+ * Any JSON-compatible value.
8946
+ */
8947
+ details?: string | number | boolean | Array<unknown> | {
8948
+ [key: string]: unknown;
8949
+ } | null;
8950
+ truncated?: true;
8951
+ };
7427
8952
  identity: {
7428
8953
  projectionId: string;
7429
8954
  datasetVersion: {
@@ -7452,7 +8977,7 @@ export type ListProjectionRunsData = {
7452
8977
  projectionKind?: "object" | "link" | "telemetry";
7453
8978
  datasetId?: string;
7454
8979
  datasetVersionId?: string;
7455
- status?: "running" | "succeeded" | "failed" | "cancelled";
8980
+ status?: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7456
8981
  startedAfter?: string;
7457
8982
  startedBefore?: string;
7458
8983
  limit?: string;
@@ -7484,15 +9009,29 @@ export type ListProjectionRunsResponses = {
7484
9009
  runs: Array<{
7485
9010
  id: string;
7486
9011
  projectId: string;
7487
- status: "running" | "succeeded" | "failed" | "cancelled";
9012
+ executionId: string;
9013
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7488
9014
  attempt: number;
7489
9015
  progress: {
7490
9016
  sourceRowsRead: number;
7491
9017
  sourceRowsSkipped: number;
7492
9018
  };
7493
- startedAt: string;
9019
+ queuedAt: string;
9020
+ startedAt?: string;
7494
9021
  finishedAt?: string;
7495
- errorMessage?: string;
9022
+ error?: {
9023
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
9024
+ message: string;
9025
+ retryable: boolean;
9026
+ at: string;
9027
+ /**
9028
+ * Any JSON-compatible value.
9029
+ */
9030
+ details?: string | number | boolean | Array<unknown> | {
9031
+ [key: string]: unknown;
9032
+ } | null;
9033
+ truncated?: true;
9034
+ };
7496
9035
  identity: {
7497
9036
  projectionId: string;
7498
9037
  datasetVersion: {
@@ -7512,15 +9051,29 @@ export type ListProjectionRunsResponses = {
7512
9051
  } | {
7513
9052
  id: string;
7514
9053
  projectId: string;
7515
- status: "running" | "succeeded" | "failed" | "cancelled";
9054
+ executionId: string;
9055
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7516
9056
  attempt: number;
7517
9057
  progress: {
7518
9058
  sourceRowsRead: number;
7519
9059
  sourceRowsSkipped: number;
7520
9060
  };
7521
- startedAt: string;
9061
+ queuedAt: string;
9062
+ startedAt?: string;
7522
9063
  finishedAt?: string;
7523
- errorMessage?: string;
9064
+ error?: {
9065
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
9066
+ message: string;
9067
+ retryable: boolean;
9068
+ at: string;
9069
+ /**
9070
+ * Any JSON-compatible value.
9071
+ */
9072
+ details?: string | number | boolean | Array<unknown> | {
9073
+ [key: string]: unknown;
9074
+ } | null;
9075
+ truncated?: true;
9076
+ };
7524
9077
  identity: {
7525
9078
  projectionId: string;
7526
9079
  datasetVersion: {
@@ -7541,15 +9094,29 @@ export type ListProjectionRunsResponses = {
7541
9094
  } | {
7542
9095
  id: string;
7543
9096
  projectId: string;
7544
- status: "running" | "succeeded" | "failed" | "cancelled";
9097
+ executionId: string;
9098
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7545
9099
  attempt: number;
7546
9100
  progress: {
7547
9101
  sourceRowsRead: number;
7548
9102
  sourceRowsSkipped: number;
7549
9103
  };
7550
- startedAt: string;
9104
+ queuedAt: string;
9105
+ startedAt?: string;
7551
9106
  finishedAt?: string;
7552
- errorMessage?: string;
9107
+ error?: {
9108
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
9109
+ message: string;
9110
+ retryable: boolean;
9111
+ at: string;
9112
+ /**
9113
+ * Any JSON-compatible value.
9114
+ */
9115
+ details?: string | number | boolean | Array<unknown> | {
9116
+ [key: string]: unknown;
9117
+ } | null;
9118
+ truncated?: true;
9119
+ };
7553
9120
  identity: {
7554
9121
  projectionId: string;
7555
9122
  datasetVersion: {
@@ -7608,15 +9175,29 @@ export type GetProjectionRunResponses = {
7608
9175
  200: {
7609
9176
  id: string;
7610
9177
  projectId: string;
7611
- status: "running" | "succeeded" | "failed" | "cancelled";
9178
+ executionId: string;
9179
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7612
9180
  attempt: number;
7613
9181
  progress: {
7614
9182
  sourceRowsRead: number;
7615
9183
  sourceRowsSkipped: number;
7616
9184
  };
7617
- startedAt: string;
9185
+ queuedAt: string;
9186
+ startedAt?: string;
7618
9187
  finishedAt?: string;
7619
- errorMessage?: string;
9188
+ error?: {
9189
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
9190
+ message: string;
9191
+ retryable: boolean;
9192
+ at: string;
9193
+ /**
9194
+ * Any JSON-compatible value.
9195
+ */
9196
+ details?: string | number | boolean | Array<unknown> | {
9197
+ [key: string]: unknown;
9198
+ } | null;
9199
+ truncated?: true;
9200
+ };
7620
9201
  identity: {
7621
9202
  projectionId: string;
7622
9203
  datasetVersion: {
@@ -7636,15 +9217,29 @@ export type GetProjectionRunResponses = {
7636
9217
  } | {
7637
9218
  id: string;
7638
9219
  projectId: string;
7639
- status: "running" | "succeeded" | "failed" | "cancelled";
9220
+ executionId: string;
9221
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7640
9222
  attempt: number;
7641
9223
  progress: {
7642
9224
  sourceRowsRead: number;
7643
9225
  sourceRowsSkipped: number;
7644
9226
  };
7645
- startedAt: string;
9227
+ queuedAt: string;
9228
+ startedAt?: string;
7646
9229
  finishedAt?: string;
7647
- errorMessage?: string;
9230
+ error?: {
9231
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
9232
+ message: string;
9233
+ retryable: boolean;
9234
+ at: string;
9235
+ /**
9236
+ * Any JSON-compatible value.
9237
+ */
9238
+ details?: string | number | boolean | Array<unknown> | {
9239
+ [key: string]: unknown;
9240
+ } | null;
9241
+ truncated?: true;
9242
+ };
7648
9243
  identity: {
7649
9244
  projectionId: string;
7650
9245
  datasetVersion: {
@@ -7665,15 +9260,29 @@ export type GetProjectionRunResponses = {
7665
9260
  } | {
7666
9261
  id: string;
7667
9262
  projectId: string;
7668
- status: "running" | "succeeded" | "failed" | "cancelled";
9263
+ executionId: string;
9264
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
7669
9265
  attempt: number;
7670
9266
  progress: {
7671
9267
  sourceRowsRead: number;
7672
9268
  sourceRowsSkipped: number;
7673
9269
  };
7674
- startedAt: string;
9270
+ queuedAt: string;
9271
+ startedAt?: string;
7675
9272
  finishedAt?: string;
7676
- errorMessage?: string;
9273
+ error?: {
9274
+ code: "internal.unexpected" | "runtime.cancelled" | "queue.enqueue_failed" | "projection.execution_failed";
9275
+ message: string;
9276
+ retryable: boolean;
9277
+ at: string;
9278
+ /**
9279
+ * Any JSON-compatible value.
9280
+ */
9281
+ details?: string | number | boolean | Array<unknown> | {
9282
+ [key: string]: unknown;
9283
+ } | null;
9284
+ truncated?: true;
9285
+ };
7677
9286
  identity: {
7678
9287
  projectionId: string;
7679
9288
  datasetVersion: {
@@ -7699,7 +9308,7 @@ export type ListWebhookRunsData = {
7699
9308
  query?: {
7700
9309
  connectorId?: string;
7701
9310
  webhookId?: string;
7702
- status?: "running" | "succeeded" | "failed" | "skipped";
9311
+ status?: "running" | "succeeded" | "failed";
7703
9312
  idempotencyKey?: string;
7704
9313
  startedAfter?: string;
7705
9314
  startedBefore?: string;
@@ -7732,18 +9341,30 @@ export type ListWebhookRunsResponses = {
7732
9341
  runs: Array<{
7733
9342
  id: string;
7734
9343
  projectId: string;
9344
+ executionId: string;
7735
9345
  connectorId: string;
7736
9346
  webhookId: string;
7737
- status: "running" | "succeeded" | "failed" | "skipped";
9347
+ status: "running" | "succeeded" | "failed";
7738
9348
  method: string;
7739
9349
  route: string;
7740
9350
  startedAt: string;
7741
9351
  finishedAt?: string;
7742
- requestBodyBytes?: number;
9352
+ requestBodyBytes: number;
7743
9353
  responseStatus?: number;
7744
9354
  idempotencyKey?: string;
7745
- deliveryClaimResult?: "claimed" | "duplicate" | "in_progress";
7746
- error?: string;
9355
+ error?: {
9356
+ code: "internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected";
9357
+ message: string;
9358
+ retryable: boolean;
9359
+ at: string;
9360
+ /**
9361
+ * Any JSON-compatible value.
9362
+ */
9363
+ details?: string | number | boolean | Array<unknown> | {
9364
+ [key: string]: unknown;
9365
+ } | null;
9366
+ truncated?: true;
9367
+ };
7747
9368
  }>;
7748
9369
  hasMore: boolean;
7749
9370
  total: number;