@synnaxlabs/client 0.2.0 → 0.13.5
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/.eslintrc.cjs +18 -0
- package/.pytest_cache/README.md +8 -0
- package/.turbo/turbo-build.log +16 -0
- package/LICENSE +4 -21
- package/{build/main/lib → dist/auth}/auth.d.ts +16 -19
- package/dist/auth/index.d.ts +1 -0
- package/dist/cdc/external.d.ts +1 -0
- package/dist/cdc/index.d.ts +1 -0
- package/dist/cdc/observable.d.ts +17 -0
- package/dist/channel/client.d.ts +58 -0
- package/dist/channel/creator.d.ts +8 -0
- package/dist/channel/external.d.ts +4 -0
- package/dist/channel/index.d.ts +1 -0
- package/dist/channel/payload.d.ts +63 -0
- package/dist/channel/retriever.d.ts +49 -0
- package/dist/client.cjs.js +23050 -0
- package/dist/client.cjs.js.map +1 -0
- package/dist/client.d.ts +73 -0
- package/dist/client.es.js +23050 -0
- package/dist/client.es.js.map +1 -0
- package/dist/connection/checker.d.ts +66 -0
- package/dist/connection/index.d.ts +1 -0
- package/dist/control/authority.d.ts +6 -0
- package/dist/control/external.d.ts +2 -0
- package/dist/control/index.d.ts +1 -0
- package/dist/control/state.d.ts +81 -0
- package/{build/main/lib → dist}/errors.d.ts +6 -3
- package/dist/framer/adapter.d.ts +21 -0
- package/dist/framer/client.d.ts +44 -0
- package/dist/framer/external.d.ts +5 -0
- package/dist/framer/frame.d.ts +251 -0
- package/dist/framer/index.d.ts +1 -0
- package/{build/module/lib/segment → dist/framer}/iterator.d.ts +32 -64
- package/dist/framer/streamProxy.d.ts +12 -0
- package/dist/framer/streamer.d.ts +17 -0
- package/dist/framer/writer.d.ts +257 -0
- package/dist/index.d.ts +16 -0
- package/dist/label/client.d.ts +25 -0
- package/dist/label/external.d.ts +4 -0
- package/dist/label/index.d.ts +1 -0
- package/dist/label/payload.d.ts +20 -0
- package/dist/label/retriever.d.ts +13 -0
- package/dist/label/writer.d.ts +26 -0
- package/dist/ontology/cdc.d.ts +25 -0
- package/dist/ontology/client.d.ts +25 -0
- package/dist/ontology/external.d.ts +3 -0
- package/dist/ontology/group/client.d.ts +11 -0
- package/dist/ontology/group/external.d.ts +2 -0
- package/dist/ontology/group/group.d.ts +7 -0
- package/dist/ontology/group/index.d.ts +1 -0
- package/dist/ontology/group/payload.d.ts +40 -0
- package/dist/ontology/group/writer.d.ts +13 -0
- package/dist/ontology/index.d.ts +1 -0
- package/dist/ontology/ontology.spec.d.ts +1 -0
- package/dist/ontology/payload.d.ts +235 -0
- package/dist/ontology/retriever.d.ts +12 -0
- package/dist/ontology/signals.d.ts +25 -0
- package/dist/ontology/writer.d.ts +9 -0
- package/dist/ranger/active.d.ts +9 -0
- package/dist/ranger/alias.d.ts +32 -0
- package/dist/ranger/client.d.ts +31 -0
- package/dist/ranger/external.d.ts +6 -0
- package/dist/ranger/index.d.ts +1 -0
- package/dist/ranger/kv.d.ts +50 -0
- package/dist/ranger/payload.d.ts +94 -0
- package/dist/ranger/range.d.ts +29 -0
- package/dist/ranger/ranger.spec.d.ts +1 -0
- package/dist/ranger/retriever.d.ts +10 -0
- package/dist/ranger/writer.d.ts +9 -0
- package/{build/main → dist}/setupspecs.d.ts +2 -2
- package/dist/signals/external.d.ts +1 -0
- package/dist/signals/index.d.ts +1 -0
- package/dist/signals/observable.d.ts +17 -0
- package/dist/transport.d.ts +10 -0
- package/dist/user/index.d.ts +1 -0
- package/{build/main/lib → dist}/user/payload.d.ts +3 -3
- package/dist/util/telem.d.ts +2 -0
- package/dist/workspace/client.d.ts +22 -0
- package/dist/workspace/external.d.ts +2 -0
- package/dist/workspace/index.d.ts +1 -0
- package/dist/workspace/lineplot/client.d.ts +15 -0
- package/dist/workspace/lineplot/external.d.ts +2 -0
- package/dist/workspace/lineplot/index.d.ts +1 -0
- package/dist/workspace/lineplot/linePlot.spec.d.ts +1 -0
- package/dist/workspace/lineplot/payload.d.ts +31 -0
- package/dist/workspace/lineplot/retriever.d.ts +9 -0
- package/dist/workspace/lineplot/writer.d.ts +39 -0
- package/dist/workspace/payload.d.ts +31 -0
- package/dist/workspace/pid/client.d.ts +16 -0
- package/dist/workspace/pid/external.d.ts +2 -0
- package/dist/workspace/pid/index.d.ts +1 -0
- package/dist/workspace/pid/payload.d.ts +37 -0
- package/dist/workspace/pid/pid.spec.d.ts +1 -0
- package/dist/workspace/pid/retriever.d.ts +9 -0
- package/dist/workspace/pid/writer.d.ts +46 -0
- package/dist/workspace/retriever.d.ts +12 -0
- package/dist/workspace/workspace.spec.d.ts +1 -0
- package/dist/workspace/writer.d.ts +55 -0
- package/package.json +27 -98
- package/src/auth/auth.spec.ts +46 -0
- package/src/auth/auth.ts +83 -0
- package/src/auth/index.ts +10 -0
- package/src/cdc/external.ts +10 -0
- package/src/cdc/index.ts +10 -0
- package/src/cdc/observable.ts +80 -0
- package/src/channel/channel.spec.ts +82 -0
- package/src/channel/client.ts +209 -0
- package/src/channel/creator.ts +43 -0
- package/src/channel/external.ts +13 -0
- package/src/channel/index.ts +10 -0
- package/src/channel/payload.ts +52 -0
- package/src/channel/retriever.ts +160 -0
- package/src/client.ts +112 -0
- package/src/connection/checker.ts +104 -0
- package/src/connection/connection.spec.ts +35 -0
- package/src/connection/index.ts +10 -0
- package/src/control/authority.ts +25 -0
- package/src/control/external.ts +11 -0
- package/src/control/index.ts +10 -0
- package/src/control/state.spec.ts +24 -0
- package/src/control/state.ts +117 -0
- package/src/errors.ts +153 -0
- package/src/framer/adapter.ts +116 -0
- package/src/framer/client.ts +116 -0
- package/src/framer/external.ts +14 -0
- package/src/framer/frame.spec.ts +317 -0
- package/src/framer/frame.ts +412 -0
- package/src/framer/index.ts +10 -0
- package/src/framer/iterator.spec.ts +62 -0
- package/src/framer/iterator.ts +240 -0
- package/src/framer/streamProxy.ts +59 -0
- package/src/framer/streamer.spec.ts +42 -0
- package/src/framer/streamer.ts +86 -0
- package/src/framer/writer.spec.ts +52 -0
- package/src/framer/writer.ts +236 -0
- package/src/index.ts +43 -4
- package/src/ontology/cdc.ts +135 -0
- package/src/ontology/client.ts +103 -0
- package/src/ontology/external.ts +12 -0
- package/src/ontology/group/client.ts +40 -0
- package/src/ontology/group/external.ts +11 -0
- package/src/ontology/group/group.spec.ts +46 -0
- package/src/ontology/group/group.ts +27 -0
- package/src/ontology/group/index.ts +10 -0
- package/src/ontology/group/payload.ts +65 -0
- package/src/ontology/group/writer.ts +48 -0
- package/src/ontology/index.ts +10 -0
- package/src/ontology/ontology.spec.ts +114 -0
- package/src/ontology/payload.ts +121 -0
- package/src/ontology/retriever.ts +91 -0
- package/src/ontology/writer.ts +49 -0
- package/src/ranger/active.ts +56 -0
- package/src/ranger/alias.ts +183 -0
- package/src/ranger/client.ts +124 -0
- package/src/ranger/external.ts +15 -0
- package/src/ranger/index.ts +10 -0
- package/src/ranger/kv.ts +91 -0
- package/src/ranger/payload.ts +70 -0
- package/src/ranger/range.ts +74 -0
- package/src/ranger/ranger.spec.ts +167 -0
- package/src/ranger/retriever.ts +50 -0
- package/src/ranger/writer.ts +80 -0
- package/src/setupspecs.ts +14 -5
- package/src/transport.ts +39 -0
- package/src/user/index.ts +10 -0
- package/src/user/payload.ts +17 -0
- package/src/util/telem.ts +19 -0
- package/src/vite-env.d.ts +11 -0
- package/src/workspace/client.ts +75 -0
- package/src/workspace/external.ts +11 -0
- package/src/workspace/index.ts +10 -0
- package/src/workspace/lineplot/client.ts +51 -0
- package/src/workspace/lineplot/external.ts +11 -0
- package/src/workspace/lineplot/index.ts +10 -0
- package/src/workspace/lineplot/linePlot.spec.ts +78 -0
- package/src/workspace/lineplot/payload.ts +29 -0
- package/src/workspace/lineplot/retriever.ts +49 -0
- package/src/workspace/lineplot/writer.ts +109 -0
- package/src/workspace/payload.ts +29 -0
- package/src/workspace/pid/client.ts +55 -0
- package/src/workspace/pid/external.ts +11 -0
- package/src/workspace/pid/index.ts +10 -0
- package/src/workspace/pid/payload.ts +31 -0
- package/src/workspace/pid/pid.spec.ts +111 -0
- package/src/workspace/pid/retriever.ts +45 -0
- package/src/workspace/pid/writer.ts +130 -0
- package/src/workspace/retriever.ts +67 -0
- package/src/workspace/workspace.spec.ts +62 -0
- package/src/workspace/writer.ts +103 -0
- package/tsconfig.json +3 -43
- package/tsconfig.vite.json +4 -0
- package/vite.config.ts +25 -0
- package/.DS_Store +0 -0
- package/.editorconfig +0 -15
- package/.eslintrc.json +0 -33
- package/.gitignore +0 -9
- package/.nyc_output/20720f2d-6abe-420f-a3c5-304d52d60827.json +0 -1
- package/.nyc_output/4725921c-6f1b-4ae9-9819-e455f702d31c.json +0 -1
- package/.nyc_output/47478588-5ffd-4332-873c-facaa4a2fc38.json +0 -1
- package/.nyc_output/48180641-e0b2-49ab-a6eb-e7910e9eac2f.json +0 -1
- package/.nyc_output/cb0abf31-740f-47db-b94a-8e3f8f117cb8.json +0 -1
- package/.nyc_output/fc77fce2-dad0-49a8-8d4b-0a9014ecf8c5.json +0 -1
- package/.nyc_output/processinfo/20720f2d-6abe-420f-a3c5-304d52d60827.json +0 -1
- package/.nyc_output/processinfo/4725921c-6f1b-4ae9-9819-e455f702d31c.json +0 -1
- package/.nyc_output/processinfo/47478588-5ffd-4332-873c-facaa4a2fc38.json +0 -1
- package/.nyc_output/processinfo/48180641-e0b2-49ab-a6eb-e7910e9eac2f.json +0 -1
- package/.nyc_output/processinfo/cb0abf31-740f-47db-b94a-8e3f8f117cb8.json +0 -1
- package/.nyc_output/processinfo/fc77fce2-dad0-49a8-8d4b-0a9014ecf8c5.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/.prettierignore +0 -2
- package/CHANGELOG.md +0 -5
- package/build/main/index.d.ts +0 -4
- package/build/main/index.js +0 -35
- package/build/main/lib/auth.js +0 -62
- package/build/main/lib/auth.spec.js +0 -39
- package/build/main/lib/channel/channel.spec.js +0 -49
- package/build/main/lib/channel/client.d.ts +0 -94
- package/build/main/lib/channel/client.js +0 -134
- package/build/main/lib/channel/creator.d.ts +0 -19
- package/build/main/lib/channel/creator.js +0 -44
- package/build/main/lib/channel/payload.d.ts +0 -25
- package/build/main/lib/channel/payload.js +0 -18
- package/build/main/lib/channel/registry.d.ts +0 -9
- package/build/main/lib/channel/registry.js +0 -37
- package/build/main/lib/channel/retriever.d.ts +0 -11
- package/build/main/lib/channel/retriever.js +0 -39
- package/build/main/lib/client.d.ts +0 -30
- package/build/main/lib/client.js +0 -46
- package/build/main/lib/errors.js +0 -122
- package/build/main/lib/segment/client.d.ts +0 -62
- package/build/main/lib/segment/client.js +0 -95
- package/build/main/lib/segment/iterator.d.ts +0 -134
- package/build/main/lib/segment/iterator.js +0 -253
- package/build/main/lib/segment/iterator.spec.js +0 -73
- package/build/main/lib/segment/payload.d.ts +0 -16
- package/build/main/lib/segment/payload.js +0 -13
- package/build/main/lib/segment/splitter.d.ts +0 -7
- package/build/main/lib/segment/splitter.js +0 -25
- package/build/main/lib/segment/typed.d.ts +0 -15
- package/build/main/lib/segment/typed.js +0 -49
- package/build/main/lib/segment/validator.d.ts +0 -22
- package/build/main/lib/segment/validator.js +0 -64
- package/build/main/lib/segment/writer.d.ts +0 -98
- package/build/main/lib/segment/writer.js +0 -183
- package/build/main/lib/segment/writer.spec.js +0 -90
- package/build/main/lib/telem.d.ts +0 -395
- package/build/main/lib/telem.js +0 -553
- package/build/main/lib/telem.spec.js +0 -152
- package/build/main/lib/transport.d.ts +0 -10
- package/build/main/lib/transport.js +0 -22
- package/build/main/lib/user/payload.js +0 -9
- package/build/main/lib/util/telem.d.ts +0 -2
- package/build/main/lib/util/telem.js +0 -13
- package/build/main/setupspecs.js +0 -17
- package/build/module/index.d.ts +0 -4
- package/build/module/index.js +0 -5
- package/build/module/lib/auth.d.ts +0 -54
- package/build/module/lib/auth.js +0 -63
- package/build/module/lib/auth.spec.js +0 -34
- package/build/module/lib/channel/channel.spec.js +0 -44
- package/build/module/lib/channel/client.d.ts +0 -94
- package/build/module/lib/channel/client.js +0 -134
- package/build/module/lib/channel/creator.d.ts +0 -19
- package/build/module/lib/channel/creator.js +0 -42
- package/build/module/lib/channel/payload.d.ts +0 -25
- package/build/module/lib/channel/payload.js +0 -15
- package/build/module/lib/channel/registry.d.ts +0 -9
- package/build/module/lib/channel/registry.js +0 -36
- package/build/module/lib/channel/retriever.d.ts +0 -11
- package/build/module/lib/channel/retriever.js +0 -37
- package/build/module/lib/client.d.ts +0 -30
- package/build/module/lib/client.js +0 -44
- package/build/module/lib/errors.d.ts +0 -53
- package/build/module/lib/errors.js +0 -113
- package/build/module/lib/segment/client.d.ts +0 -62
- package/build/module/lib/segment/client.js +0 -94
- package/build/module/lib/segment/iterator.js +0 -248
- package/build/module/lib/segment/iterator.spec.js +0 -68
- package/build/module/lib/segment/payload.d.ts +0 -16
- package/build/module/lib/segment/payload.js +0 -10
- package/build/module/lib/segment/splitter.d.ts +0 -7
- package/build/module/lib/segment/splitter.js +0 -26
- package/build/module/lib/segment/typed.d.ts +0 -15
- package/build/module/lib/segment/typed.js +0 -49
- package/build/module/lib/segment/validator.d.ts +0 -22
- package/build/module/lib/segment/validator.js +0 -60
- package/build/module/lib/segment/writer.d.ts +0 -98
- package/build/module/lib/segment/writer.js +0 -183
- package/build/module/lib/segment/writer.spec.js +0 -85
- package/build/module/lib/telem.d.ts +0 -395
- package/build/module/lib/telem.js +0 -545
- package/build/module/lib/telem.spec.js +0 -147
- package/build/module/lib/transport.d.ts +0 -10
- package/build/module/lib/transport.js +0 -22
- package/build/module/lib/user/payload.d.ts +0 -12
- package/build/module/lib/user/payload.js +0 -6
- package/build/module/lib/util/telem.d.ts +0 -2
- package/build/module/lib/util/telem.js +0 -9
- package/build/module/setupspecs.d.ts +0 -4
- package/build/module/setupspecs.js +0 -16
- package/build/tsconfig.module.tsbuildinfo +0 -1
- package/build/tsconfig.tsbuildinfo +0 -1
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -191
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -191
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/lib/auth.ts.html +0 -340
- package/coverage/lcov-report/src/lib/channel/client.ts.html +0 -604
- package/coverage/lcov-report/src/lib/channel/creator.ts.html +0 -304
- package/coverage/lcov-report/src/lib/channel/index.html +0 -176
- package/coverage/lcov-report/src/lib/channel/payload.ts.html +0 -139
- package/coverage/lcov-report/src/lib/channel/registry.ts.html +0 -202
- package/coverage/lcov-report/src/lib/channel/retriever.ts.html +0 -244
- package/coverage/lcov-report/src/lib/client.ts.html +0 -244
- package/coverage/lcov-report/src/lib/errors.ts.html +0 -484
- package/coverage/lcov-report/src/lib/index.html +0 -176
- package/coverage/lcov-report/src/lib/segment/client.ts.html +0 -463
- package/coverage/lcov-report/src/lib/segment/index.html +0 -206
- package/coverage/lcov-report/src/lib/segment/iterator.ts.html +0 -928
- package/coverage/lcov-report/src/lib/segment/payload.ts.html +0 -139
- package/coverage/lcov-report/src/lib/segment/splitter.ts.html +0 -181
- package/coverage/lcov-report/src/lib/segment/typed.ts.html +0 -307
- package/coverage/lcov-report/src/lib/segment/validator.ts.html +0 -331
- package/coverage/lcov-report/src/lib/segment/writer.ts.html +0 -727
- package/coverage/lcov-report/src/lib/telem.ts.html +0 -2056
- package/coverage/lcov-report/src/lib/transport.ts.html +0 -196
- package/coverage/lcov-report/src/lib/user/index.html +0 -116
- package/coverage/lcov-report/src/lib/user/payload.ts.html +0 -109
- package/coverage/lcov-report/src/lib/util/index.html +0 -116
- package/coverage/lcov-report/src/lib/util/telem.ts.html +0 -124
- package/coverage/lcov-report/src/setupspecs.ts.html +0 -133
- package/coverage/lcov.info +0 -1230
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/src/index.html +0 -116
- package/coverage/src/lib/auth.ts.html +0 -340
- package/coverage/src/lib/channel/client.ts.html +0 -604
- package/coverage/src/lib/channel/creator.ts.html +0 -304
- package/coverage/src/lib/channel/index.html +0 -176
- package/coverage/src/lib/channel/payload.ts.html +0 -139
- package/coverage/src/lib/channel/registry.ts.html +0 -202
- package/coverage/src/lib/channel/retriever.ts.html +0 -244
- package/coverage/src/lib/client.ts.html +0 -244
- package/coverage/src/lib/errors.ts.html +0 -484
- package/coverage/src/lib/index.html +0 -176
- package/coverage/src/lib/segment/client.ts.html +0 -463
- package/coverage/src/lib/segment/index.html +0 -206
- package/coverage/src/lib/segment/iterator.ts.html +0 -928
- package/coverage/src/lib/segment/payload.ts.html +0 -139
- package/coverage/src/lib/segment/splitter.ts.html +0 -181
- package/coverage/src/lib/segment/typed.ts.html +0 -307
- package/coverage/src/lib/segment/validator.ts.html +0 -331
- package/coverage/src/lib/segment/writer.ts.html +0 -727
- package/coverage/src/lib/telem.ts.html +0 -2056
- package/coverage/src/lib/transport.ts.html +0 -196
- package/coverage/src/lib/user/index.html +0 -116
- package/coverage/src/lib/user/payload.ts.html +0 -109
- package/coverage/src/lib/util/index.html +0 -116
- package/coverage/src/lib/util/telem.ts.html +0 -124
- package/coverage/src/setupspecs.ts.html +0 -133
- package/src/lib/.DS_Store +0 -0
- package/src/lib/auth.spec.ts +0 -36
- package/src/lib/auth.ts +0 -85
- package/src/lib/channel/channel.spec.ts +0 -49
- package/src/lib/channel/client.ts +0 -173
- package/src/lib/channel/creator.ts +0 -73
- package/src/lib/channel/payload.ts +0 -18
- package/src/lib/channel/registry.ts +0 -39
- package/src/lib/channel/retriever.ts +0 -53
- package/src/lib/client.ts +0 -53
- package/src/lib/errors.ts +0 -133
- package/src/lib/segment/client.ts +0 -126
- package/src/lib/segment/iterator.spec.ts +0 -78
- package/src/lib/segment/iterator.ts +0 -281
- package/src/lib/segment/payload.ts +0 -18
- package/src/lib/segment/splitter.ts +0 -32
- package/src/lib/segment/typed.ts +0 -74
- package/src/lib/segment/validator.ts +0 -82
- package/src/lib/segment/writer.spec.ts +0 -85
- package/src/lib/segment/writer.ts +0 -214
- package/src/lib/telem.spec.ts +0 -200
- package/src/lib/telem.ts +0 -657
- package/src/lib/transport.ts +0 -37
- package/src/lib/user/payload.ts +0 -8
- package/src/lib/util/telem.ts +0 -13
- package/tsconfig.module.json +0 -9
- package/yarn-error.log +0 -5756
- package/yarn.lock +0 -5936
- /package/{build/main/lib → dist/auth}/auth.spec.d.ts +0 -0
- /package/{build/main/lib → dist}/channel/channel.spec.d.ts +0 -0
- /package/{build/main/lib/segment/iterator.spec.d.ts → dist/connection/connection.spec.d.ts} +0 -0
- /package/{build/main/lib/segment/writer.spec.d.ts → dist/control/state.spec.d.ts} +0 -0
- /package/{build/main/lib/telem.spec.d.ts → dist/framer/frame.spec.d.ts} +0 -0
- /package/{build/module/lib/segment → dist/framer}/iterator.spec.d.ts +0 -0
- /package/{build/module/lib/auth.spec.d.ts → dist/framer/streamer.spec.d.ts} +0 -0
- /package/{build/module/lib/segment → dist/framer}/writer.spec.d.ts +0 -0
- /package/{build/module/lib/channel/channel.spec.d.ts → dist/label/label.spec.d.ts} +0 -0
- /package/{build/module/lib/telem.spec.d.ts → dist/ontology/group/group.spec.d.ts} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const keyZ: z.ZodString;
|
|
3
|
+
export type Key = z.infer<typeof keyZ>;
|
|
4
|
+
export type Name = string;
|
|
5
|
+
export type Keys = Key[];
|
|
6
|
+
export type Names = Name[];
|
|
7
|
+
export type Params = Key | Name | Keys | Names;
|
|
8
|
+
export declare const payloadZ: z.ZodObject<{
|
|
9
|
+
key: z.ZodString;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
name: string;
|
|
13
|
+
key: string;
|
|
14
|
+
}, {
|
|
15
|
+
name: string;
|
|
16
|
+
key: string;
|
|
17
|
+
}>;
|
|
18
|
+
export type Payload = z.infer<typeof payloadZ>;
|
|
19
|
+
export type ParamAnalysisResult = {
|
|
20
|
+
single: true;
|
|
21
|
+
variant: "keys";
|
|
22
|
+
normalized: Keys;
|
|
23
|
+
actual: Key;
|
|
24
|
+
} | {
|
|
25
|
+
single: true;
|
|
26
|
+
variant: "names";
|
|
27
|
+
normalized: Names;
|
|
28
|
+
actual: Name;
|
|
29
|
+
} | {
|
|
30
|
+
single: false;
|
|
31
|
+
variant: "keys";
|
|
32
|
+
normalized: Keys;
|
|
33
|
+
actual: Keys;
|
|
34
|
+
} | {
|
|
35
|
+
single: false;
|
|
36
|
+
variant: "names";
|
|
37
|
+
normalized: Names;
|
|
38
|
+
actual: Names;
|
|
39
|
+
};
|
|
40
|
+
export declare const analyzeParams: (params: Params) => ParamAnalysisResult;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { type Payload } from '../../ontology/group/payload';
|
|
3
|
+
import { type ID } from '../../ontology/payload';
|
|
4
|
+
export declare class Writer {
|
|
5
|
+
private static readonly ENDPOINT;
|
|
6
|
+
private static readonly ENDPOINT_RENAME;
|
|
7
|
+
private static readonly ENDPOINT_DELETE;
|
|
8
|
+
client: UnaryClient;
|
|
9
|
+
constructor(client: UnaryClient);
|
|
10
|
+
create(parent: ID, name: string): Promise<Payload>;
|
|
11
|
+
rename(key: string, name: string): Promise<void>;
|
|
12
|
+
delete(keys: string[]): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as ontology from '../ontology/external';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const resourceTypeZ: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">]>;
|
|
3
|
+
export type ResourceType = z.infer<typeof resourceTypeZ>;
|
|
4
|
+
export declare const idZ: z.ZodObject<{
|
|
5
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">]>;
|
|
6
|
+
key: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
key: string;
|
|
9
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
10
|
+
}, {
|
|
11
|
+
key: string;
|
|
12
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
13
|
+
}>;
|
|
14
|
+
export declare const stringIDZ: z.ZodEffects<z.ZodString, {
|
|
15
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
16
|
+
key: string;
|
|
17
|
+
}, string>;
|
|
18
|
+
export declare const crudeIDZ: z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
19
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
20
|
+
key: string;
|
|
21
|
+
}, string>, z.ZodObject<{
|
|
22
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">]>;
|
|
23
|
+
key: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
key: string;
|
|
26
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
27
|
+
}, {
|
|
28
|
+
key: string;
|
|
29
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
30
|
+
}>]>;
|
|
31
|
+
export declare class ID {
|
|
32
|
+
type: ResourceType;
|
|
33
|
+
key: string;
|
|
34
|
+
constructor(args: z.input<typeof crudeIDZ> | ID);
|
|
35
|
+
toString(): string;
|
|
36
|
+
get payload(): z.infer<typeof idZ>;
|
|
37
|
+
static readonly z: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
38
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
39
|
+
key: string;
|
|
40
|
+
}, string>, z.ZodObject<{
|
|
41
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">]>;
|
|
42
|
+
key: z.ZodString;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
key: string;
|
|
45
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
46
|
+
}, {
|
|
47
|
+
key: string;
|
|
48
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
49
|
+
}>]>, z.ZodType<ID, z.ZodTypeDef, ID>]>, ID, string | ID | {
|
|
50
|
+
key: string;
|
|
51
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
export declare const Root: ID;
|
|
55
|
+
export declare const schemaFieldZ: z.ZodObject<{
|
|
56
|
+
type: z.ZodNumber;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
type: number;
|
|
59
|
+
}, {
|
|
60
|
+
type: number;
|
|
61
|
+
}>;
|
|
62
|
+
export type SchemaField = z.infer<typeof schemaFieldZ>;
|
|
63
|
+
export declare const schemaZ: z.ZodObject<{
|
|
64
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">]>;
|
|
65
|
+
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
66
|
+
type: z.ZodNumber;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
type: number;
|
|
69
|
+
}, {
|
|
70
|
+
type: number;
|
|
71
|
+
}>>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
74
|
+
fields: Record<string, {
|
|
75
|
+
type: number;
|
|
76
|
+
}>;
|
|
77
|
+
}, {
|
|
78
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
79
|
+
fields: Record<string, {
|
|
80
|
+
type: number;
|
|
81
|
+
}>;
|
|
82
|
+
}>;
|
|
83
|
+
export type Schema = z.infer<typeof schemaZ>;
|
|
84
|
+
export declare const resourceSchemaZ: z.ZodEffects<z.ZodObject<{
|
|
85
|
+
id: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
86
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
87
|
+
key: string;
|
|
88
|
+
}, string>, z.ZodObject<{
|
|
89
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">]>;
|
|
90
|
+
key: z.ZodString;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
key: string;
|
|
93
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
94
|
+
}, {
|
|
95
|
+
key: string;
|
|
96
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
97
|
+
}>]>, z.ZodType<ID, z.ZodTypeDef, ID>]>, ID, string | ID | {
|
|
98
|
+
key: string;
|
|
99
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
100
|
+
}>;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
schema: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">]>;
|
|
104
|
+
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
105
|
+
type: z.ZodNumber;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
type: number;
|
|
108
|
+
}, {
|
|
109
|
+
type: number;
|
|
110
|
+
}>>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
113
|
+
fields: Record<string, {
|
|
114
|
+
type: number;
|
|
115
|
+
}>;
|
|
116
|
+
}, {
|
|
117
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
118
|
+
fields: Record<string, {
|
|
119
|
+
type: number;
|
|
120
|
+
}>;
|
|
121
|
+
}>>;
|
|
122
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
name: string;
|
|
125
|
+
id: ID;
|
|
126
|
+
schema?: {
|
|
127
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
128
|
+
fields: Record<string, {
|
|
129
|
+
type: number;
|
|
130
|
+
}>;
|
|
131
|
+
} | undefined;
|
|
132
|
+
data?: Record<string, unknown> | undefined;
|
|
133
|
+
}, {
|
|
134
|
+
name: string;
|
|
135
|
+
id: (string | ID | {
|
|
136
|
+
key: string;
|
|
137
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
138
|
+
}) & (string | ID | {
|
|
139
|
+
key: string;
|
|
140
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
141
|
+
} | undefined);
|
|
142
|
+
schema?: {
|
|
143
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
144
|
+
fields: Record<string, {
|
|
145
|
+
type: number;
|
|
146
|
+
}>;
|
|
147
|
+
} | undefined;
|
|
148
|
+
data?: Record<string, unknown> | undefined;
|
|
149
|
+
}>, {
|
|
150
|
+
name: string;
|
|
151
|
+
id: ID;
|
|
152
|
+
schema?: {
|
|
153
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
154
|
+
fields: Record<string, {
|
|
155
|
+
type: number;
|
|
156
|
+
}>;
|
|
157
|
+
} | undefined;
|
|
158
|
+
data?: Record<string, unknown> | undefined;
|
|
159
|
+
key: string;
|
|
160
|
+
}, {
|
|
161
|
+
name: string;
|
|
162
|
+
id: (string | ID | {
|
|
163
|
+
key: string;
|
|
164
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
165
|
+
}) & (string | ID | {
|
|
166
|
+
key: string;
|
|
167
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
168
|
+
} | undefined);
|
|
169
|
+
schema?: {
|
|
170
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
171
|
+
fields: Record<string, {
|
|
172
|
+
type: number;
|
|
173
|
+
}>;
|
|
174
|
+
} | undefined;
|
|
175
|
+
data?: Record<string, unknown> | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
export type Resource = z.infer<typeof resourceSchemaZ>;
|
|
178
|
+
export declare const relationshipSchemaZ: z.ZodObject<{
|
|
179
|
+
from: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
180
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
181
|
+
key: string;
|
|
182
|
+
}, string>, z.ZodObject<{
|
|
183
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">]>;
|
|
184
|
+
key: z.ZodString;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
key: string;
|
|
187
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
188
|
+
}, {
|
|
189
|
+
key: string;
|
|
190
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
191
|
+
}>]>, z.ZodType<ID, z.ZodTypeDef, ID>]>, ID, string | ID | {
|
|
192
|
+
key: string;
|
|
193
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
194
|
+
}>;
|
|
195
|
+
type: z.ZodString;
|
|
196
|
+
to: z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, {
|
|
197
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
198
|
+
key: string;
|
|
199
|
+
}, string>, z.ZodObject<{
|
|
200
|
+
type: z.ZodUnion<[z.ZodLiteral<"label">, z.ZodLiteral<"builtin">, z.ZodLiteral<"cluster">, z.ZodLiteral<"channel">, z.ZodLiteral<"node">, z.ZodLiteral<"group">, z.ZodLiteral<"range">, z.ZodLiteral<"range-alias">, z.ZodLiteral<"user">, z.ZodLiteral<"workspace">, z.ZodLiteral<"pid">, z.ZodLiteral<"lineplot">]>;
|
|
201
|
+
key: z.ZodString;
|
|
202
|
+
}, "strip", z.ZodTypeAny, {
|
|
203
|
+
key: string;
|
|
204
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
205
|
+
}, {
|
|
206
|
+
key: string;
|
|
207
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
208
|
+
}>]>, z.ZodType<ID, z.ZodTypeDef, ID>]>, ID, string | ID | {
|
|
209
|
+
key: string;
|
|
210
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
211
|
+
}>;
|
|
212
|
+
}, "strip", z.ZodTypeAny, {
|
|
213
|
+
type: string;
|
|
214
|
+
from: ID;
|
|
215
|
+
to: ID;
|
|
216
|
+
}, {
|
|
217
|
+
type: string;
|
|
218
|
+
from: (string | ID | {
|
|
219
|
+
key: string;
|
|
220
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
221
|
+
}) & (string | ID | {
|
|
222
|
+
key: string;
|
|
223
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
224
|
+
} | undefined);
|
|
225
|
+
to: (string | ID | {
|
|
226
|
+
key: string;
|
|
227
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
228
|
+
}) & (string | ID | {
|
|
229
|
+
key: string;
|
|
230
|
+
type: "user" | "label" | "builtin" | "cluster" | "channel" | "node" | "group" | "range" | "range-alias" | "workspace" | "pid" | "lineplot";
|
|
231
|
+
} | undefined);
|
|
232
|
+
}>;
|
|
233
|
+
export type Relationship = z.infer<typeof relationshipSchemaZ>;
|
|
234
|
+
export declare const parseRelationship: (str: string) => Relationship;
|
|
235
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { ID, type Resource } from '../ontology/payload';
|
|
3
|
+
export declare class Retriever {
|
|
4
|
+
private static readonly ENDPOINT;
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(unary: UnaryClient);
|
|
7
|
+
search(term: string): Promise<Resource[]>;
|
|
8
|
+
retrieve(ids: ID | ID[] | string | string[], includeSchema?: boolean, includeFieldData?: boolean): Promise<Resource[]>;
|
|
9
|
+
retrieveChildren(ids: ID | ID[], includeSchema?: boolean, includeFieldData?: boolean): Promise<Resource[]>;
|
|
10
|
+
retrieveParents(ids: ID | ID[], includeSchema?: boolean, includeFieldData?: boolean): Promise<Resource[]>;
|
|
11
|
+
private execute;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { observe, type change } from "@synnaxlabs/x";
|
|
2
|
+
import { type Client as FrameClient } from '../framer/client';
|
|
3
|
+
import { type Streamer as FrameStreamer } from '../framer/streamer';
|
|
4
|
+
import { ID, type Relationship, type Resource } from '../ontology/payload';
|
|
5
|
+
import { type Retriever } from '../ontology/retriever';
|
|
6
|
+
export type ResourceChange = change.Change<ID, Resource>;
|
|
7
|
+
export type RelationshipChange = change.Change<Relationship, undefined>;
|
|
8
|
+
export declare class ChangeTracker {
|
|
9
|
+
private readonly resourceObs;
|
|
10
|
+
private readonly relationshipObs;
|
|
11
|
+
readonly relationships: observe.Observable<RelationshipChange[]>;
|
|
12
|
+
readonly resources: observe.Observable<ResourceChange[]>;
|
|
13
|
+
private readonly streamer;
|
|
14
|
+
private readonly retriever;
|
|
15
|
+
private readonly closePromise;
|
|
16
|
+
constructor(streamer: FrameStreamer, retriever: Retriever);
|
|
17
|
+
close(): Promise<void>;
|
|
18
|
+
private start;
|
|
19
|
+
private update;
|
|
20
|
+
private parseRelationshipSets;
|
|
21
|
+
private parseRelationshipDeletes;
|
|
22
|
+
private parseResourceSets;
|
|
23
|
+
private parseResourceDeletes;
|
|
24
|
+
static open(client: FrameClient, retriever: Retriever): Promise<ChangeTracker>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { type ID } from '../ontology/payload';
|
|
3
|
+
export declare class Writer {
|
|
4
|
+
client: UnaryClient;
|
|
5
|
+
constructor(client: UnaryClient);
|
|
6
|
+
addChildren(id: ID, ...children: ID[]): Promise<void>;
|
|
7
|
+
removeChildren(id: ID, ...children: ID[]): Promise<void>;
|
|
8
|
+
moveChildren(from: ID, to: ID, ...children: ID[]): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { type Payload, type Key } from "./payload";
|
|
3
|
+
export declare class Active {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: UnaryClient);
|
|
6
|
+
setActive(range: Key): Promise<void>;
|
|
7
|
+
retrieveActive(): Promise<Payload | null>;
|
|
8
|
+
clearActive(range: Key): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { type change } from "@synnaxlabs/x";
|
|
3
|
+
import { type channel } from '../channel';
|
|
4
|
+
import { type Key as ChannelKey } from '../channel/payload';
|
|
5
|
+
import { type Client as FrameClient } from '../framer/client';
|
|
6
|
+
import { type Key } from '../ranger/payload';
|
|
7
|
+
import { signals } from '../signals';
|
|
8
|
+
export declare const ALIAS_SET_NAME = "sy_range_alias_set";
|
|
9
|
+
export declare const ALIAS_DELETE_NAME = "sy_range_alias_delete";
|
|
10
|
+
export declare class Aliaser {
|
|
11
|
+
private static readonly SET_ENDPOINT;
|
|
12
|
+
private static readonly RESOLVE_ENDPOINT;
|
|
13
|
+
private static readonly LIST_ENDPOINT;
|
|
14
|
+
private static readonly DELETE_ENDPOINT;
|
|
15
|
+
private readonly frameClient;
|
|
16
|
+
private readonly cache;
|
|
17
|
+
private readonly client;
|
|
18
|
+
private readonly rangeKey;
|
|
19
|
+
constructor(rangeKey: Key, frameClient: FrameClient, client: UnaryClient);
|
|
20
|
+
resolve(aliases: string): Promise<ChannelKey>;
|
|
21
|
+
resolve(aliases: string[]): Promise<Record<string, ChannelKey>>;
|
|
22
|
+
set(aliases: Record<ChannelKey, string>): Promise<void>;
|
|
23
|
+
list(): Promise<Record<ChannelKey, string>>;
|
|
24
|
+
delete(aliases: ChannelKey[]): Promise<void>;
|
|
25
|
+
openChangeTracker(): Promise<signals.Observable<string, Alias>>;
|
|
26
|
+
}
|
|
27
|
+
export interface Alias {
|
|
28
|
+
range: Key;
|
|
29
|
+
channel: channel.Key;
|
|
30
|
+
alias: string;
|
|
31
|
+
}
|
|
32
|
+
export type AliasChange = change.Change<string, Alias>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { type AsyncTermSearcher } from "@synnaxlabs/x";
|
|
3
|
+
import { type Retriever as ChannelRetriever } from '../channel/retriever';
|
|
4
|
+
import { type framer } from '../framer';
|
|
5
|
+
import { type label } from '../label';
|
|
6
|
+
import { type NewPayload, type Key, type Keys, type Name, type Names } from '../ranger/payload';
|
|
7
|
+
import { Range } from '../ranger/range';
|
|
8
|
+
import { type Retriever } from '../ranger/retriever';
|
|
9
|
+
import { type Writer } from '../ranger/writer';
|
|
10
|
+
export declare class Client implements AsyncTermSearcher<string, Key, Range> {
|
|
11
|
+
private readonly frameClient;
|
|
12
|
+
private readonly retriever;
|
|
13
|
+
private readonly writer;
|
|
14
|
+
private readonly unaryClient;
|
|
15
|
+
private readonly channels;
|
|
16
|
+
private readonly active;
|
|
17
|
+
private readonly labelClient;
|
|
18
|
+
constructor(frameClient: framer.Client, retriever: Retriever, writer: Writer, unary: UnaryClient, channels: ChannelRetriever, labelClient: label.Client);
|
|
19
|
+
create(range: NewPayload): Promise<Range>;
|
|
20
|
+
create(ranges: NewPayload[]): Promise<Range[]>;
|
|
21
|
+
rename(key: Key, name: Name): Promise<void>;
|
|
22
|
+
delete(key: Key | Keys): Promise<void>;
|
|
23
|
+
search(term: string): Promise<Range[]>;
|
|
24
|
+
page(offset: number, limit: number): Promise<Range[]>;
|
|
25
|
+
retrieve(range: Key | Name): Promise<Range>;
|
|
26
|
+
retrieve(params: Keys | Names): Promise<Range[]>;
|
|
27
|
+
setActive(range: Key): Promise<void>;
|
|
28
|
+
retrieveActive(): Promise<Range | null>;
|
|
29
|
+
clearActive(range: Key): Promise<void>;
|
|
30
|
+
private sugar;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as ranger from '../ranger/external';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type Key } from '../ranger/payload';
|
|
4
|
+
declare const getReqZ: z.ZodObject<{
|
|
5
|
+
range: z.ZodString;
|
|
6
|
+
keys: z.ZodArray<z.ZodString, "many">;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
keys: string[];
|
|
9
|
+
range: string;
|
|
10
|
+
}, {
|
|
11
|
+
keys: string[];
|
|
12
|
+
range: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type GetRequest = z.infer<typeof getReqZ>;
|
|
15
|
+
declare const setReqZ: z.ZodObject<{
|
|
16
|
+
range: z.ZodString;
|
|
17
|
+
pairs: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
range: string;
|
|
20
|
+
pairs: Record<string, string>;
|
|
21
|
+
}, {
|
|
22
|
+
range: string;
|
|
23
|
+
pairs: Record<string, string>;
|
|
24
|
+
}>;
|
|
25
|
+
export type SetRequest = z.infer<typeof setReqZ>;
|
|
26
|
+
declare const deleteReqZ: z.ZodObject<{
|
|
27
|
+
range: z.ZodString;
|
|
28
|
+
keys: z.ZodArray<z.ZodString, "many">;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
keys: string[];
|
|
31
|
+
range: string;
|
|
32
|
+
}, {
|
|
33
|
+
keys: string[];
|
|
34
|
+
range: string;
|
|
35
|
+
}>;
|
|
36
|
+
export type DeleteRequest = z.infer<typeof deleteReqZ>;
|
|
37
|
+
export declare class KV {
|
|
38
|
+
private static readonly GET_ENDPOINT;
|
|
39
|
+
private static readonly SET_ENDPOINT;
|
|
40
|
+
private static readonly DELETE_ENDPOINT;
|
|
41
|
+
private readonly rangeKey;
|
|
42
|
+
private readonly client;
|
|
43
|
+
constructor(rng: Key, client: UnaryClient);
|
|
44
|
+
get(key: string): Promise<string>;
|
|
45
|
+
get(keys: string[]): Promise<Record<string, string>>;
|
|
46
|
+
set(key: string, value: string): Promise<void>;
|
|
47
|
+
set(kv: Record<string, string>): Promise<void>;
|
|
48
|
+
delete(key: string | string[]): Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { TimeRange } from "@synnaxlabs/x";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const keyZ: z.ZodString;
|
|
4
|
+
export type Key = z.infer<typeof keyZ>;
|
|
5
|
+
export type Name = string;
|
|
6
|
+
export type Keys = Key[];
|
|
7
|
+
export type Names = Name[];
|
|
8
|
+
export type Params = Key | Name | Keys | Names;
|
|
9
|
+
export declare const payloadZ: z.ZodObject<{
|
|
10
|
+
key: z.ZodString;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
timeRange: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
13
|
+
start: z.ZodUnion<[z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, import("@synnaxlabs/x").TimeStamp, Number>, z.ZodEffects<z.ZodNumber, import("@synnaxlabs/x").TimeStamp, number>, z.ZodType<import("@synnaxlabs/x").TimeStamp, z.ZodTypeDef, import("@synnaxlabs/x").TimeStamp>]>;
|
|
14
|
+
end: z.ZodUnion<[z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, import("@synnaxlabs/x").TimeStamp, Number>, z.ZodEffects<z.ZodNumber, import("@synnaxlabs/x").TimeStamp, number>, z.ZodType<import("@synnaxlabs/x").TimeStamp, z.ZodTypeDef, import("@synnaxlabs/x").TimeStamp>]>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
start: import("@synnaxlabs/x").TimeStamp;
|
|
17
|
+
end: import("@synnaxlabs/x").TimeStamp;
|
|
18
|
+
}, {
|
|
19
|
+
start: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
20
|
+
end: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
21
|
+
}>, TimeRange, {
|
|
22
|
+
start: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
23
|
+
end: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
24
|
+
}>, z.ZodType<TimeRange, z.ZodTypeDef, TimeRange>]>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
name: string;
|
|
27
|
+
key: string;
|
|
28
|
+
timeRange: TimeRange;
|
|
29
|
+
}, {
|
|
30
|
+
name: string;
|
|
31
|
+
key: string;
|
|
32
|
+
timeRange: (TimeRange | {
|
|
33
|
+
start: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
34
|
+
end: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
35
|
+
}) & (TimeRange | {
|
|
36
|
+
start: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
37
|
+
end: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
38
|
+
} | undefined);
|
|
39
|
+
}>;
|
|
40
|
+
export type Payload = z.infer<typeof payloadZ>;
|
|
41
|
+
export declare const newPayloadZ: z.ZodObject<{
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
timeRange: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
44
|
+
start: z.ZodUnion<[z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, import("@synnaxlabs/x").TimeStamp, Number>, z.ZodEffects<z.ZodNumber, import("@synnaxlabs/x").TimeStamp, number>, z.ZodType<import("@synnaxlabs/x").TimeStamp, z.ZodTypeDef, import("@synnaxlabs/x").TimeStamp>]>;
|
|
45
|
+
end: z.ZodUnion<[z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, import("@synnaxlabs/x").TimeStamp, Number>, z.ZodEffects<z.ZodNumber, import("@synnaxlabs/x").TimeStamp, number>, z.ZodType<import("@synnaxlabs/x").TimeStamp, z.ZodTypeDef, import("@synnaxlabs/x").TimeStamp>]>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
start: import("@synnaxlabs/x").TimeStamp;
|
|
48
|
+
end: import("@synnaxlabs/x").TimeStamp;
|
|
49
|
+
}, {
|
|
50
|
+
start: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
51
|
+
end: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
52
|
+
}>, TimeRange, {
|
|
53
|
+
start: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
54
|
+
end: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
55
|
+
}>, z.ZodType<TimeRange, z.ZodTypeDef, TimeRange>]>;
|
|
56
|
+
key: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
name: string;
|
|
59
|
+
timeRange: TimeRange;
|
|
60
|
+
key?: string | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
name: string;
|
|
63
|
+
timeRange: (TimeRange | {
|
|
64
|
+
start: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
65
|
+
end: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
66
|
+
}) & (TimeRange | {
|
|
67
|
+
start: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
68
|
+
end: (number | Number | import("@synnaxlabs/x").TimeStamp) & (number | Number | import("@synnaxlabs/x").TimeStamp | undefined);
|
|
69
|
+
} | undefined);
|
|
70
|
+
key?: string | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
export type NewPayload = z.infer<typeof newPayloadZ>;
|
|
73
|
+
export type ParamAnalsysisResult = {
|
|
74
|
+
single: true;
|
|
75
|
+
variant: "keys";
|
|
76
|
+
normalized: Keys;
|
|
77
|
+
actual: Key;
|
|
78
|
+
} | {
|
|
79
|
+
single: true;
|
|
80
|
+
variant: "names";
|
|
81
|
+
normalized: Names;
|
|
82
|
+
actual: Name;
|
|
83
|
+
} | {
|
|
84
|
+
single: false;
|
|
85
|
+
variant: "keys";
|
|
86
|
+
normalized: Keys;
|
|
87
|
+
actual: Keys;
|
|
88
|
+
} | {
|
|
89
|
+
single: false;
|
|
90
|
+
variant: "names";
|
|
91
|
+
normalized: Names;
|
|
92
|
+
actual: Names;
|
|
93
|
+
};
|
|
94
|
+
export declare const analyzeParams: (params: Params) => ParamAnalsysisResult;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type Series, TimeRange } from "@synnaxlabs/x";
|
|
2
|
+
import { type Key, type Params, type Name } from '../channel/payload';
|
|
3
|
+
import { type Retriever as ChannelRetriever } from '../channel/retriever';
|
|
4
|
+
import { type framer } from '../framer';
|
|
5
|
+
import { type label } from '../label';
|
|
6
|
+
import { type Label } from '../label/payload';
|
|
7
|
+
import { type Alias, type Aliaser } from '../ranger/alias';
|
|
8
|
+
import { type KV } from '../ranger/kv';
|
|
9
|
+
import { type signals } from '../signals';
|
|
10
|
+
export declare class Range {
|
|
11
|
+
key: string;
|
|
12
|
+
name: string;
|
|
13
|
+
readonly kv: KV;
|
|
14
|
+
readonly timeRange: TimeRange;
|
|
15
|
+
readonly channels: ChannelRetriever;
|
|
16
|
+
private readonly aliaser;
|
|
17
|
+
private readonly frameClient;
|
|
18
|
+
private readonly labelClient;
|
|
19
|
+
constructor(name: string, timeRange: TimeRange | undefined, key: string, _frameClient: framer.Client, _kv: KV, _aliaser: Aliaser, _channels: ChannelRetriever, _labelClient: label.Client);
|
|
20
|
+
setAlias(channel: Key | Name, alias: string): Promise<void>;
|
|
21
|
+
deleteAlias(...channels: Key[]): Promise<void>;
|
|
22
|
+
listAliases(): Promise<Record<Key, string>>;
|
|
23
|
+
openAliasTracker(): Promise<signals.Observable<string, Alias>>;
|
|
24
|
+
read(channel: Key | Name): Promise<Series>;
|
|
25
|
+
read(channels: Params): Promise<framer.Frame>;
|
|
26
|
+
labels(): Promise<Label[]>;
|
|
27
|
+
addLabel(...labels: label.Key[]): Promise<void>;
|
|
28
|
+
removeLabel(...labels: label.Key[]): Promise<void>;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { type Params, type Payload } from "./payload";
|
|
3
|
+
export declare class Retriever {
|
|
4
|
+
private readonly ENDPOINT;
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(client: UnaryClient);
|
|
7
|
+
retrieve(params: Params): Promise<Payload[]>;
|
|
8
|
+
search(term: string): Promise<Payload[]>;
|
|
9
|
+
private execute;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { type NewPayload, type Payload } from '../ranger/payload';
|
|
3
|
+
export declare class Writer {
|
|
4
|
+
client: UnaryClient;
|
|
5
|
+
constructor(client: UnaryClient);
|
|
6
|
+
rename(key: string, name: string): Promise<void>;
|
|
7
|
+
create(ranges: NewPayload[]): Promise<Payload[]>;
|
|
8
|
+
delete(keys: string[]): Promise<void>;
|
|
9
|
+
}
|