@synnaxlabs/client 0.53.1 → 0.54.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.
- package/.turbo/turbo-build.log +14 -8
- package/dist/client.cjs +48 -54
- package/dist/client.js +12360 -15508
- package/dist/src/access/action/index.d.ts +2 -0
- package/dist/src/access/action/index.d.ts.map +1 -0
- package/dist/src/access/{payload.d.ts → action/types.gen.d.ts} +2 -1
- package/dist/src/access/action/types.gen.d.ts.map +1 -0
- package/dist/src/access/enforce.d.ts +2 -2
- package/dist/src/access/enforce.d.ts.map +1 -1
- package/dist/src/access/external.d.ts +1 -1
- package/dist/src/access/external.d.ts.map +1 -1
- package/dist/src/access/policy/client.d.ts +233 -389
- package/dist/src/access/policy/client.d.ts.map +1 -1
- package/dist/src/access/policy/external.d.ts +1 -1
- package/dist/src/access/policy/external.d.ts.map +1 -1
- package/dist/src/access/policy/types.gen.d.ts +120 -0
- package/dist/src/access/policy/types.gen.d.ts.map +1 -0
- package/dist/src/access/role/client.d.ts +1 -1
- package/dist/src/access/role/client.d.ts.map +1 -1
- package/dist/src/access/role/external.d.ts +1 -1
- package/dist/src/access/role/external.d.ts.map +1 -1
- package/dist/src/access/role/types.gen.d.ts +34 -0
- package/dist/src/access/role/types.gen.d.ts.map +1 -0
- package/dist/src/arc/client.d.ts +2 -2
- package/dist/src/arc/client.d.ts.map +1 -1
- package/dist/src/arc/compiler/index.d.ts +2 -0
- package/dist/src/arc/compiler/index.d.ts.map +1 -0
- package/dist/src/arc/compiler/types.gen.d.ts +12 -0
- package/dist/src/arc/compiler/types.gen.d.ts.map +1 -0
- package/dist/src/arc/external.d.ts +6 -1
- package/dist/src/arc/external.d.ts.map +1 -1
- package/dist/src/arc/graph/index.d.ts +2 -0
- package/dist/src/arc/graph/index.d.ts.map +1 -0
- package/dist/src/arc/graph/types.gen.d.ts +644 -0
- package/dist/src/arc/graph/types.gen.d.ts.map +1 -0
- package/dist/src/arc/ir/index.d.ts +2 -0
- package/dist/src/arc/ir/index.d.ts.map +1 -0
- package/dist/src/arc/ir/types.gen.d.ts +2988 -0
- package/dist/src/arc/ir/types.gen.d.ts.map +1 -0
- package/dist/src/arc/module/index.d.ts +2 -0
- package/dist/src/arc/module/index.d.ts.map +1 -0
- package/dist/src/arc/module/types.gen.d.ts +1138 -0
- package/dist/src/arc/module/types.gen.d.ts.map +1 -0
- package/dist/src/arc/program/index.d.ts +2 -0
- package/dist/src/arc/program/index.d.ts.map +1 -0
- package/dist/src/arc/program/types.gen.d.ts +1138 -0
- package/dist/src/arc/program/types.gen.d.ts.map +1 -0
- package/dist/src/arc/text/index.d.ts +2 -0
- package/dist/src/arc/text/index.d.ts.map +1 -0
- package/dist/src/arc/text/types.gen.d.ts +8 -0
- package/dist/src/arc/text/types.gen.d.ts.map +1 -0
- package/dist/src/arc/types/index.d.ts +2 -0
- package/dist/src/arc/types/index.d.ts.map +1 -0
- package/dist/src/arc/types/types.gen.d.ts +237 -0
- package/dist/src/arc/types/types.gen.d.ts.map +1 -0
- package/dist/src/arc/types.gen.d.ts +2394 -0
- package/dist/src/arc/types.gen.d.ts.map +1 -0
- package/dist/src/channel/client.d.ts +5 -4
- package/dist/src/channel/client.d.ts.map +1 -1
- package/dist/src/channel/external.d.ts +1 -0
- package/dist/src/channel/external.d.ts.map +1 -1
- package/dist/src/channel/payload.d.ts +93 -178
- package/dist/src/channel/payload.d.ts.map +1 -1
- package/dist/src/channel/retriever.d.ts +3 -2
- package/dist/src/channel/retriever.d.ts.map +1 -1
- package/dist/src/channel/types.gen.d.ts +151 -0
- package/dist/src/channel/types.gen.d.ts.map +1 -0
- package/dist/src/channel/writer.d.ts +1 -1
- package/dist/src/channel/writer.d.ts.map +1 -1
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/cluster/index.d.ts +2 -0
- package/dist/src/cluster/index.d.ts.map +1 -0
- package/dist/src/cluster/types.gen.d.ts +4 -0
- package/dist/src/cluster/types.gen.d.ts.map +1 -0
- package/dist/src/control/state.d.ts +14 -9
- package/dist/src/control/state.d.ts.map +1 -1
- package/dist/src/device/client.d.ts +7 -12
- package/dist/src/device/client.d.ts.map +1 -1
- package/dist/src/device/external.d.ts +1 -1
- package/dist/src/device/external.d.ts.map +1 -1
- package/dist/src/device/types.gen.d.ts +163 -0
- package/dist/src/device/types.gen.d.ts.map +1 -0
- package/dist/src/framer/adapter.d.ts +2 -2
- package/dist/src/framer/adapter.d.ts.map +1 -1
- package/dist/src/framer/client.d.ts +7 -7
- package/dist/src/framer/client.d.ts.map +1 -1
- package/dist/src/framer/codec.d.ts +5 -5
- package/dist/src/framer/codec.d.ts.map +1 -1
- package/dist/src/framer/external.d.ts +1 -1
- package/dist/src/framer/external.d.ts.map +1 -1
- package/dist/src/framer/frame.d.ts +18 -18
- package/dist/src/framer/frame.d.ts.map +1 -1
- package/dist/src/framer/reader.d.ts +1 -1
- package/dist/src/framer/reader.d.ts.map +1 -1
- package/dist/src/framer/streamer.d.ts +177 -114
- package/dist/src/framer/streamer.d.ts.map +1 -1
- package/dist/src/framer/types.gen.d.ts +9 -0
- package/dist/src/framer/types.gen.d.ts.map +1 -0
- package/dist/src/framer/writer.d.ts +192 -128
- package/dist/src/framer/writer.d.ts.map +1 -1
- package/dist/src/group/client.d.ts +17 -17
- package/dist/src/group/client.d.ts.map +1 -1
- package/dist/src/group/external.d.ts +1 -1
- package/dist/src/group/external.d.ts.map +1 -1
- package/dist/src/group/types.gen.d.ts +23 -0
- package/dist/src/group/types.gen.d.ts.map +1 -0
- package/dist/src/label/client.d.ts +51 -72
- package/dist/src/label/client.d.ts.map +1 -1
- package/dist/src/label/payload.d.ts +30 -8
- package/dist/src/label/payload.d.ts.map +1 -1
- package/dist/src/lineplot/client.d.ts +2 -11
- package/dist/src/lineplot/client.d.ts.map +1 -1
- package/dist/src/lineplot/external.d.ts +1 -1
- package/dist/src/lineplot/external.d.ts.map +1 -1
- package/dist/src/lineplot/types.gen.d.ts +33 -0
- package/dist/src/lineplot/types.gen.d.ts.map +1 -0
- package/dist/src/log/client.d.ts +2 -11
- package/dist/src/log/client.d.ts.map +1 -1
- package/dist/src/log/external.d.ts +1 -1
- package/dist/src/log/external.d.ts.map +1 -1
- package/dist/src/log/types.gen.d.ts +33 -0
- package/dist/src/log/types.gen.d.ts.map +1 -0
- package/dist/src/ontology/client.d.ts +31 -31
- package/dist/src/ontology/payload.d.ts +74 -99
- package/dist/src/ontology/payload.d.ts.map +1 -1
- package/dist/src/ontology/types.gen.d.ts +30 -0
- package/dist/src/ontology/types.gen.d.ts.map +1 -0
- package/dist/src/ontology/writer.d.ts +80 -80
- package/dist/src/rack/client.d.ts +22 -11
- package/dist/src/rack/client.d.ts.map +1 -1
- package/dist/src/rack/external.d.ts +1 -1
- package/dist/src/rack/external.d.ts.map +1 -1
- package/dist/src/rack/types.gen.d.ts +72 -0
- package/dist/src/rack/types.gen.d.ts.map +1 -0
- package/dist/src/range/alias/types.gen.d.ts +14 -0
- package/dist/src/range/alias/types.gen.d.ts.map +1 -0
- package/dist/src/range/kv/types.gen.d.ts +13 -0
- package/dist/src/range/kv/types.gen.d.ts.map +1 -0
- package/dist/src/ranger/alias/client.d.ts +1 -1
- package/dist/src/ranger/alias/client.d.ts.map +1 -1
- package/dist/src/ranger/alias/external.d.ts +3 -1
- package/dist/src/ranger/alias/external.d.ts.map +1 -1
- package/dist/src/ranger/alias/payload.d.ts +5 -9
- package/dist/src/ranger/alias/payload.d.ts.map +1 -1
- package/dist/src/ranger/alias/payload.spec.d.ts +2 -0
- package/dist/src/ranger/alias/payload.spec.d.ts.map +1 -0
- package/dist/src/ranger/alias/types.gen.d.ts +14 -0
- package/dist/src/ranger/alias/types.gen.d.ts.map +1 -0
- package/dist/src/ranger/client.d.ts +10 -15
- package/dist/src/ranger/client.d.ts.map +1 -1
- package/dist/src/ranger/external.d.ts +4 -4
- package/dist/src/ranger/external.d.ts.map +1 -1
- package/dist/src/ranger/kv/client.d.ts +1 -1
- package/dist/src/ranger/kv/client.d.ts.map +1 -1
- package/dist/src/ranger/kv/external.d.ts +3 -1
- package/dist/src/ranger/kv/external.d.ts.map +1 -1
- package/dist/src/ranger/kv/payload.d.ts +6 -13
- package/dist/src/ranger/kv/payload.d.ts.map +1 -1
- package/dist/src/ranger/kv/types.gen.d.ts +13 -0
- package/dist/src/ranger/kv/types.gen.d.ts.map +1 -0
- package/dist/src/ranger/payload.d.ts +2 -97
- package/dist/src/ranger/payload.d.ts.map +1 -1
- package/dist/src/ranger/types.gen.d.ts +219 -0
- package/dist/src/ranger/types.gen.d.ts.map +1 -0
- package/dist/src/ranger/writer.d.ts +25 -25
- package/dist/src/ranger/writer.d.ts.map +1 -1
- package/dist/src/schematic/client.d.ts +2 -11
- package/dist/src/schematic/client.d.ts.map +1 -1
- package/dist/src/schematic/external.d.ts +1 -1
- package/dist/src/schematic/external.d.ts.map +1 -1
- package/dist/src/schematic/symbol/client.d.ts +1 -2
- package/dist/src/schematic/symbol/client.d.ts.map +1 -1
- package/dist/src/schematic/symbol/external.d.ts +1 -1
- package/dist/src/schematic/symbol/external.d.ts.map +1 -1
- package/dist/src/schematic/symbol/types.gen.d.ts +277 -0
- package/dist/src/schematic/symbol/types.gen.d.ts.map +1 -0
- package/dist/src/schematic/types.gen.d.ts +35 -0
- package/dist/src/schematic/types.gen.d.ts.map +1 -0
- package/dist/src/status/client.d.ts +2 -0
- package/dist/src/status/client.d.ts.map +1 -1
- package/dist/src/status/payload.d.ts +25 -54
- package/dist/src/status/payload.d.ts.map +1 -1
- package/dist/src/table/client.d.ts +2 -11
- package/dist/src/table/client.d.ts.map +1 -1
- package/dist/src/table/external.d.ts +1 -1
- package/dist/src/table/external.d.ts.map +1 -1
- package/dist/src/table/types.gen.d.ts +33 -0
- package/dist/src/table/types.gen.d.ts.map +1 -0
- package/dist/src/task/client.d.ts +15 -20
- package/dist/src/task/client.d.ts.map +1 -1
- package/dist/src/task/external.d.ts +1 -1
- package/dist/src/task/external.d.ts.map +1 -1
- package/dist/src/task/types.gen.d.ts +155 -0
- package/dist/src/task/types.gen.d.ts.map +1 -0
- package/dist/src/user/client.d.ts +3 -3
- package/dist/src/user/client.d.ts.map +1 -1
- package/dist/src/user/external.d.ts +1 -1
- package/dist/src/user/external.d.ts.map +1 -1
- package/dist/src/user/types.gen.d.ts +35 -0
- package/dist/src/user/types.gen.d.ts.map +1 -0
- package/dist/src/util/decodeJSONString.d.ts.map +1 -1
- package/dist/src/view/client.d.ts +1 -10
- package/dist/src/view/client.d.ts.map +1 -1
- package/dist/src/view/external.d.ts +1 -1
- package/dist/src/view/external.d.ts.map +1 -1
- package/dist/src/view/types.gen.d.ts +35 -0
- package/dist/src/view/types.gen.d.ts.map +1 -0
- package/dist/src/workspace/client.d.ts +2 -11
- package/dist/src/workspace/client.d.ts.map +1 -1
- package/dist/src/workspace/external.d.ts +1 -1
- package/dist/src/workspace/external.d.ts.map +1 -1
- package/dist/src/workspace/types.gen.d.ts +34 -0
- package/dist/src/workspace/types.gen.d.ts.map +1 -0
- package/package.json +11 -11
- package/src/access/action/index.ts +11 -0
- package/src/access/{payload.ts → action/types.gen.ts} +4 -1
- package/src/access/enforce.spec.ts +1 -2
- package/src/access/enforce.ts +2 -2
- package/src/access/external.ts +1 -1
- package/src/access/policy/client.ts +2 -2
- package/src/access/policy/external.ts +1 -1
- package/src/access/policy/types.gen.ts +44 -0
- package/src/access/role/client.ts +2 -2
- package/src/access/role/external.ts +1 -1
- package/src/access/role/types.gen.ts +46 -0
- package/src/arc/access.spec.ts +18 -6
- package/src/arc/client.ts +3 -3
- package/src/{framer/payload.ts → arc/compiler/index.ts} +1 -6
- package/src/arc/compiler/types.gen.ts +27 -0
- package/src/arc/external.ts +6 -1
- package/src/arc/graph/index.ts +10 -0
- package/src/arc/graph/types.gen.ts +59 -0
- package/src/arc/ir/index.ts +10 -0
- package/src/arc/ir/types.gen.ts +166 -0
- package/src/arc/module/index.ts +10 -0
- package/src/arc/module/types.gen.ts +18 -0
- package/src/arc/program/index.ts +10 -0
- package/src/arc/program/types.gen.ts +18 -0
- package/src/arc/text/index.ts +10 -0
- package/src/arc/text/types.gen.ts +19 -0
- package/src/arc/types/index.ts +10 -0
- package/src/arc/types/types.gen.ts +132 -0
- package/src/arc/types.gen.ts +85 -0
- package/src/channel/client.ts +14 -15
- package/src/channel/external.ts +1 -0
- package/src/channel/payload.spec.ts +19 -16
- package/src/channel/payload.ts +14 -82
- package/src/channel/retriever.ts +9 -18
- package/src/channel/types.gen.ts +137 -0
- package/src/channel/writer.ts +2 -2
- package/src/client.ts +4 -0
- package/src/cluster/index.ts +10 -0
- package/src/cluster/types.gen.ts +16 -0
- package/src/control/state.ts +8 -6
- package/src/device/client.ts +14 -11
- package/src/device/device.spec.ts +95 -1
- package/src/device/external.ts +1 -1
- package/src/device/payload.spec.ts +26 -2
- package/src/device/types.gen.ts +100 -0
- package/src/framer/adapter.ts +7 -4
- package/src/framer/client.ts +15 -9
- package/src/framer/codec.spec.ts +25 -5
- package/src/framer/codec.ts +11 -9
- package/src/framer/deleter.spec.ts +0 -15
- package/src/framer/external.ts +1 -1
- package/src/framer/frame.ts +44 -36
- package/src/framer/reader.spec.ts +2 -2
- package/src/framer/reader.ts +6 -6
- package/src/framer/streamer.spec.ts +98 -0
- package/src/framer/streamer.ts +10 -0
- package/src/framer/types.gen.ts +20 -0
- package/src/framer/writer.ts +14 -8
- package/src/group/client.ts +1 -1
- package/src/group/external.ts +1 -1
- package/src/group/group.spec.ts +1 -1
- package/src/{access/role/payload.ts → group/types.gen.ts} +11 -11
- package/src/label/client.ts +2 -5
- package/src/label/label.spec.ts +12 -3
- package/src/label/payload.ts +3 -1
- package/src/lineplot/client.ts +9 -11
- package/src/lineplot/external.ts +1 -1
- package/src/lineplot/lineplot.spec.ts +40 -0
- package/src/lineplot/types.gen.ts +42 -0
- package/src/log/client.ts +9 -18
- package/src/log/external.ts +1 -1
- package/src/log/log.spec.ts +38 -0
- package/src/log/types.gen.ts +42 -0
- package/src/ontology/payload.ts +5 -29
- package/src/ontology/types.gen.ts +41 -0
- package/src/rack/client.ts +26 -10
- package/src/rack/external.ts +1 -1
- package/src/rack/rack.spec.ts +37 -0
- package/src/rack/types.gen.ts +62 -0
- package/src/range/alias/types.gen.ts +30 -0
- package/src/range/kv/types.gen.ts +28 -0
- package/src/ranger/alias/client.ts +1 -1
- package/src/ranger/alias/external.ts +3 -10
- package/src/ranger/alias/payload.spec.ts +52 -0
- package/src/ranger/alias/payload.ts +11 -10
- package/src/ranger/alias/types.gen.ts +30 -0
- package/src/ranger/client.ts +34 -45
- package/src/ranger/external.ts +3 -3
- package/src/ranger/kv/client.ts +3 -3
- package/src/ranger/kv/external.ts +3 -7
- package/src/ranger/kv/payload.ts +1 -6
- package/src/ranger/kv/types.gen.ts +28 -0
- package/src/ranger/payload.ts +2 -46
- package/src/ranger/ranger.spec.ts +2 -4
- package/src/ranger/types.gen.ts +66 -0
- package/src/ranger/writer.ts +2 -1
- package/src/schematic/client.ts +11 -14
- package/src/schematic/external.ts +1 -1
- package/src/schematic/schematic.spec.ts +54 -2
- package/src/schematic/symbol/client.ts +2 -4
- package/src/schematic/symbol/external.ts +1 -1
- package/src/schematic/symbol/types.gen.ts +124 -0
- package/src/schematic/types.gen.ts +44 -0
- package/src/status/client.ts +4 -3
- package/src/status/payload.ts +5 -4
- package/src/status/status.spec.ts +106 -11
- package/src/table/client.ts +10 -19
- package/src/table/external.ts +1 -1
- package/src/table/table.spec.ts +38 -0
- package/src/table/types.gen.ts +42 -0
- package/src/task/client.ts +29 -24
- package/src/task/external.ts +1 -1
- package/src/task/payload.spec.ts +19 -19
- package/src/task/task.spec.ts +127 -9
- package/src/task/types.gen.ts +169 -0
- package/src/user/client.ts +2 -2
- package/src/user/external.ts +1 -1
- package/src/user/types.gen.ts +49 -0
- package/src/util/decodeJSONString.ts +1 -1
- package/src/util/retrieve.ts +2 -2
- package/src/view/client.ts +2 -7
- package/src/view/external.ts +1 -1
- package/src/view/types.gen.ts +44 -0
- package/src/workspace/client.ts +10 -14
- package/src/workspace/external.ts +1 -1
- package/src/workspace/types.gen.ts +45 -0
- package/src/workspace/workspace.spec.ts +37 -0
- package/tsconfig.json +1 -3
- package/vite.config.ts +9 -2
- package/dist/src/access/payload.d.ts.map +0 -1
- package/dist/src/access/policy/payload.d.ts +0 -156
- package/dist/src/access/policy/payload.d.ts.map +0 -1
- package/dist/src/access/role/payload.d.ts +0 -27
- package/dist/src/access/role/payload.d.ts.map +0 -1
- package/dist/src/arc/payload.d.ts +0 -167
- package/dist/src/arc/payload.d.ts.map +0 -1
- package/dist/src/device/payload.d.ts +0 -281
- package/dist/src/device/payload.d.ts.map +0 -1
- package/dist/src/framer/payload.d.ts +0 -7
- package/dist/src/framer/payload.d.ts.map +0 -1
- package/dist/src/group/payload.d.ts +0 -16
- package/dist/src/group/payload.d.ts.map +0 -1
- package/dist/src/lineplot/payload.d.ts +0 -28
- package/dist/src/lineplot/payload.d.ts.map +0 -1
- package/dist/src/log/payload.d.ts +0 -28
- package/dist/src/log/payload.d.ts.map +0 -1
- package/dist/src/rack/payload.d.ts +0 -243
- package/dist/src/rack/payload.d.ts.map +0 -1
- package/dist/src/schematic/payload.d.ts +0 -38
- package/dist/src/schematic/payload.d.ts.map +0 -1
- package/dist/src/schematic/symbol/payload.d.ts +0 -169
- package/dist/src/schematic/symbol/payload.d.ts.map +0 -1
- package/dist/src/table/payload.d.ts +0 -33
- package/dist/src/table/payload.d.ts.map +0 -1
- package/dist/src/task/payload.d.ts +0 -123
- package/dist/src/task/payload.d.ts.map +0 -1
- package/dist/src/user/payload.d.ts +0 -22
- package/dist/src/user/payload.d.ts.map +0 -1
- package/dist/src/view/payload.d.ts +0 -20
- package/dist/src/view/payload.d.ts.map +0 -1
- package/dist/src/workspace/payload.d.ts +0 -33
- package/dist/src/workspace/payload.d.ts.map +0 -1
- package/src/access/policy/payload.ts +0 -37
- package/src/arc/payload.ts +0 -73
- package/src/device/payload.ts +0 -83
- package/src/group/payload.ts +0 -24
- package/src/lineplot/payload.ts +0 -29
- package/src/log/payload.ts +0 -29
- package/src/rack/payload.ts +0 -30
- package/src/schematic/payload.ts +0 -34
- package/src/schematic/symbol/payload.ts +0 -70
- package/src/table/payload.ts +0 -33
- package/src/task/payload.ts +0 -127
- package/src/user/payload.ts +0 -29
- package/src/view/payload.ts +0 -25
- package/src/workspace/payload.ts +0 -33
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
// Code generated by Oracle. DO NOT EDIT.
|
|
11
|
+
|
|
12
|
+
import { array, spatial } from "@synnaxlabs/x";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
|
|
15
|
+
import { ontology } from "@/ontology";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Region is a visual styling area within a symbol state, targeting specific SVG
|
|
19
|
+
* elements for dynamic coloring.
|
|
20
|
+
*/
|
|
21
|
+
export const regionZ = z.object({
|
|
22
|
+
/** key is the region identifier. */
|
|
23
|
+
key: z.string(),
|
|
24
|
+
/** name is a human-readable name for the region. */
|
|
25
|
+
name: z.string(),
|
|
26
|
+
/** selectors contains CSS selectors targeting SVG elements within the symbol. */
|
|
27
|
+
selectors: array.nullishToEmpty(z.string()),
|
|
28
|
+
/** strokeColor is an optional stroke color in hex format (#RRGGBB). */
|
|
29
|
+
strokeColor: z.string().optional(),
|
|
30
|
+
/** fillColor is an optional fill color in hex format (#RRGGBB). */
|
|
31
|
+
fillColor: z.string().optional(),
|
|
32
|
+
});
|
|
33
|
+
export interface Region extends z.infer<typeof regionZ> {}
|
|
34
|
+
|
|
35
|
+
/** Handle is a connection point on a symbol for linking to other diagram elements. */
|
|
36
|
+
export const handleZ = z.object({
|
|
37
|
+
/** key is the handle identifier. */
|
|
38
|
+
key: z.string(),
|
|
39
|
+
/** position is the (x, y) coordinate within the symbol's local space. */
|
|
40
|
+
position: spatial.xyZ,
|
|
41
|
+
/** orientation is the direction the handle faces (top, right, bottom, left). */
|
|
42
|
+
orientation: spatial.outerLocationZ,
|
|
43
|
+
});
|
|
44
|
+
export interface Handle extends z.infer<typeof handleZ> {}
|
|
45
|
+
|
|
46
|
+
/** Viewport is the camera state for viewing or previewing a symbol. */
|
|
47
|
+
export const viewportZ = z.object({
|
|
48
|
+
/** zoom is the zoom level where 1.0 equals 100%. */
|
|
49
|
+
zoom: z.number().default(1),
|
|
50
|
+
/** position is the (x, y) pan offset. */
|
|
51
|
+
position: spatial.xyZ,
|
|
52
|
+
});
|
|
53
|
+
export interface Viewport extends z.infer<typeof viewportZ> {}
|
|
54
|
+
|
|
55
|
+
export const keyZ = z.uuid();
|
|
56
|
+
export type Key = z.infer<typeof keyZ>;
|
|
57
|
+
|
|
58
|
+
/** State is a named visual state of a symbol with regional styling configurations. */
|
|
59
|
+
export const stateZ = z.object({
|
|
60
|
+
/** key is the state identifier. */
|
|
61
|
+
key: z.string(),
|
|
62
|
+
/** name is a human-readable name for this state. */
|
|
63
|
+
name: z.string(),
|
|
64
|
+
/** regions contains style regions defining visual appearance for this state. */
|
|
65
|
+
regions: array.nullishToEmpty(regionZ),
|
|
66
|
+
});
|
|
67
|
+
export interface State extends z.infer<typeof stateZ> {}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Spec is the complete symbol definition including geometry, states, handles, and
|
|
71
|
+
* rendering properties.
|
|
72
|
+
*/
|
|
73
|
+
export const specZ = z.object({
|
|
74
|
+
/** svg is the SVG markup defining the symbol's visual geometry. */
|
|
75
|
+
svg: z.string().min(1),
|
|
76
|
+
/** states contains available visual states with regional styling configurations. */
|
|
77
|
+
states: array.nullishToEmpty(stateZ),
|
|
78
|
+
/** variant is the symbol variant or category identifier (e.g., 'sensor', 'valve'). */
|
|
79
|
+
variant: z.string().min(1),
|
|
80
|
+
/** handles contains connection points for linking to other diagram elements. */
|
|
81
|
+
handles: array.nullishToEmpty(handleZ),
|
|
82
|
+
/** scale is the symbol scale factor. */
|
|
83
|
+
scale: z.number().default(1),
|
|
84
|
+
/** scaleStroke indicates whether stroke width scales with the symbol size. */
|
|
85
|
+
scaleStroke: z.boolean().default(false),
|
|
86
|
+
/** previewViewport is an optional viewport configuration for symbol preview rendering. */
|
|
87
|
+
previewViewport: viewportZ.optional(),
|
|
88
|
+
});
|
|
89
|
+
export interface Spec extends z.infer<typeof specZ> {}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Symbol is a persisted schematic symbol with versioning, defining reusable visual
|
|
93
|
+
* components for diagrams.
|
|
94
|
+
*/
|
|
95
|
+
export const symbolZ = z.object({
|
|
96
|
+
/** key is the unique identifier for this symbol. */
|
|
97
|
+
key: keyZ,
|
|
98
|
+
/** version is the symbol schema version for migration support. */
|
|
99
|
+
version: z.uint32().default(1),
|
|
100
|
+
/** name is a human-readable name for the symbol. */
|
|
101
|
+
name: z.string().min(1),
|
|
102
|
+
/** data is the complete symbol specification. */
|
|
103
|
+
data: specZ,
|
|
104
|
+
});
|
|
105
|
+
export interface Symbol extends z.infer<typeof symbolZ> {}
|
|
106
|
+
|
|
107
|
+
/** New contains parameters for creating a new schematic symbol. */
|
|
108
|
+
export const newZ = z.object({
|
|
109
|
+
/**
|
|
110
|
+
* key is an optional key for the symbol. If not provided, one will be
|
|
111
|
+
* automatically assigned.
|
|
112
|
+
*/
|
|
113
|
+
key: keyZ.optional(),
|
|
114
|
+
/** version is the symbol schema version. */
|
|
115
|
+
version: z.uint32().default(1),
|
|
116
|
+
/** name is a human-readable name for the symbol. */
|
|
117
|
+
name: z.string().min(1),
|
|
118
|
+
/** data is the complete symbol specification. */
|
|
119
|
+
data: specZ,
|
|
120
|
+
});
|
|
121
|
+
export interface New extends z.input<typeof newZ> {}
|
|
122
|
+
|
|
123
|
+
export const ontologyID = ontology.createIDFactory<Key>("schematic_symbol");
|
|
124
|
+
export const TYPE_ONTOLOGY_ID = ontologyID("");
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
// Code generated by Oracle. DO NOT EDIT.
|
|
11
|
+
|
|
12
|
+
import { caseconv, record } from "@synnaxlabs/x";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
|
|
15
|
+
import { ontology } from "@/ontology";
|
|
16
|
+
|
|
17
|
+
export const keyZ = z.uuid();
|
|
18
|
+
export type Key = z.infer<typeof keyZ>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Schematic is a visual diagram editor component for drawing system schematics,
|
|
22
|
+
* control flows, and process diagrams. Schematics support interactive
|
|
23
|
+
* symbols, connection handles, and dynamic state visualization.
|
|
24
|
+
*/
|
|
25
|
+
export const schematicZ = z.object({
|
|
26
|
+
/** key is the unique identifier for this schematic. */
|
|
27
|
+
key: keyZ,
|
|
28
|
+
/** name is a human-readable name for the schematic. */
|
|
29
|
+
name: z.string(),
|
|
30
|
+
/**
|
|
31
|
+
* data is the schematic content including symbols, connections, and layout
|
|
32
|
+
* configuration.
|
|
33
|
+
*/
|
|
34
|
+
data: caseconv.preserveCase(record.nullishToEmpty()),
|
|
35
|
+
/** snapshot indicates whether this schematic represents a saved snapshot state. */
|
|
36
|
+
snapshot: z.boolean(),
|
|
37
|
+
});
|
|
38
|
+
export interface Schematic extends z.infer<typeof schematicZ> {}
|
|
39
|
+
|
|
40
|
+
export const newZ = schematicZ.partial({ key: true, snapshot: true });
|
|
41
|
+
export interface New extends z.input<typeof newZ> {}
|
|
42
|
+
|
|
43
|
+
export const ontologyID = ontology.createIDFactory<Key>("schematic");
|
|
44
|
+
export const TYPE_ONTOLOGY_ID = ontologyID("");
|
package/src/status/client.ts
CHANGED
|
@@ -36,6 +36,7 @@ const retrieveRequestZ = z.object({
|
|
|
36
36
|
limit: z.int().optional(),
|
|
37
37
|
includeLabels: z.boolean().optional(),
|
|
38
38
|
hasLabels: label.keyZ.array().optional(),
|
|
39
|
+
variants: z.string().array().optional(),
|
|
39
40
|
});
|
|
40
41
|
|
|
41
42
|
const singleRetrieveArgsZ = z
|
|
@@ -50,7 +51,7 @@ export type MultiRetrieveArgs = z.input<typeof retrieveRequestZ>;
|
|
|
50
51
|
|
|
51
52
|
const retrieveResponseZ = <DetailsSchema extends z.ZodType = z.ZodNever>(
|
|
52
53
|
detailsSchema?: DetailsSchema,
|
|
53
|
-
) => z.object({ statuses: array.
|
|
54
|
+
) => z.object({ statuses: array.nullishToEmpty(statusZ(detailsSchema)) });
|
|
54
55
|
|
|
55
56
|
export interface SetOptions {
|
|
56
57
|
parent?: ontology.ID;
|
|
@@ -81,7 +82,7 @@ export class Client {
|
|
|
81
82
|
retrieveResponseZ<DetailsSchema>(args.detailsSchema),
|
|
82
83
|
);
|
|
83
84
|
checkForMultipleOrNoResults("Status", args, res.statuses, isSingle);
|
|
84
|
-
const statuses = res.statuses as
|
|
85
|
+
const statuses = res.statuses as Status<DetailsSchema>[];
|
|
85
86
|
return isSingle ? statuses[0] : statuses;
|
|
86
87
|
}
|
|
87
88
|
|
|
@@ -109,7 +110,7 @@ export class Client {
|
|
|
109
110
|
setReqZ(opts.detailsSchema),
|
|
110
111
|
setResZ(opts.detailsSchema),
|
|
111
112
|
);
|
|
112
|
-
const created = res.statuses as
|
|
113
|
+
const created = res.statuses as Status<DetailsSchema>[];
|
|
113
114
|
return isMany ? created : created[0];
|
|
114
115
|
}
|
|
115
116
|
|
package/src/status/payload.ts
CHANGED
|
@@ -15,20 +15,21 @@ import { ontology } from "@/ontology";
|
|
|
15
15
|
export const keyZ = z.string();
|
|
16
16
|
export type Key = z.infer<typeof keyZ>;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
// Wrapper functions with single-param style
|
|
20
19
|
export const statusZ = <Details extends z.ZodType = z.ZodNever>(
|
|
21
20
|
detailsSchema?: Details,
|
|
22
|
-
) => status.statusZ(detailsSchema);
|
|
21
|
+
) => status.statusZ({ details: detailsSchema });
|
|
23
22
|
|
|
24
23
|
export const newZ = <DetailsSchema extends z.ZodType = z.ZodNever>(
|
|
25
24
|
detailsSchema?: DetailsSchema,
|
|
26
|
-
) =>
|
|
25
|
+
) => status.newZ({ details: detailsSchema }).omit({ labels: true });
|
|
27
26
|
|
|
27
|
+
// Input type derived from Zod schema for consistency
|
|
28
28
|
export type New<DetailsSchema extends z.ZodType = z.ZodNever> = z.input<
|
|
29
29
|
ReturnType<typeof newZ<DetailsSchema>>
|
|
30
30
|
>;
|
|
31
31
|
|
|
32
|
+
// Output type re-exported from x package
|
|
32
33
|
export type Status<Details extends z.ZodType = z.ZodNever> = status.Status<Details>;
|
|
33
34
|
|
|
34
35
|
export const SET_CHANNEL_NAME = "sy_status_set";
|
|
@@ -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 { TimeStamp, uuid } from "@synnaxlabs/x";
|
|
10
|
+
import { color, status as xStatus, TimeStamp, uuid } from "@synnaxlabs/x";
|
|
11
11
|
import { describe, expect, it } from "vitest";
|
|
12
12
|
import z from "zod";
|
|
13
13
|
|
|
@@ -254,13 +254,15 @@ describe("Status", () => {
|
|
|
254
254
|
it("should delete multiple statuses", async () => {
|
|
255
255
|
const keys = ["del-1", "del-2", "del-3"];
|
|
256
256
|
await client.statuses.set(
|
|
257
|
-
keys.map((key) =>
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
257
|
+
keys.map((key) =>
|
|
258
|
+
xStatus.create({
|
|
259
|
+
name: `Delete ${key}`,
|
|
260
|
+
key,
|
|
261
|
+
variant: "info",
|
|
262
|
+
message: "To be deleted",
|
|
263
|
+
time: TimeStamp.now(),
|
|
264
|
+
}),
|
|
265
|
+
),
|
|
264
266
|
);
|
|
265
267
|
|
|
266
268
|
await client.statuses.delete(keys);
|
|
@@ -296,11 +298,11 @@ describe("Status", () => {
|
|
|
296
298
|
it("should correctly retrieve a status with labels attached", async () => {
|
|
297
299
|
const label1 = await client.labels.create({
|
|
298
300
|
name: "Label 1",
|
|
299
|
-
color: "#0000FF",
|
|
301
|
+
color: color.construct("#0000FF"),
|
|
300
302
|
});
|
|
301
303
|
const label2 = await client.labels.create({
|
|
302
304
|
name: "Label 2",
|
|
303
|
-
color: "#FF0000",
|
|
305
|
+
color: color.construct("#FF0000"),
|
|
304
306
|
});
|
|
305
307
|
const stat = await client.statuses.set({
|
|
306
308
|
name: "Idempotent",
|
|
@@ -322,9 +324,102 @@ describe("Status", () => {
|
|
|
322
324
|
});
|
|
323
325
|
});
|
|
324
326
|
|
|
327
|
+
describe("retrieve with variants filter", () => {
|
|
328
|
+
it("should filter statuses by a single variant", async () => {
|
|
329
|
+
const prefix = `variant-filter-${Date.now()}`;
|
|
330
|
+
await client.statuses.set([
|
|
331
|
+
{
|
|
332
|
+
name: "Success",
|
|
333
|
+
key: `${prefix}-success`,
|
|
334
|
+
variant: "success",
|
|
335
|
+
message: "ok",
|
|
336
|
+
time: TimeStamp.now(),
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
name: "Error",
|
|
340
|
+
key: `${prefix}-error`,
|
|
341
|
+
variant: "error",
|
|
342
|
+
message: "fail",
|
|
343
|
+
time: TimeStamp.now(),
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: "Warning",
|
|
347
|
+
key: `${prefix}-warning`,
|
|
348
|
+
variant: "warning",
|
|
349
|
+
message: "warn",
|
|
350
|
+
time: TimeStamp.now(),
|
|
351
|
+
},
|
|
352
|
+
]);
|
|
353
|
+
|
|
354
|
+
const results = await client.statuses.retrieve({
|
|
355
|
+
keys: [`${prefix}-success`, `${prefix}-error`, `${prefix}-warning`],
|
|
356
|
+
variants: ["error"],
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
expect(results).toHaveLength(1);
|
|
360
|
+
expect(results[0].variant).toBe("error");
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
it("should filter statuses by multiple variants", async () => {
|
|
364
|
+
const prefix = `variant-multi-${Date.now()}`;
|
|
365
|
+
await client.statuses.set([
|
|
366
|
+
{
|
|
367
|
+
name: "Info",
|
|
368
|
+
key: `${prefix}-info`,
|
|
369
|
+
variant: "info",
|
|
370
|
+
message: "info",
|
|
371
|
+
time: TimeStamp.now(),
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
name: "Error",
|
|
375
|
+
key: `${prefix}-error`,
|
|
376
|
+
variant: "error",
|
|
377
|
+
message: "error",
|
|
378
|
+
time: TimeStamp.now(),
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: "Success",
|
|
382
|
+
key: `${prefix}-success`,
|
|
383
|
+
variant: "success",
|
|
384
|
+
message: "success",
|
|
385
|
+
time: TimeStamp.now(),
|
|
386
|
+
},
|
|
387
|
+
]);
|
|
388
|
+
|
|
389
|
+
const results = await client.statuses.retrieve({
|
|
390
|
+
keys: [`${prefix}-info`, `${prefix}-error`, `${prefix}-success`],
|
|
391
|
+
variants: ["info", "success"],
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
expect(results).toHaveLength(2);
|
|
395
|
+
const variants = results.map((s) => s.variant);
|
|
396
|
+
expect(variants).toContain("info");
|
|
397
|
+
expect(variants).toContain("success");
|
|
398
|
+
expect(variants).not.toContain("error");
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
it("should return empty when no statuses match variant", async () => {
|
|
402
|
+
const prefix = `variant-none-${Date.now()}`;
|
|
403
|
+
await client.statuses.set({
|
|
404
|
+
name: "Info Only",
|
|
405
|
+
key: `${prefix}-info`,
|
|
406
|
+
variant: "info",
|
|
407
|
+
message: "info",
|
|
408
|
+
time: TimeStamp.now(),
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
const results = await client.statuses.retrieve({
|
|
412
|
+
keys: [`${prefix}-info`],
|
|
413
|
+
variants: ["error"],
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
expect(results).toHaveLength(0);
|
|
417
|
+
});
|
|
418
|
+
});
|
|
419
|
+
|
|
325
420
|
describe("status variants", () => {
|
|
326
421
|
it("should support all status variants", async () => {
|
|
327
|
-
const variants:
|
|
422
|
+
const variants: xStatus.Variant[] = [
|
|
328
423
|
"success",
|
|
329
424
|
"info",
|
|
330
425
|
"warning",
|
package/src/table/client.ts
CHANGED
|
@@ -8,25 +8,19 @@
|
|
|
8
8
|
// included in the file licenses/APL.txt.
|
|
9
9
|
|
|
10
10
|
import { sendRequired, type UnaryClient } from "@synnaxlabs/freighter";
|
|
11
|
-
import { array,
|
|
11
|
+
import { array, caseconv, record } from "@synnaxlabs/x";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
type Key,
|
|
17
|
-
keyZ,
|
|
18
|
-
type New,
|
|
19
|
-
newZ,
|
|
20
|
-
type Params,
|
|
21
|
-
remoteZ,
|
|
22
|
-
type Table,
|
|
23
|
-
} from "@/table/payload";
|
|
14
|
+
import { type Key, keyZ, type New, newZ, type Table, tableZ } from "@/table/types.gen";
|
|
24
15
|
import { checkForMultipleOrNoResults } from "@/util/retrieve";
|
|
25
16
|
import { workspace } from "@/workspace";
|
|
26
17
|
|
|
27
18
|
const renameReqZ = z.object({ key: keyZ, name: z.string() });
|
|
28
19
|
|
|
29
|
-
const setDataReqZ = z.object({
|
|
20
|
+
const setDataReqZ = z.object({
|
|
21
|
+
key: keyZ,
|
|
22
|
+
data: caseconv.preserveCase(record.unknownZ()),
|
|
23
|
+
});
|
|
30
24
|
const deleteReqZ = z.object({ keys: keyZ.array() });
|
|
31
25
|
|
|
32
26
|
const retrieveReqZ = z.object({ keys: keyZ.array() });
|
|
@@ -39,10 +33,10 @@ export type RetrieveArgs = z.input<typeof retrieveArgsZ>;
|
|
|
39
33
|
export type RetrieveSingleParams = z.input<typeof singleRetrieveArgsZ>;
|
|
40
34
|
export type RetrieveMultipleParams = z.input<typeof retrieveReqZ>;
|
|
41
35
|
|
|
42
|
-
const retrieveResZ = z.object({ tables: array.
|
|
36
|
+
const retrieveResZ = z.object({ tables: array.nullishToEmpty(tableZ) });
|
|
43
37
|
|
|
44
38
|
const createReqZ = z.object({ workspace: workspace.keyZ, tables: newZ.array() });
|
|
45
|
-
const createResZ = z.object({ tables:
|
|
39
|
+
const createResZ = z.object({ tables: tableZ.array() });
|
|
46
40
|
|
|
47
41
|
const emptyResZ = z.object({});
|
|
48
42
|
|
|
@@ -84,7 +78,7 @@ export class Client {
|
|
|
84
78
|
await sendRequired(
|
|
85
79
|
this.client,
|
|
86
80
|
"/table/set-data",
|
|
87
|
-
{ key, data
|
|
81
|
+
{ key, data },
|
|
88
82
|
setDataReqZ,
|
|
89
83
|
emptyResZ,
|
|
90
84
|
);
|
|
@@ -107,7 +101,7 @@ export class Client {
|
|
|
107
101
|
return isSingle ? res.tables[0] : res.tables;
|
|
108
102
|
}
|
|
109
103
|
|
|
110
|
-
async delete(keys:
|
|
104
|
+
async delete(keys: Key | Key[]): Promise<void> {
|
|
111
105
|
await sendRequired(
|
|
112
106
|
this.client,
|
|
113
107
|
"/table/delete",
|
|
@@ -117,6 +111,3 @@ export class Client {
|
|
|
117
111
|
);
|
|
118
112
|
}
|
|
119
113
|
}
|
|
120
|
-
|
|
121
|
-
export const ontologyID = ontology.createIDFactory<Key>("table");
|
|
122
|
-
export const TYPE_ONTOLOGY_ID = ontologyID("");
|
package/src/table/external.ts
CHANGED
package/src/table/table.spec.ts
CHANGED
|
@@ -65,4 +65,42 @@ describe("Table", () => {
|
|
|
65
65
|
);
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
|
+
describe("case preservation", () => {
|
|
69
|
+
test("should preserve key casing in data field on create/retrieve cycle", async () => {
|
|
70
|
+
const ws = await client.workspaces.create({ name: "CaseTest", layout: {} });
|
|
71
|
+
const table = await client.tables.create(ws.key, {
|
|
72
|
+
name: "CaseTest",
|
|
73
|
+
data: {
|
|
74
|
+
camelCaseKey: "value1",
|
|
75
|
+
PascalCaseKey: "value2",
|
|
76
|
+
snake_case_key: "value3",
|
|
77
|
+
nested: {
|
|
78
|
+
innerCamelCase: 123,
|
|
79
|
+
InnerPascalCase: { deepKey: true },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const retrieved = await client.tables.retrieve({ key: table.key });
|
|
85
|
+
|
|
86
|
+
const data = retrieved.data as Record<string, unknown>;
|
|
87
|
+
expect(data.camelCaseKey).toEqual("value1");
|
|
88
|
+
expect(data.PascalCaseKey).toEqual("value2");
|
|
89
|
+
expect(data.snake_case_key).toEqual("value3");
|
|
90
|
+
expect((data.nested as Record<string, unknown>).innerCamelCase).toEqual(123);
|
|
91
|
+
expect(
|
|
92
|
+
(
|
|
93
|
+
(data.nested as Record<string, unknown>).InnerPascalCase as Record<
|
|
94
|
+
string,
|
|
95
|
+
unknown
|
|
96
|
+
>
|
|
97
|
+
).deepKey,
|
|
98
|
+
).toEqual(true);
|
|
99
|
+
expect(Object.keys(data)).toContain("camelCaseKey");
|
|
100
|
+
expect(Object.keys(data)).toContain("PascalCaseKey");
|
|
101
|
+
expect(Object.keys(data)).toContain("snake_case_key");
|
|
102
|
+
expect(Object.keys(data)).not.toContain("camel_case_key");
|
|
103
|
+
expect(Object.keys(data)).not.toContain("pascal_case_key");
|
|
104
|
+
});
|
|
105
|
+
});
|
|
68
106
|
});
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
// Code generated by Oracle. DO NOT EDIT.
|
|
11
|
+
|
|
12
|
+
import { caseconv, record } from "@synnaxlabs/x";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
|
|
15
|
+
import { ontology } from "@/ontology";
|
|
16
|
+
|
|
17
|
+
export const keyZ = z.uuid();
|
|
18
|
+
export type Key = z.infer<typeof keyZ>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Table is a tabular data display component for viewing structured telemetry
|
|
22
|
+
* data. Tables support multiple columns, channel data sources, and
|
|
23
|
+
* customizable formatting options.
|
|
24
|
+
*/
|
|
25
|
+
export const tableZ = z.object({
|
|
26
|
+
/** key is the unique identifier for this table. */
|
|
27
|
+
key: keyZ,
|
|
28
|
+
/** name is a human-readable name for the table. */
|
|
29
|
+
name: z.string(),
|
|
30
|
+
/**
|
|
31
|
+
* data is the table configuration including column definitions, channel
|
|
32
|
+
* references, and formatting options.
|
|
33
|
+
*/
|
|
34
|
+
data: caseconv.preserveCase(record.nullishToEmpty()),
|
|
35
|
+
});
|
|
36
|
+
export interface Table extends z.infer<typeof tableZ> {}
|
|
37
|
+
|
|
38
|
+
export const newZ = tableZ.partial({ key: true });
|
|
39
|
+
export interface New extends z.input<typeof newZ> {}
|
|
40
|
+
|
|
41
|
+
export const ontologyID = ontology.createIDFactory<Key>("table");
|
|
42
|
+
export const TYPE_ONTOLOGY_ID = ontologyID("");
|