@camstack/types 1.2.60 → 1.2.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +18 -0
- package/dist/capabilities/recording-export.cap.d.ts +161 -2
- package/dist/generated/addon-api.d.ts +7 -0
- package/dist/generated/capability-router-map.d.ts +2 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +247 -19
- package/dist/index.mjs +241 -20
- package/dist/interfaces/camera-switches.d.ts +66 -2
- package/dist/notification/timelapse-rule.d.ts +14 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -695,8 +695,31 @@ var DEFAULT_RETENTION = {
|
|
|
695
695
|
//#endregion
|
|
696
696
|
//#region src/interfaces/camera-switches.ts
|
|
697
697
|
/**
|
|
698
|
-
* Per-camera FUNCTION SWITCHES
|
|
699
|
-
*
|
|
698
|
+
* Per-camera FUNCTION SWITCHES.
|
|
699
|
+
*
|
|
700
|
+
* ## The aggregate group is being withdrawn — the BADGE is not (D113)
|
|
701
|
+
*
|
|
702
|
+
* This file shipped as "the one coherent on/off surface over the pipeline
|
|
703
|
+
* functions an operator thinks in terms of". The operator's verdict on
|
|
704
|
+
* 2026-08-12 was that the coherent surface bought complexity and no clarity:
|
|
705
|
+
* every function already had a settings page of its own, and a second place to
|
|
706
|
+
* turn it off is a second place to look. Each switch is going back to its own
|
|
707
|
+
* component's original options — detection to the detection-pipeline wrapper
|
|
708
|
+
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
709
|
+
* (which was always first-class; the switch was a veneer over
|
|
710
|
+
* `recording.setDeviceConfig`), notifications to a notification-center
|
|
711
|
+
* per-device setting, the two camera planes to their own components.
|
|
712
|
+
*
|
|
713
|
+
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
714
|
+
* thing that lets a status surface say DISABLED instead of BROKEN, recomposed
|
|
715
|
+
* straight from the authorities with no group in the middle. That rule was
|
|
716
|
+
* never about a control panel.
|
|
717
|
+
*
|
|
718
|
+
* Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
|
|
719
|
+
* {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
|
|
720
|
+
* `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
|
|
721
|
+
* viewers (v1.0.305) and the admin UI still call it. It is deleted when they
|
|
722
|
+
* stop; nothing new may be built on it.
|
|
700
723
|
*
|
|
701
724
|
* ## This file adds no state
|
|
702
725
|
*
|
|
@@ -1120,6 +1143,42 @@ function deriveCameraSwitches(input) {
|
|
|
1120
1143
|
function switchedOffIds(switches) {
|
|
1121
1144
|
return switches.filter((s) => CAMERA_SWITCH_CATALOG[s.id].countsAsSwitchedOff && s.available && !s.enabled).map((s) => s.id);
|
|
1122
1145
|
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Compose the `switchedOff` badge STRAIGHT from the authorities (D113).
|
|
1148
|
+
*
|
|
1149
|
+
* This is the half of this file that outlives the switch group.
|
|
1150
|
+
* {@link deriveCameraSwitches} exists to paint a control panel — labels, cost
|
|
1151
|
+
* lines, `available`/`unavailableReason` — and that panel is being dismantled:
|
|
1152
|
+
* each function is going back to its own component's settings. The BADGE is
|
|
1153
|
+
* not: "a switched-off camera must read as DISABLED, not broken" is a rule
|
|
1154
|
+
* about status, not about a control group, and it survives every surface change
|
|
1155
|
+
* underneath it.
|
|
1156
|
+
*
|
|
1157
|
+
* So the badge gets its own entry point over the same authority reads, and the
|
|
1158
|
+
* caller that only needs the badge never builds eight labelled rows to throw
|
|
1159
|
+
* seven of them away.
|
|
1160
|
+
*
|
|
1161
|
+
* `privacy-mask` appears in NEITHER list, whichever way it is sitting and
|
|
1162
|
+
* whether or not it could be read — its ON means "the mask is obscuring video",
|
|
1163
|
+
* not "this function works" ({@link CameraSwitchDescriptor.countsAsSwitchedOff}).
|
|
1164
|
+
* Counting it unreadable would be its own bug: the mask cannot contribute to
|
|
1165
|
+
* the badge, so failing to read it cannot make the badge incomplete.
|
|
1166
|
+
*/
|
|
1167
|
+
function composeSwitchedOff(input) {
|
|
1168
|
+
const switchedOff = [];
|
|
1169
|
+
const unreadable = [];
|
|
1170
|
+
for (const id of CAMERA_SWITCH_ORDER) {
|
|
1171
|
+
const descriptor = CAMERA_SWITCH_CATALOG[id];
|
|
1172
|
+
if (!descriptor.countsAsSwitchedOff) continue;
|
|
1173
|
+
const state = resolveState(descriptor, input);
|
|
1174
|
+
if (state.unavailableReason === "source-unreachable") unreadable.push(id);
|
|
1175
|
+
else if (state.available && !state.enabled) switchedOff.push(id);
|
|
1176
|
+
}
|
|
1177
|
+
return {
|
|
1178
|
+
switchedOff,
|
|
1179
|
+
unreadable
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1123
1182
|
//#endregion
|
|
1124
1183
|
//#region src/interfaces/device-capabilities/camera.ts
|
|
1125
1184
|
/** Friendly display labels for stream quality IDs. */
|
|
@@ -16813,9 +16872,16 @@ var CameraStatusSchema = zod.z.object({
|
|
|
16813
16872
|
audio: CameraAudioStatusSchema.nullable(),
|
|
16814
16873
|
recording: CameraRecordingStatusSchema.nullable(),
|
|
16815
16874
|
/**
|
|
16816
|
-
* Per-camera
|
|
16875
|
+
* Per-camera functions an OPERATOR has turned off
|
|
16817
16876
|
* ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
16818
16877
|
*
|
|
16878
|
+
* Composed from the AUTHORITIES themselves — the wrapper bindings,
|
|
16879
|
+
* `RecordingConfig.enabled`, the notification mute, the broker's audio
|
|
16880
|
+
* policy, the camera's own microphone — via `composeSwitchedOff`, not from
|
|
16881
|
+
* the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
16882
|
+
* The badge outlives the control panel: the panel was a convenience, this is
|
|
16883
|
+
* the difference between a camera being off and a camera being dead.
|
|
16884
|
+
*
|
|
16819
16885
|
* This is the difference between DISABLED and BROKEN. A camera whose
|
|
16820
16886
|
* `detection` block reports zero fps and whose `switchedOff` contains
|
|
16821
16887
|
* `'object-detection'` was switched off by a person; the same camera with an
|
|
@@ -17254,6 +17320,10 @@ var pipelineOrchestratorCapability = {
|
|
|
17254
17320
|
agentNodeId: zod.z.string().optional()
|
|
17255
17321
|
}), CameraPipelineConfigSchema),
|
|
17256
17322
|
/**
|
|
17323
|
+
* @deprecated The aggregate switch group is being withdrawn
|
|
17324
|
+
* ([D113](../../../../docs/decisions/adr-0113.md)). Build nothing new on
|
|
17325
|
+
* this pair; read the authority directly.
|
|
17326
|
+
*
|
|
17257
17327
|
* The whole per-camera function switch group, DERIVED — never a stored
|
|
17258
17328
|
* list ([D61](../../../../docs/decisions/adr-0067.md)).
|
|
17259
17329
|
*
|
|
@@ -17267,9 +17337,23 @@ var pipelineOrchestratorCapability = {
|
|
|
17267
17337
|
* `auth: 'view'` deliberately — a NON-admin must be able to see that a
|
|
17268
17338
|
* camera is quiet because somebody switched it off. Only the mutation is
|
|
17269
17339
|
* admin-gated.
|
|
17340
|
+
*
|
|
17341
|
+
* **Removal plan.** It stays and it KEEPS WORKING while shipped viewers
|
|
17342
|
+
* (v1.0.305) and the admin UI still call it — removing it now is a broken
|
|
17343
|
+
* app on a device nobody can redeploy from here. It is served by a thin
|
|
17344
|
+
* shim over the same authorities (`camera-switch-service.ts`), so the
|
|
17345
|
+
* behaviour of the pair is the behaviour of the authorities by
|
|
17346
|
+
* construction. It is deleted once every surface reaches its own
|
|
17347
|
+
* component's options and the last caller is gone. Nothing on this server
|
|
17348
|
+
* reads it: `CameraStatus.switchedOff` is composed from the authorities
|
|
17349
|
+
* directly via `composeSwitchedOff`.
|
|
17270
17350
|
*/
|
|
17271
17351
|
getCameraSwitches: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), CameraSwitchGroupSchema),
|
|
17272
17352
|
/**
|
|
17353
|
+
* @deprecated See {@link getCameraSwitches}. Write the authority — the
|
|
17354
|
+
* wrapper binding, `RecordingConfig.enabled`, the notification mute — not
|
|
17355
|
+
* this ([D113](../../../../docs/decisions/adr-0113.md)).
|
|
17356
|
+
*
|
|
17273
17357
|
* Flip ONE switch, routed to its existing authority.
|
|
17274
17358
|
*
|
|
17275
17359
|
* Never writes a parallel map: `recording` patches `RecordingConfig.enabled`
|
|
@@ -25798,7 +25882,7 @@ var recordingCapability = {
|
|
|
25798
25882
|
//#endregion
|
|
25799
25883
|
//#region src/capabilities/recording-export.cap.ts
|
|
25800
25884
|
/**
|
|
25801
|
-
* `
|
|
25885
|
+
* `recording-export` cap — render a footage time range into a single downloadable
|
|
25802
25886
|
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
25803
25887
|
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
25804
25888
|
* delete-after-download.
|
|
@@ -25813,10 +25897,52 @@ var recordingCapability = {
|
|
|
25813
25897
|
*/
|
|
25814
25898
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
25815
25899
|
var ExportSpeedSchema = zod.z.number().min(.25).max(32);
|
|
25900
|
+
/**
|
|
25901
|
+
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25902
|
+
*
|
|
25903
|
+
* Relative and not absolute epoch on purpose: the renderer's frame-select
|
|
25904
|
+
* expression sees ffmpeg's `t`, which starts at 0 for the export's source
|
|
25905
|
+
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25906
|
+
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25907
|
+
* selects nothing — silently, as a uniform timelapse.
|
|
25908
|
+
*/
|
|
25909
|
+
var ExportDenseRangeSchema = zod.z.object({
|
|
25910
|
+
fromSec: zod.z.number().nonnegative(),
|
|
25911
|
+
toSec: zod.z.number().nonnegative()
|
|
25912
|
+
}).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
|
|
25913
|
+
/**
|
|
25914
|
+
* Hard ceiling on dense ranges in ONE render.
|
|
25915
|
+
*
|
|
25916
|
+
* The ranges become terms of a single ffmpeg `select` expression, so the count
|
|
25917
|
+
* is the length of a command-line argument. The producer (the timelapse
|
|
25918
|
+
* scheduler) coalesces and then falls back to the base cadence alone rather
|
|
25919
|
+
* than trimming — a truncated range list is a video that quietly omits the
|
|
25920
|
+
* evening.
|
|
25921
|
+
*/
|
|
25922
|
+
var EXPORT_DENSE_MAX_RANGES = 200;
|
|
25923
|
+
/**
|
|
25924
|
+
* Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
|
|
25925
|
+
* listed ranges and at the base `everyMs` everywhere else.
|
|
25926
|
+
*
|
|
25927
|
+
* `everyMs` must be strictly smaller than the base cadence — a dense rate that
|
|
25928
|
+
* is not denser renders a uniform timelapse the operator believes is two-rate.
|
|
25929
|
+
*/
|
|
25930
|
+
var ExportDenseSchema = zod.z.object({
|
|
25931
|
+
everyMs: zod.z.number().int().positive(),
|
|
25932
|
+
ranges: zod.z.array(ExportDenseRangeSchema).min(1).max(200)
|
|
25933
|
+
});
|
|
25816
25934
|
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
25817
25935
|
var ExportTimelapseSchema = zod.z.object({
|
|
25818
25936
|
everyMs: zod.z.number().int().positive(),
|
|
25819
|
-
outputFps: zod.z.number().int().min(1).max(60).optional()
|
|
25937
|
+
outputFps: zod.z.number().int().min(1).max(60).optional(),
|
|
25938
|
+
/** Optional second, FASTER rate over the intervals that matter. */
|
|
25939
|
+
dense: ExportDenseSchema.optional()
|
|
25940
|
+
}).superRefine((v, ctx) => {
|
|
25941
|
+
if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
|
|
25942
|
+
code: zod.z.ZodIssueCode.custom,
|
|
25943
|
+
message: "dense.everyMs must be strictly smaller than the base everyMs",
|
|
25944
|
+
path: ["dense", "everyMs"]
|
|
25945
|
+
});
|
|
25820
25946
|
});
|
|
25821
25947
|
/**
|
|
25822
25948
|
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
@@ -25874,8 +26000,40 @@ var ExportDownloadSchema = zod.z.object({
|
|
|
25874
26000
|
url: zod.z.string(),
|
|
25875
26001
|
endpoints: zod.z.array(zod.z.string())
|
|
25876
26002
|
});
|
|
26003
|
+
/**
|
|
26004
|
+
* Hard ceiling on ONE {@link recordingExportCapability} byte read — 50 MiB.
|
|
26005
|
+
*
|
|
26006
|
+
* Two independent reasons land on the same number, which is why it is this one
|
|
26007
|
+
* and not a rounder guess:
|
|
26008
|
+
*
|
|
26009
|
+
* - **Nobody would accept more.** The roomiest byte cap any notifier backend
|
|
26010
|
+
* declares is telegram's 50 MiB, and the degrade engine DROPS an over-cap
|
|
26011
|
+
* attachment outright rather than degrading it to a link. Bytes above this
|
|
26012
|
+
* are read, encoded and moved to be thrown away at the last step.
|
|
26013
|
+
* - **The envelope is unary.** A base64 payload is held whole, ~1.33× its
|
|
26014
|
+
* size, in the provider AND in the caller — on a hub this repo has already
|
|
26015
|
+
* OOM'd once (D9/D18). A bounded on-demand read at human speed is the shape
|
|
26016
|
+
* those records permit; an unbounded one is the shape they forbid.
|
|
26017
|
+
*
|
|
26018
|
+
* Above it the provider REFUSES with a log line rather than truncating: half a
|
|
26019
|
+
* video is worse than a notification that says there is no attachment.
|
|
26020
|
+
*/
|
|
26021
|
+
var RECORDING_EXPORT_MAX_READ_BYTES = 50 * 1024 * 1024;
|
|
26022
|
+
/**
|
|
26023
|
+
* A finished export's bytes, inline.
|
|
26024
|
+
*
|
|
26025
|
+
* `bytes` is the DECODED length — the number the caller bounds and logs
|
|
26026
|
+
* against, so nobody has to infer it from the base64 length.
|
|
26027
|
+
*/
|
|
26028
|
+
var ExportBytesSchema = zod.z.object({
|
|
26029
|
+
base64: zod.z.string(),
|
|
26030
|
+
contentType: zod.z.string(),
|
|
26031
|
+
/** Suggested filename, extension included. */
|
|
26032
|
+
name: zod.z.string(),
|
|
26033
|
+
bytes: zod.z.number().int().nonnegative()
|
|
26034
|
+
});
|
|
25877
26035
|
var recordingExportCapability = {
|
|
25878
|
-
name: "
|
|
26036
|
+
name: "recording-export",
|
|
25879
26037
|
scope: "system",
|
|
25880
26038
|
mode: "singleton",
|
|
25881
26039
|
methods: {
|
|
@@ -25913,6 +26071,27 @@ var recordingExportCapability = {
|
|
|
25913
26071
|
getDownloadUrl: require_sleep.method(zod.z.object({ exportId: zod.z.string() }), ExportDownloadSchema, {
|
|
25914
26072
|
kind: "query",
|
|
25915
26073
|
auth: "protected"
|
|
26074
|
+
}),
|
|
26075
|
+
/**
|
|
26076
|
+
* The finished file's BYTES, base64, for a caller that must republish them
|
|
26077
|
+
* somewhere a session-less fetcher can reach.
|
|
26078
|
+
*
|
|
26079
|
+
* `getDownloadUrl` is the right answer for a human: the download route is
|
|
26080
|
+
* served `access: 'authenticated'`, which a browser satisfies and a
|
|
26081
|
+
* notifier BACKEND does not. It answers a RELATIVE path, so it is not even
|
|
26082
|
+
* a URL an outside fetcher could try. This method exists for the one case
|
|
26083
|
+
* that needs the other thing — a scheduled timelapse whose video has to
|
|
26084
|
+
* become a public attachment on the notification artifact plane.
|
|
26085
|
+
*
|
|
26086
|
+
* Deliberately narrow: `ready` only (a queued, rendering, failed, expired
|
|
26087
|
+
* or deleted export has no file, and answering "0 bytes" for one is how a
|
|
26088
|
+
* caller ships an empty attachment), still inside its lifetime, and under
|
|
26089
|
+
* {@link RECORDING_EXPORT_MAX_READ_BYTES}. Every refusal throws with the
|
|
26090
|
+
* reason — none of them is silent.
|
|
26091
|
+
*/
|
|
26092
|
+
readExportBytes: require_sleep.method(zod.z.object({ exportId: zod.z.string() }), ExportBytesSchema, {
|
|
26093
|
+
kind: "query",
|
|
26094
|
+
auth: "protected"
|
|
25916
26095
|
})
|
|
25917
26096
|
}
|
|
25918
26097
|
};
|
|
@@ -30769,7 +30948,7 @@ var CAPABILITY_NAMES = {
|
|
|
30769
30948
|
ptzAutotrack: "ptz-autotrack",
|
|
30770
30949
|
reboot: "reboot",
|
|
30771
30950
|
recording: "recording",
|
|
30772
|
-
recordingExport: "
|
|
30951
|
+
recordingExport: "recording-export",
|
|
30773
30952
|
sceneMonitor: "scene-monitor",
|
|
30774
30953
|
scriptRunner: "script-runner",
|
|
30775
30954
|
serverManagement: "server-management",
|
|
@@ -31256,7 +31435,7 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
31256
31435
|
},
|
|
31257
31436
|
{
|
|
31258
31437
|
key: "recordingExport",
|
|
31259
|
-
name: "
|
|
31438
|
+
name: "recording-export"
|
|
31260
31439
|
},
|
|
31261
31440
|
{
|
|
31262
31441
|
key: "sceneMonitor",
|
|
@@ -35771,37 +35950,43 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
35771
35950
|
access: "create"
|
|
35772
35951
|
},
|
|
35773
35952
|
"recordingExport.cancelExport": {
|
|
35774
|
-
capName: "
|
|
35953
|
+
capName: "recording-export",
|
|
35775
35954
|
capScope: "system",
|
|
35776
35955
|
addonId: null,
|
|
35777
35956
|
access: "create"
|
|
35778
35957
|
},
|
|
35779
35958
|
"recordingExport.createExport": {
|
|
35780
|
-
capName: "
|
|
35959
|
+
capName: "recording-export",
|
|
35781
35960
|
capScope: "system",
|
|
35782
35961
|
addonId: null,
|
|
35783
35962
|
access: "create"
|
|
35784
35963
|
},
|
|
35785
35964
|
"recordingExport.deleteExport": {
|
|
35786
|
-
capName: "
|
|
35965
|
+
capName: "recording-export",
|
|
35787
35966
|
capScope: "system",
|
|
35788
35967
|
addonId: null,
|
|
35789
35968
|
access: "delete"
|
|
35790
35969
|
},
|
|
35791
35970
|
"recordingExport.getDownloadUrl": {
|
|
35792
|
-
capName: "
|
|
35971
|
+
capName: "recording-export",
|
|
35793
35972
|
capScope: "system",
|
|
35794
35973
|
addonId: null,
|
|
35795
35974
|
access: "view"
|
|
35796
35975
|
},
|
|
35797
35976
|
"recordingExport.getExport": {
|
|
35798
|
-
capName: "
|
|
35977
|
+
capName: "recording-export",
|
|
35799
35978
|
capScope: "system",
|
|
35800
35979
|
addonId: null,
|
|
35801
35980
|
access: "view"
|
|
35802
35981
|
},
|
|
35803
35982
|
"recordingExport.listExports": {
|
|
35804
|
-
capName: "
|
|
35983
|
+
capName: "recording-export",
|
|
35984
|
+
capScope: "system",
|
|
35985
|
+
addonId: null,
|
|
35986
|
+
access: "view"
|
|
35987
|
+
},
|
|
35988
|
+
"recordingExport.readExportBytes": {
|
|
35989
|
+
capName: "recording-export",
|
|
35805
35990
|
capScope: "system",
|
|
35806
35991
|
addonId: null,
|
|
35807
35992
|
access: "view"
|
|
@@ -37225,7 +37410,7 @@ var KNOWN_CAP_NAMES = [
|
|
|
37225
37410
|
"ptz-autotrack",
|
|
37226
37411
|
"reboot",
|
|
37227
37412
|
"recording",
|
|
37228
|
-
"
|
|
37413
|
+
"recording-export",
|
|
37229
37414
|
"scene-monitor",
|
|
37230
37415
|
"script-runner",
|
|
37231
37416
|
"server-management",
|
|
@@ -37369,7 +37554,7 @@ var SYSTEM_CAP_NAMES = [
|
|
|
37369
37554
|
"plate-gallery",
|
|
37370
37555
|
"platform-probe",
|
|
37371
37556
|
"recording",
|
|
37372
|
-
"
|
|
37557
|
+
"recording-export",
|
|
37373
37558
|
"server-management",
|
|
37374
37559
|
"settings-store",
|
|
37375
37560
|
"smtp-provider",
|
|
@@ -37937,7 +38122,8 @@ function createSystemProxy(api) {
|
|
|
37937
38122
|
getExport: (input) => dispatch("recordingExport", "getExport", "query", input),
|
|
37938
38123
|
cancelExport: (input) => dispatch("recordingExport", "cancelExport", "mutation", input),
|
|
37939
38124
|
deleteExport: (input) => dispatch("recordingExport", "deleteExport", "mutation", input),
|
|
37940
|
-
getDownloadUrl: (input) => dispatch("recordingExport", "getDownloadUrl", "query", input)
|
|
38125
|
+
getDownloadUrl: (input) => dispatch("recordingExport", "getDownloadUrl", "query", input),
|
|
38126
|
+
readExportBytes: (input) => dispatch("recordingExport", "readExportBytes", "query", input)
|
|
37941
38127
|
},
|
|
37942
38128
|
serverManagement: {
|
|
37943
38129
|
getServerPackageStatus: (input) => dispatch("serverManagement", "getServerPackageStatus", "query", input),
|
|
@@ -38554,15 +38740,50 @@ var TimelapseRuleSchema = TimelapseRuleInputSchema.extend({
|
|
|
38554
38740
|
*/
|
|
38555
38741
|
ownerUserId: zod.z.string().optional(),
|
|
38556
38742
|
/**
|
|
38557
|
-
* Epoch-ms of the
|
|
38558
|
-
*
|
|
38743
|
+
* Epoch-ms of the NEWEST successful generation across every camera of this
|
|
38744
|
+
* rule. What a UI shows, and the compatibility floor for
|
|
38745
|
+
* {@link readTimelapseGeneratedAt}. Absent = never generated.
|
|
38559
38746
|
*/
|
|
38560
38747
|
lastGeneratedAt: zod.z.number().optional(),
|
|
38748
|
+
/**
|
|
38749
|
+
* PER-CAMERA generation state, keyed by `String(deviceId)` — the
|
|
38750
|
+
* re-generation guard's real durable state.
|
|
38751
|
+
*
|
|
38752
|
+
* One rule covers several cameras and each renders its own video, so a rule
|
|
38753
|
+
* -wide stamp is wrong in the direction that DESTROYS work: camera A
|
|
38754
|
+
* succeeding at 06:05 tells camera B, whose render failed, that it is
|
|
38755
|
+
* already done — and B's night is gone for good, because the window will not
|
|
38756
|
+
* come back.
|
|
38757
|
+
*
|
|
38758
|
+
* ADDITIVE, so the migration is free: a row written before this field simply
|
|
38759
|
+
* has no map, and {@link readTimelapseGeneratedAt} falls back to
|
|
38760
|
+
* {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
|
|
38761
|
+
* "never generated" would re-render and re-notify every camera of every rule
|
|
38762
|
+
* once, on the deploy that shipped the map.
|
|
38763
|
+
*/
|
|
38764
|
+
generatedByDevice: zod.z.record(zod.z.string(), zod.z.number()).optional(),
|
|
38561
38765
|
/** userId of the caller who created the rule (server-stamped). */
|
|
38562
38766
|
createdBy: zod.z.string(),
|
|
38563
38767
|
createdAt: zod.z.number(),
|
|
38564
38768
|
updatedAt: zod.z.number()
|
|
38565
38769
|
});
|
|
38770
|
+
/**
|
|
38771
|
+
* The last successful generation for ONE camera of a rule, epoch-ms.
|
|
38772
|
+
*
|
|
38773
|
+
* The per-device map wins; a rule with no map falls back to the rule-wide
|
|
38774
|
+
* `lastGeneratedAt` (the compatible-migration path — see
|
|
38775
|
+
* {@link TimelapseRuleSchema}); a rule with neither returns 0, which every
|
|
38776
|
+
* guard reads as "never generated".
|
|
38777
|
+
*
|
|
38778
|
+
* Read through this helper and never off the field directly: the fallback is
|
|
38779
|
+
* the whole migration, and a call site that forgot it would re-render an
|
|
38780
|
+
* entire rule set once.
|
|
38781
|
+
*/
|
|
38782
|
+
function readTimelapseGeneratedAt(rule, deviceId) {
|
|
38783
|
+
const map = rule.generatedByDevice;
|
|
38784
|
+
if (map !== void 0) return map[String(deviceId)] ?? 0;
|
|
38785
|
+
return rule.lastGeneratedAt ?? 0;
|
|
38786
|
+
}
|
|
38566
38787
|
//#endregion
|
|
38567
38788
|
//#region src/pipeline/detail-crop.ts
|
|
38568
38789
|
/**
|
|
@@ -40566,6 +40787,7 @@ exports.EVENTFUL_CAP_NAMES = EVENTFUL_CAP_NAMES;
|
|
|
40566
40787
|
exports.EVENT_KIND_BY_CAP = EVENT_KIND_BY_CAP;
|
|
40567
40788
|
exports.EVENT_PAD_MS = EVENT_PAD_MS;
|
|
40568
40789
|
exports.EVENT_TAXONOMY = EVENT_TAXONOMY;
|
|
40790
|
+
exports.EXPORT_DENSE_MAX_RANGES = EXPORT_DENSE_MAX_RANGES;
|
|
40569
40791
|
exports.EXPRESSION_BUILTINS = EXPRESSION_BUILTINS;
|
|
40570
40792
|
exports.EXPRESSION_BUILTIN_NAMES = EXPRESSION_BUILTIN_NAMES;
|
|
40571
40793
|
exports.EXPRESSION_COMPILE_CACHE_CAPACITY = EXPRESSION_COMPILE_CACHE_CAPACITY;
|
|
@@ -40597,6 +40819,9 @@ exports.EventMediaCoverageSchema = EventMediaCoverageSchema;
|
|
|
40597
40819
|
exports.EventMediaKindSchema = EventMediaKindSchema;
|
|
40598
40820
|
exports.EventMediaProductionSchema = EventMediaProductionSchema;
|
|
40599
40821
|
exports.EventSourceType = require_enums.EventSourceType$1;
|
|
40822
|
+
exports.ExportBytesSchema = ExportBytesSchema;
|
|
40823
|
+
exports.ExportDenseRangeSchema = ExportDenseRangeSchema;
|
|
40824
|
+
exports.ExportDenseSchema = ExportDenseSchema;
|
|
40600
40825
|
exports.ExportDownloadSchema = ExportDownloadSchema;
|
|
40601
40826
|
exports.ExportOptionsSchema = ExportOptionsSchema;
|
|
40602
40827
|
exports.ExportRecordSchema = ExportRecordSchema;
|
|
@@ -40895,6 +41120,7 @@ exports.REACHABILITY_FAILURES_TO_OFFLINE = REACHABILITY_FAILURES_TO_OFFLINE;
|
|
|
40895
41120
|
exports.REACHABILITY_POLL_INTERVAL_MS = REACHABILITY_POLL_INTERVAL_MS;
|
|
40896
41121
|
exports.REACHABILITY_PROBE_TIMEOUT_MS = REACHABILITY_PROBE_TIMEOUT_MS;
|
|
40897
41122
|
exports.RECOGNITION_TYPES = RECOGNITION_TYPES;
|
|
41123
|
+
exports.RECORDING_EXPORT_MAX_READ_BYTES = RECORDING_EXPORT_MAX_READ_BYTES;
|
|
40898
41124
|
exports.RESERVED_BINDING_NAMES = RESERVED_BINDING_NAMES;
|
|
40899
41125
|
exports.RUNTIME_DEFAULTS = RUNTIME_DEFAULTS;
|
|
40900
41126
|
exports.RUNTIME_TO_FORMAT = RUNTIME_TO_FORMAT;
|
|
@@ -41201,6 +41427,7 @@ exports.colorCapability = colorCapability;
|
|
|
41201
41427
|
exports.colorForKind = colorForKind;
|
|
41202
41428
|
exports.compileExpression = compileExpression;
|
|
41203
41429
|
exports.compileExpressionSafe = compileExpressionSafe;
|
|
41430
|
+
exports.composeSwitchedOff = composeSwitchedOff;
|
|
41204
41431
|
exports.conditionDepth = conditionDepth;
|
|
41205
41432
|
exports.connectionTestCapability = connectionTestCapability;
|
|
41206
41433
|
exports.connectivityCapability = connectivityCapability;
|
|
@@ -41397,6 +41624,7 @@ exports.readDetailCropConvention = readDetailCropConvention;
|
|
|
41397
41624
|
exports.readDeviceStateFrom = readDeviceStateFrom;
|
|
41398
41625
|
exports.readNativeLeaseOverride = readNativeLeaseOverride;
|
|
41399
41626
|
exports.readNodePin = require_sleep.readNodePin;
|
|
41627
|
+
exports.readTimelapseGeneratedAt = readTimelapseGeneratedAt;
|
|
41400
41628
|
exports.readinessKey = require_sleep.readinessKey;
|
|
41401
41629
|
exports.rebootCapability = rebootCapability;
|
|
41402
41630
|
exports.recordingCapability = recordingCapability;
|