@synnaxlabs/client 0.49.3 → 0.52.3

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 (407) hide show
  1. package/.turbo/turbo-build.log +10 -10
  2. package/CONTRIBUTING.md +1 -2
  3. package/README.md +1 -1
  4. package/dist/client.cjs +58 -34
  5. package/dist/client.js +5256 -4528
  6. package/dist/eslint.config.d.ts +2 -2
  7. package/dist/eslint.config.d.ts.map +1 -1
  8. package/dist/src/access/policy/client.d.ts +90 -76
  9. package/dist/src/access/policy/client.d.ts.map +1 -1
  10. package/dist/src/access/policy/payload.d.ts +17 -14
  11. package/dist/src/access/policy/payload.d.ts.map +1 -1
  12. package/dist/src/access/role/payload.d.ts +2 -2
  13. package/dist/src/arc/payload.d.ts +21 -20
  14. package/dist/src/arc/payload.d.ts.map +1 -1
  15. package/dist/src/channel/client.d.ts +9 -15
  16. package/dist/src/channel/client.d.ts.map +1 -1
  17. package/dist/src/channel/payload.d.ts +18 -18
  18. package/dist/src/channel/payload.d.ts.map +1 -1
  19. package/dist/src/channel/retriever.d.ts.map +1 -1
  20. package/dist/src/client.d.ts +12 -0
  21. package/dist/src/client.d.ts.map +1 -1
  22. package/dist/src/device/client.d.ts +14 -7
  23. package/dist/src/device/client.d.ts.map +1 -1
  24. package/dist/src/device/payload.d.ts +65 -32
  25. package/dist/src/device/payload.d.ts.map +1 -1
  26. package/dist/src/device/payload.spec.d.ts +2 -0
  27. package/dist/src/device/payload.spec.d.ts.map +1 -0
  28. package/dist/src/framer/adapter.d.ts.map +1 -1
  29. package/dist/src/framer/client.d.ts +2 -2
  30. package/dist/src/framer/frame.d.ts +5 -5
  31. package/dist/src/framer/frame.d.ts.map +1 -1
  32. package/dist/src/framer/streamer.d.ts +7 -17
  33. package/dist/src/framer/streamer.d.ts.map +1 -1
  34. package/dist/src/framer/writer.d.ts +9 -19
  35. package/dist/src/framer/writer.d.ts.map +1 -1
  36. package/dist/src/group/access.spec.d.ts.map +1 -0
  37. package/dist/src/{ontology/group → group}/client.d.ts +3 -2
  38. package/dist/src/group/client.d.ts.map +1 -0
  39. package/dist/src/group/external.d.ts.map +1 -0
  40. package/dist/src/group/group.spec.d.ts.map +1 -0
  41. package/dist/src/group/index.d.ts.map +1 -0
  42. package/dist/src/{ontology/group → group}/payload.d.ts +1 -1
  43. package/dist/src/group/payload.d.ts.map +1 -0
  44. package/dist/src/index.d.ts +6 -5
  45. package/dist/src/index.d.ts.map +1 -1
  46. package/dist/src/label/client.d.ts +27 -10
  47. package/dist/src/label/client.d.ts.map +1 -1
  48. package/dist/src/label/payload.d.ts +15 -1
  49. package/dist/src/label/payload.d.ts.map +1 -1
  50. package/dist/src/lineplot/access.spec.d.ts.map +1 -0
  51. package/dist/src/{workspace/lineplot → lineplot}/client.d.ts +6 -6
  52. package/dist/src/lineplot/client.d.ts.map +1 -0
  53. package/dist/src/lineplot/external.d.ts.map +1 -0
  54. package/dist/src/lineplot/index.d.ts.map +1 -0
  55. package/dist/src/lineplot/lineplot.spec.d.ts.map +1 -0
  56. package/dist/src/{workspace/lineplot → lineplot}/payload.d.ts +3 -3
  57. package/dist/src/lineplot/payload.d.ts.map +1 -0
  58. package/dist/src/log/access.spec.d.ts.map +1 -0
  59. package/dist/src/{workspace/log → log}/client.d.ts +6 -6
  60. package/dist/src/log/client.d.ts.map +1 -0
  61. package/dist/src/log/external.d.ts.map +1 -0
  62. package/dist/src/log/index.d.ts.map +1 -0
  63. package/dist/src/log/log.spec.d.ts.map +1 -0
  64. package/dist/src/{workspace/log → log}/payload.d.ts +3 -3
  65. package/dist/src/log/payload.d.ts.map +1 -0
  66. package/dist/src/ontology/client.d.ts +7 -9
  67. package/dist/src/ontology/client.d.ts.map +1 -1
  68. package/dist/src/ontology/payload.d.ts +25 -20
  69. package/dist/src/ontology/payload.d.ts.map +1 -1
  70. package/dist/src/ontology/writer.d.ts +15 -10
  71. package/dist/src/ontology/writer.d.ts.map +1 -1
  72. package/dist/src/rack/client.d.ts +2 -2
  73. package/dist/src/rack/payload.d.ts +44 -16
  74. package/dist/src/rack/payload.d.ts.map +1 -1
  75. package/dist/src/ranger/alias/client.d.ts +17 -0
  76. package/dist/src/ranger/alias/client.d.ts.map +1 -0
  77. package/dist/src/ranger/alias/external.d.ts +2 -0
  78. package/dist/src/ranger/alias/external.d.ts.map +1 -0
  79. package/dist/src/ranger/alias/index.d.ts +2 -0
  80. package/dist/src/ranger/alias/index.d.ts.map +1 -0
  81. package/dist/src/ranger/{alias.d.ts → alias/payload.d.ts} +14 -20
  82. package/dist/src/ranger/alias/payload.d.ts.map +1 -0
  83. package/dist/src/ranger/client.d.ts +10 -10
  84. package/dist/src/ranger/client.d.ts.map +1 -1
  85. package/dist/src/ranger/external.d.ts +20 -0
  86. package/dist/src/ranger/external.d.ts.map +1 -1
  87. package/dist/src/ranger/kv/client.d.ts +14 -0
  88. package/dist/src/ranger/kv/client.d.ts.map +1 -0
  89. package/dist/src/ranger/kv/external.d.ts +2 -0
  90. package/dist/src/ranger/kv/external.d.ts.map +1 -0
  91. package/dist/src/ranger/kv/index.d.ts +2 -0
  92. package/dist/src/ranger/kv/index.d.ts.map +1 -0
  93. package/dist/src/ranger/kv/payload.d.ts +26 -0
  94. package/dist/src/ranger/kv/payload.d.ts.map +1 -0
  95. package/dist/src/ranger/payload.d.ts +45 -3
  96. package/dist/src/ranger/payload.d.ts.map +1 -1
  97. package/dist/src/ranger/writer.d.ts +18 -3
  98. package/dist/src/ranger/writer.d.ts.map +1 -1
  99. package/dist/src/schematic/access.spec.d.ts.map +1 -0
  100. package/dist/src/{workspace/schematic → schematic}/client.d.ts +6 -6
  101. package/dist/src/schematic/client.d.ts.map +1 -0
  102. package/dist/src/schematic/external.d.ts.map +1 -0
  103. package/dist/src/schematic/index.d.ts.map +1 -0
  104. package/dist/src/{workspace/schematic → schematic}/payload.d.ts +3 -3
  105. package/dist/src/schematic/payload.d.ts.map +1 -0
  106. package/dist/src/schematic/schematic.spec.d.ts.map +1 -0
  107. package/dist/src/schematic/symbol/access.spec.d.ts.map +1 -0
  108. package/dist/src/{workspace/schematic → schematic}/symbol/client.d.ts +2 -2
  109. package/dist/src/schematic/symbol/client.d.ts.map +1 -0
  110. package/dist/src/schematic/symbol/client.spec.d.ts.map +1 -0
  111. package/dist/src/schematic/symbol/external.d.ts.map +1 -0
  112. package/dist/src/schematic/symbol/index.d.ts.map +1 -0
  113. package/dist/src/schematic/symbol/payload.d.ts.map +1 -0
  114. package/dist/src/status/payload.d.ts +43 -7
  115. package/dist/src/status/payload.d.ts.map +1 -1
  116. package/dist/src/table/access.spec.d.ts.map +1 -0
  117. package/dist/src/{workspace/table → table}/client.d.ts +6 -6
  118. package/dist/src/table/client.d.ts.map +1 -0
  119. package/dist/src/table/external.d.ts.map +1 -0
  120. package/dist/src/table/index.d.ts.map +1 -0
  121. package/dist/src/{workspace/table → table}/payload.d.ts +3 -3
  122. package/dist/src/table/payload.d.ts.map +1 -0
  123. package/dist/src/table/table.spec.d.ts.map +1 -0
  124. package/dist/src/task/client.d.ts +2 -2
  125. package/dist/src/task/client.d.ts.map +1 -1
  126. package/dist/src/task/payload.d.ts +5 -4
  127. package/dist/src/task/payload.d.ts.map +1 -1
  128. package/dist/src/task/payload.spec.d.ts +2 -0
  129. package/dist/src/task/payload.spec.d.ts.map +1 -0
  130. package/dist/src/user/client.d.ts +2 -2
  131. package/dist/src/view/client.d.ts +43 -0
  132. package/dist/src/view/client.d.ts.map +1 -0
  133. package/dist/src/view/external.d.ts +3 -0
  134. package/dist/src/view/external.d.ts.map +1 -0
  135. package/dist/src/view/index.d.ts +2 -0
  136. package/dist/src/view/index.d.ts.map +1 -0
  137. package/dist/src/view/payload.d.ts +20 -0
  138. package/dist/src/view/payload.d.ts.map +1 -0
  139. package/dist/src/view/view.spec.d.ts +2 -0
  140. package/dist/src/view/view.spec.d.ts.map +1 -0
  141. package/dist/src/workspace/client.d.ts +3 -11
  142. package/dist/src/workspace/client.d.ts.map +1 -1
  143. package/dist/src/workspace/payload.d.ts +3 -3
  144. package/eslint.config.ts +3 -4
  145. package/examples/node/basicReadWrite.js +1 -1
  146. package/examples/node/createChannels.js +50 -0
  147. package/examples/node/createRange.js +67 -0
  148. package/examples/node/readLatest.js +76 -0
  149. package/examples/node/seriesAndFrames.js +2 -2
  150. package/examples/node/{liveStream.js → streamRead.js} +1 -1
  151. package/examples/node/streamWrite.js +1 -1
  152. package/package.json +11 -10
  153. package/src/access/client.ts +1 -1
  154. package/src/access/enforce.spec.ts +1 -1
  155. package/src/access/enforce.ts +1 -1
  156. package/src/access/external.ts +1 -1
  157. package/src/access/index.ts +1 -1
  158. package/src/access/payload.ts +1 -1
  159. package/src/access/policy/access.spec.ts +1 -1
  160. package/src/access/policy/client.ts +1 -1
  161. package/src/access/policy/external.ts +1 -1
  162. package/src/access/policy/index.ts +1 -1
  163. package/src/access/policy/payload.ts +1 -1
  164. package/src/access/role/client.ts +1 -1
  165. package/src/access/role/external.ts +1 -1
  166. package/src/access/role/index.ts +1 -1
  167. package/src/access/role/payload.ts +1 -1
  168. package/src/access/role/role.spec.ts +1 -1
  169. package/src/arc/access.spec.ts +1 -7
  170. package/src/arc/client.ts +1 -1
  171. package/src/arc/external.ts +1 -1
  172. package/src/arc/index.ts +1 -1
  173. package/src/arc/lsp.spec.ts +156 -287
  174. package/src/arc/payload.ts +7 -12
  175. package/src/auth/auth.spec.ts +1 -1
  176. package/src/auth/auth.ts +1 -1
  177. package/src/auth/index.ts +1 -1
  178. package/src/channel/access.spec.ts +1 -1
  179. package/src/channel/batchRetriever.spec.ts +1 -3
  180. package/src/channel/channel.spec.ts +13 -20
  181. package/src/channel/client.ts +8 -41
  182. package/src/channel/external.ts +1 -1
  183. package/src/channel/index.ts +1 -1
  184. package/src/channel/payload.spec.ts +1 -58
  185. package/src/channel/payload.ts +19 -19
  186. package/src/channel/retriever.ts +7 -6
  187. package/src/channel/writer.ts +1 -1
  188. package/src/client.ts +24 -4
  189. package/src/connection/checker.ts +2 -2
  190. package/src/connection/connection.spec.ts +1 -1
  191. package/src/connection/index.ts +1 -1
  192. package/src/connection.spec.ts +1 -1
  193. package/src/control/client.ts +1 -1
  194. package/src/control/external.ts +1 -1
  195. package/src/control/index.ts +1 -1
  196. package/src/control/state.spec.ts +1 -1
  197. package/src/control/state.ts +1 -1
  198. package/src/device/access.spec.ts +1 -1
  199. package/src/device/client.ts +90 -44
  200. package/src/device/device.spec.ts +1 -1
  201. package/src/device/external.ts +1 -1
  202. package/src/device/index.ts +1 -1
  203. package/src/device/payload.spec.ts +118 -0
  204. package/src/device/payload.ts +56 -31
  205. package/src/errors.spec.ts +2 -2
  206. package/src/errors.ts +1 -1
  207. package/src/framer/adapter.spec.ts +1 -1
  208. package/src/framer/adapter.ts +6 -8
  209. package/src/framer/client.spec.ts +1 -1
  210. package/src/framer/client.ts +1 -1
  211. package/src/framer/codec.spec.ts +1 -1
  212. package/src/framer/codec.ts +1 -1
  213. package/src/framer/deleter.spec.ts +1 -1
  214. package/src/framer/deleter.ts +1 -1
  215. package/src/framer/external.ts +1 -1
  216. package/src/framer/frame.spec.ts +1 -1
  217. package/src/framer/frame.ts +9 -9
  218. package/src/framer/index.ts +1 -1
  219. package/src/framer/iterator.spec.ts +1 -1
  220. package/src/framer/iterator.ts +1 -1
  221. package/src/framer/payload.ts +1 -1
  222. package/src/framer/reader.spec.ts +1 -1
  223. package/src/framer/reader.ts +1 -1
  224. package/src/framer/streamProxy.ts +1 -1
  225. package/src/framer/streamer.spec.ts +1 -2
  226. package/src/framer/streamer.ts +4 -4
  227. package/src/framer/writer.spec.ts +1 -1
  228. package/src/framer/writer.ts +1 -1
  229. package/src/{ontology/group → group}/access.spec.ts +8 -8
  230. package/src/{ontology/group → group}/client.ts +2 -2
  231. package/src/group/external.ts +11 -0
  232. package/src/{ontology/group → group}/group.spec.ts +10 -10
  233. package/src/{workspace/log → group}/index.ts +2 -2
  234. package/src/{ontology/group → group}/payload.ts +1 -1
  235. package/src/index.ts +7 -6
  236. package/src/label/access.spec.ts +2 -2
  237. package/src/label/client.ts +2 -2
  238. package/src/label/external.ts +1 -1
  239. package/src/label/index.ts +1 -1
  240. package/src/label/label.spec.ts +5 -5
  241. package/src/label/payload.ts +1 -1
  242. package/src/{workspace/lineplot → lineplot}/access.spec.ts +15 -15
  243. package/src/{workspace/lineplot → lineplot}/client.ts +14 -14
  244. package/src/lineplot/external.ts +11 -0
  245. package/src/{ontology/group → lineplot}/index.ts +2 -2
  246. package/src/{workspace/lineplot → lineplot}/lineplot.spec.ts +13 -13
  247. package/src/{workspace/lineplot → lineplot}/payload.ts +1 -1
  248. package/src/{workspace/log → log}/access.spec.ts +17 -19
  249. package/src/{workspace/log → log}/client.ts +14 -14
  250. package/src/{workspace/schematic/index.ts → log/external.ts} +3 -2
  251. package/src/{workspace/table → log}/index.ts +2 -2
  252. package/src/{workspace/log → log}/log.spec.ts +11 -11
  253. package/src/{workspace/log → log}/payload.ts +1 -1
  254. package/src/ontology/client.ts +7 -14
  255. package/src/ontology/external.ts +1 -1
  256. package/src/ontology/index.ts +1 -1
  257. package/src/ontology/ontology.spec.ts +13 -13
  258. package/src/ontology/payload.ts +6 -3
  259. package/src/ontology/writer.ts +1 -1
  260. package/src/rack/access.spec.ts +1 -1
  261. package/src/rack/client.ts +1 -1
  262. package/src/rack/external.ts +1 -1
  263. package/src/rack/index.ts +1 -1
  264. package/src/rack/payload.ts +1 -1
  265. package/src/rack/rack.spec.ts +1 -1
  266. package/src/ranger/access.spec.ts +1 -1
  267. package/src/ranger/{alias.ts → alias/client.ts} +7 -38
  268. package/src/{workspace/lineplot → ranger/alias}/external.ts +11 -3
  269. package/src/{workspace/lineplot → ranger/alias}/index.ts +2 -2
  270. package/src/ranger/alias/payload.ts +50 -0
  271. package/src/ranger/client.ts +27 -20
  272. package/src/ranger/external.ts +23 -1
  273. package/src/ranger/index.ts +1 -1
  274. package/src/ranger/{kv.ts → kv/client.ts} +6 -20
  275. package/src/{workspace/schematic → ranger/kv}/external.ts +8 -4
  276. package/src/ranger/kv/index.ts +10 -0
  277. package/src/ranger/kv/payload.ts +32 -0
  278. package/src/ranger/payload.ts +3 -3
  279. package/src/ranger/ranger.spec.ts +2 -2
  280. package/src/ranger/writer.ts +1 -1
  281. package/src/{workspace/schematic → schematic}/access.spec.ts +15 -15
  282. package/src/{workspace/schematic → schematic}/client.ts +15 -15
  283. package/src/{workspace/log → schematic}/external.ts +4 -3
  284. package/src/schematic/index.ts +10 -0
  285. package/src/{workspace/schematic → schematic}/payload.ts +1 -1
  286. package/src/{workspace/schematic → schematic}/schematic.spec.ts +18 -18
  287. package/src/{workspace/schematic → schematic}/symbol/access.spec.ts +20 -20
  288. package/src/{workspace/schematic → schematic}/symbol/client.spec.ts +17 -17
  289. package/src/{workspace/schematic → schematic}/symbol/client.ts +9 -9
  290. package/src/{ontology/group → schematic/symbol}/external.ts +3 -3
  291. package/src/schematic/symbol/index.ts +10 -0
  292. package/src/{workspace/schematic → schematic}/symbol/payload.ts +1 -1
  293. package/src/status/access.spec.ts +1 -1
  294. package/src/status/client.ts +1 -1
  295. package/src/status/external.ts +1 -1
  296. package/src/status/index.ts +1 -1
  297. package/src/status/payload.ts +2 -2
  298. package/src/status/status.spec.ts +3 -3
  299. package/src/{workspace/table → table}/access.spec.ts +15 -15
  300. package/src/{workspace/table → table}/client.ts +16 -13
  301. package/src/table/external.ts +11 -0
  302. package/src/table/index.ts +10 -0
  303. package/src/{workspace/table → table}/payload.ts +1 -1
  304. package/src/{workspace/table → table}/table.spec.ts +13 -13
  305. package/src/task/access.spec.ts +1 -1
  306. package/src/task/client.ts +11 -6
  307. package/src/task/external.ts +1 -1
  308. package/src/task/index.ts +1 -1
  309. package/src/task/payload.spec.ts +113 -0
  310. package/src/task/payload.ts +14 -10
  311. package/src/task/task.spec.ts +1 -1
  312. package/src/testutil/access.ts +1 -1
  313. package/src/testutil/channels.ts +1 -1
  314. package/src/testutil/client.ts +1 -1
  315. package/src/testutil/telem.ts +1 -1
  316. package/src/transport.ts +1 -1
  317. package/src/user/access.spec.ts +1 -1
  318. package/src/user/client.ts +1 -1
  319. package/src/user/external.ts +1 -1
  320. package/src/user/index.ts +1 -1
  321. package/src/user/payload.ts +1 -1
  322. package/src/user/user.spec.ts +1 -1
  323. package/src/util/decodeJSONString.ts +1 -1
  324. package/src/util/parseWithoutKeyConversion.ts +1 -1
  325. package/src/util/retrieve.spec.ts +1 -1
  326. package/src/util/retrieve.ts +1 -1
  327. package/src/util/telem.ts +1 -1
  328. package/src/view/client.ts +96 -0
  329. package/src/view/external.ts +11 -0
  330. package/src/view/index.ts +10 -0
  331. package/src/view/payload.ts +25 -0
  332. package/src/view/view.spec.ts +161 -0
  333. package/src/vite-env.d.ts +1 -1
  334. package/src/workspace/access.spec.ts +1 -1
  335. package/src/workspace/client.ts +1 -13
  336. package/src/workspace/external.ts +1 -1
  337. package/src/workspace/index.ts +1 -1
  338. package/src/workspace/payload.ts +1 -1
  339. package/src/workspace/workspace.spec.ts +1 -1
  340. package/vite.config.ts +1 -1
  341. package/dist/src/ontology/group/access.spec.d.ts.map +0 -1
  342. package/dist/src/ontology/group/client.d.ts.map +0 -1
  343. package/dist/src/ontology/group/external.d.ts.map +0 -1
  344. package/dist/src/ontology/group/group.spec.d.ts.map +0 -1
  345. package/dist/src/ontology/group/index.d.ts.map +0 -1
  346. package/dist/src/ontology/group/payload.d.ts.map +0 -1
  347. package/dist/src/ranger/alias.d.ts.map +0 -1
  348. package/dist/src/ranger/kv.d.ts +0 -48
  349. package/dist/src/ranger/kv.d.ts.map +0 -1
  350. package/dist/src/workspace/lineplot/access.spec.d.ts.map +0 -1
  351. package/dist/src/workspace/lineplot/client.d.ts.map +0 -1
  352. package/dist/src/workspace/lineplot/external.d.ts.map +0 -1
  353. package/dist/src/workspace/lineplot/index.d.ts.map +0 -1
  354. package/dist/src/workspace/lineplot/lineplot.spec.d.ts.map +0 -1
  355. package/dist/src/workspace/lineplot/payload.d.ts.map +0 -1
  356. package/dist/src/workspace/log/access.spec.d.ts.map +0 -1
  357. package/dist/src/workspace/log/client.d.ts.map +0 -1
  358. package/dist/src/workspace/log/external.d.ts.map +0 -1
  359. package/dist/src/workspace/log/index.d.ts.map +0 -1
  360. package/dist/src/workspace/log/log.spec.d.ts.map +0 -1
  361. package/dist/src/workspace/log/payload.d.ts.map +0 -1
  362. package/dist/src/workspace/schematic/access.spec.d.ts.map +0 -1
  363. package/dist/src/workspace/schematic/client.d.ts.map +0 -1
  364. package/dist/src/workspace/schematic/external.d.ts.map +0 -1
  365. package/dist/src/workspace/schematic/index.d.ts.map +0 -1
  366. package/dist/src/workspace/schematic/payload.d.ts.map +0 -1
  367. package/dist/src/workspace/schematic/schematic.spec.d.ts.map +0 -1
  368. package/dist/src/workspace/schematic/symbol/access.spec.d.ts.map +0 -1
  369. package/dist/src/workspace/schematic/symbol/client.d.ts.map +0 -1
  370. package/dist/src/workspace/schematic/symbol/client.spec.d.ts.map +0 -1
  371. package/dist/src/workspace/schematic/symbol/external.d.ts.map +0 -1
  372. package/dist/src/workspace/schematic/symbol/index.d.ts.map +0 -1
  373. package/dist/src/workspace/schematic/symbol/payload.d.ts.map +0 -1
  374. package/dist/src/workspace/table/access.spec.d.ts.map +0 -1
  375. package/dist/src/workspace/table/client.d.ts.map +0 -1
  376. package/dist/src/workspace/table/external.d.ts.map +0 -1
  377. package/dist/src/workspace/table/index.d.ts.map +0 -1
  378. package/dist/src/workspace/table/payload.d.ts.map +0 -1
  379. package/dist/src/workspace/table/table.spec.d.ts.map +0 -1
  380. package/src/workspace/schematic/symbol/external.ts +0 -11
  381. package/src/workspace/schematic/symbol/index.ts +0 -10
  382. package/src/workspace/table/external.ts +0 -11
  383. /package/dist/src/{ontology/group → group}/access.spec.d.ts +0 -0
  384. /package/dist/src/{ontology/group → group}/external.d.ts +0 -0
  385. /package/dist/src/{ontology/group → group}/group.spec.d.ts +0 -0
  386. /package/dist/src/{ontology/group → group}/index.d.ts +0 -0
  387. /package/dist/src/{workspace/lineplot → lineplot}/access.spec.d.ts +0 -0
  388. /package/dist/src/{workspace/lineplot → lineplot}/external.d.ts +0 -0
  389. /package/dist/src/{workspace/lineplot → lineplot}/index.d.ts +0 -0
  390. /package/dist/src/{workspace/lineplot → lineplot}/lineplot.spec.d.ts +0 -0
  391. /package/dist/src/{workspace/log → log}/access.spec.d.ts +0 -0
  392. /package/dist/src/{workspace/log → log}/external.d.ts +0 -0
  393. /package/dist/src/{workspace/log → log}/index.d.ts +0 -0
  394. /package/dist/src/{workspace/log → log}/log.spec.d.ts +0 -0
  395. /package/dist/src/{workspace/schematic → schematic}/access.spec.d.ts +0 -0
  396. /package/dist/src/{workspace/schematic → schematic}/external.d.ts +0 -0
  397. /package/dist/src/{workspace/schematic → schematic}/index.d.ts +0 -0
  398. /package/dist/src/{workspace/schematic → schematic}/schematic.spec.d.ts +0 -0
  399. /package/dist/src/{workspace/schematic → schematic}/symbol/access.spec.d.ts +0 -0
  400. /package/dist/src/{workspace/schematic → schematic}/symbol/client.spec.d.ts +0 -0
  401. /package/dist/src/{workspace/schematic → schematic}/symbol/external.d.ts +0 -0
  402. /package/dist/src/{workspace/schematic → schematic}/symbol/index.d.ts +0 -0
  403. /package/dist/src/{workspace/schematic → schematic}/symbol/payload.d.ts +0 -0
  404. /package/dist/src/{workspace/table → table}/access.spec.d.ts +0 -0
  405. /package/dist/src/{workspace/table → table}/external.d.ts +0 -0
  406. /package/dist/src/{workspace/table → table}/index.d.ts +0 -0
  407. /package/dist/src/{workspace/table → table}/table.spec.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -8,10 +8,18 @@
8
8
  // included in the file licenses/APL.txt.
9
9
 
10
10
  import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
11
- import { array, type record } from "@synnaxlabs/x";
11
+ import { array, type record, zod } from "@synnaxlabs/x";
12
12
  import { z } from "zod";
13
13
 
14
- import { type Device, deviceZ, type Key, keyZ, type New, newZ } from "@/device/payload";
14
+ import {
15
+ type Device,
16
+ type DeviceSchemas,
17
+ deviceZ,
18
+ type Key,
19
+ keyZ,
20
+ type New,
21
+ newZ,
22
+ } from "@/device/payload";
15
23
  import { ontology } from "@/ontology";
16
24
  import { keyZ as rackKeyZ } from "@/rack/payload";
17
25
  import { checkForMultipleOrNoResults } from "@/util/retrieve";
@@ -19,8 +27,21 @@ import { checkForMultipleOrNoResults } from "@/util/retrieve";
19
27
  export const SET_CHANNEL_NAME = "sy_device_set";
20
28
  export const DELETE_CHANNEL_NAME = "sy_device_delete";
21
29
 
22
- const createReqZ = z.object({ devices: newZ.array() });
23
- const createResZ = z.object({ devices: deviceZ.array() });
30
+ const createReqZ = <
31
+ Properties extends z.ZodType<record.Unknown> = typeof record.unknownZ,
32
+ Make extends z.ZodType<string> = z.ZodString,
33
+ Model extends z.ZodType<string> = z.ZodString,
34
+ >(
35
+ schemas?: DeviceSchemas<Properties, Make, Model>,
36
+ ) => z.object({ devices: zod.toArray(newZ(schemas)) });
37
+
38
+ const createResZ = <
39
+ Properties extends z.ZodType<record.Unknown> = typeof record.unknownZ,
40
+ Make extends z.ZodType<string> = z.ZodString,
41
+ Model extends z.ZodType<string> = z.ZodString,
42
+ >(
43
+ schemas?: DeviceSchemas<Properties, Make, Model>,
44
+ ) => z.object({ devices: deviceZ(schemas).array() });
24
45
 
25
46
  const deleteReqZ = z.object({ keys: keyZ.array() });
26
47
  const deleteResZ = z.object({});
@@ -37,7 +58,14 @@ const retrieveRequestZ = z.object({
37
58
  offset: z.int().optional(),
38
59
  includeStatus: z.boolean().optional(),
39
60
  });
40
- const retrieveResZ = z.object({ devices: array.nullableZ(deviceZ) });
61
+
62
+ const retrieveResZ = <
63
+ Properties extends z.ZodType<record.Unknown> = typeof record.unknownZ,
64
+ Make extends z.ZodType<string> = z.ZodString,
65
+ Model extends z.ZodType<string> = z.ZodString,
66
+ >(
67
+ schemas?: DeviceSchemas<Properties, Make, Model>,
68
+ ) => z.object({ devices: array.nullableZ(deviceZ(schemas)) });
41
69
 
42
70
  const singleRetrieveArgsZ = z
43
71
  .object({
@@ -56,6 +84,12 @@ const retrieveArgsZ = z.union([singleRetrieveArgsZ, retrieveRequestZ]);
56
84
 
57
85
  export type RetrieveArgs = z.input<typeof retrieveArgsZ>;
58
86
 
87
+ type RetrieveSchemas<
88
+ Properties extends z.ZodType<record.Unknown>,
89
+ Make extends z.ZodType<string>,
90
+ Model extends z.ZodType<string>,
91
+ > = { schemas: DeviceSchemas<Properties, Make, Model> };
92
+
59
93
  export class Client {
60
94
  private readonly client: UnaryClient;
61
95
 
@@ -64,64 +98,76 @@ export class Client {
64
98
  }
65
99
 
66
100
  async retrieve<
67
- Properties extends record.Unknown = record.Unknown,
68
- Make extends string = string,
69
- Model extends string = string,
70
- >(args: RetrieveSingleParams): Promise<Device<Properties, Make, Model>>;
101
+ Properties extends z.ZodType<record.Unknown>,
102
+ Make extends z.ZodType<string>,
103
+ Model extends z.ZodType<string>,
104
+ >(
105
+ args: RetrieveSingleParams & RetrieveSchemas<Properties, Make, Model>,
106
+ ): Promise<Device<Properties, Make, Model>>;
71
107
 
72
- async retrieve<
73
- Properties extends record.Unknown = record.Unknown,
74
- Make extends string = string,
75
- Model extends string = string,
76
- >(args: RetrieveMultipleParams): Promise<Array<Device<Properties, Make, Model>>>;
108
+ async retrieve(args: RetrieveSingleParams): Promise<Device>;
77
109
 
78
110
  async retrieve<
79
- Properties extends record.Unknown = record.Unknown,
80
- Make extends string = string,
81
- Model extends string = string,
111
+ Properties extends z.ZodType<record.Unknown>,
112
+ Make extends z.ZodType<string>,
113
+ Model extends z.ZodType<string>,
82
114
  >(
83
- args: RetrieveArgs,
84
- ): Promise<Device<Properties, Make, Model> | Array<Device<Properties, Make, Model>>> {
85
- const isSingle = typeof args === "object" && "key" in args;
115
+ args: RetrieveMultipleParams & RetrieveSchemas<Properties, Make, Model>,
116
+ ): Promise<Array<Device<Properties, Make, Model>>>;
117
+
118
+ async retrieve(args: RetrieveMultipleParams): Promise<Array<Device>>;
119
+
120
+ async retrieve(
121
+ args: RetrieveArgs & { schemas?: DeviceSchemas },
122
+ ): Promise<Device | Array<Device>> {
123
+ const { schemas, ...rest } = args as RetrieveArgs & { schemas?: DeviceSchemas };
124
+ const isSingle = typeof rest === "object" && "key" in rest;
86
125
  const res = await sendRequired(
87
126
  this.client,
88
127
  "/device/retrieve",
89
- args,
128
+ rest,
90
129
  retrieveArgsZ,
91
- retrieveResZ,
130
+ retrieveResZ(schemas),
92
131
  );
93
- checkForMultipleOrNoResults("Device", args, res.devices, isSingle);
94
- const devices = res.devices as Device<Properties, Make, Model>[];
95
- return isSingle ? devices[0] : devices;
132
+ checkForMultipleOrNoResults("Device", rest, res.devices, isSingle);
133
+ return isSingle ? res.devices[0] : res.devices;
96
134
  }
97
135
 
98
136
  async create<
99
- Properties extends record.Unknown = record.Unknown,
100
- Make extends string = string,
101
- Model extends string = string,
102
- >(device: New<Properties, Make>): Promise<Device<Properties, Make, Model>>;
103
- async create<
104
- Properties extends record.Unknown = record.Unknown,
105
- Make extends string = string,
106
- Model extends string = string,
107
- >(devices: New<Properties, Make>[]): Promise<Device<Properties, Make, Model>[]>;
137
+ Properties extends z.ZodType<record.Unknown>,
138
+ Make extends z.ZodType<string>,
139
+ Model extends z.ZodType<string>,
140
+ >(
141
+ device: New<Properties, Make, Model>,
142
+ schemas: DeviceSchemas<Properties, Make, Model>,
143
+ ): Promise<Device<Properties, Make, Model>>;
144
+
145
+ async create(device: New): Promise<Device>;
146
+
108
147
  async create<
109
- Properties extends record.Unknown = record.Unknown,
110
- Make extends string = string,
111
- Model extends string = string,
148
+ Properties extends z.ZodType<record.Unknown>,
149
+ Make extends z.ZodType<string>,
150
+ Model extends z.ZodType<string>,
112
151
  >(
113
- devices: New<Properties, Make> | New<Properties, Make>[],
114
- ): Promise<Device<Properties, Make, Model> | Device<Properties, Make, Model>[]> {
152
+ devices: New<Properties, Make, Model>[],
153
+ schemas: DeviceSchemas<Properties, Make, Model>,
154
+ ): Promise<Device<Properties, Make, Model>[]>;
155
+
156
+ async create(devices: New[]): Promise<Device[]>;
157
+
158
+ async create(
159
+ devices: New | New[],
160
+ schemas?: DeviceSchemas,
161
+ ): Promise<Device | Device[]> {
115
162
  const isSingle = !Array.isArray(devices);
116
163
  const res = await sendRequired(
117
164
  this.client,
118
165
  "/device/create",
119
166
  { devices: array.toArray(devices) },
120
- createReqZ,
121
- createResZ,
167
+ createReqZ(schemas),
168
+ createResZ(schemas),
122
169
  );
123
- const created = res.devices as Device<Properties, Make, Model>[];
124
- return isSingle ? created[0] : created;
170
+ return isSingle ? res.devices[0] : res.devices;
125
171
  }
126
172
 
127
173
  async delete(keys: Key | Key[]): Promise<void> {
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -0,0 +1,118 @@
1
+ // Copyright 2026 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
+ import { describe, expect, it } from "vitest";
11
+ import { z } from "zod";
12
+
13
+ import { deviceZ, newZ } from "@/device/payload";
14
+
15
+ const VALID_DEVICE = {
16
+ key: "dev-1",
17
+ rack: 1,
18
+ name: "Test Device",
19
+ make: "ni",
20
+ model: "pxi-6281",
21
+ location: "Lab1",
22
+ properties: { rate: 10 },
23
+ status: null,
24
+ };
25
+
26
+ describe("deviceZ", () => {
27
+ describe("default schemas", () => {
28
+ it("should accept a valid device", () => {
29
+ const result = deviceZ().safeParse(VALID_DEVICE);
30
+ expect(result.success).toBe(true);
31
+ });
32
+
33
+ it("should reject a device with an empty name", () => {
34
+ const result = deviceZ().safeParse({ ...VALID_DEVICE, name: "" });
35
+ expect(result.success).toBe(false);
36
+ });
37
+
38
+ it("should reject a device with an empty make", () => {
39
+ const result = deviceZ().safeParse({ ...VALID_DEVICE, make: "" });
40
+ expect(result.success).toBe(false);
41
+ });
42
+
43
+ it("should reject a device with an empty model", () => {
44
+ const result = deviceZ().safeParse({ ...VALID_DEVICE, model: "" });
45
+ expect(result.success).toBe(false);
46
+ });
47
+
48
+ it("should accept properties as an object", () => {
49
+ const result = deviceZ().parse(VALID_DEVICE);
50
+ expect(result.properties).toEqual({ rate: 10 });
51
+ });
52
+ });
53
+
54
+ describe("custom make schema", () => {
55
+ const makeZ = z.enum(["ni", "labjack"]);
56
+
57
+ it("should accept a valid make value", () => {
58
+ const result = deviceZ({ make: makeZ }).safeParse(VALID_DEVICE);
59
+ expect(result.success).toBe(true);
60
+ });
61
+
62
+ it("should reject an invalid make value", () => {
63
+ const result = deviceZ({ make: makeZ }).safeParse({
64
+ ...VALID_DEVICE,
65
+ make: "unknown",
66
+ });
67
+ expect(result.success).toBe(false);
68
+ });
69
+ });
70
+
71
+ describe("custom model schema", () => {
72
+ const modelZ = z.literal("pxi-6281");
73
+
74
+ it("should accept a matching model", () => {
75
+ const result = deviceZ({ model: modelZ }).safeParse(VALID_DEVICE);
76
+ expect(result.success).toBe(true);
77
+ });
78
+
79
+ it("should reject a non-matching model", () => {
80
+ const result = deviceZ({ model: modelZ }).safeParse({
81
+ ...VALID_DEVICE,
82
+ model: "t7",
83
+ });
84
+ expect(result.success).toBe(false);
85
+ });
86
+ });
87
+
88
+ describe("custom properties schema", () => {
89
+ const propertiesZ = z.object({ rate: z.number(), channel: z.string() });
90
+
91
+ it("should validate properties against the custom schema", () => {
92
+ const result = deviceZ({ properties: propertiesZ }).safeParse({
93
+ ...VALID_DEVICE,
94
+ properties: { rate: 10, channel: "ai0" },
95
+ });
96
+ expect(result.success).toBe(true);
97
+ });
98
+
99
+ it("should reject properties that don't match the custom schema", () => {
100
+ expect(() => deviceZ({ properties: propertiesZ }).parse(VALID_DEVICE)).toThrow();
101
+ });
102
+ });
103
+ });
104
+
105
+ describe("newZ", () => {
106
+ it("should encode properties to a JSON string", () => {
107
+ const result = newZ().parse(VALID_DEVICE);
108
+ expect(result.properties).toEqual(VALID_DEVICE.properties);
109
+ });
110
+
111
+ it("should still validate make and model with custom schemas", () => {
112
+ const makeZ = z.literal("ni");
113
+ const result = newZ({ make: makeZ }).safeParse(VALID_DEVICE);
114
+ expect(result.success).toBe(true);
115
+ const bad = newZ({ make: makeZ }).safeParse({ ...VALID_DEVICE, make: "opc" });
116
+ expect(bad.success).toBe(false);
117
+ });
118
+ });
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -7,11 +7,10 @@
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 { binary, record, status, zod } from "@synnaxlabs/x";
10
+ import { record, status, zod } from "@synnaxlabs/x";
11
11
  import { z } from "zod";
12
12
 
13
13
  import { keyZ as rackKeyZ } from "@/rack/payload";
14
- import { decodeJSONString } from "@/util/decodeJSONString";
15
14
 
16
15
  export const keyZ = z.string();
17
16
  export type Key = z.infer<typeof keyZ>;
@@ -21,38 +20,64 @@ export const statusZ = status.statusZ(statusDetailsZ);
21
20
 
22
21
  export interface Status extends z.infer<typeof statusZ> {}
23
22
 
24
- export const deviceZ = z.object({
25
- key: keyZ,
26
- rack: rackKeyZ.min(1, "Must select a location to connect from"),
27
- name: z.string().min(1, "Name is required"),
28
- make: z.string().min(1, "Make is required"),
29
- model: z.string().min(1, "Model is required"),
30
- location: z.string().min(1, "Location is required"),
31
- configured: z.boolean().optional(),
32
- properties: record.unknownZ.or(z.string().transform(decodeJSONString)),
33
- status: zod.nullToUndefined(statusZ),
34
- });
23
+ export interface DeviceSchemas<
24
+ Properties extends z.ZodType<record.Unknown> = typeof record.unknownZ,
25
+ Make extends z.ZodType<string> = z.ZodString,
26
+ Model extends z.ZodType<string> = z.ZodString,
27
+ > {
28
+ properties?: Properties;
29
+ make?: Make;
30
+ model?: Model;
31
+ }
32
+
33
+ export const deviceZ = <
34
+ Properties extends z.ZodType<record.Unknown> = typeof record.unknownZ,
35
+ Make extends z.ZodType<string> = z.ZodString,
36
+ Model extends z.ZodType<string> = z.ZodString,
37
+ >({ properties, make, model }: DeviceSchemas<Properties, Make, Model> = {}) =>
38
+ z.object({
39
+ key: keyZ,
40
+ rack: rackKeyZ.min(1, "Must select a location to connect from"),
41
+ name: z.string().min(1, "Name is required"),
42
+ make: make ?? z.string().min(1, "Make is required"),
43
+ model: model ?? z.string().min(1, "Model is required"),
44
+ location: z.string().min(1, "Location is required"),
45
+ configured: z.boolean().optional(),
46
+ properties: properties ?? record.nullishToEmpty(),
47
+ status: zod.nullToUndefined(statusZ),
48
+ });
35
49
 
36
50
  export interface Device<
37
- Properties extends record.Unknown = record.Unknown,
38
- Make extends string = string,
39
- Model extends string = string,
40
- > extends Omit<z.infer<typeof deviceZ>, "properties" | "status"> {
41
- properties: Properties;
42
- make: Make;
43
- model: Model;
51
+ Properties extends z.ZodType<record.Unknown> = typeof record.unknownZ,
52
+ Make extends z.ZodType<string> = z.ZodString,
53
+ Model extends z.ZodType<string> = z.ZodString,
54
+ > extends Omit<
55
+ z.infer<ReturnType<typeof deviceZ>>,
56
+ "properties" | "make" | "model" | "status"
57
+ > {
58
+ properties: z.infer<Properties>;
59
+ make: z.infer<Make>;
60
+ model: z.infer<Model>;
44
61
  status?: Status;
45
62
  }
46
63
 
47
- export const newZ = deviceZ.extend({
48
- properties: z.unknown().transform((c) => binary.JSON_CODEC.encodeString(c)),
49
- });
64
+ export const newZ = <
65
+ Properties extends z.ZodType<record.Unknown> = typeof record.unknownZ,
66
+ Make extends z.ZodType<string> = z.ZodString,
67
+ Model extends z.ZodType<string> = z.ZodString,
68
+ >(
69
+ schemas: DeviceSchemas<Properties, Make, Model> = {},
70
+ ) =>
71
+ deviceZ(schemas).extend({
72
+ properties: schemas?.properties ?? record.nullishToEmpty(),
73
+ });
74
+
50
75
  export interface New<
51
- Properties extends record.Unknown = record.Unknown,
52
- Make extends string = string,
53
- Model extends string = string,
54
- > extends Omit<z.input<typeof newZ>, "properties"> {
55
- properties: Properties;
56
- make: Make;
57
- model: Model;
76
+ Properties extends z.ZodType<record.Unknown> = typeof record.unknownZ,
77
+ Make extends z.ZodType<string> = z.ZodString,
78
+ Model extends z.ZodType<string> = z.ZodString,
79
+ > extends Omit<z.input<ReturnType<typeof newZ>>, "properties"> {
80
+ properties: z.infer<Properties>;
81
+ make: z.infer<Make>;
82
+ model: z.infer<Model>;
58
83
  }
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -64,7 +64,7 @@ test("client", async () => {
64
64
  expect(NotFoundError.matches(e)).toBe(true);
65
65
  }
66
66
  try {
67
- await client.workspaces.schematics.retrieve({ key: uuid.create() });
67
+ await client.schematics.retrieve({ key: uuid.create() });
68
68
  } catch (e) {
69
69
  expect(NotFoundError.matches(e)).toBe(true);
70
70
  }
package/src/errors.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -15,7 +15,7 @@ import { Codec } from "@/framer/codec";
15
15
  import { type CrudeFrame, Frame } from "@/framer/frame";
16
16
 
17
17
  export class ReadAdapter {
18
- private adapter: Map<channel.Key, channel.Name> | null;
18
+ private adapter: Map<channel.Key, string> | null;
19
19
  retriever: channel.Retriever;
20
20
  keys: Set<channel.Key>;
21
21
  codec: Codec;
@@ -54,7 +54,7 @@ export class ReadAdapter {
54
54
  this.keys = new Set(normalized as channel.Key[]);
55
55
  return true;
56
56
  }
57
- const a = new Map<channel.Key, channel.Name>();
57
+ const a = new Map<channel.Key, string>();
58
58
  this.adapter = a;
59
59
  normalized.forEach((name) => {
60
60
  const channel = fetched.find((channel) => channel.name === name);
@@ -87,7 +87,7 @@ export class ReadAdapter {
87
87
  }
88
88
 
89
89
  export class WriteAdapter {
90
- private adapter: Map<channel.Name, channel.Key> | null;
90
+ private adapter: Map<string, channel.Key> | null;
91
91
  retriever: channel.Retriever;
92
92
  keys: channel.Key[];
93
93
  codec: Codec;
@@ -125,9 +125,7 @@ export class WriteAdapter {
125
125
  const hasRemovedKeys = !previousKeySet.isSubsetOf(newKeySet);
126
126
  const hasChanged = hasAddedKeys || hasRemovedKeys;
127
127
  if (!hasChanged) return false;
128
- this.adapter = new Map<channel.Name, channel.Key>(
129
- results.map((c) => [c.name, c.key]),
130
- );
128
+ this.adapter = new Map<string, channel.Key>(results.map((c) => [c.name, c.key]));
131
129
  this.keys = newKeys;
132
130
  this.codec.update(
133
131
  this.keys,
@@ -137,7 +135,7 @@ export class WriteAdapter {
137
135
  }
138
136
 
139
137
  private async fetchChannel(
140
- ch: channel.Key | channel.Name | channel.Payload,
138
+ ch: channel.KeyOrName | channel.Payload,
141
139
  ): Promise<channel.Payload> {
142
140
  const res = await this.retriever.retrieve(ch);
143
141
  if (res.length === 0) throw new Error(`Channel ${JSON.stringify(ch)} not found`);
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -95,7 +95,7 @@ export type CrudeFrame =
95
95
  * and array can be square.
96
96
  */
97
97
  export class Frame {
98
- readonly columns: channel.Keys | channel.Names = [];
98
+ readonly columns: channel.KeysOrNames = [];
99
99
  readonly series: Series[] = [];
100
100
 
101
101
  constructor(
@@ -140,7 +140,7 @@ export class Frame {
140
140
  ["string", "number"].includes(typeof columnsOrData)
141
141
  ) {
142
142
  const data_ = array.toArray(series);
143
- const cols = array.toArray(columnsOrData) as channel.Keys | channel.Names;
143
+ const cols = array.toArray(columnsOrData) as channel.KeysOrNames;
144
144
  validateMatchedColsAndSeries(cols, data_);
145
145
  data_.forEach((d, i) => this.push(cols[i], d));
146
146
  return;
@@ -184,23 +184,23 @@ export class Frame {
184
184
  * @returns the channel names if the frame is keyed by channel name, and throws an error
185
185
  * otherwise.
186
186
  */
187
- get names(): channel.Names {
187
+ get names(): string[] {
188
188
  if (this.colType === "key") throw new UnexpectedError("colType is not name");
189
- return (this.columns as channel.Names) ?? [];
189
+ return (this.columns as string[]) ?? [];
190
190
  }
191
191
 
192
192
  /**
193
193
  * @returns the unique channel names if the frame is keyed by channel name, and throws an
194
194
  * otherwise.
195
195
  */
196
- get uniqueNames(): channel.Names {
196
+ get uniqueNames(): string[] {
197
197
  return unique.unique(this.names);
198
198
  }
199
199
 
200
200
  /**
201
201
  * @returns the unique columns in the frame.
202
202
  */
203
- get uniqueColumns(): channel.Keys | channel.Names {
203
+ get uniqueColumns(): channel.KeysOrNames {
204
204
  return this.colType === "key" ? this.uniqueKeys : this.uniqueNames;
205
205
  }
206
206
 
@@ -280,9 +280,9 @@ export class Frame {
280
280
  * @returns a frame with the given channel keys or names.
281
281
  * @param keys the channel keys or names.
282
282
  */
283
- get(keys: channel.Keys | channel.Names): Frame;
283
+ get(keys: channel.KeysOrNames): Frame;
284
284
 
285
- get(key: channel.KeyOrName | channel.Keys | channel.Names): MultiSeries | Frame {
285
+ get(key: channel.PrimitiveParams): MultiSeries | Frame {
286
286
  if (Array.isArray(key))
287
287
  return this.filter((k) => (key as channel.Keys).includes(k as channel.Key));
288
288
  return new MultiSeries(this.series.filter((_, i) => this.columns[i] === key));
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Synnax Labs, Inc.
1
+ // Copyright 2026 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.