@keboola/api-client 31.0.0 → 33.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/AGENTS.md +91 -7
  2. package/API-SURFACE.md +5 -2
  3. package/CHANGELOG.md +327 -0
  4. package/README.md +45 -19
  5. package/dist/{ManagementClientAuthError-DFhi5yxe.cjs → ManagementClientAuthError-DqeXL8nv.cjs} +2 -2
  6. package/dist/{ManagementClientAuthError-DFhi5yxe.cjs.map → ManagementClientAuthError-DqeXL8nv.cjs.map} +1 -1
  7. package/dist/{ManagementClientAuthError-90pvsej0.js → ManagementClientAuthError-iKbBugKC.js} +2 -2
  8. package/dist/{ManagementClientAuthError-90pvsej0.js.map → ManagementClientAuthError-iKbBugKC.js.map} +1 -1
  9. package/dist/ai/index.cjs +2 -2
  10. package/dist/ai/index.d.cts +2 -2
  11. package/dist/ai/index.d.ts +2 -2
  12. package/dist/ai/index.js +2 -2
  13. package/dist/ai/types.d.cts +1 -1
  14. package/dist/ai/types.d.ts +1 -1
  15. package/dist/{appLogs-CLHhkQJn.js → appLogs-D72eD8vP.js} +2 -2
  16. package/dist/{appLogs-CLHhkQJn.js.map → appLogs-D72eD8vP.js.map} +1 -1
  17. package/dist/{appLogs-BCCi02w6.cjs → appLogs-D8K0VeNM.cjs} +2 -2
  18. package/dist/{appLogs-BCCi02w6.cjs.map → appLogs-D8K0VeNM.cjs.map} +1 -1
  19. package/dist/{appLogs-hQdKt_8J.d.cts → appLogs-Q4A7A_Fc.d.cts} +2 -2
  20. package/dist/{appLogs-BdMG6Cvn.d.ts → appLogs-u0XMZLjS.d.ts} +2 -2
  21. package/dist/apps/index.cjs +3 -3
  22. package/dist/apps/index.d.cts +3 -3
  23. package/dist/apps/index.d.ts +3 -3
  24. package/dist/apps/index.js +3 -3
  25. package/dist/apps/types.d.cts +2 -2
  26. package/dist/apps/types.d.ts +2 -2
  27. package/dist/assets/index.cjs +1 -1
  28. package/dist/assets/index.d.cts +1 -1
  29. package/dist/assets/index.d.ts +1 -1
  30. package/dist/assets/index.js +1 -1
  31. package/dist/auth/index.cjs +1 -1
  32. package/dist/auth/index.d.cts +1 -1
  33. package/dist/auth/index.d.ts +1 -1
  34. package/dist/auth/index.js +1 -1
  35. package/dist/auth/types.d.cts +2 -2
  36. package/dist/auth/types.d.ts +2 -2
  37. package/dist/{auth-DmgTH0uY.cjs → auth-C2_JLisH.cjs} +2 -2
  38. package/dist/{auth-DmgTH0uY.cjs.map → auth-C2_JLisH.cjs.map} +1 -1
  39. package/dist/{auth-CE6Hlc9W.js → auth-CE9rQV3-.js} +2 -2
  40. package/dist/{auth-CE6Hlc9W.js.map → auth-CE9rQV3-.js.map} +1 -1
  41. package/dist/{authClient-XBAUz9g-.js → authClient-DEyqR7GW.js} +43 -9
  42. package/dist/authClient-DEyqR7GW.js.map +1 -0
  43. package/dist/{authClient-BL6h78Q1.d.cts → authClient-DZ_8lvdJ.d.cts} +6 -6
  44. package/dist/{authClient-Bc_bDisO.d.ts → authClient-DwT6xdg5.d.ts} +6 -6
  45. package/dist/{authClient-Cixa8_L1.cjs → authClient-IwQ9Ti0J.cjs} +43 -9
  46. package/dist/authClient-IwQ9Ti0J.cjs.map +1 -0
  47. package/dist/chat/index.cjs +3 -3
  48. package/dist/chat/index.d.cts +2 -7
  49. package/dist/chat/index.d.ts +2 -7
  50. package/dist/chat/index.js +3 -3
  51. package/dist/chat/types.d.cts +1 -1
  52. package/dist/chat/types.d.ts +1 -1
  53. package/dist/{configurations-CujCwDcB.cjs → configurations-Ck-mNB_E.cjs} +2 -2
  54. package/dist/{configurations-CujCwDcB.cjs.map → configurations-Ck-mNB_E.cjs.map} +1 -1
  55. package/dist/{configurations-DCOJONZZ.cjs → configurations-CqwAxiQL.cjs} +5 -1
  56. package/dist/configurations-CqwAxiQL.cjs.map +1 -0
  57. package/dist/{configurations-Byt59bIa.js → configurations-ZwBXilW-.js} +2 -2
  58. package/dist/{configurations-Byt59bIa.js.map → configurations-ZwBXilW-.js.map} +1 -1
  59. package/dist/{configurations-iCbhe0tb.js → configurations-d7SZmw69.js} +5 -1
  60. package/dist/configurations-d7SZmw69.js.map +1 -0
  61. package/dist/constants/index.cjs +2 -1
  62. package/dist/constants/index.d.cts +3 -2
  63. package/dist/constants/index.d.ts +3 -2
  64. package/dist/constants/index.js +2 -2
  65. package/dist/{constants-qeWGfk_7.js → constants-ByEwVtGf.js} +38 -2
  66. package/dist/constants-ByEwVtGf.js.map +1 -0
  67. package/dist/{constants-CkAVvuUq.cjs → constants-lIfSdTzS.cjs} +43 -1
  68. package/dist/constants-lIfSdTzS.cjs.map +1 -0
  69. package/dist/{createFetchClient-B1h3-p65.js → createFetchClient-DdyZMhxO.js} +17 -11
  70. package/dist/createFetchClient-DdyZMhxO.js.map +1 -0
  71. package/dist/{createFetchClient-B9Cv0W9f.cjs → createFetchClient-DvZvD31l.cjs} +22 -10
  72. package/dist/createFetchClient-DvZvD31l.cjs.map +1 -0
  73. package/dist/{createGenericFetchClient-DhpvUSlX.js → createGenericFetchClient-MQeLRiNW.js} +2 -2
  74. package/dist/{createGenericFetchClient-DhpvUSlX.js.map → createGenericFetchClient-MQeLRiNW.js.map} +1 -1
  75. package/dist/{createGenericFetchClient-BWoSkTki.cjs → createGenericFetchClient-qfCZlCTv.cjs} +2 -2
  76. package/dist/{createGenericFetchClient-BWoSkTki.cjs.map → createGenericFetchClient-qfCZlCTv.cjs.map} +1 -1
  77. package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs → createOpenapiFetchClient-C57Ljzi6.cjs} +2 -2
  78. package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs.map → createOpenapiFetchClient-C57Ljzi6.cjs.map} +1 -1
  79. package/dist/{createOpenapiFetchClient-0_oqhdPv.js → createOpenapiFetchClient-E7OIVkYv.js} +2 -2
  80. package/dist/{createOpenapiFetchClient-0_oqhdPv.js.map → createOpenapiFetchClient-E7OIVkYv.js.map} +1 -1
  81. package/dist/{credential-dKxArMic.js → credential-Bxv7yxOZ.js} +7 -4
  82. package/dist/credential-Bxv7yxOZ.js.map +1 -0
  83. package/dist/{credential-D-tX9gP4.cjs → credential-D-X5QQrM.cjs} +7 -4
  84. package/dist/credential-D-X5QQrM.cjs.map +1 -0
  85. package/dist/dataScience/index.cjs +2 -2
  86. package/dist/dataScience/index.d.cts +2 -2
  87. package/dist/dataScience/index.d.ts +2 -2
  88. package/dist/dataScience/index.js +2 -2
  89. package/dist/dataScience/types.d.cts +2 -2
  90. package/dist/dataScience/types.d.ts +2 -2
  91. package/dist/{dataScience-BqNWX-Gr.cjs → dataScience-BPW993AG.cjs} +5 -5
  92. package/dist/{dataScience-BqNWX-Gr.cjs.map → dataScience-BPW993AG.cjs.map} +1 -1
  93. package/dist/{dataScience-jdbSSPYF.js → dataScience-B_TA7wCB.js} +5 -5
  94. package/dist/{dataScience-jdbSSPYF.js.map → dataScience-B_TA7wCB.js.map} +1 -1
  95. package/dist/developerPortal/index.cjs +1 -1
  96. package/dist/developerPortal/index.d.cts +2 -2
  97. package/dist/developerPortal/index.d.ts +2 -2
  98. package/dist/developerPortal/index.js +1 -1
  99. package/dist/developerPortal/types.d.cts +1 -1
  100. package/dist/developerPortal/types.d.ts +1 -1
  101. package/dist/{developerPortalClient-B7lNR5q0.cjs → developerPortalClient-Db2XVB_o.cjs} +3 -3
  102. package/dist/{developerPortalClient-B7lNR5q0.cjs.map → developerPortalClient-Db2XVB_o.cjs.map} +1 -1
  103. package/dist/{developerPortalClient-5ABcxz1U.js → developerPortalClient-jk46sjwP.js} +3 -3
  104. package/dist/{developerPortalClient-5ABcxz1U.js.map → developerPortalClient-jk46sjwP.js.map} +1 -1
  105. package/dist/domain/permissions/index.cjs +63 -1
  106. package/dist/domain/permissions/index.cjs.map +1 -0
  107. package/dist/domain/permissions/index.d.cts +52 -3
  108. package/dist/domain/permissions/index.d.ts +52 -3
  109. package/dist/domain/permissions/index.js +59 -2
  110. package/dist/domain/permissions/index.js.map +1 -0
  111. package/dist/editor/index.cjs +2 -2
  112. package/dist/editor/index.d.cts +2 -2
  113. package/dist/editor/index.d.ts +2 -2
  114. package/dist/editor/index.js +2 -2
  115. package/dist/editor/types.d.cts +1 -1
  116. package/dist/editor/types.d.ts +1 -1
  117. package/dist/emitter-dLF1Fyfg.d.cts +11 -0
  118. package/dist/emitter-dLF1Fyfg.d.ts +11 -0
  119. package/dist/encryption/index.cjs +1 -1
  120. package/dist/encryption/index.d.cts +1 -1
  121. package/dist/encryption/index.d.ts +1 -1
  122. package/dist/encryption/index.js +1 -1
  123. package/dist/encryption/types.d.cts +1 -1
  124. package/dist/encryption/types.d.ts +1 -1
  125. package/dist/import/index.cjs +1 -1
  126. package/dist/import/index.d.cts +3 -3
  127. package/dist/import/index.d.ts +3 -3
  128. package/dist/import/index.js +1 -1
  129. package/dist/{import-CExRbskw.js → import-2nqxQ9Rt.js} +3 -3
  130. package/dist/{import-CExRbskw.js.map → import-2nqxQ9Rt.js.map} +1 -1
  131. package/dist/{import-CXHppAxd.cjs → import-DJilJ6tq.cjs} +3 -3
  132. package/dist/{import-CXHppAxd.cjs.map → import-DJilJ6tq.cjs.map} +1 -1
  133. package/dist/{index-BR2Fu-Wo.d.ts → index-B0V1pJAa.d.ts} +618 -3103
  134. package/dist/{index-7RvXnXmd.d.ts → index-B2OGaUap.d.ts} +6 -6
  135. package/dist/{index-J1I2HlSm.d.ts → index-BjKjp3Rf.d.ts} +5 -5
  136. package/dist/{index-NicJZIzu.d.ts → index-C7gxKoDF.d.cts} +3 -3
  137. package/dist/{index-B6q7HxKJ.d.cts → index-CTd4YY8e.d.cts} +4 -4
  138. package/dist/{index-C9mAoXF6.d.cts → index-CUXEFQ7i.d.cts} +6 -6
  139. package/dist/{index-D_TnbEtp.d.cts → index-CVqk63at.d.ts} +3 -3
  140. package/dist/{index-CMb0ygwb.d.ts → index-C_cxKL1V.d.ts} +3 -3
  141. package/dist/{index-CYMAwD3E.d.ts → index-ChMtULt4.d.ts} +4 -4
  142. package/dist/{index-Cpjh05sx.d.cts → index-DCN2lH0v.d.cts} +4 -4
  143. package/dist/{index-cu8THqZV.d.cts → index-DIVvL54G.d.cts} +618 -3103
  144. package/dist/{index-CwJE18PJ.d.cts → index-DLYAvSWZ.d.cts} +3 -3
  145. package/dist/{index-CW4VC9oN.d.ts → index-DQef014j.d.ts} +4 -4
  146. package/dist/{index-Ds8e0l7-.d.ts → index-DVhTNwvu.d.ts} +7 -3
  147. package/dist/{index-B-frWtGW.d.cts → index-DhVFuQDv.d.cts} +7 -3
  148. package/dist/{index-DeMDxHTz.d.ts → index-GNKwr7EQ.d.ts} +4 -4
  149. package/dist/{index--pxLseaw.d.cts → index-NaYLwG_h.d.cts} +143 -2
  150. package/dist/{index--pxLseaw.d.ts → index-NaYLwG_h.d.ts} +143 -2
  151. package/dist/{index-Daks5CeX.d.ts → index-bB6wvw1f.d.ts} +4 -4
  152. package/dist/{index-BfVv8isU.d.cts → index-exNi3I2Q.d.cts} +4 -4
  153. package/dist/{index-CR9LsDaG.d.cts → index-qOK5FtAH.d.cts} +4 -4
  154. package/dist/{index-BSjfVDTr.d.cts → index-t-a7kYnx.d.cts} +5 -5
  155. package/dist/index.cjs +325 -257
  156. package/dist/index.cjs.map +1 -1
  157. package/dist/index.d.cts +7 -6
  158. package/dist/index.d.ts +7 -6
  159. package/dist/index.js +306 -240
  160. package/dist/index.js.map +1 -1
  161. package/dist/{jobStatus-kQ9JqF8t.cjs → jobStatus-0_Y3Sr4i.cjs} +37 -20
  162. package/dist/jobStatus-0_Y3Sr4i.cjs.map +1 -0
  163. package/dist/{jobStatus-DbMupQEK.js → jobStatus-PSZJMTiA.js} +35 -18
  164. package/dist/jobStatus-PSZJMTiA.js.map +1 -0
  165. package/dist/kaiAgent/index.cjs +3 -0
  166. package/dist/kaiAgent/index.d.cts +2 -0
  167. package/dist/kaiAgent/index.d.ts +2 -0
  168. package/dist/kaiAgent/index.js +2 -0
  169. package/dist/kaiAgent/types.cjs +0 -0
  170. package/dist/kaiAgent/types.d.cts +2 -0
  171. package/dist/kaiAgent/types.d.ts +2 -0
  172. package/dist/kaiAgent/types.js +1 -0
  173. package/dist/kaiAgent-CMVub6Sc.cjs +266 -0
  174. package/dist/kaiAgent-CMVub6Sc.cjs.map +1 -0
  175. package/dist/kaiAgent-CYYn0QJW.js +261 -0
  176. package/dist/kaiAgent-CYYn0QJW.js.map +1 -0
  177. package/dist/kaiAgentClient-B2O0DF4d.d.ts +249 -0
  178. package/dist/kaiAgentClient-iCFR2tRU.d.cts +249 -0
  179. package/dist/management/index.cjs +1 -1
  180. package/dist/management/index.d.cts +1 -1
  181. package/dist/management/index.d.ts +1 -1
  182. package/dist/management/index.js +1 -1
  183. package/dist/management/types.d.cts +1 -1
  184. package/dist/management/types.d.ts +1 -1
  185. package/dist/{management-DlVdxzPw.cjs → management-DGfgKsaA.cjs} +5 -5
  186. package/dist/{management-DlVdxzPw.cjs.map → management-DGfgKsaA.cjs.map} +1 -1
  187. package/dist/{management-Cc8mKfnf.js → management-DNEKhR6a.js} +5 -5
  188. package/dist/{management-Cc8mKfnf.js.map → management-DNEKhR6a.js.map} +1 -1
  189. package/dist/metastore/index.cjs +1 -1
  190. package/dist/metastore/index.d.cts +1 -1
  191. package/dist/metastore/index.d.ts +1 -1
  192. package/dist/metastore/index.js +1 -1
  193. package/dist/metastore/types.d.cts +1 -1
  194. package/dist/metastore/types.d.ts +1 -1
  195. package/dist/{metastore-CNf1412Z.js → metastore-CjwktHvw.js} +4 -4
  196. package/dist/{metastore-CNf1412Z.js.map → metastore-CjwktHvw.js.map} +1 -1
  197. package/dist/{metastore-DbsxqjhS.cjs → metastore-DksEte8P.cjs} +4 -4
  198. package/dist/{metastore-DbsxqjhS.cjs.map → metastore-DksEte8P.cjs.map} +1 -1
  199. package/dist/microsoftGraph/index.cjs +92 -0
  200. package/dist/microsoftGraph/index.cjs.map +1 -0
  201. package/dist/microsoftGraph/index.d.cts +305 -0
  202. package/dist/microsoftGraph/index.d.ts +305 -0
  203. package/dist/microsoftGraph/index.js +90 -0
  204. package/dist/microsoftGraph/index.js.map +1 -0
  205. package/dist/microsoftGraph/types.cjs +0 -0
  206. package/dist/microsoftGraph/types.d.cts +10 -0
  207. package/dist/microsoftGraph/types.d.ts +10 -0
  208. package/dist/microsoftGraph/types.js +1 -0
  209. package/dist/notifications/index.cjs +3 -3
  210. package/dist/notifications/index.d.cts +2 -2
  211. package/dist/notifications/index.d.ts +2 -2
  212. package/dist/notifications/index.js +3 -3
  213. package/dist/notifications/types.d.cts +1 -1
  214. package/dist/notifications/types.d.ts +1 -1
  215. package/dist/oauth/index.cjs +1 -1
  216. package/dist/oauth/index.d.cts +2 -2
  217. package/dist/oauth/index.d.ts +2 -2
  218. package/dist/oauth/index.js +1 -1
  219. package/dist/oauth/types.d.cts +1 -1
  220. package/dist/oauth/types.d.ts +1 -1
  221. package/dist/{oauth-ClksaYRY.js → oauth-Bg5zro5S.js} +5 -5
  222. package/dist/{oauth-ClksaYRY.js.map → oauth-Bg5zro5S.js.map} +1 -1
  223. package/dist/{oauth-DsZgmtPj.cjs → oauth-DFsI1TE5.cjs} +5 -5
  224. package/dist/{oauth-DsZgmtPj.cjs.map → oauth-DFsI1TE5.cjs.map} +1 -1
  225. package/dist/omnisearch/index.cjs +2 -2
  226. package/dist/omnisearch/index.d.cts +2 -2
  227. package/dist/omnisearch/index.d.ts +2 -2
  228. package/dist/omnisearch/index.js +2 -2
  229. package/dist/omnisearch/types.d.cts +1 -1
  230. package/dist/omnisearch/types.d.ts +1 -1
  231. package/dist/{project-5SLw86eZ.d.ts → project-Bh954iOA.d.ts} +2 -2
  232. package/dist/{project-CRrsxSAK.d.cts → project-D25GH8zK.d.cts} +2 -2
  233. package/dist/queryService/index.cjs +1 -1
  234. package/dist/queryService/index.d.cts +1 -1
  235. package/dist/queryService/index.d.ts +1 -1
  236. package/dist/queryService/index.js +1 -1
  237. package/dist/queryService/types.d.cts +1 -1
  238. package/dist/queryService/types.d.ts +1 -1
  239. package/dist/{queryService-DxUUkTcy.cjs → queryService--t_W9PSJ.cjs} +6 -6
  240. package/dist/{queryService-DxUUkTcy.cjs.map → queryService--t_W9PSJ.cjs.map} +1 -1
  241. package/dist/{queryService-BlyAcBxP.js → queryService-DX6zeAs_.js} +6 -6
  242. package/dist/{queryService-BlyAcBxP.js.map → queryService-DX6zeAs_.js.map} +1 -1
  243. package/dist/queue/index.cjs +1 -1
  244. package/dist/queue/index.d.cts +3 -3
  245. package/dist/queue/index.d.ts +3 -3
  246. package/dist/queue/index.js +1 -1
  247. package/dist/queue/types.d.cts +1 -1
  248. package/dist/queue/types.d.ts +1 -1
  249. package/dist/{queue-CpcqeMPz.cjs → queue-D1_TCe0z.cjs} +5 -5
  250. package/dist/{queue-CpcqeMPz.cjs.map → queue-D1_TCe0z.cjs.map} +1 -1
  251. package/dist/{queue-DpZTm7U7.js → queue-DrLUbk98.js} +5 -5
  252. package/dist/{queue-DpZTm7U7.js.map → queue-DrLUbk98.js.map} +1 -1
  253. package/dist/scheduler/index.cjs +3 -3
  254. package/dist/scheduler/index.d.cts +2 -2
  255. package/dist/scheduler/index.d.ts +2 -2
  256. package/dist/scheduler/index.js +3 -3
  257. package/dist/scheduler/types.d.cts +1 -1
  258. package/dist/scheduler/types.d.ts +1 -1
  259. package/dist/schema-D1oxyn1O.d.cts +8760 -0
  260. package/dist/schema-D1oxyn1O.d.ts +8760 -0
  261. package/dist/sdk/configurations/index.cjs +1 -1
  262. package/dist/sdk/configurations/index.d.cts +4 -4
  263. package/dist/sdk/configurations/index.d.ts +4 -4
  264. package/dist/sdk/configurations/index.js +1 -1
  265. package/dist/sdk/developerPortal/index.cjs +5 -5
  266. package/dist/sdk/developerPortal/index.cjs.map +1 -1
  267. package/dist/sdk/developerPortal/index.d.cts +5 -4
  268. package/dist/sdk/developerPortal/index.d.ts +5 -4
  269. package/dist/sdk/developerPortal/index.js +4 -4
  270. package/dist/sdk/queryService/index.cjs +1 -1
  271. package/dist/sdk/queryService/index.d.cts +1 -1
  272. package/dist/sdk/queryService/index.d.ts +1 -1
  273. package/dist/sdk/queryService/index.js +1 -1
  274. package/dist/sdk/semanticLayer/index.cjs +163 -74
  275. package/dist/sdk/semanticLayer/index.cjs.map +1 -1
  276. package/dist/sdk/semanticLayer/index.d.cts +16 -13
  277. package/dist/sdk/semanticLayer/index.d.ts +16 -13
  278. package/dist/sdk/semanticLayer/index.js +158 -75
  279. package/dist/sdk/semanticLayer/index.js.map +1 -1
  280. package/dist/sdk/semanticLayer/types.d.cts +2 -2
  281. package/dist/sdk/semanticLayer/types.d.ts +2 -2
  282. package/dist/sdk/storage/index.d.cts +1 -1
  283. package/dist/sdk/storage/index.d.ts +1 -1
  284. package/dist/sdk/tag/index.d.cts +2 -2
  285. package/dist/sdk/tag/index.d.ts +2 -2
  286. package/dist/sdk/tag/types.d.cts +1 -1
  287. package/dist/sdk/tag/types.d.ts +1 -1
  288. package/dist/sdk/vault/index.d.cts +1 -1
  289. package/dist/sdk/vault/index.d.ts +1 -1
  290. package/dist/serviceIds-fHLDwOg9.d.cts +31 -0
  291. package/dist/serviceIds-fHLDwOg9.d.ts +31 -0
  292. package/dist/status/index.cjs +1 -1
  293. package/dist/status/index.d.cts +1 -1
  294. package/dist/status/index.d.ts +1 -1
  295. package/dist/status/index.js +1 -1
  296. package/dist/storage/index.cjs +4 -4
  297. package/dist/storage/index.d.cts +2 -2
  298. package/dist/storage/index.d.ts +2 -2
  299. package/dist/storage/index.js +4 -4
  300. package/dist/storage/types.d.cts +4 -3
  301. package/dist/storage/types.d.ts +4 -3
  302. package/dist/{storage-CQxu0EY3.js → storage--cVaecFq.js} +150 -161
  303. package/dist/storage--cVaecFq.js.map +1 -0
  304. package/dist/{storage-vnH64B_Q.cjs → storage-DexWot8H.cjs} +150 -161
  305. package/dist/storage-DexWot8H.cjs.map +1 -0
  306. package/dist/store-C9FQCHGe.js +74 -0
  307. package/dist/store-C9FQCHGe.js.map +1 -0
  308. package/dist/store-xS-Cu_VS.cjs +85 -0
  309. package/dist/store-xS-Cu_VS.cjs.map +1 -0
  310. package/dist/stream/index.cjs +3 -3
  311. package/dist/stream/index.d.cts +2 -2
  312. package/dist/stream/index.d.ts +2 -2
  313. package/dist/stream/index.js +3 -3
  314. package/dist/stream/types.d.cts +1 -1
  315. package/dist/stream/types.d.ts +1 -1
  316. package/dist/syncActions/index.cjs +1 -1
  317. package/dist/syncActions/index.d.cts +1 -1
  318. package/dist/syncActions/index.d.ts +1 -1
  319. package/dist/syncActions/index.js +1 -1
  320. package/dist/syncActions/types.d.cts +1 -1
  321. package/dist/syncActions/types.d.ts +1 -1
  322. package/dist/{syncActions-AgFiMjRS.js → syncActions-CkMHM-jB.js} +5 -5
  323. package/dist/{syncActions-AgFiMjRS.js.map → syncActions-CkMHM-jB.js.map} +1 -1
  324. package/dist/{syncActions-DPcAPYgJ.cjs → syncActions-DQq_A9v6.cjs} +5 -5
  325. package/dist/{syncActions-DPcAPYgJ.cjs.map → syncActions-DQq_A9v6.cjs.map} +1 -1
  326. package/dist/telemetry/index.cjs +1 -1
  327. package/dist/telemetry/index.d.cts +2 -2
  328. package/dist/telemetry/index.d.ts +2 -2
  329. package/dist/telemetry/index.js +1 -1
  330. package/dist/{telemetry-BLgaYEvi.cjs → telemetry-CAu1Qt7B.cjs} +3 -3
  331. package/dist/{telemetry-BLgaYEvi.cjs.map → telemetry-CAu1Qt7B.cjs.map} +1 -1
  332. package/dist/{telemetry-CPiGWpLi.js → telemetry-Ca6j0i9w.js} +3 -3
  333. package/dist/{telemetry-CPiGWpLi.js.map → telemetry-Ca6j0i9w.js.map} +1 -1
  334. package/dist/{types-eP06LqcE.d.cts → types-0xa_7cgo.d.cts} +2 -16
  335. package/dist/{types-DLazCdFR.d.cts → types-3p0adMdd.d.cts} +3 -3
  336. package/dist/{types-DWUd__fe.d.ts → types-6ThDkaJw.d.ts} +2 -2
  337. package/dist/{types-Culr5v8R.d.ts → types-6hh_3SZs.d.ts} +3 -3
  338. package/dist/{types-DN7RWWBw.d.ts → types-6ku2LeX6.d.ts} +2 -2
  339. package/dist/{types-DSBNqF1J.d.cts → types-B42HhyB0.d.cts} +2 -2
  340. package/dist/{types-C2p7JYQ3.d.cts → types-B4_MM5Wf.d.cts} +2 -2
  341. package/dist/{types-B2El99VY.d.cts → types-B6JJCta-.d.cts} +2 -2
  342. package/dist/{types-BHCigZFc.d.ts → types-B6lOyHY_.d.ts} +3 -3
  343. package/dist/{types-Bc3-a3DT.d.cts → types-B7O5koJb.d.cts} +2 -2
  344. package/dist/{types-D5VvEdOv.d.ts → types-BHI8Lin9.d.ts} +2 -2
  345. package/dist/{types-DnOGCb-p.d.cts → types-BO3sCD0a.d.cts} +41 -10
  346. package/dist/{types-Bv5vw2dc.d.cts → types-BOnf68s5.d.cts} +2 -2
  347. package/dist/{types-CIybfUJ9.d.cts → types-BS5M67xm.d.cts} +3 -3
  348. package/dist/{types-C0bGZqFI.d.cts → types-BT46XIgn.d.cts} +2 -2
  349. package/dist/types-BUYqdN7B.d.ts +205 -0
  350. package/dist/{types-DdeZK3BO.d.ts → types-BYKHr5bR.d.ts} +2 -2
  351. package/dist/{types-BIAP4CYp.d.cts → types-Be3Wgn1U.d.cts} +2 -2
  352. package/dist/{types-B1S60aS2.d.ts → types-BgVKG4vg.d.ts} +2 -2
  353. package/dist/{types-BJLRgXw0.d.ts → types-C2gzqtjf.d.ts} +2 -2
  354. package/dist/{types-DQOOWgLt.d.cts → types-C35GWNmq.d.ts} +408 -24
  355. package/dist/{types-DMMMQuNt.d.ts → types-C4mr0lop.d.ts} +279 -430
  356. package/dist/{types-CFhAduFK.d.cts → types-CCr1-9Q6.d.cts} +3 -3
  357. package/dist/{types-Dirp9mni.d.ts → types-CHCM9oNk.d.ts} +3 -3
  358. package/dist/types-CNQdtffE.d.ts +3454 -0
  359. package/dist/{types-mXM8MrYS.d.cts → types-CPaluTW7.d.cts} +3 -3
  360. package/dist/{types-RmbvQimP.d.ts → types-CSc8NQCY.d.ts} +41 -10
  361. package/dist/{types-CgF9R0Na.d.ts → types-C_ilZZkQ.d.ts} +2 -2
  362. package/dist/{types-lVXf05pr.d.ts → types-CaMfshWX.d.ts} +2 -2
  363. package/dist/{types-BXnUqdBB.d.cts → types-Ccgbipp4.d.cts} +2 -2
  364. package/dist/types-Cpjk0-ta.d.ts +33557 -0
  365. package/dist/types-CrH4H8M4.d.cts +33557 -0
  366. package/dist/{types-CQd9PuKY.d.cts → types-Cu-0LT4f.d.cts} +2 -2
  367. package/dist/{types-D7YGPUsm.d.ts → types-CxmV36rp.d.cts} +408 -24
  368. package/dist/{types-SX78XZZ0.d.ts → types-D-98DirB.d.ts} +2 -2
  369. package/dist/{types-DG_FlLJt.d.cts → types-D6ocCyGh.d.cts} +279 -430
  370. package/dist/{types-DkoyCUqv.d.ts → types-D7Wgcp0u.d.ts} +2 -2
  371. package/dist/{types-COFrOmuO.d.ts → types-DAzmGzlb.d.ts} +2 -2
  372. package/dist/{types-BdKtW2Ml.d.cts → types-DHI0g51U.d.cts} +2 -2
  373. package/dist/{types-BMsK6T5k.d.ts → types-DHqIJKwx.d.ts} +2 -2
  374. package/dist/types-DONxb2-c.d.cts +205 -0
  375. package/dist/{types-DyIKgbGB.d.ts → types-DTTC70Ac.d.ts} +2 -2
  376. package/dist/{types-B2Al1BNh.d.ts → types-DlvZeert.d.ts} +2 -2
  377. package/dist/{types-uP64XthM.d.cts → types-DqniGeDJ.d.cts} +2 -2
  378. package/dist/types-E3VT-zYz.d.cts +3454 -0
  379. package/dist/{types-CuAoZH8w.d.cts → types-Jt0ipbSm.d.cts} +2 -2
  380. package/dist/{types-Co8WobOo.d.ts → types-Ur37iOqb.d.ts} +3 -3
  381. package/dist/{types-Drk7PEhk.d.ts → types-ZGAWRIBW.d.ts} +2 -2
  382. package/dist/{types-056giLrn.d.cts → types-bY6K3y0O.d.cts} +2 -2
  383. package/dist/{types-BvXODdf5.d.ts → types-k4R8gQ4U.d.ts} +2 -16
  384. package/dist/{types-sTH4KiPc.d.cts → types-sO52qIAA.d.cts} +2 -2
  385. package/dist/{types-By47HWwB.d.cts → types-sp1rJY9E.d.cts} +2 -2
  386. package/dist/{validateConnectionStatus-DVHXGTdi.cjs → validateConnectionStatus-24zqIQ0p.cjs} +2 -2
  387. package/dist/{validateConnectionStatus-DVHXGTdi.cjs.map → validateConnectionStatus-24zqIQ0p.cjs.map} +1 -1
  388. package/dist/{validateConnectionStatus-CBhXmvWC.js → validateConnectionStatus-DhkWg6Eq.js} +2 -2
  389. package/dist/{validateConnectionStatus-CBhXmvWC.js.map → validateConnectionStatus-DhkWg6Eq.js.map} +1 -1
  390. package/dist/vault/index.cjs +4 -4
  391. package/dist/vault/index.d.cts +1 -1
  392. package/dist/vault/index.d.ts +1 -1
  393. package/dist/vault/index.js +4 -4
  394. package/dist/vault/types.d.cts +1 -1
  395. package/dist/vault/types.d.ts +1 -1
  396. package/package.json +55 -3
  397. package/surface/auth.md +2 -2
  398. package/surface/chat.md +1 -1
  399. package/surface/kaiAgent.md +5 -2
  400. package/surface/sdk.md +4 -4
  401. package/surface/storage.md +44 -44
  402. package/dist/authClient-Cixa8_L1.cjs.map +0 -1
  403. package/dist/authClient-XBAUz9g-.js.map +0 -1
  404. package/dist/configurations-DCOJONZZ.cjs.map +0 -1
  405. package/dist/configurations-iCbhe0tb.js.map +0 -1
  406. package/dist/constants-CkAVvuUq.cjs.map +0 -1
  407. package/dist/constants-qeWGfk_7.js.map +0 -1
  408. package/dist/createFetchClient-B1h3-p65.js.map +0 -1
  409. package/dist/createFetchClient-B9Cv0W9f.cjs.map +0 -1
  410. package/dist/createStore-BNiCRQXa.js +0 -148
  411. package/dist/createStore-BNiCRQXa.js.map +0 -1
  412. package/dist/createStore-MQbboXcB.cjs +0 -177
  413. package/dist/createStore-MQbboXcB.cjs.map +0 -1
  414. package/dist/credential-D-tX9gP4.cjs.map +0 -1
  415. package/dist/credential-dKxArMic.js.map +0 -1
  416. package/dist/jobStatus-DbMupQEK.js.map +0 -1
  417. package/dist/jobStatus-kQ9JqF8t.cjs.map +0 -1
  418. package/dist/storage-CQxu0EY3.js.map +0 -1
  419. package/dist/storage-vnH64B_Q.cjs.map +0 -1
  420. package/dist/types-BV74LS5r.d.ts +0 -148
  421. package/dist/types-CIJAtX8q.d.cts +0 -18784
  422. package/dist/types-X-gQF8F8.d.ts +0 -18784
  423. package/dist/types-ca-YNg1r.d.cts +0 -148
@@ -0,0 +1,3454 @@
1
+ import { c as OpenapiReturnType, o as OpenapiPathType, r as OpenapiBodyType, s as OpenapiQueryType } from "./index-DVhTNwvu.js";
2
+ //#region src/clients/kaiAgent/__generated__/schema.d.ts
3
+ /**
4
+ * This file was auto-generated by openapi-typescript.
5
+ * Do not make direct changes to the file.
6
+ */
7
+ type paths = {
8
+ '/ping': {
9
+ parameters: {
10
+ query?: never;
11
+ header?: never;
12
+ path?: never;
13
+ cookie?: never;
14
+ };
15
+ /** Readiness probe */
16
+ get: {
17
+ parameters: {
18
+ query?: never;
19
+ header?: never;
20
+ path?: never;
21
+ cookie?: never;
22
+ };
23
+ requestBody?: never;
24
+ responses: {
25
+ /** @description Server is ready */
26
+ 200: {
27
+ headers: {
28
+ [name: string]: unknown;
29
+ };
30
+ content: {
31
+ 'application/json': {
32
+ /** Format: date-time */
33
+ timestamp: string;
34
+ };
35
+ };
36
+ };
37
+ };
38
+ };
39
+ put?: never;
40
+ post?: never;
41
+ delete?: never;
42
+ options?: never;
43
+ head?: never;
44
+ patch?: never;
45
+ trace?: never;
46
+ };
47
+ '/api': {
48
+ parameters: {
49
+ query?: never;
50
+ header?: never;
51
+ path?: never;
52
+ cookie?: never;
53
+ };
54
+ /** Application info and health status */
55
+ get: {
56
+ parameters: {
57
+ query?: never;
58
+ header?: never;
59
+ path?: never;
60
+ cookie?: never;
61
+ };
62
+ requestBody?: never;
63
+ responses: {
64
+ /** @description Application info */
65
+ 200: {
66
+ headers: {
67
+ [name: string]: unknown;
68
+ };
69
+ content: {
70
+ 'application/json': {
71
+ /** Format: date-time */
72
+ timestamp: string;
73
+ uptime: number;
74
+ appName: string;
75
+ appVersion: string;
76
+ serverVersion: string;
77
+ connectedMcp: {
78
+ url: string;
79
+ /** @enum {string} */
80
+ status: 'ok' | 'error';
81
+ details?: unknown;
82
+ error?: string;
83
+ };
84
+ };
85
+ };
86
+ };
87
+ };
88
+ };
89
+ put?: never;
90
+ post?: never;
91
+ delete?: never;
92
+ options?: never;
93
+ head?: never;
94
+ patch?: never;
95
+ trace?: never;
96
+ };
97
+ '/api/history': {
98
+ parameters: {
99
+ query?: never;
100
+ header?: never;
101
+ path?: never;
102
+ cookie?: never;
103
+ };
104
+ /**
105
+ * Get chat history
106
+ * @description Retrieve paginated list of user's chats
107
+ */
108
+ get: {
109
+ parameters: {
110
+ query?: {
111
+ limit?: number;
112
+ starting_after?: string;
113
+ ending_before?: string;
114
+ };
115
+ header?: never;
116
+ path?: never;
117
+ cookie?: never;
118
+ };
119
+ requestBody?: never;
120
+ responses: {
121
+ /** @description List of chats with pagination info */
122
+ 200: {
123
+ headers: {
124
+ [name: string]: unknown;
125
+ };
126
+ content: {
127
+ 'application/json': {
128
+ chats: {
129
+ /** Format: uuid */
130
+ id?: string;
131
+ title?: string;
132
+ userId?: string;
133
+ /** Format: date-time */
134
+ createdAt?: string;
135
+ /** Format: date-time */
136
+ lastMessageAt?: string;
137
+ /** @enum {string} */
138
+ visibility?: 'public' | 'private';
139
+ branchId?: number | null;
140
+ }[];
141
+ hasMore: boolean;
142
+ };
143
+ };
144
+ };
145
+ /** @description Bad request */
146
+ 400: {
147
+ headers: {
148
+ [name: string]: unknown;
149
+ };
150
+ content: {
151
+ 'application/json': {
152
+ error: {
153
+ /** @enum {string} */
154
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
155
+ /** @enum {string} */
156
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
157
+ message: string;
158
+ /** @enum {string} */
159
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
160
+ exceptionId?: string;
161
+ };
162
+ };
163
+ };
164
+ };
165
+ /** @description Unauthorized */
166
+ 401: {
167
+ headers: {
168
+ [name: string]: unknown;
169
+ };
170
+ content: {
171
+ 'application/json': {
172
+ error: {
173
+ /** @enum {string} */
174
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
175
+ /** @enum {string} */
176
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
177
+ message: string;
178
+ /** @enum {string} */
179
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
180
+ exceptionId?: string;
181
+ };
182
+ };
183
+ };
184
+ };
185
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
186
+ 503: {
187
+ headers: {
188
+ [name: string]: unknown;
189
+ };
190
+ content: {
191
+ 'application/json': {
192
+ error: {
193
+ /** @enum {string} */
194
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
195
+ /** @enum {string} */
196
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
197
+ message: string;
198
+ /** @enum {string} */
199
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
200
+ exceptionId?: string;
201
+ };
202
+ };
203
+ };
204
+ };
205
+ };
206
+ };
207
+ put?: never;
208
+ post?: never;
209
+ delete?: never;
210
+ options?: never;
211
+ head?: never;
212
+ patch?: never;
213
+ trace?: never;
214
+ };
215
+ '/api/chat': {
216
+ parameters: {
217
+ query?: never;
218
+ header?: never;
219
+ path?: never;
220
+ cookie?: never;
221
+ };
222
+ get?: never;
223
+ put?: never;
224
+ /**
225
+ * Send a message and get streaming SSE response
226
+ * @description Send a user message to the chat and receive a streaming Server-Sent Events response
227
+ */
228
+ post: {
229
+ parameters: {
230
+ query?: never;
231
+ header?: never;
232
+ path?: never;
233
+ cookie?: never;
234
+ };
235
+ requestBody?: {
236
+ content: {
237
+ 'application/json': {
238
+ /** Format: uuid */
239
+ id: string;
240
+ message: {
241
+ /** Format: uuid */
242
+ id: string;
243
+ /** @enum {string} */
244
+ role: 'user' | 'assistant';
245
+ parts: {
246
+ [key: string]: unknown;
247
+ }[];
248
+ metadata?: {
249
+ hidden?: boolean;
250
+ requestContext?: {
251
+ path?: string;
252
+ sqlEditorActive?: boolean;
253
+ };
254
+ tableContext?: {
255
+ tableName: string;
256
+ tableId: string;
257
+ bucketId: string;
258
+ fileName: string;
259
+ }[];
260
+ };
261
+ };
262
+ selectedChatModel?: string;
263
+ /** @enum {string} */
264
+ selectedVisibilityType?: 'public' | 'private';
265
+ branchId?: number;
266
+ toolRestrictions?: {
267
+ allowedTools?: string[];
268
+ disallowedTools?: string[];
269
+ readOnlyMode?: boolean;
270
+ };
271
+ telemetryMetadata?: {
272
+ [key: string]: string | number | boolean;
273
+ };
274
+ supportsApprovalRequestedEvent?: boolean;
275
+ };
276
+ };
277
+ };
278
+ responses: {
279
+ /** @description SSE stream of chat events */
280
+ 200: {
281
+ headers: {
282
+ [name: string]: unknown;
283
+ };
284
+ content: {
285
+ 'text/event-stream': unknown;
286
+ };
287
+ };
288
+ /** @description Bad request */
289
+ 400: {
290
+ headers: {
291
+ [name: string]: unknown;
292
+ };
293
+ content: {
294
+ 'application/json': {
295
+ error: {
296
+ /** @enum {string} */
297
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
298
+ /** @enum {string} */
299
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
300
+ message: string;
301
+ /** @enum {string} */
302
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
303
+ exceptionId?: string;
304
+ };
305
+ };
306
+ };
307
+ };
308
+ /** @description Unauthorized */
309
+ 401: {
310
+ headers: {
311
+ [name: string]: unknown;
312
+ };
313
+ content: {
314
+ 'application/json': {
315
+ error: {
316
+ /** @enum {string} */
317
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
318
+ /** @enum {string} */
319
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
320
+ message: string;
321
+ /** @enum {string} */
322
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
323
+ exceptionId?: string;
324
+ };
325
+ };
326
+ };
327
+ };
328
+ /** @description A message is already being processed in this chat */
329
+ 409: {
330
+ headers: {
331
+ [name: string]: unknown;
332
+ };
333
+ content: {
334
+ 'application/json': {
335
+ error: {
336
+ /** @enum {string} */
337
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
338
+ /** @enum {string} */
339
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
340
+ message: string;
341
+ /** @enum {string} */
342
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
343
+ exceptionId?: string;
344
+ };
345
+ };
346
+ };
347
+ };
348
+ /** @description Rate limit exceeded */
349
+ 429: {
350
+ headers: {
351
+ [name: string]: unknown;
352
+ };
353
+ content: {
354
+ 'application/json': {
355
+ error: {
356
+ /** @enum {string} */
357
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
358
+ /** @enum {string} */
359
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
360
+ message: string;
361
+ /** @enum {string} */
362
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
363
+ exceptionId?: string;
364
+ };
365
+ };
366
+ };
367
+ };
368
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
369
+ 503: {
370
+ headers: {
371
+ [name: string]: unknown;
372
+ };
373
+ content: {
374
+ 'application/json': {
375
+ error: {
376
+ /** @enum {string} */
377
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
378
+ /** @enum {string} */
379
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
380
+ message: string;
381
+ /** @enum {string} */
382
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
383
+ exceptionId?: string;
384
+ };
385
+ };
386
+ };
387
+ };
388
+ };
389
+ };
390
+ /**
391
+ * Delete a chat
392
+ * @description Delete a chat by ID
393
+ */
394
+ delete: {
395
+ parameters: {
396
+ query: {
397
+ id: string;
398
+ };
399
+ header?: never;
400
+ path?: never;
401
+ cookie?: never;
402
+ };
403
+ requestBody?: never;
404
+ responses: {
405
+ /** @description Chat deleted successfully */
406
+ 200: {
407
+ headers: {
408
+ [name: string]: unknown;
409
+ };
410
+ content: {
411
+ 'application/json': {
412
+ /** Format: uuid */
413
+ id?: string;
414
+ title?: string;
415
+ userId?: string;
416
+ /** Format: date-time */
417
+ createdAt?: string;
418
+ /** @enum {string} */
419
+ visibility?: 'public' | 'private';
420
+ branchId?: number | null;
421
+ };
422
+ };
423
+ };
424
+ /** @description Bad request */
425
+ 400: {
426
+ headers: {
427
+ [name: string]: unknown;
428
+ };
429
+ content: {
430
+ 'application/json': {
431
+ error: {
432
+ /** @enum {string} */
433
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
434
+ /** @enum {string} */
435
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
436
+ message: string;
437
+ /** @enum {string} */
438
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
439
+ exceptionId?: string;
440
+ };
441
+ };
442
+ };
443
+ };
444
+ /** @description Unauthorized */
445
+ 401: {
446
+ headers: {
447
+ [name: string]: unknown;
448
+ };
449
+ content: {
450
+ 'application/json': {
451
+ error: {
452
+ /** @enum {string} */
453
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
454
+ /** @enum {string} */
455
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
456
+ message: string;
457
+ /** @enum {string} */
458
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
459
+ exceptionId?: string;
460
+ };
461
+ };
462
+ };
463
+ };
464
+ /** @description Forbidden */
465
+ 403: {
466
+ headers: {
467
+ [name: string]: unknown;
468
+ };
469
+ content: {
470
+ 'application/json': {
471
+ error: {
472
+ /** @enum {string} */
473
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
474
+ /** @enum {string} */
475
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
476
+ message: string;
477
+ /** @enum {string} */
478
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
479
+ exceptionId?: string;
480
+ };
481
+ };
482
+ };
483
+ };
484
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
485
+ 503: {
486
+ headers: {
487
+ [name: string]: unknown;
488
+ };
489
+ content: {
490
+ 'application/json': {
491
+ error: {
492
+ /** @enum {string} */
493
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
494
+ /** @enum {string} */
495
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
496
+ message: string;
497
+ /** @enum {string} */
498
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
499
+ exceptionId?: string;
500
+ };
501
+ };
502
+ };
503
+ };
504
+ };
505
+ };
506
+ options?: never;
507
+ head?: never;
508
+ patch?: never;
509
+ trace?: never;
510
+ };
511
+ '/api/chat/{id}/stream': {
512
+ parameters: {
513
+ query?: never;
514
+ header?: never;
515
+ path?: never;
516
+ cookie?: never;
517
+ };
518
+ /**
519
+ * Reattach to the in-flight SSE stream for a chat
520
+ * @description Subscribe to the bus for a running or recently-completed assistant turn. Replays buffered events from the start of the run, then continues live (if the run is still in flight). Returns 404 if no run exists for this chat or its retention window has expired.
521
+ */
522
+ get: {
523
+ parameters: {
524
+ query?: never;
525
+ header?: never;
526
+ path: {
527
+ id: string;
528
+ };
529
+ cookie?: never;
530
+ };
531
+ requestBody?: never;
532
+ responses: {
533
+ /** @description SSE stream of chat events */
534
+ 200: {
535
+ headers: {
536
+ [name: string]: unknown;
537
+ };
538
+ content: {
539
+ 'text/event-stream': unknown;
540
+ };
541
+ };
542
+ /** @description Unauthorized */
543
+ 401: {
544
+ headers: {
545
+ [name: string]: unknown;
546
+ };
547
+ content: {
548
+ 'application/json': {
549
+ error: {
550
+ /** @enum {string} */
551
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
552
+ /** @enum {string} */
553
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
554
+ message: string;
555
+ /** @enum {string} */
556
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
557
+ exceptionId?: string;
558
+ };
559
+ };
560
+ };
561
+ };
562
+ /** @description Forbidden */
563
+ 403: {
564
+ headers: {
565
+ [name: string]: unknown;
566
+ };
567
+ content: {
568
+ 'application/json': {
569
+ error: {
570
+ /** @enum {string} */
571
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
572
+ /** @enum {string} */
573
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
574
+ message: string;
575
+ /** @enum {string} */
576
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
577
+ exceptionId?: string;
578
+ };
579
+ };
580
+ };
581
+ };
582
+ /** @description No stream for this chat — either never started or retention window expired */
583
+ 404: {
584
+ headers: {
585
+ [name: string]: unknown;
586
+ };
587
+ content: {
588
+ 'application/json': {
589
+ error: {
590
+ /** @enum {string} */
591
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
592
+ /** @enum {string} */
593
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
594
+ message: string;
595
+ /** @enum {string} */
596
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
597
+ exceptionId?: string;
598
+ };
599
+ };
600
+ };
601
+ };
602
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
603
+ 503: {
604
+ headers: {
605
+ [name: string]: unknown;
606
+ };
607
+ content: {
608
+ 'application/json': {
609
+ error: {
610
+ /** @enum {string} */
611
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
612
+ /** @enum {string} */
613
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
614
+ message: string;
615
+ /** @enum {string} */
616
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
617
+ exceptionId?: string;
618
+ };
619
+ };
620
+ };
621
+ };
622
+ };
623
+ };
624
+ put?: never;
625
+ post?: never;
626
+ delete?: never;
627
+ options?: never;
628
+ head?: never;
629
+ patch?: never;
630
+ trace?: never;
631
+ };
632
+ '/api/chat/{id}/stop': {
633
+ parameters: {
634
+ query?: never;
635
+ header?: never;
636
+ path?: never;
637
+ cookie?: never;
638
+ };
639
+ get?: never;
640
+ put?: never;
641
+ /**
642
+ * Stop the in-flight assistant turn for a chat
643
+ * @description Signals the chat handler to abort the sandbox process. Idempotent — returns 200 even if no run is active.
644
+ */
645
+ post: {
646
+ parameters: {
647
+ query?: never;
648
+ header?: never;
649
+ path: {
650
+ id: string;
651
+ };
652
+ cookie?: never;
653
+ };
654
+ requestBody?: never;
655
+ responses: {
656
+ /** @description Stop requested (or no run was active) */
657
+ 200: {
658
+ headers: {
659
+ [name: string]: unknown;
660
+ };
661
+ content: {
662
+ 'application/json': {
663
+ stopped: boolean;
664
+ };
665
+ };
666
+ };
667
+ /** @description Unauthorized */
668
+ 401: {
669
+ headers: {
670
+ [name: string]: unknown;
671
+ };
672
+ content: {
673
+ 'application/json': {
674
+ error: {
675
+ /** @enum {string} */
676
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
677
+ /** @enum {string} */
678
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
679
+ message: string;
680
+ /** @enum {string} */
681
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
682
+ exceptionId?: string;
683
+ };
684
+ };
685
+ };
686
+ };
687
+ /** @description Forbidden */
688
+ 403: {
689
+ headers: {
690
+ [name: string]: unknown;
691
+ };
692
+ content: {
693
+ 'application/json': {
694
+ error: {
695
+ /** @enum {string} */
696
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
697
+ /** @enum {string} */
698
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
699
+ message: string;
700
+ /** @enum {string} */
701
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
702
+ exceptionId?: string;
703
+ };
704
+ };
705
+ };
706
+ };
707
+ /** @description Chat not found */
708
+ 404: {
709
+ headers: {
710
+ [name: string]: unknown;
711
+ };
712
+ content: {
713
+ 'application/json': {
714
+ error: {
715
+ /** @enum {string} */
716
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
717
+ /** @enum {string} */
718
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
719
+ message: string;
720
+ /** @enum {string} */
721
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
722
+ exceptionId?: string;
723
+ };
724
+ };
725
+ };
726
+ };
727
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
728
+ 503: {
729
+ headers: {
730
+ [name: string]: unknown;
731
+ };
732
+ content: {
733
+ 'application/json': {
734
+ error: {
735
+ /** @enum {string} */
736
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
737
+ /** @enum {string} */
738
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
739
+ message: string;
740
+ /** @enum {string} */
741
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
742
+ exceptionId?: string;
743
+ };
744
+ };
745
+ };
746
+ };
747
+ };
748
+ };
749
+ delete?: never;
750
+ options?: never;
751
+ head?: never;
752
+ patch?: never;
753
+ trace?: never;
754
+ };
755
+ '/api/chat/{id}': {
756
+ parameters: {
757
+ query?: never;
758
+ header?: never;
759
+ path?: never;
760
+ cookie?: never;
761
+ };
762
+ /**
763
+ * Get chat details and message history
764
+ * @description Retrieve complete chat details including all messages in the conversation
765
+ */
766
+ get: {
767
+ parameters: {
768
+ query?: never;
769
+ header?: never;
770
+ path: {
771
+ id: string;
772
+ };
773
+ cookie?: never;
774
+ };
775
+ requestBody?: never;
776
+ responses: {
777
+ /** @description Chat details with message history */
778
+ 200: {
779
+ headers: {
780
+ [name: string]: unknown;
781
+ };
782
+ content: {
783
+ 'application/json': {
784
+ /** Format: uuid */
785
+ id: string;
786
+ title: string;
787
+ userId: string;
788
+ /** Format: date-time */
789
+ createdAt: string;
790
+ /** Format: date-time */
791
+ lastMessageAt: string;
792
+ /** @enum {string} */
793
+ visibility: 'public' | 'private';
794
+ branchId?: number | null;
795
+ contextWindow?: {
796
+ usedTokens: number;
797
+ maxTokens: number;
798
+ percentage: number;
799
+ } | null;
800
+ ppuUsed: number | null;
801
+ ppuPercentage: number | null;
802
+ messages: {
803
+ /** Format: uuid */
804
+ id: string;
805
+ /** @enum {string} */
806
+ role: 'user' | 'assistant';
807
+ parts: ({
808
+ /** @enum {string} */
809
+ type: 'text';
810
+ text: string;
811
+ /** @enum {string} */
812
+ state?: 'done';
813
+ } | {
814
+ /** @enum {string} */
815
+ type: 'tool-result';
816
+ toolCallId: string;
817
+ toolName: string;
818
+ result: string;
819
+ } | {
820
+ /** @enum {string} */
821
+ type: 'step-start';
822
+ } | {
823
+ /** @enum {string} */
824
+ type: 'data-compact-boundary';
825
+ data: {
826
+ /** @enum {string} */
827
+ trigger: 'manual' | 'auto';
828
+ preTokens: number;
829
+ preservedSegment?: {
830
+ /** Format: uuid */
831
+ headUuid: string;
832
+ /** Format: uuid */
833
+ anchorUuid: string;
834
+ /** Format: uuid */
835
+ tailUuid: string;
836
+ };
837
+ summary: string;
838
+ sdkSessionId: string;
839
+ };
840
+ } | {
841
+ type: string;
842
+ toolCallId: string;
843
+ /** @enum {string} */
844
+ state: 'output-available' | 'output-error' | 'output-denied' | 'input-available' | 'input-streaming' | 'approval-requested' | 'approval-responded';
845
+ input?: {
846
+ [key: string]: unknown;
847
+ };
848
+ output?: unknown;
849
+ errorText?: string;
850
+ approval?: {
851
+ id: string;
852
+ approved: boolean;
853
+ reason?: string;
854
+ };
855
+ })[];
856
+ metadata?: {
857
+ /** Format: date-time */
858
+ createdAt?: string;
859
+ hidden?: boolean;
860
+ requestContext?: {
861
+ path?: string;
862
+ sqlEditorActive?: boolean;
863
+ };
864
+ };
865
+ /** @enum {string} */
866
+ status?: 'pending' | 'completed' | 'interrupted' | 'failed';
867
+ }[];
868
+ };
869
+ };
870
+ };
871
+ /** @description Bad request */
872
+ 400: {
873
+ headers: {
874
+ [name: string]: unknown;
875
+ };
876
+ content: {
877
+ 'application/json': {
878
+ error: {
879
+ /** @enum {string} */
880
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
881
+ /** @enum {string} */
882
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
883
+ message: string;
884
+ /** @enum {string} */
885
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
886
+ exceptionId?: string;
887
+ };
888
+ };
889
+ };
890
+ };
891
+ /** @description Unauthorized */
892
+ 401: {
893
+ headers: {
894
+ [name: string]: unknown;
895
+ };
896
+ content: {
897
+ 'application/json': {
898
+ error: {
899
+ /** @enum {string} */
900
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
901
+ /** @enum {string} */
902
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
903
+ message: string;
904
+ /** @enum {string} */
905
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
906
+ exceptionId?: string;
907
+ };
908
+ };
909
+ };
910
+ };
911
+ /** @description Forbidden */
912
+ 403: {
913
+ headers: {
914
+ [name: string]: unknown;
915
+ };
916
+ content: {
917
+ 'application/json': {
918
+ error: {
919
+ /** @enum {string} */
920
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
921
+ /** @enum {string} */
922
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
923
+ message: string;
924
+ /** @enum {string} */
925
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
926
+ exceptionId?: string;
927
+ };
928
+ };
929
+ };
930
+ };
931
+ /** @description Chat not found */
932
+ 404: {
933
+ headers: {
934
+ [name: string]: unknown;
935
+ };
936
+ content: {
937
+ 'application/json': {
938
+ error: {
939
+ /** @enum {string} */
940
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
941
+ /** @enum {string} */
942
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
943
+ message: string;
944
+ /** @enum {string} */
945
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
946
+ exceptionId?: string;
947
+ };
948
+ };
949
+ };
950
+ };
951
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
952
+ 503: {
953
+ headers: {
954
+ [name: string]: unknown;
955
+ };
956
+ content: {
957
+ 'application/json': {
958
+ error: {
959
+ /** @enum {string} */
960
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
961
+ /** @enum {string} */
962
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
963
+ message: string;
964
+ /** @enum {string} */
965
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
966
+ exceptionId?: string;
967
+ };
968
+ };
969
+ };
970
+ };
971
+ };
972
+ };
973
+ put?: never;
974
+ post?: never;
975
+ delete?: never;
976
+ options?: never;
977
+ head?: never;
978
+ patch?: never;
979
+ trace?: never;
980
+ };
981
+ '/api/vote': {
982
+ parameters: {
983
+ query?: never;
984
+ header?: never;
985
+ path?: never;
986
+ cookie?: never;
987
+ };
988
+ /**
989
+ * Get votes for a chat
990
+ * @description Retrieve all votes for messages in a specific chat
991
+ */
992
+ get: {
993
+ parameters: {
994
+ query: {
995
+ chatId: string;
996
+ };
997
+ header?: never;
998
+ path?: never;
999
+ cookie?: never;
1000
+ };
1001
+ requestBody?: never;
1002
+ responses: {
1003
+ /** @description List of votes */
1004
+ 200: {
1005
+ headers: {
1006
+ [name: string]: unknown;
1007
+ };
1008
+ content: {
1009
+ 'application/json': {
1010
+ /** Format: uuid */
1011
+ chatId: string;
1012
+ /** Format: uuid */
1013
+ messageId: string;
1014
+ isUpvoted: boolean;
1015
+ }[];
1016
+ };
1017
+ };
1018
+ /** @description Bad request */
1019
+ 400: {
1020
+ headers: {
1021
+ [name: string]: unknown;
1022
+ };
1023
+ content: {
1024
+ 'application/json': {
1025
+ error: {
1026
+ /** @enum {string} */
1027
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1028
+ /** @enum {string} */
1029
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1030
+ message: string;
1031
+ /** @enum {string} */
1032
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1033
+ exceptionId?: string;
1034
+ };
1035
+ };
1036
+ };
1037
+ };
1038
+ /** @description Unauthorized */
1039
+ 401: {
1040
+ headers: {
1041
+ [name: string]: unknown;
1042
+ };
1043
+ content: {
1044
+ 'application/json': {
1045
+ error: {
1046
+ /** @enum {string} */
1047
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1048
+ /** @enum {string} */
1049
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1050
+ message: string;
1051
+ /** @enum {string} */
1052
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1053
+ exceptionId?: string;
1054
+ };
1055
+ };
1056
+ };
1057
+ };
1058
+ /** @description Forbidden */
1059
+ 403: {
1060
+ headers: {
1061
+ [name: string]: unknown;
1062
+ };
1063
+ content: {
1064
+ 'application/json': {
1065
+ error: {
1066
+ /** @enum {string} */
1067
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1068
+ /** @enum {string} */
1069
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1070
+ message: string;
1071
+ /** @enum {string} */
1072
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1073
+ exceptionId?: string;
1074
+ };
1075
+ };
1076
+ };
1077
+ };
1078
+ /** @description Chat not found */
1079
+ 404: {
1080
+ headers: {
1081
+ [name: string]: unknown;
1082
+ };
1083
+ content: {
1084
+ 'application/json': {
1085
+ error: {
1086
+ /** @enum {string} */
1087
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1088
+ /** @enum {string} */
1089
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1090
+ message: string;
1091
+ /** @enum {string} */
1092
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1093
+ exceptionId?: string;
1094
+ };
1095
+ };
1096
+ };
1097
+ };
1098
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
1099
+ 503: {
1100
+ headers: {
1101
+ [name: string]: unknown;
1102
+ };
1103
+ content: {
1104
+ 'application/json': {
1105
+ error: {
1106
+ /** @enum {string} */
1107
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1108
+ /** @enum {string} */
1109
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1110
+ message: string;
1111
+ /** @enum {string} */
1112
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1113
+ exceptionId?: string;
1114
+ };
1115
+ };
1116
+ };
1117
+ };
1118
+ };
1119
+ };
1120
+ put?: never;
1121
+ post?: never;
1122
+ delete?: never;
1123
+ options?: never;
1124
+ head?: never;
1125
+ /**
1126
+ * Vote on a message
1127
+ * @description Add or update a vote on a specific message
1128
+ */
1129
+ patch: {
1130
+ parameters: {
1131
+ query?: never;
1132
+ header?: never;
1133
+ path?: never;
1134
+ cookie?: never;
1135
+ };
1136
+ requestBody?: {
1137
+ content: {
1138
+ 'application/json': {
1139
+ /** Format: uuid */
1140
+ chatId: string;
1141
+ /** Format: uuid */
1142
+ messageId: string;
1143
+ /** @enum {string} */
1144
+ type: 'up' | 'down';
1145
+ };
1146
+ };
1147
+ };
1148
+ responses: {
1149
+ /** @description Vote recorded successfully */
1150
+ 200: {
1151
+ headers: {
1152
+ [name: string]: unknown;
1153
+ };
1154
+ content?: never;
1155
+ };
1156
+ /** @description Bad request */
1157
+ 400: {
1158
+ headers: {
1159
+ [name: string]: unknown;
1160
+ };
1161
+ content: {
1162
+ 'application/json': {
1163
+ error: {
1164
+ /** @enum {string} */
1165
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1166
+ /** @enum {string} */
1167
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1168
+ message: string;
1169
+ /** @enum {string} */
1170
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1171
+ exceptionId?: string;
1172
+ };
1173
+ };
1174
+ };
1175
+ };
1176
+ /** @description Unauthorized */
1177
+ 401: {
1178
+ headers: {
1179
+ [name: string]: unknown;
1180
+ };
1181
+ content: {
1182
+ 'application/json': {
1183
+ error: {
1184
+ /** @enum {string} */
1185
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1186
+ /** @enum {string} */
1187
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1188
+ message: string;
1189
+ /** @enum {string} */
1190
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1191
+ exceptionId?: string;
1192
+ };
1193
+ };
1194
+ };
1195
+ };
1196
+ /** @description Forbidden */
1197
+ 403: {
1198
+ headers: {
1199
+ [name: string]: unknown;
1200
+ };
1201
+ content: {
1202
+ 'application/json': {
1203
+ error: {
1204
+ /** @enum {string} */
1205
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1206
+ /** @enum {string} */
1207
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1208
+ message: string;
1209
+ /** @enum {string} */
1210
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1211
+ exceptionId?: string;
1212
+ };
1213
+ };
1214
+ };
1215
+ };
1216
+ /** @description Chat not found */
1217
+ 404: {
1218
+ headers: {
1219
+ [name: string]: unknown;
1220
+ };
1221
+ content: {
1222
+ 'application/json': {
1223
+ error: {
1224
+ /** @enum {string} */
1225
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1226
+ /** @enum {string} */
1227
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1228
+ message: string;
1229
+ /** @enum {string} */
1230
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1231
+ exceptionId?: string;
1232
+ };
1233
+ };
1234
+ };
1235
+ };
1236
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
1237
+ 503: {
1238
+ headers: {
1239
+ [name: string]: unknown;
1240
+ };
1241
+ content: {
1242
+ 'application/json': {
1243
+ error: {
1244
+ /** @enum {string} */
1245
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1246
+ /** @enum {string} */
1247
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1248
+ message: string;
1249
+ /** @enum {string} */
1250
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1251
+ exceptionId?: string;
1252
+ };
1253
+ };
1254
+ };
1255
+ };
1256
+ };
1257
+ };
1258
+ trace?: never;
1259
+ };
1260
+ '/api/chat/{id}/approval': {
1261
+ parameters: {
1262
+ query?: never;
1263
+ header?: never;
1264
+ path?: never;
1265
+ cookie?: never;
1266
+ };
1267
+ get?: never;
1268
+ put?: never;
1269
+ /**
1270
+ * Approve or deny a pending tool execution
1271
+ * @description Submit approval decision for a tool that requires human-in-the-loop confirmation
1272
+ */
1273
+ post: {
1274
+ parameters: {
1275
+ query?: never;
1276
+ header?: never;
1277
+ path: {
1278
+ id: string;
1279
+ };
1280
+ cookie?: never;
1281
+ };
1282
+ requestBody?: {
1283
+ content: {
1284
+ 'application/json': {
1285
+ toolUseId: string;
1286
+ approved: boolean;
1287
+ reason?: string;
1288
+ updatedInput?: {
1289
+ [key: string]: unknown;
1290
+ };
1291
+ answers?: {
1292
+ [key: string]: string;
1293
+ };
1294
+ };
1295
+ };
1296
+ };
1297
+ responses: {
1298
+ /** @description Approval processed */
1299
+ 200: {
1300
+ headers: {
1301
+ [name: string]: unknown;
1302
+ };
1303
+ content: {
1304
+ 'application/json': {
1305
+ success: boolean;
1306
+ toolUseId: string;
1307
+ approved: boolean;
1308
+ };
1309
+ };
1310
+ };
1311
+ /** @description Bad request */
1312
+ 400: {
1313
+ headers: {
1314
+ [name: string]: unknown;
1315
+ };
1316
+ content: {
1317
+ 'application/json': {
1318
+ error: {
1319
+ /** @enum {string} */
1320
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1321
+ /** @enum {string} */
1322
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1323
+ message: string;
1324
+ /** @enum {string} */
1325
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1326
+ exceptionId?: string;
1327
+ };
1328
+ };
1329
+ };
1330
+ };
1331
+ /** @description Unauthorized */
1332
+ 401: {
1333
+ headers: {
1334
+ [name: string]: unknown;
1335
+ };
1336
+ content: {
1337
+ 'application/json': {
1338
+ error: {
1339
+ /** @enum {string} */
1340
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1341
+ /** @enum {string} */
1342
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1343
+ message: string;
1344
+ /** @enum {string} */
1345
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1346
+ exceptionId?: string;
1347
+ };
1348
+ };
1349
+ };
1350
+ };
1351
+ /** @description Forbidden — approval belongs to different chat */
1352
+ 403: {
1353
+ headers: {
1354
+ [name: string]: unknown;
1355
+ };
1356
+ content: {
1357
+ 'application/json': {
1358
+ error: {
1359
+ /** @enum {string} */
1360
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1361
+ /** @enum {string} */
1362
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1363
+ message: string;
1364
+ /** @enum {string} */
1365
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1366
+ exceptionId?: string;
1367
+ };
1368
+ };
1369
+ };
1370
+ };
1371
+ /** @description No pending approval found */
1372
+ 404: {
1373
+ headers: {
1374
+ [name: string]: unknown;
1375
+ };
1376
+ content: {
1377
+ 'application/json': {
1378
+ error: {
1379
+ /** @enum {string} */
1380
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1381
+ /** @enum {string} */
1382
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1383
+ message: string;
1384
+ /** @enum {string} */
1385
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1386
+ exceptionId?: string;
1387
+ };
1388
+ };
1389
+ };
1390
+ };
1391
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
1392
+ 503: {
1393
+ headers: {
1394
+ [name: string]: unknown;
1395
+ };
1396
+ content: {
1397
+ 'application/json': {
1398
+ error: {
1399
+ /** @enum {string} */
1400
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1401
+ /** @enum {string} */
1402
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1403
+ message: string;
1404
+ /** @enum {string} */
1405
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1406
+ exceptionId?: string;
1407
+ };
1408
+ };
1409
+ };
1410
+ };
1411
+ };
1412
+ };
1413
+ delete?: never;
1414
+ options?: never;
1415
+ head?: never;
1416
+ patch?: never;
1417
+ trace?: never;
1418
+ };
1419
+ '/api/chat/{id}/ui-tool-result': {
1420
+ parameters: {
1421
+ query?: never;
1422
+ header?: never;
1423
+ path?: never;
1424
+ cookie?: never;
1425
+ };
1426
+ get?: never;
1427
+ put?: never;
1428
+ /**
1429
+ * Submit the result of a UI tool (e.g. SQL editor) invocation
1430
+ * @description The frontend executes ui_sql_editor_* tools in the browser and returns the result here. The backend writes the result into the sandbox so the sandbox MCP server unblocks and returns it to the agent.
1431
+ */
1432
+ post: {
1433
+ parameters: {
1434
+ query?: never;
1435
+ header?: never;
1436
+ path: {
1437
+ id: string;
1438
+ };
1439
+ cookie?: never;
1440
+ };
1441
+ requestBody?: {
1442
+ content: {
1443
+ 'application/json': {
1444
+ toolUseId: string;
1445
+ output?: string;
1446
+ errorText?: string;
1447
+ };
1448
+ };
1449
+ };
1450
+ responses: {
1451
+ /** @description Result accepted */
1452
+ 200: {
1453
+ headers: {
1454
+ [name: string]: unknown;
1455
+ };
1456
+ content: {
1457
+ 'application/json': {
1458
+ success: boolean;
1459
+ toolUseId: string;
1460
+ };
1461
+ };
1462
+ };
1463
+ /** @description Bad request */
1464
+ 400: {
1465
+ headers: {
1466
+ [name: string]: unknown;
1467
+ };
1468
+ content: {
1469
+ 'application/json': {
1470
+ error: {
1471
+ /** @enum {string} */
1472
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1473
+ /** @enum {string} */
1474
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1475
+ message: string;
1476
+ /** @enum {string} */
1477
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1478
+ exceptionId?: string;
1479
+ };
1480
+ };
1481
+ };
1482
+ };
1483
+ /** @description Unauthorized */
1484
+ 401: {
1485
+ headers: {
1486
+ [name: string]: unknown;
1487
+ };
1488
+ content: {
1489
+ 'application/json': {
1490
+ error: {
1491
+ /** @enum {string} */
1492
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1493
+ /** @enum {string} */
1494
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1495
+ message: string;
1496
+ /** @enum {string} */
1497
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1498
+ exceptionId?: string;
1499
+ };
1500
+ };
1501
+ };
1502
+ };
1503
+ /** @description Forbidden — request belongs to a different chat */
1504
+ 403: {
1505
+ headers: {
1506
+ [name: string]: unknown;
1507
+ };
1508
+ content: {
1509
+ 'application/json': {
1510
+ error: {
1511
+ /** @enum {string} */
1512
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1513
+ /** @enum {string} */
1514
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1515
+ message: string;
1516
+ /** @enum {string} */
1517
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1518
+ exceptionId?: string;
1519
+ };
1520
+ };
1521
+ };
1522
+ };
1523
+ /** @description No pending UI tool request found */
1524
+ 404: {
1525
+ headers: {
1526
+ [name: string]: unknown;
1527
+ };
1528
+ content: {
1529
+ 'application/json': {
1530
+ error: {
1531
+ /** @enum {string} */
1532
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1533
+ /** @enum {string} */
1534
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1535
+ message: string;
1536
+ /** @enum {string} */
1537
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1538
+ exceptionId?: string;
1539
+ };
1540
+ };
1541
+ };
1542
+ };
1543
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
1544
+ 503: {
1545
+ headers: {
1546
+ [name: string]: unknown;
1547
+ };
1548
+ content: {
1549
+ 'application/json': {
1550
+ error: {
1551
+ /** @enum {string} */
1552
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1553
+ /** @enum {string} */
1554
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1555
+ message: string;
1556
+ /** @enum {string} */
1557
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1558
+ exceptionId?: string;
1559
+ };
1560
+ };
1561
+ };
1562
+ };
1563
+ };
1564
+ };
1565
+ delete?: never;
1566
+ options?: never;
1567
+ head?: never;
1568
+ patch?: never;
1569
+ trace?: never;
1570
+ };
1571
+ '/api/chat/{id}/sandbox/files': {
1572
+ parameters: {
1573
+ query?: never;
1574
+ header?: never;
1575
+ path?: never;
1576
+ cookie?: never;
1577
+ };
1578
+ /**
1579
+ * List files in the data-app working directory of the chat sandbox
1580
+ * @description Returns a single-level directory listing rooted at the data-app dir, scoped to the calling user + project. Hidden dirs (.git, node_modules, etc.) are filtered out.
1581
+ */
1582
+ get: {
1583
+ parameters: {
1584
+ query?: {
1585
+ path?: string;
1586
+ };
1587
+ header?: never;
1588
+ path: {
1589
+ id: string;
1590
+ };
1591
+ cookie?: never;
1592
+ };
1593
+ requestBody?: never;
1594
+ responses: {
1595
+ /** @description Directory listing */
1596
+ 200: {
1597
+ headers: {
1598
+ [name: string]: unknown;
1599
+ };
1600
+ content: {
1601
+ 'application/json': {
1602
+ entries: {
1603
+ name: string;
1604
+ path: string;
1605
+ /** @enum {string} */
1606
+ type: 'file' | 'dir';
1607
+ size?: number;
1608
+ }[];
1609
+ };
1610
+ };
1611
+ };
1612
+ /** @description Bad request */
1613
+ 400: {
1614
+ headers: {
1615
+ [name: string]: unknown;
1616
+ };
1617
+ content: {
1618
+ 'application/json': {
1619
+ error: {
1620
+ /** @enum {string} */
1621
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1622
+ /** @enum {string} */
1623
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1624
+ message: string;
1625
+ /** @enum {string} */
1626
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1627
+ exceptionId?: string;
1628
+ };
1629
+ };
1630
+ };
1631
+ };
1632
+ /** @description Unauthorized */
1633
+ 401: {
1634
+ headers: {
1635
+ [name: string]: unknown;
1636
+ };
1637
+ content: {
1638
+ 'application/json': {
1639
+ error: {
1640
+ /** @enum {string} */
1641
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1642
+ /** @enum {string} */
1643
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1644
+ message: string;
1645
+ /** @enum {string} */
1646
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1647
+ exceptionId?: string;
1648
+ };
1649
+ };
1650
+ };
1651
+ };
1652
+ /** @description Chat or sandbox not found */
1653
+ 404: {
1654
+ headers: {
1655
+ [name: string]: unknown;
1656
+ };
1657
+ content: {
1658
+ 'application/json': {
1659
+ error: {
1660
+ /** @enum {string} */
1661
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1662
+ /** @enum {string} */
1663
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1664
+ message: string;
1665
+ /** @enum {string} */
1666
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1667
+ exceptionId?: string;
1668
+ };
1669
+ };
1670
+ };
1671
+ };
1672
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
1673
+ 503: {
1674
+ headers: {
1675
+ [name: string]: unknown;
1676
+ };
1677
+ content: {
1678
+ 'application/json': {
1679
+ error: {
1680
+ /** @enum {string} */
1681
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1682
+ /** @enum {string} */
1683
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1684
+ message: string;
1685
+ /** @enum {string} */
1686
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1687
+ exceptionId?: string;
1688
+ };
1689
+ };
1690
+ };
1691
+ };
1692
+ };
1693
+ };
1694
+ put?: never;
1695
+ post?: never;
1696
+ delete?: never;
1697
+ options?: never;
1698
+ head?: never;
1699
+ patch?: never;
1700
+ trace?: never;
1701
+ };
1702
+ '/api/chat/{id}/sandbox/file': {
1703
+ parameters: {
1704
+ query?: never;
1705
+ header?: never;
1706
+ path?: never;
1707
+ cookie?: never;
1708
+ };
1709
+ /**
1710
+ * Read a file from the chat sandbox data-app directory
1711
+ * @description Returns the text content of a file inside the data-app dir. Oversize files are truncated; binary files return an empty content string with encoding="binary".
1712
+ */
1713
+ get: {
1714
+ parameters: {
1715
+ query: {
1716
+ path: string;
1717
+ };
1718
+ header?: never;
1719
+ path: {
1720
+ id: string;
1721
+ };
1722
+ cookie?: never;
1723
+ };
1724
+ requestBody?: never;
1725
+ responses: {
1726
+ /** @description File content */
1727
+ 200: {
1728
+ headers: {
1729
+ [name: string]: unknown;
1730
+ };
1731
+ content: {
1732
+ 'application/json': {
1733
+ content: string;
1734
+ /** @enum {string} */
1735
+ encoding: 'utf-8' | 'binary';
1736
+ truncated: boolean;
1737
+ size: number;
1738
+ };
1739
+ };
1740
+ };
1741
+ /** @description Bad request */
1742
+ 400: {
1743
+ headers: {
1744
+ [name: string]: unknown;
1745
+ };
1746
+ content: {
1747
+ 'application/json': {
1748
+ error: {
1749
+ /** @enum {string} */
1750
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1751
+ /** @enum {string} */
1752
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1753
+ message: string;
1754
+ /** @enum {string} */
1755
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1756
+ exceptionId?: string;
1757
+ };
1758
+ };
1759
+ };
1760
+ };
1761
+ /** @description Unauthorized */
1762
+ 401: {
1763
+ headers: {
1764
+ [name: string]: unknown;
1765
+ };
1766
+ content: {
1767
+ 'application/json': {
1768
+ error: {
1769
+ /** @enum {string} */
1770
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1771
+ /** @enum {string} */
1772
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1773
+ message: string;
1774
+ /** @enum {string} */
1775
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1776
+ exceptionId?: string;
1777
+ };
1778
+ };
1779
+ };
1780
+ };
1781
+ /** @description Chat or sandbox not found */
1782
+ 404: {
1783
+ headers: {
1784
+ [name: string]: unknown;
1785
+ };
1786
+ content: {
1787
+ 'application/json': {
1788
+ error: {
1789
+ /** @enum {string} */
1790
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1791
+ /** @enum {string} */
1792
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1793
+ message: string;
1794
+ /** @enum {string} */
1795
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1796
+ exceptionId?: string;
1797
+ };
1798
+ };
1799
+ };
1800
+ };
1801
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
1802
+ 503: {
1803
+ headers: {
1804
+ [name: string]: unknown;
1805
+ };
1806
+ content: {
1807
+ 'application/json': {
1808
+ error: {
1809
+ /** @enum {string} */
1810
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1811
+ /** @enum {string} */
1812
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1813
+ message: string;
1814
+ /** @enum {string} */
1815
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1816
+ exceptionId?: string;
1817
+ };
1818
+ };
1819
+ };
1820
+ };
1821
+ };
1822
+ };
1823
+ put?: never;
1824
+ post?: never;
1825
+ delete?: never;
1826
+ options?: never;
1827
+ head?: never;
1828
+ patch?: never;
1829
+ trace?: never;
1830
+ };
1831
+ '/api/chat/{id}/sandbox/file/download': {
1832
+ parameters: {
1833
+ query?: never;
1834
+ header?: never;
1835
+ path?: never;
1836
+ cookie?: never;
1837
+ };
1838
+ /**
1839
+ * Download a file from the chat sandbox data-app directory as raw bytes
1840
+ * @description Returns the raw bytes of a file inside the data-app dir — the binary counterpart of `/sandbox/file`, for deliverables the agent rendered (a `.docx`, a `.pptx`) that the text preview cannot carry. The first binary response in this API: always served as `application/octet-stream` with `Content-Disposition: attachment` and `nosniff`, never with a sniffable type. Same path policy as the preview, plus download-only tightenings: `.env*` files are refused, and files over the size ceiling are refused (413) rather than truncated.
1841
+ */
1842
+ get: {
1843
+ parameters: {
1844
+ query: {
1845
+ path: string;
1846
+ };
1847
+ header?: never;
1848
+ path: {
1849
+ id: string;
1850
+ };
1851
+ cookie?: never;
1852
+ };
1853
+ requestBody?: never;
1854
+ responses: {
1855
+ /** @description Raw file bytes */
1856
+ 200: {
1857
+ headers: {
1858
+ [name: string]: unknown;
1859
+ };
1860
+ content: {
1861
+ 'application/octet-stream': string;
1862
+ };
1863
+ };
1864
+ /** @description Bad request */
1865
+ 400: {
1866
+ headers: {
1867
+ [name: string]: unknown;
1868
+ };
1869
+ content: {
1870
+ 'application/json': {
1871
+ error: {
1872
+ /** @enum {string} */
1873
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1874
+ /** @enum {string} */
1875
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1876
+ message: string;
1877
+ /** @enum {string} */
1878
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1879
+ exceptionId?: string;
1880
+ };
1881
+ };
1882
+ };
1883
+ };
1884
+ /** @description Unauthorized */
1885
+ 401: {
1886
+ headers: {
1887
+ [name: string]: unknown;
1888
+ };
1889
+ content: {
1890
+ 'application/json': {
1891
+ error: {
1892
+ /** @enum {string} */
1893
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1894
+ /** @enum {string} */
1895
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1896
+ message: string;
1897
+ /** @enum {string} */
1898
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1899
+ exceptionId?: string;
1900
+ };
1901
+ };
1902
+ };
1903
+ };
1904
+ /** @description Chat or sandbox not found */
1905
+ 404: {
1906
+ headers: {
1907
+ [name: string]: unknown;
1908
+ };
1909
+ content: {
1910
+ 'application/json': {
1911
+ error: {
1912
+ /** @enum {string} */
1913
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1914
+ /** @enum {string} */
1915
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1916
+ message: string;
1917
+ /** @enum {string} */
1918
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1919
+ exceptionId?: string;
1920
+ };
1921
+ };
1922
+ };
1923
+ };
1924
+ /** @description File exceeds the download size ceiling */
1925
+ 413: {
1926
+ headers: {
1927
+ [name: string]: unknown;
1928
+ };
1929
+ content: {
1930
+ 'application/json': {
1931
+ error: {
1932
+ /** @enum {string} */
1933
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1934
+ /** @enum {string} */
1935
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1936
+ message: string;
1937
+ /** @enum {string} */
1938
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1939
+ exceptionId?: string;
1940
+ };
1941
+ };
1942
+ };
1943
+ };
1944
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
1945
+ 503: {
1946
+ headers: {
1947
+ [name: string]: unknown;
1948
+ };
1949
+ content: {
1950
+ 'application/json': {
1951
+ error: {
1952
+ /** @enum {string} */
1953
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
1954
+ /** @enum {string} */
1955
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
1956
+ message: string;
1957
+ /** @enum {string} */
1958
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
1959
+ exceptionId?: string;
1960
+ };
1961
+ };
1962
+ };
1963
+ };
1964
+ };
1965
+ };
1966
+ put?: never;
1967
+ post?: never;
1968
+ delete?: never;
1969
+ options?: never;
1970
+ head?: never;
1971
+ patch?: never;
1972
+ trace?: never;
1973
+ };
1974
+ '/api/chat/{id}/sandbox/git-branch': {
1975
+ parameters: {
1976
+ query?: never;
1977
+ header?: never;
1978
+ path?: never;
1979
+ cookie?: never;
1980
+ };
1981
+ /**
1982
+ * Get the current git branch of the chat sandbox data-app directory
1983
+ * @description Runs `git rev-parse --abbrev-ref HEAD` inside the data-app dir. Returns `branch: null` when the directory has no git repo or the sandbox is unreachable.
1984
+ */
1985
+ get: {
1986
+ parameters: {
1987
+ query?: never;
1988
+ header?: never;
1989
+ path: {
1990
+ id: string;
1991
+ };
1992
+ cookie?: never;
1993
+ };
1994
+ requestBody?: never;
1995
+ responses: {
1996
+ /** @description Current branch (or null) */
1997
+ 200: {
1998
+ headers: {
1999
+ [name: string]: unknown;
2000
+ };
2001
+ content: {
2002
+ 'application/json': {
2003
+ branch: string | null;
2004
+ };
2005
+ };
2006
+ };
2007
+ /** @description Bad request */
2008
+ 400: {
2009
+ headers: {
2010
+ [name: string]: unknown;
2011
+ };
2012
+ content: {
2013
+ 'application/json': {
2014
+ error: {
2015
+ /** @enum {string} */
2016
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2017
+ /** @enum {string} */
2018
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2019
+ message: string;
2020
+ /** @enum {string} */
2021
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2022
+ exceptionId?: string;
2023
+ };
2024
+ };
2025
+ };
2026
+ };
2027
+ /** @description Unauthorized */
2028
+ 401: {
2029
+ headers: {
2030
+ [name: string]: unknown;
2031
+ };
2032
+ content: {
2033
+ 'application/json': {
2034
+ error: {
2035
+ /** @enum {string} */
2036
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2037
+ /** @enum {string} */
2038
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2039
+ message: string;
2040
+ /** @enum {string} */
2041
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2042
+ exceptionId?: string;
2043
+ };
2044
+ };
2045
+ };
2046
+ };
2047
+ /** @description Chat or sandbox not found */
2048
+ 404: {
2049
+ headers: {
2050
+ [name: string]: unknown;
2051
+ };
2052
+ content: {
2053
+ 'application/json': {
2054
+ error: {
2055
+ /** @enum {string} */
2056
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2057
+ /** @enum {string} */
2058
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2059
+ message: string;
2060
+ /** @enum {string} */
2061
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2062
+ exceptionId?: string;
2063
+ };
2064
+ };
2065
+ };
2066
+ };
2067
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
2068
+ 503: {
2069
+ headers: {
2070
+ [name: string]: unknown;
2071
+ };
2072
+ content: {
2073
+ 'application/json': {
2074
+ error: {
2075
+ /** @enum {string} */
2076
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2077
+ /** @enum {string} */
2078
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2079
+ message: string;
2080
+ /** @enum {string} */
2081
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2082
+ exceptionId?: string;
2083
+ };
2084
+ };
2085
+ };
2086
+ };
2087
+ };
2088
+ };
2089
+ put?: never;
2090
+ post?: never;
2091
+ delete?: never;
2092
+ options?: never;
2093
+ head?: never;
2094
+ patch?: never;
2095
+ trace?: never;
2096
+ };
2097
+ '/api/usage': {
2098
+ parameters: {
2099
+ query?: never;
2100
+ header?: never;
2101
+ path?: never;
2102
+ cookie?: never;
2103
+ };
2104
+ /**
2105
+ * Get rate limit usage information
2106
+ * @description Returns the current rate limit usage for the authenticated user in the current project.
2107
+ */
2108
+ get: {
2109
+ parameters: {
2110
+ query?: never;
2111
+ header?: never;
2112
+ path?: never;
2113
+ cookie?: never;
2114
+ };
2115
+ requestBody?: never;
2116
+ responses: {
2117
+ /** @description Rate limit usage information */
2118
+ 200: {
2119
+ headers: {
2120
+ [name: string]: unknown;
2121
+ };
2122
+ content: {
2123
+ 'application/json': {
2124
+ messagesUsed: number;
2125
+ messagesLimit: number | null;
2126
+ ppuUsed: number;
2127
+ ppuLimit: number | null;
2128
+ /** @enum {string|null} */
2129
+ ppuLimitScope: 'user' | 'project' | null;
2130
+ projectPpuPercentage: number | null;
2131
+ /** Format: date-time */
2132
+ resetDate: string;
2133
+ };
2134
+ };
2135
+ };
2136
+ /** @description Unauthorized */
2137
+ 401: {
2138
+ headers: {
2139
+ [name: string]: unknown;
2140
+ };
2141
+ content: {
2142
+ 'application/json': {
2143
+ error: {
2144
+ /** @enum {string} */
2145
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2146
+ /** @enum {string} */
2147
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2148
+ message: string;
2149
+ /** @enum {string} */
2150
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2151
+ exceptionId?: string;
2152
+ };
2153
+ };
2154
+ };
2155
+ };
2156
+ /** @description Internal server error */
2157
+ 500: {
2158
+ headers: {
2159
+ [name: string]: unknown;
2160
+ };
2161
+ content: {
2162
+ 'application/json': {
2163
+ error: {
2164
+ /** @enum {string} */
2165
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2166
+ /** @enum {string} */
2167
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2168
+ message: string;
2169
+ /** @enum {string} */
2170
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2171
+ exceptionId?: string;
2172
+ };
2173
+ };
2174
+ };
2175
+ };
2176
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
2177
+ 503: {
2178
+ headers: {
2179
+ [name: string]: unknown;
2180
+ };
2181
+ content: {
2182
+ 'application/json': {
2183
+ error: {
2184
+ /** @enum {string} */
2185
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2186
+ /** @enum {string} */
2187
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2188
+ message: string;
2189
+ /** @enum {string} */
2190
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2191
+ exceptionId?: string;
2192
+ };
2193
+ };
2194
+ };
2195
+ };
2196
+ };
2197
+ };
2198
+ put?: never;
2199
+ post?: never;
2200
+ delete?: never;
2201
+ options?: never;
2202
+ head?: never;
2203
+ patch?: never;
2204
+ trace?: never;
2205
+ };
2206
+ '/api/settings': {
2207
+ parameters: {
2208
+ query?: never;
2209
+ header?: never;
2210
+ path?: never;
2211
+ cookie?: never;
2212
+ };
2213
+ /**
2214
+ * Get project settings
2215
+ * @description Retrieve project-level custom instructions
2216
+ */
2217
+ get: {
2218
+ parameters: {
2219
+ query?: never;
2220
+ header?: never;
2221
+ path?: never;
2222
+ cookie?: never;
2223
+ };
2224
+ requestBody?: never;
2225
+ responses: {
2226
+ /** @description Project settings */
2227
+ 200: {
2228
+ headers: {
2229
+ [name: string]: unknown;
2230
+ };
2231
+ content: {
2232
+ 'application/json': {
2233
+ projectId: string;
2234
+ customInstructions: string | null;
2235
+ createdAt: string;
2236
+ updatedAt: string;
2237
+ };
2238
+ };
2239
+ };
2240
+ /** @description Unauthorized */
2241
+ 401: {
2242
+ headers: {
2243
+ [name: string]: unknown;
2244
+ };
2245
+ content: {
2246
+ 'application/json': {
2247
+ error: {
2248
+ /** @enum {string} */
2249
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2250
+ /** @enum {string} */
2251
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2252
+ message: string;
2253
+ /** @enum {string} */
2254
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2255
+ exceptionId?: string;
2256
+ };
2257
+ };
2258
+ };
2259
+ };
2260
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
2261
+ 503: {
2262
+ headers: {
2263
+ [name: string]: unknown;
2264
+ };
2265
+ content: {
2266
+ 'application/json': {
2267
+ error: {
2268
+ /** @enum {string} */
2269
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2270
+ /** @enum {string} */
2271
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2272
+ message: string;
2273
+ /** @enum {string} */
2274
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2275
+ exceptionId?: string;
2276
+ };
2277
+ };
2278
+ };
2279
+ };
2280
+ };
2281
+ };
2282
+ put?: never;
2283
+ post?: never;
2284
+ delete?: never;
2285
+ options?: never;
2286
+ head?: never;
2287
+ /**
2288
+ * Update project settings
2289
+ * @description Update project-level custom instructions
2290
+ */
2291
+ patch: {
2292
+ parameters: {
2293
+ query?: never;
2294
+ header?: never;
2295
+ path?: never;
2296
+ cookie?: never;
2297
+ };
2298
+ requestBody?: {
2299
+ content: {
2300
+ 'application/json': {
2301
+ customInstructions?: string | null;
2302
+ };
2303
+ };
2304
+ };
2305
+ responses: {
2306
+ /** @description Updated project settings */
2307
+ 200: {
2308
+ headers: {
2309
+ [name: string]: unknown;
2310
+ };
2311
+ content: {
2312
+ 'application/json': {
2313
+ projectId: string;
2314
+ customInstructions: string | null;
2315
+ createdAt: string;
2316
+ updatedAt: string;
2317
+ };
2318
+ };
2319
+ };
2320
+ /** @description Bad request */
2321
+ 400: {
2322
+ headers: {
2323
+ [name: string]: unknown;
2324
+ };
2325
+ content: {
2326
+ 'application/json': {
2327
+ error: {
2328
+ /** @enum {string} */
2329
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2330
+ /** @enum {string} */
2331
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2332
+ message: string;
2333
+ /** @enum {string} */
2334
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2335
+ exceptionId?: string;
2336
+ };
2337
+ };
2338
+ };
2339
+ };
2340
+ /** @description Unauthorized */
2341
+ 401: {
2342
+ headers: {
2343
+ [name: string]: unknown;
2344
+ };
2345
+ content: {
2346
+ 'application/json': {
2347
+ error: {
2348
+ /** @enum {string} */
2349
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2350
+ /** @enum {string} */
2351
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2352
+ message: string;
2353
+ /** @enum {string} */
2354
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2355
+ exceptionId?: string;
2356
+ };
2357
+ };
2358
+ };
2359
+ };
2360
+ /** @description Forbidden — the caller's project role cannot write project-wide Kai settings */
2361
+ 403: {
2362
+ headers: {
2363
+ [name: string]: unknown;
2364
+ };
2365
+ content: {
2366
+ 'application/json': {
2367
+ error: {
2368
+ /** @enum {string} */
2369
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2370
+ /** @enum {string} */
2371
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2372
+ message: string;
2373
+ /** @enum {string} */
2374
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2375
+ exceptionId?: string;
2376
+ };
2377
+ };
2378
+ };
2379
+ };
2380
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
2381
+ 503: {
2382
+ headers: {
2383
+ [name: string]: unknown;
2384
+ };
2385
+ content: {
2386
+ 'application/json': {
2387
+ error: {
2388
+ /** @enum {string} */
2389
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2390
+ /** @enum {string} */
2391
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2392
+ message: string;
2393
+ /** @enum {string} */
2394
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2395
+ exceptionId?: string;
2396
+ };
2397
+ };
2398
+ };
2399
+ };
2400
+ };
2401
+ };
2402
+ trace?: never;
2403
+ };
2404
+ '/api/settings/user': {
2405
+ parameters: {
2406
+ query?: never;
2407
+ header?: never;
2408
+ path?: never;
2409
+ cookie?: never;
2410
+ };
2411
+ /**
2412
+ * Get user settings
2413
+ * @description Retrieve user-level custom instructions and tool permissions
2414
+ */
2415
+ get: {
2416
+ parameters: {
2417
+ query?: never;
2418
+ header?: never;
2419
+ path?: never;
2420
+ cookie?: never;
2421
+ };
2422
+ requestBody?: never;
2423
+ responses: {
2424
+ /** @description User settings */
2425
+ 200: {
2426
+ headers: {
2427
+ [name: string]: unknown;
2428
+ };
2429
+ content: {
2430
+ 'application/json': {
2431
+ projectId: string;
2432
+ userId: string;
2433
+ customInstructions: string | null;
2434
+ toolPermissions: {
2435
+ [key: string]: 'always_allow' | 'always_ask' | 'blocked';
2436
+ } | null;
2437
+ createdAt: string;
2438
+ updatedAt: string;
2439
+ };
2440
+ };
2441
+ };
2442
+ /** @description Unauthorized */
2443
+ 401: {
2444
+ headers: {
2445
+ [name: string]: unknown;
2446
+ };
2447
+ content: {
2448
+ 'application/json': {
2449
+ error: {
2450
+ /** @enum {string} */
2451
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2452
+ /** @enum {string} */
2453
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2454
+ message: string;
2455
+ /** @enum {string} */
2456
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2457
+ exceptionId?: string;
2458
+ };
2459
+ };
2460
+ };
2461
+ };
2462
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
2463
+ 503: {
2464
+ headers: {
2465
+ [name: string]: unknown;
2466
+ };
2467
+ content: {
2468
+ 'application/json': {
2469
+ error: {
2470
+ /** @enum {string} */
2471
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2472
+ /** @enum {string} */
2473
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2474
+ message: string;
2475
+ /** @enum {string} */
2476
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2477
+ exceptionId?: string;
2478
+ };
2479
+ };
2480
+ };
2481
+ };
2482
+ };
2483
+ };
2484
+ put?: never;
2485
+ post?: never;
2486
+ delete?: never;
2487
+ options?: never;
2488
+ head?: never;
2489
+ /**
2490
+ * Update user settings
2491
+ * @description Update user-level custom instructions and/or tool permissions. Tool permissions are merged with existing values.
2492
+ */
2493
+ patch: {
2494
+ parameters: {
2495
+ query?: never;
2496
+ header?: never;
2497
+ path?: never;
2498
+ cookie?: never;
2499
+ };
2500
+ requestBody?: {
2501
+ content: {
2502
+ 'application/json': {
2503
+ customInstructions?: string | null;
2504
+ toolPermissions?: {
2505
+ [key: string]: 'always_allow' | 'always_ask' | 'blocked';
2506
+ } | null;
2507
+ };
2508
+ };
2509
+ };
2510
+ responses: {
2511
+ /** @description Updated user settings */
2512
+ 200: {
2513
+ headers: {
2514
+ [name: string]: unknown;
2515
+ };
2516
+ content: {
2517
+ 'application/json': {
2518
+ projectId: string;
2519
+ userId: string;
2520
+ customInstructions: string | null;
2521
+ toolPermissions: {
2522
+ [key: string]: 'always_allow' | 'always_ask' | 'blocked';
2523
+ } | null;
2524
+ createdAt: string;
2525
+ updatedAt: string;
2526
+ };
2527
+ };
2528
+ };
2529
+ /** @description Bad request */
2530
+ 400: {
2531
+ headers: {
2532
+ [name: string]: unknown;
2533
+ };
2534
+ content: {
2535
+ 'application/json': {
2536
+ error: {
2537
+ /** @enum {string} */
2538
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2539
+ /** @enum {string} */
2540
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2541
+ message: string;
2542
+ /** @enum {string} */
2543
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2544
+ exceptionId?: string;
2545
+ };
2546
+ };
2547
+ };
2548
+ };
2549
+ /** @description Unauthorized */
2550
+ 401: {
2551
+ headers: {
2552
+ [name: string]: unknown;
2553
+ };
2554
+ content: {
2555
+ 'application/json': {
2556
+ error: {
2557
+ /** @enum {string} */
2558
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2559
+ /** @enum {string} */
2560
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2561
+ message: string;
2562
+ /** @enum {string} */
2563
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2564
+ exceptionId?: string;
2565
+ };
2566
+ };
2567
+ };
2568
+ };
2569
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
2570
+ 503: {
2571
+ headers: {
2572
+ [name: string]: unknown;
2573
+ };
2574
+ content: {
2575
+ 'application/json': {
2576
+ error: {
2577
+ /** @enum {string} */
2578
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2579
+ /** @enum {string} */
2580
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2581
+ message: string;
2582
+ /** @enum {string} */
2583
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2584
+ exceptionId?: string;
2585
+ };
2586
+ };
2587
+ };
2588
+ };
2589
+ };
2590
+ };
2591
+ trace?: never;
2592
+ };
2593
+ '/api/settings/spend-caps': {
2594
+ parameters: {
2595
+ query?: never;
2596
+ header?: never;
2597
+ path?: never;
2598
+ cookie?: never;
2599
+ };
2600
+ /**
2601
+ * Get Kai spend caps
2602
+ * @description Retrieve the project cap, default per-user limit, and per-user overrides/usage. Readable by any project admin/share role; only an organization admin may write. `members[]` carries every member for an organization admin (`canWrite: true`); a non-org-admin caller sees only their own row, never another member's override/usage.
2603
+ */
2604
+ get: {
2605
+ parameters: {
2606
+ query?: never;
2607
+ header?: never;
2608
+ path?: never;
2609
+ cookie?: never;
2610
+ };
2611
+ requestBody?: never;
2612
+ responses: {
2613
+ /** @description Spend caps view */
2614
+ 200: {
2615
+ headers: {
2616
+ [name: string]: unknown;
2617
+ };
2618
+ content: {
2619
+ 'application/json': {
2620
+ projectCapPpu: number | null;
2621
+ effectiveProjectCapPpu: number;
2622
+ defaultUserLimitPpu: number | null;
2623
+ projectUsedPpu: number;
2624
+ canWrite: boolean;
2625
+ members: {
2626
+ userId: string;
2627
+ overrideLimitPpu: number | null;
2628
+ effectiveLimitPpu: number | null;
2629
+ usedPpu: number;
2630
+ /** Format: date-time */
2631
+ overrideUpdatedAt: string | null;
2632
+ overrideUpdatedByUserId: string | null;
2633
+ }[];
2634
+ /** Format: date-time */
2635
+ updatedAt: string | null;
2636
+ updatedByUserId: string | null;
2637
+ };
2638
+ };
2639
+ };
2640
+ /** @description Unauthorized */
2641
+ 401: {
2642
+ headers: {
2643
+ [name: string]: unknown;
2644
+ };
2645
+ content: {
2646
+ 'application/json': {
2647
+ error: {
2648
+ /** @enum {string} */
2649
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2650
+ /** @enum {string} */
2651
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2652
+ message: string;
2653
+ /** @enum {string} */
2654
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2655
+ exceptionId?: string;
2656
+ };
2657
+ };
2658
+ };
2659
+ };
2660
+ /** @description Forbidden — the caller's project role cannot read Kai spend caps */
2661
+ 403: {
2662
+ headers: {
2663
+ [name: string]: unknown;
2664
+ };
2665
+ content: {
2666
+ 'application/json': {
2667
+ error: {
2668
+ /** @enum {string} */
2669
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2670
+ /** @enum {string} */
2671
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2672
+ message: string;
2673
+ /** @enum {string} */
2674
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2675
+ exceptionId?: string;
2676
+ };
2677
+ };
2678
+ };
2679
+ };
2680
+ /** @description Not found — Kai spend caps do not apply to this project (e.g. it is PAYG) */
2681
+ 404: {
2682
+ headers: {
2683
+ [name: string]: unknown;
2684
+ };
2685
+ content: {
2686
+ 'application/json': {
2687
+ error: {
2688
+ /** @enum {string} */
2689
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2690
+ /** @enum {string} */
2691
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2692
+ message: string;
2693
+ /** @enum {string} */
2694
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2695
+ exceptionId?: string;
2696
+ };
2697
+ };
2698
+ };
2699
+ };
2700
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
2701
+ 503: {
2702
+ headers: {
2703
+ [name: string]: unknown;
2704
+ };
2705
+ content: {
2706
+ 'application/json': {
2707
+ error: {
2708
+ /** @enum {string} */
2709
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2710
+ /** @enum {string} */
2711
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2712
+ message: string;
2713
+ /** @enum {string} */
2714
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2715
+ exceptionId?: string;
2716
+ };
2717
+ };
2718
+ };
2719
+ };
2720
+ };
2721
+ };
2722
+ put?: never;
2723
+ post?: never;
2724
+ delete?: never;
2725
+ options?: never;
2726
+ head?: never;
2727
+ /**
2728
+ * Update the project cap and/or default per-user limit
2729
+ * @description Organization-admin only. Rejects a value that would make an existing configuration unreachable.
2730
+ */
2731
+ patch: {
2732
+ parameters: {
2733
+ query?: never;
2734
+ header?: never;
2735
+ path?: never;
2736
+ cookie?: never;
2737
+ };
2738
+ requestBody?: {
2739
+ content: {
2740
+ 'application/json': {
2741
+ projectCapPpu?: number | null;
2742
+ defaultUserLimitPpu?: number | null;
2743
+ };
2744
+ };
2745
+ };
2746
+ responses: {
2747
+ /** @description Updated spend caps view */
2748
+ 200: {
2749
+ headers: {
2750
+ [name: string]: unknown;
2751
+ };
2752
+ content: {
2753
+ 'application/json': {
2754
+ projectCapPpu: number | null;
2755
+ effectiveProjectCapPpu: number;
2756
+ defaultUserLimitPpu: number | null;
2757
+ projectUsedPpu: number;
2758
+ canWrite: boolean;
2759
+ members: {
2760
+ userId: string;
2761
+ overrideLimitPpu: number | null;
2762
+ effectiveLimitPpu: number | null;
2763
+ usedPpu: number;
2764
+ /** Format: date-time */
2765
+ overrideUpdatedAt: string | null;
2766
+ overrideUpdatedByUserId: string | null;
2767
+ }[];
2768
+ /** Format: date-time */
2769
+ updatedAt: string | null;
2770
+ updatedByUserId: string | null;
2771
+ };
2772
+ };
2773
+ };
2774
+ /** @description Bad request — the new cap/default is unreachable */
2775
+ 400: {
2776
+ headers: {
2777
+ [name: string]: unknown;
2778
+ };
2779
+ content: {
2780
+ 'application/json': {
2781
+ error: {
2782
+ /** @enum {string} */
2783
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2784
+ /** @enum {string} */
2785
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2786
+ message: string;
2787
+ /** @enum {string} */
2788
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2789
+ exceptionId?: string;
2790
+ };
2791
+ };
2792
+ };
2793
+ };
2794
+ /** @description Unauthorized */
2795
+ 401: {
2796
+ headers: {
2797
+ [name: string]: unknown;
2798
+ };
2799
+ content: {
2800
+ 'application/json': {
2801
+ error: {
2802
+ /** @enum {string} */
2803
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2804
+ /** @enum {string} */
2805
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2806
+ message: string;
2807
+ /** @enum {string} */
2808
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2809
+ exceptionId?: string;
2810
+ };
2811
+ };
2812
+ };
2813
+ };
2814
+ /** @description Forbidden — only an organization admin may change Kai spend caps */
2815
+ 403: {
2816
+ headers: {
2817
+ [name: string]: unknown;
2818
+ };
2819
+ content: {
2820
+ 'application/json': {
2821
+ error: {
2822
+ /** @enum {string} */
2823
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2824
+ /** @enum {string} */
2825
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2826
+ message: string;
2827
+ /** @enum {string} */
2828
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2829
+ exceptionId?: string;
2830
+ };
2831
+ };
2832
+ };
2833
+ };
2834
+ /** @description Not found — Kai spend caps do not apply to this project (e.g. it is PAYG) */
2835
+ 404: {
2836
+ headers: {
2837
+ [name: string]: unknown;
2838
+ };
2839
+ content: {
2840
+ 'application/json': {
2841
+ error: {
2842
+ /** @enum {string} */
2843
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2844
+ /** @enum {string} */
2845
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2846
+ message: string;
2847
+ /** @enum {string} */
2848
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2849
+ exceptionId?: string;
2850
+ };
2851
+ };
2852
+ };
2853
+ };
2854
+ /** @description Conflict — the new project cap would make an existing per-user override unreachable */
2855
+ 409: {
2856
+ headers: {
2857
+ [name: string]: unknown;
2858
+ };
2859
+ content: {
2860
+ 'application/json': {
2861
+ error: {
2862
+ /** @enum {string} */
2863
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2864
+ /** @enum {string} */
2865
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2866
+ message: string;
2867
+ /** @enum {string} */
2868
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2869
+ exceptionId?: string;
2870
+ };
2871
+ };
2872
+ };
2873
+ };
2874
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
2875
+ 503: {
2876
+ headers: {
2877
+ [name: string]: unknown;
2878
+ };
2879
+ content: {
2880
+ 'application/json': {
2881
+ error: {
2882
+ /** @enum {string} */
2883
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2884
+ /** @enum {string} */
2885
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2886
+ message: string;
2887
+ /** @enum {string} */
2888
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2889
+ exceptionId?: string;
2890
+ };
2891
+ };
2892
+ };
2893
+ };
2894
+ };
2895
+ };
2896
+ trace?: never;
2897
+ };
2898
+ '/api/settings/spend-caps/users/{userId}': {
2899
+ parameters: {
2900
+ query?: never;
2901
+ header?: never;
2902
+ path?: never;
2903
+ cookie?: never;
2904
+ };
2905
+ get?: never;
2906
+ /**
2907
+ * Set or clear one member's spend-cap override
2908
+ * @description Organization-admin only. `overrideLimitPpu: null` clears the override (inherit the project default); `0` is a real value ("no Kai access").
2909
+ */
2910
+ put: {
2911
+ parameters: {
2912
+ query?: never;
2913
+ header?: never;
2914
+ path: {
2915
+ userId: string;
2916
+ };
2917
+ cookie?: never;
2918
+ };
2919
+ requestBody?: {
2920
+ content: {
2921
+ 'application/json': {
2922
+ overrideLimitPpu: number | null;
2923
+ };
2924
+ };
2925
+ };
2926
+ responses: {
2927
+ /** @description Updated member row */
2928
+ 200: {
2929
+ headers: {
2930
+ [name: string]: unknown;
2931
+ };
2932
+ content: {
2933
+ 'application/json': {
2934
+ userId: string;
2935
+ overrideLimitPpu: number | null;
2936
+ effectiveLimitPpu: number | null;
2937
+ usedPpu: number;
2938
+ /** Format: date-time */
2939
+ overrideUpdatedAt: string | null;
2940
+ overrideUpdatedByUserId: string | null;
2941
+ };
2942
+ };
2943
+ };
2944
+ /** @description Bad request — the new override is unreachable */
2945
+ 400: {
2946
+ headers: {
2947
+ [name: string]: unknown;
2948
+ };
2949
+ content: {
2950
+ 'application/json': {
2951
+ error: {
2952
+ /** @enum {string} */
2953
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2954
+ /** @enum {string} */
2955
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2956
+ message: string;
2957
+ /** @enum {string} */
2958
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2959
+ exceptionId?: string;
2960
+ };
2961
+ };
2962
+ };
2963
+ };
2964
+ /** @description Unauthorized */
2965
+ 401: {
2966
+ headers: {
2967
+ [name: string]: unknown;
2968
+ };
2969
+ content: {
2970
+ 'application/json': {
2971
+ error: {
2972
+ /** @enum {string} */
2973
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2974
+ /** @enum {string} */
2975
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2976
+ message: string;
2977
+ /** @enum {string} */
2978
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2979
+ exceptionId?: string;
2980
+ };
2981
+ };
2982
+ };
2983
+ };
2984
+ /** @description Forbidden — only an organization admin may change Kai spend caps */
2985
+ 403: {
2986
+ headers: {
2987
+ [name: string]: unknown;
2988
+ };
2989
+ content: {
2990
+ 'application/json': {
2991
+ error: {
2992
+ /** @enum {string} */
2993
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
2994
+ /** @enum {string} */
2995
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
2996
+ message: string;
2997
+ /** @enum {string} */
2998
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
2999
+ exceptionId?: string;
3000
+ };
3001
+ };
3002
+ };
3003
+ };
3004
+ /** @description Not found — Kai spend caps do not apply to this project (e.g. it is PAYG) */
3005
+ 404: {
3006
+ headers: {
3007
+ [name: string]: unknown;
3008
+ };
3009
+ content: {
3010
+ 'application/json': {
3011
+ error: {
3012
+ /** @enum {string} */
3013
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
3014
+ /** @enum {string} */
3015
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
3016
+ message: string;
3017
+ /** @enum {string} */
3018
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
3019
+ exceptionId?: string;
3020
+ };
3021
+ };
3022
+ };
3023
+ };
3024
+ /** @description Conflict — too many per-user overrides already exist on this project */
3025
+ 409: {
3026
+ headers: {
3027
+ [name: string]: unknown;
3028
+ };
3029
+ content: {
3030
+ 'application/json': {
3031
+ error: {
3032
+ /** @enum {string} */
3033
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
3034
+ /** @enum {string} */
3035
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
3036
+ message: string;
3037
+ /** @enum {string} */
3038
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
3039
+ exceptionId?: string;
3040
+ };
3041
+ };
3042
+ };
3043
+ };
3044
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
3045
+ 503: {
3046
+ headers: {
3047
+ [name: string]: unknown;
3048
+ };
3049
+ content: {
3050
+ 'application/json': {
3051
+ error: {
3052
+ /** @enum {string} */
3053
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
3054
+ /** @enum {string} */
3055
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
3056
+ message: string;
3057
+ /** @enum {string} */
3058
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
3059
+ exceptionId?: string;
3060
+ };
3061
+ };
3062
+ };
3063
+ };
3064
+ };
3065
+ };
3066
+ post?: never;
3067
+ delete?: never;
3068
+ options?: never;
3069
+ head?: never;
3070
+ patch?: never;
3071
+ trace?: never;
3072
+ };
3073
+ '/api/suggestions': {
3074
+ parameters: {
3075
+ query?: never;
3076
+ header?: never;
3077
+ path?: never;
3078
+ cookie?: never;
3079
+ };
3080
+ get?: never;
3081
+ put?: never;
3082
+ /**
3083
+ * Generate contextual suggestions
3084
+ * @description Generate AI-powered contextual suggestions for dashboard, job-detail, or configuration-detail contexts
3085
+ */
3086
+ post: {
3087
+ parameters: {
3088
+ query?: never;
3089
+ header?: never;
3090
+ path?: never;
3091
+ cookie?: never;
3092
+ };
3093
+ requestBody?: {
3094
+ content: {
3095
+ 'application/json': {
3096
+ /** @enum {string} */
3097
+ context: 'dashboard';
3098
+ data: {
3099
+ recentFailedJobs: {
3100
+ id: string;
3101
+ /** @enum {string} */
3102
+ status: 'error' | 'warning';
3103
+ component: string;
3104
+ configId: string;
3105
+ configName?: string;
3106
+ createdTime: string;
3107
+ durationSeconds?: number;
3108
+ errorMessage?: string;
3109
+ }[];
3110
+ deprecatedComponents: {
3111
+ id: string;
3112
+ name: string;
3113
+ type: string;
3114
+ expiredOn: string;
3115
+ configCount: number;
3116
+ }[];
3117
+ userRecentEdits: {
3118
+ component: string;
3119
+ configId: string;
3120
+ configName: string;
3121
+ lastEdited: string;
3122
+ }[];
3123
+ /** Format: email */
3124
+ currentUserEmail: string;
3125
+ };
3126
+ } | {
3127
+ /** @enum {string} */
3128
+ context: 'job-detail';
3129
+ data: {
3130
+ job: {
3131
+ id: string;
3132
+ /** @enum {string} */
3133
+ status: 'created' | 'waiting' | 'processing' | 'success' | 'error' | 'terminating' | 'terminated' | 'cancelled' | 'warning';
3134
+ component: string;
3135
+ configId?: string;
3136
+ configName?: string;
3137
+ createdTime: string;
3138
+ startTime?: string;
3139
+ endTime?: string;
3140
+ durationSeconds?: number;
3141
+ errorMessage?: string;
3142
+ /** @enum {string} */
3143
+ errorType?: 'user' | 'application';
3144
+ backendSize?: string;
3145
+ };
3146
+ component?: {
3147
+ id: string;
3148
+ name: string;
3149
+ type: string;
3150
+ };
3151
+ runtimeHistory?: {
3152
+ averageDurationSeconds?: number;
3153
+ minDurationSeconds?: number;
3154
+ maxDurationSeconds?: number;
3155
+ recentJobsCount: number;
3156
+ isSlowerThanAverage?: boolean;
3157
+ isFasterThanAverage?: boolean;
3158
+ percentageDifference?: number;
3159
+ };
3160
+ /** Format: email */
3161
+ currentUserEmail: string;
3162
+ };
3163
+ } | {
3164
+ /** @enum {string} */
3165
+ context: 'configuration-detail';
3166
+ data: {
3167
+ configuration: {
3168
+ id: string;
3169
+ name: string;
3170
+ description?: string;
3171
+ component: string;
3172
+ hasRows: boolean;
3173
+ rowCount?: number;
3174
+ lastChangeDescription?: string;
3175
+ };
3176
+ component?: {
3177
+ id: string;
3178
+ name: string;
3179
+ type: string;
3180
+ };
3181
+ latestJobs?: {
3182
+ id: string;
3183
+ /** @enum {string} */
3184
+ status: 'created' | 'waiting' | 'processing' | 'success' | 'error' | 'terminating' | 'terminated' | 'cancelled' | 'warning';
3185
+ durationSeconds?: number;
3186
+ errorMessage?: string;
3187
+ createdTime: string;
3188
+ }[];
3189
+ /** Format: email */
3190
+ currentUserEmail: string;
3191
+ };
3192
+ };
3193
+ };
3194
+ };
3195
+ responses: {
3196
+ /** @description Suggestions generated successfully */
3197
+ 200: {
3198
+ headers: {
3199
+ [name: string]: unknown;
3200
+ };
3201
+ content: {
3202
+ 'application/json': {
3203
+ suggestions: {
3204
+ /** Format: uuid */
3205
+ id: string;
3206
+ label: string;
3207
+ prompt: string;
3208
+ priority: number;
3209
+ /** @enum {string} */
3210
+ category: 'error' | 'maintenance' | 'documentation';
3211
+ reasoning: string;
3212
+ }[];
3213
+ /** Format: uuid */
3214
+ suggestionSessionId: string;
3215
+ };
3216
+ };
3217
+ };
3218
+ /** @description Bad request */
3219
+ 400: {
3220
+ headers: {
3221
+ [name: string]: unknown;
3222
+ };
3223
+ content: {
3224
+ 'application/json': {
3225
+ error: {
3226
+ /** @enum {string} */
3227
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
3228
+ /** @enum {string} */
3229
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
3230
+ message: string;
3231
+ /** @enum {string} */
3232
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
3233
+ exceptionId?: string;
3234
+ };
3235
+ };
3236
+ };
3237
+ };
3238
+ /** @description Unauthorized */
3239
+ 401: {
3240
+ headers: {
3241
+ [name: string]: unknown;
3242
+ };
3243
+ content: {
3244
+ 'application/json': {
3245
+ error: {
3246
+ /** @enum {string} */
3247
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
3248
+ /** @enum {string} */
3249
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
3250
+ message: string;
3251
+ /** @enum {string} */
3252
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
3253
+ exceptionId?: string;
3254
+ };
3255
+ };
3256
+ };
3257
+ };
3258
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
3259
+ 503: {
3260
+ headers: {
3261
+ [name: string]: unknown;
3262
+ };
3263
+ content: {
3264
+ 'application/json': {
3265
+ error: {
3266
+ /** @enum {string} */
3267
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
3268
+ /** @enum {string} */
3269
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
3270
+ message: string;
3271
+ /** @enum {string} */
3272
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
3273
+ exceptionId?: string;
3274
+ };
3275
+ };
3276
+ };
3277
+ };
3278
+ };
3279
+ };
3280
+ delete?: never;
3281
+ options?: never;
3282
+ head?: never;
3283
+ patch?: never;
3284
+ trace?: never;
3285
+ };
3286
+ '/api/settings/tools': {
3287
+ parameters: {
3288
+ query?: never;
3289
+ header?: never;
3290
+ path?: never;
3291
+ cookie?: never;
3292
+ };
3293
+ /**
3294
+ * List available tools
3295
+ * @description List all available MCP tools with their metadata
3296
+ */
3297
+ get: {
3298
+ parameters: {
3299
+ query?: never;
3300
+ header?: never;
3301
+ path?: never;
3302
+ cookie?: never;
3303
+ };
3304
+ requestBody?: never;
3305
+ responses: {
3306
+ /** @description List of available tools */
3307
+ 200: {
3308
+ headers: {
3309
+ [name: string]: unknown;
3310
+ };
3311
+ content: {
3312
+ 'application/json': {
3313
+ tools: {
3314
+ name: string;
3315
+ description: string;
3316
+ readOnly: boolean;
3317
+ }[];
3318
+ };
3319
+ };
3320
+ };
3321
+ /** @description Unauthorized */
3322
+ 401: {
3323
+ headers: {
3324
+ [name: string]: unknown;
3325
+ };
3326
+ content: {
3327
+ 'application/json': {
3328
+ error: {
3329
+ /** @enum {string} */
3330
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
3331
+ /** @enum {string} */
3332
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
3333
+ message: string;
3334
+ /** @enum {string} */
3335
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
3336
+ exceptionId?: string;
3337
+ };
3338
+ };
3339
+ };
3340
+ };
3341
+ /** @description Service unavailable — an upstream dependency (e.g. Storage API) is unreachable */
3342
+ 503: {
3343
+ headers: {
3344
+ [name: string]: unknown;
3345
+ };
3346
+ content: {
3347
+ 'application/json': {
3348
+ error: {
3349
+ /** @enum {string} */
3350
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
3351
+ /** @enum {string} */
3352
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
3353
+ message: string;
3354
+ /** @enum {string} */
3355
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
3356
+ exceptionId?: string;
3357
+ };
3358
+ };
3359
+ };
3360
+ };
3361
+ };
3362
+ };
3363
+ put?: never;
3364
+ post?: never;
3365
+ delete?: never;
3366
+ options?: never;
3367
+ head?: never;
3368
+ patch?: never;
3369
+ trace?: never;
3370
+ };
3371
+ '/api/skills': {
3372
+ parameters: {
3373
+ query?: never;
3374
+ header?: never;
3375
+ path?: never;
3376
+ cookie?: never;
3377
+ };
3378
+ /**
3379
+ * List skills and built-in slash commands available to the agent
3380
+ * @description Returns the items the chat UI lists in its slash-command menu: built-in slash commands kai-agent itself recognises (`/plan`, `/compact`, `/feedback`) plus the project-tagged skills uploaded to Keboola Storage. Skills bundled with the sandbox (first-party, vendored) are withheld — Claude still auto-invokes them, but they are not offered in the picker. Names and descriptions are normalised server-side — the UI does no merging, and lists whatever it is given.
3381
+ */
3382
+ get: {
3383
+ parameters: {
3384
+ query?: never;
3385
+ header?: never;
3386
+ path?: never;
3387
+ cookie?: never;
3388
+ };
3389
+ requestBody?: never;
3390
+ responses: {
3391
+ /** @description List of skills */
3392
+ 200: {
3393
+ headers: {
3394
+ [name: string]: unknown;
3395
+ };
3396
+ content: {
3397
+ 'application/json': {
3398
+ skills: {
3399
+ name: string;
3400
+ description: string | null;
3401
+ /** @enum {string} */
3402
+ source: 'first-party' | 'vendored' | 'project';
3403
+ }[];
3404
+ commands: {
3405
+ name: string;
3406
+ description: string;
3407
+ }[];
3408
+ };
3409
+ };
3410
+ };
3411
+ /** @description Unauthorized */
3412
+ 401: {
3413
+ headers: {
3414
+ [name: string]: unknown;
3415
+ };
3416
+ content: {
3417
+ 'application/json': {
3418
+ error: {
3419
+ /** @enum {string} */
3420
+ type: 'bad_request' | 'unauthorized' | 'forbidden' | 'not_found' | 'conflict' | 'payload_too_large' | 'rate_limit' | 'offline' | 'bad_response' | 'internal';
3421
+ /** @enum {string} */
3422
+ surface: 'chat' | 'auth' | 'api' | 'stream' | 'database' | 'history' | 'vote';
3423
+ message: string;
3424
+ /** @enum {string} */
3425
+ subtype?: 'burst' | 'monthly_messages' | 'monthly_credits_user' | 'monthly_credits_project';
3426
+ exceptionId?: string;
3427
+ };
3428
+ };
3429
+ };
3430
+ };
3431
+ };
3432
+ };
3433
+ put?: never;
3434
+ post?: never;
3435
+ delete?: never;
3436
+ options?: never;
3437
+ head?: never;
3438
+ patch?: never;
3439
+ trace?: never;
3440
+ };
3441
+ };
3442
+ //#endregion
3443
+ //#region src/clients/kaiAgent/types.d.ts
3444
+ type GetHistoryQuery = OpenapiQueryType<paths['/api/history']['get']>;
3445
+ type GetVotesQuery = OpenapiQueryType<paths['/api/vote']['get']>;
3446
+ type GetChatPath = OpenapiPathType<paths['/api/chat/{id}']['get']>;
3447
+ type ChatRequest = OpenapiBodyType<paths['/api/chat']['post']>;
3448
+ type VoteRequest = OpenapiBodyType<paths['/api/vote']['patch']>;
3449
+ type ApprovalBody = OpenapiBodyType<paths['/api/chat/{id}/approval']['post']>;
3450
+ type UsageResponse = OpenapiReturnType<paths['/api/usage']['get']>;
3451
+ type ChatWithMessages = OpenapiReturnType<paths['/api/chat/{id}']['get']>;
3452
+ //#endregion
3453
+ export { GetHistoryQuery as a, VoteRequest as c, GetChatPath as i, ChatRequest as n, GetVotesQuery as o, ChatWithMessages as r, UsageResponse as s, ApprovalBody as t };
3454
+ //# sourceMappingURL=types-CNQdtffE.d.ts.map