@iota-uz/sdk 0.46.0 → 0.47.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/README.md +5 -0
- package/dist/client-host/identity.d.ts +4 -4
- package/dist/client-host/identity.js +2 -2
- package/dist/lens/{CascadePanel-Bha4qY7J.js → CascadePanel-BlYJd18G.js} +1 -1
- package/dist/lens/{ChartDataEquivalent-Bwgn4yYB.js → ChartDataEquivalent-B6xSOdzC.js} +1 -1
- package/dist/lens/{ChartPanel-BZpzBuwl.js → ChartPanel-BIJjrs5D.js} +159 -159
- package/dist/lens/{CoveragePanel-D40AuKkD.js → CoveragePanel-CHtXDMtt.js} +1 -1
- package/dist/lens/{GaugePanel-C9k2TuJH.js → GaugePanel-By0TOJPa.js} +1 -1
- package/dist/lens/LensDashboard.d.ts +13 -0
- package/dist/lens/LensDashboard.d.ts.map +1 -1
- package/dist/lens/{MapPanel-ZYxfDsPM.js → MapPanel-Cw4ELCiM.js} +3 -3
- package/dist/lens/{MetricFlowPanel-CmESLoLK.js → MetricFlowPanel-Gr5wi3nI.js} +2 -2
- package/dist/lens/{MetricHierarchyPanel-UZVuJ5P2.js → MetricHierarchyPanel-VLA_5LXX.js} +2 -2
- package/dist/lens/{MetricRelationshipPanel-CXLdScAy.js → MetricRelationshipPanel-DFP566_c.js} +2 -2
- package/dist/lens/{PrintReport-lrfdCTZO.js → PrintReport-C0OV1iHP.js} +5 -5
- package/dist/lens/{QualityChip-BYz-DHfs.js → QualityChip-DTi-0jdh.js} +1 -1
- package/dist/lens/SaveInvestigation-CX1Abyl8.js +309 -0
- package/dist/lens/TablePanel-BusKU7cU.js +994 -0
- package/dist/lens/{adapter-CeAqYWqm.js → adapter-CQg4-M7p.js} +7 -7
- package/dist/lens/contract/schemas.d.ts +2 -0
- package/dist/lens/contract/schemas.d.ts.map +1 -1
- package/dist/lens/contract/types.d.ts +12 -0
- package/dist/lens/contract/types.d.ts.map +1 -1
- package/dist/lens/{dashboardEdit-DKVE_6J_.js → dashboardEdit-CJgCVfi_.js} +1 -1
- package/dist/lens/explore/DrillOverlay.d.ts +38 -0
- package/dist/lens/explore/DrillOverlay.d.ts.map +1 -1
- package/dist/lens/explore/ExplorePanel.d.ts.map +1 -1
- package/dist/lens/explore/SaveInvestigation.d.ts +21 -0
- package/dist/lens/explore/SaveInvestigation.d.ts.map +1 -0
- package/dist/lens/explore/drillHost.d.ts +25 -0
- package/dist/lens/explore/drillHost.d.ts.map +1 -0
- package/dist/lens/explore/investigation.d.ts +174 -0
- package/dist/lens/explore/investigation.d.ts.map +1 -0
- package/dist/lens/explore/provenanceLabels.d.ts +10 -0
- package/dist/lens/explore/provenanceLabels.d.ts.map +1 -0
- package/dist/lens/index-DR7Hf8Km.js +19805 -0
- package/dist/lens/{index-DkVTXC8W.js → index-DZFw4cqF.js} +1 -1
- package/dist/lens/index.d.ts +7 -1
- package/dist/lens/index.d.ts.map +1 -1
- package/dist/lens/index.js +67 -53
- package/dist/lens/{install-CQ_iMuAE.js → install-B2lTK6uo.js} +1 -1
- package/dist/lens/{install-Ch0_qifK.js → install-BXr4Mnc0.js} +1 -1
- package/dist/lens/{install-CKmxqMe1.js → install-CicNQ_ks.js} +1 -1
- package/dist/lens/{install-BwD_xNlp.js → install-d8A0WPiw.js} +1 -1
- package/dist/lens/{keys-BBmWdfaH.js → keys-C-Akc9lZ.js} +2 -2
- package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
- package/dist/lens/panels/TablePanel.d.ts.map +1 -1
- package/dist/lens/panels/actions.d.ts.map +1 -1
- package/dist/lens/panels/panelFailure.d.ts.map +1 -1
- package/dist/lens/{prefetch-BXoUIIgq.js → prefetch-C9kxuIs8.js} +2 -2
- package/dist/lens/{prefetchPanels-a-zs_bDm.js → prefetchPanels-gbY9RIqL.js} +1 -1
- package/dist/lens/{print-CpgWJxDG.js → print-CllsAP3d.js} +1 -1
- package/dist/lens/reports/ReportCompositionEditor.d.ts +8 -2
- package/dist/lens/reports/ReportCompositionEditor.d.ts.map +1 -1
- package/dist/lens/reports/ReportDefinitionEditor.d.ts +54 -0
- package/dist/lens/reports/ReportDefinitionEditor.d.ts.map +1 -0
- package/dist/lens/reports/ReportPicker.d.ts +6 -0
- package/dist/lens/reports/ReportPicker.d.ts.map +1 -1
- package/dist/lens/reports/dashboardEdit.d.ts +3 -0
- package/dist/lens/reports/dashboardEdit.d.ts.map +1 -1
- package/dist/lens/reports/editing.d.ts +35 -0
- package/dist/lens/reports/editing.d.ts.map +1 -1
- package/dist/lens/reports/picker.d.ts +4 -1
- package/dist/lens/reports/picker.d.ts.map +1 -1
- package/dist/lens/runtime/index.d.ts +0 -1
- package/dist/lens/runtime/index.d.ts.map +1 -1
- package/dist/lens/runtime/messages.d.ts +2 -2
- package/dist/lens/runtime/messages.d.ts.map +1 -1
- package/dist/lens/runtime/provider.d.ts +5 -1
- package/dist/lens/runtime/provider.d.ts.map +1 -1
- package/dist/lens/runtime/returnContext.d.ts +62 -0
- package/dist/lens/runtime/returnContext.d.ts.map +1 -0
- package/dist/lens/runtime/tableSummary.d.ts +9 -0
- package/dist/lens/runtime/tableSummary.d.ts.map +1 -0
- package/dist/lens/{scales-BLf9OweG.js → scales-CO6Q9RtG.js} +1 -1
- package/dist/lens/style.css +1 -1
- package/dist/runtime/README.md +24 -0
- package/dist/runtime/assert.d.ts +51 -0
- package/dist/runtime/assert.js +172 -0
- package/dist/runtime/build/README.txt +1 -0
- package/dist/runtime/build/extract.mjs +342 -0
- package/dist/runtime/build/shared-exports.json +388 -0
- package/dist/runtime/build/test-child.mjs +136 -0
- package/dist/runtime/build/theme/tailwind.config.js +121 -0
- package/dist/runtime/build/theme/theme.css +462 -0
- package/dist/runtime/build/theme/utilities.css +1 -0
- package/dist/runtime/build/vendor/lib/lib.d.ts +22 -0
- package/dist/runtime/build/vendor/lib/lib.decorators.d.ts +384 -0
- package/dist/runtime/build/vendor/lib/lib.decorators.legacy.d.ts +22 -0
- package/dist/runtime/build/vendor/lib/lib.dom.asynciterable.d.ts +41 -0
- package/dist/runtime/build/vendor/lib/lib.dom.d.ts +28983 -0
- package/dist/runtime/build/vendor/lib/lib.dom.iterable.d.ts +491 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.collection.d.ts +147 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.core.d.ts +597 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.d.ts +28 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.generator.d.ts +77 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.iterable.d.ts +590 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.promise.d.ts +81 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.proxy.d.ts +128 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.reflect.d.ts +144 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.symbol.d.ts +46 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.array.include.d.ts +116 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.full.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.intl.d.ts +31 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.d.ts +26 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.date.d.ts +31 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.full.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.intl.d.ts +44 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.object.d.ts +49 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.string.d.ts +45 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.intl.d.ts +83 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.promise.d.ts +30 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.regexp.d.ts +37 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.array.d.ts +79 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.intl.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.object.d.ts +33 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.string.d.ts +37 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.symbol.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.bigint.d.ts +731 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.d.ts +27 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.date.d.ts +42 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.intl.d.ts +474 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.number.d.ts +28 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.promise.d.ts +47 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.string.d.ts +44 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.intl.d.ts +166 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.promise.d.ts +48 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.string.d.ts +33 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.weakref.d.ts +78 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.array.d.ts +121 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.error.d.ts +75 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.intl.d.ts +121 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.object.d.ts +26 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.regexp.d.ts +39 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.string.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.array.d.ts +924 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.collection.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.d.ts +22 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.intl.d.ts +56 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.collection.d.ts +29 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.d.ts +26 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.object.d.ts +29 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.promise.d.ts +35 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.regexp.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.string.d.ts +29 -0
- package/dist/runtime/build/vendor/lib/lib.es5.d.ts +4585 -0
- package/dist/runtime/build/vendor/lib/lib.es6.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.array.d.ts +35 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.collection.d.ts +96 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.decorators.d.ts +28 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.disposable.d.ts +193 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.intl.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.iterator.d.ts +148 -0
- package/dist/runtime/build/vendor/node-types/assert/strict.d.ts +111 -0
- package/dist/runtime/build/vendor/node-types/assert.d.ts +1115 -0
- package/dist/runtime/build/vendor/node-types/async_hooks.d.ts +619 -0
- package/dist/runtime/build/vendor/node-types/buffer.buffer.d.ts +477 -0
- package/dist/runtime/build/vendor/node-types/buffer.d.ts +1941 -0
- package/dist/runtime/build/vendor/node-types/child_process.d.ts +1480 -0
- package/dist/runtime/build/vendor/node-types/cluster.d.ts +578 -0
- package/dist/runtime/build/vendor/node-types/compatibility/iterators.d.ts +21 -0
- package/dist/runtime/build/vendor/node-types/console.d.ts +453 -0
- package/dist/runtime/build/vendor/node-types/constants.d.ts +21 -0
- package/dist/runtime/build/vendor/node-types/crypto.d.ts +5484 -0
- package/dist/runtime/build/vendor/node-types/dgram.d.ts +715 -0
- package/dist/runtime/build/vendor/node-types/diagnostics_channel.d.ts +576 -0
- package/dist/runtime/build/vendor/node-types/dns/promises.d.ts +503 -0
- package/dist/runtime/build/vendor/node-types/dns.d.ts +923 -0
- package/dist/runtime/build/vendor/node-types/domain.d.ts +166 -0
- package/dist/runtime/build/vendor/node-types/events.d.ts +967 -0
- package/dist/runtime/build/vendor/node-types/fs/promises.d.ts +1354 -0
- package/dist/runtime/build/vendor/node-types/fs.d.ts +4777 -0
- package/dist/runtime/build/vendor/node-types/globals.d.ts +170 -0
- package/dist/runtime/build/vendor/node-types/globals.typedarray.d.ts +41 -0
- package/dist/runtime/build/vendor/node-types/http.d.ts +2246 -0
- package/dist/runtime/build/vendor/node-types/http2.d.ts +2882 -0
- package/dist/runtime/build/vendor/node-types/https.d.ts +585 -0
- package/dist/runtime/build/vendor/node-types/index.d.ts +101 -0
- package/dist/runtime/build/vendor/node-types/inspector.d.ts +323 -0
- package/dist/runtime/build/vendor/node-types/inspector.generated.d.ts +4406 -0
- package/dist/runtime/build/vendor/node-types/module.d.ts +844 -0
- package/dist/runtime/build/vendor/node-types/net.d.ts +1197 -0
- package/dist/runtime/build/vendor/node-types/os.d.ts +507 -0
- package/dist/runtime/build/vendor/node-types/package.json +140 -0
- package/dist/runtime/build/vendor/node-types/path.d.ts +200 -0
- package/dist/runtime/build/vendor/node-types/perf_hooks.d.ts +1054 -0
- package/dist/runtime/build/vendor/node-types/process.d.ts +2101 -0
- package/dist/runtime/build/vendor/node-types/punycode.d.ts +117 -0
- package/dist/runtime/build/vendor/node-types/querystring.d.ts +152 -0
- package/dist/runtime/build/vendor/node-types/readline/promises.d.ts +161 -0
- package/dist/runtime/build/vendor/node-types/readline.d.ts +600 -0
- package/dist/runtime/build/vendor/node-types/repl.d.ts +438 -0
- package/dist/runtime/build/vendor/node-types/sea.d.ts +162 -0
- package/dist/runtime/build/vendor/node-types/sqlite.d.ts +1182 -0
- package/dist/runtime/build/vendor/node-types/stream/consumers.d.ts +45 -0
- package/dist/runtime/build/vendor/node-types/stream/promises.d.ts +90 -0
- package/dist/runtime/build/vendor/node-types/stream/web.d.ts +596 -0
- package/dist/runtime/build/vendor/node-types/stream.d.ts +1707 -0
- package/dist/runtime/build/vendor/node-types/string_decoder.d.ts +67 -0
- package/dist/runtime/build/vendor/node-types/test.d.ts +2656 -0
- package/dist/runtime/build/vendor/node-types/timers/promises.d.ts +108 -0
- package/dist/runtime/build/vendor/node-types/timers.d.ts +285 -0
- package/dist/runtime/build/vendor/node-types/tls.d.ts +1314 -0
- package/dist/runtime/build/vendor/node-types/trace_events.d.ts +197 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/buffer.buffer.d.ts +473 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/compatibility/float16array.d.ts +71 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/globals.typedarray.d.ts +36 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/index.d.ts +103 -0
- package/dist/runtime/build/vendor/node-types/ts5.7/compatibility/float16array.d.ts +72 -0
- package/dist/runtime/build/vendor/node-types/ts5.7/index.d.ts +103 -0
- package/dist/runtime/build/vendor/node-types/tty.d.ts +209 -0
- package/dist/runtime/build/vendor/node-types/url.d.ts +1103 -0
- package/dist/runtime/build/vendor/node-types/util.d.ts +2379 -0
- package/dist/runtime/build/vendor/node-types/v8.d.ts +1010 -0
- package/dist/runtime/build/vendor/node-types/vm.d.ts +1160 -0
- package/dist/runtime/build/vendor/node-types/wasi.d.ts +202 -0
- package/dist/runtime/build/vendor/node-types/web-globals/abortcontroller.d.ts +34 -0
- package/dist/runtime/build/vendor/node-types/web-globals/crypto.d.ts +32 -0
- package/dist/runtime/build/vendor/node-types/web-globals/domexception.d.ts +68 -0
- package/dist/runtime/build/vendor/node-types/web-globals/events.d.ts +97 -0
- package/dist/runtime/build/vendor/node-types/web-globals/fetch.d.ts +62 -0
- package/dist/runtime/build/vendor/node-types/web-globals/navigator.d.ts +25 -0
- package/dist/runtime/build/vendor/node-types/web-globals/storage.d.ts +24 -0
- package/dist/runtime/build/vendor/node-types/web-globals/streams.d.ts +22 -0
- package/dist/runtime/build/vendor/node-types/worker_threads.d.ts +894 -0
- package/dist/runtime/build/vendor/node-types/zlib.d.ts +768 -0
- package/dist/runtime/build/vendor/node_modules/csstype/LICENSE +19 -0
- package/dist/runtime/build/vendor/node_modules/csstype/index.d.ts +22569 -0
- package/dist/runtime/build/vendor/node_modules/csstype/index.js.flow +6863 -0
- package/dist/runtime/build/vendor/node_modules/csstype/package.json +70 -0
- package/dist/runtime/build/vendor/node_modules/seroval/LICENSE +7 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/development/index.cjs +4232 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/production/index.cjs +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/development/index.mjs +4209 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/production/index.mjs +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/Serializer.d.ts +28 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/base-primitives.d.ts +28 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/compat.d.ts +15 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constants.d.ts +105 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constructors.d.ts +50 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/async-parser.d.ts +20 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/deserializer.d.ts +52 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/parser.d.ts +62 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/serializer.d.ts +103 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/sync-parser.d.ts +61 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/cross/index.d.ts +24 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/errors.d.ts +47 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/function-string.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/keys.d.ts +4 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/literals.d.ts +10 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/node.d.ts +8 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/opaque-reference.d.ts +9 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/plugin.d.ts +52 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/reference.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/sequence.d.ts +11 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/special-reference.d.ts +16 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/stream.d.ts +17 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/string.d.ts +4 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/symbols.d.ts +14 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/tree/index.d.ts +21 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/types.d.ts +233 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/error.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-identifier.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-object-flag.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/is-valid-identifier.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/promise-to-result.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/typed-array.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/valid-properties.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/index.d.ts +18 -0
- package/dist/runtime/build/vendor/node_modules/seroval/package.json +67 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/Serializer.ts +119 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/base-primitives.ts +537 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/compat.ts +23 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/constants.ts +202 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/constructors.ts +265 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/async-parser.ts +666 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/deserializer.ts +832 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/parser.ts +335 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/serializer.ts +1524 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/sync-parser.ts +943 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/cross/index.ts +190 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/errors.ts +196 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/function-string.ts +31 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/keys.ts +17 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/literals.ts +43 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/node.ts +40 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/opaque-reference.ts +9 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/plugin.ts +105 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/reference.ts +66 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/sequence.ts +59 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/special-reference.ts +42 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/stream.ts +71 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/string.ts +86 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/symbols.ts +20 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/tree/index.ts +134 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/types.ts +377 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/error.ts +73 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-identifier.ts +18 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-object-flag.ts +14 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/is-valid-identifier.ts +12 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/promise-to-result.ts +9 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/typed-array.ts +56 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/valid-properties.ts +34 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/index.ts +36 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/LICENSE +7 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/development/web.cjs +826 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/production/web.cjs +1 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/development/web.mjs +803 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/production/web.mjs +1 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/abort-signal.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/blob.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/custom-event.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/dom-exception.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/event.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/file.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/form-data.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/headers.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/image-data.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/index.d.ts +15 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/readable-stream.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/request.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/response.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url-search-params.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/package.json +70 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/abort-signal.ts +131 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/blob.ts +41 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/custom-event.ts +66 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/dom-exception.ts +57 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/event.ts +62 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/file.ts +50 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/form-data.ts +105 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/headers.ts +49 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/image-data.ts +74 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/index.ts +14 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/readable-stream.ts +148 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/request.ts +82 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/response.ts +65 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url-search-params.ts +40 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url.ts +37 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.cjs +824 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.js +770 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.cjs +1808 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.js +1753 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/jsx-runtime.d.ts +1 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/package.json +243 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.cjs +133 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.js +121 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.cjs +463 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.js +454 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/package.json +46 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/index.d.ts +12 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/modifiers.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/mutable.d.ts +5 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/server.d.ts +17 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/store.d.ts +108 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/index.d.ts +23 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/jsx.d.ts +4253 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/array.d.ts +44 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/observable.d.ts +36 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/scheduler.d.ts +10 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/signal.d.ts +581 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/Suspense.d.ts +26 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/component.d.ts +111 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/flow.d.ts +118 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/hydration.d.ts +24 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/index.d.ts +4 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/server/index.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/server/reactive.d.ts +98 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/server/rendering.d.ts +160 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.cjs +900 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.js +786 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.cjs +884 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.js +772 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/package.json +46 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.cjs +12 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.js +10 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/package.json +15 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/types/index.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/client.d.ts +93 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/core.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/index.d.ts +50 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/jsx.d.ts +1 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server-mock.d.ts +65 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server.d.ts +187 -0
- package/dist/runtime/build/worker.mjs +293415 -0
- package/dist/runtime/catalog/sdk-natives.json +655 -0
- package/dist/runtime/cli/iota-ext.mjs +1028 -0
- package/dist/runtime/client-host/entry.d.ts +10 -0
- package/dist/runtime/client-host/entry.js +124 -0
- package/dist/runtime/client-host/hooks.d.ts +43 -0
- package/dist/runtime/client-host/hooks.js +94 -0
- package/dist/runtime/client-host/index.d.ts +9 -0
- package/dist/runtime/client-host/index.js +9 -0
- package/dist/runtime/client-host/islands.d.ts +44 -0
- package/dist/runtime/client-host/islands.js +165 -0
- package/dist/runtime/client-host/kit.d.ts +10 -0
- package/dist/runtime/client-host/kit.js +37 -0
- package/dist/runtime/client-host/page.d.ts +53 -0
- package/dist/runtime/client-host/page.js +217 -0
- package/dist/runtime/client-host/params.d.ts +8 -0
- package/dist/runtime/client-host/params.js +36 -0
- package/dist/runtime/client-host/protocol.d.ts +78 -0
- package/dist/runtime/client-host/protocol.js +26 -0
- package/dist/runtime/client-host/shared.d.ts +12 -0
- package/dist/runtime/client-host/shared.js +49 -0
- package/dist/runtime/client-host/shell.d.ts +88 -0
- package/dist/runtime/client-host/shell.js +195 -0
- package/dist/runtime/client-host/slots.d.ts +54 -0
- package/dist/runtime/client-host/slots.js +90 -0
- package/dist/runtime/client-host/styles.d.ts +7 -0
- package/dist/runtime/client-host/styles.js +61 -0
- package/dist/runtime/client-host/transport.d.ts +45 -0
- package/dist/runtime/client-host/transport.js +115 -0
- package/dist/runtime/client.d.ts +226 -0
- package/dist/runtime/client.js +121 -0
- package/dist/runtime/contracts.d.ts +204 -0
- package/dist/runtime/contracts.js +195 -0
- package/dist/runtime/docs/authoring.md +1609 -0
- package/dist/runtime/docs/example/docs/en/admin/limits.md +10 -0
- package/dist/runtime/docs/example/docs/en/getting-started.md +13 -0
- package/dist/runtime/docs/example/docs/en/points.md +9 -0
- package/dist/runtime/docs/example/docs/ru/getting-started.md +12 -0
- package/dist/runtime/docs/example/package.json +27 -0
- package/dist/runtime/docs/example/src/ClientScreen.tsx +10 -0
- package/dist/runtime/docs/example/src/RedemptionScreen.tsx +7 -0
- package/dist/runtime/docs/example/src/RewardsScreen.module.css +13 -0
- package/dist/runtime/docs/example/src/RewardsScreen.tsx +51 -0
- package/dist/runtime/docs/example/src/client.tsx +40 -0
- package/dist/runtime/docs/example/src/contracts.ts +132 -0
- package/dist/runtime/docs/example/src/css-modules.d.ts +5 -0
- package/dist/runtime/docs/example/src/server.test.ts +156 -0
- package/dist/runtime/docs/example/src/server.ts +188 -0
- package/dist/runtime/docs/example/tsconfig.json +16 -0
- package/dist/runtime/entity.d.ts +237 -0
- package/dist/runtime/entity.js +201 -0
- package/dist/runtime/fakes.d.ts +80 -0
- package/dist/runtime/fakes.js +88 -0
- package/dist/runtime/fixtures.d.ts +34 -0
- package/dist/runtime/fixtures.js +60 -0
- package/dist/runtime/help.d.ts +22 -0
- package/dist/runtime/help.js +51 -0
- package/dist/runtime/host/context.mjs +392 -0
- package/dist/runtime/host/errors.mjs +64 -0
- package/dist/runtime/host/loader.mjs +28 -0
- package/dist/runtime/host/protocol.mjs +4 -0
- package/dist/runtime/host/register.mjs +8 -0
- package/dist/runtime/host/sdk/assert.mjs +153 -0
- package/dist/runtime/host/sdk/client-host/hooks.mjs +86 -0
- package/dist/runtime/host/sdk/client-host/protocol.mjs +30 -0
- package/dist/runtime/host/sdk/client-host/slots.mjs +82 -0
- package/dist/runtime/host/sdk/client-host/styles.mjs +45 -0
- package/dist/runtime/host/sdk/client-host/transport.mjs +102 -0
- package/dist/runtime/host/sdk/client.mjs +115 -0
- package/dist/runtime/host/sdk/contracts.mjs +185 -0
- package/dist/runtime/host/sdk/entity.mjs +183 -0
- package/dist/runtime/host/sdk/fakes.mjs +88 -0
- package/dist/runtime/host/sdk/fixtures.mjs +56 -0
- package/dist/runtime/host/sdk/help.mjs +37 -0
- package/dist/runtime/host/sdk/index.mjs +83 -0
- package/dist/runtime/host/sdk/kit.mjs +11 -0
- package/dist/runtime/host/sdk/manifest.mjs +276 -0
- package/dist/runtime/host/sdk/model.mjs +4 -0
- package/dist/runtime/host/sdk/resource.mjs +34 -0
- package/dist/runtime/host/sdk/schema.mjs +75 -0
- package/dist/runtime/host/sdk/server.mjs +43 -0
- package/dist/runtime/host/sdk/testhost.mjs +992 -0
- package/dist/runtime/host/sdk/testing.mjs +21 -0
- package/dist/runtime/host/sdk/wire.mjs +207 -0
- package/dist/runtime/host/worker.mjs +252 -0
- package/dist/runtime/index.d.ts +10 -0
- package/dist/runtime/index.js +5 -0
- package/dist/runtime/kit.d.ts +5 -0
- package/dist/runtime/kit.js +14 -0
- package/dist/runtime/manifest.d.ts +17 -0
- package/dist/runtime/manifest.js +323 -0
- package/dist/runtime/model.d.ts +224 -0
- package/dist/runtime/model.js +3 -0
- package/dist/runtime/resource.d.ts +31 -0
- package/dist/runtime/resource.js +35 -0
- package/dist/runtime/schema.d.ts +97 -0
- package/dist/runtime/schema.js +73 -0
- package/dist/runtime/server.d.ts +445 -0
- package/dist/runtime/server.js +41 -0
- package/dist/runtime/testhost.d.ts +216 -0
- package/dist/runtime/testhost.js +1146 -0
- package/dist/runtime/testing.d.ts +10 -0
- package/dist/runtime/testing.js +7 -0
- package/dist/runtime/wire.d.ts +26 -0
- package/dist/runtime/wire.js +236 -0
- package/dist/sdk-identity.cjs +3 -3
- package/dist/sdk-identity.js +3 -3
- package/dist/sdk-identity.json +2 -2
- package/dist/solid-ui/embedded-css.d.ts +2 -0
- package/dist/solid-ui/embedded-css.js +1 -0
- package/dist/solid-ui/embedded.css +2 -0
- package/dist/testing/components.d.ts +73 -0
- package/dist/testing/components.js +96 -0
- package/dist/testing/htmx.d.ts +44 -0
- package/dist/testing/htmx.js +284 -0
- package/dist/testing/index.d.ts +4 -41
- package/dist/testing/index.js +3 -206
- package/dist/testing/scenarios.d.ts +83 -0
- package/dist/testing/scenarios.js +74 -0
- package/dist/testing/wait.d.ts +7 -0
- package/dist/testing/wait.js +19 -0
- package/package.json +33 -2
- package/dist/lens/TablePanel-C09tzJOL.js +0 -980
- package/dist/lens/index-DcVtZneD.js +0 -18473
- package/dist/lens/runtime/recovery.d.ts +0 -26
- package/dist/lens/runtime/recovery.d.ts.map +0 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import type { Component } from 'solid-js';
|
|
2
|
+
import type { AtomicCommand, Column, Command, DomainError, InputOf, Issue, PathParamNames, Permission, Query, ResultOf, Route, SlotRef } from './contracts.ts';
|
|
3
|
+
import type { ImplKind, Json, Label, NavGroupJSON, NavPatchJSON, PaletteEntryJSON, WorkspaceJSON } from './model.ts';
|
|
4
|
+
import { type Contract } from './resource.ts';
|
|
5
|
+
import type { AnySchema, Infer } from './schema.ts';
|
|
6
|
+
/** How a client value without an explicit ID is named at manifest collection. */
|
|
7
|
+
export type ImplicitId = 'export' | 'navigation' | 'shell';
|
|
8
|
+
export interface ClientValue<K extends 'page' | 'navigation' | 'slot' | 'cell' | 'shell' = 'page'> extends Contract<string, K> {
|
|
9
|
+
readonly implicitId?: ImplicitId;
|
|
10
|
+
}
|
|
11
|
+
export interface NavSpec {
|
|
12
|
+
label: Label;
|
|
13
|
+
group?: string;
|
|
14
|
+
parent?: string;
|
|
15
|
+
icon?: string;
|
|
16
|
+
order?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface PageProps<P = Record<string, string>> {
|
|
19
|
+
readonly params: P;
|
|
20
|
+
}
|
|
21
|
+
export interface Page<P = Record<string, string>> extends ClientValue<'page'> {
|
|
22
|
+
readonly component: Component<PageProps<P>>;
|
|
23
|
+
}
|
|
24
|
+
export interface PageSpec<P> {
|
|
25
|
+
nav?: NavSpec;
|
|
26
|
+
permission?: Permission;
|
|
27
|
+
component: Component<PageProps<P>>;
|
|
28
|
+
}
|
|
29
|
+
/** Props of a page declared by path: each `:name` segment is a string. */
|
|
30
|
+
export type PathProps<Path extends string> = {
|
|
31
|
+
readonly [K in PathParamNames<Path>]: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* A page bound to a route (typed params) or declared with its own ID and path.
|
|
35
|
+
* - Own route: the page ID is `<route id>.page`.
|
|
36
|
+
* - Route of the platform or another package (from the kit): a screen replacement. The page gets an ID in this
|
|
37
|
+
* package (`<namespace>.<export name>`), `route` names the replaced route, and it is only a candidate: it becomes
|
|
38
|
+
* active through an explicit `screen` binding at activation.
|
|
39
|
+
*/
|
|
40
|
+
export declare function page<R extends Route>(route: R, spec: PageSpec<Infer<R['params']>>): Page<Infer<R['params']>>;
|
|
41
|
+
export declare function page<const Path extends string>(id: string, spec: PageSpec<PathProps<Path>> & {
|
|
42
|
+
path: Path;
|
|
43
|
+
}): Page<PathProps<Path>>;
|
|
44
|
+
export interface NavigationSpec {
|
|
45
|
+
id?: string;
|
|
46
|
+
groups?: readonly NavGroupJSON[];
|
|
47
|
+
/** Hide, rename or move existing nodes by their resource ID (core or other packages). */
|
|
48
|
+
patches?: readonly NavPatchJSON[];
|
|
49
|
+
workspaces?: readonly WorkspaceJSON[];
|
|
50
|
+
/** Command-palette / search entries pointing at pages or commands. */
|
|
51
|
+
palette?: readonly PaletteEntryJSON[];
|
|
52
|
+
}
|
|
53
|
+
export interface Navigation extends ClientValue<'navigation'> {
|
|
54
|
+
}
|
|
55
|
+
export declare function navigation(spec: NavigationSpec): Navigation;
|
|
56
|
+
/** A contribution built by `slot()`. */
|
|
57
|
+
export interface SlotValue<P extends object = Record<string, Json>> extends ClientValue<'slot'> {
|
|
58
|
+
readonly component: Component<P>;
|
|
59
|
+
}
|
|
60
|
+
export interface SlotOptions {
|
|
61
|
+
/** Explicit ID; default `<namespace>.<export name>`. */
|
|
62
|
+
id?: string;
|
|
63
|
+
/** Position among the contributions of the slot, ascending; ties break by package, then ID. Default 0. */
|
|
64
|
+
order?: number;
|
|
65
|
+
/** Only viewers holding it get this contribution (checked on the server, on top of the slot's own permission). */
|
|
66
|
+
permission?: Permission;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Contributes a component to a slot (`target` is a typed `SlotRef` from the kit or `defineSlot`, or a slot ID).
|
|
70
|
+
* A contribution is additive: it needs no binding, it is active while its package version is, and every
|
|
71
|
+
* contribution of every active package is mounted, in `order`. The component receives the host page's props.
|
|
72
|
+
*/
|
|
73
|
+
export declare function slot<P extends object>(target: SlotRef<P> | string, component: Component<P>, opts?: SlotOptions): SlotValue<P>;
|
|
74
|
+
export interface CellProps<V = Json> {
|
|
75
|
+
/** The column's value for this row (wire JSON: int64 and decimal are strings), `null` when absent. */
|
|
76
|
+
readonly value: V;
|
|
77
|
+
/**
|
|
78
|
+
* The row's contributed values by column ID (only columns the viewer may read) and `ref`, the native record
|
|
79
|
+
* (`{ entity, key }`).
|
|
80
|
+
*/
|
|
81
|
+
readonly row: Readonly<Record<string, Json>>;
|
|
82
|
+
}
|
|
83
|
+
export interface Cell<V = Json> extends ClientValue<'cell'> {
|
|
84
|
+
readonly component: Component<CellProps<V>>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Custom renderer of a `column(...)` in the native list. The list stays server-rendered (the standard cell is the
|
|
88
|
+
* fallback until this module loads, or if it fails); filters, sorting and exports never use it: they read the raw
|
|
89
|
+
* value.
|
|
90
|
+
*/
|
|
91
|
+
export declare function cell<V>(column: Column<string, V>, component: Component<CellProps<V>>, opts?: {
|
|
92
|
+
id?: string;
|
|
93
|
+
}): Cell<V>;
|
|
94
|
+
export interface NavItemModel {
|
|
95
|
+
readonly id: string;
|
|
96
|
+
readonly label: string;
|
|
97
|
+
readonly href: string;
|
|
98
|
+
readonly icon?: string;
|
|
99
|
+
readonly active: boolean;
|
|
100
|
+
readonly children: readonly NavItemModel[];
|
|
101
|
+
}
|
|
102
|
+
export interface NavGroupModel {
|
|
103
|
+
readonly id: string;
|
|
104
|
+
readonly label: string;
|
|
105
|
+
readonly icon?: string;
|
|
106
|
+
readonly items: readonly NavItemModel[];
|
|
107
|
+
}
|
|
108
|
+
export interface NavWorkspaceModel {
|
|
109
|
+
readonly id: string;
|
|
110
|
+
readonly label: string;
|
|
111
|
+
readonly icon?: string;
|
|
112
|
+
readonly active: boolean;
|
|
113
|
+
}
|
|
114
|
+
export interface PaletteModel {
|
|
115
|
+
readonly id: string;
|
|
116
|
+
readonly label: string;
|
|
117
|
+
readonly href: string;
|
|
118
|
+
readonly keywords: readonly string[];
|
|
119
|
+
}
|
|
120
|
+
/** Navigation projected by Go from the activated manifest, localized and permission-filtered. */
|
|
121
|
+
export interface NavModel {
|
|
122
|
+
readonly workspaces: readonly NavWorkspaceModel[];
|
|
123
|
+
/** Groups of the active workspace. */
|
|
124
|
+
readonly groups: readonly NavGroupModel[];
|
|
125
|
+
readonly palette: readonly PaletteModel[];
|
|
126
|
+
}
|
|
127
|
+
export interface UserModel {
|
|
128
|
+
readonly id: string;
|
|
129
|
+
readonly name: string;
|
|
130
|
+
readonly email?: string;
|
|
131
|
+
readonly avatarUrl?: string;
|
|
132
|
+
readonly permissions: readonly string[];
|
|
133
|
+
}
|
|
134
|
+
export type ThemeMode = 'light' | 'dark' | 'system';
|
|
135
|
+
export interface ThemeModel {
|
|
136
|
+
readonly mode: ThemeMode;
|
|
137
|
+
readonly resolved: 'light' | 'dark';
|
|
138
|
+
set(mode: ThemeMode): void;
|
|
139
|
+
}
|
|
140
|
+
export interface NotificationModel {
|
|
141
|
+
readonly id: string;
|
|
142
|
+
readonly title: string;
|
|
143
|
+
readonly body: string;
|
|
144
|
+
readonly href?: string;
|
|
145
|
+
readonly read: boolean;
|
|
146
|
+
readonly createdAt: string;
|
|
147
|
+
}
|
|
148
|
+
export interface NotificationsModel {
|
|
149
|
+
readonly unread: number;
|
|
150
|
+
readonly items: readonly NotificationModel[];
|
|
151
|
+
markRead(id: string): void;
|
|
152
|
+
}
|
|
153
|
+
export interface ShellProps {
|
|
154
|
+
/** Host-owned element that contains the current page (legacy or Solid); render it once, e.g. `{props.outlet}`. */
|
|
155
|
+
readonly outlet: HTMLElement;
|
|
156
|
+
readonly nav: NavModel;
|
|
157
|
+
readonly user: UserModel;
|
|
158
|
+
readonly locale: string;
|
|
159
|
+
readonly theme: ThemeModel;
|
|
160
|
+
readonly notifications: NotificationsModel;
|
|
161
|
+
logout(): Promise<void>;
|
|
162
|
+
}
|
|
163
|
+
export interface Shell extends ClientValue<'shell'> {
|
|
164
|
+
readonly component: Component<ShellProps>;
|
|
165
|
+
}
|
|
166
|
+
/** Replaces the whole authenticated shell around every page. */
|
|
167
|
+
export declare function shellRenderer(component: Component<ShellProps>, opts?: {
|
|
168
|
+
id?: string;
|
|
169
|
+
}): Shell;
|
|
170
|
+
export interface RemoteErrorBody {
|
|
171
|
+
readonly kind: 'domain' | 'validation' | 'denied' | 'internal';
|
|
172
|
+
readonly code: string;
|
|
173
|
+
readonly message?: string;
|
|
174
|
+
readonly params?: Json;
|
|
175
|
+
readonly issues?: readonly {
|
|
176
|
+
readonly code: string;
|
|
177
|
+
readonly phase: 'input' | 'write';
|
|
178
|
+
readonly source: string;
|
|
179
|
+
readonly path: readonly string[];
|
|
180
|
+
readonly params: Json;
|
|
181
|
+
}[];
|
|
182
|
+
}
|
|
183
|
+
export declare class RemoteError extends Error {
|
|
184
|
+
readonly body: RemoteErrorBody;
|
|
185
|
+
constructor(body: RemoteErrorBody);
|
|
186
|
+
}
|
|
187
|
+
export { RuntimeProvider, useCommand, useQuery } from './client-host/hooks.ts';
|
|
188
|
+
export { helpDocHref, helpHref } from './help.ts';
|
|
189
|
+
export type { HelpHrefOptions } from './help.ts';
|
|
190
|
+
export { Slot } from './client-host/slots.ts';
|
|
191
|
+
export type { SlotProps } from './client-host/slots.ts';
|
|
192
|
+
export type { CallError, CommandResult, QueryResult } from './client-host/hooks.ts';
|
|
193
|
+
export { TransportError, UnauthenticatedError } from './client-host/transport.ts';
|
|
194
|
+
/** A remote error narrowed to a declared domain error: `params` has the contract's type. */
|
|
195
|
+
export interface DomainRemoteError<Id extends string, P> extends RemoteError {
|
|
196
|
+
readonly body: RemoteErrorBody & {
|
|
197
|
+
readonly kind: 'domain';
|
|
198
|
+
readonly code: Id;
|
|
199
|
+
readonly params: P;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/** One validation issue narrowed to a declared issue contract. */
|
|
203
|
+
export interface TypedRemoteIssue<Id extends string, P> {
|
|
204
|
+
readonly code: Id;
|
|
205
|
+
readonly phase: 'input' | 'write';
|
|
206
|
+
readonly source: string;
|
|
207
|
+
readonly path: readonly string[];
|
|
208
|
+
readonly params: P;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* `if (isError(err, NotActive)) err.body.params.status`: true when `err` is that declared domain error
|
|
212
|
+
* (and its params match the contract schema).
|
|
213
|
+
*/
|
|
214
|
+
export declare function isError<Id extends string, P extends AnySchema>(err: unknown, error: DomainError<Id, P>): err is DomainRemoteError<Id, Infer<P>>;
|
|
215
|
+
/** The validation issues of `err` that are `issue`, with typed params (other issues and malformed params are skipped). */
|
|
216
|
+
export declare function issuesOf<Id extends string, P extends AnySchema>(err: unknown, issue: Issue<Id, P>): readonly TypedRemoteIssue<Id, Infer<P>>[];
|
|
217
|
+
/** Provided by the client host; carries wire JSON only. */
|
|
218
|
+
export interface ClientTransport {
|
|
219
|
+
invoke(kind: Extract<ImplKind, 'query' | 'command' | 'atomic'>, resource: string, input: Json): Promise<Json>;
|
|
220
|
+
}
|
|
221
|
+
export interface ApiClient {
|
|
222
|
+
query<Q extends Query>(query: Q, input: InputOf<Q>): Promise<Infer<Q['output']>>;
|
|
223
|
+
command<C extends Command | AtomicCommand>(command: C, input: InputOf<C>): Promise<ResultOf<C>>;
|
|
224
|
+
}
|
|
225
|
+
/** Typed client over a transport: validates input and output against the contract schemas. */
|
|
226
|
+
export declare function createClient(transport: ClientTransport): ApiClient;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { contract, omitEmpty } from "./resource.js";
|
|
2
|
+
import { decode, encode, validate } from "./wire.js";
|
|
3
|
+
export function page(target, spec) {
|
|
4
|
+
const isRoute = typeof target !== 'string';
|
|
5
|
+
const replacement = isRoute && target.foreign;
|
|
6
|
+
const id = isRoute ? (replacement ? '' : `${target.id}.page`) : target;
|
|
7
|
+
const path = isRoute ? target.path : spec.path;
|
|
8
|
+
if (path === undefined)
|
|
9
|
+
throw new Error(`page ${id}: path is required`);
|
|
10
|
+
const resource = omitEmpty({
|
|
11
|
+
id,
|
|
12
|
+
kind: 'page',
|
|
13
|
+
path,
|
|
14
|
+
route: isRoute ? target.id : undefined,
|
|
15
|
+
nav: spec.nav,
|
|
16
|
+
permission: spec.permission?.id,
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
...contract({ ...resource, id, kind: 'page' }),
|
|
20
|
+
component: spec.component,
|
|
21
|
+
...(replacement ? { implicitId: 'export' } : {}),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function navigation(spec) {
|
|
25
|
+
const id = spec.id ?? '';
|
|
26
|
+
const resource = omitEmpty({
|
|
27
|
+
id,
|
|
28
|
+
kind: 'navigation',
|
|
29
|
+
groups: spec.groups && [...spec.groups],
|
|
30
|
+
patches: spec.patches && [...spec.patches],
|
|
31
|
+
workspaces: spec.workspaces && [...spec.workspaces],
|
|
32
|
+
palette: spec.palette && [...spec.palette],
|
|
33
|
+
});
|
|
34
|
+
return { ...contract({ ...resource, id, kind: 'navigation' }), ...(spec.id ? {} : { implicitId: 'navigation' }) };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Contributes a component to a slot (`target` is a typed `SlotRef` from the kit or `defineSlot`, or a slot ID).
|
|
38
|
+
* A contribution is additive: it needs no binding, it is active while its package version is, and every
|
|
39
|
+
* contribution of every active package is mounted, in `order`. The component receives the host page's props.
|
|
40
|
+
*/
|
|
41
|
+
export function slot(target, component, opts = {}) {
|
|
42
|
+
const targetId = typeof target === 'string' ? target : target.slotId;
|
|
43
|
+
const id = opts.id ?? '';
|
|
44
|
+
const resource = omitEmpty({ id, kind: 'slot', target: targetId, order: opts.order, permission: opts.permission?.id });
|
|
45
|
+
return { ...contract({ ...resource, id, kind: 'slot' }), component, ...(opts.id ? {} : { implicitId: 'export' }) };
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Custom renderer of a `column(...)` in the native list. The list stays server-rendered (the standard cell is the
|
|
49
|
+
* fallback until this module loads, or if it fails); filters, sorting and exports never use it: they read the raw
|
|
50
|
+
* value.
|
|
51
|
+
*/
|
|
52
|
+
export function cell(column, component, opts = {}) {
|
|
53
|
+
const id = opts.id ?? '';
|
|
54
|
+
const resource = omitEmpty({ id, kind: 'cell', target: column.id });
|
|
55
|
+
return { ...contract({ ...resource, id, kind: 'cell' }), component, ...(opts.id ? {} : { implicitId: 'export' }) };
|
|
56
|
+
}
|
|
57
|
+
/** Replaces the whole authenticated shell around every page. */
|
|
58
|
+
export function shellRenderer(component, opts = {}) {
|
|
59
|
+
const id = opts.id ?? '';
|
|
60
|
+
return { ...contract({ id, kind: 'shell' }), component, ...(opts.id ? {} : { implicitId: 'shell' }) };
|
|
61
|
+
}
|
|
62
|
+
export class RemoteError extends Error {
|
|
63
|
+
body;
|
|
64
|
+
constructor(body) {
|
|
65
|
+
super(body.message ?? body.code);
|
|
66
|
+
this.name = 'RemoteError';
|
|
67
|
+
this.body = body;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export { RuntimeProvider, useCommand, useQuery } from "./client-host/hooks.js";
|
|
71
|
+
export { helpDocHref, helpHref } from "./help.js";
|
|
72
|
+
export { Slot } from "./client-host/slots.js";
|
|
73
|
+
export { TransportError, UnauthenticatedError } from "./client-host/transport.js";
|
|
74
|
+
/**
|
|
75
|
+
* `if (isError(err, NotActive)) err.body.params.status`: true when `err` is that declared domain error
|
|
76
|
+
* (and its params match the contract schema).
|
|
77
|
+
*/
|
|
78
|
+
export function isError(err, error) {
|
|
79
|
+
if (!(err instanceof RemoteError) || err.body.kind !== 'domain' || err.body.code !== error.id)
|
|
80
|
+
return false;
|
|
81
|
+
try {
|
|
82
|
+
validate(error.params, err.body.params);
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/** The validation issues of `err` that are `issue`, with typed params (other issues and malformed params are skipped). */
|
|
90
|
+
export function issuesOf(err, issue) {
|
|
91
|
+
if (!(err instanceof RemoteError) || err.body.kind !== 'validation')
|
|
92
|
+
return [];
|
|
93
|
+
const out = [];
|
|
94
|
+
for (const i of err.body.issues ?? []) {
|
|
95
|
+
if (i.code !== issue.id)
|
|
96
|
+
continue;
|
|
97
|
+
try {
|
|
98
|
+
validate(issue.params, i.params);
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
out.push({ code: issue.id, phase: i.phase, source: i.source, path: i.path, params: i.params });
|
|
104
|
+
}
|
|
105
|
+
return out;
|
|
106
|
+
}
|
|
107
|
+
/** Typed client over a transport: validates input and output against the contract schemas. */
|
|
108
|
+
export function createClient(transport) {
|
|
109
|
+
async function query(q, input) {
|
|
110
|
+
const raw = await transport.invoke('query', q.id, encode(q.input, input));
|
|
111
|
+
// decode validates against q.output, so the value has the contract's output type
|
|
112
|
+
return decode(q.output, raw);
|
|
113
|
+
}
|
|
114
|
+
async function command(c, input) {
|
|
115
|
+
const raw = await transport.invoke(c.atomic ? 'atomic' : 'command', c.id, encode(c.input, input));
|
|
116
|
+
const output = c.output;
|
|
117
|
+
// output is undefined exactly when ResultOf<C> is void
|
|
118
|
+
return (output === undefined ? undefined : decode(output, raw));
|
|
119
|
+
}
|
|
120
|
+
return { query, command };
|
|
121
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import type { Json, Label } from './model.ts';
|
|
2
|
+
import { type Contract } from './resource.ts';
|
|
3
|
+
import type { AnyField, AnyEntity, BoundMeta, FieldValue, Hint } from './entity.ts';
|
|
4
|
+
import type { AnySchema, Infer, ObjectSchema, Schema } from './schema.ts';
|
|
5
|
+
export type OutOf<O> = O extends AnySchema ? Infer<O> : void;
|
|
6
|
+
export interface Permission<Id extends string = string> extends Contract<Id, 'permission'> {
|
|
7
|
+
readonly label: Label;
|
|
8
|
+
}
|
|
9
|
+
export declare function permission<const Id extends string>(id: Id, spec: {
|
|
10
|
+
label: Label;
|
|
11
|
+
}): Permission<Id>;
|
|
12
|
+
/** Brand of issue instances: only `Issue.at(path, params)` produces them, `validation()` accepts nothing else. */
|
|
13
|
+
export declare const ISSUE: unique symbol;
|
|
14
|
+
export interface ValidationIssue<P = unknown> {
|
|
15
|
+
readonly [ISSUE]: true;
|
|
16
|
+
readonly code: string;
|
|
17
|
+
readonly path: readonly string[];
|
|
18
|
+
readonly params: P;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Error thrown by handlers; the host maps it to the wire error `{kind, code, params, issues}`.
|
|
22
|
+
* Never constructed directly: use `DomainError.of(params)` or `validation(Issue.at(path, params))`.
|
|
23
|
+
*/
|
|
24
|
+
export declare class ContractError<P = unknown> extends Error {
|
|
25
|
+
readonly kind: 'domain' | 'validation';
|
|
26
|
+
readonly code: string;
|
|
27
|
+
readonly params: P;
|
|
28
|
+
readonly issues: readonly ValidationIssue[];
|
|
29
|
+
private constructor();
|
|
30
|
+
}
|
|
31
|
+
export interface DomainError<Id extends string = string, P extends AnySchema = AnySchema> extends Contract<Id, 'domainError'> {
|
|
32
|
+
readonly params: P;
|
|
33
|
+
/** `throw NotActive.of({ status })` */
|
|
34
|
+
of(params: Infer<P>): ContractError<Infer<P>>;
|
|
35
|
+
}
|
|
36
|
+
export declare function domainError<const Id extends string, P extends AnySchema>(id: Id, params: P): DomainError<Id, P>;
|
|
37
|
+
export interface Issue<Id extends string = string, P extends AnySchema = AnySchema> extends Contract<Id, 'issue'> {
|
|
38
|
+
readonly params: P;
|
|
39
|
+
/** `validation(TooLong.at(["notes"], { max: 10 }))` */
|
|
40
|
+
at(path: readonly string[], params: Infer<P>): ValidationIssue<Infer<P>>;
|
|
41
|
+
}
|
|
42
|
+
export declare function issue<const Id extends string, P extends AnySchema>(id: Id, params: P): Issue<Id, P>;
|
|
43
|
+
/** `throw validation(TooLong.at(['notes'], { max: 10 }))`. Accepts only instances produced by `Issue.at`. */
|
|
44
|
+
export declare function validation(...issues: readonly [ValidationIssue, ...ValidationIssue[]]): ContractError<null>;
|
|
45
|
+
interface CallableSpec<I extends AnySchema, O extends AnySchema | undefined> {
|
|
46
|
+
input: I;
|
|
47
|
+
output?: O;
|
|
48
|
+
errors?: readonly DomainError[];
|
|
49
|
+
permission?: Permission;
|
|
50
|
+
label?: Label;
|
|
51
|
+
description?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface Query<Id extends string = string, I extends AnySchema = AnySchema, O extends AnySchema = AnySchema> extends Contract<Id, 'query'> {
|
|
54
|
+
readonly input: I;
|
|
55
|
+
readonly output: O;
|
|
56
|
+
}
|
|
57
|
+
export declare function query<const Id extends string, I extends AnySchema, O extends AnySchema>(id: Id, spec: CallableSpec<I, O> & {
|
|
58
|
+
output: O;
|
|
59
|
+
}): Query<Id, I, O>;
|
|
60
|
+
export interface Command<Id extends string = string, I extends AnySchema = AnySchema, O extends AnySchema | undefined = AnySchema | undefined, A extends boolean = boolean> extends Contract<Id, 'command'> {
|
|
61
|
+
readonly input: I;
|
|
62
|
+
readonly output: O;
|
|
63
|
+
/** Part of the public contract: every implementation, including replacements, receives `Tx`. */
|
|
64
|
+
readonly atomic: A;
|
|
65
|
+
}
|
|
66
|
+
export type OrdinaryCommand = Command<string, AnySchema, AnySchema | undefined, false>;
|
|
67
|
+
export type AtomicCommand = Command<string, AnySchema, AnySchema | undefined, true>;
|
|
68
|
+
/** An ordinary command is an intent with an async `CommandContext`; `atomic: true` runs wholly in one transaction. */
|
|
69
|
+
export declare function command<const Id extends string, I extends AnySchema, O extends AnySchema | undefined = undefined>(id: Id, spec: CallableSpec<I, O> & {
|
|
70
|
+
atomic: true;
|
|
71
|
+
}): Command<Id, I, O, true>;
|
|
72
|
+
export declare function command<const Id extends string, I extends AnySchema, O extends AnySchema | undefined = undefined>(id: Id, spec: CallableSpec<I, O> & {
|
|
73
|
+
atomic?: false;
|
|
74
|
+
}): Command<Id, I, O, false>;
|
|
75
|
+
/** A named atomic domain primitive; `tx.call` joins the caller's transaction. */
|
|
76
|
+
export interface Operation<Id extends string = string, I extends AnySchema = AnySchema, O extends AnySchema | undefined = AnySchema | undefined> extends Contract<Id, 'operation'> {
|
|
77
|
+
readonly input: I;
|
|
78
|
+
readonly output: O;
|
|
79
|
+
readonly atomic: true;
|
|
80
|
+
}
|
|
81
|
+
export declare function operation<const Id extends string, I extends AnySchema, O extends AnySchema | undefined = undefined>(id: Id, spec: CallableSpec<I, O>): Operation<Id, I, O>;
|
|
82
|
+
export type Callable = Operation | AtomicCommand;
|
|
83
|
+
export type InputOf<C extends {
|
|
84
|
+
readonly input: AnySchema;
|
|
85
|
+
}> = Infer<C['input']>;
|
|
86
|
+
export type ResultOf<C extends {
|
|
87
|
+
readonly output: AnySchema | undefined;
|
|
88
|
+
}> = OutOf<C['output']>;
|
|
89
|
+
export interface Event<Id extends string = string, S extends AnyEntity | undefined = AnyEntity | undefined, P extends AnySchema = AnySchema> extends Contract<Id, 'event'> {
|
|
90
|
+
readonly subject: S;
|
|
91
|
+
readonly payload: P;
|
|
92
|
+
}
|
|
93
|
+
export declare function event<const Id extends string, P extends AnySchema, S extends AnyEntity | undefined = undefined>(id: Id, spec: {
|
|
94
|
+
subject?: S;
|
|
95
|
+
payload: P;
|
|
96
|
+
description?: string;
|
|
97
|
+
}): Event<Id, S, P>;
|
|
98
|
+
export interface Notice<Id extends string = string, S extends AnyEntity | undefined = AnyEntity | undefined, P extends AnySchema = AnySchema> extends Contract<Id, 'notice'> {
|
|
99
|
+
readonly subject: S;
|
|
100
|
+
readonly payload: P;
|
|
101
|
+
}
|
|
102
|
+
export declare function notice<const Id extends string, P extends AnySchema, S extends AnyEntity | undefined = undefined>(id: Id, spec: {
|
|
103
|
+
subject?: S;
|
|
104
|
+
payload: P;
|
|
105
|
+
description?: string;
|
|
106
|
+
}): Notice<Id, S, P>;
|
|
107
|
+
/** Handle to a signal of a workflow, passed to `wf.waitFor`. */
|
|
108
|
+
export interface SignalRef<S extends AnySchema = AnySchema> {
|
|
109
|
+
readonly workflow: string;
|
|
110
|
+
readonly name: string;
|
|
111
|
+
readonly schema: S;
|
|
112
|
+
}
|
|
113
|
+
export interface Workflow<Id extends string = string, I extends AnySchema = AnySchema, O extends AnySchema | undefined = AnySchema | undefined, G extends Readonly<Record<string, AnySchema>> = Readonly<Record<string, AnySchema>>> extends Contract<Id, 'workflow'> {
|
|
114
|
+
readonly input: I;
|
|
115
|
+
readonly output: O;
|
|
116
|
+
readonly signals: {
|
|
117
|
+
readonly [K in keyof G]: SignalRef<G[K]>;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export declare function workflow<const Id extends string, I extends AnySchema, O extends AnySchema | undefined = undefined, G extends Readonly<Record<string, AnySchema>> = Record<never, AnySchema>>(id: Id, spec: {
|
|
121
|
+
input: I;
|
|
122
|
+
output?: O;
|
|
123
|
+
signals?: G;
|
|
124
|
+
description?: string;
|
|
125
|
+
}): Workflow<Id, I, O, G>;
|
|
126
|
+
/** Names of the `:name` segments of a path template, e.g. `'/p/:id/x/:n'` → `'id' | 'n'`. */
|
|
127
|
+
export type PathParamNames<P extends string> = P extends `${string}/:${infer Rest}` ? Rest extends `${infer Name}/${infer Tail}` ? Name | PathParamNames<`/${Tail}`> : Rest : never;
|
|
128
|
+
/** Kinds a path parameter may have: they must survive a URL segment unchanged. */
|
|
129
|
+
export type RouteParamKind = 'string' | 'uuid' | 'int' | 'int64';
|
|
130
|
+
/** The `params` schema a path requires: exactly its `:name` segments, each a required string/uuid/int/int64. */
|
|
131
|
+
export type RouteParams<Path extends string> = ObjectSchema<{
|
|
132
|
+
readonly [K in PathParamNames<Path>]: Schema<string | number, 'req', RouteParamKind>;
|
|
133
|
+
}>;
|
|
134
|
+
type NoExtraParams<Path extends string, P> = P extends ObjectSchema<infer S> ? [Exclude<keyof S & string, PathParamNames<Path>>] extends [never] ? unknown : Hint<`params has a key that is not a :segment of the path: ${Exclude<keyof S & string, PathParamNames<Path>>}`> : unknown;
|
|
135
|
+
export interface Route<Id extends string = string, P extends AnySchema = AnySchema, Path extends string = string> extends Contract<Id, 'route'> {
|
|
136
|
+
readonly path: Path;
|
|
137
|
+
readonly params: P;
|
|
138
|
+
}
|
|
139
|
+
/** Params must be exactly the `:name` segments of `path` (checked by types and at declaration). */
|
|
140
|
+
export declare function route<const Id extends string, const Path extends string, P extends RouteParams<Path>>(id: Id, spec: {
|
|
141
|
+
path: Path;
|
|
142
|
+
params: P & NoExtraParams<Path, P>;
|
|
143
|
+
}): Route<Id, P, Path>;
|
|
144
|
+
/** Concrete URL of a route: `/insurance/policies/:id` + `{ id }`. Params are validated and percent-encoded. */
|
|
145
|
+
export declare function href<R extends Route>(r: R, params: Infer<R['params']>): string;
|
|
146
|
+
export type ContactTargets = Readonly<Partial<Record<'sms' | 'email' | 'push', readonly string[]>>>;
|
|
147
|
+
/** Resolves a record recipient of `E` to channel targets. Implemented with `implement(...)` on the server. */
|
|
148
|
+
export interface ContactResolver<Id extends string = string, E extends AnyEntity = AnyEntity> extends Contract<Id, 'contactResolver'> {
|
|
149
|
+
readonly entity: E;
|
|
150
|
+
}
|
|
151
|
+
export declare function contactResolver<const Id extends string, E extends AnyEntity>(id: Id, entity: E): ContactResolver<Id, E>;
|
|
152
|
+
/** Business consent/opt-out rule for records of `E`; the decision applies per notice, channel and target. */
|
|
153
|
+
export interface DeliveryPolicy<Id extends string = string, E extends AnyEntity = AnyEntity> extends Contract<Id, 'deliveryPolicy'> {
|
|
154
|
+
readonly entity: E;
|
|
155
|
+
}
|
|
156
|
+
export declare function deliveryPolicy<const Id extends string, E extends AnyEntity>(id: Id, entity: E): DeliveryPolicy<Id, E>;
|
|
157
|
+
/** A native list owned by the platform (from the kit), e.g. `crm.lists.Clients`. */
|
|
158
|
+
export interface ListRef<Id extends string = string> {
|
|
159
|
+
readonly listId: Id;
|
|
160
|
+
}
|
|
161
|
+
export declare function nativeList<const Id extends string>(id: Id): ListRef<Id>;
|
|
162
|
+
declare const valueBrand: unique symbol;
|
|
163
|
+
export interface Column<Id extends string = string, V = Json> extends Contract<Id, 'column'> {
|
|
164
|
+
readonly list: string;
|
|
165
|
+
readonly [valueBrand]?: V;
|
|
166
|
+
}
|
|
167
|
+
/** A slot owned by the platform or another package; `P` are the props its contributions receive. */
|
|
168
|
+
export interface SlotRef<P extends object = Record<string, Json>> {
|
|
169
|
+
readonly slotId: string;
|
|
170
|
+
readonly [valueBrand]?: P;
|
|
171
|
+
}
|
|
172
|
+
/** A slot by ID. With the props schema the contributions' props are typed by it (the developer kit does this). */
|
|
173
|
+
export declare function slotRef<S extends ObjectSchema>(id: string, props: S): SlotRef<Infer<S>>;
|
|
174
|
+
export declare function slotRef<P extends object = Record<string, Json>>(id: string): SlotRef<P>;
|
|
175
|
+
/** A slot declaration (`defineSlot`): the contract of a place where packages mount components. */
|
|
176
|
+
export interface SlotDeclaration<Id extends string = string, P extends object = Record<string, Json>> extends Contract<Id, 'slot'>, SlotRef<P> {
|
|
177
|
+
}
|
|
178
|
+
export interface SlotSpec<S extends ObjectSchema> {
|
|
179
|
+
/** The props the host page passes to every contribution. */
|
|
180
|
+
props: S;
|
|
181
|
+
/** Contributions are mounted only for viewers who hold it (checked on the server). */
|
|
182
|
+
permission?: Permission;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Declares a slot of this package: a place in one of its own pages (`<Slot slot={…} props={…}/>` from
|
|
186
|
+
* `@iota-uz/sdk/runtime/client`) where any activated package may mount a component. Export it from the contracts
|
|
187
|
+
* graph like a route; other packages contribute through the developer kit (`slot(kit.Name, Component)`). Slots of
|
|
188
|
+
* the platform are declared by Go and arrive the same way, from the kit.
|
|
189
|
+
*/
|
|
190
|
+
export declare function defineSlot<const Id extends string, S extends ObjectSchema>(id: Id, spec: SlotSpec<S>): SlotDeclaration<Id, Infer<S>>;
|
|
191
|
+
export interface ColumnSpec {
|
|
192
|
+
id: string;
|
|
193
|
+
/** An overlay field, e.g. `ClientExtra.fields.loyaltyTier`. */
|
|
194
|
+
field: AnyField & BoundMeta;
|
|
195
|
+
label: Label;
|
|
196
|
+
filterable?: boolean;
|
|
197
|
+
sortable?: boolean;
|
|
198
|
+
exportable?: boolean;
|
|
199
|
+
}
|
|
200
|
+
/** Adds an overlay field as a column of a native list, filter, sort and export. */
|
|
201
|
+
export declare function column<const S extends ColumnSpec>(list: ListRef, spec: S & {
|
|
202
|
+
id: S['id'];
|
|
203
|
+
}): Column<S['id'], FieldValue<S['field']>>;
|
|
204
|
+
export {};
|