@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synnaxlabs/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "The Synnax Client Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"synnax",
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"async-mutex": "^0.5.0",
|
|
28
28
|
"zod": "^4.3.6",
|
|
29
|
-
"@synnaxlabs/freighter": "^0.
|
|
30
|
-
"@synnaxlabs/x": "^0.
|
|
29
|
+
"@synnaxlabs/freighter": "^0.54.0",
|
|
30
|
+
"@synnaxlabs/x": "^0.54.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@vitest/coverage-v8": "^
|
|
34
|
-
"@types/node": "^25.
|
|
35
|
-
"eslint": "^
|
|
33
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
34
|
+
"@types/node": "^25.5.0",
|
|
35
|
+
"eslint": "^10.1.0",
|
|
36
36
|
"madge": "^8.0.0",
|
|
37
|
-
"typescript": "^
|
|
38
|
-
"vite": "^
|
|
39
|
-
"vitest": "^
|
|
37
|
+
"typescript": "^6.0.2",
|
|
38
|
+
"vite": "^8.0.3",
|
|
39
|
+
"vitest": "^4.1.2",
|
|
40
|
+
"@synnaxlabs/tsconfig": "^0.0.0",
|
|
40
41
|
"@synnaxlabs/eslint-config": "^0.0.0",
|
|
41
|
-
"@synnaxlabs/vite-plugin": "^0.0.0"
|
|
42
|
-
"@synnaxlabs/tsconfig": "^0.0.0"
|
|
42
|
+
"@synnaxlabs/vite-plugin": "^0.0.0"
|
|
43
43
|
},
|
|
44
44
|
"type": "module",
|
|
45
45
|
"types": "dist/src/index.d.ts",
|
|
@@ -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
|
+
// Exported as access for compatibility with policy generated types.
|
|
11
|
+
export * as access from "@/access/action/types.gen";
|
|
@@ -7,7 +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
|
+
// Code generated by Oracle. DO NOT EDIT.
|
|
11
|
+
|
|
10
12
|
import { z } from "zod";
|
|
11
13
|
|
|
12
|
-
export const
|
|
14
|
+
export const ACTIONS = ["create", "delete", "retrieve", "update"] as const;
|
|
15
|
+
export const actionZ = z.enum(ACTIONS);
|
|
13
16
|
export type Action = z.infer<typeof actionZ>;
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
import { describe, expect, it } from "vitest";
|
|
11
11
|
|
|
12
12
|
import { access } from "@/access";
|
|
13
|
-
import { type Policy } from "@/access/policy/payload";
|
|
14
13
|
import { type ontology } from "@/ontology";
|
|
15
14
|
|
|
16
15
|
const id = (type: ontology.ResourceType, key: string): ontology.ID => ({ type, key });
|
|
@@ -19,7 +18,7 @@ const policy = (
|
|
|
19
18
|
objects: ontology.ID[],
|
|
20
19
|
actions: access.Action[],
|
|
21
20
|
key = crypto.randomUUID(),
|
|
22
|
-
): Policy => ({ key, name: "test", objects, actions, internal: false });
|
|
21
|
+
): access.policy.Policy => ({ key, name: "test", objects, actions, internal: false });
|
|
23
22
|
|
|
24
23
|
describe("allowRequest", () => {
|
|
25
24
|
describe("single object", () => {
|
package/src/access/enforce.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
import { array } from "@synnaxlabs/x";
|
|
11
11
|
|
|
12
|
-
import { type Action } from "@/access/
|
|
13
|
-
import { type Policy } from "@/access/policy/
|
|
12
|
+
import { type Action } from "@/access/action/types.gen";
|
|
13
|
+
import { type Policy } from "@/access/policy/types.gen";
|
|
14
14
|
import { type ontology } from "@/ontology";
|
|
15
15
|
|
|
16
16
|
/**
|
package/src/access/external.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
// License, use of this software will be governed by the Apache License, Version 2.0,
|
|
8
8
|
// included in the file licenses/APL.txt.
|
|
9
9
|
|
|
10
|
+
export { type Action, ACTIONS, actionZ } from "@/access/action/types.gen";
|
|
10
11
|
export * from "@/access/client";
|
|
11
12
|
export * from "@/access/enforce";
|
|
12
|
-
export * from "@/access/payload";
|
|
13
13
|
export * from "@/access/policy";
|
|
14
14
|
export * from "@/access/role";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
newZ,
|
|
19
19
|
type Policy,
|
|
20
20
|
policyZ,
|
|
21
|
-
} from "@/access/policy/
|
|
21
|
+
} from "@/access/policy/types.gen";
|
|
22
22
|
import { ontology } from "@/ontology";
|
|
23
23
|
|
|
24
24
|
export const SET_CHANNEL_NAME = "sy_policy_set";
|
|
@@ -53,7 +53,7 @@ const retrieveArgsZ = z.union([keyRetrieveRequestZ, listRetrieveArgsZ]);
|
|
|
53
53
|
|
|
54
54
|
export type RetrieveArgs = z.input<typeof retrieveArgsZ>;
|
|
55
55
|
|
|
56
|
-
const retrieveResZ = z.object({ policies: array.
|
|
56
|
+
const retrieveResZ = z.object({ policies: array.nullishToEmpty(policyZ) });
|
|
57
57
|
|
|
58
58
|
const singleCreateArgsZ = newZ.transform((p) => ({ policies: [p] }));
|
|
59
59
|
export type SingleCreateArgs = z.input<typeof singleCreateArgsZ>;
|
|
@@ -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 { array } from "@synnaxlabs/x";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
|
|
15
|
+
import { access } from "@/access/action";
|
|
16
|
+
import { ontology } from "@/ontology";
|
|
17
|
+
|
|
18
|
+
export const keyZ = z.uuid();
|
|
19
|
+
export type Key = z.infer<typeof keyZ>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Policy is an access control policy that defines which actions are permitted on
|
|
23
|
+
* which resources. Policies are attached to roles, and roles are assigned
|
|
24
|
+
* to users via ontology relationships.
|
|
25
|
+
*/
|
|
26
|
+
export const policyZ = z.object({
|
|
27
|
+
/** key is the unique identifier for this policy. */
|
|
28
|
+
key: keyZ,
|
|
29
|
+
/** name is a human-readable name for the policy. */
|
|
30
|
+
name: z.string(),
|
|
31
|
+
/** objects is the list of ontology resources this policy applies to. */
|
|
32
|
+
objects: array.nullishToEmpty(ontology.idZ),
|
|
33
|
+
/** actions is the list of actions this policy permits. */
|
|
34
|
+
actions: array.nullishToEmpty(access.actionZ),
|
|
35
|
+
/** internal is true if this is a built-in system policy that cannot be deleted. */
|
|
36
|
+
internal: z.boolean().default(false).optional(),
|
|
37
|
+
});
|
|
38
|
+
export interface Policy extends z.infer<typeof policyZ> {}
|
|
39
|
+
|
|
40
|
+
export const newZ = policyZ.partial({ key: true });
|
|
41
|
+
export interface New extends z.input<typeof newZ> {}
|
|
42
|
+
|
|
43
|
+
export const ontologyID = ontology.createIDFactory<Key>("policy");
|
|
44
|
+
export const TYPE_ONTOLOGY_ID = ontologyID("");
|
|
@@ -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 { keyZ, type New, newZ, type Role, roleZ } from "@/access/role/
|
|
14
|
+
import { keyZ, type New, newZ, type Role, roleZ } from "@/access/role/types.gen";
|
|
15
15
|
import { user } from "@/user";
|
|
16
16
|
|
|
17
17
|
const retrieveRequestZ = z.object({
|
|
@@ -34,7 +34,7 @@ export const createArgsZ = z.union([singleCreateArgsZ, multipleCreateArgsZ]);
|
|
|
34
34
|
export type CreateArgs = z.input<typeof createArgsZ>;
|
|
35
35
|
|
|
36
36
|
const createResZ = z.object({ roles: roleZ.array() });
|
|
37
|
-
const retrieveResZ = z.object({ roles: array.
|
|
37
|
+
const retrieveResZ = z.object({ roles: array.nullishToEmpty(roleZ) });
|
|
38
38
|
|
|
39
39
|
export type RetrieveSingleParams = z.input<typeof keyRetrieveRequestZ>;
|
|
40
40
|
export type RetrieveMultipleParams = z.input<typeof retrieveRequestZ>;
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { z } from "zod";
|
|
13
|
+
|
|
14
|
+
import { ontology } from "@/ontology";
|
|
15
|
+
|
|
16
|
+
export const keyZ = z.uuid();
|
|
17
|
+
export type Key = z.infer<typeof keyZ>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Role is a named collection of policies that can be assigned to users, enabling
|
|
21
|
+
* group-based permission management. Roles define what actions users can
|
|
22
|
+
* perform on resources.
|
|
23
|
+
*/
|
|
24
|
+
export const roleZ = z.object({
|
|
25
|
+
/** key is the unique identifier for this role. */
|
|
26
|
+
key: keyZ,
|
|
27
|
+
/**
|
|
28
|
+
* name is a human-readable name for the role (e.g., 'Administrator',
|
|
29
|
+
* 'Engineer').
|
|
30
|
+
*/
|
|
31
|
+
name: z.string(),
|
|
32
|
+
/**
|
|
33
|
+
* description is an optional description explaining what permissions the role
|
|
34
|
+
* provides.
|
|
35
|
+
*/
|
|
36
|
+
description: z.string().optional(),
|
|
37
|
+
/** internal is true if this is a built-in system role that cannot be deleted. */
|
|
38
|
+
internal: z.boolean().optional(),
|
|
39
|
+
});
|
|
40
|
+
export interface Role extends z.infer<typeof roleZ> {}
|
|
41
|
+
|
|
42
|
+
export const newZ = roleZ.partial({ key: true });
|
|
43
|
+
export interface New extends z.input<typeof newZ> {}
|
|
44
|
+
|
|
45
|
+
export const ontologyID = ontology.createIDFactory<Key>("role");
|
|
46
|
+
export const TYPE_ONTOLOGY_ID = ontologyID("");
|
package/src/arc/access.spec.ts
CHANGED
|
@@ -26,12 +26,14 @@ describe("arc", () => {
|
|
|
26
26
|
});
|
|
27
27
|
const a: arc.New = {
|
|
28
28
|
name: "test",
|
|
29
|
+
mode: "text",
|
|
29
30
|
graph: {
|
|
30
31
|
nodes: [],
|
|
31
32
|
edges: [],
|
|
33
|
+
viewport: { position: { x: 0, y: 0 }, zoom: 1 },
|
|
34
|
+
functions: [],
|
|
32
35
|
},
|
|
33
36
|
text: { raw: "" },
|
|
34
|
-
version: "1.0.0",
|
|
35
37
|
};
|
|
36
38
|
const randomArc = await client.arcs.create(a);
|
|
37
39
|
await expect(userClient.arcs.retrieve({ key: randomArc.key })).rejects.toThrow(
|
|
@@ -47,12 +49,14 @@ describe("arc", () => {
|
|
|
47
49
|
});
|
|
48
50
|
const randomArc = await client.arcs.create({
|
|
49
51
|
name: "test",
|
|
52
|
+
mode: "text",
|
|
50
53
|
graph: {
|
|
51
54
|
nodes: [],
|
|
52
55
|
edges: [],
|
|
56
|
+
viewport: { position: { x: 0, y: 0 }, zoom: 1 },
|
|
57
|
+
functions: [],
|
|
53
58
|
},
|
|
54
59
|
text: { raw: "" },
|
|
55
|
-
version: "1.0.0",
|
|
56
60
|
});
|
|
57
61
|
const retrieved = await userClient.arcs.retrieve({ key: randomArc.key });
|
|
58
62
|
expect(retrieved.key).toBe(randomArc.key);
|
|
@@ -67,12 +71,14 @@ describe("arc", () => {
|
|
|
67
71
|
});
|
|
68
72
|
await userClient.arcs.create({
|
|
69
73
|
name: "test",
|
|
74
|
+
mode: "text",
|
|
70
75
|
graph: {
|
|
71
76
|
nodes: [],
|
|
72
77
|
edges: [],
|
|
78
|
+
viewport: { position: { x: 0, y: 0 }, zoom: 1 },
|
|
79
|
+
functions: [],
|
|
73
80
|
},
|
|
74
81
|
text: { raw: "" },
|
|
75
|
-
version: "1.0.0",
|
|
76
82
|
});
|
|
77
83
|
});
|
|
78
84
|
|
|
@@ -85,12 +91,14 @@ describe("arc", () => {
|
|
|
85
91
|
await expect(
|
|
86
92
|
userClient.arcs.create({
|
|
87
93
|
name: "test",
|
|
94
|
+
mode: "text",
|
|
88
95
|
graph: {
|
|
89
96
|
nodes: [],
|
|
90
97
|
edges: [],
|
|
98
|
+
viewport: { position: { x: 0, y: 0 }, zoom: 1 },
|
|
99
|
+
functions: [],
|
|
91
100
|
},
|
|
92
101
|
text: { raw: "" },
|
|
93
|
-
version: "1.0.0",
|
|
94
102
|
}),
|
|
95
103
|
).rejects.toThrow(AuthError);
|
|
96
104
|
});
|
|
@@ -103,12 +111,14 @@ describe("arc", () => {
|
|
|
103
111
|
});
|
|
104
112
|
const randomArc = await client.arcs.create({
|
|
105
113
|
name: "test",
|
|
114
|
+
mode: "text",
|
|
106
115
|
graph: {
|
|
107
116
|
nodes: [],
|
|
108
117
|
edges: [],
|
|
118
|
+
viewport: { position: { x: 0, y: 0 }, zoom: 1 },
|
|
119
|
+
functions: [],
|
|
109
120
|
},
|
|
110
121
|
text: { raw: "" },
|
|
111
|
-
version: "1.0.0",
|
|
112
122
|
});
|
|
113
123
|
await userClient.arcs.delete(randomArc.key);
|
|
114
124
|
await expect(userClient.arcs.retrieve({ key: randomArc.key })).rejects.toThrow(
|
|
@@ -124,12 +134,14 @@ describe("arc", () => {
|
|
|
124
134
|
});
|
|
125
135
|
const randomArc = await client.arcs.create({
|
|
126
136
|
name: "test",
|
|
137
|
+
mode: "text",
|
|
127
138
|
graph: {
|
|
128
139
|
nodes: [],
|
|
129
140
|
edges: [],
|
|
141
|
+
viewport: { position: { x: 0, y: 0 }, zoom: 1 },
|
|
142
|
+
functions: [],
|
|
130
143
|
},
|
|
131
144
|
text: { raw: "" },
|
|
132
|
-
version: "1.0.0",
|
|
133
145
|
});
|
|
134
146
|
await expect(userClient.arcs.delete(randomArc.key)).rejects.toThrow(AuthError);
|
|
135
147
|
});
|
package/src/arc/client.ts
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import { array } from "@synnaxlabs/x";
|
|
17
17
|
import { z } from "zod/v4";
|
|
18
18
|
|
|
19
|
-
import { type Arc, arcZ, keyZ, type New, newZ
|
|
19
|
+
import { type Arc, arcZ, type Key, keyZ, type New, newZ } from "@/arc/types.gen";
|
|
20
20
|
import { checkForMultipleOrNoResults } from "@/util/retrieve";
|
|
21
21
|
|
|
22
22
|
export const SET_CHANNEL_NAME = "sy_arc_set";
|
|
@@ -33,7 +33,7 @@ const retrieveReqZ = z.object({
|
|
|
33
33
|
const createReqZ = z.object({ arcs: newZ.array() });
|
|
34
34
|
const deleteReqZ = z.object({ keys: keyZ.array() });
|
|
35
35
|
|
|
36
|
-
const retrieveResZ = z.object({ arcs: array.
|
|
36
|
+
const retrieveResZ = z.object({ arcs: array.nullishToEmpty(arcZ) });
|
|
37
37
|
const createResZ = z.object({ arcs: arcZ.array() });
|
|
38
38
|
const emptyResZ = z.object({});
|
|
39
39
|
|
|
@@ -102,7 +102,7 @@ export class Client {
|
|
|
102
102
|
return isSingle ? res.arcs[0] : res.arcs;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
async delete(keys:
|
|
105
|
+
async delete(keys: Key | Key[]): Promise<void> {
|
|
106
106
|
await sendRequired(
|
|
107
107
|
this.client,
|
|
108
108
|
"/arc/delete",
|
|
@@ -7,9 +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
|
|
11
|
-
Open = 0,
|
|
12
|
-
Write = 1,
|
|
13
|
-
Commit = 2,
|
|
14
|
-
SetAuthority = 3,
|
|
15
|
-
}
|
|
10
|
+
export * as compiler from "@/arc/compiler/types.gen";
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { z } from "zod";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Output is compiled output from the Arc compiler including WebAssembly bytecode
|
|
16
|
+
* and memory layout.
|
|
17
|
+
*/
|
|
18
|
+
export const outputZ = z.object({
|
|
19
|
+
/** wasm is compiled WebAssembly bytecode for sandboxed execution. */
|
|
20
|
+
wasm: z.instanceof(Uint8Array),
|
|
21
|
+
/**
|
|
22
|
+
* outputMemoryBases contains memory base addresses for multi-output functions, mapping
|
|
23
|
+
* function keys to their base addresses.
|
|
24
|
+
*/
|
|
25
|
+
outputMemoryBases: z.record(z.string(), z.uint32()),
|
|
26
|
+
});
|
|
27
|
+
export interface Output extends z.infer<typeof outputZ> {}
|
package/src/arc/external.ts
CHANGED
|
@@ -8,4 +8,9 @@
|
|
|
8
8
|
// included in the file licenses/APL.txt.
|
|
9
9
|
|
|
10
10
|
export * from "@/arc/client";
|
|
11
|
-
export * from "@/arc/
|
|
11
|
+
export * from "@/arc/compiler";
|
|
12
|
+
export * from "@/arc/graph";
|
|
13
|
+
export * from "@/arc/ir";
|
|
14
|
+
export * from "@/arc/module";
|
|
15
|
+
export * from "@/arc/text";
|
|
16
|
+
export * from "@/arc/types.gen";
|
|
@@ -0,0 +1,10 @@
|
|
|
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 * as graph from "@/arc/graph/types.gen";
|
|
@@ -0,0 +1,59 @@
|
|
|
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, record, spatial } from "@synnaxlabs/x";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
|
|
15
|
+
import { ir } from "@/arc/ir";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Node is a visual node in the Arc graph editor representing a function
|
|
19
|
+
* instantiation with position data.
|
|
20
|
+
*/
|
|
21
|
+
export const nodeZ = z.object({
|
|
22
|
+
/** key is the unique identifier for this node instance. */
|
|
23
|
+
key: z.string(),
|
|
24
|
+
/** type is the function type being instantiated. */
|
|
25
|
+
type: z.string(),
|
|
26
|
+
/** config contains configuration parameter values as a JSON object. */
|
|
27
|
+
config: record.nullishToEmpty(),
|
|
28
|
+
/** position is the canvas position (x, y) for visual layout. */
|
|
29
|
+
position: spatial.xyZ,
|
|
30
|
+
});
|
|
31
|
+
export interface Node extends z.infer<typeof nodeZ> {}
|
|
32
|
+
|
|
33
|
+
/** Viewport is the camera state for viewing the Arc graph editor canvas. */
|
|
34
|
+
export const viewportZ = z.object({
|
|
35
|
+
/** position is the camera pan offset (x, y). */
|
|
36
|
+
position: spatial.xyZ,
|
|
37
|
+
/** zoom is the zoom level where 1.0 equals 100%. */
|
|
38
|
+
zoom: z.number(),
|
|
39
|
+
});
|
|
40
|
+
export interface Viewport extends z.infer<typeof viewportZ> {}
|
|
41
|
+
|
|
42
|
+
export const nodesZ = array.nullishToEmpty(nodeZ);
|
|
43
|
+
export type Nodes = z.infer<typeof nodesZ>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Graph is a visual dataflow graph representation combining IR elements with
|
|
47
|
+
* canvas layout for the Arc graph editor.
|
|
48
|
+
*/
|
|
49
|
+
export const graphZ = z.object({
|
|
50
|
+
/** viewport is the current camera state for the graph view. */
|
|
51
|
+
viewport: viewportZ,
|
|
52
|
+
/** functions contains function definitions available in this graph. */
|
|
53
|
+
functions: ir.functionsZ,
|
|
54
|
+
/** edges contains dataflow connections between node parameters. */
|
|
55
|
+
edges: ir.edgesZ,
|
|
56
|
+
/** nodes contains visual nodes with canvas positions. */
|
|
57
|
+
nodes: nodesZ,
|
|
58
|
+
});
|
|
59
|
+
export interface Graph extends z.infer<typeof graphZ> {}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 * as ir from "@/arc/ir/types.gen";
|
|
@@ -0,0 +1,166 @@
|
|
|
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, zod } from "@synnaxlabs/x";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
|
|
15
|
+
import { types } from "@/arc/types";
|
|
16
|
+
|
|
17
|
+
export enum EdgeKind {
|
|
18
|
+
unspecified = 0,
|
|
19
|
+
continuous = 1,
|
|
20
|
+
one_shot = 2,
|
|
21
|
+
}
|
|
22
|
+
export const edgeKindZ = z.enum(EdgeKind);
|
|
23
|
+
|
|
24
|
+
/** Handle is a reference to a specific parameter on a specific node in the dataflow graph. */
|
|
25
|
+
export const handleZ = z.object({
|
|
26
|
+
/** node is the node identifier. */
|
|
27
|
+
node: z.string(),
|
|
28
|
+
/** param is the parameter name (input or output). */
|
|
29
|
+
param: z.string(),
|
|
30
|
+
});
|
|
31
|
+
export interface Handle extends z.infer<typeof handleZ> {}
|
|
32
|
+
|
|
33
|
+
/** Body is raw function body source code with optional parsed AST. */
|
|
34
|
+
export const bodyZ = z.object({
|
|
35
|
+
/** raw is the raw source code text. */
|
|
36
|
+
raw: z.string(),
|
|
37
|
+
});
|
|
38
|
+
export interface Body extends z.infer<typeof bodyZ> {}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Node is a concrete instantiation of a function with typed parameters and
|
|
42
|
+
* configuration values.
|
|
43
|
+
*/
|
|
44
|
+
export const nodeZ = z.object({
|
|
45
|
+
/** key is the unique identifier for this node instance. */
|
|
46
|
+
key: z.string(),
|
|
47
|
+
/** type is the function type being instantiated. */
|
|
48
|
+
type: z.string(),
|
|
49
|
+
/** config contains configuration parameter values. */
|
|
50
|
+
config: types.paramsZ.optional(),
|
|
51
|
+
/** inputs contains input parameter type signatures. */
|
|
52
|
+
inputs: types.paramsZ.optional(),
|
|
53
|
+
/** outputs contains output parameter type signatures. */
|
|
54
|
+
outputs: types.paramsZ.optional(),
|
|
55
|
+
/** channels contains channel read/write mappings. */
|
|
56
|
+
channels: types.channelsZ.optional(),
|
|
57
|
+
});
|
|
58
|
+
export interface Node extends z.infer<typeof nodeZ> {}
|
|
59
|
+
|
|
60
|
+
/** Authorities holds the static authority declarations from an Arc program. */
|
|
61
|
+
export const authoritiesZ = z.object({
|
|
62
|
+
/** default is the default authority for all write channels not explicitly listed. */
|
|
63
|
+
default: zod.uint8.optional(),
|
|
64
|
+
/** channels maps channel keys to their specific authority values. */
|
|
65
|
+
channels: z.record(z.uint32(), zod.uint8).optional(),
|
|
66
|
+
});
|
|
67
|
+
export interface Authorities extends z.infer<typeof authoritiesZ> {}
|
|
68
|
+
|
|
69
|
+
export const stratumZ = array.nullishToEmpty(z.string());
|
|
70
|
+
export type Stratum = z.infer<typeof stratumZ>;
|
|
71
|
+
|
|
72
|
+
/** Edge is a dataflow connection between node parameters in the Arc graph. */
|
|
73
|
+
export const edgeZ = z.object({
|
|
74
|
+
/** source is the source node parameter producing data. */
|
|
75
|
+
source: handleZ,
|
|
76
|
+
/** target is the target node parameter consuming data. */
|
|
77
|
+
target: handleZ,
|
|
78
|
+
/** kind defines execution semantics for this connection. */
|
|
79
|
+
kind: edgeKindZ.optional(),
|
|
80
|
+
});
|
|
81
|
+
export interface Edge extends z.infer<typeof edgeZ> {}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Function is a function template definition with typed parameters, serving as a
|
|
85
|
+
* blueprint for node instantiation.
|
|
86
|
+
*/
|
|
87
|
+
export const functionZ = z.object({
|
|
88
|
+
/** key is the function identifier (template name). */
|
|
89
|
+
key: z.string(),
|
|
90
|
+
/** body is raw source code for user-defined functions. */
|
|
91
|
+
body: bodyZ.optional(),
|
|
92
|
+
/** config contains configuration parameter definitions. */
|
|
93
|
+
config: types.paramsZ.optional(),
|
|
94
|
+
/** inputs contains input parameter definitions. */
|
|
95
|
+
inputs: types.paramsZ.optional(),
|
|
96
|
+
/** outputs contains output parameter definitions. */
|
|
97
|
+
outputs: types.paramsZ.optional(),
|
|
98
|
+
/** channels contains channel read/write declarations. */
|
|
99
|
+
channels: types.channelsZ.optional(),
|
|
100
|
+
});
|
|
101
|
+
export interface Function extends z.infer<typeof functionZ> {}
|
|
102
|
+
|
|
103
|
+
export const nodesZ = array.nullishToEmpty(nodeZ);
|
|
104
|
+
export type Nodes = z.infer<typeof nodesZ>;
|
|
105
|
+
|
|
106
|
+
export const strataZ = array.nullishToEmpty(stratumZ);
|
|
107
|
+
export type Strata = z.infer<typeof strataZ>;
|
|
108
|
+
|
|
109
|
+
export const edgesZ = array.nullishToEmpty(edgeZ);
|
|
110
|
+
export type Edges = z.infer<typeof edgesZ>;
|
|
111
|
+
|
|
112
|
+
export const functionsZ = array.nullishToEmpty(functionZ);
|
|
113
|
+
export type Functions = z.infer<typeof functionsZ>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Stage is a stage in a sequence state machine, containing active nodes and their
|
|
117
|
+
* execution stratification.
|
|
118
|
+
*/
|
|
119
|
+
export const stageZ = z.object({
|
|
120
|
+
/** key is the stage identifier. */
|
|
121
|
+
key: z.string(),
|
|
122
|
+
/** nodes contains node keys active in this stage. */
|
|
123
|
+
nodes: array.nullishToEmpty(z.string()),
|
|
124
|
+
/** strata contains execution stratification for nodes in this stage. */
|
|
125
|
+
strata: strataZ,
|
|
126
|
+
});
|
|
127
|
+
export interface Stage extends z.infer<typeof stageZ> {}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Sequence is a state machine defining ordered stages of execution, where entry point
|
|
131
|
+
* is always the first stage.
|
|
132
|
+
*/
|
|
133
|
+
export const sequenceZ = z.object({
|
|
134
|
+
/** key is the sequence identifier. */
|
|
135
|
+
key: z.string(),
|
|
136
|
+
/** stages contains ordered stages in this sequence. */
|
|
137
|
+
stages: array.nullishToEmpty(stageZ),
|
|
138
|
+
});
|
|
139
|
+
export interface Sequence extends z.infer<typeof sequenceZ> {}
|
|
140
|
+
|
|
141
|
+
export const stagesZ = array.nullishToEmpty(stageZ);
|
|
142
|
+
export type Stages = z.infer<typeof stagesZ>;
|
|
143
|
+
|
|
144
|
+
export const sequencesZ = array.nullishToEmpty(sequenceZ);
|
|
145
|
+
export type Sequences = z.infer<typeof sequencesZ>;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* IR is the intermediate representation of an Arc program as a dataflow graph
|
|
149
|
+
* with stratified execution, bridging semantic analysis and WebAssembly
|
|
150
|
+
* compilation.
|
|
151
|
+
*/
|
|
152
|
+
export const irZ = z.object({
|
|
153
|
+
/** functions contains function template definitions. */
|
|
154
|
+
functions: functionsZ.optional(),
|
|
155
|
+
/** nodes contains node instantiations. */
|
|
156
|
+
nodes: nodesZ.optional(),
|
|
157
|
+
/** edges contains dataflow connections. */
|
|
158
|
+
edges: edgesZ.optional(),
|
|
159
|
+
/** strata contains execution stratification layers. */
|
|
160
|
+
strata: strataZ.optional(),
|
|
161
|
+
/** sequences contains state machine definitions. */
|
|
162
|
+
sequences: sequencesZ.optional(),
|
|
163
|
+
/** authorities contains the static authority declarations for this program. */
|
|
164
|
+
authorities: authoritiesZ.optional(),
|
|
165
|
+
});
|
|
166
|
+
export interface IR extends z.infer<typeof irZ> {}
|