@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.
- package/.turbo/turbo-build.log +10 -10
- package/CONTRIBUTING.md +1 -2
- package/README.md +1 -1
- package/dist/client.cjs +58 -34
- package/dist/client.js +5256 -4528
- package/dist/eslint.config.d.ts +2 -2
- package/dist/eslint.config.d.ts.map +1 -1
- package/dist/src/access/policy/client.d.ts +90 -76
- package/dist/src/access/policy/client.d.ts.map +1 -1
- package/dist/src/access/policy/payload.d.ts +17 -14
- package/dist/src/access/policy/payload.d.ts.map +1 -1
- package/dist/src/access/role/payload.d.ts +2 -2
- package/dist/src/arc/payload.d.ts +21 -20
- package/dist/src/arc/payload.d.ts.map +1 -1
- package/dist/src/channel/client.d.ts +9 -15
- package/dist/src/channel/client.d.ts.map +1 -1
- package/dist/src/channel/payload.d.ts +18 -18
- package/dist/src/channel/payload.d.ts.map +1 -1
- package/dist/src/channel/retriever.d.ts.map +1 -1
- package/dist/src/client.d.ts +12 -0
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/device/client.d.ts +14 -7
- package/dist/src/device/client.d.ts.map +1 -1
- package/dist/src/device/payload.d.ts +65 -32
- package/dist/src/device/payload.d.ts.map +1 -1
- package/dist/src/device/payload.spec.d.ts +2 -0
- package/dist/src/device/payload.spec.d.ts.map +1 -0
- package/dist/src/framer/adapter.d.ts.map +1 -1
- package/dist/src/framer/client.d.ts +2 -2
- package/dist/src/framer/frame.d.ts +5 -5
- package/dist/src/framer/frame.d.ts.map +1 -1
- package/dist/src/framer/streamer.d.ts +7 -17
- package/dist/src/framer/streamer.d.ts.map +1 -1
- package/dist/src/framer/writer.d.ts +9 -19
- package/dist/src/framer/writer.d.ts.map +1 -1
- package/dist/src/group/access.spec.d.ts.map +1 -0
- package/dist/src/{ontology/group → group}/client.d.ts +3 -2
- package/dist/src/group/client.d.ts.map +1 -0
- package/dist/src/group/external.d.ts.map +1 -0
- package/dist/src/group/group.spec.d.ts.map +1 -0
- package/dist/src/group/index.d.ts.map +1 -0
- package/dist/src/{ontology/group → group}/payload.d.ts +1 -1
- package/dist/src/group/payload.d.ts.map +1 -0
- package/dist/src/index.d.ts +6 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/label/client.d.ts +27 -10
- package/dist/src/label/client.d.ts.map +1 -1
- package/dist/src/label/payload.d.ts +15 -1
- package/dist/src/label/payload.d.ts.map +1 -1
- package/dist/src/lineplot/access.spec.d.ts.map +1 -0
- package/dist/src/{workspace/lineplot → lineplot}/client.d.ts +6 -6
- package/dist/src/lineplot/client.d.ts.map +1 -0
- package/dist/src/lineplot/external.d.ts.map +1 -0
- package/dist/src/lineplot/index.d.ts.map +1 -0
- package/dist/src/lineplot/lineplot.spec.d.ts.map +1 -0
- package/dist/src/{workspace/lineplot → lineplot}/payload.d.ts +3 -3
- package/dist/src/lineplot/payload.d.ts.map +1 -0
- package/dist/src/log/access.spec.d.ts.map +1 -0
- package/dist/src/{workspace/log → log}/client.d.ts +6 -6
- package/dist/src/log/client.d.ts.map +1 -0
- package/dist/src/log/external.d.ts.map +1 -0
- package/dist/src/log/index.d.ts.map +1 -0
- package/dist/src/log/log.spec.d.ts.map +1 -0
- package/dist/src/{workspace/log → log}/payload.d.ts +3 -3
- package/dist/src/log/payload.d.ts.map +1 -0
- package/dist/src/ontology/client.d.ts +7 -9
- package/dist/src/ontology/client.d.ts.map +1 -1
- package/dist/src/ontology/payload.d.ts +25 -20
- package/dist/src/ontology/payload.d.ts.map +1 -1
- package/dist/src/ontology/writer.d.ts +15 -10
- package/dist/src/ontology/writer.d.ts.map +1 -1
- package/dist/src/rack/client.d.ts +2 -2
- package/dist/src/rack/payload.d.ts +44 -16
- package/dist/src/rack/payload.d.ts.map +1 -1
- package/dist/src/ranger/alias/client.d.ts +17 -0
- package/dist/src/ranger/alias/client.d.ts.map +1 -0
- package/dist/src/ranger/alias/external.d.ts +2 -0
- package/dist/src/ranger/alias/external.d.ts.map +1 -0
- package/dist/src/ranger/alias/index.d.ts +2 -0
- package/dist/src/ranger/alias/index.d.ts.map +1 -0
- package/dist/src/ranger/{alias.d.ts → alias/payload.d.ts} +14 -20
- package/dist/src/ranger/alias/payload.d.ts.map +1 -0
- package/dist/src/ranger/client.d.ts +10 -10
- package/dist/src/ranger/client.d.ts.map +1 -1
- package/dist/src/ranger/external.d.ts +20 -0
- package/dist/src/ranger/external.d.ts.map +1 -1
- package/dist/src/ranger/kv/client.d.ts +14 -0
- package/dist/src/ranger/kv/client.d.ts.map +1 -0
- package/dist/src/ranger/kv/external.d.ts +2 -0
- package/dist/src/ranger/kv/external.d.ts.map +1 -0
- package/dist/src/ranger/kv/index.d.ts +2 -0
- package/dist/src/ranger/kv/index.d.ts.map +1 -0
- package/dist/src/ranger/kv/payload.d.ts +26 -0
- package/dist/src/ranger/kv/payload.d.ts.map +1 -0
- package/dist/src/ranger/payload.d.ts +45 -3
- package/dist/src/ranger/payload.d.ts.map +1 -1
- package/dist/src/ranger/writer.d.ts +18 -3
- package/dist/src/ranger/writer.d.ts.map +1 -1
- package/dist/src/schematic/access.spec.d.ts.map +1 -0
- package/dist/src/{workspace/schematic → schematic}/client.d.ts +6 -6
- package/dist/src/schematic/client.d.ts.map +1 -0
- package/dist/src/schematic/external.d.ts.map +1 -0
- package/dist/src/schematic/index.d.ts.map +1 -0
- package/dist/src/{workspace/schematic → schematic}/payload.d.ts +3 -3
- package/dist/src/schematic/payload.d.ts.map +1 -0
- package/dist/src/schematic/schematic.spec.d.ts.map +1 -0
- package/dist/src/schematic/symbol/access.spec.d.ts.map +1 -0
- package/dist/src/{workspace/schematic → schematic}/symbol/client.d.ts +2 -2
- package/dist/src/schematic/symbol/client.d.ts.map +1 -0
- package/dist/src/schematic/symbol/client.spec.d.ts.map +1 -0
- package/dist/src/schematic/symbol/external.d.ts.map +1 -0
- package/dist/src/schematic/symbol/index.d.ts.map +1 -0
- package/dist/src/schematic/symbol/payload.d.ts.map +1 -0
- package/dist/src/status/payload.d.ts +43 -7
- package/dist/src/status/payload.d.ts.map +1 -1
- package/dist/src/table/access.spec.d.ts.map +1 -0
- package/dist/src/{workspace/table → table}/client.d.ts +6 -6
- package/dist/src/table/client.d.ts.map +1 -0
- package/dist/src/table/external.d.ts.map +1 -0
- package/dist/src/table/index.d.ts.map +1 -0
- package/dist/src/{workspace/table → table}/payload.d.ts +3 -3
- package/dist/src/table/payload.d.ts.map +1 -0
- package/dist/src/table/table.spec.d.ts.map +1 -0
- package/dist/src/task/client.d.ts +2 -2
- package/dist/src/task/client.d.ts.map +1 -1
- package/dist/src/task/payload.d.ts +5 -4
- package/dist/src/task/payload.d.ts.map +1 -1
- package/dist/src/task/payload.spec.d.ts +2 -0
- package/dist/src/task/payload.spec.d.ts.map +1 -0
- package/dist/src/user/client.d.ts +2 -2
- package/dist/src/view/client.d.ts +43 -0
- package/dist/src/view/client.d.ts.map +1 -0
- package/dist/src/view/external.d.ts +3 -0
- package/dist/src/view/external.d.ts.map +1 -0
- package/dist/src/view/index.d.ts +2 -0
- package/dist/src/view/index.d.ts.map +1 -0
- package/dist/src/view/payload.d.ts +20 -0
- package/dist/src/view/payload.d.ts.map +1 -0
- package/dist/src/view/view.spec.d.ts +2 -0
- package/dist/src/view/view.spec.d.ts.map +1 -0
- package/dist/src/workspace/client.d.ts +3 -11
- package/dist/src/workspace/client.d.ts.map +1 -1
- package/dist/src/workspace/payload.d.ts +3 -3
- package/eslint.config.ts +3 -4
- package/examples/node/basicReadWrite.js +1 -1
- package/examples/node/createChannels.js +50 -0
- package/examples/node/createRange.js +67 -0
- package/examples/node/readLatest.js +76 -0
- package/examples/node/seriesAndFrames.js +2 -2
- package/examples/node/{liveStream.js → streamRead.js} +1 -1
- package/examples/node/streamWrite.js +1 -1
- package/package.json +11 -10
- package/src/access/client.ts +1 -1
- package/src/access/enforce.spec.ts +1 -1
- package/src/access/enforce.ts +1 -1
- package/src/access/external.ts +1 -1
- package/src/access/index.ts +1 -1
- package/src/access/payload.ts +1 -1
- package/src/access/policy/access.spec.ts +1 -1
- package/src/access/policy/client.ts +1 -1
- package/src/access/policy/external.ts +1 -1
- package/src/access/policy/index.ts +1 -1
- package/src/access/policy/payload.ts +1 -1
- package/src/access/role/client.ts +1 -1
- package/src/access/role/external.ts +1 -1
- package/src/access/role/index.ts +1 -1
- package/src/access/role/payload.ts +1 -1
- package/src/access/role/role.spec.ts +1 -1
- package/src/arc/access.spec.ts +1 -7
- package/src/arc/client.ts +1 -1
- package/src/arc/external.ts +1 -1
- package/src/arc/index.ts +1 -1
- package/src/arc/lsp.spec.ts +156 -287
- package/src/arc/payload.ts +7 -12
- package/src/auth/auth.spec.ts +1 -1
- package/src/auth/auth.ts +1 -1
- package/src/auth/index.ts +1 -1
- package/src/channel/access.spec.ts +1 -1
- package/src/channel/batchRetriever.spec.ts +1 -3
- package/src/channel/channel.spec.ts +13 -20
- package/src/channel/client.ts +8 -41
- package/src/channel/external.ts +1 -1
- package/src/channel/index.ts +1 -1
- package/src/channel/payload.spec.ts +1 -58
- package/src/channel/payload.ts +19 -19
- package/src/channel/retriever.ts +7 -6
- package/src/channel/writer.ts +1 -1
- package/src/client.ts +24 -4
- package/src/connection/checker.ts +2 -2
- package/src/connection/connection.spec.ts +1 -1
- package/src/connection/index.ts +1 -1
- package/src/connection.spec.ts +1 -1
- package/src/control/client.ts +1 -1
- package/src/control/external.ts +1 -1
- package/src/control/index.ts +1 -1
- package/src/control/state.spec.ts +1 -1
- package/src/control/state.ts +1 -1
- package/src/device/access.spec.ts +1 -1
- package/src/device/client.ts +90 -44
- package/src/device/device.spec.ts +1 -1
- package/src/device/external.ts +1 -1
- package/src/device/index.ts +1 -1
- package/src/device/payload.spec.ts +118 -0
- package/src/device/payload.ts +56 -31
- package/src/errors.spec.ts +2 -2
- package/src/errors.ts +1 -1
- package/src/framer/adapter.spec.ts +1 -1
- package/src/framer/adapter.ts +6 -8
- package/src/framer/client.spec.ts +1 -1
- package/src/framer/client.ts +1 -1
- package/src/framer/codec.spec.ts +1 -1
- package/src/framer/codec.ts +1 -1
- package/src/framer/deleter.spec.ts +1 -1
- package/src/framer/deleter.ts +1 -1
- package/src/framer/external.ts +1 -1
- package/src/framer/frame.spec.ts +1 -1
- package/src/framer/frame.ts +9 -9
- package/src/framer/index.ts +1 -1
- package/src/framer/iterator.spec.ts +1 -1
- package/src/framer/iterator.ts +1 -1
- package/src/framer/payload.ts +1 -1
- package/src/framer/reader.spec.ts +1 -1
- package/src/framer/reader.ts +1 -1
- package/src/framer/streamProxy.ts +1 -1
- package/src/framer/streamer.spec.ts +1 -2
- package/src/framer/streamer.ts +4 -4
- package/src/framer/writer.spec.ts +1 -1
- package/src/framer/writer.ts +1 -1
- package/src/{ontology/group → group}/access.spec.ts +8 -8
- package/src/{ontology/group → group}/client.ts +2 -2
- package/src/group/external.ts +11 -0
- package/src/{ontology/group → group}/group.spec.ts +10 -10
- package/src/{workspace/log → group}/index.ts +2 -2
- package/src/{ontology/group → group}/payload.ts +1 -1
- package/src/index.ts +7 -6
- package/src/label/access.spec.ts +2 -2
- package/src/label/client.ts +2 -2
- package/src/label/external.ts +1 -1
- package/src/label/index.ts +1 -1
- package/src/label/label.spec.ts +5 -5
- package/src/label/payload.ts +1 -1
- package/src/{workspace/lineplot → lineplot}/access.spec.ts +15 -15
- package/src/{workspace/lineplot → lineplot}/client.ts +14 -14
- package/src/lineplot/external.ts +11 -0
- package/src/{ontology/group → lineplot}/index.ts +2 -2
- package/src/{workspace/lineplot → lineplot}/lineplot.spec.ts +13 -13
- package/src/{workspace/lineplot → lineplot}/payload.ts +1 -1
- package/src/{workspace/log → log}/access.spec.ts +17 -19
- package/src/{workspace/log → log}/client.ts +14 -14
- package/src/{workspace/schematic/index.ts → log/external.ts} +3 -2
- package/src/{workspace/table → log}/index.ts +2 -2
- package/src/{workspace/log → log}/log.spec.ts +11 -11
- package/src/{workspace/log → log}/payload.ts +1 -1
- package/src/ontology/client.ts +7 -14
- package/src/ontology/external.ts +1 -1
- package/src/ontology/index.ts +1 -1
- package/src/ontology/ontology.spec.ts +13 -13
- package/src/ontology/payload.ts +6 -3
- package/src/ontology/writer.ts +1 -1
- package/src/rack/access.spec.ts +1 -1
- package/src/rack/client.ts +1 -1
- package/src/rack/external.ts +1 -1
- package/src/rack/index.ts +1 -1
- package/src/rack/payload.ts +1 -1
- package/src/rack/rack.spec.ts +1 -1
- package/src/ranger/access.spec.ts +1 -1
- package/src/ranger/{alias.ts → alias/client.ts} +7 -38
- package/src/{workspace/lineplot → ranger/alias}/external.ts +11 -3
- package/src/{workspace/lineplot → ranger/alias}/index.ts +2 -2
- package/src/ranger/alias/payload.ts +50 -0
- package/src/ranger/client.ts +27 -20
- package/src/ranger/external.ts +23 -1
- package/src/ranger/index.ts +1 -1
- package/src/ranger/{kv.ts → kv/client.ts} +6 -20
- package/src/{workspace/schematic → ranger/kv}/external.ts +8 -4
- package/src/ranger/kv/index.ts +10 -0
- package/src/ranger/kv/payload.ts +32 -0
- package/src/ranger/payload.ts +3 -3
- package/src/ranger/ranger.spec.ts +2 -2
- package/src/ranger/writer.ts +1 -1
- package/src/{workspace/schematic → schematic}/access.spec.ts +15 -15
- package/src/{workspace/schematic → schematic}/client.ts +15 -15
- package/src/{workspace/log → schematic}/external.ts +4 -3
- package/src/schematic/index.ts +10 -0
- package/src/{workspace/schematic → schematic}/payload.ts +1 -1
- package/src/{workspace/schematic → schematic}/schematic.spec.ts +18 -18
- package/src/{workspace/schematic → schematic}/symbol/access.spec.ts +20 -20
- package/src/{workspace/schematic → schematic}/symbol/client.spec.ts +17 -17
- package/src/{workspace/schematic → schematic}/symbol/client.ts +9 -9
- package/src/{ontology/group → schematic/symbol}/external.ts +3 -3
- package/src/schematic/symbol/index.ts +10 -0
- package/src/{workspace/schematic → schematic}/symbol/payload.ts +1 -1
- package/src/status/access.spec.ts +1 -1
- package/src/status/client.ts +1 -1
- package/src/status/external.ts +1 -1
- package/src/status/index.ts +1 -1
- package/src/status/payload.ts +2 -2
- package/src/status/status.spec.ts +3 -3
- package/src/{workspace/table → table}/access.spec.ts +15 -15
- package/src/{workspace/table → table}/client.ts +16 -13
- package/src/table/external.ts +11 -0
- package/src/table/index.ts +10 -0
- package/src/{workspace/table → table}/payload.ts +1 -1
- package/src/{workspace/table → table}/table.spec.ts +13 -13
- package/src/task/access.spec.ts +1 -1
- package/src/task/client.ts +11 -6
- package/src/task/external.ts +1 -1
- package/src/task/index.ts +1 -1
- package/src/task/payload.spec.ts +113 -0
- package/src/task/payload.ts +14 -10
- package/src/task/task.spec.ts +1 -1
- package/src/testutil/access.ts +1 -1
- package/src/testutil/channels.ts +1 -1
- package/src/testutil/client.ts +1 -1
- package/src/testutil/telem.ts +1 -1
- package/src/transport.ts +1 -1
- package/src/user/access.spec.ts +1 -1
- package/src/user/client.ts +1 -1
- package/src/user/external.ts +1 -1
- package/src/user/index.ts +1 -1
- package/src/user/payload.ts +1 -1
- package/src/user/user.spec.ts +1 -1
- package/src/util/decodeJSONString.ts +1 -1
- package/src/util/parseWithoutKeyConversion.ts +1 -1
- package/src/util/retrieve.spec.ts +1 -1
- package/src/util/retrieve.ts +1 -1
- package/src/util/telem.ts +1 -1
- package/src/view/client.ts +96 -0
- package/src/view/external.ts +11 -0
- package/src/view/index.ts +10 -0
- package/src/view/payload.ts +25 -0
- package/src/view/view.spec.ts +161 -0
- package/src/vite-env.d.ts +1 -1
- package/src/workspace/access.spec.ts +1 -1
- package/src/workspace/client.ts +1 -13
- package/src/workspace/external.ts +1 -1
- package/src/workspace/index.ts +1 -1
- package/src/workspace/payload.ts +1 -1
- package/src/workspace/workspace.spec.ts +1 -1
- package/vite.config.ts +1 -1
- package/dist/src/ontology/group/access.spec.d.ts.map +0 -1
- package/dist/src/ontology/group/client.d.ts.map +0 -1
- package/dist/src/ontology/group/external.d.ts.map +0 -1
- package/dist/src/ontology/group/group.spec.d.ts.map +0 -1
- package/dist/src/ontology/group/index.d.ts.map +0 -1
- package/dist/src/ontology/group/payload.d.ts.map +0 -1
- package/dist/src/ranger/alias.d.ts.map +0 -1
- package/dist/src/ranger/kv.d.ts +0 -48
- package/dist/src/ranger/kv.d.ts.map +0 -1
- package/dist/src/workspace/lineplot/access.spec.d.ts.map +0 -1
- package/dist/src/workspace/lineplot/client.d.ts.map +0 -1
- package/dist/src/workspace/lineplot/external.d.ts.map +0 -1
- package/dist/src/workspace/lineplot/index.d.ts.map +0 -1
- package/dist/src/workspace/lineplot/lineplot.spec.d.ts.map +0 -1
- package/dist/src/workspace/lineplot/payload.d.ts.map +0 -1
- package/dist/src/workspace/log/access.spec.d.ts.map +0 -1
- package/dist/src/workspace/log/client.d.ts.map +0 -1
- package/dist/src/workspace/log/external.d.ts.map +0 -1
- package/dist/src/workspace/log/index.d.ts.map +0 -1
- package/dist/src/workspace/log/log.spec.d.ts.map +0 -1
- package/dist/src/workspace/log/payload.d.ts.map +0 -1
- package/dist/src/workspace/schematic/access.spec.d.ts.map +0 -1
- package/dist/src/workspace/schematic/client.d.ts.map +0 -1
- package/dist/src/workspace/schematic/external.d.ts.map +0 -1
- package/dist/src/workspace/schematic/index.d.ts.map +0 -1
- package/dist/src/workspace/schematic/payload.d.ts.map +0 -1
- package/dist/src/workspace/schematic/schematic.spec.d.ts.map +0 -1
- package/dist/src/workspace/schematic/symbol/access.spec.d.ts.map +0 -1
- package/dist/src/workspace/schematic/symbol/client.d.ts.map +0 -1
- package/dist/src/workspace/schematic/symbol/client.spec.d.ts.map +0 -1
- package/dist/src/workspace/schematic/symbol/external.d.ts.map +0 -1
- package/dist/src/workspace/schematic/symbol/index.d.ts.map +0 -1
- package/dist/src/workspace/schematic/symbol/payload.d.ts.map +0 -1
- package/dist/src/workspace/table/access.spec.d.ts.map +0 -1
- package/dist/src/workspace/table/client.d.ts.map +0 -1
- package/dist/src/workspace/table/external.d.ts.map +0 -1
- package/dist/src/workspace/table/index.d.ts.map +0 -1
- package/dist/src/workspace/table/payload.d.ts.map +0 -1
- package/dist/src/workspace/table/table.spec.d.ts.map +0 -1
- package/src/workspace/schematic/symbol/external.ts +0 -11
- package/src/workspace/schematic/symbol/index.ts +0 -10
- package/src/workspace/table/external.ts +0 -11
- /package/dist/src/{ontology/group → group}/access.spec.d.ts +0 -0
- /package/dist/src/{ontology/group → group}/external.d.ts +0 -0
- /package/dist/src/{ontology/group → group}/group.spec.d.ts +0 -0
- /package/dist/src/{ontology/group → group}/index.d.ts +0 -0
- /package/dist/src/{workspace/lineplot → lineplot}/access.spec.d.ts +0 -0
- /package/dist/src/{workspace/lineplot → lineplot}/external.d.ts +0 -0
- /package/dist/src/{workspace/lineplot → lineplot}/index.d.ts +0 -0
- /package/dist/src/{workspace/lineplot → lineplot}/lineplot.spec.d.ts +0 -0
- /package/dist/src/{workspace/log → log}/access.spec.d.ts +0 -0
- /package/dist/src/{workspace/log → log}/external.d.ts +0 -0
- /package/dist/src/{workspace/log → log}/index.d.ts +0 -0
- /package/dist/src/{workspace/log → log}/log.spec.d.ts +0 -0
- /package/dist/src/{workspace/schematic → schematic}/access.spec.d.ts +0 -0
- /package/dist/src/{workspace/schematic → schematic}/external.d.ts +0 -0
- /package/dist/src/{workspace/schematic → schematic}/index.d.ts +0 -0
- /package/dist/src/{workspace/schematic → schematic}/schematic.spec.d.ts +0 -0
- /package/dist/src/{workspace/schematic → schematic}/symbol/access.spec.d.ts +0 -0
- /package/dist/src/{workspace/schematic → schematic}/symbol/client.spec.d.ts +0 -0
- /package/dist/src/{workspace/schematic → schematic}/symbol/external.d.ts +0 -0
- /package/dist/src/{workspace/schematic → schematic}/symbol/index.d.ts +0 -0
- /package/dist/src/{workspace/schematic → schematic}/symbol/payload.d.ts +0 -0
- /package/dist/src/{workspace/table → table}/access.spec.d.ts +0 -0
- /package/dist/src/{workspace/table → table}/external.d.ts +0 -0
- /package/dist/src/{workspace/table → table}/index.d.ts +0 -0
- /package/dist/src/{workspace/table → table}/table.spec.d.ts +0 -0
package/src/framer/iterator.ts
CHANGED
package/src/framer/payload.ts
CHANGED
package/src/framer/reader.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -389,7 +389,6 @@ describe("Streamer", () => {
|
|
|
389
389
|
dataType: DataType.FLOAT64,
|
|
390
390
|
virtual: true,
|
|
391
391
|
expression: `return ${channelA.name} + ${channelB.name}`,
|
|
392
|
-
requires: [channelA.key, channelB.key],
|
|
393
392
|
});
|
|
394
393
|
|
|
395
394
|
const streamer = await client.openStreamer(calcChannel.key);
|
package/src/framer/streamer.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -74,7 +74,7 @@ type ParsedStreamerConfig = z.output<typeof streamerConfigZ>;
|
|
|
74
74
|
* resources. We recommend using the streamer within a try-finally block to ensure
|
|
75
75
|
* that it is closed properly in the event of an error.
|
|
76
76
|
*
|
|
77
|
-
* For
|
|
77
|
+
* For detailed documentation, see https://docs.synnaxlabs.com/reference/client/working-with-data/streaming-data
|
|
78
78
|
*/
|
|
79
79
|
export interface Streamer extends AsyncIterator<Frame>, AsyncIterable<Frame> {
|
|
80
80
|
/** The keys of the channels currently being streamed from. */
|
|
@@ -111,7 +111,7 @@ export const createStreamOpener =
|
|
|
111
111
|
if (cfg.useHighPerformanceCodec)
|
|
112
112
|
client = client.withCodec(new WSStreamerCodec(adapter.codec));
|
|
113
113
|
const stream = await client.stream("/frame/stream", reqZ, resZ);
|
|
114
|
-
const streamer = new
|
|
114
|
+
const streamer = new BaseStreamer(
|
|
115
115
|
stream,
|
|
116
116
|
adapter,
|
|
117
117
|
cfg.downsampleFactor,
|
|
@@ -140,7 +140,7 @@ export const openStreamer = async (
|
|
|
140
140
|
config: StreamerConfig,
|
|
141
141
|
): Promise<Streamer> => await createStreamOpener(retriever, client)(config);
|
|
142
142
|
|
|
143
|
-
class
|
|
143
|
+
class BaseStreamer implements Streamer {
|
|
144
144
|
private readonly stream: StreamProxy<typeof reqZ, typeof resZ>;
|
|
145
145
|
private readonly adapter: ReadAdapter;
|
|
146
146
|
private readonly downsampleFactor: number;
|
package/src/framer/writer.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -11,8 +11,8 @@ import { id } from "@synnaxlabs/x";
|
|
|
11
11
|
import { describe, expect, it } from "vitest";
|
|
12
12
|
|
|
13
13
|
import { AuthError } from "@/errors";
|
|
14
|
+
import { group } from "@/group";
|
|
14
15
|
import { ontology } from "@/ontology";
|
|
15
|
-
import { group } from "@/ontology/group";
|
|
16
16
|
import { createTestClientWithPolicy } from "@/testutil/access";
|
|
17
17
|
import { createTestClient } from "@/testutil/client";
|
|
18
18
|
|
|
@@ -26,7 +26,7 @@ describe("group", () => {
|
|
|
26
26
|
objects: [group.ontologyID("")],
|
|
27
27
|
actions: ["create"],
|
|
28
28
|
});
|
|
29
|
-
await userClient.
|
|
29
|
+
await userClient.groups.create({
|
|
30
30
|
parent: ontology.ROOT_ID,
|
|
31
31
|
name: `test-${id.create()}`,
|
|
32
32
|
});
|
|
@@ -39,7 +39,7 @@ describe("group", () => {
|
|
|
39
39
|
actions: [],
|
|
40
40
|
});
|
|
41
41
|
await expect(
|
|
42
|
-
userClient.
|
|
42
|
+
userClient.groups.create({
|
|
43
43
|
parent: ontology.ROOT_ID,
|
|
44
44
|
name: `test-${id.create()}`,
|
|
45
45
|
}),
|
|
@@ -52,11 +52,11 @@ describe("group", () => {
|
|
|
52
52
|
objects: [group.ontologyID("")],
|
|
53
53
|
actions: ["delete", "retrieve"],
|
|
54
54
|
});
|
|
55
|
-
const randomGroup = await client.
|
|
55
|
+
const randomGroup = await client.groups.create({
|
|
56
56
|
parent: ontology.ROOT_ID,
|
|
57
57
|
name: `test-${id.create()}`,
|
|
58
58
|
});
|
|
59
|
-
await userClient.
|
|
59
|
+
await userClient.groups.delete(randomGroup.key);
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
it("should deny access when no delete policy exists", async () => {
|
|
@@ -65,11 +65,11 @@ describe("group", () => {
|
|
|
65
65
|
objects: [group.ontologyID("")],
|
|
66
66
|
actions: [],
|
|
67
67
|
});
|
|
68
|
-
const randomGroup = await client.
|
|
68
|
+
const randomGroup = await client.groups.create({
|
|
69
69
|
parent: ontology.ROOT_ID,
|
|
70
70
|
name: `test-${id.create()}`,
|
|
71
71
|
});
|
|
72
|
-
await expect(userClient.
|
|
72
|
+
await expect(userClient.groups.delete(randomGroup.key)).rejects.toThrow(
|
|
73
73
|
AuthError,
|
|
74
74
|
);
|
|
75
75
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -11,7 +11,7 @@ import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
|
|
|
11
11
|
import { array } from "@synnaxlabs/x";
|
|
12
12
|
import z from "zod";
|
|
13
13
|
|
|
14
|
-
import { type Group, groupZ, type Key, keyZ } from "@/
|
|
14
|
+
import { type Group, groupZ, type Key, keyZ } from "@/group/payload";
|
|
15
15
|
import { idZ as ontologyIDZ } from "@/ontology/payload";
|
|
16
16
|
|
|
17
17
|
export const SET_CHANNEL_NAME = "sy_group_set";
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export * from "@/group/client";
|
|
11
|
+
export * from "@/group/payload";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -11,8 +11,8 @@ import { id } from "@synnaxlabs/x";
|
|
|
11
11
|
import { describe, expect, it } from "vitest";
|
|
12
12
|
|
|
13
13
|
import { NotFoundError } from "@/errors";
|
|
14
|
+
import { group } from "@/group";
|
|
14
15
|
import { ontology } from "@/ontology";
|
|
15
|
-
import { group } from "@/ontology/group";
|
|
16
16
|
import { createTestClient } from "@/testutil/client";
|
|
17
17
|
|
|
18
18
|
const client = createTestClient();
|
|
@@ -21,19 +21,19 @@ describe("Group", () => {
|
|
|
21
21
|
describe("create", () => {
|
|
22
22
|
it("should correctly create a group", async () => {
|
|
23
23
|
const name = `group-${Math.random()}`;
|
|
24
|
-
const g = await client.
|
|
24
|
+
const g = await client.groups.create({ parent: ontology.ROOT_ID, name });
|
|
25
25
|
expect(g.name).toEqual(name);
|
|
26
26
|
});
|
|
27
27
|
it("should update an existing group", async () => {
|
|
28
|
-
const parent = await client.
|
|
28
|
+
const parent = await client.groups.create({
|
|
29
29
|
parent: ontology.ROOT_ID,
|
|
30
30
|
name: `test-parent-key${id.create()}`,
|
|
31
31
|
});
|
|
32
|
-
const g = await client.
|
|
32
|
+
const g = await client.groups.create({
|
|
33
33
|
parent: group.ontologyID(parent.key),
|
|
34
34
|
name: `original-name-${id.create()}`,
|
|
35
35
|
});
|
|
36
|
-
await client.
|
|
36
|
+
await client.groups.create({
|
|
37
37
|
parent: group.ontologyID(parent.key),
|
|
38
38
|
key: g.key,
|
|
39
39
|
name: "updated-name",
|
|
@@ -45,9 +45,9 @@ describe("Group", () => {
|
|
|
45
45
|
describe("rename", () => {
|
|
46
46
|
it("should correctly rename a group", async () => {
|
|
47
47
|
const name = `group-${Math.random()}`;
|
|
48
|
-
const g = await client.
|
|
48
|
+
const g = await client.groups.create({ parent: ontology.ROOT_ID, name });
|
|
49
49
|
const newName = `group-${Math.random()}`;
|
|
50
|
-
await client.
|
|
50
|
+
await client.groups.rename(g.key, newName);
|
|
51
51
|
const g2 = await client.ontology.retrieve(group.ontologyID(g.key));
|
|
52
52
|
expect(g2.name).toEqual(newName);
|
|
53
53
|
});
|
|
@@ -55,8 +55,8 @@ describe("Group", () => {
|
|
|
55
55
|
describe("delete", () => {
|
|
56
56
|
it("should correctly delete the group", async () => {
|
|
57
57
|
const name = `group-${Math.random()}`;
|
|
58
|
-
const g = await client.
|
|
59
|
-
await client.
|
|
58
|
+
const g = await client.groups.create({ parent: ontology.ROOT_ID, name });
|
|
59
|
+
await client.groups.delete(g.key);
|
|
60
60
|
await expect(
|
|
61
61
|
async () => await client.ontology.retrieve(group.ontologyID(g.key)),
|
|
62
62
|
).rejects.toThrowError(NotFoundError);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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,4 +7,4 @@
|
|
|
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
|
-
export * as
|
|
10
|
+
export * as group from "@/group/external";
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -35,21 +35,22 @@ export {
|
|
|
35
35
|
} from "@/errors";
|
|
36
36
|
export { framer } from "@/framer";
|
|
37
37
|
export { Frame } from "@/framer/frame";
|
|
38
|
+
export { group } from "@/group";
|
|
38
39
|
export { label } from "@/label";
|
|
40
|
+
export { lineplot } from "@/lineplot";
|
|
41
|
+
export { log } from "@/log";
|
|
39
42
|
export { ontology } from "@/ontology";
|
|
40
|
-
export { group } from "@/ontology/group";
|
|
41
43
|
export { rack } from "@/rack";
|
|
42
44
|
export { ranger } from "@/ranger";
|
|
45
|
+
export { schematic } from "@/schematic";
|
|
43
46
|
export { status } from "@/status";
|
|
47
|
+
export { table } from "@/table";
|
|
44
48
|
export { task } from "@/task";
|
|
45
49
|
export { createTestClientWithPolicy } from "@/testutil/access";
|
|
46
50
|
export { createTestClient, TEST_CLIENT_PARAMS } from "@/testutil/client";
|
|
47
51
|
export { user } from "@/user";
|
|
52
|
+
export { view } from "@/view";
|
|
48
53
|
export { workspace } from "@/workspace";
|
|
49
|
-
export { lineplot } from "@/workspace/lineplot";
|
|
50
|
-
export { log } from "@/workspace/log";
|
|
51
|
-
export { schematic } from "@/workspace/schematic";
|
|
52
|
-
export { table } from "@/workspace/table";
|
|
53
54
|
export {
|
|
54
55
|
type CrudeDataType,
|
|
55
56
|
type CrudeDensity,
|
package/src/label/access.spec.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -46,7 +46,7 @@ describe("label", () => {
|
|
|
46
46
|
const retrieved = await userClient.labels.retrieve({ key: randomLabel.key });
|
|
47
47
|
expect(retrieved.key).toBe(randomLabel.key);
|
|
48
48
|
expect(retrieved.name).toBe(randomLabel.name);
|
|
49
|
-
expect(retrieved.color).
|
|
49
|
+
expect(retrieved.color).toEqual(randomLabel.color);
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
it("should allow the caller to create labels with the correct policy", async () => {
|
package/src/label/client.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -19,7 +19,7 @@ export const SET_CHANNEL_NAME = "sy_label_set";
|
|
|
19
19
|
export const DELETE_CHANNEL_NAME = "sy_label_delete";
|
|
20
20
|
|
|
21
21
|
export const newZ = labelZ.extend({ key: keyZ.optional() });
|
|
22
|
-
export interface New extends z.
|
|
22
|
+
export interface New extends z.input<typeof newZ> {}
|
|
23
23
|
|
|
24
24
|
const createReqZ = z.object({ labels: newZ.array() });
|
|
25
25
|
const createResZ = z.object({ labels: labelZ.array() });
|
package/src/label/external.ts
CHANGED
package/src/label/index.ts
CHANGED
package/src/label/label.spec.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -42,16 +42,16 @@ describe("Label", () => {
|
|
|
42
42
|
|
|
43
43
|
describe("label", () => {
|
|
44
44
|
it("should set a label on an item", async () => {
|
|
45
|
-
const l1 = await client.labels.create({ name: "Label One", color: "#
|
|
46
|
-
const l2 = await client.labels.create({ name: "Label Two", color: "#
|
|
45
|
+
const l1 = await client.labels.create({ name: "Label One", color: "#E774D0" });
|
|
46
|
+
const l2 = await client.labels.create({ name: "Label Two", color: "#E774D0" });
|
|
47
47
|
await client.labels.label(label.ontologyID(l1.key), [l2.key]);
|
|
48
48
|
const labels = await client.labels.retrieve({ for: label.ontologyID(l1.key) });
|
|
49
49
|
expect(labels).toHaveLength(1);
|
|
50
50
|
expect(labels[0].key).toEqual(l2.key);
|
|
51
51
|
});
|
|
52
52
|
it("should replace the labels on an item", async () => {
|
|
53
|
-
const l1 = await client.labels.create({ name: "Label One", color: "#
|
|
54
|
-
const l2 = await client.labels.create({ name: "Label Two", color: "#
|
|
53
|
+
const l1 = await client.labels.create({ name: "Label One", color: "#E774D0" });
|
|
54
|
+
const l2 = await client.labels.create({ name: "Label Two", color: "#E774D0" });
|
|
55
55
|
await client.labels.label(label.ontologyID(l1.key), [l2.key]);
|
|
56
56
|
await client.labels.label(label.ontologyID(l1.key), [l1.key], { replace: true });
|
|
57
57
|
const labels = await client.labels.retrieve({ for: label.ontologyID(l1.key) });
|
package/src/label/payload.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
import { describe, expect, it } from "vitest";
|
|
11
11
|
|
|
12
12
|
import { AuthError, NotFoundError } from "@/errors";
|
|
13
|
+
import { lineplot } from "@/lineplot";
|
|
13
14
|
import { createTestClientWithPolicy } from "@/testutil/access";
|
|
14
15
|
import { createTestClient } from "@/testutil/client";
|
|
15
|
-
import { lineplot } from "@/workspace/lineplot";
|
|
16
16
|
|
|
17
17
|
const client = createTestClient();
|
|
18
18
|
|
|
@@ -28,12 +28,12 @@ describe("lineplot", () => {
|
|
|
28
28
|
name: "test",
|
|
29
29
|
layout: {},
|
|
30
30
|
});
|
|
31
|
-
const randomLinePlot = await client.
|
|
31
|
+
const randomLinePlot = await client.lineplots.create(ws.key, {
|
|
32
32
|
name: "test",
|
|
33
33
|
data: {},
|
|
34
34
|
});
|
|
35
35
|
await expect(
|
|
36
|
-
userClient.
|
|
36
|
+
userClient.lineplots.retrieve({ key: randomLinePlot.key }),
|
|
37
37
|
).rejects.toThrow(AuthError);
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -47,11 +47,11 @@ describe("lineplot", () => {
|
|
|
47
47
|
name: "test",
|
|
48
48
|
layout: {},
|
|
49
49
|
});
|
|
50
|
-
const randomLinePlot = await client.
|
|
50
|
+
const randomLinePlot = await client.lineplots.create(ws.key, {
|
|
51
51
|
name: "test",
|
|
52
52
|
data: {},
|
|
53
53
|
});
|
|
54
|
-
const retrieved = await userClient.
|
|
54
|
+
const retrieved = await userClient.lineplots.retrieve({
|
|
55
55
|
key: randomLinePlot.key,
|
|
56
56
|
});
|
|
57
57
|
expect(retrieved.key).toBe(randomLinePlot.key);
|
|
@@ -68,7 +68,7 @@ describe("lineplot", () => {
|
|
|
68
68
|
name: "test",
|
|
69
69
|
layout: {},
|
|
70
70
|
});
|
|
71
|
-
await userClient.
|
|
71
|
+
await userClient.lineplots.create(ws.key, {
|
|
72
72
|
name: "test",
|
|
73
73
|
data: {},
|
|
74
74
|
});
|
|
@@ -85,7 +85,7 @@ describe("lineplot", () => {
|
|
|
85
85
|
layout: {},
|
|
86
86
|
});
|
|
87
87
|
await expect(
|
|
88
|
-
userClient.
|
|
88
|
+
userClient.lineplots.create(ws.key, {
|
|
89
89
|
name: "test",
|
|
90
90
|
data: {},
|
|
91
91
|
}),
|
|
@@ -102,13 +102,13 @@ describe("lineplot", () => {
|
|
|
102
102
|
name: "test",
|
|
103
103
|
layout: {},
|
|
104
104
|
});
|
|
105
|
-
const randomLinePlot = await client.
|
|
105
|
+
const randomLinePlot = await client.lineplots.create(ws.key, {
|
|
106
106
|
name: "test",
|
|
107
107
|
data: {},
|
|
108
108
|
});
|
|
109
|
-
await userClient.
|
|
109
|
+
await userClient.lineplots.delete(randomLinePlot.key);
|
|
110
110
|
await expect(
|
|
111
|
-
userClient.
|
|
111
|
+
userClient.lineplots.retrieve({ key: randomLinePlot.key }),
|
|
112
112
|
).rejects.toThrow(NotFoundError);
|
|
113
113
|
});
|
|
114
114
|
|
|
@@ -122,13 +122,13 @@ describe("lineplot", () => {
|
|
|
122
122
|
name: "test",
|
|
123
123
|
layout: {},
|
|
124
124
|
});
|
|
125
|
-
const randomLinePlot = await client.
|
|
125
|
+
const randomLinePlot = await client.lineplots.create(ws.key, {
|
|
126
126
|
name: "test",
|
|
127
127
|
data: {},
|
|
128
128
|
});
|
|
129
|
-
await expect(
|
|
130
|
-
|
|
131
|
-
)
|
|
129
|
+
await expect(userClient.lineplots.delete(randomLinePlot.key)).rejects.toThrow(
|
|
130
|
+
AuthError,
|
|
131
|
+
);
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
134
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -11,8 +11,6 @@ import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
|
|
|
11
11
|
import { array, type record } from "@synnaxlabs/x";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
|
|
14
|
-
import { ontology } from "@/ontology";
|
|
15
|
-
import { checkForMultipleOrNoResults } from "@/util/retrieve";
|
|
16
14
|
import {
|
|
17
15
|
type Key,
|
|
18
16
|
keyZ,
|
|
@@ -21,8 +19,10 @@ import {
|
|
|
21
19
|
type New,
|
|
22
20
|
newZ,
|
|
23
21
|
type Params,
|
|
24
|
-
} from "@/
|
|
25
|
-
import {
|
|
22
|
+
} from "@/lineplot/payload";
|
|
23
|
+
import { ontology } from "@/ontology";
|
|
24
|
+
import { checkForMultipleOrNoResults } from "@/util/retrieve";
|
|
25
|
+
import { workspace } from "@/workspace";
|
|
26
26
|
|
|
27
27
|
const renameReqZ = z.object({ key: keyZ, name: z.string() });
|
|
28
28
|
|
|
@@ -41,7 +41,7 @@ export type RetrieveMultipleParams = z.input<typeof retrieveReqZ>;
|
|
|
41
41
|
|
|
42
42
|
const retrieveResZ = z.object({ linePlots: array.nullableZ(linePlotZ) });
|
|
43
43
|
|
|
44
|
-
const createReqZ = z.object({ workspace:
|
|
44
|
+
const createReqZ = z.object({ workspace: workspace.keyZ, linePlots: newZ.array() });
|
|
45
45
|
const createResZ = z.object({ linePlots: linePlotZ.array() });
|
|
46
46
|
|
|
47
47
|
const emptyResZ = z.object({});
|
|
@@ -53,16 +53,16 @@ export class Client {
|
|
|
53
53
|
this.client = client;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
async create(workspace:
|
|
57
|
-
async create(workspace:
|
|
56
|
+
async create(workspace: workspace.Key, linePlot: New): Promise<LinePlot>;
|
|
57
|
+
async create(workspace: workspace.Key, linePlots: New[]): Promise<LinePlot[]>;
|
|
58
58
|
async create(
|
|
59
|
-
workspace:
|
|
59
|
+
workspace: workspace.Key,
|
|
60
60
|
linePlots: New | New[],
|
|
61
61
|
): Promise<LinePlot | LinePlot[]> {
|
|
62
62
|
const isMany = Array.isArray(linePlots);
|
|
63
63
|
const res = await sendRequired(
|
|
64
64
|
this.client,
|
|
65
|
-
"/
|
|
65
|
+
"/lineplot/create",
|
|
66
66
|
{ workspace, linePlots: array.toArray(linePlots) },
|
|
67
67
|
createReqZ,
|
|
68
68
|
createResZ,
|
|
@@ -73,7 +73,7 @@ export class Client {
|
|
|
73
73
|
async rename(key: Key, name: string): Promise<void> {
|
|
74
74
|
await sendRequired(
|
|
75
75
|
this.client,
|
|
76
|
-
"/
|
|
76
|
+
"/lineplot/rename",
|
|
77
77
|
{ key, name },
|
|
78
78
|
renameReqZ,
|
|
79
79
|
emptyResZ,
|
|
@@ -83,7 +83,7 @@ export class Client {
|
|
|
83
83
|
async setData(key: Key, data: record.Unknown): Promise<void> {
|
|
84
84
|
await sendRequired(
|
|
85
85
|
this.client,
|
|
86
|
-
"/
|
|
86
|
+
"/lineplot/set-data",
|
|
87
87
|
{ key, data: JSON.stringify(data) },
|
|
88
88
|
setDataReqZ,
|
|
89
89
|
emptyResZ,
|
|
@@ -98,7 +98,7 @@ export class Client {
|
|
|
98
98
|
const isSingle = singleRetrieveArgsZ.safeParse(args).success;
|
|
99
99
|
const res = await sendRequired(
|
|
100
100
|
this.client,
|
|
101
|
-
"/
|
|
101
|
+
"/lineplot/retrieve",
|
|
102
102
|
args,
|
|
103
103
|
retrieveArgsZ,
|
|
104
104
|
retrieveResZ,
|
|
@@ -110,7 +110,7 @@ export class Client {
|
|
|
110
110
|
async delete(keys: Params): Promise<void> {
|
|
111
111
|
await sendRequired(
|
|
112
112
|
this.client,
|
|
113
|
-
"/
|
|
113
|
+
"/lineplot/delete",
|
|
114
114
|
{ keys: array.toArray(keys) },
|
|
115
115
|
deleteReqZ,
|
|
116
116
|
emptyResZ,
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export * from "@/lineplot/client";
|
|
11
|
+
export * from "@/lineplot/payload";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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,4 +7,4 @@
|
|
|
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
|
-
export * as
|
|
10
|
+
export * as lineplot from "@/lineplot/external";
|