@camstack/addon-auth 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.
@@ -7319,8 +7319,31 @@ var AdoptionJobSchema = object({
7319
7319
  error: string().nullable()
7320
7320
  });
7321
7321
  /**
7322
- * Per-camera FUNCTION SWITCHES — the one coherent on/off surface over the
7323
- * pipeline functions an operator thinks in terms of.
7322
+ * Per-camera FUNCTION SWITCHES.
7323
+ *
7324
+ * ## The aggregate group is being withdrawn — the BADGE is not (D113)
7325
+ *
7326
+ * This file shipped as "the one coherent on/off surface over the pipeline
7327
+ * functions an operator thinks in terms of". The operator's verdict on
7328
+ * 2026-08-12 was that the coherent surface bought complexity and no clarity:
7329
+ * every function already had a settings page of its own, and a second place to
7330
+ * turn it off is a second place to look. Each switch is going back to its own
7331
+ * component's original options — detection to the detection-pipeline wrapper
7332
+ * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
7333
+ * (which was always first-class; the switch was a veneer over
7334
+ * `recording.setDeviceConfig`), notifications to a notification-center
7335
+ * per-device setting, the two camera planes to their own components.
7336
+ *
7337
+ * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
7338
+ * thing that lets a status surface say DISABLED instead of BROKEN, recomposed
7339
+ * straight from the authorities with no group in the middle. That rule was
7340
+ * never about a control panel.
7341
+ *
7342
+ * Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
7343
+ * {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
7344
+ * `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
7345
+ * viewers (v1.0.305) and the admin UI still call it. It is deleted when they
7346
+ * stop; nothing new may be built on it.
7324
7347
  *
7325
7348
  * ## This file adds no state
7326
7349
  *
@@ -7671,7 +7694,15 @@ var RecordingConfigSchema = object({
7671
7694
  * Each completed/failed run also lands one durable ops-log row on its owning
7672
7695
  * addon surface.
7673
7696
  */
7697
+ /**
7698
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
7699
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
7700
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
7701
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
7702
+ * runs at all.
7703
+ */
7674
7704
  var RelocateJobStateSchema = _enum([
7705
+ "queued",
7675
7706
  "running",
7676
7707
  "done",
7677
7708
  "failed",
@@ -7706,6 +7737,15 @@ var RelocateFootageInputSchema = object({
7706
7737
  /** Limits relocation to the logical profile class. Omit only for the
7707
7738
  * pre-orchestration compatibility path. */
7708
7739
  footageClass: RelocateFootageClassSchema.optional(),
7740
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
7741
+ * is what a whole-disk drain means. The rebalance path always sets it: its
7742
+ * unit is a (camera, profile) pile, not a disk. */
7743
+ deviceId: number().int().optional(),
7744
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
7745
+ * Finer than `footageClass`, which cannot separate high from mid — and the
7746
+ * placement plan assigns those two independently, so a rebalance that could
7747
+ * only say "recordings" would move footage the plan never asked to move. */
7748
+ profiles: array(string()).optional(),
7709
7749
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7710
7750
  * never allowed to starve live writers. */
7711
7751
  throttleMbps: number().min(1).max(1e3).optional()
@@ -7841,6 +7881,21 @@ var StorageLocationSchema = object({
7841
7881
  nodeId: string().optional(),
7842
7882
  isDefault: boolean().default(false),
7843
7883
  isSystem: boolean().default(false),
7884
+ /**
7885
+ * Operator opt-in: whether consumers that BALANCE across several locations
7886
+ * of a type may write here. Recordings reads it today; event media and
7887
+ * backups are the next consumers, which is why the flag lives on the
7888
+ * location rather than in any one addon's store — nothing has to be
7889
+ * extended to add the next consumer.
7890
+ *
7891
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
7892
+ * flag existed reads back with no flag and keeps working exactly as before;
7893
+ * that is the whole compat story, and it is why no migration ships with it.
7894
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
7895
+ * disk must not silently start writing to it); the default of a type is
7896
+ * always stamped `true`.
7897
+ */
7898
+ enabled: boolean().optional(),
7844
7899
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7845
7900
  * for node-local locations it can reach) — never persisted, absent when the
7846
7901
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12181,7 +12236,8 @@ method(object({
12181
12236
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12182
12237
  /**
12183
12238
  * filesystem-browse — per-node capability for browsing the node's local
12184
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
12239
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12240
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
12185
12241
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12186
12242
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12187
12243
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -14002,6 +14058,13 @@ var MaskGridDimsSchema = object({
14002
14058
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
14003
14059
  * this one field keeps the schema additive — a rule still declares exactly
14004
14060
  * one trigger.
14061
+ *
14062
+ * AUDIO rules add no member here, for the reason occupancy added none: the
14063
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
14064
+ * mirror.ts` fails the build on a member the app cannot render) and every
14065
+ * member costs a release train. A sustained-sound rule is therefore an
14066
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
14067
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
14005
14068
  */
14006
14069
  var NcDeliverySchema = _enum([
14007
14070
  "immediate",
@@ -14016,15 +14079,32 @@ var NcDeliverySchema = _enum([
14016
14079
  * depend on a provider's raw event name or payload shape.
14017
14080
  */
14018
14081
  var NcSystemEventKindSchema = _enum([
14019
- "camera-online",
14020
- "camera-offline",
14082
+ "device-online",
14083
+ "device-offline",
14084
+ "device-disabled",
14085
+ "device-enabled",
14021
14086
  "stream-online",
14022
14087
  "stream-offline",
14023
14088
  "node-online",
14024
14089
  "node-offline",
14025
14090
  "addon-update-available",
14026
- "server-update-available"
14091
+ "server-update-available",
14092
+ "alarm-triggered",
14093
+ "alarm-armed",
14094
+ "alarm-disarmed",
14095
+ "camera-online",
14096
+ "camera-offline",
14097
+ "camera-disabled",
14098
+ "camera-enabled"
14099
+ ]);
14100
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
14101
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
14102
+ "camera-online",
14103
+ "camera-offline",
14104
+ "camera-disabled",
14105
+ "camera-enabled"
14027
14106
  ]);
14107
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
14028
14108
  /**
14029
14109
  * One coherent system-event condition. `kinds` is the required opt-in safety
14030
14110
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -14033,6 +14113,18 @@ var NcSystemEventKindSchema = _enum([
14033
14113
  var NcSystemEventConditionSchema = object({
14034
14114
  kinds: array(NcSystemEventKindSchema).min(1),
14035
14115
  deviceIds: array(number().int()).min(1).optional(),
14116
+ /**
14117
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
14118
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
14119
+ * is what a liveness rule means when nobody said otherwise.
14120
+ *
14121
+ * This is where "only my cameras" is expressed, and it lives on the rule for
14122
+ * one reason: the intake cannot know which devices this household cares
14123
+ * about, and a producer-side filter is one no operator can change. Fails
14124
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
14125
+ * does not carry) matches no `deviceTypes` list.
14126
+ */
14127
+ deviceTypes: array(string().min(1)).min(1).optional(),
14036
14128
  nodeIds: array(string().min(1)).min(1).optional(),
14037
14129
  packageNames: array(string().min(1)).min(1).optional()
14038
14130
  });
@@ -14083,6 +14175,47 @@ var NcOccupancyConditionSchema = object({
14083
14175
  sustainSeconds: number().int().min(0).max(3600).default(15)
14084
14176
  });
14085
14177
  /**
14178
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14179
+ *
14180
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
14181
+ * reference notifier uses, so an operator moving between them re-uses what
14182
+ * they already know): a rule matches when, over a sampling window of
14183
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14184
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14185
+ *
14186
+ * - `dbThreshold` — its level is at or above this many dBFS (see
14187
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14188
+ * - `labels` — the classifier put at least one of these labels on it.
14189
+ *
14190
+ * Both are OPTIONAL and independent, which is the point of the shape: a
14191
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
14192
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14193
+ * is given** — a window in which every sample is trivially a hit would fire on
14194
+ * silence, so the engine refuses such a condition rather than notifying on
14195
+ * nothing (the schema cannot express "at least one of" without becoming a
14196
+ * ZodEffects the cap path would have to special-case).
14197
+ *
14198
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
14199
+ * must be FULL before it can match — a window that has been open for two
14200
+ * seconds of its ten is 100% of nothing, and firing on it would make
14201
+ * `samplingSeconds` decorative.
14202
+ *
14203
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14204
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
14205
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
14206
+ * an operator who typed `dog` mean the same thing.
14207
+ */
14208
+ var NcAudioConditionSchema = object({
14209
+ /** Audio macro labels; absent = any sound (level-only rule). */
14210
+ labels: array(string().min(1)).min(1).optional(),
14211
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14212
+ dbThreshold: number().min(-96).max(0).optional(),
14213
+ /** Percentage of the window's samples that must be hits (1–100). */
14214
+ hitPercent: number().int().min(1).max(100).default(60),
14215
+ /** Length of the sampling window in seconds. */
14216
+ samplingSeconds: number().int().min(1).max(300).default(10)
14217
+ });
14218
+ /**
14086
14219
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
14087
14220
  *
14088
14221
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14355,7 +14488,33 @@ var NcConditionsSchema = object({
14355
14488
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14356
14489
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14357
14490
  */
14358
- occupancy: NcOccupancyConditionSchema.optional()
14491
+ occupancy: NcOccupancyConditionSchema.optional(),
14492
+ /**
14493
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
14494
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
14495
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
14496
+ * a window that is not full yet, neither filter given). See
14497
+ * {@link NcAudioCondition}.
14498
+ *
14499
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
14500
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
14501
+ * a detection, a track or a device event (the same fail-closed pairing
14502
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
14503
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
14504
+ * (an `immediate` rule naming an `audio-*` class, one notification per
14505
+ * classified sample) stays exactly as it was for rules that already use it.
14506
+ *
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
14511
+ * condition fields it does not know when a rule is saved from the phone.
14512
+ * 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.
14516
+ */
14517
+ audio: NcAudioConditionSchema.optional()
14359
14518
  });
14360
14519
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14361
14520
  var NcRuleTargetSchema = object({
@@ -14469,6 +14628,73 @@ var NcThrottleSchema = object({
14469
14628
  */
14470
14629
  granularity: NcThrottleGranularitySchema.optional()
14471
14630
  });
14631
+ /**
14632
+ * How long the confirm gate may hold ONE notification, and how big the picture
14633
+ * it judges may be.
14634
+ *
14635
+ * The clamp is the product decision, not a coincidence of the model: p50 was
14636
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
14637
+ * arrives after the visitor has gone is not a notification. 448 px was enough
14638
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
14639
+ * tokens for pixels the model pools away.
14640
+ */
14641
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
14642
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
14643
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
14644
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
14645
+ var NcConfirmExpectSchema = object({
14646
+ op: _enum([
14647
+ ">=",
14648
+ ">",
14649
+ "<=",
14650
+ "<",
14651
+ "=="
14652
+ ]),
14653
+ count: number().int().min(0).max(1e3)
14654
+ });
14655
+ /**
14656
+ * AI CONFIRM — a vision model looks at the picture this notification is about
14657
+ * to ship and says whether it agrees with the rule.
14658
+ *
14659
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
14660
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
14661
+ * on the operator's phone is not a verdict about this notification.
14662
+ *
14663
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
14664
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
14665
+ * the default and every fail-open is COUNTED, because a gate that always fails
14666
+ * open looks in the log exactly like a gate that works.
14667
+ *
14668
+ * Every field is `.optional()` rather than relied on as a Zod default at the
14669
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
14670
+ * production failures in one day), so the gate reads absent as the constant
14671
+ * above rather than trusting a parse it may never have seen.
14672
+ */
14673
+ var NcConfirmSchema = object({
14674
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
14675
+ * same thing, and both mean "deliver exactly as before". */
14676
+ enabled: boolean().default(false),
14677
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
14678
+ profileId: string().optional(),
14679
+ /**
14680
+ * The operator's question, in his own words. Absent = a question derived
14681
+ * from the rule (its class and its expectation).
14682
+ *
14683
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
14684
+ * banners, signage and plates as instructions if you let them reach the
14685
+ * prompt — proven live — so the authoritative contract stays in the system
14686
+ * turn and only rule-authored words land here.
14687
+ */
14688
+ prompt: string().max(1e3).optional(),
14689
+ /** Fire only when the model's count satisfies this. Absent = the model's
14690
+ * own boolean verdict decides. */
14691
+ expect: NcConfirmExpectSchema.optional(),
14692
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
14693
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
14694
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
14695
+ /** Longest edge the judged image is downscaled to before it is sent. */
14696
+ maxImagePx: number().int().min(64).max(2048).default(448)
14697
+ });
14472
14698
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14473
14699
  var NcRuleInputSchema = object({
14474
14700
  name: string().min(1).max(200),
@@ -14529,7 +14755,13 @@ var NcRuleInputSchema = object({
14529
14755
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14530
14756
  * shape as every other actuation.
14531
14757
  */
14532
- actions: NcRuleActionsSchema.optional()
14758
+ actions: NcRuleActionsSchema.optional(),
14759
+ /**
14760
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
14761
+ * a rule that predates the gate must keep delivering byte-for-byte as it
14762
+ * did, and absent is the only way to say that without a migration.
14763
+ */
14764
+ confirm: NcConfirmSchema.optional()
14533
14765
  });
14534
14766
  /**
14535
14767
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14540,7 +14772,37 @@ var NcRuleInputSchema = object({
14540
14772
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14541
14773
  * `updateRule` patch.
14542
14774
  */
14543
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
14775
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
14776
+ disabledTargetIds: array(string()).optional(),
14777
+ /**
14778
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
14779
+ *
14780
+ * It makes the key optional to SUPPLY; the parse still materialises the
14781
+ * default when the key is absent. And `NcRuleStore.update` merges with
14782
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
14783
+ * one — which made every partial edit destructive:
14784
+ *
14785
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
14786
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
14787
+ * setEnabled(ruleId, false) → conditions reset to `{}`
14788
+ *
14789
+ * A rule scoped to one camera and one zone silently became a rule that
14790
+ * matches EVERY event on EVERY camera, and lost its `media` policy
14791
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
14792
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
14793
+ * within a minute of a two-field patch.
14794
+ *
14795
+ * So every defaulted field is re-declared here WITHOUT its default. The
14796
+ * inner defaults still apply when the caller DOES send the key — `{}` for
14797
+ * conditions remains a real instruction ("clear them") — and only the
14798
+ * absent key is now genuinely absent.
14799
+ */
14800
+ enabled: boolean().optional(),
14801
+ conditions: NcConditionsSchema.optional(),
14802
+ media: NcMediaPolicySchema.optional(),
14803
+ throttle: NcThrottleSchema.optional(),
14804
+ priority: number().int().min(1).max(5).optional()
14805
+ });
14544
14806
  /** A persisted rule. */
14545
14807
  var NcRuleSchema = NcRuleInputSchema.extend({
14546
14808
  id: string(),
@@ -14841,6 +15103,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
14841
15103
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
14842
15104
  * copy would lie the first time a rule is disabled.
14843
15105
  */
15106
+ /**
15107
+ * Why a device a mode NAMES is nonetheless not armed by it.
15108
+ *
15109
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
15110
+ * per-camera notification switch the Notification Center already owns,
15111
+ * `detection-off` is the device's own detection binding being inactive, and
15112
+ * `offline` is the device manager's liveness. A fourth reason would mean a
15113
+ * fourth authority, and inventing one here is how a panel starts disagreeing
15114
+ * with the switches the operator actually used.
15115
+ */
15116
+ var NcAlarmSkipReasonSchema = _enum([
15117
+ "muted",
15118
+ "detection-off",
15119
+ "offline"
15120
+ ]);
15121
+ var NcAlarmSkippedDeviceSchema = object({
15122
+ deviceId: number().int(),
15123
+ reason: NcAlarmSkipReasonSchema
15124
+ });
14844
15125
  var NcAlarmModeCoverageSchema = object({
14845
15126
  mode: AlarmArmModeSchema,
14846
15127
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -14848,7 +15129,18 @@ var NcAlarmModeCoverageSchema = object({
14848
15129
  /** At least one covering rule has no device scope, so the mode covers all. */
14849
15130
  allDevices: boolean(),
14850
15131
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
14851
- deviceIds: array(number().int())
15132
+ deviceIds: array(number().int()),
15133
+ /**
15134
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
15135
+ * excludes it.
15136
+ *
15137
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
15138
+ * twelve makes it false in exactly the way nobody notices until an incident.
15139
+ * Defaulted to `[]` so a coverage answer computed before this field existed
15140
+ * still parses as "nothing known to be skipped" rather than failing the whole
15141
+ * alarm tab.
15142
+ */
15143
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
14852
15144
  });
14853
15145
  var NcAlarmConfigSchema = object({
14854
15146
  /**
@@ -17647,9 +17939,16 @@ var CameraStatusSchema = object({
17647
17939
  audio: CameraAudioStatusSchema.nullable(),
17648
17940
  recording: CameraRecordingStatusSchema.nullable(),
17649
17941
  /**
17650
- * Per-camera function switches an OPERATOR has turned off
17942
+ * Per-camera functions an OPERATOR has turned off
17651
17943
  * ([D61](../../../../docs/decisions/adr-0067.md)).
17652
17944
  *
17945
+ * Composed from the AUTHORITIES themselves — the wrapper bindings,
17946
+ * `RecordingConfig.enabled`, the notification mute, the broker's audio
17947
+ * policy, the camera's own microphone — via `composeSwitchedOff`, not from
17948
+ * the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
17949
+ * The badge outlives the control panel: the panel was a convenience, this is
17950
+ * the difference between a camera being off and a camera being dead.
17951
+ *
17653
17952
  * This is the difference between DISABLED and BROKEN. A camera whose
17654
17953
  * `detection` block reports zero fps and whose `switchedOff` contains
17655
17954
  * `'object-detection'` was switched off by a person; the same camera with an
@@ -23175,7 +23474,19 @@ var RecordingManifestSchema = object({
23175
23474
  * profiles/subtrees/locations on this node). */
23176
23475
  var RecordingDeviceUsageSchema = object({
23177
23476
  deviceId: number(),
23178
- usedBytes: number()
23477
+ usedBytes: number(),
23478
+ /**
23479
+ * Start of this camera's OLDEST indexed segment, across every profile and
23480
+ * location — the "Oldest footage" column in Recordings → Storage, and the
23481
+ * only honest answer to "is retention actually holding?" per camera.
23482
+ *
23483
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
23484
+ * predates this field omits it entirely, and a hub whose types carry the
23485
+ * field must keep validating that older provider's payload: the framework
23486
+ * (types) and the addon ship on different trains, and the addon is usually
23487
+ * the later of the two.
23488
+ */
23489
+ oldestMs: number().nullable().optional()
23179
23490
  });
23180
23491
  /** Recording storage usage + capacity for one storage location. */
23181
23492
  var RecordingLocationUsageSchema = object({
@@ -23203,6 +23514,57 @@ var RecordingStorageUsageSchema = object({
23203
23514
  locations: array(RecordingLocationUsageSchema)
23204
23515
  });
23205
23516
  /**
23517
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
23518
+ *
23519
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
23520
+ * is the operator asking for the EXISTING archive to be brought into line with
23521
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
23522
+ * location, run FIFO behind the single-flight mover.
23523
+ *
23524
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
23525
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
23526
+ * (empty on the plan).
23527
+ */
23528
+ var RecordingRebalanceMoveSchema = object({
23529
+ deviceId: number(),
23530
+ profile: string(),
23531
+ fromLocationId: string(),
23532
+ toLocationId: string(),
23533
+ bytes: number(),
23534
+ files: number().int()
23535
+ });
23536
+ /** Why a pile that is out of place is staying there. Every refusal is
23537
+ * reported: a rebalance that silently drops a camera reads exactly like one
23538
+ * that had nothing to do. */
23539
+ var RecordingRebalanceSkipReasonSchema = _enum([
23540
+ "unassigned",
23541
+ "target-not-writable",
23542
+ "below-threshold",
23543
+ "no-headroom"
23544
+ ]);
23545
+ var RecordingRebalanceSkipSchema = object({
23546
+ deviceId: number(),
23547
+ profile: string(),
23548
+ fromLocationId: string(),
23549
+ /** The location the plan wants; null when the camera has no assignment. */
23550
+ toLocationId: string().nullable(),
23551
+ bytes: number(),
23552
+ reason: RecordingRebalanceSkipReasonSchema
23553
+ });
23554
+ var RecordingRebalancePlanSchema = object({
23555
+ moves: array(RecordingRebalanceMoveSchema),
23556
+ skipped: array(RecordingRebalanceSkipSchema),
23557
+ bytesToMove: number(),
23558
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
23559
+ jobIds: array(string())
23560
+ });
23561
+ var RecordingRebalanceInputSchema = object({
23562
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
23563
+ throttleMbps: number().min(1).max(1e3).optional(),
23564
+ /** Ignore piles smaller than this (default 1 GB). */
23565
+ minMoveGb: number().min(0).optional()
23566
+ });
23567
+ /**
23206
23568
  * Result of locating footage at a wall-clock instant for one device/profile.
23207
23569
  * `segment` carries the covering segment's window; `gap` reports the forward
23208
23570
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -23365,9 +23727,24 @@ method(object({
23365
23727
  }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23366
23728
  kind: "mutation",
23367
23729
  auth: "admin"
23730
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
23731
+ kind: "mutation",
23732
+ auth: "admin"
23733
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
23734
+ kind: "query",
23735
+ auth: "admin"
23736
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23737
+ kind: "mutation",
23738
+ auth: "admin"
23739
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23740
+ kind: "query",
23741
+ auth: "admin"
23742
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23743
+ kind: "mutation",
23744
+ auth: "admin"
23368
23745
  });
23369
23746
  /**
23370
- * `recordingExport` cap — render a footage time range into a single downloadable
23747
+ * `recording-export` cap — render a footage time range into a single downloadable
23371
23748
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
23372
23749
  * bounded lifetime with a durable history, auto-expiry, and optional
23373
23750
  * delete-after-download.
@@ -23382,10 +23759,42 @@ method(object({
23382
23759
  */
23383
23760
  /** Playback-speed multiplier for the render (1 = realtime). */
23384
23761
  var ExportSpeedSchema = number().min(.25).max(32);
23762
+ /**
23763
+ * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23764
+ *
23765
+ * Relative and not absolute epoch on purpose: the renderer's frame-select
23766
+ * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23767
+ * playlist. Handing it absolute epochs would make every call site responsible
23768
+ * for the same subtraction, and the one that forgot would emit a filter that
23769
+ * selects nothing — silently, as a uniform timelapse.
23770
+ */
23771
+ var ExportDenseRangeSchema = object({
23772
+ fromSec: number().nonnegative(),
23773
+ toSec: number().nonnegative()
23774
+ }).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
23775
+ /**
23776
+ * Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
23777
+ * listed ranges and at the base `everyMs` everywhere else.
23778
+ *
23779
+ * `everyMs` must be strictly smaller than the base cadence — a dense rate that
23780
+ * is not denser renders a uniform timelapse the operator believes is two-rate.
23781
+ */
23782
+ var ExportDenseSchema = object({
23783
+ everyMs: number().int().positive(),
23784
+ ranges: array(ExportDenseRangeSchema).min(1).max(200)
23785
+ });
23385
23786
  /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
23386
23787
  var ExportTimelapseSchema = object({
23387
23788
  everyMs: number().int().positive(),
23388
- outputFps: number().int().min(1).max(60).optional()
23789
+ outputFps: number().int().min(1).max(60).optional(),
23790
+ /** Optional second, FASTER rate over the intervals that matter. */
23791
+ dense: ExportDenseSchema.optional()
23792
+ }).superRefine((v, ctx) => {
23793
+ if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
23794
+ code: ZodIssueCode.custom,
23795
+ message: "dense.everyMs must be strictly smaller than the base everyMs",
23796
+ path: ["dense", "everyMs"]
23797
+ });
23389
23798
  });
23390
23799
  /**
23391
23800
  * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
@@ -23443,6 +23852,19 @@ var ExportDownloadSchema = object({
23443
23852
  url: string(),
23444
23853
  endpoints: array(string())
23445
23854
  });
23855
+ /**
23856
+ * A finished export's bytes, inline.
23857
+ *
23858
+ * `bytes` is the DECODED length — the number the caller bounds and logs
23859
+ * against, so nobody has to infer it from the base64 length.
23860
+ */
23861
+ var ExportBytesSchema = object({
23862
+ base64: string(),
23863
+ contentType: string(),
23864
+ /** Suggested filename, extension included. */
23865
+ name: string(),
23866
+ bytes: number().int().nonnegative()
23867
+ });
23446
23868
  method(object({
23447
23869
  deviceId: number(),
23448
23870
  profile: string(),
@@ -23467,6 +23889,9 @@ method(object({
23467
23889
  }), method(object({ exportId: string() }), ExportDownloadSchema, {
23468
23890
  kind: "query",
23469
23891
  auth: "protected"
23892
+ }), method(object({ exportId: string() }), ExportBytesSchema, {
23893
+ kind: "query",
23894
+ auth: "protected"
23470
23895
  });
23471
23896
  /**
23472
23897
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -28660,6 +29085,12 @@ Object.freeze({
28660
29085
  addonId: null,
28661
29086
  access: "create"
28662
29087
  },
29088
+ "recording.cancelRelocateJob": {
29089
+ capName: "recording",
29090
+ capScope: "system",
29091
+ addonId: null,
29092
+ access: "create"
29093
+ },
28663
29094
  "recording.cancelStorageMigrationMove": {
28664
29095
  capName: "recording",
28665
29096
  capScope: "system",
@@ -28714,6 +29145,12 @@ Object.freeze({
28714
29145
  addonId: null,
28715
29146
  access: "view"
28716
29147
  },
29148
+ "recording.listRelocateJobs": {
29149
+ capName: "recording",
29150
+ capScope: "system",
29151
+ addonId: null,
29152
+ access: "view"
29153
+ },
28717
29154
  "recording.locateSegment": {
28718
29155
  capName: "recording",
28719
29156
  capScope: "system",
@@ -28726,6 +29163,12 @@ Object.freeze({
28726
29163
  addonId: null,
28727
29164
  access: "create"
28728
29165
  },
29166
+ "recording.planStorageRebalance": {
29167
+ capName: "recording",
29168
+ capScope: "system",
29169
+ addonId: null,
29170
+ access: "view"
29171
+ },
28729
29172
  "recording.pruneFootage": {
28730
29173
  capName: "recording",
28731
29174
  capScope: "system",
@@ -28750,6 +29193,12 @@ Object.freeze({
28750
29193
  addonId: null,
28751
29194
  access: "create"
28752
29195
  },
29196
+ "recording.relocateFootage": {
29197
+ capName: "recording",
29198
+ capScope: "system",
29199
+ addonId: null,
29200
+ access: "create"
29201
+ },
28753
29202
  "recording.renderClip": {
28754
29203
  capName: "recording",
28755
29204
  capScope: "system",
@@ -28786,38 +29235,50 @@ Object.freeze({
28786
29235
  addonId: null,
28787
29236
  access: "create"
28788
29237
  },
29238
+ "recording.startStorageRebalance": {
29239
+ capName: "recording",
29240
+ capScope: "system",
29241
+ addonId: null,
29242
+ access: "create"
29243
+ },
28789
29244
  "recordingExport.cancelExport": {
28790
- capName: "recordingExport",
29245
+ capName: "recording-export",
28791
29246
  capScope: "system",
28792
29247
  addonId: null,
28793
29248
  access: "create"
28794
29249
  },
28795
29250
  "recordingExport.createExport": {
28796
- capName: "recordingExport",
29251
+ capName: "recording-export",
28797
29252
  capScope: "system",
28798
29253
  addonId: null,
28799
29254
  access: "create"
28800
29255
  },
28801
29256
  "recordingExport.deleteExport": {
28802
- capName: "recordingExport",
29257
+ capName: "recording-export",
28803
29258
  capScope: "system",
28804
29259
  addonId: null,
28805
29260
  access: "delete"
28806
29261
  },
28807
29262
  "recordingExport.getDownloadUrl": {
28808
- capName: "recordingExport",
29263
+ capName: "recording-export",
28809
29264
  capScope: "system",
28810
29265
  addonId: null,
28811
29266
  access: "view"
28812
29267
  },
28813
29268
  "recordingExport.getExport": {
28814
- capName: "recordingExport",
29269
+ capName: "recording-export",
28815
29270
  capScope: "system",
28816
29271
  addonId: null,
28817
29272
  access: "view"
28818
29273
  },
28819
29274
  "recordingExport.listExports": {
28820
- capName: "recordingExport",
29275
+ capName: "recording-export",
29276
+ capScope: "system",
29277
+ addonId: null,
29278
+ access: "view"
29279
+ },
29280
+ "recordingExport.readExportBytes": {
29281
+ capName: "recording-export",
28821
29282
  capScope: "system",
28822
29283
  addonId: null,
28823
29284
  access: "view"
@@ -30194,6 +30655,104 @@ var FramerateField = number().int().min(1).max(60);
30194
30655
  var TargetsField = array(NcRuleTargetSchema).min(1);
30195
30656
  var PriorityField = number().int().min(1).max(5);
30196
30657
  /**
30658
+ * Explicit override of the DENSE sampling cadence, seconds.
30659
+ *
30660
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
30661
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
30662
+ * made that same base 3 s and rendered a person pass as two frames.)
30663
+ *
30664
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
30665
+ * `denseCadenceSec` and played at `framerate` occupies
30666
+ *
30667
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
30668
+ *
30669
+ * so a 7 s pass at 1 s / 12 fps is 0.58 s of video, and at 0.5 s it is 1.17 s.
30670
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
30671
+ * and therefore the length of a quiet night, does not move.
30672
+ *
30673
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
30674
+ * the recording has them returns the same frames, requested twice. Must be
30675
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
30676
+ * a uniform video the operator believes is two-rate — and upsert refuses it
30677
+ * rather than letting the export cap reject the render hours after the window.
30678
+ */
30679
+ var DenseCadenceSecField = number().min(.1).max(3600);
30680
+ /**
30681
+ * Minimum seconds of OUTPUT video each detection range must occupy.
30682
+ *
30683
+ * The operator-facing form of the arithmetic above: instead of solving for a
30684
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
30685
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
30686
+ * that range every ~583 ms.
30687
+ *
30688
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
30689
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
30690
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
30691
+ * ranges are sampled denser than they need. Per-range cadences require a cap
30692
+ * schema change and are the tracked follow-up.
30693
+ *
30694
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
30695
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
30696
+ * by real footage, never met by duplicating frames into motion that never
30697
+ * happened.
30698
+ */
30699
+ var MinDwellSecField = number().min(0).max(60);
30700
+ /**
30701
+ * Caption burned into the notification's preview frame.
30702
+ *
30703
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
30704
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
30705
+ * templating dialect for one field would be a second thing to explain.
30706
+ *
30707
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
30708
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
30709
+ * the reason this is not `.min(1)`.
30710
+ */
30711
+ var PreviewTextField = string().max(200);
30712
+ /**
30713
+ * Whether the notification's preview is a STILL or a short animation.
30714
+ *
30715
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
30716
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
30717
+ * night reads better as three seconds of motion than as one frame of it. Both
30718
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
30719
+ * simply applies it to a dozen frames sampled across the render and assembles
30720
+ * them.
30721
+ *
30722
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
30723
+ * seeks and a palette pass, and no rule that never asked for one should start
30724
+ * paying that on the deploy that shipped it.
30725
+ *
30726
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
30727
+ */
30728
+ var PreviewModeField = _enum(["image", "gif"]);
30729
+ /**
30730
+ * Which detection classes the notification reports counts for.
30731
+ *
30732
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
30733
+ * plan — no second query — aggregated per class. Absent or empty means "every
30734
+ * class the window actually contained", which is what an operator who never
30735
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
30736
+ * counts cars all night).
30737
+ *
30738
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
30739
+ * …). An unknown name simply never matches and reports nothing — it is not an
30740
+ * error, because a rule may legitimately name a class this camera's model does
30741
+ * not emit.
30742
+ *
30743
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
30744
+ * - `{{detections}}` — total over the reported classes
30745
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
30746
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
30747
+ * one per class, `count_` + the class name
30748
+ *
30749
+ * With NO custom body template the summary is appended to the derived body, and
30750
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
30751
+ * reads. With a custom template the operator owns every word — nothing is
30752
+ * appended, so `{{detectionSummary}}` is how he asks for it.
30753
+ */
30754
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
30755
+ /**
30197
30756
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
30198
30757
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
30199
30758
  * here (see the ownership note above).
@@ -30213,9 +30772,30 @@ var TimelapseRuleInputSchema = object({
30213
30772
  cadenceSec: CadenceSecField.default(15),
30214
30773
  /** Output frames per second of the assembled mp4 (predecessor parity). */
30215
30774
  framerate: FramerateField.default(10),
30775
+ /**
30776
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
30777
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
30778
+ * field gets.
30779
+ */
30780
+ denseCadenceSec: DenseCadenceSecField.optional(),
30781
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
30782
+ minDwellSec: MinDwellSecField.optional(),
30216
30783
  /** `notification-output` targets the finished video/thumbnail is sent to. */
30217
30784
  targets: TargetsField,
30218
30785
  template: TimelapseTemplateSchema.optional(),
30786
+ /**
30787
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
30788
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
30789
+ *
30790
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
30791
+ * the notification's title/body, and clearing it (`template: null`) must not
30792
+ * silently clear the caption too.
30793
+ */
30794
+ previewText: PreviewTextField.optional(),
30795
+ /** Still or animation — see {@link PreviewModeField}. */
30796
+ previewMode: PreviewModeField.default("image"),
30797
+ /** Classes the notification counts — see {@link ReportClassesField}. */
30798
+ reportClasses: ReportClassesField.optional(),
30219
30799
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
30220
30800
  priority: PriorityField.default(3)
30221
30801
  });
@@ -30226,8 +30806,13 @@ object({
30226
30806
  schedule: NcScheduleSchema.optional(),
30227
30807
  cadenceSec: CadenceSecField.optional(),
30228
30808
  framerate: FramerateField.optional(),
30809
+ denseCadenceSec: DenseCadenceSecField.optional(),
30810
+ minDwellSec: MinDwellSecField.optional(),
30229
30811
  targets: TargetsField.optional(),
30230
30812
  template: TimelapseTemplateSchema.nullable().optional(),
30813
+ previewText: PreviewTextField.optional(),
30814
+ previewMode: PreviewModeField.optional(),
30815
+ reportClasses: ReportClassesField.optional(),
30231
30816
  priority: PriorityField.optional()
30232
30817
  });
30233
30818
  TimelapseRuleInputSchema.extend({
@@ -30239,10 +30824,28 @@ TimelapseRuleInputSchema.extend({
30239
30824
  */
30240
30825
  ownerUserId: string().optional(),
30241
30826
  /**
30242
- * Epoch-ms of the last successful generation the 1-hour re-generation
30243
- * guard's durable state (predecessor parity). Absent = never generated.
30827
+ * Epoch-ms of the NEWEST successful generation across every camera of this
30828
+ * rule. What a UI shows, and the compatibility floor for
30829
+ * {@link readTimelapseGeneratedAt}. Absent = never generated.
30244
30830
  */
30245
30831
  lastGeneratedAt: number().optional(),
30832
+ /**
30833
+ * PER-CAMERA generation state, keyed by `String(deviceId)` — the
30834
+ * re-generation guard's real durable state.
30835
+ *
30836
+ * One rule covers several cameras and each renders its own video, so a rule
30837
+ * -wide stamp is wrong in the direction that DESTROYS work: camera A
30838
+ * succeeding at 06:05 tells camera B, whose render failed, that it is
30839
+ * already done — and B's night is gone for good, because the window will not
30840
+ * come back.
30841
+ *
30842
+ * ADDITIVE, so the migration is free: a row written before this field simply
30843
+ * has no map, and {@link readTimelapseGeneratedAt} falls back to
30844
+ * {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
30845
+ * "never generated" would re-render and re-notify every camera of every rule
30846
+ * once, on the deploy that shipped the map.
30847
+ */
30848
+ generatedByDevice: record(string(), number()).optional(),
30246
30849
  /** userId of the caller who created the rule (server-stamped). */
30247
30850
  createdBy: string(),
30248
30851
  createdAt: number(),