@camstack/addon-decoder-nodeav 1.2.14 → 1.2.15
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/index.js +72 -9
- package/dist/index.mjs +72 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13097,7 +13097,23 @@ var NotificationActionSchema = object({
|
|
|
13097
13097
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13098
13098
|
* does not buy.
|
|
13099
13099
|
*/
|
|
13100
|
-
destructive: boolean().optional()
|
|
13100
|
+
destructive: boolean().optional(),
|
|
13101
|
+
/**
|
|
13102
|
+
* How the tap should REACH the url.
|
|
13103
|
+
*
|
|
13104
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13105
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13106
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13107
|
+
*
|
|
13108
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13109
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13110
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13111
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13112
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13113
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13114
|
+
* a requirement.
|
|
13115
|
+
*/
|
|
13116
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13101
13117
|
});
|
|
13102
13118
|
/**
|
|
13103
13119
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -14098,6 +14114,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14098
14114
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14099
14115
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14100
14116
|
});
|
|
14117
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14118
|
+
* outage the operator asked for once and forgot. */
|
|
14119
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14101
14120
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14102
14121
|
var NcScheduleSchema = object({
|
|
14103
14122
|
windows: array(object({
|
|
@@ -14474,15 +14493,15 @@ var NcConditionsSchema = object({
|
|
|
14474
14493
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14475
14494
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14476
14495
|
*
|
|
14477
|
-
*
|
|
14478
|
-
* rather than an
|
|
14479
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14480
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14496
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14497
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14498
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14499
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14481
14500
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14482
14501
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14483
|
-
* operator loses a rule's conditions by opening it — so the
|
|
14484
|
-
*
|
|
14485
|
-
*
|
|
14502
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14503
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14504
|
+
* follows here.
|
|
14486
14505
|
*/
|
|
14487
14506
|
audio: NcAudioConditionSchema.optional()
|
|
14488
14507
|
});
|
|
@@ -14718,6 +14737,30 @@ var NcRuleInputSchema = object({
|
|
|
14718
14737
|
*/
|
|
14719
14738
|
snoozeAllowGlobal: boolean().optional(),
|
|
14720
14739
|
/**
|
|
14740
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14741
|
+
* minutes.
|
|
14742
|
+
*
|
|
14743
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14744
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14745
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14746
|
+
* would collapse the first two:
|
|
14747
|
+
*
|
|
14748
|
+
* | value | meaning |
|
|
14749
|
+
* | --- | --- |
|
|
14750
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14751
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14752
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14753
|
+
*
|
|
14754
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14755
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14756
|
+
* would push its own tap-through actions off the notification.
|
|
14757
|
+
*
|
|
14758
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14759
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14760
|
+
* window from anywhere (D133).
|
|
14761
|
+
*/
|
|
14762
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14763
|
+
/**
|
|
14721
14764
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14722
14765
|
*
|
|
14723
14766
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14817,6 +14860,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14817
14860
|
"device",
|
|
14818
14861
|
"package",
|
|
14819
14862
|
"occupancy",
|
|
14863
|
+
"audio",
|
|
14820
14864
|
"system"
|
|
14821
14865
|
]),
|
|
14822
14866
|
label: string(),
|
|
@@ -14835,6 +14879,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14835
14879
|
"crossingSelect",
|
|
14836
14880
|
"polygonDraw",
|
|
14837
14881
|
"occupancy",
|
|
14882
|
+
"audio",
|
|
14838
14883
|
"deviceState",
|
|
14839
14884
|
"systemEvent"
|
|
14840
14885
|
]),
|
|
@@ -14986,7 +15031,20 @@ var NcSnoozeInputSchema = object({
|
|
|
14986
15031
|
ruleId: string().optional(),
|
|
14987
15032
|
/** Required when `scope: 'device'`. */
|
|
14988
15033
|
deviceId: number().int().optional(),
|
|
14989
|
-
|
|
15034
|
+
/**
|
|
15035
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
15036
|
+
*
|
|
15037
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15038
|
+
* what every window authored before this field meant, so no persisted row
|
|
15039
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15040
|
+
*
|
|
15041
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15042
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15043
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15044
|
+
* they are dismissing.
|
|
15045
|
+
*/
|
|
15046
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15047
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
14990
15048
|
/**
|
|
14991
15049
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
14992
15050
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -15011,6 +15069,10 @@ var NcSnoozeSchema = object({
|
|
|
15011
15069
|
scope: NcSnoozeScopeSchema,
|
|
15012
15070
|
ruleId: string().optional(),
|
|
15013
15071
|
deviceId: number().int().optional(),
|
|
15072
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15073
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15074
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15075
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15014
15076
|
startedAt: number(),
|
|
15015
15077
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
15016
15078
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -30583,6 +30645,7 @@ Object.freeze({
|
|
|
30583
30645
|
"network-access": "ingress",
|
|
30584
30646
|
"smtp-provider": "email"
|
|
30585
30647
|
});
|
|
30648
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
30586
30649
|
new Set(["devices", "classes"]);
|
|
30587
30650
|
/**
|
|
30588
30651
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
package/dist/index.mjs
CHANGED
|
@@ -13093,7 +13093,23 @@ var NotificationActionSchema = object({
|
|
|
13093
13093
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13094
13094
|
* does not buy.
|
|
13095
13095
|
*/
|
|
13096
|
-
destructive: boolean().optional()
|
|
13096
|
+
destructive: boolean().optional(),
|
|
13097
|
+
/**
|
|
13098
|
+
* How the tap should REACH the url.
|
|
13099
|
+
*
|
|
13100
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13101
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13102
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13103
|
+
*
|
|
13104
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13105
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13106
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13107
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13108
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13109
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13110
|
+
* a requirement.
|
|
13111
|
+
*/
|
|
13112
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13097
13113
|
});
|
|
13098
13114
|
/**
|
|
13099
13115
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -14094,6 +14110,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14094
14110
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14095
14111
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14096
14112
|
});
|
|
14113
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14114
|
+
* outage the operator asked for once and forgot. */
|
|
14115
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14097
14116
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14098
14117
|
var NcScheduleSchema = object({
|
|
14099
14118
|
windows: array(object({
|
|
@@ -14470,15 +14489,15 @@ var NcConditionsSchema = object({
|
|
|
14470
14489
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14471
14490
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14472
14491
|
*
|
|
14473
|
-
*
|
|
14474
|
-
* rather than an
|
|
14475
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14476
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14492
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14493
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14494
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14495
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14477
14496
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14478
14497
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14479
|
-
* operator loses a rule's conditions by opening it — so the
|
|
14480
|
-
*
|
|
14481
|
-
*
|
|
14498
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14499
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14500
|
+
* follows here.
|
|
14482
14501
|
*/
|
|
14483
14502
|
audio: NcAudioConditionSchema.optional()
|
|
14484
14503
|
});
|
|
@@ -14714,6 +14733,30 @@ var NcRuleInputSchema = object({
|
|
|
14714
14733
|
*/
|
|
14715
14734
|
snoozeAllowGlobal: boolean().optional(),
|
|
14716
14735
|
/**
|
|
14736
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14737
|
+
* minutes.
|
|
14738
|
+
*
|
|
14739
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14740
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14741
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14742
|
+
* would collapse the first two:
|
|
14743
|
+
*
|
|
14744
|
+
* | value | meaning |
|
|
14745
|
+
* | --- | --- |
|
|
14746
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14747
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14748
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14749
|
+
*
|
|
14750
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14751
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14752
|
+
* would push its own tap-through actions off the notification.
|
|
14753
|
+
*
|
|
14754
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14755
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14756
|
+
* window from anywhere (D133).
|
|
14757
|
+
*/
|
|
14758
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14759
|
+
/**
|
|
14717
14760
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14718
14761
|
*
|
|
14719
14762
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -14813,6 +14856,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14813
14856
|
"device",
|
|
14814
14857
|
"package",
|
|
14815
14858
|
"occupancy",
|
|
14859
|
+
"audio",
|
|
14816
14860
|
"system"
|
|
14817
14861
|
]),
|
|
14818
14862
|
label: string(),
|
|
@@ -14831,6 +14875,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
14831
14875
|
"crossingSelect",
|
|
14832
14876
|
"polygonDraw",
|
|
14833
14877
|
"occupancy",
|
|
14878
|
+
"audio",
|
|
14834
14879
|
"deviceState",
|
|
14835
14880
|
"systemEvent"
|
|
14836
14881
|
]),
|
|
@@ -14982,7 +15027,20 @@ var NcSnoozeInputSchema = object({
|
|
|
14982
15027
|
ruleId: string().optional(),
|
|
14983
15028
|
/** Required when `scope: 'device'`. */
|
|
14984
15029
|
deviceId: number().int().optional(),
|
|
14985
|
-
|
|
15030
|
+
/**
|
|
15031
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
15032
|
+
*
|
|
15033
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15034
|
+
* what every window authored before this field meant, so no persisted row
|
|
15035
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15036
|
+
*
|
|
15037
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15038
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15039
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15040
|
+
* they are dismissing.
|
|
15041
|
+
*/
|
|
15042
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15043
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
14986
15044
|
/**
|
|
14987
15045
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
14988
15046
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -15007,6 +15065,10 @@ var NcSnoozeSchema = object({
|
|
|
15007
15065
|
scope: NcSnoozeScopeSchema,
|
|
15008
15066
|
ruleId: string().optional(),
|
|
15009
15067
|
deviceId: number().int().optional(),
|
|
15068
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15069
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15070
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15071
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15010
15072
|
startedAt: number(),
|
|
15011
15073
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
15012
15074
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -30579,6 +30641,7 @@ Object.freeze({
|
|
|
30579
30641
|
"network-access": "ingress",
|
|
30580
30642
|
"smtp-provider": "email"
|
|
30581
30643
|
});
|
|
30644
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
30582
30645
|
new Set(["devices", "classes"]);
|
|
30583
30646
|
/**
|
|
30584
30647
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|