@camstack/addon-provider-onvif 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/addon.js CHANGED
@@ -13021,7 +13021,23 @@ var NotificationActionSchema = object({
13021
13021
  * else — see `notification-center/action-token.ts` for what that does and
13022
13022
  * does not buy.
13023
13023
  */
13024
- destructive: boolean().optional()
13024
+ destructive: boolean().optional(),
13025
+ /**
13026
+ * How the tap should REACH the url.
13027
+ *
13028
+ * `navigate` (absent, and every button authored before this field) opens it:
13029
+ * the phone leaves the notification and shows whatever the callback returns.
13030
+ * That is right for a button whose answer the operator wants to read.
13031
+ *
13032
+ * `background` fires it as a POST and stays put. It exists for the buttons
13033
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13034
+ * an answer to the notification, and being thrown into a browser tab to
13035
+ * confirm it costs more attention than the notification did. A backend that
13036
+ * cannot do a background call renders it as an ordinary link (the adapters
13037
+ * fall back rather than dropping the button), so this is a preference, never
13038
+ * a requirement.
13039
+ */
13040
+ mode: _enum(["navigate", "background"]).optional()
13025
13041
  });
13026
13042
  /**
13027
13043
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14022,6 +14038,9 @@ var NcSystemEventConditionSchema = object({
14022
14038
  nodeIds: array(string().min(1)).min(1).optional(),
14023
14039
  packageNames: array(string().min(1)).min(1).optional()
14024
14040
  });
14041
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14042
+ * outage the operator asked for once and forgot. */
14043
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14025
14044
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14026
14045
  var NcScheduleSchema = object({
14027
14046
  windows: array(object({
@@ -14398,15 +14417,15 @@ var NcConditionsSchema = object({
14398
14417
  * (an `immediate` rule naming an `audio-*` class, one notification per
14399
14418
  * classified sample) stays exactly as it was for rules that already use it.
14400
14419
  *
14401
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14402
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14403
- * (`camstack/src/data/notification-center.ts`, guarded by
14404
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14420
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14421
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14422
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14423
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14405
14424
  * condition fields it does not know when a rule is saved from the phone.
14406
14425
  * Publishing an editor for a condition the app cannot round-trip is how an
14407
- * operator loses a rule's conditions by opening it — so the descriptor, the
14408
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14409
- * does an audio rule become authorable.
14426
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14427
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14428
+ * follows here.
14410
14429
  */
14411
14430
  audio: NcAudioConditionSchema.optional()
14412
14431
  });
@@ -14642,6 +14661,30 @@ var NcRuleInputSchema = object({
14642
14661
  */
14643
14662
  snoozeAllowGlobal: boolean().optional(),
14644
14663
  /**
14664
+ * The snooze durations THIS rule's notification offers as buttons, in
14665
+ * minutes.
14666
+ *
14667
+ * Three states, and all three are distinct — which is exactly why this is
14668
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14669
+ * addon cap path (three production failures in one day), so a schema default
14670
+ * would collapse the first two:
14671
+ *
14672
+ * | value | meaning |
14673
+ * | --- | --- |
14674
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14675
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14676
+ * | a list | these choices, de-duplicated and sorted, at most four |
14677
+ *
14678
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14679
+ * three buttons in total) and a rule that spent it all on snooze choices
14680
+ * would push its own tap-through actions off the notification.
14681
+ *
14682
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14683
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14684
+ * window from anywhere (D133).
14685
+ */
14686
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14687
+ /**
14645
14688
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14646
14689
  *
14647
14690
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14741,6 +14784,7 @@ var NcConditionDescriptorSchema = object({
14741
14784
  "device",
14742
14785
  "package",
14743
14786
  "occupancy",
14787
+ "audio",
14744
14788
  "system"
14745
14789
  ]),
14746
14790
  label: string(),
@@ -14759,6 +14803,7 @@ var NcConditionDescriptorSchema = object({
14759
14803
  "crossingSelect",
14760
14804
  "polygonDraw",
14761
14805
  "occupancy",
14806
+ "audio",
14762
14807
  "deviceState",
14763
14808
  "systemEvent"
14764
14809
  ]),
@@ -14910,7 +14955,20 @@ var NcSnoozeInputSchema = object({
14910
14955
  ruleId: string().optional(),
14911
14956
  /** Required when `scope: 'device'`. */
14912
14957
  deviceId: number().int().optional(),
14913
- durationMinutes: number().int().min(1).max(1440),
14958
+ /**
14959
+ * Narrow the window to these subject classes — "the cat, not the person".
14960
+ *
14961
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
14962
+ * what every window authored before this field meant, so no persisted row
14963
+ * changes meaning and no client has to learn anything to keep working.
14964
+ *
14965
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
14966
+ * cross rules (D133): the operator points at a camera and a kind of thing,
14967
+ * not at whichever of their four rules happened to produce the notification
14968
+ * they are dismissing.
14969
+ */
14970
+ classes: array(string().min(1)).min(1).optional(),
14971
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14914
14972
  /**
14915
14973
  * Silence this for EVERY recipient, not just the caller. Permission is
14916
14974
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -14935,6 +14993,10 @@ var NcSnoozeSchema = object({
14935
14993
  scope: NcSnoozeScopeSchema,
14936
14994
  ruleId: string().optional(),
14937
14995
  deviceId: number().int().optional(),
14996
+ /** Subject classes this window covers. ABSENT = every class — see
14997
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
14998
+ * no SQLite column: nothing queries a window by class. */
14999
+ classes: array(string().min(1)).min(1).optional(),
14938
15000
  startedAt: number(),
14939
15001
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
14940
15002
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -31053,6 +31115,7 @@ Object.freeze({
31053
31115
  "network-access": "ingress",
31054
31116
  "smtp-provider": "email"
31055
31117
  });
31118
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
31056
31119
  new Set(["devices", "classes"]);
31057
31120
  /**
31058
31121
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
package/dist/addon.mjs CHANGED
@@ -13022,7 +13022,23 @@ var NotificationActionSchema = object({
13022
13022
  * else — see `notification-center/action-token.ts` for what that does and
13023
13023
  * does not buy.
13024
13024
  */
13025
- destructive: boolean().optional()
13025
+ destructive: boolean().optional(),
13026
+ /**
13027
+ * How the tap should REACH the url.
13028
+ *
13029
+ * `navigate` (absent, and every button authored before this field) opens it:
13030
+ * the phone leaves the notification and shows whatever the callback returns.
13031
+ * That is right for a button whose answer the operator wants to read.
13032
+ *
13033
+ * `background` fires it as a POST and stays put. It exists for the buttons
13034
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13035
+ * an answer to the notification, and being thrown into a browser tab to
13036
+ * confirm it costs more attention than the notification did. A backend that
13037
+ * cannot do a background call renders it as an ordinary link (the adapters
13038
+ * fall back rather than dropping the button), so this is a preference, never
13039
+ * a requirement.
13040
+ */
13041
+ mode: _enum(["navigate", "background"]).optional()
13026
13042
  });
13027
13043
  /**
13028
13044
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14023,6 +14039,9 @@ var NcSystemEventConditionSchema = object({
14023
14039
  nodeIds: array(string().min(1)).min(1).optional(),
14024
14040
  packageNames: array(string().min(1)).min(1).optional()
14025
14041
  });
14042
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14043
+ * outage the operator asked for once and forgot. */
14044
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14026
14045
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14027
14046
  var NcScheduleSchema = object({
14028
14047
  windows: array(object({
@@ -14399,15 +14418,15 @@ var NcConditionsSchema = object({
14399
14418
  * (an `immediate` rule naming an `audio-*` class, one notification per
14400
14419
  * classified sample) stays exactly as it was for rules that already use it.
14401
14420
  *
14402
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14403
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14404
- * (`camstack/src/data/notification-center.ts`, guarded by
14405
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14421
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14422
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14423
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14424
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14406
14425
  * condition fields it does not know when a rule is saved from the phone.
14407
14426
  * Publishing an editor for a condition the app cannot round-trip is how an
14408
- * operator loses a rule's conditions by opening it — so the descriptor, the
14409
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14410
- * does an audio rule become authorable.
14427
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14428
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14429
+ * follows here.
14411
14430
  */
14412
14431
  audio: NcAudioConditionSchema.optional()
14413
14432
  });
@@ -14643,6 +14662,30 @@ var NcRuleInputSchema = object({
14643
14662
  */
14644
14663
  snoozeAllowGlobal: boolean().optional(),
14645
14664
  /**
14665
+ * The snooze durations THIS rule's notification offers as buttons, in
14666
+ * minutes.
14667
+ *
14668
+ * Three states, and all three are distinct — which is exactly why this is
14669
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14670
+ * addon cap path (three production failures in one day), so a schema default
14671
+ * would collapse the first two:
14672
+ *
14673
+ * | value | meaning |
14674
+ * | --- | --- |
14675
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14676
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14677
+ * | a list | these choices, de-duplicated and sorted, at most four |
14678
+ *
14679
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14680
+ * three buttons in total) and a rule that spent it all on snooze choices
14681
+ * would push its own tap-through actions off the notification.
14682
+ *
14683
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14684
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14685
+ * window from anywhere (D133).
14686
+ */
14687
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14688
+ /**
14646
14689
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14647
14690
  *
14648
14691
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14742,6 +14785,7 @@ var NcConditionDescriptorSchema = object({
14742
14785
  "device",
14743
14786
  "package",
14744
14787
  "occupancy",
14788
+ "audio",
14745
14789
  "system"
14746
14790
  ]),
14747
14791
  label: string(),
@@ -14760,6 +14804,7 @@ var NcConditionDescriptorSchema = object({
14760
14804
  "crossingSelect",
14761
14805
  "polygonDraw",
14762
14806
  "occupancy",
14807
+ "audio",
14763
14808
  "deviceState",
14764
14809
  "systemEvent"
14765
14810
  ]),
@@ -14911,7 +14956,20 @@ var NcSnoozeInputSchema = object({
14911
14956
  ruleId: string().optional(),
14912
14957
  /** Required when `scope: 'device'`. */
14913
14958
  deviceId: number().int().optional(),
14914
- durationMinutes: number().int().min(1).max(1440),
14959
+ /**
14960
+ * Narrow the window to these subject classes — "the cat, not the person".
14961
+ *
14962
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
14963
+ * what every window authored before this field meant, so no persisted row
14964
+ * changes meaning and no client has to learn anything to keep working.
14965
+ *
14966
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
14967
+ * cross rules (D133): the operator points at a camera and a kind of thing,
14968
+ * not at whichever of their four rules happened to produce the notification
14969
+ * they are dismissing.
14970
+ */
14971
+ classes: array(string().min(1)).min(1).optional(),
14972
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14915
14973
  /**
14916
14974
  * Silence this for EVERY recipient, not just the caller. Permission is
14917
14975
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -14936,6 +14994,10 @@ var NcSnoozeSchema = object({
14936
14994
  scope: NcSnoozeScopeSchema,
14937
14995
  ruleId: string().optional(),
14938
14996
  deviceId: number().int().optional(),
14997
+ /** Subject classes this window covers. ABSENT = every class — see
14998
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
14999
+ * no SQLite column: nothing queries a window by class. */
15000
+ classes: array(string().min(1)).min(1).optional(),
14939
15001
  startedAt: number(),
14940
15002
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
14941
15003
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -31054,6 +31116,7 @@ Object.freeze({
31054
31116
  "network-access": "ingress",
31055
31117
  "smtp-provider": "email"
31056
31118
  });
31119
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
31057
31120
  new Set(["devices", "classes"]);
31058
31121
  /**
31059
31122
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",