@camstack/addon-mqtt-broker 1.2.15 → 1.2.16
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/mqtt-broker.addon.js +72 -9
- package/dist/mqtt-broker.addon.mjs +72 -9
- package/package.json +1 -1
|
@@ -13064,7 +13064,23 @@ var NotificationActionSchema = object({
|
|
|
13064
13064
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13065
13065
|
* does not buy.
|
|
13066
13066
|
*/
|
|
13067
|
-
destructive: boolean().optional()
|
|
13067
|
+
destructive: boolean().optional(),
|
|
13068
|
+
/**
|
|
13069
|
+
* How the tap should REACH the url.
|
|
13070
|
+
*
|
|
13071
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13072
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13073
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13074
|
+
*
|
|
13075
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13076
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13077
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13078
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13079
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13080
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13081
|
+
* a requirement.
|
|
13082
|
+
*/
|
|
13083
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13068
13084
|
});
|
|
13069
13085
|
/**
|
|
13070
13086
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -14065,6 +14081,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14065
14081
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14066
14082
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14067
14083
|
});
|
|
14084
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14085
|
+
* outage the operator asked for once and forgot. */
|
|
14086
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14068
14087
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14069
14088
|
var NcScheduleSchema = object({
|
|
14070
14089
|
windows: array(object({
|
|
@@ -14441,15 +14460,15 @@ var NcConditionsSchema = object({
|
|
|
14441
14460
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14442
14461
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14443
14462
|
*
|
|
14444
|
-
*
|
|
14445
|
-
* rather than an
|
|
14446
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14447
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14463
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14464
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14465
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14466
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14448
14467
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14449
14468
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14450
|
-
* operator loses a rule's conditions by opening it — so the
|
|
14451
|
-
*
|
|
14452
|
-
*
|
|
14469
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14470
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14471
|
+
* follows here.
|
|
14453
14472
|
*/
|
|
14454
14473
|
audio: NcAudioConditionSchema.optional()
|
|
14455
14474
|
});
|
|
@@ -14685,6 +14704,30 @@ var NcRuleInputSchema = object({
|
|
|
14685
14704
|
*/
|
|
14686
14705
|
snoozeAllowGlobal: boolean().optional(),
|
|
14687
14706
|
/**
|
|
14707
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14708
|
+
* minutes.
|
|
14709
|
+
*
|
|
14710
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14711
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14712
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14713
|
+
* would collapse the first two:
|
|
14714
|
+
*
|
|
14715
|
+
* | value | meaning |
|
|
14716
|
+
* | --- | --- |
|
|
14717
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14718
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14719
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14720
|
+
*
|
|
14721
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14722
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14723
|
+
* would push its own tap-through actions off the notification.
|
|
14724
|
+
*
|
|
14725
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14726
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14727
|
+
* window from anywhere (D133).
|
|
14728
|
+
*/
|
|
14729
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14730
|
+
/**
|
|
14688
14731
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14689
14732
|
*
|
|
14690
14733
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14784,6 +14827,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14784
14827
|
"device",
|
|
14785
14828
|
"package",
|
|
14786
14829
|
"occupancy",
|
|
14830
|
+
"audio",
|
|
14787
14831
|
"system"
|
|
14788
14832
|
]),
|
|
14789
14833
|
label: string(),
|
|
@@ -14802,6 +14846,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14802
14846
|
"crossingSelect",
|
|
14803
14847
|
"polygonDraw",
|
|
14804
14848
|
"occupancy",
|
|
14849
|
+
"audio",
|
|
14805
14850
|
"deviceState",
|
|
14806
14851
|
"systemEvent"
|
|
14807
14852
|
]),
|
|
@@ -14953,7 +14998,20 @@ var NcSnoozeInputSchema = object({
|
|
|
14953
14998
|
ruleId: string().optional(),
|
|
14954
14999
|
/** Required when `scope: 'device'`. */
|
|
14955
15000
|
deviceId: number().int().optional(),
|
|
14956
|
-
|
|
15001
|
+
/**
|
|
15002
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
15003
|
+
*
|
|
15004
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15005
|
+
* what every window authored before this field meant, so no persisted row
|
|
15006
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15007
|
+
*
|
|
15008
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15009
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15010
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15011
|
+
* they are dismissing.
|
|
15012
|
+
*/
|
|
15013
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15014
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
14957
15015
|
/**
|
|
14958
15016
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
14959
15017
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -14978,6 +15036,10 @@ var NcSnoozeSchema = object({
|
|
|
14978
15036
|
scope: NcSnoozeScopeSchema,
|
|
14979
15037
|
ruleId: string().optional(),
|
|
14980
15038
|
deviceId: number().int().optional(),
|
|
15039
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15040
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15041
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15042
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
14981
15043
|
startedAt: number(),
|
|
14982
15044
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
14983
15045
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -30550,6 +30612,7 @@ Object.freeze({
|
|
|
30550
30612
|
"network-access": "ingress",
|
|
30551
30613
|
"smtp-provider": "email"
|
|
30552
30614
|
});
|
|
30615
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
30553
30616
|
new Set(["devices", "classes"]);
|
|
30554
30617
|
/**
|
|
30555
30618
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
@@ -13059,7 +13059,23 @@ var NotificationActionSchema = object({
|
|
|
13059
13059
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13060
13060
|
* does not buy.
|
|
13061
13061
|
*/
|
|
13062
|
-
destructive: boolean().optional()
|
|
13062
|
+
destructive: boolean().optional(),
|
|
13063
|
+
/**
|
|
13064
|
+
* How the tap should REACH the url.
|
|
13065
|
+
*
|
|
13066
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13067
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13068
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13069
|
+
*
|
|
13070
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13071
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13072
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13073
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13074
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13075
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13076
|
+
* a requirement.
|
|
13077
|
+
*/
|
|
13078
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13063
13079
|
});
|
|
13064
13080
|
/**
|
|
13065
13081
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -14060,6 +14076,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14060
14076
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14061
14077
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14062
14078
|
});
|
|
14079
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14080
|
+
* outage the operator asked for once and forgot. */
|
|
14081
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14063
14082
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14064
14083
|
var NcScheduleSchema = object({
|
|
14065
14084
|
windows: array(object({
|
|
@@ -14436,15 +14455,15 @@ var NcConditionsSchema = object({
|
|
|
14436
14455
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14437
14456
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14438
14457
|
*
|
|
14439
|
-
*
|
|
14440
|
-
* rather than an
|
|
14441
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14442
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14458
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14459
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14460
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14461
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14443
14462
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14444
14463
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14445
|
-
* operator loses a rule's conditions by opening it — so the
|
|
14446
|
-
*
|
|
14447
|
-
*
|
|
14464
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14465
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14466
|
+
* follows here.
|
|
14448
14467
|
*/
|
|
14449
14468
|
audio: NcAudioConditionSchema.optional()
|
|
14450
14469
|
});
|
|
@@ -14680,6 +14699,30 @@ var NcRuleInputSchema = object({
|
|
|
14680
14699
|
*/
|
|
14681
14700
|
snoozeAllowGlobal: boolean().optional(),
|
|
14682
14701
|
/**
|
|
14702
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14703
|
+
* minutes.
|
|
14704
|
+
*
|
|
14705
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14706
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14707
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14708
|
+
* would collapse the first two:
|
|
14709
|
+
*
|
|
14710
|
+
* | value | meaning |
|
|
14711
|
+
* | --- | --- |
|
|
14712
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14713
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14714
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14715
|
+
*
|
|
14716
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14717
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14718
|
+
* would push its own tap-through actions off the notification.
|
|
14719
|
+
*
|
|
14720
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14721
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14722
|
+
* window from anywhere (D133).
|
|
14723
|
+
*/
|
|
14724
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14725
|
+
/**
|
|
14683
14726
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14684
14727
|
*
|
|
14685
14728
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14779,6 +14822,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14779
14822
|
"device",
|
|
14780
14823
|
"package",
|
|
14781
14824
|
"occupancy",
|
|
14825
|
+
"audio",
|
|
14782
14826
|
"system"
|
|
14783
14827
|
]),
|
|
14784
14828
|
label: string(),
|
|
@@ -14797,6 +14841,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14797
14841
|
"crossingSelect",
|
|
14798
14842
|
"polygonDraw",
|
|
14799
14843
|
"occupancy",
|
|
14844
|
+
"audio",
|
|
14800
14845
|
"deviceState",
|
|
14801
14846
|
"systemEvent"
|
|
14802
14847
|
]),
|
|
@@ -14948,7 +14993,20 @@ var NcSnoozeInputSchema = object({
|
|
|
14948
14993
|
ruleId: string().optional(),
|
|
14949
14994
|
/** Required when `scope: 'device'`. */
|
|
14950
14995
|
deviceId: number().int().optional(),
|
|
14951
|
-
|
|
14996
|
+
/**
|
|
14997
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
14998
|
+
*
|
|
14999
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15000
|
+
* what every window authored before this field meant, so no persisted row
|
|
15001
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15002
|
+
*
|
|
15003
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15004
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15005
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15006
|
+
* they are dismissing.
|
|
15007
|
+
*/
|
|
15008
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15009
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
14952
15010
|
/**
|
|
14953
15011
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
14954
15012
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -14973,6 +15031,10 @@ var NcSnoozeSchema = object({
|
|
|
14973
15031
|
scope: NcSnoozeScopeSchema,
|
|
14974
15032
|
ruleId: string().optional(),
|
|
14975
15033
|
deviceId: number().int().optional(),
|
|
15034
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15035
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15036
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15037
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
14976
15038
|
startedAt: number(),
|
|
14977
15039
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
14978
15040
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -30545,6 +30607,7 @@ Object.freeze({
|
|
|
30545
30607
|
"network-access": "ingress",
|
|
30546
30608
|
"smtp-provider": "email"
|
|
30547
30609
|
});
|
|
30610
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
30548
30611
|
new Set(["devices", "classes"]);
|
|
30549
30612
|
/**
|
|
30550
30613
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|