@camstack/server 1.2.943 → 1.2.945
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/CHANGELOG.md +26 -0
- package/closure-pins.json +350 -0
- package/dist/api/core/auth-sessions.procedures.js +18 -0
- package/dist/api/core/auth.router.js +19 -6
- package/dist/api/server-upload.js +17 -1
- package/dist/api/trpc/generated-cap-mounts.js +18 -1
- package/dist/api/trpc/generated-cap-routers.js +2662 -2542
- package/dist/auth/native-return.js +9 -3
- package/dist/auth/sso-routes.js +5 -1
- package/dist/core/addon/instance-lifecycle.js +4 -1
- package/dist/core/auth/handoff-code.service.js +35 -1
- package/dist/server-root/index.js +313 -70
- package/package.json +15 -11
- package/system/assets/apps-aggregator/icon.svg +5 -0
- package/system/dist/{action-index-B_cLRwXJ.js → action-index-Bcnb-jyg.js} +9 -1
- package/system/dist/{action-index-B1fgpQBt.mjs → action-index-DwPHO2nz.mjs} +9 -1
- package/system/dist/{addon-settings.cap-CZ4MC7ha.mjs → addon-settings.cap-CHpmuaQG.mjs} +1 -1
- package/system/dist/{addon-settings.cap-DrLdMFIe.js → addon-settings.cap-nZVHPo3X.js} +1 -1
- package/system/dist/{alert-episode-Be--PngO.mjs → alert-episode-D-1VUUkZ.mjs} +1 -1
- package/system/dist/{alert-episode-Bqktmt-i.js → alert-episode-DaQ3prSe.js} +1 -1
- package/system/dist/apps.cap-Bqb9NpYx.mjs +130 -0
- package/system/dist/apps.cap-CLjgnuUe.js +141 -0
- package/system/dist/{base-addon-CRsXtYFG.js → base-addon-BG7p06Hb.js} +136 -15
- package/system/dist/{base-addon-BcS6r1cT.mjs → base-addon-BcVoYZbC.mjs} +136 -15
- package/system/dist/{base-device-DAdWzDOl.js → base-device-DeSNiwZ4.js} +4 -4
- package/system/dist/{base-device-DJXF5eDN.mjs → base-device-w_MD0Bf4.mjs} +4 -4
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +3 -3
- package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
- package/system/dist/builtins/apps-aggregator/aggregate-apps.d.ts +24 -0
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.d.ts +16 -0
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.js +109 -0
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.mjs +103 -0
- package/system/dist/builtins/apps-aggregator/index.d.ts +1 -0
- package/system/dist/builtins/apps-aggregator/index.js +8 -0
- package/system/dist/builtins/apps-aggregator/index.mjs +2 -0
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +3 -3
- package/system/dist/builtins/camera-grid/index.mjs +3 -3
- package/system/dist/builtins/composer/composer.addon.js +7 -7
- package/system/dist/builtins/composer/composer.addon.mjs +7 -7
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/actions-store.d.ts +2 -0
- package/system/dist/builtins/core-blocks/block-supervisor.d.ts +16 -4
- package/system/dist/builtins/core-blocks/core-block-store.d.ts +2 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +1018 -323
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +986 -291
- package/system/dist/builtins/core-blocks/migrations/index.d.ts +5 -2
- package/system/dist/builtins/core-blocks/migrations/tag-ids.d.ts +42 -0
- package/system/dist/builtins/core-blocks/migrations/tags-as-records.d.ts +47 -0
- package/system/dist/builtins/core-blocks/record-kinds.d.ts +12 -1
- package/system/dist/builtins/core-blocks/runs-api.d.ts +3 -1
- package/system/dist/builtins/core-blocks/runs-ledger.d.ts +3 -1
- package/system/dist/builtins/core-blocks/scheduler/scheduler-store.d.ts +2 -0
- package/system/dist/builtins/core-blocks/tags-service.d.ts +52 -27
- package/system/dist/builtins/core-blocks/tags-wiring.d.ts +2 -0
- package/system/dist/builtins/core-notifier/core-notifier.addon.js +76 -67
- package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +76 -67
- package/system/dist/builtins/device-history/device-history.addon.js +4 -4
- package/system/dist/builtins/device-history/device-history.addon.mjs +4 -4
- package/system/dist/builtins/device-manager/device-manager.addon.js +1618 -755
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1604 -741
- package/system/dist/builtins/device-manager/device-meta-actions.d.ts +13 -136
- package/system/dist/builtins/device-manager/device-meta-types.d.ts +5 -1
- package/system/dist/builtins/device-manager/device-provider-context.d.ts +9 -0
- package/system/dist/builtins/device-manager/device-row-store.d.ts +21 -4
- package/system/dist/builtins/device-manager/device-search.d.ts +6 -0
- package/system/dist/builtins/device-manager/location-alignment.d.ts +9 -2
- package/system/dist/builtins/device-manager/migrate-device.d.ts +7 -2
- package/system/dist/builtins/device-manager/migrate-hardware-state.d.ts +132 -1
- package/system/dist/builtins/device-manager/migrations/device-tag-ids.d.ts +25 -0
- package/system/dist/builtins/device-manager/migrations/index.d.ts +16 -0
- package/system/dist/builtins/device-manager/migrations/orphan-children.d.ts +33 -0
- package/system/dist/builtins/device-manager/migrations/ports.d.ts +17 -0
- package/system/dist/builtins/device-manager/migrations/rooms-as-records.d.ts +52 -0
- package/system/dist/builtins/device-manager/record-kinds.d.ts +3 -1
- package/system/dist/builtins/device-manager/removal-cleanup.d.ts +7 -0
- package/system/dist/builtins/device-manager/room-actions.d.ts +27 -0
- package/system/dist/builtins/device-manager/room-store.d.ts +19 -0
- package/system/dist/builtins/device-manager/tag-names.d.ts +32 -0
- package/system/dist/builtins/device-manager/wireable-enum-catalog.d.ts +18 -0
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +2 -2
- package/system/dist/builtins/loki-logging/index.mjs +2 -2
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/migrations/migration-engine.d.ts +3 -1
- package/system/dist/builtins/sqlite-storage/migrations/migrations-provider.d.ts +1 -0
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +15 -10
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +15 -10
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +2 -2
- package/system/dist/builtins/system-config/system-config.addon.mjs +2 -2
- package/system/dist/builtins/winston-logging/index.js +2 -2
- package/system/dist/builtins/winston-logging/index.mjs +2 -2
- package/system/dist/{command-catalog-C29hVOOg.js → command-catalog-A_ONlLfF.js} +1 -1
- package/system/dist/{command-catalog-xAeqxbZk.mjs → command-catalog-CZDlLhxO.mjs} +1 -1
- package/system/dist/{composition-sources-Do5qM6EB.js → composition-sources-D1nPv7dJ.js} +1 -1
- package/system/dist/{composition-sources-C327LGFn.mjs → composition-sources-DubMf_ii.mjs} +1 -1
- package/system/dist/{core-blocks.cap-CdTGUKtr.js → core-blocks.cap-DEYCvF9J.js} +125 -373
- package/system/dist/{core-blocks.cap-DLkEfV5b.mjs → core-blocks.cap-sW5HLDlB.mjs} +109 -327
- package/system/dist/{device-manager.cap-DJs8izI6.js → device-manager.cap-B9qVf7ag.js} +163 -22
- package/system/dist/{device-manager.cap-eYrj1Ezp.mjs → device-manager.cap-CV4KGp3e.mjs} +134 -17
- package/system/dist/{error.cap-CU1FB6uE.mjs → error.cap-B8l7L8e4.mjs} +7 -1
- package/system/dist/{error.cap-BuKbL3Ac.js → error.cap-BqlvgBJd.js} +7 -1
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +7 -7
- package/system/dist/{legacy-integration-rows-door-CdqYAj-o.js → legacy-integration-rows-door-BK8eoGlF.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-LSgpClpX.mjs → legacy-integration-rows-door-CwzC5XNk.mjs} +1 -1
- package/system/dist/{migration-DGAc6ywR.mjs → migration-BvbfW9g-.mjs} +6 -0
- package/system/dist/{migration-BOQlFZCN.js → migration-CHPdAdNh.js} +6 -0
- package/system/dist/{prefix-walk-Mtij0NNT.mjs → named-entity-store-Cq2oVrN5.mjs} +195 -89
- package/system/dist/{prefix-walk-BFnw8NBu.js → named-entity-store-O_hi1y_o.js} +244 -90
- package/system/dist/{notification-rules.cap-BUIuYPlQ.mjs → notification-rules.cap-ClvK6QT1.mjs} +10 -5
- package/system/dist/{notification-rules.cap-BJKUjizS.js → notification-rules.cap-uSLoe2pA.js} +10 -5
- package/system/dist/{notification-targets-DMW7xgR2.js → notification-targets-ChqpBbtR.js} +2 -2
- package/system/dist/{notification-targets-4bGYH5J7.mjs → notification-targets-DUA6-F2t.mjs} +2 -2
- package/system/dist/{device-row-store-CTocYKqC.mjs → record-kinds-BD2xv4Pd.mjs} +222 -93
- package/system/dist/{device-row-store-C0P2H18h.js → record-kinds-BV8Gcpsx.js} +246 -93
- package/system/dist/records/named-entity-store.d.ts +60 -0
- package/system/dist/{rename-composition-block-D9Uc1AF7.js → rename-composition-block-C60O0P16.js} +137 -33
- package/system/dist/{rename-composition-block-Cdh-dRmY.mjs → rename-composition-block-DcX3vkwS.mjs} +137 -33
- package/system/dist/{retention-source.cap-C6Hy0hlM.js → retention-source.cap-A-TMhU5O.js} +1 -1
- package/system/dist/{retention-source.cap-550kkyp5.mjs → retention-source.cap-Ct07pM30.mjs} +1 -1
- package/system/dist/{storage-admin.cap-Ci4QbL6P.mjs → storage-admin.cap-C54s9_B9.mjs} +8 -2
- package/system/dist/{storage-admin.cap-DqW1ol4j.js → storage-admin.cap-DSPHi7ut.js} +8 -2
- package/system/dist/{stream-catalog.cap-CjEQFknc.js → stream-catalog.cap-7WPsugOy.js} +1 -1
- package/system/dist/{stream-catalog.cap-DVniDdRD.mjs → stream-catalog.cap-CzwRDaqT.mjs} +1 -1
- package/system/dist/{tag-BxLazvVb.js → tag-BLraBqvp.js} +12 -0
- package/system/dist/{tag-uZBAq6ox.mjs → tag-DU8pm9Bi.mjs} +7 -1
- package/system/dist/time-window-B6UhCArd.js +679 -0
- package/system/dist/time-window-BnUBULgu.mjs +578 -0
- package/system/dist/{wal-maintenance-BgYiAy5b.js → wal-maintenance-CkPfVApC.js} +0 -0
- package/system/dist/{wal-maintenance-Bey5ChBb.mjs → wal-maintenance-u84_1sVl.mjs} +0 -0
- package/system/package.json +16 -1
- /package/system/dist/{constants-Ba3FTIHl.js → constants-Ba3FTIHl2.js} +0 -0
- /package/system/dist/{constants-DB4piTD5.mjs → constants-DB4piTD52.mjs} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.945",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"system/assets",
|
|
19
19
|
"system/package.json",
|
|
20
20
|
"scripts/closure-postinstall.mjs",
|
|
21
|
+
"closure-pins.json",
|
|
21
22
|
".env.example",
|
|
22
23
|
"THIRD_PARTY_MODELS.md",
|
|
23
24
|
"README.md",
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"./system/assets/*": "./system/assets/*"
|
|
45
46
|
},
|
|
46
47
|
"scripts": {
|
|
48
|
+
"prepack": "node ../../scripts/gen-closure-pins.mjs",
|
|
47
49
|
"build": "node ../../scripts/sync-system-into-server.mjs && ../../scripts/tsc7 -p tsconfig.build.json && tsup && node scripts/copy-closure-patches.mjs",
|
|
48
50
|
"postinstall": "node scripts/closure-postinstall.mjs",
|
|
49
51
|
"dev": "npx concurrently -n server,ui -c blue,magenta \"CAMSTACK_RESTART_TOUCH_FILE=src/launcher.ts tsx watch --env-file=.env --ignore=./camstack-data --ignore=../../packages/core/dist --ignore=../../packages/sdk/dist --ignore=../../packages/ui-library/dist src/launcher.ts\" \"cd ../../packages/addon-admin-ui && npx vite --port 3001\"",
|
|
@@ -66,9 +68,11 @@
|
|
|
66
68
|
],
|
|
67
69
|
"requires": {
|
|
68
70
|
"addons": {
|
|
69
|
-
"@camstack/addon-
|
|
70
|
-
"@camstack/addon-
|
|
71
|
-
"@camstack/addon-
|
|
71
|
+
"@camstack/addon-admin-ui": ">=1.2.740",
|
|
72
|
+
"@camstack/addon-agent-ui": ">=1.2.438",
|
|
73
|
+
"@camstack/addon-export-alexa": ">=1.2.208",
|
|
74
|
+
"@camstack/addon-export-hap": ">=1.2.210",
|
|
75
|
+
"@camstack/addon-provider-hikvision": ">=1.2.195"
|
|
72
76
|
},
|
|
73
77
|
"wrapper": {
|
|
74
78
|
"desktop": ">=0.0.1",
|
|
@@ -77,19 +81,19 @@
|
|
|
77
81
|
}
|
|
78
82
|
},
|
|
79
83
|
"dependencies": {
|
|
80
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
81
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
84
|
+
"@camstack/addon-admin-ui": "1.2.740",
|
|
85
|
+
"@camstack/addon-agent-ui": "1.2.438",
|
|
82
86
|
"@camstack/addon-auth": "1.2.183",
|
|
83
87
|
"@camstack/addon-benchmark": "1.2.316",
|
|
84
88
|
"@camstack/addon-decoder-nodeav": "1.2.150",
|
|
85
89
|
"@camstack/addon-notifiers": "1.2.642",
|
|
86
|
-
"@camstack/addon-pipeline": "1.2.
|
|
87
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
88
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
90
|
+
"@camstack/addon-pipeline": "1.2.683",
|
|
91
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.719",
|
|
92
|
+
"@camstack/addon-post-analysis": "1.2.725",
|
|
89
93
|
"@camstack/develop": "0.1.58",
|
|
90
94
|
"@camstack/sdk": "1.2.160",
|
|
91
|
-
"@camstack/types": "1.2.
|
|
92
|
-
"@camstack/ui-library": "1.2.
|
|
95
|
+
"@camstack/types": "1.2.628",
|
|
96
|
+
"@camstack/ui-library": "1.2.501",
|
|
93
97
|
"@fastify/compress": "^9.0.0",
|
|
94
98
|
"@fastify/cookie": "^11.0.2",
|
|
95
99
|
"@fastify/cors": "^11.2.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_base_addon = require("./base-addon-
|
|
1
|
+
const require_base_addon = require("./base-addon-BG7p06Hb.js");
|
|
2
2
|
const require_device_type = require("./device-type-Cnc0NiSX.js");
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region ../types/dist/esm/device/cap-vocabulary/vocabulary.mjs
|
|
@@ -9431,6 +9431,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
9431
9431
|
scope: "system",
|
|
9432
9432
|
notOperatorFacing: "the alert centre — read and acknowledged on its own page"
|
|
9433
9433
|
},
|
|
9434
|
+
"app-source": {
|
|
9435
|
+
scope: "system",
|
|
9436
|
+
notOperatorFacing: "admin UI plumbing — pages, widgets and routes, not something a device does"
|
|
9437
|
+
},
|
|
9438
|
+
"apps": {
|
|
9439
|
+
scope: "system",
|
|
9440
|
+
notOperatorFacing: "admin UI plumbing — pages, widgets and routes, not something a device does"
|
|
9441
|
+
},
|
|
9434
9442
|
"audio-analyzer": {
|
|
9435
9443
|
scope: "system",
|
|
9436
9444
|
notOperatorFacing: "detection pipeline machinery — tuned on the pipeline pages, never actuated per device"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as EventCategory } from "./base-addon-
|
|
1
|
+
import { b as EventCategory } from "./base-addon-BcVoYZbC.mjs";
|
|
2
2
|
import { n as DeviceRole, r as DeviceType } from "./device-type-TUGqGmaI.mjs";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region ../types/dist/esm/device/cap-vocabulary/vocabulary.mjs
|
|
@@ -9431,6 +9431,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
9431
9431
|
scope: "system",
|
|
9432
9432
|
notOperatorFacing: "the alert centre — read and acknowledged on its own page"
|
|
9433
9433
|
},
|
|
9434
|
+
"app-source": {
|
|
9435
|
+
scope: "system",
|
|
9436
|
+
notOperatorFacing: "admin UI plumbing — pages, widgets and routes, not something a device does"
|
|
9437
|
+
},
|
|
9438
|
+
"apps": {
|
|
9439
|
+
scope: "system",
|
|
9440
|
+
notOperatorFacing: "admin UI plumbing — pages, widgets and routes, not something a device does"
|
|
9441
|
+
},
|
|
9434
9442
|
"audio-analyzer": {
|
|
9435
9443
|
scope: "system",
|
|
9436
9444
|
notOperatorFacing: "detection pipeline machinery — tuned on the pipeline pages, never actuated per device"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as SCOPED_SETTINGS_SCOPES } from "./scoped-settings-DVWUIP7Z.mjs";
|
|
2
2
|
import { c as method } from "./capability-definition-C1TLUVJR.mjs";
|
|
3
3
|
import { t as NOT_A_DEVICE } from "./system-reasons-CYj4qwyS.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { d as IconKeySchema } from "./tag-DU8pm9Bi.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region ../types/dist/esm/device/location-icon.mjs
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_scoped_settings = require("./scoped-settings-CylSSq_8.js");
|
|
2
2
|
const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
|
|
3
3
|
const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
|
|
4
|
-
const require_tag = require("./tag-
|
|
4
|
+
const require_tag = require("./tag-BLraBqvp.js");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
//#region ../types/dist/esm/device/location-icon.mjs
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DeviceFaultSchema } from "./error.cap-
|
|
1
|
+
import { n as DeviceFaultSchema } from "./error.cap-B8l7L8e4.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region ../types/dist/esm/notification/alert-episode.mjs
|
|
4
4
|
/** An episode is closed once its alert is completed or dismissed. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_error_cap = require("./error.cap-
|
|
1
|
+
const require_error_cap = require("./error.cap-BqlvgBJd.js");
|
|
2
2
|
let zod = require("zod");
|
|
3
3
|
//#region ../types/dist/esm/notification/alert-episode.mjs
|
|
4
4
|
/** An episode is closed once its alert is completed or dismissed. */
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { c as method } from "./capability-definition-C1TLUVJR.mjs";
|
|
2
|
+
import { t as NOT_A_DEVICE } from "./system-reasons-CYj4qwyS.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region ../types/dist/esm/capabilities/app-source.cap.mjs
|
|
5
|
+
/**
|
|
6
|
+
* `app-source` — collection cap: every addon that offers an app in the viewer
|
|
7
|
+
* shell registers a provider and lists its declarations. The hub singleton
|
|
8
|
+
* `apps` (see `apps.cap.ts`) aggregates them. No app id is spelled in the
|
|
9
|
+
* shell (D1096).
|
|
10
|
+
*/
|
|
11
|
+
/** An i18n key with its English fallback, translated by the shell per app bundle. */
|
|
12
|
+
var AppLabelSchema = /* @__PURE__ */ z.object({
|
|
13
|
+
key: /* @__PURE__ */ z.string().min(1),
|
|
14
|
+
fallback: /* @__PURE__ */ z.string()
|
|
15
|
+
});
|
|
16
|
+
/** How the shell opens the app. */
|
|
17
|
+
var AppEntrySchema = /* @__PURE__ */ z.discriminatedUnion("kind", [
|
|
18
|
+
/* @__PURE__ */ z.object({
|
|
19
|
+
kind: /* @__PURE__ */ z.literal("native"),
|
|
20
|
+
route: /* @__PURE__ */ z.string()
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ z.object({
|
|
23
|
+
kind: /* @__PURE__ */ z.literal("web"),
|
|
24
|
+
/** Hub-relative path; the shell prefixes the mount (D373). */
|
|
25
|
+
path: /* @__PURE__ */ z.string(),
|
|
26
|
+
auth: /* @__PURE__ */ z.enum(["session-cookie", "handoff"])
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ z.object({
|
|
29
|
+
kind: /* @__PURE__ */ z.literal("addon-page"),
|
|
30
|
+
pageId: /* @__PURE__ */ z.string()
|
|
31
|
+
})
|
|
32
|
+
]);
|
|
33
|
+
/**
|
|
34
|
+
* Where the app can be reached from. `lan-only` and `node` are interpreted by the
|
|
35
|
+
* shell (phase 4); the aggregator passes them through untouched.
|
|
36
|
+
*/
|
|
37
|
+
var AppReachSchema = /* @__PURE__ */ z.discriminatedUnion("kind", [
|
|
38
|
+
/* @__PURE__ */ z.object({ kind: /* @__PURE__ */ z.literal("hub") }),
|
|
39
|
+
/* @__PURE__ */ z.object({ kind: /* @__PURE__ */ z.literal("lan-only") }),
|
|
40
|
+
/* @__PURE__ */ z.object({
|
|
41
|
+
kind: /* @__PURE__ */ z.literal("node"),
|
|
42
|
+
nodeId: /* @__PURE__ */ z.string()
|
|
43
|
+
})
|
|
44
|
+
]);
|
|
45
|
+
/** The role an app is offered to. */
|
|
46
|
+
var AppRoleSchema = /* @__PURE__ */ z.enum(["admin", "user"]);
|
|
47
|
+
var AppNavItemSchema = /* @__PURE__ */ z.object({
|
|
48
|
+
id: /* @__PURE__ */ z.string(),
|
|
49
|
+
label: AppLabelSchema,
|
|
50
|
+
/** A lucide icon name. */
|
|
51
|
+
icon: /* @__PURE__ */ z.string(),
|
|
52
|
+
path: /* @__PURE__ */ z.string(),
|
|
53
|
+
adminOnly: /* @__PURE__ */ z.boolean().optional(),
|
|
54
|
+
keywords: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).optional(),
|
|
55
|
+
badgeKey: /* @__PURE__ */ z.string().optional(),
|
|
56
|
+
/** Interpreted by the shell (phase 4): the item is hidden while the capability is absent. */
|
|
57
|
+
requiresCapability: /* @__PURE__ */ z.string().optional()
|
|
58
|
+
});
|
|
59
|
+
var AppNavSectionSchema = /* @__PURE__ */ z.object({
|
|
60
|
+
id: /* @__PURE__ */ z.string(),
|
|
61
|
+
label: /* @__PURE__ */ AppLabelSchema.nullable(),
|
|
62
|
+
items: /* @__PURE__ */ z.array(AppNavItemSchema)
|
|
63
|
+
});
|
|
64
|
+
var AppDeclarationSchema = /* @__PURE__ */ z.object({
|
|
65
|
+
id: /* @__PURE__ */ z.string(),
|
|
66
|
+
label: AppLabelSchema,
|
|
67
|
+
icon: /* @__PURE__ */ z.string(),
|
|
68
|
+
order: /* @__PURE__ */ z.number().optional(),
|
|
69
|
+
entry: AppEntrySchema,
|
|
70
|
+
reach: AppReachSchema,
|
|
71
|
+
adminOnly: /* @__PURE__ */ z.boolean(),
|
|
72
|
+
/** Only these roles; `["user"]` excludes admins; absent = every role `adminOnly` allows. */
|
|
73
|
+
roles: /* @__PURE__ */ z.array(AppRoleSchema).optional(),
|
|
74
|
+
nav: /* @__PURE__ */ z.array(AppNavSectionSchema),
|
|
75
|
+
takesSharedSearch: /* @__PURE__ */ z.boolean(),
|
|
76
|
+
settings: /* @__PURE__ */ z.object({
|
|
77
|
+
label: /* @__PURE__ */ AppLabelSchema.optional(),
|
|
78
|
+
path: /* @__PURE__ */ z.string()
|
|
79
|
+
}).nullable()
|
|
80
|
+
});
|
|
81
|
+
var appSourceCapability = {
|
|
82
|
+
name: "app-source",
|
|
83
|
+
scope: "system",
|
|
84
|
+
mode: "collection",
|
|
85
|
+
internal: true,
|
|
86
|
+
mount: { kind: "skip" },
|
|
87
|
+
methods: { listApps: /* @__PURE__ */ method(/* @__PURE__ */ z.void(), /* @__PURE__ */ z.array(AppDeclarationSchema).readonly(), { auth: "admin" }) },
|
|
88
|
+
vocabulary: { notOperatorFacing: NOT_A_DEVICE.UI_PLUMBING }
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region ../types/dist/esm/capabilities/apps.cap.mjs
|
|
92
|
+
/**
|
|
93
|
+
* `apps` — hub singleton aggregator over `app-source`. The shell reads the apps
|
|
94
|
+
* it may offer here (D1096). `listApps` is filtered by the caller's role.
|
|
95
|
+
*/
|
|
96
|
+
/** One app as the shell receives it: the declaration, stamped with its provider. */
|
|
97
|
+
var AppInfoSchema = /* @__PURE__ */ z.object({
|
|
98
|
+
addonId: /* @__PURE__ */ z.string(),
|
|
99
|
+
app: AppDeclarationSchema
|
|
100
|
+
});
|
|
101
|
+
/** A badge count that could not be measured is `null`, never `0` (D393). */
|
|
102
|
+
var AppNavBadgeSchema = /* @__PURE__ */ z.object({
|
|
103
|
+
count: /* @__PURE__ */ z.number().nullable(),
|
|
104
|
+
tone: /* @__PURE__ */ z.enum([
|
|
105
|
+
"neutral",
|
|
106
|
+
"info",
|
|
107
|
+
"warning",
|
|
108
|
+
"danger"
|
|
109
|
+
])
|
|
110
|
+
});
|
|
111
|
+
var appsCapability = {
|
|
112
|
+
name: "apps",
|
|
113
|
+
scope: "system",
|
|
114
|
+
mode: "singleton",
|
|
115
|
+
methods: {
|
|
116
|
+
listApps: /* @__PURE__ */ method(/* @__PURE__ */ z.object({}), /* @__PURE__ */ z.array(AppInfoSchema).readonly(), {
|
|
117
|
+
auth: "protected",
|
|
118
|
+
caller: "required",
|
|
119
|
+
role: "viewer"
|
|
120
|
+
}),
|
|
121
|
+
getNavBadges: /* @__PURE__ */ method(/* @__PURE__ */ z.object({ appId: /* @__PURE__ */ z.string() }), /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), AppNavBadgeSchema), {
|
|
122
|
+
auth: "protected",
|
|
123
|
+
caller: "required",
|
|
124
|
+
role: "viewer"
|
|
125
|
+
})
|
|
126
|
+
},
|
|
127
|
+
vocabulary: { notOperatorFacing: NOT_A_DEVICE.UI_PLUMBING }
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
export { appSourceCapability as n, appsCapability as t };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
|
|
2
|
+
const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
|
|
3
|
+
let zod = require("zod");
|
|
4
|
+
//#region ../types/dist/esm/capabilities/app-source.cap.mjs
|
|
5
|
+
/**
|
|
6
|
+
* `app-source` — collection cap: every addon that offers an app in the viewer
|
|
7
|
+
* shell registers a provider and lists its declarations. The hub singleton
|
|
8
|
+
* `apps` (see `apps.cap.ts`) aggregates them. No app id is spelled in the
|
|
9
|
+
* shell (D1096).
|
|
10
|
+
*/
|
|
11
|
+
/** An i18n key with its English fallback, translated by the shell per app bundle. */
|
|
12
|
+
var AppLabelSchema = /* @__PURE__ */ zod.z.object({
|
|
13
|
+
key: /* @__PURE__ */ zod.z.string().min(1),
|
|
14
|
+
fallback: /* @__PURE__ */ zod.z.string()
|
|
15
|
+
});
|
|
16
|
+
/** How the shell opens the app. */
|
|
17
|
+
var AppEntrySchema = /* @__PURE__ */ zod.z.discriminatedUnion("kind", [
|
|
18
|
+
/* @__PURE__ */ zod.z.object({
|
|
19
|
+
kind: /* @__PURE__ */ zod.z.literal("native"),
|
|
20
|
+
route: /* @__PURE__ */ zod.z.string()
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ zod.z.object({
|
|
23
|
+
kind: /* @__PURE__ */ zod.z.literal("web"),
|
|
24
|
+
/** Hub-relative path; the shell prefixes the mount (D373). */
|
|
25
|
+
path: /* @__PURE__ */ zod.z.string(),
|
|
26
|
+
auth: /* @__PURE__ */ zod.z.enum(["session-cookie", "handoff"])
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ zod.z.object({
|
|
29
|
+
kind: /* @__PURE__ */ zod.z.literal("addon-page"),
|
|
30
|
+
pageId: /* @__PURE__ */ zod.z.string()
|
|
31
|
+
})
|
|
32
|
+
]);
|
|
33
|
+
/**
|
|
34
|
+
* Where the app can be reached from. `lan-only` and `node` are interpreted by the
|
|
35
|
+
* shell (phase 4); the aggregator passes them through untouched.
|
|
36
|
+
*/
|
|
37
|
+
var AppReachSchema = /* @__PURE__ */ zod.z.discriminatedUnion("kind", [
|
|
38
|
+
/* @__PURE__ */ zod.z.object({ kind: /* @__PURE__ */ zod.z.literal("hub") }),
|
|
39
|
+
/* @__PURE__ */ zod.z.object({ kind: /* @__PURE__ */ zod.z.literal("lan-only") }),
|
|
40
|
+
/* @__PURE__ */ zod.z.object({
|
|
41
|
+
kind: /* @__PURE__ */ zod.z.literal("node"),
|
|
42
|
+
nodeId: /* @__PURE__ */ zod.z.string()
|
|
43
|
+
})
|
|
44
|
+
]);
|
|
45
|
+
/** The role an app is offered to. */
|
|
46
|
+
var AppRoleSchema = /* @__PURE__ */ zod.z.enum(["admin", "user"]);
|
|
47
|
+
var AppNavItemSchema = /* @__PURE__ */ zod.z.object({
|
|
48
|
+
id: /* @__PURE__ */ zod.z.string(),
|
|
49
|
+
label: AppLabelSchema,
|
|
50
|
+
/** A lucide icon name. */
|
|
51
|
+
icon: /* @__PURE__ */ zod.z.string(),
|
|
52
|
+
path: /* @__PURE__ */ zod.z.string(),
|
|
53
|
+
adminOnly: /* @__PURE__ */ zod.z.boolean().optional(),
|
|
54
|
+
keywords: /* @__PURE__ */ zod.z.array(/* @__PURE__ */ zod.z.string()).optional(),
|
|
55
|
+
badgeKey: /* @__PURE__ */ zod.z.string().optional(),
|
|
56
|
+
/** Interpreted by the shell (phase 4): the item is hidden while the capability is absent. */
|
|
57
|
+
requiresCapability: /* @__PURE__ */ zod.z.string().optional()
|
|
58
|
+
});
|
|
59
|
+
var AppNavSectionSchema = /* @__PURE__ */ zod.z.object({
|
|
60
|
+
id: /* @__PURE__ */ zod.z.string(),
|
|
61
|
+
label: /* @__PURE__ */ AppLabelSchema.nullable(),
|
|
62
|
+
items: /* @__PURE__ */ zod.z.array(AppNavItemSchema)
|
|
63
|
+
});
|
|
64
|
+
var AppDeclarationSchema = /* @__PURE__ */ zod.z.object({
|
|
65
|
+
id: /* @__PURE__ */ zod.z.string(),
|
|
66
|
+
label: AppLabelSchema,
|
|
67
|
+
icon: /* @__PURE__ */ zod.z.string(),
|
|
68
|
+
order: /* @__PURE__ */ zod.z.number().optional(),
|
|
69
|
+
entry: AppEntrySchema,
|
|
70
|
+
reach: AppReachSchema,
|
|
71
|
+
adminOnly: /* @__PURE__ */ zod.z.boolean(),
|
|
72
|
+
/** Only these roles; `["user"]` excludes admins; absent = every role `adminOnly` allows. */
|
|
73
|
+
roles: /* @__PURE__ */ zod.z.array(AppRoleSchema).optional(),
|
|
74
|
+
nav: /* @__PURE__ */ zod.z.array(AppNavSectionSchema),
|
|
75
|
+
takesSharedSearch: /* @__PURE__ */ zod.z.boolean(),
|
|
76
|
+
settings: /* @__PURE__ */ zod.z.object({
|
|
77
|
+
label: /* @__PURE__ */ AppLabelSchema.optional(),
|
|
78
|
+
path: /* @__PURE__ */ zod.z.string()
|
|
79
|
+
}).nullable()
|
|
80
|
+
});
|
|
81
|
+
var appSourceCapability = {
|
|
82
|
+
name: "app-source",
|
|
83
|
+
scope: "system",
|
|
84
|
+
mode: "collection",
|
|
85
|
+
internal: true,
|
|
86
|
+
mount: { kind: "skip" },
|
|
87
|
+
methods: { listApps: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.void(), /* @__PURE__ */ zod.z.array(AppDeclarationSchema).readonly(), { auth: "admin" }) },
|
|
88
|
+
vocabulary: { notOperatorFacing: require_system_reasons.NOT_A_DEVICE.UI_PLUMBING }
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region ../types/dist/esm/capabilities/apps.cap.mjs
|
|
92
|
+
/**
|
|
93
|
+
* `apps` — hub singleton aggregator over `app-source`. The shell reads the apps
|
|
94
|
+
* it may offer here (D1096). `listApps` is filtered by the caller's role.
|
|
95
|
+
*/
|
|
96
|
+
/** One app as the shell receives it: the declaration, stamped with its provider. */
|
|
97
|
+
var AppInfoSchema = /* @__PURE__ */ zod.z.object({
|
|
98
|
+
addonId: /* @__PURE__ */ zod.z.string(),
|
|
99
|
+
app: AppDeclarationSchema
|
|
100
|
+
});
|
|
101
|
+
/** A badge count that could not be measured is `null`, never `0` (D393). */
|
|
102
|
+
var AppNavBadgeSchema = /* @__PURE__ */ zod.z.object({
|
|
103
|
+
count: /* @__PURE__ */ zod.z.number().nullable(),
|
|
104
|
+
tone: /* @__PURE__ */ zod.z.enum([
|
|
105
|
+
"neutral",
|
|
106
|
+
"info",
|
|
107
|
+
"warning",
|
|
108
|
+
"danger"
|
|
109
|
+
])
|
|
110
|
+
});
|
|
111
|
+
var appsCapability = {
|
|
112
|
+
name: "apps",
|
|
113
|
+
scope: "system",
|
|
114
|
+
mode: "singleton",
|
|
115
|
+
methods: {
|
|
116
|
+
listApps: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({}), /* @__PURE__ */ zod.z.array(AppInfoSchema).readonly(), {
|
|
117
|
+
auth: "protected",
|
|
118
|
+
caller: "required",
|
|
119
|
+
role: "viewer"
|
|
120
|
+
}),
|
|
121
|
+
getNavBadges: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z.object({ appId: /* @__PURE__ */ zod.z.string() }), /* @__PURE__ */ zod.z.record(/* @__PURE__ */ zod.z.string(), AppNavBadgeSchema), {
|
|
122
|
+
auth: "protected",
|
|
123
|
+
caller: "required",
|
|
124
|
+
role: "viewer"
|
|
125
|
+
})
|
|
126
|
+
},
|
|
127
|
+
vocabulary: { notOperatorFacing: require_system_reasons.NOT_A_DEVICE.UI_PLUMBING }
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
Object.defineProperty(exports, "appSourceCapability", {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function() {
|
|
133
|
+
return appSourceCapability;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, "appsCapability", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: function() {
|
|
139
|
+
return appsCapability;
|
|
140
|
+
}
|
|
141
|
+
});
|