@camstack/addon-remote-storage 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/s3.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BiN4gTjL.js");
5
+ const require_shared = require("./shared-yG0yCeMJ.js");
6
6
  let node_stream = require("node:stream");
7
7
  let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
8
8
  let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
package/dist/s3.addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-EsnEAfgQ.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-Hjb2o6ip.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
4
4
  import { Upload } from "@aws-sdk/lib-storage";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BiN4gTjL.js");
5
+ const require_shared = require("./shared-yG0yCeMJ.js");
6
6
  let ssh2 = require("ssh2");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-EsnEAfgQ.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-Hjb2o6ip.mjs";
2
2
  import { Client } from "ssh2";
3
3
  import * as path from "node:path";
4
4
  //#region src/providers/sftp/sftp-config-schema.ts
@@ -12952,7 +12952,23 @@ var NotificationActionSchema = object({
12952
12952
  * else — see `notification-center/action-token.ts` for what that does and
12953
12953
  * does not buy.
12954
12954
  */
12955
- destructive: boolean().optional()
12955
+ destructive: boolean().optional(),
12956
+ /**
12957
+ * How the tap should REACH the url.
12958
+ *
12959
+ * `navigate` (absent, and every button authored before this field) opens it:
12960
+ * the phone leaves the notification and shows whatever the callback returns.
12961
+ * That is right for a button whose answer the operator wants to read.
12962
+ *
12963
+ * `background` fires it as a POST and stays put. It exists for the buttons
12964
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
12965
+ * an answer to the notification, and being thrown into a browser tab to
12966
+ * confirm it costs more attention than the notification did. A backend that
12967
+ * cannot do a background call renders it as an ordinary link (the adapters
12968
+ * fall back rather than dropping the button), so this is a preference, never
12969
+ * a requirement.
12970
+ */
12971
+ mode: _enum(["navigate", "background"]).optional()
12956
12972
  });
12957
12973
  /**
12958
12974
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -13953,6 +13969,9 @@ var NcSystemEventConditionSchema = object({
13953
13969
  nodeIds: array(string().min(1)).min(1).optional(),
13954
13970
  packageNames: array(string().min(1)).min(1).optional()
13955
13971
  });
13972
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
13973
+ * outage the operator asked for once and forgot. */
13974
+ var NC_SNOOZE_MAX_MINUTES = 1440;
13956
13975
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
13957
13976
  var NcScheduleSchema = object({
13958
13977
  windows: array(object({
@@ -14329,15 +14348,15 @@ var NcConditionsSchema = object({
14329
14348
  * (an `immediate` rule naming an `audio-*` class, one notification per
14330
14349
  * classified sample) stays exactly as it was for rules that already use it.
14331
14350
  *
14332
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14333
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14334
- * (`camstack/src/data/notification-center.ts`, guarded by
14335
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14351
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14352
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14353
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14354
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14336
14355
  * condition fields it does not know when a rule is saved from the phone.
14337
14356
  * Publishing an editor for a condition the app cannot round-trip is how an
14338
- * operator loses a rule's conditions by opening it — so the descriptor, the
14339
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14340
- * does an audio rule become authorable.
14357
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14358
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14359
+ * follows here.
14341
14360
  */
14342
14361
  audio: NcAudioConditionSchema.optional()
14343
14362
  });
@@ -14573,6 +14592,30 @@ var NcRuleInputSchema = object({
14573
14592
  */
14574
14593
  snoozeAllowGlobal: boolean().optional(),
14575
14594
  /**
14595
+ * The snooze durations THIS rule's notification offers as buttons, in
14596
+ * minutes.
14597
+ *
14598
+ * Three states, and all three are distinct — which is exactly why this is
14599
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14600
+ * addon cap path (three production failures in one day), so a schema default
14601
+ * would collapse the first two:
14602
+ *
14603
+ * | value | meaning |
14604
+ * | --- | --- |
14605
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14606
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14607
+ * | a list | these choices, de-duplicated and sorted, at most four |
14608
+ *
14609
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14610
+ * three buttons in total) and a rule that spent it all on snooze choices
14611
+ * would push its own tap-through actions off the notification.
14612
+ *
14613
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14614
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14615
+ * window from anywhere (D133).
14616
+ */
14617
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14618
+ /**
14576
14619
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14577
14620
  *
14578
14621
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14672,6 +14715,7 @@ var NcConditionDescriptorSchema = object({
14672
14715
  "device",
14673
14716
  "package",
14674
14717
  "occupancy",
14718
+ "audio",
14675
14719
  "system"
14676
14720
  ]),
14677
14721
  label: string(),
@@ -14690,6 +14734,7 @@ var NcConditionDescriptorSchema = object({
14690
14734
  "crossingSelect",
14691
14735
  "polygonDraw",
14692
14736
  "occupancy",
14737
+ "audio",
14693
14738
  "deviceState",
14694
14739
  "systemEvent"
14695
14740
  ]),
@@ -14841,7 +14886,20 @@ var NcSnoozeInputSchema = object({
14841
14886
  ruleId: string().optional(),
14842
14887
  /** Required when `scope: 'device'`. */
14843
14888
  deviceId: number().int().optional(),
14844
- durationMinutes: number().int().min(1).max(1440),
14889
+ /**
14890
+ * Narrow the window to these subject classes — "the cat, not the person".
14891
+ *
14892
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
14893
+ * what every window authored before this field meant, so no persisted row
14894
+ * changes meaning and no client has to learn anything to keep working.
14895
+ *
14896
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
14897
+ * cross rules (D133): the operator points at a camera and a kind of thing,
14898
+ * not at whichever of their four rules happened to produce the notification
14899
+ * they are dismissing.
14900
+ */
14901
+ classes: array(string().min(1)).min(1).optional(),
14902
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14845
14903
  /**
14846
14904
  * Silence this for EVERY recipient, not just the caller. Permission is
14847
14905
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -14866,6 +14924,10 @@ var NcSnoozeSchema = object({
14866
14924
  scope: NcSnoozeScopeSchema,
14867
14925
  ruleId: string().optional(),
14868
14926
  deviceId: number().int().optional(),
14927
+ /** Subject classes this window covers. ABSENT = every class — see
14928
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
14929
+ * no SQLite column: nothing queries a window by class. */
14930
+ classes: array(string().min(1)).min(1).optional(),
14869
14931
  startedAt: number(),
14870
14932
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
14871
14933
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -30483,6 +30545,7 @@ Object.freeze({
30483
30545
  "network-access": "ingress",
30484
30546
  "smtp-provider": "email"
30485
30547
  });
30548
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30486
30549
  new Set(["devices", "classes"]);
30487
30550
  /**
30488
30551
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -12975,7 +12975,23 @@ var NotificationActionSchema = object({
12975
12975
  * else — see `notification-center/action-token.ts` for what that does and
12976
12976
  * does not buy.
12977
12977
  */
12978
- destructive: boolean().optional()
12978
+ destructive: boolean().optional(),
12979
+ /**
12980
+ * How the tap should REACH the url.
12981
+ *
12982
+ * `navigate` (absent, and every button authored before this field) opens it:
12983
+ * the phone leaves the notification and shows whatever the callback returns.
12984
+ * That is right for a button whose answer the operator wants to read.
12985
+ *
12986
+ * `background` fires it as a POST and stays put. It exists for the buttons
12987
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
12988
+ * an answer to the notification, and being thrown into a browser tab to
12989
+ * confirm it costs more attention than the notification did. A backend that
12990
+ * cannot do a background call renders it as an ordinary link (the adapters
12991
+ * fall back rather than dropping the button), so this is a preference, never
12992
+ * a requirement.
12993
+ */
12994
+ mode: _enum(["navigate", "background"]).optional()
12979
12995
  });
12980
12996
  /**
12981
12997
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -13976,6 +13992,9 @@ var NcSystemEventConditionSchema = object({
13976
13992
  nodeIds: array(string().min(1)).min(1).optional(),
13977
13993
  packageNames: array(string().min(1)).min(1).optional()
13978
13994
  });
13995
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
13996
+ * outage the operator asked for once and forgot. */
13997
+ var NC_SNOOZE_MAX_MINUTES = 1440;
13979
13998
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
13980
13999
  var NcScheduleSchema = object({
13981
14000
  windows: array(object({
@@ -14352,15 +14371,15 @@ var NcConditionsSchema = object({
14352
14371
  * (an `immediate` rule naming an `audio-*` class, one notification per
14353
14372
  * classified sample) stays exactly as it was for rules that already use it.
14354
14373
  *
14355
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14356
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14357
- * (`camstack/src/data/notification-center.ts`, guarded by
14358
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14374
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14375
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14376
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14377
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14359
14378
  * condition fields it does not know when a rule is saved from the phone.
14360
14379
  * Publishing an editor for a condition the app cannot round-trip is how an
14361
- * operator loses a rule's conditions by opening it — so the descriptor, the
14362
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14363
- * does an audio rule become authorable.
14380
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14381
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14382
+ * follows here.
14364
14383
  */
14365
14384
  audio: NcAudioConditionSchema.optional()
14366
14385
  });
@@ -14596,6 +14615,30 @@ var NcRuleInputSchema = object({
14596
14615
  */
14597
14616
  snoozeAllowGlobal: boolean().optional(),
14598
14617
  /**
14618
+ * The snooze durations THIS rule's notification offers as buttons, in
14619
+ * minutes.
14620
+ *
14621
+ * Three states, and all three are distinct — which is exactly why this is
14622
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14623
+ * addon cap path (three production failures in one day), so a schema default
14624
+ * would collapse the first two:
14625
+ *
14626
+ * | value | meaning |
14627
+ * | --- | --- |
14628
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14629
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14630
+ * | a list | these choices, de-duplicated and sorted, at most four |
14631
+ *
14632
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14633
+ * three buttons in total) and a rule that spent it all on snooze choices
14634
+ * would push its own tap-through actions off the notification.
14635
+ *
14636
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14637
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14638
+ * window from anywhere (D133).
14639
+ */
14640
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14641
+ /**
14599
14642
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14600
14643
  *
14601
14644
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14695,6 +14738,7 @@ var NcConditionDescriptorSchema = object({
14695
14738
  "device",
14696
14739
  "package",
14697
14740
  "occupancy",
14741
+ "audio",
14698
14742
  "system"
14699
14743
  ]),
14700
14744
  label: string(),
@@ -14713,6 +14757,7 @@ var NcConditionDescriptorSchema = object({
14713
14757
  "crossingSelect",
14714
14758
  "polygonDraw",
14715
14759
  "occupancy",
14760
+ "audio",
14716
14761
  "deviceState",
14717
14762
  "systemEvent"
14718
14763
  ]),
@@ -14864,7 +14909,20 @@ var NcSnoozeInputSchema = object({
14864
14909
  ruleId: string().optional(),
14865
14910
  /** Required when `scope: 'device'`. */
14866
14911
  deviceId: number().int().optional(),
14867
- durationMinutes: number().int().min(1).max(1440),
14912
+ /**
14913
+ * Narrow the window to these subject classes — "the cat, not the person".
14914
+ *
14915
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
14916
+ * what every window authored before this field meant, so no persisted row
14917
+ * changes meaning and no client has to learn anything to keep working.
14918
+ *
14919
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
14920
+ * cross rules (D133): the operator points at a camera and a kind of thing,
14921
+ * not at whichever of their four rules happened to produce the notification
14922
+ * they are dismissing.
14923
+ */
14924
+ classes: array(string().min(1)).min(1).optional(),
14925
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
14868
14926
  /**
14869
14927
  * Silence this for EVERY recipient, not just the caller. Permission is
14870
14928
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -14889,6 +14947,10 @@ var NcSnoozeSchema = object({
14889
14947
  scope: NcSnoozeScopeSchema,
14890
14948
  ruleId: string().optional(),
14891
14949
  deviceId: number().int().optional(),
14950
+ /** Subject classes this window covers. ABSENT = every class — see
14951
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
14952
+ * no SQLite column: nothing queries a window by class. */
14953
+ classes: array(string().min(1)).min(1).optional(),
14892
14954
  startedAt: number(),
14893
14955
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
14894
14956
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -30506,6 +30568,7 @@ Object.freeze({
30506
30568
  "network-access": "ingress",
30507
30569
  "smtp-provider": "email"
30508
30570
  });
30571
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
30509
30572
  new Set(["devices", "classes"]);
30510
30573
  /**
30511
30574
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BiN4gTjL.js");
5
+ const require_shared = require("./shared-yG0yCeMJ.js");
6
6
  let node_stream = require("node:stream");
7
7
  let webdav = require("webdav");
8
8
  //#region src/providers/webdav/webdav-config-schema.ts
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-EsnEAfgQ.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-Hjb2o6ip.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { AuthType, createClient } from "webdav";
4
4
  //#region src/providers/webdav/webdav-config-schema.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-remote-storage",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "Remote storage providers (SFTP, S3, WebDAV) — unifies remote backends behind the storage-provider cap",
5
5
  "keywords": [
6
6
  "camstack",