@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
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Synnax Labs, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this software is governed by the Business Source License included in the file
|
|
5
|
+
* licenses/BSL.txt.
|
|
6
|
+
*
|
|
7
|
+
* As of the Change Date specified in that file, in accordance with the Business Source
|
|
8
|
+
* License, use of this software will be governed by the Apache License, Version 2.0,
|
|
9
|
+
* included in the file licenses/APL.txt.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
module.exports = {
|
|
13
|
+
root: true,
|
|
14
|
+
extends: ["synnaxlabs"],
|
|
15
|
+
parserOptions: {
|
|
16
|
+
project: "./tsconfig.json",
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# pytest cache directory #
|
|
2
|
+
|
|
3
|
+
This directory contains data from the pytest's cache plugin,
|
|
4
|
+
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
|
|
5
|
+
|
|
6
|
+
**Do not** commit this to version control.
|
|
7
|
+
|
|
8
|
+
See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
> @synnaxlabs/client@0.13.5 build /Users/emilianobonilla/Desktop/synnaxlabs/synnax/client/ts
|
|
3
|
+
> tsc --noEmit && vite build
|
|
4
|
+
|
|
5
|
+
vite v5.0.10 building for production...
|
|
6
|
+
transforming...
|
|
7
|
+
✓ 81 modules transformed.
|
|
8
|
+
rendering chunks...
|
|
9
|
+
|
|
10
|
+
[vite:dts] Start generate declaration files...
|
|
11
|
+
computing gzip size...
|
|
12
|
+
dist/client.es.js 724.15 kB │ gzip: 129.56 kB │ map: 1,339.93 kB
|
|
13
|
+
[vite:dts] Declaration files built in 1375ms.
|
|
14
|
+
|
|
15
|
+
dist/client.cjs.js 725.13 kB │ gzip: 129.67 kB │ map: 1,340.69 kB
|
|
16
|
+
✓ built in 2.10s
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
Source code in this repository is licensed under the Business Source License 1.1 (BSL).
|
|
2
|
+
A copy of the license can be found in the licenses/BSL.txt file. Source code in a given
|
|
3
|
+
file is licensed under the BSL and the copyright belongs to Synnax Labs, Inc. unless
|
|
4
|
+
otherwise noted at the beginning of the file.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z } from
|
|
3
|
-
import {
|
|
1
|
+
import type { Middleware, UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { user } from '../user';
|
|
4
4
|
export declare const tokenMiddleware: (token: () => Promise<string>) => Middleware;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const insecureCredentialsZ: z.ZodObject<{
|
|
6
6
|
username: z.ZodString;
|
|
7
7
|
password: z.ZodString;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -12,43 +12,40 @@ export declare const InsecureCredentialsSchema: z.ZodObject<{
|
|
|
12
12
|
username: string;
|
|
13
13
|
password: string;
|
|
14
14
|
}>;
|
|
15
|
-
export
|
|
16
|
-
export declare const
|
|
15
|
+
export type InsecureCredentials = z.infer<typeof insecureCredentialsZ>;
|
|
16
|
+
export declare const tokenResponseZ: z.ZodObject<{
|
|
17
17
|
token: z.ZodString;
|
|
18
18
|
user: z.ZodObject<{
|
|
19
19
|
key: z.ZodString;
|
|
20
20
|
username: z.ZodString;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
username: string;
|
|
23
22
|
key: string;
|
|
24
|
-
}, {
|
|
25
23
|
username: string;
|
|
24
|
+
}, {
|
|
26
25
|
key: string;
|
|
26
|
+
username: string;
|
|
27
27
|
}>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
29
|
token: string;
|
|
30
30
|
user: {
|
|
31
|
-
username: string;
|
|
32
31
|
key: string;
|
|
32
|
+
username: string;
|
|
33
33
|
};
|
|
34
34
|
}, {
|
|
35
35
|
token: string;
|
|
36
36
|
user: {
|
|
37
|
-
username: string;
|
|
38
37
|
key: string;
|
|
38
|
+
username: string;
|
|
39
39
|
};
|
|
40
40
|
}>;
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
private static ENDPOINT;
|
|
41
|
+
export type TokenResponse = z.infer<typeof tokenResponseZ>;
|
|
42
|
+
export declare class Client {
|
|
44
43
|
private token;
|
|
45
|
-
private client;
|
|
46
|
-
private credentials;
|
|
44
|
+
private readonly client;
|
|
47
45
|
authenticating: Promise<void> | undefined;
|
|
48
46
|
authenticated: boolean;
|
|
49
|
-
user:
|
|
50
|
-
constructor(
|
|
51
|
-
authenticate(): void;
|
|
52
|
-
private maybeWaitAuthenticated;
|
|
47
|
+
user: user.Payload | undefined;
|
|
48
|
+
constructor(client: UnaryClient, creds: InsecureCredentials);
|
|
49
|
+
authenticate(creds: InsecureCredentials): void;
|
|
53
50
|
middleware(): Middleware;
|
|
54
51
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as auth from '../auth/auth';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../cdc/observable';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as cdc from '../cdc/external';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { observe, type Destructor, type change, type Series } from "@synnaxlabs/x";
|
|
2
|
+
import { type channel } from '../channel';
|
|
3
|
+
import { type framer } from '../framer';
|
|
4
|
+
export type Decoder<K, V> = (variant: change.Variant, data: Series) => Array<change.Change<K, V>>;
|
|
5
|
+
export declare class Observable<K, V> implements observe.Observable<Array<change.Change<K, V>>> {
|
|
6
|
+
private readonly streamer;
|
|
7
|
+
private readonly decoder;
|
|
8
|
+
private readonly base;
|
|
9
|
+
private readonly closePromise;
|
|
10
|
+
private readonly deleteChannel?;
|
|
11
|
+
private readonly setChannel?;
|
|
12
|
+
private constructor();
|
|
13
|
+
onChange(handler: observe.Handler<Array<change.Change<K, V>>>): Destructor;
|
|
14
|
+
close(): Promise<void>;
|
|
15
|
+
stream(): Promise<void>;
|
|
16
|
+
static open<K, V>(client: framer.Client, setChannel: channel.Key | channel.Name, deleteChannel: channel.Key | channel.Name, ecd: Decoder<K, V>): Promise<Observable<K, V>>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { DataType, Rate, type NativeTypedArray, type CrudeDensity, type Series, type TimeRange, type AsyncTermSearcher, type CrudeTimeSpan } from "@synnaxlabs/x";
|
|
2
|
+
import { type Creator } from '../channel/creator';
|
|
3
|
+
import { type Key, type KeyOrName, type Params, type Payload, type NewPayload } from '../channel/payload';
|
|
4
|
+
import { type Retriever } from '../channel/retriever';
|
|
5
|
+
import { type framer } from '../framer';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a Channel in a Synnax database. It should not be instantiated
|
|
8
|
+
* directly, but rather created or retrieved from a {@link Client}.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Channel {
|
|
11
|
+
private readonly _frameClient;
|
|
12
|
+
key: Key;
|
|
13
|
+
name: string;
|
|
14
|
+
rate: Rate;
|
|
15
|
+
dataType: DataType;
|
|
16
|
+
leaseholder: number;
|
|
17
|
+
index: Key;
|
|
18
|
+
isIndex: boolean;
|
|
19
|
+
constructor({ dataType, rate, name, leaseholder, key, density, isIndex, index, frameClient, }: NewPayload & {
|
|
20
|
+
frameClient?: framer.Client;
|
|
21
|
+
density?: CrudeDensity;
|
|
22
|
+
});
|
|
23
|
+
private get framer();
|
|
24
|
+
get payload(): Payload;
|
|
25
|
+
/**
|
|
26
|
+
* Reads telemetry from the channel between the two timestamps.
|
|
27
|
+
*
|
|
28
|
+
* @param start - The starting timestamp of the range to read from.
|
|
29
|
+
* @param end - The ending timestamp of the range to read from.
|
|
30
|
+
* @returns A typed array containing the retrieved
|
|
31
|
+
*/
|
|
32
|
+
read(tr: TimeRange): Promise<Series | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Writes telemetry to the channel starting at the given timestamp.
|
|
35
|
+
*
|
|
36
|
+
* @param start - The starting timestamp of the first sample in data.
|
|
37
|
+
* @param data - THe telemetry to write to the channel.
|
|
38
|
+
*/
|
|
39
|
+
write(start: CrudeTimeSpan, data: NativeTypedArray): Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The core client class for executing channel operations against a Synnax
|
|
43
|
+
* cluster.
|
|
44
|
+
*/
|
|
45
|
+
export declare class Client implements AsyncTermSearcher<string, Key, Channel> {
|
|
46
|
+
private readonly frameClient;
|
|
47
|
+
private readonly retriever;
|
|
48
|
+
private readonly creator;
|
|
49
|
+
constructor(segmentClient: framer.Client, retriever: Retriever, creator: Creator);
|
|
50
|
+
create(channel: NewPayload): Promise<Channel>;
|
|
51
|
+
create(channels: NewPayload[]): Promise<Channel[]>;
|
|
52
|
+
retrieve(channel: KeyOrName): Promise<Channel>;
|
|
53
|
+
retrieve(channels: Params): Promise<Channel[]>;
|
|
54
|
+
search(term: string, rangeKey?: string): Promise<Channel[]>;
|
|
55
|
+
newSearcherUnderRange(rangeKey?: string): AsyncTermSearcher<string, Key, Channel>;
|
|
56
|
+
page(offset: number, limit: number): Promise<Channel[]>;
|
|
57
|
+
private sugar;
|
|
58
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { type Payload, type NewPayload } from '../channel/payload';
|
|
3
|
+
export declare class Creator {
|
|
4
|
+
private static readonly ENDPOINT;
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(client: UnaryClient);
|
|
7
|
+
create(channels: NewPayload[]): Promise<Payload[]>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as channel from '../channel/external';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { DataType, Rate } from "@synnaxlabs/x";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const keyZ: z.ZodNumber;
|
|
4
|
+
export type Key = number;
|
|
5
|
+
export type Keys = number[];
|
|
6
|
+
export type Name = string;
|
|
7
|
+
export type Names = string[];
|
|
8
|
+
export type KeyOrName = Key | Name;
|
|
9
|
+
export type KeysOrNames = Keys | Names;
|
|
10
|
+
export type Params = Key | Name | Keys | Names;
|
|
11
|
+
export declare const payload: z.ZodObject<{
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
key: z.ZodNumber;
|
|
14
|
+
rate: z.ZodUnion<[z.ZodEffects<z.ZodNumber, Rate, number>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, Rate, Number>, z.ZodType<Rate, z.ZodTypeDef, Rate>]>;
|
|
15
|
+
dataType: z.ZodUnion<[z.ZodEffects<z.ZodString, DataType, string>, z.ZodType<DataType, z.ZodTypeDef, DataType>]>;
|
|
16
|
+
leaseholder: z.ZodNumber;
|
|
17
|
+
index: z.ZodNumber;
|
|
18
|
+
isIndex: z.ZodBoolean;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
name: string;
|
|
21
|
+
key: number;
|
|
22
|
+
rate: Rate;
|
|
23
|
+
dataType: DataType;
|
|
24
|
+
leaseholder: number;
|
|
25
|
+
index: number;
|
|
26
|
+
isIndex: boolean;
|
|
27
|
+
}, {
|
|
28
|
+
name: string;
|
|
29
|
+
key: number;
|
|
30
|
+
rate: (number | Number | Rate) & (number | Number | Rate | undefined);
|
|
31
|
+
dataType: (string | DataType) & (string | DataType | undefined);
|
|
32
|
+
leaseholder: number;
|
|
33
|
+
index: number;
|
|
34
|
+
isIndex: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
export type Payload = z.infer<typeof payload>;
|
|
37
|
+
export declare const newPayload: z.ZodObject<{
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
dataType: z.ZodUnion<[z.ZodEffects<z.ZodString, DataType, string>, z.ZodType<DataType, z.ZodTypeDef, DataType>]>;
|
|
40
|
+
key: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
leaseholder: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
rate: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodNumber, Rate, number>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, Rate, Number>, z.ZodType<Rate, z.ZodTypeDef, Rate>]>>;
|
|
44
|
+
isIndex: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
name: string;
|
|
47
|
+
dataType: DataType;
|
|
48
|
+
key?: number | undefined;
|
|
49
|
+
leaseholder?: number | undefined;
|
|
50
|
+
index?: number | undefined;
|
|
51
|
+
rate?: Rate | undefined;
|
|
52
|
+
isIndex?: boolean | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
name: string;
|
|
55
|
+
dataType: (string | DataType) & (string | DataType | undefined);
|
|
56
|
+
key?: number | undefined;
|
|
57
|
+
leaseholder?: number | undefined;
|
|
58
|
+
index?: number | undefined;
|
|
59
|
+
rate?: number | Number | Rate | undefined;
|
|
60
|
+
isIndex?: boolean | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
export type NewPayload = z.input<typeof newPayload>;
|
|
63
|
+
export declare const parseChannels: (channels: NewPayload[]) => NewPayload[];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { UnaryClient } from "@synnaxlabs/freighter";
|
|
2
|
+
import { type Key, type Keys, type Name, type Names, type Params, type Payload } from '../channel/payload';
|
|
3
|
+
export interface Retriever {
|
|
4
|
+
retrieve: (channels: Params) => Promise<Payload[]>;
|
|
5
|
+
search: (term: string, rangeKey?: string) => Promise<Payload[]>;
|
|
6
|
+
page: (offset: number, limit: number) => Promise<Payload[]>;
|
|
7
|
+
}
|
|
8
|
+
export declare class ClusterRetriever implements Retriever {
|
|
9
|
+
private static readonly ENDPOINT;
|
|
10
|
+
private readonly client;
|
|
11
|
+
constructor(client: UnaryClient);
|
|
12
|
+
search(term: string, rangeKey?: string): Promise<Payload[]>;
|
|
13
|
+
retrieve(channels: Params): Promise<Payload[]>;
|
|
14
|
+
page(offset: number, limit: number): Promise<Payload[]>;
|
|
15
|
+
private execute;
|
|
16
|
+
}
|
|
17
|
+
export declare class CacheRetriever implements Retriever {
|
|
18
|
+
private readonly cache;
|
|
19
|
+
private readonly namesToKeys;
|
|
20
|
+
private readonly wrapped;
|
|
21
|
+
constructor(wrapped: Retriever);
|
|
22
|
+
search(term: string, searchRangeKey?: string): Promise<Payload[]>;
|
|
23
|
+
page(offset: number, limit: number): Promise<Payload[]>;
|
|
24
|
+
retrieve(channels: Params): Promise<Payload[]>;
|
|
25
|
+
private updateCache;
|
|
26
|
+
private getFromCache;
|
|
27
|
+
}
|
|
28
|
+
export type ParamAnalysisResult = {
|
|
29
|
+
single: true;
|
|
30
|
+
variant: "names";
|
|
31
|
+
normalized: Names;
|
|
32
|
+
actual: Name;
|
|
33
|
+
} | {
|
|
34
|
+
single: true;
|
|
35
|
+
variant: "keys";
|
|
36
|
+
normalized: Keys;
|
|
37
|
+
actual: Key;
|
|
38
|
+
} | {
|
|
39
|
+
single: false;
|
|
40
|
+
variant: "keys";
|
|
41
|
+
normalized: Keys;
|
|
42
|
+
actual: Keys;
|
|
43
|
+
} | {
|
|
44
|
+
single: false;
|
|
45
|
+
variant: "names";
|
|
46
|
+
normalized: Names;
|
|
47
|
+
actual: Names;
|
|
48
|
+
};
|
|
49
|
+
export declare const analyzeParams: (channels: Params) => ParamAnalysisResult;
|