@camstack/system 1.2.291 → 1.2.293
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/dist/addon-runner.js +20 -62
- package/dist/addon-runner.mjs +4 -46
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-linked-devices.d.ts +2 -37
- package/dist/builtins/device-manager/device-manager.addon.js +4 -73
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -71
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{manifest-system-deps-ghRqcy_-.mjs → child-cap-dispatch-CWkcQIRe.mjs} +51 -1
- package/dist/{manifest-system-deps-DTgkfBJy.js → child-cap-dispatch-CzNzGnGm.js} +62 -0
- package/dist/{dist-XnunBp0n.js → dist-CrL3PV53.js} +365 -27
- package/dist/{dist-DiMNxNDh.mjs → dist-tccneRF3.mjs} +354 -22
- package/dist/index.d.ts +4 -0
- package/dist/index.js +167 -166
- package/dist/index.mjs +3 -3
- package/dist/kernel/moleculer/child-cap-dispatch.d.ts +19 -0
- package/dist/{retired-settings-keys-DQn9s_AI.js → retired-settings-keys-BrOWH5-B.js} +1 -1
- package/dist/{retired-settings-keys-DnCcgrCG.mjs → retired-settings-keys-CcNuGSJ0.mjs} +1 -1
- package/package.json +1 -1
|
@@ -691,7 +691,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
691
691
|
return EventCategory;
|
|
692
692
|
}({});
|
|
693
693
|
//#endregion
|
|
694
|
-
//#region ../types/dist/sleep-
|
|
694
|
+
//#region ../types/dist/sleep-pM_J7YnY.mjs
|
|
695
695
|
/**
|
|
696
696
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
697
697
|
* window to float samples (D455).
|
|
@@ -16341,6 +16341,7 @@ sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
|
|
|
16341
16341
|
sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
|
|
16342
16342
|
sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
|
|
16343
16343
|
sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
|
|
16344
|
+
sub("cover", "control", "control", "#0ea5e9", "door", "Cover");
|
|
16344
16345
|
sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
|
|
16345
16346
|
sub("siren", "control", "control", "#dc2626", "siren", "Siren");
|
|
16346
16347
|
sub("button", "control", "control", "#10b981", "button", "Button");
|
|
@@ -16661,6 +16662,10 @@ var NcSystemEventKindSchema = z.enum([
|
|
|
16661
16662
|
"alarm-disarmed",
|
|
16662
16663
|
"alarm-arming",
|
|
16663
16664
|
"alarm-arm-refused",
|
|
16665
|
+
"alarm-pending",
|
|
16666
|
+
"alarm-rearmed",
|
|
16667
|
+
"alarm-sensor-bypass",
|
|
16668
|
+
"alarm-check-failed",
|
|
16664
16669
|
"addon-updated",
|
|
16665
16670
|
"server-updated",
|
|
16666
16671
|
"export-completed",
|
|
@@ -17258,6 +17263,19 @@ var NcMediaFrameSchema = z.enum([
|
|
|
17258
17263
|
"full",
|
|
17259
17264
|
"boxed"
|
|
17260
17265
|
]);
|
|
17266
|
+
/**
|
|
17267
|
+
* How a SENSOR notification shows the cameras that link the sensor.
|
|
17268
|
+
*
|
|
17269
|
+
* `mosaic` — one image composed of every linked camera's photograph, taken at
|
|
17270
|
+
* the trigger. `each` — one image per camera where the target takes several
|
|
17271
|
+
* attachments; a target that takes one keeps the first camera's (the degrade
|
|
17272
|
+
* engine drops the rest by order). Either way ONE notification per event.
|
|
17273
|
+
* Absent = `mosaic`, applied by the Notification Center and deliberately NOT
|
|
17274
|
+
* a Zod default (see NcRulePatchSchema: a default materialises on every
|
|
17275
|
+
* partial patch). Meaningless for a rule whose subject is not a sensor, and a
|
|
17276
|
+
* sensor linked to one camera ships that camera's plain snapshot either way.
|
|
17277
|
+
*/
|
|
17278
|
+
var NcLinkedCameraModeSchema = z.enum(["mosaic", "each"]);
|
|
17261
17279
|
var NcMediaPolicySchema = z.object({
|
|
17262
17280
|
attach: z.enum([
|
|
17263
17281
|
"best",
|
|
@@ -17303,7 +17321,9 @@ var NcMediaPolicySchema = z.object({
|
|
|
17303
17321
|
* A profile that is not assigned falls back to the cheapest, and the render
|
|
17304
17322
|
* reports which one actually ran.
|
|
17305
17323
|
*/
|
|
17306
|
-
profile: CamProfileSchema.optional()
|
|
17324
|
+
profile: CamProfileSchema.optional(),
|
|
17325
|
+
/** See {@link NcLinkedCameraModeSchema}. */
|
|
17326
|
+
linkedCameras: NcLinkedCameraModeSchema.optional()
|
|
17307
17327
|
});
|
|
17308
17328
|
/**
|
|
17309
17329
|
* Cooldown GRANULARITY over the subject's class — how much a fired
|
|
@@ -17423,7 +17443,7 @@ var NcRuleInputSchema = z.object({
|
|
|
17423
17443
|
cooldownSec: 60,
|
|
17424
17444
|
scope: "rule-device"
|
|
17425
17445
|
}),
|
|
17426
|
-
/** `{{var}}`
|
|
17446
|
+
/** `{{var}}` title/body. The variables are declared in `NC_TEMPLATE_VARS` (@camstack/types) and depend on the rule kind — see `templateVarsFor`. */
|
|
17427
17447
|
template: z.object({
|
|
17428
17448
|
title: z.string().max(500).optional(),
|
|
17429
17449
|
body: z.string().max(2e3).optional()
|
|
@@ -17603,6 +17623,22 @@ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
|
17603
17623
|
throttle: NcThrottleSchema.optional(),
|
|
17604
17624
|
priority: z.number().int().min(1).max(5).optional()
|
|
17605
17625
|
});
|
|
17626
|
+
var NcRuleClearableKeySchema = z.enum([
|
|
17627
|
+
"template",
|
|
17628
|
+
"schedule",
|
|
17629
|
+
"targetUsers",
|
|
17630
|
+
"snoozeOptions",
|
|
17631
|
+
"snoozeAllowGlobal",
|
|
17632
|
+
"waitForEnhancement",
|
|
17633
|
+
"actions",
|
|
17634
|
+
"confirm",
|
|
17635
|
+
"groupIdleSec"
|
|
17636
|
+
]);
|
|
17637
|
+
var NcRuleUpdateInputSchema = z.object({
|
|
17638
|
+
ruleId: z.string(),
|
|
17639
|
+
patch: NcRulePatchSchema,
|
|
17640
|
+
clear: z.array(NcRuleClearableKeySchema).optional()
|
|
17641
|
+
});
|
|
17606
17642
|
/** A persisted rule. */
|
|
17607
17643
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
17608
17644
|
id: z.string(),
|
|
@@ -17634,6 +17670,87 @@ var NcTestResultSchema = z.object({
|
|
|
17634
17670
|
className: z.string().optional(),
|
|
17635
17671
|
label: z.string().optional()
|
|
17636
17672
|
});
|
|
17673
|
+
/** The five rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts`
|
|
17674
|
+
* is the same union; the template-vars spec pins the two together. */
|
|
17675
|
+
var NcRuleKindSchema = z.enum([
|
|
17676
|
+
"detection",
|
|
17677
|
+
"sensor",
|
|
17678
|
+
"occupancy",
|
|
17679
|
+
"sound",
|
|
17680
|
+
"system"
|
|
17681
|
+
]);
|
|
17682
|
+
/** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
|
|
17683
|
+
var NcTemplateFamilySchema = z.enum([
|
|
17684
|
+
"rule",
|
|
17685
|
+
"timelapse",
|
|
17686
|
+
"summary"
|
|
17687
|
+
]);
|
|
17688
|
+
/** Which text field of that producer. `previewText` is the timelapse frame
|
|
17689
|
+
* caption, `captionText` the digest mosaic caption — both see fewer vars. */
|
|
17690
|
+
var NcTemplateFieldSchema = z.enum([
|
|
17691
|
+
"title",
|
|
17692
|
+
"body",
|
|
17693
|
+
"previewText",
|
|
17694
|
+
"captionText"
|
|
17695
|
+
]);
|
|
17696
|
+
var NcTemplateVarGroupSchema = z.enum([
|
|
17697
|
+
"subject",
|
|
17698
|
+
"place",
|
|
17699
|
+
"time",
|
|
17700
|
+
"rule",
|
|
17701
|
+
"occupancy",
|
|
17702
|
+
"sound",
|
|
17703
|
+
"sensor",
|
|
17704
|
+
"system",
|
|
17705
|
+
"digest",
|
|
17706
|
+
"ai"
|
|
17707
|
+
]);
|
|
17708
|
+
/**
|
|
17709
|
+
* ONE `{{var}}` a notification template may name.
|
|
17710
|
+
*
|
|
17711
|
+
* `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
|
|
17712
|
+
* it has a value; absent = no restriction on that axis. `systemEventKinds` is
|
|
17713
|
+
* read only for a `system` rule. `dynamic` declares a FAMILY of names
|
|
17714
|
+
* (`count_<class>`): the descriptor's `name` is the example member.
|
|
17715
|
+
*/
|
|
17716
|
+
var NcTemplateVarDescriptorSchema = z.object({
|
|
17717
|
+
name: z.string().regex(/^\w+$/),
|
|
17718
|
+
label: z.string(),
|
|
17719
|
+
description: z.string().optional(),
|
|
17720
|
+
example: z.string(),
|
|
17721
|
+
group: NcTemplateVarGroupSchema,
|
|
17722
|
+
families: z.array(NcTemplateFamilySchema).min(1),
|
|
17723
|
+
fields: z.array(NcTemplateFieldSchema).optional(),
|
|
17724
|
+
kinds: z.array(NcRuleKindSchema).optional(),
|
|
17725
|
+
deliveries: z.array(NcDeliverySchema).optional(),
|
|
17726
|
+
systemEventKinds: z.array(NcSystemEventKindSchema).optional(),
|
|
17727
|
+
dynamic: z.object({
|
|
17728
|
+
prefix: z.literal("count_"),
|
|
17729
|
+
from: z.literal("classes")
|
|
17730
|
+
}).optional()
|
|
17731
|
+
});
|
|
17732
|
+
/** What an editor knows about the field being edited. */
|
|
17733
|
+
var NcTemplateVarContextSchema = z.object({
|
|
17734
|
+
family: NcTemplateFamilySchema,
|
|
17735
|
+
field: NcTemplateFieldSchema,
|
|
17736
|
+
kind: NcRuleKindSchema.optional(),
|
|
17737
|
+
delivery: NcDeliverySchema.optional(),
|
|
17738
|
+
systemEventKinds: z.array(NcSystemEventKindSchema).optional()
|
|
17739
|
+
});
|
|
17740
|
+
/** Input to `previewTemplate` — the editor's own context, plus the draft text. */
|
|
17741
|
+
var NcTemplatePreviewInputSchema = z.object({
|
|
17742
|
+
context: NcTemplateVarContextSchema,
|
|
17743
|
+
template: z.object({
|
|
17744
|
+
title: z.string().max(500).optional(),
|
|
17745
|
+
body: z.string().max(2e3).optional()
|
|
17746
|
+
})
|
|
17747
|
+
});
|
|
17748
|
+
var NcTemplatePreviewSchema = z.object({
|
|
17749
|
+
title: z.string().nullable(),
|
|
17750
|
+
body: z.string().nullable(),
|
|
17751
|
+
/** Names the template uses that this context never fills — they render empty. */
|
|
17752
|
+
unknown: z.array(z.string())
|
|
17753
|
+
});
|
|
17637
17754
|
var NcConditionDescriptorSchema = z.object({
|
|
17638
17755
|
/** Field id inside `NcConditions` (or `'schedule'` for the rule-level group). */
|
|
17639
17756
|
id: z.string(),
|
|
@@ -17899,8 +18016,22 @@ z.object({
|
|
|
17899
18016
|
lastAt: z.number()
|
|
17900
18017
|
});
|
|
17901
18018
|
/**
|
|
17902
|
-
*
|
|
17903
|
-
*
|
|
18019
|
+
* One arm mode's non-blocking list: devices that may be open when that mode
|
|
18020
|
+
* arms, without the arm being refused.
|
|
18021
|
+
*/
|
|
18022
|
+
var NcAlarmNonBlockingSchema = z.object({
|
|
18023
|
+
mode: AlarmArmModeSchema,
|
|
18024
|
+
deviceIds: z.array(z.number().int()).max(200)
|
|
18025
|
+
});
|
|
18026
|
+
/**
|
|
18027
|
+
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
18028
|
+
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
18029
|
+
* at the boundary rather than interpreted.
|
|
18030
|
+
*/
|
|
18031
|
+
var NcAlarmNonBlockingListSchema = z.array(NcAlarmNonBlockingSchema).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
|
|
18032
|
+
/**
|
|
18033
|
+
* The three durations the panel's state machine runs on, who hears about its
|
|
18034
|
+
* transitions, and which openings each mode tolerates.
|
|
17904
18035
|
*
|
|
17905
18036
|
* They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
|
|
17906
18037
|
* `alarm-panel` is `deviceNative` and its other provider mirrors somebody
|
|
@@ -17919,21 +18050,39 @@ var NcAlarmSettingsSchema = z.object({
|
|
|
17919
18050
|
* existed, and therefore what an untouched install keeps doing.
|
|
17920
18051
|
*/
|
|
17921
18052
|
triggeredDurationSec: z.number().int().min(0).max(3600),
|
|
17922
|
-
/** Send a notification when a mode takes effect. */
|
|
17923
|
-
announceArm: z.boolean(),
|
|
17924
18053
|
/**
|
|
17925
|
-
*
|
|
18054
|
+
* Deprecated by D630 — every transition is announced. Parsed, never read;
|
|
18055
|
+
* remove after one release. Optional so an older admin's patch (which still
|
|
18056
|
+
* sends it) parses rather than failing the whole save.
|
|
18057
|
+
*/
|
|
18058
|
+
announceArm: z.boolean().optional(),
|
|
18059
|
+
/**
|
|
18060
|
+
* Target ids from `notification-output`: every alarm transition goes here.
|
|
17926
18061
|
*
|
|
17927
|
-
* Explicit rather than "everyone": an
|
|
18062
|
+
* Explicit rather than "everyone": an alarm announcement is a household
|
|
17928
18063
|
* message, and broadcasting it to every configured endpoint (including a
|
|
17929
18064
|
* webhook wired to something else) is not a default anybody would choose.
|
|
17930
|
-
* Empty
|
|
17931
|
-
*
|
|
18065
|
+
* Empty sends nothing, and the server logs that — silence must be
|
|
18066
|
+
* attributable.
|
|
18067
|
+
*/
|
|
18068
|
+
announceTargets: z.array(z.string().min(1)).max(16),
|
|
18069
|
+
/**
|
|
18070
|
+
* Per arm mode, the covered devices whose being OPEN does not refuse the
|
|
18071
|
+
* arm (a window left ajar for the cat under `home`, say). At most one entry
|
|
18072
|
+
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
18073
|
+
* parses as "every opening blocks" — the behaviour it was written under.
|
|
17932
18074
|
*/
|
|
17933
|
-
|
|
18075
|
+
nonBlocking: NcAlarmNonBlockingListSchema.default([])
|
|
17934
18076
|
});
|
|
17935
|
-
/**
|
|
17936
|
-
|
|
18077
|
+
/**
|
|
18078
|
+
* Every field optional — a tab edits one control at a time.
|
|
18079
|
+
*
|
|
18080
|
+
* `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
|
|
18081
|
+
* remove an inner `.default()`, so a patch that never named the field would
|
|
18082
|
+
* parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
|
|
18083
|
+
* (the same trap {@link NcRulePatchSchema} documents).
|
|
18084
|
+
*/
|
|
18085
|
+
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
|
|
17937
18086
|
/**
|
|
17938
18087
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
17939
18088
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -17978,6 +18127,36 @@ var NcAlarmModeCoverageSchema = z.object({
|
|
|
17978
18127
|
*/
|
|
17979
18128
|
skippedDevices: z.array(NcAlarmSkippedDeviceSchema).default([])
|
|
17980
18129
|
});
|
|
18130
|
+
/** One covered device that reads open, and whether that refuses the arm. */
|
|
18131
|
+
var NcAlarmOpeningSchema = z.object({
|
|
18132
|
+
deviceId: z.number().int(),
|
|
18133
|
+
name: z.string(),
|
|
18134
|
+
/** The device's state word as read (`open`, `unlocked`, …). */
|
|
18135
|
+
state: z.string(),
|
|
18136
|
+
/** False when the mode's non-blocking list names this device. */
|
|
18137
|
+
blocking: z.boolean()
|
|
18138
|
+
});
|
|
18139
|
+
/** A device the panel is currently ignoring, and which side of it it is on. */
|
|
18140
|
+
var NcAlarmExclusionViewSchema = z.object({
|
|
18141
|
+
deviceId: z.number().int(),
|
|
18142
|
+
name: z.string(),
|
|
18143
|
+
phase: z.enum(["open", "closed"])
|
|
18144
|
+
});
|
|
18145
|
+
/** One mode's openings: devices read open, plus those whose state is unknown. */
|
|
18146
|
+
var NcAlarmModeOpeningsSchema = z.object({
|
|
18147
|
+
mode: AlarmArmModeSchema,
|
|
18148
|
+
devices: z.array(NcAlarmOpeningSchema),
|
|
18149
|
+
/** Covered devices whose state could not be read (D49): neither open nor closed. */
|
|
18150
|
+
unknown: z.array(z.number().int())
|
|
18151
|
+
});
|
|
18152
|
+
var NcAlarmLiveSchema = z.object({
|
|
18153
|
+
state: AlarmStateSchema,
|
|
18154
|
+
/** The mode being armed into (exit delay) or held; null when disarmed. */
|
|
18155
|
+
targetMode: AlarmArmModeSchema.nullable(),
|
|
18156
|
+
availableModes: z.array(AlarmArmModeSchema),
|
|
18157
|
+
openings: z.array(NcAlarmModeOpeningsSchema),
|
|
18158
|
+
exclusions: z.array(NcAlarmExclusionViewSchema)
|
|
18159
|
+
});
|
|
17981
18160
|
var NcAlarmConfigSchema = z.object({
|
|
17982
18161
|
/**
|
|
17983
18162
|
* The panel's device id, or null when this install has no panel (the ensure
|
|
@@ -17987,7 +18166,13 @@ var NcAlarmConfigSchema = z.object({
|
|
|
17987
18166
|
*/
|
|
17988
18167
|
deviceId: z.number().int().nullable(),
|
|
17989
18168
|
settings: NcAlarmSettingsSchema,
|
|
17990
|
-
coverage: z.array(NcAlarmModeCoverageSchema)
|
|
18169
|
+
coverage: z.array(NcAlarmModeCoverageSchema),
|
|
18170
|
+
/**
|
|
18171
|
+
* The panel as it is NOW — state, what each mode would find open, what is
|
|
18172
|
+
* excluded. Optional: a panel-less hub answers without it, and a client
|
|
18173
|
+
* must not read its absence as "nothing is open".
|
|
18174
|
+
*/
|
|
18175
|
+
live: NcAlarmLiveSchema.optional()
|
|
17991
18176
|
});
|
|
17992
18177
|
/**
|
|
17993
18178
|
* ONE rule's demand on ONE camera's clip ring.
|
|
@@ -18043,10 +18228,7 @@ var notificationRulesCapability = {
|
|
|
18043
18228
|
auth: "admin",
|
|
18044
18229
|
caller: "required"
|
|
18045
18230
|
}),
|
|
18046
|
-
updateRule: method(z.object({
|
|
18047
|
-
ruleId: z.string(),
|
|
18048
|
-
patch: NcRulePatchSchema
|
|
18049
|
-
}), z.object({ rule: NcRuleSchema }), {
|
|
18231
|
+
updateRule: method(NcRuleUpdateInputSchema, z.object({ rule: NcRuleSchema }), {
|
|
18050
18232
|
kind: "mutation",
|
|
18051
18233
|
auth: "admin",
|
|
18052
18234
|
caller: "required"
|
|
@@ -18134,6 +18316,18 @@ var notificationRulesCapability = {
|
|
|
18134
18316
|
catalog: z.array(NcConditionDescriptorSchema),
|
|
18135
18317
|
taxonomy: NcTaxonomySchema.optional()
|
|
18136
18318
|
})),
|
|
18319
|
+
/** The declared `{{var}}` vocabulary; editors filter it with `templateVarsFor`. */
|
|
18320
|
+
getTemplateCatalog: method(z.object({}), z.object({ vars: z.array(NcTemplateVarDescriptorSchema) })),
|
|
18321
|
+
/**
|
|
18322
|
+
* Render a template with example values, through the hub's text catalog.
|
|
18323
|
+
* Pure: sends nothing. A MUTATION only for transport — a 2.5k-char draft in
|
|
18324
|
+
* a batched GET URL risks length limits — so access stays `view`, the same
|
|
18325
|
+
* as `getTemplateCatalog`.
|
|
18326
|
+
*/
|
|
18327
|
+
previewTemplate: method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
|
|
18328
|
+
kind: "mutation",
|
|
18329
|
+
access: "view"
|
|
18330
|
+
}),
|
|
18137
18331
|
/**
|
|
18138
18332
|
* Queryable delivery history — a read-only view over the durable outbox
|
|
18139
18333
|
* (fired rule, subject summary, target, status, timestamps, error on a
|
|
@@ -18188,7 +18382,10 @@ var notificationRulesCapability = {
|
|
|
18188
18382
|
caller: "required"
|
|
18189
18383
|
}),
|
|
18190
18384
|
/**
|
|
18191
|
-
* The alarm panel's
|
|
18385
|
+
* The alarm panel's settings, what each mode ACTUALLY arms, and — when a
|
|
18386
|
+
* panel exists — its `live` state: current state and target mode, what
|
|
18387
|
+
* each mode would find open (blocking or not, and what is unknown), and
|
|
18388
|
+
* the devices currently excluded.
|
|
18192
18389
|
*
|
|
18193
18390
|
* Coverage is returned by the same call as the settings on purpose: they
|
|
18194
18391
|
* are read together or not at all. An editor that showed the delays
|
|
@@ -18198,7 +18395,9 @@ var notificationRulesCapability = {
|
|
|
18198
18395
|
*/
|
|
18199
18396
|
getAlarmConfig: method(z.object({}), NcAlarmConfigSchema, { auth: "admin" }),
|
|
18200
18397
|
/**
|
|
18201
|
-
* Patch the durations
|
|
18398
|
+
* Patch the settings (durations, recipients, per-mode non-blocking lists;
|
|
18399
|
+
* `announceArm` is accepted and ignored — D630). Returns the WHOLE config,
|
|
18400
|
+
* coverage and `live` included, so a
|
|
18202
18401
|
* client never has to guess what the server settled on — the panel clamps
|
|
18203
18402
|
* and normalises, and a form that re-rendered from its own input would
|
|
18204
18403
|
* show a value the alarm is not using.
|
|
@@ -24105,6 +24304,7 @@ var CAP_TO_KIND = {
|
|
|
24105
24304
|
"enum-sensor": "enum-sensor",
|
|
24106
24305
|
"event-emitter": "device-event",
|
|
24107
24306
|
"lock-control": "lock",
|
|
24307
|
+
cover: "cover",
|
|
24108
24308
|
switch: "switch",
|
|
24109
24309
|
button: "button",
|
|
24110
24310
|
doorbell: "doorbell"
|
|
@@ -41083,6 +41283,95 @@ function resolveContainerPrimaryChild(children, overrideEntityId, containerName)
|
|
|
41083
41283
|
const namesake = (c) => containerName !== void 0 && containerName.length > 0 && c.name !== void 0 && sameName(c.name, containerName) ? 0 : 1;
|
|
41084
41284
|
return [...children].toSorted((a, b) => roleRank(a.role) - roleRank(b.role) || namesake(a) - namesake(b) || rank(a.type) - rank(b.type))[0] ?? null;
|
|
41085
41285
|
}
|
|
41286
|
+
/**
|
|
41287
|
+
* Which devices a camera's LINKED set resolves to — the pure rules, with no
|
|
41288
|
+
* store and no provider context.
|
|
41289
|
+
*
|
|
41290
|
+
* They live in `@camstack/types` rather than in the device-manager builtin
|
|
41291
|
+
* because two surfaces need the SAME answer and a second copy would be a
|
|
41292
|
+
* second definition of what a room contains: the hub's boot backfill, and the
|
|
41293
|
+
* admin UI's per-room rebuild. Moving them here also keeps that button a
|
|
41294
|
+
* framework-free change — a new cap method would only reach a node through a
|
|
41295
|
+
* published `@camstack/server` and a restart (D16), which is not what a
|
|
41296
|
+
* convenience button is worth.
|
|
41297
|
+
*/
|
|
41298
|
+
/**
|
|
41299
|
+
* Resolve one candidate id to the ids it should actually contribute to a
|
|
41300
|
+
* linked set: itself, unless it is a CONTAINER, in which case its own
|
|
41301
|
+
* children (recursively expanded the same way — a container-of-containers
|
|
41302
|
+
* is vanishingly unlikely per `DeviceType.Container`'s contract, but this
|
|
41303
|
+
* costs nothing to handle). `visited` guards a pathological parent-cycle in
|
|
41304
|
+
* persisted data from recursing forever; a candidate already on the current
|
|
41305
|
+
* expansion path is dropped rather than re-expanded.
|
|
41306
|
+
*
|
|
41307
|
+
* This is the STRUCTURAL, location-independent way a container's child
|
|
41308
|
+
* becomes reachable: the device-tree "children of the camera" rule and a
|
|
41309
|
+
* persisted manual pick are parentDeviceId chains, never location-based —
|
|
41310
|
+
* a container named there is excluded by expanding into whatever it
|
|
41311
|
+
* actually contains, regardless of what its (or its children's) `location`
|
|
41312
|
+
* column holds.
|
|
41313
|
+
*/
|
|
41314
|
+
function expandContainer(id, byId, byParent, visited, out) {
|
|
41315
|
+
if (visited.has(id)) return;
|
|
41316
|
+
const candidate = byId.get(id);
|
|
41317
|
+
if (!candidate) return;
|
|
41318
|
+
if (candidate.type !== DeviceType.Container) {
|
|
41319
|
+
out.add(id);
|
|
41320
|
+
return;
|
|
41321
|
+
}
|
|
41322
|
+
const nextVisited = new Set(visited);
|
|
41323
|
+
nextVisited.add(id);
|
|
41324
|
+
const primary = resolveContainerPrimaryChild((byParent.get(id) ?? []).map((c) => ({
|
|
41325
|
+
id: c.id,
|
|
41326
|
+
stableId: c.stableId,
|
|
41327
|
+
type: c.type,
|
|
41328
|
+
...c.role !== void 0 && c.role !== null ? { role: c.role } : {},
|
|
41329
|
+
...c.name !== void 0 ? { name: c.name } : {}
|
|
41330
|
+
})), byId.get(id)?.primaryChildEntityId, byId.get(id)?.name);
|
|
41331
|
+
if (primary !== null) expandContainer(primary.id, byId, byParent, nextVisited, out);
|
|
41332
|
+
}
|
|
41333
|
+
/**
|
|
41334
|
+
* What the retired `auto` mode (pre-D356) added beyond the device-tree
|
|
41335
|
+
* children: every non-container candidate sharing the camera's location, a
|
|
41336
|
+
* container child standing in for its container's PRIMARY child.
|
|
41337
|
+
*
|
|
41338
|
+
* Two callers, both WRITERS, never the read path: the one-shot boot backfill
|
|
41339
|
+
* that materialises it into the manual list
|
|
41340
|
+
* (`linked-devices-manual-backfill.ts`), and the admin UI's per-room rebuild.
|
|
41341
|
+
* Both ask "what does this room contain", and a second copy of the answer is
|
|
41342
|
+
* how two surfaces start disagreeing about a room.
|
|
41343
|
+
*
|
|
41344
|
+
* A camera with NO location answers `[]`. A caller that would WRITE that must
|
|
41345
|
+
* refuse instead: emptying a list because nobody set the room is the silent
|
|
41346
|
+
* drop D391 names.
|
|
41347
|
+
*/
|
|
41348
|
+
function legacyAutoLinkIds(params) {
|
|
41349
|
+
const { selfId, selfLocation, candidates } = params;
|
|
41350
|
+
if (selfLocation === null || selfLocation.length === 0) return [];
|
|
41351
|
+
const byId = new Map(candidates.map((c) => [c.id, c]));
|
|
41352
|
+
const byParent = /* @__PURE__ */ new Map();
|
|
41353
|
+
for (const c of candidates) {
|
|
41354
|
+
if (c.parentDeviceId === null) continue;
|
|
41355
|
+
const siblings = byParent.get(c.parentDeviceId);
|
|
41356
|
+
if (siblings) siblings.push(c);
|
|
41357
|
+
else byParent.set(c.parentDeviceId, [c]);
|
|
41358
|
+
}
|
|
41359
|
+
const ids = /* @__PURE__ */ new Set();
|
|
41360
|
+
const expand = (id) => expandContainer(id, byId, byParent, /* @__PURE__ */ new Set(), ids);
|
|
41361
|
+
for (const c of candidates) {
|
|
41362
|
+
if (c.type === DeviceType.Container) continue;
|
|
41363
|
+
if (c.location !== selfLocation) continue;
|
|
41364
|
+
if (c.parentDeviceId === selfId) continue;
|
|
41365
|
+
const parent = c.parentDeviceId !== null ? byId.get(c.parentDeviceId) : void 0;
|
|
41366
|
+
if (parent !== void 0 && parent.type === DeviceType.Container) {
|
|
41367
|
+
expand(parent.id);
|
|
41368
|
+
continue;
|
|
41369
|
+
}
|
|
41370
|
+
ids.add(c.id);
|
|
41371
|
+
}
|
|
41372
|
+
ids.delete(selfId);
|
|
41373
|
+
return [...ids];
|
|
41374
|
+
}
|
|
41086
41375
|
/** Marker written to a declared integration's `info`. */
|
|
41087
41376
|
var DECLARED_INTEGRATION_FIXED_KEY = "fixed";
|
|
41088
41377
|
/**
|
|
@@ -46462,6 +46751,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
46462
46751
|
addonId: null,
|
|
46463
46752
|
access: "view"
|
|
46464
46753
|
},
|
|
46754
|
+
"notificationRules.getTemplateCatalog": {
|
|
46755
|
+
capName: "notification-rules",
|
|
46756
|
+
capScope: "system",
|
|
46757
|
+
addonId: null,
|
|
46758
|
+
access: "view"
|
|
46759
|
+
},
|
|
46465
46760
|
"notificationRules.listDeviceMutes": {
|
|
46466
46761
|
capName: "notification-rules",
|
|
46467
46762
|
capScope: "system",
|
|
@@ -46480,6 +46775,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
46480
46775
|
addonId: null,
|
|
46481
46776
|
access: "view"
|
|
46482
46777
|
},
|
|
46778
|
+
"notificationRules.previewTemplate": {
|
|
46779
|
+
capName: "notification-rules",
|
|
46780
|
+
capScope: "system",
|
|
46781
|
+
addonId: null,
|
|
46782
|
+
access: "view"
|
|
46783
|
+
},
|
|
46483
46784
|
"notificationRules.resolveArtifactUrl": {
|
|
46484
46785
|
capName: "notification-rules",
|
|
46485
46786
|
capScope: "system",
|
|
@@ -52347,6 +52648,37 @@ var NC_AUDIO_DEFAULTS = {
|
|
|
52347
52648
|
};
|
|
52348
52649
|
new Set(["devices", "classes"]);
|
|
52349
52650
|
NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
|
|
52651
|
+
var RULE_BODY_ONLY = ["body"];
|
|
52652
|
+
var RULE_TEXT = ["title", "body"];
|
|
52653
|
+
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
52654
|
+
var CONSUMABLE = ["device-consumable-low", "device-consumable-normal"];
|
|
52655
|
+
var UPDATES = [
|
|
52656
|
+
"addon-update-available",
|
|
52657
|
+
"server-update-available",
|
|
52658
|
+
"wrapper-update-available"
|
|
52659
|
+
];
|
|
52660
|
+
var PACKAGE_UPDATES = ["addon-update-available", "server-update-available"];
|
|
52661
|
+
var ALARM = [
|
|
52662
|
+
"alarm-triggered",
|
|
52663
|
+
"alarm-armed",
|
|
52664
|
+
"alarm-disarmed",
|
|
52665
|
+
"alarm-arming",
|
|
52666
|
+
"alarm-arm-refused"
|
|
52667
|
+
];
|
|
52668
|
+
var COMBINED_ALARM = ["alarm-triggered"];
|
|
52669
|
+
var DEVICE_EVENTS = [
|
|
52670
|
+
"device-online",
|
|
52671
|
+
"device-offline",
|
|
52672
|
+
"device-disabled",
|
|
52673
|
+
"device-enabled",
|
|
52674
|
+
...BATTERY,
|
|
52675
|
+
...CONSUMABLE,
|
|
52676
|
+
"stream-online",
|
|
52677
|
+
"stream-offline",
|
|
52678
|
+
"detection-blind",
|
|
52679
|
+
...ALARM
|
|
52680
|
+
];
|
|
52681
|
+
[...DEVICE_EVENTS], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_BODY_ONLY], [...RULE_TEXT], [...RULE_TEXT], [...DEVICE_EVENTS], [...RULE_TEXT], [...DEVICE_EVENTS], [...RULE_TEXT], [...BATTERY, ...CONSUMABLE], [...RULE_TEXT], [...CONSUMABLE], [...RULE_TEXT], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT];
|
|
52350
52682
|
/**
|
|
52351
52683
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
52352
52684
|
*
|
|
@@ -52990,4 +53322,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
52990
53322
|
return out;
|
|
52991
53323
|
}
|
|
52992
53324
|
//#endregion
|
|
52993
|
-
export { decodeVectorBase64 as $,
|
|
53325
|
+
export { decodeVectorBase64 as $, siteZoneKey as $t, STREAM_PROFILE_META as A, hydrateSchema as An, logLevelAtMost as At, alertsCapability as B, EventCategory as Bn, parseStreamParamsFormPatch as Bt, RECORDING_SOURCE_CAMSTACK_ADDON as C, asJsonObject as Cn, kebabToCamel as Ct, SOURCE_CAPS as D, emitDownForOwnedCaps as Dn, localNetworkCapability as Dt, RecordingStatusSchema as E, createEvent as En, lifecycleJobSchema as Et, StorageMigrationJobSchema as F, parseJsonUnknown as Fn, modeMayWrite as Ft, buildStreamParamsConfigSchema as G, resolveBucketMs as Gt, backupCapability as H, procedureAuthKey as Ht, UserRecordSchema as I, readinessKey as In, motionCapability as It, coreBlockAddonId as J, runtimeStatePolicyFor as Jt, cameraGridLayoutCapability as K, resolveLocationMode as Kt, addonPagesCapability as L, resolveCapMount as Ln, normalizeUnit as Lt, StorageCleanupJobSchema as M, isEvent as Mn, mayReadLocation as Mt, StorageLocationModeSchema as N, nodePin as Nn, mayWriteToLocation as Nt, SOURCE_DEVICE_TYPES as O, emitReadiness as On, locationIconKey as Ot, StorageLocationTypeSchema as P, parseJsonObject as Pn, metricsProviderCapability as Pt, declarationOwnerNodeId as Q, settingsStoreCapability as Qt, addonSettingsCapability as R, scopeKey as Rn, objectInputDeclaresAddonId as Rt, MOTION_CLOSE_AFTER_MS as S, WELL_KNOWN_TAB_MAP as Sn, isVoidInput as St, RUNTIME_DEFAULTS as T, asString as Tn, legacyModeOf as Tt, bareAddonId as U, ptzAutotrackCapability as Ut, authProviderCapability as V, platformProbeCapability as Vt, batteryCapability as W, reducePoints as Wt, coreBlocksCapability as X, scopesAllowDeviceCap as Xt, coreBlockIdFromAddonId as Y, scopesAllowAddon as Yt, dataStoreProviderCapability as Z, scoreRuntimes as Zt, LOG_LEVEL_RANK as _, DeviceFeature as _n, isCollectionArrayMethod as _t, BatteryStatusSchema as a, streamCatalogCapability as an, enumerateInferenceDevices as at, METHOD_ACCESS_MAP as b, ReadinessRegistry as bn, isSameAddonId as bt, CORE_BLOCKS_ADDON_ID as c, vectorDimFromBase64 as cn, evaluateSensorEdge as ct, DAY_NAMES as d, errMsg as dn, extractNestedAddonId as dt, snapshotCapability as en, deriveBatteryPresence as et, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as f, buildFfmpegArgs as fn, filesystemBrowseCapability as ft, FIRST_LEVEL_MACRO_CLASSES as g, DEVICE_STATUS_METHOD as gn, isArrayOutputSchema as gt, DeviceStatusSchema as h, DEVICE_SETTINGS_CONTRIBUTION_METHODS as hn, gbToBytes as ht, BaseDevice as i, storageProviderCapability as in, doorbellCapability as it, ScopedTokenSchema as j, isDeviceConfigCap as jn, looseSchema as jt, STORAGE_ACCESS_FALLBACK as k, expandCapMethods as kn, logDestinationCapability as kt, CORE_BLOCK_ADDON_PREFIX as l, vectorStoreCapability as ln, evictionPolicyOfLocation as lt, DeclaredDevices as m, DATAPLANE_SECRET_HEADER as mn, formatMinutes as mt, AlertSchema as n, storageMigrationCapability as nn, deviceStateCapability as nt, CAMERA_SWITCH_ORDER as o, streamQualityLabel as on, enumerateItemArrayFields as ot, DERIVED_CAMERA_SILENCED_CAP_NAMES as p, BaseAddon as pn, foldSnapshotByFunction as pt, collectSecretConfigKeys as q, resolveMethodAuth as qt, ApiKeyRecordSchema as r, storageOccupancyCapability as rn, deviceStatusCapability as rt, CAP_NAMES_WITH_STATUS as s, userManagementCapability as sn, enumerateSchemaFields as st, ALL_CAPABILITY_DEFINITIONS as t, storageCapability as tn, deviceManagerCapability as tt, CoreBlockSchema as u, withLocationMode as un, expandContainer as ut, LegacyStorageLocationDefaultSchema as v, DeviceRole as vn, isLocationEnabled as vt, REDACTED_SECRET as w, asNumber as wn, legacyAutoLinkIds as wt, MINUTES_PER_DAY as x, ReadinessTimeoutError as xn, isSourceCap as xt, LocationIconIdSchema as y, DeviceType as yn, isObjectInput as yt, addonWidgetsCapability as z, sleep as zn, objectInputDeclaresRequiredDeviceId as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -112,3 +112,7 @@ export { type EnsureAddonNativePrebuildsOptions, ensureAddonNativePrebuilds, typ
|
|
|
112
112
|
export { type EnsureNativePrebuildsOptions, ensureNativePrebuilds, hasDotNode, NATIVE_SCAN_DEPTH, type PrebuildFetchFn, type PrebuildTarget, TRADITIONAL_NATIVE_PACKAGES, } from './kernel/deps/ensure-native-prebuilds.js';
|
|
113
113
|
export { type NpmInvocation, type RunNpmOptions, buildNpmChildEnv, resolveNpmInvocation, runNpm, } from './kernel/deps/npm-command.js';
|
|
114
114
|
export * from './kernel/index.js';
|
|
115
|
+
/** The token a CHILD uses to say "this method is declared optional and this
|
|
116
|
+
* provider does not serve it", which the hub turns into `NOT_IMPLEMENTED`.
|
|
117
|
+
* Crosses a UDS boundary as a plain message, so it is a prefix, not a class. */
|
|
118
|
+
export { CAP_METHOD_NOT_IMPLEMENTED } from './kernel/moleculer/child-cap-dispatch.js';
|