@s2-dev/streamstore 0.11.2 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (669) hide show
  1. package/README.md +53 -99
  2. package/bin/mcp-server.js +1522 -254
  3. package/bin/mcp-server.js.map +85 -61
  4. package/dist/commonjs/funcs/accessTokensIssueAccessToken.d.ts +1 -1
  5. package/dist/commonjs/funcs/accessTokensIssueAccessToken.d.ts.map +1 -1
  6. package/dist/commonjs/funcs/accessTokensIssueAccessToken.js +2 -2
  7. package/dist/commonjs/funcs/accessTokensIssueAccessToken.js.map +1 -1
  8. package/dist/commonjs/funcs/accessTokensListAccessTokens.d.ts +1 -1
  9. package/dist/commonjs/funcs/accessTokensListAccessTokens.d.ts.map +1 -1
  10. package/dist/commonjs/funcs/accessTokensListAccessTokens.js +2 -2
  11. package/dist/commonjs/funcs/accessTokensListAccessTokens.js.map +1 -1
  12. package/dist/commonjs/funcs/accessTokensRevokeAccessToken.d.ts +1 -1
  13. package/dist/commonjs/funcs/accessTokensRevokeAccessToken.d.ts.map +1 -1
  14. package/dist/commonjs/funcs/accessTokensRevokeAccessToken.js +2 -2
  15. package/dist/commonjs/funcs/accessTokensRevokeAccessToken.js.map +1 -1
  16. package/dist/commonjs/funcs/basinsCreateBasin.d.ts +14 -0
  17. package/dist/commonjs/funcs/basinsCreateBasin.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/basinsCreateBasin.js +113 -0
  19. package/dist/commonjs/funcs/basinsCreateBasin.js.map +1 -0
  20. package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.d.ts +1 -1
  21. package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.d.ts.map +1 -1
  22. package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js +3 -3
  23. package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
  24. package/dist/commonjs/funcs/basinsDeleteBasin.d.ts +1 -1
  25. package/dist/commonjs/funcs/basinsDeleteBasin.d.ts.map +1 -1
  26. package/dist/commonjs/funcs/basinsDeleteBasin.js +2 -2
  27. package/dist/commonjs/funcs/basinsDeleteBasin.js.map +1 -1
  28. package/dist/commonjs/funcs/basinsGetBasinConfig.d.ts +1 -1
  29. package/dist/commonjs/funcs/basinsGetBasinConfig.d.ts.map +1 -1
  30. package/dist/commonjs/funcs/basinsGetBasinConfig.js +2 -2
  31. package/dist/commonjs/funcs/basinsGetBasinConfig.js.map +1 -1
  32. package/dist/commonjs/funcs/basinsListBasins.d.ts +1 -1
  33. package/dist/commonjs/funcs/basinsListBasins.d.ts.map +1 -1
  34. package/dist/commonjs/funcs/basinsListBasins.js +2 -2
  35. package/dist/commonjs/funcs/basinsListBasins.js.map +1 -1
  36. package/dist/commonjs/funcs/basinsReconfigureBasin.d.ts +1 -1
  37. package/dist/commonjs/funcs/basinsReconfigureBasin.d.ts.map +1 -1
  38. package/dist/commonjs/funcs/basinsReconfigureBasin.js +2 -2
  39. package/dist/commonjs/funcs/basinsReconfigureBasin.js.map +1 -1
  40. package/dist/commonjs/funcs/recordsAppend.d.ts +18 -0
  41. package/dist/commonjs/funcs/recordsAppend.d.ts.map +1 -0
  42. package/dist/commonjs/funcs/recordsAppend.js +136 -0
  43. package/dist/commonjs/funcs/recordsAppend.js.map +1 -0
  44. package/dist/commonjs/funcs/recordsCheckTail.d.ts +1 -1
  45. package/dist/commonjs/funcs/recordsCheckTail.d.ts.map +1 -1
  46. package/dist/commonjs/funcs/recordsCheckTail.js +6 -2
  47. package/dist/commonjs/funcs/recordsCheckTail.js.map +1 -1
  48. package/dist/commonjs/funcs/recordsRead.d.ts +23 -0
  49. package/dist/commonjs/funcs/recordsRead.d.ts.map +1 -0
  50. package/dist/commonjs/funcs/recordsRead.js +149 -0
  51. package/dist/commonjs/funcs/recordsRead.js.map +1 -0
  52. package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.d.ts +1 -1
  53. package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.d.ts.map +1 -1
  54. package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.js +7 -3
  55. package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.js.map +1 -1
  56. package/dist/commonjs/funcs/streamsCreateStream.d.ts +15 -0
  57. package/dist/commonjs/funcs/streamsCreateStream.d.ts.map +1 -0
  58. package/dist/commonjs/funcs/streamsCreateStream.js +125 -0
  59. package/dist/commonjs/funcs/streamsCreateStream.js.map +1 -0
  60. package/dist/commonjs/funcs/streamsDeleteStream.d.ts +1 -1
  61. package/dist/commonjs/funcs/streamsDeleteStream.d.ts.map +1 -1
  62. package/dist/commonjs/funcs/streamsDeleteStream.js +6 -2
  63. package/dist/commonjs/funcs/streamsDeleteStream.js.map +1 -1
  64. package/dist/commonjs/funcs/streamsGetStreamConfig.d.ts +1 -1
  65. package/dist/commonjs/funcs/streamsGetStreamConfig.d.ts.map +1 -1
  66. package/dist/commonjs/funcs/streamsGetStreamConfig.js +6 -2
  67. package/dist/commonjs/funcs/streamsGetStreamConfig.js.map +1 -1
  68. package/dist/commonjs/funcs/streamsListStreams.d.ts +1 -1
  69. package/dist/commonjs/funcs/streamsListStreams.d.ts.map +1 -1
  70. package/dist/commonjs/funcs/streamsListStreams.js +6 -2
  71. package/dist/commonjs/funcs/streamsListStreams.js.map +1 -1
  72. package/dist/commonjs/funcs/streamsReconfigureStream.d.ts +1 -1
  73. package/dist/commonjs/funcs/streamsReconfigureStream.d.ts.map +1 -1
  74. package/dist/commonjs/funcs/streamsReconfigureStream.js +6 -2
  75. package/dist/commonjs/funcs/streamsReconfigureStream.js.map +1 -1
  76. package/dist/commonjs/hooks/basin.d.ts +6 -0
  77. package/dist/commonjs/hooks/basin.d.ts.map +1 -0
  78. package/dist/commonjs/hooks/basin.js +32 -0
  79. package/dist/commonjs/hooks/basin.js.map +1 -0
  80. package/dist/commonjs/hooks/registration.d.ts.map +1 -1
  81. package/dist/commonjs/hooks/registration.js +3 -1
  82. package/dist/commonjs/hooks/registration.js.map +1 -1
  83. package/dist/commonjs/lib/config.d.ts +3 -3
  84. package/dist/commonjs/lib/config.js +3 -3
  85. package/dist/commonjs/lib/event-streams.d.ts +17 -0
  86. package/dist/commonjs/lib/event-streams.d.ts.map +1 -0
  87. package/dist/commonjs/lib/event-streams.js +220 -0
  88. package/dist/commonjs/lib/event-streams.js.map +1 -0
  89. package/dist/commonjs/lib/matchers.d.ts.map +1 -1
  90. package/dist/commonjs/lib/matchers.js +4 -1
  91. package/dist/commonjs/lib/matchers.js.map +1 -1
  92. package/dist/commonjs/mcp-server/cli/start/impl.js +2 -2
  93. package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
  94. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  95. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  96. package/dist/commonjs/mcp-server/server.js +9 -1
  97. package/dist/commonjs/mcp-server/server.js.map +1 -1
  98. package/dist/commonjs/mcp-server/tools/accessTokensIssueAccessToken.js +1 -1
  99. package/dist/commonjs/mcp-server/tools/accessTokensIssueAccessToken.js.map +1 -1
  100. package/dist/commonjs/mcp-server/tools/accessTokensListAccessTokens.js +1 -1
  101. package/dist/commonjs/mcp-server/tools/accessTokensListAccessTokens.js.map +1 -1
  102. package/dist/commonjs/mcp-server/tools/accessTokensRevokeAccessToken.js +1 -1
  103. package/dist/commonjs/mcp-server/tools/accessTokensRevokeAccessToken.js.map +1 -1
  104. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.d.ts +8 -0
  105. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.d.ts.map +1 -0
  106. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.js +63 -0
  107. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.js.map +1 -0
  108. package/dist/commonjs/mcp-server/tools/basinsCreateOrReconfigureBasin.js +1 -1
  109. package/dist/commonjs/mcp-server/tools/basinsCreateOrReconfigureBasin.js.map +1 -1
  110. package/dist/commonjs/mcp-server/tools/basinsDeleteBasin.js +1 -1
  111. package/dist/commonjs/mcp-server/tools/basinsDeleteBasin.js.map +1 -1
  112. package/dist/commonjs/mcp-server/tools/basinsGetBasinConfig.js +1 -1
  113. package/dist/commonjs/mcp-server/tools/basinsGetBasinConfig.js.map +1 -1
  114. package/dist/commonjs/mcp-server/tools/basinsListBasins.js +1 -1
  115. package/dist/commonjs/mcp-server/tools/basinsListBasins.js.map +1 -1
  116. package/dist/commonjs/mcp-server/tools/basinsReconfigureBasin.js +1 -1
  117. package/dist/commonjs/mcp-server/tools/basinsReconfigureBasin.js.map +1 -1
  118. package/dist/commonjs/mcp-server/tools/recordsAppend.d.ts +8 -0
  119. package/dist/commonjs/mcp-server/tools/recordsAppend.d.ts.map +1 -0
  120. package/dist/commonjs/mcp-server/tools/recordsAppend.js +65 -0
  121. package/dist/commonjs/mcp-server/tools/recordsAppend.js.map +1 -0
  122. package/dist/commonjs/mcp-server/tools/recordsCheckTail.js +1 -1
  123. package/dist/commonjs/mcp-server/tools/recordsCheckTail.js.map +1 -1
  124. package/dist/commonjs/mcp-server/tools/recordsRead.d.ts +8 -0
  125. package/dist/commonjs/mcp-server/tools/recordsRead.d.ts.map +1 -0
  126. package/dist/commonjs/mcp-server/tools/recordsRead.js +65 -0
  127. package/dist/commonjs/mcp-server/tools/recordsRead.js.map +1 -0
  128. package/dist/commonjs/mcp-server/tools/streamsCreateOrReconfigureStream.js +1 -1
  129. package/dist/commonjs/mcp-server/tools/streamsCreateOrReconfigureStream.js.map +1 -1
  130. package/dist/commonjs/mcp-server/tools/streamsCreateStream.d.ts +8 -0
  131. package/dist/commonjs/mcp-server/tools/streamsCreateStream.d.ts.map +1 -0
  132. package/dist/commonjs/mcp-server/tools/streamsCreateStream.js +63 -0
  133. package/dist/commonjs/mcp-server/tools/streamsCreateStream.js.map +1 -0
  134. package/dist/commonjs/mcp-server/tools/streamsDeleteStream.js +1 -1
  135. package/dist/commonjs/mcp-server/tools/streamsDeleteStream.js.map +1 -1
  136. package/dist/commonjs/mcp-server/tools/streamsGetStreamConfig.js +1 -1
  137. package/dist/commonjs/mcp-server/tools/streamsGetStreamConfig.js.map +1 -1
  138. package/dist/commonjs/mcp-server/tools/streamsListStreams.js +1 -1
  139. package/dist/commonjs/mcp-server/tools/streamsListStreams.js.map +1 -1
  140. package/dist/commonjs/mcp-server/tools/streamsReconfigureStream.js +1 -1
  141. package/dist/commonjs/mcp-server/tools/streamsReconfigureStream.js.map +1 -1
  142. package/dist/commonjs/models/components/accesstokeninfo.d.ts +1 -1
  143. package/dist/commonjs/models/components/appendack.d.ts +46 -0
  144. package/dist/commonjs/models/components/appendack.d.ts.map +1 -0
  145. package/dist/commonjs/models/components/appendack.js +74 -0
  146. package/dist/commonjs/models/components/appendack.js.map +1 -0
  147. package/dist/commonjs/models/components/appendinput.d.ts +46 -0
  148. package/dist/commonjs/models/components/appendinput.d.ts.map +1 -0
  149. package/dist/commonjs/models/components/appendinput.js +85 -0
  150. package/dist/commonjs/models/components/appendinput.js.map +1 -0
  151. package/dist/commonjs/models/components/appendrecord.d.ts +43 -0
  152. package/dist/commonjs/models/components/appendrecord.d.ts.map +1 -0
  153. package/dist/commonjs/models/components/appendrecord.js +74 -0
  154. package/dist/commonjs/models/components/appendrecord.js.map +1 -0
  155. package/dist/commonjs/models/components/basinconfig.d.ts +4 -4
  156. package/dist/commonjs/models/components/basinconfig.d.ts.map +1 -1
  157. package/dist/commonjs/models/components/basinconfig.js +4 -4
  158. package/dist/commonjs/models/components/basinconfig.js.map +1 -1
  159. package/dist/commonjs/models/components/createbasinrequest.d.ts +5 -0
  160. package/dist/commonjs/models/components/createbasinrequest.d.ts.map +1 -1
  161. package/dist/commonjs/models/components/createbasinrequest.js +2 -0
  162. package/dist/commonjs/models/components/createbasinrequest.js.map +1 -1
  163. package/dist/commonjs/models/components/createorreconfigurebasinrequest.d.ts +54 -0
  164. package/dist/commonjs/models/components/createorreconfigurebasinrequest.d.ts.map +1 -0
  165. package/dist/commonjs/models/components/createorreconfigurebasinrequest.js +96 -0
  166. package/dist/commonjs/models/components/createorreconfigurebasinrequest.js.map +1 -0
  167. package/dist/commonjs/models/components/createstreamrequest.d.ts +35 -0
  168. package/dist/commonjs/models/components/createstreamrequest.d.ts.map +1 -0
  169. package/dist/commonjs/models/components/createstreamrequest.js +72 -0
  170. package/dist/commonjs/models/components/createstreamrequest.js.map +1 -0
  171. package/dist/commonjs/models/components/header.d.ts +43 -0
  172. package/dist/commonjs/models/components/header.d.ts.map +1 -0
  173. package/dist/commonjs/models/components/header.js +72 -0
  174. package/dist/commonjs/models/components/header.js.map +1 -0
  175. package/dist/commonjs/models/components/index.d.ts +11 -1
  176. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  177. package/dist/commonjs/models/components/index.js +11 -1
  178. package/dist/commonjs/models/components/index.js.map +1 -1
  179. package/dist/commonjs/models/components/listaccesstokensresponse.d.ts +1 -1
  180. package/dist/commonjs/models/components/listbasinsresponse.d.ts +1 -1
  181. package/dist/commonjs/models/components/liststreamsresponse.d.ts +1 -1
  182. package/dist/commonjs/models/components/readbatch.d.ts +30 -0
  183. package/dist/commonjs/models/components/readbatch.d.ts.map +1 -0
  184. package/dist/commonjs/models/components/readbatch.js +70 -0
  185. package/dist/commonjs/models/components/readbatch.js.map +1 -0
  186. package/dist/commonjs/models/components/readevent.d.ts +107 -0
  187. package/dist/commonjs/models/components/readevent.d.ts.map +1 -0
  188. package/dist/commonjs/models/components/readevent.js +175 -0
  189. package/dist/commonjs/models/components/readevent.js.map +1 -0
  190. package/dist/commonjs/models/components/s2format.d.ts +28 -0
  191. package/dist/commonjs/models/components/s2format.d.ts.map +1 -0
  192. package/dist/commonjs/models/components/s2format.js +61 -0
  193. package/dist/commonjs/models/components/s2format.js.map +1 -0
  194. package/dist/commonjs/models/components/sequencedrecord.d.ts +45 -0
  195. package/dist/commonjs/models/components/sequencedrecord.d.ts.map +1 -0
  196. package/dist/commonjs/models/components/sequencedrecord.js +85 -0
  197. package/dist/commonjs/models/components/sequencedrecord.js.map +1 -0
  198. package/dist/commonjs/models/components/streamconfig.d.ts +2 -2
  199. package/dist/commonjs/models/components/streamconfig.d.ts.map +1 -1
  200. package/dist/commonjs/models/components/streamconfig.js +2 -2
  201. package/dist/commonjs/models/components/streamconfig.js.map +1 -1
  202. package/dist/commonjs/models/components/streaminfo.d.ts +2 -2
  203. package/dist/commonjs/models/components/streamreconfiguration.d.ts +2 -2
  204. package/dist/commonjs/models/components/streamreconfiguration.d.ts.map +1 -1
  205. package/dist/commonjs/models/components/streamreconfiguration.js +4 -2
  206. package/dist/commonjs/models/components/streamreconfiguration.js.map +1 -1
  207. package/dist/commonjs/models/components/tailresponse.d.ts +33 -0
  208. package/dist/commonjs/models/components/tailresponse.d.ts.map +1 -0
  209. package/dist/commonjs/models/components/{checktailresponse.js → tailresponse.js} +17 -17
  210. package/dist/commonjs/models/components/tailresponse.js.map +1 -0
  211. package/dist/commonjs/models/errors/appendconditionfailed.d.ts +134 -0
  212. package/dist/commonjs/models/errors/appendconditionfailed.d.ts.map +1 -0
  213. package/dist/commonjs/models/errors/appendconditionfailed.js +171 -0
  214. package/dist/commonjs/models/errors/appendconditionfailed.js.map +1 -0
  215. package/dist/commonjs/models/errors/errorresponse.d.ts +0 -3
  216. package/dist/commonjs/models/errors/errorresponse.d.ts.map +1 -1
  217. package/dist/commonjs/models/errors/errorresponse.js +3 -4
  218. package/dist/commonjs/models/errors/errorresponse.js.map +1 -1
  219. package/dist/commonjs/models/errors/index.d.ts +2 -1
  220. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  221. package/dist/commonjs/models/errors/index.js +2 -1
  222. package/dist/commonjs/models/errors/index.js.map +1 -1
  223. package/dist/commonjs/models/errors/tailresponse.d.ts +38 -0
  224. package/dist/commonjs/models/errors/tailresponse.d.ts.map +1 -0
  225. package/dist/commonjs/models/errors/{retryableerror.js → tailresponse.js} +22 -19
  226. package/dist/commonjs/models/errors/tailresponse.js.map +1 -0
  227. package/dist/commonjs/models/operations/append.d.ts +53 -0
  228. package/dist/commonjs/models/operations/append.d.ts.map +1 -0
  229. package/dist/commonjs/models/operations/append.js +95 -0
  230. package/dist/commonjs/models/operations/append.js.map +1 -0
  231. package/dist/commonjs/models/operations/checktail.d.ts +6 -2
  232. package/dist/commonjs/models/operations/checktail.d.ts.map +1 -1
  233. package/dist/commonjs/models/operations/checktail.js +11 -0
  234. package/dist/commonjs/models/operations/checktail.js.map +1 -1
  235. package/dist/commonjs/models/operations/createorreconfigurebasin.d.ts +7 -7
  236. package/dist/commonjs/models/operations/createorreconfigurebasin.d.ts.map +1 -1
  237. package/dist/commonjs/models/operations/createorreconfigurebasin.js +6 -6
  238. package/dist/commonjs/models/operations/createorreconfigurebasin.js.map +1 -1
  239. package/dist/commonjs/models/operations/createorreconfigurestream.d.ts +8 -4
  240. package/dist/commonjs/models/operations/createorreconfigurestream.d.ts.map +1 -1
  241. package/dist/commonjs/models/operations/createorreconfigurestream.js +6 -2
  242. package/dist/commonjs/models/operations/createorreconfigurestream.js.map +1 -1
  243. package/dist/commonjs/models/operations/createstream.d.ts +36 -0
  244. package/dist/commonjs/models/operations/createstream.d.ts.map +1 -0
  245. package/dist/commonjs/models/operations/createstream.js +89 -0
  246. package/dist/commonjs/models/operations/createstream.js.map +1 -0
  247. package/dist/commonjs/models/operations/deletestream.d.ts +6 -2
  248. package/dist/commonjs/models/operations/deletestream.d.ts.map +1 -1
  249. package/dist/commonjs/models/operations/deletestream.js +11 -0
  250. package/dist/commonjs/models/operations/deletestream.js.map +1 -1
  251. package/dist/commonjs/models/operations/getstreamconfig.d.ts +6 -2
  252. package/dist/commonjs/models/operations/getstreamconfig.d.ts.map +1 -1
  253. package/dist/commonjs/models/operations/getstreamconfig.js +11 -0
  254. package/dist/commonjs/models/operations/getstreamconfig.js.map +1 -1
  255. package/dist/commonjs/models/operations/index.d.ts +3 -0
  256. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  257. package/dist/commonjs/models/operations/index.js +3 -0
  258. package/dist/commonjs/models/operations/index.js.map +1 -1
  259. package/dist/commonjs/models/operations/listbasins.d.ts +1 -1
  260. package/dist/commonjs/models/operations/liststreams.d.ts +5 -0
  261. package/dist/commonjs/models/operations/liststreams.d.ts.map +1 -1
  262. package/dist/commonjs/models/operations/liststreams.js +4 -0
  263. package/dist/commonjs/models/operations/liststreams.js.map +1 -1
  264. package/dist/commonjs/models/operations/read.d.ts +98 -0
  265. package/dist/commonjs/models/operations/read.d.ts.map +1 -0
  266. package/dist/commonjs/models/operations/read.js +140 -0
  267. package/dist/commonjs/models/operations/read.js.map +1 -0
  268. package/dist/commonjs/models/operations/reconfigurestream.d.ts +6 -2
  269. package/dist/commonjs/models/operations/reconfigurestream.d.ts.map +1 -1
  270. package/dist/commonjs/models/operations/reconfigurestream.js +4 -0
  271. package/dist/commonjs/models/operations/reconfigurestream.js.map +1 -1
  272. package/dist/commonjs/sdk/basins.d.ts +4 -0
  273. package/dist/commonjs/sdk/basins.d.ts.map +1 -1
  274. package/dist/commonjs/sdk/basins.js +7 -0
  275. package/dist/commonjs/sdk/basins.js.map +1 -1
  276. package/dist/commonjs/sdk/records.d.ts +19 -1
  277. package/dist/commonjs/sdk/records.d.ts.map +1 -1
  278. package/dist/commonjs/sdk/records.js +23 -1
  279. package/dist/commonjs/sdk/records.js.map +1 -1
  280. package/dist/commonjs/sdk/streams.d.ts +4 -0
  281. package/dist/commonjs/sdk/streams.d.ts.map +1 -1
  282. package/dist/commonjs/sdk/streams.js +7 -0
  283. package/dist/commonjs/sdk/streams.js.map +1 -1
  284. package/dist/esm/funcs/accessTokensIssueAccessToken.d.ts +1 -1
  285. package/dist/esm/funcs/accessTokensIssueAccessToken.d.ts.map +1 -1
  286. package/dist/esm/funcs/accessTokensIssueAccessToken.js +2 -2
  287. package/dist/esm/funcs/accessTokensIssueAccessToken.js.map +1 -1
  288. package/dist/esm/funcs/accessTokensListAccessTokens.d.ts +1 -1
  289. package/dist/esm/funcs/accessTokensListAccessTokens.d.ts.map +1 -1
  290. package/dist/esm/funcs/accessTokensListAccessTokens.js +2 -2
  291. package/dist/esm/funcs/accessTokensListAccessTokens.js.map +1 -1
  292. package/dist/esm/funcs/accessTokensRevokeAccessToken.d.ts +1 -1
  293. package/dist/esm/funcs/accessTokensRevokeAccessToken.d.ts.map +1 -1
  294. package/dist/esm/funcs/accessTokensRevokeAccessToken.js +2 -2
  295. package/dist/esm/funcs/accessTokensRevokeAccessToken.js.map +1 -1
  296. package/dist/esm/funcs/basinsCreateBasin.d.ts +14 -0
  297. package/dist/esm/funcs/basinsCreateBasin.d.ts.map +1 -0
  298. package/dist/esm/funcs/basinsCreateBasin.js +77 -0
  299. package/dist/esm/funcs/basinsCreateBasin.js.map +1 -0
  300. package/dist/esm/funcs/basinsCreateOrReconfigureBasin.d.ts +1 -1
  301. package/dist/esm/funcs/basinsCreateOrReconfigureBasin.d.ts.map +1 -1
  302. package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js +3 -3
  303. package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
  304. package/dist/esm/funcs/basinsDeleteBasin.d.ts +1 -1
  305. package/dist/esm/funcs/basinsDeleteBasin.d.ts.map +1 -1
  306. package/dist/esm/funcs/basinsDeleteBasin.js +2 -2
  307. package/dist/esm/funcs/basinsDeleteBasin.js.map +1 -1
  308. package/dist/esm/funcs/basinsGetBasinConfig.d.ts +1 -1
  309. package/dist/esm/funcs/basinsGetBasinConfig.d.ts.map +1 -1
  310. package/dist/esm/funcs/basinsGetBasinConfig.js +2 -2
  311. package/dist/esm/funcs/basinsGetBasinConfig.js.map +1 -1
  312. package/dist/esm/funcs/basinsListBasins.d.ts +1 -1
  313. package/dist/esm/funcs/basinsListBasins.d.ts.map +1 -1
  314. package/dist/esm/funcs/basinsListBasins.js +2 -2
  315. package/dist/esm/funcs/basinsListBasins.js.map +1 -1
  316. package/dist/esm/funcs/basinsReconfigureBasin.d.ts +1 -1
  317. package/dist/esm/funcs/basinsReconfigureBasin.d.ts.map +1 -1
  318. package/dist/esm/funcs/basinsReconfigureBasin.js +2 -2
  319. package/dist/esm/funcs/basinsReconfigureBasin.js.map +1 -1
  320. package/dist/esm/funcs/recordsAppend.d.ts +18 -0
  321. package/dist/esm/funcs/recordsAppend.d.ts.map +1 -0
  322. package/dist/esm/funcs/recordsAppend.js +100 -0
  323. package/dist/esm/funcs/recordsAppend.js.map +1 -0
  324. package/dist/esm/funcs/recordsCheckTail.d.ts +1 -1
  325. package/dist/esm/funcs/recordsCheckTail.d.ts.map +1 -1
  326. package/dist/esm/funcs/recordsCheckTail.js +6 -2
  327. package/dist/esm/funcs/recordsCheckTail.js.map +1 -1
  328. package/dist/esm/funcs/recordsRead.d.ts +23 -0
  329. package/dist/esm/funcs/recordsRead.d.ts.map +1 -0
  330. package/dist/esm/funcs/recordsRead.js +112 -0
  331. package/dist/esm/funcs/recordsRead.js.map +1 -0
  332. package/dist/esm/funcs/streamsCreateOrReconfigureStream.d.ts +1 -1
  333. package/dist/esm/funcs/streamsCreateOrReconfigureStream.d.ts.map +1 -1
  334. package/dist/esm/funcs/streamsCreateOrReconfigureStream.js +7 -3
  335. package/dist/esm/funcs/streamsCreateOrReconfigureStream.js.map +1 -1
  336. package/dist/esm/funcs/streamsCreateStream.d.ts +15 -0
  337. package/dist/esm/funcs/streamsCreateStream.d.ts.map +1 -0
  338. package/dist/esm/funcs/streamsCreateStream.js +89 -0
  339. package/dist/esm/funcs/streamsCreateStream.js.map +1 -0
  340. package/dist/esm/funcs/streamsDeleteStream.d.ts +1 -1
  341. package/dist/esm/funcs/streamsDeleteStream.d.ts.map +1 -1
  342. package/dist/esm/funcs/streamsDeleteStream.js +6 -2
  343. package/dist/esm/funcs/streamsDeleteStream.js.map +1 -1
  344. package/dist/esm/funcs/streamsGetStreamConfig.d.ts +1 -1
  345. package/dist/esm/funcs/streamsGetStreamConfig.d.ts.map +1 -1
  346. package/dist/esm/funcs/streamsGetStreamConfig.js +6 -2
  347. package/dist/esm/funcs/streamsGetStreamConfig.js.map +1 -1
  348. package/dist/esm/funcs/streamsListStreams.d.ts +1 -1
  349. package/dist/esm/funcs/streamsListStreams.d.ts.map +1 -1
  350. package/dist/esm/funcs/streamsListStreams.js +7 -3
  351. package/dist/esm/funcs/streamsListStreams.js.map +1 -1
  352. package/dist/esm/funcs/streamsReconfigureStream.d.ts +1 -1
  353. package/dist/esm/funcs/streamsReconfigureStream.d.ts.map +1 -1
  354. package/dist/esm/funcs/streamsReconfigureStream.js +6 -2
  355. package/dist/esm/funcs/streamsReconfigureStream.js.map +1 -1
  356. package/dist/esm/hooks/basin.d.ts +6 -0
  357. package/dist/esm/hooks/basin.d.ts.map +1 -0
  358. package/dist/esm/hooks/basin.js +28 -0
  359. package/dist/esm/hooks/basin.js.map +1 -0
  360. package/dist/esm/hooks/registration.d.ts.map +1 -1
  361. package/dist/esm/hooks/registration.js +3 -1
  362. package/dist/esm/hooks/registration.js.map +1 -1
  363. package/dist/esm/lib/config.d.ts +3 -3
  364. package/dist/esm/lib/config.js +3 -3
  365. package/dist/esm/lib/event-streams.d.ts +17 -0
  366. package/dist/esm/lib/event-streams.d.ts.map +1 -0
  367. package/dist/esm/lib/event-streams.js +215 -0
  368. package/dist/esm/lib/event-streams.js.map +1 -0
  369. package/dist/esm/lib/matchers.d.ts.map +1 -1
  370. package/dist/esm/lib/matchers.js +4 -1
  371. package/dist/esm/lib/matchers.js.map +1 -1
  372. package/dist/esm/mcp-server/cli/start/impl.js +2 -2
  373. package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
  374. package/dist/esm/mcp-server/mcp-server.js +1 -1
  375. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  376. package/dist/esm/mcp-server/server.js +9 -1
  377. package/dist/esm/mcp-server/server.js.map +1 -1
  378. package/dist/esm/mcp-server/tools/accessTokensIssueAccessToken.js +1 -1
  379. package/dist/esm/mcp-server/tools/accessTokensIssueAccessToken.js.map +1 -1
  380. package/dist/esm/mcp-server/tools/accessTokensListAccessTokens.js +1 -1
  381. package/dist/esm/mcp-server/tools/accessTokensListAccessTokens.js.map +1 -1
  382. package/dist/esm/mcp-server/tools/accessTokensRevokeAccessToken.js +1 -1
  383. package/dist/esm/mcp-server/tools/accessTokensRevokeAccessToken.js.map +1 -1
  384. package/dist/esm/mcp-server/tools/basinsCreateBasin.d.ts +8 -0
  385. package/dist/esm/mcp-server/tools/basinsCreateBasin.d.ts.map +1 -0
  386. package/dist/esm/mcp-server/tools/basinsCreateBasin.js +27 -0
  387. package/dist/esm/mcp-server/tools/basinsCreateBasin.js.map +1 -0
  388. package/dist/esm/mcp-server/tools/basinsCreateOrReconfigureBasin.js +1 -1
  389. package/dist/esm/mcp-server/tools/basinsCreateOrReconfigureBasin.js.map +1 -1
  390. package/dist/esm/mcp-server/tools/basinsDeleteBasin.js +1 -1
  391. package/dist/esm/mcp-server/tools/basinsDeleteBasin.js.map +1 -1
  392. package/dist/esm/mcp-server/tools/basinsGetBasinConfig.js +1 -1
  393. package/dist/esm/mcp-server/tools/basinsGetBasinConfig.js.map +1 -1
  394. package/dist/esm/mcp-server/tools/basinsListBasins.js +1 -1
  395. package/dist/esm/mcp-server/tools/basinsListBasins.js.map +1 -1
  396. package/dist/esm/mcp-server/tools/basinsReconfigureBasin.js +1 -1
  397. package/dist/esm/mcp-server/tools/basinsReconfigureBasin.js.map +1 -1
  398. package/dist/esm/mcp-server/tools/recordsAppend.d.ts +8 -0
  399. package/dist/esm/mcp-server/tools/recordsAppend.d.ts.map +1 -0
  400. package/dist/esm/mcp-server/tools/recordsAppend.js +29 -0
  401. package/dist/esm/mcp-server/tools/recordsAppend.js.map +1 -0
  402. package/dist/esm/mcp-server/tools/recordsCheckTail.js +1 -1
  403. package/dist/esm/mcp-server/tools/recordsCheckTail.js.map +1 -1
  404. package/dist/esm/mcp-server/tools/recordsRead.d.ts +8 -0
  405. package/dist/esm/mcp-server/tools/recordsRead.d.ts.map +1 -0
  406. package/dist/esm/mcp-server/tools/recordsRead.js +29 -0
  407. package/dist/esm/mcp-server/tools/recordsRead.js.map +1 -0
  408. package/dist/esm/mcp-server/tools/streamsCreateOrReconfigureStream.js +1 -1
  409. package/dist/esm/mcp-server/tools/streamsCreateOrReconfigureStream.js.map +1 -1
  410. package/dist/esm/mcp-server/tools/streamsCreateStream.d.ts +8 -0
  411. package/dist/esm/mcp-server/tools/streamsCreateStream.d.ts.map +1 -0
  412. package/dist/esm/mcp-server/tools/streamsCreateStream.js +27 -0
  413. package/dist/esm/mcp-server/tools/streamsCreateStream.js.map +1 -0
  414. package/dist/esm/mcp-server/tools/streamsDeleteStream.js +1 -1
  415. package/dist/esm/mcp-server/tools/streamsDeleteStream.js.map +1 -1
  416. package/dist/esm/mcp-server/tools/streamsGetStreamConfig.js +1 -1
  417. package/dist/esm/mcp-server/tools/streamsGetStreamConfig.js.map +1 -1
  418. package/dist/esm/mcp-server/tools/streamsListStreams.js +1 -1
  419. package/dist/esm/mcp-server/tools/streamsListStreams.js.map +1 -1
  420. package/dist/esm/mcp-server/tools/streamsReconfigureStream.js +1 -1
  421. package/dist/esm/mcp-server/tools/streamsReconfigureStream.js.map +1 -1
  422. package/dist/esm/models/components/accesstokeninfo.d.ts +1 -1
  423. package/dist/esm/models/components/appendack.d.ts +46 -0
  424. package/dist/esm/models/components/appendack.d.ts.map +1 -0
  425. package/dist/esm/models/components/appendack.js +36 -0
  426. package/dist/esm/models/components/appendack.js.map +1 -0
  427. package/dist/esm/models/components/appendinput.d.ts +46 -0
  428. package/dist/esm/models/components/appendinput.d.ts.map +1 -0
  429. package/dist/esm/models/components/appendinput.js +47 -0
  430. package/dist/esm/models/components/appendinput.js.map +1 -0
  431. package/dist/esm/models/components/appendrecord.d.ts +43 -0
  432. package/dist/esm/models/components/appendrecord.d.ts.map +1 -0
  433. package/dist/esm/models/components/appendrecord.js +36 -0
  434. package/dist/esm/models/components/appendrecord.js.map +1 -0
  435. package/dist/esm/models/components/basinconfig.d.ts +4 -4
  436. package/dist/esm/models/components/basinconfig.d.ts.map +1 -1
  437. package/dist/esm/models/components/basinconfig.js +4 -4
  438. package/dist/esm/models/components/basinconfig.js.map +1 -1
  439. package/dist/esm/models/components/createbasinrequest.d.ts +5 -0
  440. package/dist/esm/models/components/createbasinrequest.d.ts.map +1 -1
  441. package/dist/esm/models/components/createbasinrequest.js +2 -0
  442. package/dist/esm/models/components/createbasinrequest.js.map +1 -1
  443. package/dist/esm/models/components/createorreconfigurebasinrequest.d.ts +54 -0
  444. package/dist/esm/models/components/createorreconfigurebasinrequest.d.ts.map +1 -0
  445. package/dist/esm/models/components/createorreconfigurebasinrequest.js +56 -0
  446. package/dist/esm/models/components/createorreconfigurebasinrequest.js.map +1 -0
  447. package/dist/esm/models/components/createstreamrequest.d.ts +35 -0
  448. package/dist/esm/models/components/createstreamrequest.d.ts.map +1 -0
  449. package/dist/esm/models/components/createstreamrequest.js +34 -0
  450. package/dist/esm/models/components/createstreamrequest.js.map +1 -0
  451. package/dist/esm/models/components/header.d.ts +43 -0
  452. package/dist/esm/models/components/header.d.ts.map +1 -0
  453. package/dist/esm/models/components/header.js +34 -0
  454. package/dist/esm/models/components/header.js.map +1 -0
  455. package/dist/esm/models/components/index.d.ts +11 -1
  456. package/dist/esm/models/components/index.d.ts.map +1 -1
  457. package/dist/esm/models/components/index.js +11 -1
  458. package/dist/esm/models/components/index.js.map +1 -1
  459. package/dist/esm/models/components/listaccesstokensresponse.d.ts +1 -1
  460. package/dist/esm/models/components/listbasinsresponse.d.ts +1 -1
  461. package/dist/esm/models/components/liststreamsresponse.d.ts +1 -1
  462. package/dist/esm/models/components/readbatch.d.ts +30 -0
  463. package/dist/esm/models/components/readbatch.d.ts.map +1 -0
  464. package/dist/esm/models/components/readbatch.js +32 -0
  465. package/dist/esm/models/components/readbatch.js.map +1 -0
  466. package/dist/esm/models/components/readevent.d.ts +107 -0
  467. package/dist/esm/models/components/readevent.d.ts.map +1 -0
  468. package/dist/esm/models/components/readevent.js +131 -0
  469. package/dist/esm/models/components/readevent.js.map +1 -0
  470. package/dist/esm/models/components/s2format.d.ts +28 -0
  471. package/dist/esm/models/components/s2format.d.ts.map +1 -0
  472. package/dist/esm/models/components/s2format.js +25 -0
  473. package/dist/esm/models/components/s2format.js.map +1 -0
  474. package/dist/esm/models/components/sequencedrecord.d.ts +45 -0
  475. package/dist/esm/models/components/sequencedrecord.d.ts.map +1 -0
  476. package/dist/esm/models/components/sequencedrecord.js +47 -0
  477. package/dist/esm/models/components/sequencedrecord.js.map +1 -0
  478. package/dist/esm/models/components/streamconfig.d.ts +2 -2
  479. package/dist/esm/models/components/streamconfig.d.ts.map +1 -1
  480. package/dist/esm/models/components/streamconfig.js +2 -2
  481. package/dist/esm/models/components/streamconfig.js.map +1 -1
  482. package/dist/esm/models/components/streaminfo.d.ts +2 -2
  483. package/dist/esm/models/components/streamreconfiguration.d.ts +2 -2
  484. package/dist/esm/models/components/streamreconfiguration.d.ts.map +1 -1
  485. package/dist/esm/models/components/streamreconfiguration.js +4 -2
  486. package/dist/esm/models/components/streamreconfiguration.js.map +1 -1
  487. package/dist/esm/models/components/tailresponse.d.ts +33 -0
  488. package/dist/esm/models/components/tailresponse.d.ts.map +1 -0
  489. package/dist/esm/models/components/tailresponse.js +32 -0
  490. package/dist/esm/models/components/tailresponse.js.map +1 -0
  491. package/dist/esm/models/errors/appendconditionfailed.d.ts +134 -0
  492. package/dist/esm/models/errors/appendconditionfailed.d.ts.map +1 -0
  493. package/dist/esm/models/errors/appendconditionfailed.js +131 -0
  494. package/dist/esm/models/errors/appendconditionfailed.js.map +1 -0
  495. package/dist/esm/models/errors/errorresponse.d.ts +0 -3
  496. package/dist/esm/models/errors/errorresponse.d.ts.map +1 -1
  497. package/dist/esm/models/errors/errorresponse.js +3 -4
  498. package/dist/esm/models/errors/errorresponse.js.map +1 -1
  499. package/dist/esm/models/errors/index.d.ts +2 -1
  500. package/dist/esm/models/errors/index.d.ts.map +1 -1
  501. package/dist/esm/models/errors/index.js +2 -1
  502. package/dist/esm/models/errors/index.js.map +1 -1
  503. package/dist/esm/models/errors/tailresponse.d.ts +38 -0
  504. package/dist/esm/models/errors/tailresponse.d.ts.map +1 -0
  505. package/dist/esm/models/errors/tailresponse.js +41 -0
  506. package/dist/esm/models/errors/tailresponse.js.map +1 -0
  507. package/dist/esm/models/operations/append.d.ts +53 -0
  508. package/dist/esm/models/operations/append.d.ts.map +1 -0
  509. package/dist/esm/models/operations/append.js +57 -0
  510. package/dist/esm/models/operations/append.js.map +1 -0
  511. package/dist/esm/models/operations/checktail.d.ts +6 -2
  512. package/dist/esm/models/operations/checktail.d.ts.map +1 -1
  513. package/dist/esm/models/operations/checktail.js +11 -0
  514. package/dist/esm/models/operations/checktail.js.map +1 -1
  515. package/dist/esm/models/operations/createorreconfigurebasin.d.ts +7 -7
  516. package/dist/esm/models/operations/createorreconfigurebasin.d.ts.map +1 -1
  517. package/dist/esm/models/operations/createorreconfigurebasin.js +6 -6
  518. package/dist/esm/models/operations/createorreconfigurebasin.js.map +1 -1
  519. package/dist/esm/models/operations/createorreconfigurestream.d.ts +8 -4
  520. package/dist/esm/models/operations/createorreconfigurestream.d.ts.map +1 -1
  521. package/dist/esm/models/operations/createorreconfigurestream.js +6 -2
  522. package/dist/esm/models/operations/createorreconfigurestream.js.map +1 -1
  523. package/dist/esm/models/operations/createstream.d.ts +36 -0
  524. package/dist/esm/models/operations/createstream.d.ts.map +1 -0
  525. package/dist/esm/models/operations/createstream.js +51 -0
  526. package/dist/esm/models/operations/createstream.js.map +1 -0
  527. package/dist/esm/models/operations/deletestream.d.ts +6 -2
  528. package/dist/esm/models/operations/deletestream.d.ts.map +1 -1
  529. package/dist/esm/models/operations/deletestream.js +11 -0
  530. package/dist/esm/models/operations/deletestream.js.map +1 -1
  531. package/dist/esm/models/operations/getstreamconfig.d.ts +6 -2
  532. package/dist/esm/models/operations/getstreamconfig.d.ts.map +1 -1
  533. package/dist/esm/models/operations/getstreamconfig.js +11 -0
  534. package/dist/esm/models/operations/getstreamconfig.js.map +1 -1
  535. package/dist/esm/models/operations/index.d.ts +3 -0
  536. package/dist/esm/models/operations/index.d.ts.map +1 -1
  537. package/dist/esm/models/operations/index.js +3 -0
  538. package/dist/esm/models/operations/index.js.map +1 -1
  539. package/dist/esm/models/operations/listbasins.d.ts +1 -1
  540. package/dist/esm/models/operations/liststreams.d.ts +5 -0
  541. package/dist/esm/models/operations/liststreams.d.ts.map +1 -1
  542. package/dist/esm/models/operations/liststreams.js +4 -0
  543. package/dist/esm/models/operations/liststreams.js.map +1 -1
  544. package/dist/esm/models/operations/read.d.ts +98 -0
  545. package/dist/esm/models/operations/read.d.ts.map +1 -0
  546. package/dist/esm/models/operations/read.js +100 -0
  547. package/dist/esm/models/operations/read.js.map +1 -0
  548. package/dist/esm/models/operations/reconfigurestream.d.ts +6 -2
  549. package/dist/esm/models/operations/reconfigurestream.d.ts.map +1 -1
  550. package/dist/esm/models/operations/reconfigurestream.js +4 -0
  551. package/dist/esm/models/operations/reconfigurestream.js.map +1 -1
  552. package/dist/esm/sdk/basins.d.ts +4 -0
  553. package/dist/esm/sdk/basins.d.ts.map +1 -1
  554. package/dist/esm/sdk/basins.js +7 -0
  555. package/dist/esm/sdk/basins.js.map +1 -1
  556. package/dist/esm/sdk/records.d.ts +19 -1
  557. package/dist/esm/sdk/records.d.ts.map +1 -1
  558. package/dist/esm/sdk/records.js +21 -0
  559. package/dist/esm/sdk/records.js.map +1 -1
  560. package/dist/esm/sdk/streams.d.ts +4 -0
  561. package/dist/esm/sdk/streams.d.ts.map +1 -1
  562. package/dist/esm/sdk/streams.js +7 -0
  563. package/dist/esm/sdk/streams.js.map +1 -1
  564. package/docs/sdks/accesstokens/README.md +12 -18
  565. package/docs/sdks/basins/README.md +98 -32
  566. package/docs/sdks/records/README.md +191 -7
  567. package/docs/sdks/streams/README.md +121 -44
  568. package/jsr.json +2 -1
  569. package/package.json +1 -1
  570. package/src/funcs/accessTokensIssueAccessToken.ts +2 -10
  571. package/src/funcs/accessTokensListAccessTokens.ts +2 -10
  572. package/src/funcs/accessTokensRevokeAccessToken.ts +2 -10
  573. package/src/funcs/basinsCreateBasin.ts +160 -0
  574. package/src/funcs/basinsCreateOrReconfigureBasin.ts +3 -11
  575. package/src/funcs/basinsDeleteBasin.ts +2 -10
  576. package/src/funcs/basinsGetBasinConfig.ts +2 -10
  577. package/src/funcs/basinsListBasins.ts +2 -12
  578. package/src/funcs/basinsReconfigureBasin.ts +2 -10
  579. package/src/funcs/recordsAppend.ts +193 -0
  580. package/src/funcs/recordsCheckTail.ts +14 -14
  581. package/src/funcs/recordsRead.ts +207 -0
  582. package/src/funcs/streamsCreateOrReconfigureStream.ts +7 -11
  583. package/src/funcs/streamsCreateStream.ts +173 -0
  584. package/src/funcs/streamsDeleteStream.ts +6 -10
  585. package/src/funcs/streamsGetStreamConfig.ts +6 -10
  586. package/src/funcs/streamsListStreams.ts +7 -13
  587. package/src/funcs/streamsReconfigureStream.ts +6 -10
  588. package/src/hooks/basin.ts +39 -0
  589. package/src/hooks/registration.ts +2 -1
  590. package/src/lib/config.ts +3 -3
  591. package/src/lib/event-streams.ts +264 -0
  592. package/src/lib/matchers.ts +4 -1
  593. package/src/mcp-server/cli/start/impl.ts +2 -2
  594. package/src/mcp-server/mcp-server.ts +1 -1
  595. package/src/mcp-server/server.ts +9 -1
  596. package/src/mcp-server/tools/accessTokensIssueAccessToken.ts +1 -1
  597. package/src/mcp-server/tools/accessTokensListAccessTokens.ts +1 -1
  598. package/src/mcp-server/tools/accessTokensRevokeAccessToken.ts +1 -1
  599. package/src/mcp-server/tools/basinsCreateBasin.ts +36 -0
  600. package/src/mcp-server/tools/basinsCreateOrReconfigureBasin.ts +1 -1
  601. package/src/mcp-server/tools/basinsDeleteBasin.ts +1 -1
  602. package/src/mcp-server/tools/basinsGetBasinConfig.ts +1 -1
  603. package/src/mcp-server/tools/basinsListBasins.ts +1 -1
  604. package/src/mcp-server/tools/basinsReconfigureBasin.ts +1 -1
  605. package/src/mcp-server/tools/recordsAppend.ts +38 -0
  606. package/src/mcp-server/tools/recordsCheckTail.ts +1 -1
  607. package/src/mcp-server/tools/recordsRead.ts +38 -0
  608. package/src/mcp-server/tools/streamsCreateOrReconfigureStream.ts +1 -1
  609. package/src/mcp-server/tools/streamsCreateStream.ts +36 -0
  610. package/src/mcp-server/tools/streamsDeleteStream.ts +1 -1
  611. package/src/mcp-server/tools/streamsGetStreamConfig.ts +1 -1
  612. package/src/mcp-server/tools/streamsListStreams.ts +1 -1
  613. package/src/mcp-server/tools/streamsReconfigureStream.ts +1 -1
  614. package/src/models/components/accesstokeninfo.ts +1 -1
  615. package/src/models/components/appendack.ts +88 -0
  616. package/src/models/components/appendinput.ts +99 -0
  617. package/src/models/components/appendrecord.ts +85 -0
  618. package/src/models/components/basinconfig.ts +8 -8
  619. package/src/models/components/createbasinrequest.ts +7 -0
  620. package/src/models/components/createorreconfigurebasinrequest.ts +138 -0
  621. package/src/models/components/createstreamrequest.ts +79 -0
  622. package/src/models/components/header.ts +75 -0
  623. package/src/models/components/index.ts +11 -1
  624. package/src/models/components/listaccesstokensresponse.ts +1 -1
  625. package/src/models/components/listbasinsresponse.ts +1 -1
  626. package/src/models/components/liststreamsresponse.ts +1 -1
  627. package/src/models/components/readbatch.ts +68 -0
  628. package/src/models/components/readevent.ts +243 -0
  629. package/src/models/components/s2format.ts +31 -0
  630. package/src/models/components/sequencedrecord.ts +100 -0
  631. package/src/models/components/streamconfig.ts +4 -4
  632. package/src/models/components/streaminfo.ts +2 -2
  633. package/src/models/components/streamreconfiguration.ts +6 -4
  634. package/src/models/components/tailresponse.ts +71 -0
  635. package/src/models/errors/appendconditionfailed.ts +249 -0
  636. package/src/models/errors/errorresponse.ts +3 -7
  637. package/src/models/errors/index.ts +2 -1
  638. package/src/models/errors/tailresponse.ts +76 -0
  639. package/src/models/operations/append.ts +111 -0
  640. package/src/models/operations/checktail.ts +17 -2
  641. package/src/models/operations/createorreconfigurebasin.ts +23 -13
  642. package/src/models/operations/createorreconfigurestream.ts +14 -6
  643. package/src/models/operations/createstream.ts +92 -0
  644. package/src/models/operations/deletestream.ts +17 -2
  645. package/src/models/operations/getstreamconfig.ts +17 -2
  646. package/src/models/operations/index.ts +3 -0
  647. package/src/models/operations/listbasins.ts +1 -1
  648. package/src/models/operations/liststreams.ts +9 -0
  649. package/src/models/operations/read.ts +204 -0
  650. package/src/models/operations/reconfigurestream.ts +10 -2
  651. package/src/sdk/basins.ts +15 -0
  652. package/src/sdk/records.ts +39 -1
  653. package/src/sdk/streams.ts +15 -0
  654. package/dist/commonjs/models/components/checktailresponse.d.ts +0 -33
  655. package/dist/commonjs/models/components/checktailresponse.d.ts.map +0 -1
  656. package/dist/commonjs/models/components/checktailresponse.js.map +0 -1
  657. package/dist/commonjs/models/errors/retryableerror.d.ts +0 -31
  658. package/dist/commonjs/models/errors/retryableerror.d.ts.map +0 -1
  659. package/dist/commonjs/models/errors/retryableerror.js.map +0 -1
  660. package/dist/esm/models/components/checktailresponse.d.ts +0 -33
  661. package/dist/esm/models/components/checktailresponse.d.ts.map +0 -1
  662. package/dist/esm/models/components/checktailresponse.js +0 -32
  663. package/dist/esm/models/components/checktailresponse.js.map +0 -1
  664. package/dist/esm/models/errors/retryableerror.d.ts +0 -31
  665. package/dist/esm/models/errors/retryableerror.d.ts.map +0 -1
  666. package/dist/esm/models/errors/retryableerror.js +0 -38
  667. package/dist/esm/models/errors/retryableerror.js.map +0 -1
  668. package/src/models/components/checktailresponse.ts +0 -75
  669. package/src/models/errors/retryableerror.ts +0 -67
package/bin/mcp-server.js CHANGED
@@ -33982,9 +33982,37 @@ var init_mcp = __esm(() => {
33982
33982
  };
33983
33983
  });
33984
33984
 
33985
+ // src/hooks/basin.ts
33986
+ class AddBasinToUrlHook {
33987
+ beforeCreateRequest(_hookCtx, input) {
33988
+ const headers = input.options?.headers;
33989
+ if (!headers)
33990
+ return input;
33991
+ const basinHeader = headers instanceof Headers ? headers.get("s2-basin") : headers["s2-basin"];
33992
+ if (!basinHeader)
33993
+ return input;
33994
+ const url = new URL(input.url);
33995
+ if (!url.hostname.includes(".b.aws.s2.dev"))
33996
+ return input;
33997
+ url.hostname = `${basinHeader}.b.aws.s2.dev`;
33998
+ const remainingHeaders = headers instanceof Headers ? Object.fromEntries([...headers.entries()].filter(([key]) => key !== "s2-basin")) : Object.fromEntries(Object.entries(headers).filter(([key]) => key !== "s2-basin"));
33999
+ return {
34000
+ ...input,
34001
+ url,
34002
+ options: {
34003
+ ...input.options,
34004
+ headers: remainingHeaders
34005
+ }
34006
+ };
34007
+ }
34008
+ }
34009
+
33985
34010
  // src/hooks/registration.ts
33986
34011
  function initHooks(hooks) {
34012
+ hooks.registerBeforeCreateRequestHook(new AddBasinToUrlHook);
33987
34013
  }
34014
+ var init_registration = () => {
34015
+ };
33988
34016
 
33989
34017
  // src/hooks/hooks.ts
33990
34018
  class SDKHooks {
@@ -34064,8 +34092,9 @@ class SDKHooks {
34064
34092
  return { response: res, error: err };
34065
34093
  }
34066
34094
  }
34067
- var init_hooks = () => {
34068
- };
34095
+ var init_hooks = __esm(() => {
34096
+ init_registration();
34097
+ });
34069
34098
 
34070
34099
  // src/models/errors/httpclienterrors.ts
34071
34100
  var HTTPClientError, UnexpectedClientError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, ConnectionError;
@@ -34173,9 +34202,9 @@ var init_config = __esm(() => {
34173
34202
  SDK_METADATA = {
34174
34203
  language: "typescript",
34175
34204
  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"
34205
+ sdkVersion: "0.13.1",
34206
+ genVersion: "2.605.0",
34207
+ userAgent: "speakeasy-sdk/typescript 0.13.1 2.605.0 1.0.0 @s2-dev/streamstore"
34179
34208
  };
34180
34209
  });
34181
34210
 
@@ -35178,6 +35207,208 @@ ${body}` : "";
35178
35207
  };
35179
35208
  });
35180
35209
 
35210
+ // src/lib/event-streams.ts
35211
+ function findBoundary(buffer, start) {
35212
+ const char1 = buffer[start];
35213
+ const char2 = buffer[start + 1];
35214
+ if (char1 == null || char2 == null || !NEWLINE_CHARS.has(char1) || !NEWLINE_CHARS.has(char2)) {
35215
+ return null;
35216
+ }
35217
+ for (const s of MESSAGE_BOUNDARIES) {
35218
+ const seq = peekSequence(start, buffer, s);
35219
+ if (seq != null) {
35220
+ return seq;
35221
+ }
35222
+ }
35223
+ return null;
35224
+ }
35225
+ function peekSequence(position, buffer, sequence) {
35226
+ if (sequence.length > buffer.length - position) {
35227
+ return null;
35228
+ }
35229
+ for (let i = 0;i < sequence.length; i++) {
35230
+ if (buffer[position + i] !== sequence[i]) {
35231
+ return null;
35232
+ }
35233
+ }
35234
+ return sequence;
35235
+ }
35236
+ function parseEvent(chunk, decoder) {
35237
+ if (!chunk.length) {
35238
+ return null;
35239
+ }
35240
+ const td = new TextDecoder;
35241
+ const raw = td.decode(chunk);
35242
+ const lines = raw.split(/\r?\n|\r/g);
35243
+ let publish = false;
35244
+ const rawEvent = {};
35245
+ for (const line of lines) {
35246
+ if (!line) {
35247
+ continue;
35248
+ }
35249
+ const delim = line.indexOf(":");
35250
+ if (delim === 0) {
35251
+ continue;
35252
+ }
35253
+ const field = delim > 0 ? line.substring(0, delim) : "";
35254
+ let value = delim > 0 ? line.substring(delim + 1) : "";
35255
+ if (value.charAt(0) === " ") {
35256
+ value = value.substring(1);
35257
+ }
35258
+ switch (field) {
35259
+ case "event": {
35260
+ publish = true;
35261
+ rawEvent.event = value;
35262
+ break;
35263
+ }
35264
+ case "data": {
35265
+ publish = true;
35266
+ rawEvent.data ??= "";
35267
+ rawEvent.data += value + `
35268
+ `;
35269
+ break;
35270
+ }
35271
+ case "id": {
35272
+ publish = true;
35273
+ rawEvent.id = value;
35274
+ break;
35275
+ }
35276
+ case "retry": {
35277
+ const r = parseInt(value, 10);
35278
+ if (!Number.isNaN(r)) {
35279
+ publish = true;
35280
+ rawEvent.retry = r;
35281
+ }
35282
+ break;
35283
+ }
35284
+ }
35285
+ }
35286
+ if (!publish) {
35287
+ return null;
35288
+ }
35289
+ if (rawEvent.data != null) {
35290
+ rawEvent.data = rawEvent.data.slice(0, -1);
35291
+ }
35292
+ return decoder(rawEvent);
35293
+ }
35294
+ function discardSentinel(stream, sentinel) {
35295
+ return new ReadableStream({
35296
+ async start(controller) {
35297
+ let buffer = new Uint8Array([]);
35298
+ let position = 0;
35299
+ let done = false;
35300
+ let discard = false;
35301
+ const rdr = stream.getReader();
35302
+ try {
35303
+ while (!done) {
35304
+ const result = await rdr.read();
35305
+ const value = result.value;
35306
+ done = done || result.done;
35307
+ if (discard) {
35308
+ continue;
35309
+ }
35310
+ if (typeof value === "undefined") {
35311
+ continue;
35312
+ }
35313
+ const newBuffer = new Uint8Array(buffer.length + value.length);
35314
+ newBuffer.set(buffer);
35315
+ newBuffer.set(value, buffer.length);
35316
+ buffer = newBuffer;
35317
+ for (let i = position;i < buffer.length; i++) {
35318
+ const boundary = findBoundary(buffer, i);
35319
+ if (boundary == null) {
35320
+ continue;
35321
+ }
35322
+ const start = position;
35323
+ const chunk = buffer.slice(start, i);
35324
+ position = i + boundary.length;
35325
+ const event = parseEvent(chunk, id);
35326
+ if (event?.data === sentinel) {
35327
+ controller.enqueue(buffer.slice(0, start));
35328
+ discard = true;
35329
+ } else {
35330
+ controller.enqueue(buffer.slice(0, position));
35331
+ buffer = buffer.slice(position);
35332
+ position = 0;
35333
+ }
35334
+ }
35335
+ }
35336
+ } catch (e) {
35337
+ controller.error(e);
35338
+ } finally {
35339
+ controller.close();
35340
+ rdr.releaseLock();
35341
+ }
35342
+ }
35343
+ });
35344
+ }
35345
+ function id(v2) {
35346
+ return v2;
35347
+ }
35348
+ var LF = 10, CR = 13, NEWLINE_CHARS, MESSAGE_BOUNDARIES, EventStream;
35349
+ var init_event_streams = __esm(() => {
35350
+ NEWLINE_CHARS = new Set([LF, CR]);
35351
+ MESSAGE_BOUNDARIES = [
35352
+ new Uint8Array([CR, LF, CR, LF]),
35353
+ new Uint8Array([CR, CR]),
35354
+ new Uint8Array([LF, LF])
35355
+ ];
35356
+ EventStream = class EventStream {
35357
+ stream;
35358
+ decoder;
35359
+ constructor(init) {
35360
+ this.stream = init.stream;
35361
+ this.decoder = init.decoder;
35362
+ }
35363
+ async* [Symbol.asyncIterator]() {
35364
+ const reader = this.stream.getReader();
35365
+ let buffer = new Uint8Array([]);
35366
+ let position = 0;
35367
+ try {
35368
+ while (true) {
35369
+ const { done, value } = await reader.read();
35370
+ if (done) {
35371
+ break;
35372
+ }
35373
+ const newBuffer = new Uint8Array(buffer.length + value.length);
35374
+ newBuffer.set(buffer);
35375
+ newBuffer.set(value, buffer.length);
35376
+ buffer = newBuffer;
35377
+ for (let i = position;i < buffer.length; i++) {
35378
+ const boundary = findBoundary(buffer, i);
35379
+ if (boundary == null) {
35380
+ continue;
35381
+ }
35382
+ const chunk = buffer.slice(position, i);
35383
+ position = i + boundary.length;
35384
+ const event = parseEvent(chunk, this.decoder);
35385
+ if (event != null) {
35386
+ yield event;
35387
+ }
35388
+ }
35389
+ if (position > 0) {
35390
+ buffer = buffer.slice(position);
35391
+ position = 0;
35392
+ }
35393
+ }
35394
+ if (buffer.length > 0) {
35395
+ const event = parseEvent(buffer, this.decoder);
35396
+ if (event != null) {
35397
+ yield event;
35398
+ }
35399
+ }
35400
+ } catch (e) {
35401
+ if (e instanceof Error && e.name === "AbortError") {
35402
+ return;
35403
+ }
35404
+ throw e;
35405
+ } finally {
35406
+ reader.releaseLock();
35407
+ }
35408
+ }
35409
+ };
35410
+ });
35411
+
35181
35412
  // src/models/errors/sdkvalidationerror.ts
35182
35413
  function formatZodError(err, level = 0) {
35183
35414
  let pre = " ".repeat(level);
@@ -35273,6 +35504,9 @@ function jsonErr(codes, schema, options) {
35273
35504
  function json(codes, schema, options) {
35274
35505
  return { ...options, enc: "json", codes, schema };
35275
35506
  }
35507
+ function sse(codes, schema, options) {
35508
+ return { ...options, enc: "sse", codes, schema };
35509
+ }
35276
35510
  function nil(codes, schema, options) {
35277
35511
  return { ...options, enc: "nil", codes, schema };
35278
35512
  }
@@ -35319,7 +35553,7 @@ function match(...matchers) {
35319
35553
  raw = await response.text();
35320
35554
  break;
35321
35555
  case "sse":
35322
- raw = response.body;
35556
+ raw = response.body && matcher.sseSentinel ? discardSentinel(response.body, matcher.sseSentinel) : response.body;
35323
35557
  break;
35324
35558
  case "nil":
35325
35559
  raw = await discardResponseBody(response);
@@ -35395,6 +35629,7 @@ async function discardResponseBody(res) {
35395
35629
  var DEFAULT_CONTENT_TYPES, headerValRE;
35396
35630
  var init_matchers = __esm(() => {
35397
35631
  init_apierror();
35632
+ init_event_streams();
35398
35633
  init_http();
35399
35634
  init_schemas();
35400
35635
  DEFAULT_CONTENT_TYPES = {
@@ -35745,6 +35980,125 @@ var init_accesstokeninfo = __esm(() => {
35745
35980
  })(AccessTokenInfo$ ||= {});
35746
35981
  });
35747
35982
 
35983
+ // src/models/components/streamposition.ts
35984
+ var StreamPosition$inboundSchema, StreamPosition$outboundSchema, StreamPosition$;
35985
+ var init_streamposition = __esm(() => {
35986
+ init_lib();
35987
+ init_primitives();
35988
+ StreamPosition$inboundSchema = objectType({
35989
+ seq_num: numberType().int(),
35990
+ timestamp: numberType().int()
35991
+ }).transform((v2) => {
35992
+ return remap(v2, {
35993
+ seq_num: "seqNum"
35994
+ });
35995
+ });
35996
+ StreamPosition$outboundSchema = objectType({
35997
+ seqNum: numberType().int(),
35998
+ timestamp: numberType().int()
35999
+ }).transform((v2) => {
36000
+ return remap(v2, {
36001
+ seqNum: "seq_num"
36002
+ });
36003
+ });
36004
+ ((StreamPosition$) => {
36005
+ StreamPosition$.inboundSchema = StreamPosition$inboundSchema;
36006
+ StreamPosition$.outboundSchema = StreamPosition$outboundSchema;
36007
+ })(StreamPosition$ ||= {});
36008
+ });
36009
+
36010
+ // src/models/components/appendack.ts
36011
+ var AppendAck$inboundSchema, AppendAck$outboundSchema, AppendAck$;
36012
+ var init_appendack = __esm(() => {
36013
+ init_lib();
36014
+ init_streamposition();
36015
+ AppendAck$inboundSchema = objectType({
36016
+ end: StreamPosition$inboundSchema,
36017
+ start: StreamPosition$inboundSchema,
36018
+ tail: StreamPosition$inboundSchema
36019
+ });
36020
+ AppendAck$outboundSchema = objectType({
36021
+ end: StreamPosition$outboundSchema,
36022
+ start: StreamPosition$outboundSchema,
36023
+ tail: StreamPosition$outboundSchema
36024
+ });
36025
+ ((AppendAck$) => {
36026
+ AppendAck$.inboundSchema = AppendAck$inboundSchema;
36027
+ AppendAck$.outboundSchema = AppendAck$outboundSchema;
36028
+ })(AppendAck$ ||= {});
36029
+ });
36030
+
36031
+ // src/models/components/header.ts
36032
+ var Header$inboundSchema, Header$outboundSchema, Header$;
36033
+ var init_header = __esm(() => {
36034
+ init_lib();
36035
+ Header$inboundSchema = objectType({
36036
+ name: stringType(),
36037
+ value: stringType()
36038
+ });
36039
+ Header$outboundSchema = objectType({
36040
+ name: stringType(),
36041
+ value: stringType()
36042
+ });
36043
+ ((Header$) => {
36044
+ Header$.inboundSchema = Header$inboundSchema;
36045
+ Header$.outboundSchema = Header$outboundSchema;
36046
+ })(Header$ ||= {});
36047
+ });
36048
+
36049
+ // src/models/components/appendrecord.ts
36050
+ var AppendRecord$inboundSchema, AppendRecord$outboundSchema, AppendRecord$;
36051
+ var init_appendrecord = __esm(() => {
36052
+ init_lib();
36053
+ init_header();
36054
+ AppendRecord$inboundSchema = objectType({
36055
+ body: stringType().optional(),
36056
+ headers: arrayType(Header$inboundSchema).optional(),
36057
+ timestamp: nullableType(numberType().int()).optional()
36058
+ });
36059
+ AppendRecord$outboundSchema = objectType({
36060
+ body: stringType().optional(),
36061
+ headers: arrayType(Header$outboundSchema).optional(),
36062
+ timestamp: nullableType(numberType().int()).optional()
36063
+ });
36064
+ ((AppendRecord$) => {
36065
+ AppendRecord$.inboundSchema = AppendRecord$inboundSchema;
36066
+ AppendRecord$.outboundSchema = AppendRecord$outboundSchema;
36067
+ })(AppendRecord$ ||= {});
36068
+ });
36069
+
36070
+ // src/models/components/appendinput.ts
36071
+ var AppendInput$inboundSchema, AppendInput$outboundSchema, AppendInput$;
36072
+ var init_appendinput = __esm(() => {
36073
+ init_lib();
36074
+ init_primitives();
36075
+ init_appendrecord();
36076
+ AppendInput$inboundSchema = objectType({
36077
+ fencing_token: nullableType(stringType()).optional(),
36078
+ match_seq_num: nullableType(numberType().int()).optional(),
36079
+ records: arrayType(AppendRecord$inboundSchema)
36080
+ }).transform((v2) => {
36081
+ return remap(v2, {
36082
+ fencing_token: "fencingToken",
36083
+ match_seq_num: "matchSeqNum"
36084
+ });
36085
+ });
36086
+ AppendInput$outboundSchema = objectType({
36087
+ fencingToken: nullableType(stringType()).optional(),
36088
+ matchSeqNum: nullableType(numberType().int()).optional(),
36089
+ records: arrayType(AppendRecord$outboundSchema)
36090
+ }).transform((v2) => {
36091
+ return remap(v2, {
36092
+ fencingToken: "fencing_token",
36093
+ matchSeqNum: "match_seq_num"
36094
+ });
36095
+ });
36096
+ ((AppendInput$) => {
36097
+ AppendInput$.inboundSchema = AppendInput$inboundSchema;
36098
+ AppendInput$.outboundSchema = AppendInput$outboundSchema;
36099
+ })(AppendInput$ ||= {});
36100
+ });
36101
+
35748
36102
  // src/models/components/retentionpolicy.ts
35749
36103
  var One$inboundSchema, One$outboundSchema, One$, RetentionPolicy$inboundSchema, RetentionPolicy$outboundSchema, RetentionPolicy$;
35750
36104
  var init_retentionpolicy = __esm(() => {
@@ -35830,7 +36184,7 @@ var init_streamconfig = __esm(() => {
35830
36184
  StreamConfig$inboundSchema = objectType({
35831
36185
  retention_policy: nullableType(RetentionPolicy$inboundSchema).optional(),
35832
36186
  storage_class: nullableType(StorageClass$inboundSchema).optional(),
35833
- timestamping: TimestampingConfig$inboundSchema
36187
+ timestamping: nullableType(TimestampingConfig$inboundSchema).optional()
35834
36188
  }).transform((v2) => {
35835
36189
  return remap(v2, {
35836
36190
  retention_policy: "retentionPolicy",
@@ -35840,7 +36194,7 @@ var init_streamconfig = __esm(() => {
35840
36194
  StreamConfig$outboundSchema = objectType({
35841
36195
  retentionPolicy: nullableType(RetentionPolicy$outboundSchema).optional(),
35842
36196
  storageClass: nullableType(StorageClass$outboundSchema).optional(),
35843
- timestamping: TimestampingConfig$outboundSchema
36197
+ timestamping: nullableType(TimestampingConfig$outboundSchema).optional()
35844
36198
  }).transform((v2) => {
35845
36199
  return remap(v2, {
35846
36200
  retentionPolicy: "retention_policy",
@@ -35860,8 +36214,8 @@ var init_basinconfig = __esm(() => {
35860
36214
  init_primitives();
35861
36215
  init_streamconfig();
35862
36216
  BasinConfig$inboundSchema = objectType({
35863
- create_stream_on_append: nullableType(booleanType()).optional(),
35864
- create_stream_on_read: nullableType(booleanType()).optional(),
36217
+ create_stream_on_append: booleanType().optional(),
36218
+ create_stream_on_read: booleanType().optional(),
35865
36219
  default_stream_config: nullableType(StreamConfig$inboundSchema).optional()
35866
36220
  }).transform((v2) => {
35867
36221
  return remap(v2, {
@@ -35871,8 +36225,8 @@ var init_basinconfig = __esm(() => {
35871
36225
  });
35872
36226
  });
35873
36227
  BasinConfig$outboundSchema = objectType({
35874
- createStreamOnAppend: nullableType(booleanType()).optional(),
35875
- createStreamOnRead: nullableType(booleanType()).optional(),
36228
+ createStreamOnAppend: booleanType().optional(),
36229
+ createStreamOnRead: booleanType().optional(),
35876
36230
  defaultStreamConfig: nullableType(StreamConfig$outboundSchema).optional()
35877
36231
  }).transform((v2) => {
35878
36232
  return remap(v2, {
@@ -35971,7 +36325,7 @@ var init_streamreconfiguration = __esm(() => {
35971
36325
  StreamReconfiguration$inboundSchema = objectType({
35972
36326
  retention_policy: nullableType(RetentionPolicy$inboundSchema).optional(),
35973
36327
  storage_class: nullableType(StorageClass$inboundSchema).optional(),
35974
- timestamping: TimestampingReconfiguration$inboundSchema
36328
+ timestamping: nullableType(TimestampingReconfiguration$inboundSchema).optional()
35975
36329
  }).transform((v2) => {
35976
36330
  return remap(v2, {
35977
36331
  retention_policy: "retentionPolicy",
@@ -35981,7 +36335,7 @@ var init_streamreconfiguration = __esm(() => {
35981
36335
  StreamReconfiguration$outboundSchema = objectType({
35982
36336
  retentionPolicy: nullableType(RetentionPolicy$outboundSchema).optional(),
35983
36337
  storageClass: nullableType(StorageClass$outboundSchema).optional(),
35984
- timestamping: TimestampingReconfiguration$outboundSchema
36338
+ timestamping: nullableType(TimestampingReconfiguration$outboundSchema).optional()
35985
36339
  }).transform((v2) => {
35986
36340
  return remap(v2, {
35987
36341
  retentionPolicy: "retention_policy",
@@ -36028,50 +36382,6 @@ var init_basinreconfiguration = __esm(() => {
36028
36382
  })(BasinReconfiguration$ ||= {});
36029
36383
  });
36030
36384
 
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
36385
  // src/models/components/createbasinrequest.ts
36076
36386
  var Scope$inboundSchema, Scope$outboundSchema, Scope$, CreateBasinRequest$inboundSchema, CreateBasinRequest$outboundSchema, CreateBasinRequest$;
36077
36387
  var init_createbasinrequest = __esm(() => {
@@ -36085,10 +36395,12 @@ var init_createbasinrequest = __esm(() => {
36085
36395
  Scope$.outboundSchema = Scope$outboundSchema;
36086
36396
  })(Scope$ ||= {});
36087
36397
  CreateBasinRequest$inboundSchema = objectType({
36398
+ basin: stringType(),
36088
36399
  config: nullableType(BasinConfig$inboundSchema).optional(),
36089
36400
  scope: BasinScope$inboundSchema.optional()
36090
36401
  });
36091
36402
  CreateBasinRequest$outboundSchema = objectType({
36403
+ basin: stringType(),
36092
36404
  config: nullableType(BasinConfig$outboundSchema).optional(),
36093
36405
  scope: BasinScope$outboundSchema.optional()
36094
36406
  });
@@ -36098,6 +36410,51 @@ var init_createbasinrequest = __esm(() => {
36098
36410
  })(CreateBasinRequest$ ||= {});
36099
36411
  });
36100
36412
 
36413
+ // src/models/components/createorreconfigurebasinrequest.ts
36414
+ var CreateOrReconfigureBasinRequestScope$inboundSchema, CreateOrReconfigureBasinRequestScope$outboundSchema, CreateOrReconfigureBasinRequestScope$, CreateOrReconfigureBasinRequest$inboundSchema, CreateOrReconfigureBasinRequest$outboundSchema, CreateOrReconfigureBasinRequest$;
36415
+ var init_createorreconfigurebasinrequest = __esm(() => {
36416
+ init_lib();
36417
+ init_basinconfig();
36418
+ init_basinscope();
36419
+ CreateOrReconfigureBasinRequestScope$inboundSchema = BasinScope$inboundSchema;
36420
+ CreateOrReconfigureBasinRequestScope$outboundSchema = BasinScope$outboundSchema;
36421
+ ((CreateOrReconfigureBasinRequestScope$) => {
36422
+ CreateOrReconfigureBasinRequestScope$.inboundSchema = CreateOrReconfigureBasinRequestScope$inboundSchema;
36423
+ CreateOrReconfigureBasinRequestScope$.outboundSchema = CreateOrReconfigureBasinRequestScope$outboundSchema;
36424
+ })(CreateOrReconfigureBasinRequestScope$ ||= {});
36425
+ CreateOrReconfigureBasinRequest$inboundSchema = objectType({
36426
+ config: nullableType(BasinConfig$inboundSchema).optional(),
36427
+ scope: BasinScope$inboundSchema.optional()
36428
+ });
36429
+ CreateOrReconfigureBasinRequest$outboundSchema = objectType({
36430
+ config: nullableType(BasinConfig$outboundSchema).optional(),
36431
+ scope: BasinScope$outboundSchema.optional()
36432
+ });
36433
+ ((CreateOrReconfigureBasinRequest$) => {
36434
+ CreateOrReconfigureBasinRequest$.inboundSchema = CreateOrReconfigureBasinRequest$inboundSchema;
36435
+ CreateOrReconfigureBasinRequest$.outboundSchema = CreateOrReconfigureBasinRequest$outboundSchema;
36436
+ })(CreateOrReconfigureBasinRequest$ ||= {});
36437
+ });
36438
+
36439
+ // src/models/components/createstreamrequest.ts
36440
+ var CreateStreamRequest$inboundSchema, CreateStreamRequest$outboundSchema, CreateStreamRequest$;
36441
+ var init_createstreamrequest = __esm(() => {
36442
+ init_lib();
36443
+ init_streamconfig();
36444
+ CreateStreamRequest$inboundSchema = objectType({
36445
+ config: nullableType(StreamConfig$inboundSchema).optional(),
36446
+ stream: stringType()
36447
+ });
36448
+ CreateStreamRequest$outboundSchema = objectType({
36449
+ config: nullableType(StreamConfig$outboundSchema).optional(),
36450
+ stream: stringType()
36451
+ });
36452
+ ((CreateStreamRequest$) => {
36453
+ CreateStreamRequest$.inboundSchema = CreateStreamRequest$inboundSchema;
36454
+ CreateStreamRequest$.outboundSchema = CreateStreamRequest$outboundSchema;
36455
+ })(CreateStreamRequest$ ||= {});
36456
+ });
36457
+
36101
36458
  // src/models/components/issueaccesstokenresponse.ts
36102
36459
  var IssueAccessTokenResponse$inboundSchema, IssueAccessTokenResponse$outboundSchema, IssueAccessTokenResponse$;
36103
36460
  var init_issueaccesstokenresponse = __esm(() => {
@@ -36240,6 +36597,138 @@ var init_liststreamsresponse = __esm(() => {
36240
36597
  })(ListStreamsResponse$ ||= {});
36241
36598
  });
36242
36599
 
36600
+ // src/models/components/sequencedrecord.ts
36601
+ var SequencedRecord$inboundSchema, SequencedRecord$outboundSchema, SequencedRecord$;
36602
+ var init_sequencedrecord = __esm(() => {
36603
+ init_lib();
36604
+ init_primitives();
36605
+ init_header();
36606
+ SequencedRecord$inboundSchema = objectType({
36607
+ body: stringType().optional(),
36608
+ headers: arrayType(Header$inboundSchema).optional(),
36609
+ seq_num: numberType().int(),
36610
+ timestamp: numberType().int()
36611
+ }).transform((v2) => {
36612
+ return remap(v2, {
36613
+ seq_num: "seqNum"
36614
+ });
36615
+ });
36616
+ SequencedRecord$outboundSchema = objectType({
36617
+ body: stringType().optional(),
36618
+ headers: arrayType(Header$outboundSchema).optional(),
36619
+ seqNum: numberType().int(),
36620
+ timestamp: numberType().int()
36621
+ }).transform((v2) => {
36622
+ return remap(v2, {
36623
+ seqNum: "seq_num"
36624
+ });
36625
+ });
36626
+ ((SequencedRecord$) => {
36627
+ SequencedRecord$.inboundSchema = SequencedRecord$inboundSchema;
36628
+ SequencedRecord$.outboundSchema = SequencedRecord$outboundSchema;
36629
+ })(SequencedRecord$ ||= {});
36630
+ });
36631
+
36632
+ // src/models/components/readbatch.ts
36633
+ var ReadBatch$inboundSchema, ReadBatch$outboundSchema, ReadBatch$;
36634
+ var init_readbatch = __esm(() => {
36635
+ init_lib();
36636
+ init_sequencedrecord();
36637
+ ReadBatch$inboundSchema = objectType({
36638
+ records: arrayType(SequencedRecord$inboundSchema)
36639
+ });
36640
+ ReadBatch$outboundSchema = objectType({
36641
+ records: arrayType(SequencedRecord$outboundSchema)
36642
+ });
36643
+ ((ReadBatch$) => {
36644
+ ReadBatch$.inboundSchema = ReadBatch$inboundSchema;
36645
+ ReadBatch$.outboundSchema = ReadBatch$outboundSchema;
36646
+ })(ReadBatch$ ||= {});
36647
+ });
36648
+
36649
+ // src/models/components/readevent.ts
36650
+ var Ping$inboundSchema, Ping$outboundSchema, Ping$, ErrorT$inboundSchema, ErrorT$outboundSchema, ErrorT$, Batch$inboundSchema, Batch$outboundSchema, Batch$, ReadEvent$inboundSchema, ReadEvent$outboundSchema, ReadEvent$;
36651
+ var init_readevent = __esm(() => {
36652
+ init_lib();
36653
+ init_readbatch();
36654
+ Ping$inboundSchema = objectType({
36655
+ data: stringType(),
36656
+ event: stringType()
36657
+ });
36658
+ Ping$outboundSchema = objectType({
36659
+ data: stringType(),
36660
+ event: stringType()
36661
+ });
36662
+ ((Ping$) => {
36663
+ Ping$.inboundSchema = Ping$inboundSchema;
36664
+ Ping$.outboundSchema = Ping$outboundSchema;
36665
+ })(Ping$ ||= {});
36666
+ ErrorT$inboundSchema = objectType({
36667
+ data: stringType(),
36668
+ event: stringType()
36669
+ });
36670
+ ErrorT$outboundSchema = objectType({
36671
+ data: stringType(),
36672
+ event: stringType()
36673
+ });
36674
+ ((ErrorT$) => {
36675
+ ErrorT$.inboundSchema = ErrorT$inboundSchema;
36676
+ ErrorT$.outboundSchema = ErrorT$outboundSchema;
36677
+ })(ErrorT$ ||= {});
36678
+ Batch$inboundSchema = objectType({
36679
+ data: stringType().transform((v2, ctx) => {
36680
+ try {
36681
+ return JSON.parse(v2);
36682
+ } catch (err) {
36683
+ ctx.addIssue({
36684
+ code: ZodIssueCode.custom,
36685
+ message: `malformed json: ${err}`
36686
+ });
36687
+ return NEVER;
36688
+ }
36689
+ }).pipe(ReadBatch$inboundSchema),
36690
+ event: stringType()
36691
+ });
36692
+ Batch$outboundSchema = objectType({
36693
+ data: ReadBatch$outboundSchema,
36694
+ event: stringType()
36695
+ });
36696
+ ((Batch$) => {
36697
+ Batch$.inboundSchema = Batch$inboundSchema;
36698
+ Batch$.outboundSchema = Batch$outboundSchema;
36699
+ })(Batch$ ||= {});
36700
+ ReadEvent$inboundSchema = unionType([
36701
+ lazyType(() => Batch$inboundSchema),
36702
+ lazyType(() => ErrorT$inboundSchema),
36703
+ lazyType(() => Ping$inboundSchema)
36704
+ ]);
36705
+ ReadEvent$outboundSchema = unionType([
36706
+ lazyType(() => Batch$outboundSchema),
36707
+ lazyType(() => ErrorT$outboundSchema),
36708
+ lazyType(() => Ping$outboundSchema)
36709
+ ]);
36710
+ ((ReadEvent$) => {
36711
+ ReadEvent$.inboundSchema = ReadEvent$inboundSchema;
36712
+ ReadEvent$.outboundSchema = ReadEvent$outboundSchema;
36713
+ })(ReadEvent$ ||= {});
36714
+ });
36715
+
36716
+ // src/models/components/s2format.ts
36717
+ var S2Format, S2Format$inboundSchema, S2Format$outboundSchema, S2Format$;
36718
+ var init_s2format = __esm(() => {
36719
+ init_lib();
36720
+ S2Format = {
36721
+ Json: "json",
36722
+ JsonBinsafe: "json-binsafe"
36723
+ };
36724
+ S2Format$inboundSchema = nativeEnumType(S2Format);
36725
+ S2Format$outboundSchema = S2Format$inboundSchema;
36726
+ ((S2Format$) => {
36727
+ S2Format$.inboundSchema = S2Format$inboundSchema;
36728
+ S2Format$.outboundSchema = S2Format$outboundSchema;
36729
+ })(S2Format$ ||= {});
36730
+ });
36731
+
36243
36732
  // src/models/components/security.ts
36244
36733
  var Security$inboundSchema, Security$outboundSchema, Security$;
36245
36734
  var init_security2 = __esm(() => {
@@ -36265,66 +36754,165 @@ var init_security2 = __esm(() => {
36265
36754
  })(Security$ ||= {});
36266
36755
  });
36267
36756
 
36268
- // src/models/components/index.ts
36269
- var init_components = __esm(() => {
36270
- init_accesstokeninfo();
36271
- init_accesstokenscope();
36272
- init_basinconfig();
36757
+ // src/models/components/tailresponse.ts
36758
+ var TailResponse$inboundSchema, TailResponse$outboundSchema, TailResponse$;
36759
+ var init_tailresponse = __esm(() => {
36760
+ init_lib();
36761
+ init_streamposition();
36762
+ TailResponse$inboundSchema = objectType({
36763
+ tail: StreamPosition$inboundSchema
36764
+ });
36765
+ TailResponse$outboundSchema = objectType({
36766
+ tail: StreamPosition$outboundSchema
36767
+ });
36768
+ ((TailResponse$) => {
36769
+ TailResponse$.inboundSchema = TailResponse$inboundSchema;
36770
+ TailResponse$.outboundSchema = TailResponse$outboundSchema;
36771
+ })(TailResponse$ ||= {});
36772
+ });
36773
+
36774
+ // src/models/components/index.ts
36775
+ var init_components = __esm(() => {
36776
+ init_accesstokeninfo();
36777
+ init_accesstokenscope();
36778
+ init_appendack();
36779
+ init_appendinput();
36780
+ init_appendrecord();
36781
+ init_basinconfig();
36273
36782
  init_basininfo();
36274
36783
  init_basinreconfiguration();
36275
36784
  init_basinscope();
36276
36785
  init_basinstate();
36277
- init_checktailresponse();
36278
36786
  init_createbasinrequest();
36787
+ init_createorreconfigurebasinrequest();
36788
+ init_createstreamrequest();
36789
+ init_header();
36279
36790
  init_issueaccesstokenresponse();
36280
36791
  init_listaccesstokensresponse();
36281
36792
  init_listbasinsresponse();
36282
36793
  init_liststreamsresponse();
36283
36794
  init_operation();
36284
36795
  init_permittedoperationgroups();
36796
+ init_readbatch();
36797
+ init_readevent();
36285
36798
  init_readwritepermissions();
36286
36799
  init_resourceset();
36287
36800
  init_retentionpolicy();
36801
+ init_s2format();
36288
36802
  init_security2();
36803
+ init_sequencedrecord();
36289
36804
  init_storageclass();
36290
36805
  init_streamconfig();
36291
36806
  init_streaminfo();
36292
36807
  init_streamposition();
36293
36808
  init_streamreconfiguration();
36809
+ init_tailresponse();
36294
36810
  init_timestampingconfig();
36295
36811
  init_timestampingmode();
36296
36812
  init_timestampingreconfiguration();
36297
36813
  });
36298
36814
 
36815
+ // src/models/errors/appendconditionfailed.ts
36816
+ var Two, One, Two$inboundSchema, Two$outboundSchema, Two$, One$inboundSchema2, One$outboundSchema2, One$2, AppendConditionFailed$inboundSchema, AppendConditionFailed$outboundSchema, AppendConditionFailed$;
36817
+ var init_appendconditionfailed = __esm(() => {
36818
+ init_lib();
36819
+ init_primitives();
36820
+ Two = class Two extends Error {
36821
+ seqNumMismatch;
36822
+ data$;
36823
+ constructor(err) {
36824
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36825
+ super(message);
36826
+ this.data$ = err;
36827
+ this.seqNumMismatch = err.seqNumMismatch;
36828
+ this.name = "Two";
36829
+ }
36830
+ };
36831
+ One = class One extends Error {
36832
+ fencingTokenMismatch;
36833
+ data$;
36834
+ constructor(err) {
36835
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36836
+ super(message);
36837
+ this.data$ = err;
36838
+ this.fencingTokenMismatch = err.fencingTokenMismatch;
36839
+ this.name = "One";
36840
+ }
36841
+ };
36842
+ Two$inboundSchema = objectType({
36843
+ SeqNumMismatch: numberType().int()
36844
+ }).transform((v2) => {
36845
+ const remapped = remap(v2, {
36846
+ SeqNumMismatch: "seqNumMismatch"
36847
+ });
36848
+ return new Two(remapped);
36849
+ });
36850
+ Two$outboundSchema = instanceOfType(Two).transform((v2) => v2.data$).pipe(objectType({
36851
+ seqNumMismatch: numberType().int()
36852
+ }).transform((v2) => {
36853
+ return remap(v2, {
36854
+ seqNumMismatch: "SeqNumMismatch"
36855
+ });
36856
+ }));
36857
+ ((Two$) => {
36858
+ Two$.inboundSchema = Two$inboundSchema;
36859
+ Two$.outboundSchema = Two$outboundSchema;
36860
+ })(Two$ ||= {});
36861
+ One$inboundSchema2 = objectType({
36862
+ FencingTokenMismatch: stringType()
36863
+ }).transform((v2) => {
36864
+ const remapped = remap(v2, {
36865
+ FencingTokenMismatch: "fencingTokenMismatch"
36866
+ });
36867
+ return new One(remapped);
36868
+ });
36869
+ One$outboundSchema2 = instanceOfType(One).transform((v2) => v2.data$).pipe(objectType({
36870
+ fencingTokenMismatch: stringType()
36871
+ }).transform((v2) => {
36872
+ return remap(v2, {
36873
+ fencingTokenMismatch: "FencingTokenMismatch"
36874
+ });
36875
+ }));
36876
+ ((One$) => {
36877
+ One$.inboundSchema = One$inboundSchema2;
36878
+ One$.outboundSchema = One$outboundSchema2;
36879
+ })(One$2 ||= {});
36880
+ AppendConditionFailed$inboundSchema = unionType([lazyType(() => One$inboundSchema2), lazyType(() => Two$inboundSchema)]);
36881
+ AppendConditionFailed$outboundSchema = unionType([
36882
+ lazyType(() => One$outboundSchema2),
36883
+ lazyType(() => Two$outboundSchema)
36884
+ ]);
36885
+ ((AppendConditionFailed$) => {
36886
+ AppendConditionFailed$.inboundSchema = AppendConditionFailed$inboundSchema;
36887
+ AppendConditionFailed$.outboundSchema = AppendConditionFailed$outboundSchema;
36888
+ })(AppendConditionFailed$ ||= {});
36889
+ });
36890
+
36299
36891
  // src/models/errors/errorresponse.ts
36300
36892
  var ErrorResponse, ErrorResponse$inboundSchema, ErrorResponse$outboundSchema, ErrorResponse$;
36301
36893
  var init_errorresponse = __esm(() => {
36302
36894
  init_lib();
36303
36895
  ErrorResponse = class ErrorResponse extends Error {
36304
36896
  code;
36305
- error;
36306
36897
  data$;
36307
36898
  constructor(err) {
36308
- const message = err.error || "API error occurred";
36899
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36309
36900
  super(message);
36310
36901
  this.data$ = err;
36311
36902
  if (err.code != null)
36312
36903
  this.code = err.code;
36313
- this.error = err.error;
36314
36904
  this.name = "ErrorResponse";
36315
36905
  }
36316
36906
  };
36317
36907
  ErrorResponse$inboundSchema = objectType({
36318
36908
  code: nullableType(stringType()).optional(),
36319
- message: stringType(),
36320
- error: stringType()
36909
+ message: stringType()
36321
36910
  }).transform((v2) => {
36322
36911
  return new ErrorResponse(v2);
36323
36912
  });
36324
36913
  ErrorResponse$outboundSchema = instanceOfType(ErrorResponse).transform((v2) => v2.data$).pipe(objectType({
36325
36914
  code: nullableType(stringType()).optional(),
36326
- message: stringType(),
36327
- error: stringType()
36915
+ message: stringType()
36328
36916
  }));
36329
36917
  ((ErrorResponse$) => {
36330
36918
  ErrorResponse$.inboundSchema = ErrorResponse$inboundSchema;
@@ -36332,42 +36920,44 @@ var init_errorresponse = __esm(() => {
36332
36920
  })(ErrorResponse$ ||= {});
36333
36921
  });
36334
36922
 
36335
- // src/models/errors/retryableerror.ts
36336
- var RetryableError, RetryableError$inboundSchema, RetryableError$outboundSchema, RetryableError$;
36337
- var init_retryableerror = __esm(() => {
36923
+ // src/models/errors/tailresponse.ts
36924
+ var TailResponse, TailResponse$inboundSchema2, TailResponse$outboundSchema2, TailResponse$2;
36925
+ var init_tailresponse2 = __esm(() => {
36338
36926
  init_lib();
36339
- RetryableError = class RetryableError extends Error {
36340
- error;
36927
+ init_components();
36928
+ TailResponse = class TailResponse extends Error {
36929
+ tail;
36341
36930
  data$;
36342
36931
  constructor(err) {
36343
- const message = err.error || "API error occurred";
36932
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36344
36933
  super(message);
36345
36934
  this.data$ = err;
36346
- this.error = err.error;
36347
- this.name = "RetryableError";
36935
+ this.tail = err.tail;
36936
+ this.name = "TailResponse";
36348
36937
  }
36349
36938
  };
36350
- RetryableError$inboundSchema = objectType({
36351
- error: stringType()
36939
+ TailResponse$inboundSchema2 = objectType({
36940
+ tail: StreamPosition$inboundSchema
36352
36941
  }).transform((v2) => {
36353
- return new RetryableError(v2);
36942
+ return new TailResponse(v2);
36354
36943
  });
36355
- RetryableError$outboundSchema = instanceOfType(RetryableError).transform((v2) => v2.data$).pipe(objectType({
36356
- error: stringType()
36944
+ TailResponse$outboundSchema2 = instanceOfType(TailResponse).transform((v2) => v2.data$).pipe(objectType({
36945
+ tail: StreamPosition$outboundSchema
36357
36946
  }));
36358
- ((RetryableError$) => {
36359
- RetryableError$.inboundSchema = RetryableError$inboundSchema;
36360
- RetryableError$.outboundSchema = RetryableError$outboundSchema;
36361
- })(RetryableError$ ||= {});
36947
+ ((TailResponse$) => {
36948
+ TailResponse$.inboundSchema = TailResponse$inboundSchema2;
36949
+ TailResponse$.outboundSchema = TailResponse$outboundSchema2;
36950
+ })(TailResponse$2 ||= {});
36362
36951
  });
36363
36952
 
36364
36953
  // src/models/errors/index.ts
36365
36954
  var init_errors = __esm(() => {
36366
36955
  init_apierror();
36956
+ init_appendconditionfailed();
36367
36957
  init_errorresponse();
36368
36958
  init_httpclienterrors();
36369
- init_retryableerror();
36370
36959
  init_sdkvalidationerror();
36960
+ init_tailresponse2();
36371
36961
  });
36372
36962
 
36373
36963
  // src/types/async.ts
@@ -36439,7 +37029,7 @@ async function $do(client, request, options) {
36439
37029
  const req = requestRes.value;
36440
37030
  const doResult = await client._do(req, {
36441
37031
  context,
36442
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37032
+ errorCodes: ["400", "403", "409", "4XX", "5XX"],
36443
37033
  retryConfig: context.retryConfig,
36444
37034
  retryCodes: context.retryCodes
36445
37035
  });
@@ -36450,7 +37040,7 @@ async function $do(client, request, options) {
36450
37040
  const responseFields = {
36451
37041
  HttpMeta: { Response: response, Request: req }
36452
37042
  };
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 });
37043
+ const [result] = await match(json(201, IssueAccessTokenResponse$inboundSchema), jsonErr([400, 403, 409], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
36454
37044
  if (!result.ok) {
36455
37045
  return [result, { status: "complete", request: req, response }];
36456
37046
  }
@@ -36480,7 +37070,7 @@ var init_accessTokensIssueAccessToken2 = __esm(() => {
36480
37070
  tool$accessTokensIssueAccessToken = {
36481
37071
  name: "access-tokens-issue-access-token",
36482
37072
  description: `Issue a new access token.`,
36483
- scopes: ["write"],
37073
+ scopes: ["write", "write", "write"],
36484
37074
  args,
36485
37075
  tool: async (client, args2, ctx) => {
36486
37076
  const [result, apiCall] = await accessTokensIssueAccessToken(client, args2.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
@@ -36496,18 +37086,68 @@ var init_accessTokensIssueAccessToken2 = __esm(() => {
36496
37086
  };
36497
37087
  });
36498
37088
 
37089
+ // src/models/operations/append.ts
37090
+ var AppendServerList, AppendRequest$inboundSchema, AppendRequest$outboundSchema, AppendRequest$;
37091
+ var init_append = __esm(() => {
37092
+ init_lib();
37093
+ init_primitives();
37094
+ init_components();
37095
+ AppendServerList = [
37096
+ "https://{basin}.b.aws.s2.dev/v1"
37097
+ ];
37098
+ AppendRequest$inboundSchema = objectType({
37099
+ stream: stringType(),
37100
+ "s2-format": S2Format$inboundSchema.optional(),
37101
+ "s2-basin": stringType(),
37102
+ AppendInput: AppendInput$inboundSchema
37103
+ }).transform((v2) => {
37104
+ return remap(v2, {
37105
+ "s2-format": "s2Format",
37106
+ "s2-basin": "s2Basin",
37107
+ AppendInput: "appendInput"
37108
+ });
37109
+ });
37110
+ AppendRequest$outboundSchema = objectType({
37111
+ stream: stringType(),
37112
+ s2Format: S2Format$outboundSchema.optional(),
37113
+ s2Basin: stringType(),
37114
+ appendInput: AppendInput$outboundSchema
37115
+ }).transform((v2) => {
37116
+ return remap(v2, {
37117
+ s2Format: "s2-format",
37118
+ s2Basin: "s2-basin",
37119
+ appendInput: "AppendInput"
37120
+ });
37121
+ });
37122
+ ((AppendRequest$) => {
37123
+ AppendRequest$.inboundSchema = AppendRequest$inboundSchema;
37124
+ AppendRequest$.outboundSchema = AppendRequest$outboundSchema;
37125
+ })(AppendRequest$ ||= {});
37126
+ });
37127
+
36499
37128
  // src/models/operations/checktail.ts
36500
37129
  var CheckTailServerList, CheckTailRequest$inboundSchema, CheckTailRequest$outboundSchema, CheckTailRequest$;
36501
37130
  var init_checktail = __esm(() => {
36502
37131
  init_lib();
37132
+ init_primitives();
36503
37133
  CheckTailServerList = [
36504
37134
  "https://{basin}.b.aws.s2.dev/v1"
36505
37135
  ];
36506
37136
  CheckTailRequest$inboundSchema = objectType({
36507
- stream: stringType()
37137
+ stream: stringType(),
37138
+ "s2-basin": stringType()
37139
+ }).transform((v2) => {
37140
+ return remap(v2, {
37141
+ "s2-basin": "s2Basin"
37142
+ });
36508
37143
  });
36509
37144
  CheckTailRequest$outboundSchema = objectType({
36510
- stream: stringType()
37145
+ stream: stringType(),
37146
+ s2Basin: stringType()
37147
+ }).transform((v2) => {
37148
+ return remap(v2, {
37149
+ s2Basin: "s2-basin"
37150
+ });
36511
37151
  });
36512
37152
  ((CheckTailRequest$) => {
36513
37153
  CheckTailRequest$.inboundSchema = CheckTailRequest$inboundSchema;
@@ -36516,35 +37156,35 @@ var init_checktail = __esm(() => {
36516
37156
  });
36517
37157
 
36518
37158
  // src/models/operations/createorreconfigurebasin.ts
36519
- var CreateOrReconfigureBasinRequest$inboundSchema, CreateOrReconfigureBasinRequest$outboundSchema, CreateOrReconfigureBasinRequest$;
37159
+ var CreateOrReconfigureBasinRequest$inboundSchema2, CreateOrReconfigureBasinRequest$outboundSchema2, CreateOrReconfigureBasinRequest$2;
36520
37160
  var init_createorreconfigurebasin = __esm(() => {
36521
37161
  init_lib();
36522
37162
  init_primitives();
36523
37163
  init_components();
36524
- CreateOrReconfigureBasinRequest$inboundSchema = objectType({
36525
- basin: stringType(),
37164
+ CreateOrReconfigureBasinRequest$inboundSchema2 = objectType({
36526
37165
  "s2-request-token": stringType().optional(),
36527
- CreateBasinRequest: CreateBasinRequest$inboundSchema
37166
+ basin: stringType(),
37167
+ CreateOrReconfigureBasinRequest: nullableType(CreateOrReconfigureBasinRequest$inboundSchema).optional()
36528
37168
  }).transform((v2) => {
36529
37169
  return remap(v2, {
36530
37170
  "s2-request-token": "s2RequestToken",
36531
- CreateBasinRequest: "createBasinRequest"
37171
+ CreateOrReconfigureBasinRequest: "createOrReconfigureBasinRequest"
36532
37172
  });
36533
37173
  });
36534
- CreateOrReconfigureBasinRequest$outboundSchema = objectType({
36535
- basin: stringType(),
37174
+ CreateOrReconfigureBasinRequest$outboundSchema2 = objectType({
36536
37175
  s2RequestToken: stringType().optional(),
36537
- createBasinRequest: CreateBasinRequest$outboundSchema
37176
+ basin: stringType(),
37177
+ createOrReconfigureBasinRequest: nullableType(CreateOrReconfigureBasinRequest$outboundSchema).optional()
36538
37178
  }).transform((v2) => {
36539
37179
  return remap(v2, {
36540
37180
  s2RequestToken: "s2-request-token",
36541
- createBasinRequest: "CreateBasinRequest"
37181
+ createOrReconfigureBasinRequest: "CreateOrReconfigureBasinRequest"
36542
37182
  });
36543
37183
  });
36544
37184
  ((CreateOrReconfigureBasinRequest$) => {
36545
- CreateOrReconfigureBasinRequest$.inboundSchema = CreateOrReconfigureBasinRequest$inboundSchema;
36546
- CreateOrReconfigureBasinRequest$.outboundSchema = CreateOrReconfigureBasinRequest$outboundSchema;
36547
- })(CreateOrReconfigureBasinRequest$ ||= {});
37185
+ CreateOrReconfigureBasinRequest$.inboundSchema = CreateOrReconfigureBasinRequest$inboundSchema2;
37186
+ CreateOrReconfigureBasinRequest$.outboundSchema = CreateOrReconfigureBasinRequest$outboundSchema2;
37187
+ })(CreateOrReconfigureBasinRequest$2 ||= {});
36548
37188
  });
36549
37189
 
36550
37190
  // src/models/operations/createorreconfigurestream.ts
@@ -36559,20 +37199,24 @@ var init_createorreconfigurestream = __esm(() => {
36559
37199
  CreateOrReconfigureStreamRequest$inboundSchema = objectType({
36560
37200
  stream: stringType(),
36561
37201
  "s2-request-token": stringType().optional(),
36562
- StreamConfig: StreamConfig$inboundSchema
37202
+ "s2-basin": stringType(),
37203
+ StreamConfig: nullableType(StreamConfig$inboundSchema).optional()
36563
37204
  }).transform((v2) => {
36564
37205
  return remap(v2, {
36565
37206
  "s2-request-token": "s2RequestToken",
37207
+ "s2-basin": "s2Basin",
36566
37208
  StreamConfig: "streamConfig"
36567
37209
  });
36568
37210
  });
36569
37211
  CreateOrReconfigureStreamRequest$outboundSchema = objectType({
36570
37212
  stream: stringType(),
36571
37213
  s2RequestToken: stringType().optional(),
36572
- streamConfig: StreamConfig$outboundSchema
37214
+ s2Basin: stringType(),
37215
+ streamConfig: nullableType(StreamConfig$outboundSchema).optional()
36573
37216
  }).transform((v2) => {
36574
37217
  return remap(v2, {
36575
37218
  s2RequestToken: "s2-request-token",
37219
+ s2Basin: "s2-basin",
36576
37220
  streamConfig: "StreamConfig"
36577
37221
  });
36578
37222
  });
@@ -36582,6 +37226,39 @@ var init_createorreconfigurestream = __esm(() => {
36582
37226
  })(CreateOrReconfigureStreamRequest$ ||= {});
36583
37227
  });
36584
37228
 
37229
+ // src/models/operations/createstream.ts
37230
+ var CreateStreamServerList, CreateStreamRequest$inboundSchema2, CreateStreamRequest$outboundSchema2, CreateStreamRequest$2;
37231
+ var init_createstream = __esm(() => {
37232
+ init_lib();
37233
+ init_primitives();
37234
+ init_components();
37235
+ CreateStreamServerList = [
37236
+ "https://{basin}.b.aws.s2.dev/v1"
37237
+ ];
37238
+ CreateStreamRequest$inboundSchema2 = objectType({
37239
+ "s2-basin": stringType(),
37240
+ CreateStreamRequest: CreateStreamRequest$inboundSchema
37241
+ }).transform((v2) => {
37242
+ return remap(v2, {
37243
+ "s2-basin": "s2Basin",
37244
+ CreateStreamRequest: "createStreamRequest"
37245
+ });
37246
+ });
37247
+ CreateStreamRequest$outboundSchema2 = objectType({
37248
+ s2Basin: stringType(),
37249
+ createStreamRequest: CreateStreamRequest$outboundSchema
37250
+ }).transform((v2) => {
37251
+ return remap(v2, {
37252
+ s2Basin: "s2-basin",
37253
+ createStreamRequest: "CreateStreamRequest"
37254
+ });
37255
+ });
37256
+ ((CreateStreamRequest$) => {
37257
+ CreateStreamRequest$.inboundSchema = CreateStreamRequest$inboundSchema2;
37258
+ CreateStreamRequest$.outboundSchema = CreateStreamRequest$outboundSchema2;
37259
+ })(CreateStreamRequest$2 ||= {});
37260
+ });
37261
+
36585
37262
  // src/models/operations/deletebasin.ts
36586
37263
  var DeleteBasinRequest$inboundSchema, DeleteBasinRequest$outboundSchema, DeleteBasinRequest$;
36587
37264
  var init_deletebasin = __esm(() => {
@@ -36602,14 +37279,25 @@ var init_deletebasin = __esm(() => {
36602
37279
  var DeleteStreamServerList, DeleteStreamRequest$inboundSchema, DeleteStreamRequest$outboundSchema, DeleteStreamRequest$;
36603
37280
  var init_deletestream = __esm(() => {
36604
37281
  init_lib();
37282
+ init_primitives();
36605
37283
  DeleteStreamServerList = [
36606
37284
  "https://{basin}.b.aws.s2.dev/v1"
36607
37285
  ];
36608
37286
  DeleteStreamRequest$inboundSchema = objectType({
36609
- stream: stringType()
37287
+ stream: stringType(),
37288
+ "s2-basin": stringType()
37289
+ }).transform((v2) => {
37290
+ return remap(v2, {
37291
+ "s2-basin": "s2Basin"
37292
+ });
36610
37293
  });
36611
37294
  DeleteStreamRequest$outboundSchema = objectType({
36612
- stream: stringType()
37295
+ stream: stringType(),
37296
+ s2Basin: stringType()
37297
+ }).transform((v2) => {
37298
+ return remap(v2, {
37299
+ s2Basin: "s2-basin"
37300
+ });
36613
37301
  });
36614
37302
  ((DeleteStreamRequest$) => {
36615
37303
  DeleteStreamRequest$.inboundSchema = DeleteStreamRequest$inboundSchema;
@@ -36637,14 +37325,25 @@ var init_getbasinconfig = __esm(() => {
36637
37325
  var GetStreamConfigServerList, GetStreamConfigRequest$inboundSchema, GetStreamConfigRequest$outboundSchema, GetStreamConfigRequest$;
36638
37326
  var init_getstreamconfig = __esm(() => {
36639
37327
  init_lib();
37328
+ init_primitives();
36640
37329
  GetStreamConfigServerList = [
36641
37330
  "https://{basin}.b.aws.s2.dev/v1"
36642
37331
  ];
36643
37332
  GetStreamConfigRequest$inboundSchema = objectType({
36644
- stream: stringType()
37333
+ stream: stringType(),
37334
+ "s2-basin": stringType()
37335
+ }).transform((v2) => {
37336
+ return remap(v2, {
37337
+ "s2-basin": "s2Basin"
37338
+ });
36645
37339
  });
36646
37340
  GetStreamConfigRequest$outboundSchema = objectType({
36647
- stream: stringType()
37341
+ stream: stringType(),
37342
+ s2Basin: stringType()
37343
+ }).transform((v2) => {
37344
+ return remap(v2, {
37345
+ s2Basin: "s2-basin"
37346
+ });
36648
37347
  });
36649
37348
  ((GetStreamConfigRequest$) => {
36650
37349
  GetStreamConfigRequest$.inboundSchema = GetStreamConfigRequest$inboundSchema;
@@ -36741,19 +37440,23 @@ var init_liststreams = __esm(() => {
36741
37440
  ListStreamsRequest$inboundSchema = objectType({
36742
37441
  prefix: stringType().default(""),
36743
37442
  start_after: stringType().default(""),
36744
- limit: numberType().int().default(1000)
37443
+ limit: numberType().int().default(1000),
37444
+ "s2-basin": stringType()
36745
37445
  }).transform((v2) => {
36746
37446
  return remap(v2, {
36747
- start_after: "startAfter"
37447
+ start_after: "startAfter",
37448
+ "s2-basin": "s2Basin"
36748
37449
  });
36749
37450
  });
36750
37451
  ListStreamsRequest$outboundSchema = objectType({
36751
37452
  prefix: stringType().default(""),
36752
37453
  startAfter: stringType().default(""),
36753
- limit: numberType().int().default(1000)
37454
+ limit: numberType().int().default(1000),
37455
+ s2Basin: stringType()
36754
37456
  }).transform((v2) => {
36755
37457
  return remap(v2, {
36756
- startAfter: "start_after"
37458
+ startAfter: "start_after",
37459
+ s2Basin: "s2-basin"
36757
37460
  });
36758
37461
  });
36759
37462
  ((ListStreamsRequest$) => {
@@ -36780,6 +37483,73 @@ var init_liststreams = __esm(() => {
36780
37483
  })(ListStreamsResponse$2 ||= {});
36781
37484
  });
36782
37485
 
37486
+ // src/models/operations/read.ts
37487
+ var ReadServerList, ReadRequest$inboundSchema, ReadRequest$outboundSchema, ReadRequest$, ReadResponse$inboundSchema, ReadResponse$outboundSchema, ReadResponse$;
37488
+ var init_read = __esm(() => {
37489
+ init_lib();
37490
+ init_event_streams();
37491
+ init_primitives();
37492
+ init_components();
37493
+ ReadServerList = [
37494
+ "https://{basin}.b.aws.s2.dev/v1"
37495
+ ];
37496
+ ReadRequest$inboundSchema = objectType({
37497
+ stream: stringType(),
37498
+ "s2-format": S2Format$inboundSchema.optional(),
37499
+ seq_num: numberType().int().optional(),
37500
+ timestamp: numberType().int().optional(),
37501
+ tail_offset: numberType().int().optional(),
37502
+ count: numberType().int().optional(),
37503
+ bytes: numberType().int().optional(),
37504
+ "s2-basin": stringType()
37505
+ }).transform((v2) => {
37506
+ return remap(v2, {
37507
+ "s2-format": "s2Format",
37508
+ seq_num: "seqNum",
37509
+ tail_offset: "tailOffset",
37510
+ "s2-basin": "s2Basin"
37511
+ });
37512
+ });
37513
+ ReadRequest$outboundSchema = objectType({
37514
+ stream: stringType(),
37515
+ s2Format: S2Format$outboundSchema.optional(),
37516
+ seqNum: numberType().int().optional(),
37517
+ timestamp: numberType().int().optional(),
37518
+ tailOffset: numberType().int().optional(),
37519
+ count: numberType().int().optional(),
37520
+ bytes: numberType().int().optional(),
37521
+ s2Basin: stringType()
37522
+ }).transform((v2) => {
37523
+ return remap(v2, {
37524
+ s2Format: "s2-format",
37525
+ seqNum: "seq_num",
37526
+ tailOffset: "tail_offset",
37527
+ s2Basin: "s2-basin"
37528
+ });
37529
+ });
37530
+ ((ReadRequest$) => {
37531
+ ReadRequest$.inboundSchema = ReadRequest$inboundSchema;
37532
+ ReadRequest$.outboundSchema = ReadRequest$outboundSchema;
37533
+ })(ReadRequest$ ||= {});
37534
+ ReadResponse$inboundSchema = unionType([
37535
+ ReadBatch$inboundSchema,
37536
+ instanceOfType(ReadableStream).transform((stream) => {
37537
+ return new EventStream({
37538
+ stream,
37539
+ decoder(rawEvent) {
37540
+ const schema = ReadEvent$inboundSchema;
37541
+ return schema.parse(rawEvent);
37542
+ }
37543
+ });
37544
+ })
37545
+ ]);
37546
+ ReadResponse$outboundSchema = unionType([ReadBatch$outboundSchema, neverType()]);
37547
+ ((ReadResponse$) => {
37548
+ ReadResponse$.inboundSchema = ReadResponse$inboundSchema;
37549
+ ReadResponse$.outboundSchema = ReadResponse$outboundSchema;
37550
+ })(ReadResponse$ ||= {});
37551
+ });
37552
+
36783
37553
  // src/models/operations/reconfigurebasin.ts
36784
37554
  var ReconfigureBasinRequest$inboundSchema, ReconfigureBasinRequest$outboundSchema, ReconfigureBasinRequest$;
36785
37555
  var init_reconfigurebasin = __esm(() => {
@@ -36819,17 +37589,21 @@ var init_reconfigurestream = __esm(() => {
36819
37589
  ];
36820
37590
  ReconfigureStreamRequest$inboundSchema = objectType({
36821
37591
  stream: stringType(),
37592
+ "s2-basin": stringType(),
36822
37593
  StreamReconfiguration: StreamReconfiguration$inboundSchema
36823
37594
  }).transform((v2) => {
36824
37595
  return remap(v2, {
37596
+ "s2-basin": "s2Basin",
36825
37597
  StreamReconfiguration: "streamReconfiguration"
36826
37598
  });
36827
37599
  });
36828
37600
  ReconfigureStreamRequest$outboundSchema = objectType({
36829
37601
  stream: stringType(),
37602
+ s2Basin: stringType(),
36830
37603
  streamReconfiguration: StreamReconfiguration$outboundSchema
36831
37604
  }).transform((v2) => {
36832
37605
  return remap(v2, {
37606
+ s2Basin: "s2-basin",
36833
37607
  streamReconfiguration: "StreamReconfiguration"
36834
37608
  });
36835
37609
  });
@@ -36857,9 +37631,11 @@ var init_revokeaccesstoken = __esm(() => {
36857
37631
 
36858
37632
  // src/models/operations/index.ts
36859
37633
  var init_operations = __esm(() => {
37634
+ init_append();
36860
37635
  init_checktail();
36861
37636
  init_createorreconfigurebasin();
36862
37637
  init_createorreconfigurestream();
37638
+ init_createstream();
36863
37639
  init_deletebasin();
36864
37640
  init_deletestream();
36865
37641
  init_getbasinconfig();
@@ -36867,6 +37643,7 @@ var init_operations = __esm(() => {
36867
37643
  init_listaccesstokens();
36868
37644
  init_listbasins();
36869
37645
  init_liststreams();
37646
+ init_read();
36870
37647
  init_reconfigurebasin();
36871
37648
  init_reconfigurestream();
36872
37649
  init_revokeaccesstoken();
@@ -36920,7 +37697,7 @@ async function $do2(client, request, options) {
36920
37697
  const req = requestRes.value;
36921
37698
  const doResult = await client._do(req, {
36922
37699
  context,
36923
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37700
+ errorCodes: ["400", "403", "4XX", "5XX"],
36924
37701
  retryConfig: context.retryConfig,
36925
37702
  retryCodes: context.retryCodes
36926
37703
  });
@@ -36931,7 +37708,7 @@ async function $do2(client, request, options) {
36931
37708
  const responseFields = {
36932
37709
  HttpMeta: { Response: response, Request: req }
36933
37710
  };
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 });
37711
+ const [result] = await match(json(200, ListAccessTokensResponse$inboundSchema), jsonErr([400, 403], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
36935
37712
  if (!result.ok) {
36936
37713
  return [result, { status: "complete", request: req, response }];
36937
37714
  }
@@ -36962,7 +37739,7 @@ var init_accessTokensListAccessTokens2 = __esm(() => {
36962
37739
  tool$accessTokensListAccessTokens = {
36963
37740
  name: "access-tokens-list-access-tokens",
36964
37741
  description: `List access tokens.`,
36965
- scopes: ["read"],
37742
+ scopes: ["read", "read", "read"],
36966
37743
  args: args2,
36967
37744
  tool: async (client, args3, ctx) => {
36968
37745
  const [result, apiCall] = await accessTokensListAccessTokens(client, args3.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
@@ -37026,7 +37803,7 @@ async function $do3(client, request, options) {
37026
37803
  const req = requestRes.value;
37027
37804
  const doResult = await client._do(req, {
37028
37805
  context,
37029
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37806
+ errorCodes: ["400", "403", "4XX", "5XX"],
37030
37807
  retryConfig: context.retryConfig,
37031
37808
  retryCodes: context.retryCodes
37032
37809
  });
@@ -37037,7 +37814,7 @@ async function $do3(client, request, options) {
37037
37814
  const responseFields = {
37038
37815
  HttpMeta: { Response: response, Request: req }
37039
37816
  };
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 });
37817
+ const [result] = await match(nil(200, voidType()), jsonErr([400, 403], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37041
37818
  if (!result.ok) {
37042
37819
  return [result, { status: "complete", request: req, response }];
37043
37820
  }
@@ -37068,7 +37845,7 @@ var init_accessTokensRevokeAccessToken2 = __esm(() => {
37068
37845
  tool$accessTokensRevokeAccessToken = {
37069
37846
  name: "access-tokens-revoke-access-token",
37070
37847
  description: `Revoke an access token.`,
37071
- scopes: ["write"],
37848
+ scopes: ["write", "write", "write"],
37072
37849
  args: args3,
37073
37850
  tool: async (client, args4, ctx) => {
37074
37851
  const [result, apiCall] = await accessTokensRevokeAccessToken(client, args4.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
@@ -37083,17 +37860,117 @@ var init_accessTokensRevokeAccessToken2 = __esm(() => {
37083
37860
  };
37084
37861
  });
37085
37862
 
37086
- // src/funcs/basinsCreateOrReconfigureBasin.ts
37087
- function basinsCreateOrReconfigureBasin(client, request, options) {
37863
+ // src/funcs/basinsCreateBasin.ts
37864
+ function basinsCreateBasin(client, request, options) {
37088
37865
  return new APIPromise($do4(client, request, options));
37089
37866
  }
37090
37867
  async function $do4(client, request, options) {
37091
- const parsed = safeParse(request, (value) => CreateOrReconfigureBasinRequest$outboundSchema.parse(value), "Input validation failed");
37868
+ const parsed = safeParse(request, (value) => CreateBasinRequest$outboundSchema.parse(value), "Input validation failed");
37869
+ if (!parsed.ok) {
37870
+ return [parsed, { status: "invalid" }];
37871
+ }
37872
+ const payload = parsed.value;
37873
+ const body = encodeJSON("body", payload, { explode: true });
37874
+ const path = pathToFunc("/basins")();
37875
+ const headers = new Headers(compactMap({
37876
+ "Content-Type": "application/json",
37877
+ Accept: "application/json"
37878
+ }));
37879
+ const secConfig = await extractSecurity(client._options.accessToken);
37880
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
37881
+ const requestSecurity = resolveGlobalSecurity(securityInput);
37882
+ const context = {
37883
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
37884
+ operationID: "create_basin",
37885
+ oAuth2Scopes: [],
37886
+ resolvedSecurity: requestSecurity,
37887
+ securitySource: client._options.accessToken,
37888
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
37889
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
37890
+ };
37891
+ const requestRes = client._createRequest(context, {
37892
+ security: requestSecurity,
37893
+ method: "POST",
37894
+ baseURL: options?.serverURL,
37895
+ path,
37896
+ headers,
37897
+ body,
37898
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37899
+ }, options);
37900
+ if (!requestRes.ok) {
37901
+ return [requestRes, { status: "invalid" }];
37902
+ }
37903
+ const req = requestRes.value;
37904
+ const doResult = await client._do(req, {
37905
+ context,
37906
+ errorCodes: ["400", "401", "403", "409", "4XX", "5XX"],
37907
+ retryConfig: context.retryConfig,
37908
+ retryCodes: context.retryCodes
37909
+ });
37910
+ if (!doResult.ok) {
37911
+ return [doResult, { status: "request-error", request: req }];
37912
+ }
37913
+ const response = doResult.value;
37914
+ const responseFields = {
37915
+ HttpMeta: { Response: response, Request: req }
37916
+ };
37917
+ const [result] = await match(json(201, BasinInfo$inboundSchema), jsonErr([400, 401, 403, 409], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37918
+ if (!result.ok) {
37919
+ return [result, { status: "complete", request: req, response }];
37920
+ }
37921
+ return [result, { status: "complete", request: req, response }];
37922
+ }
37923
+ var init_basinsCreateBasin = __esm(() => {
37924
+ init_encodings();
37925
+ init_matchers();
37926
+ init_primitives();
37927
+ init_schemas();
37928
+ init_security();
37929
+ init_url();
37930
+ init_components();
37931
+ init_errors();
37932
+ init_async();
37933
+ });
37934
+
37935
+ // src/mcp-server/tools/basinsCreateBasin.ts
37936
+ var args4, tool$basinsCreateBasin;
37937
+ var init_basinsCreateBasin2 = __esm(() => {
37938
+ init_basinsCreateBasin();
37939
+ init_components();
37940
+ init_tools();
37941
+ args4 = {
37942
+ request: CreateBasinRequest$inboundSchema
37943
+ };
37944
+ tool$basinsCreateBasin = {
37945
+ name: "basins-create-basin",
37946
+ description: `Create a basin.`,
37947
+ scopes: ["write", "write", "write"],
37948
+ args: args4,
37949
+ tool: async (client, args5, ctx) => {
37950
+ const [result, apiCall] = await basinsCreateBasin(client, args5.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37951
+ if (!result.ok) {
37952
+ return {
37953
+ content: [{ type: "text", text: result.error.message }],
37954
+ isError: true
37955
+ };
37956
+ }
37957
+ const value = result.value;
37958
+ return formatResult(value, apiCall);
37959
+ }
37960
+ };
37961
+ });
37962
+
37963
+ // src/funcs/basinsCreateOrReconfigureBasin.ts
37964
+ function basinsCreateOrReconfigureBasin(client, request, options) {
37965
+ return new APIPromise($do5(client, request, options));
37966
+ }
37967
+ async function $do5(client, request, options) {
37968
+ const parsed = safeParse(request, (value) => CreateOrReconfigureBasinRequest$outboundSchema2.parse(value), "Input validation failed");
37092
37969
  if (!parsed.ok) {
37093
37970
  return [parsed, { status: "invalid" }];
37094
37971
  }
37095
37972
  const payload = parsed.value;
37096
- const body = encodeJSON("body", payload.CreateBasinRequest, {
37973
+ const body = encodeJSON("body", payload.CreateOrReconfigureBasinRequest, {
37097
37974
  explode: true
37098
37975
  });
37099
37976
  const pathParams = {
@@ -37135,7 +38012,7 @@ async function $do4(client, request, options) {
37135
38012
  const req = requestRes.value;
37136
38013
  const doResult = await client._do(req, {
37137
38014
  context,
37138
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
38015
+ errorCodes: ["400", "4XX", "5XX"],
37139
38016
  retryConfig: context.retryConfig,
37140
38017
  retryCodes: context.retryCodes
37141
38018
  });
@@ -37146,7 +38023,7 @@ async function $do4(client, request, options) {
37146
38023
  const responseFields = {
37147
38024
  HttpMeta: { Response: response, Request: req }
37148
38025
  };
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 });
38026
+ const [result] = await match(json(201, BasinInfo$inboundSchema.optional()), nil(204, BasinInfo$inboundSchema.optional()), jsonErr(400, ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37150
38027
  if (!result.ok) {
37151
38028
  return [result, { status: "complete", request: req, response }];
37152
38029
  }
@@ -37166,21 +38043,21 @@ var init_basinsCreateOrReconfigureBasin = __esm(() => {
37166
38043
  });
37167
38044
 
37168
38045
  // src/mcp-server/tools/basinsCreateOrReconfigureBasin.ts
37169
- var args4, tool$basinsCreateOrReconfigureBasin;
38046
+ var args5, tool$basinsCreateOrReconfigureBasin;
37170
38047
  var init_basinsCreateOrReconfigureBasin2 = __esm(() => {
37171
38048
  init_basinsCreateOrReconfigureBasin();
37172
38049
  init_operations();
37173
38050
  init_tools();
37174
- args4 = {
37175
- request: CreateOrReconfigureBasinRequest$inboundSchema
38051
+ args5 = {
38052
+ request: CreateOrReconfigureBasinRequest$inboundSchema2
37176
38053
  };
37177
38054
  tool$basinsCreateOrReconfigureBasin = {
37178
38055
  name: "basins-create-or-reconfigure-basin",
37179
38056
  description: `Create or reconfigure a basin.`,
37180
- 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();
38057
+ scopes: ["write", "write", "write"],
38058
+ args: args5,
38059
+ tool: async (client, args6, ctx) => {
38060
+ const [result, apiCall] = await basinsCreateOrReconfigureBasin(client, args6.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37184
38061
  if (!result.ok) {
37185
38062
  return {
37186
38063
  content: [{ type: "text", text: result.error.message }],
@@ -37195,9 +38072,9 @@ var init_basinsCreateOrReconfigureBasin2 = __esm(() => {
37195
38072
 
37196
38073
  // src/funcs/basinsDeleteBasin.ts
37197
38074
  function basinsDeleteBasin(client, request, options) {
37198
- return new APIPromise($do5(client, request, options));
38075
+ return new APIPromise($do6(client, request, options));
37199
38076
  }
37200
- async function $do5(client, request, options) {
38077
+ async function $do6(client, request, options) {
37201
38078
  const parsed = safeParse(request, (value) => DeleteBasinRequest$outboundSchema.parse(value), "Input validation failed");
37202
38079
  if (!parsed.ok) {
37203
38080
  return [parsed, { status: "invalid" }];
@@ -37241,7 +38118,7 @@ async function $do5(client, request, options) {
37241
38118
  const req = requestRes.value;
37242
38119
  const doResult = await client._do(req, {
37243
38120
  context,
37244
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
38121
+ errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
37245
38122
  retryConfig: context.retryConfig,
37246
38123
  retryCodes: context.retryCodes
37247
38124
  });
@@ -37252,7 +38129,7 @@ async function $do5(client, request, options) {
37252
38129
  const responseFields = {
37253
38130
  HttpMeta: { Response: response, Request: req }
37254
38131
  };
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 });
38132
+ const [result] = await match(nil(202, voidType()), jsonErr([400, 401, 403, 404], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37256
38133
  if (!result.ok) {
37257
38134
  return [result, { status: "complete", request: req, response }];
37258
38135
  }
@@ -37272,21 +38149,21 @@ var init_basinsDeleteBasin = __esm(() => {
37272
38149
  });
37273
38150
 
37274
38151
  // src/mcp-server/tools/basinsDeleteBasin.ts
37275
- var args5, tool$basinsDeleteBasin;
38152
+ var args6, tool$basinsDeleteBasin;
37276
38153
  var init_basinsDeleteBasin2 = __esm(() => {
37277
38154
  init_basinsDeleteBasin();
37278
38155
  init_operations();
37279
38156
  init_tools();
37280
- args5 = {
38157
+ args6 = {
37281
38158
  request: DeleteBasinRequest$inboundSchema
37282
38159
  };
37283
38160
  tool$basinsDeleteBasin = {
37284
38161
  name: "basins-delete-basin",
37285
38162
  description: `Delete a basin.`,
37286
- 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();
38163
+ scopes: ["write", "write", "write"],
38164
+ args: args6,
38165
+ tool: async (client, args7, ctx) => {
38166
+ const [result, apiCall] = await basinsDeleteBasin(client, args7.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37290
38167
  if (!result.ok) {
37291
38168
  return {
37292
38169
  content: [{ type: "text", text: result.error.message }],
@@ -37300,9 +38177,9 @@ var init_basinsDeleteBasin2 = __esm(() => {
37300
38177
 
37301
38178
  // src/funcs/basinsGetBasinConfig.ts
37302
38179
  function basinsGetBasinConfig(client, request, options) {
37303
- return new APIPromise($do6(client, request, options));
38180
+ return new APIPromise($do7(client, request, options));
37304
38181
  }
37305
- async function $do6(client, request, options) {
38182
+ async function $do7(client, request, options) {
37306
38183
  const parsed = safeParse(request, (value) => GetBasinConfigRequest$outboundSchema.parse(value), "Input validation failed");
37307
38184
  if (!parsed.ok) {
37308
38185
  return [parsed, { status: "invalid" }];
@@ -37346,7 +38223,7 @@ async function $do6(client, request, options) {
37346
38223
  const req = requestRes.value;
37347
38224
  const doResult = await client._do(req, {
37348
38225
  context,
37349
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
38226
+ errorCodes: ["400", "403", "404", "4XX", "5XX"],
37350
38227
  retryConfig: context.retryConfig,
37351
38228
  retryCodes: context.retryCodes
37352
38229
  });
@@ -37357,7 +38234,7 @@ async function $do6(client, request, options) {
37357
38234
  const responseFields = {
37358
38235
  HttpMeta: { Response: response, Request: req }
37359
38236
  };
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 });
38237
+ const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37361
38238
  if (!result.ok) {
37362
38239
  return [result, { status: "complete", request: req, response }];
37363
38240
  }
@@ -37377,21 +38254,21 @@ var init_basinsGetBasinConfig = __esm(() => {
37377
38254
  });
37378
38255
 
37379
38256
  // src/mcp-server/tools/basinsGetBasinConfig.ts
37380
- var args6, tool$basinsGetBasinConfig;
38257
+ var args7, tool$basinsGetBasinConfig;
37381
38258
  var init_basinsGetBasinConfig2 = __esm(() => {
37382
38259
  init_basinsGetBasinConfig();
37383
38260
  init_operations();
37384
38261
  init_tools();
37385
- args6 = {
38262
+ args7 = {
37386
38263
  request: GetBasinConfigRequest$inboundSchema
37387
38264
  };
37388
38265
  tool$basinsGetBasinConfig = {
37389
38266
  name: "basins-get-basin-config",
37390
38267
  description: `Get basin config.`,
37391
- 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();
38268
+ scopes: ["read", "read", "read"],
38269
+ args: args7,
38270
+ tool: async (client, args8, ctx) => {
38271
+ const [result, apiCall] = await basinsGetBasinConfig(client, args8.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37395
38272
  if (!result.ok) {
37396
38273
  return {
37397
38274
  content: [{ type: "text", text: result.error.message }],
@@ -37730,11 +38607,11 @@ function peg$parse(input, options) {
37730
38607
  var peg$f36 = function(name, f, r) {
37731
38608
  return [f, ...r];
37732
38609
  };
37733
- var peg$f37 = function(name, args7) {
38610
+ var peg$f37 = function(name, args8) {
37734
38611
  return {
37735
38612
  type: "FunctionExpr",
37736
38613
  name,
37737
- arguments: args7
38614
+ arguments: args8
37738
38615
  };
37739
38616
  };
37740
38617
  var peg$f38 = function(value) {
@@ -40845,7 +41722,7 @@ function evalFunctionExpr(ctx, item, node) {
40845
41722
  if (fn.definition.parameters.length !== node.arguments.length) {
40846
41723
  return false;
40847
41724
  }
40848
- const args7 = [];
41725
+ const args8 = [];
40849
41726
  for (let i = 0;i < node.arguments.length; i++) {
40850
41727
  const value2 = evalFunctionArgument(ctx, item, node.arguments[i]);
40851
41728
  const param = fn.definition.parameters[i];
@@ -40854,19 +41731,19 @@ function evalFunctionExpr(ctx, item, node) {
40854
41731
  if (!isNodeList(value2) && !isJsonValue(value2)) {
40855
41732
  return false;
40856
41733
  }
40857
- args7.push(coerceValueType(value2));
41734
+ args8.push(coerceValueType(value2));
40858
41735
  break;
40859
41736
  case "NodesType":
40860
41737
  if (!isNodeList(value2)) {
40861
41738
  return false;
40862
41739
  }
40863
- args7.push(value2);
41740
+ args8.push(value2);
40864
41741
  break;
40865
41742
  case "LogicalType":
40866
41743
  if (typeof value2 === "boolean") {
40867
- args7.push(value2);
41744
+ args8.push(value2);
40868
41745
  } else if (isNodeList(value2)) {
40869
- args7.push(value2.length > 0);
41746
+ args8.push(value2.length > 0);
40870
41747
  } else {
40871
41748
  return false;
40872
41749
  }
@@ -40875,7 +41752,7 @@ function evalFunctionExpr(ctx, item, node) {
40875
41752
  assertNever(param, "Unknown function argument type");
40876
41753
  }
40877
41754
  }
40878
- return fn.declaration(ctx, ...args7);
41755
+ return fn.declaration(ctx, ...args8);
40879
41756
  }
40880
41757
  function isKnownFunction(functions, name) {
40881
41758
  return Object.hasOwn(functions, name);
@@ -41225,9 +42102,9 @@ var init_operations2 = __esm(() => {
41225
42102
 
41226
42103
  // src/funcs/basinsListBasins.ts
41227
42104
  function basinsListBasins(client, request, options) {
41228
- return new APIPromise($do7(client, request, options));
42105
+ return new APIPromise($do8(client, request, options));
41229
42106
  }
41230
- async function $do7(client, request, options) {
42107
+ async function $do8(client, request, options) {
41231
42108
  const parsed = safeParse(request, (value2) => ListBasinsRequest$outboundSchema.parse(value2), "Input validation failed");
41232
42109
  if (!parsed.ok) {
41233
42110
  return [haltIterator(parsed), { status: "invalid" }];
@@ -41271,7 +42148,7 @@ async function $do7(client, request, options) {
41271
42148
  const req = requestRes.value;
41272
42149
  const doResult = await client._do(req, {
41273
42150
  context,
41274
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42151
+ errorCodes: ["400", "403", "4XX", "5XX"],
41275
42152
  retryConfig: context.retryConfig,
41276
42153
  retryCodes: context.retryCodes
41277
42154
  });
@@ -41282,7 +42159,7 @@ async function $do7(client, request, options) {
41282
42159
  const responseFields = {
41283
42160
  HttpMeta: { Response: response, Request: req }
41284
42161
  };
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 });
42162
+ const [result, raw] = await match(json(200, ListBasinsResponse$inboundSchema2, { key: "Result" }), jsonErr([400, 403], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41286
42163
  if (!result.ok) {
41287
42164
  return [haltIterator(result), {
41288
42165
  status: "complete",
@@ -41323,21 +42200,21 @@ var init_basinsListBasins = __esm(() => {
41323
42200
  });
41324
42201
 
41325
42202
  // src/mcp-server/tools/basinsListBasins.ts
41326
- var args7, tool$basinsListBasins;
42203
+ var args8, tool$basinsListBasins;
41327
42204
  var init_basinsListBasins2 = __esm(() => {
41328
42205
  init_basinsListBasins();
41329
42206
  init_operations();
41330
42207
  init_tools();
41331
- args7 = {
42208
+ args8 = {
41332
42209
  request: ListBasinsRequest$inboundSchema
41333
42210
  };
41334
42211
  tool$basinsListBasins = {
41335
42212
  name: "basins-list-basins",
41336
42213
  description: `List basins.`,
41337
- 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();
42214
+ scopes: ["read", "read", "read"],
42215
+ args: args8,
42216
+ tool: async (client, args9, ctx) => {
42217
+ const [result, apiCall] = await basinsListBasins(client, args9.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41341
42218
  if (!result.ok) {
41342
42219
  return {
41343
42220
  content: [{ type: "text", text: result.error.message }],
@@ -41352,9 +42229,9 @@ var init_basinsListBasins2 = __esm(() => {
41352
42229
 
41353
42230
  // src/funcs/basinsReconfigureBasin.ts
41354
42231
  function basinsReconfigureBasin(client, request, options) {
41355
- return new APIPromise($do8(client, request, options));
42232
+ return new APIPromise($do9(client, request, options));
41356
42233
  }
41357
- async function $do8(client, request, options) {
42234
+ async function $do9(client, request, options) {
41358
42235
  const parsed = safeParse(request, (value2) => ReconfigureBasinRequest$outboundSchema.parse(value2), "Input validation failed");
41359
42236
  if (!parsed.ok) {
41360
42237
  return [parsed, { status: "invalid" }];
@@ -41401,7 +42278,7 @@ async function $do8(client, request, options) {
41401
42278
  const req = requestRes.value;
41402
42279
  const doResult = await client._do(req, {
41403
42280
  context,
41404
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42281
+ errorCodes: ["400", "403", "404", "4XX", "5XX"],
41405
42282
  retryConfig: context.retryConfig,
41406
42283
  retryCodes: context.retryCodes
41407
42284
  });
@@ -41412,7 +42289,7 @@ async function $do8(client, request, options) {
41412
42289
  const responseFields = {
41413
42290
  HttpMeta: { Response: response, Request: req }
41414
42291
  };
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 });
42292
+ const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41416
42293
  if (!result.ok) {
41417
42294
  return [result, { status: "complete", request: req, response }];
41418
42295
  }
@@ -41432,21 +42309,142 @@ var init_basinsReconfigureBasin = __esm(() => {
41432
42309
  });
41433
42310
 
41434
42311
  // src/mcp-server/tools/basinsReconfigureBasin.ts
41435
- var args8, tool$basinsReconfigureBasin;
42312
+ var args9, tool$basinsReconfigureBasin;
41436
42313
  var init_basinsReconfigureBasin2 = __esm(() => {
41437
42314
  init_basinsReconfigureBasin();
41438
42315
  init_operations();
41439
42316
  init_tools();
41440
- args8 = {
42317
+ args9 = {
41441
42318
  request: ReconfigureBasinRequest$inboundSchema
41442
42319
  };
41443
42320
  tool$basinsReconfigureBasin = {
41444
42321
  name: "basins-reconfigure-basin",
41445
42322
  description: `Reconfigure a basin.`,
41446
- 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();
42323
+ scopes: ["write", "write", "write"],
42324
+ args: args9,
42325
+ tool: async (client, args10, ctx) => {
42326
+ const [result, apiCall] = await basinsReconfigureBasin(client, args10.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42327
+ if (!result.ok) {
42328
+ return {
42329
+ content: [{ type: "text", text: result.error.message }],
42330
+ isError: true
42331
+ };
42332
+ }
42333
+ const value2 = result.value;
42334
+ return formatResult(value2, apiCall);
42335
+ }
42336
+ };
42337
+ });
42338
+
42339
+ // src/funcs/recordsAppend.ts
42340
+ function recordsAppend(client, request, options) {
42341
+ return new APIPromise($do10(client, request, options));
42342
+ }
42343
+ async function $do10(client, request, options) {
42344
+ const parsed = safeParse(request, (value2) => AppendRequest$outboundSchema.parse(value2), "Input validation failed");
42345
+ if (!parsed.ok) {
42346
+ return [parsed, { status: "invalid" }];
42347
+ }
42348
+ const payload = parsed.value;
42349
+ const body = encodeJSON("body", payload.AppendInput, { explode: true });
42350
+ const baseURL = options?.serverURL || pathToFunc(AppendServerList[0], { charEncoding: "percent" })({
42351
+ basin: ""
42352
+ });
42353
+ const pathParams = {
42354
+ stream: encodeSimple("stream", payload.stream, {
42355
+ explode: false,
42356
+ charEncoding: "percent"
42357
+ })
42358
+ };
42359
+ const path = pathToFunc("/streams/{stream}/records")(pathParams);
42360
+ const headers = new Headers(compactMap({
42361
+ "Content-Type": "application/json",
42362
+ Accept: "application/json",
42363
+ "s2-basin": encodeSimple("s2-basin", payload["s2-basin"], {
42364
+ explode: false,
42365
+ charEncoding: "none"
42366
+ }),
42367
+ "s2-format": encodeSimple("s2-format", payload["s2-format"], {
42368
+ explode: false,
42369
+ charEncoding: "none"
42370
+ })
42371
+ }));
42372
+ const secConfig = await extractSecurity(client._options.accessToken);
42373
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42374
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42375
+ const context = {
42376
+ baseURL: baseURL ?? "",
42377
+ operationID: "append",
42378
+ oAuth2Scopes: [],
42379
+ resolvedSecurity: requestSecurity,
42380
+ securitySource: client._options.accessToken,
42381
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42382
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42383
+ };
42384
+ const requestRes = client._createRequest(context, {
42385
+ security: requestSecurity,
42386
+ method: "POST",
42387
+ baseURL,
42388
+ path,
42389
+ headers,
42390
+ body,
42391
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42392
+ }, options);
42393
+ if (!requestRes.ok) {
42394
+ return [requestRes, { status: "invalid" }];
42395
+ }
42396
+ const req = requestRes.value;
42397
+ const doResult = await client._do(req, {
42398
+ context,
42399
+ errorCodes: ["400", "401", "404", "409", "412", "4XX", "500", "5XX"],
42400
+ retryConfig: context.retryConfig,
42401
+ retryCodes: context.retryCodes
42402
+ });
42403
+ if (!doResult.ok) {
42404
+ return [doResult, { status: "request-error", request: req }];
42405
+ }
42406
+ const response = doResult.value;
42407
+ const responseFields = {
42408
+ HttpMeta: { Response: response, Request: req }
42409
+ };
42410
+ const [result] = await match(json(200, AppendAck$inboundSchema), jsonErr([400, 401, 404, 409], ErrorResponse$inboundSchema), jsonErr(412, AppendConditionFailed$inboundSchema), jsonErr(500, ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42411
+ if (!result.ok) {
42412
+ return [result, { status: "complete", request: req, response }];
42413
+ }
42414
+ return [result, { status: "complete", request: req, response }];
42415
+ }
42416
+ var init_recordsAppend = __esm(() => {
42417
+ init_encodings();
42418
+ init_matchers();
42419
+ init_primitives();
42420
+ init_schemas();
42421
+ init_security();
42422
+ init_url();
42423
+ init_components();
42424
+ init_errors();
42425
+ init_append();
42426
+ init_operations();
42427
+ init_async();
42428
+ });
42429
+
42430
+ // src/mcp-server/tools/recordsAppend.ts
42431
+ var args10, tool$recordsAppend;
42432
+ var init_recordsAppend2 = __esm(() => {
42433
+ init_recordsAppend();
42434
+ init_operations();
42435
+ init_tools();
42436
+ args10 = {
42437
+ request: AppendRequest$inboundSchema
42438
+ };
42439
+ tool$recordsAppend = {
42440
+ name: "records-append",
42441
+ description: `Append records.
42442
+
42443
+ Append a batch of records to a stream.`,
42444
+ scopes: ["write", "write", "write"],
42445
+ args: args10,
42446
+ tool: async (client, args11, ctx) => {
42447
+ const [result, apiCall] = await recordsAppend(client, args11.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41450
42448
  if (!result.ok) {
41451
42449
  return {
41452
42450
  content: [{ type: "text", text: result.error.message }],
@@ -41461,9 +42459,9 @@ var init_basinsReconfigureBasin2 = __esm(() => {
41461
42459
 
41462
42460
  // src/funcs/recordsCheckTail.ts
41463
42461
  function recordsCheckTail(client, request, options) {
41464
- return new APIPromise($do9(client, request, options));
42462
+ return new APIPromise($do11(client, request, options));
41465
42463
  }
41466
- async function $do9(client, request, options) {
42464
+ async function $do11(client, request, options) {
41467
42465
  const parsed = safeParse(request, (value2) => CheckTailRequest$outboundSchema.parse(value2), "Input validation failed");
41468
42466
  if (!parsed.ok) {
41469
42467
  return [parsed, { status: "invalid" }];
@@ -41481,7 +42479,11 @@ async function $do9(client, request, options) {
41481
42479
  };
41482
42480
  const path = pathToFunc("/streams/{stream}/records/tail")(pathParams);
41483
42481
  const headers = new Headers(compactMap({
41484
- Accept: "application/json"
42482
+ Accept: "application/json",
42483
+ "s2-basin": encodeSimple("s2-basin", payload["s2-basin"], {
42484
+ explode: false,
42485
+ charEncoding: "none"
42486
+ })
41485
42487
  }));
41486
42488
  const secConfig = await extractSecurity(client._options.accessToken);
41487
42489
  const securityInput = secConfig == null ? {} : { accessToken: secConfig };
@@ -41510,7 +42512,7 @@ async function $do9(client, request, options) {
41510
42512
  const req = requestRes.value;
41511
42513
  const doResult = await client._do(req, {
41512
42514
  context,
41513
- errorCodes: ["400", "401", "404", "499", "4XX", "500", "503", "504", "5XX"],
42515
+ errorCodes: ["400", "401", "404", "409", "4XX", "500", "5XX"],
41514
42516
  retryConfig: context.retryConfig,
41515
42517
  retryCodes: context.retryCodes
41516
42518
  });
@@ -41521,7 +42523,7 @@ async function $do9(client, request, options) {
41521
42523
  const responseFields = {
41522
42524
  HttpMeta: { Response: response, Request: req }
41523
42525
  };
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 });
42526
+ const [result] = await match(json(200, TailResponse$inboundSchema), jsonErr([400, 401, 404, 409], ErrorResponse$inboundSchema), jsonErr(500, ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41525
42527
  if (!result.ok) {
41526
42528
  return [result, { status: "complete", request: req, response }];
41527
42529
  }
@@ -41542,12 +42544,12 @@ var init_recordsCheckTail = __esm(() => {
41542
42544
  });
41543
42545
 
41544
42546
  // src/mcp-server/tools/recordsCheckTail.ts
41545
- var args9, tool$recordsCheckTail;
42547
+ var args11, tool$recordsCheckTail;
41546
42548
  var init_recordsCheckTail2 = __esm(() => {
41547
42549
  init_recordsCheckTail();
41548
42550
  init_operations();
41549
42551
  init_tools();
41550
- args9 = {
42552
+ args11 = {
41551
42553
  request: CheckTailRequest$inboundSchema
41552
42554
  };
41553
42555
  tool$recordsCheckTail = {
@@ -41555,10 +42557,137 @@ var init_recordsCheckTail2 = __esm(() => {
41555
42557
  description: `Check the tail.
41556
42558
 
41557
42559
  Check the tail of a stream.`,
41558
- 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();
42560
+ scopes: ["read", "read", "read"],
42561
+ args: args11,
42562
+ tool: async (client, args12, ctx) => {
42563
+ const [result, apiCall] = await recordsCheckTail(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42564
+ if (!result.ok) {
42565
+ return {
42566
+ content: [{ type: "text", text: result.error.message }],
42567
+ isError: true
42568
+ };
42569
+ }
42570
+ const value2 = result.value;
42571
+ return formatResult(value2, apiCall);
42572
+ }
42573
+ };
42574
+ });
42575
+
42576
+ // src/funcs/recordsRead.ts
42577
+ function recordsRead(client, request, options) {
42578
+ return new APIPromise($do12(client, request, options));
42579
+ }
42580
+ async function $do12(client, request, options) {
42581
+ const parsed = safeParse(request, (value2) => ReadRequest$outboundSchema.parse(value2), "Input validation failed");
42582
+ if (!parsed.ok) {
42583
+ return [parsed, { status: "invalid" }];
42584
+ }
42585
+ const payload = parsed.value;
42586
+ const body = null;
42587
+ const baseURL = options?.serverURL || pathToFunc(ReadServerList[0], { charEncoding: "percent" })({
42588
+ basin: ""
42589
+ });
42590
+ const pathParams = {
42591
+ stream: encodeSimple("stream", payload.stream, {
42592
+ explode: false,
42593
+ charEncoding: "percent"
42594
+ })
42595
+ };
42596
+ const path = pathToFunc("/streams/{stream}/records")(pathParams);
42597
+ const query2 = encodeFormQuery({
42598
+ bytes: payload.bytes,
42599
+ count: payload.count,
42600
+ seq_num: payload.seq_num,
42601
+ tail_offset: payload.tail_offset,
42602
+ timestamp: payload.timestamp
42603
+ });
42604
+ const headers = new Headers(compactMap({
42605
+ Accept: options?.acceptHeaderOverride || "application/json;q=1, text/event-stream;q=0",
42606
+ "s2-basin": encodeSimple("s2-basin", payload["s2-basin"], {
42607
+ explode: false,
42608
+ charEncoding: "none"
42609
+ }),
42610
+ "s2-format": encodeSimple("s2-format", payload["s2-format"], {
42611
+ explode: false,
42612
+ charEncoding: "none"
42613
+ })
42614
+ }));
42615
+ const secConfig = await extractSecurity(client._options.accessToken);
42616
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42617
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42618
+ const context = {
42619
+ baseURL: baseURL ?? "",
42620
+ operationID: "read",
42621
+ oAuth2Scopes: [],
42622
+ resolvedSecurity: requestSecurity,
42623
+ securitySource: client._options.accessToken,
42624
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42625
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42626
+ };
42627
+ const requestRes = client._createRequest(context, {
42628
+ security: requestSecurity,
42629
+ method: "GET",
42630
+ baseURL,
42631
+ path,
42632
+ headers,
42633
+ query: query2,
42634
+ body,
42635
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42636
+ }, options);
42637
+ if (!requestRes.ok) {
42638
+ return [requestRes, { status: "invalid" }];
42639
+ }
42640
+ const req = requestRes.value;
42641
+ const doResult = await client._do(req, {
42642
+ context,
42643
+ errorCodes: ["400", "401", "404", "409", "416", "4XX", "500", "5XX"],
42644
+ retryConfig: context.retryConfig,
42645
+ retryCodes: context.retryCodes
42646
+ });
42647
+ if (!doResult.ok) {
42648
+ return [doResult, { status: "request-error", request: req }];
42649
+ }
42650
+ const response = doResult.value;
42651
+ const responseFields = {
42652
+ HttpMeta: { Response: response, Request: req }
42653
+ };
42654
+ const [result] = await match(json(200, ReadResponse$inboundSchema), sse(200, ReadResponse$inboundSchema), jsonErr([400, 401, 404, 409], ErrorResponse$inboundSchema), jsonErr(416, TailResponse$inboundSchema2), jsonErr(500, ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42655
+ if (!result.ok) {
42656
+ return [result, { status: "complete", request: req, response }];
42657
+ }
42658
+ return [result, { status: "complete", request: req, response }];
42659
+ }
42660
+ var init_recordsRead = __esm(() => {
42661
+ init_encodings();
42662
+ init_matchers();
42663
+ init_primitives();
42664
+ init_schemas();
42665
+ init_security();
42666
+ init_url();
42667
+ init_errors();
42668
+ init_operations();
42669
+ init_read();
42670
+ init_async();
42671
+ });
42672
+
42673
+ // src/mcp-server/tools/recordsRead.ts
42674
+ var args12, tool$recordsRead;
42675
+ var init_recordsRead2 = __esm(() => {
42676
+ init_recordsRead();
42677
+ init_operations();
42678
+ init_tools();
42679
+ args12 = {
42680
+ request: ReadRequest$inboundSchema
42681
+ };
42682
+ tool$recordsRead = {
42683
+ name: "records-read",
42684
+ description: `Retrieve records.
42685
+
42686
+ Retrieve a batch of records, or set \`Accept: text/event-stream\` to stream using server-sent events.`,
42687
+ scopes: ["read", "read", "read"],
42688
+ args: args12,
42689
+ tool: async (client, args13, ctx) => {
42690
+ const [result, apiCall] = await recordsRead(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41562
42691
  if (!result.ok) {
41563
42692
  return {
41564
42693
  content: [{ type: "text", text: result.error.message }],
@@ -41573,9 +42702,9 @@ Check the tail of a stream.`,
41573
42702
 
41574
42703
  // src/funcs/streamsCreateOrReconfigureStream.ts
41575
42704
  function streamsCreateOrReconfigureStream(client, request, options) {
41576
- return new APIPromise($do10(client, request, options));
42705
+ return new APIPromise($do13(client, request, options));
41577
42706
  }
41578
- async function $do10(client, request, options) {
42707
+ async function $do13(client, request, options) {
41579
42708
  const parsed = safeParse(request, (value2) => CreateOrReconfigureStreamRequest$outboundSchema.parse(value2), "Input validation failed");
41580
42709
  if (!parsed.ok) {
41581
42710
  return [parsed, { status: "invalid" }];
@@ -41597,6 +42726,10 @@ async function $do10(client, request, options) {
41597
42726
  const headers = new Headers(compactMap({
41598
42727
  "Content-Type": "application/json",
41599
42728
  Accept: "application/json",
42729
+ "s2-basin": encodeSimple("s2-basin", payload["s2-basin"], {
42730
+ explode: false,
42731
+ charEncoding: "none"
42732
+ }),
41600
42733
  "s2-request-token": encodeSimple("s2-request-token", payload["s2-request-token"], { explode: false, charEncoding: "none" })
41601
42734
  }));
41602
42735
  const secConfig = await extractSecurity(client._options.accessToken);
@@ -41613,7 +42746,7 @@ async function $do10(client, request, options) {
41613
42746
  };
41614
42747
  const requestRes = client._createRequest(context, {
41615
42748
  security: requestSecurity,
41616
- method: "POST",
42749
+ method: "PUT",
41617
42750
  baseURL,
41618
42751
  path,
41619
42752
  headers,
@@ -41626,7 +42759,7 @@ async function $do10(client, request, options) {
41626
42759
  const req = requestRes.value;
41627
42760
  const doResult = await client._do(req, {
41628
42761
  context,
41629
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42762
+ errorCodes: ["400", "403", "404", "409", "4XX", "5XX"],
41630
42763
  retryConfig: context.retryConfig,
41631
42764
  retryCodes: context.retryCodes
41632
42765
  });
@@ -41637,7 +42770,7 @@ async function $do10(client, request, options) {
41637
42770
  const responseFields = {
41638
42771
  HttpMeta: { Response: response, Request: req }
41639
42772
  };
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 });
42773
+ const [result] = await match(json(201, StreamInfo$inboundSchema.optional()), nil(204, StreamInfo$inboundSchema.optional()), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41641
42774
  if (!result.ok) {
41642
42775
  return [result, { status: "complete", request: req, response }];
41643
42776
  }
@@ -41658,21 +42791,132 @@ var init_streamsCreateOrReconfigureStream = __esm(() => {
41658
42791
  });
41659
42792
 
41660
42793
  // src/mcp-server/tools/streamsCreateOrReconfigureStream.ts
41661
- var args10, tool$streamsCreateOrReconfigureStream;
42794
+ var args13, tool$streamsCreateOrReconfigureStream;
41662
42795
  var init_streamsCreateOrReconfigureStream2 = __esm(() => {
41663
42796
  init_streamsCreateOrReconfigureStream();
41664
42797
  init_operations();
41665
42798
  init_tools();
41666
- args10 = {
42799
+ args13 = {
41667
42800
  request: CreateOrReconfigureStreamRequest$inboundSchema
41668
42801
  };
41669
42802
  tool$streamsCreateOrReconfigureStream = {
41670
42803
  name: "streams-create-or-reconfigure-stream",
41671
42804
  description: `Create or reconfigure a stream.`,
41672
- 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();
42805
+ scopes: ["write", "write", "write"],
42806
+ args: args13,
42807
+ tool: async (client, args14, ctx) => {
42808
+ const [result, apiCall] = await streamsCreateOrReconfigureStream(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42809
+ if (!result.ok) {
42810
+ return {
42811
+ content: [{ type: "text", text: result.error.message }],
42812
+ isError: true
42813
+ };
42814
+ }
42815
+ const value2 = result.value;
42816
+ return formatResult(value2, apiCall);
42817
+ }
42818
+ };
42819
+ });
42820
+
42821
+ // src/funcs/streamsCreateStream.ts
42822
+ function streamsCreateStream(client, request, options) {
42823
+ return new APIPromise($do14(client, request, options));
42824
+ }
42825
+ async function $do14(client, request, options) {
42826
+ const parsed = safeParse(request, (value2) => CreateStreamRequest$outboundSchema2.parse(value2), "Input validation failed");
42827
+ if (!parsed.ok) {
42828
+ return [parsed, { status: "invalid" }];
42829
+ }
42830
+ const payload = parsed.value;
42831
+ const body = encodeJSON("body", payload.CreateStreamRequest, {
42832
+ explode: true
42833
+ });
42834
+ const baseURL = options?.serverURL || pathToFunc(CreateStreamServerList[0], { charEncoding: "percent" })({
42835
+ basin: ""
42836
+ });
42837
+ const path = pathToFunc("/streams")();
42838
+ const headers = new Headers(compactMap({
42839
+ "Content-Type": "application/json",
42840
+ Accept: "application/json",
42841
+ "s2-basin": encodeSimple("s2-basin", payload["s2-basin"], {
42842
+ explode: false,
42843
+ charEncoding: "none"
42844
+ })
42845
+ }));
42846
+ const secConfig = await extractSecurity(client._options.accessToken);
42847
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42848
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42849
+ const context = {
42850
+ baseURL: baseURL ?? "",
42851
+ operationID: "create_stream",
42852
+ oAuth2Scopes: [],
42853
+ resolvedSecurity: requestSecurity,
42854
+ securitySource: client._options.accessToken,
42855
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42856
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42857
+ };
42858
+ const requestRes = client._createRequest(context, {
42859
+ security: requestSecurity,
42860
+ method: "POST",
42861
+ baseURL,
42862
+ path,
42863
+ headers,
42864
+ body,
42865
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42866
+ }, options);
42867
+ if (!requestRes.ok) {
42868
+ return [requestRes, { status: "invalid" }];
42869
+ }
42870
+ const req = requestRes.value;
42871
+ const doResult = await client._do(req, {
42872
+ context,
42873
+ errorCodes: ["400", "403", "404", "409", "4XX", "5XX"],
42874
+ retryConfig: context.retryConfig,
42875
+ retryCodes: context.retryCodes
42876
+ });
42877
+ if (!doResult.ok) {
42878
+ return [doResult, { status: "request-error", request: req }];
42879
+ }
42880
+ const response = doResult.value;
42881
+ const responseFields = {
42882
+ HttpMeta: { Response: response, Request: req }
42883
+ };
42884
+ const [result] = await match(json(201, StreamInfo$inboundSchema), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42885
+ if (!result.ok) {
42886
+ return [result, { status: "complete", request: req, response }];
42887
+ }
42888
+ return [result, { status: "complete", request: req, response }];
42889
+ }
42890
+ var init_streamsCreateStream = __esm(() => {
42891
+ init_encodings();
42892
+ init_matchers();
42893
+ init_primitives();
42894
+ init_schemas();
42895
+ init_security();
42896
+ init_url();
42897
+ init_components();
42898
+ init_errors();
42899
+ init_createstream();
42900
+ init_operations();
42901
+ init_async();
42902
+ });
42903
+
42904
+ // src/mcp-server/tools/streamsCreateStream.ts
42905
+ var args14, tool$streamsCreateStream;
42906
+ var init_streamsCreateStream2 = __esm(() => {
42907
+ init_streamsCreateStream();
42908
+ init_operations();
42909
+ init_tools();
42910
+ args14 = {
42911
+ request: CreateStreamRequest$inboundSchema2
42912
+ };
42913
+ tool$streamsCreateStream = {
42914
+ name: "streams-create-stream",
42915
+ description: `Create a stream.`,
42916
+ scopes: ["write", "write", "write"],
42917
+ args: args14,
42918
+ tool: async (client, args15, ctx) => {
42919
+ const [result, apiCall] = await streamsCreateStream(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41676
42920
  if (!result.ok) {
41677
42921
  return {
41678
42922
  content: [{ type: "text", text: result.error.message }],
@@ -41687,9 +42931,9 @@ var init_streamsCreateOrReconfigureStream2 = __esm(() => {
41687
42931
 
41688
42932
  // src/funcs/streamsDeleteStream.ts
41689
42933
  function streamsDeleteStream(client, request, options) {
41690
- return new APIPromise($do11(client, request, options));
42934
+ return new APIPromise($do15(client, request, options));
41691
42935
  }
41692
- async function $do11(client, request, options) {
42936
+ async function $do15(client, request, options) {
41693
42937
  const parsed = safeParse(request, (value2) => DeleteStreamRequest$outboundSchema.parse(value2), "Input validation failed");
41694
42938
  if (!parsed.ok) {
41695
42939
  return [parsed, { status: "invalid" }];
@@ -41707,7 +42951,11 @@ async function $do11(client, request, options) {
41707
42951
  };
41708
42952
  const path = pathToFunc("/streams/{stream}")(pathParams);
41709
42953
  const headers = new Headers(compactMap({
41710
- Accept: "application/json"
42954
+ Accept: "application/json",
42955
+ "s2-basin": encodeSimple("s2-basin", payload["s2-basin"], {
42956
+ explode: false,
42957
+ charEncoding: "none"
42958
+ })
41711
42959
  }));
41712
42960
  const secConfig = await extractSecurity(client._options.accessToken);
41713
42961
  const securityInput = secConfig == null ? {} : { accessToken: secConfig };
@@ -41736,7 +42984,7 @@ async function $do11(client, request, options) {
41736
42984
  const req = requestRes.value;
41737
42985
  const doResult = await client._do(req, {
41738
42986
  context,
41739
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42987
+ errorCodes: ["400", "403", "404", "4XX", "5XX"],
41740
42988
  retryConfig: context.retryConfig,
41741
42989
  retryCodes: context.retryCodes
41742
42990
  });
@@ -41747,7 +42995,7 @@ async function $do11(client, request, options) {
41747
42995
  const responseFields = {
41748
42996
  HttpMeta: { Response: response, Request: req }
41749
42997
  };
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 });
42998
+ const [result] = await match(nil(202, voidType()), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41751
42999
  if (!result.ok) {
41752
43000
  return [result, { status: "complete", request: req, response }];
41753
43001
  }
@@ -41768,21 +43016,21 @@ var init_streamsDeleteStream = __esm(() => {
41768
43016
  });
41769
43017
 
41770
43018
  // src/mcp-server/tools/streamsDeleteStream.ts
41771
- var args11, tool$streamsDeleteStream;
43019
+ var args15, tool$streamsDeleteStream;
41772
43020
  var init_streamsDeleteStream2 = __esm(() => {
41773
43021
  init_streamsDeleteStream();
41774
43022
  init_operations();
41775
43023
  init_tools();
41776
- args11 = {
43024
+ args15 = {
41777
43025
  request: DeleteStreamRequest$inboundSchema
41778
43026
  };
41779
43027
  tool$streamsDeleteStream = {
41780
43028
  name: "streams-delete-stream",
41781
43029
  description: `Delete a stream.`,
41782
- 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();
43030
+ scopes: ["write", "write", "write"],
43031
+ args: args15,
43032
+ tool: async (client, args16, ctx) => {
43033
+ const [result, apiCall] = await streamsDeleteStream(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41786
43034
  if (!result.ok) {
41787
43035
  return {
41788
43036
  content: [{ type: "text", text: result.error.message }],
@@ -41796,9 +43044,9 @@ var init_streamsDeleteStream2 = __esm(() => {
41796
43044
 
41797
43045
  // src/funcs/streamsGetStreamConfig.ts
41798
43046
  function streamsGetStreamConfig(client, request, options) {
41799
- return new APIPromise($do12(client, request, options));
43047
+ return new APIPromise($do16(client, request, options));
41800
43048
  }
41801
- async function $do12(client, request, options) {
43049
+ async function $do16(client, request, options) {
41802
43050
  const parsed = safeParse(request, (value2) => GetStreamConfigRequest$outboundSchema.parse(value2), "Input validation failed");
41803
43051
  if (!parsed.ok) {
41804
43052
  return [parsed, { status: "invalid" }];
@@ -41816,7 +43064,11 @@ async function $do12(client, request, options) {
41816
43064
  };
41817
43065
  const path = pathToFunc("/streams/{stream}")(pathParams);
41818
43066
  const headers = new Headers(compactMap({
41819
- Accept: "application/json"
43067
+ Accept: "application/json",
43068
+ "s2-basin": encodeSimple("s2-basin", payload["s2-basin"], {
43069
+ explode: false,
43070
+ charEncoding: "none"
43071
+ })
41820
43072
  }));
41821
43073
  const secConfig = await extractSecurity(client._options.accessToken);
41822
43074
  const securityInput = secConfig == null ? {} : { accessToken: secConfig };
@@ -41845,7 +43097,7 @@ async function $do12(client, request, options) {
41845
43097
  const req = requestRes.value;
41846
43098
  const doResult = await client._do(req, {
41847
43099
  context,
41848
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
43100
+ errorCodes: ["400", "403", "404", "409", "4XX", "5XX"],
41849
43101
  retryConfig: context.retryConfig,
41850
43102
  retryCodes: context.retryCodes
41851
43103
  });
@@ -41856,7 +43108,7 @@ async function $do12(client, request, options) {
41856
43108
  const responseFields = {
41857
43109
  HttpMeta: { Response: response, Request: req }
41858
43110
  };
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 });
43111
+ const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41860
43112
  if (!result.ok) {
41861
43113
  return [result, { status: "complete", request: req, response }];
41862
43114
  }
@@ -41877,21 +43129,21 @@ var init_streamsGetStreamConfig = __esm(() => {
41877
43129
  });
41878
43130
 
41879
43131
  // src/mcp-server/tools/streamsGetStreamConfig.ts
41880
- var args12, tool$streamsGetStreamConfig;
43132
+ var args16, tool$streamsGetStreamConfig;
41881
43133
  var init_streamsGetStreamConfig2 = __esm(() => {
41882
43134
  init_streamsGetStreamConfig();
41883
43135
  init_operations();
41884
43136
  init_tools();
41885
- args12 = {
43137
+ args16 = {
41886
43138
  request: GetStreamConfigRequest$inboundSchema
41887
43139
  };
41888
43140
  tool$streamsGetStreamConfig = {
41889
43141
  name: "streams-get-stream-config",
41890
43142
  description: `Get stream configuration.`,
41891
- 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();
43143
+ scopes: ["read", "read", "read"],
43144
+ args: args16,
43145
+ tool: async (client, args17, ctx) => {
43146
+ const [result, apiCall] = await streamsGetStreamConfig(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41895
43147
  if (!result.ok) {
41896
43148
  return {
41897
43149
  content: [{ type: "text", text: result.error.message }],
@@ -41906,9 +43158,9 @@ var init_streamsGetStreamConfig2 = __esm(() => {
41906
43158
 
41907
43159
  // src/funcs/streamsListStreams.ts
41908
43160
  function streamsListStreams(client, request, options) {
41909
- return new APIPromise($do13(client, request, options));
43161
+ return new APIPromise($do17(client, request, options));
41910
43162
  }
41911
- async function $do13(client, request, options) {
43163
+ async function $do17(client, request, options) {
41912
43164
  const parsed = safeParse(request, (value2) => ListStreamsRequest$outboundSchema.parse(value2), "Input validation failed");
41913
43165
  if (!parsed.ok) {
41914
43166
  return [haltIterator(parsed), { status: "invalid" }];
@@ -41925,7 +43177,11 @@ async function $do13(client, request, options) {
41925
43177
  start_after: payload.start_after
41926
43178
  });
41927
43179
  const headers = new Headers(compactMap({
41928
- Accept: "application/json"
43180
+ Accept: "application/json",
43181
+ "s2-basin": encodeSimple("s2-basin", payload["s2-basin"], {
43182
+ explode: false,
43183
+ charEncoding: "none"
43184
+ })
41929
43185
  }));
41930
43186
  const secConfig = await extractSecurity(client._options.accessToken);
41931
43187
  const securityInput = secConfig == null ? {} : { accessToken: secConfig };
@@ -41955,7 +43211,7 @@ async function $do13(client, request, options) {
41955
43211
  const req = requestRes.value;
41956
43212
  const doResult = await client._do(req, {
41957
43213
  context,
41958
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
43214
+ errorCodes: ["400", "403", "404", "4XX", "5XX"],
41959
43215
  retryConfig: context.retryConfig,
41960
43216
  retryCodes: context.retryCodes
41961
43217
  });
@@ -41968,7 +43224,7 @@ async function $do13(client, request, options) {
41968
43224
  };
41969
43225
  const [result, raw] = await match(json(200, ListStreamsResponse$inboundSchema2, {
41970
43226
  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 });
43227
+ }), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41972
43228
  if (!result.ok) {
41973
43229
  return [haltIterator(result), {
41974
43230
  status: "complete",
@@ -42010,21 +43266,21 @@ var init_streamsListStreams = __esm(() => {
42010
43266
  });
42011
43267
 
42012
43268
  // src/mcp-server/tools/streamsListStreams.ts
42013
- var args13, tool$streamsListStreams;
43269
+ var args17, tool$streamsListStreams;
42014
43270
  var init_streamsListStreams2 = __esm(() => {
42015
43271
  init_streamsListStreams();
42016
43272
  init_operations();
42017
43273
  init_tools();
42018
- args13 = {
43274
+ args17 = {
42019
43275
  request: ListStreamsRequest$inboundSchema
42020
43276
  };
42021
43277
  tool$streamsListStreams = {
42022
43278
  name: "streams-list-streams",
42023
43279
  description: `List streams.`,
42024
- 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();
43280
+ scopes: ["read", "read", "read"],
43281
+ args: args17,
43282
+ tool: async (client, args18, ctx) => {
43283
+ const [result, apiCall] = await streamsListStreams(client, args18.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42028
43284
  if (!result.ok) {
42029
43285
  return {
42030
43286
  content: [{ type: "text", text: result.error.message }],
@@ -42039,9 +43295,9 @@ var init_streamsListStreams2 = __esm(() => {
42039
43295
 
42040
43296
  // src/funcs/streamsReconfigureStream.ts
42041
43297
  function streamsReconfigureStream(client, request, options) {
42042
- return new APIPromise($do14(client, request, options));
43298
+ return new APIPromise($do18(client, request, options));
42043
43299
  }
42044
- async function $do14(client, request, options) {
43300
+ async function $do18(client, request, options) {
42045
43301
  const parsed = safeParse(request, (value2) => ReconfigureStreamRequest$outboundSchema.parse(value2), "Input validation failed");
42046
43302
  if (!parsed.ok) {
42047
43303
  return [parsed, { status: "invalid" }];
@@ -42062,7 +43318,11 @@ async function $do14(client, request, options) {
42062
43318
  const path = pathToFunc("/streams/{stream}")(pathParams);
42063
43319
  const headers = new Headers(compactMap({
42064
43320
  "Content-Type": "application/json",
42065
- Accept: "application/json"
43321
+ Accept: "application/json",
43322
+ "s2-basin": encodeSimple("s2-basin", payload["s2-basin"], {
43323
+ explode: false,
43324
+ charEncoding: "none"
43325
+ })
42066
43326
  }));
42067
43327
  const secConfig = await extractSecurity(client._options.accessToken);
42068
43328
  const securityInput = secConfig == null ? {} : { accessToken: secConfig };
@@ -42091,7 +43351,7 @@ async function $do14(client, request, options) {
42091
43351
  const req = requestRes.value;
42092
43352
  const doResult = await client._do(req, {
42093
43353
  context,
42094
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
43354
+ errorCodes: ["400", "403", "404", "409", "4XX", "5XX"],
42095
43355
  retryConfig: context.retryConfig,
42096
43356
  retryCodes: context.retryCodes
42097
43357
  });
@@ -42102,7 +43362,7 @@ async function $do14(client, request, options) {
42102
43362
  const responseFields = {
42103
43363
  HttpMeta: { Response: response, Request: req }
42104
43364
  };
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 });
43365
+ const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42106
43366
  if (!result.ok) {
42107
43367
  return [result, { status: "complete", request: req, response }];
42108
43368
  }
@@ -42123,21 +43383,21 @@ var init_streamsReconfigureStream = __esm(() => {
42123
43383
  });
42124
43384
 
42125
43385
  // src/mcp-server/tools/streamsReconfigureStream.ts
42126
- var args14, tool$streamsReconfigureStream;
43386
+ var args18, tool$streamsReconfigureStream;
42127
43387
  var init_streamsReconfigureStream2 = __esm(() => {
42128
43388
  init_streamsReconfigureStream();
42129
43389
  init_operations();
42130
43390
  init_tools();
42131
- args14 = {
43391
+ args18 = {
42132
43392
  request: ReconfigureStreamRequest$inboundSchema
42133
43393
  };
42134
43394
  tool$streamsReconfigureStream = {
42135
43395
  name: "streams-reconfigure-stream",
42136
43396
  description: `Reconfigure a stream.`,
42137
- 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();
43397
+ scopes: ["write", "write", "write"],
43398
+ args: args18,
43399
+ tool: async (client, args19, ctx) => {
43400
+ const [result, apiCall] = await streamsReconfigureStream(client, args19.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42141
43401
  if (!result.ok) {
42142
43402
  return {
42143
43403
  content: [{ type: "text", text: result.error.message }],
@@ -42154,7 +43414,7 @@ var init_streamsReconfigureStream2 = __esm(() => {
42154
43414
  function createMCPServer(deps) {
42155
43415
  const server = new McpServer({
42156
43416
  name: "S2",
42157
- version: "0.11.2"
43417
+ version: "0.13.1"
42158
43418
  });
42159
43419
  const client = new S2Core({
42160
43420
  accessToken: deps.accessToken,
@@ -42172,15 +43432,19 @@ function createMCPServer(deps) {
42172
43432
  tool(tool$accessTokensIssueAccessToken);
42173
43433
  tool(tool$accessTokensRevokeAccessToken);
42174
43434
  tool(tool$basinsListBasins);
43435
+ tool(tool$basinsCreateBasin);
42175
43436
  tool(tool$basinsGetBasinConfig);
42176
43437
  tool(tool$basinsCreateOrReconfigureBasin);
42177
43438
  tool(tool$basinsDeleteBasin);
42178
43439
  tool(tool$basinsReconfigureBasin);
42179
43440
  tool(tool$streamsListStreams);
43441
+ tool(tool$streamsCreateStream);
42180
43442
  tool(tool$streamsGetStreamConfig);
42181
43443
  tool(tool$streamsCreateOrReconfigureStream);
42182
43444
  tool(tool$streamsDeleteStream);
42183
43445
  tool(tool$streamsReconfigureStream);
43446
+ tool(tool$recordsRead);
43447
+ tool(tool$recordsAppend);
42184
43448
  tool(tool$recordsCheckTail);
42185
43449
  return server;
42186
43450
  }
@@ -42192,13 +43456,17 @@ var init_server2 = __esm(() => {
42192
43456
  init_accessTokensIssueAccessToken2();
42193
43457
  init_accessTokensListAccessTokens2();
42194
43458
  init_accessTokensRevokeAccessToken2();
43459
+ init_basinsCreateBasin2();
42195
43460
  init_basinsCreateOrReconfigureBasin2();
42196
43461
  init_basinsDeleteBasin2();
42197
43462
  init_basinsGetBasinConfig2();
42198
43463
  init_basinsListBasins2();
42199
43464
  init_basinsReconfigureBasin2();
43465
+ init_recordsAppend2();
42200
43466
  init_recordsCheckTail2();
43467
+ init_recordsRead2();
42201
43468
  init_streamsCreateOrReconfigureStream2();
43469
+ init_streamsCreateStream2();
42202
43470
  init_streamsDeleteStream2();
42203
43471
  init_streamsGetStreamConfig2();
42204
43472
  init_streamsListStreams2();
@@ -42232,7 +43500,7 @@ async function startStdio(flags) {
42232
43500
  logger,
42233
43501
  allowedTools: flags.tool,
42234
43502
  scopes: flags.scope,
42235
- ...{ accessToken: flags["access-token"] },
43503
+ ...{ accessToken: flags["access-token"] ?? "" },
42236
43504
  serverURL: flags["server-url"],
42237
43505
  serverIdx: flags["server-index"]
42238
43506
  });
@@ -42251,7 +43519,7 @@ async function startSSE(flags) {
42251
43519
  logger,
42252
43520
  allowedTools: flags.tool,
42253
43521
  scopes: flags.scope,
42254
- ...{ accessToken: flags["access-token"] },
43522
+ ...{ accessToken: flags["access-token"] ?? "" },
42255
43523
  serverURL: flags["server-url"],
42256
43524
  serverIdx: flags["server-index"]
42257
43525
  });
@@ -43399,7 +44667,7 @@ var routes = rn({
43399
44667
  var app = Ve(routes, {
43400
44668
  name: "mcp",
43401
44669
  versionInfo: {
43402
- currentVersion: "0.11.2"
44670
+ currentVersion: "0.13.1"
43403
44671
  }
43404
44672
  });
43405
44673
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -43407,5 +44675,5 @@ export {
43407
44675
  app
43408
44676
  };
43409
44677
 
43410
- //# debugId=4930F833836E7A7764756E2164756E21
44678
+ //# debugId=D9CB368BB929347964756E2164756E21
43411
44679
  //# sourceMappingURL=mcp-server.js.map