@continuous-labs/sdk 0.0.4

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 (675) hide show
  1. package/FUNCTIONS.md +87 -0
  2. package/LICENSE +21 -0
  3. package/README.md +493 -0
  4. package/RUNTIMES.md +48 -0
  5. package/esm/core.d.ts +10 -0
  6. package/esm/core.d.ts.map +1 -0
  7. package/esm/core.js +13 -0
  8. package/esm/core.js.map +1 -0
  9. package/esm/funcs/simulations-create-simulation.d.ts +18 -0
  10. package/esm/funcs/simulations-create-simulation.d.ts.map +1 -0
  11. package/esm/funcs/simulations-create-simulation.js +86 -0
  12. package/esm/funcs/simulations-create-simulation.js.map +1 -0
  13. package/esm/funcs/simulations-delete-simulation.d.ts +18 -0
  14. package/esm/funcs/simulations-delete-simulation.d.ts.map +1 -0
  15. package/esm/funcs/simulations-delete-simulation.js +93 -0
  16. package/esm/funcs/simulations-delete-simulation.js.map +1 -0
  17. package/esm/funcs/simulations-fork-simulation.d.ts +19 -0
  18. package/esm/funcs/simulations-fork-simulation.d.ts.map +1 -0
  19. package/esm/funcs/simulations-fork-simulation.js +93 -0
  20. package/esm/funcs/simulations-fork-simulation.js.map +1 -0
  21. package/esm/funcs/simulations-get-simulation.d.ts +19 -0
  22. package/esm/funcs/simulations-get-simulation.d.ts.map +1 -0
  23. package/esm/funcs/simulations-get-simulation.js +94 -0
  24. package/esm/funcs/simulations-get-simulation.js.map +1 -0
  25. package/esm/funcs/simulations-list-simulation-steps.d.ts +19 -0
  26. package/esm/funcs/simulations-list-simulation-steps.d.ts.map +1 -0
  27. package/esm/funcs/simulations-list-simulation-steps.js +99 -0
  28. package/esm/funcs/simulations-list-simulation-steps.js.map +1 -0
  29. package/esm/funcs/simulations-list-simulations.d.ts +19 -0
  30. package/esm/funcs/simulations-list-simulations.d.ts.map +1 -0
  31. package/esm/funcs/simulations-list-simulations.js +95 -0
  32. package/esm/funcs/simulations-list-simulations.js.map +1 -0
  33. package/esm/funcs/simulations-mint-simulation-token.d.ts +19 -0
  34. package/esm/funcs/simulations-mint-simulation-token.d.ts.map +1 -0
  35. package/esm/funcs/simulations-mint-simulation-token.js +93 -0
  36. package/esm/funcs/simulations-mint-simulation-token.js.map +1 -0
  37. package/esm/funcs/simulations-start-simulation.d.ts +19 -0
  38. package/esm/funcs/simulations-start-simulation.d.ts.map +1 -0
  39. package/esm/funcs/simulations-start-simulation.js +94 -0
  40. package/esm/funcs/simulations-start-simulation.js.map +1 -0
  41. package/esm/funcs/simulations-stop-simulation.d.ts +19 -0
  42. package/esm/funcs/simulations-stop-simulation.d.ts.map +1 -0
  43. package/esm/funcs/simulations-stop-simulation.js +94 -0
  44. package/esm/funcs/simulations-stop-simulation.js.map +1 -0
  45. package/esm/funcs/simulators-build-simulator.d.ts +19 -0
  46. package/esm/funcs/simulators-build-simulator.d.ts.map +1 -0
  47. package/esm/funcs/simulators-build-simulator.js +109 -0
  48. package/esm/funcs/simulators-build-simulator.js.map +1 -0
  49. package/esm/funcs/simulators-cancel-simulator-build.d.ts +19 -0
  50. package/esm/funcs/simulators-cancel-simulator-build.d.ts.map +1 -0
  51. package/esm/funcs/simulators-cancel-simulator-build.js +94 -0
  52. package/esm/funcs/simulators-cancel-simulator-build.js.map +1 -0
  53. package/esm/funcs/simulators-delete-simulator.d.ts +18 -0
  54. package/esm/funcs/simulators-delete-simulator.d.ts.map +1 -0
  55. package/esm/funcs/simulators-delete-simulator.js +93 -0
  56. package/esm/funcs/simulators-delete-simulator.js.map +1 -0
  57. package/esm/funcs/simulators-get-simulator.d.ts +19 -0
  58. package/esm/funcs/simulators-get-simulator.d.ts.map +1 -0
  59. package/esm/funcs/simulators-get-simulator.js +94 -0
  60. package/esm/funcs/simulators-get-simulator.js.map +1 -0
  61. package/esm/funcs/simulators-list-simulators.d.ts +19 -0
  62. package/esm/funcs/simulators-list-simulators.d.ts.map +1 -0
  63. package/esm/funcs/simulators-list-simulators.js +95 -0
  64. package/esm/funcs/simulators-list-simulators.js.map +1 -0
  65. package/esm/funcs/worlds-build-world.d.ts +18 -0
  66. package/esm/funcs/worlds-build-world.d.ts.map +1 -0
  67. package/esm/funcs/worlds-build-world.js +86 -0
  68. package/esm/funcs/worlds-build-world.js.map +1 -0
  69. package/esm/funcs/worlds-cancel-world-build.d.ts +19 -0
  70. package/esm/funcs/worlds-cancel-world-build.d.ts.map +1 -0
  71. package/esm/funcs/worlds-cancel-world-build.js +94 -0
  72. package/esm/funcs/worlds-cancel-world-build.js.map +1 -0
  73. package/esm/funcs/worlds-delete-world.d.ts +18 -0
  74. package/esm/funcs/worlds-delete-world.d.ts.map +1 -0
  75. package/esm/funcs/worlds-delete-world.js +93 -0
  76. package/esm/funcs/worlds-delete-world.js.map +1 -0
  77. package/esm/funcs/worlds-get-world.d.ts +19 -0
  78. package/esm/funcs/worlds-get-world.d.ts.map +1 -0
  79. package/esm/funcs/worlds-get-world.js +94 -0
  80. package/esm/funcs/worlds-get-world.js.map +1 -0
  81. package/esm/funcs/worlds-list-worlds.d.ts +19 -0
  82. package/esm/funcs/worlds-list-worlds.d.ts.map +1 -0
  83. package/esm/funcs/worlds-list-worlds.js +93 -0
  84. package/esm/funcs/worlds-list-worlds.js.map +1 -0
  85. package/esm/funcs/worlds-start-world.d.ts +19 -0
  86. package/esm/funcs/worlds-start-world.d.ts.map +1 -0
  87. package/esm/funcs/worlds-start-world.js +94 -0
  88. package/esm/funcs/worlds-start-world.js.map +1 -0
  89. package/esm/funcs/worlds-stop-world.d.ts +19 -0
  90. package/esm/funcs/worlds-stop-world.d.ts.map +1 -0
  91. package/esm/funcs/worlds-stop-world.js +94 -0
  92. package/esm/funcs/worlds-stop-world.js.map +1 -0
  93. package/esm/hooks/hooks.d.ts +25 -0
  94. package/esm/hooks/hooks.d.ts.map +1 -0
  95. package/esm/hooks/hooks.js +82 -0
  96. package/esm/hooks/hooks.js.map +1 -0
  97. package/esm/hooks/index.d.ts +3 -0
  98. package/esm/hooks/index.d.ts.map +1 -0
  99. package/esm/hooks/index.js +6 -0
  100. package/esm/hooks/index.js.map +1 -0
  101. package/esm/hooks/registration.d.ts +3 -0
  102. package/esm/hooks/registration.d.ts.map +1 -0
  103. package/esm/hooks/registration.js +12 -0
  104. package/esm/hooks/registration.js.map +1 -0
  105. package/esm/hooks/types.d.ts +77 -0
  106. package/esm/hooks/types.d.ts.map +1 -0
  107. package/esm/hooks/types.js +5 -0
  108. package/esm/hooks/types.js.map +1 -0
  109. package/esm/index.d.ts +6 -0
  110. package/esm/index.d.ts.map +1 -0
  111. package/esm/index.js +8 -0
  112. package/esm/index.js.map +1 -0
  113. package/esm/lib/base64.d.ts +10 -0
  114. package/esm/lib/base64.d.ts.map +1 -0
  115. package/esm/lib/base64.js +31 -0
  116. package/esm/lib/base64.js.map +1 -0
  117. package/esm/lib/config.d.ts +38 -0
  118. package/esm/lib/config.d.ts.map +1 -0
  119. package/esm/lib/config.js +34 -0
  120. package/esm/lib/config.js.map +1 -0
  121. package/esm/lib/encodings.d.ts +55 -0
  122. package/esm/lib/encodings.d.ts.map +1 -0
  123. package/esm/lib/encodings.js +407 -0
  124. package/esm/lib/encodings.js.map +1 -0
  125. package/esm/lib/env.d.ts +15 -0
  126. package/esm/lib/env.d.ts.map +1 -0
  127. package/esm/lib/env.js +44 -0
  128. package/esm/lib/env.js.map +1 -0
  129. package/esm/lib/files.d.ts +26 -0
  130. package/esm/lib/files.d.ts.map +1 -0
  131. package/esm/lib/files.js +91 -0
  132. package/esm/lib/files.js.map +1 -0
  133. package/esm/lib/http.d.ts +67 -0
  134. package/esm/lib/http.d.ts.map +1 -0
  135. package/esm/lib/http.js +209 -0
  136. package/esm/lib/http.js.map +1 -0
  137. package/esm/lib/logger.d.ts +6 -0
  138. package/esm/lib/logger.d.ts.map +1 -0
  139. package/esm/lib/logger.js +5 -0
  140. package/esm/lib/logger.js.map +1 -0
  141. package/esm/lib/matchers.d.ts +59 -0
  142. package/esm/lib/matchers.d.ts.map +1 -0
  143. package/esm/lib/matchers.js +202 -0
  144. package/esm/lib/matchers.js.map +1 -0
  145. package/esm/lib/primitives.d.ts +27 -0
  146. package/esm/lib/primitives.d.ts.map +1 -0
  147. package/esm/lib/primitives.js +120 -0
  148. package/esm/lib/primitives.js.map +1 -0
  149. package/esm/lib/retries.d.ts +38 -0
  150. package/esm/lib/retries.d.ts.map +1 -0
  151. package/esm/lib/retries.js +157 -0
  152. package/esm/lib/retries.js.map +1 -0
  153. package/esm/lib/schemas.d.ts +21 -0
  154. package/esm/lib/schemas.d.ts.map +1 -0
  155. package/esm/lib/schemas.js +57 -0
  156. package/esm/lib/schemas.js.map +1 -0
  157. package/esm/lib/sdks.d.ts +63 -0
  158. package/esm/lib/sdks.d.ts.map +1 -0
  159. package/esm/lib/sdks.js +294 -0
  160. package/esm/lib/sdks.js.map +1 -0
  161. package/esm/lib/security.d.ts +84 -0
  162. package/esm/lib/security.d.ts.map +1 -0
  163. package/esm/lib/security.js +147 -0
  164. package/esm/lib/security.js.map +1 -0
  165. package/esm/lib/url.d.ts +5 -0
  166. package/esm/lib/url.d.ts.map +1 -0
  167. package/esm/lib/url.js +24 -0
  168. package/esm/lib/url.js.map +1 -0
  169. package/esm/models/build-simulator-request.d.ts +67 -0
  170. package/esm/models/build-simulator-request.d.ts.map +1 -0
  171. package/esm/models/build-simulator-request.js +41 -0
  172. package/esm/models/build-simulator-request.js.map +1 -0
  173. package/esm/models/build-world-request.d.ts +20 -0
  174. package/esm/models/build-world-request.d.ts.map +1 -0
  175. package/esm/models/build-world-request.js +13 -0
  176. package/esm/models/build-world-request.js.map +1 -0
  177. package/esm/models/create-simulation-request.d.ts +20 -0
  178. package/esm/models/create-simulation-request.d.ts.map +1 -0
  179. package/esm/models/create-simulation-request.js +18 -0
  180. package/esm/models/create-simulation-request.js.map +1 -0
  181. package/esm/models/created-simulation.d.ts +60 -0
  182. package/esm/models/created-simulation.d.ts.map +1 -0
  183. package/esm/models/created-simulation.js +41 -0
  184. package/esm/models/created-simulation.js.map +1 -0
  185. package/esm/models/errors/continuous-default-error.d.ts +10 -0
  186. package/esm/models/errors/continuous-default-error.d.ts.map +1 -0
  187. package/esm/models/errors/continuous-default-error.js +30 -0
  188. package/esm/models/errors/continuous-default-error.js.map +1 -0
  189. package/esm/models/errors/continuous-error.d.ts +19 -0
  190. package/esm/models/errors/continuous-error.d.ts.map +1 -0
  191. package/esm/models/errors/continuous-error.js +26 -0
  192. package/esm/models/errors/continuous-error.js.map +1 -0
  193. package/esm/models/errors/continuous-simulation-default-error.d.ts +10 -0
  194. package/esm/models/errors/continuous-simulation-default-error.d.ts.map +1 -0
  195. package/esm/models/errors/continuous-simulation-default-error.js +30 -0
  196. package/esm/models/errors/continuous-simulation-default-error.js.map +1 -0
  197. package/esm/models/errors/continuous-simulation-error.d.ts +19 -0
  198. package/esm/models/errors/continuous-simulation-error.d.ts.map +1 -0
  199. package/esm/models/errors/continuous-simulation-error.js +26 -0
  200. package/esm/models/errors/continuous-simulation-error.js.map +1 -0
  201. package/esm/models/errors/error.d.ts +32 -0
  202. package/esm/models/errors/error.d.ts.map +1 -0
  203. package/esm/models/errors/error.js +43 -0
  204. package/esm/models/errors/error.js.map +1 -0
  205. package/esm/models/errors/http-client-errors.d.ts +44 -0
  206. package/esm/models/errors/http-client-errors.d.ts.map +1 -0
  207. package/esm/models/errors/http-client-errors.js +56 -0
  208. package/esm/models/errors/http-client-errors.js.map +1 -0
  209. package/esm/models/errors/index.d.ts +7 -0
  210. package/esm/models/errors/index.d.ts.map +1 -0
  211. package/esm/models/errors/index.js +10 -0
  212. package/esm/models/errors/index.js.map +1 -0
  213. package/esm/models/errors/response-validation-error.d.ts +26 -0
  214. package/esm/models/errors/response-validation-error.d.ts.map +1 -0
  215. package/esm/models/errors/response-validation-error.js +37 -0
  216. package/esm/models/errors/response-validation-error.js.map +1 -0
  217. package/esm/models/errors/sdk-validation-error.d.ts +21 -0
  218. package/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
  219. package/esm/models/errors/sdk-validation-error.js +52 -0
  220. package/esm/models/errors/sdk-validation-error.js.map +1 -0
  221. package/esm/models/fork-simulation-request.d.ts +20 -0
  222. package/esm/models/fork-simulation-request.d.ts.map +1 -0
  223. package/esm/models/fork-simulation-request.js +18 -0
  224. package/esm/models/fork-simulation-request.js.map +1 -0
  225. package/esm/models/index.d.ts +19 -0
  226. package/esm/models/index.d.ts.map +1 -0
  227. package/esm/models/index.js +22 -0
  228. package/esm/models/index.js.map +1 -0
  229. package/esm/models/list-simulation-steps-response.d.ts +18 -0
  230. package/esm/models/list-simulation-steps-response.d.ts.map +1 -0
  231. package/esm/models/list-simulation-steps-response.js +21 -0
  232. package/esm/models/list-simulation-steps-response.js.map +1 -0
  233. package/esm/models/list-simulations-response.d.ts +18 -0
  234. package/esm/models/list-simulations-response.d.ts.map +1 -0
  235. package/esm/models/list-simulations-response.js +21 -0
  236. package/esm/models/list-simulations-response.js.map +1 -0
  237. package/esm/models/list-simulators-response.d.ts +18 -0
  238. package/esm/models/list-simulators-response.d.ts.map +1 -0
  239. package/esm/models/list-simulators-response.js +21 -0
  240. package/esm/models/list-simulators-response.js.map +1 -0
  241. package/esm/models/list-worlds-response.d.ts +18 -0
  242. package/esm/models/list-worlds-response.d.ts.map +1 -0
  243. package/esm/models/list-worlds-response.js +21 -0
  244. package/esm/models/list-worlds-response.js.map +1 -0
  245. package/esm/models/mint-simulation-token-request.d.ts +15 -0
  246. package/esm/models/mint-simulation-token-request.d.ts.map +1 -0
  247. package/esm/models/mint-simulation-token-request.js +17 -0
  248. package/esm/models/mint-simulation-token-request.js.map +1 -0
  249. package/esm/models/operations/build-simulator.d.ts +30 -0
  250. package/esm/models/operations/build-simulator.d.ts.map +1 -0
  251. package/esm/models/operations/build-simulator.js +28 -0
  252. package/esm/models/operations/build-simulator.js.map +1 -0
  253. package/esm/models/operations/cancel-simulator-build.d.ts +15 -0
  254. package/esm/models/operations/cancel-simulator-build.d.ts.map +1 -0
  255. package/esm/models/operations/cancel-simulator-build.js +12 -0
  256. package/esm/models/operations/cancel-simulator-build.js.map +1 -0
  257. package/esm/models/operations/cancel-world-build.d.ts +15 -0
  258. package/esm/models/operations/cancel-world-build.d.ts.map +1 -0
  259. package/esm/models/operations/cancel-world-build.js +12 -0
  260. package/esm/models/operations/cancel-world-build.js.map +1 -0
  261. package/esm/models/operations/delete-simulation.d.ts +15 -0
  262. package/esm/models/operations/delete-simulation.d.ts.map +1 -0
  263. package/esm/models/operations/delete-simulation.js +12 -0
  264. package/esm/models/operations/delete-simulation.js.map +1 -0
  265. package/esm/models/operations/delete-simulator.d.ts +15 -0
  266. package/esm/models/operations/delete-simulator.d.ts.map +1 -0
  267. package/esm/models/operations/delete-simulator.js +12 -0
  268. package/esm/models/operations/delete-simulator.js.map +1 -0
  269. package/esm/models/operations/delete-world.d.ts +15 -0
  270. package/esm/models/operations/delete-world.d.ts.map +1 -0
  271. package/esm/models/operations/delete-world.js +12 -0
  272. package/esm/models/operations/delete-world.js.map +1 -0
  273. package/esm/models/operations/fork-simulation.d.ts +18 -0
  274. package/esm/models/operations/fork-simulation.d.ts.map +1 -0
  275. package/esm/models/operations/fork-simulation.js +14 -0
  276. package/esm/models/operations/fork-simulation.js.map +1 -0
  277. package/esm/models/operations/get-simulation.d.ts +15 -0
  278. package/esm/models/operations/get-simulation.d.ts.map +1 -0
  279. package/esm/models/operations/get-simulation.js +12 -0
  280. package/esm/models/operations/get-simulation.js.map +1 -0
  281. package/esm/models/operations/get-simulator.d.ts +15 -0
  282. package/esm/models/operations/get-simulator.d.ts.map +1 -0
  283. package/esm/models/operations/get-simulator.js +12 -0
  284. package/esm/models/operations/get-simulator.js.map +1 -0
  285. package/esm/models/operations/get-world.d.ts +15 -0
  286. package/esm/models/operations/get-world.d.ts.map +1 -0
  287. package/esm/models/operations/get-world.js +12 -0
  288. package/esm/models/operations/get-world.js.map +1 -0
  289. package/esm/models/operations/index.d.ts +20 -0
  290. package/esm/models/operations/index.d.ts.map +1 -0
  291. package/esm/models/operations/index.js +23 -0
  292. package/esm/models/operations/index.js.map +1 -0
  293. package/esm/models/operations/list-simulation-steps.d.ts +25 -0
  294. package/esm/models/operations/list-simulation-steps.d.ts.map +1 -0
  295. package/esm/models/operations/list-simulation-steps.js +14 -0
  296. package/esm/models/operations/list-simulation-steps.js.map +1 -0
  297. package/esm/models/operations/list-simulations.d.ts +45 -0
  298. package/esm/models/operations/list-simulations.d.ts.map +1 -0
  299. package/esm/models/operations/list-simulations.js +30 -0
  300. package/esm/models/operations/list-simulations.js.map +1 -0
  301. package/esm/models/operations/list-simulators.d.ts +46 -0
  302. package/esm/models/operations/list-simulators.d.ts.map +1 -0
  303. package/esm/models/operations/list-simulators.js +26 -0
  304. package/esm/models/operations/list-simulators.js.map +1 -0
  305. package/esm/models/operations/list-worlds.d.ts +20 -0
  306. package/esm/models/operations/list-worlds.d.ts.map +1 -0
  307. package/esm/models/operations/list-worlds.js +13 -0
  308. package/esm/models/operations/list-worlds.js.map +1 -0
  309. package/esm/models/operations/mint-simulation-token.d.ts +18 -0
  310. package/esm/models/operations/mint-simulation-token.d.ts.map +1 -0
  311. package/esm/models/operations/mint-simulation-token.js +14 -0
  312. package/esm/models/operations/mint-simulation-token.js.map +1 -0
  313. package/esm/models/operations/start-simulation.d.ts +15 -0
  314. package/esm/models/operations/start-simulation.d.ts.map +1 -0
  315. package/esm/models/operations/start-simulation.js +12 -0
  316. package/esm/models/operations/start-simulation.js.map +1 -0
  317. package/esm/models/operations/start-world.d.ts +15 -0
  318. package/esm/models/operations/start-world.d.ts.map +1 -0
  319. package/esm/models/operations/start-world.js +12 -0
  320. package/esm/models/operations/start-world.js.map +1 -0
  321. package/esm/models/operations/stop-simulation.d.ts +15 -0
  322. package/esm/models/operations/stop-simulation.d.ts.map +1 -0
  323. package/esm/models/operations/stop-simulation.js +12 -0
  324. package/esm/models/operations/stop-simulation.js.map +1 -0
  325. package/esm/models/operations/stop-world.d.ts +15 -0
  326. package/esm/models/operations/stop-world.d.ts.map +1 -0
  327. package/esm/models/operations/stop-world.js +12 -0
  328. package/esm/models/operations/stop-world.js.map +1 -0
  329. package/esm/models/resource-error.d.ts +17 -0
  330. package/esm/models/resource-error.d.ts.map +1 -0
  331. package/esm/models/resource-error.js +15 -0
  332. package/esm/models/resource-error.js.map +1 -0
  333. package/esm/models/security.d.ts +12 -0
  334. package/esm/models/security.d.ts.map +1 -0
  335. package/esm/models/security.js +12 -0
  336. package/esm/models/security.js.map +1 -0
  337. package/esm/models/simulation-token.d.ts +17 -0
  338. package/esm/models/simulation-token.d.ts.map +1 -0
  339. package/esm/models/simulation-token.js +20 -0
  340. package/esm/models/simulation-token.js.map +1 -0
  341. package/esm/models/simulation.d.ts +52 -0
  342. package/esm/models/simulation.d.ts.map +1 -0
  343. package/esm/models/simulation.js +39 -0
  344. package/esm/models/simulation.js.map +1 -0
  345. package/esm/models/simulator.d.ts +64 -0
  346. package/esm/models/simulator.d.ts.map +1 -0
  347. package/esm/models/simulator.js +50 -0
  348. package/esm/models/simulator.js.map +1 -0
  349. package/esm/models/step.d.ts +17 -0
  350. package/esm/models/step.d.ts.map +1 -0
  351. package/esm/models/step.js +15 -0
  352. package/esm/models/step.js.map +1 -0
  353. package/esm/models/world-simulation.d.ts +17 -0
  354. package/esm/models/world-simulation.d.ts.map +1 -0
  355. package/esm/models/world-simulation.js +20 -0
  356. package/esm/models/world-simulation.js.map +1 -0
  357. package/esm/models/world.d.ts +54 -0
  358. package/esm/models/world.d.ts.map +1 -0
  359. package/esm/models/world.js +41 -0
  360. package/esm/models/world.js.map +1 -0
  361. package/esm/sdk/index.d.ts +2 -0
  362. package/esm/sdk/index.d.ts.map +1 -0
  363. package/esm/sdk/index.js +5 -0
  364. package/esm/sdk/index.js.map +1 -0
  365. package/esm/sdk/sdk.d.ts +13 -0
  366. package/esm/sdk/sdk.d.ts.map +1 -0
  367. package/esm/sdk/sdk.js +22 -0
  368. package/esm/sdk/sdk.js.map +1 -0
  369. package/esm/sdk/simulations.d.ts +69 -0
  370. package/esm/sdk/simulations.d.ts.map +1 -0
  371. package/esm/sdk/simulations.js +98 -0
  372. package/esm/sdk/simulations.js.map +1 -0
  373. package/esm/sdk/simulators.d.ts +41 -0
  374. package/esm/sdk/simulators.d.ts.map +1 -0
  375. package/esm/sdk/simulators.js +58 -0
  376. package/esm/sdk/simulators.js.map +1 -0
  377. package/esm/sdk/worlds.d.ts +55 -0
  378. package/esm/sdk/worlds.d.ts.map +1 -0
  379. package/esm/sdk/worlds.js +78 -0
  380. package/esm/sdk/worlds.js.map +1 -0
  381. package/esm/types/async.d.ts +23 -0
  382. package/esm/types/async.d.ts.map +1 -0
  383. package/esm/types/async.js +28 -0
  384. package/esm/types/async.js.map +1 -0
  385. package/esm/types/blobs.d.ts +4 -0
  386. package/esm/types/blobs.d.ts.map +1 -0
  387. package/esm/types/blobs.js +25 -0
  388. package/esm/types/blobs.js.map +1 -0
  389. package/esm/types/const-date-time.d.ts +3 -0
  390. package/esm/types/const-date-time.d.ts.map +1 -0
  391. package/esm/types/const-date-time.js +10 -0
  392. package/esm/types/const-date-time.js.map +1 -0
  393. package/esm/types/default-to-zero-value.d.ts +12 -0
  394. package/esm/types/default-to-zero-value.d.ts.map +1 -0
  395. package/esm/types/default-to-zero-value.js +31 -0
  396. package/esm/types/default-to-zero-value.js.map +1 -0
  397. package/esm/types/enums.d.ts +9 -0
  398. package/esm/types/enums.d.ts.map +1 -0
  399. package/esm/types/enums.js +27 -0
  400. package/esm/types/enums.js.map +1 -0
  401. package/esm/types/fp.d.ts +31 -0
  402. package/esm/types/fp.d.ts.map +1 -0
  403. package/esm/types/fp.js +31 -0
  404. package/esm/types/fp.js.map +1 -0
  405. package/esm/types/index.d.ts +10 -0
  406. package/esm/types/index.d.ts.map +1 -0
  407. package/esm/types/index.js +10 -0
  408. package/esm/types/index.js.map +1 -0
  409. package/esm/types/operations.d.ts +27 -0
  410. package/esm/types/operations.d.ts.map +1 -0
  411. package/esm/types/operations.js +77 -0
  412. package/esm/types/operations.js.map +1 -0
  413. package/esm/types/primitives.d.ts +9 -0
  414. package/esm/types/primitives.d.ts.map +1 -0
  415. package/esm/types/primitives.js +109 -0
  416. package/esm/types/primitives.js.map +1 -0
  417. package/esm/types/rfcdate.d.ts +21 -0
  418. package/esm/types/rfcdate.d.ts.map +1 -0
  419. package/esm/types/rfcdate.js +43 -0
  420. package/esm/types/rfcdate.js.map +1 -0
  421. package/esm/types/smart-union.d.ts +7 -0
  422. package/esm/types/smart-union.d.ts.map +1 -0
  423. package/esm/types/smart-union.js +117 -0
  424. package/esm/types/smart-union.js.map +1 -0
  425. package/esm/types/streams.d.ts +2 -0
  426. package/esm/types/streams.d.ts.map +1 -0
  427. package/esm/types/streams.js +15 -0
  428. package/esm/types/streams.js.map +1 -0
  429. package/esm/types/unrecognized.d.ts +16 -0
  430. package/esm/types/unrecognized.d.ts.map +1 -0
  431. package/esm/types/unrecognized.js +31 -0
  432. package/esm/types/unrecognized.js.map +1 -0
  433. package/examples/node_modules/@types/node/assert/strict.d.ts +8 -0
  434. package/examples/node_modules/@types/node/assert.d.ts +1062 -0
  435. package/examples/node_modules/@types/node/async_hooks.d.ts +605 -0
  436. package/examples/node_modules/@types/node/buffer.buffer.d.ts +471 -0
  437. package/examples/node_modules/@types/node/buffer.d.ts +1936 -0
  438. package/examples/node_modules/@types/node/child_process.d.ts +1475 -0
  439. package/examples/node_modules/@types/node/cluster.d.ts +577 -0
  440. package/examples/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  441. package/examples/node_modules/@types/node/compatibility/index.d.ts +9 -0
  442. package/examples/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
  443. package/examples/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  444. package/examples/node_modules/@types/node/console.d.ts +452 -0
  445. package/examples/node_modules/@types/node/constants.d.ts +21 -0
  446. package/examples/node_modules/@types/node/crypto.d.ts +4590 -0
  447. package/examples/node_modules/@types/node/dgram.d.ts +597 -0
  448. package/examples/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
  449. package/examples/node_modules/@types/node/dns/promises.d.ts +479 -0
  450. package/examples/node_modules/@types/node/dns.d.ts +871 -0
  451. package/examples/node_modules/@types/node/domain.d.ts +170 -0
  452. package/examples/node_modules/@types/node/events.d.ts +977 -0
  453. package/examples/node_modules/@types/node/fs/promises.d.ts +1270 -0
  454. package/examples/node_modules/@types/node/fs.d.ts +4375 -0
  455. package/examples/node_modules/@types/node/globals.d.ts +172 -0
  456. package/examples/node_modules/@types/node/globals.typedarray.d.ts +38 -0
  457. package/examples/node_modules/@types/node/http.d.ts +2049 -0
  458. package/examples/node_modules/@types/node/http2.d.ts +2712 -0
  459. package/examples/node_modules/@types/node/https.d.ts +578 -0
  460. package/examples/node_modules/@types/node/index.d.ts +93 -0
  461. package/examples/node_modules/@types/node/inspector.generated.d.ts +3966 -0
  462. package/examples/node_modules/@types/node/module.d.ts +539 -0
  463. package/examples/node_modules/@types/node/net.d.ts +1031 -0
  464. package/examples/node_modules/@types/node/os.d.ts +506 -0
  465. package/examples/node_modules/@types/node/path.d.ts +200 -0
  466. package/examples/node_modules/@types/node/perf_hooks.d.ts +961 -0
  467. package/examples/node_modules/@types/node/process.d.ts +1961 -0
  468. package/examples/node_modules/@types/node/punycode.d.ts +117 -0
  469. package/examples/node_modules/@types/node/querystring.d.ts +152 -0
  470. package/examples/node_modules/@types/node/readline/promises.d.ts +162 -0
  471. package/examples/node_modules/@types/node/readline.d.ts +589 -0
  472. package/examples/node_modules/@types/node/repl.d.ts +430 -0
  473. package/examples/node_modules/@types/node/sea.d.ts +153 -0
  474. package/examples/node_modules/@types/node/stream/consumers.d.ts +38 -0
  475. package/examples/node_modules/@types/node/stream/promises.d.ts +90 -0
  476. package/examples/node_modules/@types/node/stream/web.d.ts +533 -0
  477. package/examples/node_modules/@types/node/stream.d.ts +1698 -0
  478. package/examples/node_modules/@types/node/string_decoder.d.ts +67 -0
  479. package/examples/node_modules/@types/node/test.d.ts +1787 -0
  480. package/examples/node_modules/@types/node/timers/promises.d.ts +108 -0
  481. package/examples/node_modules/@types/node/timers.d.ts +286 -0
  482. package/examples/node_modules/@types/node/tls.d.ts +1259 -0
  483. package/examples/node_modules/@types/node/trace_events.d.ts +197 -0
  484. package/examples/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
  485. package/examples/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
  486. package/examples/node_modules/@types/node/ts5.6/index.d.ts +93 -0
  487. package/examples/node_modules/@types/node/tty.d.ts +208 -0
  488. package/examples/node_modules/@types/node/url.d.ts +964 -0
  489. package/examples/node_modules/@types/node/util.d.ts +2331 -0
  490. package/examples/node_modules/@types/node/v8.d.ts +809 -0
  491. package/examples/node_modules/@types/node/vm.d.ts +1001 -0
  492. package/examples/node_modules/@types/node/wasi.d.ts +181 -0
  493. package/examples/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  494. package/examples/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  495. package/examples/node_modules/@types/node/web-globals/events.d.ts +97 -0
  496. package/examples/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
  497. package/examples/node_modules/@types/node/worker_threads.d.ts +715 -0
  498. package/examples/node_modules/@types/node/zlib.d.ts +598 -0
  499. package/examples/node_modules/dotenv/config.d.ts +1 -0
  500. package/examples/node_modules/dotenv/config.js +9 -0
  501. package/examples/node_modules/dotenv/lib/cli-options.js +17 -0
  502. package/examples/node_modules/dotenv/lib/env-options.js +28 -0
  503. package/examples/node_modules/dotenv/lib/main.d.ts +162 -0
  504. package/examples/node_modules/dotenv/lib/main.js +386 -0
  505. package/examples/node_modules/esbuild/install.js +300 -0
  506. package/examples/node_modules/esbuild/lib/main.d.ts +720 -0
  507. package/examples/node_modules/esbuild/lib/main.js +2536 -0
  508. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -0
  509. package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -0
  510. package/examples/node_modules/tsx/dist/cli.mjs +55 -0
  511. package/examples/node_modules/tsx/dist/client-D_mPDF5S.mjs +1 -0
  512. package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -0
  513. package/examples/node_modules/tsx/dist/esm/index.mjs +1 -0
  514. package/examples/node_modules/tsx/dist/get-pipe-path-_tAJyU_v.mjs +1 -0
  515. package/examples/node_modules/tsx/dist/index-DCefr8NP.mjs +14 -0
  516. package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +1 -0
  517. package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +3 -0
  518. package/examples/node_modules/tsx/dist/loader.mjs +1 -0
  519. package/examples/node_modules/tsx/dist/node-features-JeyyvQz6.mjs +1 -0
  520. package/examples/node_modules/tsx/dist/package-BL7Whz21.mjs +1 -0
  521. package/examples/node_modules/tsx/dist/patch-repl.mjs +1 -0
  522. package/examples/node_modules/tsx/dist/preflight.mjs +1 -0
  523. package/examples/node_modules/tsx/dist/register-DHgpdRjs.mjs +10 -0
  524. package/examples/node_modules/tsx/dist/register-SoqaU4rg.mjs +2 -0
  525. package/examples/node_modules/tsx/dist/repl.mjs +3 -0
  526. package/examples/node_modules/tsx/dist/require-Cuv-0BLU.mjs +1 -0
  527. package/examples/node_modules/tsx/dist/suppress-warnings.mjs +1 -0
  528. package/examples/node_modules/tsx/dist/temporary-directory-BDDVQOvU.mjs +1 -0
  529. package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +5 -0
  530. package/examples/node_modules/undici-types/agent.d.ts +31 -0
  531. package/examples/node_modules/undici-types/api.d.ts +43 -0
  532. package/examples/node_modules/undici-types/balanced-pool.d.ts +29 -0
  533. package/examples/node_modules/undici-types/cache.d.ts +36 -0
  534. package/examples/node_modules/undici-types/client.d.ts +108 -0
  535. package/examples/node_modules/undici-types/connector.d.ts +34 -0
  536. package/examples/node_modules/undici-types/content-type.d.ts +21 -0
  537. package/examples/node_modules/undici-types/cookies.d.ts +28 -0
  538. package/examples/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  539. package/examples/node_modules/undici-types/dispatcher.d.ts +256 -0
  540. package/examples/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  541. package/examples/node_modules/undici-types/errors.d.ts +149 -0
  542. package/examples/node_modules/undici-types/eventsource.d.ts +61 -0
  543. package/examples/node_modules/undici-types/fetch.d.ts +209 -0
  544. package/examples/node_modules/undici-types/file.d.ts +39 -0
  545. package/examples/node_modules/undici-types/filereader.d.ts +54 -0
  546. package/examples/node_modules/undici-types/formdata.d.ts +108 -0
  547. package/examples/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  548. package/examples/node_modules/undici-types/global-origin.d.ts +7 -0
  549. package/examples/node_modules/undici-types/handlers.d.ts +15 -0
  550. package/examples/node_modules/undici-types/header.d.ts +4 -0
  551. package/examples/node_modules/undici-types/index.d.ts +71 -0
  552. package/examples/node_modules/undici-types/interceptors.d.ts +17 -0
  553. package/examples/node_modules/undici-types/mock-agent.d.ts +50 -0
  554. package/examples/node_modules/undici-types/mock-client.d.ts +25 -0
  555. package/examples/node_modules/undici-types/mock-errors.d.ts +12 -0
  556. package/examples/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  557. package/examples/node_modules/undici-types/mock-pool.d.ts +25 -0
  558. package/examples/node_modules/undici-types/patch.d.ts +33 -0
  559. package/examples/node_modules/undici-types/pool-stats.d.ts +19 -0
  560. package/examples/node_modules/undici-types/pool.d.ts +39 -0
  561. package/examples/node_modules/undici-types/proxy-agent.d.ts +28 -0
  562. package/examples/node_modules/undici-types/readable.d.ts +65 -0
  563. package/examples/node_modules/undici-types/retry-agent.d.ts +8 -0
  564. package/examples/node_modules/undici-types/retry-handler.d.ts +116 -0
  565. package/examples/node_modules/undici-types/util.d.ts +18 -0
  566. package/examples/node_modules/undici-types/webidl.d.ts +228 -0
  567. package/examples/node_modules/undici-types/websocket.d.ts +150 -0
  568. package/examples/simulationsListSimulations.example.ts +26 -0
  569. package/jsr.json +27 -0
  570. package/package.json +67 -0
  571. package/src/core.ts +13 -0
  572. package/src/funcs/simulations-create-simulation.ts +179 -0
  573. package/src/funcs/simulations-delete-simulation.ts +183 -0
  574. package/src/funcs/simulations-fork-simulation.ts +186 -0
  575. package/src/funcs/simulations-get-simulation.ts +183 -0
  576. package/src/funcs/simulations-list-simulation-steps.ts +190 -0
  577. package/src/funcs/simulations-list-simulations.ts +189 -0
  578. package/src/funcs/simulations-mint-simulation-token.ts +187 -0
  579. package/src/funcs/simulations-start-simulation.ts +183 -0
  580. package/src/funcs/simulations-stop-simulation.ts +183 -0
  581. package/src/funcs/simulators-build-simulator.ts +219 -0
  582. package/src/funcs/simulators-cancel-simulator-build.ts +184 -0
  583. package/src/funcs/simulators-delete-simulator.ts +182 -0
  584. package/src/funcs/simulators-get-simulator.ts +183 -0
  585. package/src/funcs/simulators-list-simulators.ts +189 -0
  586. package/src/funcs/worlds-build-world.ts +179 -0
  587. package/src/funcs/worlds-cancel-world-build.ts +184 -0
  588. package/src/funcs/worlds-delete-world.ts +182 -0
  589. package/src/funcs/worlds-get-world.ts +183 -0
  590. package/src/funcs/worlds-list-worlds.ts +184 -0
  591. package/src/funcs/worlds-start-world.ts +183 -0
  592. package/src/funcs/worlds-stop-world.ts +183 -0
  593. package/src/hooks/hooks.ts +132 -0
  594. package/src/hooks/index.ts +6 -0
  595. package/src/hooks/registration.ts +14 -0
  596. package/src/hooks/types.ts +108 -0
  597. package/src/index.ts +9 -0
  598. package/src/lib/base64.ts +39 -0
  599. package/src/lib/config.ts +67 -0
  600. package/src/lib/encodings.ts +564 -0
  601. package/src/lib/env.ts +61 -0
  602. package/src/lib/files.ts +104 -0
  603. package/src/lib/http.ts +325 -0
  604. package/src/lib/logger.ts +9 -0
  605. package/src/lib/matchers.ts +353 -0
  606. package/src/lib/primitives.ts +166 -0
  607. package/src/lib/retries.ts +226 -0
  608. package/src/lib/schemas.ts +94 -0
  609. package/src/lib/sdks.ts +442 -0
  610. package/src/lib/security.ts +280 -0
  611. package/src/lib/url.ts +35 -0
  612. package/src/models/build-simulator-request.ts +107 -0
  613. package/src/models/build-world-request.ts +39 -0
  614. package/src/models/create-simulation-request.ts +47 -0
  615. package/src/models/created-simulation.ts +106 -0
  616. package/src/models/errors/continuous-default-error.ts +40 -0
  617. package/src/models/errors/continuous-error.ts +35 -0
  618. package/src/models/errors/error.ts +65 -0
  619. package/src/models/errors/http-client-errors.ts +62 -0
  620. package/src/models/errors/index.ts +10 -0
  621. package/src/models/errors/response-validation-error.ts +50 -0
  622. package/src/models/errors/sdk-validation-error.ts +54 -0
  623. package/src/models/fork-simulation-request.ts +47 -0
  624. package/src/models/index.ts +22 -0
  625. package/src/models/list-simulation-steps-response.ts +48 -0
  626. package/src/models/list-simulations-response.ts +48 -0
  627. package/src/models/list-simulators-response.ts +48 -0
  628. package/src/models/list-worlds-response.ts +48 -0
  629. package/src/models/mint-simulation-token-request.ts +41 -0
  630. package/src/models/operations/build-simulator.ts +68 -0
  631. package/src/models/operations/cancel-simulator-build.ts +35 -0
  632. package/src/models/operations/cancel-world-build.ts +33 -0
  633. package/src/models/operations/delete-simulation.ts +33 -0
  634. package/src/models/operations/delete-simulator.ts +33 -0
  635. package/src/models/operations/delete-world.ts +33 -0
  636. package/src/models/operations/fork-simulation.ts +37 -0
  637. package/src/models/operations/get-simulation.ts +33 -0
  638. package/src/models/operations/get-simulator.ts +33 -0
  639. package/src/models/operations/get-world.ts +31 -0
  640. package/src/models/operations/index.ts +23 -0
  641. package/src/models/operations/list-simulation-steps.ts +45 -0
  642. package/src/models/operations/list-simulations.ts +78 -0
  643. package/src/models/operations/list-simulators.ts +71 -0
  644. package/src/models/operations/list-worlds.ts +39 -0
  645. package/src/models/operations/mint-simulation-token.ts +37 -0
  646. package/src/models/operations/start-simulation.ts +33 -0
  647. package/src/models/operations/start-world.ts +33 -0
  648. package/src/models/operations/stop-simulation.ts +33 -0
  649. package/src/models/operations/stop-world.ts +33 -0
  650. package/src/models/resource-error.ts +39 -0
  651. package/src/models/security.ts +26 -0
  652. package/src/models/simulation-token.ts +47 -0
  653. package/src/models/simulation.ts +93 -0
  654. package/src/models/simulator.ts +110 -0
  655. package/src/models/step.ts +36 -0
  656. package/src/models/world-simulation.ts +47 -0
  657. package/src/models/world.ts +96 -0
  658. package/src/sdk/index.ts +5 -0
  659. package/src/sdk/sdk.ts +25 -0
  660. package/src/sdk/simulations.ts +172 -0
  661. package/src/sdk/simulators.ts +100 -0
  662. package/src/sdk/worlds.ts +136 -0
  663. package/src/types/async.ts +69 -0
  664. package/src/types/blobs.ts +33 -0
  665. package/src/types/const-date-time.ts +15 -0
  666. package/src/types/default-to-zero-value.ts +33 -0
  667. package/src/types/enums.ts +45 -0
  668. package/src/types/fp.ts +50 -0
  669. package/src/types/index.ts +13 -0
  670. package/src/types/operations.ts +105 -0
  671. package/src/types/primitives.ts +140 -0
  672. package/src/types/rfcdate.ts +54 -0
  673. package/src/types/smart-union.ts +153 -0
  674. package/src/types/streams.ts +21 -0
  675. package/src/types/unrecognized.ts +35 -0
@@ -0,0 +1,57 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4-mini";
5
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
6
+ import { ERR, OK } from "../types/fp.js";
7
+ /**
8
+ * Utility function that executes some code which may throw a ZodError. It
9
+ * intercepts this error and converts it to an SDKValidationError so as to not
10
+ * leak Zod implementation details to user code.
11
+ */
12
+ export function parse(rawValue, fn, errorMessage) {
13
+ try {
14
+ return fn(rawValue);
15
+ }
16
+ catch (err) {
17
+ if (err instanceof z.core.$ZodError) {
18
+ throw new SDKValidationError(errorMessage, err, rawValue);
19
+ }
20
+ throw err;
21
+ }
22
+ }
23
+ /**
24
+ * Utility function that executes some code which may result in a ZodError. It
25
+ * intercepts this error and converts it to an SDKValidationError so as to not
26
+ * leak Zod implementation details to user code.
27
+ */
28
+ export function safeParse(rawValue, fn, errorMessage) {
29
+ try {
30
+ return OK(fn(rawValue));
31
+ }
32
+ catch (err) {
33
+ return ERR(new SDKValidationError(errorMessage, err, rawValue));
34
+ }
35
+ }
36
+ export function collectExtraKeys(obj, extrasKey, optional) {
37
+ return z.pipe(obj, z.transform((val) => {
38
+ const extras = {};
39
+ const { shape } = obj;
40
+ for (const [key] of Object.entries(val)) {
41
+ if (key in shape) {
42
+ continue;
43
+ }
44
+ const v = val[key];
45
+ if (typeof v === "undefined") {
46
+ continue;
47
+ }
48
+ extras[key] = v;
49
+ delete val[key];
50
+ }
51
+ if (optional && Object.keys(extras).length === 0) {
52
+ return val;
53
+ }
54
+ return { ...val, [extrasKey]: extras };
55
+ }));
56
+ }
57
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/lib/schemas.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,gBAAgB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,UAAU,KAAK,CACnB,QAAa,EACb,EAAuB,EACvB,YAAoB,EACf;IACL,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;IACtB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpC,MAAM,IAAI,kBAAkB,CAAC,YAAY,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC5D,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AAAA,CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CACvB,QAAa,EACb,EAAuB,EACvB,YAAoB,EACa;IACjC,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC1B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,GAAG,CAAC,IAAI,kBAAkB,CAAC,YAAY,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;IAClE,CAAC;AAAA,CACF;AAED,MAAM,UAAU,gBAAgB,CAM9B,GAAuD,EACvD,SAAY,EACZ,QAAkB,EAalB;IACA,OAAO,CAAC,CAAC,IAAI,CACX,GAAG,EACH,CAAC,CAAC,SAAS,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC;QACxB,MAAM,MAAM,GAAuC,EAAE,CAAC;QACtD,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC;QACtB,KAAK,MAAM,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,IAAI,GAAG,IAAI,KAAK,EAAE,CAAC;gBACjB,SAAS;YACX,CAAC;YAED,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;YACnB,IAAI,OAAO,CAAC,KAAK,WAAW,EAAE,CAAC;gBAC7B,SAAS;YACX,CAAC;YAED,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAChB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC;QAED,IAAI,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjD,OAAO,GAAG,CAAC;QACb,CAAC;QAED,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAAA,CACxC,CAAC,CACH,CAAC;AAAA,CACH"}
@@ -0,0 +1,63 @@
1
+ import { SDKHooks } from "../hooks/hooks.js";
2
+ import { HookContext } from "../hooks/types.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/http-client-errors.js";
4
+ import { Result } from "../types/fp.js";
5
+ import { SDKOptions } from "./config.js";
6
+ import { RetryConfig } from "./retries.js";
7
+ import { SecurityState } from "./security.js";
8
+ export type RequestOptions = {
9
+ /**
10
+ * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If
11
+ * `fetchOptions.signal` is set then it will take precedence over this option.
12
+ */
13
+ timeoutMs?: number;
14
+ /**
15
+ * Set or override a retry policy on HTTP calls.
16
+ */
17
+ retries?: RetryConfig;
18
+ /**
19
+ * Specifies the status codes which should be retried using the given retry policy.
20
+ */
21
+ retryCodes?: string[];
22
+ /**
23
+ * Overrides the base server URL that will be used by an operation.
24
+ */
25
+ serverURL?: string | URL;
26
+ /**
27
+ * @deprecated `fetchOptions` has been flattened into `RequestOptions`.
28
+ *
29
+ * Sets various request options on the `fetch` call made by an SDK method.
30
+ *
31
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request}
32
+ */
33
+ fetchOptions?: Omit<RequestInit, "method" | "body">;
34
+ } & Omit<RequestInit, "method" | "body">;
35
+ type RequestConfig = {
36
+ method: string;
37
+ path: string;
38
+ baseURL?: string | URL | undefined;
39
+ query?: string;
40
+ body?: RequestInit["body"];
41
+ headers?: HeadersInit;
42
+ security?: SecurityState | null;
43
+ uaHeader?: string;
44
+ userAgent?: string | undefined;
45
+ timeoutMs?: number;
46
+ };
47
+ export declare class ClientSDK {
48
+ #private;
49
+ readonly _baseURL: URL | null;
50
+ readonly _options: SDKOptions & {
51
+ hooks?: SDKHooks;
52
+ };
53
+ constructor(options?: SDKOptions);
54
+ _createRequest(context: HookContext, conf: RequestConfig, options?: RequestOptions): Result<Request, InvalidRequestError | UnexpectedClientError>;
55
+ _do(request: Request, options: {
56
+ context: HookContext;
57
+ isErrorStatusCode: (statusCode: number) => boolean;
58
+ retryConfig: RetryConfig;
59
+ retryCodes: string[];
60
+ }): Promise<Result<Response, RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError>>;
61
+ }
62
+ export {};
63
+ //# sourceMappingURL=sdks.d.ts.map
@@ -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Q,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAWF,qBAAa,SAAS;;IAIpB,SAAgB,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;IACrC,SAAgB,QAAQ,EAAE,UAAU,GAAG;QAAE,KAAK,CAAC,EAAE,QAAQ,CAAA;KAAE,CAAC;IAE5D,YAAY,OAAO,GAAE,UAAe,EA6BnC;IAEM,cAAc,CACnB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,aAAa,EACnB,OAAO,CAAC,EAAE,cAAc,GACvB,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,qBAAqB,CAAC,CAsI9D;IAEY,GAAG,CACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE;QACP,OAAO,EAAE,WAAW,CAAC;QACrB,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;QACnD,WAAW,EAAE,WAAW,CAAC;QACzB,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,GACA,OAAO,CACR,MAAM,CACJ,QAAQ,EACN,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,GACf,qBAAqB,CACxB,CACF,CAsEA;CACF"}
@@ -0,0 +1,294 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import { SDKHooks } from "../hooks/hooks.js";
5
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError, } from "../models/errors/http-client-errors.js";
6
+ import { ERR, OK } from "../types/fp.js";
7
+ import { stringToBase64 } from "./base64.js";
8
+ import { SDK_METADATA, serverURLFromOptions } from "./config.js";
9
+ import { encodeForm } from "./encodings.js";
10
+ import { env } from "./env.js";
11
+ import { HTTPClient, isAbortError, isConnectionError, isTimeoutError, matchContentType, } from "./http.js";
12
+ import { combineSignals } from "./primitives.js";
13
+ import { retry } from "./retries.js";
14
+ const gt = typeof globalThis === "undefined" ? null : globalThis;
15
+ const webWorkerLike = typeof gt === "object"
16
+ && gt != null
17
+ && "importScripts" in gt
18
+ && typeof gt["importScripts"] === "function";
19
+ const isBrowserLike = webWorkerLike
20
+ || (typeof navigator !== "undefined" && "serviceWorker" in navigator)
21
+ || (typeof window === "object" && typeof window.document !== "undefined");
22
+ export class ClientSDK {
23
+ #httpClient;
24
+ #hooks;
25
+ #logger;
26
+ _baseURL;
27
+ _options;
28
+ constructor(options = {}) {
29
+ const opt = options;
30
+ if (typeof opt === "object"
31
+ && opt != null
32
+ && "hooks" in opt
33
+ && opt.hooks instanceof SDKHooks) {
34
+ this.#hooks = opt.hooks;
35
+ }
36
+ else {
37
+ this.#hooks = new SDKHooks();
38
+ }
39
+ const defaultHttpClient = new HTTPClient();
40
+ options.httpClient = options.httpClient || defaultHttpClient;
41
+ options = this.#hooks.sdkInit(options);
42
+ const url = serverURLFromOptions(options);
43
+ if (url) {
44
+ url.pathname = url.pathname.replace(/\/+$/, "") + "/";
45
+ }
46
+ this._baseURL = url;
47
+ this.#httpClient = options.httpClient || defaultHttpClient;
48
+ this._options = { ...options, hooks: this.#hooks };
49
+ this.#logger = this._options.debugLogger;
50
+ if (!this.#logger && env().CONTINUOUS_DEBUG) {
51
+ this.#logger = console;
52
+ }
53
+ }
54
+ _createRequest(context, conf, options) {
55
+ const { method, path, query, headers: opHeaders, security } = conf;
56
+ const base = conf.baseURL ?? this._baseURL;
57
+ if (!base) {
58
+ return ERR(new InvalidRequestError("No base URL provided for operation"));
59
+ }
60
+ const baseURL = new URL(base);
61
+ let reqURL;
62
+ if (path) {
63
+ baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
64
+ reqURL = new URL(path, baseURL);
65
+ if (!reqURL.search && baseURL.search) {
66
+ reqURL.search = baseURL.search;
67
+ }
68
+ }
69
+ else {
70
+ reqURL = baseURL;
71
+ }
72
+ reqURL.hash = "";
73
+ // Appends already-encoded query pairs to a query string, replacing any
74
+ // existing pairs with the same key so later sources take precedence.
75
+ const mergeQuery = (current, additions) => {
76
+ if (!additions) {
77
+ return current;
78
+ }
79
+ const additionKeys = new Set(additions
80
+ .split("&")
81
+ .filter((pair) => pair !== "")
82
+ .map((pair) => pair.split("=")[0] ?? ""));
83
+ const kept = current.split("&").filter((pair) => {
84
+ return pair !== "" && !additionKeys.has(pair.split("=")[0] ?? "");
85
+ });
86
+ return [...kept, additions].join("&");
87
+ };
88
+ const encodeQueryRecord = (record) => {
89
+ return Object.entries(record)
90
+ .map(([k, v]) => {
91
+ if (v == null) {
92
+ return undefined;
93
+ }
94
+ const value = v;
95
+ return encodeForm(k, value, {
96
+ explode: Array.isArray(value),
97
+ charEncoding: "percent",
98
+ });
99
+ })
100
+ .filter((pair) => typeof pair !== "undefined")
101
+ .join("&");
102
+ };
103
+ const finalQuery = [
104
+ query || "",
105
+ encodeQueryRecord(security?.queryParams || {}),
106
+ ].reduce(mergeQuery, reqURL.search.slice(1));
107
+ if (finalQuery) {
108
+ reqURL.search = `?${finalQuery}`;
109
+ }
110
+ const headers = new Headers(opHeaders);
111
+ const username = security?.basic.username;
112
+ const password = security?.basic.password;
113
+ if (username != null || password != null) {
114
+ const encoded = stringToBase64([username || "", password || ""].join(":"));
115
+ headers.set("Authorization", `Basic ${encoded}`);
116
+ }
117
+ const securityHeaders = new Headers(security?.headers || {});
118
+ for (const [k, v] of securityHeaders) {
119
+ headers.set(k, v);
120
+ }
121
+ let cookie = headers.get("cookie") || "";
122
+ for (const [k, v] of Object.entries(security?.cookies || {})) {
123
+ cookie += `; ${k}=${v}`;
124
+ }
125
+ cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie;
126
+ headers.set("cookie", cookie);
127
+ const userHeaders = new Headers(options?.headers ?? options?.fetchOptions?.headers);
128
+ for (const [k, v] of userHeaders) {
129
+ headers.set(k, v);
130
+ }
131
+ // Only set user agent header in non-browser-like environments since CORS
132
+ // policy disallows setting it in browsers e.g. Chrome throws an error.
133
+ if (!isBrowserLike) {
134
+ headers.set(conf.uaHeader ?? "user-agent", conf.userAgent ?? SDK_METADATA.userAgent);
135
+ }
136
+ const fetchOptions = {
137
+ ...options?.fetchOptions,
138
+ ...options,
139
+ };
140
+ if (!fetchOptions?.signal && conf.timeoutMs != null && conf.timeoutMs > 0) {
141
+ context.timeoutMs = conf.timeoutMs;
142
+ }
143
+ if (conf.body instanceof ReadableStream) {
144
+ Object.assign(fetchOptions, { duplex: "half" });
145
+ }
146
+ let input;
147
+ try {
148
+ input = this.#hooks.beforeCreateRequest(context, {
149
+ url: reqURL,
150
+ options: {
151
+ ...fetchOptions,
152
+ body: conf.body ?? null,
153
+ headers,
154
+ method,
155
+ },
156
+ });
157
+ }
158
+ catch (err) {
159
+ return ERR(new UnexpectedClientError("Create request hook failed to execute", {
160
+ cause: err,
161
+ }));
162
+ }
163
+ return OK(new Request(input.url, input.options));
164
+ }
165
+ async _do(request, options) {
166
+ const { context, isErrorStatusCode } = options;
167
+ const timeoutMs = context.timeoutMs;
168
+ return retry(async () => {
169
+ const cloned = request.clone();
170
+ let attempt = cloned;
171
+ if (timeoutMs != null && timeoutMs > 0) {
172
+ const timeoutSignal = AbortSignal.timeout(timeoutMs);
173
+ const combined = combineSignals(cloned.signal, timeoutSignal)
174
+ ?? timeoutSignal;
175
+ attempt = new Request(cloned, { signal: combined });
176
+ }
177
+ const req = await this.#hooks.beforeRequest(context, attempt);
178
+ await logRequest(this.#logger, req).catch((e) => this.#logger?.log("Failed to log request:", e));
179
+ let response = await this.#httpClient.request(req);
180
+ try {
181
+ if (isErrorStatusCode(response.status)) {
182
+ const result = await this.#hooks.afterError(context, response, null);
183
+ if (result.error) {
184
+ throw result.error;
185
+ }
186
+ response = result.response || response;
187
+ }
188
+ else {
189
+ response = await this.#hooks.afterSuccess(context, response);
190
+ }
191
+ }
192
+ finally {
193
+ await logResponse(this.#logger, response, req)
194
+ .catch(e => this.#logger?.log("Failed to log response:", e));
195
+ }
196
+ return response;
197
+ }, { config: options.retryConfig, statusCodes: options.retryCodes }).then((r) => OK(r), (err) => {
198
+ switch (true) {
199
+ case isAbortError(err):
200
+ return ERR(new RequestAbortedError("Request aborted by client", {
201
+ cause: err,
202
+ }));
203
+ case isTimeoutError(err):
204
+ return ERR(new RequestTimeoutError("Request timed out", { cause: err }));
205
+ case isConnectionError(err):
206
+ return ERR(new ConnectionError("Unable to make request", { cause: err }));
207
+ default:
208
+ return ERR(new UnexpectedClientError("Unexpected HTTP client error", {
209
+ cause: err,
210
+ }));
211
+ }
212
+ });
213
+ }
214
+ }
215
+ const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/;
216
+ const jsonlLikeContentTypeRE = /^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;
217
+ async function logRequest(logger, req) {
218
+ if (!logger) {
219
+ return;
220
+ }
221
+ const contentType = req.headers.get("content-type");
222
+ const ct = contentType?.split(";")[0] || "";
223
+ logger.group(`> Request: ${req.method} ${req.url}`);
224
+ logger.group("Headers:");
225
+ for (const [k, v] of req.headers.entries()) {
226
+ logger.log(`${k}: ${v}`);
227
+ }
228
+ logger.groupEnd();
229
+ logger.group("Body:");
230
+ switch (true) {
231
+ case jsonLikeContentTypeRE.test(ct):
232
+ logger.log(await req.clone().json());
233
+ break;
234
+ case ct.startsWith("text/"):
235
+ logger.log(await req.clone().text());
236
+ break;
237
+ case ct === "multipart/form-data": {
238
+ const body = await req.clone().formData();
239
+ for (const [k, v] of body) {
240
+ const vlabel = v instanceof Blob ? "<Blob>" : v;
241
+ logger.log(`${k}: ${vlabel}`);
242
+ }
243
+ break;
244
+ }
245
+ default:
246
+ logger.log(`<${contentType}>`);
247
+ break;
248
+ }
249
+ logger.groupEnd();
250
+ logger.groupEnd();
251
+ }
252
+ async function logResponse(logger, res, req) {
253
+ if (!logger) {
254
+ return;
255
+ }
256
+ const contentType = res.headers.get("content-type");
257
+ const ct = contentType?.split(";")[0] || "";
258
+ logger.group(`< Response: ${req.method} ${req.url}`);
259
+ logger.log("Status Code:", res.status, res.statusText);
260
+ logger.group("Headers:");
261
+ for (const [k, v] of res.headers.entries()) {
262
+ logger.log(`${k}: ${v}`);
263
+ }
264
+ logger.groupEnd();
265
+ logger.group("Body:");
266
+ switch (true) {
267
+ case matchContentType(res, "application/json")
268
+ || jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct):
269
+ logger.log(await res.clone().json());
270
+ break;
271
+ case matchContentType(res, "application/jsonl")
272
+ || jsonlLikeContentTypeRE.test(ct):
273
+ case matchContentType(res, "text/event-stream"):
274
+ logger.log(`<${contentType}>`);
275
+ break;
276
+ case matchContentType(res, "text/*"):
277
+ logger.log(await res.clone().text());
278
+ break;
279
+ case matchContentType(res, "multipart/form-data"): {
280
+ const body = await res.clone().formData();
281
+ for (const [k, v] of body) {
282
+ const vlabel = v instanceof Blob ? "<Blob>" : v;
283
+ logger.log(`${k}: ${vlabel}`);
284
+ }
285
+ break;
286
+ }
287
+ default:
288
+ logger.log(`<${contentType}>`);
289
+ break;
290
+ }
291
+ logger.groupEnd();
292
+ logger.groupEnd();
293
+ }
294
+ //# sourceMappingURL=sdks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdks.js","sourceRoot":"","sources":["../../src/lib/sdks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,EAAE,EAAU,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAc,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAA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"}
@@ -0,0 +1,84 @@
1
+ import * as models from "../models/index.js";
2
+ type OAuth2PasswordFlow = {
3
+ username: string;
4
+ password: string;
5
+ clientID?: string | undefined;
6
+ clientSecret?: string | undefined;
7
+ tokenURL: string;
8
+ };
9
+ export declare const SecurityErrorCode: {
10
+ readonly Incomplete: "incomplete";
11
+ readonly UnrecognisedSecurityType: "unrecognized_security_type";
12
+ };
13
+ export type SecurityErrorCode = (typeof SecurityErrorCode)[keyof typeof SecurityErrorCode];
14
+ export declare class SecurityError extends Error {
15
+ code: SecurityErrorCode;
16
+ constructor(code: SecurityErrorCode, message: string);
17
+ static incomplete(): SecurityError;
18
+ static unrecognizedType(type: string): SecurityError;
19
+ }
20
+ export type SecurityState = {
21
+ basic: {
22
+ username?: string | undefined;
23
+ password?: string | undefined;
24
+ };
25
+ headers: Record<string, string>;
26
+ queryParams: Record<string, string>;
27
+ cookies: Record<string, string>;
28
+ oauth2: ({
29
+ type: "password";
30
+ } & OAuth2PasswordFlow) | {
31
+ type: "none";
32
+ };
33
+ };
34
+ type SecurityInputBasic = {
35
+ type: "http:basic";
36
+ value: {
37
+ username?: string | undefined;
38
+ password?: string | undefined;
39
+ } | null | undefined;
40
+ };
41
+ type SecurityInputBearer = {
42
+ type: "http:bearer";
43
+ value: string | null | undefined;
44
+ fieldName: string;
45
+ };
46
+ type SecurityInputAPIKey = {
47
+ type: "apiKey:header" | "apiKey:query" | "apiKey:cookie";
48
+ value: string | null | undefined;
49
+ fieldName: string;
50
+ };
51
+ type SecurityInputOIDC = {
52
+ type: "openIdConnect";
53
+ value: string | null | undefined;
54
+ fieldName: string;
55
+ };
56
+ type SecurityInputOAuth2 = {
57
+ type: "oauth2";
58
+ value: string | null | undefined;
59
+ fieldName: string;
60
+ };
61
+ type SecurityInputOAuth2ClientCredentials = {
62
+ type: "oauth2:client_credentials";
63
+ value: {
64
+ clientID?: string | undefined;
65
+ clientSecret?: string | undefined;
66
+ } | null | string | undefined;
67
+ fieldName?: string;
68
+ };
69
+ type SecurityInputOAuth2PasswordCredentials = {
70
+ type: "oauth2:password";
71
+ value: string | null | undefined;
72
+ fieldName?: string;
73
+ };
74
+ type SecurityInputCustom = {
75
+ type: "http:custom";
76
+ value: any | null | undefined;
77
+ fieldName?: string;
78
+ };
79
+ export type SecurityInput = SecurityInputBasic | SecurityInputBearer | SecurityInputAPIKey | SecurityInputOAuth2 | SecurityInputOAuth2ClientCredentials | SecurityInputOAuth2PasswordCredentials | SecurityInputOIDC | SecurityInputCustom;
80
+ export declare function resolveSecurity(...options: SecurityInput[][]): SecurityState | null;
81
+ export declare function resolveGlobalSecurity(security: Partial<models.Security> | null | undefined, allowedFields?: number[]): SecurityState | null;
82
+ export declare function extractSecurity<T extends string | Record<string, unknown>>(sec: T | (() => Promise<T>) | undefined): Promise<T | undefined>;
83
+ export {};
84
+ //# sourceMappingURL=security.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/lib/security.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAG7C,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D,qBAAa,aAAc,SAAQ,KAAK;IAC/B,IAAI,EAAE,iBAAiB,CAAC;IAE/B,YACE,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,MAAM,EAKhB;IAED,MAAM,CAAC,UAAU,IAAI,aAAa,CAKjC;IACD,MAAM,C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