@camstack/addon-auth 1.2.13 → 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
  *
@@ -7665,14 +7688,21 @@ var RecordingConfigSchema = object({
7665
7688
  /**
7666
7689
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
7667
7690
  *
7668
- * One shape shared by the recorder's `relocateFootage` (segments) and
7669
- * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7670
- * page renders both movers with one component. Jobs are in-RAM (a restart
7671
- * forgets them re-running is safe by construction: copy-if-absent, delete
7672
- * after verify) and each completed/failed run also lands one durable ops-log
7673
- * row on the owning addon's surface.
7691
+ * One shape shared by the recorder and pipeline-analytics internal movers.
7692
+ * The public admin surface is `storage-migration`; child jobs remain in RAM
7693
+ * because copy-if-absent, verify, delete and index/row repoint are resumable.
7694
+ * Each completed/failed run also lands one durable ops-log row on its owning
7695
+ * addon surface.
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.
7674
7703
  */
7675
7704
  var RelocateJobStateSchema = _enum([
7705
+ "queued",
7676
7706
  "running",
7677
7707
  "done",
7678
7708
  "failed",
@@ -7697,19 +7727,109 @@ var RelocateJobSchema = object({
7697
7727
  finishedAt: number().nullable(),
7698
7728
  error: string().nullable()
7699
7729
  });
7730
+ /** Profile-derived footage selection used only by the migration coordinator:
7731
+ * `recordings` owns high+mid; `recordingsLow` owns low. */
7732
+ var RelocateFootageClassSchema = _enum(["recordings", "recordingsLow"]);
7700
7733
  var RelocateFootageInputSchema = object({
7701
- deviceId: number().optional(),
7702
7734
  fromLocationId: string(),
7703
7735
  toLocationId: string(),
7704
7736
  entities: array(_enum(["segments"])).optional(),
7737
+ /** Limits relocation to the logical profile class. Omit only for the
7738
+ * pre-orchestration compatibility path. */
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(),
7705
7749
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7706
7750
  * never allowed to starve live writers. */
7707
7751
  throttleMbps: number().min(1).max(1e3).optional()
7708
7752
  });
7709
- var RelocateMediaInputSchema = object({
7710
- deviceId: number().optional(),
7753
+ /** Internal, lease-scoped participant operation. It is intentionally separate
7754
+ * from persistent recording settings: a migration never changes
7755
+ * `RecordingConfig.enabled` or camera wrapper bindings. */
7756
+ var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
7757
+ var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
7758
+ var StorageMigrationMediaMoveInputSchema = object({
7711
7759
  toLocationId: string(),
7712
7760
  throttleMbps: number().min(1).max(1e3).optional()
7761
+ }).extend({ leaseId: string().min(1) });
7762
+ /** The independently selectable logical storage classes. `recordings`
7763
+ * encompasses the high and mid segment profiles; `recordingsLow` is low
7764
+ * segments; `eventMedia` is post-analysis blobs. */
7765
+ var StorageMigrationClassSchema = _enum([
7766
+ "recordings",
7767
+ "recordingsLow",
7768
+ "eventMedia"
7769
+ ]);
7770
+ /** A destination is always an existing, fully-qualified location id. The
7771
+ * migration API intentionally never changes a source location's `basePath`:
7772
+ * callers create a new `<type>:<slug>` location, then select it here. */
7773
+ var StorageMigrationDestinationsSchema = object({
7774
+ recordings: string().min(1).optional(),
7775
+ recordingsLow: string().min(1).optional(),
7776
+ eventMedia: string().min(1).optional()
7777
+ }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
7778
+ /** Shared input for planning and starting an orchestrated storage migration. */
7779
+ var StorageMigrationInputSchema = object({
7780
+ destinations: StorageMigrationDestinationsSchema,
7781
+ throttleMbps: number().min(1).max(1e3).optional()
7782
+ });
7783
+ /** The durable coordinator state machine. The only phase that changes default
7784
+ * locations is `repointing`, after every selected mover has completed and been
7785
+ * verified. */
7786
+ var StorageMigrationPhaseSchema = _enum([
7787
+ "planning",
7788
+ "pausing",
7789
+ "moving",
7790
+ "verifying",
7791
+ "repointing",
7792
+ "refreshing",
7793
+ "resuming",
7794
+ "done",
7795
+ "failed",
7796
+ "cancelled"
7797
+ ]);
7798
+ var StorageMigrationParticipantSchema = _enum([
7799
+ "pipeline",
7800
+ "recorder",
7801
+ "analytics"
7802
+ ]);
7803
+ var StorageMigrationMoveSchema = object({
7804
+ storageClass: StorageMigrationClassSchema,
7805
+ fromLocationId: string(),
7806
+ toLocationId: string(),
7807
+ moverJobId: string().nullable(),
7808
+ state: RelocateJobStateSchema.nullable(),
7809
+ error: string().nullable()
7810
+ });
7811
+ var StorageMigrationJobSchema = object({
7812
+ jobId: string(),
7813
+ phase: StorageMigrationPhaseSchema,
7814
+ destinations: StorageMigrationDestinationsSchema,
7815
+ throttleMbps: number(),
7816
+ moves: array(StorageMigrationMoveSchema),
7817
+ pauseLeaseId: string().nullable(),
7818
+ pausedParticipants: array(StorageMigrationParticipantSchema),
7819
+ repointed: boolean(),
7820
+ cancelRequested: boolean(),
7821
+ startedAt: number(),
7822
+ updatedAt: number(),
7823
+ finishedAt: number().nullable(),
7824
+ error: string().nullable()
7825
+ });
7826
+ var StorageMigrationPlanSchema = object({
7827
+ destinations: StorageMigrationDestinationsSchema,
7828
+ moves: array(object({
7829
+ storageClass: StorageMigrationClassSchema,
7830
+ fromLocationId: string(),
7831
+ toLocationId: string()
7832
+ }))
7713
7833
  });
7714
7834
  /**
7715
7835
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -7761,6 +7881,21 @@ var StorageLocationSchema = object({
7761
7881
  nodeId: string().optional(),
7762
7882
  isDefault: boolean().default(false),
7763
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(),
7764
7899
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7765
7900
  * for node-local locations it can reach) — never persisted, absent when the
7766
7901
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12101,7 +12236,8 @@ method(object({
12101
12236
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12102
12237
  /**
12103
12238
  * filesystem-browse — per-node capability for browsing the node's local
12104
- * 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
12105
12241
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12106
12242
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12107
12243
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -13922,6 +14058,13 @@ var MaskGridDimsSchema = object({
13922
14058
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
13923
14059
  * this one field keeps the schema additive — a rule still declares exactly
13924
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`.
13925
14068
  */
13926
14069
  var NcDeliverySchema = _enum([
13927
14070
  "immediate",
@@ -13936,15 +14079,32 @@ var NcDeliverySchema = _enum([
13936
14079
  * depend on a provider's raw event name or payload shape.
13937
14080
  */
13938
14081
  var NcSystemEventKindSchema = _enum([
13939
- "camera-online",
13940
- "camera-offline",
14082
+ "device-online",
14083
+ "device-offline",
14084
+ "device-disabled",
14085
+ "device-enabled",
13941
14086
  "stream-online",
13942
14087
  "stream-offline",
13943
14088
  "node-online",
13944
14089
  "node-offline",
13945
14090
  "addon-update-available",
13946
- "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"
13947
14106
  ]);
14107
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
13948
14108
  /**
13949
14109
  * One coherent system-event condition. `kinds` is the required opt-in safety
13950
14110
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -13953,6 +14113,18 @@ var NcSystemEventKindSchema = _enum([
13953
14113
  var NcSystemEventConditionSchema = object({
13954
14114
  kinds: array(NcSystemEventKindSchema).min(1),
13955
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(),
13956
14128
  nodeIds: array(string().min(1)).min(1).optional(),
13957
14129
  packageNames: array(string().min(1)).min(1).optional()
13958
14130
  });
@@ -14003,6 +14175,47 @@ var NcOccupancyConditionSchema = object({
14003
14175
  sustainSeconds: number().int().min(0).max(3600).default(15)
14004
14176
  });
14005
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
+ /**
14006
14219
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
14007
14220
  *
14008
14221
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14275,7 +14488,33 @@ var NcConditionsSchema = object({
14275
14488
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14276
14489
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14277
14490
  */
14278
- 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()
14279
14518
  });
14280
14519
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14281
14520
  var NcRuleTargetSchema = object({
@@ -14389,6 +14628,73 @@ var NcThrottleSchema = object({
14389
14628
  */
14390
14629
  granularity: NcThrottleGranularitySchema.optional()
14391
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
+ });
14392
14698
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14393
14699
  var NcRuleInputSchema = object({
14394
14700
  name: string().min(1).max(200),
@@ -14449,7 +14755,13 @@ var NcRuleInputSchema = object({
14449
14755
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14450
14756
  * shape as every other actuation.
14451
14757
  */
14452
- 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()
14453
14765
  });
14454
14766
  /**
14455
14767
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14460,7 +14772,37 @@ var NcRuleInputSchema = object({
14460
14772
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14461
14773
  * `updateRule` patch.
14462
14774
  */
14463
- 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
+ });
14464
14806
  /** A persisted rule. */
14465
14807
  var NcRuleSchema = NcRuleInputSchema.extend({
14466
14808
  id: string(),
@@ -14761,6 +15103,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
14761
15103
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
14762
15104
  * copy would lie the first time a rule is disabled.
14763
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
+ });
14764
15125
  var NcAlarmModeCoverageSchema = object({
14765
15126
  mode: AlarmArmModeSchema,
14766
15127
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -14768,7 +15129,18 @@ var NcAlarmModeCoverageSchema = object({
14768
15129
  /** At least one covering rule has no device scope, so the mode covers all. */
14769
15130
  allDevices: boolean(),
14770
15131
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
14771
- 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([])
14772
15144
  });
14773
15145
  var NcAlarmConfigSchema = object({
14774
15146
  /**
@@ -16131,13 +16503,19 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16131
16503
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16132
16504
  kind: "mutation",
16133
16505
  auth: "admin"
16134
- }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
16506
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
16135
16507
  kind: "mutation",
16136
16508
  auth: "admin"
16137
- }), method(object({}), array(RelocateJobSchema).readonly(), {
16138
- kind: "query",
16509
+ }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
16510
+ kind: "mutation",
16139
16511
  auth: "admin"
16140
- }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16512
+ }), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
16513
+ kind: "mutation",
16514
+ auth: "admin"
16515
+ }), method(StorageMigrationMediaMoveInputSchema, object({ jobId: string() }), {
16516
+ kind: "mutation",
16517
+ auth: "admin"
16518
+ }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16141
16519
  kind: "mutation",
16142
16520
  auth: "admin"
16143
16521
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
@@ -17561,9 +17939,16 @@ var CameraStatusSchema = object({
17561
17939
  audio: CameraAudioStatusSchema.nullable(),
17562
17940
  recording: CameraRecordingStatusSchema.nullable(),
17563
17941
  /**
17564
- * Per-camera function switches an OPERATOR has turned off
17942
+ * Per-camera functions an OPERATOR has turned off
17565
17943
  * ([D61](../../../../docs/decisions/adr-0067.md)).
17566
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
+ *
17567
17952
  * This is the difference between DISABLED and BROKEN. A camera whose
17568
17953
  * `detection` block reports zero fps and whose `switchedOff` contains
17569
17954
  * `'object-detection'` was switched off by a person; the same camera with an
@@ -17634,7 +18019,13 @@ var NodeInferenceDevicesSchema = object({
17634
18019
  reachable: boolean(),
17635
18020
  devices: array(NodeInferenceDeviceSchema).readonly()
17636
18021
  });
17637
- method(object({
18022
+ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
18023
+ kind: "mutation",
18024
+ auth: "admin"
18025
+ }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
18026
+ kind: "mutation",
18027
+ auth: "admin"
18028
+ }), method(object({
17638
18029
  deviceId: number(),
17639
18030
  agentNodeId: string()
17640
18031
  }), object({ success: literal(true) }), {
@@ -18308,6 +18699,13 @@ method(object({ locationId: string() }), EvictableUsageSchema), method(object({
18308
18699
  locationId: string(),
18309
18700
  targetBytes: number().int().positive()
18310
18701
  }), EvictResultSchema, { kind: "mutation" });
18702
+ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin" }), method(StorageMigrationInputSchema, object({ jobId: string() }), {
18703
+ kind: "mutation",
18704
+ auth: "admin"
18705
+ }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
18706
+ kind: "mutation",
18707
+ auth: "admin"
18708
+ });
18311
18709
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
18312
18710
  providerId: string().min(1),
18313
18711
  displayName: string().min(1),
@@ -18411,6 +18809,28 @@ var TerminalProfileInfoSchema = object({
18411
18809
  label: string(),
18412
18810
  description: string().optional()
18413
18811
  });
18812
+ /**
18813
+ * A durable operator-created Terminal instance. Profiles are templates; only
18814
+ * an instance declares a camera.
18815
+ */
18816
+ var TerminalInstanceInfoSchema = object({
18817
+ instanceId: string(),
18818
+ cameraStableId: string(),
18819
+ nodeId: string(),
18820
+ profileId: string(),
18821
+ profileLabel: string(),
18822
+ name: string(),
18823
+ enabled: boolean()
18824
+ });
18825
+ var TerminalLegacyCameraSchema = object({
18826
+ stableId: string(),
18827
+ nodeId: string(),
18828
+ profileId: string(),
18829
+ profileLabel: string(),
18830
+ name: string(),
18831
+ /** Only legacy monitor cameras can retain their historic stable identity. */
18832
+ adoptable: boolean()
18833
+ });
18414
18834
  var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
18415
18835
  seq: number().int().positive(),
18416
18836
  kind: literal("data"),
@@ -18427,7 +18847,29 @@ var TerminalOutputBatchSchema = object({
18427
18847
  snapshot: string().optional(),
18428
18848
  events: array(TerminalOutputEventSchema).readonly()
18429
18849
  });
18430
- method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
18850
+ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalInstanceInfoSchema).readonly(), { auth: "admin" }), method(object({
18851
+ targetNodeId: string().min(1),
18852
+ profileId: string().min(1),
18853
+ name: string().trim().min(1).max(160).optional()
18854
+ }), TerminalInstanceInfoSchema, {
18855
+ kind: "mutation",
18856
+ auth: "admin"
18857
+ }), method(object({ instanceId: string().min(1) }), _void(), {
18858
+ kind: "mutation",
18859
+ auth: "admin"
18860
+ }), method(object({
18861
+ instanceId: string().min(1),
18862
+ enabled: boolean()
18863
+ }), TerminalInstanceInfoSchema, {
18864
+ kind: "mutation",
18865
+ auth: "admin"
18866
+ }), method(_void(), array(TerminalLegacyCameraSchema).readonly(), { auth: "admin" }), method(object({
18867
+ stableId: string().min(1),
18868
+ name: string().trim().min(1).max(160).optional()
18869
+ }), TerminalInstanceInfoSchema, {
18870
+ kind: "mutation",
18871
+ auth: "admin"
18872
+ }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(object({
18431
18873
  profileId: string(),
18432
18874
  cols: number().int().positive(),
18433
18875
  rows: number().int().positive()
@@ -18444,7 +18886,13 @@ method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }),
18444
18886
  }), method(object({
18445
18887
  sessionId: string(),
18446
18888
  afterSeq: number().int().nonnegative(),
18447
- waitMs: number().int().min(0).max(2e3).default(0)
18889
+ waitMs: number().int().min(0).max(2e3).default(0),
18890
+ /**
18891
+ * Wait when a just-opened session has no output yet. Kept opt-in so a
18892
+ * browser's initial repaint remains immediate; the camera snapshot
18893
+ * relay uses it to avoid encoding a blank startup frame.
18894
+ */
18895
+ waitForOutput: boolean().optional()
18448
18896
  }), TerminalOutputBatchSchema, {
18449
18897
  kind: "mutation",
18450
18898
  auth: "admin",
@@ -20402,6 +20850,7 @@ var FaceInfoSchema = object({
20402
20850
  var FaceFilterEnum = _enum([
20403
20851
  "unassigned",
20404
20852
  "recognized",
20853
+ "identified",
20405
20854
  "all"
20406
20855
  ]);
20407
20856
  var MediaFileLiteSchema$1 = object({
@@ -20430,6 +20879,8 @@ method(_void(), array(IdentitySchema).readonly()), method(object({ name: string(
20430
20879
  kind: "mutation",
20431
20880
  auth: "admin"
20432
20881
  }), method(object({
20882
+ /** Restrict to one camera. Absent keeps the cluster-wide gallery view. */
20883
+ deviceId: number().int().optional(),
20433
20884
  limit: number().int().positive().optional(),
20434
20885
  filter: FaceFilterEnum.optional(),
20435
20886
  /**
@@ -22195,6 +22646,10 @@ var OsdSourceSchema = discriminatedUnion("kind", [
22195
22646
  capName: string().min(1).max(64),
22196
22647
  /** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
22197
22648
  valuePath: string().min(1).max(64)
22649
+ }),
22650
+ object({
22651
+ kind: literal("latest-recognition"),
22652
+ recognition: _enum(["person", "plate"])
22198
22653
  })
22199
22654
  ]);
22200
22655
  var OsdSlotBindingSchema = object({
@@ -22300,6 +22755,15 @@ method(object({ deviceId: number().int() }), object({
22300
22755
  }), object({ success: literal(true) }), {
22301
22756
  kind: "mutation",
22302
22757
  auth: "admin"
22758
+ }), method(object({
22759
+ sourceDeviceId: number().int(),
22760
+ targetDeviceId: number().int()
22761
+ }), object({
22762
+ copied: number().int().nonnegative(),
22763
+ skipped: number().int().nonnegative()
22764
+ }), {
22765
+ kind: "mutation",
22766
+ auth: "admin"
22303
22767
  }), method(object({
22304
22768
  deviceId: number().int(),
22305
22769
  slotId: string().min(1),
@@ -23010,7 +23474,19 @@ var RecordingManifestSchema = object({
23010
23474
  * profiles/subtrees/locations on this node). */
23011
23475
  var RecordingDeviceUsageSchema = object({
23012
23476
  deviceId: number(),
23013
- 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()
23014
23490
  });
23015
23491
  /** Recording storage usage + capacity for one storage location. */
23016
23492
  var RecordingLocationUsageSchema = object({
@@ -23038,6 +23514,57 @@ var RecordingStorageUsageSchema = object({
23038
23514
  locations: array(RecordingLocationUsageSchema)
23039
23515
  });
23040
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
+ /**
23041
23568
  * Result of locating footage at a wall-clock instant for one device/profile.
23042
23569
  * `segment` carries the covering segment's window; `gap` reports the forward
23043
23570
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -23185,6 +23712,21 @@ method(object({
23185
23712
  }), {
23186
23713
  kind: "mutation",
23187
23714
  auth: "admin"
23715
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
23716
+ kind: "mutation",
23717
+ auth: "admin"
23718
+ }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
23719
+ kind: "mutation",
23720
+ auth: "admin"
23721
+ }), method(StorageMigrationLeaseInputSchema, object({ refreshed: literal(true) }), {
23722
+ kind: "mutation",
23723
+ auth: "admin"
23724
+ }), method(StorageMigrationFootageMoveInputSchema, object({ jobId: string() }), {
23725
+ kind: "mutation",
23726
+ auth: "admin"
23727
+ }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23728
+ kind: "mutation",
23729
+ auth: "admin"
23188
23730
  }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
23189
23731
  kind: "mutation",
23190
23732
  auth: "admin"
@@ -23194,9 +23736,15 @@ method(object({
23194
23736
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23195
23737
  kind: "mutation",
23196
23738
  auth: "admin"
23739
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23740
+ kind: "query",
23741
+ auth: "admin"
23742
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23743
+ kind: "mutation",
23744
+ auth: "admin"
23197
23745
  });
23198
23746
  /**
23199
- * `recordingExport` cap — render a footage time range into a single downloadable
23747
+ * `recording-export` cap — render a footage time range into a single downloadable
23200
23748
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
23201
23749
  * bounded lifetime with a durable history, auto-expiry, and optional
23202
23750
  * delete-after-download.
@@ -23211,10 +23759,42 @@ method(object({
23211
23759
  */
23212
23760
  /** Playback-speed multiplier for the render (1 = realtime). */
23213
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
+ });
23214
23786
  /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
23215
23787
  var ExportTimelapseSchema = object({
23216
23788
  everyMs: number().int().positive(),
23217
- 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
+ });
23218
23798
  });
23219
23799
  /**
23220
23800
  * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
@@ -23272,6 +23852,19 @@ var ExportDownloadSchema = object({
23272
23852
  url: string(),
23273
23853
  endpoints: array(string())
23274
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
+ });
23275
23868
  method(object({
23276
23869
  deviceId: number(),
23277
23870
  profile: string(),
@@ -23296,6 +23889,9 @@ method(object({
23296
23889
  }), method(object({ exportId: string() }), ExportDownloadSchema, {
23297
23890
  kind: "query",
23298
23891
  auth: "protected"
23892
+ }), method(object({ exportId: string() }), ExportBytesSchema, {
23893
+ kind: "query",
23894
+ auth: "protected"
23299
23895
  });
23300
23896
  /**
23301
23897
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -27313,6 +27909,12 @@ Object.freeze({
27313
27909
  addonId: null,
27314
27910
  access: "delete"
27315
27911
  },
27912
+ "osdManager.copyDeviceConfiguration": {
27913
+ capName: "osd-manager",
27914
+ capScope: "system",
27915
+ addonId: null,
27916
+ access: "create"
27917
+ },
27316
27918
  "osdManager.getConditionSupport": {
27317
27919
  capName: "osd-manager",
27318
27920
  capScope: "system",
@@ -27409,7 +28011,7 @@ Object.freeze({
27409
28011
  addonId: null,
27410
28012
  access: "create"
27411
28013
  },
27412
- "pipelineAnalytics.cancelMediaRelocate": {
28014
+ "pipelineAnalytics.cancelStorageMigrationMove": {
27413
28015
  capName: "pipeline-analytics",
27414
28016
  capScope: "device",
27415
28017
  addonId: null,
@@ -27481,12 +28083,6 @@ Object.freeze({
27481
28083
  addonId: null,
27482
28084
  access: "view"
27483
28085
  },
27484
- "pipelineAnalytics.getMediaRelocateStatus": {
27485
- capName: "pipeline-analytics",
27486
- capScope: "device",
27487
- addonId: null,
27488
- access: "view"
27489
- },
27490
28086
  "pipelineAnalytics.getMotionEvents": {
27491
28087
  capName: "pipeline-analytics",
27492
28088
  capScope: "device",
@@ -27523,6 +28119,12 @@ Object.freeze({
27523
28119
  addonId: null,
27524
28120
  access: "view"
27525
28121
  },
28122
+ "pipelineAnalytics.getStorageMigrationMoveStatus": {
28123
+ capName: "pipeline-analytics",
28124
+ capScope: "device",
28125
+ addonId: null,
28126
+ access: "view"
28127
+ },
27526
28128
  "pipelineAnalytics.getTrack": {
27527
28129
  capName: "pipeline-analytics",
27528
28130
  capScope: "device",
@@ -27601,6 +28203,12 @@ Object.freeze({
27601
28203
  addonId: null,
27602
28204
  access: "view"
27603
28205
  },
28206
+ "pipelineAnalytics.pauseForStorageMigration": {
28207
+ capName: "pipeline-analytics",
28208
+ capScope: "device",
28209
+ addonId: null,
28210
+ access: "create"
28211
+ },
27604
28212
  "pipelineAnalytics.proposeRetrainAnnotations": {
27605
28213
  capName: "pipeline-analytics",
27606
28214
  capScope: "device",
@@ -27631,7 +28239,7 @@ Object.freeze({
27631
28239
  addonId: null,
27632
28240
  access: "create"
27633
28241
  },
27634
- "pipelineAnalytics.relocateMedia": {
28242
+ "pipelineAnalytics.refreshStorageLocationsForMigration": {
27635
28243
  capName: "pipeline-analytics",
27636
28244
  capScope: "device",
27637
28245
  addonId: null,
@@ -27643,6 +28251,12 @@ Object.freeze({
27643
28251
  addonId: null,
27644
28252
  access: "create"
27645
28253
  },
28254
+ "pipelineAnalytics.resumeForStorageMigration": {
28255
+ capName: "pipeline-analytics",
28256
+ capScope: "device",
28257
+ addonId: null,
28258
+ access: "create"
28259
+ },
27646
28260
  "pipelineAnalytics.saveRetrainAnnotations": {
27647
28261
  capName: "pipeline-analytics",
27648
28262
  capScope: "device",
@@ -27667,6 +28281,12 @@ Object.freeze({
27667
28281
  addonId: null,
27668
28282
  access: "create"
27669
28283
  },
28284
+ "pipelineAnalytics.startStorageMigrationMove": {
28285
+ capName: "pipeline-analytics",
28286
+ capScope: "device",
28287
+ addonId: null,
28288
+ access: "create"
28289
+ },
27670
28290
  "pipelineAnalytics.wipeAllAnalytics": {
27671
28291
  capName: "pipeline-analytics",
27672
28292
  capScope: "device",
@@ -28033,6 +28653,12 @@ Object.freeze({
28033
28653
  addonId: null,
28034
28654
  access: "view"
28035
28655
  },
28656
+ "pipelineOrchestrator.pauseForStorageMigration": {
28657
+ capName: "pipeline-orchestrator",
28658
+ capScope: "system",
28659
+ addonId: null,
28660
+ access: "create"
28661
+ },
28036
28662
  "pipelineOrchestrator.rebalance": {
28037
28663
  capName: "pipeline-orchestrator",
28038
28664
  capScope: "system",
@@ -28057,6 +28683,12 @@ Object.freeze({
28057
28683
  addonId: null,
28058
28684
  access: "view"
28059
28685
  },
28686
+ "pipelineOrchestrator.resumeForStorageMigration": {
28687
+ capName: "pipeline-orchestrator",
28688
+ capScope: "system",
28689
+ addonId: null,
28690
+ access: "create"
28691
+ },
28060
28692
  "pipelineOrchestrator.saveTemplate": {
28061
28693
  capName: "pipeline-orchestrator",
28062
28694
  capScope: "system",
@@ -28453,7 +29085,13 @@ Object.freeze({
28453
29085
  addonId: null,
28454
29086
  access: "create"
28455
29087
  },
28456
- "recording.cancelRelocate": {
29088
+ "recording.cancelRelocateJob": {
29089
+ capName: "recording",
29090
+ capScope: "system",
29091
+ addonId: null,
29092
+ access: "create"
29093
+ },
29094
+ "recording.cancelStorageMigrationMove": {
28457
29095
  capName: "recording",
28458
29096
  capScope: "system",
28459
29097
  addonId: null,
@@ -28489,7 +29127,7 @@ Object.freeze({
28489
29127
  addonId: null,
28490
29128
  access: "view"
28491
29129
  },
28492
- "recording.getRelocateStatus": {
29130
+ "recording.getStorageMigrationMoveStatus": {
28493
29131
  capName: "recording",
28494
29132
  capScope: "system",
28495
29133
  addonId: null,
@@ -28507,12 +29145,30 @@ Object.freeze({
28507
29145
  addonId: null,
28508
29146
  access: "view"
28509
29147
  },
29148
+ "recording.listRelocateJobs": {
29149
+ capName: "recording",
29150
+ capScope: "system",
29151
+ addonId: null,
29152
+ access: "view"
29153
+ },
28510
29154
  "recording.locateSegment": {
28511
29155
  capName: "recording",
28512
29156
  capScope: "system",
28513
29157
  addonId: null,
28514
29158
  access: "view"
28515
29159
  },
29160
+ "recording.pauseForStorageMigration": {
29161
+ capName: "recording",
29162
+ capScope: "system",
29163
+ addonId: null,
29164
+ access: "create"
29165
+ },
29166
+ "recording.planStorageRebalance": {
29167
+ capName: "recording",
29168
+ capScope: "system",
29169
+ addonId: null,
29170
+ access: "view"
29171
+ },
28516
29172
  "recording.pruneFootage": {
28517
29173
  capName: "recording",
28518
29174
  capScope: "system",
@@ -28531,6 +29187,12 @@ Object.freeze({
28531
29187
  addonId: null,
28532
29188
  access: "view"
28533
29189
  },
29190
+ "recording.refreshStorageLocationsForMigration": {
29191
+ capName: "recording",
29192
+ capScope: "system",
29193
+ addonId: null,
29194
+ access: "create"
29195
+ },
28534
29196
  "recording.relocateFootage": {
28535
29197
  capName: "recording",
28536
29198
  capScope: "system",
@@ -28555,44 +29217,68 @@ Object.freeze({
28555
29217
  addonId: null,
28556
29218
  access: "create"
28557
29219
  },
29220
+ "recording.resumeForStorageMigration": {
29221
+ capName: "recording",
29222
+ capScope: "system",
29223
+ addonId: null,
29224
+ access: "create"
29225
+ },
28558
29226
  "recording.setDeviceConfig": {
28559
29227
  capName: "recording",
28560
29228
  capScope: "system",
28561
29229
  addonId: null,
28562
29230
  access: "create"
28563
29231
  },
29232
+ "recording.startStorageMigrationMove": {
29233
+ capName: "recording",
29234
+ capScope: "system",
29235
+ addonId: null,
29236
+ access: "create"
29237
+ },
29238
+ "recording.startStorageRebalance": {
29239
+ capName: "recording",
29240
+ capScope: "system",
29241
+ addonId: null,
29242
+ access: "create"
29243
+ },
28564
29244
  "recordingExport.cancelExport": {
28565
- capName: "recordingExport",
29245
+ capName: "recording-export",
28566
29246
  capScope: "system",
28567
29247
  addonId: null,
28568
29248
  access: "create"
28569
29249
  },
28570
29250
  "recordingExport.createExport": {
28571
- capName: "recordingExport",
29251
+ capName: "recording-export",
28572
29252
  capScope: "system",
28573
29253
  addonId: null,
28574
29254
  access: "create"
28575
29255
  },
28576
29256
  "recordingExport.deleteExport": {
28577
- capName: "recordingExport",
29257
+ capName: "recording-export",
28578
29258
  capScope: "system",
28579
29259
  addonId: null,
28580
29260
  access: "delete"
28581
29261
  },
28582
29262
  "recordingExport.getDownloadUrl": {
28583
- capName: "recordingExport",
29263
+ capName: "recording-export",
28584
29264
  capScope: "system",
28585
29265
  addonId: null,
28586
29266
  access: "view"
28587
29267
  },
28588
29268
  "recordingExport.getExport": {
28589
- capName: "recordingExport",
29269
+ capName: "recording-export",
28590
29270
  capScope: "system",
28591
29271
  addonId: null,
28592
29272
  access: "view"
28593
29273
  },
28594
29274
  "recordingExport.listExports": {
28595
- capName: "recordingExport",
29275
+ capName: "recording-export",
29276
+ capScope: "system",
29277
+ addonId: null,
29278
+ access: "view"
29279
+ },
29280
+ "recordingExport.readExportBytes": {
29281
+ capName: "recording-export",
28596
29282
  capScope: "system",
28597
29283
  addonId: null,
28598
29284
  access: "view"
@@ -28951,6 +29637,30 @@ Object.freeze({
28951
29637
  addonId: null,
28952
29638
  access: "view"
28953
29639
  },
29640
+ "storageMigration.cancel": {
29641
+ capName: "storage-migration",
29642
+ capScope: "system",
29643
+ addonId: null,
29644
+ access: "create"
29645
+ },
29646
+ "storageMigration.plan": {
29647
+ capName: "storage-migration",
29648
+ capScope: "system",
29649
+ addonId: null,
29650
+ access: "view"
29651
+ },
29652
+ "storageMigration.start": {
29653
+ capName: "storage-migration",
29654
+ capScope: "system",
29655
+ addonId: null,
29656
+ access: "create"
29657
+ },
29658
+ "storageMigration.status": {
29659
+ capName: "storage-migration",
29660
+ capScope: "system",
29661
+ addonId: null,
29662
+ access: "view"
29663
+ },
28954
29664
  "storageProvider.abortUpload": {
28955
29665
  capName: "storage-provider",
28956
29666
  capScope: "system",
@@ -29329,12 +30039,42 @@ Object.freeze({
29329
30039
  addonId: null,
29330
30040
  access: "create"
29331
30041
  },
30042
+ "terminalSession.adoptLegacyMonitor": {
30043
+ capName: "terminal-session",
30044
+ capScope: "system",
30045
+ addonId: null,
30046
+ access: "create"
30047
+ },
29332
30048
  "terminalSession.close": {
29333
30049
  capName: "terminal-session",
29334
30050
  capScope: "system",
29335
30051
  addonId: null,
29336
30052
  access: "create"
29337
30053
  },
30054
+ "terminalSession.createInstance": {
30055
+ capName: "terminal-session",
30056
+ capScope: "system",
30057
+ addonId: null,
30058
+ access: "create"
30059
+ },
30060
+ "terminalSession.deleteInstance": {
30061
+ capName: "terminal-session",
30062
+ capScope: "system",
30063
+ addonId: null,
30064
+ access: "delete"
30065
+ },
30066
+ "terminalSession.listInstances": {
30067
+ capName: "terminal-session",
30068
+ capScope: "system",
30069
+ addonId: null,
30070
+ access: "view"
30071
+ },
30072
+ "terminalSession.listLegacyCameras": {
30073
+ capName: "terminal-session",
30074
+ capScope: "system",
30075
+ addonId: null,
30076
+ access: "view"
30077
+ },
29338
30078
  "terminalSession.listProfiles": {
29339
30079
  capName: "terminal-session",
29340
30080
  capScope: "system",
@@ -29365,6 +30105,12 @@ Object.freeze({
29365
30105
  addonId: null,
29366
30106
  access: "create"
29367
30107
  },
30108
+ "terminalSession.setInstanceEnabled": {
30109
+ capName: "terminal-session",
30110
+ capScope: "system",
30111
+ addonId: null,
30112
+ access: "create"
30113
+ },
29368
30114
  "terminalSession.writeInput": {
29369
30115
  capName: "terminal-session",
29370
30116
  capScope: "system",
@@ -29909,6 +30655,104 @@ var FramerateField = number().int().min(1).max(60);
29909
30655
  var TargetsField = array(NcRuleTargetSchema).min(1);
29910
30656
  var PriorityField = number().int().min(1).max(5);
29911
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
+ /**
29912
30756
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
29913
30757
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
29914
30758
  * here (see the ownership note above).
@@ -29928,9 +30772,30 @@ var TimelapseRuleInputSchema = object({
29928
30772
  cadenceSec: CadenceSecField.default(15),
29929
30773
  /** Output frames per second of the assembled mp4 (predecessor parity). */
29930
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(),
29931
30783
  /** `notification-output` targets the finished video/thumbnail is sent to. */
29932
30784
  targets: TargetsField,
29933
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(),
29934
30799
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
29935
30800
  priority: PriorityField.default(3)
29936
30801
  });
@@ -29941,8 +30806,13 @@ object({
29941
30806
  schedule: NcScheduleSchema.optional(),
29942
30807
  cadenceSec: CadenceSecField.optional(),
29943
30808
  framerate: FramerateField.optional(),
30809
+ denseCadenceSec: DenseCadenceSecField.optional(),
30810
+ minDwellSec: MinDwellSecField.optional(),
29944
30811
  targets: TargetsField.optional(),
29945
30812
  template: TimelapseTemplateSchema.nullable().optional(),
30813
+ previewText: PreviewTextField.optional(),
30814
+ previewMode: PreviewModeField.optional(),
30815
+ reportClasses: ReportClassesField.optional(),
29946
30816
  priority: PriorityField.optional()
29947
30817
  });
29948
30818
  TimelapseRuleInputSchema.extend({
@@ -29954,10 +30824,28 @@ TimelapseRuleInputSchema.extend({
29954
30824
  */
29955
30825
  ownerUserId: string().optional(),
29956
30826
  /**
29957
- * Epoch-ms of the last successful generation the 1-hour re-generation
29958
- * 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.
29959
30830
  */
29960
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(),
29961
30849
  /** userId of the caller who created the rule (server-stamped). */
29962
30850
  createdBy: string(),
29963
30851
  createdAt: number(),