@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
@@ -7,18 +7,16 @@
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 { xy } from "@synnaxlabs/x";
11
- import { record } from "@synnaxlabs/x/record";
10
+ import { record, xy } from "@synnaxlabs/x";
12
11
  import { z } from "zod/v4";
13
12
 
14
- import { type Status } from "@/status/payload";
13
+ import { statusZ as baseStatusZ } from "@/status/payload";
15
14
  import { parseWithoutKeyConversion } from "@/util/parseWithoutKeyConversion";
16
15
 
17
16
  export const irNodeZ = z.object({
18
17
  key: z.string(),
19
18
  type: z.string(),
20
19
  config: record.unknownZ.or(z.string().transform(parseWithoutKeyConversion)),
21
- source: z.string().optional(),
22
20
  });
23
21
 
24
22
  export const graphNodeZ = irNodeZ.extend({
@@ -49,6 +47,14 @@ export const keyZ = z.uuid();
49
47
  export type Key = z.infer<typeof keyZ>;
50
48
  export type Params = Key | Key[];
51
49
 
50
+ export const statusDetailsZ = z.object({
51
+ running: z.boolean(),
52
+ });
53
+
54
+ export const statusZ = baseStatusZ(statusDetailsZ);
55
+
56
+ export type Status = z.infer<typeof statusZ>;
57
+
52
58
  export const arcZ = z.object({
53
59
  key: keyZ,
54
60
  name: z.string(),
@@ -56,13 +62,12 @@ export const arcZ = z.object({
56
62
  text: textZ,
57
63
  deploy: z.boolean(),
58
64
  version: z.string(),
65
+ status: statusZ.optional().nullable(),
59
66
  });
60
67
 
61
- export interface Arc extends z.infer<typeof arcZ> {
62
- status?: Status;
63
- }
68
+ export interface Arc extends z.infer<typeof arcZ> {}
64
69
 
65
- export const newZ = arcZ.partial({ key: true });
70
+ export const newZ = arcZ.partial({ key: true }).omit({ status: true });
66
71
  export interface New extends z.input<typeof newZ> {}
67
72
 
68
73
  export const ONTOLOGY_TYPE = "arc";
@@ -8,7 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { type Context } from "@synnaxlabs/freighter";
11
- import { URL } from "@synnaxlabs/x/url";
11
+ import { URL } from "@synnaxlabs/x";
12
12
  import { describe, expect, it, test } from "vitest";
13
13
 
14
14
  import { auth } from "@/auth";
@@ -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 { errors } from "@synnaxlabs/x";
11
- import { DataType, Rate } from "@synnaxlabs/x/telem";
10
+ import { DataType, errors, Rate } from "@synnaxlabs/x";
12
11
  import { describe, expect, it, vi } from "vitest";
13
12
 
14
13
  import { channel } from "@/channel";
@@ -55,6 +54,7 @@ describe("channelchannel.Retriever", () => {
55
54
  index: 0,
56
55
  virtual: false,
57
56
  expression: "",
57
+ operations: [],
58
58
  requires: [],
59
59
  }));
60
60
  });
@@ -84,6 +84,7 @@ describe("channelchannel.Retriever", () => {
84
84
  index: 0,
85
85
  virtual: false,
86
86
  expression: "",
87
+ operations: [],
87
88
  requires: [],
88
89
  }));
89
90
  });
@@ -7,8 +7,8 @@
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, TimeStamp } from "@synnaxlabs/x/telem";
11
- import { beforeAll, describe, expect, it, test } from "vitest";
10
+ import { DataType, id, TimeStamp } from "@synnaxlabs/x";
11
+ import { describe, expect, it, test } from "vitest";
12
12
 
13
13
  import { Channel } from "@/channel/client";
14
14
  import { NotFoundError, PathError } from "@/errors";
@@ -31,24 +31,23 @@ describe("Channel", () => {
31
31
  }, 80000);
32
32
 
33
33
  test("create calculated", async () => {
34
+ const chOneName = id.create();
34
35
  let chOne = new Channel({
35
- name: "test",
36
- isIndex: true,
37
- dataType: DataType.TIMESTAMP,
36
+ name: chOneName,
37
+ virtual: true,
38
+ dataType: DataType.FLOAT32,
38
39
  });
39
40
  chOne = await client.channels.create(chOne);
40
41
  let calculatedCH = new Channel({
41
42
  name: "test2",
42
43
  virtual: true,
43
44
  dataType: DataType.FLOAT32,
44
- expression: "test * 2",
45
- requires: [chOne.key],
45
+ expression: `return ${chOne.name} * 2`,
46
46
  });
47
47
  calculatedCH = await client.channels.create(calculatedCH);
48
48
  expect(calculatedCH.key).not.toEqual(0);
49
49
  expect(calculatedCH.virtual).toEqual(true);
50
- expect(calculatedCH.expression).toEqual("test * 2");
51
- expect(calculatedCH.requires).toEqual([chOne.key]);
50
+ expect(calculatedCH.expression).toEqual(`return ${chOneName} * 2`);
52
51
  });
53
52
 
54
53
  test("create calculated, missing required channel", async () => {
@@ -58,7 +57,6 @@ describe("Channel", () => {
58
57
  virtual: true,
59
58
  dataType: DataType.FLOAT32,
60
59
  expression: "test * 2",
61
- requires: [],
62
60
  });
63
61
  } catch (e) {
64
62
  expect(PathError.matches(e)).toBe(true);
@@ -289,21 +287,12 @@ describe("Channel", () => {
289
287
  });
290
288
 
291
289
  describe("update calculations", () => {
292
- let idxCH: Channel;
293
- beforeAll(async () => {
294
- idxCH = await client.channels.create({
295
- name: "idx",
296
- dataType: DataType.TIMESTAMP,
297
- isIndex: true,
298
- });
299
- });
300
290
  test("update virtual channel expression", async () => {
301
291
  const channel = await client.channels.create({
302
292
  name: "virtual-calc",
303
293
  dataType: DataType.FLOAT32,
304
294
  virtual: true,
305
295
  expression: "return 1",
306
- requires: [idxCH.key],
307
296
  });
308
297
 
309
298
  const updated = await client.channels.create({
@@ -312,7 +301,6 @@ describe("Channel", () => {
312
301
  dataType: channel.dataType,
313
302
  virtual: true,
314
303
  expression: "return 2",
315
- requires: [idxCH.key],
316
304
  });
317
305
 
318
306
  const channelsWithName = await client.channels.retrieve(["virtual-calc"]);
@@ -330,7 +318,6 @@ describe("Channel", () => {
330
318
  dataType: DataType.FLOAT32,
331
319
  virtual: true,
332
320
  expression: "return 1",
333
- requires: [idxCH.key],
334
321
  });
335
322
 
336
323
  const updated = await client.channels.create({
@@ -339,7 +326,6 @@ describe("Channel", () => {
339
326
  dataType: channel.dataType,
340
327
  virtual: true,
341
328
  expression: channel.expression,
342
- requires: [idxCH.key],
343
329
  });
344
330
  expect(updated.name).toEqual("new-name");
345
331
 
@@ -8,15 +8,16 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array, status } from "@synnaxlabs/x";
12
11
  import {
12
+ array,
13
13
  type CrudeDensity,
14
14
  type CrudeTimeRange,
15
15
  type CrudeTimeStamp,
16
16
  DataType,
17
17
  type MultiSeries,
18
+ status,
18
19
  type TypedArray,
19
- } from "@synnaxlabs/x/telem";
20
+ } from "@synnaxlabs/x";
20
21
  import { z } from "zod";
21
22
 
22
23
  import {
@@ -25,6 +26,7 @@ import {
25
26
  keyZ,
26
27
  type Name,
27
28
  type New,
29
+ type Operation,
28
30
  type Params,
29
31
  type Payload,
30
32
  payloadZ,
@@ -112,9 +114,7 @@ export class Channel {
112
114
  * the calculated value
113
115
  */
114
116
  readonly expression: string;
115
- /**
116
- * Only used for calculated channels. Specifies the channels required for calculation
117
- */
117
+ readonly operations: Operation[];
118
118
  readonly requires: Key[];
119
119
  /**
120
120
  * The status of the channel.
@@ -134,12 +134,15 @@ export class Channel {
134
134
  alias,
135
135
  status: argsStatus,
136
136
  expression = "",
137
+ operations = [],
137
138
  requires = [],
138
139
  }: New & {
139
140
  internal?: boolean;
140
141
  frameClient?: framer.Client;
141
142
  density?: CrudeDensity;
142
143
  status?: status.Crude;
144
+ operations?: Operation[];
145
+ requires?: Key[];
143
146
  }) {
144
147
  this.key = keyZ.parse(key);
145
148
  this.name = name;
@@ -151,7 +154,8 @@ export class Channel {
151
154
  this.alias = alias;
152
155
  this.virtual = virtual;
153
156
  this.expression = expression;
154
- this.requires = keyZ.array().parse(requires ?? []);
157
+ this.operations = operations;
158
+ this.requires = requires;
155
159
  if (argsStatus != null) this.status = status.create(argsStatus);
156
160
  this._frameClient = frameClient ?? null;
157
161
  }
@@ -177,9 +181,10 @@ export class Channel {
177
181
  isIndex: this.isIndex,
178
182
  internal: this.internal,
179
183
  virtual: this.virtual,
180
- expression: this.expression,
181
184
  requires: this.requires,
185
+ expression: this.expression,
182
186
  status: this.status,
187
+ operations: this.operations,
183
188
  });
184
189
  }
185
190
 
@@ -434,7 +439,15 @@ export class Client {
434
439
  export const isCalculated = ({ virtual, expression }: Payload): boolean =>
435
440
  virtual && expression !== "";
436
441
 
437
- export const resolveCalculatedIndex = async (
442
+ export const isLegacyCalculated = (pld: Payload): boolean =>
443
+ isCalculated(pld) && pld.requires.length > 0;
444
+
445
+ export const ontologyID = (key: Key): ontology.ID => ({
446
+ type: "channel",
447
+ key: key.toString(),
448
+ });
449
+
450
+ export const resolveLegacyCalculatedIndex = async (
438
451
  retrieve: (key: Key) => Promise<Payload | null>,
439
452
  channel: Payload,
440
453
  ): Promise<Key | null> => {
@@ -448,14 +461,9 @@ export const resolveCalculatedIndex = async (
448
461
  const requiredChannel = await retrieve(required);
449
462
  if (requiredChannel == null) return null;
450
463
  if (isCalculated(requiredChannel)) {
451
- const index = await resolveCalculatedIndex(retrieve, requiredChannel);
464
+ const index = await resolveLegacyCalculatedIndex(retrieve, requiredChannel);
452
465
  if (index != null) return index;
453
466
  }
454
467
  }
455
468
  return null;
456
469
  };
457
-
458
- export const ontologyID = (key: Key): ontology.ID => ({
459
- type: "channel",
460
- key: key.toString(),
461
- });
@@ -7,7 +7,15 @@
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 { array, type CrudeDataType, DataType, math, status, zod } from "@synnaxlabs/x";
10
+ import {
11
+ array,
12
+ type CrudeDataType,
13
+ DataType,
14
+ math,
15
+ status,
16
+ TimeSpan,
17
+ zod,
18
+ } from "@synnaxlabs/x";
11
19
  import { z } from "zod";
12
20
 
13
21
  const errorMessage = "Channel key must be a valid uint32.";
@@ -27,6 +35,18 @@ export type KeyOrName = Key | Name;
27
35
  export type KeysOrNames = Keys | Names;
28
36
  export type PrimitiveParams = Key | Name | Keys | Names;
29
37
 
38
+ export const OPERATION_TYPES = ["min", "max", "avg", "none"] as const;
39
+ export const operationType = z.enum(OPERATION_TYPES);
40
+ export type OperationType = z.infer<typeof operationType>;
41
+
42
+ export const operationZ = z.object({
43
+ type: operationType,
44
+ resetChannel: keyZ.optional(),
45
+ duration: TimeSpan.z.optional(),
46
+ });
47
+
48
+ export type Operation = z.infer<typeof operationZ>;
49
+
30
50
  export const statusZ = status.statusZ();
31
51
  export type Status = z.infer<typeof statusZ>;
32
52
  export const payloadZ = z.object({
@@ -40,12 +60,13 @@ export const payloadZ = z.object({
40
60
  virtual: z.boolean(),
41
61
  alias: z.string().optional(),
42
62
  expression: z.string().default(""),
43
- requires: array.nullableZ(keyZ),
44
63
  status: statusZ.optional(),
64
+ operations: array.nullableZ(operationZ),
65
+ requires: array.nullableZ(keyZ),
45
66
  });
46
67
  export interface Payload extends z.infer<typeof payloadZ> {}
47
68
 
48
- export const newZ = payloadZ.extend({
69
+ export const newZ = payloadZ.omit({ requires: true }).extend({
49
70
  key: keyZ.optional(),
50
71
  leaseholder: z.number().optional(),
51
72
  index: keyZ.optional(),
@@ -53,7 +74,7 @@ export const newZ = payloadZ.extend({
53
74
  internal: z.boolean().optional().default(false),
54
75
  virtual: z.boolean().optional().default(false),
55
76
  expression: z.string().optional().default(""),
56
- requires: array.nullableZ(keyZ).optional().default([]),
77
+ operations: array.nullableZ(operationZ).optional(),
57
78
  });
58
79
 
59
80
  export interface New
@@ -8,9 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array } from "@synnaxlabs/x/array";
12
- import { debounce } from "@synnaxlabs/x/debounce";
13
- import { DataType } from "@synnaxlabs/x/telem";
11
+ import { array, DataType, debounce } from "@synnaxlabs/x";
14
12
  import { Mutex } from "async-mutex";
15
13
  import { z } from "zod";
16
14
 
@@ -46,6 +44,7 @@ const reqZ = z.object({
46
44
  isIndex: z.boolean().optional(),
47
45
  internal: z.boolean().optional(),
48
46
  calculated: z.boolean().optional(),
47
+ legacyCalculated: z.boolean().optional(),
49
48
  });
50
49
  export interface RetrieveRequest extends z.input<typeof reqZ> {}
51
50
 
package/src/client.ts CHANGED
@@ -7,9 +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 { breaker } from "@synnaxlabs/x";
11
- import { TimeSpan, TimeStamp } from "@synnaxlabs/x/telem";
12
- import { URL } from "@synnaxlabs/x/url";
10
+ import { breaker, TimeSpan, TimeStamp, URL } from "@synnaxlabs/x";
13
11
  import { z } from "zod";
14
12
 
15
13
  import { access } from "@/access";
@@ -158,7 +156,7 @@ export default class Synnax extends framer.Client {
158
156
  );
159
157
  const racks = new rack.Client(this.transport.unary, tasks);
160
158
  this.hardware = new hardware.Client(tasks, racks, devices);
161
- this.arcs = new arc.Client(this.transport.unary);
159
+ this.arcs = new arc.Client(this.transport.unary, this.transport.stream);
162
160
  }
163
161
 
164
162
  get key(): string {
@@ -8,8 +8,7 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import type { UnaryClient } from "@synnaxlabs/freighter";
11
- import { migrate } from "@synnaxlabs/x";
12
- import { TimeSpan } from "@synnaxlabs/x/telem";
11
+ import { migrate, TimeSpan } from "@synnaxlabs/x";
13
12
  import { z } from "zod";
14
13
 
15
14
  export const statusZ = z.enum(["disconnected", "connecting", "connected", "failed"]);
@@ -45,8 +44,8 @@ const createWarning = (
45
44
  clientVersion: string,
46
45
  clientIsNewer: boolean,
47
46
  ): string => {
48
- const toUpgrade = clientIsNewer ? "cluster" : "client";
49
- return `Synnax cluster node version ${nodeVersion != null ? `${nodeVersion} ` : ""}is too ${clientIsNewer ? "old" : "new"} for client version ${clientVersion}.
47
+ const toUpgrade = clientIsNewer ? "Core" : "client";
48
+ return `Synnax Core version ${nodeVersion != null ? `${nodeVersion} ` : ""}is too ${clientIsNewer ? "old" : "new"} for client version ${clientVersion}.
50
49
  This may cause compatibility issues. We recommend updating the ${toUpgrade}. For more information, see
51
50
  https://docs.synnaxlabs.com/reference/typescript-client/troubleshooting#old-${toUpgrade}-version`;
52
51
  };
@@ -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 { URL } from "@synnaxlabs/x/url";
10
+ import { URL } from "@synnaxlabs/x";
11
11
  import { describe, expect, it } from "vitest";
12
12
  import { z } from "zod";
13
13
 
@@ -7,9 +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 { control } from "@synnaxlabs/x";
11
- import { binary } from "@synnaxlabs/x/binary";
12
- import { type observe } from "@synnaxlabs/x/observe";
10
+ import { binary, control, type observe } from "@synnaxlabs/x";
13
11
  import { z } from "zod";
14
12
 
15
13
  import { type channel } from "@/channel";
package/src/errors.ts CHANGED
@@ -92,7 +92,7 @@ export class ControlError extends SynnaxError.sub("control") {}
92
92
  export class UnauthorizedError extends ControlError.sub("unauthorized") {}
93
93
 
94
94
  export class DisconnectedError extends SynnaxError.sub("disconnected") {
95
- constructor(message: string = "Operation failed because no cluster is connected.") {
95
+ constructor(message: string = "Operation failed because no Core is connected.") {
96
96
  super(message);
97
97
  }
98
98
  }
@@ -161,7 +161,7 @@ export const errorsMiddleware: Middleware = async (ctx, next) => {
161
161
  return [
162
162
  res,
163
163
  new Unreachable({
164
- message: `Cannot reach cluster at ${err.url.host}:${err.url.port}`,
164
+ message: `Cannot reach Core at ${err.url.host}:${err.url.port}`,
165
165
  url: err.url,
166
166
  }),
167
167
  ];
@@ -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, Series, TimeStamp } from "@synnaxlabs/x/telem";
10
+ import { DataType, Series, TimeStamp } from "@synnaxlabs/x";
11
11
  import { beforeAll, describe, expect, it } from "vitest";
12
12
 
13
13
  import { type channel } from "@/channel";
@@ -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 { compare } from "@synnaxlabs/x";
11
- import { type CrudeSeries, Series } from "@synnaxlabs/x/telem";
10
+ import { compare, type CrudeSeries, Series } from "@synnaxlabs/x";
12
11
 
13
12
  import { channel } from "@/channel";
14
13
  import { ValidationError } from "@/errors";
@@ -125,7 +125,6 @@ export class Client {
125
125
  channels: Object.keys(data_),
126
126
  mode: WriterMode.Persist,
127
127
  errOnUnauthorized: true,
128
- enableAutoCommit: true,
129
128
  autoIndexPersistInterval: TimeSpan.MAX,
130
129
  });
131
130
  await w.write(data_);
@@ -136,7 +135,6 @@ export class Client {
136
135
  channels: channels as channel.Params,
137
136
  mode: WriterMode.Persist,
138
137
  errOnUnauthorized: true,
139
- enableAutoCommit: true,
140
138
  autoIndexPersistInterval: TimeSpan.MAX,
141
139
  });
142
140
  await w.write(channels as channel.Params, data);
@@ -1,3 +1,12 @@
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
+
1
10
  import { type WebsocketMessage } from "@synnaxlabs/freighter";
2
11
  import { DataType, Series, TimeStamp } from "@synnaxlabs/x";
3
12
  import { describe, expect, it } from "vitest";
@@ -12,7 +21,8 @@ import {
12
21
  WSWriterCodec,
13
22
  } from "@/framer/codec";
14
23
  import { Frame } from "@/framer/frame";
15
- import { WriterCommand, type WriteRequest } from "@/framer/writer";
24
+ import { WriterCommand } from "@/framer/payload";
25
+ import { type WriteRequest } from "@/framer/writer";
16
26
 
17
27
  describe("encoder", () => {
18
28
  describe("base codec", () => {
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Synnax Labs, Inc.
1
+ // Copyright 2025 Synnax Labs, Inc.
2
2
  //
3
3
  // Use of this software is governed by the Business Source License included in the file
4
4
  // licenses/BSL.txt.
@@ -20,8 +20,9 @@ import { type z } from "zod";
20
20
  import { type channel } from "@/channel";
21
21
  import { ValidationError } from "@/errors";
22
22
  import { type Frame, type Payload } from "@/framer/frame";
23
+ import { WriterCommand } from "@/framer/payload";
23
24
  import { type StreamerResponse } from "@/framer/streamer";
24
- import { WriterCommand, type WriteRequest } from "@/framer/writer";
25
+ import { type WriteRequest } from "@/framer/writer";
25
26
 
26
27
  const seriesPldLength = (series: SeriesPayload): number =>
27
28
  series.data.byteLength / series.dataType.density.valueOf();
@@ -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 { TimeRange, TimeStamp } from "@synnaxlabs/x/telem";
10
+ import { TimeRange, TimeStamp } from "@synnaxlabs/x";
11
11
  import { describe, expect, test } from "vitest";
12
12
 
13
13
  import { NotFoundError, UnauthorizedError } from "@/errors";
@@ -22,8 +22,6 @@ interface Request extends z.infer<typeof reqZ> {}
22
22
 
23
23
  const resZ = z.object({});
24
24
 
25
- const ENDPOINT = "/frame/delete";
26
-
27
25
  export class Deleter {
28
26
  /*
29
27
  Deleter is used to delete a time range of telemetry from the data engine.
@@ -37,7 +35,7 @@ export class Deleter {
37
35
  async delete(props: Request): Promise<void> {
38
36
  await sendRequired<typeof reqZ, typeof resZ>(
39
37
  this.client,
40
- ENDPOINT,
38
+ "/frame/delete",
41
39
  props,
42
40
  reqZ,
43
41
  resZ,
@@ -10,5 +10,6 @@
10
10
  export * from "@/framer/client";
11
11
  export * from "@/framer/frame";
12
12
  export * from "@/framer/iterator";
13
+ export * from "@/framer/payload";
13
14
  export * from "@/framer/streamer";
14
15
  export * from "@/framer/writer";
@@ -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, Series, TimeRange } from "@synnaxlabs/x/telem";
10
+ import { DataType, Series, TimeRange } from "@synnaxlabs/x";
11
11
  import { describe, expect, it, test } from "vitest";
12
12
 
13
13
  import { framer } from "@/framer";
@@ -7,8 +7,8 @@
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 { array, unique } from "@synnaxlabs/x";
11
10
  import {
11
+ array,
12
12
  MultiSeries,
13
13
  Series,
14
14
  type SeriesDigest,
@@ -17,7 +17,8 @@ import {
17
17
  type TelemValue,
18
18
  TimeRange,
19
19
  TimeStamp,
20
- } from "@synnaxlabs/x/telem";
20
+ unique,
21
+ } from "@synnaxlabs/x";
21
22
  import { z } from "zod";
22
23
 
23
24
  import { type channel } from "@/channel";
@@ -221,9 +222,9 @@ export class Frame {
221
222
 
222
223
  /**
223
224
  * @returns true if the frame is horizontal. Horizontal frames have a single channel,
224
- * and are strongly aligned by default.A horizontal frame typically has a single array
225
- * (in which case, it's also 'square'), although it can have multiple series if all
226
- * the series are continuous in time.
225
+ * and are strongly aligned by default. A horizontal frame typically has a single
226
+ * array (in which case, it's also 'square'), although it can have multiple series if
227
+ * all the series are continuous in time.
227
228
  */
228
229
  get isHorizontal(): boolean {
229
230
  return this.uniqueColumns.length === 1;
@@ -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 { TimeRange, TimeSpan, TimeStamp } from "@synnaxlabs/x/telem";
10
+ import { TimeRange, TimeSpan, TimeStamp } from "@synnaxlabs/x";
11
11
  import { describe, expect, test } from "vitest";
12
12
 
13
13
  import { AUTO_SPAN } from "@/framer/iterator";
@@ -68,7 +68,6 @@ describe("Iterator", () => {
68
68
  const writer = await client.openWriter({
69
69
  start: TimeStamp.SECOND,
70
70
  channels,
71
- enableAutoCommit: true,
72
71
  });
73
72
  await writer.write({
74
73
  [idx_ch.key]: secondsLinspace(1, 10),
@@ -8,15 +8,15 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { type Stream, type StreamClient } from "@synnaxlabs/freighter";
11
- import { errors } from "@synnaxlabs/x";
12
11
  import {
13
12
  type CrudeTimeRange,
14
13
  type CrudeTimeSpan,
15
14
  type CrudeTimeStamp,
15
+ errors,
16
16
  TimeRange,
17
17
  TimeSpan,
18
18
  TimeStamp,
19
- } from "@synnaxlabs/x/telem";
19
+ } from "@synnaxlabs/x";
20
20
  import { z } from "zod";
21
21
 
22
22
  import { channel } from "@/channel";
@@ -78,7 +78,6 @@ export interface IteratorConfig {
78
78
  * telemetry between two timestamps, see the SegmentClient.read method.
79
79
  */
80
80
  export class Iterator {
81
- private static readonly ENDPOINT = "/frame/iterate";
82
81
  private readonly stream: StreamProxy<typeof reqZ, typeof resZ>;
83
82
  private readonly adapter: ReadAdapter;
84
83
  value: Frame;
@@ -108,7 +107,7 @@ export class Iterator {
108
107
  opts: IteratorConfig = {},
109
108
  ): Promise<Iterator> {
110
109
  const adapter = await ReadAdapter.open(retriever, channels);
111
- const stream = await client.stream(Iterator.ENDPOINT, reqZ, resZ);
110
+ const stream = await client.stream("/frame/iterate", reqZ, resZ);
112
111
  const iter = new Iterator(stream, adapter);
113
112
  await iter.execute({
114
113
  command: Command.Open,