@s2-dev/streamstore 0.2.5

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 (467) hide show
  1. package/.devcontainer/README.md +35 -0
  2. package/.devcontainer/devcontainer.json +45 -0
  3. package/FUNCTIONS.md +106 -0
  4. package/README.md +559 -0
  5. package/RUNTIMES.md +48 -0
  6. package/core.d.ts +10 -0
  7. package/core.d.ts.map +1 -0
  8. package/core.js +17 -0
  9. package/core.js.map +1 -0
  10. package/docs/sdks/account/README.md +406 -0
  11. package/docs/sdks/basin/README.md +415 -0
  12. package/docs/sdks/s2/README.md +7 -0
  13. package/docs/sdks/stream/README.md +267 -0
  14. package/funcs/accountCreateBasin.d.ts +14 -0
  15. package/funcs/accountCreateBasin.d.ts.map +1 -0
  16. package/funcs/accountCreateBasin.js +118 -0
  17. package/funcs/accountCreateBasin.js.map +1 -0
  18. package/funcs/accountDeleteBasin.d.ts +13 -0
  19. package/funcs/accountDeleteBasin.d.ts.map +1 -0
  20. package/funcs/accountDeleteBasin.js +114 -0
  21. package/funcs/accountDeleteBasin.js.map +1 -0
  22. package/funcs/accountGetBasinConfig.d.ts +14 -0
  23. package/funcs/accountGetBasinConfig.d.ts.map +1 -0
  24. package/funcs/accountGetBasinConfig.js +114 -0
  25. package/funcs/accountGetBasinConfig.js.map +1 -0
  26. package/funcs/accountListBasins.d.ts +16 -0
  27. package/funcs/accountListBasins.d.ts.map +1 -0
  28. package/funcs/accountListBasins.js +130 -0
  29. package/funcs/accountListBasins.js.map +1 -0
  30. package/funcs/accountReconfigureBasin.d.ts +14 -0
  31. package/funcs/accountReconfigureBasin.d.ts.map +1 -0
  32. package/funcs/accountReconfigureBasin.js +115 -0
  33. package/funcs/accountReconfigureBasin.js.map +1 -0
  34. package/funcs/basinCreateStream.d.ts +14 -0
  35. package/funcs/basinCreateStream.d.ts.map +1 -0
  36. package/funcs/basinCreateStream.js +123 -0
  37. package/funcs/basinCreateStream.js.map +1 -0
  38. package/funcs/basinDeleteStream.d.ts +13 -0
  39. package/funcs/basinDeleteStream.d.ts.map +1 -0
  40. package/funcs/basinDeleteStream.js +119 -0
  41. package/funcs/basinDeleteStream.js.map +1 -0
  42. package/funcs/basinGetStreamConfig.d.ts +14 -0
  43. package/funcs/basinGetStreamConfig.d.ts.map +1 -0
  44. package/funcs/basinGetStreamConfig.js +119 -0
  45. package/funcs/basinGetStreamConfig.js.map +1 -0
  46. package/funcs/basinListStreams.d.ts +16 -0
  47. package/funcs/basinListStreams.d.ts.map +1 -0
  48. package/funcs/basinListStreams.js +137 -0
  49. package/funcs/basinListStreams.js.map +1 -0
  50. package/funcs/basinReconfigureStream.d.ts +14 -0
  51. package/funcs/basinReconfigureStream.d.ts.map +1 -0
  52. package/funcs/basinReconfigureStream.js +120 -0
  53. package/funcs/basinReconfigureStream.js.map +1 -0
  54. package/funcs/streamAppend.d.ts +14 -0
  55. package/funcs/streamAppend.d.ts.map +1 -0
  56. package/funcs/streamAppend.js +124 -0
  57. package/funcs/streamAppend.js.map +1 -0
  58. package/funcs/streamCheckTail.d.ts +14 -0
  59. package/funcs/streamCheckTail.d.ts.map +1 -0
  60. package/funcs/streamCheckTail.js +119 -0
  61. package/funcs/streamCheckTail.js.map +1 -0
  62. package/funcs/streamRead.d.ts +19 -0
  63. package/funcs/streamRead.d.ts.map +1 -0
  64. package/funcs/streamRead.js +134 -0
  65. package/funcs/streamRead.js.map +1 -0
  66. package/hooks/hooks.d.ts +24 -0
  67. package/hooks/hooks.d.ts.map +1 -0
  68. package/hooks/hooks.js +86 -0
  69. package/hooks/hooks.js.map +1 -0
  70. package/hooks/index.d.ts +3 -0
  71. package/hooks/index.d.ts.map +1 -0
  72. package/hooks/index.js +22 -0
  73. package/hooks/index.js.map +1 -0
  74. package/hooks/registration.d.ts +3 -0
  75. package/hooks/registration.d.ts.map +1 -0
  76. package/hooks/registration.js +15 -0
  77. package/hooks/registration.js.map +1 -0
  78. package/hooks/types.d.ts +77 -0
  79. package/hooks/types.d.ts.map +1 -0
  80. package/hooks/types.js +6 -0
  81. package/hooks/types.js.map +1 -0
  82. package/index.d.ts +4 -0
  83. package/index.d.ts.map +1 -0
  84. package/index.js +46 -0
  85. package/index.js.map +1 -0
  86. package/jsr.json +28 -0
  87. package/lib/base64.d.ts +10 -0
  88. package/lib/base64.d.ts.map +1 -0
  89. package/lib/base64.js +71 -0
  90. package/lib/base64.js.map +1 -0
  91. package/lib/config.d.ts +34 -0
  92. package/lib/config.d.ts.map +1 -0
  93. package/lib/config.js +35 -0
  94. package/lib/config.js.map +1 -0
  95. package/lib/dlv.d.ts +14 -0
  96. package/lib/dlv.d.ts.map +1 -0
  97. package/lib/dlv.js +49 -0
  98. package/lib/dlv.js.map +1 -0
  99. package/lib/encodings.d.ts +52 -0
  100. package/lib/encodings.d.ts.map +1 -0
  101. package/lib/encodings.js +368 -0
  102. package/lib/encodings.js.map +1 -0
  103. package/lib/env.d.ts +15 -0
  104. package/lib/env.d.ts.map +1 -0
  105. package/lib/env.js +65 -0
  106. package/lib/env.js.map +1 -0
  107. package/lib/event-streams.d.ts +17 -0
  108. package/lib/event-streams.d.ts.map +1 -0
  109. package/lib/event-streams.js +220 -0
  110. package/lib/event-streams.js.map +1 -0
  111. package/lib/files.d.ts +8 -0
  112. package/lib/files.d.ts.map +1 -0
  113. package/lib/files.js +36 -0
  114. package/lib/files.js.map +1 -0
  115. package/lib/http.d.ts +67 -0
  116. package/lib/http.d.ts.map +1 -0
  117. package/lib/http.js +217 -0
  118. package/lib/http.js.map +1 -0
  119. package/lib/is-plain-object.d.ts +2 -0
  120. package/lib/is-plain-object.d.ts.map +1 -0
  121. package/lib/is-plain-object.js +41 -0
  122. package/lib/is-plain-object.js.map +1 -0
  123. package/lib/logger.d.ts +6 -0
  124. package/lib/logger.d.ts.map +1 -0
  125. package/lib/logger.js +6 -0
  126. package/lib/logger.js.map +1 -0
  127. package/lib/matchers.d.ts +64 -0
  128. package/lib/matchers.d.ts.map +1 -0
  129. package/lib/matchers.js +207 -0
  130. package/lib/matchers.js.map +1 -0
  131. package/lib/primitives.d.ts +23 -0
  132. package/lib/primitives.d.ts.map +1 -0
  133. package/lib/primitives.js +104 -0
  134. package/lib/primitives.js.map +1 -0
  135. package/lib/retries.d.ts +38 -0
  136. package/lib/retries.d.ts.map +1 -0
  137. package/lib/retries.js +154 -0
  138. package/lib/retries.js.map +1 -0
  139. package/lib/schemas.d.ts +19 -0
  140. package/lib/schemas.d.ts.map +1 -0
  141. package/lib/schemas.js +62 -0
  142. package/lib/schemas.js.map +1 -0
  143. package/lib/sdks.d.ts +60 -0
  144. package/lib/sdks.d.ts.map +1 -0
  145. package/lib/sdks.js +280 -0
  146. package/lib/sdks.js.map +1 -0
  147. package/lib/security.d.ts +82 -0
  148. package/lib/security.d.ts.map +1 -0
  149. package/lib/security.js +139 -0
  150. package/lib/security.js.map +1 -0
  151. package/lib/url.d.ts +5 -0
  152. package/lib/url.d.ts.map +1 -0
  153. package/lib/url.js +25 -0
  154. package/lib/url.js.map +1 -0
  155. package/models/components/appendinput.d.ts +49 -0
  156. package/models/components/appendinput.d.ts.map +1 -0
  157. package/models/components/appendinput.js +85 -0
  158. package/models/components/appendinput.js.map +1 -0
  159. package/models/components/appendoutput.d.ts +51 -0
  160. package/models/components/appendoutput.d.ts.map +1 -0
  161. package/models/components/appendoutput.js +86 -0
  162. package/models/components/appendoutput.js.map +1 -0
  163. package/models/components/appendrecord.d.ts +40 -0
  164. package/models/components/appendrecord.d.ts.map +1 -0
  165. package/models/components/appendrecord.js +71 -0
  166. package/models/components/appendrecord.js.map +1 -0
  167. package/models/components/assignment.d.ts +90 -0
  168. package/models/components/assignment.d.ts.map +1 -0
  169. package/models/components/assignment.js +127 -0
  170. package/models/components/assignment.js.map +1 -0
  171. package/models/components/basinconfig.d.ts +33 -0
  172. package/models/components/basinconfig.d.ts.map +1 -0
  173. package/models/components/basinconfig.js +79 -0
  174. package/models/components/basinconfig.js.map +1 -0
  175. package/models/components/basininfo.d.ts +51 -0
  176. package/models/components/basininfo.d.ts.map +1 -0
  177. package/models/components/basininfo.js +76 -0
  178. package/models/components/basininfo.js.map +1 -0
  179. package/models/components/basinstate.d.ts +40 -0
  180. package/models/components/basinstate.d.ts.map +1 -0
  181. package/models/components/basinstate.js +66 -0
  182. package/models/components/basinstate.js.map +1 -0
  183. package/models/components/checktailresponse.d.ts +35 -0
  184. package/models/components/checktailresponse.d.ts.map +1 -0
  185. package/models/components/checktailresponse.js +78 -0
  186. package/models/components/checktailresponse.js.map +1 -0
  187. package/models/components/createbasinrequest.d.ts +36 -0
  188. package/models/components/createbasinrequest.d.ts.map +1 -0
  189. package/models/components/createbasinrequest.js +73 -0
  190. package/models/components/createbasinrequest.js.map +1 -0
  191. package/models/components/createstreamrequest.d.ts +33 -0
  192. package/models/components/createstreamrequest.d.ts.map +1 -0
  193. package/models/components/createstreamrequest.js +70 -0
  194. package/models/components/createstreamrequest.js.map +1 -0
  195. package/models/components/header.d.ts +43 -0
  196. package/models/components/header.d.ts.map +1 -0
  197. package/models/components/header.js +72 -0
  198. package/models/components/header.js.map +1 -0
  199. package/models/components/index.d.ts +23 -0
  200. package/models/components/index.d.ts.map +1 -0
  201. package/models/components/index.js +42 -0
  202. package/models/components/index.js.map +1 -0
  203. package/models/components/listbasinsresponse.d.ts +41 -0
  204. package/models/components/listbasinsresponse.d.ts.map +1 -0
  205. package/models/components/listbasinsresponse.js +81 -0
  206. package/models/components/listbasinsresponse.js.map +1 -0
  207. package/models/components/liststreamsresponse.d.ts +41 -0
  208. package/models/components/liststreamsresponse.d.ts.map +1 -0
  209. package/models/components/liststreamsresponse.js +81 -0
  210. package/models/components/liststreamsresponse.js.map +1 -0
  211. package/models/components/output.d.ts +140 -0
  212. package/models/components/output.d.ts.map +1 -0
  213. package/models/components/output.js +174 -0
  214. package/models/components/output.js.map +1 -0
  215. package/models/components/readresponse.d.ts +83 -0
  216. package/models/components/readresponse.d.ts.map +1 -0
  217. package/models/components/readresponse.js +141 -0
  218. package/models/components/readresponse.js.map +1 -0
  219. package/models/components/retentionpolicy.d.ts +68 -0
  220. package/models/components/retentionpolicy.d.ts.map +1 -0
  221. package/models/components/retentionpolicy.js +94 -0
  222. package/models/components/retentionpolicy.js.map +1 -0
  223. package/models/components/security.d.ts +29 -0
  224. package/models/components/security.d.ts.map +1 -0
  225. package/models/components/security.js +69 -0
  226. package/models/components/security.js.map +1 -0
  227. package/models/components/sequencedrecord.d.ts +46 -0
  228. package/models/components/sequencedrecord.d.ts.map +1 -0
  229. package/models/components/sequencedrecord.js +83 -0
  230. package/models/components/sequencedrecord.js.map +1 -0
  231. package/models/components/sequencedrecordbatch.d.ts +36 -0
  232. package/models/components/sequencedrecordbatch.d.ts.map +1 -0
  233. package/models/components/sequencedrecordbatch.js +70 -0
  234. package/models/components/sequencedrecordbatch.js.map +1 -0
  235. package/models/components/storageclass.d.ts +37 -0
  236. package/models/components/storageclass.d.ts.map +1 -0
  237. package/models/components/storageclass.js +64 -0
  238. package/models/components/storageclass.js.map +1 -0
  239. package/models/components/streamconfig.d.ts +39 -0
  240. package/models/components/streamconfig.d.ts.map +1 -0
  241. package/models/components/streamconfig.js +84 -0
  242. package/models/components/streamconfig.js.map +1 -0
  243. package/models/components/streaminfo.d.ts +45 -0
  244. package/models/components/streaminfo.d.ts.map +1 -0
  245. package/models/components/streaminfo.js +84 -0
  246. package/models/components/streaminfo.js.map +1 -0
  247. package/models/errors/apierror.d.ts +8 -0
  248. package/models/errors/apierror.d.ts.map +1 -0
  249. package/models/errors/apierror.js +21 -0
  250. package/models/errors/apierror.js.map +1 -0
  251. package/models/errors/errorresponse.d.ts +31 -0
  252. package/models/errors/errorresponse.d.ts.map +1 -0
  253. package/models/errors/errorresponse.js +77 -0
  254. package/models/errors/errorresponse.js.map +1 -0
  255. package/models/errors/httpclienterrors.d.ts +44 -0
  256. package/models/errors/httpclienterrors.d.ts.map +1 -0
  257. package/models/errors/httpclienterrors.js +78 -0
  258. package/models/errors/httpclienterrors.js.map +1 -0
  259. package/models/errors/index.d.ts +5 -0
  260. package/models/errors/index.d.ts.map +1 -0
  261. package/models/errors/index.js +24 -0
  262. package/models/errors/index.js.map +1 -0
  263. package/models/errors/sdkvalidationerror.d.ts +20 -0
  264. package/models/errors/sdkvalidationerror.d.ts.map +1 -0
  265. package/models/errors/sdkvalidationerror.js +115 -0
  266. package/models/errors/sdkvalidationerror.js.map +1 -0
  267. package/models/operations/append.d.ts +97 -0
  268. package/models/operations/append.d.ts.map +1 -0
  269. package/models/operations/append.js +134 -0
  270. package/models/operations/append.js.map +1 -0
  271. package/models/operations/checktail.d.ts +33 -0
  272. package/models/operations/checktail.d.ts.map +1 -0
  273. package/models/operations/checktail.js +75 -0
  274. package/models/operations/checktail.js.map +1 -0
  275. package/models/operations/createbasin.d.ts +37 -0
  276. package/models/operations/createbasin.d.ts.map +1 -0
  277. package/models/operations/createbasin.js +85 -0
  278. package/models/operations/createbasin.js.map +1 -0
  279. package/models/operations/createstream.d.ts +38 -0
  280. package/models/operations/createstream.d.ts.map +1 -0
  281. package/models/operations/createstream.js +91 -0
  282. package/models/operations/createstream.js.map +1 -0
  283. package/models/operations/deletebasin.d.ts +32 -0
  284. package/models/operations/deletebasin.d.ts.map +1 -0
  285. package/models/operations/deletebasin.js +69 -0
  286. package/models/operations/deletebasin.js.map +1 -0
  287. package/models/operations/deletestream.d.ts +33 -0
  288. package/models/operations/deletestream.d.ts.map +1 -0
  289. package/models/operations/deletestream.js +75 -0
  290. package/models/operations/deletestream.js.map +1 -0
  291. package/models/operations/getbasinconfig.d.ts +32 -0
  292. package/models/operations/getbasinconfig.d.ts.map +1 -0
  293. package/models/operations/getbasinconfig.js +69 -0
  294. package/models/operations/getbasinconfig.js.map +1 -0
  295. package/models/operations/getstreamconfig.d.ts +33 -0
  296. package/models/operations/getstreamconfig.d.ts.map +1 -0
  297. package/models/operations/getstreamconfig.js +75 -0
  298. package/models/operations/getstreamconfig.js.map +1 -0
  299. package/models/operations/index.d.ts +14 -0
  300. package/models/operations/index.d.ts.map +1 -0
  301. package/models/operations/index.js +33 -0
  302. package/models/operations/index.js.map +1 -0
  303. package/models/operations/listbasins.d.ts +72 -0
  304. package/models/operations/listbasins.d.ts.map +1 -0
  305. package/models/operations/listbasins.js +118 -0
  306. package/models/operations/listbasins.js.map +1 -0
  307. package/models/operations/liststreams.d.ts +73 -0
  308. package/models/operations/liststreams.d.ts.map +1 -0
  309. package/models/operations/liststreams.js +124 -0
  310. package/models/operations/liststreams.js.map +1 -0
  311. package/models/operations/read.d.ts +163 -0
  312. package/models/operations/read.d.ts.map +1 -0
  313. package/models/operations/read.js +200 -0
  314. package/models/operations/read.js.map +1 -0
  315. package/models/operations/reconfigurebasin.d.ts +35 -0
  316. package/models/operations/reconfigurebasin.d.ts.map +1 -0
  317. package/models/operations/reconfigurebasin.js +81 -0
  318. package/models/operations/reconfigurebasin.js.map +1 -0
  319. package/models/operations/reconfigurestream.d.ts +36 -0
  320. package/models/operations/reconfigurestream.d.ts.map +1 -0
  321. package/models/operations/reconfigurestream.js +87 -0
  322. package/models/operations/reconfigurestream.js.map +1 -0
  323. package/package.json +32 -0
  324. package/sdk/account.d.ts +29 -0
  325. package/sdk/account.d.ts.map +1 -0
  326. package/sdk/account.js +48 -0
  327. package/sdk/account.js.map +1 -0
  328. package/sdk/basin.d.ts +29 -0
  329. package/sdk/basin.d.ts.map +1 -0
  330. package/sdk/basin.js +48 -0
  331. package/sdk/basin.js.map +1 -0
  332. package/sdk/index.d.ts +2 -0
  333. package/sdk/index.d.ts.map +1 -0
  334. package/sdk/index.js +21 -0
  335. package/sdk/index.js.map +1 -0
  336. package/sdk/sdk.d.ts +13 -0
  337. package/sdk/sdk.d.ts.map +1 -0
  338. package/sdk/sdk.js +23 -0
  339. package/sdk/sdk.js.map +1 -0
  340. package/sdk/stream.d.ts +22 -0
  341. package/sdk/stream.d.ts.map +1 -0
  342. package/sdk/stream.js +35 -0
  343. package/sdk/stream.js.map +1 -0
  344. package/src/core.ts +13 -0
  345. package/src/funcs/accountCreateBasin.ts +149 -0
  346. package/src/funcs/accountDeleteBasin.ts +141 -0
  347. package/src/funcs/accountGetBasinConfig.ts +141 -0
  348. package/src/funcs/accountListBasins.ts +188 -0
  349. package/src/funcs/accountReconfigureBasin.ts +142 -0
  350. package/src/funcs/basinCreateStream.ts +155 -0
  351. package/src/funcs/basinDeleteStream.ts +147 -0
  352. package/src/funcs/basinGetStreamConfig.ts +147 -0
  353. package/src/funcs/basinListStreams.ts +196 -0
  354. package/src/funcs/basinReconfigureStream.ts +148 -0
  355. package/src/funcs/streamAppend.ts +152 -0
  356. package/src/funcs/streamCheckTail.ts +147 -0
  357. package/src/funcs/streamRead.ts +163 -0
  358. package/src/hooks/hooks.ts +132 -0
  359. package/src/hooks/index.ts +6 -0
  360. package/src/hooks/registration.ts +14 -0
  361. package/src/hooks/types.ts +109 -0
  362. package/src/index.ts +7 -0
  363. package/src/lib/base64.ts +37 -0
  364. package/src/lib/config.ts +60 -0
  365. package/src/lib/dlv.ts +53 -0
  366. package/src/lib/encodings.ts +483 -0
  367. package/src/lib/env.ts +41 -0
  368. package/src/lib/event-streams.ts +264 -0
  369. package/src/lib/files.ts +40 -0
  370. package/src/lib/http.ts +323 -0
  371. package/src/lib/is-plain-object.ts +43 -0
  372. package/src/lib/logger.ts +9 -0
  373. package/src/lib/matchers.ts +325 -0
  374. package/src/lib/primitives.ts +136 -0
  375. package/src/lib/retries.ts +219 -0
  376. package/src/lib/schemas.ts +91 -0
  377. package/src/lib/sdks.ts +400 -0
  378. package/src/lib/security.ts +254 -0
  379. package/src/lib/url.ts +33 -0
  380. package/src/models/components/appendinput.ts +102 -0
  381. package/src/models/components/appendoutput.ts +101 -0
  382. package/src/models/components/appendrecord.ts +75 -0
  383. package/src/models/components/assignment.ts +177 -0
  384. package/src/models/components/basinconfig.ts +80 -0
  385. package/src/models/components/basininfo.ts +94 -0
  386. package/src/models/components/basinstate.ts +39 -0
  387. package/src/models/components/checktailresponse.ts +81 -0
  388. package/src/models/components/createbasinrequest.ts +85 -0
  389. package/src/models/components/createstreamrequest.ts +75 -0
  390. package/src/models/components/header.ts +75 -0
  391. package/src/models/components/index.ts +26 -0
  392. package/src/models/components/listbasinsresponse.ts +94 -0
  393. package/src/models/components/liststreamsresponse.ts +94 -0
  394. package/src/models/components/output.ts +277 -0
  395. package/src/models/components/readresponse.ts +197 -0
  396. package/src/models/components/retentionpolicy.ts +122 -0
  397. package/src/models/components/security.ts +62 -0
  398. package/src/models/components/sequencedrecord.ts +99 -0
  399. package/src/models/components/sequencedrecordbatch.ts +78 -0
  400. package/src/models/components/storageclass.ts +38 -0
  401. package/src/models/components/streamconfig.ts +94 -0
  402. package/src/models/components/streaminfo.ts +93 -0
  403. package/src/models/errors/apierror.ts +27 -0
  404. package/src/models/errors/errorresponse.ts +69 -0
  405. package/src/models/errors/httpclienterrors.ts +62 -0
  406. package/src/models/errors/index.ts +8 -0
  407. package/src/models/errors/sdkvalidationerror.ts +97 -0
  408. package/src/models/operations/append.ts +176 -0
  409. package/src/models/operations/checktail.ts +76 -0
  410. package/src/models/operations/createbasin.ts +89 -0
  411. package/src/models/operations/createstream.ts +96 -0
  412. package/src/models/operations/deletebasin.ts +69 -0
  413. package/src/models/operations/deletestream.ts +76 -0
  414. package/src/models/operations/getbasinconfig.ts +69 -0
  415. package/src/models/operations/getstreamconfig.ts +76 -0
  416. package/src/models/operations/index.ts +17 -0
  417. package/src/models/operations/listbasins.ts +163 -0
  418. package/src/models/operations/liststreams.ts +170 -0
  419. package/src/models/operations/read.ts +309 -0
  420. package/src/models/operations/reconfigurebasin.ts +83 -0
  421. package/src/models/operations/reconfigurestream.ts +90 -0
  422. package/src/sdk/account.ts +86 -0
  423. package/src/sdk/basin.ts +86 -0
  424. package/src/sdk/index.ts +5 -0
  425. package/src/sdk/sdk.ts +25 -0
  426. package/src/sdk/stream.ts +57 -0
  427. package/src/types/blobs.ts +31 -0
  428. package/src/types/constdatetime.ts +15 -0
  429. package/src/types/enums.ts +16 -0
  430. package/src/types/fp.ts +50 -0
  431. package/src/types/index.ts +11 -0
  432. package/src/types/operations.ts +105 -0
  433. package/src/types/rfcdate.ts +54 -0
  434. package/src/types/streams.ts +21 -0
  435. package/tsconfig.json +41 -0
  436. package/types/blobs.d.ts +4 -0
  437. package/types/blobs.d.ts.map +1 -0
  438. package/types/blobs.js +62 -0
  439. package/types/blobs.js.map +1 -0
  440. package/types/constdatetime.d.ts +3 -0
  441. package/types/constdatetime.d.ts.map +1 -0
  442. package/types/constdatetime.js +46 -0
  443. package/types/constdatetime.js.map +1 -0
  444. package/types/enums.d.ts +12 -0
  445. package/types/enums.d.ts.map +1 -0
  446. package/types/enums.js +10 -0
  447. package/types/enums.js.map +1 -0
  448. package/types/fp.d.ts +31 -0
  449. package/types/fp.d.ts.map +1 -0
  450. package/types/fp.js +37 -0
  451. package/types/fp.js.map +1 -0
  452. package/types/index.d.ts +8 -0
  453. package/types/index.d.ts.map +1 -0
  454. package/types/index.js +16 -0
  455. package/types/index.js.map +1 -0
  456. package/types/operations.d.ts +27 -0
  457. package/types/operations.d.ts.map +1 -0
  458. package/types/operations.js +83 -0
  459. package/types/operations.js.map +1 -0
  460. package/types/rfcdate.d.ts +21 -0
  461. package/types/rfcdate.d.ts.map +1 -0
  462. package/types/rfcdate.js +46 -0
  463. package/types/rfcdate.js.map +1 -0
  464. package/types/streams.d.ts +2 -0
  465. package/types/streams.d.ts.map +1 -0
  466. package/types/streams.js +18 -0
  467. package/types/streams.js.map +1 -0
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ export * from "./appendinput.js";
6
+ export * from "./appendoutput.js";
7
+ export * from "./appendrecord.js";
8
+ export * from "./assignment.js";
9
+ export * from "./basinconfig.js";
10
+ export * from "./basininfo.js";
11
+ export * from "./basinstate.js";
12
+ export * from "./checktailresponse.js";
13
+ export * from "./createbasinrequest.js";
14
+ export * from "./createstreamrequest.js";
15
+ export * from "./header.js";
16
+ export * from "./listbasinsresponse.js";
17
+ export * from "./liststreamsresponse.js";
18
+ export * from "./output.js";
19
+ export * from "./readresponse.js";
20
+ export * from "./retentionpolicy.js";
21
+ export * from "./security.js";
22
+ export * from "./sequencedrecord.js";
23
+ export * from "./sequencedrecordbatch.js";
24
+ export * from "./storageclass.js";
25
+ export * from "./streamconfig.js";
26
+ export * from "./streaminfo.js";
@@ -0,0 +1,94 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ BasinInfo,
12
+ BasinInfo$inboundSchema,
13
+ BasinInfo$Outbound,
14
+ BasinInfo$outboundSchema,
15
+ } from "./basininfo.js";
16
+
17
+ /**
18
+ * List basins response.
19
+ */
20
+ export type ListBasinsResponse = {
21
+ /**
22
+ * Matching basins.
23
+ */
24
+ basins: Array<BasinInfo>;
25
+ /**
26
+ * If set, indicates there are more results that can be listed with `start_after`.
27
+ */
28
+ hasMore: boolean;
29
+ };
30
+
31
+ /** @internal */
32
+ export const ListBasinsResponse$inboundSchema: z.ZodType<
33
+ ListBasinsResponse,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ basins: z.array(BasinInfo$inboundSchema),
38
+ has_more: z.boolean(),
39
+ }).transform((v) => {
40
+ return remap$(v, {
41
+ "has_more": "hasMore",
42
+ });
43
+ });
44
+
45
+ /** @internal */
46
+ export type ListBasinsResponse$Outbound = {
47
+ basins: Array<BasinInfo$Outbound>;
48
+ has_more: boolean;
49
+ };
50
+
51
+ /** @internal */
52
+ export const ListBasinsResponse$outboundSchema: z.ZodType<
53
+ ListBasinsResponse$Outbound,
54
+ z.ZodTypeDef,
55
+ ListBasinsResponse
56
+ > = z.object({
57
+ basins: z.array(BasinInfo$outboundSchema),
58
+ hasMore: z.boolean(),
59
+ }).transform((v) => {
60
+ return remap$(v, {
61
+ hasMore: "has_more",
62
+ });
63
+ });
64
+
65
+ /**
66
+ * @internal
67
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
68
+ */
69
+ export namespace ListBasinsResponse$ {
70
+ /** @deprecated use `ListBasinsResponse$inboundSchema` instead. */
71
+ export const inboundSchema = ListBasinsResponse$inboundSchema;
72
+ /** @deprecated use `ListBasinsResponse$outboundSchema` instead. */
73
+ export const outboundSchema = ListBasinsResponse$outboundSchema;
74
+ /** @deprecated use `ListBasinsResponse$Outbound` instead. */
75
+ export type Outbound = ListBasinsResponse$Outbound;
76
+ }
77
+
78
+ export function listBasinsResponseToJSON(
79
+ listBasinsResponse: ListBasinsResponse,
80
+ ): string {
81
+ return JSON.stringify(
82
+ ListBasinsResponse$outboundSchema.parse(listBasinsResponse),
83
+ );
84
+ }
85
+
86
+ export function listBasinsResponseFromJSON(
87
+ jsonString: string,
88
+ ): SafeParseResult<ListBasinsResponse, SDKValidationError> {
89
+ return safeParse(
90
+ jsonString,
91
+ (x) => ListBasinsResponse$inboundSchema.parse(JSON.parse(x)),
92
+ `Failed to parse 'ListBasinsResponse' from JSON`,
93
+ );
94
+ }
@@ -0,0 +1,94 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ StreamInfo,
12
+ StreamInfo$inboundSchema,
13
+ StreamInfo$Outbound,
14
+ StreamInfo$outboundSchema,
15
+ } from "./streaminfo.js";
16
+
17
+ /**
18
+ * List streams response.
19
+ */
20
+ export type ListStreamsResponse = {
21
+ /**
22
+ * If set, indicates there are more results that can be listed with `start_after`.
23
+ */
24
+ hasMore: boolean;
25
+ /**
26
+ * Matching streams.
27
+ */
28
+ streams: Array<StreamInfo>;
29
+ };
30
+
31
+ /** @internal */
32
+ export const ListStreamsResponse$inboundSchema: z.ZodType<
33
+ ListStreamsResponse,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ has_more: z.boolean(),
38
+ streams: z.array(StreamInfo$inboundSchema),
39
+ }).transform((v) => {
40
+ return remap$(v, {
41
+ "has_more": "hasMore",
42
+ });
43
+ });
44
+
45
+ /** @internal */
46
+ export type ListStreamsResponse$Outbound = {
47
+ has_more: boolean;
48
+ streams: Array<StreamInfo$Outbound>;
49
+ };
50
+
51
+ /** @internal */
52
+ export const ListStreamsResponse$outboundSchema: z.ZodType<
53
+ ListStreamsResponse$Outbound,
54
+ z.ZodTypeDef,
55
+ ListStreamsResponse
56
+ > = z.object({
57
+ hasMore: z.boolean(),
58
+ streams: z.array(StreamInfo$outboundSchema),
59
+ }).transform((v) => {
60
+ return remap$(v, {
61
+ hasMore: "has_more",
62
+ });
63
+ });
64
+
65
+ /**
66
+ * @internal
67
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
68
+ */
69
+ export namespace ListStreamsResponse$ {
70
+ /** @deprecated use `ListStreamsResponse$inboundSchema` instead. */
71
+ export const inboundSchema = ListStreamsResponse$inboundSchema;
72
+ /** @deprecated use `ListStreamsResponse$outboundSchema` instead. */
73
+ export const outboundSchema = ListStreamsResponse$outboundSchema;
74
+ /** @deprecated use `ListStreamsResponse$Outbound` instead. */
75
+ export type Outbound = ListStreamsResponse$Outbound;
76
+ }
77
+
78
+ export function listStreamsResponseToJSON(
79
+ listStreamsResponse: ListStreamsResponse,
80
+ ): string {
81
+ return JSON.stringify(
82
+ ListStreamsResponse$outboundSchema.parse(listStreamsResponse),
83
+ );
84
+ }
85
+
86
+ export function listStreamsResponseFromJSON(
87
+ jsonString: string,
88
+ ): SafeParseResult<ListStreamsResponse, SDKValidationError> {
89
+ return safeParse(
90
+ jsonString,
91
+ (x) => ListStreamsResponse$inboundSchema.parse(JSON.parse(x)),
92
+ `Failed to parse 'ListStreamsResponse' from JSON`,
93
+ );
94
+ }
@@ -0,0 +1,277 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ SequencedRecordBatch,
12
+ SequencedRecordBatch$inboundSchema,
13
+ SequencedRecordBatch$Outbound,
14
+ SequencedRecordBatch$outboundSchema,
15
+ } from "./sequencedrecordbatch.js";
16
+
17
+ /**
18
+ * Sequence number for the next record on this stream, in case the requested `start_seq_num` was larger.
19
+ *
20
+ * @remarks
21
+ * If returned in a streaming read session, this will be a terminal reply.
22
+ */
23
+ export type Three = {
24
+ /**
25
+ * Sequence number for the next record on this stream, in case the requested `start_seq_num` was larger.
26
+ *
27
+ * @remarks
28
+ * If returned in a streaming read session, this will be a terminal reply.
29
+ */
30
+ nextSeqNum: number;
31
+ };
32
+
33
+ /**
34
+ * Sequence number for the first record on this stream, in case the requested `start_seq_num` is smaller.
35
+ *
36
+ * @remarks
37
+ * If returned in a streaming read session, this will be a terminal reply, to signal that there is uncertainty about whether some records may be omitted.
38
+ * The client can re-establish the session starting at this sequence number.
39
+ */
40
+ export type Output2 = {
41
+ /**
42
+ * Sequence number for the first record on this stream, in case the requested `start_seq_num` is smaller.
43
+ *
44
+ * @remarks
45
+ * If returned in a streaming read session, this will be a terminal reply, to signal that there is uncertainty about whether some records may be omitted.
46
+ * The client can re-establish the session starting at this sequence number.
47
+ */
48
+ firstSeqNum: number;
49
+ };
50
+
51
+ /**
52
+ * Batch of records.
53
+ *
54
+ * @remarks
55
+ * This batch can be empty only if a `ReadLimit` was provided in the associated read request, but the first record
56
+ * that could have been returned would violate the limit.
57
+ */
58
+ export type Output1 = {
59
+ /**
60
+ * A batch of sequenced records.
61
+ */
62
+ batch: SequencedRecordBatch;
63
+ };
64
+
65
+ /**
66
+ * Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
67
+ */
68
+ export type Output = Output1 | Output2 | Three;
69
+
70
+ /** @internal */
71
+ export const Three$inboundSchema: z.ZodType<Three, z.ZodTypeDef, unknown> = z
72
+ .object({
73
+ next_seq_num: z.number().int(),
74
+ }).transform((v) => {
75
+ return remap$(v, {
76
+ "next_seq_num": "nextSeqNum",
77
+ });
78
+ });
79
+
80
+ /** @internal */
81
+ export type Three$Outbound = {
82
+ next_seq_num: number;
83
+ };
84
+
85
+ /** @internal */
86
+ export const Three$outboundSchema: z.ZodType<
87
+ Three$Outbound,
88
+ z.ZodTypeDef,
89
+ Three
90
+ > = z.object({
91
+ nextSeqNum: z.number().int(),
92
+ }).transform((v) => {
93
+ return remap$(v, {
94
+ nextSeqNum: "next_seq_num",
95
+ });
96
+ });
97
+
98
+ /**
99
+ * @internal
100
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
101
+ */
102
+ export namespace Three$ {
103
+ /** @deprecated use `Three$inboundSchema` instead. */
104
+ export const inboundSchema = Three$inboundSchema;
105
+ /** @deprecated use `Three$outboundSchema` instead. */
106
+ export const outboundSchema = Three$outboundSchema;
107
+ /** @deprecated use `Three$Outbound` instead. */
108
+ export type Outbound = Three$Outbound;
109
+ }
110
+
111
+ export function threeToJSON(three: Three): string {
112
+ return JSON.stringify(Three$outboundSchema.parse(three));
113
+ }
114
+
115
+ export function threeFromJSON(
116
+ jsonString: string,
117
+ ): SafeParseResult<Three, SDKValidationError> {
118
+ return safeParse(
119
+ jsonString,
120
+ (x) => Three$inboundSchema.parse(JSON.parse(x)),
121
+ `Failed to parse 'Three' from JSON`,
122
+ );
123
+ }
124
+
125
+ /** @internal */
126
+ export const Output2$inboundSchema: z.ZodType<Output2, z.ZodTypeDef, unknown> =
127
+ z.object({
128
+ first_seq_num: z.number().int(),
129
+ }).transform((v) => {
130
+ return remap$(v, {
131
+ "first_seq_num": "firstSeqNum",
132
+ });
133
+ });
134
+
135
+ /** @internal */
136
+ export type Output2$Outbound = {
137
+ first_seq_num: number;
138
+ };
139
+
140
+ /** @internal */
141
+ export const Output2$outboundSchema: z.ZodType<
142
+ Output2$Outbound,
143
+ z.ZodTypeDef,
144
+ Output2
145
+ > = z.object({
146
+ firstSeqNum: z.number().int(),
147
+ }).transform((v) => {
148
+ return remap$(v, {
149
+ firstSeqNum: "first_seq_num",
150
+ });
151
+ });
152
+
153
+ /**
154
+ * @internal
155
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
156
+ */
157
+ export namespace Output2$ {
158
+ /** @deprecated use `Output2$inboundSchema` instead. */
159
+ export const inboundSchema = Output2$inboundSchema;
160
+ /** @deprecated use `Output2$outboundSchema` instead. */
161
+ export const outboundSchema = Output2$outboundSchema;
162
+ /** @deprecated use `Output2$Outbound` instead. */
163
+ export type Outbound = Output2$Outbound;
164
+ }
165
+
166
+ export function output2ToJSON(output2: Output2): string {
167
+ return JSON.stringify(Output2$outboundSchema.parse(output2));
168
+ }
169
+
170
+ export function output2FromJSON(
171
+ jsonString: string,
172
+ ): SafeParseResult<Output2, SDKValidationError> {
173
+ return safeParse(
174
+ jsonString,
175
+ (x) => Output2$inboundSchema.parse(JSON.parse(x)),
176
+ `Failed to parse 'Output2' from JSON`,
177
+ );
178
+ }
179
+
180
+ /** @internal */
181
+ export const Output1$inboundSchema: z.ZodType<Output1, z.ZodTypeDef, unknown> =
182
+ z.object({
183
+ batch: SequencedRecordBatch$inboundSchema,
184
+ });
185
+
186
+ /** @internal */
187
+ export type Output1$Outbound = {
188
+ batch: SequencedRecordBatch$Outbound;
189
+ };
190
+
191
+ /** @internal */
192
+ export const Output1$outboundSchema: z.ZodType<
193
+ Output1$Outbound,
194
+ z.ZodTypeDef,
195
+ Output1
196
+ > = z.object({
197
+ batch: SequencedRecordBatch$outboundSchema,
198
+ });
199
+
200
+ /**
201
+ * @internal
202
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
203
+ */
204
+ export namespace Output1$ {
205
+ /** @deprecated use `Output1$inboundSchema` instead. */
206
+ export const inboundSchema = Output1$inboundSchema;
207
+ /** @deprecated use `Output1$outboundSchema` instead. */
208
+ export const outboundSchema = Output1$outboundSchema;
209
+ /** @deprecated use `Output1$Outbound` instead. */
210
+ export type Outbound = Output1$Outbound;
211
+ }
212
+
213
+ export function output1ToJSON(output1: Output1): string {
214
+ return JSON.stringify(Output1$outboundSchema.parse(output1));
215
+ }
216
+
217
+ export function output1FromJSON(
218
+ jsonString: string,
219
+ ): SafeParseResult<Output1, SDKValidationError> {
220
+ return safeParse(
221
+ jsonString,
222
+ (x) => Output1$inboundSchema.parse(JSON.parse(x)),
223
+ `Failed to parse 'Output1' from JSON`,
224
+ );
225
+ }
226
+
227
+ /** @internal */
228
+ export const Output$inboundSchema: z.ZodType<Output, z.ZodTypeDef, unknown> = z
229
+ .union([
230
+ z.lazy(() => Output1$inboundSchema),
231
+ z.lazy(() => Output2$inboundSchema),
232
+ z.lazy(() => Three$inboundSchema),
233
+ ]);
234
+
235
+ /** @internal */
236
+ export type Output$Outbound =
237
+ | Output1$Outbound
238
+ | Output2$Outbound
239
+ | Three$Outbound;
240
+
241
+ /** @internal */
242
+ export const Output$outboundSchema: z.ZodType<
243
+ Output$Outbound,
244
+ z.ZodTypeDef,
245
+ Output
246
+ > = z.union([
247
+ z.lazy(() => Output1$outboundSchema),
248
+ z.lazy(() => Output2$outboundSchema),
249
+ z.lazy(() => Three$outboundSchema),
250
+ ]);
251
+
252
+ /**
253
+ * @internal
254
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
255
+ */
256
+ export namespace Output$ {
257
+ /** @deprecated use `Output$inboundSchema` instead. */
258
+ export const inboundSchema = Output$inboundSchema;
259
+ /** @deprecated use `Output$outboundSchema` instead. */
260
+ export const outboundSchema = Output$outboundSchema;
261
+ /** @deprecated use `Output$Outbound` instead. */
262
+ export type Outbound = Output$Outbound;
263
+ }
264
+
265
+ export function outputToJSON(output: Output): string {
266
+ return JSON.stringify(Output$outboundSchema.parse(output));
267
+ }
268
+
269
+ export function outputFromJSON(
270
+ jsonString: string,
271
+ ): SafeParseResult<Output, SDKValidationError> {
272
+ return safeParse(
273
+ jsonString,
274
+ (x) => Output$inboundSchema.parse(JSON.parse(x)),
275
+ `Failed to parse 'Output' from JSON`,
276
+ );
277
+ }
@@ -0,0 +1,197 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ Output,
11
+ Output$inboundSchema,
12
+ Output$Outbound,
13
+ Output$outboundSchema,
14
+ } from "./output.js";
15
+
16
+ export type ReadResponse2 = {
17
+ data: string;
18
+ event: string;
19
+ };
20
+
21
+ export type ReadResponse1 = {
22
+ /**
23
+ * Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
24
+ */
25
+ data: Output;
26
+ event: string;
27
+ };
28
+
29
+ export type ReadResponse = ReadResponse1 | ReadResponse2;
30
+
31
+ /** @internal */
32
+ export const ReadResponse2$inboundSchema: z.ZodType<
33
+ ReadResponse2,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ data: z.string(),
38
+ event: z.string(),
39
+ });
40
+
41
+ /** @internal */
42
+ export type ReadResponse2$Outbound = {
43
+ data: string;
44
+ event: string;
45
+ };
46
+
47
+ /** @internal */
48
+ export const ReadResponse2$outboundSchema: z.ZodType<
49
+ ReadResponse2$Outbound,
50
+ z.ZodTypeDef,
51
+ ReadResponse2
52
+ > = z.object({
53
+ data: z.string(),
54
+ event: z.string(),
55
+ });
56
+
57
+ /**
58
+ * @internal
59
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
+ */
61
+ export namespace ReadResponse2$ {
62
+ /** @deprecated use `ReadResponse2$inboundSchema` instead. */
63
+ export const inboundSchema = ReadResponse2$inboundSchema;
64
+ /** @deprecated use `ReadResponse2$outboundSchema` instead. */
65
+ export const outboundSchema = ReadResponse2$outboundSchema;
66
+ /** @deprecated use `ReadResponse2$Outbound` instead. */
67
+ export type Outbound = ReadResponse2$Outbound;
68
+ }
69
+
70
+ export function readResponse2ToJSON(readResponse2: ReadResponse2): string {
71
+ return JSON.stringify(ReadResponse2$outboundSchema.parse(readResponse2));
72
+ }
73
+
74
+ export function readResponse2FromJSON(
75
+ jsonString: string,
76
+ ): SafeParseResult<ReadResponse2, SDKValidationError> {
77
+ return safeParse(
78
+ jsonString,
79
+ (x) => ReadResponse2$inboundSchema.parse(JSON.parse(x)),
80
+ `Failed to parse 'ReadResponse2' from JSON`,
81
+ );
82
+ }
83
+
84
+ /** @internal */
85
+ export const ReadResponse1$inboundSchema: z.ZodType<
86
+ ReadResponse1,
87
+ z.ZodTypeDef,
88
+ unknown
89
+ > = z.object({
90
+ data: z.string().transform((v, ctx) => {
91
+ try {
92
+ return JSON.parse(v);
93
+ } catch (err) {
94
+ ctx.addIssue({
95
+ code: z.ZodIssueCode.custom,
96
+ message: `malformed json: ${err}`,
97
+ });
98
+ return z.NEVER;
99
+ }
100
+ }).pipe(Output$inboundSchema),
101
+ event: z.string(),
102
+ });
103
+
104
+ /** @internal */
105
+ export type ReadResponse1$Outbound = {
106
+ data: Output$Outbound;
107
+ event: string;
108
+ };
109
+
110
+ /** @internal */
111
+ export const ReadResponse1$outboundSchema: z.ZodType<
112
+ ReadResponse1$Outbound,
113
+ z.ZodTypeDef,
114
+ ReadResponse1
115
+ > = z.object({
116
+ data: Output$outboundSchema,
117
+ event: z.string(),
118
+ });
119
+
120
+ /**
121
+ * @internal
122
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
123
+ */
124
+ export namespace ReadResponse1$ {
125
+ /** @deprecated use `ReadResponse1$inboundSchema` instead. */
126
+ export const inboundSchema = ReadResponse1$inboundSchema;
127
+ /** @deprecated use `ReadResponse1$outboundSchema` instead. */
128
+ export const outboundSchema = ReadResponse1$outboundSchema;
129
+ /** @deprecated use `ReadResponse1$Outbound` instead. */
130
+ export type Outbound = ReadResponse1$Outbound;
131
+ }
132
+
133
+ export function readResponse1ToJSON(readResponse1: ReadResponse1): string {
134
+ return JSON.stringify(ReadResponse1$outboundSchema.parse(readResponse1));
135
+ }
136
+
137
+ export function readResponse1FromJSON(
138
+ jsonString: string,
139
+ ): SafeParseResult<ReadResponse1, SDKValidationError> {
140
+ return safeParse(
141
+ jsonString,
142
+ (x) => ReadResponse1$inboundSchema.parse(JSON.parse(x)),
143
+ `Failed to parse 'ReadResponse1' from JSON`,
144
+ );
145
+ }
146
+
147
+ /** @internal */
148
+ export const ReadResponse$inboundSchema: z.ZodType<
149
+ ReadResponse,
150
+ z.ZodTypeDef,
151
+ unknown
152
+ > = z.union([
153
+ z.lazy(() => ReadResponse1$inboundSchema),
154
+ z.lazy(() => ReadResponse2$inboundSchema),
155
+ ]);
156
+
157
+ /** @internal */
158
+ export type ReadResponse$Outbound =
159
+ | ReadResponse1$Outbound
160
+ | ReadResponse2$Outbound;
161
+
162
+ /** @internal */
163
+ export const ReadResponse$outboundSchema: z.ZodType<
164
+ ReadResponse$Outbound,
165
+ z.ZodTypeDef,
166
+ ReadResponse
167
+ > = z.union([
168
+ z.lazy(() => ReadResponse1$outboundSchema),
169
+ z.lazy(() => ReadResponse2$outboundSchema),
170
+ ]);
171
+
172
+ /**
173
+ * @internal
174
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
175
+ */
176
+ export namespace ReadResponse$ {
177
+ /** @deprecated use `ReadResponse$inboundSchema` instead. */
178
+ export const inboundSchema = ReadResponse$inboundSchema;
179
+ /** @deprecated use `ReadResponse$outboundSchema` instead. */
180
+ export const outboundSchema = ReadResponse$outboundSchema;
181
+ /** @deprecated use `ReadResponse$Outbound` instead. */
182
+ export type Outbound = ReadResponse$Outbound;
183
+ }
184
+
185
+ export function readResponseToJSON(readResponse: ReadResponse): string {
186
+ return JSON.stringify(ReadResponse$outboundSchema.parse(readResponse));
187
+ }
188
+
189
+ export function readResponseFromJSON(
190
+ jsonString: string,
191
+ ): SafeParseResult<ReadResponse, SDKValidationError> {
192
+ return safeParse(
193
+ jsonString,
194
+ (x) => ReadResponse$inboundSchema.parse(JSON.parse(x)),
195
+ `Failed to parse 'ReadResponse' from JSON`,
196
+ );
197
+ }