@camstack/addon-auth 1.2.16 → 1.2.17

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.
@@ -13127,7 +13127,23 @@ var NotificationActionSchema = object({
13127
13127
  * else — see `notification-center/action-token.ts` for what that does and
13128
13128
  * does not buy.
13129
13129
  */
13130
- destructive: boolean().optional()
13130
+ destructive: boolean().optional(),
13131
+ /**
13132
+ * How the tap should REACH the url.
13133
+ *
13134
+ * `navigate` (absent, and every button authored before this field) opens it:
13135
+ * the phone leaves the notification and shows whatever the callback returns.
13136
+ * That is right for a button whose answer the operator wants to read.
13137
+ *
13138
+ * `background` fires it as a POST and stays put. It exists for the buttons
13139
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13140
+ * an answer to the notification, and being thrown into a browser tab to
13141
+ * confirm it costs more attention than the notification did. A backend that
13142
+ * cannot do a background call renders it as an ordinary link (the adapters
13143
+ * fall back rather than dropping the button), so this is a preference, never
13144
+ * a requirement.
13145
+ */
13146
+ mode: _enum(["navigate", "background"]).optional()
13131
13147
  });
13132
13148
  /**
13133
13149
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14128,6 +14144,9 @@ var NcSystemEventConditionSchema = object({
14128
14144
  nodeIds: array(string().min(1)).min(1).optional(),
14129
14145
  packageNames: array(string().min(1)).min(1).optional()
14130
14146
  });
14147
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14148
+ * outage the operator asked for once and forgot. */
14149
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14131
14150
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14132
14151
  var NcScheduleSchema = object({
14133
14152
  windows: array(object({
@@ -14504,15 +14523,15 @@ var NcConditionsSchema = object({
14504
14523
  * (an `immediate` rule naming an `audio-*` class, one notification per
14505
14524
  * classified sample) stays exactly as it was for rules that already use it.
14506
14525
  *
14507
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14508
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14509
- * (`camstack/src/data/notification-center.ts`, guarded by
14510
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14526
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14527
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14528
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14529
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14511
14530
  * condition fields it does not know when a rule is saved from the phone.
14512
14531
  * Publishing an editor for a condition the app cannot round-trip is how an
14513
- * operator loses a rule's conditions by opening it — so the descriptor, the
14514
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14515
- * does an audio rule become authorable.
14532
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14533
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14534
+ * follows here.
14516
14535
  */
14517
14536
  audio: NcAudioConditionSchema.optional()
14518
14537
  });
@@ -14748,6 +14767,30 @@ var NcRuleInputSchema = object({
14748
14767
  */
14749
14768
  snoozeAllowGlobal: boolean().optional(),
14750
14769
  /**
14770
+ * The snooze durations THIS rule's notification offers as buttons, in
14771
+ * minutes.
14772
+ *
14773
+ * Three states, and all three are distinct — which is exactly why this is
14774
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14775
+ * addon cap path (three production failures in one day), so a schema default
14776
+ * would collapse the first two:
14777
+ *
14778
+ * | value | meaning |
14779
+ * | --- | --- |
14780
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14781
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14782
+ * | a list | these choices, de-duplicated and sorted, at most four |
14783
+ *
14784
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14785
+ * three buttons in total) and a rule that spent it all on snooze choices
14786
+ * would push its own tap-through actions off the notification.
14787
+ *
14788
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14789
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14790
+ * window from anywhere (D133).
14791
+ */
14792
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14793
+ /**
14751
14794
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14752
14795
  *
14753
14796
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14847,6 +14890,7 @@ var NcConditionDescriptorSchema = object({
14847
14890
  "device",
14848
14891
  "package",
14849
14892
  "occupancy",
14893
+ "audio",
14850
14894
  "system"
14851
14895
  ]),
14852
14896
  label: string(),
@@ -14865,6 +14909,7 @@ var NcConditionDescriptorSchema = object({
14865
14909
  "crossingSelect",
14866
14910
  "polygonDraw",
14867
14911
  "occupancy",
14912
+ "audio",
14868
14913
  "deviceState",
14869
14914
  "systemEvent"
14870
14915
  ]),
@@ -15016,7 +15061,20 @@ var NcSnoozeInputSchema = object({
15016
15061
  ruleId: string().optional(),
15017
15062
  /** Required when `scope: 'device'`. */
15018
15063
  deviceId: number().int().optional(),
15019
- durationMinutes: number().int().min(1).max(1440),
15064
+ /**
15065
+ * Narrow the window to these subject classes — "the cat, not the person".
15066
+ *
15067
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15068
+ * what every window authored before this field meant, so no persisted row
15069
+ * changes meaning and no client has to learn anything to keep working.
15070
+ *
15071
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15072
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15073
+ * not at whichever of their four rules happened to produce the notification
15074
+ * they are dismissing.
15075
+ */
15076
+ classes: array(string().min(1)).min(1).optional(),
15077
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15020
15078
  /**
15021
15079
  * Silence this for EVERY recipient, not just the caller. Permission is
15022
15080
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15041,6 +15099,10 @@ var NcSnoozeSchema = object({
15041
15099
  scope: NcSnoozeScopeSchema,
15042
15100
  ruleId: string().optional(),
15043
15101
  deviceId: number().int().optional(),
15102
+ /** Subject classes this window covers. ABSENT = every class — see
15103
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15104
+ * no SQLite column: nothing queries a window by class. */
15105
+ classes: array(string().min(1)).min(1).optional(),
15044
15106
  startedAt: number(),
15045
15107
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15046
15108
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -30630,6 +30692,7 @@ Object.freeze({
30630
30692
  "network-access": "ingress",
30631
30693
  "smtp-provider": "email"
30632
30694
  });
30695
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30633
30696
  new Set(["devices", "classes"]);
30634
30697
  /**
30635
30698
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -13127,7 +13127,23 @@ var NotificationActionSchema = object({
13127
13127
  * else — see `notification-center/action-token.ts` for what that does and
13128
13128
  * does not buy.
13129
13129
  */
13130
- destructive: boolean().optional()
13130
+ destructive: boolean().optional(),
13131
+ /**
13132
+ * How the tap should REACH the url.
13133
+ *
13134
+ * `navigate` (absent, and every button authored before this field) opens it:
13135
+ * the phone leaves the notification and shows whatever the callback returns.
13136
+ * That is right for a button whose answer the operator wants to read.
13137
+ *
13138
+ * `background` fires it as a POST and stays put. It exists for the buttons
13139
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13140
+ * an answer to the notification, and being thrown into a browser tab to
13141
+ * confirm it costs more attention than the notification did. A backend that
13142
+ * cannot do a background call renders it as an ordinary link (the adapters
13143
+ * fall back rather than dropping the button), so this is a preference, never
13144
+ * a requirement.
13145
+ */
13146
+ mode: _enum(["navigate", "background"]).optional()
13131
13147
  });
13132
13148
  /**
13133
13149
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14128,6 +14144,9 @@ var NcSystemEventConditionSchema = object({
14128
14144
  nodeIds: array(string().min(1)).min(1).optional(),
14129
14145
  packageNames: array(string().min(1)).min(1).optional()
14130
14146
  });
14147
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14148
+ * outage the operator asked for once and forgot. */
14149
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14131
14150
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14132
14151
  var NcScheduleSchema = object({
14133
14152
  windows: array(object({
@@ -14504,15 +14523,15 @@ var NcConditionsSchema = object({
14504
14523
  * (an `immediate` rule naming an `audio-*` class, one notification per
14505
14524
  * classified sample) stays exactly as it was for rules that already use it.
14506
14525
  *
14507
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14508
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14509
- * (`camstack/src/data/notification-center.ts`, guarded by
14510
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14526
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14527
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14528
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14529
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14511
14530
  * condition fields it does not know when a rule is saved from the phone.
14512
14531
  * Publishing an editor for a condition the app cannot round-trip is how an
14513
- * operator loses a rule's conditions by opening it — so the descriptor, the
14514
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14515
- * does an audio rule become authorable.
14532
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14533
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14534
+ * follows here.
14516
14535
  */
14517
14536
  audio: NcAudioConditionSchema.optional()
14518
14537
  });
@@ -14748,6 +14767,30 @@ var NcRuleInputSchema = object({
14748
14767
  */
14749
14768
  snoozeAllowGlobal: boolean().optional(),
14750
14769
  /**
14770
+ * The snooze durations THIS rule's notification offers as buttons, in
14771
+ * minutes.
14772
+ *
14773
+ * Three states, and all three are distinct — which is exactly why this is
14774
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14775
+ * addon cap path (three production failures in one day), so a schema default
14776
+ * would collapse the first two:
14777
+ *
14778
+ * | value | meaning |
14779
+ * | --- | --- |
14780
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14781
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14782
+ * | a list | these choices, de-duplicated and sorted, at most four |
14783
+ *
14784
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14785
+ * three buttons in total) and a rule that spent it all on snooze choices
14786
+ * would push its own tap-through actions off the notification.
14787
+ *
14788
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14789
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14790
+ * window from anywhere (D133).
14791
+ */
14792
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14793
+ /**
14751
14794
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14752
14795
  *
14753
14796
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14847,6 +14890,7 @@ var NcConditionDescriptorSchema = object({
14847
14890
  "device",
14848
14891
  "package",
14849
14892
  "occupancy",
14893
+ "audio",
14850
14894
  "system"
14851
14895
  ]),
14852
14896
  label: string(),
@@ -14865,6 +14909,7 @@ var NcConditionDescriptorSchema = object({
14865
14909
  "crossingSelect",
14866
14910
  "polygonDraw",
14867
14911
  "occupancy",
14912
+ "audio",
14868
14913
  "deviceState",
14869
14914
  "systemEvent"
14870
14915
  ]),
@@ -15016,7 +15061,20 @@ var NcSnoozeInputSchema = object({
15016
15061
  ruleId: string().optional(),
15017
15062
  /** Required when `scope: 'device'`. */
15018
15063
  deviceId: number().int().optional(),
15019
- durationMinutes: number().int().min(1).max(1440),
15064
+ /**
15065
+ * Narrow the window to these subject classes — "the cat, not the person".
15066
+ *
15067
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15068
+ * what every window authored before this field meant, so no persisted row
15069
+ * changes meaning and no client has to learn anything to keep working.
15070
+ *
15071
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15072
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15073
+ * not at whichever of their four rules happened to produce the notification
15074
+ * they are dismissing.
15075
+ */
15076
+ classes: array(string().min(1)).min(1).optional(),
15077
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15020
15078
  /**
15021
15079
  * Silence this for EVERY recipient, not just the caller. Permission is
15022
15080
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15041,6 +15099,10 @@ var NcSnoozeSchema = object({
15041
15099
  scope: NcSnoozeScopeSchema,
15042
15100
  ruleId: string().optional(),
15043
15101
  deviceId: number().int().optional(),
15102
+ /** Subject classes this window covers. ABSENT = every class — see
15103
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15104
+ * no SQLite column: nothing queries a window by class. */
15105
+ classes: array(string().min(1)).min(1).optional(),
15044
15106
  startedAt: number(),
15045
15107
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15046
15108
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -30630,6 +30692,7 @@ Object.freeze({
30630
30692
  "network-access": "ingress",
30631
30693
  "smtp-provider": "email"
30632
30694
  });
30695
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30633
30696
  new Set(["devices", "classes"]);
30634
30697
  /**
30635
30698
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../chunk-Cek0wNdY.js");
6
- const require_dist = require("../dist-jy0Ghg8b.js");
6
+ const require_dist = require("../dist-BlMcuSgB.js");
7
7
  //#region src/magic-link/auth-magic-link.addon.ts
8
8
  /**
9
9
  * Magic-link authentication addon.
@@ -1,4 +1,4 @@
1
- import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-SWl70qVs.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-BM2KmZVa.mjs";
2
2
  //#region src/magic-link/auth-magic-link.addon.ts
3
3
  /**
4
4
  * Magic-link authentication addon.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-Cek0wNdY.js");
6
- const require_dist = require("../dist-jy0Ghg8b.js");
6
+ const require_dist = require("../dist-BlMcuSgB.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  node_crypto = require_chunk.__toESM(node_crypto);
9
9
  //#region node_modules/jose/dist/webapi/lib/buffer_utils.js
@@ -1,4 +1,4 @@
1
- import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-SWl70qVs.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-BM2KmZVa.mjs";
2
2
  import * as crypto$1 from "node:crypto";
3
3
  //#region node_modules/jose/dist/webapi/lib/buffer_utils.js
4
4
  var encoder = new TextEncoder();
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
3
3
  var e = {
4
4
  "@camstack/sdk": {
5
5
  name: "@camstack/sdk",
6
- version: "1.2.16",
6
+ version: "1.2.17",
7
7
  scope: ["default"],
8
8
  loaded: !1,
9
9
  from: "addon_auth_webauthn_widgets",
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.65",
21
+ version: "1.2.66",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_auth_webauthn_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.44",
36
+ version: "1.2.45",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_auth_webauthn_widgets",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-Cek0wNdY.js");
6
- const require_dist = require("../dist-jy0Ghg8b.js");
6
+ const require_dist = require("../dist-BlMcuSgB.js");
7
7
  let stream = require("stream");
8
8
  stream = require_chunk.__toESM(stream, 1);
9
9
  let http = require("http");
@@ -1,4 +1,4 @@
1
- import { a as loginMethodCapability, c as BaseAddon, d as number, f as object, l as array, n as addonWidgetsSourceCapability, o as userPasskeysCapability, p as string, u as boolean } from "../dist-SWl70qVs.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, d as number, f as object, l as array, n as addonWidgetsSourceCapability, o as userPasskeysCapability, p as string, u as boolean } from "../dist-BM2KmZVa.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import Stream from "stream";
4
4
  import http from "http";
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.65",
39
+ version: "1.2.66",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -45,7 +45,7 @@ async function r() {
45
45
  }
46
46
  },
47
47
  "@camstack/sdk": {
48
- version: "1.2.16",
48
+ version: "1.2.17",
49
49
  scope: "default",
50
50
  shareConfig: {
51
51
  singleton: !0,
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.44",
84
+ version: "1.2.45",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-B08tVFd1.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-D2wonstM.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-auth",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "Authentication bundle — magic-link, OIDC, and WebAuthn/passkey. Multi-entry npm package shipping 3 addons under a single bundle; each addon keeps its own id, capabilities, and runner.",
5
5
  "keywords": [
6
6
  "camstack",