@serviceai/api-spec 1.1.23 → 1.2.1

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 (4) hide show
  1. package/openapi.json +1325 -107
  2. package/openapi.yaml +806 -34
  3. package/package.json +1 -1
  4. package/types.d.ts +678 -13
package/types.d.ts CHANGED
@@ -1064,7 +1064,6 @@ export interface paths {
1064
1064
  position: {
1065
1065
  x: number;
1066
1066
  y: number;
1067
- z: number;
1068
1067
  };
1069
1068
  width: number;
1070
1069
  height: number;
@@ -1080,7 +1079,6 @@ export interface paths {
1080
1079
  position: {
1081
1080
  x: number;
1082
1081
  y: number;
1083
- z: number;
1084
1082
  };
1085
1083
  width: number;
1086
1084
  height: number;
@@ -1096,7 +1094,6 @@ export interface paths {
1096
1094
  position: {
1097
1095
  x: number;
1098
1096
  y: number;
1099
- z: number;
1100
1097
  };
1101
1098
  width: number;
1102
1099
  height: number;
@@ -1198,7 +1195,6 @@ export interface paths {
1198
1195
  position: {
1199
1196
  x: number;
1200
1197
  y: number;
1201
- z: number;
1202
1198
  };
1203
1199
  width: number;
1204
1200
  height: number;
@@ -1214,7 +1210,6 @@ export interface paths {
1214
1210
  position: {
1215
1211
  x: number;
1216
1212
  y: number;
1217
- z: number;
1218
1213
  };
1219
1214
  width: number;
1220
1215
  height: number;
@@ -1230,7 +1225,6 @@ export interface paths {
1230
1225
  position: {
1231
1226
  x: number;
1232
1227
  y: number;
1233
- z: number;
1234
1228
  };
1235
1229
  width: number;
1236
1230
  height: number;
@@ -1278,6 +1272,552 @@ export interface paths {
1278
1272
  patch?: never;
1279
1273
  trace?: never;
1280
1274
  };
1275
+ "/api/chatty-voice/tools": {
1276
+ parameters: {
1277
+ query?: never;
1278
+ header?: never;
1279
+ path?: never;
1280
+ cookie?: never;
1281
+ };
1282
+ /**
1283
+ * List the OpenAI-Realtime-compatible function tools the executor can run.
1284
+ * @description Returns the canonical Chatty Voice tool catalogue as a BARE ARRAY of `ChattyToolDefinition` envelopes (no wrapping object). Each entry is executable via POST /api/chatty-voice/tools/execute.
1285
+ */
1286
+ get: {
1287
+ parameters: {
1288
+ query?: never;
1289
+ header?: {
1290
+ /** @description Semver of the calling app build. Drives the 426 / soft-upgrade handshake. */
1291
+ "X-Client-Version"?: string;
1292
+ };
1293
+ path?: never;
1294
+ cookie?: never;
1295
+ };
1296
+ requestBody?: never;
1297
+ responses: {
1298
+ /** @description Bare array of tool definitions. */
1299
+ 200: {
1300
+ headers: {
1301
+ [name: string]: unknown;
1302
+ };
1303
+ content: {
1304
+ "application/json": {
1305
+ /** @enum {string} */
1306
+ type: "function";
1307
+ function: {
1308
+ name: string;
1309
+ description: string;
1310
+ parameters: {
1311
+ /** @enum {string} */
1312
+ type: "object";
1313
+ properties: {
1314
+ [key: string]: {
1315
+ [key: string]: unknown;
1316
+ } & {
1317
+ type: string | string[];
1318
+ description?: string;
1319
+ enum?: string[];
1320
+ required?: string[];
1321
+ additionalProperties?: boolean;
1322
+ };
1323
+ };
1324
+ required?: string[];
1325
+ additionalProperties?: boolean;
1326
+ };
1327
+ };
1328
+ }[];
1329
+ };
1330
+ };
1331
+ /** @description Unauthenticated. */
1332
+ 401: {
1333
+ headers: {
1334
+ [name: string]: unknown;
1335
+ };
1336
+ content: {
1337
+ "application/json": components["schemas"]["ErrorEnvelope"];
1338
+ };
1339
+ };
1340
+ /** @description Caller lacks the chatty-voice entitlement. */
1341
+ 403: {
1342
+ headers: {
1343
+ [name: string]: unknown;
1344
+ };
1345
+ content: {
1346
+ "application/json": components["schemas"]["ErrorEnvelope"];
1347
+ };
1348
+ };
1349
+ /** @description Client major below minClientVersion. */
1350
+ 426: {
1351
+ headers: {
1352
+ [name: string]: unknown;
1353
+ };
1354
+ content: {
1355
+ "application/json": components["schemas"]["UpgradeRequiredEnvelope"];
1356
+ };
1357
+ };
1358
+ };
1359
+ };
1360
+ put?: never;
1361
+ post?: never;
1362
+ delete?: never;
1363
+ options?: never;
1364
+ head?: never;
1365
+ patch?: never;
1366
+ trace?: never;
1367
+ };
1368
+ "/api/chatty-voice/tools/execute": {
1369
+ parameters: {
1370
+ query?: never;
1371
+ header?: never;
1372
+ path?: never;
1373
+ cookie?: never;
1374
+ };
1375
+ get?: never;
1376
+ put?: never;
1377
+ /**
1378
+ * Execute a Chatty Voice tool by canonical `function` (or legacy `name`).
1379
+ * @description Body accepts either the canonical `function` field or the legacy `name` alias — at least one is required. The executor treats them as equivalent and dispatches to the same switch case in `tools.ts`. Tool arguments are passed through verbatim as an opaque JSON object.
1380
+ */
1381
+ post: {
1382
+ parameters: {
1383
+ query?: never;
1384
+ header?: {
1385
+ /** @description Semver of the calling app build. Drives the 426 / soft-upgrade handshake. */
1386
+ "X-Client-Version"?: string;
1387
+ };
1388
+ path?: never;
1389
+ cookie?: never;
1390
+ };
1391
+ requestBody?: {
1392
+ content: {
1393
+ "application/json": {
1394
+ function?: string;
1395
+ name?: string;
1396
+ arguments?: {
1397
+ [key: string]: unknown;
1398
+ };
1399
+ };
1400
+ };
1401
+ };
1402
+ responses: {
1403
+ /** @description Always returned when execution reaches the executor. `success: false` envelopes carry an `error` and (for permission denials) a `code` — including the missing/unknown function case. */
1404
+ 200: {
1405
+ headers: {
1406
+ [name: string]: unknown;
1407
+ };
1408
+ content: {
1409
+ "application/json": {
1410
+ success: boolean;
1411
+ message?: string;
1412
+ error?: string;
1413
+ code?: string;
1414
+ data?: unknown;
1415
+ action?: unknown;
1416
+ };
1417
+ };
1418
+ };
1419
+ /** @description Unauthenticated. */
1420
+ 401: {
1421
+ headers: {
1422
+ [name: string]: unknown;
1423
+ };
1424
+ content: {
1425
+ "application/json": components["schemas"]["ErrorEnvelope"];
1426
+ };
1427
+ };
1428
+ /** @description Caller lacks the chatty-voice entitlement or a per-tool permission. */
1429
+ 403: {
1430
+ headers: {
1431
+ [name: string]: unknown;
1432
+ };
1433
+ content: {
1434
+ "application/json": components["schemas"]["ErrorEnvelope"];
1435
+ };
1436
+ };
1437
+ /** @description Unhandled executor error. Body is `{ success: false, error }` (same envelope as 200). */
1438
+ 500: {
1439
+ headers: {
1440
+ [name: string]: unknown;
1441
+ };
1442
+ content: {
1443
+ "application/json": {
1444
+ success: boolean;
1445
+ message?: string;
1446
+ error?: string;
1447
+ code?: string;
1448
+ data?: unknown;
1449
+ action?: unknown;
1450
+ };
1451
+ };
1452
+ };
1453
+ };
1454
+ };
1455
+ delete?: never;
1456
+ options?: never;
1457
+ head?: never;
1458
+ patch?: never;
1459
+ trace?: never;
1460
+ };
1461
+ "/api/chatty-voice/ai-context": {
1462
+ parameters: {
1463
+ query?: never;
1464
+ header?: never;
1465
+ path?: never;
1466
+ cookie?: never;
1467
+ };
1468
+ /** Fetch the Chatty Voice system prompt + load-status flags. */
1469
+ get: {
1470
+ parameters: {
1471
+ query?: never;
1472
+ header?: {
1473
+ /** @description Semver of the calling app build. Drives the 426 / soft-upgrade handshake. */
1474
+ "X-Client-Version"?: string;
1475
+ };
1476
+ path?: never;
1477
+ cookie?: never;
1478
+ };
1479
+ requestBody?: never;
1480
+ responses: {
1481
+ /** @description System instructions + knowledge-base / workflow-stage load flags. */
1482
+ 200: {
1483
+ headers: {
1484
+ [name: string]: unknown;
1485
+ };
1486
+ content: {
1487
+ "application/json": {
1488
+ instructions: string;
1489
+ knowledgeBaseLoaded: boolean;
1490
+ workflowStagesLoaded: boolean;
1491
+ timestamp: string;
1492
+ };
1493
+ };
1494
+ };
1495
+ /** @description Unauthenticated. */
1496
+ 401: {
1497
+ headers: {
1498
+ [name: string]: unknown;
1499
+ };
1500
+ content: {
1501
+ "application/json": components["schemas"]["ErrorEnvelope"];
1502
+ };
1503
+ };
1504
+ /** @description Caller lacks the chatty-voice entitlement. */
1505
+ 403: {
1506
+ headers: {
1507
+ [name: string]: unknown;
1508
+ };
1509
+ content: {
1510
+ "application/json": components["schemas"]["ErrorEnvelope"];
1511
+ };
1512
+ };
1513
+ };
1514
+ };
1515
+ put?: never;
1516
+ post?: never;
1517
+ delete?: never;
1518
+ options?: never;
1519
+ head?: never;
1520
+ patch?: never;
1521
+ trace?: never;
1522
+ };
1523
+ "/api/realtime-token": {
1524
+ parameters: {
1525
+ query?: never;
1526
+ header?: never;
1527
+ path?: never;
1528
+ cookie?: never;
1529
+ };
1530
+ get?: never;
1531
+ put?: never;
1532
+ /**
1533
+ * Mint an OpenAI Realtime ephemeral session token (single union object).
1534
+ * @description Body: `{ directWebRTC?: boolean }`. Response is a SINGLE union object — the directWebRTC, desktop server-proxied, and HTTP-fallback branches all share the same envelope. Only `fallback` is always present; every other field is optional and presence depends on the branch.
1535
+ */
1536
+ post: {
1537
+ parameters: {
1538
+ query?: never;
1539
+ header?: {
1540
+ /** @description Semver of the calling app build. Drives the 426 / soft-upgrade handshake. */
1541
+ "X-Client-Version"?: string;
1542
+ };
1543
+ path?: never;
1544
+ cookie?: never;
1545
+ };
1546
+ requestBody?: {
1547
+ content: {
1548
+ "application/json": {
1549
+ directWebRTC?: boolean;
1550
+ };
1551
+ };
1552
+ };
1553
+ responses: {
1554
+ /** @description Session minted (or fallback signalled). See union shape. */
1555
+ 200: {
1556
+ headers: {
1557
+ [name: string]: unknown;
1558
+ };
1559
+ content: {
1560
+ "application/json": {
1561
+ sessionId?: string;
1562
+ model?: string;
1563
+ voice?: string;
1564
+ clientSecret?: string;
1565
+ fallback: boolean;
1566
+ directWebRTC?: boolean;
1567
+ useWebRTC?: boolean;
1568
+ expiresInSeconds?: number;
1569
+ metadata?: {
1570
+ organizationId: string | number;
1571
+ };
1572
+ message?: string;
1573
+ };
1574
+ };
1575
+ };
1576
+ /** @description Unauthenticated. */
1577
+ 401: {
1578
+ headers: {
1579
+ [name: string]: unknown;
1580
+ };
1581
+ content: {
1582
+ "application/json": components["schemas"]["ErrorEnvelope"];
1583
+ };
1584
+ };
1585
+ /** @description Caller lacks the chatty-voice entitlement. */
1586
+ 403: {
1587
+ headers: {
1588
+ [name: string]: unknown;
1589
+ };
1590
+ content: {
1591
+ "application/json": components["schemas"]["ErrorEnvelope"];
1592
+ };
1593
+ };
1594
+ /** @description Method Not Allowed (POST only). */
1595
+ 405: {
1596
+ headers: {
1597
+ [name: string]: unknown;
1598
+ };
1599
+ content: {
1600
+ "application/json": components["schemas"]["ErrorEnvelope"];
1601
+ };
1602
+ };
1603
+ /** @description Per-user rate limit on token mint. */
1604
+ 429: {
1605
+ headers: {
1606
+ [name: string]: unknown;
1607
+ };
1608
+ content: {
1609
+ "application/json": components["schemas"]["ErrorEnvelope"];
1610
+ };
1611
+ };
1612
+ /** @description Mint failure — body still carries `fallback: true`. */
1613
+ 500: {
1614
+ headers: {
1615
+ [name: string]: unknown;
1616
+ };
1617
+ content: {
1618
+ "application/json": {
1619
+ sessionId?: string;
1620
+ model?: string;
1621
+ voice?: string;
1622
+ clientSecret?: string;
1623
+ fallback: boolean;
1624
+ directWebRTC?: boolean;
1625
+ useWebRTC?: boolean;
1626
+ expiresInSeconds?: number;
1627
+ metadata?: {
1628
+ organizationId: string | number;
1629
+ };
1630
+ message?: string;
1631
+ };
1632
+ };
1633
+ };
1634
+ };
1635
+ };
1636
+ delete?: never;
1637
+ options?: never;
1638
+ head?: never;
1639
+ patch?: never;
1640
+ trace?: never;
1641
+ };
1642
+ "/api/csrf-token": {
1643
+ parameters: {
1644
+ query?: never;
1645
+ header?: never;
1646
+ path?: never;
1647
+ cookie?: never;
1648
+ };
1649
+ /**
1650
+ * Mint a short-lived CSRF token for the WebRTC SDP exchange.
1651
+ * @description Returned token is required as `X-CSRF-Token` on POST /api/realtime/webrtc and is bound to the calling user for 5 minutes.
1652
+ */
1653
+ get: {
1654
+ parameters: {
1655
+ query?: never;
1656
+ header?: {
1657
+ /** @description Semver of the calling app build. Drives the 426 / soft-upgrade handshake. */
1658
+ "X-Client-Version"?: string;
1659
+ };
1660
+ path?: never;
1661
+ cookie?: never;
1662
+ };
1663
+ requestBody?: never;
1664
+ responses: {
1665
+ /** @description Fresh CSRF token. */
1666
+ 200: {
1667
+ headers: {
1668
+ [name: string]: unknown;
1669
+ };
1670
+ content: {
1671
+ "application/json": {
1672
+ token: string;
1673
+ };
1674
+ };
1675
+ };
1676
+ /** @description Unauthenticated. */
1677
+ 401: {
1678
+ headers: {
1679
+ [name: string]: unknown;
1680
+ };
1681
+ content: {
1682
+ "application/json": components["schemas"]["ErrorEnvelope"];
1683
+ };
1684
+ };
1685
+ /** @description Caller lacks the chatty-voice entitlement. */
1686
+ 403: {
1687
+ headers: {
1688
+ [name: string]: unknown;
1689
+ };
1690
+ content: {
1691
+ "application/json": components["schemas"]["ErrorEnvelope"];
1692
+ };
1693
+ };
1694
+ };
1695
+ };
1696
+ put?: never;
1697
+ post?: never;
1698
+ delete?: never;
1699
+ options?: never;
1700
+ head?: never;
1701
+ patch?: never;
1702
+ trace?: never;
1703
+ };
1704
+ "/api/realtime/webrtc": {
1705
+ parameters: {
1706
+ query?: never;
1707
+ header?: never;
1708
+ path?: never;
1709
+ cookie?: never;
1710
+ };
1711
+ get?: never;
1712
+ put?: never;
1713
+ /**
1714
+ * Server-proxied OpenAI Realtime SDP exchange (desktop branch).
1715
+ * @description Request body is JSON `{ sdp }`; the server mints a fresh OpenAI ephemeral client_secret, forwards the raw SDP to OpenAI's WebRTC endpoint, and returns the raw SDP answer as `application/sdp` text. CSRF-protected via `X-CSRF-Token` (see GET /api/csrf-token) and rate-limited to 3 req/min/IP.
1716
+ */
1717
+ post: {
1718
+ parameters: {
1719
+ query?: never;
1720
+ header: {
1721
+ /** @description Semver of the calling app build. Drives the 426 / soft-upgrade handshake. */
1722
+ "X-Client-Version"?: string;
1723
+ /** @description CSRF token previously minted by GET /api/csrf-token. */
1724
+ "X-CSRF-Token": string;
1725
+ };
1726
+ path?: never;
1727
+ cookie?: never;
1728
+ };
1729
+ requestBody?: {
1730
+ content: {
1731
+ "application/json": {
1732
+ sdp: string;
1733
+ };
1734
+ };
1735
+ };
1736
+ responses: {
1737
+ /** @description Raw OpenAI SDP answer (text body, not JSON). */
1738
+ 200: {
1739
+ headers: {
1740
+ [name: string]: unknown;
1741
+ };
1742
+ content: {
1743
+ "application/sdp": string;
1744
+ };
1745
+ };
1746
+ /** @description Invalid SDP format. */
1747
+ 400: {
1748
+ headers: {
1749
+ [name: string]: unknown;
1750
+ };
1751
+ content: {
1752
+ "application/json": components["schemas"]["ErrorEnvelope"];
1753
+ };
1754
+ };
1755
+ /** @description Unauthenticated. */
1756
+ 401: {
1757
+ headers: {
1758
+ [name: string]: unknown;
1759
+ };
1760
+ content: {
1761
+ "application/json": components["schemas"]["ErrorEnvelope"];
1762
+ };
1763
+ };
1764
+ /** @description Caller lacks the chatty-voice entitlement, or CSRF token invalid. */
1765
+ 403: {
1766
+ headers: {
1767
+ [name: string]: unknown;
1768
+ };
1769
+ content: {
1770
+ "application/json": components["schemas"]["ErrorEnvelope"];
1771
+ };
1772
+ };
1773
+ /** @description Rate limit (3 req/min/IP). */
1774
+ 429: {
1775
+ headers: {
1776
+ [name: string]: unknown;
1777
+ };
1778
+ content: {
1779
+ "application/json": components["schemas"]["ErrorEnvelope"];
1780
+ };
1781
+ };
1782
+ /** @description SDP exchange failed locally. */
1783
+ 500: {
1784
+ headers: {
1785
+ [name: string]: unknown;
1786
+ };
1787
+ content: {
1788
+ "application/json": components["schemas"]["ErrorEnvelope"];
1789
+ };
1790
+ };
1791
+ /** @description Local failure minting the OpenAI ephemeral client_secret required to authenticate the SDP exchange. Returned as a JSON envelope generated by this server: `{ error, status? }`. */
1792
+ 502: {
1793
+ headers: {
1794
+ [name: string]: unknown;
1795
+ };
1796
+ content: {
1797
+ "application/json": {
1798
+ error: string;
1799
+ status?: number;
1800
+ };
1801
+ };
1802
+ };
1803
+ /** @description Upstream OpenAI SDP exchange error. Pass-through: this endpoint forwards OpenAI's HTTP status verbatim (typically 4xx/5xx) and the body is OpenAI's raw error payload — NOT a JSON envelope generated by this server. Content-Type and exact shape are determined by OpenAI; clients MUST treat any non-200 response on this endpoint as opaque error text unless they explicitly detect the 502 JSON envelope above. */
1804
+ default: {
1805
+ headers: {
1806
+ [name: string]: unknown;
1807
+ };
1808
+ content: {
1809
+ "application/json": unknown;
1810
+ "text/plain": string;
1811
+ };
1812
+ };
1813
+ };
1814
+ };
1815
+ delete?: never;
1816
+ options?: never;
1817
+ head?: never;
1818
+ patch?: never;
1819
+ trace?: never;
1820
+ };
1281
1821
  }
1282
1822
  export type webhooks = Record<string, never>;
1283
1823
  export interface components {
@@ -1302,7 +1842,7 @@ export interface components {
1302
1842
  };
1303
1843
  /** @description Cross-platform version handshake manifest. See docs/api-versioning.md. */
1304
1844
  VersionManifest: {
1305
- /** @example 1.1.23 */
1845
+ /** @example 1.2.1 */
1306
1846
  apiVersion: string;
1307
1847
  /** @example 1.0.0 */
1308
1848
  minClientVersion: string;
@@ -1594,19 +2134,37 @@ export interface components {
1594
2134
  orgId: number;
1595
2135
  role: string;
1596
2136
  };
1597
- /** @description POST /api/jobs/:jobId/scans/mobile-upload body. Required: `roomPlanJSON` (object with nested `rooms` array) + `name`. All other fields are additive / optional per the v2 contract. */
2137
+ /** @description POST /api/jobs/:jobId/scans/mobile-upload body. v5 of the LiDAR contract (Task #879) — additive over v3/v4. Required: `roomPlanJSON` (object with nested `rooms` array) + `name`. All v3 and v4 payloads remain accepted byte-for-byte. New first-class fields: per-room `roomLocalId`, `pins[]`, `objects[]`, `boundaryPolygon[]`, per-wall `captureMetadata`; append-room `parentScanId`, `entryDoorwayId`, `entryDoorwayWallIndex`, `entryDoorwayPosition`; opening `position` is 2D `{x, y}` (an additional `z` is tolerated for backwards compatibility but ignored by the server). `wallConfidences` advertises the canonical nested `(number[] | null)[]` shape; the two legacy shapes (flat `number[]` and `Record<roomLocalIdOrIndex, number[]>`) are still parsed by `normalizeWallConfidences` in `server/routes/lidar.ts`. */
1598
2138
  MobileUploadRequest: {
2139
+ /** @description RoomPlan JSON envelope. `rooms[]` carries the per-room geometry (walls/doors/windows/openings/pins/objects/boundaryPolygon). iOS continues to upload positions in the RoomPlan-native frame; the server applies the view-alignment intake transform once at `/scans/mobile-upload` (see docs/lidar-contract-v4.md). */
1599
2140
  roomPlanJSON: {
1600
2141
  rooms: {
1601
2142
  label?: string;
1602
2143
  name?: string;
1603
2144
  category?: string;
1604
- walls?: unknown[];
2145
+ roomLocalId?: string;
2146
+ walls?: {
2147
+ start?: {
2148
+ x: number;
2149
+ y: number;
2150
+ };
2151
+ end?: {
2152
+ x: number;
2153
+ y: number;
2154
+ };
2155
+ length?: number;
2156
+ height?: number;
2157
+ captureMetadata?: {
2158
+ identifier?: string;
2159
+ isDoor?: boolean;
2160
+ isOpening?: boolean;
2161
+ };
2162
+ captureMethod?: string;
2163
+ }[];
1605
2164
  doors?: {
1606
2165
  position: {
1607
2166
  x: number;
1608
2167
  y: number;
1609
- z: number;
1610
2168
  };
1611
2169
  width: number;
1612
2170
  height: number;
@@ -1621,7 +2179,6 @@ export interface components {
1621
2179
  position: {
1622
2180
  x: number;
1623
2181
  y: number;
1624
- z: number;
1625
2182
  };
1626
2183
  width: number;
1627
2184
  height: number;
@@ -1636,7 +2193,6 @@ export interface components {
1636
2193
  position: {
1637
2194
  x: number;
1638
2195
  y: number;
1639
- z: number;
1640
2196
  };
1641
2197
  width: number;
1642
2198
  height: number;
@@ -1647,6 +2203,35 @@ export interface components {
1647
2203
  /** @enum {string} */
1648
2204
  placementSource?: "auto" | "manual";
1649
2205
  }[];
2206
+ pins?: {
2207
+ id: string;
2208
+ position: {
2209
+ x: number;
2210
+ y: number;
2211
+ };
2212
+ label?: string;
2213
+ roomLocalId?: string;
2214
+ kind?: string;
2215
+ note?: string;
2216
+ }[];
2217
+ objects?: {
2218
+ category?: string;
2219
+ position?: {
2220
+ x: number;
2221
+ y: number;
2222
+ };
2223
+ dimensions?: {
2224
+ width?: number;
2225
+ height?: number;
2226
+ depth?: number;
2227
+ };
2228
+ }[];
2229
+ boundaryPolygon?: {
2230
+ x: number;
2231
+ y: number;
2232
+ }[];
2233
+ roomNote?: string;
2234
+ entryDoorwayId?: string;
1650
2235
  }[];
1651
2236
  };
1652
2237
  name: string;
@@ -1655,7 +2240,10 @@ export interface components {
1655
2240
  autoMeasure?: boolean;
1656
2241
  cleanupPipelineVersion?: string;
1657
2242
  userOrientationHint?: string;
1658
- wallConfidences?: unknown[];
2243
+ /** @description Per-room per-wall capture confidences. Canonical shape: nested `(number[] | null)[]` parallel to `roomPlanJSON.rooms[]`. Two legacy shapes are still accepted for backwards compatibility but should not be emitted by new clients: a flat `number[]` (treated as room[0] confidences) and an object keyed by `roomLocalId` (or numeric index as string). See `normalizeWallConfidences` in `server/routes/lidar.ts`. */
2244
+ wallConfidences?: (number[] | null)[] | number[] | {
2245
+ [key: string]: number[];
2246
+ };
1659
2247
  deviceTrack?: unknown;
1660
2248
  referencePhotos?: unknown[];
1661
2249
  propertyId?: number;
@@ -1683,6 +2271,14 @@ export interface components {
1683
2271
  sessionId?: string;
1684
2272
  sessionCapturedAt?: string;
1685
2273
  clientMirrorApplied?: boolean;
2274
+ parentScanId?: number;
2275
+ /** @description Append-room doorway link to a target room on the parent composite. Format: `scan-<scanId>-room-<roomLocalId>-(door|opening)-<idx>`. The trailing segment selects kind-specifically — `door` indexes the target room's `doors[]`, `opening` indexes `openings[]`; the two are never folded. `<scanId>` and `<roomLocalId>` must reference a scan + room on the parent composite the iOS client is appending to. */
2276
+ entryDoorwayId?: string;
2277
+ entryDoorwayWallIndex?: number;
2278
+ entryDoorwayPosition?: {
2279
+ x: number;
2280
+ y: number;
2281
+ };
1686
2282
  };
1687
2283
  MobileUploadResponse: {
1688
2284
  scanId: number;
@@ -1762,6 +2358,75 @@ export interface components {
1762
2358
  squareUpAngleRad: number;
1763
2359
  mirrorX: boolean;
1764
2360
  };
2361
+ ChattyToolDefinition: {
2362
+ /** @enum {string} */
2363
+ type: "function";
2364
+ function: {
2365
+ name: string;
2366
+ description: string;
2367
+ parameters: {
2368
+ /** @enum {string} */
2369
+ type: "object";
2370
+ properties: {
2371
+ [key: string]: {
2372
+ [key: string]: unknown;
2373
+ } & {
2374
+ type: string | string[];
2375
+ description?: string;
2376
+ enum?: string[];
2377
+ required?: string[];
2378
+ additionalProperties?: boolean;
2379
+ };
2380
+ };
2381
+ required?: string[];
2382
+ additionalProperties?: boolean;
2383
+ };
2384
+ };
2385
+ };
2386
+ ChattyExecuteRequest: {
2387
+ function?: string;
2388
+ name?: string;
2389
+ arguments?: {
2390
+ [key: string]: unknown;
2391
+ };
2392
+ };
2393
+ ChattyExecuteResponse: {
2394
+ success: boolean;
2395
+ message?: string;
2396
+ error?: string;
2397
+ code?: string;
2398
+ data?: unknown;
2399
+ action?: unknown;
2400
+ };
2401
+ ChattyAiContextResponse: {
2402
+ instructions: string;
2403
+ knowledgeBaseLoaded: boolean;
2404
+ workflowStagesLoaded: boolean;
2405
+ timestamp: string;
2406
+ };
2407
+ RealtimeTokenRequest: {
2408
+ directWebRTC?: boolean;
2409
+ };
2410
+ RealtimeTokenResponse: {
2411
+ sessionId?: string;
2412
+ model?: string;
2413
+ voice?: string;
2414
+ clientSecret?: string;
2415
+ fallback: boolean;
2416
+ directWebRTC?: boolean;
2417
+ useWebRTC?: boolean;
2418
+ expiresInSeconds?: number;
2419
+ metadata?: {
2420
+ organizationId: string | number;
2421
+ };
2422
+ message?: string;
2423
+ };
2424
+ CsrfTokenResponse: {
2425
+ token: string;
2426
+ };
2427
+ RealtimeWebrtcRequest: {
2428
+ sdp: string;
2429
+ };
1765
2430
  };
1766
2431
  responses: never;
1767
2432
  parameters: never;