realtime-avatar 0.27.3 → 0.27.5

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.
@@ -88,7 +88,7 @@ interface components {
88
88
  * @default speech-1.6
89
89
  * @enum {string}
90
90
  */
91
- model: "speech-1.6" | "s1" | "s2-pro" | "speech-1.5" | "s1-mini";
91
+ model: "speech-1.6" | "s1" | "s2-pro" | "drama-3" | "speech-1.5" | "s1-mini";
92
92
  voice_id: string;
93
93
  speed?: number | null;
94
94
  emotion?: string | null;
@@ -174,7 +174,7 @@ interface components {
174
174
  * @description Server-authored content enforcement policy. API-key integrators may request it; browser mints strip it. No default. Requires worker enforcement before emission; transport alone does not provide protection.
175
175
  * @enum {string}
176
176
  */
177
- content_policy?: "minor-sexual-content-v1";
177
+ content_policy?: "minor-sexual-content-v1" | "safe-content-v1";
178
178
  /**
179
179
  * @description Server-owned recording policy; omitted means off. Legacy audio includes user and avatar audio. participants saves one continuous audio/video file per participant, without mixing their voices. tracks saves each published participant audio/video track separately; list recordings by session after capture.
180
180
  * @enum {string}
@@ -910,6 +910,31 @@ interface components {
910
910
  ListUsageSessionsResponse: {
911
911
  data: {
912
912
  sessionId: string;
913
+ /** @description Only returned for X-RTA-Speech-Diagnostics: 1. Closed dialogue record, whole-session cohort, not sliced to query dates or pooled across turns. Missing legs remain absent. Opt-in pages cap at 50; 65536 bytes per summary, 5000 ms total page deadline, concurrency 4. Unavailable evidence is explicit, never zero. */
914
+ readonly speechDiagnostics?: {
915
+ latency_ms: {
916
+ [key: string]: {
917
+ count: number;
918
+ max: number;
919
+ p50: number;
920
+ p90: number;
921
+ };
922
+ };
923
+ /** @constant */
924
+ status: "available";
925
+ /** @constant */
926
+ sourceRole: "dialogue";
927
+ coverage: {
928
+ first_at: string | null;
929
+ last_at: string | null;
930
+ lines: number;
931
+ };
932
+ } | {
933
+ /** @constant */
934
+ status: "unavailable";
935
+ /** @enum {string} */
936
+ reason: "not_closed" | "unconfigured" | "missing" | "invalid" | "oversized" | "unscorable" | "no_measured_latency" | "timeout" | "aborted" | "storage_unavailable";
937
+ };
913
938
  /** @description Returned only for X-RTA-Release-Evidence: 1. Omitted by default for strict client compatibility. Evidence is stored against this session; missing evidence remains null. */
914
939
  readonly releaseIdentity?: {
915
940
  deploymentId: string | null;
@@ -1400,6 +1425,1484 @@ interface components {
1400
1425
  headers: never;
1401
1426
  pathItems: never;
1402
1427
  }
1428
+ interface operations {
1429
+ getLiveKitCapacity: {
1430
+ parameters: {
1431
+ query?: never;
1432
+ header?: never;
1433
+ path?: never;
1434
+ cookie?: never;
1435
+ };
1436
+ requestBody?: never;
1437
+ responses: {
1438
+ /** @description Capacity snapshot */
1439
+ 200: {
1440
+ headers: {
1441
+ [name: string]: unknown;
1442
+ };
1443
+ content: {
1444
+ "application/json": components["schemas"]["LiveKitCapacitySnapshot"];
1445
+ };
1446
+ };
1447
+ /** @description Missing, malformed, revoked, or expired key. */
1448
+ 401: {
1449
+ headers: {
1450
+ [name: string]: unknown;
1451
+ };
1452
+ content: {
1453
+ "application/json": components["schemas"]["Error"];
1454
+ };
1455
+ };
1456
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
1457
+ 403: {
1458
+ headers: {
1459
+ [name: string]: unknown;
1460
+ };
1461
+ content: {
1462
+ "application/json": components["schemas"]["Error"];
1463
+ };
1464
+ };
1465
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1466
+ default: {
1467
+ headers: {
1468
+ [name: string]: unknown;
1469
+ };
1470
+ content: {
1471
+ "application/json": components["schemas"]["Error"];
1472
+ };
1473
+ };
1474
+ };
1475
+ };
1476
+ createLiveKitSession: {
1477
+ parameters: {
1478
+ query?: never;
1479
+ header?: {
1480
+ /** @description Send 1 to include optional session-bound releaseIdentity in this response. Without this opt-in the field is omitted for strict client compatibility. Capture and storage are independent of this header; missing evidence remains null. Older servers may ignore this header. */
1481
+ "X-RTA-Release-Evidence"?: "1";
1482
+ /** @description Send exactly identity-v1 to include optional usage_account_id on a successful mint after billing attachment. Sourced only from the platform billing hold tenant ID. Other or missing values omit the field; failures and queued responses never include it. Success responses are Cache-Control: no-store. Older servers may omit the field. Independent of X-RTA-Release-Evidence and connection_history policy. */
1483
+ "X-RTA-Observability"?: "identity-v1";
1484
+ };
1485
+ path?: never;
1486
+ cookie?: never;
1487
+ };
1488
+ requestBody: {
1489
+ content: {
1490
+ "application/json": components["schemas"]["LiveKitSessionRequest"];
1491
+ };
1492
+ };
1493
+ responses: {
1494
+ /** @description LiveKit session grant */
1495
+ 200: {
1496
+ headers: {
1497
+ [name: string]: unknown;
1498
+ };
1499
+ content: {
1500
+ "application/json": components["schemas"]["LiveKitSessionGrant"];
1501
+ };
1502
+ };
1503
+ /** @description Missing, malformed, revoked, or expired key. */
1504
+ 401: {
1505
+ headers: {
1506
+ [name: string]: unknown;
1507
+ };
1508
+ content: {
1509
+ "application/json": components["schemas"]["Error"];
1510
+ };
1511
+ };
1512
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
1513
+ 403: {
1514
+ headers: {
1515
+ [name: string]: unknown;
1516
+ };
1517
+ content: {
1518
+ "application/json": components["schemas"]["Error"];
1519
+ };
1520
+ };
1521
+ /** @description Either the workspace session limit was reached (code "concurrency_limit_reached", top-level maxConcurrentSessions, liveSessions, activeSessions, connectingSessions, pendingSessions), or session capacity is unavailable (the queue contract). Queue responses classify full seats, no workers, or draining workers in x-rta-capacity-refusal; absent or unknown headers mean capacity_full. Starting and connecting sessions count toward the workspace limit. End a session or wait for pending starts to clear before retrying; avoid parallel duplicate starts. Plan refusals are not queue positions. Retain requestId for support. */
1522
+ 429: {
1523
+ headers: {
1524
+ /** @description Queue refusal class. Optional for older deployments; missing or unknown means capacity_full. The strict queue body is unchanged. */
1525
+ "x-rta-capacity-refusal"?: "capacity_full" | "capacity_no_workers" | "capacity_draining";
1526
+ [name: string]: unknown;
1527
+ };
1528
+ content: {
1529
+ "application/json": components["schemas"]["CapacityBusyResponse"] | components["schemas"]["Error"];
1530
+ };
1531
+ };
1532
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1533
+ default: {
1534
+ headers: {
1535
+ [name: string]: unknown;
1536
+ };
1537
+ content: {
1538
+ "application/json": components["schemas"]["Error"];
1539
+ };
1540
+ };
1541
+ };
1542
+ };
1543
+ releaseLiveKitClientSession: {
1544
+ parameters: {
1545
+ query?: never;
1546
+ header?: never;
1547
+ path?: never;
1548
+ cookie?: never;
1549
+ };
1550
+ requestBody: {
1551
+ content: {
1552
+ "application/json": components["schemas"]["LiveKitSessionReleaseRequest"];
1553
+ };
1554
+ };
1555
+ responses: {
1556
+ /** @description Released */
1557
+ 200: {
1558
+ headers: {
1559
+ [name: string]: unknown;
1560
+ };
1561
+ content: {
1562
+ "application/json": components["schemas"]["OkResponse"];
1563
+ };
1564
+ };
1565
+ /** @description Missing, malformed, revoked, or expired key. */
1566
+ 401: {
1567
+ headers: {
1568
+ [name: string]: unknown;
1569
+ };
1570
+ content: {
1571
+ "application/json": components["schemas"]["Error"];
1572
+ };
1573
+ };
1574
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
1575
+ 403: {
1576
+ headers: {
1577
+ [name: string]: unknown;
1578
+ };
1579
+ content: {
1580
+ "application/json": components["schemas"]["Error"];
1581
+ };
1582
+ };
1583
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1584
+ default: {
1585
+ headers: {
1586
+ [name: string]: unknown;
1587
+ };
1588
+ content: {
1589
+ "application/json": components["schemas"]["Error"];
1590
+ };
1591
+ };
1592
+ };
1593
+ };
1594
+ createScene: {
1595
+ parameters: {
1596
+ query?: never;
1597
+ header?: never;
1598
+ path?: never;
1599
+ cookie?: never;
1600
+ };
1601
+ requestBody: {
1602
+ content: {
1603
+ "application/json": components["schemas"]["CreateSceneRequest"];
1604
+ };
1605
+ };
1606
+ responses: {
1607
+ /** @description Ready or failed */
1608
+ 200: {
1609
+ headers: {
1610
+ [name: string]: unknown;
1611
+ };
1612
+ content: {
1613
+ "application/json": components["schemas"]["SceneState"];
1614
+ };
1615
+ };
1616
+ /** @description Building */
1617
+ 202: {
1618
+ headers: {
1619
+ [name: string]: unknown;
1620
+ };
1621
+ content: {
1622
+ "application/json": components["schemas"]["SceneState"];
1623
+ };
1624
+ };
1625
+ /** @description Missing, malformed, revoked, or expired key. */
1626
+ 401: {
1627
+ headers: {
1628
+ [name: string]: unknown;
1629
+ };
1630
+ content: {
1631
+ "application/json": components["schemas"]["Error"];
1632
+ };
1633
+ };
1634
+ /** @description The key lacks the scope for this operation, the tenant is not active, or scene sessions are not enabled for the workspace — code "scene_sessions_not_enabled", a per-workspace preview gate. Contact support to opt in. */
1635
+ 403: {
1636
+ headers: {
1637
+ [name: string]: unknown;
1638
+ };
1639
+ content: {
1640
+ "application/json": components["schemas"]["Error"];
1641
+ };
1642
+ };
1643
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1644
+ default: {
1645
+ headers: {
1646
+ [name: string]: unknown;
1647
+ };
1648
+ content: {
1649
+ "application/json": components["schemas"]["Error"];
1650
+ };
1651
+ };
1652
+ };
1653
+ };
1654
+ getScene: {
1655
+ parameters: {
1656
+ query?: never;
1657
+ header?: never;
1658
+ path: {
1659
+ sceneId: string;
1660
+ };
1661
+ cookie?: never;
1662
+ };
1663
+ requestBody?: never;
1664
+ responses: {
1665
+ /** @description Scene state */
1666
+ 200: {
1667
+ headers: {
1668
+ [name: string]: unknown;
1669
+ };
1670
+ content: {
1671
+ "application/json": components["schemas"]["SceneState"];
1672
+ };
1673
+ };
1674
+ /** @description Missing, malformed, revoked, or expired key. */
1675
+ 401: {
1676
+ headers: {
1677
+ [name: string]: unknown;
1678
+ };
1679
+ content: {
1680
+ "application/json": components["schemas"]["Error"];
1681
+ };
1682
+ };
1683
+ /** @description The key lacks the scope for this operation, the tenant is not active, or scene sessions are not enabled for the workspace — code "scene_sessions_not_enabled", a per-workspace preview gate. Contact support to opt in. */
1684
+ 403: {
1685
+ headers: {
1686
+ [name: string]: unknown;
1687
+ };
1688
+ content: {
1689
+ "application/json": components["schemas"]["Error"];
1690
+ };
1691
+ };
1692
+ /** @description No scene with this id that this workspace prepared (code "scene_not_found") */
1693
+ 404: {
1694
+ headers: {
1695
+ [name: string]: unknown;
1696
+ };
1697
+ content: {
1698
+ "application/json": components["schemas"]["Error"];
1699
+ };
1700
+ };
1701
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1702
+ default: {
1703
+ headers: {
1704
+ [name: string]: unknown;
1705
+ };
1706
+ content: {
1707
+ "application/json": components["schemas"]["Error"];
1708
+ };
1709
+ };
1710
+ };
1711
+ };
1712
+ listAvatars: {
1713
+ parameters: {
1714
+ query?: never;
1715
+ header?: never;
1716
+ path?: never;
1717
+ cookie?: never;
1718
+ };
1719
+ requestBody?: never;
1720
+ responses: {
1721
+ /** @description Avatars */
1722
+ 200: {
1723
+ headers: {
1724
+ [name: string]: unknown;
1725
+ };
1726
+ content: {
1727
+ "application/json": components["schemas"]["ListAvatarsResponse"];
1728
+ };
1729
+ };
1730
+ /** @description Missing, malformed, revoked, or expired key. */
1731
+ 401: {
1732
+ headers: {
1733
+ [name: string]: unknown;
1734
+ };
1735
+ content: {
1736
+ "application/json": components["schemas"]["Error"];
1737
+ };
1738
+ };
1739
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
1740
+ 403: {
1741
+ headers: {
1742
+ [name: string]: unknown;
1743
+ };
1744
+ content: {
1745
+ "application/json": components["schemas"]["Error"];
1746
+ };
1747
+ };
1748
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1749
+ default: {
1750
+ headers: {
1751
+ [name: string]: unknown;
1752
+ };
1753
+ content: {
1754
+ "application/json": components["schemas"]["Error"];
1755
+ };
1756
+ };
1757
+ };
1758
+ };
1759
+ createAvatar: {
1760
+ parameters: {
1761
+ query?: never;
1762
+ header?: never;
1763
+ path?: never;
1764
+ cookie?: never;
1765
+ };
1766
+ requestBody: {
1767
+ content: {
1768
+ "application/json": components["schemas"]["CreateAvatarRequest"];
1769
+ };
1770
+ };
1771
+ responses: {
1772
+ /** @description Created */
1773
+ 201: {
1774
+ headers: {
1775
+ [name: string]: unknown;
1776
+ };
1777
+ content: {
1778
+ "application/json": components["schemas"]["Avatar"];
1779
+ };
1780
+ };
1781
+ /** @description Missing, malformed, revoked, or expired key. */
1782
+ 401: {
1783
+ headers: {
1784
+ [name: string]: unknown;
1785
+ };
1786
+ content: {
1787
+ "application/json": components["schemas"]["Error"];
1788
+ };
1789
+ };
1790
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
1791
+ 403: {
1792
+ headers: {
1793
+ [name: string]: unknown;
1794
+ };
1795
+ content: {
1796
+ "application/json": components["schemas"]["Error"];
1797
+ };
1798
+ };
1799
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1800
+ default: {
1801
+ headers: {
1802
+ [name: string]: unknown;
1803
+ };
1804
+ content: {
1805
+ "application/json": components["schemas"]["Error"];
1806
+ };
1807
+ };
1808
+ };
1809
+ };
1810
+ getAvatar: {
1811
+ parameters: {
1812
+ query?: never;
1813
+ header?: never;
1814
+ path: {
1815
+ avatarId: string;
1816
+ };
1817
+ cookie?: never;
1818
+ };
1819
+ requestBody?: never;
1820
+ responses: {
1821
+ /** @description Avatar */
1822
+ 200: {
1823
+ headers: {
1824
+ [name: string]: unknown;
1825
+ };
1826
+ content: {
1827
+ "application/json": components["schemas"]["Avatar"];
1828
+ };
1829
+ };
1830
+ /** @description Missing, malformed, revoked, or expired key. */
1831
+ 401: {
1832
+ headers: {
1833
+ [name: string]: unknown;
1834
+ };
1835
+ content: {
1836
+ "application/json": components["schemas"]["Error"];
1837
+ };
1838
+ };
1839
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
1840
+ 403: {
1841
+ headers: {
1842
+ [name: string]: unknown;
1843
+ };
1844
+ content: {
1845
+ "application/json": components["schemas"]["Error"];
1846
+ };
1847
+ };
1848
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1849
+ default: {
1850
+ headers: {
1851
+ [name: string]: unknown;
1852
+ };
1853
+ content: {
1854
+ "application/json": components["schemas"]["Error"];
1855
+ };
1856
+ };
1857
+ };
1858
+ };
1859
+ deleteAvatar: {
1860
+ parameters: {
1861
+ query?: never;
1862
+ header?: never;
1863
+ path: {
1864
+ avatarId: string;
1865
+ };
1866
+ cookie?: never;
1867
+ };
1868
+ requestBody?: never;
1869
+ responses: {
1870
+ /** @description Deleted. No content. */
1871
+ 204: {
1872
+ headers: {
1873
+ [name: string]: unknown;
1874
+ };
1875
+ content?: never;
1876
+ };
1877
+ /** @description Missing, malformed, revoked, or expired key. */
1878
+ 401: {
1879
+ headers: {
1880
+ [name: string]: unknown;
1881
+ };
1882
+ content: {
1883
+ "application/json": components["schemas"]["Error"];
1884
+ };
1885
+ };
1886
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
1887
+ 403: {
1888
+ headers: {
1889
+ [name: string]: unknown;
1890
+ };
1891
+ content: {
1892
+ "application/json": components["schemas"]["Error"];
1893
+ };
1894
+ };
1895
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1896
+ default: {
1897
+ headers: {
1898
+ [name: string]: unknown;
1899
+ };
1900
+ content: {
1901
+ "application/json": components["schemas"]["Error"];
1902
+ };
1903
+ };
1904
+ };
1905
+ };
1906
+ updateAvatar: {
1907
+ parameters: {
1908
+ query?: never;
1909
+ header?: never;
1910
+ path: {
1911
+ avatarId: string;
1912
+ };
1913
+ cookie?: never;
1914
+ };
1915
+ requestBody: {
1916
+ content: {
1917
+ "application/json": components["schemas"]["UpdateAvatarRequest"];
1918
+ };
1919
+ };
1920
+ responses: {
1921
+ /** @description Updated */
1922
+ 200: {
1923
+ headers: {
1924
+ [name: string]: unknown;
1925
+ };
1926
+ content: {
1927
+ "application/json": components["schemas"]["Avatar"];
1928
+ };
1929
+ };
1930
+ /** @description Missing, malformed, revoked, or expired key. */
1931
+ 401: {
1932
+ headers: {
1933
+ [name: string]: unknown;
1934
+ };
1935
+ content: {
1936
+ "application/json": components["schemas"]["Error"];
1937
+ };
1938
+ };
1939
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
1940
+ 403: {
1941
+ headers: {
1942
+ [name: string]: unknown;
1943
+ };
1944
+ content: {
1945
+ "application/json": components["schemas"]["Error"];
1946
+ };
1947
+ };
1948
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1949
+ default: {
1950
+ headers: {
1951
+ [name: string]: unknown;
1952
+ };
1953
+ content: {
1954
+ "application/json": components["schemas"]["Error"];
1955
+ };
1956
+ };
1957
+ };
1958
+ };
1959
+ listAvatarClips: {
1960
+ parameters: {
1961
+ query?: never;
1962
+ header?: never;
1963
+ path: {
1964
+ avatarId: string;
1965
+ };
1966
+ cookie?: never;
1967
+ };
1968
+ requestBody?: never;
1969
+ responses: {
1970
+ /** @description Clips */
1971
+ 200: {
1972
+ headers: {
1973
+ [name: string]: unknown;
1974
+ };
1975
+ content: {
1976
+ "application/json": components["schemas"]["ListAvatarClipsResponse"];
1977
+ };
1978
+ };
1979
+ /** @description Missing, malformed, revoked, or expired key. */
1980
+ 401: {
1981
+ headers: {
1982
+ [name: string]: unknown;
1983
+ };
1984
+ content: {
1985
+ "application/json": components["schemas"]["Error"];
1986
+ };
1987
+ };
1988
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
1989
+ 403: {
1990
+ headers: {
1991
+ [name: string]: unknown;
1992
+ };
1993
+ content: {
1994
+ "application/json": components["schemas"]["Error"];
1995
+ };
1996
+ };
1997
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
1998
+ default: {
1999
+ headers: {
2000
+ [name: string]: unknown;
2001
+ };
2002
+ content: {
2003
+ "application/json": components["schemas"]["Error"];
2004
+ };
2005
+ };
2006
+ };
2007
+ };
2008
+ putAvatarClips: {
2009
+ parameters: {
2010
+ query?: never;
2011
+ header?: {
2012
+ /** @description Replays the original response byte-for-byte instead of performing the write again. Recommended on retries: a re-render is billed. Keys longer than 180 characters are IGNORED — the write proceeds without replay protection rather than failing — so keep it short. */
2013
+ "Idempotency-Key"?: string;
2014
+ };
2015
+ path: {
2016
+ avatarId: string;
2017
+ };
2018
+ cookie?: never;
2019
+ };
2020
+ requestBody: {
2021
+ content: {
2022
+ "application/json": components["schemas"]["PutAvatarClipsRequest"];
2023
+ };
2024
+ };
2025
+ responses: {
2026
+ /** @description Declaration accepted */
2027
+ 202: {
2028
+ headers: {
2029
+ [name: string]: unknown;
2030
+ };
2031
+ content: {
2032
+ "application/json": components["schemas"]["PutAvatarClipsResponse"];
2033
+ };
2034
+ };
2035
+ /** @description Missing, malformed, revoked, or expired key. */
2036
+ 401: {
2037
+ headers: {
2038
+ [name: string]: unknown;
2039
+ };
2040
+ content: {
2041
+ "application/json": components["schemas"]["Error"];
2042
+ };
2043
+ };
2044
+ /** @description The key lacks the scope for this operation, the tenant is not active, or clip-library editing has been disabled for the workspace — code "clip_library_not_enabled". Editing is enabled by default for active workspaces; an administrator may explicitly disable it. */
2045
+ 403: {
2046
+ headers: {
2047
+ [name: string]: unknown;
2048
+ };
2049
+ content: {
2050
+ "application/json": components["schemas"]["Error"];
2051
+ };
2052
+ };
2053
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2054
+ default: {
2055
+ headers: {
2056
+ [name: string]: unknown;
2057
+ };
2058
+ content: {
2059
+ "application/json": components["schemas"]["Error"];
2060
+ };
2061
+ };
2062
+ };
2063
+ };
2064
+ reviewAvatarClip: {
2065
+ parameters: {
2066
+ query?: never;
2067
+ header?: never;
2068
+ path: {
2069
+ avatarId: string;
2070
+ };
2071
+ cookie?: never;
2072
+ };
2073
+ requestBody: {
2074
+ content: {
2075
+ "application/json": components["schemas"]["ReviewAvatarClipRequest"];
2076
+ };
2077
+ };
2078
+ responses: {
2079
+ /** @description Uploaded clip accepted; cache preparation scheduled */
2080
+ 204: {
2081
+ headers: {
2082
+ [name: string]: unknown;
2083
+ };
2084
+ content?: never;
2085
+ };
2086
+ /** @description Missing, malformed, revoked, or expired key. */
2087
+ 401: {
2088
+ headers: {
2089
+ [name: string]: unknown;
2090
+ };
2091
+ content: {
2092
+ "application/json": components["schemas"]["Error"];
2093
+ };
2094
+ };
2095
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2096
+ 403: {
2097
+ headers: {
2098
+ [name: string]: unknown;
2099
+ };
2100
+ content: {
2101
+ "application/json": components["schemas"]["Error"];
2102
+ };
2103
+ };
2104
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2105
+ default: {
2106
+ headers: {
2107
+ [name: string]: unknown;
2108
+ };
2109
+ content: {
2110
+ "application/json": components["schemas"]["Error"];
2111
+ };
2112
+ };
2113
+ };
2114
+ };
2115
+ putAvatarLoop: {
2116
+ parameters: {
2117
+ query?: never;
2118
+ header?: {
2119
+ /** @description Replays the original response byte-for-byte instead of performing the write again. Recommended on retries: a re-render is billed. Keys longer than 180 characters are IGNORED — the write proceeds without replay protection rather than failing — so keep it short. */
2120
+ "Idempotency-Key"?: string;
2121
+ };
2122
+ path: {
2123
+ avatarId: string;
2124
+ };
2125
+ cookie?: never;
2126
+ };
2127
+ requestBody: {
2128
+ content: {
2129
+ "application/json": components["schemas"]["PutAvatarLoopRequest"];
2130
+ };
2131
+ };
2132
+ responses: {
2133
+ /** @description Re-direct accepted */
2134
+ 202: {
2135
+ headers: {
2136
+ [name: string]: unknown;
2137
+ };
2138
+ content: {
2139
+ "application/json": components["schemas"]["PutAvatarLoopResponse"];
2140
+ };
2141
+ };
2142
+ /** @description Missing, malformed, revoked, or expired key. */
2143
+ 401: {
2144
+ headers: {
2145
+ [name: string]: unknown;
2146
+ };
2147
+ content: {
2148
+ "application/json": components["schemas"]["Error"];
2149
+ };
2150
+ };
2151
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2152
+ 403: {
2153
+ headers: {
2154
+ [name: string]: unknown;
2155
+ };
2156
+ content: {
2157
+ "application/json": components["schemas"]["Error"];
2158
+ };
2159
+ };
2160
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2161
+ default: {
2162
+ headers: {
2163
+ [name: string]: unknown;
2164
+ };
2165
+ content: {
2166
+ "application/json": components["schemas"]["Error"];
2167
+ };
2168
+ };
2169
+ };
2170
+ };
2171
+ createApiKey: {
2172
+ parameters: {
2173
+ query?: never;
2174
+ header?: never;
2175
+ path?: never;
2176
+ cookie?: never;
2177
+ };
2178
+ requestBody: {
2179
+ content: {
2180
+ "application/json": components["schemas"]["CreateApiKeyRequest"];
2181
+ };
2182
+ };
2183
+ responses: {
2184
+ /** @description Created. The plaintext key is returned on creation; workspace owners and admins can recover eligible keys in the dashboard. Recovery is not available through the developer API. */
2185
+ 201: {
2186
+ headers: {
2187
+ [name: string]: unknown;
2188
+ };
2189
+ content: {
2190
+ "application/json": components["schemas"]["CreateApiKeyResponse"];
2191
+ };
2192
+ };
2193
+ /** @description Missing, malformed, revoked, or expired key. */
2194
+ 401: {
2195
+ headers: {
2196
+ [name: string]: unknown;
2197
+ };
2198
+ content: {
2199
+ "application/json": components["schemas"]["Error"];
2200
+ };
2201
+ };
2202
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2203
+ 403: {
2204
+ headers: {
2205
+ [name: string]: unknown;
2206
+ };
2207
+ content: {
2208
+ "application/json": components["schemas"]["Error"];
2209
+ };
2210
+ };
2211
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2212
+ default: {
2213
+ headers: {
2214
+ [name: string]: unknown;
2215
+ };
2216
+ content: {
2217
+ "application/json": components["schemas"]["Error"];
2218
+ };
2219
+ };
2220
+ };
2221
+ };
2222
+ listAssets: {
2223
+ parameters: {
2224
+ query?: never;
2225
+ header?: never;
2226
+ path?: never;
2227
+ cookie?: never;
2228
+ };
2229
+ requestBody?: never;
2230
+ responses: {
2231
+ /** @description Assets */
2232
+ 200: {
2233
+ headers: {
2234
+ [name: string]: unknown;
2235
+ };
2236
+ content: {
2237
+ "application/json": components["schemas"]["AssetList"];
2238
+ };
2239
+ };
2240
+ /** @description Missing, malformed, revoked, or expired key. */
2241
+ 401: {
2242
+ headers: {
2243
+ [name: string]: unknown;
2244
+ };
2245
+ content: {
2246
+ "application/json": components["schemas"]["Error"];
2247
+ };
2248
+ };
2249
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2250
+ 403: {
2251
+ headers: {
2252
+ [name: string]: unknown;
2253
+ };
2254
+ content: {
2255
+ "application/json": components["schemas"]["Error"];
2256
+ };
2257
+ };
2258
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2259
+ default: {
2260
+ headers: {
2261
+ [name: string]: unknown;
2262
+ };
2263
+ content: {
2264
+ "application/json": components["schemas"]["Error"];
2265
+ };
2266
+ };
2267
+ };
2268
+ };
2269
+ uploadAsset: {
2270
+ parameters: {
2271
+ query?: never;
2272
+ header?: never;
2273
+ path?: never;
2274
+ cookie?: never;
2275
+ };
2276
+ requestBody: {
2277
+ content: {
2278
+ "multipart/form-data": {
2279
+ /**
2280
+ * Format: binary
2281
+ * @description The asset bytes.
2282
+ */
2283
+ file: string;
2284
+ /**
2285
+ * @description Optional; inferred from the file when omitted. Image assets are portraits, audio assets are voice material, and video assets may be declared as uploaded motion clips with source.assetId. Video assets are not accepted as the source of a newly created Avatar.
2286
+ * @enum {string}
2287
+ */
2288
+ kind?: "image" | "video" | "audio";
2289
+ };
2290
+ };
2291
+ };
2292
+ responses: {
2293
+ /** @description Uploaded */
2294
+ 201: {
2295
+ headers: {
2296
+ [name: string]: unknown;
2297
+ };
2298
+ content: {
2299
+ "application/json": components["schemas"]["Asset"];
2300
+ };
2301
+ };
2302
+ /** @description Missing, malformed, revoked, or expired key. */
2303
+ 401: {
2304
+ headers: {
2305
+ [name: string]: unknown;
2306
+ };
2307
+ content: {
2308
+ "application/json": components["schemas"]["Error"];
2309
+ };
2310
+ };
2311
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2312
+ 403: {
2313
+ headers: {
2314
+ [name: string]: unknown;
2315
+ };
2316
+ content: {
2317
+ "application/json": components["schemas"]["Error"];
2318
+ };
2319
+ };
2320
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2321
+ default: {
2322
+ headers: {
2323
+ [name: string]: unknown;
2324
+ };
2325
+ content: {
2326
+ "application/json": components["schemas"]["Error"];
2327
+ };
2328
+ };
2329
+ };
2330
+ };
2331
+ createRemoteAsset: {
2332
+ parameters: {
2333
+ query?: never;
2334
+ header?: never;
2335
+ path?: never;
2336
+ cookie?: never;
2337
+ };
2338
+ requestBody: {
2339
+ content: {
2340
+ "application/json": components["schemas"]["CreateRemoteAssetRequest"];
2341
+ };
2342
+ };
2343
+ responses: {
2344
+ /** @description Created */
2345
+ 201: {
2346
+ headers: {
2347
+ [name: string]: unknown;
2348
+ };
2349
+ content: {
2350
+ "application/json": components["schemas"]["Asset"];
2351
+ };
2352
+ };
2353
+ /** @description Missing, malformed, revoked, or expired key. */
2354
+ 401: {
2355
+ headers: {
2356
+ [name: string]: unknown;
2357
+ };
2358
+ content: {
2359
+ "application/json": components["schemas"]["Error"];
2360
+ };
2361
+ };
2362
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2363
+ 403: {
2364
+ headers: {
2365
+ [name: string]: unknown;
2366
+ };
2367
+ content: {
2368
+ "application/json": components["schemas"]["Error"];
2369
+ };
2370
+ };
2371
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2372
+ default: {
2373
+ headers: {
2374
+ [name: string]: unknown;
2375
+ };
2376
+ content: {
2377
+ "application/json": components["schemas"]["Error"];
2378
+ };
2379
+ };
2380
+ };
2381
+ };
2382
+ getCreditBalance: {
2383
+ parameters: {
2384
+ query?: never;
2385
+ header?: never;
2386
+ path?: never;
2387
+ cookie?: never;
2388
+ };
2389
+ requestBody?: never;
2390
+ responses: {
2391
+ /** @description Balance */
2392
+ 200: {
2393
+ headers: {
2394
+ [name: string]: unknown;
2395
+ };
2396
+ content: {
2397
+ "application/json": components["schemas"]["CreditBalance"];
2398
+ };
2399
+ };
2400
+ /** @description Missing, malformed, revoked, or expired key. */
2401
+ 401: {
2402
+ headers: {
2403
+ [name: string]: unknown;
2404
+ };
2405
+ content: {
2406
+ "application/json": components["schemas"]["Error"];
2407
+ };
2408
+ };
2409
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2410
+ 403: {
2411
+ headers: {
2412
+ [name: string]: unknown;
2413
+ };
2414
+ content: {
2415
+ "application/json": components["schemas"]["Error"];
2416
+ };
2417
+ };
2418
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2419
+ default: {
2420
+ headers: {
2421
+ [name: string]: unknown;
2422
+ };
2423
+ content: {
2424
+ "application/json": components["schemas"]["Error"];
2425
+ };
2426
+ };
2427
+ };
2428
+ };
2429
+ getConnectionHistory: {
2430
+ parameters: {
2431
+ query?: never;
2432
+ header?: never;
2433
+ path: {
2434
+ sessionId: string;
2435
+ };
2436
+ cookie?: never;
2437
+ };
2438
+ requestBody?: never;
2439
+ responses: {
2440
+ /** @description Session connection history */
2441
+ 200: {
2442
+ headers: {
2443
+ [name: string]: unknown;
2444
+ };
2445
+ content: {
2446
+ "application/json": components["schemas"]["ConnectionHistoryResponse"];
2447
+ };
2448
+ };
2449
+ /** @description Missing, malformed, revoked, or expired key. */
2450
+ 401: {
2451
+ headers: {
2452
+ [name: string]: unknown;
2453
+ };
2454
+ content: {
2455
+ "application/json": components["schemas"]["Error"];
2456
+ };
2457
+ };
2458
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2459
+ 403: {
2460
+ headers: {
2461
+ [name: string]: unknown;
2462
+ };
2463
+ content: {
2464
+ "application/json": components["schemas"]["Error"];
2465
+ };
2466
+ };
2467
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2468
+ default: {
2469
+ headers: {
2470
+ [name: string]: unknown;
2471
+ };
2472
+ content: {
2473
+ "application/json": components["schemas"]["Error"];
2474
+ };
2475
+ };
2476
+ };
2477
+ };
2478
+ listRecordings: {
2479
+ parameters: {
2480
+ query?: {
2481
+ /** @description Filter to one session. */
2482
+ sessionId?: string;
2483
+ limit?: number;
2484
+ /** @description The previous response's nextCursor. */
2485
+ cursor?: string;
2486
+ };
2487
+ header?: never;
2488
+ path?: never;
2489
+ cookie?: never;
2490
+ };
2491
+ requestBody?: never;
2492
+ responses: {
2493
+ /** @description Recordings */
2494
+ 200: {
2495
+ headers: {
2496
+ [name: string]: unknown;
2497
+ };
2498
+ content: {
2499
+ "application/json": components["schemas"]["ListRecordingsResponse"];
2500
+ };
2501
+ };
2502
+ /** @description Invalid query */
2503
+ 400: {
2504
+ headers: {
2505
+ [name: string]: unknown;
2506
+ };
2507
+ content: {
2508
+ "application/json": components["schemas"]["Error"];
2509
+ };
2510
+ };
2511
+ /** @description Missing, malformed, revoked, or expired key. */
2512
+ 401: {
2513
+ headers: {
2514
+ [name: string]: unknown;
2515
+ };
2516
+ content: {
2517
+ "application/json": components["schemas"]["Error"];
2518
+ };
2519
+ };
2520
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2521
+ 403: {
2522
+ headers: {
2523
+ [name: string]: unknown;
2524
+ };
2525
+ content: {
2526
+ "application/json": components["schemas"]["Error"];
2527
+ };
2528
+ };
2529
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2530
+ default: {
2531
+ headers: {
2532
+ [name: string]: unknown;
2533
+ };
2534
+ content: {
2535
+ "application/json": components["schemas"]["Error"];
2536
+ };
2537
+ };
2538
+ };
2539
+ };
2540
+ getRecording: {
2541
+ parameters: {
2542
+ query?: never;
2543
+ header?: never;
2544
+ path: {
2545
+ recordingId: string;
2546
+ };
2547
+ cookie?: never;
2548
+ };
2549
+ requestBody?: never;
2550
+ responses: {
2551
+ /** @description Recording */
2552
+ 200: {
2553
+ headers: {
2554
+ [name: string]: unknown;
2555
+ };
2556
+ content: {
2557
+ "application/json": components["schemas"]["Recording"];
2558
+ };
2559
+ };
2560
+ /** @description Missing, malformed, revoked, or expired key. */
2561
+ 401: {
2562
+ headers: {
2563
+ [name: string]: unknown;
2564
+ };
2565
+ content: {
2566
+ "application/json": components["schemas"]["Error"];
2567
+ };
2568
+ };
2569
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2570
+ 403: {
2571
+ headers: {
2572
+ [name: string]: unknown;
2573
+ };
2574
+ content: {
2575
+ "application/json": components["schemas"]["Error"];
2576
+ };
2577
+ };
2578
+ /** @description Recording not found in this workspace */
2579
+ 404: {
2580
+ headers: {
2581
+ [name: string]: unknown;
2582
+ };
2583
+ content: {
2584
+ "application/json": components["schemas"]["Error"];
2585
+ };
2586
+ };
2587
+ /** @description Recording status temporarily unavailable */
2588
+ 503: {
2589
+ headers: {
2590
+ [name: string]: unknown;
2591
+ };
2592
+ content: {
2593
+ "application/json": components["schemas"]["Error"];
2594
+ };
2595
+ };
2596
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2597
+ default: {
2598
+ headers: {
2599
+ [name: string]: unknown;
2600
+ };
2601
+ content: {
2602
+ "application/json": components["schemas"]["Error"];
2603
+ };
2604
+ };
2605
+ };
2606
+ };
2607
+ getRecordingAccess: {
2608
+ parameters: {
2609
+ query?: never;
2610
+ header?: never;
2611
+ path: {
2612
+ recordingId: string;
2613
+ };
2614
+ cookie?: never;
2615
+ };
2616
+ requestBody?: never;
2617
+ responses: {
2618
+ /** @description Temporary access */
2619
+ 200: {
2620
+ headers: {
2621
+ [name: string]: unknown;
2622
+ };
2623
+ content: {
2624
+ "application/json": components["schemas"]["RecordingAccessResponse"];
2625
+ };
2626
+ };
2627
+ /** @description Missing, malformed, revoked, or expired key. */
2628
+ 401: {
2629
+ headers: {
2630
+ [name: string]: unknown;
2631
+ };
2632
+ content: {
2633
+ "application/json": components["schemas"]["Error"];
2634
+ };
2635
+ };
2636
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2637
+ 403: {
2638
+ headers: {
2639
+ [name: string]: unknown;
2640
+ };
2641
+ content: {
2642
+ "application/json": components["schemas"]["Error"];
2643
+ };
2644
+ };
2645
+ /** @description Recording not found in this workspace */
2646
+ 404: {
2647
+ headers: {
2648
+ [name: string]: unknown;
2649
+ };
2650
+ content: {
2651
+ "application/json": components["schemas"]["Error"];
2652
+ };
2653
+ };
2654
+ /** @description Recording not ready */
2655
+ 409: {
2656
+ headers: {
2657
+ [name: string]: unknown;
2658
+ };
2659
+ content: {
2660
+ "application/json": components["schemas"]["Error"];
2661
+ };
2662
+ };
2663
+ /** @description Recording retention expired */
2664
+ 410: {
2665
+ headers: {
2666
+ [name: string]: unknown;
2667
+ };
2668
+ content: {
2669
+ "application/json": components["schemas"]["Error"];
2670
+ };
2671
+ };
2672
+ /** @description Recording media temporarily unavailable */
2673
+ 503: {
2674
+ headers: {
2675
+ [name: string]: unknown;
2676
+ };
2677
+ content: {
2678
+ "application/json": components["schemas"]["Error"];
2679
+ };
2680
+ };
2681
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2682
+ default: {
2683
+ headers: {
2684
+ [name: string]: unknown;
2685
+ };
2686
+ content: {
2687
+ "application/json": components["schemas"]["Error"];
2688
+ };
2689
+ };
2690
+ };
2691
+ };
2692
+ listUsageSessions: {
2693
+ parameters: {
2694
+ query?: {
2695
+ /** @description Start of the window. Defaults to 30 days before `to`; clamped to no earlier than 90 days before it. */
2696
+ from?: string;
2697
+ /** @description End of the window. Defaults to now. */
2698
+ to?: string;
2699
+ /** @description Rows per page. Defaults to 50, clamped to 1–200; with X-RTA-Speech-Diagnostics: 1 clamped to 1–50. Read the actual returned rows and nextCursor. */
2700
+ limit?: number;
2701
+ /** @description Opaque cursor — pass the previous response's `nextCursor` verbatim. A null `nextCursor` means the last page. */
2702
+ cursor?: string;
2703
+ /** @description Narrow to one of YOUR users — matches the `client_metadata.user_id` the call was minted with. Untagged calls still return, with empty metadata. */
2704
+ endUserId?: string;
2705
+ };
2706
+ header?: {
2707
+ /** @description Send 1 to include optional session-bound releaseIdentity in this response. Without this opt-in the field is omitted for strict client compatibility. Capture and storage are independent of this header; missing evidence remains null. Older servers may ignore this header. */
2708
+ "X-RTA-Release-Evidence"?: "1";
2709
+ /** @description Send exactly 1 to include numeric closed dialogue speechDiagnostics. Otherwise omitted and no summary reads occur. Opt-in pages clamp to 50 rows with normal keyset pagination; each row has explicit availability. Whole-session cohorts, not query-time slices or pooled turn percentiles. Summary budget 65536 bytes, total page deadline 5000 ms, concurrency 4. Older servers may ignore this header. */
2710
+ "X-RTA-Speech-Diagnostics"?: "1";
2711
+ };
2712
+ path?: never;
2713
+ cookie?: never;
2714
+ };
2715
+ requestBody?: never;
2716
+ responses: {
2717
+ /** @description Sessions */
2718
+ 200: {
2719
+ headers: {
2720
+ [name: string]: unknown;
2721
+ };
2722
+ content: {
2723
+ "application/json": components["schemas"]["ListUsageSessionsResponse"];
2724
+ };
2725
+ };
2726
+ /** @description Missing, malformed, revoked, or expired key. */
2727
+ 401: {
2728
+ headers: {
2729
+ [name: string]: unknown;
2730
+ };
2731
+ content: {
2732
+ "application/json": components["schemas"]["Error"];
2733
+ };
2734
+ };
2735
+ /** @description The key lacks the scope for this operation, or the tenant is not active. */
2736
+ 403: {
2737
+ headers: {
2738
+ [name: string]: unknown;
2739
+ };
2740
+ content: {
2741
+ "application/json": components["schemas"]["Error"];
2742
+ };
2743
+ };
2744
+ /** @description Error. Route-dependent: 400 (a field this route cannot honour — see `portraitUrl` on `UpdateAvatarRequest`), 402 (insufficient credits or spend limit), 404 (no such avatar, voice, or key for this tenant — the message often reads "does not belong to this tenant", which is a missing id and not a permission failure), 408 (the request was cancelled), 409 (the resource is not in a state that accepts this write — a stale `expectedRevision`, a render already in flight, or a mint that asked for a clip library still building), 411 (`POST /v1/assets/remote` only — the origin serving `remoteUrl` sent no `content-length`, so the platform will not stream it), 422 (strict schema rejection, or a motion description the safety screen refused), 429 (rate limited), 502 (upstream render failed), 503 (a dependency this route needs is unavailable — retryable, and nothing was written), 504 (the upstream request budget expired), 500 (unhandled). Switch on `code` where present, else `status`. */
2745
+ default: {
2746
+ headers: {
2747
+ [name: string]: unknown;
2748
+ };
2749
+ content: {
2750
+ "application/json": components["schemas"]["Error"];
2751
+ };
2752
+ };
2753
+ };
2754
+ };
2755
+ receiveSessionTranscript: {
2756
+ parameters: {
2757
+ query?: never;
2758
+ header: {
2759
+ /** @description v1= followed by the hex HMAC-SHA256 of <timestamp>.<raw body>, keyed by transcript_webhook.secret. Compare in constant time. */
2760
+ "x-rta-signature": string;
2761
+ /** @description Timestamp string used verbatim in the signed message. Verify freshness to bound replay. */
2762
+ "x-rta-timestamp": string;
2763
+ };
2764
+ path?: never;
2765
+ cookie?: never;
2766
+ };
2767
+ requestBody: {
2768
+ content: {
2769
+ "application/json": components["schemas"]["TranscriptPayload"];
2770
+ };
2771
+ };
2772
+ responses: {
2773
+ /** @description Receipt acknowledged by the application. */
2774
+ "2XX": {
2775
+ headers: {
2776
+ [name: string]: unknown;
2777
+ };
2778
+ content?: never;
2779
+ };
2780
+ /** @description Application response; delivery and retries are best-effort. */
2781
+ default: {
2782
+ headers: {
2783
+ [name: string]: unknown;
2784
+ };
2785
+ content?: never;
2786
+ };
2787
+ };
2788
+ };
2789
+ }
2790
+
2791
+ declare const listUsageSessionsResponseSchema: z.ZodObject<{
2792
+ data: z.ZodArray<z.ZodObject<{
2793
+ sessionId: z.ZodString;
2794
+ speechDiagnostics: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2795
+ latency_ms: z.ZodRecord<z.ZodUnion<readonly [z.ZodEnum<{
2796
+ llm: "llm";
2797
+ eou: "eou";
2798
+ tts: "tts";
2799
+ decision: "decision";
2800
+ hold: "hold";
2801
+ e2e: "e2e";
2802
+ }>, z.ZodLiteral<"interrupt_stop">]> & z.core.$partial, z.ZodObject<{
2803
+ count: z.ZodInt;
2804
+ max: z.ZodNumber;
2805
+ p50: z.ZodNumber;
2806
+ p90: z.ZodNumber;
2807
+ }, z.core.$strict>>;
2808
+ status: z.ZodLiteral<"available">;
2809
+ sourceRole: z.ZodLiteral<"dialogue">;
2810
+ coverage: z.ZodObject<{
2811
+ first_at: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2812
+ last_at: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2813
+ lines: z.ZodInt;
2814
+ }, z.core.$strict>;
2815
+ }, z.core.$strict>, z.ZodObject<{
2816
+ status: z.ZodLiteral<"unavailable">;
2817
+ reason: z.ZodEnum<{
2818
+ not_closed: "not_closed";
2819
+ unconfigured: "unconfigured";
2820
+ missing: "missing";
2821
+ invalid: "invalid";
2822
+ oversized: "oversized";
2823
+ unscorable: "unscorable";
2824
+ no_measured_latency: "no_measured_latency";
2825
+ timeout: "timeout";
2826
+ aborted: "aborted";
2827
+ storage_unavailable: "storage_unavailable";
2828
+ }>;
2829
+ }, z.core.$strict>]>>;
2830
+ releaseIdentity: z.ZodOptional<z.ZodObject<{
2831
+ deploymentId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2832
+ workerRevision: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2833
+ provenance: z.ZodObject<{
2834
+ deploymentSource: z.ZodLiteral<"cloudflare-worker-version">;
2835
+ workerSource: z.ZodUnion<readonly [z.ZodLiteral<"authenticated-worker-heartbeat">, z.ZodNull]>;
2836
+ workerId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2837
+ podStartedAtMs: z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>;
2838
+ workerObservedAt: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodNull]>;
2839
+ }, z.core.$strict>;
2840
+ }, z.core.$strict>>;
2841
+ avatarId: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2842
+ avatarName: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2843
+ status: z.ZodEnum<{
2844
+ failed: "failed";
2845
+ reserved: "reserved";
2846
+ started: "started";
2847
+ released: "released";
2848
+ }>;
2849
+ startedAt: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2850
+ endedAt: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2851
+ activeSeconds: z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>;
2852
+ billedCreditMicros: z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>;
2853
+ metadata: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
2854
+ createdAt: z.ZodString;
2855
+ }, z.core.$strict>>;
2856
+ nextCursor: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
2857
+ from: z.ZodISODateTime;
2858
+ to: z.ZodISODateTime;
2859
+ }, z.core.$strict>;
2860
+ declare function toSessionsPage(page: z.infer<typeof listUsageSessionsResponseSchema>): {
2861
+ sessions: {
2862
+ sessionId: string;
2863
+ avatarId: string | null;
2864
+ avatarName: string | null;
2865
+ status: "failed" | "reserved" | "started" | "released";
2866
+ startedAt: string | null;
2867
+ endedAt: string | null;
2868
+ activeSeconds: number | null;
2869
+ billedCreditMicros: number | null;
2870
+ metadata: Record<string, unknown>;
2871
+ createdAt: string;
2872
+ speechDiagnostics?: {
2873
+ latency_ms: Partial<Record<"llm" | "eou" | "tts" | "decision" | "hold" | "e2e" | "interrupt_stop", {
2874
+ count: number;
2875
+ max: number;
2876
+ p50: number;
2877
+ p90: number;
2878
+ }>>;
2879
+ status: "available";
2880
+ sourceRole: "dialogue";
2881
+ coverage: {
2882
+ first_at: string | null;
2883
+ last_at: string | null;
2884
+ lines: number;
2885
+ };
2886
+ } | {
2887
+ status: "unavailable";
2888
+ reason: "not_closed" | "unconfigured" | "missing" | "invalid" | "oversized" | "unscorable" | "no_measured_latency" | "timeout" | "aborted" | "storage_unavailable";
2889
+ } | undefined;
2890
+ releaseIdentity?: {
2891
+ deploymentId: string | null;
2892
+ workerRevision: string | null;
2893
+ provenance: {
2894
+ deploymentSource: "cloudflare-worker-version";
2895
+ workerSource: "authenticated-worker-heartbeat" | null;
2896
+ workerId: string | null;
2897
+ podStartedAtMs: number | null;
2898
+ workerObservedAt: string | null;
2899
+ };
2900
+ } | undefined;
2901
+ }[];
2902
+ nextCursor: string | null;
2903
+ from: string;
2904
+ to: string;
2905
+ };
1403
2906
 
1404
2907
  declare const recordingModeSchema: z.ZodEnum<{
1405
2908
  off: "off";
@@ -1642,11 +3145,8 @@ type RecordingAccessResponse = z.infer<typeof recordingAccessResponseSchema>;
1642
3145
  * `npm run spec:check` reports drift between the vendored copy and the live one, and exits 0
1643
3146
  * offline so a fork or an air-gapped runner does not go red for it.
1644
3147
  *
1645
- * THREE types here are NOT derived, and each has a reason rather than an oversight:
3148
+ * TWO types here are NOT derived, and each has a reason rather than an oversight:
1646
3149
  *
1647
- * ListSessionsOptions the contract declares NO query parameters on GET /v1/usage/sessions.
1648
- * The route reads them; the spec does not describe them. Fixing that
1649
- * belongs upstream in the spec export, not here.
1650
3150
  * TranscriptPayload the transcript webhook body is not in the published contract at all.
1651
3151
  * Same upstream gap, bigger: nothing describes this shape publicly.
1652
3152
  * VideoPolicy/VideoEdits curate renderer and look-editing options. Clip behavior is declared
@@ -1961,41 +3461,25 @@ type AvatarUpdate = Pick<Wire["UpdateAvatarRequest"], "displayName" | "defaultVo
1961
3461
  * take is sometimes mid-blink. It is the only field that may accompany a source swap.
1962
3462
  */
1963
3463
  type AvatarSourceSwap = Required<Pick<Wire["UpdateAvatarRequest"], "sourceAssetId">> & Pick<Wire["UpdateAvatarRequest"], "anchorTimeMs">;
1964
- type UsageSessionsResponse = Wire["ListUsageSessionsResponse"];
1965
3464
  /**
1966
3465
  * One billable session — when it ran, how long it was billable for, what it cost.
1967
3466
  *
1968
3467
  * `activeSeconds` is billable wall time in SECONDS and is null until the session settles;
1969
- * `metadata` is whatever you passed to `startCall`, `{}` if you passed nothing. The contract
1970
- * declares this shape inline inside the page rather than as a named schema, so it is indexed
1971
- * out of the array rather than picked off a `Wire[...]` key.
3468
+ * `metadata` is whatever you passed to `startCall`, `{}` if you passed nothing.
3469
+ * DERIVATION: the generated runtime page preserves finite propertyNames records that
3470
+ * openapi-typescript currently widens to string index signatures.
1972
3471
  */
1973
- type UsageSession = UsageSessionsResponse["data"][number];
1974
- interface UsageSessionPage {
1975
- /** The contract calls this `data`; it is surfaced under the name of what it holds. */
1976
- sessions: UsageSession[];
1977
- /** Pass as `cursor` for the next page. Null on the last one. */
1978
- nextCursor: UsageSessionsResponse["nextCursor"];
1979
- /** The window actually served — the platform clamps wide or inverted ranges. */
1980
- from: UsageSessionsResponse["from"];
1981
- to: UsageSessionsResponse["to"];
1982
- }
3472
+ type UsageSession = UsageSessionPage["sessions"][number];
3473
+ /** The validated wire page with `data` renamed to `sessions`; pagination is unchanged. */
3474
+ type UsageSessionPage = ReturnType<typeof toSessionsPage>;
1983
3475
  /**
1984
- * DERIVATION: hand-written, because the published contract declares no query parameters on
1985
- * `GET /v1/usage/sessions` — the route reads them, the spec does not describe them. This is
1986
- * the one place in this file where a shape is asserted rather than taken from the contract,
1987
- * and the fix belongs upstream in the spec export, not here.
3476
+ * Session window, tenant-owned user filter and pagination from the canonical query contract.
3477
+ * DERIVATION: speechDiagnostics is a product boolean for the canonical header's opt-in ability,
3478
+ * not a query parameter. Only true sends that header; false and omission leave it absent.
1988
3479
  */
1989
- interface ListSessionsOptions {
1990
- /** ISO timestamps. Defaults to the trailing 30 days; 90 days is the widest served. */
1991
- from?: string;
1992
- to?: string;
1993
- /** Only sessions you tagged with this `metadata.user_id`. */
1994
- endUserId?: string;
1995
- /** Page size, capped at 200. */
1996
- limit?: number;
1997
- cursor?: string;
1998
- }
3480
+ type ListSessionsOptions = NonNullable<operations["listUsageSessions"]["parameters"]["query"]> & {
3481
+ speechDiagnostics?: NonNullable<operations["listUsageSessions"]["parameters"]["header"]>["X-RTA-Speech-Diagnostics"] extends "1" | undefined ? boolean : never;
3482
+ };
1999
3483
  type CreditBalance = Pick<Wire["CreditBalance"], "balanceCreditMicros" | "reservedCreditMicros">;
2000
3484
  /**
2001
3485
  * Complete desired sources and behavior; expectedRevision protects concurrent edits.