@camstack/addon-post-analysis 1.2.274 → 1.2.275
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/{dist-B9V4PRZO.js → dist-Br0p61E2.js} +1047 -24
- package/dist/{dist-DDko6srJ.mjs → dist-D3Yub96m.mjs} +1006 -25
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CNrdmO1k.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-Byz9Hzo0.mjs} +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B7oKeWXX.mjs +26 -0
- package/dist/pipeline-analytics/{_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D-4roee-.mjs → _virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BZetaopl.mjs} +1 -1
- package/dist/pipeline-analytics/{hostInit-BDwkPDdw.mjs → hostInit-Dza3GRpt.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +337 -50
- package/dist/pipeline-analytics/index.mjs +337 -50
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-kX2Fkx3d.mjs +0 -26
|
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5359
5359
|
var ZodFirstPartyTypeKind;
|
|
5360
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5361
5361
|
//#endregion
|
|
5362
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-pM_J7YnY.mjs
|
|
5363
5363
|
/**
|
|
5364
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5365
5365
|
* window to float samples (D455).
|
|
@@ -17401,6 +17401,7 @@ sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
|
|
|
17401
17401
|
sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
|
|
17402
17402
|
sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
|
|
17403
17403
|
sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
|
|
17404
|
+
sub("cover", "control", "control", "#0ea5e9", "door", "Cover");
|
|
17404
17405
|
sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
|
|
17405
17406
|
sub("siren", "control", "control", "#dc2626", "siren", "Siren");
|
|
17406
17407
|
sub("button", "control", "control", "#10b981", "button", "Button");
|
|
@@ -17726,6 +17727,10 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17726
17727
|
"alarm-disarmed",
|
|
17727
17728
|
"alarm-arming",
|
|
17728
17729
|
"alarm-arm-refused",
|
|
17730
|
+
"alarm-pending",
|
|
17731
|
+
"alarm-rearmed",
|
|
17732
|
+
"alarm-sensor-bypass",
|
|
17733
|
+
"alarm-check-failed",
|
|
17729
17734
|
"addon-updated",
|
|
17730
17735
|
"server-updated",
|
|
17731
17736
|
"export-completed",
|
|
@@ -17757,9 +17762,13 @@ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.h
|
|
|
17757
17762
|
*/
|
|
17758
17763
|
var NC_ALARM_SYSTEM_EVENT_KINDS = [
|
|
17759
17764
|
"alarm-arm-refused",
|
|
17765
|
+
"alarm-check-failed",
|
|
17760
17766
|
"alarm-arming",
|
|
17761
17767
|
"alarm-armed",
|
|
17768
|
+
"alarm-pending",
|
|
17762
17769
|
"alarm-triggered",
|
|
17770
|
+
"alarm-rearmed",
|
|
17771
|
+
"alarm-sensor-bypass",
|
|
17763
17772
|
"alarm-disarmed"
|
|
17764
17773
|
];
|
|
17765
17774
|
/**
|
|
@@ -18357,6 +18366,19 @@ var NcMediaFrameSchema = _enum([
|
|
|
18357
18366
|
"full",
|
|
18358
18367
|
"boxed"
|
|
18359
18368
|
]);
|
|
18369
|
+
/**
|
|
18370
|
+
* How a SENSOR notification shows the cameras that link the sensor.
|
|
18371
|
+
*
|
|
18372
|
+
* `mosaic` — one image composed of every linked camera's photograph, taken at
|
|
18373
|
+
* the trigger. `each` — one image per camera where the target takes several
|
|
18374
|
+
* attachments; a target that takes one keeps the first camera's (the degrade
|
|
18375
|
+
* engine drops the rest by order). Either way ONE notification per event.
|
|
18376
|
+
* Absent = `mosaic`, applied by the Notification Center and deliberately NOT
|
|
18377
|
+
* a Zod default (see NcRulePatchSchema: a default materialises on every
|
|
18378
|
+
* partial patch). Meaningless for a rule whose subject is not a sensor, and a
|
|
18379
|
+
* sensor linked to one camera ships that camera's plain snapshot either way.
|
|
18380
|
+
*/
|
|
18381
|
+
var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
|
|
18360
18382
|
var NcMediaPolicySchema = object({
|
|
18361
18383
|
attach: _enum([
|
|
18362
18384
|
"best",
|
|
@@ -18402,7 +18424,9 @@ var NcMediaPolicySchema = object({
|
|
|
18402
18424
|
* A profile that is not assigned falls back to the cheapest, and the render
|
|
18403
18425
|
* reports which one actually ran.
|
|
18404
18426
|
*/
|
|
18405
|
-
profile: CamProfileSchema.optional()
|
|
18427
|
+
profile: CamProfileSchema.optional(),
|
|
18428
|
+
/** See {@link NcLinkedCameraModeSchema}. */
|
|
18429
|
+
linkedCameras: NcLinkedCameraModeSchema.optional()
|
|
18406
18430
|
});
|
|
18407
18431
|
/**
|
|
18408
18432
|
* Cooldown GRANULARITY over the subject's class — how much a fired
|
|
@@ -18522,7 +18546,7 @@ var NcRuleInputSchema = object({
|
|
|
18522
18546
|
cooldownSec: 60,
|
|
18523
18547
|
scope: "rule-device"
|
|
18524
18548
|
}),
|
|
18525
|
-
/** `{{var}}`
|
|
18549
|
+
/** `{{var}}` title/body. The variables are declared in `NC_TEMPLATE_VARS` (@camstack/types) and depend on the rule kind — see `templateVarsFor`. */
|
|
18526
18550
|
template: object({
|
|
18527
18551
|
title: string().max(500).optional(),
|
|
18528
18552
|
body: string().max(2e3).optional()
|
|
@@ -18702,6 +18726,22 @@ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
|
|
|
18702
18726
|
throttle: NcThrottleSchema.optional(),
|
|
18703
18727
|
priority: number().int().min(1).max(5).optional()
|
|
18704
18728
|
});
|
|
18729
|
+
var NcRuleClearableKeySchema = _enum([
|
|
18730
|
+
"template",
|
|
18731
|
+
"schedule",
|
|
18732
|
+
"targetUsers",
|
|
18733
|
+
"snoozeOptions",
|
|
18734
|
+
"snoozeAllowGlobal",
|
|
18735
|
+
"waitForEnhancement",
|
|
18736
|
+
"actions",
|
|
18737
|
+
"confirm",
|
|
18738
|
+
"groupIdleSec"
|
|
18739
|
+
]);
|
|
18740
|
+
var NcRuleUpdateInputSchema = object({
|
|
18741
|
+
ruleId: string(),
|
|
18742
|
+
patch: NcRulePatchSchema,
|
|
18743
|
+
clear: array(NcRuleClearableKeySchema).optional()
|
|
18744
|
+
});
|
|
18705
18745
|
/** A persisted rule. */
|
|
18706
18746
|
var NcRuleSchema = NcRuleInputSchema.extend({
|
|
18707
18747
|
id: string(),
|
|
@@ -18733,6 +18773,85 @@ var NcTestResultSchema = object({
|
|
|
18733
18773
|
className: string().optional(),
|
|
18734
18774
|
label: string().optional()
|
|
18735
18775
|
});
|
|
18776
|
+
/** The five rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts`
|
|
18777
|
+
* is the same union; the template-vars spec pins the two together. */
|
|
18778
|
+
var NcRuleKindSchema = _enum([
|
|
18779
|
+
"detection",
|
|
18780
|
+
"sensor",
|
|
18781
|
+
"occupancy",
|
|
18782
|
+
"sound",
|
|
18783
|
+
"system"
|
|
18784
|
+
]);
|
|
18785
|
+
/** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
|
|
18786
|
+
var NcTemplateFamilySchema = _enum([
|
|
18787
|
+
"rule",
|
|
18788
|
+
"timelapse",
|
|
18789
|
+
"summary"
|
|
18790
|
+
]);
|
|
18791
|
+
/** Which text field of that producer. `previewText` is the timelapse frame
|
|
18792
|
+
* caption, `captionText` the digest mosaic caption — both see fewer vars. */
|
|
18793
|
+
var NcTemplateFieldSchema = _enum([
|
|
18794
|
+
"title",
|
|
18795
|
+
"body",
|
|
18796
|
+
"previewText",
|
|
18797
|
+
"captionText"
|
|
18798
|
+
]);
|
|
18799
|
+
var NcTemplateVarGroupSchema = _enum([
|
|
18800
|
+
"subject",
|
|
18801
|
+
"place",
|
|
18802
|
+
"time",
|
|
18803
|
+
"rule",
|
|
18804
|
+
"occupancy",
|
|
18805
|
+
"sound",
|
|
18806
|
+
"sensor",
|
|
18807
|
+
"system",
|
|
18808
|
+
"digest",
|
|
18809
|
+
"ai"
|
|
18810
|
+
]);
|
|
18811
|
+
/**
|
|
18812
|
+
* ONE `{{var}}` a notification template may name.
|
|
18813
|
+
*
|
|
18814
|
+
* `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
|
|
18815
|
+
* it has a value; absent = no restriction on that axis. `systemEventKinds` is
|
|
18816
|
+
* read only for a `system` rule. `dynamic` declares a FAMILY of names
|
|
18817
|
+
* (`count_<class>`): the descriptor's `name` is the example member.
|
|
18818
|
+
*/
|
|
18819
|
+
var NcTemplateVarDescriptorSchema = object({
|
|
18820
|
+
name: string().regex(/^\w+$/),
|
|
18821
|
+
label: string(),
|
|
18822
|
+
description: string().optional(),
|
|
18823
|
+
example: string(),
|
|
18824
|
+
group: NcTemplateVarGroupSchema,
|
|
18825
|
+
families: array(NcTemplateFamilySchema).min(1),
|
|
18826
|
+
fields: array(NcTemplateFieldSchema).optional(),
|
|
18827
|
+
kinds: array(NcRuleKindSchema).optional(),
|
|
18828
|
+
deliveries: array(NcDeliverySchema).optional(),
|
|
18829
|
+
systemEventKinds: array(NcSystemEventKindSchema).optional(),
|
|
18830
|
+
dynamic: object({
|
|
18831
|
+
prefix: literal("count_"),
|
|
18832
|
+
from: literal("classes")
|
|
18833
|
+
}).optional()
|
|
18834
|
+
});
|
|
18835
|
+
/** Input to `previewTemplate` — the editor's own context, plus the draft text. */
|
|
18836
|
+
var NcTemplatePreviewInputSchema = object({
|
|
18837
|
+
context: object({
|
|
18838
|
+
family: NcTemplateFamilySchema,
|
|
18839
|
+
field: NcTemplateFieldSchema,
|
|
18840
|
+
kind: NcRuleKindSchema.optional(),
|
|
18841
|
+
delivery: NcDeliverySchema.optional(),
|
|
18842
|
+
systemEventKinds: array(NcSystemEventKindSchema).optional()
|
|
18843
|
+
}),
|
|
18844
|
+
template: object({
|
|
18845
|
+
title: string().max(500).optional(),
|
|
18846
|
+
body: string().max(2e3).optional()
|
|
18847
|
+
})
|
|
18848
|
+
});
|
|
18849
|
+
var NcTemplatePreviewSchema = object({
|
|
18850
|
+
title: string().nullable(),
|
|
18851
|
+
body: string().nullable(),
|
|
18852
|
+
/** Names the template uses that this context never fills — they render empty. */
|
|
18853
|
+
unknown: array(string())
|
|
18854
|
+
});
|
|
18736
18855
|
var NcConditionDescriptorSchema = object({
|
|
18737
18856
|
/** Field id inside `NcConditions` (or `'schedule'` for the rule-level group). */
|
|
18738
18857
|
id: string(),
|
|
@@ -18896,6 +19015,14 @@ var NC_CONDITION_CATALOG = [
|
|
|
18896
19015
|
value: "backup-completed",
|
|
18897
19016
|
label: "Backup completed"
|
|
18898
19017
|
},
|
|
19018
|
+
{
|
|
19019
|
+
value: "alarm-arm-refused",
|
|
19020
|
+
label: "Alarm arm refused"
|
|
19021
|
+
},
|
|
19022
|
+
{
|
|
19023
|
+
value: "alarm-check-failed",
|
|
19024
|
+
label: "Alarm check failed (armed anyway)"
|
|
19025
|
+
},
|
|
18899
19026
|
{
|
|
18900
19027
|
value: "alarm-arming",
|
|
18901
19028
|
label: "Alarm arming (exit delay)"
|
|
@@ -18904,10 +19031,22 @@ var NC_CONDITION_CATALOG = [
|
|
|
18904
19031
|
value: "alarm-armed",
|
|
18905
19032
|
label: "Alarm armed"
|
|
18906
19033
|
},
|
|
19034
|
+
{
|
|
19035
|
+
value: "alarm-pending",
|
|
19036
|
+
label: "Alarm entry delay started"
|
|
19037
|
+
},
|
|
18907
19038
|
{
|
|
18908
19039
|
value: "alarm-triggered",
|
|
18909
19040
|
label: "Alarm triggered"
|
|
18910
19041
|
},
|
|
19042
|
+
{
|
|
19043
|
+
value: "alarm-rearmed",
|
|
19044
|
+
label: "Alarm re-armed after siren"
|
|
19045
|
+
},
|
|
19046
|
+
{
|
|
19047
|
+
value: "alarm-sensor-bypass",
|
|
19048
|
+
label: "Alarm sensor bypass"
|
|
19049
|
+
},
|
|
18911
19050
|
{
|
|
18912
19051
|
value: "alarm-disarmed",
|
|
18913
19052
|
label: "Alarm disarmed"
|
|
@@ -19458,8 +19597,17 @@ var NcSnoozeSuppressedSchema = object({
|
|
|
19458
19597
|
lastAt: number()
|
|
19459
19598
|
});
|
|
19460
19599
|
/**
|
|
19461
|
-
* The
|
|
19462
|
-
*
|
|
19600
|
+
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
19601
|
+
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
19602
|
+
* at the boundary rather than interpreted.
|
|
19603
|
+
*/
|
|
19604
|
+
var NcAlarmNonBlockingListSchema = array(object({
|
|
19605
|
+
mode: AlarmArmModeSchema,
|
|
19606
|
+
deviceIds: array(number().int()).max(200)
|
|
19607
|
+
})).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
|
|
19608
|
+
/**
|
|
19609
|
+
* The three durations the panel's state machine runs on, who hears about its
|
|
19610
|
+
* transitions, and which openings each mode tolerates.
|
|
19463
19611
|
*
|
|
19464
19612
|
* They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
|
|
19465
19613
|
* `alarm-panel` is `deviceNative` and its other provider mirrors somebody
|
|
@@ -19478,21 +19626,39 @@ var NcAlarmSettingsSchema = object({
|
|
|
19478
19626
|
* existed, and therefore what an untouched install keeps doing.
|
|
19479
19627
|
*/
|
|
19480
19628
|
triggeredDurationSec: number().int().min(0).max(3600),
|
|
19481
|
-
/** Send a notification when a mode takes effect. */
|
|
19482
|
-
announceArm: boolean(),
|
|
19483
19629
|
/**
|
|
19484
|
-
*
|
|
19630
|
+
* Deprecated by D630 — every transition is announced. Parsed, never read;
|
|
19631
|
+
* remove after one release. Optional so an older admin's patch (which still
|
|
19632
|
+
* sends it) parses rather than failing the whole save.
|
|
19633
|
+
*/
|
|
19634
|
+
announceArm: boolean().optional(),
|
|
19635
|
+
/**
|
|
19636
|
+
* Target ids from `notification-output`: every alarm transition goes here.
|
|
19485
19637
|
*
|
|
19486
|
-
* Explicit rather than "everyone": an
|
|
19638
|
+
* Explicit rather than "everyone": an alarm announcement is a household
|
|
19487
19639
|
* message, and broadcasting it to every configured endpoint (including a
|
|
19488
19640
|
* webhook wired to something else) is not a default anybody would choose.
|
|
19489
|
-
* Empty
|
|
19490
|
-
*
|
|
19641
|
+
* Empty sends nothing, and the server logs that — silence must be
|
|
19642
|
+
* attributable.
|
|
19643
|
+
*/
|
|
19644
|
+
announceTargets: array(string().min(1)).max(16),
|
|
19645
|
+
/**
|
|
19646
|
+
* Per arm mode, the covered devices whose being OPEN does not refuse the
|
|
19647
|
+
* arm (a window left ajar for the cat under `home`, say). At most one entry
|
|
19648
|
+
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
19649
|
+
* parses as "every opening blocks" — the behaviour it was written under.
|
|
19491
19650
|
*/
|
|
19492
|
-
|
|
19651
|
+
nonBlocking: NcAlarmNonBlockingListSchema.default([])
|
|
19493
19652
|
});
|
|
19494
|
-
/**
|
|
19495
|
-
|
|
19653
|
+
/**
|
|
19654
|
+
* Every field optional — a tab edits one control at a time.
|
|
19655
|
+
*
|
|
19656
|
+
* `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
|
|
19657
|
+
* remove an inner `.default()`, so a patch that never named the field would
|
|
19658
|
+
* parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
|
|
19659
|
+
* (the same trap {@link NcRulePatchSchema} documents).
|
|
19660
|
+
*/
|
|
19661
|
+
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
|
|
19496
19662
|
/**
|
|
19497
19663
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
19498
19664
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -19537,6 +19703,36 @@ var NcAlarmModeCoverageSchema = object({
|
|
|
19537
19703
|
*/
|
|
19538
19704
|
skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
|
|
19539
19705
|
});
|
|
19706
|
+
/** One covered device that reads open, and whether that refuses the arm. */
|
|
19707
|
+
var NcAlarmOpeningSchema = object({
|
|
19708
|
+
deviceId: number().int(),
|
|
19709
|
+
name: string(),
|
|
19710
|
+
/** The device's state word as read (`open`, `unlocked`, …). */
|
|
19711
|
+
state: string(),
|
|
19712
|
+
/** False when the mode's non-blocking list names this device. */
|
|
19713
|
+
blocking: boolean()
|
|
19714
|
+
});
|
|
19715
|
+
/** A device the panel is currently ignoring, and which side of it it is on. */
|
|
19716
|
+
var NcAlarmExclusionViewSchema = object({
|
|
19717
|
+
deviceId: number().int(),
|
|
19718
|
+
name: string(),
|
|
19719
|
+
phase: _enum(["open", "closed"])
|
|
19720
|
+
});
|
|
19721
|
+
/** One mode's openings: devices read open, plus those whose state is unknown. */
|
|
19722
|
+
var NcAlarmModeOpeningsSchema = object({
|
|
19723
|
+
mode: AlarmArmModeSchema,
|
|
19724
|
+
devices: array(NcAlarmOpeningSchema),
|
|
19725
|
+
/** Covered devices whose state could not be read (D49): neither open nor closed. */
|
|
19726
|
+
unknown: array(number().int())
|
|
19727
|
+
});
|
|
19728
|
+
var NcAlarmLiveSchema = object({
|
|
19729
|
+
state: AlarmStateSchema,
|
|
19730
|
+
/** The mode being armed into (exit delay) or held; null when disarmed. */
|
|
19731
|
+
targetMode: AlarmArmModeSchema.nullable(),
|
|
19732
|
+
availableModes: array(AlarmArmModeSchema),
|
|
19733
|
+
openings: array(NcAlarmModeOpeningsSchema),
|
|
19734
|
+
exclusions: array(NcAlarmExclusionViewSchema)
|
|
19735
|
+
});
|
|
19540
19736
|
var NcAlarmConfigSchema = object({
|
|
19541
19737
|
/**
|
|
19542
19738
|
* The panel's device id, or null when this install has no panel (the ensure
|
|
@@ -19546,7 +19742,13 @@ var NcAlarmConfigSchema = object({
|
|
|
19546
19742
|
*/
|
|
19547
19743
|
deviceId: number().int().nullable(),
|
|
19548
19744
|
settings: NcAlarmSettingsSchema,
|
|
19549
|
-
coverage: array(NcAlarmModeCoverageSchema)
|
|
19745
|
+
coverage: array(NcAlarmModeCoverageSchema),
|
|
19746
|
+
/**
|
|
19747
|
+
* The panel as it is NOW — state, what each mode would find open, what is
|
|
19748
|
+
* excluded. Optional: a panel-less hub answers without it, and a client
|
|
19749
|
+
* must not read its absence as "nothing is open".
|
|
19750
|
+
*/
|
|
19751
|
+
live: NcAlarmLiveSchema.optional()
|
|
19550
19752
|
});
|
|
19551
19753
|
/**
|
|
19552
19754
|
* ONE rule's demand on ONE camera's clip ring.
|
|
@@ -19602,10 +19804,7 @@ var notificationRulesCapability = {
|
|
|
19602
19804
|
auth: "admin",
|
|
19603
19805
|
caller: "required"
|
|
19604
19806
|
}),
|
|
19605
|
-
updateRule: method(object({
|
|
19606
|
-
ruleId: string(),
|
|
19607
|
-
patch: NcRulePatchSchema
|
|
19608
|
-
}), object({ rule: NcRuleSchema }), {
|
|
19807
|
+
updateRule: method(NcRuleUpdateInputSchema, object({ rule: NcRuleSchema }), {
|
|
19609
19808
|
kind: "mutation",
|
|
19610
19809
|
auth: "admin",
|
|
19611
19810
|
caller: "required"
|
|
@@ -19693,6 +19892,18 @@ var notificationRulesCapability = {
|
|
|
19693
19892
|
catalog: array(NcConditionDescriptorSchema),
|
|
19694
19893
|
taxonomy: NcTaxonomySchema.optional()
|
|
19695
19894
|
})),
|
|
19895
|
+
/** The declared `{{var}}` vocabulary; editors filter it with `templateVarsFor`. */
|
|
19896
|
+
getTemplateCatalog: method(object({}), object({ vars: array(NcTemplateVarDescriptorSchema) })),
|
|
19897
|
+
/**
|
|
19898
|
+
* Render a template with example values, through the hub's text catalog.
|
|
19899
|
+
* Pure: sends nothing. A MUTATION only for transport — a 2.5k-char draft in
|
|
19900
|
+
* a batched GET URL risks length limits — so access stays `view`, the same
|
|
19901
|
+
* as `getTemplateCatalog`.
|
|
19902
|
+
*/
|
|
19903
|
+
previewTemplate: method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
|
|
19904
|
+
kind: "mutation",
|
|
19905
|
+
access: "view"
|
|
19906
|
+
}),
|
|
19696
19907
|
/**
|
|
19697
19908
|
* Queryable delivery history — a read-only view over the durable outbox
|
|
19698
19909
|
* (fired rule, subject summary, target, status, timestamps, error on a
|
|
@@ -19747,7 +19958,10 @@ var notificationRulesCapability = {
|
|
|
19747
19958
|
caller: "required"
|
|
19748
19959
|
}),
|
|
19749
19960
|
/**
|
|
19750
|
-
* The alarm panel's
|
|
19961
|
+
* The alarm panel's settings, what each mode ACTUALLY arms, and — when a
|
|
19962
|
+
* panel exists — its `live` state: current state and target mode, what
|
|
19963
|
+
* each mode would find open (blocking or not, and what is unknown), and
|
|
19964
|
+
* the devices currently excluded.
|
|
19751
19965
|
*
|
|
19752
19966
|
* Coverage is returned by the same call as the settings on purpose: they
|
|
19753
19967
|
* are read together or not at all. An editor that showed the delays
|
|
@@ -19757,7 +19971,9 @@ var notificationRulesCapability = {
|
|
|
19757
19971
|
*/
|
|
19758
19972
|
getAlarmConfig: method(object({}), NcAlarmConfigSchema, { auth: "admin" }),
|
|
19759
19973
|
/**
|
|
19760
|
-
* Patch the durations
|
|
19974
|
+
* Patch the settings (durations, recipients, per-mode non-blocking lists;
|
|
19975
|
+
* `announceArm` is accepted and ignored — D630). Returns the WHOLE config,
|
|
19976
|
+
* coverage and `live` included, so a
|
|
19761
19977
|
* client never has to guess what the server settled on — the panel clamps
|
|
19762
19978
|
* and normalises, and a form that re-rendered from its own input would
|
|
19763
19979
|
* show a value the alarm is not using.
|
|
@@ -24907,6 +25123,7 @@ var CAP_TO_KIND = {
|
|
|
24907
25123
|
"enum-sensor": "enum-sensor",
|
|
24908
25124
|
"event-emitter": "device-event",
|
|
24909
25125
|
"lock-control": "lock",
|
|
25126
|
+
cover: "cover",
|
|
24910
25127
|
switch: "switch",
|
|
24911
25128
|
button: "button",
|
|
24912
25129
|
doorbell: "doorbell"
|
|
@@ -38190,9 +38407,8 @@ var DEVICE_STATE_READERS = [
|
|
|
38190
38407
|
field: "state"
|
|
38191
38408
|
},
|
|
38192
38409
|
{
|
|
38193
|
-
cap: "lock",
|
|
38194
|
-
field: "
|
|
38195
|
-
booleanWords: ["locked", "unlocked"]
|
|
38410
|
+
cap: "lock-control",
|
|
38411
|
+
field: "state"
|
|
38196
38412
|
},
|
|
38197
38413
|
{
|
|
38198
38414
|
cap: "contact",
|
|
@@ -44282,6 +44498,12 @@ Object.freeze({
|
|
|
44282
44498
|
addonId: null,
|
|
44283
44499
|
access: "view"
|
|
44284
44500
|
},
|
|
44501
|
+
"notificationRules.getTemplateCatalog": {
|
|
44502
|
+
capName: "notification-rules",
|
|
44503
|
+
capScope: "system",
|
|
44504
|
+
addonId: null,
|
|
44505
|
+
access: "view"
|
|
44506
|
+
},
|
|
44285
44507
|
"notificationRules.listDeviceMutes": {
|
|
44286
44508
|
capName: "notification-rules",
|
|
44287
44509
|
capScope: "system",
|
|
@@ -44300,6 +44522,12 @@ Object.freeze({
|
|
|
44300
44522
|
addonId: null,
|
|
44301
44523
|
access: "view"
|
|
44302
44524
|
},
|
|
44525
|
+
"notificationRules.previewTemplate": {
|
|
44526
|
+
capName: "notification-rules",
|
|
44527
|
+
capScope: "system",
|
|
44528
|
+
addonId: null,
|
|
44529
|
+
access: "view"
|
|
44530
|
+
},
|
|
44303
44531
|
"notificationRules.resolveArtifactUrl": {
|
|
44304
44532
|
capName: "notification-rules",
|
|
44305
44533
|
capScope: "system",
|
|
@@ -49947,6 +50175,759 @@ function isScheduleActive(schedule, atMs) {
|
|
|
49947
50175
|
}
|
|
49948
50176
|
return schedule.invert === true ? !inside : inside;
|
|
49949
50177
|
}
|
|
50178
|
+
var RULE_BODY_ONLY = ["body"];
|
|
50179
|
+
var RULE_TEXT = ["title", "body"];
|
|
50180
|
+
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
50181
|
+
var CONSUMABLE = ["device-consumable-low", "device-consumable-normal"];
|
|
50182
|
+
var UPDATES = [
|
|
50183
|
+
"addon-update-available",
|
|
50184
|
+
"server-update-available",
|
|
50185
|
+
"wrapper-update-available"
|
|
50186
|
+
];
|
|
50187
|
+
var PACKAGE_UPDATES = ["addon-update-available", "server-update-available"];
|
|
50188
|
+
var ALARM = [
|
|
50189
|
+
"alarm-triggered",
|
|
50190
|
+
"alarm-armed",
|
|
50191
|
+
"alarm-disarmed",
|
|
50192
|
+
"alarm-arming",
|
|
50193
|
+
"alarm-arm-refused"
|
|
50194
|
+
];
|
|
50195
|
+
var COMBINED_ALARM = ["alarm-triggered"];
|
|
50196
|
+
var DEVICE_EVENTS = [
|
|
50197
|
+
"device-online",
|
|
50198
|
+
"device-offline",
|
|
50199
|
+
"device-disabled",
|
|
50200
|
+
"device-enabled",
|
|
50201
|
+
...BATTERY,
|
|
50202
|
+
...CONSUMABLE,
|
|
50203
|
+
"stream-online",
|
|
50204
|
+
"stream-offline",
|
|
50205
|
+
"detection-blind",
|
|
50206
|
+
...ALARM
|
|
50207
|
+
];
|
|
50208
|
+
var NC_TEMPLATE_VARS = [
|
|
50209
|
+
{
|
|
50210
|
+
name: "camera",
|
|
50211
|
+
label: "Camera",
|
|
50212
|
+
example: "Ingresso",
|
|
50213
|
+
group: "subject",
|
|
50214
|
+
families: ["rule", "timelapse"],
|
|
50215
|
+
systemEventKinds: [...DEVICE_EVENTS, "export-completed"]
|
|
50216
|
+
},
|
|
50217
|
+
{
|
|
50218
|
+
name: "class",
|
|
50219
|
+
label: "Detected class",
|
|
50220
|
+
description: "The counted class on an occupancy row (e.g. \"person\"); the detected class elsewhere.",
|
|
50221
|
+
example: "person",
|
|
50222
|
+
group: "subject",
|
|
50223
|
+
families: ["rule"],
|
|
50224
|
+
fields: [...RULE_TEXT],
|
|
50225
|
+
kinds: [
|
|
50226
|
+
"detection",
|
|
50227
|
+
"sensor",
|
|
50228
|
+
"sound",
|
|
50229
|
+
"occupancy",
|
|
50230
|
+
"system"
|
|
50231
|
+
],
|
|
50232
|
+
systemEventKinds: [...COMBINED_ALARM]
|
|
50233
|
+
},
|
|
50234
|
+
{
|
|
50235
|
+
name: "label",
|
|
50236
|
+
label: "Name or plate",
|
|
50237
|
+
description: "Recognised person or read plate; empty otherwise.",
|
|
50238
|
+
example: "Mario",
|
|
50239
|
+
group: "subject",
|
|
50240
|
+
families: ["rule"],
|
|
50241
|
+
fields: [...RULE_TEXT],
|
|
50242
|
+
kinds: ["detection", "system"],
|
|
50243
|
+
systemEventKinds: [...COMBINED_ALARM]
|
|
50244
|
+
},
|
|
50245
|
+
{
|
|
50246
|
+
name: "subject",
|
|
50247
|
+
label: "Subject sentence",
|
|
50248
|
+
description: "Composed in the notification language, e.g. \"person (Mario)\".",
|
|
50249
|
+
example: "persona (Mario)",
|
|
50250
|
+
group: "subject",
|
|
50251
|
+
families: ["rule"],
|
|
50252
|
+
fields: [...RULE_TEXT],
|
|
50253
|
+
kinds: [
|
|
50254
|
+
"detection",
|
|
50255
|
+
"sensor",
|
|
50256
|
+
"sound",
|
|
50257
|
+
"occupancy"
|
|
50258
|
+
]
|
|
50259
|
+
},
|
|
50260
|
+
{
|
|
50261
|
+
name: "confidence",
|
|
50262
|
+
label: "Confidence",
|
|
50263
|
+
example: "87%",
|
|
50264
|
+
group: "subject",
|
|
50265
|
+
families: ["rule"],
|
|
50266
|
+
fields: [...RULE_TEXT],
|
|
50267
|
+
kinds: ["detection", "system"],
|
|
50268
|
+
systemEventKinds: [...COMBINED_ALARM]
|
|
50269
|
+
},
|
|
50270
|
+
{
|
|
50271
|
+
name: "count",
|
|
50272
|
+
label: "Count",
|
|
50273
|
+
description: "Occupancy count, subjects in a grouped notification, or the event count of a system notice.",
|
|
50274
|
+
example: "3",
|
|
50275
|
+
group: "subject",
|
|
50276
|
+
families: ["rule"],
|
|
50277
|
+
fields: [...RULE_TEXT],
|
|
50278
|
+
kinds: [
|
|
50279
|
+
"detection",
|
|
50280
|
+
"occupancy",
|
|
50281
|
+
"system"
|
|
50282
|
+
],
|
|
50283
|
+
systemEventKinds: [
|
|
50284
|
+
"addon-crash-loop",
|
|
50285
|
+
...PACKAGE_UPDATES,
|
|
50286
|
+
"addon-updated"
|
|
50287
|
+
]
|
|
50288
|
+
},
|
|
50289
|
+
{
|
|
50290
|
+
name: "detectionSummary",
|
|
50291
|
+
label: "Detection summary",
|
|
50292
|
+
description: "Class composition, e.g. \"2 persons and 1 car\".",
|
|
50293
|
+
example: "2 persone e 1 auto",
|
|
50294
|
+
group: "subject",
|
|
50295
|
+
families: [
|
|
50296
|
+
"rule",
|
|
50297
|
+
"timelapse",
|
|
50298
|
+
"summary"
|
|
50299
|
+
],
|
|
50300
|
+
fields: [...RULE_TEXT],
|
|
50301
|
+
kinds: ["detection"]
|
|
50302
|
+
},
|
|
50303
|
+
{
|
|
50304
|
+
name: "zones",
|
|
50305
|
+
label: "Zones",
|
|
50306
|
+
example: "Cancello, Vialetto",
|
|
50307
|
+
group: "place",
|
|
50308
|
+
families: ["rule"],
|
|
50309
|
+
fields: [...RULE_TEXT],
|
|
50310
|
+
kinds: ["detection", "system"],
|
|
50311
|
+
systemEventKinds: [...COMBINED_ALARM]
|
|
50312
|
+
},
|
|
50313
|
+
{
|
|
50314
|
+
name: "zone",
|
|
50315
|
+
label: "Zone",
|
|
50316
|
+
example: "Cancello",
|
|
50317
|
+
group: "place",
|
|
50318
|
+
families: ["rule"],
|
|
50319
|
+
fields: [...RULE_TEXT],
|
|
50320
|
+
kinds: [
|
|
50321
|
+
"detection",
|
|
50322
|
+
"occupancy",
|
|
50323
|
+
"system"
|
|
50324
|
+
],
|
|
50325
|
+
systemEventKinds: [...COMBINED_ALARM]
|
|
50326
|
+
},
|
|
50327
|
+
{
|
|
50328
|
+
name: "inZones",
|
|
50329
|
+
label: "\"in <zones>\" fragment",
|
|
50330
|
+
description: "Leading space included; empty when no zone.",
|
|
50331
|
+
example: " in Cancello",
|
|
50332
|
+
group: "place",
|
|
50333
|
+
families: ["rule"],
|
|
50334
|
+
fields: [...RULE_TEXT],
|
|
50335
|
+
kinds: ["detection", "system"],
|
|
50336
|
+
systemEventKinds: [...COMBINED_ALARM]
|
|
50337
|
+
},
|
|
50338
|
+
{
|
|
50339
|
+
name: "scope",
|
|
50340
|
+
label: "Occupancy scope",
|
|
50341
|
+
example: "Cancello",
|
|
50342
|
+
group: "place",
|
|
50343
|
+
families: ["rule"],
|
|
50344
|
+
fields: [...RULE_TEXT],
|
|
50345
|
+
kinds: ["occupancy"]
|
|
50346
|
+
},
|
|
50347
|
+
{
|
|
50348
|
+
name: "time",
|
|
50349
|
+
label: "Time",
|
|
50350
|
+
description: "Hours and minutes, in the notification language.",
|
|
50351
|
+
example: "20:05",
|
|
50352
|
+
group: "time",
|
|
50353
|
+
families: [
|
|
50354
|
+
"rule",
|
|
50355
|
+
"timelapse",
|
|
50356
|
+
"summary"
|
|
50357
|
+
],
|
|
50358
|
+
fields: [...RULE_TEXT]
|
|
50359
|
+
},
|
|
50360
|
+
{
|
|
50361
|
+
name: "rule",
|
|
50362
|
+
label: "Rule name",
|
|
50363
|
+
example: "Ingresso notte",
|
|
50364
|
+
group: "rule",
|
|
50365
|
+
families: [
|
|
50366
|
+
"rule",
|
|
50367
|
+
"timelapse",
|
|
50368
|
+
"summary"
|
|
50369
|
+
]
|
|
50370
|
+
},
|
|
50371
|
+
{
|
|
50372
|
+
name: "from",
|
|
50373
|
+
label: "Window start",
|
|
50374
|
+
example: "07:00",
|
|
50375
|
+
group: "time",
|
|
50376
|
+
families: ["timelapse", "summary"]
|
|
50377
|
+
},
|
|
50378
|
+
{
|
|
50379
|
+
name: "to",
|
|
50380
|
+
label: "Window end",
|
|
50381
|
+
example: "08:00",
|
|
50382
|
+
group: "time",
|
|
50383
|
+
families: ["timelapse", "summary"]
|
|
50384
|
+
},
|
|
50385
|
+
{
|
|
50386
|
+
name: "capacity",
|
|
50387
|
+
label: "Capacity",
|
|
50388
|
+
example: "2",
|
|
50389
|
+
group: "occupancy",
|
|
50390
|
+
families: ["rule"],
|
|
50391
|
+
fields: [...RULE_TEXT],
|
|
50392
|
+
kinds: ["occupancy"]
|
|
50393
|
+
},
|
|
50394
|
+
{
|
|
50395
|
+
name: "op",
|
|
50396
|
+
label: "Occupied / free",
|
|
50397
|
+
example: "occupata",
|
|
50398
|
+
group: "occupancy",
|
|
50399
|
+
families: ["rule"],
|
|
50400
|
+
fields: [...RULE_TEXT],
|
|
50401
|
+
kinds: ["occupancy"]
|
|
50402
|
+
},
|
|
50403
|
+
{
|
|
50404
|
+
name: "sounds",
|
|
50405
|
+
label: "Sounds heard",
|
|
50406
|
+
example: "abbaio, clacson",
|
|
50407
|
+
group: "sound",
|
|
50408
|
+
families: ["rule"],
|
|
50409
|
+
fields: [...RULE_TEXT],
|
|
50410
|
+
kinds: ["sound"]
|
|
50411
|
+
},
|
|
50412
|
+
{
|
|
50413
|
+
name: "hitPercent",
|
|
50414
|
+
label: "Share of the window",
|
|
50415
|
+
description: "Level mode only: percentage of samples above the threshold.",
|
|
50416
|
+
example: "42",
|
|
50417
|
+
group: "sound",
|
|
50418
|
+
families: ["rule"],
|
|
50419
|
+
fields: [...RULE_TEXT],
|
|
50420
|
+
kinds: ["sound"]
|
|
50421
|
+
},
|
|
50422
|
+
{
|
|
50423
|
+
name: "db",
|
|
50424
|
+
label: "Peak level (dBFS)",
|
|
50425
|
+
example: "-18",
|
|
50426
|
+
group: "sound",
|
|
50427
|
+
families: ["rule"],
|
|
50428
|
+
fields: [...RULE_TEXT],
|
|
50429
|
+
kinds: ["sound"]
|
|
50430
|
+
},
|
|
50431
|
+
{
|
|
50432
|
+
name: "eventType",
|
|
50433
|
+
label: "Event type",
|
|
50434
|
+
description: "Raw device event token, e.g. \"press\" or \"open\"; empty when the device sends none.",
|
|
50435
|
+
example: "press",
|
|
50436
|
+
group: "sensor",
|
|
50437
|
+
families: ["rule"],
|
|
50438
|
+
fields: [...RULE_TEXT],
|
|
50439
|
+
kinds: ["sensor"]
|
|
50440
|
+
},
|
|
50441
|
+
{
|
|
50442
|
+
name: "ai",
|
|
50443
|
+
label: "AI sentence",
|
|
50444
|
+
description: "Where the AI description goes; appended on its own line when absent.",
|
|
50445
|
+
example: "Una persona lascia un pacco.",
|
|
50446
|
+
group: "ai",
|
|
50447
|
+
families: ["rule", "summary"],
|
|
50448
|
+
fields: [...RULE_BODY_ONLY],
|
|
50449
|
+
kinds: ["detection", "occupancy"]
|
|
50450
|
+
},
|
|
50451
|
+
{
|
|
50452
|
+
name: "eventKind",
|
|
50453
|
+
label: "Event kind",
|
|
50454
|
+
example: "device-offline",
|
|
50455
|
+
group: "system",
|
|
50456
|
+
families: ["rule"],
|
|
50457
|
+
fields: [...RULE_TEXT],
|
|
50458
|
+
kinds: ["system"]
|
|
50459
|
+
},
|
|
50460
|
+
{
|
|
50461
|
+
name: "deviceName",
|
|
50462
|
+
label: "Device",
|
|
50463
|
+
example: "Ingresso",
|
|
50464
|
+
group: "system",
|
|
50465
|
+
families: ["rule"],
|
|
50466
|
+
fields: [...RULE_TEXT],
|
|
50467
|
+
kinds: ["system"],
|
|
50468
|
+
systemEventKinds: [...DEVICE_EVENTS]
|
|
50469
|
+
},
|
|
50470
|
+
{
|
|
50471
|
+
name: "deviceId",
|
|
50472
|
+
label: "Device id",
|
|
50473
|
+
example: "617",
|
|
50474
|
+
group: "system",
|
|
50475
|
+
families: ["rule"],
|
|
50476
|
+
fields: [...RULE_TEXT],
|
|
50477
|
+
kinds: ["system"],
|
|
50478
|
+
systemEventKinds: [...DEVICE_EVENTS, "export-completed"]
|
|
50479
|
+
},
|
|
50480
|
+
{
|
|
50481
|
+
name: "percentage",
|
|
50482
|
+
label: "Percentage",
|
|
50483
|
+
example: "15",
|
|
50484
|
+
group: "system",
|
|
50485
|
+
families: ["rule"],
|
|
50486
|
+
fields: [...RULE_TEXT],
|
|
50487
|
+
kinds: ["system"],
|
|
50488
|
+
systemEventKinds: [...BATTERY, ...CONSUMABLE]
|
|
50489
|
+
},
|
|
50490
|
+
{
|
|
50491
|
+
name: "item",
|
|
50492
|
+
label: "Consumable",
|
|
50493
|
+
example: "Filtro",
|
|
50494
|
+
group: "system",
|
|
50495
|
+
families: ["rule"],
|
|
50496
|
+
fields: [...RULE_TEXT],
|
|
50497
|
+
kinds: ["system"],
|
|
50498
|
+
systemEventKinds: [...CONSUMABLE]
|
|
50499
|
+
},
|
|
50500
|
+
{
|
|
50501
|
+
name: "profile",
|
|
50502
|
+
label: "Stream profile",
|
|
50503
|
+
example: "high",
|
|
50504
|
+
group: "system",
|
|
50505
|
+
families: ["rule"],
|
|
50506
|
+
fields: [...RULE_TEXT],
|
|
50507
|
+
kinds: ["system"],
|
|
50508
|
+
systemEventKinds: ["stream-online", "stream-offline"]
|
|
50509
|
+
},
|
|
50510
|
+
{
|
|
50511
|
+
name: "node",
|
|
50512
|
+
label: "Node",
|
|
50513
|
+
example: "hub",
|
|
50514
|
+
group: "system",
|
|
50515
|
+
families: ["rule"],
|
|
50516
|
+
fields: [...RULE_TEXT],
|
|
50517
|
+
kinds: ["system"],
|
|
50518
|
+
systemEventKinds: [
|
|
50519
|
+
"node-online",
|
|
50520
|
+
"node-offline",
|
|
50521
|
+
"node-inference-unavailable",
|
|
50522
|
+
"addon-crash-loop",
|
|
50523
|
+
...UPDATES,
|
|
50524
|
+
"addon-updated",
|
|
50525
|
+
"server-updated"
|
|
50526
|
+
]
|
|
50527
|
+
},
|
|
50528
|
+
{
|
|
50529
|
+
name: "nodeId",
|
|
50530
|
+
label: "Node id",
|
|
50531
|
+
example: "hub",
|
|
50532
|
+
group: "system",
|
|
50533
|
+
families: ["rule"],
|
|
50534
|
+
fields: [...RULE_TEXT],
|
|
50535
|
+
kinds: ["system"],
|
|
50536
|
+
systemEventKinds: [
|
|
50537
|
+
"node-online",
|
|
50538
|
+
"node-offline",
|
|
50539
|
+
"node-inference-unavailable",
|
|
50540
|
+
"addon-crash-loop",
|
|
50541
|
+
...UPDATES,
|
|
50542
|
+
"server-updated"
|
|
50543
|
+
]
|
|
50544
|
+
},
|
|
50545
|
+
{
|
|
50546
|
+
name: "devices",
|
|
50547
|
+
label: "Devices",
|
|
50548
|
+
description: "node-inference-unavailable: the affected cameras, comma-joined. Alarm arm / refusal: HOW MANY devices are armed (or open).",
|
|
50549
|
+
example: "Ingresso, Garage",
|
|
50550
|
+
group: "system",
|
|
50551
|
+
families: ["rule"],
|
|
50552
|
+
fields: [...RULE_TEXT],
|
|
50553
|
+
kinds: ["system"],
|
|
50554
|
+
systemEventKinds: [
|
|
50555
|
+
"node-inference-unavailable",
|
|
50556
|
+
"alarm-armed",
|
|
50557
|
+
"alarm-arm-refused"
|
|
50558
|
+
]
|
|
50559
|
+
},
|
|
50560
|
+
{
|
|
50561
|
+
name: "addons",
|
|
50562
|
+
label: "Addons",
|
|
50563
|
+
example: "stream-broker",
|
|
50564
|
+
group: "system",
|
|
50565
|
+
families: ["rule"],
|
|
50566
|
+
fields: [...RULE_TEXT],
|
|
50567
|
+
kinds: ["system"],
|
|
50568
|
+
systemEventKinds: ["addon-crash-loop"]
|
|
50569
|
+
},
|
|
50570
|
+
{
|
|
50571
|
+
name: "minutes",
|
|
50572
|
+
label: "Minutes",
|
|
50573
|
+
example: "12",
|
|
50574
|
+
group: "system",
|
|
50575
|
+
families: ["rule"],
|
|
50576
|
+
fields: [...RULE_TEXT],
|
|
50577
|
+
kinds: ["system"],
|
|
50578
|
+
systemEventKinds: ["detection-blind"]
|
|
50579
|
+
},
|
|
50580
|
+
{
|
|
50581
|
+
name: "package",
|
|
50582
|
+
label: "Package",
|
|
50583
|
+
example: "@camstack/addon-recorder",
|
|
50584
|
+
group: "system",
|
|
50585
|
+
families: ["rule"],
|
|
50586
|
+
fields: [...RULE_TEXT],
|
|
50587
|
+
kinds: ["system"],
|
|
50588
|
+
systemEventKinds: [
|
|
50589
|
+
...UPDATES,
|
|
50590
|
+
"addon-updated",
|
|
50591
|
+
"server-updated"
|
|
50592
|
+
]
|
|
50593
|
+
},
|
|
50594
|
+
{
|
|
50595
|
+
name: "packageName",
|
|
50596
|
+
label: "Package",
|
|
50597
|
+
example: "@camstack/addon-recorder",
|
|
50598
|
+
group: "system",
|
|
50599
|
+
families: ["rule"],
|
|
50600
|
+
fields: [...RULE_TEXT],
|
|
50601
|
+
kinds: ["system"],
|
|
50602
|
+
systemEventKinds: [...PACKAGE_UPDATES, "server-updated"]
|
|
50603
|
+
},
|
|
50604
|
+
{
|
|
50605
|
+
name: "nodes",
|
|
50606
|
+
label: "Nodes",
|
|
50607
|
+
description: "Comma-joined node ids, when an update spans more than one — the single-node case names it through {{nodeId}} instead. `incomingFromUpdateAvailable` (event-intake.ts) fills `nodes` from ONE shared textParams object for both addon- and server-update-available, exactly like packageName/currentVersion/latestVersion/count — only the shipped TEXT (system.server-update-available.body.onNodes) reads it today, but the var is real on both kinds.",
|
|
50608
|
+
example: "hub, little-unraid",
|
|
50609
|
+
group: "system",
|
|
50610
|
+
families: ["rule"],
|
|
50611
|
+
fields: [...RULE_TEXT],
|
|
50612
|
+
kinds: ["system"],
|
|
50613
|
+
systemEventKinds: [...PACKAGE_UPDATES]
|
|
50614
|
+
},
|
|
50615
|
+
{
|
|
50616
|
+
name: "currentVersion",
|
|
50617
|
+
label: "Current version",
|
|
50618
|
+
example: "1.2.377",
|
|
50619
|
+
group: "system",
|
|
50620
|
+
families: ["rule"],
|
|
50621
|
+
fields: [...RULE_TEXT],
|
|
50622
|
+
kinds: ["system"],
|
|
50623
|
+
systemEventKinds: [...UPDATES]
|
|
50624
|
+
},
|
|
50625
|
+
{
|
|
50626
|
+
name: "latestVersion",
|
|
50627
|
+
label: "Latest version",
|
|
50628
|
+
example: "1.2.378",
|
|
50629
|
+
group: "system",
|
|
50630
|
+
families: ["rule"],
|
|
50631
|
+
fields: [...RULE_TEXT],
|
|
50632
|
+
kinds: ["system"],
|
|
50633
|
+
systemEventKinds: [...UPDATES]
|
|
50634
|
+
},
|
|
50635
|
+
{
|
|
50636
|
+
name: "list",
|
|
50637
|
+
label: "Updated packages",
|
|
50638
|
+
description: "One line per package. `incomingFromUpdateAvailable` fills it for addon-/server-update-available too (the SAME shared textParams object as `nodes`) — `system.addon-update-available.body` reads it; `incomingFromAddonUpdates` fills it again, independently, for the completed `addon-updated` event.",
|
|
50639
|
+
example: "recorder, notifiers",
|
|
50640
|
+
group: "system",
|
|
50641
|
+
families: ["rule"],
|
|
50642
|
+
fields: [...RULE_TEXT],
|
|
50643
|
+
kinds: ["system"],
|
|
50644
|
+
systemEventKinds: [...PACKAGE_UPDATES, "addon-updated"]
|
|
50645
|
+
},
|
|
50646
|
+
{
|
|
50647
|
+
name: "fromVersion",
|
|
50648
|
+
label: "From version",
|
|
50649
|
+
example: "1.2.377",
|
|
50650
|
+
group: "system",
|
|
50651
|
+
families: ["rule"],
|
|
50652
|
+
fields: [...RULE_TEXT],
|
|
50653
|
+
kinds: ["system"],
|
|
50654
|
+
systemEventKinds: ["server-updated"]
|
|
50655
|
+
},
|
|
50656
|
+
{
|
|
50657
|
+
name: "toVersion",
|
|
50658
|
+
label: "To version",
|
|
50659
|
+
example: "1.2.378",
|
|
50660
|
+
group: "system",
|
|
50661
|
+
families: ["rule"],
|
|
50662
|
+
fields: [...RULE_TEXT],
|
|
50663
|
+
kinds: ["system"],
|
|
50664
|
+
systemEventKinds: ["server-updated"]
|
|
50665
|
+
},
|
|
50666
|
+
{
|
|
50667
|
+
name: "destinationsOk",
|
|
50668
|
+
label: "Destinations ok",
|
|
50669
|
+
example: "2",
|
|
50670
|
+
group: "system",
|
|
50671
|
+
families: ["rule"],
|
|
50672
|
+
fields: [...RULE_TEXT],
|
|
50673
|
+
kinds: ["system"],
|
|
50674
|
+
systemEventKinds: ["backup-completed"]
|
|
50675
|
+
},
|
|
50676
|
+
{
|
|
50677
|
+
name: "destinationsTotal",
|
|
50678
|
+
label: "Destinations",
|
|
50679
|
+
example: "2",
|
|
50680
|
+
group: "system",
|
|
50681
|
+
families: ["rule"],
|
|
50682
|
+
fields: [...RULE_TEXT],
|
|
50683
|
+
kinds: ["system"],
|
|
50684
|
+
systemEventKinds: ["backup-completed"]
|
|
50685
|
+
},
|
|
50686
|
+
{
|
|
50687
|
+
name: "destinationsFailed",
|
|
50688
|
+
label: "Destinations failed",
|
|
50689
|
+
example: "0",
|
|
50690
|
+
group: "system",
|
|
50691
|
+
families: ["rule"],
|
|
50692
|
+
fields: [...RULE_TEXT],
|
|
50693
|
+
kinds: ["system"],
|
|
50694
|
+
systemEventKinds: ["backup-completed"]
|
|
50695
|
+
},
|
|
50696
|
+
{
|
|
50697
|
+
name: "sizeMB",
|
|
50698
|
+
label: "Size (MB)",
|
|
50699
|
+
example: "412",
|
|
50700
|
+
group: "system",
|
|
50701
|
+
families: ["rule"],
|
|
50702
|
+
fields: [...RULE_TEXT],
|
|
50703
|
+
kinds: ["system"],
|
|
50704
|
+
systemEventKinds: ["backup-completed"]
|
|
50705
|
+
},
|
|
50706
|
+
{
|
|
50707
|
+
name: "backupId",
|
|
50708
|
+
label: "Backup id",
|
|
50709
|
+
example: "bk-20260924",
|
|
50710
|
+
group: "system",
|
|
50711
|
+
families: ["rule"],
|
|
50712
|
+
fields: [...RULE_TEXT],
|
|
50713
|
+
kinds: ["system"],
|
|
50714
|
+
systemEventKinds: ["backup-completed"]
|
|
50715
|
+
},
|
|
50716
|
+
{
|
|
50717
|
+
name: "title",
|
|
50718
|
+
label: "Export title",
|
|
50719
|
+
example: "Ingresso 08:00",
|
|
50720
|
+
group: "system",
|
|
50721
|
+
families: ["rule"],
|
|
50722
|
+
fields: [...RULE_TEXT],
|
|
50723
|
+
kinds: ["system"],
|
|
50724
|
+
systemEventKinds: ["export-completed"]
|
|
50725
|
+
},
|
|
50726
|
+
{
|
|
50727
|
+
name: "exportId",
|
|
50728
|
+
label: "Export id",
|
|
50729
|
+
example: "exp-20260924",
|
|
50730
|
+
group: "system",
|
|
50731
|
+
families: ["rule"],
|
|
50732
|
+
fields: [...RULE_TEXT],
|
|
50733
|
+
kinds: ["system"],
|
|
50734
|
+
systemEventKinds: ["export-completed"]
|
|
50735
|
+
},
|
|
50736
|
+
{
|
|
50737
|
+
name: "bytes",
|
|
50738
|
+
label: "Export size (bytes)",
|
|
50739
|
+
example: "10485760",
|
|
50740
|
+
group: "system",
|
|
50741
|
+
families: ["rule"],
|
|
50742
|
+
fields: [...RULE_TEXT],
|
|
50743
|
+
kinds: ["system"],
|
|
50744
|
+
systemEventKinds: ["export-completed"]
|
|
50745
|
+
},
|
|
50746
|
+
{
|
|
50747
|
+
name: "mode",
|
|
50748
|
+
label: "Alarm mode",
|
|
50749
|
+
example: "away",
|
|
50750
|
+
group: "system",
|
|
50751
|
+
families: ["rule"],
|
|
50752
|
+
fields: [...RULE_TEXT],
|
|
50753
|
+
kinds: ["system"],
|
|
50754
|
+
systemEventKinds: [
|
|
50755
|
+
"alarm-armed",
|
|
50756
|
+
"alarm-arming",
|
|
50757
|
+
"alarm-arm-refused"
|
|
50758
|
+
]
|
|
50759
|
+
},
|
|
50760
|
+
{
|
|
50761
|
+
name: "seconds",
|
|
50762
|
+
label: "Seconds",
|
|
50763
|
+
description: "Arming: the exit delay left. Refusal: how long the retry-to-arm-anyway lasts.",
|
|
50764
|
+
example: "30",
|
|
50765
|
+
group: "system",
|
|
50766
|
+
families: ["rule"],
|
|
50767
|
+
fields: [...RULE_TEXT],
|
|
50768
|
+
kinds: ["system"],
|
|
50769
|
+
systemEventKinds: ["alarm-arming", "alarm-arm-refused"]
|
|
50770
|
+
},
|
|
50771
|
+
{
|
|
50772
|
+
name: "rules",
|
|
50773
|
+
label: "Covering rules",
|
|
50774
|
+
description: "How many enabled rules the armed mode gates.",
|
|
50775
|
+
example: "2",
|
|
50776
|
+
group: "system",
|
|
50777
|
+
families: ["rule"],
|
|
50778
|
+
fields: [...RULE_TEXT],
|
|
50779
|
+
kinds: ["system"],
|
|
50780
|
+
systemEventKinds: ["alarm-armed"]
|
|
50781
|
+
},
|
|
50782
|
+
{
|
|
50783
|
+
name: "names",
|
|
50784
|
+
label: "Device names",
|
|
50785
|
+
description: "Armed: the devices armed. Arming: the devices this mode cannot arm. Refusal: the open sensors.",
|
|
50786
|
+
example: "Ingresso, Garage",
|
|
50787
|
+
group: "system",
|
|
50788
|
+
families: ["rule"],
|
|
50789
|
+
fields: [...RULE_TEXT],
|
|
50790
|
+
kinds: ["system"],
|
|
50791
|
+
systemEventKinds: [
|
|
50792
|
+
"alarm-armed",
|
|
50793
|
+
"alarm-arming",
|
|
50794
|
+
"alarm-arm-refused"
|
|
50795
|
+
]
|
|
50796
|
+
},
|
|
50797
|
+
{
|
|
50798
|
+
name: "skippedNames",
|
|
50799
|
+
label: "Skipped devices",
|
|
50800
|
+
description: "Devices the mode names but cannot arm (muted, detection off, offline).",
|
|
50801
|
+
example: "Garage",
|
|
50802
|
+
group: "system",
|
|
50803
|
+
families: ["rule"],
|
|
50804
|
+
fields: [...RULE_TEXT],
|
|
50805
|
+
kinds: ["system"],
|
|
50806
|
+
systemEventKinds: ["alarm-armed"]
|
|
50807
|
+
},
|
|
50808
|
+
{
|
|
50809
|
+
name: "bypassedNames",
|
|
50810
|
+
label: "Bypassed sensors",
|
|
50811
|
+
description: "Sensors the operator armed around because they were open.",
|
|
50812
|
+
example: "Finestra veranda",
|
|
50813
|
+
group: "system",
|
|
50814
|
+
families: ["rule"],
|
|
50815
|
+
fields: [...RULE_TEXT],
|
|
50816
|
+
kinds: ["system"],
|
|
50817
|
+
systemEventKinds: ["alarm-armed", "alarm-arming"]
|
|
50818
|
+
},
|
|
50819
|
+
{
|
|
50820
|
+
name: "coverage",
|
|
50821
|
+
label: "Coverage %",
|
|
50822
|
+
example: "96",
|
|
50823
|
+
group: "digest",
|
|
50824
|
+
families: ["timelapse"],
|
|
50825
|
+
fields: [...RULE_TEXT]
|
|
50826
|
+
},
|
|
50827
|
+
{
|
|
50828
|
+
name: "events",
|
|
50829
|
+
label: "Events",
|
|
50830
|
+
example: "4",
|
|
50831
|
+
group: "digest",
|
|
50832
|
+
families: ["timelapse", "summary"],
|
|
50833
|
+
fields: [...RULE_TEXT]
|
|
50834
|
+
},
|
|
50835
|
+
{
|
|
50836
|
+
name: "detections",
|
|
50837
|
+
label: "Detections",
|
|
50838
|
+
example: "7",
|
|
50839
|
+
group: "digest",
|
|
50840
|
+
families: ["timelapse", "summary"],
|
|
50841
|
+
fields: [...RULE_TEXT]
|
|
50842
|
+
},
|
|
50843
|
+
{
|
|
50844
|
+
name: "count_person",
|
|
50845
|
+
label: "Count of one class",
|
|
50846
|
+
description: "count_<class>, e.g. count_person, count_car.",
|
|
50847
|
+
example: "3",
|
|
50848
|
+
group: "digest",
|
|
50849
|
+
families: ["timelapse", "summary"],
|
|
50850
|
+
fields: [...RULE_TEXT],
|
|
50851
|
+
dynamic: {
|
|
50852
|
+
prefix: "count_",
|
|
50853
|
+
from: "classes"
|
|
50854
|
+
}
|
|
50855
|
+
},
|
|
50856
|
+
{
|
|
50857
|
+
name: "cameras",
|
|
50858
|
+
label: "Cameras",
|
|
50859
|
+
example: "3",
|
|
50860
|
+
group: "digest",
|
|
50861
|
+
families: ["summary"],
|
|
50862
|
+
fields: [...RULE_TEXT]
|
|
50863
|
+
},
|
|
50864
|
+
{
|
|
50865
|
+
name: "matched",
|
|
50866
|
+
label: "Matched events",
|
|
50867
|
+
example: "12",
|
|
50868
|
+
group: "digest",
|
|
50869
|
+
families: ["summary"],
|
|
50870
|
+
fields: [...RULE_TEXT]
|
|
50871
|
+
},
|
|
50872
|
+
{
|
|
50873
|
+
name: "shown",
|
|
50874
|
+
label: "Events shown",
|
|
50875
|
+
example: "9",
|
|
50876
|
+
group: "digest",
|
|
50877
|
+
families: ["summary"],
|
|
50878
|
+
fields: [...RULE_TEXT]
|
|
50879
|
+
},
|
|
50880
|
+
{
|
|
50881
|
+
name: "total",
|
|
50882
|
+
label: "Events total",
|
|
50883
|
+
example: "12",
|
|
50884
|
+
group: "digest",
|
|
50885
|
+
families: ["summary"],
|
|
50886
|
+
fields: [...RULE_TEXT]
|
|
50887
|
+
}
|
|
50888
|
+
];
|
|
50889
|
+
/** The caption fields see a fixed, smaller vocabulary (`timelapsePreviewText`,
|
|
50890
|
+
* `summaryCaptionText`). Declared here rather than as `fields` on every
|
|
50891
|
+
* descriptor so the whole rule stays in one line of code. */
|
|
50892
|
+
var CAPTION_VARS = {
|
|
50893
|
+
previewText: [
|
|
50894
|
+
"camera",
|
|
50895
|
+
"rule",
|
|
50896
|
+
"from",
|
|
50897
|
+
"to"
|
|
50898
|
+
],
|
|
50899
|
+
captionText: [
|
|
50900
|
+
"rule",
|
|
50901
|
+
"from",
|
|
50902
|
+
"to"
|
|
50903
|
+
]
|
|
50904
|
+
};
|
|
50905
|
+
function onAxis(declared, asked) {
|
|
50906
|
+
return declared === void 0 || asked === void 0 || declared.includes(asked);
|
|
50907
|
+
}
|
|
50908
|
+
function onSystemAxis(d, ctx) {
|
|
50909
|
+
if (ctx.kind !== "system" || d.systemEventKinds === void 0) return true;
|
|
50910
|
+
const asked = ctx.systemEventKinds ?? [];
|
|
50911
|
+
return asked.length === 0 || asked.some((k) => d.systemEventKinds?.includes(k) === true);
|
|
50912
|
+
}
|
|
50913
|
+
/**
|
|
50914
|
+
* The variables that have a value in `ctx`, in catalog order. Pure.
|
|
50915
|
+
*
|
|
50916
|
+
* `ctx` is trusted, typed input — untrusted input (a served/RPC boundary) is
|
|
50917
|
+
* validated once against {@link NcTemplateVarContextSchema} at the cap/bridge
|
|
50918
|
+
* boundary, not re-parsed on every call here (Task 4).
|
|
50919
|
+
*/
|
|
50920
|
+
function templateVarsFor(ctx) {
|
|
50921
|
+
if (ctx.field === "previewText" || ctx.field === "captionText") {
|
|
50922
|
+
const allowed = CAPTION_VARS[ctx.field];
|
|
50923
|
+
return NC_TEMPLATE_VARS.filter((d) => d.families.includes(ctx.family) && allowed.includes(d.name) && d.dynamic === void 0);
|
|
50924
|
+
}
|
|
50925
|
+
return NC_TEMPLATE_VARS.filter((d) => d.families.includes(ctx.family) && onAxis(d.fields, ctx.field) && onAxis(d.kinds, ctx.kind) && onAxis(d.deliveries, ctx.delivery) && onSystemAxis(d, ctx));
|
|
50926
|
+
}
|
|
50927
|
+
/** True when `name` is supplied in `ctx`, dynamic families (`count_<class>`) included. */
|
|
50928
|
+
function isKnownTemplateVar(name, ctx) {
|
|
50929
|
+
return templateVarsFor(ctx).some((d) => d.dynamic !== void 0 ? name.startsWith(d.dynamic.prefix) && name.length > d.dynamic.prefix.length : d.name === name);
|
|
50930
|
+
}
|
|
49950
50931
|
/**
|
|
49951
50932
|
* Does `filter` say anything about `kind`?
|
|
49952
50933
|
*
|
|
@@ -50965,4 +51946,4 @@ function vectorDimFromBase64(encoded) {
|
|
|
50965
51946
|
return Math.floor(Buffer.from(encoded, "base64").byteLength / 4);
|
|
50966
51947
|
}
|
|
50967
51948
|
//#endregion
|
|
50968
|
-
export {
|
|
51949
|
+
export { SCENE_DIVERGED as $, hydrateSchema as $t, NcConditionDescriptorSchema as A, occupancyScope as At, NcSystemEventKindSchema as B, storageOccupancyCapability as Bt, MediaFileKindEnum as C, isKnownTemplateVar as Ct, NC_SNOOZE_MAX_MINUTES as D, kebabToCamel as Dt, NC_DEFAULT_SNOOZE_MINUTES as E, isSourceCap as Et, NcRuleUpdateInputSchema as F, readDeviceStateFrom as Ft, OpsLogEntrySchema as G, zoneAnalyticsCapability as Gt, NcTemplatePreviewInputSchema as H, systemEventFilterApplies as Ht, NcScheduleSchema as I, readTimelapseGeneratedAt as It, RECORDING_SOURCE_CAMSTACK_ADDON as J, CamProfileSchema as Jt, PoolMemoryWatchdog as K, errMsg as Kt, NcSnoozeInputSchema as L, resolveLocationMode as Lt, NcRulePatchSchema as M, pickClusterStepModels as Mt, NcRuleSchema as N, pipelineAnalyticsCapability as Nt, NC_TAXONOMY as O, mayWriteToLocation as Ot, NcRuleTargetSchema as P, plateGalleryCapability as Pt, SCENE_DEFAULT_UNCOVERED_POLICY as Q, defineCustomActions as Qt, NcSnoozeSchema as R, resolvePoolMemoryPolicy as Rt, MOTION_CLOSE_AFTER_MS as S, isEventOwnerType as St, NC_CONDITION_CATALOG as T, isScheduleActive as Tt, NcTemplatePreviewSchema as U, templateVarsFor as Ut, NcTaxonomySchema as V, subKindsOf as Vt, NcTemplateVarDescriptorSchema as W, vectorDimFromBase64 as Wt, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as X, createEvent as Xt, RetrainStatusSchema as Y, DeviceType as Yt, SCENE_DEFAULT_ANCHOR_THRESHOLD as Z, customAction as Zt, FailureCounters as _, evictionPolicyOfLocation as _t, CLUSTER_MODEL_SCOPED_STEPS as a, boolean as an, TrackSourceSchema as at, MAX_BIRTH_DECISION_RECORDS as b, hfModelUrl as bt, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as c, number as cn, assertTimelapseCadences as ct, DETECTION_PIPELINE_CAP_NAME as d, record as dn, buildEventKindDescriptor as dt, isDeviceScopedCap as en, SceneMonitorSchema as et, DeclaredDevices as f, string as fn, cosineSimilarity as ft, FULL_IMAGE_BBOX as g, evaluateSensorEdge as gt, FIRST_LEVEL_MACRO_CLASSES as h, encodeVectorBase64 as ht, BirthDecisionRecordSchema as i, array as in, TimelapseRuleSchema as it, NcRuleInputSchema as j, parseProcStatus as jt, NC_TEMPLATE_VARS as k, notificationRulesCapability as kt, DEFAULT_TIMELAPSE_PREVIEW_TEXT as l, object as ln, audioMetricsCapability as lt, EVENT_OWNER_TYPES as m, EventCategory as mn, embeddingEncoderCapability as mt, ArchivedDebugNoteSchema as n, sleep as nn, TimelapseRuleInputSchema as nt, COCO_TO_MACRO as o, discriminatedUnion as on, addonWidgetsSourceCapability as ot, EVENT_KIND_BY_CAP as p, unknown as pn, deriveRecordingMode as pt, RECORDING_EXPORT_MAX_READ_BYTES as q, BaseAddon as qt, BaseDevice as r, _enum as rn, TimelapseRulePatchSchema as rt, DEFAULT_EVENT_COLOR as s, literal as sn, alarmPanelCapability as st, AUDIO_MACRO_LABELS as t, nodePin as tn, TIMELAPSE_DENSE_FLOOR_SEC as tt, DETECTION_MACRO_CLASSES as u, partialRecord as un, audioModeOf as ut, LabelAttributionSchema as v, faceGalleryCapability as vt, NC_ALARM_SYSTEM_EVENT_KINDS as w, isMediaOwnerType as wt, MAX_BIRTH_LATENCY_PROXY_MS as x, isDetectionMacroClass as xt, MAX_ARCHIVED_DEBUG_NOTES as y, failureContributionCapability as yt, NcSnoozeSuppressedSchema as z, sceneMonitorCapability as zt };
|