@s2-dev/streamstore 0.11.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (569) hide show
  1. package/README.md +50 -1
  2. package/bin/mcp-server.js +1705 -192
  3. package/bin/mcp-server.js.map +73 -40
  4. package/dist/commonjs/funcs/accessTokensIssueAccessToken.js +2 -2
  5. package/dist/commonjs/funcs/accessTokensIssueAccessToken.js.map +1 -1
  6. package/dist/commonjs/funcs/accessTokensListAccessTokens.js +2 -2
  7. package/dist/commonjs/funcs/accessTokensRevokeAccessToken.js +2 -2
  8. package/dist/commonjs/funcs/basinsCreateBasin.d.ts +14 -0
  9. package/dist/commonjs/funcs/basinsCreateBasin.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/basinsCreateBasin.js +124 -0
  11. package/dist/commonjs/funcs/basinsCreateBasin.js.map +1 -0
  12. package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js +3 -3
  13. package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
  14. package/dist/commonjs/funcs/basinsDeleteBasin.d.ts +1 -1
  15. package/dist/commonjs/funcs/basinsDeleteBasin.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/basinsDeleteBasin.js +13 -2
  17. package/dist/commonjs/funcs/basinsDeleteBasin.js.map +1 -1
  18. package/dist/commonjs/funcs/basinsGetBasinConfig.js +2 -2
  19. package/dist/commonjs/funcs/basinsGetBasinConfig.js.map +1 -1
  20. package/dist/commonjs/funcs/basinsListBasins.js +2 -2
  21. package/dist/commonjs/funcs/basinsReconfigureBasin.js +2 -2
  22. package/dist/commonjs/funcs/basinsReconfigureBasin.js.map +1 -1
  23. package/dist/commonjs/funcs/recordsAppend.d.ts +18 -0
  24. package/dist/commonjs/funcs/recordsAppend.d.ts.map +1 -0
  25. package/dist/commonjs/funcs/recordsAppend.js +144 -0
  26. package/dist/commonjs/funcs/recordsAppend.js.map +1 -0
  27. package/dist/commonjs/funcs/recordsCheckTail.d.ts +18 -0
  28. package/dist/commonjs/funcs/recordsCheckTail.d.ts.map +1 -0
  29. package/dist/commonjs/funcs/recordsCheckTail.js +138 -0
  30. package/dist/commonjs/funcs/recordsCheckTail.js.map +1 -0
  31. package/dist/commonjs/funcs/recordsRead.d.ts +23 -0
  32. package/dist/commonjs/funcs/recordsRead.d.ts.map +1 -0
  33. package/dist/commonjs/funcs/recordsRead.js +157 -0
  34. package/dist/commonjs/funcs/recordsRead.js.map +1 -0
  35. package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.js +14 -3
  36. package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.js.map +1 -1
  37. package/dist/commonjs/funcs/streamsCreateStream.d.ts +14 -0
  38. package/dist/commonjs/funcs/streamsCreateStream.d.ts.map +1 -0
  39. package/dist/commonjs/funcs/streamsCreateStream.js +129 -0
  40. package/dist/commonjs/funcs/streamsCreateStream.js.map +1 -0
  41. package/dist/commonjs/funcs/streamsDeleteStream.d.ts +1 -1
  42. package/dist/commonjs/funcs/streamsDeleteStream.d.ts.map +1 -1
  43. package/dist/commonjs/funcs/streamsDeleteStream.js +2 -2
  44. package/dist/commonjs/funcs/streamsDeleteStream.js.map +1 -1
  45. package/dist/commonjs/funcs/streamsGetStreamConfig.js +13 -2
  46. package/dist/commonjs/funcs/streamsGetStreamConfig.js.map +1 -1
  47. package/dist/commonjs/funcs/streamsListStreams.js +2 -2
  48. package/dist/commonjs/funcs/streamsListStreams.js.map +1 -1
  49. package/dist/commonjs/funcs/streamsReconfigureStream.js +13 -2
  50. package/dist/commonjs/funcs/streamsReconfigureStream.js.map +1 -1
  51. package/dist/commonjs/lib/config.d.ts +3 -3
  52. package/dist/commonjs/lib/config.js +3 -3
  53. package/dist/commonjs/lib/event-streams.d.ts +17 -0
  54. package/dist/commonjs/lib/event-streams.d.ts.map +1 -0
  55. package/dist/commonjs/lib/event-streams.js +220 -0
  56. package/dist/commonjs/lib/event-streams.js.map +1 -0
  57. package/dist/commonjs/lib/matchers.d.ts.map +1 -1
  58. package/dist/commonjs/lib/matchers.js +4 -1
  59. package/dist/commonjs/lib/matchers.js.map +1 -1
  60. package/dist/commonjs/lib/sdks.d.ts +3 -1
  61. package/dist/commonjs/lib/sdks.d.ts.map +1 -1
  62. package/dist/commonjs/lib/sdks.js +6 -11
  63. package/dist/commonjs/lib/sdks.js.map +1 -1
  64. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  65. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  66. package/dist/commonjs/mcp-server/server.js +11 -1
  67. package/dist/commonjs/mcp-server/server.js.map +1 -1
  68. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.d.ts +8 -0
  69. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.d.ts.map +1 -0
  70. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.js +63 -0
  71. package/dist/commonjs/mcp-server/tools/basinsCreateBasin.js.map +1 -0
  72. package/dist/commonjs/mcp-server/tools/recordsAppend.d.ts +8 -0
  73. package/dist/commonjs/mcp-server/tools/recordsAppend.d.ts.map +1 -0
  74. package/dist/commonjs/mcp-server/tools/recordsAppend.js +65 -0
  75. package/dist/commonjs/mcp-server/tools/recordsAppend.js.map +1 -0
  76. package/dist/commonjs/mcp-server/tools/recordsCheckTail.d.ts +8 -0
  77. package/dist/commonjs/mcp-server/tools/recordsCheckTail.d.ts.map +1 -0
  78. package/dist/commonjs/mcp-server/tools/recordsCheckTail.js +65 -0
  79. package/dist/commonjs/mcp-server/tools/recordsCheckTail.js.map +1 -0
  80. package/dist/commonjs/mcp-server/tools/recordsRead.d.ts +8 -0
  81. package/dist/commonjs/mcp-server/tools/recordsRead.d.ts.map +1 -0
  82. package/dist/commonjs/mcp-server/tools/recordsRead.js +65 -0
  83. package/dist/commonjs/mcp-server/tools/recordsRead.js.map +1 -0
  84. package/dist/commonjs/mcp-server/tools/streamsCreateStream.d.ts +8 -0
  85. package/dist/commonjs/mcp-server/tools/streamsCreateStream.d.ts.map +1 -0
  86. package/dist/commonjs/mcp-server/tools/streamsCreateStream.js +63 -0
  87. package/dist/commonjs/mcp-server/tools/streamsCreateStream.js.map +1 -0
  88. package/dist/commonjs/models/components/accesstokeninfo.d.ts +2 -2
  89. package/dist/commonjs/models/components/appendack.d.ts +46 -0
  90. package/dist/commonjs/models/components/appendack.d.ts.map +1 -0
  91. package/dist/commonjs/models/components/appendack.js +74 -0
  92. package/dist/commonjs/models/components/appendack.js.map +1 -0
  93. package/dist/commonjs/models/components/appendinput.d.ts +46 -0
  94. package/dist/commonjs/models/components/appendinput.d.ts.map +1 -0
  95. package/dist/commonjs/models/components/appendinput.js +85 -0
  96. package/dist/commonjs/models/components/appendinput.js.map +1 -0
  97. package/dist/commonjs/models/components/appendrecord.d.ts +43 -0
  98. package/dist/commonjs/models/components/appendrecord.d.ts.map +1 -0
  99. package/dist/commonjs/models/components/appendrecord.js +74 -0
  100. package/dist/commonjs/models/components/appendrecord.js.map +1 -0
  101. package/dist/commonjs/models/components/basinconfig.d.ts +4 -4
  102. package/dist/commonjs/models/components/basinconfig.d.ts.map +1 -1
  103. package/dist/commonjs/models/components/basinconfig.js +4 -4
  104. package/dist/commonjs/models/components/basinconfig.js.map +1 -1
  105. package/dist/commonjs/models/components/createbasinrequest.d.ts +5 -0
  106. package/dist/commonjs/models/components/createbasinrequest.d.ts.map +1 -1
  107. package/dist/commonjs/models/components/createbasinrequest.js +2 -0
  108. package/dist/commonjs/models/components/createbasinrequest.js.map +1 -1
  109. package/dist/commonjs/models/components/createorreconfigurebasinrequest.d.ts +54 -0
  110. package/dist/commonjs/models/components/createorreconfigurebasinrequest.d.ts.map +1 -0
  111. package/dist/commonjs/models/components/createorreconfigurebasinrequest.js +96 -0
  112. package/dist/commonjs/models/components/createorreconfigurebasinrequest.js.map +1 -0
  113. package/dist/commonjs/models/components/createstreamrequest.d.ts +35 -0
  114. package/dist/commonjs/models/components/createstreamrequest.d.ts.map +1 -0
  115. package/dist/commonjs/models/components/createstreamrequest.js +72 -0
  116. package/dist/commonjs/models/components/createstreamrequest.js.map +1 -0
  117. package/dist/commonjs/models/components/header.d.ts +43 -0
  118. package/dist/commonjs/models/components/header.d.ts.map +1 -0
  119. package/dist/commonjs/models/components/header.js +72 -0
  120. package/dist/commonjs/models/components/header.js.map +1 -0
  121. package/dist/commonjs/models/components/index.d.ts +15 -0
  122. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  123. package/dist/commonjs/models/components/index.js +15 -0
  124. package/dist/commonjs/models/components/index.js.map +1 -1
  125. package/dist/commonjs/models/components/listaccesstokensresponse.d.ts +5 -5
  126. package/dist/commonjs/models/components/listaccesstokensresponse.d.ts.map +1 -1
  127. package/dist/commonjs/models/components/listaccesstokensresponse.js +4 -2
  128. package/dist/commonjs/models/components/listaccesstokensresponse.js.map +1 -1
  129. package/dist/commonjs/models/components/listbasinsresponse.d.ts +1 -1
  130. package/dist/commonjs/models/components/liststreamsresponse.d.ts +1 -1
  131. package/dist/commonjs/models/components/readbatch.d.ts +30 -0
  132. package/dist/commonjs/models/components/readbatch.d.ts.map +1 -0
  133. package/dist/commonjs/models/components/readbatch.js +70 -0
  134. package/dist/commonjs/models/components/readbatch.js.map +1 -0
  135. package/dist/commonjs/models/components/readevent.d.ts +107 -0
  136. package/dist/commonjs/models/components/readevent.d.ts.map +1 -0
  137. package/dist/commonjs/models/components/readevent.js +175 -0
  138. package/dist/commonjs/models/components/readevent.js.map +1 -0
  139. package/dist/commonjs/models/components/s2format.d.ts +28 -0
  140. package/dist/commonjs/models/components/s2format.d.ts.map +1 -0
  141. package/dist/commonjs/models/components/s2format.js +61 -0
  142. package/dist/commonjs/models/components/s2format.js.map +1 -0
  143. package/dist/commonjs/models/components/sequencedrecord.d.ts +45 -0
  144. package/dist/commonjs/models/components/sequencedrecord.d.ts.map +1 -0
  145. package/dist/commonjs/models/components/sequencedrecord.js +85 -0
  146. package/dist/commonjs/models/components/sequencedrecord.js.map +1 -0
  147. package/dist/commonjs/models/components/streamconfig.d.ts +3 -18
  148. package/dist/commonjs/models/components/streamconfig.d.ts.map +1 -1
  149. package/dist/commonjs/models/components/streamconfig.js +3 -8
  150. package/dist/commonjs/models/components/streamconfig.js.map +1 -1
  151. package/dist/commonjs/models/components/streaminfo.d.ts +2 -2
  152. package/dist/commonjs/models/components/streamposition.d.ts +43 -0
  153. package/dist/commonjs/models/components/streamposition.d.ts.map +1 -0
  154. package/dist/commonjs/models/components/streamposition.js +80 -0
  155. package/dist/commonjs/models/components/streamposition.js.map +1 -0
  156. package/dist/commonjs/models/components/streamreconfiguration.d.ts +3 -18
  157. package/dist/commonjs/models/components/streamreconfiguration.d.ts.map +1 -1
  158. package/dist/commonjs/models/components/streamreconfiguration.js +5 -8
  159. package/dist/commonjs/models/components/streamreconfiguration.js.map +1 -1
  160. package/dist/commonjs/models/components/tailresponse.d.ts +33 -0
  161. package/dist/commonjs/models/components/tailresponse.d.ts.map +1 -0
  162. package/dist/commonjs/models/components/tailresponse.js +70 -0
  163. package/dist/commonjs/models/components/tailresponse.js.map +1 -0
  164. package/dist/commonjs/models/components/timestampingconfig.d.ts +38 -0
  165. package/dist/commonjs/models/components/timestampingconfig.d.ts.map +1 -0
  166. package/dist/commonjs/models/components/timestampingconfig.js +72 -0
  167. package/dist/commonjs/models/components/timestampingconfig.js.map +1 -0
  168. package/dist/commonjs/models/components/timestampingmode.d.ts +31 -0
  169. package/dist/commonjs/models/components/timestampingmode.d.ts.map +1 -0
  170. package/dist/commonjs/models/components/timestampingmode.js +61 -0
  171. package/dist/commonjs/models/components/timestampingmode.js.map +1 -0
  172. package/dist/commonjs/models/components/timestampingreconfiguration.d.ts +35 -0
  173. package/dist/commonjs/models/components/timestampingreconfiguration.d.ts.map +1 -0
  174. package/dist/commonjs/models/components/timestampingreconfiguration.js +72 -0
  175. package/dist/commonjs/models/components/timestampingreconfiguration.js.map +1 -0
  176. package/dist/commonjs/models/errors/appendconditionfailed.d.ts +134 -0
  177. package/dist/commonjs/models/errors/appendconditionfailed.d.ts.map +1 -0
  178. package/dist/commonjs/models/errors/appendconditionfailed.js +171 -0
  179. package/dist/commonjs/models/errors/appendconditionfailed.js.map +1 -0
  180. package/dist/commonjs/models/errors/index.d.ts +3 -0
  181. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  182. package/dist/commonjs/models/errors/index.js +3 -0
  183. package/dist/commonjs/models/errors/index.js.map +1 -1
  184. package/dist/commonjs/models/errors/notfounderror.d.ts +31 -0
  185. package/dist/commonjs/models/errors/notfounderror.d.ts.map +1 -0
  186. package/dist/commonjs/models/errors/notfounderror.js +75 -0
  187. package/dist/commonjs/models/errors/notfounderror.js.map +1 -0
  188. package/dist/commonjs/models/errors/tailresponse.d.ts +38 -0
  189. package/dist/commonjs/models/errors/tailresponse.d.ts.map +1 -0
  190. package/dist/commonjs/models/errors/tailresponse.js +78 -0
  191. package/dist/commonjs/models/errors/tailresponse.js.map +1 -0
  192. package/dist/commonjs/models/operations/append.d.ts +48 -0
  193. package/dist/commonjs/models/operations/append.d.ts.map +1 -0
  194. package/dist/commonjs/models/operations/append.js +91 -0
  195. package/dist/commonjs/models/operations/append.js.map +1 -0
  196. package/dist/commonjs/models/operations/checktail.d.ts +36 -0
  197. package/dist/commonjs/models/operations/checktail.d.ts.map +1 -0
  198. package/dist/commonjs/models/operations/checktail.js +75 -0
  199. package/dist/commonjs/models/operations/checktail.js.map +1 -0
  200. package/dist/commonjs/models/operations/createorreconfigurebasin.d.ts +7 -7
  201. package/dist/commonjs/models/operations/createorreconfigurebasin.d.ts.map +1 -1
  202. package/dist/commonjs/models/operations/createorreconfigurebasin.js +6 -6
  203. package/dist/commonjs/models/operations/createorreconfigurebasin.js.map +1 -1
  204. package/dist/commonjs/models/operations/createorreconfigurestream.d.ts +3 -4
  205. package/dist/commonjs/models/operations/createorreconfigurestream.d.ts.map +1 -1
  206. package/dist/commonjs/models/operations/createorreconfigurestream.js +2 -2
  207. package/dist/commonjs/models/operations/createorreconfigurestream.js.map +1 -1
  208. package/dist/commonjs/models/operations/createstream.d.ts +2 -0
  209. package/dist/commonjs/models/operations/createstream.d.ts.map +1 -0
  210. package/dist/commonjs/models/operations/createstream.js +13 -0
  211. package/dist/commonjs/models/operations/createstream.js.map +1 -0
  212. package/dist/commonjs/models/operations/deletestream.d.ts +1 -2
  213. package/dist/commonjs/models/operations/deletestream.d.ts.map +1 -1
  214. package/dist/commonjs/models/operations/deletestream.js.map +1 -1
  215. package/dist/commonjs/models/operations/getstreamconfig.d.ts +1 -2
  216. package/dist/commonjs/models/operations/getstreamconfig.d.ts.map +1 -1
  217. package/dist/commonjs/models/operations/getstreamconfig.js.map +1 -1
  218. package/dist/commonjs/models/operations/index.d.ts +4 -0
  219. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  220. package/dist/commonjs/models/operations/index.js +4 -0
  221. package/dist/commonjs/models/operations/index.js.map +1 -1
  222. package/dist/commonjs/models/operations/listbasins.d.ts +1 -1
  223. package/dist/commonjs/models/operations/read.d.ts +93 -0
  224. package/dist/commonjs/models/operations/read.d.ts.map +1 -0
  225. package/dist/commonjs/models/operations/read.js +136 -0
  226. package/dist/commonjs/models/operations/read.js.map +1 -0
  227. package/dist/commonjs/models/operations/reconfigurestream.d.ts +1 -2
  228. package/dist/commonjs/models/operations/reconfigurestream.d.ts.map +1 -1
  229. package/dist/commonjs/models/operations/reconfigurestream.js.map +1 -1
  230. package/dist/commonjs/models/operations/revokeaccesstoken.d.ts +1 -1
  231. package/dist/commonjs/sdk/basins.d.ts +4 -0
  232. package/dist/commonjs/sdk/basins.d.ts.map +1 -1
  233. package/dist/commonjs/sdk/basins.js +7 -0
  234. package/dist/commonjs/sdk/basins.js.map +1 -1
  235. package/dist/commonjs/sdk/records.d.ts +31 -0
  236. package/dist/commonjs/sdk/records.d.ts.map +1 -0
  237. package/dist/commonjs/sdk/records.js +44 -0
  238. package/dist/commonjs/sdk/records.js.map +1 -0
  239. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  240. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  241. package/dist/commonjs/sdk/sdk.js +4 -0
  242. package/dist/commonjs/sdk/sdk.js.map +1 -1
  243. package/dist/commonjs/sdk/streams.d.ts +4 -0
  244. package/dist/commonjs/sdk/streams.d.ts.map +1 -1
  245. package/dist/commonjs/sdk/streams.js +7 -0
  246. package/dist/commonjs/sdk/streams.js.map +1 -1
  247. package/dist/esm/funcs/accessTokensIssueAccessToken.js +2 -2
  248. package/dist/esm/funcs/accessTokensIssueAccessToken.js.map +1 -1
  249. package/dist/esm/funcs/accessTokensListAccessTokens.js +2 -2
  250. package/dist/esm/funcs/accessTokensRevokeAccessToken.js +2 -2
  251. package/dist/esm/funcs/basinsCreateBasin.d.ts +14 -0
  252. package/dist/esm/funcs/basinsCreateBasin.d.ts.map +1 -0
  253. package/dist/esm/funcs/basinsCreateBasin.js +88 -0
  254. package/dist/esm/funcs/basinsCreateBasin.js.map +1 -0
  255. package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js +3 -3
  256. package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
  257. package/dist/esm/funcs/basinsDeleteBasin.d.ts +1 -1
  258. package/dist/esm/funcs/basinsDeleteBasin.d.ts.map +1 -1
  259. package/dist/esm/funcs/basinsDeleteBasin.js +13 -2
  260. package/dist/esm/funcs/basinsDeleteBasin.js.map +1 -1
  261. package/dist/esm/funcs/basinsGetBasinConfig.js +2 -2
  262. package/dist/esm/funcs/basinsGetBasinConfig.js.map +1 -1
  263. package/dist/esm/funcs/basinsListBasins.js +2 -2
  264. package/dist/esm/funcs/basinsReconfigureBasin.js +2 -2
  265. package/dist/esm/funcs/basinsReconfigureBasin.js.map +1 -1
  266. package/dist/esm/funcs/recordsAppend.d.ts +18 -0
  267. package/dist/esm/funcs/recordsAppend.d.ts.map +1 -0
  268. package/dist/esm/funcs/recordsAppend.js +108 -0
  269. package/dist/esm/funcs/recordsAppend.js.map +1 -0
  270. package/dist/esm/funcs/recordsCheckTail.d.ts +18 -0
  271. package/dist/esm/funcs/recordsCheckTail.d.ts.map +1 -0
  272. package/dist/esm/funcs/recordsCheckTail.js +102 -0
  273. package/dist/esm/funcs/recordsCheckTail.js.map +1 -0
  274. package/dist/esm/funcs/recordsRead.d.ts +23 -0
  275. package/dist/esm/funcs/recordsRead.d.ts.map +1 -0
  276. package/dist/esm/funcs/recordsRead.js +120 -0
  277. package/dist/esm/funcs/recordsRead.js.map +1 -0
  278. package/dist/esm/funcs/streamsCreateOrReconfigureStream.js +14 -3
  279. package/dist/esm/funcs/streamsCreateOrReconfigureStream.js.map +1 -1
  280. package/dist/esm/funcs/streamsCreateStream.d.ts +14 -0
  281. package/dist/esm/funcs/streamsCreateStream.d.ts.map +1 -0
  282. package/dist/esm/funcs/streamsCreateStream.js +93 -0
  283. package/dist/esm/funcs/streamsCreateStream.js.map +1 -0
  284. package/dist/esm/funcs/streamsDeleteStream.d.ts +1 -1
  285. package/dist/esm/funcs/streamsDeleteStream.d.ts.map +1 -1
  286. package/dist/esm/funcs/streamsDeleteStream.js +2 -2
  287. package/dist/esm/funcs/streamsDeleteStream.js.map +1 -1
  288. package/dist/esm/funcs/streamsGetStreamConfig.js +13 -2
  289. package/dist/esm/funcs/streamsGetStreamConfig.js.map +1 -1
  290. package/dist/esm/funcs/streamsListStreams.js +2 -2
  291. package/dist/esm/funcs/streamsListStreams.js.map +1 -1
  292. package/dist/esm/funcs/streamsReconfigureStream.js +13 -2
  293. package/dist/esm/funcs/streamsReconfigureStream.js.map +1 -1
  294. package/dist/esm/lib/config.d.ts +3 -3
  295. package/dist/esm/lib/config.js +3 -3
  296. package/dist/esm/lib/event-streams.d.ts +17 -0
  297. package/dist/esm/lib/event-streams.d.ts.map +1 -0
  298. package/dist/esm/lib/event-streams.js +215 -0
  299. package/dist/esm/lib/event-streams.js.map +1 -0
  300. package/dist/esm/lib/matchers.d.ts.map +1 -1
  301. package/dist/esm/lib/matchers.js +4 -1
  302. package/dist/esm/lib/matchers.js.map +1 -1
  303. package/dist/esm/lib/sdks.d.ts +3 -1
  304. package/dist/esm/lib/sdks.d.ts.map +1 -1
  305. package/dist/esm/lib/sdks.js +6 -11
  306. package/dist/esm/lib/sdks.js.map +1 -1
  307. package/dist/esm/mcp-server/mcp-server.js +1 -1
  308. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  309. package/dist/esm/mcp-server/server.js +11 -1
  310. package/dist/esm/mcp-server/server.js.map +1 -1
  311. package/dist/esm/mcp-server/tools/basinsCreateBasin.d.ts +8 -0
  312. package/dist/esm/mcp-server/tools/basinsCreateBasin.d.ts.map +1 -0
  313. package/dist/esm/mcp-server/tools/basinsCreateBasin.js +27 -0
  314. package/dist/esm/mcp-server/tools/basinsCreateBasin.js.map +1 -0
  315. package/dist/esm/mcp-server/tools/recordsAppend.d.ts +8 -0
  316. package/dist/esm/mcp-server/tools/recordsAppend.d.ts.map +1 -0
  317. package/dist/esm/mcp-server/tools/recordsAppend.js +29 -0
  318. package/dist/esm/mcp-server/tools/recordsAppend.js.map +1 -0
  319. package/dist/esm/mcp-server/tools/recordsCheckTail.d.ts +8 -0
  320. package/dist/esm/mcp-server/tools/recordsCheckTail.d.ts.map +1 -0
  321. package/dist/esm/mcp-server/tools/recordsCheckTail.js +29 -0
  322. package/dist/esm/mcp-server/tools/recordsCheckTail.js.map +1 -0
  323. package/dist/esm/mcp-server/tools/recordsRead.d.ts +8 -0
  324. package/dist/esm/mcp-server/tools/recordsRead.d.ts.map +1 -0
  325. package/dist/esm/mcp-server/tools/recordsRead.js +29 -0
  326. package/dist/esm/mcp-server/tools/recordsRead.js.map +1 -0
  327. package/dist/esm/mcp-server/tools/streamsCreateStream.d.ts +8 -0
  328. package/dist/esm/mcp-server/tools/streamsCreateStream.d.ts.map +1 -0
  329. package/dist/esm/mcp-server/tools/streamsCreateStream.js +27 -0
  330. package/dist/esm/mcp-server/tools/streamsCreateStream.js.map +1 -0
  331. package/dist/esm/models/components/accesstokeninfo.d.ts +2 -2
  332. package/dist/esm/models/components/appendack.d.ts +46 -0
  333. package/dist/esm/models/components/appendack.d.ts.map +1 -0
  334. package/dist/esm/models/components/appendack.js +36 -0
  335. package/dist/esm/models/components/appendack.js.map +1 -0
  336. package/dist/esm/models/components/appendinput.d.ts +46 -0
  337. package/dist/esm/models/components/appendinput.d.ts.map +1 -0
  338. package/dist/esm/models/components/appendinput.js +47 -0
  339. package/dist/esm/models/components/appendinput.js.map +1 -0
  340. package/dist/esm/models/components/appendrecord.d.ts +43 -0
  341. package/dist/esm/models/components/appendrecord.d.ts.map +1 -0
  342. package/dist/esm/models/components/appendrecord.js +36 -0
  343. package/dist/esm/models/components/appendrecord.js.map +1 -0
  344. package/dist/esm/models/components/basinconfig.d.ts +4 -4
  345. package/dist/esm/models/components/basinconfig.d.ts.map +1 -1
  346. package/dist/esm/models/components/basinconfig.js +4 -4
  347. package/dist/esm/models/components/basinconfig.js.map +1 -1
  348. package/dist/esm/models/components/createbasinrequest.d.ts +5 -0
  349. package/dist/esm/models/components/createbasinrequest.d.ts.map +1 -1
  350. package/dist/esm/models/components/createbasinrequest.js +2 -0
  351. package/dist/esm/models/components/createbasinrequest.js.map +1 -1
  352. package/dist/esm/models/components/createorreconfigurebasinrequest.d.ts +54 -0
  353. package/dist/esm/models/components/createorreconfigurebasinrequest.d.ts.map +1 -0
  354. package/dist/esm/models/components/createorreconfigurebasinrequest.js +56 -0
  355. package/dist/esm/models/components/createorreconfigurebasinrequest.js.map +1 -0
  356. package/dist/esm/models/components/createstreamrequest.d.ts +35 -0
  357. package/dist/esm/models/components/createstreamrequest.d.ts.map +1 -0
  358. package/dist/esm/models/components/createstreamrequest.js +34 -0
  359. package/dist/esm/models/components/createstreamrequest.js.map +1 -0
  360. package/dist/esm/models/components/header.d.ts +43 -0
  361. package/dist/esm/models/components/header.d.ts.map +1 -0
  362. package/dist/esm/models/components/header.js +34 -0
  363. package/dist/esm/models/components/header.js.map +1 -0
  364. package/dist/esm/models/components/index.d.ts +15 -0
  365. package/dist/esm/models/components/index.d.ts.map +1 -1
  366. package/dist/esm/models/components/index.js +15 -0
  367. package/dist/esm/models/components/index.js.map +1 -1
  368. package/dist/esm/models/components/listaccesstokensresponse.d.ts +5 -5
  369. package/dist/esm/models/components/listaccesstokensresponse.d.ts.map +1 -1
  370. package/dist/esm/models/components/listaccesstokensresponse.js +4 -2
  371. package/dist/esm/models/components/listaccesstokensresponse.js.map +1 -1
  372. package/dist/esm/models/components/listbasinsresponse.d.ts +1 -1
  373. package/dist/esm/models/components/liststreamsresponse.d.ts +1 -1
  374. package/dist/esm/models/components/readbatch.d.ts +30 -0
  375. package/dist/esm/models/components/readbatch.d.ts.map +1 -0
  376. package/dist/esm/models/components/readbatch.js +32 -0
  377. package/dist/esm/models/components/readbatch.js.map +1 -0
  378. package/dist/esm/models/components/readevent.d.ts +107 -0
  379. package/dist/esm/models/components/readevent.d.ts.map +1 -0
  380. package/dist/esm/models/components/readevent.js +131 -0
  381. package/dist/esm/models/components/readevent.js.map +1 -0
  382. package/dist/esm/models/components/s2format.d.ts +28 -0
  383. package/dist/esm/models/components/s2format.d.ts.map +1 -0
  384. package/dist/esm/models/components/s2format.js +25 -0
  385. package/dist/esm/models/components/s2format.js.map +1 -0
  386. package/dist/esm/models/components/sequencedrecord.d.ts +45 -0
  387. package/dist/esm/models/components/sequencedrecord.d.ts.map +1 -0
  388. package/dist/esm/models/components/sequencedrecord.js +47 -0
  389. package/dist/esm/models/components/sequencedrecord.js.map +1 -0
  390. package/dist/esm/models/components/streamconfig.d.ts +3 -18
  391. package/dist/esm/models/components/streamconfig.d.ts.map +1 -1
  392. package/dist/esm/models/components/streamconfig.js +3 -8
  393. package/dist/esm/models/components/streamconfig.js.map +1 -1
  394. package/dist/esm/models/components/streaminfo.d.ts +2 -2
  395. package/dist/esm/models/components/streamposition.d.ts +43 -0
  396. package/dist/esm/models/components/streamposition.d.ts.map +1 -0
  397. package/dist/esm/models/components/streamposition.js +42 -0
  398. package/dist/esm/models/components/streamposition.js.map +1 -0
  399. package/dist/esm/models/components/streamreconfiguration.d.ts +3 -18
  400. package/dist/esm/models/components/streamreconfiguration.d.ts.map +1 -1
  401. package/dist/esm/models/components/streamreconfiguration.js +5 -8
  402. package/dist/esm/models/components/streamreconfiguration.js.map +1 -1
  403. package/dist/esm/models/components/tailresponse.d.ts +33 -0
  404. package/dist/esm/models/components/tailresponse.d.ts.map +1 -0
  405. package/dist/esm/models/components/tailresponse.js +32 -0
  406. package/dist/esm/models/components/tailresponse.js.map +1 -0
  407. package/dist/esm/models/components/timestampingconfig.d.ts +38 -0
  408. package/dist/esm/models/components/timestampingconfig.d.ts.map +1 -0
  409. package/dist/esm/models/components/timestampingconfig.js +34 -0
  410. package/dist/esm/models/components/timestampingconfig.js.map +1 -0
  411. package/dist/esm/models/components/timestampingmode.d.ts +31 -0
  412. package/dist/esm/models/components/timestampingmode.d.ts.map +1 -0
  413. package/dist/esm/models/components/timestampingmode.js +25 -0
  414. package/dist/esm/models/components/timestampingmode.js.map +1 -0
  415. package/dist/esm/models/components/timestampingreconfiguration.d.ts +35 -0
  416. package/dist/esm/models/components/timestampingreconfiguration.d.ts.map +1 -0
  417. package/dist/esm/models/components/timestampingreconfiguration.js +34 -0
  418. package/dist/esm/models/components/timestampingreconfiguration.js.map +1 -0
  419. package/dist/esm/models/errors/appendconditionfailed.d.ts +134 -0
  420. package/dist/esm/models/errors/appendconditionfailed.d.ts.map +1 -0
  421. package/dist/esm/models/errors/appendconditionfailed.js +131 -0
  422. package/dist/esm/models/errors/appendconditionfailed.js.map +1 -0
  423. package/dist/esm/models/errors/index.d.ts +3 -0
  424. package/dist/esm/models/errors/index.d.ts.map +1 -1
  425. package/dist/esm/models/errors/index.js +3 -0
  426. package/dist/esm/models/errors/index.js.map +1 -1
  427. package/dist/esm/models/errors/notfounderror.d.ts +31 -0
  428. package/dist/esm/models/errors/notfounderror.d.ts.map +1 -0
  429. package/dist/esm/models/errors/notfounderror.js +38 -0
  430. package/dist/esm/models/errors/notfounderror.js.map +1 -0
  431. package/dist/esm/models/errors/tailresponse.d.ts +38 -0
  432. package/dist/esm/models/errors/tailresponse.d.ts.map +1 -0
  433. package/dist/esm/models/errors/tailresponse.js +41 -0
  434. package/dist/esm/models/errors/tailresponse.js.map +1 -0
  435. package/dist/esm/models/operations/append.d.ts +48 -0
  436. package/dist/esm/models/operations/append.d.ts.map +1 -0
  437. package/dist/esm/models/operations/append.js +53 -0
  438. package/dist/esm/models/operations/append.js.map +1 -0
  439. package/dist/esm/models/operations/checktail.d.ts +36 -0
  440. package/dist/esm/models/operations/checktail.d.ts.map +1 -0
  441. package/dist/esm/models/operations/checktail.js +37 -0
  442. package/dist/esm/models/operations/checktail.js.map +1 -0
  443. package/dist/esm/models/operations/createorreconfigurebasin.d.ts +7 -7
  444. package/dist/esm/models/operations/createorreconfigurebasin.d.ts.map +1 -1
  445. package/dist/esm/models/operations/createorreconfigurebasin.js +6 -6
  446. package/dist/esm/models/operations/createorreconfigurebasin.js.map +1 -1
  447. package/dist/esm/models/operations/createorreconfigurestream.d.ts +3 -4
  448. package/dist/esm/models/operations/createorreconfigurestream.d.ts.map +1 -1
  449. package/dist/esm/models/operations/createorreconfigurestream.js +2 -2
  450. package/dist/esm/models/operations/createorreconfigurestream.js.map +1 -1
  451. package/dist/esm/models/operations/createstream.d.ts +2 -0
  452. package/dist/esm/models/operations/createstream.d.ts.map +1 -0
  453. package/dist/esm/models/operations/createstream.js +10 -0
  454. package/dist/esm/models/operations/createstream.js.map +1 -0
  455. package/dist/esm/models/operations/deletestream.d.ts +1 -2
  456. package/dist/esm/models/operations/deletestream.d.ts.map +1 -1
  457. package/dist/esm/models/operations/deletestream.js.map +1 -1
  458. package/dist/esm/models/operations/getstreamconfig.d.ts +1 -2
  459. package/dist/esm/models/operations/getstreamconfig.d.ts.map +1 -1
  460. package/dist/esm/models/operations/getstreamconfig.js.map +1 -1
  461. package/dist/esm/models/operations/index.d.ts +4 -0
  462. package/dist/esm/models/operations/index.d.ts.map +1 -1
  463. package/dist/esm/models/operations/index.js +4 -0
  464. package/dist/esm/models/operations/index.js.map +1 -1
  465. package/dist/esm/models/operations/listbasins.d.ts +1 -1
  466. package/dist/esm/models/operations/read.d.ts +93 -0
  467. package/dist/esm/models/operations/read.d.ts.map +1 -0
  468. package/dist/esm/models/operations/read.js +96 -0
  469. package/dist/esm/models/operations/read.js.map +1 -0
  470. package/dist/esm/models/operations/reconfigurestream.d.ts +1 -2
  471. package/dist/esm/models/operations/reconfigurestream.d.ts.map +1 -1
  472. package/dist/esm/models/operations/reconfigurestream.js.map +1 -1
  473. package/dist/esm/models/operations/revokeaccesstoken.d.ts +1 -1
  474. package/dist/esm/sdk/basins.d.ts +4 -0
  475. package/dist/esm/sdk/basins.d.ts.map +1 -1
  476. package/dist/esm/sdk/basins.js +7 -0
  477. package/dist/esm/sdk/basins.js.map +1 -1
  478. package/dist/esm/sdk/records.d.ts +31 -0
  479. package/dist/esm/sdk/records.d.ts.map +1 -0
  480. package/dist/esm/sdk/records.js +39 -0
  481. package/dist/esm/sdk/records.js.map +1 -0
  482. package/dist/esm/sdk/sdk.d.ts +3 -0
  483. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  484. package/dist/esm/sdk/sdk.js +4 -0
  485. package/dist/esm/sdk/sdk.js.map +1 -1
  486. package/dist/esm/sdk/streams.d.ts +4 -0
  487. package/dist/esm/sdk/streams.d.ts.map +1 -1
  488. package/dist/esm/sdk/streams.js +7 -0
  489. package/dist/esm/sdk/streams.js.map +1 -1
  490. package/docs/sdks/accesstokens/README.md +3 -3
  491. package/docs/sdks/basins/README.md +86 -7
  492. package/docs/sdks/records/README.md +271 -0
  493. package/docs/sdks/streams/README.md +87 -7
  494. package/jsr.json +2 -1
  495. package/package.json +1 -1
  496. package/src/funcs/accessTokensIssueAccessToken.ts +2 -2
  497. package/src/funcs/accessTokensListAccessTokens.ts +2 -2
  498. package/src/funcs/accessTokensRevokeAccessToken.ts +2 -2
  499. package/src/funcs/basinsCreateBasin.ts +179 -0
  500. package/src/funcs/basinsCreateOrReconfigureBasin.ts +3 -3
  501. package/src/funcs/basinsDeleteBasin.ts +17 -2
  502. package/src/funcs/basinsGetBasinConfig.ts +2 -2
  503. package/src/funcs/basinsListBasins.ts +2 -2
  504. package/src/funcs/basinsReconfigureBasin.ts +2 -2
  505. package/src/funcs/recordsAppend.ts +205 -0
  506. package/src/funcs/recordsCheckTail.ts +195 -0
  507. package/src/funcs/recordsRead.ts +219 -0
  508. package/src/funcs/streamsCreateOrReconfigureStream.ts +14 -3
  509. package/src/funcs/streamsCreateStream.ts +185 -0
  510. package/src/funcs/streamsDeleteStream.ts +6 -2
  511. package/src/funcs/streamsGetStreamConfig.ts +13 -2
  512. package/src/funcs/streamsListStreams.ts +2 -2
  513. package/src/funcs/streamsReconfigureStream.ts +13 -2
  514. package/src/lib/config.ts +3 -3
  515. package/src/lib/event-streams.ts +264 -0
  516. package/src/lib/matchers.ts +4 -1
  517. package/src/lib/sdks.ts +11 -11
  518. package/src/mcp-server/mcp-server.ts +1 -1
  519. package/src/mcp-server/server.ts +11 -1
  520. package/src/mcp-server/tools/basinsCreateBasin.ts +36 -0
  521. package/src/mcp-server/tools/recordsAppend.ts +38 -0
  522. package/src/mcp-server/tools/recordsCheckTail.ts +38 -0
  523. package/src/mcp-server/tools/recordsRead.ts +38 -0
  524. package/src/mcp-server/tools/streamsCreateStream.ts +36 -0
  525. package/src/models/components/accesstokeninfo.ts +2 -2
  526. package/src/models/components/appendack.ts +88 -0
  527. package/src/models/components/appendinput.ts +99 -0
  528. package/src/models/components/appendrecord.ts +85 -0
  529. package/src/models/components/basinconfig.ts +8 -8
  530. package/src/models/components/createbasinrequest.ts +7 -0
  531. package/src/models/components/createorreconfigurebasinrequest.ts +138 -0
  532. package/src/models/components/createstreamrequest.ts +79 -0
  533. package/src/models/components/header.ts +75 -0
  534. package/src/models/components/index.ts +15 -0
  535. package/src/models/components/listaccesstokensresponse.ts +9 -7
  536. package/src/models/components/listbasinsresponse.ts +1 -1
  537. package/src/models/components/liststreamsresponse.ts +1 -1
  538. package/src/models/components/readbatch.ts +68 -0
  539. package/src/models/components/readevent.ts +243 -0
  540. package/src/models/components/s2format.ts +31 -0
  541. package/src/models/components/sequencedrecord.ts +100 -0
  542. package/src/models/components/streamconfig.ts +10 -26
  543. package/src/models/components/streaminfo.ts +2 -2
  544. package/src/models/components/streamposition.ts +87 -0
  545. package/src/models/components/streamreconfiguration.ts +12 -26
  546. package/src/models/components/tailresponse.ts +71 -0
  547. package/src/models/components/timestampingconfig.ts +81 -0
  548. package/src/models/components/timestampingmode.ts +34 -0
  549. package/src/models/components/timestampingreconfiguration.ts +80 -0
  550. package/src/models/errors/appendconditionfailed.ts +249 -0
  551. package/src/models/errors/index.ts +3 -0
  552. package/src/models/errors/notfounderror.ts +67 -0
  553. package/src/models/errors/tailresponse.ts +76 -0
  554. package/src/models/operations/append.ts +102 -0
  555. package/src/models/operations/checktail.ts +79 -0
  556. package/src/models/operations/createorreconfigurebasin.ts +23 -13
  557. package/src/models/operations/createorreconfigurestream.ts +5 -6
  558. package/src/models/operations/createstream.ts +10 -0
  559. package/src/models/operations/deletestream.ts +1 -2
  560. package/src/models/operations/getstreamconfig.ts +1 -2
  561. package/src/models/operations/index.ts +4 -0
  562. package/src/models/operations/listbasins.ts +1 -1
  563. package/src/models/operations/read.ts +195 -0
  564. package/src/models/operations/reconfigurestream.ts +1 -2
  565. package/src/models/operations/revokeaccesstoken.ts +1 -1
  566. package/src/sdk/basins.ts +15 -0
  567. package/src/sdk/records.ts +66 -0
  568. package/src/sdk/sdk.ts +6 -0
  569. package/src/sdk/streams.ts +15 -0
package/bin/mcp-server.js CHANGED
@@ -34173,9 +34173,9 @@ var init_config = __esm(() => {
34173
34173
  SDK_METADATA = {
34174
34174
  language: "typescript",
34175
34175
  openapiDocVersion: "1.0.0",
34176
- sdkVersion: "0.11.1",
34177
- genVersion: "2.593.4",
34178
- userAgent: "speakeasy-sdk/typescript 0.11.1 2.593.4 1.0.0 @s2-dev/streamstore"
34176
+ sdkVersion: "0.12.0",
34177
+ genVersion: "2.604.2",
34178
+ userAgent: "speakeasy-sdk/typescript 0.12.0 2.604.2 1.0.0 @s2-dev/streamstore"
34179
34179
  };
34180
34180
  });
34181
34181
 
@@ -34800,26 +34800,22 @@ class ClientSDK {
34800
34800
  }
34801
34801
  cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie;
34802
34802
  headers.set("cookie", cookie);
34803
- const userHeaders = new Headers(options?.fetchOptions?.headers);
34803
+ const userHeaders = new Headers(options?.headers ?? options?.fetchOptions?.headers);
34804
34804
  for (const [k2, v2] of userHeaders) {
34805
34805
  headers.set(k2, v2);
34806
34806
  }
34807
34807
  if (!isBrowserLike) {
34808
34808
  headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent);
34809
34809
  }
34810
- let fetchOptions = options?.fetchOptions;
34810
+ const fetchOptions = {
34811
+ ...options?.fetchOptions,
34812
+ ...options
34813
+ };
34811
34814
  if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
34812
34815
  const timeoutSignal = AbortSignal.timeout(conf.timeoutMs);
34813
- if (!fetchOptions) {
34814
- fetchOptions = { signal: timeoutSignal };
34815
- } else {
34816
- fetchOptions.signal = timeoutSignal;
34817
- }
34816
+ fetchOptions.signal = timeoutSignal;
34818
34817
  }
34819
34818
  if (conf.body instanceof ReadableStream) {
34820
- if (!fetchOptions) {
34821
- fetchOptions = {};
34822
- }
34823
34819
  Object.assign(fetchOptions, { duplex: "half" });
34824
34820
  }
34825
34821
  let input;
@@ -35182,6 +35178,208 @@ ${body}` : "";
35182
35178
  };
35183
35179
  });
35184
35180
 
35181
+ // src/lib/event-streams.ts
35182
+ function findBoundary(buffer, start) {
35183
+ const char1 = buffer[start];
35184
+ const char2 = buffer[start + 1];
35185
+ if (char1 == null || char2 == null || !NEWLINE_CHARS.has(char1) || !NEWLINE_CHARS.has(char2)) {
35186
+ return null;
35187
+ }
35188
+ for (const s of MESSAGE_BOUNDARIES) {
35189
+ const seq = peekSequence(start, buffer, s);
35190
+ if (seq != null) {
35191
+ return seq;
35192
+ }
35193
+ }
35194
+ return null;
35195
+ }
35196
+ function peekSequence(position, buffer, sequence) {
35197
+ if (sequence.length > buffer.length - position) {
35198
+ return null;
35199
+ }
35200
+ for (let i = 0;i < sequence.length; i++) {
35201
+ if (buffer[position + i] !== sequence[i]) {
35202
+ return null;
35203
+ }
35204
+ }
35205
+ return sequence;
35206
+ }
35207
+ function parseEvent(chunk, decoder) {
35208
+ if (!chunk.length) {
35209
+ return null;
35210
+ }
35211
+ const td = new TextDecoder;
35212
+ const raw = td.decode(chunk);
35213
+ const lines = raw.split(/\r?\n|\r/g);
35214
+ let publish = false;
35215
+ const rawEvent = {};
35216
+ for (const line of lines) {
35217
+ if (!line) {
35218
+ continue;
35219
+ }
35220
+ const delim = line.indexOf(":");
35221
+ if (delim === 0) {
35222
+ continue;
35223
+ }
35224
+ const field = delim > 0 ? line.substring(0, delim) : "";
35225
+ let value = delim > 0 ? line.substring(delim + 1) : "";
35226
+ if (value.charAt(0) === " ") {
35227
+ value = value.substring(1);
35228
+ }
35229
+ switch (field) {
35230
+ case "event": {
35231
+ publish = true;
35232
+ rawEvent.event = value;
35233
+ break;
35234
+ }
35235
+ case "data": {
35236
+ publish = true;
35237
+ rawEvent.data ??= "";
35238
+ rawEvent.data += value + `
35239
+ `;
35240
+ break;
35241
+ }
35242
+ case "id": {
35243
+ publish = true;
35244
+ rawEvent.id = value;
35245
+ break;
35246
+ }
35247
+ case "retry": {
35248
+ const r = parseInt(value, 10);
35249
+ if (!Number.isNaN(r)) {
35250
+ publish = true;
35251
+ rawEvent.retry = r;
35252
+ }
35253
+ break;
35254
+ }
35255
+ }
35256
+ }
35257
+ if (!publish) {
35258
+ return null;
35259
+ }
35260
+ if (rawEvent.data != null) {
35261
+ rawEvent.data = rawEvent.data.slice(0, -1);
35262
+ }
35263
+ return decoder(rawEvent);
35264
+ }
35265
+ function discardSentinel(stream, sentinel) {
35266
+ return new ReadableStream({
35267
+ async start(controller) {
35268
+ let buffer = new Uint8Array([]);
35269
+ let position = 0;
35270
+ let done = false;
35271
+ let discard = false;
35272
+ const rdr = stream.getReader();
35273
+ try {
35274
+ while (!done) {
35275
+ const result = await rdr.read();
35276
+ const value = result.value;
35277
+ done = done || result.done;
35278
+ if (discard) {
35279
+ continue;
35280
+ }
35281
+ if (typeof value === "undefined") {
35282
+ continue;
35283
+ }
35284
+ const newBuffer = new Uint8Array(buffer.length + value.length);
35285
+ newBuffer.set(buffer);
35286
+ newBuffer.set(value, buffer.length);
35287
+ buffer = newBuffer;
35288
+ for (let i = position;i < buffer.length; i++) {
35289
+ const boundary = findBoundary(buffer, i);
35290
+ if (boundary == null) {
35291
+ continue;
35292
+ }
35293
+ const start = position;
35294
+ const chunk = buffer.slice(start, i);
35295
+ position = i + boundary.length;
35296
+ const event = parseEvent(chunk, id);
35297
+ if (event?.data === sentinel) {
35298
+ controller.enqueue(buffer.slice(0, start));
35299
+ discard = true;
35300
+ } else {
35301
+ controller.enqueue(buffer.slice(0, position));
35302
+ buffer = buffer.slice(position);
35303
+ position = 0;
35304
+ }
35305
+ }
35306
+ }
35307
+ } catch (e) {
35308
+ controller.error(e);
35309
+ } finally {
35310
+ controller.close();
35311
+ rdr.releaseLock();
35312
+ }
35313
+ }
35314
+ });
35315
+ }
35316
+ function id(v2) {
35317
+ return v2;
35318
+ }
35319
+ var LF = 10, CR = 13, NEWLINE_CHARS, MESSAGE_BOUNDARIES, EventStream;
35320
+ var init_event_streams = __esm(() => {
35321
+ NEWLINE_CHARS = new Set([LF, CR]);
35322
+ MESSAGE_BOUNDARIES = [
35323
+ new Uint8Array([CR, LF, CR, LF]),
35324
+ new Uint8Array([CR, CR]),
35325
+ new Uint8Array([LF, LF])
35326
+ ];
35327
+ EventStream = class EventStream {
35328
+ stream;
35329
+ decoder;
35330
+ constructor(init) {
35331
+ this.stream = init.stream;
35332
+ this.decoder = init.decoder;
35333
+ }
35334
+ async* [Symbol.asyncIterator]() {
35335
+ const reader = this.stream.getReader();
35336
+ let buffer = new Uint8Array([]);
35337
+ let position = 0;
35338
+ try {
35339
+ while (true) {
35340
+ const { done, value } = await reader.read();
35341
+ if (done) {
35342
+ break;
35343
+ }
35344
+ const newBuffer = new Uint8Array(buffer.length + value.length);
35345
+ newBuffer.set(buffer);
35346
+ newBuffer.set(value, buffer.length);
35347
+ buffer = newBuffer;
35348
+ for (let i = position;i < buffer.length; i++) {
35349
+ const boundary = findBoundary(buffer, i);
35350
+ if (boundary == null) {
35351
+ continue;
35352
+ }
35353
+ const chunk = buffer.slice(position, i);
35354
+ position = i + boundary.length;
35355
+ const event = parseEvent(chunk, this.decoder);
35356
+ if (event != null) {
35357
+ yield event;
35358
+ }
35359
+ }
35360
+ if (position > 0) {
35361
+ buffer = buffer.slice(position);
35362
+ position = 0;
35363
+ }
35364
+ }
35365
+ if (buffer.length > 0) {
35366
+ const event = parseEvent(buffer, this.decoder);
35367
+ if (event != null) {
35368
+ yield event;
35369
+ }
35370
+ }
35371
+ } catch (e) {
35372
+ if (e instanceof Error && e.name === "AbortError") {
35373
+ return;
35374
+ }
35375
+ throw e;
35376
+ } finally {
35377
+ reader.releaseLock();
35378
+ }
35379
+ }
35380
+ };
35381
+ });
35382
+
35185
35383
  // src/models/errors/sdkvalidationerror.ts
35186
35384
  function formatZodError(err, level = 0) {
35187
35385
  let pre = " ".repeat(level);
@@ -35277,6 +35475,9 @@ function jsonErr(codes, schema, options) {
35277
35475
  function json(codes, schema, options) {
35278
35476
  return { ...options, enc: "json", codes, schema };
35279
35477
  }
35478
+ function sse(codes, schema, options) {
35479
+ return { ...options, enc: "sse", codes, schema };
35480
+ }
35280
35481
  function nil(codes, schema, options) {
35281
35482
  return { ...options, enc: "nil", codes, schema };
35282
35483
  }
@@ -35323,7 +35524,7 @@ function match(...matchers) {
35323
35524
  raw = await response.text();
35324
35525
  break;
35325
35526
  case "sse":
35326
- raw = response.body;
35527
+ raw = response.body && matcher.sseSentinel ? discardSentinel(response.body, matcher.sseSentinel) : response.body;
35327
35528
  break;
35328
35529
  case "nil":
35329
35530
  raw = await discardResponseBody(response);
@@ -35399,6 +35600,7 @@ async function discardResponseBody(res) {
35399
35600
  var DEFAULT_CONTENT_TYPES, headerValRE;
35400
35601
  var init_matchers = __esm(() => {
35401
35602
  init_apierror();
35603
+ init_event_streams();
35402
35604
  init_http();
35403
35605
  init_schemas();
35404
35606
  DEFAULT_CONTENT_TYPES = {
@@ -35749,6 +35951,125 @@ var init_accesstokeninfo = __esm(() => {
35749
35951
  })(AccessTokenInfo$ ||= {});
35750
35952
  });
35751
35953
 
35954
+ // src/models/components/streamposition.ts
35955
+ var StreamPosition$inboundSchema, StreamPosition$outboundSchema, StreamPosition$;
35956
+ var init_streamposition = __esm(() => {
35957
+ init_lib();
35958
+ init_primitives();
35959
+ StreamPosition$inboundSchema = objectType({
35960
+ seq_num: numberType().int(),
35961
+ timestamp: numberType().int()
35962
+ }).transform((v2) => {
35963
+ return remap(v2, {
35964
+ seq_num: "seqNum"
35965
+ });
35966
+ });
35967
+ StreamPosition$outboundSchema = objectType({
35968
+ seqNum: numberType().int(),
35969
+ timestamp: numberType().int()
35970
+ }).transform((v2) => {
35971
+ return remap(v2, {
35972
+ seqNum: "seq_num"
35973
+ });
35974
+ });
35975
+ ((StreamPosition$) => {
35976
+ StreamPosition$.inboundSchema = StreamPosition$inboundSchema;
35977
+ StreamPosition$.outboundSchema = StreamPosition$outboundSchema;
35978
+ })(StreamPosition$ ||= {});
35979
+ });
35980
+
35981
+ // src/models/components/appendack.ts
35982
+ var AppendAck$inboundSchema, AppendAck$outboundSchema, AppendAck$;
35983
+ var init_appendack = __esm(() => {
35984
+ init_lib();
35985
+ init_streamposition();
35986
+ AppendAck$inboundSchema = objectType({
35987
+ end: StreamPosition$inboundSchema,
35988
+ start: StreamPosition$inboundSchema,
35989
+ tail: StreamPosition$inboundSchema
35990
+ });
35991
+ AppendAck$outboundSchema = objectType({
35992
+ end: StreamPosition$outboundSchema,
35993
+ start: StreamPosition$outboundSchema,
35994
+ tail: StreamPosition$outboundSchema
35995
+ });
35996
+ ((AppendAck$) => {
35997
+ AppendAck$.inboundSchema = AppendAck$inboundSchema;
35998
+ AppendAck$.outboundSchema = AppendAck$outboundSchema;
35999
+ })(AppendAck$ ||= {});
36000
+ });
36001
+
36002
+ // src/models/components/header.ts
36003
+ var Header$inboundSchema, Header$outboundSchema, Header$;
36004
+ var init_header = __esm(() => {
36005
+ init_lib();
36006
+ Header$inboundSchema = objectType({
36007
+ name: stringType(),
36008
+ value: stringType()
36009
+ });
36010
+ Header$outboundSchema = objectType({
36011
+ name: stringType(),
36012
+ value: stringType()
36013
+ });
36014
+ ((Header$) => {
36015
+ Header$.inboundSchema = Header$inboundSchema;
36016
+ Header$.outboundSchema = Header$outboundSchema;
36017
+ })(Header$ ||= {});
36018
+ });
36019
+
36020
+ // src/models/components/appendrecord.ts
36021
+ var AppendRecord$inboundSchema, AppendRecord$outboundSchema, AppendRecord$;
36022
+ var init_appendrecord = __esm(() => {
36023
+ init_lib();
36024
+ init_header();
36025
+ AppendRecord$inboundSchema = objectType({
36026
+ body: stringType().optional(),
36027
+ headers: arrayType(Header$inboundSchema).optional(),
36028
+ timestamp: nullableType(numberType().int()).optional()
36029
+ });
36030
+ AppendRecord$outboundSchema = objectType({
36031
+ body: stringType().optional(),
36032
+ headers: arrayType(Header$outboundSchema).optional(),
36033
+ timestamp: nullableType(numberType().int()).optional()
36034
+ });
36035
+ ((AppendRecord$) => {
36036
+ AppendRecord$.inboundSchema = AppendRecord$inboundSchema;
36037
+ AppendRecord$.outboundSchema = AppendRecord$outboundSchema;
36038
+ })(AppendRecord$ ||= {});
36039
+ });
36040
+
36041
+ // src/models/components/appendinput.ts
36042
+ var AppendInput$inboundSchema, AppendInput$outboundSchema, AppendInput$;
36043
+ var init_appendinput = __esm(() => {
36044
+ init_lib();
36045
+ init_primitives();
36046
+ init_appendrecord();
36047
+ AppendInput$inboundSchema = objectType({
36048
+ fencing_token: nullableType(stringType()).optional(),
36049
+ match_seq_num: nullableType(numberType().int()).optional(),
36050
+ records: arrayType(AppendRecord$inboundSchema)
36051
+ }).transform((v2) => {
36052
+ return remap(v2, {
36053
+ fencing_token: "fencingToken",
36054
+ match_seq_num: "matchSeqNum"
36055
+ });
36056
+ });
36057
+ AppendInput$outboundSchema = objectType({
36058
+ fencingToken: nullableType(stringType()).optional(),
36059
+ matchSeqNum: nullableType(numberType().int()).optional(),
36060
+ records: arrayType(AppendRecord$outboundSchema)
36061
+ }).transform((v2) => {
36062
+ return remap(v2, {
36063
+ fencingToken: "fencing_token",
36064
+ matchSeqNum: "match_seq_num"
36065
+ });
36066
+ });
36067
+ ((AppendInput$) => {
36068
+ AppendInput$.inboundSchema = AppendInput$inboundSchema;
36069
+ AppendInput$.outboundSchema = AppendInput$outboundSchema;
36070
+ })(AppendInput$ ||= {});
36071
+ });
36072
+
35752
36073
  // src/models/components/retentionpolicy.ts
35753
36074
  var One$inboundSchema, One$outboundSchema, One$, RetentionPolicy$inboundSchema, RetentionPolicy$outboundSchema, RetentionPolicy$;
35754
36075
  var init_retentionpolicy = __esm(() => {
@@ -35787,6 +36108,42 @@ var init_storageclass = __esm(() => {
35787
36108
  })(StorageClass$ ||= {});
35788
36109
  });
35789
36110
 
36111
+ // src/models/components/timestampingmode.ts
36112
+ var TimestampingMode, TimestampingMode$inboundSchema, TimestampingMode$outboundSchema, TimestampingMode$;
36113
+ var init_timestampingmode = __esm(() => {
36114
+ init_lib();
36115
+ TimestampingMode = {
36116
+ ClientPrefer: "client-prefer",
36117
+ ClientRequire: "client-require",
36118
+ Arrival: "arrival"
36119
+ };
36120
+ TimestampingMode$inboundSchema = nativeEnumType(TimestampingMode);
36121
+ TimestampingMode$outboundSchema = TimestampingMode$inboundSchema;
36122
+ ((TimestampingMode$) => {
36123
+ TimestampingMode$.inboundSchema = TimestampingMode$inboundSchema;
36124
+ TimestampingMode$.outboundSchema = TimestampingMode$outboundSchema;
36125
+ })(TimestampingMode$ ||= {});
36126
+ });
36127
+
36128
+ // src/models/components/timestampingconfig.ts
36129
+ var TimestampingConfig$inboundSchema, TimestampingConfig$outboundSchema, TimestampingConfig$;
36130
+ var init_timestampingconfig = __esm(() => {
36131
+ init_lib();
36132
+ init_timestampingmode();
36133
+ TimestampingConfig$inboundSchema = objectType({
36134
+ mode: nullableType(TimestampingMode$inboundSchema).optional(),
36135
+ uncapped: nullableType(booleanType()).optional()
36136
+ });
36137
+ TimestampingConfig$outboundSchema = objectType({
36138
+ mode: nullableType(TimestampingMode$outboundSchema).optional(),
36139
+ uncapped: nullableType(booleanType()).optional()
36140
+ });
36141
+ ((TimestampingConfig$) => {
36142
+ TimestampingConfig$.inboundSchema = TimestampingConfig$inboundSchema;
36143
+ TimestampingConfig$.outboundSchema = TimestampingConfig$outboundSchema;
36144
+ })(TimestampingConfig$ ||= {});
36145
+ });
36146
+
35790
36147
  // src/models/components/streamconfig.ts
35791
36148
  var StreamConfig$inboundSchema, StreamConfig$outboundSchema, StreamConfig$;
35792
36149
  var init_streamconfig = __esm(() => {
@@ -35794,30 +36151,25 @@ var init_streamconfig = __esm(() => {
35794
36151
  init_primitives();
35795
36152
  init_retentionpolicy();
35796
36153
  init_storageclass();
36154
+ init_timestampingconfig();
35797
36155
  StreamConfig$inboundSchema = objectType({
35798
- require_client_timestamps: nullableType(booleanType()).optional(),
35799
36156
  retention_policy: nullableType(RetentionPolicy$inboundSchema).optional(),
35800
36157
  storage_class: nullableType(StorageClass$inboundSchema).optional(),
35801
- uncapped_client_timestamps: nullableType(booleanType()).optional()
36158
+ timestamping: nullableType(TimestampingConfig$inboundSchema).optional()
35802
36159
  }).transform((v2) => {
35803
36160
  return remap(v2, {
35804
- require_client_timestamps: "requireClientTimestamps",
35805
36161
  retention_policy: "retentionPolicy",
35806
- storage_class: "storageClass",
35807
- uncapped_client_timestamps: "uncappedClientTimestamps"
36162
+ storage_class: "storageClass"
35808
36163
  });
35809
36164
  });
35810
36165
  StreamConfig$outboundSchema = objectType({
35811
- requireClientTimestamps: nullableType(booleanType()).optional(),
35812
36166
  retentionPolicy: nullableType(RetentionPolicy$outboundSchema).optional(),
35813
36167
  storageClass: nullableType(StorageClass$outboundSchema).optional(),
35814
- uncappedClientTimestamps: nullableType(booleanType()).optional()
36168
+ timestamping: nullableType(TimestampingConfig$outboundSchema).optional()
35815
36169
  }).transform((v2) => {
35816
36170
  return remap(v2, {
35817
- requireClientTimestamps: "require_client_timestamps",
35818
36171
  retentionPolicy: "retention_policy",
35819
- storageClass: "storage_class",
35820
- uncappedClientTimestamps: "uncapped_client_timestamps"
36172
+ storageClass: "storage_class"
35821
36173
  });
35822
36174
  });
35823
36175
  ((StreamConfig$) => {
@@ -35833,8 +36185,8 @@ var init_basinconfig = __esm(() => {
35833
36185
  init_primitives();
35834
36186
  init_streamconfig();
35835
36187
  BasinConfig$inboundSchema = objectType({
35836
- create_stream_on_append: nullableType(booleanType()).optional(),
35837
- create_stream_on_read: nullableType(booleanType()).optional(),
36188
+ create_stream_on_append: booleanType().optional(),
36189
+ create_stream_on_read: booleanType().optional(),
35838
36190
  default_stream_config: nullableType(StreamConfig$inboundSchema).optional()
35839
36191
  }).transform((v2) => {
35840
36192
  return remap(v2, {
@@ -35844,8 +36196,8 @@ var init_basinconfig = __esm(() => {
35844
36196
  });
35845
36197
  });
35846
36198
  BasinConfig$outboundSchema = objectType({
35847
- createStreamOnAppend: nullableType(booleanType()).optional(),
35848
- createStreamOnRead: nullableType(booleanType()).optional(),
36199
+ createStreamOnAppend: booleanType().optional(),
36200
+ createStreamOnRead: booleanType().optional(),
35849
36201
  defaultStreamConfig: nullableType(StreamConfig$outboundSchema).optional()
35850
36202
  }).transform((v2) => {
35851
36203
  return remap(v2, {
@@ -35914,6 +36266,25 @@ var init_basininfo = __esm(() => {
35914
36266
  })(BasinInfo$ ||= {});
35915
36267
  });
35916
36268
 
36269
+ // src/models/components/timestampingreconfiguration.ts
36270
+ var TimestampingReconfiguration$inboundSchema, TimestampingReconfiguration$outboundSchema, TimestampingReconfiguration$;
36271
+ var init_timestampingreconfiguration = __esm(() => {
36272
+ init_lib();
36273
+ init_timestampingmode();
36274
+ TimestampingReconfiguration$inboundSchema = objectType({
36275
+ mode: nullableType(TimestampingMode$inboundSchema).optional(),
36276
+ uncapped: nullableType(booleanType()).optional()
36277
+ });
36278
+ TimestampingReconfiguration$outboundSchema = objectType({
36279
+ mode: nullableType(TimestampingMode$outboundSchema).optional(),
36280
+ uncapped: nullableType(booleanType()).optional()
36281
+ });
36282
+ ((TimestampingReconfiguration$) => {
36283
+ TimestampingReconfiguration$.inboundSchema = TimestampingReconfiguration$inboundSchema;
36284
+ TimestampingReconfiguration$.outboundSchema = TimestampingReconfiguration$outboundSchema;
36285
+ })(TimestampingReconfiguration$ ||= {});
36286
+ });
36287
+
35917
36288
  // src/models/components/streamreconfiguration.ts
35918
36289
  var StreamReconfiguration$inboundSchema, StreamReconfiguration$outboundSchema, StreamReconfiguration$;
35919
36290
  var init_streamreconfiguration = __esm(() => {
@@ -35921,30 +36292,25 @@ var init_streamreconfiguration = __esm(() => {
35921
36292
  init_primitives();
35922
36293
  init_retentionpolicy();
35923
36294
  init_storageclass();
36295
+ init_timestampingreconfiguration();
35924
36296
  StreamReconfiguration$inboundSchema = objectType({
35925
- require_client_timestamps: nullableType(booleanType()).optional(),
35926
36297
  retention_policy: nullableType(RetentionPolicy$inboundSchema).optional(),
35927
36298
  storage_class: nullableType(StorageClass$inboundSchema).optional(),
35928
- uncapped_client_timestamps: nullableType(booleanType()).optional()
36299
+ timestamping: nullableType(TimestampingReconfiguration$inboundSchema).optional()
35929
36300
  }).transform((v2) => {
35930
36301
  return remap(v2, {
35931
- require_client_timestamps: "requireClientTimestamps",
35932
36302
  retention_policy: "retentionPolicy",
35933
- storage_class: "storageClass",
35934
- uncapped_client_timestamps: "uncappedClientTimestamps"
36303
+ storage_class: "storageClass"
35935
36304
  });
35936
36305
  });
35937
36306
  StreamReconfiguration$outboundSchema = objectType({
35938
- requireClientTimestamps: nullableType(booleanType()).optional(),
35939
36307
  retentionPolicy: nullableType(RetentionPolicy$outboundSchema).optional(),
35940
36308
  storageClass: nullableType(StorageClass$outboundSchema).optional(),
35941
- uncappedClientTimestamps: nullableType(booleanType()).optional()
36309
+ timestamping: nullableType(TimestampingReconfiguration$outboundSchema).optional()
35942
36310
  }).transform((v2) => {
35943
36311
  return remap(v2, {
35944
- requireClientTimestamps: "require_client_timestamps",
35945
36312
  retentionPolicy: "retention_policy",
35946
- storageClass: "storage_class",
35947
- uncappedClientTimestamps: "uncapped_client_timestamps"
36313
+ storageClass: "storage_class"
35948
36314
  });
35949
36315
  });
35950
36316
  ((StreamReconfiguration$) => {
@@ -36000,10 +36366,12 @@ var init_createbasinrequest = __esm(() => {
36000
36366
  Scope$.outboundSchema = Scope$outboundSchema;
36001
36367
  })(Scope$ ||= {});
36002
36368
  CreateBasinRequest$inboundSchema = objectType({
36369
+ basin: stringType(),
36003
36370
  config: nullableType(BasinConfig$inboundSchema).optional(),
36004
36371
  scope: BasinScope$inboundSchema.optional()
36005
36372
  });
36006
36373
  CreateBasinRequest$outboundSchema = objectType({
36374
+ basin: stringType(),
36007
36375
  config: nullableType(BasinConfig$outboundSchema).optional(),
36008
36376
  scope: BasinScope$outboundSchema.optional()
36009
36377
  });
@@ -36013,6 +36381,51 @@ var init_createbasinrequest = __esm(() => {
36013
36381
  })(CreateBasinRequest$ ||= {});
36014
36382
  });
36015
36383
 
36384
+ // src/models/components/createorreconfigurebasinrequest.ts
36385
+ var CreateOrReconfigureBasinRequestScope$inboundSchema, CreateOrReconfigureBasinRequestScope$outboundSchema, CreateOrReconfigureBasinRequestScope$, CreateOrReconfigureBasinRequest$inboundSchema, CreateOrReconfigureBasinRequest$outboundSchema, CreateOrReconfigureBasinRequest$;
36386
+ var init_createorreconfigurebasinrequest = __esm(() => {
36387
+ init_lib();
36388
+ init_basinconfig();
36389
+ init_basinscope();
36390
+ CreateOrReconfigureBasinRequestScope$inboundSchema = BasinScope$inboundSchema;
36391
+ CreateOrReconfigureBasinRequestScope$outboundSchema = BasinScope$outboundSchema;
36392
+ ((CreateOrReconfigureBasinRequestScope$) => {
36393
+ CreateOrReconfigureBasinRequestScope$.inboundSchema = CreateOrReconfigureBasinRequestScope$inboundSchema;
36394
+ CreateOrReconfigureBasinRequestScope$.outboundSchema = CreateOrReconfigureBasinRequestScope$outboundSchema;
36395
+ })(CreateOrReconfigureBasinRequestScope$ ||= {});
36396
+ CreateOrReconfigureBasinRequest$inboundSchema = objectType({
36397
+ config: nullableType(BasinConfig$inboundSchema).optional(),
36398
+ scope: BasinScope$inboundSchema.optional()
36399
+ });
36400
+ CreateOrReconfigureBasinRequest$outboundSchema = objectType({
36401
+ config: nullableType(BasinConfig$outboundSchema).optional(),
36402
+ scope: BasinScope$outboundSchema.optional()
36403
+ });
36404
+ ((CreateOrReconfigureBasinRequest$) => {
36405
+ CreateOrReconfigureBasinRequest$.inboundSchema = CreateOrReconfigureBasinRequest$inboundSchema;
36406
+ CreateOrReconfigureBasinRequest$.outboundSchema = CreateOrReconfigureBasinRequest$outboundSchema;
36407
+ })(CreateOrReconfigureBasinRequest$ ||= {});
36408
+ });
36409
+
36410
+ // src/models/components/createstreamrequest.ts
36411
+ var CreateStreamRequest$inboundSchema, CreateStreamRequest$outboundSchema, CreateStreamRequest$;
36412
+ var init_createstreamrequest = __esm(() => {
36413
+ init_lib();
36414
+ init_streamconfig();
36415
+ CreateStreamRequest$inboundSchema = objectType({
36416
+ config: nullableType(StreamConfig$inboundSchema).optional(),
36417
+ stream: stringType()
36418
+ });
36419
+ CreateStreamRequest$outboundSchema = objectType({
36420
+ config: nullableType(StreamConfig$outboundSchema).optional(),
36421
+ stream: stringType()
36422
+ });
36423
+ ((CreateStreamRequest$) => {
36424
+ CreateStreamRequest$.inboundSchema = CreateStreamRequest$inboundSchema;
36425
+ CreateStreamRequest$.outboundSchema = CreateStreamRequest$outboundSchema;
36426
+ })(CreateStreamRequest$ ||= {});
36427
+ });
36428
+
36016
36429
  // src/models/components/issueaccesstokenresponse.ts
36017
36430
  var IssueAccessTokenResponse$inboundSchema, IssueAccessTokenResponse$outboundSchema, IssueAccessTokenResponse$;
36018
36431
  var init_issueaccesstokenresponse = __esm(() => {
@@ -36045,18 +36458,20 @@ var init_listaccesstokensresponse = __esm(() => {
36045
36458
  init_primitives();
36046
36459
  init_accesstokeninfo();
36047
36460
  ListAccessTokensResponse$inboundSchema = objectType({
36048
- has_more: booleanType(),
36049
- tokens: arrayType(AccessTokenInfo$inboundSchema)
36461
+ access_tokens: arrayType(AccessTokenInfo$inboundSchema),
36462
+ has_more: booleanType()
36050
36463
  }).transform((v2) => {
36051
36464
  return remap(v2, {
36465
+ access_tokens: "accessTokens",
36052
36466
  has_more: "hasMore"
36053
36467
  });
36054
36468
  });
36055
36469
  ListAccessTokensResponse$outboundSchema = objectType({
36056
- hasMore: booleanType(),
36057
- tokens: arrayType(AccessTokenInfo$outboundSchema)
36470
+ accessTokens: arrayType(AccessTokenInfo$outboundSchema),
36471
+ hasMore: booleanType()
36058
36472
  }).transform((v2) => {
36059
36473
  return remap(v2, {
36474
+ accessTokens: "access_tokens",
36060
36475
  hasMore: "has_more"
36061
36476
  });
36062
36477
  });
@@ -36153,6 +36568,138 @@ var init_liststreamsresponse = __esm(() => {
36153
36568
  })(ListStreamsResponse$ ||= {});
36154
36569
  });
36155
36570
 
36571
+ // src/models/components/sequencedrecord.ts
36572
+ var SequencedRecord$inboundSchema, SequencedRecord$outboundSchema, SequencedRecord$;
36573
+ var init_sequencedrecord = __esm(() => {
36574
+ init_lib();
36575
+ init_primitives();
36576
+ init_header();
36577
+ SequencedRecord$inboundSchema = objectType({
36578
+ body: stringType().optional(),
36579
+ headers: arrayType(Header$inboundSchema).optional(),
36580
+ seq_num: numberType().int(),
36581
+ timestamp: numberType().int()
36582
+ }).transform((v2) => {
36583
+ return remap(v2, {
36584
+ seq_num: "seqNum"
36585
+ });
36586
+ });
36587
+ SequencedRecord$outboundSchema = objectType({
36588
+ body: stringType().optional(),
36589
+ headers: arrayType(Header$outboundSchema).optional(),
36590
+ seqNum: numberType().int(),
36591
+ timestamp: numberType().int()
36592
+ }).transform((v2) => {
36593
+ return remap(v2, {
36594
+ seqNum: "seq_num"
36595
+ });
36596
+ });
36597
+ ((SequencedRecord$) => {
36598
+ SequencedRecord$.inboundSchema = SequencedRecord$inboundSchema;
36599
+ SequencedRecord$.outboundSchema = SequencedRecord$outboundSchema;
36600
+ })(SequencedRecord$ ||= {});
36601
+ });
36602
+
36603
+ // src/models/components/readbatch.ts
36604
+ var ReadBatch$inboundSchema, ReadBatch$outboundSchema, ReadBatch$;
36605
+ var init_readbatch = __esm(() => {
36606
+ init_lib();
36607
+ init_sequencedrecord();
36608
+ ReadBatch$inboundSchema = objectType({
36609
+ records: arrayType(SequencedRecord$inboundSchema)
36610
+ });
36611
+ ReadBatch$outboundSchema = objectType({
36612
+ records: arrayType(SequencedRecord$outboundSchema)
36613
+ });
36614
+ ((ReadBatch$) => {
36615
+ ReadBatch$.inboundSchema = ReadBatch$inboundSchema;
36616
+ ReadBatch$.outboundSchema = ReadBatch$outboundSchema;
36617
+ })(ReadBatch$ ||= {});
36618
+ });
36619
+
36620
+ // src/models/components/readevent.ts
36621
+ var Ping$inboundSchema, Ping$outboundSchema, Ping$, ErrorT$inboundSchema, ErrorT$outboundSchema, ErrorT$, Batch$inboundSchema, Batch$outboundSchema, Batch$, ReadEvent$inboundSchema, ReadEvent$outboundSchema, ReadEvent$;
36622
+ var init_readevent = __esm(() => {
36623
+ init_lib();
36624
+ init_readbatch();
36625
+ Ping$inboundSchema = objectType({
36626
+ data: stringType(),
36627
+ event: stringType()
36628
+ });
36629
+ Ping$outboundSchema = objectType({
36630
+ data: stringType(),
36631
+ event: stringType()
36632
+ });
36633
+ ((Ping$) => {
36634
+ Ping$.inboundSchema = Ping$inboundSchema;
36635
+ Ping$.outboundSchema = Ping$outboundSchema;
36636
+ })(Ping$ ||= {});
36637
+ ErrorT$inboundSchema = objectType({
36638
+ data: stringType(),
36639
+ event: stringType()
36640
+ });
36641
+ ErrorT$outboundSchema = objectType({
36642
+ data: stringType(),
36643
+ event: stringType()
36644
+ });
36645
+ ((ErrorT$) => {
36646
+ ErrorT$.inboundSchema = ErrorT$inboundSchema;
36647
+ ErrorT$.outboundSchema = ErrorT$outboundSchema;
36648
+ })(ErrorT$ ||= {});
36649
+ Batch$inboundSchema = objectType({
36650
+ data: stringType().transform((v2, ctx) => {
36651
+ try {
36652
+ return JSON.parse(v2);
36653
+ } catch (err) {
36654
+ ctx.addIssue({
36655
+ code: ZodIssueCode.custom,
36656
+ message: `malformed json: ${err}`
36657
+ });
36658
+ return NEVER;
36659
+ }
36660
+ }).pipe(ReadBatch$inboundSchema),
36661
+ event: stringType()
36662
+ });
36663
+ Batch$outboundSchema = objectType({
36664
+ data: ReadBatch$outboundSchema,
36665
+ event: stringType()
36666
+ });
36667
+ ((Batch$) => {
36668
+ Batch$.inboundSchema = Batch$inboundSchema;
36669
+ Batch$.outboundSchema = Batch$outboundSchema;
36670
+ })(Batch$ ||= {});
36671
+ ReadEvent$inboundSchema = unionType([
36672
+ lazyType(() => Batch$inboundSchema),
36673
+ lazyType(() => ErrorT$inboundSchema),
36674
+ lazyType(() => Ping$inboundSchema)
36675
+ ]);
36676
+ ReadEvent$outboundSchema = unionType([
36677
+ lazyType(() => Batch$outboundSchema),
36678
+ lazyType(() => ErrorT$outboundSchema),
36679
+ lazyType(() => Ping$outboundSchema)
36680
+ ]);
36681
+ ((ReadEvent$) => {
36682
+ ReadEvent$.inboundSchema = ReadEvent$inboundSchema;
36683
+ ReadEvent$.outboundSchema = ReadEvent$outboundSchema;
36684
+ })(ReadEvent$ ||= {});
36685
+ });
36686
+
36687
+ // src/models/components/s2format.ts
36688
+ var S2Format, S2Format$inboundSchema, S2Format$outboundSchema, S2Format$;
36689
+ var init_s2format = __esm(() => {
36690
+ init_lib();
36691
+ S2Format = {
36692
+ Json: "json",
36693
+ JsonBinsafe: "json-binsafe"
36694
+ };
36695
+ S2Format$inboundSchema = nativeEnumType(S2Format);
36696
+ S2Format$outboundSchema = S2Format$inboundSchema;
36697
+ ((S2Format$) => {
36698
+ S2Format$.inboundSchema = S2Format$inboundSchema;
36699
+ S2Format$.outboundSchema = S2Format$outboundSchema;
36700
+ })(S2Format$ ||= {});
36701
+ });
36702
+
36156
36703
  // src/models/components/security.ts
36157
36704
  var Security$inboundSchema, Security$outboundSchema, Security$;
36158
36705
  var init_security2 = __esm(() => {
@@ -36178,30 +36725,138 @@ var init_security2 = __esm(() => {
36178
36725
  })(Security$ ||= {});
36179
36726
  });
36180
36727
 
36728
+ // src/models/components/tailresponse.ts
36729
+ var TailResponse$inboundSchema, TailResponse$outboundSchema, TailResponse$;
36730
+ var init_tailresponse = __esm(() => {
36731
+ init_lib();
36732
+ init_streamposition();
36733
+ TailResponse$inboundSchema = objectType({
36734
+ tail: StreamPosition$inboundSchema
36735
+ });
36736
+ TailResponse$outboundSchema = objectType({
36737
+ tail: StreamPosition$outboundSchema
36738
+ });
36739
+ ((TailResponse$) => {
36740
+ TailResponse$.inboundSchema = TailResponse$inboundSchema;
36741
+ TailResponse$.outboundSchema = TailResponse$outboundSchema;
36742
+ })(TailResponse$ ||= {});
36743
+ });
36744
+
36181
36745
  // src/models/components/index.ts
36182
36746
  var init_components = __esm(() => {
36183
36747
  init_accesstokeninfo();
36184
36748
  init_accesstokenscope();
36749
+ init_appendack();
36750
+ init_appendinput();
36751
+ init_appendrecord();
36185
36752
  init_basinconfig();
36186
36753
  init_basininfo();
36187
36754
  init_basinreconfiguration();
36188
36755
  init_basinscope();
36189
36756
  init_basinstate();
36190
36757
  init_createbasinrequest();
36758
+ init_createorreconfigurebasinrequest();
36759
+ init_createstreamrequest();
36760
+ init_header();
36191
36761
  init_issueaccesstokenresponse();
36192
36762
  init_listaccesstokensresponse();
36193
36763
  init_listbasinsresponse();
36194
36764
  init_liststreamsresponse();
36195
36765
  init_operation();
36196
36766
  init_permittedoperationgroups();
36767
+ init_readbatch();
36768
+ init_readevent();
36197
36769
  init_readwritepermissions();
36198
36770
  init_resourceset();
36199
36771
  init_retentionpolicy();
36772
+ init_s2format();
36200
36773
  init_security2();
36774
+ init_sequencedrecord();
36201
36775
  init_storageclass();
36202
36776
  init_streamconfig();
36203
36777
  init_streaminfo();
36778
+ init_streamposition();
36204
36779
  init_streamreconfiguration();
36780
+ init_tailresponse();
36781
+ init_timestampingconfig();
36782
+ init_timestampingmode();
36783
+ init_timestampingreconfiguration();
36784
+ });
36785
+
36786
+ // src/models/errors/appendconditionfailed.ts
36787
+ var Two, One, Two$inboundSchema, Two$outboundSchema, Two$, One$inboundSchema2, One$outboundSchema2, One$2, AppendConditionFailed$inboundSchema, AppendConditionFailed$outboundSchema, AppendConditionFailed$;
36788
+ var init_appendconditionfailed = __esm(() => {
36789
+ init_lib();
36790
+ init_primitives();
36791
+ Two = class Two extends Error {
36792
+ seqNumMismatch;
36793
+ data$;
36794
+ constructor(err) {
36795
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36796
+ super(message);
36797
+ this.data$ = err;
36798
+ this.seqNumMismatch = err.seqNumMismatch;
36799
+ this.name = "Two";
36800
+ }
36801
+ };
36802
+ One = class One extends Error {
36803
+ fencingTokenMismatch;
36804
+ data$;
36805
+ constructor(err) {
36806
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36807
+ super(message);
36808
+ this.data$ = err;
36809
+ this.fencingTokenMismatch = err.fencingTokenMismatch;
36810
+ this.name = "One";
36811
+ }
36812
+ };
36813
+ Two$inboundSchema = objectType({
36814
+ SeqNumMismatch: numberType().int()
36815
+ }).transform((v2) => {
36816
+ const remapped = remap(v2, {
36817
+ SeqNumMismatch: "seqNumMismatch"
36818
+ });
36819
+ return new Two(remapped);
36820
+ });
36821
+ Two$outboundSchema = instanceOfType(Two).transform((v2) => v2.data$).pipe(objectType({
36822
+ seqNumMismatch: numberType().int()
36823
+ }).transform((v2) => {
36824
+ return remap(v2, {
36825
+ seqNumMismatch: "SeqNumMismatch"
36826
+ });
36827
+ }));
36828
+ ((Two$) => {
36829
+ Two$.inboundSchema = Two$inboundSchema;
36830
+ Two$.outboundSchema = Two$outboundSchema;
36831
+ })(Two$ ||= {});
36832
+ One$inboundSchema2 = objectType({
36833
+ FencingTokenMismatch: stringType()
36834
+ }).transform((v2) => {
36835
+ const remapped = remap(v2, {
36836
+ FencingTokenMismatch: "fencingTokenMismatch"
36837
+ });
36838
+ return new One(remapped);
36839
+ });
36840
+ One$outboundSchema2 = instanceOfType(One).transform((v2) => v2.data$).pipe(objectType({
36841
+ fencingTokenMismatch: stringType()
36842
+ }).transform((v2) => {
36843
+ return remap(v2, {
36844
+ fencingTokenMismatch: "FencingTokenMismatch"
36845
+ });
36846
+ }));
36847
+ ((One$) => {
36848
+ One$.inboundSchema = One$inboundSchema2;
36849
+ One$.outboundSchema = One$outboundSchema2;
36850
+ })(One$2 ||= {});
36851
+ AppendConditionFailed$inboundSchema = unionType([lazyType(() => One$inboundSchema2), lazyType(() => Two$inboundSchema)]);
36852
+ AppendConditionFailed$outboundSchema = unionType([
36853
+ lazyType(() => One$outboundSchema2),
36854
+ lazyType(() => Two$outboundSchema)
36855
+ ]);
36856
+ ((AppendConditionFailed$) => {
36857
+ AppendConditionFailed$.inboundSchema = AppendConditionFailed$inboundSchema;
36858
+ AppendConditionFailed$.outboundSchema = AppendConditionFailed$outboundSchema;
36859
+ })(AppendConditionFailed$ ||= {});
36205
36860
  });
36206
36861
 
36207
36862
  // src/models/errors/errorresponse.ts
@@ -36240,11 +36895,11 @@ var init_errorresponse = __esm(() => {
36240
36895
  })(ErrorResponse$ ||= {});
36241
36896
  });
36242
36897
 
36243
- // src/models/errors/retryableerror.ts
36244
- var RetryableError, RetryableError$inboundSchema, RetryableError$outboundSchema, RetryableError$;
36245
- var init_retryableerror = __esm(() => {
36898
+ // src/models/errors/notfounderror.ts
36899
+ var NotFoundError, NotFoundError$inboundSchema, NotFoundError$outboundSchema, NotFoundError$;
36900
+ var init_notfounderror = __esm(() => {
36246
36901
  init_lib();
36247
- RetryableError = class RetryableError extends Error {
36902
+ NotFoundError = class NotFoundError extends Error {
36248
36903
  error;
36249
36904
  data$;
36250
36905
  constructor(err) {
@@ -36252,30 +36907,92 @@ var init_retryableerror = __esm(() => {
36252
36907
  super(message);
36253
36908
  this.data$ = err;
36254
36909
  this.error = err.error;
36255
- this.name = "RetryableError";
36910
+ this.name = "NotFoundError";
36256
36911
  }
36257
36912
  };
36258
- RetryableError$inboundSchema = objectType({
36913
+ NotFoundError$inboundSchema = objectType({
36259
36914
  error: stringType()
36260
36915
  }).transform((v2) => {
36261
- return new RetryableError(v2);
36916
+ return new NotFoundError(v2);
36262
36917
  });
36263
- RetryableError$outboundSchema = instanceOfType(RetryableError).transform((v2) => v2.data$).pipe(objectType({
36918
+ NotFoundError$outboundSchema = instanceOfType(NotFoundError).transform((v2) => v2.data$).pipe(objectType({
36264
36919
  error: stringType()
36265
36920
  }));
36266
- ((RetryableError$) => {
36267
- RetryableError$.inboundSchema = RetryableError$inboundSchema;
36268
- RetryableError$.outboundSchema = RetryableError$outboundSchema;
36269
- })(RetryableError$ ||= {});
36921
+ ((NotFoundError$) => {
36922
+ NotFoundError$.inboundSchema = NotFoundError$inboundSchema;
36923
+ NotFoundError$.outboundSchema = NotFoundError$outboundSchema;
36924
+ })(NotFoundError$ ||= {});
36270
36925
  });
36271
36926
 
36272
- // src/models/errors/index.ts
36273
- var init_errors = __esm(() => {
36274
- init_apierror();
36927
+ // src/models/errors/retryableerror.ts
36928
+ var RetryableError, RetryableError$inboundSchema, RetryableError$outboundSchema, RetryableError$;
36929
+ var init_retryableerror = __esm(() => {
36930
+ init_lib();
36931
+ RetryableError = class RetryableError extends Error {
36932
+ error;
36933
+ data$;
36934
+ constructor(err) {
36935
+ const message = err.error || "API error occurred";
36936
+ super(message);
36937
+ this.data$ = err;
36938
+ this.error = err.error;
36939
+ this.name = "RetryableError";
36940
+ }
36941
+ };
36942
+ RetryableError$inboundSchema = objectType({
36943
+ error: stringType()
36944
+ }).transform((v2) => {
36945
+ return new RetryableError(v2);
36946
+ });
36947
+ RetryableError$outboundSchema = instanceOfType(RetryableError).transform((v2) => v2.data$).pipe(objectType({
36948
+ error: stringType()
36949
+ }));
36950
+ ((RetryableError$) => {
36951
+ RetryableError$.inboundSchema = RetryableError$inboundSchema;
36952
+ RetryableError$.outboundSchema = RetryableError$outboundSchema;
36953
+ })(RetryableError$ ||= {});
36954
+ });
36955
+
36956
+ // src/models/errors/tailresponse.ts
36957
+ var TailResponse, TailResponse$inboundSchema2, TailResponse$outboundSchema2, TailResponse$2;
36958
+ var init_tailresponse2 = __esm(() => {
36959
+ init_lib();
36960
+ init_components();
36961
+ TailResponse = class TailResponse extends Error {
36962
+ tail;
36963
+ data$;
36964
+ constructor(err) {
36965
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
36966
+ super(message);
36967
+ this.data$ = err;
36968
+ this.tail = err.tail;
36969
+ this.name = "TailResponse";
36970
+ }
36971
+ };
36972
+ TailResponse$inboundSchema2 = objectType({
36973
+ tail: StreamPosition$inboundSchema
36974
+ }).transform((v2) => {
36975
+ return new TailResponse(v2);
36976
+ });
36977
+ TailResponse$outboundSchema2 = instanceOfType(TailResponse).transform((v2) => v2.data$).pipe(objectType({
36978
+ tail: StreamPosition$outboundSchema
36979
+ }));
36980
+ ((TailResponse$) => {
36981
+ TailResponse$.inboundSchema = TailResponse$inboundSchema2;
36982
+ TailResponse$.outboundSchema = TailResponse$outboundSchema2;
36983
+ })(TailResponse$2 ||= {});
36984
+ });
36985
+
36986
+ // src/models/errors/index.ts
36987
+ var init_errors = __esm(() => {
36988
+ init_apierror();
36989
+ init_appendconditionfailed();
36275
36990
  init_errorresponse();
36276
36991
  init_httpclienterrors();
36992
+ init_notfounderror();
36277
36993
  init_retryableerror();
36278
36994
  init_sdkvalidationerror();
36995
+ init_tailresponse2();
36279
36996
  });
36280
36997
 
36281
36998
  // src/types/async.ts
@@ -36347,7 +37064,7 @@ async function $do(client, request, options) {
36347
37064
  const req = requestRes.value;
36348
37065
  const doResult = await client._do(req, {
36349
37066
  context,
36350
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37067
+ errorCodes: ["400", "403", "409", "499", "4XX", "500", "503", "504", "5XX"],
36351
37068
  retryConfig: context.retryConfig,
36352
37069
  retryCodes: context.retryCodes
36353
37070
  });
@@ -36358,7 +37075,7 @@ async function $do(client, request, options) {
36358
37075
  const responseFields = {
36359
37076
  HttpMeta: { Response: response, Request: req }
36360
37077
  };
36361
- const [result] = await match(json(201, IssueAccessTokenResponse$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37078
+ const [result] = await match(json(201, IssueAccessTokenResponse$inboundSchema), jsonErr([400, 403, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
36362
37079
  if (!result.ok) {
36363
37080
  return [result, { status: "complete", request: req, response }];
36364
37081
  }
@@ -36404,36 +37121,90 @@ var init_accessTokensIssueAccessToken2 = __esm(() => {
36404
37121
  };
36405
37122
  });
36406
37123
 
37124
+ // src/models/operations/append.ts
37125
+ var AppendServerList, AppendRequest$inboundSchema, AppendRequest$outboundSchema, AppendRequest$;
37126
+ var init_append = __esm(() => {
37127
+ init_lib();
37128
+ init_primitives();
37129
+ init_components();
37130
+ AppendServerList = [
37131
+ "https://{basin}.b.aws.s2.dev/v1"
37132
+ ];
37133
+ AppendRequest$inboundSchema = objectType({
37134
+ stream: stringType(),
37135
+ "s2-format": S2Format$inboundSchema.optional(),
37136
+ AppendInput: AppendInput$inboundSchema
37137
+ }).transform((v2) => {
37138
+ return remap(v2, {
37139
+ "s2-format": "s2Format",
37140
+ AppendInput: "appendInput"
37141
+ });
37142
+ });
37143
+ AppendRequest$outboundSchema = objectType({
37144
+ stream: stringType(),
37145
+ s2Format: S2Format$outboundSchema.optional(),
37146
+ appendInput: AppendInput$outboundSchema
37147
+ }).transform((v2) => {
37148
+ return remap(v2, {
37149
+ s2Format: "s2-format",
37150
+ appendInput: "AppendInput"
37151
+ });
37152
+ });
37153
+ ((AppendRequest$) => {
37154
+ AppendRequest$.inboundSchema = AppendRequest$inboundSchema;
37155
+ AppendRequest$.outboundSchema = AppendRequest$outboundSchema;
37156
+ })(AppendRequest$ ||= {});
37157
+ });
37158
+
37159
+ // src/models/operations/checktail.ts
37160
+ var CheckTailServerList, CheckTailRequest$inboundSchema, CheckTailRequest$outboundSchema, CheckTailRequest$;
37161
+ var init_checktail = __esm(() => {
37162
+ init_lib();
37163
+ CheckTailServerList = [
37164
+ "https://{basin}.b.aws.s2.dev/v1"
37165
+ ];
37166
+ CheckTailRequest$inboundSchema = objectType({
37167
+ stream: stringType()
37168
+ });
37169
+ CheckTailRequest$outboundSchema = objectType({
37170
+ stream: stringType()
37171
+ });
37172
+ ((CheckTailRequest$) => {
37173
+ CheckTailRequest$.inboundSchema = CheckTailRequest$inboundSchema;
37174
+ CheckTailRequest$.outboundSchema = CheckTailRequest$outboundSchema;
37175
+ })(CheckTailRequest$ ||= {});
37176
+ });
37177
+
36407
37178
  // src/models/operations/createorreconfigurebasin.ts
36408
- var CreateOrReconfigureBasinRequest$inboundSchema, CreateOrReconfigureBasinRequest$outboundSchema, CreateOrReconfigureBasinRequest$;
37179
+ var CreateOrReconfigureBasinRequest$inboundSchema2, CreateOrReconfigureBasinRequest$outboundSchema2, CreateOrReconfigureBasinRequest$2;
36409
37180
  var init_createorreconfigurebasin = __esm(() => {
36410
37181
  init_lib();
36411
37182
  init_primitives();
36412
37183
  init_components();
36413
- CreateOrReconfigureBasinRequest$inboundSchema = objectType({
36414
- basin: stringType(),
37184
+ CreateOrReconfigureBasinRequest$inboundSchema2 = objectType({
36415
37185
  "s2-request-token": stringType().optional(),
36416
- CreateBasinRequest: CreateBasinRequest$inboundSchema
37186
+ basin: stringType(),
37187
+ CreateOrReconfigureBasinRequest: nullableType(CreateOrReconfigureBasinRequest$inboundSchema).optional()
36417
37188
  }).transform((v2) => {
36418
37189
  return remap(v2, {
36419
37190
  "s2-request-token": "s2RequestToken",
36420
- CreateBasinRequest: "createBasinRequest"
37191
+ CreateOrReconfigureBasinRequest: "createOrReconfigureBasinRequest"
36421
37192
  });
36422
37193
  });
36423
- CreateOrReconfigureBasinRequest$outboundSchema = objectType({
36424
- basin: stringType(),
37194
+ CreateOrReconfigureBasinRequest$outboundSchema2 = objectType({
36425
37195
  s2RequestToken: stringType().optional(),
36426
- createBasinRequest: CreateBasinRequest$outboundSchema
37196
+ basin: stringType(),
37197
+ createOrReconfigureBasinRequest: nullableType(CreateOrReconfigureBasinRequest$outboundSchema).optional()
36427
37198
  }).transform((v2) => {
36428
37199
  return remap(v2, {
36429
37200
  s2RequestToken: "s2-request-token",
36430
- createBasinRequest: "CreateBasinRequest"
37201
+ createOrReconfigureBasinRequest: "CreateOrReconfigureBasinRequest"
36431
37202
  });
36432
37203
  });
36433
37204
  ((CreateOrReconfigureBasinRequest$) => {
36434
- CreateOrReconfigureBasinRequest$.inboundSchema = CreateOrReconfigureBasinRequest$inboundSchema;
36435
- CreateOrReconfigureBasinRequest$.outboundSchema = CreateOrReconfigureBasinRequest$outboundSchema;
36436
- })(CreateOrReconfigureBasinRequest$ ||= {});
37205
+ CreateOrReconfigureBasinRequest$.inboundSchema = CreateOrReconfigureBasinRequest$inboundSchema2;
37206
+ CreateOrReconfigureBasinRequest$.outboundSchema = CreateOrReconfigureBasinRequest$outboundSchema2;
37207
+ })(CreateOrReconfigureBasinRequest$2 ||= {});
36437
37208
  });
36438
37209
 
36439
37210
  // src/models/operations/createorreconfigurestream.ts
@@ -36448,7 +37219,7 @@ var init_createorreconfigurestream = __esm(() => {
36448
37219
  CreateOrReconfigureStreamRequest$inboundSchema = objectType({
36449
37220
  stream: stringType(),
36450
37221
  "s2-request-token": stringType().optional(),
36451
- StreamConfig: StreamConfig$inboundSchema
37222
+ StreamConfig: nullableType(StreamConfig$inboundSchema).optional()
36452
37223
  }).transform((v2) => {
36453
37224
  return remap(v2, {
36454
37225
  "s2-request-token": "s2RequestToken",
@@ -36458,7 +37229,7 @@ var init_createorreconfigurestream = __esm(() => {
36458
37229
  CreateOrReconfigureStreamRequest$outboundSchema = objectType({
36459
37230
  stream: stringType(),
36460
37231
  s2RequestToken: stringType().optional(),
36461
- streamConfig: StreamConfig$outboundSchema
37232
+ streamConfig: nullableType(StreamConfig$outboundSchema).optional()
36462
37233
  }).transform((v2) => {
36463
37234
  return remap(v2, {
36464
37235
  s2RequestToken: "s2-request-token",
@@ -36471,6 +37242,14 @@ var init_createorreconfigurestream = __esm(() => {
36471
37242
  })(CreateOrReconfigureStreamRequest$ ||= {});
36472
37243
  });
36473
37244
 
37245
+ // src/models/operations/createstream.ts
37246
+ var CreateStreamServerList;
37247
+ var init_createstream = __esm(() => {
37248
+ CreateStreamServerList = [
37249
+ "https://{basin}.b.aws.s2.dev/v1"
37250
+ ];
37251
+ });
37252
+
36474
37253
  // src/models/operations/deletebasin.ts
36475
37254
  var DeleteBasinRequest$inboundSchema, DeleteBasinRequest$outboundSchema, DeleteBasinRequest$;
36476
37255
  var init_deletebasin = __esm(() => {
@@ -36669,6 +37448,69 @@ var init_liststreams = __esm(() => {
36669
37448
  })(ListStreamsResponse$2 ||= {});
36670
37449
  });
36671
37450
 
37451
+ // src/models/operations/read.ts
37452
+ var ReadServerList, ReadRequest$inboundSchema, ReadRequest$outboundSchema, ReadRequest$, ReadResponse$inboundSchema, ReadResponse$outboundSchema, ReadResponse$;
37453
+ var init_read = __esm(() => {
37454
+ init_lib();
37455
+ init_event_streams();
37456
+ init_primitives();
37457
+ init_components();
37458
+ ReadServerList = [
37459
+ "https://{basin}.b.aws.s2.dev/v1"
37460
+ ];
37461
+ ReadRequest$inboundSchema = objectType({
37462
+ stream: stringType(),
37463
+ "s2-format": S2Format$inboundSchema.optional(),
37464
+ seq_num: numberType().int().optional(),
37465
+ timestamp: numberType().int().optional(),
37466
+ tail_offset: numberType().int().optional(),
37467
+ count: numberType().int().optional(),
37468
+ bytes: numberType().int().optional()
37469
+ }).transform((v2) => {
37470
+ return remap(v2, {
37471
+ "s2-format": "s2Format",
37472
+ seq_num: "seqNum",
37473
+ tail_offset: "tailOffset"
37474
+ });
37475
+ });
37476
+ ReadRequest$outboundSchema = objectType({
37477
+ stream: stringType(),
37478
+ s2Format: S2Format$outboundSchema.optional(),
37479
+ seqNum: numberType().int().optional(),
37480
+ timestamp: numberType().int().optional(),
37481
+ tailOffset: numberType().int().optional(),
37482
+ count: numberType().int().optional(),
37483
+ bytes: numberType().int().optional()
37484
+ }).transform((v2) => {
37485
+ return remap(v2, {
37486
+ s2Format: "s2-format",
37487
+ seqNum: "seq_num",
37488
+ tailOffset: "tail_offset"
37489
+ });
37490
+ });
37491
+ ((ReadRequest$) => {
37492
+ ReadRequest$.inboundSchema = ReadRequest$inboundSchema;
37493
+ ReadRequest$.outboundSchema = ReadRequest$outboundSchema;
37494
+ })(ReadRequest$ ||= {});
37495
+ ReadResponse$inboundSchema = unionType([
37496
+ ReadBatch$inboundSchema,
37497
+ instanceOfType(ReadableStream).transform((stream) => {
37498
+ return new EventStream({
37499
+ stream,
37500
+ decoder(rawEvent) {
37501
+ const schema = ReadEvent$inboundSchema;
37502
+ return schema.parse(rawEvent);
37503
+ }
37504
+ });
37505
+ })
37506
+ ]);
37507
+ ReadResponse$outboundSchema = unionType([ReadBatch$outboundSchema, neverType()]);
37508
+ ((ReadResponse$) => {
37509
+ ReadResponse$.inboundSchema = ReadResponse$inboundSchema;
37510
+ ReadResponse$.outboundSchema = ReadResponse$outboundSchema;
37511
+ })(ReadResponse$ ||= {});
37512
+ });
37513
+
36672
37514
  // src/models/operations/reconfigurebasin.ts
36673
37515
  var ReconfigureBasinRequest$inboundSchema, ReconfigureBasinRequest$outboundSchema, ReconfigureBasinRequest$;
36674
37516
  var init_reconfigurebasin = __esm(() => {
@@ -36746,8 +37588,11 @@ var init_revokeaccesstoken = __esm(() => {
36746
37588
 
36747
37589
  // src/models/operations/index.ts
36748
37590
  var init_operations = __esm(() => {
37591
+ init_append();
37592
+ init_checktail();
36749
37593
  init_createorreconfigurebasin();
36750
37594
  init_createorreconfigurestream();
37595
+ init_createstream();
36751
37596
  init_deletebasin();
36752
37597
  init_deletestream();
36753
37598
  init_getbasinconfig();
@@ -36755,6 +37600,7 @@ var init_operations = __esm(() => {
36755
37600
  init_listaccesstokens();
36756
37601
  init_listbasins();
36757
37602
  init_liststreams();
37603
+ init_read();
36758
37604
  init_reconfigurebasin();
36759
37605
  init_reconfigurestream();
36760
37606
  init_revokeaccesstoken();
@@ -36808,7 +37654,7 @@ async function $do2(client, request, options) {
36808
37654
  const req = requestRes.value;
36809
37655
  const doResult = await client._do(req, {
36810
37656
  context,
36811
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37657
+ errorCodes: ["400", "403", "499", "4XX", "500", "503", "504", "5XX"],
36812
37658
  retryConfig: context.retryConfig,
36813
37659
  retryCodes: context.retryCodes
36814
37660
  });
@@ -36819,7 +37665,7 @@ async function $do2(client, request, options) {
36819
37665
  const responseFields = {
36820
37666
  HttpMeta: { Response: response, Request: req }
36821
37667
  };
36822
- const [result] = await match(json(200, ListAccessTokensResponse$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37668
+ const [result] = await match(json(200, ListAccessTokensResponse$inboundSchema), jsonErr([400, 403], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
36823
37669
  if (!result.ok) {
36824
37670
  return [result, { status: "complete", request: req, response }];
36825
37671
  }
@@ -36914,7 +37760,7 @@ async function $do3(client, request, options) {
36914
37760
  const req = requestRes.value;
36915
37761
  const doResult = await client._do(req, {
36916
37762
  context,
36917
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37763
+ errorCodes: ["400", "403", "499", "4XX", "500", "503", "504", "5XX"],
36918
37764
  retryConfig: context.retryConfig,
36919
37765
  retryCodes: context.retryCodes
36920
37766
  });
@@ -36925,7 +37771,7 @@ async function $do3(client, request, options) {
36925
37771
  const responseFields = {
36926
37772
  HttpMeta: { Response: response, Request: req }
36927
37773
  };
36928
- const [result] = await match(nil(200, voidType()), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37774
+ const [result] = await match(nil(200, voidType()), jsonErr([400, 403], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
36929
37775
  if (!result.ok) {
36930
37776
  return [result, { status: "complete", request: req, response }];
36931
37777
  }
@@ -36971,17 +37817,128 @@ var init_accessTokensRevokeAccessToken2 = __esm(() => {
36971
37817
  };
36972
37818
  });
36973
37819
 
36974
- // src/funcs/basinsCreateOrReconfigureBasin.ts
36975
- function basinsCreateOrReconfigureBasin(client, request, options) {
37820
+ // src/funcs/basinsCreateBasin.ts
37821
+ function basinsCreateBasin(client, request, options) {
36976
37822
  return new APIPromise($do4(client, request, options));
36977
37823
  }
36978
37824
  async function $do4(client, request, options) {
36979
- const parsed = safeParse(request, (value) => CreateOrReconfigureBasinRequest$outboundSchema.parse(value), "Input validation failed");
37825
+ const parsed = safeParse(request, (value) => CreateBasinRequest$outboundSchema.parse(value), "Input validation failed");
37826
+ if (!parsed.ok) {
37827
+ return [parsed, { status: "invalid" }];
37828
+ }
37829
+ const payload = parsed.value;
37830
+ const body = encodeJSON("body", payload, { explode: true });
37831
+ const path = pathToFunc("/basins")();
37832
+ const headers = new Headers(compactMap({
37833
+ "Content-Type": "application/json",
37834
+ Accept: "application/json"
37835
+ }));
37836
+ const secConfig = await extractSecurity(client._options.accessToken);
37837
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
37838
+ const requestSecurity = resolveGlobalSecurity(securityInput);
37839
+ const context = {
37840
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
37841
+ operationID: "create_basin",
37842
+ oAuth2Scopes: [],
37843
+ resolvedSecurity: requestSecurity,
37844
+ securitySource: client._options.accessToken,
37845
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
37846
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
37847
+ };
37848
+ const requestRes = client._createRequest(context, {
37849
+ security: requestSecurity,
37850
+ method: "POST",
37851
+ baseURL: options?.serverURL,
37852
+ path,
37853
+ headers,
37854
+ body,
37855
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37856
+ }, options);
37857
+ if (!requestRes.ok) {
37858
+ return [requestRes, { status: "invalid" }];
37859
+ }
37860
+ const req = requestRes.value;
37861
+ const doResult = await client._do(req, {
37862
+ context,
37863
+ errorCodes: [
37864
+ "400",
37865
+ "401",
37866
+ "403",
37867
+ "409",
37868
+ "499",
37869
+ "4XX",
37870
+ "500",
37871
+ "503",
37872
+ "504",
37873
+ "5XX"
37874
+ ],
37875
+ retryConfig: context.retryConfig,
37876
+ retryCodes: context.retryCodes
37877
+ });
37878
+ if (!doResult.ok) {
37879
+ return [doResult, { status: "request-error", request: req }];
37880
+ }
37881
+ const response = doResult.value;
37882
+ const responseFields = {
37883
+ HttpMeta: { Response: response, Request: req }
37884
+ };
37885
+ const [result] = await match(json(201, BasinInfo$inboundSchema), jsonErr([400, 401, 403, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37886
+ if (!result.ok) {
37887
+ return [result, { status: "complete", request: req, response }];
37888
+ }
37889
+ return [result, { status: "complete", request: req, response }];
37890
+ }
37891
+ var init_basinsCreateBasin = __esm(() => {
37892
+ init_encodings();
37893
+ init_matchers();
37894
+ init_primitives();
37895
+ init_schemas();
37896
+ init_security();
37897
+ init_url();
37898
+ init_components();
37899
+ init_errors();
37900
+ init_async();
37901
+ });
37902
+
37903
+ // src/mcp-server/tools/basinsCreateBasin.ts
37904
+ var args4, tool$basinsCreateBasin;
37905
+ var init_basinsCreateBasin2 = __esm(() => {
37906
+ init_basinsCreateBasin();
37907
+ init_components();
37908
+ init_tools();
37909
+ args4 = {
37910
+ request: CreateBasinRequest$inboundSchema
37911
+ };
37912
+ tool$basinsCreateBasin = {
37913
+ name: "basins-create-basin",
37914
+ description: `Create a basin.`,
37915
+ scopes: ["write"],
37916
+ args: args4,
37917
+ tool: async (client, args5, ctx) => {
37918
+ const [result, apiCall] = await basinsCreateBasin(client, args5.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37919
+ if (!result.ok) {
37920
+ return {
37921
+ content: [{ type: "text", text: result.error.message }],
37922
+ isError: true
37923
+ };
37924
+ }
37925
+ const value = result.value;
37926
+ return formatResult(value, apiCall);
37927
+ }
37928
+ };
37929
+ });
37930
+
37931
+ // src/funcs/basinsCreateOrReconfigureBasin.ts
37932
+ function basinsCreateOrReconfigureBasin(client, request, options) {
37933
+ return new APIPromise($do5(client, request, options));
37934
+ }
37935
+ async function $do5(client, request, options) {
37936
+ const parsed = safeParse(request, (value) => CreateOrReconfigureBasinRequest$outboundSchema2.parse(value), "Input validation failed");
36980
37937
  if (!parsed.ok) {
36981
37938
  return [parsed, { status: "invalid" }];
36982
37939
  }
36983
37940
  const payload = parsed.value;
36984
- const body = encodeJSON("body", payload.CreateBasinRequest, {
37941
+ const body = encodeJSON("body", payload.CreateOrReconfigureBasinRequest, {
36985
37942
  explode: true
36986
37943
  });
36987
37944
  const pathParams = {
@@ -37023,7 +37980,7 @@ async function $do4(client, request, options) {
37023
37980
  const req = requestRes.value;
37024
37981
  const doResult = await client._do(req, {
37025
37982
  context,
37026
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
37983
+ errorCodes: ["400", "499", "4XX", "500", "503", "504", "5XX"],
37027
37984
  retryConfig: context.retryConfig,
37028
37985
  retryCodes: context.retryCodes
37029
37986
  });
@@ -37034,7 +37991,7 @@ async function $do4(client, request, options) {
37034
37991
  const responseFields = {
37035
37992
  HttpMeta: { Response: response, Request: req }
37036
37993
  };
37037
- const [result] = await match(json(201, BasinInfo$inboundSchema.optional()), nil(204, BasinInfo$inboundSchema.optional()), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37994
+ const [result] = await match(json(201, BasinInfo$inboundSchema.optional()), nil(204, BasinInfo$inboundSchema.optional()), jsonErr(400, ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37038
37995
  if (!result.ok) {
37039
37996
  return [result, { status: "complete", request: req, response }];
37040
37997
  }
@@ -37054,21 +38011,21 @@ var init_basinsCreateOrReconfigureBasin = __esm(() => {
37054
38011
  });
37055
38012
 
37056
38013
  // src/mcp-server/tools/basinsCreateOrReconfigureBasin.ts
37057
- var args4, tool$basinsCreateOrReconfigureBasin;
38014
+ var args5, tool$basinsCreateOrReconfigureBasin;
37058
38015
  var init_basinsCreateOrReconfigureBasin2 = __esm(() => {
37059
38016
  init_basinsCreateOrReconfigureBasin();
37060
38017
  init_operations();
37061
38018
  init_tools();
37062
- args4 = {
37063
- request: CreateOrReconfigureBasinRequest$inboundSchema
38019
+ args5 = {
38020
+ request: CreateOrReconfigureBasinRequest$inboundSchema2
37064
38021
  };
37065
38022
  tool$basinsCreateOrReconfigureBasin = {
37066
38023
  name: "basins-create-or-reconfigure-basin",
37067
38024
  description: `Create or reconfigure a basin.`,
37068
38025
  scopes: ["write"],
37069
- args: args4,
37070
- tool: async (client, args5, ctx) => {
37071
- const [result, apiCall] = await basinsCreateOrReconfigureBasin(client, args5.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
38026
+ args: args5,
38027
+ tool: async (client, args6, ctx) => {
38028
+ const [result, apiCall] = await basinsCreateOrReconfigureBasin(client, args6.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37072
38029
  if (!result.ok) {
37073
38030
  return {
37074
38031
  content: [{ type: "text", text: result.error.message }],
@@ -37083,9 +38040,9 @@ var init_basinsCreateOrReconfigureBasin2 = __esm(() => {
37083
38040
 
37084
38041
  // src/funcs/basinsDeleteBasin.ts
37085
38042
  function basinsDeleteBasin(client, request, options) {
37086
- return new APIPromise($do5(client, request, options));
38043
+ return new APIPromise($do6(client, request, options));
37087
38044
  }
37088
- async function $do5(client, request, options) {
38045
+ async function $do6(client, request, options) {
37089
38046
  const parsed = safeParse(request, (value) => DeleteBasinRequest$outboundSchema.parse(value), "Input validation failed");
37090
38047
  if (!parsed.ok) {
37091
38048
  return [parsed, { status: "invalid" }];
@@ -37129,7 +38086,18 @@ async function $do5(client, request, options) {
37129
38086
  const req = requestRes.value;
37130
38087
  const doResult = await client._do(req, {
37131
38088
  context,
37132
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
38089
+ errorCodes: [
38090
+ "400",
38091
+ "401",
38092
+ "403",
38093
+ "404",
38094
+ "499",
38095
+ "4XX",
38096
+ "500",
38097
+ "503",
38098
+ "504",
38099
+ "5XX"
38100
+ ],
37133
38101
  retryConfig: context.retryConfig,
37134
38102
  retryCodes: context.retryCodes
37135
38103
  });
@@ -37140,7 +38108,7 @@ async function $do5(client, request, options) {
37140
38108
  const responseFields = {
37141
38109
  HttpMeta: { Response: response, Request: req }
37142
38110
  };
37143
- const [result] = await match(nil(202, voidType()), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
38111
+ const [result] = await match(nil(202, voidType()), jsonErr([400, 401, 403], ErrorResponse$inboundSchema), jsonErr(404, NotFoundError$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37144
38112
  if (!result.ok) {
37145
38113
  return [result, { status: "complete", request: req, response }];
37146
38114
  }
@@ -37160,21 +38128,21 @@ var init_basinsDeleteBasin = __esm(() => {
37160
38128
  });
37161
38129
 
37162
38130
  // src/mcp-server/tools/basinsDeleteBasin.ts
37163
- var args5, tool$basinsDeleteBasin;
38131
+ var args6, tool$basinsDeleteBasin;
37164
38132
  var init_basinsDeleteBasin2 = __esm(() => {
37165
38133
  init_basinsDeleteBasin();
37166
38134
  init_operations();
37167
38135
  init_tools();
37168
- args5 = {
38136
+ args6 = {
37169
38137
  request: DeleteBasinRequest$inboundSchema
37170
38138
  };
37171
38139
  tool$basinsDeleteBasin = {
37172
38140
  name: "basins-delete-basin",
37173
38141
  description: `Delete a basin.`,
37174
38142
  scopes: ["write"],
37175
- args: args5,
37176
- tool: async (client, args6, ctx) => {
37177
- const [result, apiCall] = await basinsDeleteBasin(client, args6.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
38143
+ args: args6,
38144
+ tool: async (client, args7, ctx) => {
38145
+ const [result, apiCall] = await basinsDeleteBasin(client, args7.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37178
38146
  if (!result.ok) {
37179
38147
  return {
37180
38148
  content: [{ type: "text", text: result.error.message }],
@@ -37188,9 +38156,9 @@ var init_basinsDeleteBasin2 = __esm(() => {
37188
38156
 
37189
38157
  // src/funcs/basinsGetBasinConfig.ts
37190
38158
  function basinsGetBasinConfig(client, request, options) {
37191
- return new APIPromise($do6(client, request, options));
38159
+ return new APIPromise($do7(client, request, options));
37192
38160
  }
37193
- async function $do6(client, request, options) {
38161
+ async function $do7(client, request, options) {
37194
38162
  const parsed = safeParse(request, (value) => GetBasinConfigRequest$outboundSchema.parse(value), "Input validation failed");
37195
38163
  if (!parsed.ok) {
37196
38164
  return [parsed, { status: "invalid" }];
@@ -37234,7 +38202,7 @@ async function $do6(client, request, options) {
37234
38202
  const req = requestRes.value;
37235
38203
  const doResult = await client._do(req, {
37236
38204
  context,
37237
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
38205
+ errorCodes: ["400", "403", "404", "499", "4XX", "500", "503", "504", "5XX"],
37238
38206
  retryConfig: context.retryConfig,
37239
38207
  retryCodes: context.retryCodes
37240
38208
  });
@@ -37245,7 +38213,7 @@ async function $do6(client, request, options) {
37245
38213
  const responseFields = {
37246
38214
  HttpMeta: { Response: response, Request: req }
37247
38215
  };
37248
- const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
38216
+ const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37249
38217
  if (!result.ok) {
37250
38218
  return [result, { status: "complete", request: req, response }];
37251
38219
  }
@@ -37265,21 +38233,21 @@ var init_basinsGetBasinConfig = __esm(() => {
37265
38233
  });
37266
38234
 
37267
38235
  // src/mcp-server/tools/basinsGetBasinConfig.ts
37268
- var args6, tool$basinsGetBasinConfig;
38236
+ var args7, tool$basinsGetBasinConfig;
37269
38237
  var init_basinsGetBasinConfig2 = __esm(() => {
37270
38238
  init_basinsGetBasinConfig();
37271
38239
  init_operations();
37272
38240
  init_tools();
37273
- args6 = {
38241
+ args7 = {
37274
38242
  request: GetBasinConfigRequest$inboundSchema
37275
38243
  };
37276
38244
  tool$basinsGetBasinConfig = {
37277
38245
  name: "basins-get-basin-config",
37278
38246
  description: `Get basin config.`,
37279
38247
  scopes: ["read"],
37280
- args: args6,
37281
- tool: async (client, args7, ctx) => {
37282
- const [result, apiCall] = await basinsGetBasinConfig(client, args7.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
38248
+ args: args7,
38249
+ tool: async (client, args8, ctx) => {
38250
+ const [result, apiCall] = await basinsGetBasinConfig(client, args8.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
37283
38251
  if (!result.ok) {
37284
38252
  return {
37285
38253
  content: [{ type: "text", text: result.error.message }],
@@ -37618,11 +38586,11 @@ function peg$parse(input, options) {
37618
38586
  var peg$f36 = function(name, f, r) {
37619
38587
  return [f, ...r];
37620
38588
  };
37621
- var peg$f37 = function(name, args7) {
38589
+ var peg$f37 = function(name, args8) {
37622
38590
  return {
37623
38591
  type: "FunctionExpr",
37624
38592
  name,
37625
- arguments: args7
38593
+ arguments: args8
37626
38594
  };
37627
38595
  };
37628
38596
  var peg$f38 = function(value) {
@@ -40733,7 +41701,7 @@ function evalFunctionExpr(ctx, item, node) {
40733
41701
  if (fn.definition.parameters.length !== node.arguments.length) {
40734
41702
  return false;
40735
41703
  }
40736
- const args7 = [];
41704
+ const args8 = [];
40737
41705
  for (let i = 0;i < node.arguments.length; i++) {
40738
41706
  const value2 = evalFunctionArgument(ctx, item, node.arguments[i]);
40739
41707
  const param = fn.definition.parameters[i];
@@ -40742,19 +41710,19 @@ function evalFunctionExpr(ctx, item, node) {
40742
41710
  if (!isNodeList(value2) && !isJsonValue(value2)) {
40743
41711
  return false;
40744
41712
  }
40745
- args7.push(coerceValueType(value2));
41713
+ args8.push(coerceValueType(value2));
40746
41714
  break;
40747
41715
  case "NodesType":
40748
41716
  if (!isNodeList(value2)) {
40749
41717
  return false;
40750
41718
  }
40751
- args7.push(value2);
41719
+ args8.push(value2);
40752
41720
  break;
40753
41721
  case "LogicalType":
40754
41722
  if (typeof value2 === "boolean") {
40755
- args7.push(value2);
41723
+ args8.push(value2);
40756
41724
  } else if (isNodeList(value2)) {
40757
- args7.push(value2.length > 0);
41725
+ args8.push(value2.length > 0);
40758
41726
  } else {
40759
41727
  return false;
40760
41728
  }
@@ -40763,7 +41731,7 @@ function evalFunctionExpr(ctx, item, node) {
40763
41731
  assertNever(param, "Unknown function argument type");
40764
41732
  }
40765
41733
  }
40766
- return fn.declaration(ctx, ...args7);
41734
+ return fn.declaration(ctx, ...args8);
40767
41735
  }
40768
41736
  function isKnownFunction(functions, name) {
40769
41737
  return Object.hasOwn(functions, name);
@@ -41113,9 +42081,9 @@ var init_operations2 = __esm(() => {
41113
42081
 
41114
42082
  // src/funcs/basinsListBasins.ts
41115
42083
  function basinsListBasins(client, request, options) {
41116
- return new APIPromise($do7(client, request, options));
42084
+ return new APIPromise($do8(client, request, options));
41117
42085
  }
41118
- async function $do7(client, request, options) {
42086
+ async function $do8(client, request, options) {
41119
42087
  const parsed = safeParse(request, (value2) => ListBasinsRequest$outboundSchema.parse(value2), "Input validation failed");
41120
42088
  if (!parsed.ok) {
41121
42089
  return [haltIterator(parsed), { status: "invalid" }];
@@ -41159,7 +42127,7 @@ async function $do7(client, request, options) {
41159
42127
  const req = requestRes.value;
41160
42128
  const doResult = await client._do(req, {
41161
42129
  context,
41162
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42130
+ errorCodes: ["400", "403", "499", "4XX", "500", "503", "504", "5XX"],
41163
42131
  retryConfig: context.retryConfig,
41164
42132
  retryCodes: context.retryCodes
41165
42133
  });
@@ -41170,7 +42138,7 @@ async function $do7(client, request, options) {
41170
42138
  const responseFields = {
41171
42139
  HttpMeta: { Response: response, Request: req }
41172
42140
  };
41173
- const [result, raw] = await match(json(200, ListBasinsResponse$inboundSchema2, { key: "Result" }), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42141
+ const [result, raw] = await match(json(200, ListBasinsResponse$inboundSchema2, { key: "Result" }), jsonErr([400, 403], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41174
42142
  if (!result.ok) {
41175
42143
  return [haltIterator(result), {
41176
42144
  status: "complete",
@@ -41211,21 +42179,21 @@ var init_basinsListBasins = __esm(() => {
41211
42179
  });
41212
42180
 
41213
42181
  // src/mcp-server/tools/basinsListBasins.ts
41214
- var args7, tool$basinsListBasins;
42182
+ var args8, tool$basinsListBasins;
41215
42183
  var init_basinsListBasins2 = __esm(() => {
41216
42184
  init_basinsListBasins();
41217
42185
  init_operations();
41218
42186
  init_tools();
41219
- args7 = {
42187
+ args8 = {
41220
42188
  request: ListBasinsRequest$inboundSchema
41221
42189
  };
41222
42190
  tool$basinsListBasins = {
41223
42191
  name: "basins-list-basins",
41224
42192
  description: `List basins.`,
41225
42193
  scopes: ["read"],
41226
- args: args7,
41227
- tool: async (client, args8, ctx) => {
41228
- const [result, apiCall] = await basinsListBasins(client, args8.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42194
+ args: args8,
42195
+ tool: async (client, args9, ctx) => {
42196
+ const [result, apiCall] = await basinsListBasins(client, args9.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41229
42197
  if (!result.ok) {
41230
42198
  return {
41231
42199
  content: [{ type: "text", text: result.error.message }],
@@ -41240,9 +42208,9 @@ var init_basinsListBasins2 = __esm(() => {
41240
42208
 
41241
42209
  // src/funcs/basinsReconfigureBasin.ts
41242
42210
  function basinsReconfigureBasin(client, request, options) {
41243
- return new APIPromise($do8(client, request, options));
42211
+ return new APIPromise($do9(client, request, options));
41244
42212
  }
41245
- async function $do8(client, request, options) {
42213
+ async function $do9(client, request, options) {
41246
42214
  const parsed = safeParse(request, (value2) => ReconfigureBasinRequest$outboundSchema.parse(value2), "Input validation failed");
41247
42215
  if (!parsed.ok) {
41248
42216
  return [parsed, { status: "invalid" }];
@@ -41289,7 +42257,7 @@ async function $do8(client, request, options) {
41289
42257
  const req = requestRes.value;
41290
42258
  const doResult = await client._do(req, {
41291
42259
  context,
41292
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42260
+ errorCodes: ["400", "403", "404", "499", "4XX", "500", "503", "504", "5XX"],
41293
42261
  retryConfig: context.retryConfig,
41294
42262
  retryCodes: context.retryCodes
41295
42263
  });
@@ -41300,7 +42268,7 @@ async function $do8(client, request, options) {
41300
42268
  const responseFields = {
41301
42269
  HttpMeta: { Response: response, Request: req }
41302
42270
  };
41303
- const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42271
+ const [result] = await match(json(200, BasinConfig$inboundSchema), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41304
42272
  if (!result.ok) {
41305
42273
  return [result, { status: "complete", request: req, response }];
41306
42274
  }
@@ -41320,21 +42288,21 @@ var init_basinsReconfigureBasin = __esm(() => {
41320
42288
  });
41321
42289
 
41322
42290
  // src/mcp-server/tools/basinsReconfigureBasin.ts
41323
- var args8, tool$basinsReconfigureBasin;
42291
+ var args9, tool$basinsReconfigureBasin;
41324
42292
  var init_basinsReconfigureBasin2 = __esm(() => {
41325
42293
  init_basinsReconfigureBasin();
41326
42294
  init_operations();
41327
42295
  init_tools();
41328
- args8 = {
42296
+ args9 = {
41329
42297
  request: ReconfigureBasinRequest$inboundSchema
41330
42298
  };
41331
42299
  tool$basinsReconfigureBasin = {
41332
42300
  name: "basins-reconfigure-basin",
41333
42301
  description: `Reconfigure a basin.`,
41334
42302
  scopes: ["write"],
41335
- args: args8,
41336
- tool: async (client, args9, ctx) => {
41337
- const [result, apiCall] = await basinsReconfigureBasin(client, args9.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42303
+ args: args9,
42304
+ tool: async (client, args10, ctx) => {
42305
+ const [result, apiCall] = await basinsReconfigureBasin(client, args10.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41338
42306
  if (!result.ok) {
41339
42307
  return {
41340
42308
  content: [{ type: "text", text: result.error.message }],
@@ -41347,20 +42315,18 @@ var init_basinsReconfigureBasin2 = __esm(() => {
41347
42315
  };
41348
42316
  });
41349
42317
 
41350
- // src/funcs/streamsCreateOrReconfigureStream.ts
41351
- function streamsCreateOrReconfigureStream(client, request, options) {
41352
- return new APIPromise($do9(client, request, options));
42318
+ // src/funcs/recordsAppend.ts
42319
+ function recordsAppend(client, request, options) {
42320
+ return new APIPromise($do10(client, request, options));
41353
42321
  }
41354
- async function $do9(client, request, options) {
41355
- const parsed = safeParse(request, (value2) => CreateOrReconfigureStreamRequest$outboundSchema.parse(value2), "Input validation failed");
42322
+ async function $do10(client, request, options) {
42323
+ const parsed = safeParse(request, (value2) => AppendRequest$outboundSchema.parse(value2), "Input validation failed");
41356
42324
  if (!parsed.ok) {
41357
42325
  return [parsed, { status: "invalid" }];
41358
42326
  }
41359
42327
  const payload = parsed.value;
41360
- const body = encodeJSON("body", payload.StreamConfig, { explode: true });
41361
- const baseURL = options?.serverURL || pathToFunc(CreateOrReconfigureStreamServerList[0], {
41362
- charEncoding: "percent"
41363
- })({
42328
+ const body = encodeJSON("body", payload.AppendInput, { explode: true });
42329
+ const baseURL = options?.serverURL || pathToFunc(AppendServerList[0], { charEncoding: "percent" })({
41364
42330
  basin: ""
41365
42331
  });
41366
42332
  const pathParams = {
@@ -41369,18 +42335,21 @@ async function $do9(client, request, options) {
41369
42335
  charEncoding: "percent"
41370
42336
  })
41371
42337
  };
41372
- const path = pathToFunc("/streams/{stream}")(pathParams);
42338
+ const path = pathToFunc("/streams/{stream}/records")(pathParams);
41373
42339
  const headers = new Headers(compactMap({
41374
42340
  "Content-Type": "application/json",
41375
42341
  Accept: "application/json",
41376
- "s2-request-token": encodeSimple("s2-request-token", payload["s2-request-token"], { explode: false, charEncoding: "none" })
42342
+ "s2-format": encodeSimple("s2-format", payload["s2-format"], {
42343
+ explode: false,
42344
+ charEncoding: "none"
42345
+ })
41377
42346
  }));
41378
42347
  const secConfig = await extractSecurity(client._options.accessToken);
41379
42348
  const securityInput = secConfig == null ? {} : { accessToken: secConfig };
41380
42349
  const requestSecurity = resolveGlobalSecurity(securityInput);
41381
42350
  const context = {
41382
42351
  baseURL: baseURL ?? "",
41383
- operationID: "create_or_reconfigure_stream",
42352
+ operationID: "append",
41384
42353
  oAuth2Scopes: [],
41385
42354
  resolvedSecurity: requestSecurity,
41386
42355
  securitySource: client._options.accessToken,
@@ -41402,7 +42371,19 @@ async function $do9(client, request, options) {
41402
42371
  const req = requestRes.value;
41403
42372
  const doResult = await client._do(req, {
41404
42373
  context,
41405
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42374
+ errorCodes: [
42375
+ "400",
42376
+ "401",
42377
+ "404",
42378
+ "409",
42379
+ "412",
42380
+ "499",
42381
+ "4XX",
42382
+ "500",
42383
+ "503",
42384
+ "504",
42385
+ "5XX"
42386
+ ],
41406
42387
  retryConfig: context.retryConfig,
41407
42388
  retryCodes: context.retryCodes
41408
42389
  });
@@ -41413,13 +42394,398 @@ async function $do9(client, request, options) {
41413
42394
  const responseFields = {
41414
42395
  HttpMeta: { Response: response, Request: req }
41415
42396
  };
41416
- 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 });
42397
+ const [result] = await match(json(200, AppendAck$inboundSchema), jsonErr([400, 401, 404, 409], ErrorResponse$inboundSchema), jsonErr(412, AppendConditionFailed$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41417
42398
  if (!result.ok) {
41418
42399
  return [result, { status: "complete", request: req, response }];
41419
42400
  }
41420
42401
  return [result, { status: "complete", request: req, response }];
41421
42402
  }
41422
- var init_streamsCreateOrReconfigureStream = __esm(() => {
42403
+ var init_recordsAppend = __esm(() => {
42404
+ init_encodings();
42405
+ init_matchers();
42406
+ init_primitives();
42407
+ init_schemas();
42408
+ init_security();
42409
+ init_url();
42410
+ init_components();
42411
+ init_errors();
42412
+ init_append();
42413
+ init_operations();
42414
+ init_async();
42415
+ });
42416
+
42417
+ // src/mcp-server/tools/recordsAppend.ts
42418
+ var args10, tool$recordsAppend;
42419
+ var init_recordsAppend2 = __esm(() => {
42420
+ init_recordsAppend();
42421
+ init_operations();
42422
+ init_tools();
42423
+ args10 = {
42424
+ request: AppendRequest$inboundSchema
42425
+ };
42426
+ tool$recordsAppend = {
42427
+ name: "records-append",
42428
+ description: `Append records.
42429
+
42430
+ Append a batch of records to a stream.`,
42431
+ scopes: ["write"],
42432
+ args: args10,
42433
+ tool: async (client, args11, ctx) => {
42434
+ const [result, apiCall] = await recordsAppend(client, args11.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42435
+ if (!result.ok) {
42436
+ return {
42437
+ content: [{ type: "text", text: result.error.message }],
42438
+ isError: true
42439
+ };
42440
+ }
42441
+ const value2 = result.value;
42442
+ return formatResult(value2, apiCall);
42443
+ }
42444
+ };
42445
+ });
42446
+
42447
+ // src/funcs/recordsCheckTail.ts
42448
+ function recordsCheckTail(client, request, options) {
42449
+ return new APIPromise($do11(client, request, options));
42450
+ }
42451
+ async function $do11(client, request, options) {
42452
+ const parsed = safeParse(request, (value2) => CheckTailRequest$outboundSchema.parse(value2), "Input validation failed");
42453
+ if (!parsed.ok) {
42454
+ return [parsed, { status: "invalid" }];
42455
+ }
42456
+ const payload = parsed.value;
42457
+ const body = null;
42458
+ const baseURL = options?.serverURL || pathToFunc(CheckTailServerList[0], { charEncoding: "percent" })({
42459
+ basin: ""
42460
+ });
42461
+ const pathParams = {
42462
+ stream: encodeSimple("stream", payload.stream, {
42463
+ explode: false,
42464
+ charEncoding: "percent"
42465
+ })
42466
+ };
42467
+ const path = pathToFunc("/streams/{stream}/records/tail")(pathParams);
42468
+ const headers = new Headers(compactMap({
42469
+ Accept: "application/json"
42470
+ }));
42471
+ const secConfig = await extractSecurity(client._options.accessToken);
42472
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42473
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42474
+ const context = {
42475
+ baseURL: baseURL ?? "",
42476
+ operationID: "check_tail",
42477
+ oAuth2Scopes: [],
42478
+ resolvedSecurity: requestSecurity,
42479
+ securitySource: client._options.accessToken,
42480
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42481
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42482
+ };
42483
+ const requestRes = client._createRequest(context, {
42484
+ security: requestSecurity,
42485
+ method: "GET",
42486
+ baseURL,
42487
+ path,
42488
+ headers,
42489
+ body,
42490
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42491
+ }, options);
42492
+ if (!requestRes.ok) {
42493
+ return [requestRes, { status: "invalid" }];
42494
+ }
42495
+ const req = requestRes.value;
42496
+ const doResult = await client._do(req, {
42497
+ context,
42498
+ errorCodes: [
42499
+ "400",
42500
+ "401",
42501
+ "404",
42502
+ "409",
42503
+ "499",
42504
+ "4XX",
42505
+ "500",
42506
+ "503",
42507
+ "504",
42508
+ "5XX"
42509
+ ],
42510
+ retryConfig: context.retryConfig,
42511
+ retryCodes: context.retryCodes
42512
+ });
42513
+ if (!doResult.ok) {
42514
+ return [doResult, { status: "request-error", request: req }];
42515
+ }
42516
+ const response = doResult.value;
42517
+ const responseFields = {
42518
+ HttpMeta: { Response: response, Request: req }
42519
+ };
42520
+ const [result] = await match(json(200, TailResponse$inboundSchema), jsonErr([400, 401, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42521
+ if (!result.ok) {
42522
+ return [result, { status: "complete", request: req, response }];
42523
+ }
42524
+ return [result, { status: "complete", request: req, response }];
42525
+ }
42526
+ var init_recordsCheckTail = __esm(() => {
42527
+ init_encodings();
42528
+ init_matchers();
42529
+ init_primitives();
42530
+ init_schemas();
42531
+ init_security();
42532
+ init_url();
42533
+ init_components();
42534
+ init_errors();
42535
+ init_checktail();
42536
+ init_operations();
42537
+ init_async();
42538
+ });
42539
+
42540
+ // src/mcp-server/tools/recordsCheckTail.ts
42541
+ var args11, tool$recordsCheckTail;
42542
+ var init_recordsCheckTail2 = __esm(() => {
42543
+ init_recordsCheckTail();
42544
+ init_operations();
42545
+ init_tools();
42546
+ args11 = {
42547
+ request: CheckTailRequest$inboundSchema
42548
+ };
42549
+ tool$recordsCheckTail = {
42550
+ name: "records-check-tail",
42551
+ description: `Check the tail.
42552
+
42553
+ Check the tail of a stream.`,
42554
+ scopes: ["read"],
42555
+ args: args11,
42556
+ tool: async (client, args12, ctx) => {
42557
+ const [result, apiCall] = await recordsCheckTail(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42558
+ if (!result.ok) {
42559
+ return {
42560
+ content: [{ type: "text", text: result.error.message }],
42561
+ isError: true
42562
+ };
42563
+ }
42564
+ const value2 = result.value;
42565
+ return formatResult(value2, apiCall);
42566
+ }
42567
+ };
42568
+ });
42569
+
42570
+ // src/funcs/recordsRead.ts
42571
+ function recordsRead(client, request, options) {
42572
+ return new APIPromise($do12(client, request, options));
42573
+ }
42574
+ async function $do12(client, request, options) {
42575
+ const parsed = safeParse(request, (value2) => ReadRequest$outboundSchema.parse(value2), "Input validation failed");
42576
+ if (!parsed.ok) {
42577
+ return [parsed, { status: "invalid" }];
42578
+ }
42579
+ const payload = parsed.value;
42580
+ const body = null;
42581
+ const baseURL = options?.serverURL || pathToFunc(ReadServerList[0], { charEncoding: "percent" })({
42582
+ basin: ""
42583
+ });
42584
+ const pathParams = {
42585
+ stream: encodeSimple("stream", payload.stream, {
42586
+ explode: false,
42587
+ charEncoding: "percent"
42588
+ })
42589
+ };
42590
+ const path = pathToFunc("/streams/{stream}/records")(pathParams);
42591
+ const query2 = encodeFormQuery({
42592
+ bytes: payload.bytes,
42593
+ count: payload.count,
42594
+ seq_num: payload.seq_num,
42595
+ tail_offset: payload.tail_offset,
42596
+ timestamp: payload.timestamp
42597
+ });
42598
+ const headers = new Headers(compactMap({
42599
+ Accept: options?.acceptHeaderOverride || "application/json;q=1, text/event-stream;q=0",
42600
+ "s2-format": encodeSimple("s2-format", payload["s2-format"], {
42601
+ explode: false,
42602
+ charEncoding: "none"
42603
+ })
42604
+ }));
42605
+ const secConfig = await extractSecurity(client._options.accessToken);
42606
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42607
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42608
+ const context = {
42609
+ baseURL: baseURL ?? "",
42610
+ operationID: "read",
42611
+ oAuth2Scopes: [],
42612
+ resolvedSecurity: requestSecurity,
42613
+ securitySource: client._options.accessToken,
42614
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42615
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42616
+ };
42617
+ const requestRes = client._createRequest(context, {
42618
+ security: requestSecurity,
42619
+ method: "GET",
42620
+ baseURL,
42621
+ path,
42622
+ headers,
42623
+ query: query2,
42624
+ body,
42625
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42626
+ }, options);
42627
+ if (!requestRes.ok) {
42628
+ return [requestRes, { status: "invalid" }];
42629
+ }
42630
+ const req = requestRes.value;
42631
+ const doResult = await client._do(req, {
42632
+ context,
42633
+ errorCodes: [
42634
+ "400",
42635
+ "401",
42636
+ "404",
42637
+ "409",
42638
+ "416",
42639
+ "499",
42640
+ "4XX",
42641
+ "500",
42642
+ "503",
42643
+ "504",
42644
+ "5XX"
42645
+ ],
42646
+ retryConfig: context.retryConfig,
42647
+ retryCodes: context.retryCodes
42648
+ });
42649
+ if (!doResult.ok) {
42650
+ return [doResult, { status: "request-error", request: req }];
42651
+ }
42652
+ const response = doResult.value;
42653
+ const responseFields = {
42654
+ HttpMeta: { Response: response, Request: req }
42655
+ };
42656
+ const [result] = await match(json(200, ReadResponse$inboundSchema), sse(200, ReadResponse$inboundSchema), jsonErr([400, 401, 404, 409], ErrorResponse$inboundSchema), jsonErr(416, TailResponse$inboundSchema2), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42657
+ if (!result.ok) {
42658
+ return [result, { status: "complete", request: req, response }];
42659
+ }
42660
+ return [result, { status: "complete", request: req, response }];
42661
+ }
42662
+ var init_recordsRead = __esm(() => {
42663
+ init_encodings();
42664
+ init_matchers();
42665
+ init_primitives();
42666
+ init_schemas();
42667
+ init_security();
42668
+ init_url();
42669
+ init_errors();
42670
+ init_operations();
42671
+ init_read();
42672
+ init_async();
42673
+ });
42674
+
42675
+ // src/mcp-server/tools/recordsRead.ts
42676
+ var args12, tool$recordsRead;
42677
+ var init_recordsRead2 = __esm(() => {
42678
+ init_recordsRead();
42679
+ init_operations();
42680
+ init_tools();
42681
+ args12 = {
42682
+ request: ReadRequest$inboundSchema
42683
+ };
42684
+ tool$recordsRead = {
42685
+ name: "records-read",
42686
+ description: `Retrieve records.
42687
+
42688
+ Retrieve a batch of records, or set \`Accept: text/event-stream\` to stream using server-sent events.`,
42689
+ scopes: ["read"],
42690
+ args: args12,
42691
+ tool: async (client, args13, ctx) => {
42692
+ const [result, apiCall] = await recordsRead(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42693
+ if (!result.ok) {
42694
+ return {
42695
+ content: [{ type: "text", text: result.error.message }],
42696
+ isError: true
42697
+ };
42698
+ }
42699
+ const value2 = result.value;
42700
+ return formatResult(value2, apiCall);
42701
+ }
42702
+ };
42703
+ });
42704
+
42705
+ // src/funcs/streamsCreateOrReconfigureStream.ts
42706
+ function streamsCreateOrReconfigureStream(client, request, options) {
42707
+ return new APIPromise($do13(client, request, options));
42708
+ }
42709
+ async function $do13(client, request, options) {
42710
+ const parsed = safeParse(request, (value2) => CreateOrReconfigureStreamRequest$outboundSchema.parse(value2), "Input validation failed");
42711
+ if (!parsed.ok) {
42712
+ return [parsed, { status: "invalid" }];
42713
+ }
42714
+ const payload = parsed.value;
42715
+ const body = encodeJSON("body", payload.StreamConfig, { explode: true });
42716
+ const baseURL = options?.serverURL || pathToFunc(CreateOrReconfigureStreamServerList[0], {
42717
+ charEncoding: "percent"
42718
+ })({
42719
+ basin: ""
42720
+ });
42721
+ const pathParams = {
42722
+ stream: encodeSimple("stream", payload.stream, {
42723
+ explode: false,
42724
+ charEncoding: "percent"
42725
+ })
42726
+ };
42727
+ const path = pathToFunc("/streams/{stream}")(pathParams);
42728
+ const headers = new Headers(compactMap({
42729
+ "Content-Type": "application/json",
42730
+ Accept: "application/json",
42731
+ "s2-request-token": encodeSimple("s2-request-token", payload["s2-request-token"], { explode: false, charEncoding: "none" })
42732
+ }));
42733
+ const secConfig = await extractSecurity(client._options.accessToken);
42734
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42735
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42736
+ const context = {
42737
+ baseURL: baseURL ?? "",
42738
+ operationID: "create_or_reconfigure_stream",
42739
+ oAuth2Scopes: [],
42740
+ resolvedSecurity: requestSecurity,
42741
+ securitySource: client._options.accessToken,
42742
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42743
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42744
+ };
42745
+ const requestRes = client._createRequest(context, {
42746
+ security: requestSecurity,
42747
+ method: "PUT",
42748
+ baseURL,
42749
+ path,
42750
+ headers,
42751
+ body,
42752
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42753
+ }, options);
42754
+ if (!requestRes.ok) {
42755
+ return [requestRes, { status: "invalid" }];
42756
+ }
42757
+ const req = requestRes.value;
42758
+ const doResult = await client._do(req, {
42759
+ context,
42760
+ errorCodes: [
42761
+ "400",
42762
+ "403",
42763
+ "404",
42764
+ "409",
42765
+ "499",
42766
+ "4XX",
42767
+ "500",
42768
+ "503",
42769
+ "504",
42770
+ "5XX"
42771
+ ],
42772
+ retryConfig: context.retryConfig,
42773
+ retryCodes: context.retryCodes
42774
+ });
42775
+ if (!doResult.ok) {
42776
+ return [doResult, { status: "request-error", request: req }];
42777
+ }
42778
+ const response = doResult.value;
42779
+ const responseFields = {
42780
+ HttpMeta: { Response: response, Request: req }
42781
+ };
42782
+ const [result] = await match(json(201, StreamInfo$inboundSchema.optional()), nil(204, StreamInfo$inboundSchema.optional()), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42783
+ if (!result.ok) {
42784
+ return [result, { status: "complete", request: req, response }];
42785
+ }
42786
+ return [result, { status: "complete", request: req, response }];
42787
+ }
42788
+ var init_streamsCreateOrReconfigureStream = __esm(() => {
41423
42789
  init_encodings();
41424
42790
  init_matchers();
41425
42791
  init_primitives();
@@ -41434,21 +42800,136 @@ var init_streamsCreateOrReconfigureStream = __esm(() => {
41434
42800
  });
41435
42801
 
41436
42802
  // src/mcp-server/tools/streamsCreateOrReconfigureStream.ts
41437
- var args9, tool$streamsCreateOrReconfigureStream;
42803
+ var args13, tool$streamsCreateOrReconfigureStream;
41438
42804
  var init_streamsCreateOrReconfigureStream2 = __esm(() => {
41439
42805
  init_streamsCreateOrReconfigureStream();
41440
42806
  init_operations();
41441
42807
  init_tools();
41442
- args9 = {
42808
+ args13 = {
41443
42809
  request: CreateOrReconfigureStreamRequest$inboundSchema
41444
42810
  };
41445
42811
  tool$streamsCreateOrReconfigureStream = {
41446
42812
  name: "streams-create-or-reconfigure-stream",
41447
42813
  description: `Create or reconfigure a stream.`,
41448
42814
  scopes: ["write"],
41449
- args: args9,
41450
- tool: async (client, args10, ctx) => {
41451
- const [result, apiCall] = await streamsCreateOrReconfigureStream(client, args10.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42815
+ args: args13,
42816
+ tool: async (client, args14, ctx) => {
42817
+ const [result, apiCall] = await streamsCreateOrReconfigureStream(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
42818
+ if (!result.ok) {
42819
+ return {
42820
+ content: [{ type: "text", text: result.error.message }],
42821
+ isError: true
42822
+ };
42823
+ }
42824
+ const value2 = result.value;
42825
+ return formatResult(value2, apiCall);
42826
+ }
42827
+ };
42828
+ });
42829
+
42830
+ // src/funcs/streamsCreateStream.ts
42831
+ function streamsCreateStream(client, request, options) {
42832
+ return new APIPromise($do14(client, request, options));
42833
+ }
42834
+ async function $do14(client, request, options) {
42835
+ const parsed = safeParse(request, (value2) => CreateStreamRequest$outboundSchema.parse(value2), "Input validation failed");
42836
+ if (!parsed.ok) {
42837
+ return [parsed, { status: "invalid" }];
42838
+ }
42839
+ const payload = parsed.value;
42840
+ const body = encodeJSON("body", payload, { explode: true });
42841
+ const baseURL = options?.serverURL || pathToFunc(CreateStreamServerList[0], { charEncoding: "percent" })({
42842
+ basin: ""
42843
+ });
42844
+ const path = pathToFunc("/streams")();
42845
+ const headers = new Headers(compactMap({
42846
+ "Content-Type": "application/json",
42847
+ Accept: "application/json"
42848
+ }));
42849
+ const secConfig = await extractSecurity(client._options.accessToken);
42850
+ const securityInput = secConfig == null ? {} : { accessToken: secConfig };
42851
+ const requestSecurity = resolveGlobalSecurity(securityInput);
42852
+ const context = {
42853
+ baseURL: baseURL ?? "",
42854
+ operationID: "create_stream",
42855
+ oAuth2Scopes: [],
42856
+ resolvedSecurity: requestSecurity,
42857
+ securitySource: client._options.accessToken,
42858
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
42859
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
42860
+ };
42861
+ const requestRes = client._createRequest(context, {
42862
+ security: requestSecurity,
42863
+ method: "POST",
42864
+ baseURL,
42865
+ path,
42866
+ headers,
42867
+ body,
42868
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
42869
+ }, options);
42870
+ if (!requestRes.ok) {
42871
+ return [requestRes, { status: "invalid" }];
42872
+ }
42873
+ const req = requestRes.value;
42874
+ const doResult = await client._do(req, {
42875
+ context,
42876
+ errorCodes: [
42877
+ "400",
42878
+ "403",
42879
+ "404",
42880
+ "409",
42881
+ "499",
42882
+ "4XX",
42883
+ "500",
42884
+ "503",
42885
+ "504",
42886
+ "5XX"
42887
+ ],
42888
+ retryConfig: context.retryConfig,
42889
+ retryCodes: context.retryCodes
42890
+ });
42891
+ if (!doResult.ok) {
42892
+ return [doResult, { status: "request-error", request: req }];
42893
+ }
42894
+ const response = doResult.value;
42895
+ const responseFields = {
42896
+ HttpMeta: { Response: response, Request: req }
42897
+ };
42898
+ const [result] = await match(json(201, StreamInfo$inboundSchema), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
42899
+ if (!result.ok) {
42900
+ return [result, { status: "complete", request: req, response }];
42901
+ }
42902
+ return [result, { status: "complete", request: req, response }];
42903
+ }
42904
+ var init_streamsCreateStream = __esm(() => {
42905
+ init_encodings();
42906
+ init_matchers();
42907
+ init_primitives();
42908
+ init_schemas();
42909
+ init_security();
42910
+ init_url();
42911
+ init_components();
42912
+ init_errors();
42913
+ init_createstream();
42914
+ init_async();
42915
+ });
42916
+
42917
+ // src/mcp-server/tools/streamsCreateStream.ts
42918
+ var args14, tool$streamsCreateStream;
42919
+ var init_streamsCreateStream2 = __esm(() => {
42920
+ init_streamsCreateStream();
42921
+ init_components();
42922
+ init_tools();
42923
+ args14 = {
42924
+ request: CreateStreamRequest$inboundSchema
42925
+ };
42926
+ tool$streamsCreateStream = {
42927
+ name: "streams-create-stream",
42928
+ description: `Create a stream.`,
42929
+ scopes: ["write"],
42930
+ args: args14,
42931
+ tool: async (client, args15, ctx) => {
42932
+ const [result, apiCall] = await streamsCreateStream(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41452
42933
  if (!result.ok) {
41453
42934
  return {
41454
42935
  content: [{ type: "text", text: result.error.message }],
@@ -41463,9 +42944,9 @@ var init_streamsCreateOrReconfigureStream2 = __esm(() => {
41463
42944
 
41464
42945
  // src/funcs/streamsDeleteStream.ts
41465
42946
  function streamsDeleteStream(client, request, options) {
41466
- return new APIPromise($do10(client, request, options));
42947
+ return new APIPromise($do15(client, request, options));
41467
42948
  }
41468
- async function $do10(client, request, options) {
42949
+ async function $do15(client, request, options) {
41469
42950
  const parsed = safeParse(request, (value2) => DeleteStreamRequest$outboundSchema.parse(value2), "Input validation failed");
41470
42951
  if (!parsed.ok) {
41471
42952
  return [parsed, { status: "invalid" }];
@@ -41512,7 +42993,7 @@ async function $do10(client, request, options) {
41512
42993
  const req = requestRes.value;
41513
42994
  const doResult = await client._do(req, {
41514
42995
  context,
41515
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
42996
+ errorCodes: ["400", "403", "404", "499", "4XX", "500", "503", "504", "5XX"],
41516
42997
  retryConfig: context.retryConfig,
41517
42998
  retryCodes: context.retryCodes
41518
42999
  });
@@ -41523,7 +43004,7 @@ async function $do10(client, request, options) {
41523
43004
  const responseFields = {
41524
43005
  HttpMeta: { Response: response, Request: req }
41525
43006
  };
41526
- const [result] = await match(nil(202, voidType()), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
43007
+ const [result] = await match(nil(202, voidType()), jsonErr([400, 403], ErrorResponse$inboundSchema), jsonErr(404, NotFoundError$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41527
43008
  if (!result.ok) {
41528
43009
  return [result, { status: "complete", request: req, response }];
41529
43010
  }
@@ -41544,21 +43025,21 @@ var init_streamsDeleteStream = __esm(() => {
41544
43025
  });
41545
43026
 
41546
43027
  // src/mcp-server/tools/streamsDeleteStream.ts
41547
- var args10, tool$streamsDeleteStream;
43028
+ var args15, tool$streamsDeleteStream;
41548
43029
  var init_streamsDeleteStream2 = __esm(() => {
41549
43030
  init_streamsDeleteStream();
41550
43031
  init_operations();
41551
43032
  init_tools();
41552
- args10 = {
43033
+ args15 = {
41553
43034
  request: DeleteStreamRequest$inboundSchema
41554
43035
  };
41555
43036
  tool$streamsDeleteStream = {
41556
43037
  name: "streams-delete-stream",
41557
43038
  description: `Delete a stream.`,
41558
43039
  scopes: ["write"],
41559
- args: args10,
41560
- tool: async (client, args11, ctx) => {
41561
- const [result, apiCall] = await streamsDeleteStream(client, args11.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43040
+ args: args15,
43041
+ tool: async (client, args16, ctx) => {
43042
+ const [result, apiCall] = await streamsDeleteStream(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41562
43043
  if (!result.ok) {
41563
43044
  return {
41564
43045
  content: [{ type: "text", text: result.error.message }],
@@ -41572,9 +43053,9 @@ var init_streamsDeleteStream2 = __esm(() => {
41572
43053
 
41573
43054
  // src/funcs/streamsGetStreamConfig.ts
41574
43055
  function streamsGetStreamConfig(client, request, options) {
41575
- return new APIPromise($do11(client, request, options));
43056
+ return new APIPromise($do16(client, request, options));
41576
43057
  }
41577
- async function $do11(client, request, options) {
43058
+ async function $do16(client, request, options) {
41578
43059
  const parsed = safeParse(request, (value2) => GetStreamConfigRequest$outboundSchema.parse(value2), "Input validation failed");
41579
43060
  if (!parsed.ok) {
41580
43061
  return [parsed, { status: "invalid" }];
@@ -41621,7 +43102,18 @@ async function $do11(client, request, options) {
41621
43102
  const req = requestRes.value;
41622
43103
  const doResult = await client._do(req, {
41623
43104
  context,
41624
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
43105
+ errorCodes: [
43106
+ "400",
43107
+ "403",
43108
+ "404",
43109
+ "409",
43110
+ "499",
43111
+ "4XX",
43112
+ "500",
43113
+ "503",
43114
+ "504",
43115
+ "5XX"
43116
+ ],
41625
43117
  retryConfig: context.retryConfig,
41626
43118
  retryCodes: context.retryCodes
41627
43119
  });
@@ -41632,7 +43124,7 @@ async function $do11(client, request, options) {
41632
43124
  const responseFields = {
41633
43125
  HttpMeta: { Response: response, Request: req }
41634
43126
  };
41635
- const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
43127
+ const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41636
43128
  if (!result.ok) {
41637
43129
  return [result, { status: "complete", request: req, response }];
41638
43130
  }
@@ -41653,21 +43145,21 @@ var init_streamsGetStreamConfig = __esm(() => {
41653
43145
  });
41654
43146
 
41655
43147
  // src/mcp-server/tools/streamsGetStreamConfig.ts
41656
- var args11, tool$streamsGetStreamConfig;
43148
+ var args16, tool$streamsGetStreamConfig;
41657
43149
  var init_streamsGetStreamConfig2 = __esm(() => {
41658
43150
  init_streamsGetStreamConfig();
41659
43151
  init_operations();
41660
43152
  init_tools();
41661
- args11 = {
43153
+ args16 = {
41662
43154
  request: GetStreamConfigRequest$inboundSchema
41663
43155
  };
41664
43156
  tool$streamsGetStreamConfig = {
41665
43157
  name: "streams-get-stream-config",
41666
43158
  description: `Get stream configuration.`,
41667
43159
  scopes: ["read"],
41668
- args: args11,
41669
- tool: async (client, args12, ctx) => {
41670
- const [result, apiCall] = await streamsGetStreamConfig(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43160
+ args: args16,
43161
+ tool: async (client, args17, ctx) => {
43162
+ const [result, apiCall] = await streamsGetStreamConfig(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41671
43163
  if (!result.ok) {
41672
43164
  return {
41673
43165
  content: [{ type: "text", text: result.error.message }],
@@ -41682,9 +43174,9 @@ var init_streamsGetStreamConfig2 = __esm(() => {
41682
43174
 
41683
43175
  // src/funcs/streamsListStreams.ts
41684
43176
  function streamsListStreams(client, request, options) {
41685
- return new APIPromise($do12(client, request, options));
43177
+ return new APIPromise($do17(client, request, options));
41686
43178
  }
41687
- async function $do12(client, request, options) {
43179
+ async function $do17(client, request, options) {
41688
43180
  const parsed = safeParse(request, (value2) => ListStreamsRequest$outboundSchema.parse(value2), "Input validation failed");
41689
43181
  if (!parsed.ok) {
41690
43182
  return [haltIterator(parsed), { status: "invalid" }];
@@ -41731,7 +43223,7 @@ async function $do12(client, request, options) {
41731
43223
  const req = requestRes.value;
41732
43224
  const doResult = await client._do(req, {
41733
43225
  context,
41734
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
43226
+ errorCodes: ["400", "403", "404", "499", "4XX", "500", "503", "504", "5XX"],
41735
43227
  retryConfig: context.retryConfig,
41736
43228
  retryCodes: context.retryCodes
41737
43229
  });
@@ -41744,7 +43236,7 @@ async function $do12(client, request, options) {
41744
43236
  };
41745
43237
  const [result, raw] = await match(json(200, ListStreamsResponse$inboundSchema2, {
41746
43238
  key: "Result"
41747
- }), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
43239
+ }), jsonErr([400, 403, 404], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41748
43240
  if (!result.ok) {
41749
43241
  return [haltIterator(result), {
41750
43242
  status: "complete",
@@ -41786,21 +43278,21 @@ var init_streamsListStreams = __esm(() => {
41786
43278
  });
41787
43279
 
41788
43280
  // src/mcp-server/tools/streamsListStreams.ts
41789
- var args12, tool$streamsListStreams;
43281
+ var args17, tool$streamsListStreams;
41790
43282
  var init_streamsListStreams2 = __esm(() => {
41791
43283
  init_streamsListStreams();
41792
43284
  init_operations();
41793
43285
  init_tools();
41794
- args12 = {
43286
+ args17 = {
41795
43287
  request: ListStreamsRequest$inboundSchema
41796
43288
  };
41797
43289
  tool$streamsListStreams = {
41798
43290
  name: "streams-list-streams",
41799
43291
  description: `List streams.`,
41800
43292
  scopes: ["read"],
41801
- args: args12,
41802
- tool: async (client, args13, ctx) => {
41803
- const [result, apiCall] = await streamsListStreams(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43293
+ args: args17,
43294
+ tool: async (client, args18, ctx) => {
43295
+ const [result, apiCall] = await streamsListStreams(client, args18.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41804
43296
  if (!result.ok) {
41805
43297
  return {
41806
43298
  content: [{ type: "text", text: result.error.message }],
@@ -41815,9 +43307,9 @@ var init_streamsListStreams2 = __esm(() => {
41815
43307
 
41816
43308
  // src/funcs/streamsReconfigureStream.ts
41817
43309
  function streamsReconfigureStream(client, request, options) {
41818
- return new APIPromise($do13(client, request, options));
43310
+ return new APIPromise($do18(client, request, options));
41819
43311
  }
41820
- async function $do13(client, request, options) {
43312
+ async function $do18(client, request, options) {
41821
43313
  const parsed = safeParse(request, (value2) => ReconfigureStreamRequest$outboundSchema.parse(value2), "Input validation failed");
41822
43314
  if (!parsed.ok) {
41823
43315
  return [parsed, { status: "invalid" }];
@@ -41867,7 +43359,18 @@ async function $do13(client, request, options) {
41867
43359
  const req = requestRes.value;
41868
43360
  const doResult = await client._do(req, {
41869
43361
  context,
41870
- errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
43362
+ errorCodes: [
43363
+ "400",
43364
+ "403",
43365
+ "404",
43366
+ "409",
43367
+ "499",
43368
+ "4XX",
43369
+ "500",
43370
+ "503",
43371
+ "504",
43372
+ "5XX"
43373
+ ],
41871
43374
  retryConfig: context.retryConfig,
41872
43375
  retryCodes: context.retryCodes
41873
43376
  });
@@ -41878,7 +43381,7 @@ async function $do13(client, request, options) {
41878
43381
  const responseFields = {
41879
43382
  HttpMeta: { Response: response, Request: req }
41880
43383
  };
41881
- const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 401], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
43384
+ const [result] = await match(json(200, StreamConfig$inboundSchema), jsonErr([400, 403, 404, 409], ErrorResponse$inboundSchema), jsonErr(499, RetryableError$inboundSchema), jsonErr([500, 503, 504], RetryableError$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
41882
43385
  if (!result.ok) {
41883
43386
  return [result, { status: "complete", request: req, response }];
41884
43387
  }
@@ -41899,21 +43402,21 @@ var init_streamsReconfigureStream = __esm(() => {
41899
43402
  });
41900
43403
 
41901
43404
  // src/mcp-server/tools/streamsReconfigureStream.ts
41902
- var args13, tool$streamsReconfigureStream;
43405
+ var args18, tool$streamsReconfigureStream;
41903
43406
  var init_streamsReconfigureStream2 = __esm(() => {
41904
43407
  init_streamsReconfigureStream();
41905
43408
  init_operations();
41906
43409
  init_tools();
41907
- args13 = {
43410
+ args18 = {
41908
43411
  request: ReconfigureStreamRequest$inboundSchema
41909
43412
  };
41910
43413
  tool$streamsReconfigureStream = {
41911
43414
  name: "streams-reconfigure-stream",
41912
43415
  description: `Reconfigure a stream.`,
41913
43416
  scopes: ["write"],
41914
- args: args13,
41915
- tool: async (client, args14, ctx) => {
41916
- const [result, apiCall] = await streamsReconfigureStream(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43417
+ args: args18,
43418
+ tool: async (client, args19, ctx) => {
43419
+ const [result, apiCall] = await streamsReconfigureStream(client, args19.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41917
43420
  if (!result.ok) {
41918
43421
  return {
41919
43422
  content: [{ type: "text", text: result.error.message }],
@@ -41930,7 +43433,7 @@ var init_streamsReconfigureStream2 = __esm(() => {
41930
43433
  function createMCPServer(deps) {
41931
43434
  const server = new McpServer({
41932
43435
  name: "S2",
41933
- version: "0.11.1"
43436
+ version: "0.12.0"
41934
43437
  });
41935
43438
  const client = new S2Core({
41936
43439
  accessToken: deps.accessToken,
@@ -41948,15 +43451,20 @@ function createMCPServer(deps) {
41948
43451
  tool(tool$accessTokensIssueAccessToken);
41949
43452
  tool(tool$accessTokensRevokeAccessToken);
41950
43453
  tool(tool$basinsListBasins);
43454
+ tool(tool$basinsCreateBasin);
41951
43455
  tool(tool$basinsGetBasinConfig);
41952
43456
  tool(tool$basinsCreateOrReconfigureBasin);
41953
43457
  tool(tool$basinsDeleteBasin);
41954
43458
  tool(tool$basinsReconfigureBasin);
41955
43459
  tool(tool$streamsListStreams);
43460
+ tool(tool$streamsCreateStream);
41956
43461
  tool(tool$streamsGetStreamConfig);
41957
43462
  tool(tool$streamsCreateOrReconfigureStream);
41958
43463
  tool(tool$streamsDeleteStream);
41959
43464
  tool(tool$streamsReconfigureStream);
43465
+ tool(tool$recordsRead);
43466
+ tool(tool$recordsAppend);
43467
+ tool(tool$recordsCheckTail);
41960
43468
  return server;
41961
43469
  }
41962
43470
  var init_server2 = __esm(() => {
@@ -41967,12 +43475,17 @@ var init_server2 = __esm(() => {
41967
43475
  init_accessTokensIssueAccessToken2();
41968
43476
  init_accessTokensListAccessTokens2();
41969
43477
  init_accessTokensRevokeAccessToken2();
43478
+ init_basinsCreateBasin2();
41970
43479
  init_basinsCreateOrReconfigureBasin2();
41971
43480
  init_basinsDeleteBasin2();
41972
43481
  init_basinsGetBasinConfig2();
41973
43482
  init_basinsListBasins2();
41974
43483
  init_basinsReconfigureBasin2();
43484
+ init_recordsAppend2();
43485
+ init_recordsCheckTail2();
43486
+ init_recordsRead2();
41975
43487
  init_streamsCreateOrReconfigureStream2();
43488
+ init_streamsCreateStream2();
41976
43489
  init_streamsDeleteStream2();
41977
43490
  init_streamsGetStreamConfig2();
41978
43491
  init_streamsListStreams2();
@@ -43173,7 +44686,7 @@ var routes = rn({
43173
44686
  var app = Ve(routes, {
43174
44687
  name: "mcp",
43175
44688
  versionInfo: {
43176
- currentVersion: "0.11.1"
44689
+ currentVersion: "0.12.0"
43177
44690
  }
43178
44691
  });
43179
44692
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -43181,5 +44694,5 @@ export {
43181
44694
  app
43182
44695
  };
43183
44696
 
43184
- //# debugId=86951FF2046F612464756E2164756E21
44697
+ //# debugId=E625D98C99BA8A6B64756E2164756E21
43185
44698
  //# sourceMappingURL=mcp-server.js.map