@camstack/addon-pipeline-orchestrator 1.2.19 → 1.2.20

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 CHANGED
@@ -29,7 +29,7 @@ node_fs = __toESM(node_fs);
29
29
  let node_path = require("node:path");
30
30
  node_path = __toESM(node_path);
31
31
  let node_url = require("node:url");
32
- //#region ../types/dist/event-category-Bz24uP1U.mjs
32
+ //#region ../types/dist/event-category-41fKf-q9.mjs
33
33
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
34
34
  EventCategory["SystemBoot"] = "system.boot";
35
35
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -89,6 +89,26 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
89
89
  */
90
90
  EventCategory["AddonRetryScheduled"] = "addon.retry-scheduled";
91
91
  /**
92
+ * A liveness invariant of this node is false — it has no devices, every
93
+ * camera is offline, or a camera that was recording has stopped producing
94
+ * segments. Emitted by the `liveness-monitor` builtin, once per fault (the
95
+ * `findingId` is stable across ticks), only after its boot grace period.
96
+ * AlertCenter raises a persistent operator-visible alert.
97
+ *
98
+ * It exists because on 2026-08-03 the hub ran four hours with zero devices
99
+ * and zero recordings while every surface stayed quiet.
100
+ *
101
+ * Payload: `{ findingId, severity, title, message, deviceId? }`.
102
+ */
103
+ EventCategory["SystemLivenessFailed"] = "system.liveness-failed";
104
+ /**
105
+ * A previously reported liveness fault is true again. AlertCenter dismisses
106
+ * the matching `SystemLivenessFailed` alert.
107
+ *
108
+ * Payload: `{ findingId }`.
109
+ */
110
+ EventCategory["SystemLivenessRecovered"] = "system.liveness-recovered";
111
+ /**
92
112
  * Monitor is attempting to reload a failed addon NOW. UI uses this
93
113
  * to show a spinner during the retry attempt. Same transient nature
94
114
  * as AddonRetryScheduled.
@@ -9917,6 +9937,14 @@ var NcMediaPolicySchema = object({
9917
9937
  clipPreRollSec: number().int().min(0).max(30).optional(),
9918
9938
  clipPostRollSec: number().int().min(0).max(30).optional(),
9919
9939
  /**
9940
+ * Playback rate of the attached gif / clip. Absent = 2x.
9941
+ *
9942
+ * A notification clip is GLANCED at on a lock screen, not watched: at real
9943
+ * time an eight-second passage is eight seconds of the recipient's attention
9944
+ * and twice the bytes. 1 is real time for the operator who wants it.
9945
+ */
9946
+ clipSpeed: number().min(1).max(8).optional(),
9947
+ /**
9920
9948
  * Which stream profile the footage is cut from. Absent = the CHEAPEST
9921
9949
  * assigned profile: a notification is watched on a phone, so the 4K
9922
9950
  * rendition would burn CPU to produce a file the client downscales anyway.
@@ -9988,7 +10016,21 @@ var NcRuleInputSchema = object({
9988
10016
  * behaviour, visible to all, read-only in the viewer). Present = personal
9989
10017
  * rule owned by this userId. Server-stamped; never trusted from a client.
9990
10018
  */
9991
- ownerUserId: string().optional()
10019
+ ownerUserId: string().optional(),
10020
+ /**
10021
+ * May a non-admin snooze this rule for EVERYONE, not just themselves?
10022
+ *
10023
+ * A snooze is personal by default — it silences the person who set it. This
10024
+ * opts THIS rule into the "the gardener is here all afternoon" case, where
10025
+ * silencing the camera for the whole household is legitimate. It silences
10026
+ * other people, so it is off unless a rule deliberately allows it.
10027
+ *
10028
+ * `.optional()`, deliberately NOT `.default()`: a Zod default does not run on
10029
+ * the addon cap path (three production failures in one day), so absent is
10030
+ * read as `false` by {@link canSetGlobal} in the engine. Admins are not bound
10031
+ * by this flag — see the scope rules on that function.
10032
+ */
10033
+ snoozeAllowGlobal: boolean().optional()
9992
10034
  });
9993
10035
  /**
9994
10036
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -10073,7 +10115,28 @@ var NcConditionDescriptorSchema = object({
10073
10115
  /** Which delivery kinds the condition applies to. */
10074
10116
  appliesTo: array(NcDeliverySchema),
10075
10117
  phase: string(),
10076
- description: string().optional()
10118
+ description: string().optional(),
10119
+ /**
10120
+ * The CHOICES for a single-choice widget (`sourceSelect`, `crossingSelect`,
10121
+ * `packagePhase`, …), served with the descriptor.
10122
+ *
10123
+ * Before this the descriptor said which widget to render and not what to put
10124
+ * in it, so every option list lived in three places: this file's enums, the
10125
+ * admin's `NC_*_OPTIONS` and the viewer's `NC_*_VALUES`. That triple mirror
10126
+ * is the drift that emptied the viewer's rule editor on 2026-08-04 — the app
10127
+ * mirrors the cap by hand, so it is only ever as current as its last build.
10128
+ *
10129
+ * With the options on the wire, a condition of an EXISTING `valueType` costs
10130
+ * zero client changes. Clients keep a local fallback for an older hub that
10131
+ * does not send them; absent here is "use your own list", not "no choices".
10132
+ */
10133
+ options: array(object({
10134
+ /** Written to the rule verbatim. `''` means the ABSENT state. */
10135
+ value: string(),
10136
+ label: string(),
10137
+ /** What THIS choice matches — shown one at a time, under the control. */
10138
+ hint: string().optional()
10139
+ })).readonly().optional()
10077
10140
  });
10078
10141
  /**
10079
10142
  * The delivery lifecycle status of a history row — a straight read of the
@@ -10158,6 +10221,74 @@ var NcHistoryFilterSchema = object({
10158
10221
  until: number().optional(),
10159
10222
  limit: number().int().min(1).max(500).default(100)
10160
10223
  });
10224
+ /**
10225
+ * What a snooze covers. Broader scopes win when several overlap, so one window
10226
+ * leaves ONE digest rather than a rule snooze and a whole-feed snooze both
10227
+ * summarising the same silence.
10228
+ */
10229
+ var NcSnoozeScopeSchema = _enum([
10230
+ "rule",
10231
+ "device",
10232
+ "all"
10233
+ ]);
10234
+ /**
10235
+ * Client-authored snooze. The server stamps `userId`, `startedAt` and
10236
+ * `expiresAt` — a DURATION is sent rather than an instant so a client with a
10237
+ * skewed clock cannot author a window that is already over, or never ends.
10238
+ */
10239
+ var NcSnoozeInputSchema = object({
10240
+ scope: NcSnoozeScopeSchema,
10241
+ /** Required when `scope: 'rule'` — a scoped snooze with no id matches
10242
+ * NOTHING rather than degrading to "everything". */
10243
+ ruleId: string().optional(),
10244
+ /** Required when `scope: 'device'`. */
10245
+ deviceId: number().int().optional(),
10246
+ durationMinutes: number().int().min(1).max(1440),
10247
+ /**
10248
+ * Silence this for EVERY recipient, not just the caller. Permission is
10249
+ * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
10250
+ * broader scopes). Absent = personal.
10251
+ */
10252
+ global: boolean().optional(),
10253
+ /**
10254
+ * Deliver a summary of what was suppressed when the window ends. Absent =
10255
+ * ON: someone silencing a nuisance camera wants it off, someone silencing a
10256
+ * SECURITY camera wants to know what they missed, and choosing "off" for
10257
+ * everybody is how a snooze becomes an outage. Resolved to a concrete
10258
+ * boolean by the server at create time — never left to a Zod default, which
10259
+ * does not run on the addon cap path.
10260
+ */
10261
+ summary: boolean().optional()
10262
+ });
10263
+ /** A persisted snooze window. */
10264
+ var NcSnoozeSchema = object({
10265
+ id: string(),
10266
+ /** Who set it. Also who it silences, unless `global`. */
10267
+ userId: string(),
10268
+ scope: NcSnoozeScopeSchema,
10269
+ ruleId: string().optional(),
10270
+ deviceId: number().int().optional(),
10271
+ startedAt: number(),
10272
+ /** Exclusive: at exactly this instant the snooze is over. Expiry is a
10273
+ * COMPARISON, not a job — no sweeper can leave the operator silenced. */
10274
+ expiresAt: number(),
10275
+ global: boolean(),
10276
+ summary: boolean(),
10277
+ /** When the end-of-window digest went out. Absent = not sent (yet, or the
10278
+ * window has not closed, or `summary` is false). */
10279
+ digestSentAt: number().optional()
10280
+ });
10281
+ object({
10282
+ snoozeId: string(),
10283
+ targetId: string(),
10284
+ ruleId: string(),
10285
+ ruleName: string(),
10286
+ deviceId: number().int(),
10287
+ /** How many notifications this snooze hid for that pair. */
10288
+ count: number().int(),
10289
+ firstAt: number(),
10290
+ lastAt: number()
10291
+ });
10161
10292
  method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
10162
10293
  kind: "mutation",
10163
10294
  auth: "admin",
@@ -10187,7 +10318,13 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
10187
10318
  }), method(object({}), object({
10188
10319
  catalog: array(NcConditionDescriptorSchema),
10189
10320
  taxonomy: NcTaxonomySchema.optional()
10190
- })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
10321
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
10322
+ kind: "mutation",
10323
+ caller: "required"
10324
+ }), method(object({ snoozeId: string() }), object({ success: literal(true) }), {
10325
+ kind: "mutation",
10326
+ caller: "required"
10327
+ });
10191
10328
  /**
10192
10329
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
10193
10330
  *
@@ -10935,7 +11072,15 @@ method(object({
10935
11072
  format: _enum(["gif", "mp4"]).default("gif"),
10936
11073
  maxWidth: number().int().min(120).max(1920).default(480),
10937
11074
  /** GIF only — MP4 keeps the source cadence. */
10938
- fps: number().int().min(1).max(15).default(5)
11075
+ fps: number().int().min(1).max(15).default(5),
11076
+ /**
11077
+ * Playback rate. A notification clip is GLANCED at on a lock screen,
11078
+ * not watched, so 2x is the default: the recipient sees the whole
11079
+ * passage in half the time and the GIF is half the bytes. `1` is real
11080
+ * time. Applies to MP4 as well — the operator set a speed, not a GIF
11081
+ * speed.
11082
+ */
11083
+ speed: number().min(1).max(8).default(2)
10939
11084
  }), object({
10940
11085
  base64: string(),
10941
11086
  mime: string(),
@@ -16133,6 +16278,20 @@ var QueryFilterSchema = object({
16133
16278
  limit: number().optional(),
16134
16279
  offset: number().optional()
16135
16280
  });
16281
+ /**
16282
+ * The predicate half of a filter, for BULK MUTATIONS.
16283
+ *
16284
+ * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
16285
+ * meaning for a statement that rewrites a set, and accepting them would invite
16286
+ * a caller to believe `limit` bounds the damage. Every field is optional here
16287
+ * only so the shape stays composable — the implementation REJECTS a filter
16288
+ * that compiles to no predicate, because that is the whole collection.
16289
+ */
16290
+ var MutationFilterSchema = object({
16291
+ where: record(string(), unknown()).optional(),
16292
+ whereIn: record(string(), array(unknown())).optional(),
16293
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
16294
+ });
16136
16295
  /** A single stored record: `{ id, data }`. */
16137
16296
  var SettingsRecordSchema = object({
16138
16297
  id: string(),
@@ -16158,7 +16317,18 @@ var CollectionColumnSchema = object({
16158
16317
  ]),
16159
16318
  primaryKey: boolean().optional(),
16160
16319
  notNull: boolean().optional(),
16161
- unique: boolean().optional()
16320
+ unique: boolean().optional(),
16321
+ /**
16322
+ * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
16323
+ * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
16324
+ * collection surface simply cannot express their existing tables — which is
16325
+ * why they were still on the uncapped `table*` API.
16326
+ */
16327
+ defaultValue: union([
16328
+ string(),
16329
+ number(),
16330
+ boolean()
16331
+ ]).optional()
16162
16332
  });
16163
16333
  var CollectionIndexSchema = object({
16164
16334
  name: string(),
@@ -16192,6 +16362,15 @@ method(object({
16192
16362
  collection: string(),
16193
16363
  key: string()
16194
16364
  }), _void(), { kind: "mutation" }), method(object({
16365
+ namespace: string().optional(),
16366
+ collection: string(),
16367
+ filter: MutationFilterSchema
16368
+ }), object({ deleted: number().int() }), { kind: "mutation" }), method(object({
16369
+ namespace: string().optional(),
16370
+ collection: string(),
16371
+ filter: MutationFilterSchema,
16372
+ data: record(string(), unknown())
16373
+ }), object({ updated: number().int() }), { kind: "mutation" }), method(object({
16195
16374
  namespace: string().optional(),
16196
16375
  collection: string(),
16197
16376
  filter: QueryFilterSchema.optional()
@@ -16258,6 +16437,15 @@ method(_void(), EngineInfoSchema), method(object({
16258
16437
  collection: string(),
16259
16438
  key: string()
16260
16439
  }), _void(), { kind: "mutation" }), method(object({
16440
+ namespace: string().optional(),
16441
+ collection: string(),
16442
+ filter: MutationFilterSchema
16443
+ }), object({ deleted: number().int() }), { kind: "mutation" }), method(object({
16444
+ namespace: string().optional(),
16445
+ collection: string(),
16446
+ filter: MutationFilterSchema,
16447
+ data: record(string(), unknown())
16448
+ }), object({ updated: number().int() }), { kind: "mutation" }), method(object({
16261
16449
  namespace: string().optional(),
16262
16450
  collection: string(),
16263
16451
  filter: QueryFilterSchema.optional()
@@ -23788,6 +23976,12 @@ Object.freeze({
23788
23976
  addonId: null,
23789
23977
  access: "delete"
23790
23978
  },
23979
+ "dataStoreProvider.deleteWhere": {
23980
+ capName: "data-store-provider",
23981
+ capScope: "system",
23982
+ addonId: null,
23983
+ access: "delete"
23984
+ },
23791
23985
  "dataStoreProvider.get": {
23792
23986
  capName: "data-store-provider",
23793
23987
  capScope: "system",
@@ -23836,6 +24030,12 @@ Object.freeze({
23836
24030
  addonId: null,
23837
24031
  access: "create"
23838
24032
  },
24033
+ "dataStoreProvider.updateWhere": {
24034
+ capName: "data-store-provider",
24035
+ capScope: "system",
24036
+ addonId: null,
24037
+ access: "create"
24038
+ },
23839
24039
  "dayNight.getOptions": {
23840
24040
  capName: "day-night",
23841
24041
  capScope: "device",
@@ -25630,12 +25830,24 @@ Object.freeze({
25630
25830
  addonId: null,
25631
25831
  access: "create"
25632
25832
  },
25833
+ "notificationRules.cancelSnooze": {
25834
+ capName: "notification-rules",
25835
+ capScope: "system",
25836
+ addonId: null,
25837
+ access: "create"
25838
+ },
25633
25839
  "notificationRules.createRule": {
25634
25840
  capName: "notification-rules",
25635
25841
  capScope: "system",
25636
25842
  addonId: null,
25637
25843
  access: "create"
25638
25844
  },
25845
+ "notificationRules.createSnooze": {
25846
+ capName: "notification-rules",
25847
+ capScope: "system",
25848
+ addonId: null,
25849
+ access: "create"
25850
+ },
25639
25851
  "notificationRules.deleteRule": {
25640
25852
  capName: "notification-rules",
25641
25853
  capScope: "system",
@@ -25666,6 +25878,12 @@ Object.freeze({
25666
25878
  addonId: null,
25667
25879
  access: "view"
25668
25880
  },
25881
+ "notificationRules.listSnoozes": {
25882
+ capName: "notification-rules",
25883
+ capScope: "system",
25884
+ addonId: null,
25885
+ access: "view"
25886
+ },
25669
25887
  "notificationRules.setRuleEnabled": {
25670
25888
  capName: "notification-rules",
25671
25889
  capScope: "system",
@@ -26914,6 +27132,12 @@ Object.freeze({
26914
27132
  addonId: null,
26915
27133
  access: "delete"
26916
27134
  },
27135
+ "settingsStore.deleteWhere": {
27136
+ capName: "settings-store",
27137
+ capScope: "system",
27138
+ addonId: null,
27139
+ access: "delete"
27140
+ },
26917
27141
  "settingsStore.get": {
26918
27142
  capName: "settings-store",
26919
27143
  capScope: "system",
@@ -26956,6 +27180,12 @@ Object.freeze({
26956
27180
  addonId: null,
26957
27181
  access: "create"
26958
27182
  },
27183
+ "settingsStore.updateWhere": {
27184
+ capName: "settings-store",
27185
+ capScope: "system",
27186
+ addonId: null,
27187
+ access: "create"
27188
+ },
26959
27189
  "smtpProvider.getStatus": {
26960
27190
  capName: "smtp-provider",
26961
27191
  capScope: "system",