@s2-dev/streamstore 0.11.2 → 0.12.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 (503) hide show
  1. package/README.md +45 -1
  2. package/bin/mcp-server.js +1485 -198
  3. package/bin/mcp-server.js.map +67 -42
  4. package/dist/commonjs/funcs/accessTokensIssueAccessToken.js +2 -2
  5. package/dist/commonjs/funcs/accessTokensIssueAccessToken.js.map +1 -1
  6. package/dist/commonjs/funcs/accessTokensListAccessTokens.js +2 -2
  7. package/dist/commonjs/funcs/accessTokensRevokeAccessToken.js +2 -2
  8. package/dist/commonjs/funcs/basinsCreateBasin.d.ts +14 -0
  9. package/dist/commonjs/funcs/basinsCreateBasin.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/basinsCreateBasin.js +124 -0
  11. package/dist/commonjs/funcs/basinsCreateBasin.js.map +1 -0
  12. package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js +3 -3
  13. package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
  14. package/dist/commonjs/funcs/basinsDeleteBasin.d.ts +1 -1
  15. package/dist/commonjs/funcs/basinsDeleteBasin.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/basinsDeleteBasin.js +13 -2
  17. package/dist/commonjs/funcs/basinsDeleteBasin.js.map +1 -1
  18. package/dist/commonjs/funcs/basinsGetBasinConfig.js +2 -2
  19. package/dist/commonjs/funcs/basinsGetBasinConfig.js.map +1 -1
  20. package/dist/commonjs/funcs/basinsListBasins.js +2 -2
  21. package/dist/commonjs/funcs/basinsReconfigureBasin.js +2 -2
  22. package/dist/commonjs/funcs/basinsReconfigureBasin.js.map +1 -1
  23. package/dist/commonjs/funcs/recordsAppend.d.ts +18 -0
  24. package/dist/commonjs/funcs/recordsAppend.d.ts.map +1 -0
  25. package/dist/commonjs/funcs/recordsAppend.js +144 -0
  26. package/dist/commonjs/funcs/recordsAppend.js.map +1 -0
  27. package/dist/commonjs/funcs/recordsCheckTail.d.ts +1 -1
  28. package/dist/commonjs/funcs/recordsCheckTail.d.ts.map +1 -1
  29. package/dist/commonjs/funcs/recordsCheckTail.js +13 -2
  30. package/dist/commonjs/funcs/recordsCheckTail.js.map +1 -1
  31. package/dist/commonjs/funcs/recordsRead.d.ts +23 -0
  32. package/dist/commonjs/funcs/recordsRead.d.ts.map +1 -0
  33. package/dist/commonjs/funcs/recordsRead.js +157 -0
  34. package/dist/commonjs/funcs/recordsRead.js.map +1 -0
  35. package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.js +14 -3
  36. package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.js.map +1 -1
  37. package/dist/commonjs/funcs/streamsCreateStream.d.ts +14 -0
  38. package/dist/commonjs/funcs/streamsCreateStream.d.ts.map +1 -0
  39. package/dist/commonjs/funcs/streamsCreateStream.js +129 -0
  40. package/dist/commonjs/funcs/streamsCreateStream.js.map +1 -0
  41. package/dist/commonjs/funcs/streamsDeleteStream.d.ts +1 -1
  42. package/dist/commonjs/funcs/streamsDeleteStream.d.ts.map +1 -1
  43. package/dist/commonjs/funcs/streamsDeleteStream.js +2 -2
  44. package/dist/commonjs/funcs/streamsDeleteStream.js.map +1 -1
  45. package/dist/commonjs/funcs/streamsGetStreamConfig.js +13 -2
  46. package/dist/commonjs/funcs/streamsGetStreamConfig.js.map +1 -1
  47. package/dist/commonjs/funcs/streamsListStreams.js +2 -2
  48. package/dist/commonjs/funcs/streamsListStreams.js.map +1 -1
  49. package/dist/commonjs/funcs/streamsReconfigureStream.js +13 -2
  50. package/dist/commonjs/funcs/streamsReconfigureStream.js.map +1 -1
  51. package/dist/commonjs/lib/config.d.ts +3 -3
  52. package/dist/commonjs/lib/config.js +3 -3
  53. package/dist/commonjs/lib/event-streams.d.ts +17 -0
  54. package/dist/commonjs/lib/event-streams.d.ts.map +1 -0
  55. package/dist/commonjs/lib/event-streams.js +220 -0
  56. package/dist/commonjs/lib/event-streams.js.map +1 -0
  57. package/dist/commonjs/lib/matchers.d.ts.map +1 -1
  58. package/dist/commonjs/lib/matchers.js +4 -1
  59. package/dist/commonjs/lib/matchers.js.map +1 -1
  60. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  61. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  62. package/dist/commonjs/mcp-server/server.js +9 -1
  63. package/dist/commonjs/mcp-server/server.js.map +1 -1
  64. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.d.ts +8 -0
  65. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.d.ts.map +1 -0
  66. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.js +63 -0
  67. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.js.map +1 -0
  68. package/dist/commonjs/mcp-server/tools/recordsAppend.d.ts +8 -0
  69. package/dist/commonjs/mcp-server/tools/recordsAppend.d.ts.map +1 -0
  70. package/dist/commonjs/mcp-server/tools/recordsAppend.js +65 -0
  71. package/dist/commonjs/mcp-server/tools/recordsAppend.js.map +1 -0
  72. package/dist/commonjs/mcp-server/tools/recordsRead.d.ts +8 -0
  73. package/dist/commonjs/mcp-server/tools/recordsRead.d.ts.map +1 -0
  74. package/dist/commonjs/mcp-server/tools/recordsRead.js +65 -0
  75. package/dist/commonjs/mcp-server/tools/recordsRead.js.map +1 -0
  76. package/dist/commonjs/mcp-server/tools/streamsCreateStream.d.ts +8 -0
  77. package/dist/commonjs/mcp-server/tools/streamsCreateStream.d.ts.map +1 -0
  78. package/dist/commonjs/mcp-server/tools/streamsCreateStream.js +63 -0
  79. package/dist/commonjs/mcp-server/tools/streamsCreateStream.js.map +1 -0
  80. package/dist/commonjs/models/components/accesstokeninfo.d.ts +1 -1
  81. package/dist/commonjs/models/components/appendack.d.ts +46 -0
  82. package/dist/commonjs/models/components/appendack.d.ts.map +1 -0
  83. package/dist/commonjs/models/components/appendack.js +74 -0
  84. package/dist/commonjs/models/components/appendack.js.map +1 -0
  85. package/dist/commonjs/models/components/appendinput.d.ts +46 -0
  86. package/dist/commonjs/models/components/appendinput.d.ts.map +1 -0
  87. package/dist/commonjs/models/components/appendinput.js +85 -0
  88. package/dist/commonjs/models/components/appendinput.js.map +1 -0
  89. package/dist/commonjs/models/components/appendrecord.d.ts +43 -0
  90. package/dist/commonjs/models/components/appendrecord.d.ts.map +1 -0
  91. package/dist/commonjs/models/components/appendrecord.js +74 -0
  92. package/dist/commonjs/models/components/appendrecord.js.map +1 -0
  93. package/dist/commonjs/models/components/basinconfig.d.ts +4 -4
  94. package/dist/commonjs/models/components/basinconfig.d.ts.map +1 -1
  95. package/dist/commonjs/models/components/basinconfig.js +4 -4
  96. package/dist/commonjs/models/components/basinconfig.js.map +1 -1
  97. package/dist/commonjs/models/components/createbasinrequest.d.ts +5 -0
  98. package/dist/commonjs/models/components/createbasinrequest.d.ts.map +1 -1
  99. package/dist/commonjs/models/components/createbasinrequest.js +2 -0
  100. package/dist/commonjs/models/components/createbasinrequest.js.map +1 -1
  101. package/dist/commonjs/models/components/createorreconfigurebasinrequest.d.ts +54 -0
  102. package/dist/commonjs/models/components/createorreconfigurebasinrequest.d.ts.map +1 -0
  103. package/dist/commonjs/models/components/createorreconfigurebasinrequest.js +96 -0
  104. package/dist/commonjs/models/components/createorreconfigurebasinrequest.js.map +1 -0
  105. package/dist/commonjs/models/components/createstreamrequest.d.ts +35 -0
  106. package/dist/commonjs/models/components/createstreamrequest.d.ts.map +1 -0
  107. package/dist/commonjs/models/components/createstreamrequest.js +72 -0
  108. package/dist/commonjs/models/components/createstreamrequest.js.map +1 -0
  109. package/dist/commonjs/models/components/header.d.ts +43 -0
  110. package/dist/commonjs/models/components/header.d.ts.map +1 -0
  111. package/dist/commonjs/models/components/header.js +72 -0
  112. package/dist/commonjs/models/components/header.js.map +1 -0
  113. package/dist/commonjs/models/components/index.d.ts +11 -1
  114. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  115. package/dist/commonjs/models/components/index.js +11 -1
  116. package/dist/commonjs/models/components/index.js.map +1 -1
  117. package/dist/commonjs/models/components/listaccesstokensresponse.d.ts +1 -1
  118. package/dist/commonjs/models/components/listbasinsresponse.d.ts +1 -1
  119. package/dist/commonjs/models/components/liststreamsresponse.d.ts +1 -1
  120. package/dist/commonjs/models/components/readbatch.d.ts +30 -0
  121. package/dist/commonjs/models/components/readbatch.d.ts.map +1 -0
  122. package/dist/commonjs/models/components/readbatch.js +70 -0
  123. package/dist/commonjs/models/components/readbatch.js.map +1 -0
  124. package/dist/commonjs/models/components/readevent.d.ts +107 -0
  125. package/dist/commonjs/models/components/readevent.d.ts.map +1 -0
  126. package/dist/commonjs/models/components/readevent.js +175 -0
  127. package/dist/commonjs/models/components/readevent.js.map +1 -0
  128. package/dist/commonjs/models/components/s2format.d.ts +28 -0
  129. package/dist/commonjs/models/components/s2format.d.ts.map +1 -0
  130. package/dist/commonjs/models/components/s2format.js +61 -0
  131. package/dist/commonjs/models/components/s2format.js.map +1 -0
  132. package/dist/commonjs/models/components/sequencedrecord.d.ts +45 -0
  133. package/dist/commonjs/models/components/sequencedrecord.d.ts.map +1 -0
  134. package/dist/commonjs/models/components/sequencedrecord.js +85 -0
  135. package/dist/commonjs/models/components/sequencedrecord.js.map +1 -0
  136. package/dist/commonjs/models/components/streamconfig.d.ts +2 -2
  137. package/dist/commonjs/models/components/streamconfig.d.ts.map +1 -1
  138. package/dist/commonjs/models/components/streamconfig.js +2 -2
  139. package/dist/commonjs/models/components/streamconfig.js.map +1 -1
  140. package/dist/commonjs/models/components/streaminfo.d.ts +2 -2
  141. package/dist/commonjs/models/components/streamreconfiguration.d.ts +2 -2
  142. package/dist/commonjs/models/components/streamreconfiguration.d.ts.map +1 -1
  143. package/dist/commonjs/models/components/streamreconfiguration.js +4 -2
  144. package/dist/commonjs/models/components/streamreconfiguration.js.map +1 -1
  145. package/dist/commonjs/models/components/tailresponse.d.ts +33 -0
  146. package/dist/commonjs/models/components/tailresponse.d.ts.map +1 -0
  147. package/dist/commonjs/models/components/{checktailresponse.js → tailresponse.js} +17 -17
  148. package/dist/commonjs/models/components/tailresponse.js.map +1 -0
  149. package/dist/commonjs/models/errors/appendconditionfailed.d.ts +134 -0
  150. package/dist/commonjs/models/errors/appendconditionfailed.d.ts.map +1 -0
  151. package/dist/commonjs/models/errors/appendconditionfailed.js +171 -0
  152. package/dist/commonjs/models/errors/appendconditionfailed.js.map +1 -0
  153. package/dist/commonjs/models/errors/index.d.ts +3 -0
  154. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  155. package/dist/commonjs/models/errors/index.js +3 -0
  156. package/dist/commonjs/models/errors/index.js.map +1 -1
  157. package/dist/commonjs/models/errors/notfounderror.d.ts +31 -0
  158. package/dist/commonjs/models/errors/notfounderror.d.ts.map +1 -0
  159. package/dist/commonjs/models/errors/notfounderror.js +75 -0
  160. package/dist/commonjs/models/errors/notfounderror.js.map +1 -0
  161. package/dist/commonjs/models/errors/tailresponse.d.ts +38 -0
  162. package/dist/commonjs/models/errors/tailresponse.d.ts.map +1 -0
  163. package/dist/commonjs/models/errors/tailresponse.js +78 -0
  164. package/dist/commonjs/models/errors/tailresponse.js.map +1 -0
  165. package/dist/commonjs/models/operations/append.d.ts +48 -0
  166. package/dist/commonjs/models/operations/append.d.ts.map +1 -0
  167. package/dist/commonjs/models/operations/append.js +91 -0
  168. package/dist/commonjs/models/operations/append.js.map +1 -0
  169. package/dist/commonjs/models/operations/checktail.d.ts +1 -2
  170. package/dist/commonjs/models/operations/checktail.d.ts.map +1 -1
  171. package/dist/commonjs/models/operations/checktail.js.map +1 -1
  172. package/dist/commonjs/models/operations/createorreconfigurebasin.d.ts +7 -7
  173. package/dist/commonjs/models/operations/createorreconfigurebasin.d.ts.map +1 -1
  174. package/dist/commonjs/models/operations/createorreconfigurebasin.js +6 -6
  175. package/dist/commonjs/models/operations/createorreconfigurebasin.js.map +1 -1
  176. package/dist/commonjs/models/operations/createorreconfigurestream.d.ts +3 -4
  177. package/dist/commonjs/models/operations/createorreconfigurestream.d.ts.map +1 -1
  178. package/dist/commonjs/models/operations/createorreconfigurestream.js +2 -2
  179. package/dist/commonjs/models/operations/createorreconfigurestream.js.map +1 -1
  180. package/dist/commonjs/models/operations/createstream.d.ts +2 -0
  181. package/dist/commonjs/models/operations/createstream.d.ts.map +1 -0
  182. package/dist/commonjs/models/operations/createstream.js +13 -0
  183. package/dist/commonjs/models/operations/createstream.js.map +1 -0
  184. package/dist/commonjs/models/operations/deletestream.d.ts +1 -2
  185. package/dist/commonjs/models/operations/deletestream.d.ts.map +1 -1
  186. package/dist/commonjs/models/operations/deletestream.js.map +1 -1
  187. package/dist/commonjs/models/operations/getstreamconfig.d.ts +1 -2
  188. package/dist/commonjs/models/operations/getstreamconfig.d.ts.map +1 -1
  189. package/dist/commonjs/models/operations/getstreamconfig.js.map +1 -1
  190. package/dist/commonjs/models/operations/index.d.ts +3 -0
  191. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  192. package/dist/commonjs/models/operations/index.js +3 -0
  193. package/dist/commonjs/models/operations/index.js.map +1 -1
  194. package/dist/commonjs/models/operations/listbasins.d.ts +1 -1
  195. package/dist/commonjs/models/operations/read.d.ts +93 -0
  196. package/dist/commonjs/models/operations/read.d.ts.map +1 -0
  197. package/dist/commonjs/models/operations/read.js +136 -0
  198. package/dist/commonjs/models/operations/read.js.map +1 -0
  199. package/dist/commonjs/models/operations/reconfigurestream.d.ts +1 -2
  200. package/dist/commonjs/models/operations/reconfigurestream.d.ts.map +1 -1
  201. package/dist/commonjs/models/operations/reconfigurestream.js.map +1 -1
  202. package/dist/commonjs/sdk/basins.d.ts +4 -0
  203. package/dist/commonjs/sdk/basins.d.ts.map +1 -1
  204. package/dist/commonjs/sdk/basins.js +7 -0
  205. package/dist/commonjs/sdk/basins.js.map +1 -1
  206. package/dist/commonjs/sdk/records.d.ts +19 -1
  207. package/dist/commonjs/sdk/records.d.ts.map +1 -1
  208. package/dist/commonjs/sdk/records.js +23 -1
  209. package/dist/commonjs/sdk/records.js.map +1 -1
  210. package/dist/commonjs/sdk/streams.d.ts +4 -0
  211. package/dist/commonjs/sdk/streams.d.ts.map +1 -1
  212. package/dist/commonjs/sdk/streams.js +7 -0
  213. package/dist/commonjs/sdk/streams.js.map +1 -1
  214. package/dist/esm/funcs/accessTokensIssueAccessToken.js +2 -2
  215. package/dist/esm/funcs/accessTokensIssueAccessToken.js.map +1 -1
  216. package/dist/esm/funcs/accessTokensListAccessTokens.js +2 -2
  217. package/dist/esm/funcs/accessTokensRevokeAccessToken.js +2 -2
  218. package/dist/esm/funcs/basinsCreateBasin.d.ts +14 -0
  219. package/dist/esm/funcs/basinsCreateBasin.d.ts.map +1 -0
  220. package/dist/esm/funcs/basinsCreateBasin.js +88 -0
  221. package/dist/esm/funcs/basinsCreateBasin.js.map +1 -0
  222. package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js +3 -3
  223. package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
  224. package/dist/esm/funcs/basinsDeleteBasin.d.ts +1 -1
  225. package/dist/esm/funcs/basinsDeleteBasin.d.ts.map +1 -1
  226. package/dist/esm/funcs/basinsDeleteBasin.js +13 -2
  227. package/dist/esm/funcs/basinsDeleteBasin.js.map +1 -1
  228. package/dist/esm/funcs/basinsGetBasinConfig.js +2 -2
  229. package/dist/esm/funcs/basinsGetBasinConfig.js.map +1 -1
  230. package/dist/esm/funcs/basinsListBasins.js +2 -2
  231. package/dist/esm/funcs/basinsReconfigureBasin.js +2 -2
  232. package/dist/esm/funcs/basinsReconfigureBasin.js.map +1 -1
  233. package/dist/esm/funcs/recordsAppend.d.ts +18 -0
  234. package/dist/esm/funcs/recordsAppend.d.ts.map +1 -0
  235. package/dist/esm/funcs/recordsAppend.js +108 -0
  236. package/dist/esm/funcs/recordsAppend.js.map +1 -0
  237. package/dist/esm/funcs/recordsCheckTail.d.ts +1 -1
  238. package/dist/esm/funcs/recordsCheckTail.d.ts.map +1 -1
  239. package/dist/esm/funcs/recordsCheckTail.js +13 -2
  240. package/dist/esm/funcs/recordsCheckTail.js.map +1 -1
  241. package/dist/esm/funcs/recordsRead.d.ts +23 -0
  242. package/dist/esm/funcs/recordsRead.d.ts.map +1 -0
  243. package/dist/esm/funcs/recordsRead.js +120 -0
  244. package/dist/esm/funcs/recordsRead.js.map +1 -0
  245. package/dist/esm/funcs/streamsCreateOrReconfigureStream.js +14 -3
  246. package/dist/esm/funcs/streamsCreateOrReconfigureStream.js.map +1 -1
  247. package/dist/esm/funcs/streamsCreateStream.d.ts +14 -0
  248. package/dist/esm/funcs/streamsCreateStream.d.ts.map +1 -0
  249. package/dist/esm/funcs/streamsCreateStream.js +93 -0
  250. package/dist/esm/funcs/streamsCreateStream.js.map +1 -0
  251. package/dist/esm/funcs/streamsDeleteStream.d.ts +1 -1
  252. package/dist/esm/funcs/streamsDeleteStream.d.ts.map +1 -1
  253. package/dist/esm/funcs/streamsDeleteStream.js +2 -2
  254. package/dist/esm/funcs/streamsDeleteStream.js.map +1 -1
  255. package/dist/esm/funcs/streamsGetStreamConfig.js +13 -2
  256. package/dist/esm/funcs/streamsGetStreamConfig.js.map +1 -1
  257. package/dist/esm/funcs/streamsListStreams.js +2 -2
  258. package/dist/esm/funcs/streamsListStreams.js.map +1 -1
  259. package/dist/esm/funcs/streamsReconfigureStream.js +13 -2
  260. package/dist/esm/funcs/streamsReconfigureStream.js.map +1 -1
  261. package/dist/esm/lib/config.d.ts +3 -3
  262. package/dist/esm/lib/config.js +3 -3
  263. package/dist/esm/lib/event-streams.d.ts +17 -0
  264. package/dist/esm/lib/event-streams.d.ts.map +1 -0
  265. package/dist/esm/lib/event-streams.js +215 -0
  266. package/dist/esm/lib/event-streams.js.map +1 -0
  267. package/dist/esm/lib/matchers.d.ts.map +1 -1
  268. package/dist/esm/lib/matchers.js +4 -1
  269. package/dist/esm/lib/matchers.js.map +1 -1
  270. package/dist/esm/mcp-server/mcp-server.js +1 -1
  271. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  272. package/dist/esm/mcp-server/server.js +9 -1
  273. package/dist/esm/mcp-server/server.js.map +1 -1
  274. package/dist/esm/mcp-server/tools/basinsCreateBasin.d.ts +8 -0
  275. package/dist/esm/mcp-server/tools/basinsCreateBasin.d.ts.map +1 -0
  276. package/dist/esm/mcp-server/tools/basinsCreateBasin.js +27 -0
  277. package/dist/esm/mcp-server/tools/basinsCreateBasin.js.map +1 -0
  278. package/dist/esm/mcp-server/tools/recordsAppend.d.ts +8 -0
  279. package/dist/esm/mcp-server/tools/recordsAppend.d.ts.map +1 -0
  280. package/dist/esm/mcp-server/tools/recordsAppend.js +29 -0
  281. package/dist/esm/mcp-server/tools/recordsAppend.js.map +1 -0
  282. package/dist/esm/mcp-server/tools/recordsRead.d.ts +8 -0
  283. package/dist/esm/mcp-server/tools/recordsRead.d.ts.map +1 -0
  284. package/dist/esm/mcp-server/tools/recordsRead.js +29 -0
  285. package/dist/esm/mcp-server/tools/recordsRead.js.map +1 -0
  286. package/dist/esm/mcp-server/tools/streamsCreateStream.d.ts +8 -0
  287. package/dist/esm/mcp-server/tools/streamsCreateStream.d.ts.map +1 -0
  288. package/dist/esm/mcp-server/tools/streamsCreateStream.js +27 -0
  289. package/dist/esm/mcp-server/tools/streamsCreateStream.js.map +1 -0
  290. package/dist/esm/models/components/accesstokeninfo.d.ts +1 -1
  291. package/dist/esm/models/components/appendack.d.ts +46 -0
  292. package/dist/esm/models/components/appendack.d.ts.map +1 -0
  293. package/dist/esm/models/components/appendack.js +36 -0
  294. package/dist/esm/models/components/appendack.js.map +1 -0
  295. package/dist/esm/models/components/appendinput.d.ts +46 -0
  296. package/dist/esm/models/components/appendinput.d.ts.map +1 -0
  297. package/dist/esm/models/components/appendinput.js +47 -0
  298. package/dist/esm/models/components/appendinput.js.map +1 -0
  299. package/dist/esm/models/components/appendrecord.d.ts +43 -0
  300. package/dist/esm/models/components/appendrecord.d.ts.map +1 -0
  301. package/dist/esm/models/components/appendrecord.js +36 -0
  302. package/dist/esm/models/components/appendrecord.js.map +1 -0
  303. package/dist/esm/models/components/basinconfig.d.ts +4 -4
  304. package/dist/esm/models/components/basinconfig.d.ts.map +1 -1
  305. package/dist/esm/models/components/basinconfig.js +4 -4
  306. package/dist/esm/models/components/basinconfig.js.map +1 -1
  307. package/dist/esm/models/components/createbasinrequest.d.ts +5 -0
  308. package/dist/esm/models/components/createbasinrequest.d.ts.map +1 -1
  309. package/dist/esm/models/components/createbasinrequest.js +2 -0
  310. package/dist/esm/models/components/createbasinrequest.js.map +1 -1
  311. package/dist/esm/models/components/createorreconfigurebasinrequest.d.ts +54 -0
  312. package/dist/esm/models/components/createorreconfigurebasinrequest.d.ts.map +1 -0
  313. package/dist/esm/models/components/createorreconfigurebasinrequest.js +56 -0
  314. package/dist/esm/models/components/createorreconfigurebasinrequest.js.map +1 -0
  315. package/dist/esm/models/components/createstreamrequest.d.ts +35 -0
  316. package/dist/esm/models/components/createstreamrequest.d.ts.map +1 -0
  317. package/dist/esm/models/components/createstreamrequest.js +34 -0
  318. package/dist/esm/models/components/createstreamrequest.js.map +1 -0
  319. package/dist/esm/models/components/header.d.ts +43 -0
  320. package/dist/esm/models/components/header.d.ts.map +1 -0
  321. package/dist/esm/models/components/header.js +34 -0
  322. package/dist/esm/models/components/header.js.map +1 -0
  323. package/dist/esm/models/components/index.d.ts +11 -1
  324. package/dist/esm/models/components/index.d.ts.map +1 -1
  325. package/dist/esm/models/components/index.js +11 -1
  326. package/dist/esm/models/components/index.js.map +1 -1
  327. package/dist/esm/models/components/listaccesstokensresponse.d.ts +1 -1
  328. package/dist/esm/models/components/listbasinsresponse.d.ts +1 -1
  329. package/dist/esm/models/components/liststreamsresponse.d.ts +1 -1
  330. package/dist/esm/models/components/readbatch.d.ts +30 -0
  331. package/dist/esm/models/components/readbatch.d.ts.map +1 -0
  332. package/dist/esm/models/components/readbatch.js +32 -0
  333. package/dist/esm/models/components/readbatch.js.map +1 -0
  334. package/dist/esm/models/components/readevent.d.ts +107 -0
  335. package/dist/esm/models/components/readevent.d.ts.map +1 -0
  336. package/dist/esm/models/components/readevent.js +131 -0
  337. package/dist/esm/models/components/readevent.js.map +1 -0
  338. package/dist/esm/models/components/s2format.d.ts +28 -0
  339. package/dist/esm/models/components/s2format.d.ts.map +1 -0
  340. package/dist/esm/models/components/s2format.js +25 -0
  341. package/dist/esm/models/components/s2format.js.map +1 -0
  342. package/dist/esm/models/components/sequencedrecord.d.ts +45 -0
  343. package/dist/esm/models/components/sequencedrecord.d.ts.map +1 -0
  344. package/dist/esm/models/components/sequencedrecord.js +47 -0
  345. package/dist/esm/models/components/sequencedrecord.js.map +1 -0
  346. package/dist/esm/models/components/streamconfig.d.ts +2 -2
  347. package/dist/esm/models/components/streamconfig.d.ts.map +1 -1
  348. package/dist/esm/models/components/streamconfig.js +2 -2
  349. package/dist/esm/models/components/streamconfig.js.map +1 -1
  350. package/dist/esm/models/components/streaminfo.d.ts +2 -2
  351. package/dist/esm/models/components/streamreconfiguration.d.ts +2 -2
  352. package/dist/esm/models/components/streamreconfiguration.d.ts.map +1 -1
  353. package/dist/esm/models/components/streamreconfiguration.js +4 -2
  354. package/dist/esm/models/components/streamreconfiguration.js.map +1 -1
  355. package/dist/esm/models/components/tailresponse.d.ts +33 -0
  356. package/dist/esm/models/components/tailresponse.d.ts.map +1 -0
  357. package/dist/esm/models/components/tailresponse.js +32 -0
  358. package/dist/esm/models/components/tailresponse.js.map +1 -0
  359. package/dist/esm/models/errors/appendconditionfailed.d.ts +134 -0
  360. package/dist/esm/models/errors/appendconditionfailed.d.ts.map +1 -0
  361. package/dist/esm/models/errors/appendconditionfailed.js +131 -0
  362. package/dist/esm/models/errors/appendconditionfailed.js.map +1 -0
  363. package/dist/esm/models/errors/index.d.ts +3 -0
  364. package/dist/esm/models/errors/index.d.ts.map +1 -1
  365. package/dist/esm/models/errors/index.js +3 -0
  366. package/dist/esm/models/errors/index.js.map +1 -1
  367. package/dist/esm/models/errors/notfounderror.d.ts +31 -0
  368. package/dist/esm/models/errors/notfounderror.d.ts.map +1 -0
  369. package/dist/esm/models/errors/notfounderror.js +38 -0
  370. package/dist/esm/models/errors/notfounderror.js.map +1 -0
  371. package/dist/esm/models/errors/tailresponse.d.ts +38 -0
  372. package/dist/esm/models/errors/tailresponse.d.ts.map +1 -0
  373. package/dist/esm/models/errors/tailresponse.js +41 -0
  374. package/dist/esm/models/errors/tailresponse.js.map +1 -0
  375. package/dist/esm/models/operations/append.d.ts +48 -0
  376. package/dist/esm/models/operations/append.d.ts.map +1 -0
  377. package/dist/esm/models/operations/append.js +53 -0
  378. package/dist/esm/models/operations/append.js.map +1 -0
  379. package/dist/esm/models/operations/checktail.d.ts +1 -2
  380. package/dist/esm/models/operations/checktail.d.ts.map +1 -1
  381. package/dist/esm/models/operations/checktail.js.map +1 -1
  382. package/dist/esm/models/operations/createorreconfigurebasin.d.ts +7 -7
  383. package/dist/esm/models/operations/createorreconfigurebasin.d.ts.map +1 -1
  384. package/dist/esm/models/operations/createorreconfigurebasin.js +6 -6
  385. package/dist/esm/models/operations/createorreconfigurebasin.js.map +1 -1
  386. package/dist/esm/models/operations/createorreconfigurestream.d.ts +3 -4
  387. package/dist/esm/models/operations/createorreconfigurestream.d.ts.map +1 -1
  388. package/dist/esm/models/operations/createorreconfigurestream.js +2 -2
  389. package/dist/esm/models/operations/createorreconfigurestream.js.map +1 -1
  390. package/dist/esm/models/operations/createstream.d.ts +2 -0
  391. package/dist/esm/models/operations/createstream.d.ts.map +1 -0
  392. package/dist/esm/models/operations/createstream.js +10 -0
  393. package/dist/esm/models/operations/createstream.js.map +1 -0
  394. package/dist/esm/models/operations/deletestream.d.ts +1 -2
  395. package/dist/esm/models/operations/deletestream.d.ts.map +1 -1
  396. package/dist/esm/models/operations/deletestream.js.map +1 -1
  397. package/dist/esm/models/operations/getstreamconfig.d.ts +1 -2
  398. package/dist/esm/models/operations/getstreamconfig.d.ts.map +1 -1
  399. package/dist/esm/models/operations/getstreamconfig.js.map +1 -1
  400. package/dist/esm/models/operations/index.d.ts +3 -0
  401. package/dist/esm/models/operations/index.d.ts.map +1 -1
  402. package/dist/esm/models/operations/index.js +3 -0
  403. package/dist/esm/models/operations/index.js.map +1 -1
  404. package/dist/esm/models/operations/listbasins.d.ts +1 -1
  405. package/dist/esm/models/operations/read.d.ts +93 -0
  406. package/dist/esm/models/operations/read.d.ts.map +1 -0
  407. package/dist/esm/models/operations/read.js +96 -0
  408. package/dist/esm/models/operations/read.js.map +1 -0
  409. package/dist/esm/models/operations/reconfigurestream.d.ts +1 -2
  410. package/dist/esm/models/operations/reconfigurestream.d.ts.map +1 -1
  411. package/dist/esm/models/operations/reconfigurestream.js.map +1 -1
  412. package/dist/esm/sdk/basins.d.ts +4 -0
  413. package/dist/esm/sdk/basins.d.ts.map +1 -1
  414. package/dist/esm/sdk/basins.js +7 -0
  415. package/dist/esm/sdk/basins.js.map +1 -1
  416. package/dist/esm/sdk/records.d.ts +19 -1
  417. package/dist/esm/sdk/records.d.ts.map +1 -1
  418. package/dist/esm/sdk/records.js +21 -0
  419. package/dist/esm/sdk/records.js.map +1 -1
  420. package/dist/esm/sdk/streams.d.ts +4 -0
  421. package/dist/esm/sdk/streams.d.ts.map +1 -1
  422. package/dist/esm/sdk/streams.js +7 -0
  423. package/dist/esm/sdk/streams.js.map +1 -1
  424. package/docs/sdks/accesstokens/README.md +3 -3
  425. package/docs/sdks/basins/README.md +86 -7
  426. package/docs/sdks/records/README.md +183 -2
  427. package/docs/sdks/streams/README.md +89 -17
  428. package/jsr.json +2 -1
  429. package/package.json +1 -1
  430. package/src/funcs/accessTokensIssueAccessToken.ts +2 -2
  431. package/src/funcs/accessTokensListAccessTokens.ts +2 -2
  432. package/src/funcs/accessTokensRevokeAccessToken.ts +2 -2
  433. package/src/funcs/basinsCreateBasin.ts +179 -0
  434. package/src/funcs/basinsCreateOrReconfigureBasin.ts +3 -3
  435. package/src/funcs/basinsDeleteBasin.ts +17 -2
  436. package/src/funcs/basinsGetBasinConfig.ts +2 -2
  437. package/src/funcs/basinsListBasins.ts +2 -2
  438. package/src/funcs/basinsReconfigureBasin.ts +2 -2
  439. package/src/funcs/recordsAppend.ts +205 -0
  440. package/src/funcs/recordsCheckTail.ts +17 -6
  441. package/src/funcs/recordsRead.ts +219 -0
  442. package/src/funcs/streamsCreateOrReconfigureStream.ts +14 -3
  443. package/src/funcs/streamsCreateStream.ts +185 -0
  444. package/src/funcs/streamsDeleteStream.ts +6 -2
  445. package/src/funcs/streamsGetStreamConfig.ts +13 -2
  446. package/src/funcs/streamsListStreams.ts +2 -2
  447. package/src/funcs/streamsReconfigureStream.ts +13 -2
  448. package/src/lib/config.ts +3 -3
  449. package/src/lib/event-streams.ts +264 -0
  450. package/src/lib/matchers.ts +4 -1
  451. package/src/mcp-server/mcp-server.ts +1 -1
  452. package/src/mcp-server/server.ts +9 -1
  453. package/src/mcp-server/tools/basinsCreateBasin.ts +36 -0
  454. package/src/mcp-server/tools/recordsAppend.ts +38 -0
  455. package/src/mcp-server/tools/recordsRead.ts +38 -0
  456. package/src/mcp-server/tools/streamsCreateStream.ts +36 -0
  457. package/src/models/components/accesstokeninfo.ts +1 -1
  458. package/src/models/components/appendack.ts +88 -0
  459. package/src/models/components/appendinput.ts +99 -0
  460. package/src/models/components/appendrecord.ts +85 -0
  461. package/src/models/components/basinconfig.ts +8 -8
  462. package/src/models/components/createbasinrequest.ts +7 -0
  463. package/src/models/components/createorreconfigurebasinrequest.ts +138 -0
  464. package/src/models/components/createstreamrequest.ts +79 -0
  465. package/src/models/components/header.ts +75 -0
  466. package/src/models/components/index.ts +11 -1
  467. package/src/models/components/listaccesstokensresponse.ts +1 -1
  468. package/src/models/components/listbasinsresponse.ts +1 -1
  469. package/src/models/components/liststreamsresponse.ts +1 -1
  470. package/src/models/components/readbatch.ts +68 -0
  471. package/src/models/components/readevent.ts +243 -0
  472. package/src/models/components/s2format.ts +31 -0
  473. package/src/models/components/sequencedrecord.ts +100 -0
  474. package/src/models/components/streamconfig.ts +4 -4
  475. package/src/models/components/streaminfo.ts +2 -2
  476. package/src/models/components/streamreconfiguration.ts +6 -4
  477. package/src/models/components/tailresponse.ts +71 -0
  478. package/src/models/errors/appendconditionfailed.ts +249 -0
  479. package/src/models/errors/index.ts +3 -0
  480. package/src/models/errors/notfounderror.ts +67 -0
  481. package/src/models/errors/tailresponse.ts +76 -0
  482. package/src/models/operations/append.ts +102 -0
  483. package/src/models/operations/checktail.ts +1 -2
  484. package/src/models/operations/createorreconfigurebasin.ts +23 -13
  485. package/src/models/operations/createorreconfigurestream.ts +5 -6
  486. package/src/models/operations/createstream.ts +10 -0
  487. package/src/models/operations/deletestream.ts +1 -2
  488. package/src/models/operations/getstreamconfig.ts +1 -2
  489. package/src/models/operations/index.ts +3 -0
  490. package/src/models/operations/listbasins.ts +1 -1
  491. package/src/models/operations/read.ts +195 -0
  492. package/src/models/operations/reconfigurestream.ts +1 -2
  493. package/src/sdk/basins.ts +15 -0
  494. package/src/sdk/records.ts +39 -1
  495. package/src/sdk/streams.ts +15 -0
  496. package/dist/commonjs/models/components/checktailresponse.d.ts +0 -33
  497. package/dist/commonjs/models/components/checktailresponse.d.ts.map +0 -1
  498. package/dist/commonjs/models/components/checktailresponse.js.map +0 -1
  499. package/dist/esm/models/components/checktailresponse.d.ts +0 -33
  500. package/dist/esm/models/components/checktailresponse.d.ts.map +0 -1
  501. package/dist/esm/models/components/checktailresponse.js +0 -32
  502. package/dist/esm/models/components/checktailresponse.js.map +0 -1
  503. package/src/models/components/checktailresponse.ts +0 -75
package/bin/mcp-server.js CHANGED
@@ -34173,9 +34173,9 @@ var init_config = __esm(() => {
34173
34173
  SDK_METADATA = {
34174
34174
  language: "typescript",
34175
34175
  openapiDocVersion: "1.0.0",
34176
- sdkVersion: "0.11.2",
34177
- genVersion: "2.597.9",
34178
- userAgent: "speakeasy-sdk/typescript 0.11.2 2.597.9 1.0.0 @s2-dev/streamstore"
34176
+ sdkVersion: "0.12.0",
34177
+ genVersion: "2.604.2",
34178
+ userAgent: "speakeasy-sdk/typescript 0.12.0 2.604.2 1.0.0 @s2-dev/streamstore"
34179
34179
  };
34180
34180
  });
34181
34181
 
@@ -35178,6 +35178,208 @@ ${body}` : "";
35178
35178
  };
35179
35179
  });
35180
35180
 
35181
+ // src/lib/event-streams.ts
35182
+ function findBoundary(buffer, start) {
35183
+ const char1 = buffer[start];
35184
+ const char2 = buffer[start + 1];
35185
+ if (char1 == null || char2 == null || !NEWLINE_CHARS.has(char1) || !NEWLINE_CHARS.has(char2)) {
35186
+ return null;
35187
+ }
35188
+ for (const s of MESSAGE_BOUNDARIES) {
35189
+ const seq = peekSequence(start, buffer, s);
35190
+ if (seq != null) {
35191
+ return seq;
35192
+ }
35193
+ }
35194
+ return null;
35195
+ }
35196
+ function peekSequence(position, buffer, sequence) {
35197
+ if (sequence.length > buffer.length - position) {
35198
+ return null;
35199
+ }
35200
+ for (let i = 0;i < sequence.length; i++) {
35201
+ if (buffer[position + i] !== sequence[i]) {
35202
+ return null;
35203
+ }
35204
+ }
35205
+ return sequence;
35206
+ }
35207
+ function parseEvent(chunk, decoder) {
35208
+ if (!chunk.length) {
35209
+ return null;
35210
+ }
35211
+ const td = new TextDecoder;
35212
+ const raw = td.decode(chunk);
35213
+ const lines = raw.split(/\r?\n|\r/g);
35214
+ let publish = false;
35215
+ const rawEvent = {};
35216
+ for (const line of lines) {
35217
+ if (!line) {
35218
+ continue;
35219
+ }
35220
+ const delim = line.indexOf(":");
35221
+ if (delim === 0) {
35222
+ continue;
35223
+ }
35224
+ const field = delim > 0 ? line.substring(0, delim) : "";
35225
+ let value = delim > 0 ? line.substring(delim + 1) : "";
35226
+ if (value.charAt(0) === " ") {
35227
+ value = value.substring(1);
35228
+ }
35229
+ switch (field) {
35230
+ case "event": {
35231
+ publish = true;
35232
+ rawEvent.event = value;
35233
+ break;
35234
+ }
35235
+ case "data": {
35236
+ publish = true;
35237
+ rawEvent.data ??= "";
35238
+ rawEvent.data += value + `
35239
+ `;
35240
+ break;
35241
+ }
35242
+ case "id": {
35243
+ publish = true;
35244
+ rawEvent.id = value;
35245
+ break;
35246
+ }
35247
+ case "retry": {
35248
+ const r = parseInt(value, 10);
35249
+ if (!Number.isNaN(r)) {
35250
+ publish = true;
35251
+ rawEvent.retry = r;
35252
+ }
35253
+ break;
35254
+ }
35255
+ }
35256
+ }
35257
+ if (!publish) {
35258
+ return null;
35259
+ }
35260
+ if (rawEvent.data != null) {
35261
+ rawEvent.data = rawEvent.data.slice(0, -1);
35262
+ }
35263
+ return decoder(rawEvent);
35264
+ }
35265
+ function discardSentinel(stream, sentinel) {
35266
+ return new ReadableStream({
35267
+ async start(controller) {
35268
+ let buffer = new Uint8Array([]);
35269
+ let position = 0;
35270
+ let done = false;
35271
+ let discard = false;
35272
+ const rdr = stream.getReader();
35273
+ try {
35274
+ while (!done) {
35275
+ const result = await rdr.read();
35276
+ const value = result.value;
35277
+ done = done || result.done;
35278
+ if (discard) {
35279
+ continue;
35280
+ }
35281
+ if (typeof value === "undefined") {
35282
+ continue;
35283
+ }
35284
+ const newBuffer = new Uint8Array(buffer.length + value.length);
35285
+ newBuffer.set(buffer);
35286
+ newBuffer.set(value, buffer.length);
35287
+ buffer = newBuffer;
35288
+ for (let i = position;i < buffer.length; i++) {
35289
+ const boundary = findBoundary(buffer, i);
35290
+ if (boundary == null) {
35291
+ continue;
35292
+ }
35293
+ const start = position;
35294
+ const chunk = buffer.slice(start, i);
35295
+ position = i + boundary.length;
35296
+ const event = parseEvent(chunk, id);
35297
+ if (event?.data === sentinel) {
35298
+ controller.enqueue(buffer.slice(0, start));
35299
+ discard = true;
35300
+ } else {
35301
+ controller.enqueue(buffer.slice(0, position));
35302
+ buffer = buffer.slice(position);
35303
+ position = 0;
35304
+ }
35305
+ }
35306
+ }
35307
+ } catch (e) {
35308
+ controller.error(e);
35309
+ } finally {
35310
+ controller.close();
35311
+ rdr.releaseLock();
35312
+ }
35313
+ }
35314
+ });
35315
+ }
35316
+ function id(v2) {
35317
+ return v2;
35318
+ }
35319
+ var LF = 10, CR = 13, NEWLINE_CHARS, MESSAGE_BOUNDARIES, EventStream;
35320
+ var init_event_streams = __esm(() => {
35321
+ NEWLINE_CHARS = new Set([LF, CR]);
35322
+ MESSAGE_BOUNDARIES = [
35323
+ new Uint8Array([CR, LF, CR, LF]),
35324
+ new Uint8Array([CR, CR]),
35325
+ new Uint8Array([LF, LF])
35326
+ ];
35327
+ EventStream = class EventStream {
35328
+ stream;
35329
+ decoder;
35330
+ constructor(init) {
35331
+ this.stream = init.stream;
35332
+ this.decoder = init.decoder;
35333
+ }
35334
+ async* [Symbol.asyncIterator]() {
35335
+ const reader = this.stream.getReader();
35336
+ let buffer = new Uint8Array([]);
35337
+ let position = 0;
35338
+ try {
35339
+ while (true) {
35340
+ const { done, value } = await reader.read();
35341
+ if (done) {
35342
+ break;
35343
+ }
35344
+ const newBuffer = new Uint8Array(buffer.length + value.length);
35345
+ newBuffer.set(buffer);
35346
+ newBuffer.set(value, buffer.length);
35347
+ buffer = newBuffer;
35348
+ for (let i = position;i < buffer.length; i++) {
35349
+ const boundary = findBoundary(buffer, i);
35350
+ if (boundary == null) {
35351
+ continue;
35352
+ }
35353
+ const chunk = buffer.slice(position, i);
35354
+ position = i + boundary.length;
35355
+ const event = parseEvent(chunk, this.decoder);
35356
+ if (event != null) {
35357
+ yield event;
35358
+ }
35359
+ }
35360
+ if (position > 0) {
35361
+ buffer = buffer.slice(position);
35362
+ position = 0;
35363
+ }
35364
+ }
35365
+ if (buffer.length > 0) {
35366
+ const event = parseEvent(buffer, this.decoder);
35367
+ if (event != null) {
35368
+ yield event;
35369
+ }
35370
+ }
35371
+ } catch (e) {
35372
+ if (e instanceof Error && e.name === "AbortError") {
35373
+ return;
35374
+ }
35375
+ throw e;
35376
+ } finally {
35377
+ reader.releaseLock();
35378
+ }
35379
+ }
35380
+ };
35381
+ });
35382
+
35181
35383
  // src/models/errors/sdkvalidationerror.ts
35182
35384
  function formatZodError(err, level = 0) {
35183
35385
  let pre = " ".repeat(level);
@@ -35273,6 +35475,9 @@ function jsonErr(codes, schema, options) {
35273
35475
  function json(codes, schema, options) {
35274
35476
  return { ...options, enc: "json", codes, schema };
35275
35477
  }
35478
+ function sse(codes, schema, options) {
35479
+ return { ...options, enc: "sse", codes, schema };
35480
+ }
35276
35481
  function nil(codes, schema, options) {
35277
35482
  return { ...options, enc: "nil", codes, schema };
35278
35483
  }
@@ -35319,7 +35524,7 @@ function match(...matchers) {
35319
35524
  raw = await response.text();
35320
35525
  break;
35321
35526
  case "sse":
35322
- raw = response.body;
35527
+ raw = response.body && matcher.sseSentinel ? discardSentinel(response.body, matcher.sseSentinel) : response.body;
35323
35528
  break;
35324
35529
  case "nil":
35325
35530
  raw = await discardResponseBody(response);
@@ -35395,6 +35600,7 @@ async function discardResponseBody(res) {
35395
35600
  var DEFAULT_CONTENT_TYPES, headerValRE;
35396
35601
  var init_matchers = __esm(() => {
35397
35602
  init_apierror();
35603
+ init_event_streams();
35398
35604
  init_http();
35399
35605
  init_schemas();
35400
35606
  DEFAULT_CONTENT_TYPES = {
@@ -35745,6 +35951,125 @@ var init_accesstokeninfo = __esm(() => {
35745
35951
  })(AccessTokenInfo$ ||= {});
35746
35952
  });
35747
35953
 
35954
+ // src/models/components/streamposition.ts
35955
+ var StreamPosition$inboundSchema, StreamPosition$outboundSchema, StreamPosition$;
35956
+ var init_streamposition = __esm(() => {
35957
+ init_lib();
35958
+ init_primitives();
35959
+ StreamPosition$inboundSchema = objectType({
35960
+ seq_num: numberType().int(),
35961
+ timestamp: numberType().int()
35962
+ }).transform((v2) => {
35963
+ return remap(v2, {
35964
+ seq_num: "seqNum"
35965
+ });
35966
+ });
35967
+ StreamPosition$outboundSchema = objectType({
35968
+ seqNum: numberType().int(),
35969
+ timestamp: numberType().int()
35970
+ }).transform((v2) => {
35971
+ return remap(v2, {
35972
+ seqNum: "seq_num"
35973
+ });
35974
+ });
35975
+ ((StreamPosition$) => {
35976
+ StreamPosition$.inboundSchema = StreamPosition$inboundSchema;
35977
+ StreamPosition$.outboundSchema = StreamPosition$outboundSchema;
35978
+ })(StreamPosition$ ||= {});
35979
+ });
35980
+
35981
+ // src/models/components/appendack.ts
35982
+ var AppendAck$inboundSchema, AppendAck$outboundSchema, AppendAck$;
35983
+ var init_appendack = __esm(() => {
35984
+ init_lib();
35985
+ init_streamposition();
35986
+ AppendAck$inboundSchema = objectType({
35987
+ end: StreamPosition$inboundSchema,
35988
+ start: StreamPosition$inboundSchema,
35989
+ tail: StreamPosition$inboundSchema
35990
+ });
35991
+ AppendAck$outboundSchema = objectType({
35992
+ end: StreamPosition$outboundSchema,
35993
+ start: StreamPosition$outboundSchema,
35994
+ tail: StreamPosition$outboundSchema
35995
+ });
35996
+ ((AppendAck$) => {
35997
+ AppendAck$.inboundSchema = AppendAck$inboundSchema;
35998
+ AppendAck$.outboundSchema = AppendAck$outboundSchema;
35999
+ })(AppendAck$ ||= {});
36000
+ });
36001
+
36002
+ // src/models/components/header.ts
36003
+ var Header$inboundSchema, Header$outboundSchema, Header$;
36004
+ var init_header = __esm(() => {
36005
+ init_lib();
36006
+ Header$inboundSchema = objectType({
36007
+ name: stringType(),
36008
+ value: stringType()
36009
+ });
36010
+ Header$outboundSchema = objectType({
36011
+ name: stringType(),
36012
+ value: stringType()
36013
+ });
36014
+ ((Header$) => {
36015
+ Header$.inboundSchema = Header$inboundSchema;
36016
+ Header$.outboundSchema = Header$outboundSchema;
36017
+ })(Header$ ||= {});
36018
+ });
36019
+
36020
+ // src/models/components/appendrecord.ts
36021
+ var AppendRecord$inboundSchema, AppendRecord$outboundSchema, AppendRecord$;
36022
+ var init_appendrecord = __esm(() => {
36023
+ init_lib();
36024
+ init_header();
36025
+ AppendRecord$inboundSchema = objectType({
36026
+ body: stringType().optional(),
36027
+ headers: arrayType(Header$inboundSchema).optional(),
36028
+ timestamp: nullableType(numberType().int()).optional()
36029
+ });
36030
+ AppendRecord$outboundSchema = objectType({
36031
+ body: stringType().optional(),
36032
+ headers: arrayType(Header$outboundSchema).optional(),
36033
+ timestamp: nullableType(numberType().int()).optional()
36034
+ });
36035
+ ((AppendRecord$) => {
36036
+ AppendRecord$.inboundSchema = AppendRecord$inboundSchema;
36037
+ AppendRecord$.outboundSchema = AppendRecord$outboundSchema;
36038
+ })(AppendRecord$ ||= {});
36039
+ });
36040
+
36041
+ // src/models/components/appendinput.ts
36042
+ var AppendInput$inboundSchema, AppendInput$outboundSchema, AppendInput$;
36043
+ var init_appendinput = __esm(() => {
36044
+ init_lib();
36045
+ init_primitives();
36046
+ init_appendrecord();
36047
+ AppendInput$inboundSchema = objectType({
36048
+ fencing_token: nullableType(stringType()).optional(),
36049
+ match_seq_num: nullableType(numberType().int()).optional(),
36050
+ records: arrayType(AppendRecord$inboundSchema)
36051
+ }).transform((v2) => {
36052
+ return remap(v2, {
36053
+ fencing_token: "fencingToken",
36054
+ match_seq_num: "matchSeqNum"
36055
+ });
36056
+ });
36057
+ AppendInput$outboundSchema = objectType({
36058
+ fencingToken: nullableType(stringType()).optional(),
36059
+ matchSeqNum: nullableType(numberType().int()).optional(),
36060
+ records: arrayType(AppendRecord$outboundSchema)
36061
+ }).transform((v2) => {
36062
+ return remap(v2, {
36063
+ fencingToken: "fencing_token",
36064
+ matchSeqNum: "match_seq_num"
36065
+ });
36066
+ });
36067
+ ((AppendInput$) => {
36068
+ AppendInput$.inboundSchema = AppendInput$inboundSchema;
36069
+ AppendInput$.outboundSchema = AppendInput$outboundSchema;
36070
+ })(AppendInput$ ||= {});
36071
+ });
36072
+
35748
36073
  // src/models/components/retentionpolicy.ts
35749
36074
  var One$inboundSchema, One$outboundSchema, One$, RetentionPolicy$inboundSchema, RetentionPolicy$outboundSchema, RetentionPolicy$;
35750
36075
  var init_retentionpolicy = __esm(() => {
@@ -35830,7 +36155,7 @@ var init_streamconfig = __esm(() => {
35830
36155
  StreamConfig$inboundSchema = objectType({
35831
36156
  retention_policy: nullableType(RetentionPolicy$inboundSchema).optional(),
35832
36157
  storage_class: nullableType(StorageClass$inboundSchema).optional(),
35833
- timestamping: TimestampingConfig$inboundSchema
36158
+ timestamping: nullableType(TimestampingConfig$inboundSchema).optional()
35834
36159
  }).transform((v2) => {
35835
36160
  return remap(v2, {
35836
36161
  retention_policy: "retentionPolicy",
@@ -35840,7 +36165,7 @@ var init_streamconfig = __esm(() => {
35840
36165
  StreamConfig$outboundSchema = objectType({
35841
36166
  retentionPolicy: nullableType(RetentionPolicy$outboundSchema).optional(),
35842
36167
  storageClass: nullableType(StorageClass$outboundSchema).optional(),
35843
- timestamping: TimestampingConfig$outboundSchema
36168
+ timestamping: nullableType(TimestampingConfig$outboundSchema).optional()
35844
36169
  }).transform((v2) => {
35845
36170
  return remap(v2, {
35846
36171
  retentionPolicy: "retention_policy",
@@ -35860,8 +36185,8 @@ var init_basinconfig = __esm(() => {
35860
36185
  init_primitives();
35861
36186
  init_streamconfig();
35862
36187
  BasinConfig$inboundSchema = objectType({
35863
- create_stream_on_append: nullableType(booleanType()).optional(),
35864
- create_stream_on_read: nullableType(booleanType()).optional(),
36188
+ create_stream_on_append: booleanType().optional(),
36189
+ create_stream_on_read: booleanType().optional(),
35865
36190
  default_stream_config: nullableType(StreamConfig$inboundSchema).optional()
35866
36191
  }).transform((v2) => {
35867
36192
  return remap(v2, {
@@ -35871,8 +36196,8 @@ var init_basinconfig = __esm(() => {
35871
36196
  });
35872
36197
  });
35873
36198
  BasinConfig$outboundSchema = objectType({
35874
- createStreamOnAppend: nullableType(booleanType()).optional(),
35875
- createStreamOnRead: nullableType(booleanType()).optional(),
36199
+ createStreamOnAppend: booleanType().optional(),
36200
+ createStreamOnRead: booleanType().optional(),
35876
36201
  defaultStreamConfig: nullableType(StreamConfig$outboundSchema).optional()
35877
36202
  }).transform((v2) => {
35878
36203
  return remap(v2, {
@@ -35971,7 +36296,7 @@ var init_streamreconfiguration = __esm(() => {
35971
36296
  StreamReconfiguration$inboundSchema = objectType({
35972
36297
  retention_policy: nullableType(RetentionPolicy$inboundSchema).optional(),
35973
36298
  storage_class: nullableType(StorageClass$inboundSchema).optional(),
35974
- timestamping: TimestampingReconfiguration$inboundSchema
36299
+ timestamping: nullableType(TimestampingReconfiguration$inboundSchema).optional()
35975
36300
  }).transform((v2) => {
35976
36301
  return remap(v2, {
35977
36302
  retention_policy: "retentionPolicy",
@@ -35981,7 +36306,7 @@ var init_streamreconfiguration = __esm(() => {
35981
36306
  StreamReconfiguration$outboundSchema = objectType({
35982
36307
  retentionPolicy: nullableType(RetentionPolicy$outboundSchema).optional(),
35983
36308
  storageClass: nullableType(StorageClass$outboundSchema).optional(),
35984
- timestamping: TimestampingReconfiguration$outboundSchema
36309
+ timestamping: nullableType(TimestampingReconfiguration$outboundSchema).optional()
35985
36310
  }).transform((v2) => {
35986
36311
  return remap(v2, {
35987
36312
  retentionPolicy: "retention_policy",
@@ -36028,50 +36353,6 @@ var init_basinreconfiguration = __esm(() => {
36028
36353
  })(BasinReconfiguration$ ||= {});
36029
36354
  });
36030
36355
 
36031
- // src/models/components/streamposition.ts
36032
- var StreamPosition$inboundSchema, StreamPosition$outboundSchema, StreamPosition$;
36033
- var init_streamposition = __esm(() => {
36034
- init_lib();
36035
- init_primitives();
36036
- StreamPosition$inboundSchema = objectType({
36037
- seq_num: numberType().int(),
36038
- timestamp: numberType().int()
36039
- }).transform((v2) => {
36040
- return remap(v2, {
36041
- seq_num: "seqNum"
36042
- });
36043
- });
36044
- StreamPosition$outboundSchema = objectType({
36045
- seqNum: numberType().int(),
36046
- timestamp: numberType().int()
36047
- }).transform((v2) => {
36048
- return remap(v2, {
36049
- seqNum: "seq_num"
36050
- });
36051
- });
36052
- ((StreamPosition$) => {
36053
- StreamPosition$.inboundSchema = StreamPosition$inboundSchema;
36054
- StreamPosition$.outboundSchema = StreamPosition$outboundSchema;
36055
- })(StreamPosition$ ||= {});
36056
- });
36057
-
36058
- // src/models/components/checktailresponse.ts
36059
- var CheckTailResponse$inboundSchema, CheckTailResponse$outboundSchema, CheckTailResponse$;
36060
- var init_checktailresponse = __esm(() => {
36061
- init_lib();
36062
- init_streamposition();
36063
- CheckTailResponse$inboundSchema = objectType({
36064
- tail: StreamPosition$inboundSchema
36065
- });
36066
- CheckTailResponse$outboundSchema = objectType({
36067
- tail: StreamPosition$outboundSchema
36068
- });
36069
- ((CheckTailResponse$) => {
36070
- CheckTailResponse$.inboundSchema = CheckTailResponse$inboundSchema;
36071
- CheckTailResponse$.outboundSchema = CheckTailResponse$outboundSchema;
36072
- })(CheckTailResponse$ ||= {});
36073
- });
36074
-
36075
36356
  // src/models/components/createbasinrequest.ts
36076
36357
  var Scope$inboundSchema, Scope$outboundSchema, Scope$, CreateBasinRequest$inboundSchema, CreateBasinRequest$outboundSchema, CreateBasinRequest$;
36077
36358
  var init_createbasinrequest = __esm(() => {
@@ -36085,10 +36366,12 @@ var init_createbasinrequest = __esm(() => {
36085
36366
  Scope$.outboundSchema = Scope$outboundSchema;
36086
36367
  })(Scope$ ||= {});
36087
36368
  CreateBasinRequest$inboundSchema = objectType({
36369
+ basin: stringType(),
36088
36370
  config: nullableType(BasinConfig$inboundSchema).optional(),
36089
36371
  scope: BasinScope$inboundSchema.optional()
36090
36372
  });
36091
36373
  CreateBasinRequest$outboundSchema = objectType({
36374
+ basin: stringType(),
36092
36375
  config: nullableType(BasinConfig$outboundSchema).optional(),
36093
36376
  scope: BasinScope$outboundSchema.optional()
36094
36377
  });
@@ -36098,6 +36381,51 @@ var init_createbasinrequest = __esm(() => {
36098
36381
  })(CreateBasinRequest$ ||= {});
36099
36382
  });
36100
36383
 
36384
+ // src/models/components/createorreconfigurebasinrequest.ts
36385
+ var CreateOrReconfigureBasinRequestScope$inboundSchema, CreateOrReconfigureBasinRequestScope$outboundSchema, CreateOrReconfigureBasinRequestScope$, CreateOrReconfigureBasinRequest$inboundSchema, CreateOrReconfigureBasinRequest$outboundSchema, CreateOrReconfigureBasinRequest$;
36386
+ var init_createorreconfigurebasinrequest = __esm(() => {
36387
+ init_lib();
36388
+ init_basinconfig();
36389
+ init_basinscope();
36390
+ CreateOrReconfigureBasinRequestScope$inboundSchema = BasinScope$inboundSchema;
36391
+ CreateOrReconfigureBasinRequestScope$outboundSchema = BasinScope$outboundSchema;
36392
+ ((CreateOrReconfigureBasinRequestScope$) => {
36393
+ CreateOrReconfigureBasinRequestScope$.inboundSchema = CreateOrReconfigureBasinRequestScope$inboundSchema;
36394
+ CreateOrReconfigureBasinRequestScope$.outboundSchema = CreateOrReconfigureBasinRequestScope$outboundSchema;
36395
+ })(CreateOrReconfigureBasinRequestScope$ ||= {});
36396
+ CreateOrReconfigureBasinRequest$inboundSchema = objectType({
36397
+ config: nullableType(BasinConfig$inboundSchema).optional(),
36398
+ scope: BasinScope$inboundSchema.optional()
36399
+ });
36400
+ CreateOrReconfigureBasinRequest$outboundSchema = objectType({
36401
+ config: nullableType(BasinConfig$outboundSchema).optional(),
36402
+ scope: BasinScope$outboundSchema.optional()
36403
+ });
36404
+ ((CreateOrReconfigureBasinRequest$) => {
36405
+ CreateOrReconfigureBasinRequest$.inboundSchema = CreateOrReconfigureBasinRequest$inboundSchema;
36406
+ CreateOrReconfigureBasinRequest$.outboundSchema = CreateOrReconfigureBasinRequest$outboundSchema;
36407
+ })(CreateOrReconfigureBasinRequest$ ||= {});
36408
+ });
36409
+
36410
+ // src/models/components/createstreamrequest.ts
36411
+ var CreateStreamRequest$inboundSchema, CreateStreamRequest$outboundSchema, CreateStreamRequest$;
36412
+ var init_createstreamrequest = __esm(() => {
36413
+ init_lib();
36414
+ init_streamconfig();
36415
+ CreateStreamRequest$inboundSchema = objectType({
36416
+ config: nullableType(StreamConfig$inboundSchema).optional(),
36417
+ stream: stringType()
36418
+ });
36419
+ CreateStreamRequest$outboundSchema = objectType({
36420
+ config: nullableType(StreamConfig$outboundSchema).optional(),
36421
+ stream: stringType()
36422
+ });
36423
+ ((CreateStreamRequest$) => {
36424
+ CreateStreamRequest$.inboundSchema = CreateStreamRequest$inboundSchema;
36425
+ CreateStreamRequest$.outboundSchema = CreateStreamRequest$outboundSchema;
36426
+ })(CreateStreamRequest$ ||= {});
36427
+ });
36428
+
36101
36429
  // src/models/components/issueaccesstokenresponse.ts
36102
36430
  var IssueAccessTokenResponse$inboundSchema, IssueAccessTokenResponse$outboundSchema, IssueAccessTokenResponse$;
36103
36431
  var init_issueaccesstokenresponse = __esm(() => {
@@ -36240,6 +36568,138 @@ var init_liststreamsresponse = __esm(() => {
36240
36568
  })(ListStreamsResponse$ ||= {});
36241
36569
  });
36242
36570
 
36571
+ // src/models/components/sequencedrecord.ts
36572
+ var SequencedRecord$inboundSchema, SequencedRecord$outboundSchema, SequencedRecord$;
36573
+ var init_sequencedrecord = __esm(() => {
36574
+ init_lib();
36575
+ init_primitives();
36576
+ init_header();
36577
+ SequencedRecord$inboundSchema = objectType({
36578
+ body: stringType().optional(),
36579
+ headers: arrayType(Header$inboundSchema).optional(),
36580
+ seq_num: numberType().int(),
36581
+ timestamp: numberType().int()
36582
+ }).transform((v2) => {
36583
+ return remap(v2, {
36584
+ seq_num: "seqNum"
36585
+ });
36586
+ });
36587
+ SequencedRecord$outboundSchema = objectType({
36588
+ body: stringType().optional(),
36589
+ headers: arrayType(Header$outboundSchema).optional(),
36590
+ seqNum: numberType().int(),
36591
+ timestamp: numberType().int()
36592
+ }).transform((v2) => {
36593
+ return remap(v2, {
36594
+ seqNum: "seq_num"
36595
+ });
36596
+ });
36597
+ ((SequencedRecord$) => {
36598
+ SequencedRecord$.inboundSchema = SequencedRecord$inboundSchema;
36599
+ SequencedRecord$.outboundSchema = SequencedRecord$outboundSchema;
36600
+ })(SequencedRecord$ ||= {});
36601
+ });
36602
+
36603
+ // src/models/components/readbatch.ts
36604
+ var ReadBatch$inboundSchema, ReadBatch$outboundSchema, ReadBatch$;
36605
+ var init_readbatch = __esm(() => {
36606
+ init_lib();
36607
+ init_sequencedrecord();
36608
+ ReadBatch$inboundSchema = objectType({
36609
+ records: arrayType(SequencedRecord$inboundSchema)
36610
+ });
36611
+ ReadBatch$outboundSchema = objectType({
36612
+ records: arrayType(SequencedRecord$outboundSchema)
36613
+ });
36614
+ ((ReadBatch$) => {
36615
+ ReadBatch$.inboundSchema = ReadBatch$inboundSchema;
36616
+ ReadBatch$.outboundSchema = ReadBatch$outboundSchema;
36617
+ })(ReadBatch$ ||= {});
36618
+ });
36619
+
36620
+ // src/models/components/readevent.ts
36621
+ var Ping$inboundSchema, Ping$outboundSchema, Ping$, ErrorT$inboundSchema, ErrorT$outboundSchema, ErrorT$, Batch$inboundSchema, Batch$outboundSchema, Batch$, ReadEvent$inboundSchema, ReadEvent$outboundSchema, ReadEvent$;
36622
+ var init_readevent = __esm(() => {
36623
+ init_lib();
36624
+ init_readbatch();
36625
+ Ping$inboundSchema = objectType({
36626
+ data: stringType(),
36627
+ event: stringType()
36628
+ });
36629
+ Ping$outboundSchema = objectType({
36630
+ data: stringType(),
36631
+ event: stringType()
36632
+ });
36633
+ ((Ping$) => {
36634
+ Ping$.inboundSchema = Ping$inboundSchema;
36635
+ Ping$.outboundSchema = Ping$outboundSchema;
36636
+ })(Ping$ ||= {});
36637
+ ErrorT$inboundSchema = objectType({
36638
+ data: stringType(),
36639
+ event: stringType()
36640
+ });
36641
+ ErrorT$outboundSchema = objectType({
36642
+ data: stringType(),
36643
+ event: stringType()
36644
+ });
36645
+ ((ErrorT$) => {
36646
+ ErrorT$.inboundSchema = ErrorT$inboundSchema;
36647
+ ErrorT$.outboundSchema = ErrorT$outboundSchema;
36648
+ })(ErrorT$ ||= {});
36649
+ Batch$inboundSchema = objectType({
36650
+ data: stringType().transform((v2, ctx) => {
36651
+ try {
36652
+ return JSON.parse(v2);
36653
+ } catch (err) {
36654
+ ctx.addIssue({
36655
+ code: ZodIssueCode.custom,
36656
+ message: `malformed json: ${err}`
36657
+ });
36658
+ return NEVER;
36659
+ }
36660
+ }).pipe(ReadBatch$inboundSchema),
36661
+ event: stringType()
36662
+ });
36663
+ Batch$outboundSchema = objectType({
36664
+ data: ReadBatch$outboundSchema,
36665
+ event: stringType()
36666
+ });
36667
+ ((Batch$) => {
36668
+ Batch$.inboundSchema = Batch$inboundSchema;
36669
+ Batch$.outboundSchema = Batch$outboundSchema;
36670
+ })(Batch$ ||= {});
36671
+ ReadEvent$inboundSchema = unionType([
36672
+ lazyType(() => Batch$inboundSchema),
36673
+ lazyType(() => ErrorT$inboundSchema),
36674
+ lazyType(() => Ping$inboundSchema)
36675
+ ]);
36676
+ ReadEvent$outboundSchema = unionType([
36677
+ lazyType(() => Batch$outboundSchema),
36678
+ lazyType(() => ErrorT$outboundSchema),
36679
+ lazyType(() => Ping$outboundSchema)
36680
+ ]);
36681
+ ((ReadEvent$) => {
36682
+ ReadEvent$.inboundSchema = ReadEvent$inboundSchema;
36683
+ ReadEvent$.outboundSchema = ReadEvent$outboundSchema;
36684
+ })(ReadEvent$ ||= {});
36685
+ });
36686
+
36687
+ // src/models/components/s2format.ts
36688
+ var S2Format, S2Format$inboundSchema, S2Format$outboundSchema, S2Format$;
36689
+ var init_s2format = __esm(() => {
36690
+ init_lib();
36691
+ S2Format = {
36692
+ Json: "json",
36693
+ JsonBinsafe: "json-binsafe"
36694
+ };
36695
+ S2Format$inboundSchema = nativeEnumType(S2Format);
36696
+ S2Format$outboundSchema = S2Format$inboundSchema;
36697
+ ((S2Format$) => {
36698
+ S2Format$.inboundSchema = S2Format$inboundSchema;
36699
+ S2Format$.outboundSchema = S2Format$outboundSchema;
36700
+ })(S2Format$ ||= {});
36701
+ });
36702
+
36243
36703
  // src/models/components/security.ts
36244
36704
  var Security$inboundSchema, Security$outboundSchema, Security$;
36245
36705
  var init_security2 = __esm(() => {
@@ -36265,44 +36725,147 @@ var init_security2 = __esm(() => {
36265
36725
  })(Security$ ||= {});
36266
36726
  });
36267
36727
 
36728
+ // src/models/components/tailresponse.ts
36729
+ var TailResponse$inboundSchema, TailResponse$outboundSchema, TailResponse$;
36730
+ var init_tailresponse = __esm(() => {
36731
+ init_lib();
36732
+ init_streamposition();
36733
+ TailResponse$inboundSchema = objectType({
36734
+ tail: StreamPosition$inboundSchema
36735
+ });
36736
+ TailResponse$outboundSchema = objectType({
36737
+ tail: StreamPosition$outboundSchema
36738
+ });
36739
+ ((TailResponse$) => {
36740
+ TailResponse$.inboundSchema = TailResponse$inboundSchema;
36741
+ TailResponse$.outboundSchema = TailResponse$outboundSchema;
36742
+ })(TailResponse$ ||= {});
36743
+ });
36744
+
36268
36745
  // src/models/components/index.ts
36269
36746
  var init_components = __esm(() => {
36270
36747
  init_accesstokeninfo();
36271
36748
  init_accesstokenscope();
36749
+ init_appendack();
36750
+ init_appendinput();
36751
+ init_appendrecord();
36272
36752
  init_basinconfig();
36273
36753
  init_basininfo();
36274
36754
  init_basinreconfiguration();
36275
36755
  init_basinscope();
36276
36756
  init_basinstate();
36277
- init_checktailresponse();
36278
36757
  init_createbasinrequest();
36758
+ init_createorreconfigurebasinrequest();
36759
+ init_createstreamrequest();
36760
+ init_header();
36279
36761
  init_issueaccesstokenresponse();
36280
36762
  init_listaccesstokensresponse();
36281
36763
  init_listbasinsresponse();
36282
36764
  init_liststreamsresponse();
36283
36765
  init_operation();
36284
36766
  init_permittedoperationgroups();
36767
+ init_readbatch();
36768
+ init_readevent();
36285
36769
  init_readwritepermissions();
36286
36770
  init_resourceset();
36287
36771
  init_retentionpolicy();
36772
+ init_s2format();
36288
36773
  init_security2();
36774
+ init_sequencedrecord();
36289
36775
  init_storageclass();
36290
36776
  init_streamconfig();
36291
36777
  init_streaminfo();
36292
36778
  init_streamposition();
36293
36779
  init_streamreconfiguration();
36780
+ init_tailresponse();
36294
36781
  init_timestampingconfig();
36295
36782
  init_timestampingmode();
36296
36783
  init_timestampingreconfiguration();
36297
36784
  });
36298
36785
 
36299
- // src/models/errors/errorresponse.ts
36300
- var ErrorResponse, ErrorResponse$inboundSchema, ErrorResponse$outboundSchema, ErrorResponse$;
36301
- var init_errorresponse = __esm(() => {
36786
+ // src/models/errors/appendconditionfailed.ts
36787
+ var Two, One, Two$inboundSchema, Two$outboundSchema, Two$, One$inboundSchema2, One$outboundSchema2, One$2, AppendConditionFailed$inboundSchema, AppendConditionFailed$outboundSchema, AppendConditionFailed$;
36788
+ var init_appendconditionfailed = __esm(() => {
36302
36789
  init_lib();
36303
- ErrorResponse = class ErrorResponse extends Error {
36304
- code;
36305
- error;
36790
+ init_primitives();
36791
+ Two = class Two extends Error {
36792
+ seqNumMismatch;
36793
+ data$;
36794
+ constructor(err) {
36795
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36796
+ super(message);
36797
+ this.data$ = err;
36798
+ this.seqNumMismatch = err.seqNumMismatch;
36799
+ this.name = "Two";
36800
+ }
36801
+ };
36802
+ One = class One extends Error {
36803
+ fencingTokenMismatch;
36804
+ data$;
36805
+ constructor(err) {
36806
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36807
+ super(message);
36808
+ this.data$ = err;
36809
+ this.fencingTokenMismatch = err.fencingTokenMismatch;
36810
+ this.name = "One";
36811
+ }
36812
+ };
36813
+ Two$inboundSchema = objectType({
36814
+ SeqNumMismatch: numberType().int()
36815
+ }).transform((v2) => {
36816
+ const remapped = remap(v2, {
36817
+ SeqNumMismatch: "seqNumMismatch"
36818
+ });
36819
+ return new Two(remapped);
36820
+ });
36821
+ Two$outboundSchema = instanceOfType(Two).transform((v2) => v2.data$).pipe(objectType({
36822
+ seqNumMismatch: numberType().int()
36823
+ }).transform((v2) => {
36824
+ return remap(v2, {
36825
+ seqNumMismatch: "SeqNumMismatch"
36826
+ });
36827
+ }));
36828
+ ((Two$) => {
36829
+ Two$.inboundSchema = Two$inboundSchema;
36830
+ Two$.outboundSchema = Two$outboundSchema;
36831
+ })(Two$ ||= {});
36832
+ One$inboundSchema2 = objectType({
36833
+ FencingTokenMismatch: stringType()
36834
+ }).transform((v2) => {
36835
+ const remapped = remap(v2, {
36836
+ FencingTokenMismatch: "fencingTokenMismatch"
36837
+ });
36838
+ return new One(remapped);
36839
+ });
36840
+ One$outboundSchema2 = instanceOfType(One).transform((v2) => v2.data$).pipe(objectType({
36841
+ fencingTokenMismatch: stringType()
36842
+ }).transform((v2) => {
36843
+ return remap(v2, {
36844
+ fencingTokenMismatch: "FencingTokenMismatch"
36845
+ });
36846
+ }));
36847
+ ((One$) => {
36848
+ One$.inboundSchema = One$inboundSchema2;
36849
+ One$.outboundSchema = One$outboundSchema2;
36850
+ })(One$2 ||= {});
36851
+ AppendConditionFailed$inboundSchema = unionType([lazyType(() => One$inboundSchema2), lazyType(() => Two$inboundSchema)]);
36852
+ AppendConditionFailed$outboundSchema = unionType([
36853
+ lazyType(() => One$outboundSchema2),
36854
+ lazyType(() => Two$outboundSchema)
36855
+ ]);
36856
+ ((AppendConditionFailed$) => {
36857
+ AppendConditionFailed$.inboundSchema = AppendConditionFailed$inboundSchema;
36858
+ AppendConditionFailed$.outboundSchema = AppendConditionFailed$outboundSchema;
36859
+ })(AppendConditionFailed$ ||= {});
36860
+ });
36861
+
36862
+ // src/models/errors/errorresponse.ts
36863
+ var ErrorResponse, ErrorResponse$inboundSchema, ErrorResponse$outboundSchema, ErrorResponse$;
36864
+ var init_errorresponse = __esm(() => {
36865
+ init_lib();
36866
+ ErrorResponse = class ErrorResponse extends Error {
36867
+ code;
36868
+ error;
36306
36869
  data$;
36307
36870
  constructor(err) {
36308
36871
  const message = err.error || "API error occurred";
@@ -36332,6 +36895,35 @@ var init_errorresponse = __esm(() => {
36332
36895
  })(ErrorResponse$ ||= {});
36333
36896
  });
36334
36897
 
36898
+ // src/models/errors/notfounderror.ts
36899
+ var NotFoundError, NotFoundError$inboundSchema, NotFoundError$outboundSchema, NotFoundError$;
36900
+ var init_notfounderror = __esm(() => {
36901
+ init_lib();
36902
+ NotFoundError = class NotFoundError extends Error {
36903
+ error;
36904
+ data$;
36905
+ constructor(err) {
36906
+ const message = err.error || "API error occurred";
36907
+ super(message);
36908
+ this.data$ = err;
36909
+ this.error = err.error;
36910
+ this.name = "NotFoundError";
36911
+ }
36912
+ };
36913
+ NotFoundError$inboundSchema = objectType({
36914
+ error: stringType()
36915
+ }).transform((v2) => {
36916
+ return new NotFoundError(v2);
36917
+ });
36918
+ NotFoundError$outboundSchema = instanceOfType(NotFoundError).transform((v2) => v2.data$).pipe(objectType({
36919
+ error: stringType()
36920
+ }));
36921
+ ((NotFoundError$) => {
36922
+ NotFoundError$.inboundSchema = NotFoundError$inboundSchema;
36923
+ NotFoundError$.outboundSchema = NotFoundError$outboundSchema;
36924
+ })(NotFoundError$ ||= {});
36925
+ });
36926
+
36335
36927
  // src/models/errors/retryableerror.ts
36336
36928
  var RetryableError, RetryableError$inboundSchema, RetryableError$outboundSchema, RetryableError$;
36337
36929
  var init_retryableerror = __esm(() => {
@@ -36361,13 +36953,46 @@ var init_retryableerror = __esm(() => {
36361
36953
  })(RetryableError$ ||= {});
36362
36954
  });
36363
36955
 
36956
+ // src/models/errors/tailresponse.ts
36957
+ var TailResponse, TailResponse$inboundSchema2, TailResponse$outboundSchema2, TailResponse$2;
36958
+ var init_tailresponse2 = __esm(() => {
36959
+ init_lib();
36960
+ init_components();
36961
+ TailResponse = class TailResponse extends Error {
36962
+ tail;
36963
+ data$;
36964
+ constructor(err) {
36965
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36966
+ super(message);
36967
+ this.data$ = err;
36968
+ this.tail = err.tail;
36969
+ this.name = "TailResponse";
36970
+ }
36971
+ };
36972
+ TailResponse$inboundSchema2 = objectType({
36973
+ tail: StreamPosition$inboundSchema
36974
+ }).transform((v2) => {
36975
+ return new TailResponse(v2);
36976
+ });
36977
+ TailResponse$outboundSchema2 = instanceOfType(TailResponse).transform((v2) => v2.data$).pipe(objectType({
36978
+ tail: StreamPosition$outboundSchema
36979
+ }));
36980
+ ((TailResponse$) => {
36981
+ TailResponse$.inboundSchema = TailResponse$inboundSchema2;
36982
+ TailResponse$.outboundSchema = TailResponse$outboundSchema2;
36983
+ })(TailResponse$2 ||= {});
36984
+ });
36985
+
36364
36986
  // src/models/errors/index.ts
36365
36987
  var init_errors = __esm(() => {
36366
36988
  init_apierror();
36989
+ init_appendconditionfailed();
36367
36990
  init_errorresponse();
36368
36991
  init_httpclienterrors();
36992
+ init_notfounderror();
36369
36993
  init_retryableerror();
36370
36994
  init_sdkvalidationerror();
36995
+ init_tailresponse2();
36371
36996
  });
36372
36997
 
36373
36998
  // src/types/async.ts
@@ -36439,7 +37064,7 @@ async function $do(client, request, options) {
36439
37064
  const req = requestRes.value;
36440
37065
  const doResult = await client._do(req, {
36441
37066
  context,
36442
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37067
+ errorCodes: ["400", "403", "409", "499", "4XX", "500", "503", "504", "5XX"],
36443
37068
  retryConfig: context.retryConfig,
36444
37069
  retryCodes: context.retryCodes
36445
37070
  });
@@ -36450,7 +37075,7 @@ async function $do(client, request, options) {
36450
37075
  const responseFields = {
36451
37076
  HttpMeta: { Response: response, Request: req }
36452
37077
  };
36453
- const [result] = await match(json(201, IssueAccessTokenResponse$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37078
+ const [result] = await match(json(201, IssueAccessTokenResponse$inboundSchema), jsonErr([400, 403, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
36454
37079
  if (!result.ok) {
36455
37080
  return [result, { status: "complete", request: req, response }];
36456
37081
  }
@@ -36496,6 +37121,41 @@ var init_accessTokensIssueAccessToken2 = __esm(() => {
36496
37121
  };
36497
37122
  });
36498
37123
 
37124
+ // src/models/operations/append.ts
37125
+ var AppendServerList, AppendRequest$inboundSchema, AppendRequest$outboundSchema, AppendRequest$;
37126
+ var init_append = __esm(() => {
37127
+ init_lib();
37128
+ init_primitives();
37129
+ init_components();
37130
+ AppendServerList = [
37131
+ "https://{basin}.b.aws.s2.dev/v1"
37132
+ ];
37133
+ AppendRequest$inboundSchema = objectType({
37134
+ stream: stringType(),
37135
+ "s2-format": S2Format$inboundSchema.optional(),
37136
+ AppendInput: AppendInput$inboundSchema
37137
+ }).transform((v2) => {
37138
+ return remap(v2, {
37139
+ "s2-format": "s2Format",
37140
+ AppendInput: "appendInput"
37141
+ });
37142
+ });
37143
+ AppendRequest$outboundSchema = objectType({
37144
+ stream: stringType(),
37145
+ s2Format: S2Format$outboundSchema.optional(),
37146
+ appendInput: AppendInput$outboundSchema
37147
+ }).transform((v2) => {
37148
+ return remap(v2, {
37149
+ s2Format: "s2-format",
37150
+ appendInput: "AppendInput"
37151
+ });
37152
+ });
37153
+ ((AppendRequest$) => {
37154
+ AppendRequest$.inboundSchema = AppendRequest$inboundSchema;
37155
+ AppendRequest$.outboundSchema = AppendRequest$outboundSchema;
37156
+ })(AppendRequest$ ||= {});
37157
+ });
37158
+
36499
37159
  // src/models/operations/checktail.ts
36500
37160
  var CheckTailServerList, CheckTailRequest$inboundSchema, CheckTailRequest$outboundSchema, CheckTailRequest$;
36501
37161
  var init_checktail = __esm(() => {
@@ -36516,35 +37176,35 @@ var init_checktail = __esm(() => {
36516
37176
  });
36517
37177
 
36518
37178
  // src/models/operations/createorreconfigurebasin.ts
36519
- var CreateOrReconfigureBasinRequest$inboundSchema, CreateOrReconfigureBasinRequest$outboundSchema, CreateOrReconfigureBasinRequest$;
37179
+ var CreateOrReconfigureBasinRequest$inboundSchema2, CreateOrReconfigureBasinRequest$outboundSchema2, CreateOrReconfigureBasinRequest$2;
36520
37180
  var init_createorreconfigurebasin = __esm(() => {
36521
37181
  init_lib();
36522
37182
  init_primitives();
36523
37183
  init_components();
36524
- CreateOrReconfigureBasinRequest$inboundSchema = objectType({
36525
- basin: stringType(),
37184
+ CreateOrReconfigureBasinRequest$inboundSchema2 = objectType({
36526
37185
  "s2-request-token": stringType().optional(),
36527
- CreateBasinRequest: CreateBasinRequest$inboundSchema
37186
+ basin: stringType(),
37187
+ CreateOrReconfigureBasinRequest: nullableType(CreateOrReconfigureBasinRequest$inboundSchema).optional()
36528
37188
  }).transform((v2) => {
36529
37189
  return remap(v2, {
36530
37190
  "s2-request-token": "s2RequestToken",
36531
- CreateBasinRequest: "createBasinRequest"
37191
+ CreateOrReconfigureBasinRequest: "createOrReconfigureBasinRequest"
36532
37192
  });
36533
37193
  });
36534
- CreateOrReconfigureBasinRequest$outboundSchema = objectType({
36535
- basin: stringType(),
37194
+ CreateOrReconfigureBasinRequest$outboundSchema2 = objectType({
36536
37195
  s2RequestToken: stringType().optional(),
36537
- createBasinRequest: CreateBasinRequest$outboundSchema
37196
+ basin: stringType(),
37197
+ createOrReconfigureBasinRequest: nullableType(CreateOrReconfigureBasinRequest$outboundSchema).optional()
36538
37198
  }).transform((v2) => {
36539
37199
  return remap(v2, {
36540
37200
  s2RequestToken: "s2-request-token",
36541
- createBasinRequest: "CreateBasinRequest"
37201
+ createOrReconfigureBasinRequest: "CreateOrReconfigureBasinRequest"
36542
37202
  });
36543
37203
  });
36544
37204
  ((CreateOrReconfigureBasinRequest$) => {
36545
- CreateOrReconfigureBasinRequest$.inboundSchema = CreateOrReconfigureBasinRequest$inboundSchema;
36546
- CreateOrReconfigureBasinRequest$.outboundSchema = CreateOrReconfigureBasinRequest$outboundSchema;
36547
- })(CreateOrReconfigureBasinRequest$ ||= {});
37205
+ CreateOrReconfigureBasinRequest$.inboundSchema = CreateOrReconfigureBasinRequest$inboundSchema2;
37206
+ CreateOrReconfigureBasinRequest$.outboundSchema = CreateOrReconfigureBasinRequest$outboundSchema2;
37207
+ })(CreateOrReconfigureBasinRequest$2 ||= {});
36548
37208
  });
36549
37209
 
36550
37210
  // src/models/operations/createorreconfigurestream.ts
@@ -36559,7 +37219,7 @@ var init_createorreconfigurestream = __esm(() => {
36559
37219
  CreateOrReconfigureStreamRequest$inboundSchema = objectType({
36560
37220
  stream: stringType(),
36561
37221
  "s2-request-token": stringType().optional(),
36562
- StreamConfig: StreamConfig$inboundSchema
37222
+ StreamConfig: nullableType(StreamConfig$inboundSchema).optional()
36563
37223
  }).transform((v2) => {
36564
37224
  return remap(v2, {
36565
37225
  "s2-request-token": "s2RequestToken",
@@ -36569,7 +37229,7 @@ var init_createorreconfigurestream = __esm(() => {
36569
37229
  CreateOrReconfigureStreamRequest$outboundSchema = objectType({
36570
37230
  stream: stringType(),
36571
37231
  s2RequestToken: stringType().optional(),
36572
- streamConfig: StreamConfig$outboundSchema
37232
+ streamConfig: nullableType(StreamConfig$outboundSchema).optional()
36573
37233
  }).transform((v2) => {
36574
37234
  return remap(v2, {
36575
37235
  s2RequestToken: "s2-request-token",
@@ -36582,6 +37242,14 @@ var init_createorreconfigurestream = __esm(() => {
36582
37242
  })(CreateOrReconfigureStreamRequest$ ||= {});
36583
37243
  });
36584
37244
 
37245
+ // src/models/operations/createstream.ts
37246
+ var CreateStreamServerList;
37247
+ var init_createstream = __esm(() => {
37248
+ CreateStreamServerList = [
37249
+ "https://{basin}.b.aws.s2.dev/v1"
37250
+ ];
37251
+ });
37252
+
36585
37253
  // src/models/operations/deletebasin.ts
36586
37254
  var DeleteBasinRequest$inboundSchema, DeleteBasinRequest$outboundSchema, DeleteBasinRequest$;
36587
37255
  var init_deletebasin = __esm(() => {
@@ -36780,6 +37448,69 @@ var init_liststreams = __esm(() => {
36780
37448
  })(ListStreamsResponse$2 ||= {});
36781
37449
  });
36782
37450
 
37451
+ // src/models/operations/read.ts
37452
+ var ReadServerList, ReadRequest$inboundSchema, ReadRequest$outboundSchema, ReadRequest$, ReadResponse$inboundSchema, ReadResponse$outboundSchema, ReadResponse$;
37453
+ var init_read = __esm(() => {
37454
+ init_lib();
37455
+ init_event_streams();
37456
+ init_primitives();
37457
+ init_components();
37458
+ ReadServerList = [
37459
+ "https://{basin}.b.aws.s2.dev/v1"
37460
+ ];
37461
+ ReadRequest$inboundSchema = objectType({
37462
+ stream: stringType(),
37463
+ "s2-format": S2Format$inboundSchema.optional(),
37464
+ seq_num: numberType().int().optional(),
37465
+ timestamp: numberType().int().optional(),
37466
+ tail_offset: numberType().int().optional(),
37467
+ count: numberType().int().optional(),
37468
+ bytes: numberType().int().optional()
37469
+ }).transform((v2) => {
37470
+ return remap(v2, {
37471
+ "s2-format": "s2Format",
37472
+ seq_num: "seqNum",
37473
+ tail_offset: "tailOffset"
37474
+ });
37475
+ });
37476
+ ReadRequest$outboundSchema = objectType({
37477
+ stream: stringType(),
37478
+ s2Format: S2Format$outboundSchema.optional(),
37479
+ seqNum: numberType().int().optional(),
37480
+ timestamp: numberType().int().optional(),
37481
+ tailOffset: numberType().int().optional(),
37482
+ count: numberType().int().optional(),
37483
+ bytes: numberType().int().optional()
37484
+ }).transform((v2) => {
37485
+ return remap(v2, {
37486
+ s2Format: "s2-format",
37487
+ seqNum: "seq_num",
37488
+ tailOffset: "tail_offset"
37489
+ });
37490
+ });
37491
+ ((ReadRequest$) => {
37492
+ ReadRequest$.inboundSchema = ReadRequest$inboundSchema;
37493
+ ReadRequest$.outboundSchema = ReadRequest$outboundSchema;
37494
+ })(ReadRequest$ ||= {});
37495
+ ReadResponse$inboundSchema = unionType([
37496
+ ReadBatch$inboundSchema,
37497
+ instanceOfType(ReadableStream).transform((stream) => {
37498
+ return new EventStream({
37499
+ stream,
37500
+ decoder(rawEvent) {
37501
+ const schema = ReadEvent$inboundSchema;
37502
+ return schema.parse(rawEvent);
37503
+ }
37504
+ });
37505
+ })
37506
+ ]);
37507
+ ReadResponse$outboundSchema = unionType([ReadBatch$outboundSchema, neverType()]);
37508
+ ((ReadResponse$) => {
37509
+ ReadResponse$.inboundSchema = ReadResponse$inboundSchema;
37510
+ ReadResponse$.outboundSchema = ReadResponse$outboundSchema;
37511
+ })(ReadResponse$ ||= {});
37512
+ });
37513
+
36783
37514
  // src/models/operations/reconfigurebasin.ts
36784
37515
  var ReconfigureBasinRequest$inboundSchema, ReconfigureBasinRequest$outboundSchema, ReconfigureBasinRequest$;
36785
37516
  var init_reconfigurebasin = __esm(() => {
@@ -36857,9 +37588,11 @@ var init_revokeaccesstoken = __esm(() => {
36857
37588
 
36858
37589
  // src/models/operations/index.ts
36859
37590
  var init_operations = __esm(() => {
37591
+ init_append();
36860
37592
  init_checktail();
36861
37593
  init_createorreconfigurebasin();
36862
37594
  init_createorreconfigurestream();
37595
+ init_createstream();
36863
37596
  init_deletebasin();
36864
37597
  init_deletestream();
36865
37598
  init_getbasinconfig();
@@ -36867,6 +37600,7 @@ var init_operations = __esm(() => {
36867
37600
  init_listaccesstokens();
36868
37601
  init_listbasins();
36869
37602
  init_liststreams();
37603
+ init_read();
36870
37604
  init_reconfigurebasin();
36871
37605
  init_reconfigurestream();
36872
37606
  init_revokeaccesstoken();
@@ -36920,7 +37654,7 @@ async function $do2(client, request, options) {
36920
37654
  const req = requestRes.value;
36921
37655
  const doResult = await client._do(req, {
36922
37656
  context,
36923
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37657
+ errorCodes: ["400", "403", "499", "4XX", "500", "503", "504", "5XX"],
36924
37658
  retryConfig: context.retryConfig,
36925
37659
  retryCodes: context.retryCodes
36926
37660
  });
@@ -36931,7 +37665,7 @@ async function $do2(client, request, options) {
36931
37665
  const responseFields = {
36932
37666
  HttpMeta: { Response: response, Request: req }
36933
37667
  };
36934
- const [result] = await match(json(200, ListAccessTokensResponse$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37668
+ const [result] = await match(json(200, ListAccessTokensResponse$inboundSchema), jsonErr([400, 403], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
36935
37669
  if (!result.ok) {
36936
37670
  return [result, { status: "complete", request: req, response }];
36937
37671
  }
@@ -37026,7 +37760,7 @@ async function $do3(client, request, options) {
37026
37760
  const req = requestRes.value;
37027
37761
  const doResult = await client._do(req, {
37028
37762
  context,
37029
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37763
+ errorCodes: ["400", "403", "499", "4XX", "500", "503", "504", "5XX"],
37030
37764
  retryConfig: context.retryConfig,
37031
37765
  retryCodes: context.retryCodes
37032
37766
  });
@@ -37037,7 +37771,7 @@ async function $do3(client, request, options) {
37037
37771
  const responseFields = {
37038
37772
  HttpMeta: { Response: response, Request: req }
37039
37773
  };
37040
- const [result] = await match(nil(200, voidType()), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37774
+ const [result] = await match(nil(200, voidType()), jsonErr([400, 403], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37041
37775
  if (!result.ok) {
37042
37776
  return [result, { status: "complete", request: req, response }];
37043
37777
  }
@@ -37083,17 +37817,128 @@ var init_accessTokensRevokeAccessToken2 = __esm(() => {
37083
37817
  };
37084
37818
  });
37085
37819
 
37086
- // src/funcs/basinsCreateOrReconfigureBasin.ts
37087
- function basinsCreateOrReconfigureBasin(client, request, options) {
37820
+ // src/funcs/basinsCreateBasin.ts
37821
+ function basinsCreateBasin(client, request, options) {
37088
37822
  return new APIPromise($do4(client, request, options));
37089
37823
  }
37090
37824
  async function $do4(client, request, options) {
37091
- const parsed = safeParse(request, (value) => CreateOrReconfigureBasinRequest$outboundSchema.parse(value), "Input validation failed");
37825
+ const parsed = safeParse(request, (value) => CreateBasinRequest$outboundSchema.parse(value), "Input validation failed");
37826
+ if (!parsed.ok) {
37827
+ return [parsed, { status: "invalid" }];
37828
+ }
37829
+ const payload = parsed.value;
37830
+ const body = encodeJSON("body", payload, { explode: true });
37831
+ const path = pathToFunc("/basins")();
37832
+ const headers = new Headers(compactMap({
37833
+ "Content-Type": "application/json",
37834
+ Accept: "application/json"
37835
+ }));
37836
+ const secConfig = await extractSecurity(client._options.accessToken);
37837
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
37838
+ const requestSecurity = resolveGlobalSecurity(securityInput);
37839
+ const context = {
37840
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
37841
+ operationID: "create_basin",
37842
+ oAuth2Scopes: [],
37843
+ resolvedSecurity: requestSecurity,
37844
+ securitySource: client._options.accessToken,
37845
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
37846
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
37847
+ };
37848
+ const requestRes = client._createRequest(context, {
37849
+ security: requestSecurity,
37850
+ method: "POST",
37851
+ baseURL: options?.serverURL,
37852
+ path,
37853
+ headers,
37854
+ body,
37855
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37856
+ }, options);
37857
+ if (!requestRes.ok) {
37858
+ return [requestRes, { status: "invalid" }];
37859
+ }
37860
+ const req = requestRes.value;
37861
+ const doResult = await client._do(req, {
37862
+ context,
37863
+ errorCodes: [
37864
+ "400",
37865
+ "401",
37866
+ "403",
37867
+ "409",
37868
+ "499",
37869
+ "4XX",
37870
+ "500",
37871
+ "503",
37872
+ "504",
37873
+ "5XX"
37874
+ ],
37875
+ retryConfig: context.retryConfig,
37876
+ retryCodes: context.retryCodes
37877
+ });
37878
+ if (!doResult.ok) {
37879
+ return [doResult, { status: "request-error", request: req }];
37880
+ }
37881
+ const response = doResult.value;
37882
+ const responseFields = {
37883
+ HttpMeta: { Response: response, Request: req }
37884
+ };
37885
+ const [result] = await match(json(201, BasinInfo$inboundSchema), jsonErr([400, 401, 403, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37886
+ if (!result.ok) {
37887
+ return [result, { status: "complete", request: req, response }];
37888
+ }
37889
+ return [result, { status: "complete", request: req, response }];
37890
+ }
37891
+ var init_basinsCreateBasin = __esm(() => {
37892
+ init_encodings();
37893
+ init_matchers();
37894
+ init_primitives();
37895
+ init_schemas();
37896
+ init_security();
37897
+ init_url();
37898
+ init_components();
37899
+ init_errors();
37900
+ init_async();
37901
+ });
37902
+
37903
+ // src/mcp-server/tools/basinsCreateBasin.ts
37904
+ var args4, tool$basinsCreateBasin;
37905
+ var init_basinsCreateBasin2 = __esm(() => {
37906
+ init_basinsCreateBasin();
37907
+ init_components();
37908
+ init_tools();
37909
+ args4 = {
37910
+ request: CreateBasinRequest$inboundSchema
37911
+ };
37912
+ tool$basinsCreateBasin = {
37913
+ name: "basins-create-basin",
37914
+ description: `Create a basin.`,
37915
+ scopes: ["write"],
37916
+ args: args4,
37917
+ tool: async (client, args5, ctx) => {
37918
+ const [result, apiCall] = await basinsCreateBasin(client, args5.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37919
+ if (!result.ok) {
37920
+ return {
37921
+ content: [{ type: "text", text: result.error.message }],
37922
+ isError: true
37923
+ };
37924
+ }
37925
+ const value = result.value;
37926
+ return formatResult(value, apiCall);
37927
+ }
37928
+ };
37929
+ });
37930
+
37931
+ // src/funcs/basinsCreateOrReconfigureBasin.ts
37932
+ function basinsCreateOrReconfigureBasin(client, request, options) {
37933
+ return new APIPromise($do5(client, request, options));
37934
+ }
37935
+ async function $do5(client, request, options) {
37936
+ const parsed = safeParse(request, (value) => CreateOrReconfigureBasinRequest$outboundSchema2.parse(value), "Input validation failed");
37092
37937
  if (!parsed.ok) {
37093
37938
  return [parsed, { status: "invalid" }];
37094
37939
  }
37095
37940
  const payload = parsed.value;
37096
- const body = encodeJSON("body", payload.CreateBasinRequest, {
37941
+ const body = encodeJSON("body", payload.CreateOrReconfigureBasinRequest, {
37097
37942
  explode: true
37098
37943
  });
37099
37944
  const pathParams = {
@@ -37135,7 +37980,7 @@ async function $do4(client, request, options) {
37135
37980
  const req = requestRes.value;
37136
37981
  const doResult = await client._do(req, {
37137
37982
  context,
37138
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37983
+ errorCodes: ["400", "499", "4XX", "500", "503", "504", "5XX"],
37139
37984
  retryConfig: context.retryConfig,
37140
37985
  retryCodes: context.retryCodes
37141
37986
  });
@@ -37146,7 +37991,7 @@ async function $do4(client, request, options) {
37146
37991
  const responseFields = {
37147
37992
  HttpMeta: { Response: response, Request: req }
37148
37993
  };
37149
- const [result] = await match(json(201, BasinInfo$inboundSchema.optional()), nil(204, BasinInfo$inboundSchema.optional()), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37994
+ const [result] = await match(json(201, BasinInfo$inboundSchema.optional()), nil(204, BasinInfo$inboundSchema.optional()), jsonErr(400, ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37150
37995
  if (!result.ok) {
37151
37996
  return [result, { status: "complete", request: req, response }];
37152
37997
  }
@@ -37166,21 +38011,21 @@ var init_basinsCreateOrReconfigureBasin = __esm(() => {
37166
38011
  });
37167
38012
 
37168
38013
  // src/mcp-server/tools/basinsCreateOrReconfigureBasin.ts
37169
- var args4, tool$basinsCreateOrReconfigureBasin;
38014
+ var args5, tool$basinsCreateOrReconfigureBasin;
37170
38015
  var init_basinsCreateOrReconfigureBasin2 = __esm(() => {
37171
38016
  init_basinsCreateOrReconfigureBasin();
37172
38017
  init_operations();
37173
38018
  init_tools();
37174
- args4 = {
37175
- request: CreateOrReconfigureBasinRequest$inboundSchema
38019
+ args5 = {
38020
+ request: CreateOrReconfigureBasinRequest$inboundSchema2
37176
38021
  };
37177
38022
  tool$basinsCreateOrReconfigureBasin = {
37178
38023
  name: "basins-create-or-reconfigure-basin",
37179
38024
  description: `Create or reconfigure a basin.`,
37180
38025
  scopes: ["write"],
37181
- args: args4,
37182
- tool: async (client, args5, ctx) => {
37183
- const [result, apiCall] = await basinsCreateOrReconfigureBasin(client, args5.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
38026
+ args: args5,
38027
+ tool: async (client, args6, ctx) => {
38028
+ const [result, apiCall] = await basinsCreateOrReconfigureBasin(client, args6.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37184
38029
  if (!result.ok) {
37185
38030
  return {
37186
38031
  content: [{ type: "text", text: result.error.message }],
@@ -37195,9 +38040,9 @@ var init_basinsCreateOrReconfigureBasin2 = __esm(() => {
37195
38040
 
37196
38041
  // src/funcs/basinsDeleteBasin.ts
37197
38042
  function basinsDeleteBasin(client, request, options) {
37198
- return new APIPromise($do5(client, request, options));
38043
+ return new APIPromise($do6(client, request, options));
37199
38044
  }
37200
- async function $do5(client, request, options) {
38045
+ async function $do6(client, request, options) {
37201
38046
  const parsed = safeParse(request, (value) => DeleteBasinRequest$outboundSchema.parse(value), "Input validation failed");
37202
38047
  if (!parsed.ok) {
37203
38048
  return [parsed, { status: "invalid" }];
@@ -37241,7 +38086,18 @@ async function $do5(client, request, options) {
37241
38086
  const req = requestRes.value;
37242
38087
  const doResult = await client._do(req, {
37243
38088
  context,
37244
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
38089
+ errorCodes: [
38090
+ "400",
38091
+ "401",
38092
+ "403",
38093
+ "404",
38094
+ "499",
38095
+ "4XX",
38096
+ "500",
38097
+ "503",
38098
+ "504",
38099
+ "5XX"
38100
+ ],
37245
38101
  retryConfig: context.retryConfig,
37246
38102
  retryCodes: context.retryCodes
37247
38103
  });
@@ -37252,7 +38108,7 @@ async function $do5(client, request, options) {
37252
38108
  const responseFields = {
37253
38109
  HttpMeta: { Response: response, Request: req }
37254
38110
  };
37255
- const [result] = await match(nil(202, voidType()), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
38111
+ const [result] = await match(nil(202, voidType()), jsonErr([400, 401, 403], ErrorResponse$inboundSchema), jsonErr(404, NotFoundError$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37256
38112
  if (!result.ok) {
37257
38113
  return [result, { status: "complete", request: req, response }];
37258
38114
  }
@@ -37272,21 +38128,21 @@ var init_basinsDeleteBasin = __esm(() => {
37272
38128
  });
37273
38129
 
37274
38130
  // src/mcp-server/tools/basinsDeleteBasin.ts
37275
- var args5, tool$basinsDeleteBasin;
38131
+ var args6, tool$basinsDeleteBasin;
37276
38132
  var init_basinsDeleteBasin2 = __esm(() => {
37277
38133
  init_basinsDeleteBasin();
37278
38134
  init_operations();
37279
38135
  init_tools();
37280
- args5 = {
38136
+ args6 = {
37281
38137
  request: DeleteBasinRequest$inboundSchema
37282
38138
  };
37283
38139
  tool$basinsDeleteBasin = {
37284
38140
  name: "basins-delete-basin",
37285
38141
  description: `Delete a basin.`,
37286
38142
  scopes: ["write"],
37287
- args: args5,
37288
- tool: async (client, args6, ctx) => {
37289
- const [result, apiCall] = await basinsDeleteBasin(client, args6.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
38143
+ args: args6,
38144
+ tool: async (client, args7, ctx) => {
38145
+ const [result, apiCall] = await basinsDeleteBasin(client, args7.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37290
38146
  if (!result.ok) {
37291
38147
  return {
37292
38148
  content: [{ type: "text", text: result.error.message }],
@@ -37300,9 +38156,9 @@ var init_basinsDeleteBasin2 = __esm(() => {
37300
38156
 
37301
38157
  // src/funcs/basinsGetBasinConfig.ts
37302
38158
  function basinsGetBasinConfig(client, request, options) {
37303
- return new APIPromise($do6(client, request, options));
38159
+ return new APIPromise($do7(client, request, options));
37304
38160
  }
37305
- async function $do6(client, request, options) {
38161
+ async function $do7(client, request, options) {
37306
38162
  const parsed = safeParse(request, (value) => GetBasinConfigRequest$outboundSchema.parse(value), "Input validation failed");
37307
38163
  if (!parsed.ok) {
37308
38164
  return [parsed, { status: "invalid" }];
@@ -37346,7 +38202,7 @@ async function $do6(client, request, options) {
37346
38202
  const req = requestRes.value;
37347
38203
  const doResult = await client._do(req, {
37348
38204
  context,
37349
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
38205
+ errorCodes: ["400", "403", "404", "499", "4XX", "500", "503", "504", "5XX"],
37350
38206
  retryConfig: context.retryConfig,
37351
38207
  retryCodes: context.retryCodes
37352
38208
  });
@@ -37357,7 +38213,7 @@ async function $do6(client, request, options) {
37357
38213
  const responseFields = {
37358
38214
  HttpMeta: { Response: response, Request: req }
37359
38215
  };
37360
- const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
38216
+ const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37361
38217
  if (!result.ok) {
37362
38218
  return [result, { status: "complete", request: req, response }];
37363
38219
  }
@@ -37377,21 +38233,21 @@ var init_basinsGetBasinConfig = __esm(() => {
37377
38233
  });
37378
38234
 
37379
38235
  // src/mcp-server/tools/basinsGetBasinConfig.ts
37380
- var args6, tool$basinsGetBasinConfig;
38236
+ var args7, tool$basinsGetBasinConfig;
37381
38237
  var init_basinsGetBasinConfig2 = __esm(() => {
37382
38238
  init_basinsGetBasinConfig();
37383
38239
  init_operations();
37384
38240
  init_tools();
37385
- args6 = {
38241
+ args7 = {
37386
38242
  request: GetBasinConfigRequest$inboundSchema
37387
38243
  };
37388
38244
  tool$basinsGetBasinConfig = {
37389
38245
  name: "basins-get-basin-config",
37390
38246
  description: `Get basin config.`,
37391
38247
  scopes: ["read"],
37392
- args: args6,
37393
- tool: async (client, args7, ctx) => {
37394
- const [result, apiCall] = await basinsGetBasinConfig(client, args7.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
38248
+ args: args7,
38249
+ tool: async (client, args8, ctx) => {
38250
+ const [result, apiCall] = await basinsGetBasinConfig(client, args8.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37395
38251
  if (!result.ok) {
37396
38252
  return {
37397
38253
  content: [{ type: "text", text: result.error.message }],
@@ -37730,11 +38586,11 @@ function peg$parse(input, options) {
37730
38586
  var peg$f36 = function(name, f, r) {
37731
38587
  return [f, ...r];
37732
38588
  };
37733
- var peg$f37 = function(name, args7) {
38589
+ var peg$f37 = function(name, args8) {
37734
38590
  return {
37735
38591
  type: "FunctionExpr",
37736
38592
  name,
37737
- arguments: args7
38593
+ arguments: args8
37738
38594
  };
37739
38595
  };
37740
38596
  var peg$f38 = function(value) {
@@ -40845,7 +41701,7 @@ function evalFunctionExpr(ctx, item, node) {
40845
41701
  if (fn.definition.parameters.length !== node.arguments.length) {
40846
41702
  return false;
40847
41703
  }
40848
- const args7 = [];
41704
+ const args8 = [];
40849
41705
  for (let i = 0;i < node.arguments.length; i++) {
40850
41706
  const value2 = evalFunctionArgument(ctx, item, node.arguments[i]);
40851
41707
  const param = fn.definition.parameters[i];
@@ -40854,19 +41710,19 @@ function evalFunctionExpr(ctx, item, node) {
40854
41710
  if (!isNodeList(value2) && !isJsonValue(value2)) {
40855
41711
  return false;
40856
41712
  }
40857
- args7.push(coerceValueType(value2));
41713
+ args8.push(coerceValueType(value2));
40858
41714
  break;
40859
41715
  case "NodesType":
40860
41716
  if (!isNodeList(value2)) {
40861
41717
  return false;
40862
41718
  }
40863
- args7.push(value2);
41719
+ args8.push(value2);
40864
41720
  break;
40865
41721
  case "LogicalType":
40866
41722
  if (typeof value2 === "boolean") {
40867
- args7.push(value2);
41723
+ args8.push(value2);
40868
41724
  } else if (isNodeList(value2)) {
40869
- args7.push(value2.length > 0);
41725
+ args8.push(value2.length > 0);
40870
41726
  } else {
40871
41727
  return false;
40872
41728
  }
@@ -40875,7 +41731,7 @@ function evalFunctionExpr(ctx, item, node) {
40875
41731
  assertNever(param, "Unknown function argument type");
40876
41732
  }
40877
41733
  }
40878
- return fn.declaration(ctx, ...args7);
41734
+ return fn.declaration(ctx, ...args8);
40879
41735
  }
40880
41736
  function isKnownFunction(functions, name) {
40881
41737
  return Object.hasOwn(functions, name);
@@ -41225,9 +42081,9 @@ var init_operations2 = __esm(() => {
41225
42081
 
41226
42082
  // src/funcs/basinsListBasins.ts
41227
42083
  function basinsListBasins(client, request, options) {
41228
- return new APIPromise($do7(client, request, options));
42084
+ return new APIPromise($do8(client, request, options));
41229
42085
  }
41230
- async function $do7(client, request, options) {
42086
+ async function $do8(client, request, options) {
41231
42087
  const parsed = safeParse(request, (value2) => ListBasinsRequest$outboundSchema.parse(value2), "Input validation failed");
41232
42088
  if (!parsed.ok) {
41233
42089
  return [haltIterator(parsed), { status: "invalid" }];
@@ -41271,7 +42127,7 @@ async function $do7(client, request, options) {
41271
42127
  const req = requestRes.value;
41272
42128
  const doResult = await client._do(req, {
41273
42129
  context,
41274
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42130
+ errorCodes: ["400", "403", "499", "4XX", "500", "503", "504", "5XX"],
41275
42131
  retryConfig: context.retryConfig,
41276
42132
  retryCodes: context.retryCodes
41277
42133
  });
@@ -41282,7 +42138,7 @@ async function $do7(client, request, options) {
41282
42138
  const responseFields = {
41283
42139
  HttpMeta: { Response: response, Request: req }
41284
42140
  };
41285
- const [result, raw] = await match(json(200, ListBasinsResponse$inboundSchema2, { key: "Result" }), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42141
+ const [result, raw] = await match(json(200, ListBasinsResponse$inboundSchema2, { key: "Result" }), jsonErr([400, 403], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41286
42142
  if (!result.ok) {
41287
42143
  return [haltIterator(result), {
41288
42144
  status: "complete",
@@ -41323,21 +42179,21 @@ var init_basinsListBasins = __esm(() => {
41323
42179
  });
41324
42180
 
41325
42181
  // src/mcp-server/tools/basinsListBasins.ts
41326
- var args7, tool$basinsListBasins;
42182
+ var args8, tool$basinsListBasins;
41327
42183
  var init_basinsListBasins2 = __esm(() => {
41328
42184
  init_basinsListBasins();
41329
42185
  init_operations();
41330
42186
  init_tools();
41331
- args7 = {
42187
+ args8 = {
41332
42188
  request: ListBasinsRequest$inboundSchema
41333
42189
  };
41334
42190
  tool$basinsListBasins = {
41335
42191
  name: "basins-list-basins",
41336
42192
  description: `List basins.`,
41337
42193
  scopes: ["read"],
41338
- args: args7,
41339
- tool: async (client, args8, ctx) => {
41340
- const [result, apiCall] = await basinsListBasins(client, args8.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42194
+ args: args8,
42195
+ tool: async (client, args9, ctx) => {
42196
+ const [result, apiCall] = await basinsListBasins(client, args9.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41341
42197
  if (!result.ok) {
41342
42198
  return {
41343
42199
  content: [{ type: "text", text: result.error.message }],
@@ -41352,9 +42208,9 @@ var init_basinsListBasins2 = __esm(() => {
41352
42208
 
41353
42209
  // src/funcs/basinsReconfigureBasin.ts
41354
42210
  function basinsReconfigureBasin(client, request, options) {
41355
- return new APIPromise($do8(client, request, options));
42211
+ return new APIPromise($do9(client, request, options));
41356
42212
  }
41357
- async function $do8(client, request, options) {
42213
+ async function $do9(client, request, options) {
41358
42214
  const parsed = safeParse(request, (value2) => ReconfigureBasinRequest$outboundSchema.parse(value2), "Input validation failed");
41359
42215
  if (!parsed.ok) {
41360
42216
  return [parsed, { status: "invalid" }];
@@ -41401,7 +42257,7 @@ async function $do8(client, request, options) {
41401
42257
  const req = requestRes.value;
41402
42258
  const doResult = await client._do(req, {
41403
42259
  context,
41404
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42260
+ errorCodes: ["400", "403", "404", "499", "4XX", "500", "503", "504", "5XX"],
41405
42261
  retryConfig: context.retryConfig,
41406
42262
  retryCodes: context.retryCodes
41407
42263
  });
@@ -41412,7 +42268,7 @@ async function $do8(client, request, options) {
41412
42268
  const responseFields = {
41413
42269
  HttpMeta: { Response: response, Request: req }
41414
42270
  };
41415
- const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42271
+ const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41416
42272
  if (!result.ok) {
41417
42273
  return [result, { status: "complete", request: req, response }];
41418
42274
  }
@@ -41432,21 +42288,21 @@ var init_basinsReconfigureBasin = __esm(() => {
41432
42288
  });
41433
42289
 
41434
42290
  // src/mcp-server/tools/basinsReconfigureBasin.ts
41435
- var args8, tool$basinsReconfigureBasin;
42291
+ var args9, tool$basinsReconfigureBasin;
41436
42292
  var init_basinsReconfigureBasin2 = __esm(() => {
41437
42293
  init_basinsReconfigureBasin();
41438
42294
  init_operations();
41439
42295
  init_tools();
41440
- args8 = {
42296
+ args9 = {
41441
42297
  request: ReconfigureBasinRequest$inboundSchema
41442
42298
  };
41443
42299
  tool$basinsReconfigureBasin = {
41444
42300
  name: "basins-reconfigure-basin",
41445
42301
  description: `Reconfigure a basin.`,
41446
42302
  scopes: ["write"],
41447
- args: args8,
41448
- tool: async (client, args9, ctx) => {
41449
- const [result, apiCall] = await basinsReconfigureBasin(client, args9.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42303
+ args: args9,
42304
+ tool: async (client, args10, ctx) => {
42305
+ const [result, apiCall] = await basinsReconfigureBasin(client, args10.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41450
42306
  if (!result.ok) {
41451
42307
  return {
41452
42308
  content: [{ type: "text", text: result.error.message }],
@@ -41459,11 +42315,140 @@ var init_basinsReconfigureBasin2 = __esm(() => {
41459
42315
  };
41460
42316
  });
41461
42317
 
41462
- // src/funcs/recordsCheckTail.ts
42318
+ // src/funcs/recordsAppend.ts
42319
+ function recordsAppend(client, request, options) {
42320
+ return new APIPromise($do10(client, request, options));
42321
+ }
42322
+ async function $do10(client, request, options) {
42323
+ const parsed = safeParse(request, (value2) => AppendRequest$outboundSchema.parse(value2), "Input validation failed");
42324
+ if (!parsed.ok) {
42325
+ return [parsed, { status: "invalid" }];
42326
+ }
42327
+ const payload = parsed.value;
42328
+ const body = encodeJSON("body", payload.AppendInput, { explode: true });
42329
+ const baseURL = options?.serverURL || pathToFunc(AppendServerList[0], { charEncoding: "percent" })({
42330
+ basin: ""
42331
+ });
42332
+ const pathParams = {
42333
+ stream: encodeSimple("stream", payload.stream, {
42334
+ explode: false,
42335
+ charEncoding: "percent"
42336
+ })
42337
+ };
42338
+ const path = pathToFunc("/streams/{stream}/records")(pathParams);
42339
+ const headers = new Headers(compactMap({
42340
+ "Content-Type": "application/json",
42341
+ Accept: "application/json",
42342
+ "s2-format": encodeSimple("s2-format", payload["s2-format"], {
42343
+ explode: false,
42344
+ charEncoding: "none"
42345
+ })
42346
+ }));
42347
+ const secConfig = await extractSecurity(client._options.accessToken);
42348
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42349
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42350
+ const context = {
42351
+ baseURL: baseURL ?? "",
42352
+ operationID: "append",
42353
+ oAuth2Scopes: [],
42354
+ resolvedSecurity: requestSecurity,
42355
+ securitySource: client._options.accessToken,
42356
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42357
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42358
+ };
42359
+ const requestRes = client._createRequest(context, {
42360
+ security: requestSecurity,
42361
+ method: "POST",
42362
+ baseURL,
42363
+ path,
42364
+ headers,
42365
+ body,
42366
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42367
+ }, options);
42368
+ if (!requestRes.ok) {
42369
+ return [requestRes, { status: "invalid" }];
42370
+ }
42371
+ const req = requestRes.value;
42372
+ const doResult = await client._do(req, {
42373
+ context,
42374
+ errorCodes: [
42375
+ "400",
42376
+ "401",
42377
+ "404",
42378
+ "409",
42379
+ "412",
42380
+ "499",
42381
+ "4XX",
42382
+ "500",
42383
+ "503",
42384
+ "504",
42385
+ "5XX"
42386
+ ],
42387
+ retryConfig: context.retryConfig,
42388
+ retryCodes: context.retryCodes
42389
+ });
42390
+ if (!doResult.ok) {
42391
+ return [doResult, { status: "request-error", request: req }];
42392
+ }
42393
+ const response = doResult.value;
42394
+ const responseFields = {
42395
+ HttpMeta: { Response: response, Request: req }
42396
+ };
42397
+ const [result] = await match(json(200, AppendAck$inboundSchema), jsonErr([400, 401, 404, 409], ErrorResponse$inboundSchema), jsonErr(412, AppendConditionFailed$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42398
+ if (!result.ok) {
42399
+ return [result, { status: "complete", request: req, response }];
42400
+ }
42401
+ return [result, { status: "complete", request: req, response }];
42402
+ }
42403
+ var init_recordsAppend = __esm(() => {
42404
+ init_encodings();
42405
+ init_matchers();
42406
+ init_primitives();
42407
+ init_schemas();
42408
+ init_security();
42409
+ init_url();
42410
+ init_components();
42411
+ init_errors();
42412
+ init_append();
42413
+ init_operations();
42414
+ init_async();
42415
+ });
42416
+
42417
+ // src/mcp-server/tools/recordsAppend.ts
42418
+ var args10, tool$recordsAppend;
42419
+ var init_recordsAppend2 = __esm(() => {
42420
+ init_recordsAppend();
42421
+ init_operations();
42422
+ init_tools();
42423
+ args10 = {
42424
+ request: AppendRequest$inboundSchema
42425
+ };
42426
+ tool$recordsAppend = {
42427
+ name: "records-append",
42428
+ description: `Append records.
42429
+
42430
+ Append a batch of records to a stream.`,
42431
+ scopes: ["write"],
42432
+ args: args10,
42433
+ tool: async (client, args11, ctx) => {
42434
+ const [result, apiCall] = await recordsAppend(client, args11.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42435
+ if (!result.ok) {
42436
+ return {
42437
+ content: [{ type: "text", text: result.error.message }],
42438
+ isError: true
42439
+ };
42440
+ }
42441
+ const value2 = result.value;
42442
+ return formatResult(value2, apiCall);
42443
+ }
42444
+ };
42445
+ });
42446
+
42447
+ // src/funcs/recordsCheckTail.ts
41463
42448
  function recordsCheckTail(client, request, options) {
41464
- return new APIPromise($do9(client, request, options));
42449
+ return new APIPromise($do11(client, request, options));
41465
42450
  }
41466
- async function $do9(client, request, options) {
42451
+ async function $do11(client, request, options) {
41467
42452
  const parsed = safeParse(request, (value2) => CheckTailRequest$outboundSchema.parse(value2), "Input validation failed");
41468
42453
  if (!parsed.ok) {
41469
42454
  return [parsed, { status: "invalid" }];
@@ -41510,7 +42495,18 @@ async function $do9(client, request, options) {
41510
42495
  const req = requestRes.value;
41511
42496
  const doResult = await client._do(req, {
41512
42497
  context,
41513
- errorCodes: ["400", "401", "404", "499", "4XX", "500", "503", "504", "5XX"],
42498
+ errorCodes: [
42499
+ "400",
42500
+ "401",
42501
+ "404",
42502
+ "409",
42503
+ "499",
42504
+ "4XX",
42505
+ "500",
42506
+ "503",
42507
+ "504",
42508
+ "5XX"
42509
+ ],
41514
42510
  retryConfig: context.retryConfig,
41515
42511
  retryCodes: context.retryCodes
41516
42512
  });
@@ -41521,7 +42517,7 @@ async function $do9(client, request, options) {
41521
42517
  const responseFields = {
41522
42518
  HttpMeta: { Response: response, Request: req }
41523
42519
  };
41524
- const [result] = await match(json(200, CheckTailResponse$inboundSchema), jsonErr([400, 401, 404], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42520
+ const [result] = await match(json(200, TailResponse$inboundSchema), jsonErr([400, 401, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41525
42521
  if (!result.ok) {
41526
42522
  return [result, { status: "complete", request: req, response }];
41527
42523
  }
@@ -41542,12 +42538,12 @@ var init_recordsCheckTail = __esm(() => {
41542
42538
  });
41543
42539
 
41544
42540
  // src/mcp-server/tools/recordsCheckTail.ts
41545
- var args9, tool$recordsCheckTail;
42541
+ var args11, tool$recordsCheckTail;
41546
42542
  var init_recordsCheckTail2 = __esm(() => {
41547
42543
  init_recordsCheckTail();
41548
42544
  init_operations();
41549
42545
  init_tools();
41550
- args9 = {
42546
+ args11 = {
41551
42547
  request: CheckTailRequest$inboundSchema
41552
42548
  };
41553
42549
  tool$recordsCheckTail = {
@@ -41556,9 +42552,144 @@ var init_recordsCheckTail2 = __esm(() => {
41556
42552
 
41557
42553
  Check the tail of a stream.`,
41558
42554
  scopes: ["read"],
41559
- args: args9,
41560
- tool: async (client, args10, ctx) => {
41561
- const [result, apiCall] = await recordsCheckTail(client, args10.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42555
+ args: args11,
42556
+ tool: async (client, args12, ctx) => {
42557
+ const [result, apiCall] = await recordsCheckTail(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42558
+ if (!result.ok) {
42559
+ return {
42560
+ content: [{ type: "text", text: result.error.message }],
42561
+ isError: true
42562
+ };
42563
+ }
42564
+ const value2 = result.value;
42565
+ return formatResult(value2, apiCall);
42566
+ }
42567
+ };
42568
+ });
42569
+
42570
+ // src/funcs/recordsRead.ts
42571
+ function recordsRead(client, request, options) {
42572
+ return new APIPromise($do12(client, request, options));
42573
+ }
42574
+ async function $do12(client, request, options) {
42575
+ const parsed = safeParse(request, (value2) => ReadRequest$outboundSchema.parse(value2), "Input validation failed");
42576
+ if (!parsed.ok) {
42577
+ return [parsed, { status: "invalid" }];
42578
+ }
42579
+ const payload = parsed.value;
42580
+ const body = null;
42581
+ const baseURL = options?.serverURL || pathToFunc(ReadServerList[0], { charEncoding: "percent" })({
42582
+ basin: ""
42583
+ });
42584
+ const pathParams = {
42585
+ stream: encodeSimple("stream", payload.stream, {
42586
+ explode: false,
42587
+ charEncoding: "percent"
42588
+ })
42589
+ };
42590
+ const path = pathToFunc("/streams/{stream}/records")(pathParams);
42591
+ const query2 = encodeFormQuery({
42592
+ bytes: payload.bytes,
42593
+ count: payload.count,
42594
+ seq_num: payload.seq_num,
42595
+ tail_offset: payload.tail_offset,
42596
+ timestamp: payload.timestamp
42597
+ });
42598
+ const headers = new Headers(compactMap({
42599
+ Accept: options?.acceptHeaderOverride || "application/json;q=1, text/event-stream;q=0",
42600
+ "s2-format": encodeSimple("s2-format", payload["s2-format"], {
42601
+ explode: false,
42602
+ charEncoding: "none"
42603
+ })
42604
+ }));
42605
+ const secConfig = await extractSecurity(client._options.accessToken);
42606
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42607
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42608
+ const context = {
42609
+ baseURL: baseURL ?? "",
42610
+ operationID: "read",
42611
+ oAuth2Scopes: [],
42612
+ resolvedSecurity: requestSecurity,
42613
+ securitySource: client._options.accessToken,
42614
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42615
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42616
+ };
42617
+ const requestRes = client._createRequest(context, {
42618
+ security: requestSecurity,
42619
+ method: "GET",
42620
+ baseURL,
42621
+ path,
42622
+ headers,
42623
+ query: query2,
42624
+ body,
42625
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42626
+ }, options);
42627
+ if (!requestRes.ok) {
42628
+ return [requestRes, { status: "invalid" }];
42629
+ }
42630
+ const req = requestRes.value;
42631
+ const doResult = await client._do(req, {
42632
+ context,
42633
+ errorCodes: [
42634
+ "400",
42635
+ "401",
42636
+ "404",
42637
+ "409",
42638
+ "416",
42639
+ "499",
42640
+ "4XX",
42641
+ "500",
42642
+ "503",
42643
+ "504",
42644
+ "5XX"
42645
+ ],
42646
+ retryConfig: context.retryConfig,
42647
+ retryCodes: context.retryCodes
42648
+ });
42649
+ if (!doResult.ok) {
42650
+ return [doResult, { status: "request-error", request: req }];
42651
+ }
42652
+ const response = doResult.value;
42653
+ const responseFields = {
42654
+ HttpMeta: { Response: response, Request: req }
42655
+ };
42656
+ const [result] = await match(json(200, ReadResponse$inboundSchema), sse(200, ReadResponse$inboundSchema), jsonErr([400, 401, 404, 409], ErrorResponse$inboundSchema), jsonErr(416, TailResponse$inboundSchema2), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42657
+ if (!result.ok) {
42658
+ return [result, { status: "complete", request: req, response }];
42659
+ }
42660
+ return [result, { status: "complete", request: req, response }];
42661
+ }
42662
+ var init_recordsRead = __esm(() => {
42663
+ init_encodings();
42664
+ init_matchers();
42665
+ init_primitives();
42666
+ init_schemas();
42667
+ init_security();
42668
+ init_url();
42669
+ init_errors();
42670
+ init_operations();
42671
+ init_read();
42672
+ init_async();
42673
+ });
42674
+
42675
+ // src/mcp-server/tools/recordsRead.ts
42676
+ var args12, tool$recordsRead;
42677
+ var init_recordsRead2 = __esm(() => {
42678
+ init_recordsRead();
42679
+ init_operations();
42680
+ init_tools();
42681
+ args12 = {
42682
+ request: ReadRequest$inboundSchema
42683
+ };
42684
+ tool$recordsRead = {
42685
+ name: "records-read",
42686
+ description: `Retrieve records.
42687
+
42688
+ Retrieve a batch of records, or set \`Accept: text/event-stream\` to stream using server-sent events.`,
42689
+ scopes: ["read"],
42690
+ args: args12,
42691
+ tool: async (client, args13, ctx) => {
42692
+ const [result, apiCall] = await recordsRead(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41562
42693
  if (!result.ok) {
41563
42694
  return {
41564
42695
  content: [{ type: "text", text: result.error.message }],
@@ -41573,9 +42704,9 @@ Check the tail of a stream.`,
41573
42704
 
41574
42705
  // src/funcs/streamsCreateOrReconfigureStream.ts
41575
42706
  function streamsCreateOrReconfigureStream(client, request, options) {
41576
- return new APIPromise($do10(client, request, options));
42707
+ return new APIPromise($do13(client, request, options));
41577
42708
  }
41578
- async function $do10(client, request, options) {
42709
+ async function $do13(client, request, options) {
41579
42710
  const parsed = safeParse(request, (value2) => CreateOrReconfigureStreamRequest$outboundSchema.parse(value2), "Input validation failed");
41580
42711
  if (!parsed.ok) {
41581
42712
  return [parsed, { status: "invalid" }];
@@ -41613,7 +42744,7 @@ async function $do10(client, request, options) {
41613
42744
  };
41614
42745
  const requestRes = client._createRequest(context, {
41615
42746
  security: requestSecurity,
41616
- method: "POST",
42747
+ method: "PUT",
41617
42748
  baseURL,
41618
42749
  path,
41619
42750
  headers,
@@ -41626,7 +42757,18 @@ async function $do10(client, request, options) {
41626
42757
  const req = requestRes.value;
41627
42758
  const doResult = await client._do(req, {
41628
42759
  context,
41629
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42760
+ errorCodes: [
42761
+ "400",
42762
+ "403",
42763
+ "404",
42764
+ "409",
42765
+ "499",
42766
+ "4XX",
42767
+ "500",
42768
+ "503",
42769
+ "504",
42770
+ "5XX"
42771
+ ],
41630
42772
  retryConfig: context.retryConfig,
41631
42773
  retryCodes: context.retryCodes
41632
42774
  });
@@ -41637,7 +42779,7 @@ async function $do10(client, request, options) {
41637
42779
  const responseFields = {
41638
42780
  HttpMeta: { Response: response, Request: req }
41639
42781
  };
41640
- const [result] = await match(json(201, StreamInfo$inboundSchema.optional()), nil(204, StreamInfo$inboundSchema.optional()), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42782
+ const [result] = await match(json(201, StreamInfo$inboundSchema.optional()), nil(204, StreamInfo$inboundSchema.optional()), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41641
42783
  if (!result.ok) {
41642
42784
  return [result, { status: "complete", request: req, response }];
41643
42785
  }
@@ -41658,21 +42800,136 @@ var init_streamsCreateOrReconfigureStream = __esm(() => {
41658
42800
  });
41659
42801
 
41660
42802
  // src/mcp-server/tools/streamsCreateOrReconfigureStream.ts
41661
- var args10, tool$streamsCreateOrReconfigureStream;
42803
+ var args13, tool$streamsCreateOrReconfigureStream;
41662
42804
  var init_streamsCreateOrReconfigureStream2 = __esm(() => {
41663
42805
  init_streamsCreateOrReconfigureStream();
41664
42806
  init_operations();
41665
42807
  init_tools();
41666
- args10 = {
42808
+ args13 = {
41667
42809
  request: CreateOrReconfigureStreamRequest$inboundSchema
41668
42810
  };
41669
42811
  tool$streamsCreateOrReconfigureStream = {
41670
42812
  name: "streams-create-or-reconfigure-stream",
41671
42813
  description: `Create or reconfigure a stream.`,
41672
42814
  scopes: ["write"],
41673
- args: args10,
41674
- tool: async (client, args11, ctx) => {
41675
- const [result, apiCall] = await streamsCreateOrReconfigureStream(client, args11.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42815
+ args: args13,
42816
+ tool: async (client, args14, ctx) => {
42817
+ const [result, apiCall] = await streamsCreateOrReconfigureStream(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42818
+ if (!result.ok) {
42819
+ return {
42820
+ content: [{ type: "text", text: result.error.message }],
42821
+ isError: true
42822
+ };
42823
+ }
42824
+ const value2 = result.value;
42825
+ return formatResult(value2, apiCall);
42826
+ }
42827
+ };
42828
+ });
42829
+
42830
+ // src/funcs/streamsCreateStream.ts
42831
+ function streamsCreateStream(client, request, options) {
42832
+ return new APIPromise($do14(client, request, options));
42833
+ }
42834
+ async function $do14(client, request, options) {
42835
+ const parsed = safeParse(request, (value2) => CreateStreamRequest$outboundSchema.parse(value2), "Input validation failed");
42836
+ if (!parsed.ok) {
42837
+ return [parsed, { status: "invalid" }];
42838
+ }
42839
+ const payload = parsed.value;
42840
+ const body = encodeJSON("body", payload, { explode: true });
42841
+ const baseURL = options?.serverURL || pathToFunc(CreateStreamServerList[0], { charEncoding: "percent" })({
42842
+ basin: ""
42843
+ });
42844
+ const path = pathToFunc("/streams")();
42845
+ const headers = new Headers(compactMap({
42846
+ "Content-Type": "application/json",
42847
+ Accept: "application/json"
42848
+ }));
42849
+ const secConfig = await extractSecurity(client._options.accessToken);
42850
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42851
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42852
+ const context = {
42853
+ baseURL: baseURL ?? "",
42854
+ operationID: "create_stream",
42855
+ oAuth2Scopes: [],
42856
+ resolvedSecurity: requestSecurity,
42857
+ securitySource: client._options.accessToken,
42858
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42859
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42860
+ };
42861
+ const requestRes = client._createRequest(context, {
42862
+ security: requestSecurity,
42863
+ method: "POST",
42864
+ baseURL,
42865
+ path,
42866
+ headers,
42867
+ body,
42868
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42869
+ }, options);
42870
+ if (!requestRes.ok) {
42871
+ return [requestRes, { status: "invalid" }];
42872
+ }
42873
+ const req = requestRes.value;
42874
+ const doResult = await client._do(req, {
42875
+ context,
42876
+ errorCodes: [
42877
+ "400",
42878
+ "403",
42879
+ "404",
42880
+ "409",
42881
+ "499",
42882
+ "4XX",
42883
+ "500",
42884
+ "503",
42885
+ "504",
42886
+ "5XX"
42887
+ ],
42888
+ retryConfig: context.retryConfig,
42889
+ retryCodes: context.retryCodes
42890
+ });
42891
+ if (!doResult.ok) {
42892
+ return [doResult, { status: "request-error", request: req }];
42893
+ }
42894
+ const response = doResult.value;
42895
+ const responseFields = {
42896
+ HttpMeta: { Response: response, Request: req }
42897
+ };
42898
+ const [result] = await match(json(201, StreamInfo$inboundSchema), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42899
+ if (!result.ok) {
42900
+ return [result, { status: "complete", request: req, response }];
42901
+ }
42902
+ return [result, { status: "complete", request: req, response }];
42903
+ }
42904
+ var init_streamsCreateStream = __esm(() => {
42905
+ init_encodings();
42906
+ init_matchers();
42907
+ init_primitives();
42908
+ init_schemas();
42909
+ init_security();
42910
+ init_url();
42911
+ init_components();
42912
+ init_errors();
42913
+ init_createstream();
42914
+ init_async();
42915
+ });
42916
+
42917
+ // src/mcp-server/tools/streamsCreateStream.ts
42918
+ var args14, tool$streamsCreateStream;
42919
+ var init_streamsCreateStream2 = __esm(() => {
42920
+ init_streamsCreateStream();
42921
+ init_components();
42922
+ init_tools();
42923
+ args14 = {
42924
+ request: CreateStreamRequest$inboundSchema
42925
+ };
42926
+ tool$streamsCreateStream = {
42927
+ name: "streams-create-stream",
42928
+ description: `Create a stream.`,
42929
+ scopes: ["write"],
42930
+ args: args14,
42931
+ tool: async (client, args15, ctx) => {
42932
+ const [result, apiCall] = await streamsCreateStream(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41676
42933
  if (!result.ok) {
41677
42934
  return {
41678
42935
  content: [{ type: "text", text: result.error.message }],
@@ -41687,9 +42944,9 @@ var init_streamsCreateOrReconfigureStream2 = __esm(() => {
41687
42944
 
41688
42945
  // src/funcs/streamsDeleteStream.ts
41689
42946
  function streamsDeleteStream(client, request, options) {
41690
- return new APIPromise($do11(client, request, options));
42947
+ return new APIPromise($do15(client, request, options));
41691
42948
  }
41692
- async function $do11(client, request, options) {
42949
+ async function $do15(client, request, options) {
41693
42950
  const parsed = safeParse(request, (value2) => DeleteStreamRequest$outboundSchema.parse(value2), "Input validation failed");
41694
42951
  if (!parsed.ok) {
41695
42952
  return [parsed, { status: "invalid" }];
@@ -41736,7 +42993,7 @@ async function $do11(client, request, options) {
41736
42993
  const req = requestRes.value;
41737
42994
  const doResult = await client._do(req, {
41738
42995
  context,
41739
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42996
+ errorCodes: ["400", "403", "404", "499", "4XX", "500", "503", "504", "5XX"],
41740
42997
  retryConfig: context.retryConfig,
41741
42998
  retryCodes: context.retryCodes
41742
42999
  });
@@ -41747,7 +43004,7 @@ async function $do11(client, request, options) {
41747
43004
  const responseFields = {
41748
43005
  HttpMeta: { Response: response, Request: req }
41749
43006
  };
41750
- const [result] = await match(nil(202, voidType()), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
43007
+ const [result] = await match(nil(202, voidType()), jsonErr([400, 403], ErrorResponse$inboundSchema), jsonErr(404, NotFoundError$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41751
43008
  if (!result.ok) {
41752
43009
  return [result, { status: "complete", request: req, response }];
41753
43010
  }
@@ -41768,21 +43025,21 @@ var init_streamsDeleteStream = __esm(() => {
41768
43025
  });
41769
43026
 
41770
43027
  // src/mcp-server/tools/streamsDeleteStream.ts
41771
- var args11, tool$streamsDeleteStream;
43028
+ var args15, tool$streamsDeleteStream;
41772
43029
  var init_streamsDeleteStream2 = __esm(() => {
41773
43030
  init_streamsDeleteStream();
41774
43031
  init_operations();
41775
43032
  init_tools();
41776
- args11 = {
43033
+ args15 = {
41777
43034
  request: DeleteStreamRequest$inboundSchema
41778
43035
  };
41779
43036
  tool$streamsDeleteStream = {
41780
43037
  name: "streams-delete-stream",
41781
43038
  description: `Delete a stream.`,
41782
43039
  scopes: ["write"],
41783
- args: args11,
41784
- tool: async (client, args12, ctx) => {
41785
- const [result, apiCall] = await streamsDeleteStream(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43040
+ args: args15,
43041
+ tool: async (client, args16, ctx) => {
43042
+ const [result, apiCall] = await streamsDeleteStream(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41786
43043
  if (!result.ok) {
41787
43044
  return {
41788
43045
  content: [{ type: "text", text: result.error.message }],
@@ -41796,9 +43053,9 @@ var init_streamsDeleteStream2 = __esm(() => {
41796
43053
 
41797
43054
  // src/funcs/streamsGetStreamConfig.ts
41798
43055
  function streamsGetStreamConfig(client, request, options) {
41799
- return new APIPromise($do12(client, request, options));
43056
+ return new APIPromise($do16(client, request, options));
41800
43057
  }
41801
- async function $do12(client, request, options) {
43058
+ async function $do16(client, request, options) {
41802
43059
  const parsed = safeParse(request, (value2) => GetStreamConfigRequest$outboundSchema.parse(value2), "Input validation failed");
41803
43060
  if (!parsed.ok) {
41804
43061
  return [parsed, { status: "invalid" }];
@@ -41845,7 +43102,18 @@ async function $do12(client, request, options) {
41845
43102
  const req = requestRes.value;
41846
43103
  const doResult = await client._do(req, {
41847
43104
  context,
41848
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
43105
+ errorCodes: [
43106
+ "400",
43107
+ "403",
43108
+ "404",
43109
+ "409",
43110
+ "499",
43111
+ "4XX",
43112
+ "500",
43113
+ "503",
43114
+ "504",
43115
+ "5XX"
43116
+ ],
41849
43117
  retryConfig: context.retryConfig,
41850
43118
  retryCodes: context.retryCodes
41851
43119
  });
@@ -41856,7 +43124,7 @@ async function $do12(client, request, options) {
41856
43124
  const responseFields = {
41857
43125
  HttpMeta: { Response: response, Request: req }
41858
43126
  };
41859
- const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
43127
+ const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41860
43128
  if (!result.ok) {
41861
43129
  return [result, { status: "complete", request: req, response }];
41862
43130
  }
@@ -41877,21 +43145,21 @@ var init_streamsGetStreamConfig = __esm(() => {
41877
43145
  });
41878
43146
 
41879
43147
  // src/mcp-server/tools/streamsGetStreamConfig.ts
41880
- var args12, tool$streamsGetStreamConfig;
43148
+ var args16, tool$streamsGetStreamConfig;
41881
43149
  var init_streamsGetStreamConfig2 = __esm(() => {
41882
43150
  init_streamsGetStreamConfig();
41883
43151
  init_operations();
41884
43152
  init_tools();
41885
- args12 = {
43153
+ args16 = {
41886
43154
  request: GetStreamConfigRequest$inboundSchema
41887
43155
  };
41888
43156
  tool$streamsGetStreamConfig = {
41889
43157
  name: "streams-get-stream-config",
41890
43158
  description: `Get stream configuration.`,
41891
43159
  scopes: ["read"],
41892
- args: args12,
41893
- tool: async (client, args13, ctx) => {
41894
- const [result, apiCall] = await streamsGetStreamConfig(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43160
+ args: args16,
43161
+ tool: async (client, args17, ctx) => {
43162
+ const [result, apiCall] = await streamsGetStreamConfig(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41895
43163
  if (!result.ok) {
41896
43164
  return {
41897
43165
  content: [{ type: "text", text: result.error.message }],
@@ -41906,9 +43174,9 @@ var init_streamsGetStreamConfig2 = __esm(() => {
41906
43174
 
41907
43175
  // src/funcs/streamsListStreams.ts
41908
43176
  function streamsListStreams(client, request, options) {
41909
- return new APIPromise($do13(client, request, options));
43177
+ return new APIPromise($do17(client, request, options));
41910
43178
  }
41911
- async function $do13(client, request, options) {
43179
+ async function $do17(client, request, options) {
41912
43180
  const parsed = safeParse(request, (value2) => ListStreamsRequest$outboundSchema.parse(value2), "Input validation failed");
41913
43181
  if (!parsed.ok) {
41914
43182
  return [haltIterator(parsed), { status: "invalid" }];
@@ -41955,7 +43223,7 @@ async function $do13(client, request, options) {
41955
43223
  const req = requestRes.value;
41956
43224
  const doResult = await client._do(req, {
41957
43225
  context,
41958
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
43226
+ errorCodes: ["400", "403", "404", "499", "4XX", "500", "503", "504", "5XX"],
41959
43227
  retryConfig: context.retryConfig,
41960
43228
  retryCodes: context.retryCodes
41961
43229
  });
@@ -41968,7 +43236,7 @@ async function $do13(client, request, options) {
41968
43236
  };
41969
43237
  const [result, raw] = await match(json(200, ListStreamsResponse$inboundSchema2, {
41970
43238
  key: "Result"
41971
- }), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
43239
+ }), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41972
43240
  if (!result.ok) {
41973
43241
  return [haltIterator(result), {
41974
43242
  status: "complete",
@@ -42010,21 +43278,21 @@ var init_streamsListStreams = __esm(() => {
42010
43278
  });
42011
43279
 
42012
43280
  // src/mcp-server/tools/streamsListStreams.ts
42013
- var args13, tool$streamsListStreams;
43281
+ var args17, tool$streamsListStreams;
42014
43282
  var init_streamsListStreams2 = __esm(() => {
42015
43283
  init_streamsListStreams();
42016
43284
  init_operations();
42017
43285
  init_tools();
42018
- args13 = {
43286
+ args17 = {
42019
43287
  request: ListStreamsRequest$inboundSchema
42020
43288
  };
42021
43289
  tool$streamsListStreams = {
42022
43290
  name: "streams-list-streams",
42023
43291
  description: `List streams.`,
42024
43292
  scopes: ["read"],
42025
- args: args13,
42026
- tool: async (client, args14, ctx) => {
42027
- const [result, apiCall] = await streamsListStreams(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43293
+ args: args17,
43294
+ tool: async (client, args18, ctx) => {
43295
+ const [result, apiCall] = await streamsListStreams(client, args18.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42028
43296
  if (!result.ok) {
42029
43297
  return {
42030
43298
  content: [{ type: "text", text: result.error.message }],
@@ -42039,9 +43307,9 @@ var init_streamsListStreams2 = __esm(() => {
42039
43307
 
42040
43308
  // src/funcs/streamsReconfigureStream.ts
42041
43309
  function streamsReconfigureStream(client, request, options) {
42042
- return new APIPromise($do14(client, request, options));
43310
+ return new APIPromise($do18(client, request, options));
42043
43311
  }
42044
- async function $do14(client, request, options) {
43312
+ async function $do18(client, request, options) {
42045
43313
  const parsed = safeParse(request, (value2) => ReconfigureStreamRequest$outboundSchema.parse(value2), "Input validation failed");
42046
43314
  if (!parsed.ok) {
42047
43315
  return [parsed, { status: "invalid" }];
@@ -42091,7 +43359,18 @@ async function $do14(client, request, options) {
42091
43359
  const req = requestRes.value;
42092
43360
  const doResult = await client._do(req, {
42093
43361
  context,
42094
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
43362
+ errorCodes: [
43363
+ "400",
43364
+ "403",
43365
+ "404",
43366
+ "409",
43367
+ "499",
43368
+ "4XX",
43369
+ "500",
43370
+ "503",
43371
+ "504",
43372
+ "5XX"
43373
+ ],
42095
43374
  retryConfig: context.retryConfig,
42096
43375
  retryCodes: context.retryCodes
42097
43376
  });
@@ -42102,7 +43381,7 @@ async function $do14(client, request, options) {
42102
43381
  const responseFields = {
42103
43382
  HttpMeta: { Response: response, Request: req }
42104
43383
  };
42105
- const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
43384
+ const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42106
43385
  if (!result.ok) {
42107
43386
  return [result, { status: "complete", request: req, response }];
42108
43387
  }
@@ -42123,21 +43402,21 @@ var init_streamsReconfigureStream = __esm(() => {
42123
43402
  });
42124
43403
 
42125
43404
  // src/mcp-server/tools/streamsReconfigureStream.ts
42126
- var args14, tool$streamsReconfigureStream;
43405
+ var args18, tool$streamsReconfigureStream;
42127
43406
  var init_streamsReconfigureStream2 = __esm(() => {
42128
43407
  init_streamsReconfigureStream();
42129
43408
  init_operations();
42130
43409
  init_tools();
42131
- args14 = {
43410
+ args18 = {
42132
43411
  request: ReconfigureStreamRequest$inboundSchema
42133
43412
  };
42134
43413
  tool$streamsReconfigureStream = {
42135
43414
  name: "streams-reconfigure-stream",
42136
43415
  description: `Reconfigure a stream.`,
42137
43416
  scopes: ["write"],
42138
- args: args14,
42139
- tool: async (client, args15, ctx) => {
42140
- const [result, apiCall] = await streamsReconfigureStream(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43417
+ args: args18,
43418
+ tool: async (client, args19, ctx) => {
43419
+ const [result, apiCall] = await streamsReconfigureStream(client, args19.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42141
43420
  if (!result.ok) {
42142
43421
  return {
42143
43422
  content: [{ type: "text", text: result.error.message }],
@@ -42154,7 +43433,7 @@ var init_streamsReconfigureStream2 = __esm(() => {
42154
43433
  function createMCPServer(deps) {
42155
43434
  const server = new McpServer({
42156
43435
  name: "S2",
42157
- version: "0.11.2"
43436
+ version: "0.12.0"
42158
43437
  });
42159
43438
  const client = new S2Core({
42160
43439
  accessToken: deps.accessToken,
@@ -42172,15 +43451,19 @@ function createMCPServer(deps) {
42172
43451
  tool(tool$accessTokensIssueAccessToken);
42173
43452
  tool(tool$accessTokensRevokeAccessToken);
42174
43453
  tool(tool$basinsListBasins);
43454
+ tool(tool$basinsCreateBasin);
42175
43455
  tool(tool$basinsGetBasinConfig);
42176
43456
  tool(tool$basinsCreateOrReconfigureBasin);
42177
43457
  tool(tool$basinsDeleteBasin);
42178
43458
  tool(tool$basinsReconfigureBasin);
42179
43459
  tool(tool$streamsListStreams);
43460
+ tool(tool$streamsCreateStream);
42180
43461
  tool(tool$streamsGetStreamConfig);
42181
43462
  tool(tool$streamsCreateOrReconfigureStream);
42182
43463
  tool(tool$streamsDeleteStream);
42183
43464
  tool(tool$streamsReconfigureStream);
43465
+ tool(tool$recordsRead);
43466
+ tool(tool$recordsAppend);
42184
43467
  tool(tool$recordsCheckTail);
42185
43468
  return server;
42186
43469
  }
@@ -42192,13 +43475,17 @@ var init_server2 = __esm(() => {
42192
43475
  init_accessTokensIssueAccessToken2();
42193
43476
  init_accessTokensListAccessTokens2();
42194
43477
  init_accessTokensRevokeAccessToken2();
43478
+ init_basinsCreateBasin2();
42195
43479
  init_basinsCreateOrReconfigureBasin2();
42196
43480
  init_basinsDeleteBasin2();
42197
43481
  init_basinsGetBasinConfig2();
42198
43482
  init_basinsListBasins2();
42199
43483
  init_basinsReconfigureBasin2();
43484
+ init_recordsAppend2();
42200
43485
  init_recordsCheckTail2();
43486
+ init_recordsRead2();
42201
43487
  init_streamsCreateOrReconfigureStream2();
43488
+ init_streamsCreateStream2();
42202
43489
  init_streamsDeleteStream2();
42203
43490
  init_streamsGetStreamConfig2();
42204
43491
  init_streamsListStreams2();
@@ -43399,7 +44686,7 @@ var routes = rn({
43399
44686
  var app = Ve(routes, {
43400
44687
  name: "mcp",
43401
44688
  versionInfo: {
43402
- currentVersion: "0.11.2"
44689
+ currentVersion: "0.12.0"
43403
44690
  }
43404
44691
  });
43405
44692
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -43407,5 +44694,5 @@ export {
43407
44694
  app
43408
44695
  };
43409
44696
 
43410
- //# debugId=4930F833836E7A7764756E2164756E21
44697
+ //# debugId=E625D98C99BA8A6B64756E2164756E21
43411
44698
  //# sourceMappingURL=mcp-server.js.map