@synnaxlabs/client 0.46.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (504) hide show
  1. package/.turbo/turbo-build.log +6 -6
  2. package/dist/client.cjs +22 -22
  3. package/dist/client.js +2939 -2871
  4. package/dist/eslint.config.d.ts +3 -0
  5. package/dist/eslint.config.d.ts.map +1 -0
  6. package/dist/src/access/client.d.ts.map +1 -0
  7. package/dist/src/access/external.d.ts.map +1 -0
  8. package/dist/src/access/index.d.ts.map +1 -0
  9. package/dist/src/access/payload.d.ts.map +1 -0
  10. package/dist/src/access/policy/client.d.ts.map +1 -0
  11. package/dist/src/access/policy/external.d.ts.map +1 -0
  12. package/dist/src/access/policy/index.d.ts.map +1 -0
  13. package/dist/src/access/policy/payload.d.ts.map +1 -0
  14. package/dist/src/access/policy/policy.spec.d.ts.map +1 -0
  15. package/dist/{arc → src/arc}/client.d.ts +17 -2
  16. package/dist/src/arc/client.d.ts.map +1 -0
  17. package/dist/src/arc/external.d.ts.map +1 -0
  18. package/dist/src/arc/index.d.ts.map +1 -0
  19. package/dist/src/arc/lsp.spec.d.ts +2 -0
  20. package/dist/src/arc/lsp.spec.d.ts.map +1 -0
  21. package/dist/{arc → src/arc}/payload.d.ts +11 -9
  22. package/dist/src/arc/payload.d.ts.map +1 -0
  23. package/dist/src/auth/auth.d.ts.map +1 -0
  24. package/dist/{auth → src/auth}/auth.spec.d.ts.map +1 -1
  25. package/dist/src/auth/index.d.ts.map +1 -0
  26. package/dist/src/channel/batchRetriever.spec.d.ts.map +1 -0
  27. package/dist/src/channel/channel.spec.d.ts.map +1 -0
  28. package/dist/{channel → src/channel}/client.d.ts +8 -8
  29. package/dist/src/channel/client.d.ts.map +1 -0
  30. package/dist/src/channel/external.d.ts.map +1 -0
  31. package/dist/src/channel/index.d.ts.map +1 -0
  32. package/dist/src/channel/payload.d.ts +259 -0
  33. package/dist/src/channel/payload.d.ts.map +1 -0
  34. package/dist/{channel → src/channel}/retriever.d.ts +2 -1
  35. package/dist/src/channel/retriever.d.ts.map +1 -0
  36. package/dist/src/channel/writer.d.ts.map +1 -0
  37. package/dist/{client.d.ts → src/client.d.ts} +1 -1
  38. package/dist/src/client.d.ts.map +1 -0
  39. package/dist/{connection → src/connection}/checker.d.ts +1 -1
  40. package/dist/src/connection/checker.d.ts.map +1 -0
  41. package/dist/src/connection/connection.spec.d.ts.map +1 -0
  42. package/dist/src/connection/index.d.ts.map +1 -0
  43. package/dist/src/control/client.d.ts.map +1 -0
  44. package/dist/src/control/external.d.ts.map +1 -0
  45. package/dist/src/control/index.d.ts.map +1 -0
  46. package/dist/{control → src/control}/state.d.ts +1 -2
  47. package/dist/src/control/state.d.ts.map +1 -0
  48. package/dist/{control → src/control}/state.spec.d.ts.map +1 -1
  49. package/dist/src/errors.d.ts.map +1 -0
  50. package/dist/{errors.spec.d.ts.map → src/errors.spec.d.ts.map} +1 -1
  51. package/dist/{framer → src/framer}/adapter.d.ts +1 -1
  52. package/dist/src/framer/adapter.d.ts.map +1 -0
  53. package/dist/src/framer/adapter.spec.d.ts.map +1 -0
  54. package/dist/src/framer/client.d.ts.map +1 -0
  55. package/dist/src/framer/client.spec.d.ts.map +1 -0
  56. package/dist/src/framer/codec.d.ts.map +1 -0
  57. package/dist/{framer → src/framer}/codec.spec.d.ts.map +1 -1
  58. package/dist/src/framer/deleter.d.ts.map +1 -0
  59. package/dist/src/framer/deleter.spec.d.ts.map +1 -0
  60. package/dist/{framer → src/framer}/external.d.ts +1 -0
  61. package/dist/src/framer/external.d.ts.map +1 -0
  62. package/dist/{framer → src/framer}/frame.d.ts +4 -4
  63. package/dist/src/framer/frame.d.ts.map +1 -0
  64. package/dist/{framer → src/framer}/frame.spec.d.ts.map +1 -1
  65. package/dist/src/framer/index.d.ts.map +1 -0
  66. package/dist/{framer → src/framer}/iterator.d.ts +1 -2
  67. package/dist/src/framer/iterator.d.ts.map +1 -0
  68. package/dist/src/framer/iterator.spec.d.ts.map +1 -0
  69. package/dist/src/framer/payload.d.ts +7 -0
  70. package/dist/src/framer/payload.d.ts.map +1 -0
  71. package/dist/src/framer/streamProxy.d.ts.map +1 -0
  72. package/dist/{framer → src/framer}/streamer.d.ts +106 -4
  73. package/dist/src/framer/streamer.d.ts.map +1 -0
  74. package/dist/src/framer/streamer.spec.d.ts.map +1 -0
  75. package/dist/{framer → src/framer}/writer.d.ts +133 -36
  76. package/dist/src/framer/writer.d.ts.map +1 -0
  77. package/dist/src/framer/writer.spec.d.ts.map +1 -0
  78. package/dist/src/hardware/client.d.ts.map +1 -0
  79. package/dist/src/hardware/device/client.d.ts.map +1 -0
  80. package/dist/src/hardware/device/device.spec.d.ts.map +1 -0
  81. package/dist/src/hardware/device/external.d.ts.map +1 -0
  82. package/dist/src/hardware/device/index.d.ts.map +1 -0
  83. package/dist/{hardware → src/hardware}/device/payload.d.ts +4 -4
  84. package/dist/src/hardware/device/payload.d.ts.map +1 -0
  85. package/dist/src/hardware/external.d.ts.map +1 -0
  86. package/dist/src/hardware/index.d.ts.map +1 -0
  87. package/dist/src/hardware/rack/client.d.ts.map +1 -0
  88. package/dist/src/hardware/rack/external.d.ts.map +1 -0
  89. package/dist/src/hardware/rack/index.d.ts.map +1 -0
  90. package/dist/{hardware → src/hardware}/rack/payload.d.ts +4 -4
  91. package/dist/src/hardware/rack/payload.d.ts.map +1 -0
  92. package/dist/src/hardware/rack/rack.spec.d.ts.map +1 -0
  93. package/dist/{hardware → src/hardware}/task/client.d.ts +7 -2
  94. package/dist/src/hardware/task/client.d.ts.map +1 -0
  95. package/dist/src/hardware/task/external.d.ts.map +1 -0
  96. package/dist/src/hardware/task/index.d.ts.map +1 -0
  97. package/dist/src/hardware/task/payload.d.ts.map +1 -0
  98. package/dist/src/hardware/task/task.spec.d.ts.map +1 -0
  99. package/dist/{index.d.ts → src/index.d.ts} +1 -1
  100. package/dist/src/index.d.ts.map +1 -0
  101. package/dist/src/label/client.d.ts.map +1 -0
  102. package/dist/src/label/external.d.ts.map +1 -0
  103. package/dist/src/label/index.d.ts.map +1 -0
  104. package/dist/{label → src/label}/label.spec.d.ts.map +1 -1
  105. package/dist/src/label/payload.d.ts.map +1 -0
  106. package/dist/src/ontology/client.d.ts.map +1 -0
  107. package/dist/src/ontology/external.d.ts.map +1 -0
  108. package/dist/src/ontology/group/client.d.ts.map +1 -0
  109. package/dist/src/ontology/group/external.d.ts.map +1 -0
  110. package/dist/src/ontology/group/group.spec.d.ts.map +1 -0
  111. package/dist/src/ontology/group/index.d.ts.map +1 -0
  112. package/dist/src/ontology/group/payload.d.ts.map +1 -0
  113. package/dist/src/ontology/index.d.ts.map +1 -0
  114. package/dist/src/ontology/ontology.spec.d.ts.map +1 -0
  115. package/dist/src/ontology/payload.d.ts.map +1 -0
  116. package/dist/src/ontology/writer.d.ts.map +1 -0
  117. package/dist/{ranger → src/ranger}/alias.d.ts +1 -1
  118. package/dist/src/ranger/alias.d.ts.map +1 -0
  119. package/dist/{ranger → src/ranger}/client.d.ts +1 -2
  120. package/dist/src/ranger/client.d.ts.map +1 -0
  121. package/dist/src/ranger/external.d.ts.map +1 -0
  122. package/dist/src/ranger/index.d.ts.map +1 -0
  123. package/dist/src/ranger/kv.d.ts.map +1 -0
  124. package/dist/{ranger → src/ranger}/payload.d.ts +1 -1
  125. package/dist/src/ranger/payload.d.ts.map +1 -0
  126. package/dist/src/ranger/ranger.spec.d.ts.map +1 -0
  127. package/dist/src/ranger/writer.d.ts.map +1 -0
  128. package/dist/src/status/client.d.ts.map +1 -0
  129. package/dist/src/status/external.d.ts.map +1 -0
  130. package/dist/src/status/index.d.ts.map +1 -0
  131. package/dist/{status → src/status}/payload.d.ts +2 -2
  132. package/dist/src/status/payload.d.ts.map +1 -0
  133. package/dist/src/status/status.spec.d.ts.map +1 -0
  134. package/dist/src/testutil/channels.d.ts.map +1 -0
  135. package/dist/src/testutil/client.d.ts.map +1 -0
  136. package/dist/src/testutil/telem.d.ts.map +1 -0
  137. package/dist/{transport.d.ts → src/transport.d.ts} +1 -2
  138. package/dist/src/transport.d.ts.map +1 -0
  139. package/dist/src/user/client.d.ts.map +1 -0
  140. package/dist/src/user/external.d.ts.map +1 -0
  141. package/dist/src/user/index.d.ts.map +1 -0
  142. package/dist/src/user/payload.d.ts.map +1 -0
  143. package/dist/src/user/retriever.d.ts.map +1 -0
  144. package/dist/{user → src/user}/user.spec.d.ts.map +1 -1
  145. package/dist/src/user/writer.d.ts.map +1 -0
  146. package/dist/src/util/decodeJSONString.d.ts.map +1 -0
  147. package/dist/src/util/parseWithoutKeyConversion.d.ts +3 -0
  148. package/dist/src/util/parseWithoutKeyConversion.d.ts.map +1 -0
  149. package/dist/src/util/retrieve.d.ts.map +1 -0
  150. package/dist/src/util/retrieve.spec.d.ts.map +1 -0
  151. package/dist/src/util/telem.d.ts +3 -0
  152. package/dist/src/util/telem.d.ts.map +1 -0
  153. package/dist/src/workspace/client.d.ts.map +1 -0
  154. package/dist/src/workspace/external.d.ts.map +1 -0
  155. package/dist/src/workspace/index.d.ts.map +1 -0
  156. package/dist/src/workspace/lineplot/client.d.ts.map +1 -0
  157. package/dist/src/workspace/lineplot/external.d.ts.map +1 -0
  158. package/dist/src/workspace/lineplot/index.d.ts.map +1 -0
  159. package/dist/src/workspace/lineplot/lineplot.spec.d.ts.map +1 -0
  160. package/dist/{workspace → src/workspace}/lineplot/payload.d.ts +1 -1
  161. package/dist/src/workspace/lineplot/payload.d.ts.map +1 -0
  162. package/dist/src/workspace/log/client.d.ts.map +1 -0
  163. package/dist/src/workspace/log/external.d.ts.map +1 -0
  164. package/dist/src/workspace/log/index.d.ts.map +1 -0
  165. package/dist/src/workspace/log/log.spec.d.ts.map +1 -0
  166. package/dist/{workspace → src/workspace}/log/payload.d.ts +1 -1
  167. package/dist/src/workspace/log/payload.d.ts.map +1 -0
  168. package/dist/{workspace → src/workspace}/payload.d.ts +1 -1
  169. package/dist/src/workspace/payload.d.ts.map +1 -0
  170. package/dist/src/workspace/schematic/client.d.ts.map +1 -0
  171. package/dist/src/workspace/schematic/external.d.ts.map +1 -0
  172. package/dist/src/workspace/schematic/index.d.ts.map +1 -0
  173. package/dist/{workspace → src/workspace}/schematic/payload.d.ts +1 -1
  174. package/dist/src/workspace/schematic/payload.d.ts.map +1 -0
  175. package/dist/src/workspace/schematic/schematic.spec.d.ts.map +1 -0
  176. package/dist/src/workspace/schematic/symbol/client.d.ts.map +1 -0
  177. package/dist/src/workspace/schematic/symbol/client.spec.d.ts.map +1 -0
  178. package/dist/src/workspace/schematic/symbol/external.d.ts.map +1 -0
  179. package/dist/src/workspace/schematic/symbol/index.d.ts.map +1 -0
  180. package/dist/src/workspace/schematic/symbol/payload.d.ts.map +1 -0
  181. package/dist/src/workspace/table/client.d.ts.map +1 -0
  182. package/dist/src/workspace/table/external.d.ts.map +1 -0
  183. package/dist/src/workspace/table/index.d.ts.map +1 -0
  184. package/dist/{workspace → src/workspace}/table/payload.d.ts +1 -1
  185. package/dist/src/workspace/table/payload.d.ts.map +1 -0
  186. package/dist/src/workspace/table/table.spec.d.ts.map +1 -0
  187. package/dist/src/workspace/workspace.spec.d.ts.map +1 -0
  188. package/examples/node/streamWrite.js +0 -1
  189. package/package.json +5 -5
  190. package/src/arc/client.ts +27 -2
  191. package/src/arc/lsp.spec.ts +852 -0
  192. package/src/arc/payload.ts +13 -8
  193. package/src/auth/auth.spec.ts +1 -1
  194. package/src/channel/batchRetriever.spec.ts +3 -2
  195. package/src/channel/channel.spec.ts +8 -22
  196. package/src/channel/client.ts +22 -14
  197. package/src/channel/payload.ts +25 -4
  198. package/src/channel/retriever.ts +2 -3
  199. package/src/client.ts +2 -4
  200. package/src/connection/checker.ts +3 -4
  201. package/src/connection/connection.spec.ts +1 -1
  202. package/src/control/state.ts +1 -3
  203. package/src/errors.ts +2 -2
  204. package/src/framer/adapter.spec.ts +1 -1
  205. package/src/framer/adapter.ts +1 -2
  206. package/src/framer/client.ts +0 -2
  207. package/src/framer/codec.spec.ts +11 -1
  208. package/src/framer/codec.ts +3 -2
  209. package/src/framer/deleter.spec.ts +1 -1
  210. package/src/framer/deleter.ts +1 -3
  211. package/src/framer/external.ts +1 -0
  212. package/src/framer/frame.spec.ts +1 -1
  213. package/src/framer/frame.ts +6 -5
  214. package/src/framer/iterator.spec.ts +1 -2
  215. package/src/framer/iterator.ts +3 -4
  216. package/src/framer/payload.ts +15 -0
  217. package/src/framer/streamer.spec.ts +15 -12
  218. package/src/framer/streamer.ts +1 -3
  219. package/src/framer/writer.spec.ts +1 -9
  220. package/src/framer/writer.ts +29 -35
  221. package/src/hardware/task/client.ts +11 -2
  222. package/src/hardware/task/task.spec.ts +44 -0
  223. package/src/index.ts +1 -1
  224. package/src/label/client.ts +1 -1
  225. package/src/ranger/alias.ts +1 -2
  226. package/src/ranger/client.ts +1 -2
  227. package/src/ranger/kv.ts +1 -2
  228. package/src/ranger/payload.ts +1 -2
  229. package/src/ranger/ranger.spec.ts +1 -2
  230. package/src/status/client.ts +1 -1
  231. package/src/status/payload.ts +4 -2
  232. package/src/transport.ts +1 -3
  233. package/src/user/writer.ts +1 -1
  234. package/src/util/parseWithoutKeyConversion.ts +1 -1
  235. package/src/util/telem.ts +1 -1
  236. package/src/workspace/lineplot/payload.ts +1 -1
  237. package/src/workspace/log/payload.ts +1 -1
  238. package/src/workspace/payload.ts +1 -1
  239. package/src/workspace/schematic/payload.ts +1 -1
  240. package/src/workspace/table/payload.ts +1 -1
  241. package/tsconfig.json +1 -1
  242. package/dist/access/client.d.ts.map +0 -1
  243. package/dist/access/external.d.ts.map +0 -1
  244. package/dist/access/index.d.ts.map +0 -1
  245. package/dist/access/payload.d.ts.map +0 -1
  246. package/dist/access/policy/client.d.ts.map +0 -1
  247. package/dist/access/policy/external.d.ts.map +0 -1
  248. package/dist/access/policy/index.d.ts.map +0 -1
  249. package/dist/access/policy/payload.d.ts.map +0 -1
  250. package/dist/access/policy/policy.spec.d.ts.map +0 -1
  251. package/dist/arc/client.d.ts.map +0 -1
  252. package/dist/arc/external.d.ts.map +0 -1
  253. package/dist/arc/index.d.ts.map +0 -1
  254. package/dist/arc/payload.d.ts.map +0 -1
  255. package/dist/auth/auth.d.ts.map +0 -1
  256. package/dist/auth/index.d.ts.map +0 -1
  257. package/dist/channel/batchRetriever.spec.d.ts.map +0 -1
  258. package/dist/channel/channel.spec.d.ts.map +0 -1
  259. package/dist/channel/client.d.ts.map +0 -1
  260. package/dist/channel/external.d.ts.map +0 -1
  261. package/dist/channel/index.d.ts.map +0 -1
  262. package/dist/channel/payload.d.ts +0 -150
  263. package/dist/channel/payload.d.ts.map +0 -1
  264. package/dist/channel/retriever.d.ts.map +0 -1
  265. package/dist/channel/writer.d.ts.map +0 -1
  266. package/dist/client.d.ts.map +0 -1
  267. package/dist/connection/checker.d.ts.map +0 -1
  268. package/dist/connection/connection.spec.d.ts.map +0 -1
  269. package/dist/connection/index.d.ts.map +0 -1
  270. package/dist/control/client.d.ts.map +0 -1
  271. package/dist/control/external.d.ts.map +0 -1
  272. package/dist/control/index.d.ts.map +0 -1
  273. package/dist/control/state.d.ts.map +0 -1
  274. package/dist/errors.d.ts.map +0 -1
  275. package/dist/framer/adapter.d.ts.map +0 -1
  276. package/dist/framer/adapter.spec.d.ts.map +0 -1
  277. package/dist/framer/client.d.ts.map +0 -1
  278. package/dist/framer/client.spec.d.ts.map +0 -1
  279. package/dist/framer/codec.d.ts.map +0 -1
  280. package/dist/framer/deleter.d.ts.map +0 -1
  281. package/dist/framer/deleter.spec.d.ts.map +0 -1
  282. package/dist/framer/external.d.ts.map +0 -1
  283. package/dist/framer/frame.d.ts.map +0 -1
  284. package/dist/framer/index.d.ts.map +0 -1
  285. package/dist/framer/iterator.d.ts.map +0 -1
  286. package/dist/framer/iterator.spec.d.ts.map +0 -1
  287. package/dist/framer/streamProxy.d.ts.map +0 -1
  288. package/dist/framer/streamer.d.ts.map +0 -1
  289. package/dist/framer/streamer.spec.d.ts.map +0 -1
  290. package/dist/framer/writer.d.ts.map +0 -1
  291. package/dist/framer/writer.spec.d.ts.map +0 -1
  292. package/dist/hardware/client.d.ts.map +0 -1
  293. package/dist/hardware/device/client.d.ts.map +0 -1
  294. package/dist/hardware/device/device.spec.d.ts.map +0 -1
  295. package/dist/hardware/device/external.d.ts.map +0 -1
  296. package/dist/hardware/device/index.d.ts.map +0 -1
  297. package/dist/hardware/device/payload.d.ts.map +0 -1
  298. package/dist/hardware/external.d.ts.map +0 -1
  299. package/dist/hardware/index.d.ts.map +0 -1
  300. package/dist/hardware/rack/client.d.ts.map +0 -1
  301. package/dist/hardware/rack/external.d.ts.map +0 -1
  302. package/dist/hardware/rack/index.d.ts.map +0 -1
  303. package/dist/hardware/rack/payload.d.ts.map +0 -1
  304. package/dist/hardware/rack/rack.spec.d.ts.map +0 -1
  305. package/dist/hardware/task/client.d.ts.map +0 -1
  306. package/dist/hardware/task/external.d.ts.map +0 -1
  307. package/dist/hardware/task/index.d.ts.map +0 -1
  308. package/dist/hardware/task/payload.d.ts.map +0 -1
  309. package/dist/hardware/task/task.spec.d.ts.map +0 -1
  310. package/dist/index.d.ts.map +0 -1
  311. package/dist/label/client.d.ts.map +0 -1
  312. package/dist/label/external.d.ts.map +0 -1
  313. package/dist/label/index.d.ts.map +0 -1
  314. package/dist/label/payload.d.ts.map +0 -1
  315. package/dist/ontology/client.d.ts.map +0 -1
  316. package/dist/ontology/external.d.ts.map +0 -1
  317. package/dist/ontology/group/client.d.ts.map +0 -1
  318. package/dist/ontology/group/external.d.ts.map +0 -1
  319. package/dist/ontology/group/group.spec.d.ts.map +0 -1
  320. package/dist/ontology/group/index.d.ts.map +0 -1
  321. package/dist/ontology/group/payload.d.ts.map +0 -1
  322. package/dist/ontology/index.d.ts.map +0 -1
  323. package/dist/ontology/ontology.spec.d.ts.map +0 -1
  324. package/dist/ontology/payload.d.ts.map +0 -1
  325. package/dist/ontology/writer.d.ts.map +0 -1
  326. package/dist/ranger/alias.d.ts.map +0 -1
  327. package/dist/ranger/client.d.ts.map +0 -1
  328. package/dist/ranger/external.d.ts.map +0 -1
  329. package/dist/ranger/index.d.ts.map +0 -1
  330. package/dist/ranger/kv.d.ts.map +0 -1
  331. package/dist/ranger/payload.d.ts.map +0 -1
  332. package/dist/ranger/ranger.spec.d.ts.map +0 -1
  333. package/dist/ranger/writer.d.ts.map +0 -1
  334. package/dist/status/client.d.ts.map +0 -1
  335. package/dist/status/external.d.ts.map +0 -1
  336. package/dist/status/index.d.ts.map +0 -1
  337. package/dist/status/payload.d.ts.map +0 -1
  338. package/dist/status/status.spec.d.ts.map +0 -1
  339. package/dist/testutil/channels.d.ts.map +0 -1
  340. package/dist/testutil/client.d.ts.map +0 -1
  341. package/dist/testutil/telem.d.ts.map +0 -1
  342. package/dist/transport.d.ts.map +0 -1
  343. package/dist/user/client.d.ts.map +0 -1
  344. package/dist/user/external.d.ts.map +0 -1
  345. package/dist/user/index.d.ts.map +0 -1
  346. package/dist/user/payload.d.ts.map +0 -1
  347. package/dist/user/retriever.d.ts.map +0 -1
  348. package/dist/user/writer.d.ts.map +0 -1
  349. package/dist/util/decodeJSONString.d.ts.map +0 -1
  350. package/dist/util/parseWithoutKeyConversion.d.ts +0 -3
  351. package/dist/util/parseWithoutKeyConversion.d.ts.map +0 -1
  352. package/dist/util/retrieve.d.ts.map +0 -1
  353. package/dist/util/retrieve.spec.d.ts.map +0 -1
  354. package/dist/util/telem.d.ts +0 -3
  355. package/dist/util/telem.d.ts.map +0 -1
  356. package/dist/workspace/client.d.ts.map +0 -1
  357. package/dist/workspace/external.d.ts.map +0 -1
  358. package/dist/workspace/index.d.ts.map +0 -1
  359. package/dist/workspace/lineplot/client.d.ts.map +0 -1
  360. package/dist/workspace/lineplot/external.d.ts.map +0 -1
  361. package/dist/workspace/lineplot/index.d.ts.map +0 -1
  362. package/dist/workspace/lineplot/lineplot.spec.d.ts.map +0 -1
  363. package/dist/workspace/lineplot/payload.d.ts.map +0 -1
  364. package/dist/workspace/log/client.d.ts.map +0 -1
  365. package/dist/workspace/log/external.d.ts.map +0 -1
  366. package/dist/workspace/log/index.d.ts.map +0 -1
  367. package/dist/workspace/log/log.spec.d.ts.map +0 -1
  368. package/dist/workspace/log/payload.d.ts.map +0 -1
  369. package/dist/workspace/payload.d.ts.map +0 -1
  370. package/dist/workspace/schematic/client.d.ts.map +0 -1
  371. package/dist/workspace/schematic/external.d.ts.map +0 -1
  372. package/dist/workspace/schematic/index.d.ts.map +0 -1
  373. package/dist/workspace/schematic/payload.d.ts.map +0 -1
  374. package/dist/workspace/schematic/schematic.spec.d.ts.map +0 -1
  375. package/dist/workspace/schematic/symbol/client.d.ts.map +0 -1
  376. package/dist/workspace/schematic/symbol/client.spec.d.ts.map +0 -1
  377. package/dist/workspace/schematic/symbol/external.d.ts.map +0 -1
  378. package/dist/workspace/schematic/symbol/index.d.ts.map +0 -1
  379. package/dist/workspace/schematic/symbol/payload.d.ts.map +0 -1
  380. package/dist/workspace/table/client.d.ts.map +0 -1
  381. package/dist/workspace/table/external.d.ts.map +0 -1
  382. package/dist/workspace/table/index.d.ts.map +0 -1
  383. package/dist/workspace/table/payload.d.ts.map +0 -1
  384. package/dist/workspace/table/table.spec.d.ts.map +0 -1
  385. package/dist/workspace/workspace.spec.d.ts.map +0 -1
  386. /package/dist/{access → src/access}/client.d.ts +0 -0
  387. /package/dist/{access → src/access}/external.d.ts +0 -0
  388. /package/dist/{access → src/access}/index.d.ts +0 -0
  389. /package/dist/{access → src/access}/payload.d.ts +0 -0
  390. /package/dist/{access → src/access}/policy/client.d.ts +0 -0
  391. /package/dist/{access → src/access}/policy/external.d.ts +0 -0
  392. /package/dist/{access → src/access}/policy/index.d.ts +0 -0
  393. /package/dist/{access → src/access}/policy/payload.d.ts +0 -0
  394. /package/dist/{access → src/access}/policy/policy.spec.d.ts +0 -0
  395. /package/dist/{arc → src/arc}/external.d.ts +0 -0
  396. /package/dist/{arc → src/arc}/index.d.ts +0 -0
  397. /package/dist/{auth → src/auth}/auth.d.ts +0 -0
  398. /package/dist/{auth → src/auth}/auth.spec.d.ts +0 -0
  399. /package/dist/{auth → src/auth}/index.d.ts +0 -0
  400. /package/dist/{channel → src/channel}/batchRetriever.spec.d.ts +0 -0
  401. /package/dist/{channel → src/channel}/channel.spec.d.ts +0 -0
  402. /package/dist/{channel → src/channel}/external.d.ts +0 -0
  403. /package/dist/{channel → src/channel}/index.d.ts +0 -0
  404. /package/dist/{channel → src/channel}/writer.d.ts +0 -0
  405. /package/dist/{connection → src/connection}/connection.spec.d.ts +0 -0
  406. /package/dist/{connection → src/connection}/index.d.ts +0 -0
  407. /package/dist/{control → src/control}/client.d.ts +0 -0
  408. /package/dist/{control → src/control}/external.d.ts +0 -0
  409. /package/dist/{control → src/control}/index.d.ts +0 -0
  410. /package/dist/{control → src/control}/state.spec.d.ts +0 -0
  411. /package/dist/{errors.d.ts → src/errors.d.ts} +0 -0
  412. /package/dist/{errors.spec.d.ts → src/errors.spec.d.ts} +0 -0
  413. /package/dist/{framer → src/framer}/adapter.spec.d.ts +0 -0
  414. /package/dist/{framer → src/framer}/client.d.ts +0 -0
  415. /package/dist/{framer → src/framer}/client.spec.d.ts +0 -0
  416. /package/dist/{framer → src/framer}/codec.d.ts +0 -0
  417. /package/dist/{framer → src/framer}/codec.spec.d.ts +0 -0
  418. /package/dist/{framer → src/framer}/deleter.d.ts +0 -0
  419. /package/dist/{framer → src/framer}/deleter.spec.d.ts +0 -0
  420. /package/dist/{framer → src/framer}/frame.spec.d.ts +0 -0
  421. /package/dist/{framer → src/framer}/index.d.ts +0 -0
  422. /package/dist/{framer → src/framer}/iterator.spec.d.ts +0 -0
  423. /package/dist/{framer → src/framer}/streamProxy.d.ts +0 -0
  424. /package/dist/{framer → src/framer}/streamer.spec.d.ts +0 -0
  425. /package/dist/{framer → src/framer}/writer.spec.d.ts +0 -0
  426. /package/dist/{hardware → src/hardware}/client.d.ts +0 -0
  427. /package/dist/{hardware → src/hardware}/device/client.d.ts +0 -0
  428. /package/dist/{hardware → src/hardware}/device/device.spec.d.ts +0 -0
  429. /package/dist/{hardware → src/hardware}/device/external.d.ts +0 -0
  430. /package/dist/{hardware → src/hardware}/device/index.d.ts +0 -0
  431. /package/dist/{hardware → src/hardware}/external.d.ts +0 -0
  432. /package/dist/{hardware → src/hardware}/index.d.ts +0 -0
  433. /package/dist/{hardware → src/hardware}/rack/client.d.ts +0 -0
  434. /package/dist/{hardware → src/hardware}/rack/external.d.ts +0 -0
  435. /package/dist/{hardware → src/hardware}/rack/index.d.ts +0 -0
  436. /package/dist/{hardware → src/hardware}/rack/rack.spec.d.ts +0 -0
  437. /package/dist/{hardware → src/hardware}/task/external.d.ts +0 -0
  438. /package/dist/{hardware → src/hardware}/task/index.d.ts +0 -0
  439. /package/dist/{hardware → src/hardware}/task/payload.d.ts +0 -0
  440. /package/dist/{hardware → src/hardware}/task/task.spec.d.ts +0 -0
  441. /package/dist/{label → src/label}/client.d.ts +0 -0
  442. /package/dist/{label → src/label}/external.d.ts +0 -0
  443. /package/dist/{label → src/label}/index.d.ts +0 -0
  444. /package/dist/{label → src/label}/label.spec.d.ts +0 -0
  445. /package/dist/{label → src/label}/payload.d.ts +0 -0
  446. /package/dist/{ontology → src/ontology}/client.d.ts +0 -0
  447. /package/dist/{ontology → src/ontology}/external.d.ts +0 -0
  448. /package/dist/{ontology → src/ontology}/group/client.d.ts +0 -0
  449. /package/dist/{ontology → src/ontology}/group/external.d.ts +0 -0
  450. /package/dist/{ontology → src/ontology}/group/group.spec.d.ts +0 -0
  451. /package/dist/{ontology → src/ontology}/group/index.d.ts +0 -0
  452. /package/dist/{ontology → src/ontology}/group/payload.d.ts +0 -0
  453. /package/dist/{ontology → src/ontology}/index.d.ts +0 -0
  454. /package/dist/{ontology → src/ontology}/ontology.spec.d.ts +0 -0
  455. /package/dist/{ontology → src/ontology}/payload.d.ts +0 -0
  456. /package/dist/{ontology → src/ontology}/writer.d.ts +0 -0
  457. /package/dist/{ranger → src/ranger}/external.d.ts +0 -0
  458. /package/dist/{ranger → src/ranger}/index.d.ts +0 -0
  459. /package/dist/{ranger → src/ranger}/kv.d.ts +0 -0
  460. /package/dist/{ranger → src/ranger}/ranger.spec.d.ts +0 -0
  461. /package/dist/{ranger → src/ranger}/writer.d.ts +0 -0
  462. /package/dist/{status → src/status}/client.d.ts +0 -0
  463. /package/dist/{status → src/status}/external.d.ts +0 -0
  464. /package/dist/{status → src/status}/index.d.ts +0 -0
  465. /package/dist/{status → src/status}/status.spec.d.ts +0 -0
  466. /package/dist/{testutil → src/testutil}/channels.d.ts +0 -0
  467. /package/dist/{testutil → src/testutil}/client.d.ts +0 -0
  468. /package/dist/{testutil → src/testutil}/telem.d.ts +0 -0
  469. /package/dist/{user → src/user}/client.d.ts +0 -0
  470. /package/dist/{user → src/user}/external.d.ts +0 -0
  471. /package/dist/{user → src/user}/index.d.ts +0 -0
  472. /package/dist/{user → src/user}/payload.d.ts +0 -0
  473. /package/dist/{user → src/user}/retriever.d.ts +0 -0
  474. /package/dist/{user → src/user}/user.spec.d.ts +0 -0
  475. /package/dist/{user → src/user}/writer.d.ts +0 -0
  476. /package/dist/{util → src/util}/decodeJSONString.d.ts +0 -0
  477. /package/dist/{util → src/util}/retrieve.d.ts +0 -0
  478. /package/dist/{util → src/util}/retrieve.spec.d.ts +0 -0
  479. /package/dist/{workspace → src/workspace}/client.d.ts +0 -0
  480. /package/dist/{workspace → src/workspace}/external.d.ts +0 -0
  481. /package/dist/{workspace → src/workspace}/index.d.ts +0 -0
  482. /package/dist/{workspace → src/workspace}/lineplot/client.d.ts +0 -0
  483. /package/dist/{workspace → src/workspace}/lineplot/external.d.ts +0 -0
  484. /package/dist/{workspace → src/workspace}/lineplot/index.d.ts +0 -0
  485. /package/dist/{workspace → src/workspace}/lineplot/lineplot.spec.d.ts +0 -0
  486. /package/dist/{workspace → src/workspace}/log/client.d.ts +0 -0
  487. /package/dist/{workspace → src/workspace}/log/external.d.ts +0 -0
  488. /package/dist/{workspace → src/workspace}/log/index.d.ts +0 -0
  489. /package/dist/{workspace → src/workspace}/log/log.spec.d.ts +0 -0
  490. /package/dist/{workspace → src/workspace}/schematic/client.d.ts +0 -0
  491. /package/dist/{workspace → src/workspace}/schematic/external.d.ts +0 -0
  492. /package/dist/{workspace → src/workspace}/schematic/index.d.ts +0 -0
  493. /package/dist/{workspace → src/workspace}/schematic/schematic.spec.d.ts +0 -0
  494. /package/dist/{workspace → src/workspace}/schematic/symbol/client.d.ts +0 -0
  495. /package/dist/{workspace → src/workspace}/schematic/symbol/client.spec.d.ts +0 -0
  496. /package/dist/{workspace → src/workspace}/schematic/symbol/external.d.ts +0 -0
  497. /package/dist/{workspace → src/workspace}/schematic/symbol/index.d.ts +0 -0
  498. /package/dist/{workspace → src/workspace}/schematic/symbol/payload.d.ts +0 -0
  499. /package/dist/{workspace → src/workspace}/table/client.d.ts +0 -0
  500. /package/dist/{workspace → src/workspace}/table/external.d.ts +0 -0
  501. /package/dist/{workspace → src/workspace}/table/index.d.ts +0 -0
  502. /package/dist/{workspace → src/workspace}/table/table.spec.d.ts +0 -0
  503. /package/dist/{workspace → src/workspace}/workspace.spec.d.ts +0 -0
  504. /package/{eslint.config.js → eslint.config.ts} +0 -0
@@ -0,0 +1,15 @@
1
+ // Copyright 2025 Synnax Labs, Inc.
2
+ //
3
+ // Use of this software is governed by the Business Source License included in the file
4
+ // licenses/BSL.txt.
5
+ //
6
+ // As of the Change Date specified in that file, in accordance with the Business Source
7
+ // License, use of this software will be governed by the Apache License, Version 2.0,
8
+ // included in the file licenses/APL.txt.
9
+
10
+ export enum WriterCommand {
11
+ Open = 0,
12
+ Write = 1,
13
+ Commit = 2,
14
+ SetAuthority = 3,
15
+ }
@@ -8,6 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { EOF, Unreachable } from "@synnaxlabs/freighter";
11
+ import { id, sleep } from "@synnaxlabs/x";
11
12
  import { DataType, Series, TimeSpan, TimeStamp } from "@synnaxlabs/x/telem";
12
13
  import { describe, expect, it, test, vi } from "vitest";
13
14
 
@@ -46,7 +47,12 @@ describe("Streamer", () => {
46
47
  await expect(client.openStreamer({ channels: ch.key })).resolves.not.toThrow();
47
48
  });
48
49
  it("should not throw an error when the streamer is opened with zero channels", async () => {
49
- await expect(client.openStreamer([])).resolves.not.toThrow();
50
+ await expect(
51
+ (async () => {
52
+ const s = await client.openStreamer([]);
53
+ s.close();
54
+ })(),
55
+ ).resolves.not.toThrow();
50
56
  });
51
57
  it("should throw an error when the streamer is opened with a channel that does not exist", async () => {
52
58
  await expect(client.openStreamer([5678])).rejects.toThrow("not found");
@@ -120,12 +126,12 @@ describe("Streamer", () => {
120
126
  // Create source channels with the timestamp index
121
127
  const [channelA, channelB] = await client.channels.create([
122
128
  {
123
- name: "test_a",
129
+ name: id.create(),
124
130
  dataType: DataType.FLOAT64,
125
131
  index: timeChannel.key,
126
132
  },
127
133
  {
128
- name: "test_b",
134
+ name: id.create(),
129
135
  dataType: DataType.FLOAT64,
130
136
  index: timeChannel.key,
131
137
  },
@@ -135,14 +141,13 @@ describe("Streamer", () => {
135
141
  const calcChannel = await client.channels.create({
136
142
  name: "test_calc",
137
143
  dataType: DataType.FLOAT64,
138
- index: timeChannel.key,
139
144
  virtual: true,
140
- expression: "return test_a + test_b",
141
- requires: [channelA.key, channelB.key],
145
+ expression: `return ${channelA.name} + ${channelB.name}`,
142
146
  });
143
147
 
144
148
  // Set up streamer to listen for calculated results
145
149
  const streamer = await client.openStreamer(calcChannel.key);
150
+ await sleep.sleep(TimeSpan.milliseconds(10));
146
151
 
147
152
  // Write test data
148
153
  const startTime = TimeStamp.now();
@@ -173,14 +178,14 @@ describe("Streamer", () => {
173
178
  test("calculated channel with constant", async () => {
174
179
  // Create an index channel for timestamps
175
180
  const timeChannel = await client.channels.create({
176
- name: "calc_const_time",
181
+ name: id.create(),
177
182
  isIndex: true,
178
183
  dataType: DataType.TIMESTAMP,
179
184
  });
180
185
 
181
186
  // Create base channel with index
182
187
  const baseChannel = await client.channels.create({
183
- name: "base_channel",
188
+ name: id.create(),
184
189
  dataType: DataType.FLOAT64,
185
190
  index: timeChannel.key,
186
191
  });
@@ -189,13 +194,12 @@ describe("Streamer", () => {
189
194
  const calcChannel = await client.channels.create({
190
195
  name: "calc_const_channel",
191
196
  dataType: DataType.FLOAT64,
192
- index: timeChannel.key,
193
197
  virtual: true,
194
198
  expression: `return ${baseChannel.name} + 5`,
195
- requires: [baseChannel.key],
196
199
  });
197
200
 
198
201
  const streamer = await client.openStreamer(calcChannel.key);
202
+ await sleep.sleep(TimeSpan.milliseconds(20));
199
203
 
200
204
  const startTime = TimeStamp.now();
201
205
  const writer = await client.openWriter({
@@ -242,13 +246,12 @@ describe("Streamer", () => {
242
246
  const calcChannel = await client.channels.create({
243
247
  name: "multi_calc",
244
248
  dataType: DataType.FLOAT64,
245
- index: timeChannel.key,
246
249
  virtual: true,
247
250
  expression: "return (multi_test_a * 2) + (multi_test_b / 2)",
248
- requires: [channelA.key, channelB.key],
249
251
  });
250
252
 
251
253
  const streamer = await client.openStreamer(calcChannel.key);
254
+ await sleep.sleep(TimeSpan.milliseconds(5));
252
255
 
253
256
  const startTime = TimeStamp.now();
254
257
  const writer = await client.openWriter({
@@ -34,8 +34,6 @@ const resZ = z.object({ frame: frameZ });
34
34
  */
35
35
  export interface StreamerResponse extends z.infer<typeof resZ> {}
36
36
 
37
- const ENDPOINT = "/frame/stream";
38
-
39
37
  const intermediateStreamerConfigZ = z.object({
40
38
  /** The channels to stream data from. Can be channel keys, names, or payloads. */
41
39
  channels: paramsZ,
@@ -106,7 +104,7 @@ export const createStreamOpener =
106
104
  const adapter = await ReadAdapter.open(retriever, cfg.channels);
107
105
  if (cfg.useHighPerformanceCodec)
108
106
  client = client.withCodec(new WSStreamerCodec(adapter.codec));
109
- const stream = await client.stream(ENDPOINT, reqZ, resZ);
107
+ const stream = await client.stream("/frame/stream", reqZ, resZ);
110
108
  const streamer = new CoreStreamer(stream, adapter);
111
109
  stream.send({ keys: adapter.keys, downsampleFactor: cfg.downsampleFactor ?? 1 });
112
110
  const [, err] = await stream.receive();
@@ -7,7 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { DataType, TimeRange, TimeSpan, TimeStamp } from "@synnaxlabs/x/telem";
10
+ import { DataType, TimeRange, TimeSpan, TimeStamp } from "@synnaxlabs/x";
11
11
  import { describe, expect, it, test } from "vitest";
12
12
 
13
13
  import { UnauthorizedError, ValidationError } from "@/errors";
@@ -77,7 +77,6 @@ describe("Writer", () => {
77
77
  const writer = await client.openWriter({
78
78
  start: TimeStamp.seconds(1),
79
79
  channels,
80
- enableAutoCommit: true,
81
80
  });
82
81
  const [index, data] = channels;
83
82
  try {
@@ -102,7 +101,6 @@ describe("Writer", () => {
102
101
  const writer = await client.openWriter({
103
102
  start: TimeStamp.seconds(1),
104
103
  channels,
105
- enableAutoCommit: true,
106
104
  autoIndexPersistInterval: ALWAYS_INDEX_PERSIST_ON_AUTO_COMMIT,
107
105
  });
108
106
  const [index, data] = channels;
@@ -122,7 +120,6 @@ describe("Writer", () => {
122
120
  const writer = await client.openWriter({
123
121
  start: TimeStamp.seconds(1),
124
122
  channels,
125
- enableAutoCommit: true,
126
123
  autoIndexPersistInterval: TimeSpan.milliseconds(100),
127
124
  });
128
125
  const [index, data] = channels;
@@ -169,7 +166,6 @@ describe("Writer", () => {
169
166
  const writer = await client.openWriter({
170
167
  start: TimeStamp.now(),
171
168
  channels: [indexCh.key, dataCh.key],
172
- enableAutoCommit: true,
173
169
  });
174
170
 
175
171
  await expect(async () => {
@@ -210,13 +206,11 @@ describe("Writer", () => {
210
206
  start,
211
207
  channels,
212
208
  authorities: 10,
213
- enableAutoCommit: true,
214
209
  });
215
210
  const w2 = await client.openWriter({
216
211
  start,
217
212
  channels,
218
213
  authorities: 20,
219
- enableAutoCommit: true,
220
214
  });
221
215
  const [index, data] = channels;
222
216
  await w1.write({
@@ -244,13 +238,11 @@ describe("Writer", () => {
244
238
  start,
245
239
  channels,
246
240
  authorities: 10,
247
- enableAutoCommit: true,
248
241
  });
249
242
  const w2 = await client.openWriter({
250
243
  start,
251
244
  channels,
252
245
  authorities: 20,
253
- enableAutoCommit: true,
254
246
  });
255
247
  const [index, data] = channels;
256
248
  await w1.write({
@@ -8,8 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { EOF, type Stream, type WebSocketClient } from "@synnaxlabs/freighter";
11
- import { control, errors } from "@synnaxlabs/x";
12
- import { type CrudeSeries, TimeSpan, TimeStamp } from "@synnaxlabs/x/telem";
11
+ import { control, type CrudeSeries, errors, TimeSpan, TimeStamp } from "@synnaxlabs/x";
13
12
  import { z } from "zod";
14
13
 
15
14
  import { channel } from "@/channel";
@@ -17,13 +16,7 @@ import { SynnaxError } from "@/errors";
17
16
  import { WriteAdapter } from "@/framer/adapter";
18
17
  import { WSWriterCodec } from "@/framer/codec";
19
18
  import { type CrudeFrame, frameZ } from "@/framer/frame";
20
-
21
- export enum WriterCommand {
22
- Open = 0,
23
- Write = 1,
24
- Commit = 2,
25
- SetAuthority = 3,
26
- }
19
+ import { WriterCommand } from "@/framer/payload";
27
20
 
28
21
  export enum WriterMode {
29
22
  PersistStream = 1,
@@ -80,7 +73,7 @@ const baseWriterConfigZ = z.object({
80
73
  * If enableAutoCommit is true, then the writer will commit after each write, and
81
74
  * will flush that commit to index after the specified autoIndexPersistInterval.
82
75
  */
83
- enableAutoCommit: z.boolean().default(false),
76
+ enableAutoCommit: z.boolean().default(true),
84
77
  /** autoIndexPersistInterval sets the interval at which commits will be flushed to
85
78
  * disk. */
86
79
  autoIndexPersistInterval: TimeSpan.z.default(TimeSpan.SECOND),
@@ -153,45 +146,46 @@ export type AuthorityArgs = z.input<typeof authorityArgsZ>;
153
146
  interface Response extends z.infer<typeof resZ> {}
154
147
 
155
148
  /**
156
- * Writer is used to write telemetry to a set of channels in time order.
157
- * It should not be instantiated directly, and should instead be instantiated via the
158
- * FramerClient {@link FrameClient#openWriter}.
149
+ * Writer is used to write telemetry to a set of channels in time order. It should not
150
+ * be instantiated directly, and should instead be instantiated via the FramerClient
151
+ * {@link FrameClient#openWriter}.
159
152
  *
160
153
  * The writer is a streaming protocol that is heavily optimized for performance. This
161
154
  * comes at the cost of increased complexity, and should only be used directly when
162
155
  * writing large volumes of data (such as recording telemetry from a sensor or ingesting
163
- * data from file). Simpler methods (such as the frame client's write method) should
164
- * be used for most use cases.
156
+ * data from file). Simpler methods (such as the frame client's write method) should be
157
+ * used for most use cases.
165
158
  *
166
159
  * The protocol is as follows:
167
160
  *
168
161
  * 1. The writer is opened with a starting timestamp and a list of channel keys. The
169
- * writer will fail to open if the starting timestamp overlaps with any existing telemetry
170
- * for any channels specified. If the writer opens successfully, the caller is then
171
- * free to write frames to the writer.
162
+ * writer will fail to open if the starting timestamp overlaps with any existing
163
+ * telemetry for any channels specified. If the writer opens successfully, the caller
164
+ * is then free to write frames to the writer.
172
165
  *
173
166
  * 2. To write a frame, the caller can use the write method and follow the validation
174
- * rules described in its method's documentation. This process is asynchronous, meaning
175
- * that write calls may return before teh frame has been written to the cluster. This
176
- * also means that the writer can accumulate an error after write is called. If the writer
177
- * accumulates an error, all subsequent write and commit calls will return False. The
178
- * caller can check for errors by calling the error method, which returns the accumulated
179
- * error and resets the writer for future use. The caller can also check for errors by
180
- * closing the writer, which will throw any accumulated error.
167
+ * rules described in its method's documentation. This process is asynchronous,
168
+ * meaning that write calls may return before the frame has been written to the
169
+ * cluster. This also means that the writer can accumulate an error after write is
170
+ * called. If the writer accumulates an error, all subsequent write and commit calls
171
+ * will return False. The caller can check for errors by calling the error method,
172
+ * which returns the accumulated error and resets the writer for future use. The
173
+ * caller can also check for errors by closing the writer, which will throw any
174
+ * accumulated error.
181
175
  *
182
- * 3. To commit the written frames to the cluster, the caller can call the commit method.
183
- * Unlike write, commit is synchronous, meaning that it will not return until the frames
184
- * have been written to the cluster. If the writer has accumulated an error, commit will
185
- * return false. After the caller acknowledges the error, they can attempt to commit again.
186
- * Commit can be called several times throughout a writer's lifetime, and will only
187
- * commit the frames that have been written since the last commit.
176
+ * 3. To commit the written frames to the cluster, the caller can call the commit
177
+ * method. Unlike write, commit is synchronous, meaning that it will not return until
178
+ * the frames have been written to the cluster. If the writer has accumulated an
179
+ * error, commit will return false. After the caller acknowledges the error, they can
180
+ * attempt to commit again. Commit can be called several times throughout a writer's
181
+ * lifetime, and will only commit the frames that have been written since the last
182
+ * commit.
188
183
  *
189
184
  * 4. A writer MUST be closed after use in order to prevent resource leaks. Close should
190
- * typically be called in a 'finally' block. If the writer has accumulated an error,
191
- * close will throw the error.
185
+ * typically be called in a 'finally' block. If the writer has accumulated an error,
186
+ * close will throw the error.
192
187
  */
193
188
  export class Writer {
194
- private static readonly ENDPOINT = "/frame/write";
195
189
  private readonly stream: Stream<typeof reqZ, typeof resZ>;
196
190
  private readonly adapter: WriteAdapter;
197
191
  private closeErr: Error | null = null;
@@ -210,7 +204,7 @@ export class Writer {
210
204
  const adapter = await WriteAdapter.open(retriever, cfg.channels);
211
205
  if (cfg.useHighPerformanceCodec)
212
206
  client = client.withCodec(new WSWriterCodec(adapter.codec));
213
- const stream = await client.stream(Writer.ENDPOINT, reqZ, resZ);
207
+ const stream = await client.stream("/frame/write", reqZ, resZ);
214
208
  const writer = new Writer(stream, adapter);
215
209
  await writer.execute({
216
210
  command: WriterCommand.Open,
@@ -8,8 +8,15 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array, caseconv, id, type record, strings } from "@synnaxlabs/x";
12
- import { type CrudeTimeSpan, TimeSpan } from "@synnaxlabs/x/telem";
11
+ import {
12
+ array,
13
+ caseconv,
14
+ type CrudeTimeSpan,
15
+ id,
16
+ type record,
17
+ strings,
18
+ TimeSpan,
19
+ } from "@synnaxlabs/x";
13
20
  import { z } from "zod";
14
21
 
15
22
  import { type framer } from "@/framer";
@@ -179,6 +186,8 @@ const retrieveReqZ = z.object({
179
186
  names: z.string().array().optional(),
180
187
  types: z.string().array().optional(),
181
188
  includeStatus: z.boolean().optional(),
189
+ internal: z.boolean().optional(),
190
+ snapshot: z.boolean().optional(),
182
191
  searchTerm: z.string().optional(),
183
192
  offset: z.number().optional(),
184
193
  limit: z.number().optional(),
@@ -264,6 +264,50 @@ describe("Task", async () => {
264
264
  })
265
265
  .toBe(true);
266
266
  });
267
+
268
+ it("should filter tasks by snapshot parameter", async () => {
269
+ const regularTask = await testRack.createTask({
270
+ name: "regular_test_task",
271
+ type: "ni",
272
+ config: { test: true },
273
+ });
274
+
275
+ const snapshotTask = await client.hardware.tasks.copy(
276
+ regularTask.key,
277
+ "snapshot_test_task",
278
+ true,
279
+ );
280
+
281
+ const snapshotOnlyResult = await client.hardware.tasks.retrieve({
282
+ snapshot: true,
283
+ });
284
+ expect(snapshotOnlyResult.some((t) => t.key === snapshotTask.key)).toBe(true);
285
+ expect(snapshotOnlyResult.every((t) => t.snapshot === true)).toBe(true);
286
+
287
+ const regularOnlyResult = await client.hardware.tasks.retrieve({
288
+ snapshot: false,
289
+ });
290
+ expect(regularOnlyResult.some((t) => t.key === regularTask.key)).toBe(true);
291
+ expect(regularOnlyResult.every((t) => t.snapshot === false)).toBe(true);
292
+ });
293
+
294
+ it("should combine snapshot filter with other filters", async () => {
295
+ const task1 = await testRack.createTask({
296
+ name: "combined_filter_task",
297
+ type: "ni",
298
+ config: { test: true },
299
+ });
300
+
301
+ const result = await client.hardware.tasks.retrieve({
302
+ rack: testRack.key,
303
+ types: ["ni"],
304
+ snapshot: false,
305
+ });
306
+
307
+ expect(result.some((t) => t.key === task1.key)).toBe(true);
308
+ expect(result.every((t) => t.type === "ni")).toBe(true);
309
+ expect(result.every((t) => t.snapshot === false)).toBe(true);
310
+ });
267
311
  });
268
312
  });
269
313
 
package/src/index.ts CHANGED
@@ -63,4 +63,4 @@ export {
63
63
  type TimeStampStringFormat,
64
64
  type TypedArray,
65
65
  type TZInfo,
66
- } from "@synnaxlabs/x/telem";
66
+ } from "@synnaxlabs/x";
@@ -8,7 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array } from "@synnaxlabs/x/array";
11
+ import { array } from "@synnaxlabs/x";
12
12
  import z from "zod";
13
13
 
14
14
  import { type Key, keyZ, type Label, labelZ } from "@/label/payload";
@@ -8,8 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array } from "@synnaxlabs/x";
12
- import { type change } from "@synnaxlabs/x/change";
11
+ import { array, type change } from "@synnaxlabs/x";
13
12
  import { z } from "zod";
14
13
 
15
14
  import { channel } from "@/channel";
@@ -8,8 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array, type CrudeTimeRange, TimeRange } from "@synnaxlabs/x";
12
- import { type Series } from "@synnaxlabs/x/telem";
11
+ import { array, type CrudeTimeRange, type Series, TimeRange } from "@synnaxlabs/x";
13
12
  import { z } from "zod";
14
13
 
15
14
  import { type channel } from "@/channel";
package/src/ranger/kv.ts CHANGED
@@ -8,8 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array } from "@synnaxlabs/x/array";
12
- import { isObject } from "@synnaxlabs/x/identity";
11
+ import { array, isObject } from "@synnaxlabs/x";
13
12
  import { z } from "zod";
14
13
 
15
14
  import { type Key, keyZ } from "@/ranger/payload";
@@ -7,8 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { math } from "@synnaxlabs/x";
11
- import { TimeRange } from "@synnaxlabs/x/telem";
10
+ import { math, TimeRange } from "@synnaxlabs/x";
12
11
  import { z } from "zod";
13
12
 
14
13
  import { label } from "@/label";
@@ -7,8 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { math, uuid } from "@synnaxlabs/x";
11
- import { DataType, TimeSpan, TimeStamp } from "@synnaxlabs/x/telem";
10
+ import { DataType, math, TimeSpan, TimeStamp, uuid } from "@synnaxlabs/x";
12
11
  import { describe, expect, it } from "vitest";
13
12
 
14
13
  import { NotFoundError } from "@/errors";
@@ -8,7 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array } from "@synnaxlabs/x/array";
11
+ import { array } from "@synnaxlabs/x";
12
12
  import z from "zod";
13
13
 
14
14
  import { label } from "@/label";
@@ -17,7 +17,9 @@ export type Key = z.infer<typeof keyZ>;
17
17
 
18
18
  export type Params = Key | Key[];
19
19
 
20
- export const statusZ = status.statusZ;
20
+ export const statusZ = <Details extends z.ZodType = z.ZodNever>(
21
+ detailsSchema?: Details,
22
+ ) => status.statusZ(detailsSchema);
21
23
 
22
24
  export const newZ = <DetailsSchema extends z.ZodType = z.ZodNever>(
23
25
  detailsSchema?: DetailsSchema,
@@ -27,7 +29,7 @@ export type New<DetailsSchema extends z.ZodType = z.ZodNever> = z.input<
27
29
  ReturnType<typeof newZ<DetailsSchema>>
28
30
  >;
29
31
 
30
- export type Status<Details = never> = status.Status<Details>;
32
+ export type Status<Details extends z.ZodType = z.ZodNever> = status.Status<Details>;
31
33
 
32
34
  export const SET_CHANNEL_NAME = "sy_status_set";
33
35
  export const DELETE_CHANNEL_NAME = "sy_status_delete";
package/src/transport.ts CHANGED
@@ -14,9 +14,7 @@ import {
14
14
  unaryWithBreaker,
15
15
  WebSocketClient,
16
16
  } from "@synnaxlabs/freighter";
17
- import { type breaker } from "@synnaxlabs/x";
18
- import { binary } from "@synnaxlabs/x/binary";
19
- import { type URL } from "@synnaxlabs/x/url";
17
+ import { binary, type breaker, type URL } from "@synnaxlabs/x";
20
18
 
21
19
  const baseAPIEndpoint = "/api/v1/";
22
20
 
@@ -8,7 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array } from "@synnaxlabs/x/array";
11
+ import { array } from "@synnaxlabs/x";
12
12
  import { z } from "zod";
13
13
 
14
14
  import { type Key, keyZ, type New, newZ, type User, userZ } from "@/user/payload";
@@ -7,7 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { type record } from "@synnaxlabs/x/record";
10
+ import { type record } from "@synnaxlabs/x";
11
11
 
12
12
  // --- VERY IMPORTANT ---
13
13
  // Synnax's encoders (in the binary package inside x) automatically convert the case of
package/src/util/telem.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { type DataType, type TypedArray } from "@synnaxlabs/x/telem";
10
+ import { type DataType, type TypedArray } from "@synnaxlabs/x";
11
11
 
12
12
  export const randomSeries = (length: number, dataType: DataType): TypedArray => {
13
13
  // create random bytes of the correct length
@@ -7,7 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { record } from "@synnaxlabs/x/record";
10
+ import { record } from "@synnaxlabs/x";
11
11
  import { z } from "zod";
12
12
 
13
13
  import { parseWithoutKeyConversion } from "@/util/parseWithoutKeyConversion";
@@ -7,7 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { record } from "@synnaxlabs/x/record";
10
+ import { record } from "@synnaxlabs/x";
11
11
  import { z } from "zod";
12
12
 
13
13
  import { parseWithoutKeyConversion } from "@/util/parseWithoutKeyConversion";
@@ -7,7 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { record } from "@synnaxlabs/x/record";
10
+ import { record } from "@synnaxlabs/x";
11
11
  import { z } from "zod";
12
12
 
13
13
  import { parseWithoutKeyConversion } from "@/util/parseWithoutKeyConversion";
@@ -7,7 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { record } from "@synnaxlabs/x/record";
10
+ import { record } from "@synnaxlabs/x";
11
11
  import { z } from "zod";
12
12
 
13
13
  import { parseWithoutKeyConversion } from "@/util/parseWithoutKeyConversion";
@@ -7,7 +7,7 @@
7
7
  // License, use of this software will be governed by the Apache License, Version 2.0,
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
- import { record } from "@synnaxlabs/x/record";
10
+ import { record } from "@synnaxlabs/x";
11
11
  import { z } from "zod";
12
12
 
13
13
  import { parseWithoutKeyConversion } from "@/util/parseWithoutKeyConversion";
package/tsconfig.json CHANGED
@@ -3,5 +3,5 @@
3
3
  "compilerOptions": {
4
4
  "baseUrl": "."
5
5
  },
6
- "include": ["src/**/*"]
6
+ "include": ["src/**/*", "eslint.config.ts"]
7
7
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/access/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,MAAM;IACjB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;gBAEnB,MAAM,EAAE,WAAW;CAGhC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/access/external.ts"],"names":[],"mappings":"AASA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/access/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/access/payload.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU,QAAQ,CAAC;AAChC,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,eAAe,aAAa,CAAC;AAC1C,eAAO,MAAM,aAAa,WAAW,CAAC;AAEtC,eAAO,MAAM,OAAO;;;;;;EAMlB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/access/policy/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,GAAG,EAER,KAAK,GAAG,EAER,KAAK,MAAM,EAEZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAOtC,QAAA,MAAM,mBAAmB;;;;;;GAEmB,CAAC;AAE7C,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAQrB,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACvE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEvE,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAoD,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAazD,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IACpC,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAmB1C,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;IACrD,QAAQ,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAazD,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAC/B,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAUzC;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,KAAG,QAAQ,CAAC,EAA+B,CAAC;AAE/E,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,EAG5C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/access/policy/external.ts"],"names":[],"mappings":"AASA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/access/policy/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/access/policy/payload.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,IAAI,WAAW,CAAC;AAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKlB,CAAC;AACH,MAAM,WAAW,MAAO,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC;CAAG;AAE1D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKf,CAAC;AACH,MAAM,WAAW,GAAI,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC;CAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"policy.spec.d.ts","sourceRoot":"","sources":["../../../src/access/policy/policy.spec.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/arc/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EACL,KAAK,GAAG,EAER,KAAK,GAAG,EAER,KAAK,GAAG,EAGR,KAAK,MAAM,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAO3C,QAAA,MAAM,YAAY;;;;;;;iBAOhB,CAAC;AAQH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAgB3D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;KAAuD,CAAC;AAExF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAErE,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;mBAA+C,CAAC;AAEnE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEzD,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAC9B,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAanC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC;IAChD,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAc5C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAS1C;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,KAAG,QAAQ,CAAC,EAAoC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../src/arc/external.ts"],"names":[],"mappings":"AASA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}