@camstack/types 1.1.49 → 1.1.50
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/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-analytics.cap.d.ts +103 -0
- package/dist/capabilities/recording.cap.d.ts +55 -1
- package/dist/capabilities/zone-rules.cap.d.ts +4 -3
- package/dist/generated/addon-api.d.ts +192 -0
- package/dist/generated/device-proxy.d.ts +1 -1
- 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 -0
- package/dist/index.js +207 -7
- package/dist/index.mjs +201 -8
- package/dist/interfaces/ops-log.d.ts +75 -0
- package/dist/{sleep-BfvNtyu8.js → sleep-CF-UWPp0.js} +5 -0
- package/dist/{sleep-DOq2moJx.mjs → sleep-D8ZkNoYz.mjs} +5 -0
- package/dist/types/pipeline-step.d.ts +16 -2
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-CF-UWPp0.js");
|
|
3
3
|
const require_event_category = require("./event-category-CGj9fI4L.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
exports.BaseAddon = require_sleep.BaseAddon;
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as parseJsonUnknown, D as asString, I as scopeKey, M as ReadinessRegistry, N as ReadinessTimeoutError, S as DeviceType, T as asJsonObject, a as viewerUiCapability, bt as DisposerChain, ct as BaseAddon, ft as emitReadiness, i as deviceOpsCapability, j as DATAPLANE_SECRET_HEADER, lt as normalizeAddonInitResult, m as expandCapMethods, o as adminUiCapability, s as createDeviceProxy, t as sleep } from "./sleep-
|
|
1
|
+
import { A as parseJsonUnknown, D as asString, I as scopeKey, M as ReadinessRegistry, N as ReadinessTimeoutError, S as DeviceType, T as asJsonObject, a as viewerUiCapability, bt as DisposerChain, ct as BaseAddon, ft as emitReadiness, i as deviceOpsCapability, j as DATAPLANE_SECRET_HEADER, lt as normalizeAddonInitResult, m as expandCapMethods, o as adminUiCapability, s as createDeviceProxy, t as sleep } from "./sleep-D8ZkNoYz.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-D4HJq7Mw.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
export { BaseAddon, DATAPLANE_SECRET_HEADER, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, ReadinessTimeoutError, adminUiCapability, asJsonObject, asString, createDeviceProxy, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, normalizeAddonInitResult, parseJsonUnknown, scopeKey, sleep, viewerUiCapability };
|
|
@@ -77,7 +77,7 @@ export { type ILlmProvider, type LlmDefault, type LlmDefaultSelector, LlmDefault
|
|
|
77
77
|
export { type ILlmRuntimeProvider, llmRuntimeCapability, type LlmNodeModel, LlmNodeModelSchema, type LlmRuntimeCompleteInput, LlmRuntimeCompleteInputSchema, type LlmRuntimeDiskUsage, LlmRuntimeDiskUsageSchema, type LlmRuntimeStatus, LlmRuntimeStatusSchema, type ManagedModelRef, ManagedModelRefSchema, type ManagedRuntimeConfig, ManagedRuntimeConfigSchema, } from './llm-runtime.cap.js';
|
|
78
78
|
export { type LlmErrorCode, LlmErrorCodeSchema, type LlmGenerateBaseInput, LlmGenerateBaseInputSchema, type LlmGenerateErr, LlmGenerateErrSchema, type LlmGenerateOk, LlmGenerateOkSchema, type LlmGenerateResult, LlmGenerateResultSchema, type LlmImage, LlmImageSchema, type LlmUsage, LlmUsageSchema, } from './llm-shared.js';
|
|
79
79
|
export { type IOauthIntegrationProvider, type OauthIntegrationDescriptor, OauthIntegrationDescriptorSchema, oauthIntegrationCapability, } from './oauth-integration.cap.js';
|
|
80
|
-
export { type AudioEvent, AudioEventSchema, type DetectionSource, DetectionSourceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type MediaFile, type MediaFileKind, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, TrackedDetectionSchema, type TrackEnvelope, TrackEnvelopeSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, } from './pipeline-analytics.cap.js';
|
|
80
|
+
export { type AudioEvent, AudioEventSchema, type DetectionSource, DetectionSourceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type MediaFile, type MediaFileKind, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, TrackedDetectionSchema, type TrackEnvelope, TrackEnvelopeSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, } from './pipeline-analytics.cap.js';
|
|
81
81
|
export { EVENT_KIND_BY_CAP, type SensorEventKindDescriptor } from './sensor-event-kinds.js';
|
|
82
82
|
export type { PipelineStepInputOutput, PipelineValidationIssue, PipelineValidationResult, } from './pipeline-executor.cap.js';
|
|
83
83
|
export { ModelSubstitutionSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, pipelineExecutorCapability, } from './pipeline-executor.cap.js';
|
|
@@ -500,6 +500,31 @@ declare const TrackCascadeCountsSchema: z.ZodObject<{
|
|
|
500
500
|
embeddings: z.ZodNumber;
|
|
501
501
|
}, z.core.$strip>;
|
|
502
502
|
export type TrackCascadeCounts = z.infer<typeof TrackCascadeCountsSchema>;
|
|
503
|
+
/** Event-store footprint for one camera. */
|
|
504
|
+
declare const EventStoreDeviceFootprintSchema: z.ZodObject<{
|
|
505
|
+
deviceId: z.ZodNumber;
|
|
506
|
+
rows: z.ZodNumber;
|
|
507
|
+
bytes: z.ZodNumber;
|
|
508
|
+
}, z.core.$strip>;
|
|
509
|
+
export type EventStoreDeviceFootprint = z.infer<typeof EventStoreDeviceFootprintSchema>;
|
|
510
|
+
/** Aggregate event-store footprint: global totals + per-camera breakdown. */
|
|
511
|
+
declare const EventStoreFootprintSchema: z.ZodObject<{
|
|
512
|
+
totalRows: z.ZodNumber;
|
|
513
|
+
totalBytes: z.ZodNumber;
|
|
514
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
515
|
+
deviceId: z.ZodNumber;
|
|
516
|
+
rows: z.ZodNumber;
|
|
517
|
+
bytes: z.ZodNumber;
|
|
518
|
+
}, z.core.$strip>>>;
|
|
519
|
+
}, z.core.$strip>;
|
|
520
|
+
export type EventStoreFootprint = z.infer<typeof EventStoreFootprintSchema>;
|
|
521
|
+
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
522
|
+
declare const EventPruneCountsSchema: z.ZodObject<{
|
|
523
|
+
motion: z.ZodNumber;
|
|
524
|
+
object: z.ZodNumber;
|
|
525
|
+
audio: z.ZodNumber;
|
|
526
|
+
}, z.core.$strip>;
|
|
527
|
+
export type EventPruneCounts = z.infer<typeof EventPruneCountsSchema>;
|
|
503
528
|
export declare const pipelineAnalyticsCapability: {
|
|
504
529
|
readonly name: "pipeline-analytics";
|
|
505
530
|
readonly scope: "device";
|
|
@@ -1077,6 +1102,84 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
1077
1102
|
deleted: z.ZodNumber;
|
|
1078
1103
|
failed: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
1079
1104
|
}, z.core.$strip>, "mutation">;
|
|
1105
|
+
/**
|
|
1106
|
+
* Durable event-store footprint for the management UI: event rows
|
|
1107
|
+
* (motion + object + audio) counted per camera + total, plus the
|
|
1108
|
+
* event-owned media bytes on disk per camera + total. Stat/count-based,
|
|
1109
|
+
* computed on demand.
|
|
1110
|
+
*/
|
|
1111
|
+
readonly getEventStoreFootprint: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
1112
|
+
totalRows: z.ZodNumber;
|
|
1113
|
+
totalBytes: z.ZodNumber;
|
|
1114
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1115
|
+
deviceId: z.ZodNumber;
|
|
1116
|
+
rows: z.ZodNumber;
|
|
1117
|
+
bytes: z.ZodNumber;
|
|
1118
|
+
}, z.core.$strip>>>;
|
|
1119
|
+
}, z.core.$strip>, "query">;
|
|
1120
|
+
/**
|
|
1121
|
+
* Cluster-wide prune of events older than `olderThanMs` (exclusive) across
|
|
1122
|
+
* every camera, deleting each event's media in lockstep. Logged to the
|
|
1123
|
+
* events ops-log with `reason` (default `'retention'`). Returns the summed
|
|
1124
|
+
* per-kind deleted counts.
|
|
1125
|
+
*/
|
|
1126
|
+
readonly pruneEvents: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1127
|
+
olderThanMs: z.ZodNumber;
|
|
1128
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
1129
|
+
manual: "manual";
|
|
1130
|
+
retention: "retention";
|
|
1131
|
+
quota: "quota";
|
|
1132
|
+
operator: "operator";
|
|
1133
|
+
}>>;
|
|
1134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1135
|
+
motion: z.ZodNumber;
|
|
1136
|
+
object: z.ZodNumber;
|
|
1137
|
+
audio: z.ZodNumber;
|
|
1138
|
+
}, z.core.$strip>, "mutation">;
|
|
1139
|
+
/**
|
|
1140
|
+
* Manually delete EVERY event (motion + object + audio) for one camera and
|
|
1141
|
+
* its event-owned media in lockstep. Logged to the events ops-log as
|
|
1142
|
+
* `op:'manual-delete', reason:'manual'`. Destructive — the admin UI guards
|
|
1143
|
+
* it behind a confirm.
|
|
1144
|
+
*/
|
|
1145
|
+
readonly deleteDeviceEvents: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1146
|
+
deviceId: z.ZodNumber;
|
|
1147
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1148
|
+
motion: z.ZodNumber;
|
|
1149
|
+
object: z.ZodNumber;
|
|
1150
|
+
audio: z.ZodNumber;
|
|
1151
|
+
}, z.core.$strip>, "mutation">;
|
|
1152
|
+
/** The events ops-log rows (newest-first), optionally scoped to one camera.
|
|
1153
|
+
* Backed by a declared pipeline-analytics SQLite collection. */
|
|
1154
|
+
readonly listOpsLog: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1155
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
1156
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1157
|
+
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1158
|
+
id: z.ZodString;
|
|
1159
|
+
at: z.ZodNumber;
|
|
1160
|
+
domain: z.ZodEnum<{
|
|
1161
|
+
events: "events";
|
|
1162
|
+
recording: "recording";
|
|
1163
|
+
}>;
|
|
1164
|
+
op: z.ZodEnum<{
|
|
1165
|
+
prune: "prune";
|
|
1166
|
+
"manual-delete": "manual-delete";
|
|
1167
|
+
rescan: "rescan";
|
|
1168
|
+
"retention-run": "retention-run";
|
|
1169
|
+
}>;
|
|
1170
|
+
reason: z.ZodEnum<{
|
|
1171
|
+
manual: "manual";
|
|
1172
|
+
retention: "retention";
|
|
1173
|
+
quota: "quota";
|
|
1174
|
+
operator: "operator";
|
|
1175
|
+
}>;
|
|
1176
|
+
deviceId: z.ZodNullable<z.ZodNumber>;
|
|
1177
|
+
nodeId: z.ZodString;
|
|
1178
|
+
itemsAffected: z.ZodNumber;
|
|
1179
|
+
bytesReclaimed: z.ZodNumber;
|
|
1180
|
+
detail: z.ZodNullable<z.ZodString>;
|
|
1181
|
+
actor: z.ZodString;
|
|
1182
|
+
}, z.core.$strip>>>, "query">;
|
|
1080
1183
|
readonly getEventMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1081
1184
|
eventId: z.ZodString;
|
|
1082
1185
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -464,14 +464,68 @@ export declare const recordingCapability: {
|
|
|
464
464
|
storageBytes: z.ZodNumber;
|
|
465
465
|
}, z.core.$strip>, "mutation">;
|
|
466
466
|
/** Apply this device's retention policy to footage now; returns the oldest
|
|
467
|
-
* surviving footage start (the retention floor) or null if no footage.
|
|
467
|
+
* surviving footage start (the retention floor) or null if no footage. The
|
|
468
|
+
* prune is logged to the recordings ops-log with `reason` (default
|
|
469
|
+
* `'retention'` — the policy-driven prune; `'quota'` when disk-pressure
|
|
470
|
+
* triggered). */
|
|
468
471
|
readonly pruneFootage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
469
472
|
deviceId: z.ZodNumber;
|
|
473
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
474
|
+
manual: "manual";
|
|
475
|
+
retention: "retention";
|
|
476
|
+
quota: "quota";
|
|
477
|
+
operator: "operator";
|
|
478
|
+
}>>;
|
|
470
479
|
}, z.core.$strip>, z.ZodObject<{
|
|
471
480
|
floorMs: z.ZodNullable<z.ZodNumber>;
|
|
472
481
|
deletedBuckets: z.ZodNumber;
|
|
473
482
|
reclaimedBytes: z.ZodNumber;
|
|
474
483
|
}, z.core.$strip>, "mutation">;
|
|
484
|
+
/**
|
|
485
|
+
* Manually delete a camera's footage — the whole footprint, or a
|
|
486
|
+
* `[fromMs, toMs)` window when either bound is given. Logged to the
|
|
487
|
+
* recordings ops-log as `op:'manual-delete', reason:'manual'`. Destructive:
|
|
488
|
+
* the admin UI guards it behind a confirm.
|
|
489
|
+
*/
|
|
490
|
+
readonly deleteFootprint: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
491
|
+
deviceId: z.ZodNumber;
|
|
492
|
+
fromMs: z.ZodOptional<z.ZodNumber>;
|
|
493
|
+
toMs: z.ZodOptional<z.ZodNumber>;
|
|
494
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
495
|
+
deletedBuckets: z.ZodNumber;
|
|
496
|
+
reclaimedBytes: z.ZodNumber;
|
|
497
|
+
}, z.core.$strip>, "mutation">;
|
|
498
|
+
/** The recordings ops-log rows (newest-first), optionally scoped to one
|
|
499
|
+
* camera. Backed by the recorder's bounded DurableState ring. */
|
|
500
|
+
readonly listOpsLog: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
501
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
502
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
503
|
+
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
504
|
+
id: z.ZodString;
|
|
505
|
+
at: z.ZodNumber;
|
|
506
|
+
domain: z.ZodEnum<{
|
|
507
|
+
events: "events";
|
|
508
|
+
recording: "recording";
|
|
509
|
+
}>;
|
|
510
|
+
op: z.ZodEnum<{
|
|
511
|
+
prune: "prune";
|
|
512
|
+
"manual-delete": "manual-delete";
|
|
513
|
+
rescan: "rescan";
|
|
514
|
+
"retention-run": "retention-run";
|
|
515
|
+
}>;
|
|
516
|
+
reason: z.ZodEnum<{
|
|
517
|
+
manual: "manual";
|
|
518
|
+
retention: "retention";
|
|
519
|
+
quota: "quota";
|
|
520
|
+
operator: "operator";
|
|
521
|
+
}>;
|
|
522
|
+
deviceId: z.ZodNullable<z.ZodNumber>;
|
|
523
|
+
nodeId: z.ZodString;
|
|
524
|
+
itemsAffected: z.ZodNumber;
|
|
525
|
+
bytesReclaimed: z.ZodNumber;
|
|
526
|
+
detail: z.ZodNullable<z.ZodString>;
|
|
527
|
+
actor: z.ZodString;
|
|
528
|
+
}, z.core.$strip>>>, "query">;
|
|
475
529
|
};
|
|
476
530
|
};
|
|
477
531
|
export type IRecordingProvider = InferProvider<typeof recordingCapability>;
|
|
@@ -100,9 +100,10 @@ export declare const zoneRulesCapability: {
|
|
|
100
100
|
* `package` backs the package-drop detector — a package zone is a
|
|
101
101
|
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
102
102
|
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
103
|
-
* The orchestrator provider
|
|
104
|
-
*
|
|
105
|
-
* consumers read
|
|
103
|
+
* The orchestrator provider writes this stage as a first-class slice
|
|
104
|
+
* (Phase 4): every mutation mirrors the full `{motion, detection,
|
|
105
|
+
* package}` shape, so consumers read the current package rules directly
|
|
106
|
+
* off `device.state.zoneRules.value.package`.
|
|
106
107
|
*/
|
|
107
108
|
readonly runtimeState: z.ZodObject<{
|
|
108
109
|
motion: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
@@ -10136,6 +10136,67 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
10136
10136
|
};
|
|
10137
10137
|
meta: object;
|
|
10138
10138
|
}>;
|
|
10139
|
+
getEventStoreFootprint: import("@trpc/server").TRPCQueryProcedure<{
|
|
10140
|
+
input: {
|
|
10141
|
+
[x: string]: unknown;
|
|
10142
|
+
};
|
|
10143
|
+
output: {
|
|
10144
|
+
totalRows: number;
|
|
10145
|
+
totalBytes: number;
|
|
10146
|
+
devices: readonly {
|
|
10147
|
+
deviceId: number;
|
|
10148
|
+
rows: number;
|
|
10149
|
+
bytes: number;
|
|
10150
|
+
}[];
|
|
10151
|
+
};
|
|
10152
|
+
meta: object;
|
|
10153
|
+
}>;
|
|
10154
|
+
pruneEvents: import("@trpc/server").TRPCMutationProcedure<{
|
|
10155
|
+
input: {
|
|
10156
|
+
[x: string]: unknown;
|
|
10157
|
+
olderThanMs: number;
|
|
10158
|
+
reason?: "manual" | "retention" | "quota" | "operator" | undefined;
|
|
10159
|
+
};
|
|
10160
|
+
output: {
|
|
10161
|
+
motion: number;
|
|
10162
|
+
object: number;
|
|
10163
|
+
audio: number;
|
|
10164
|
+
};
|
|
10165
|
+
meta: object;
|
|
10166
|
+
}>;
|
|
10167
|
+
deleteDeviceEvents: import("@trpc/server").TRPCMutationProcedure<{
|
|
10168
|
+
input: {
|
|
10169
|
+
[x: string]: unknown;
|
|
10170
|
+
deviceId: number;
|
|
10171
|
+
};
|
|
10172
|
+
output: {
|
|
10173
|
+
motion: number;
|
|
10174
|
+
object: number;
|
|
10175
|
+
audio: number;
|
|
10176
|
+
};
|
|
10177
|
+
meta: object;
|
|
10178
|
+
}>;
|
|
10179
|
+
listOpsLog: import("@trpc/server").TRPCQueryProcedure<{
|
|
10180
|
+
input: {
|
|
10181
|
+
[x: string]: unknown;
|
|
10182
|
+
deviceId?: number | undefined;
|
|
10183
|
+
limit?: number | undefined;
|
|
10184
|
+
};
|
|
10185
|
+
output: readonly {
|
|
10186
|
+
id: string;
|
|
10187
|
+
at: number;
|
|
10188
|
+
domain: "recording" | "events";
|
|
10189
|
+
op: "prune" | "manual-delete" | "rescan" | "retention-run";
|
|
10190
|
+
reason: "manual" | "retention" | "quota" | "operator";
|
|
10191
|
+
deviceId: number | null;
|
|
10192
|
+
nodeId: string;
|
|
10193
|
+
itemsAffected: number;
|
|
10194
|
+
bytesReclaimed: number;
|
|
10195
|
+
detail: string | null;
|
|
10196
|
+
actor: string;
|
|
10197
|
+
}[];
|
|
10198
|
+
meta: object;
|
|
10199
|
+
}>;
|
|
10139
10200
|
getEventMedia: import("@trpc/server").TRPCQueryProcedure<{
|
|
10140
10201
|
input: {
|
|
10141
10202
|
[x: string]: unknown;
|
|
@@ -12895,6 +12956,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
12895
12956
|
input: {
|
|
12896
12957
|
[x: string]: unknown;
|
|
12897
12958
|
deviceId: number;
|
|
12959
|
+
reason?: "manual" | "retention" | "quota" | "operator" | undefined;
|
|
12898
12960
|
};
|
|
12899
12961
|
output: {
|
|
12900
12962
|
floorMs: number | null;
|
|
@@ -12903,6 +12965,40 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
12903
12965
|
};
|
|
12904
12966
|
meta: object;
|
|
12905
12967
|
}>;
|
|
12968
|
+
deleteFootprint: import("@trpc/server").TRPCMutationProcedure<{
|
|
12969
|
+
input: {
|
|
12970
|
+
[x: string]: unknown;
|
|
12971
|
+
deviceId: number;
|
|
12972
|
+
fromMs?: number | undefined;
|
|
12973
|
+
toMs?: number | undefined;
|
|
12974
|
+
};
|
|
12975
|
+
output: {
|
|
12976
|
+
deletedBuckets: number;
|
|
12977
|
+
reclaimedBytes: number;
|
|
12978
|
+
};
|
|
12979
|
+
meta: object;
|
|
12980
|
+
}>;
|
|
12981
|
+
listOpsLog: import("@trpc/server").TRPCQueryProcedure<{
|
|
12982
|
+
input: {
|
|
12983
|
+
[x: string]: unknown;
|
|
12984
|
+
deviceId?: number | undefined;
|
|
12985
|
+
limit?: number | undefined;
|
|
12986
|
+
};
|
|
12987
|
+
output: readonly {
|
|
12988
|
+
id: string;
|
|
12989
|
+
at: number;
|
|
12990
|
+
domain: "recording" | "events";
|
|
12991
|
+
op: "prune" | "manual-delete" | "rescan" | "retention-run";
|
|
12992
|
+
reason: "manual" | "retention" | "quota" | "operator";
|
|
12993
|
+
deviceId: number | null;
|
|
12994
|
+
nodeId: string;
|
|
12995
|
+
itemsAffected: number;
|
|
12996
|
+
bytesReclaimed: number;
|
|
12997
|
+
detail: string | null;
|
|
12998
|
+
actor: string;
|
|
12999
|
+
}[];
|
|
13000
|
+
meta: object;
|
|
13001
|
+
}>;
|
|
12906
13002
|
}>>;
|
|
12907
13003
|
recordingExport: import("@trpc/server").TRPCBuiltRouter<{
|
|
12908
13004
|
ctx: TrpcContext;
|
|
@@ -26778,6 +26874,67 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
26778
26874
|
};
|
|
26779
26875
|
meta: object;
|
|
26780
26876
|
}>;
|
|
26877
|
+
getEventStoreFootprint: import("@trpc/server").TRPCQueryProcedure<{
|
|
26878
|
+
input: {
|
|
26879
|
+
[x: string]: unknown;
|
|
26880
|
+
};
|
|
26881
|
+
output: {
|
|
26882
|
+
totalRows: number;
|
|
26883
|
+
totalBytes: number;
|
|
26884
|
+
devices: readonly {
|
|
26885
|
+
deviceId: number;
|
|
26886
|
+
rows: number;
|
|
26887
|
+
bytes: number;
|
|
26888
|
+
}[];
|
|
26889
|
+
};
|
|
26890
|
+
meta: object;
|
|
26891
|
+
}>;
|
|
26892
|
+
pruneEvents: import("@trpc/server").TRPCMutationProcedure<{
|
|
26893
|
+
input: {
|
|
26894
|
+
[x: string]: unknown;
|
|
26895
|
+
olderThanMs: number;
|
|
26896
|
+
reason?: "manual" | "retention" | "quota" | "operator" | undefined;
|
|
26897
|
+
};
|
|
26898
|
+
output: {
|
|
26899
|
+
motion: number;
|
|
26900
|
+
object: number;
|
|
26901
|
+
audio: number;
|
|
26902
|
+
};
|
|
26903
|
+
meta: object;
|
|
26904
|
+
}>;
|
|
26905
|
+
deleteDeviceEvents: import("@trpc/server").TRPCMutationProcedure<{
|
|
26906
|
+
input: {
|
|
26907
|
+
[x: string]: unknown;
|
|
26908
|
+
deviceId: number;
|
|
26909
|
+
};
|
|
26910
|
+
output: {
|
|
26911
|
+
motion: number;
|
|
26912
|
+
object: number;
|
|
26913
|
+
audio: number;
|
|
26914
|
+
};
|
|
26915
|
+
meta: object;
|
|
26916
|
+
}>;
|
|
26917
|
+
listOpsLog: import("@trpc/server").TRPCQueryProcedure<{
|
|
26918
|
+
input: {
|
|
26919
|
+
[x: string]: unknown;
|
|
26920
|
+
deviceId?: number | undefined;
|
|
26921
|
+
limit?: number | undefined;
|
|
26922
|
+
};
|
|
26923
|
+
output: readonly {
|
|
26924
|
+
id: string;
|
|
26925
|
+
at: number;
|
|
26926
|
+
domain: "recording" | "events";
|
|
26927
|
+
op: "prune" | "manual-delete" | "rescan" | "retention-run";
|
|
26928
|
+
reason: "manual" | "retention" | "quota" | "operator";
|
|
26929
|
+
deviceId: number | null;
|
|
26930
|
+
nodeId: string;
|
|
26931
|
+
itemsAffected: number;
|
|
26932
|
+
bytesReclaimed: number;
|
|
26933
|
+
detail: string | null;
|
|
26934
|
+
actor: string;
|
|
26935
|
+
}[];
|
|
26936
|
+
meta: object;
|
|
26937
|
+
}>;
|
|
26781
26938
|
getEventMedia: import("@trpc/server").TRPCQueryProcedure<{
|
|
26782
26939
|
input: {
|
|
26783
26940
|
[x: string]: unknown;
|
|
@@ -29537,6 +29694,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
29537
29694
|
input: {
|
|
29538
29695
|
[x: string]: unknown;
|
|
29539
29696
|
deviceId: number;
|
|
29697
|
+
reason?: "manual" | "retention" | "quota" | "operator" | undefined;
|
|
29540
29698
|
};
|
|
29541
29699
|
output: {
|
|
29542
29700
|
floorMs: number | null;
|
|
@@ -29545,6 +29703,40 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
29545
29703
|
};
|
|
29546
29704
|
meta: object;
|
|
29547
29705
|
}>;
|
|
29706
|
+
deleteFootprint: import("@trpc/server").TRPCMutationProcedure<{
|
|
29707
|
+
input: {
|
|
29708
|
+
[x: string]: unknown;
|
|
29709
|
+
deviceId: number;
|
|
29710
|
+
fromMs?: number | undefined;
|
|
29711
|
+
toMs?: number | undefined;
|
|
29712
|
+
};
|
|
29713
|
+
output: {
|
|
29714
|
+
deletedBuckets: number;
|
|
29715
|
+
reclaimedBytes: number;
|
|
29716
|
+
};
|
|
29717
|
+
meta: object;
|
|
29718
|
+
}>;
|
|
29719
|
+
listOpsLog: import("@trpc/server").TRPCQueryProcedure<{
|
|
29720
|
+
input: {
|
|
29721
|
+
[x: string]: unknown;
|
|
29722
|
+
deviceId?: number | undefined;
|
|
29723
|
+
limit?: number | undefined;
|
|
29724
|
+
};
|
|
29725
|
+
output: readonly {
|
|
29726
|
+
id: string;
|
|
29727
|
+
at: number;
|
|
29728
|
+
domain: "recording" | "events";
|
|
29729
|
+
op: "prune" | "manual-delete" | "rescan" | "retention-run";
|
|
29730
|
+
reason: "manual" | "retention" | "quota" | "operator";
|
|
29731
|
+
deviceId: number | null;
|
|
29732
|
+
nodeId: string;
|
|
29733
|
+
itemsAffected: number;
|
|
29734
|
+
bytesReclaimed: number;
|
|
29735
|
+
detail: string | null;
|
|
29736
|
+
actor: string;
|
|
29737
|
+
}[];
|
|
29738
|
+
meta: object;
|
|
29739
|
+
}>;
|
|
29548
29740
|
}>>;
|
|
29549
29741
|
recordingExport: import("@trpc/server").TRPCBuiltRouter<{
|
|
29550
29742
|
ctx: TrpcContext;
|
|
@@ -274,7 +274,7 @@ export interface DeviceProxy {
|
|
|
274
274
|
readonly pipelineOrchestrator: Pick<InferDeviceProxyCap<typeof pipelineOrchestratorCapability>, 'assignPipeline' | 'unassignPipeline' | 'getPipelineAssignment' | 'getCameraMetrics' | 'assignAudio' | 'unassignAudio' | 'getAudioAssignment' | 'getAudioAssignments' | 'getCameraSettings' | 'setCameraStepToggle' | 'getCameraStepOverrides' | 'setCameraStepOverride' | 'setCameraPipelineForAgent' | 'resolvePipeline' | 'getCameraStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
275
275
|
readonly pipelineRunner: Pick<InferDeviceProxyCap<typeof pipelineRunnerCapability>, 'detachCamera' | 'getCameraMetrics' | 'runDetailSubtree'>;
|
|
276
276
|
readonly plateGallery: Pick<InferDeviceProxyCap<typeof plateGalleryCapability>, 'listPlates' | 'getPlateByTrack'>;
|
|
277
|
-
readonly recording: Pick<InferDeviceProxyCap<typeof recordingCapability>, 'getAvailability' | 'getDaysWithRecordings' | 'getPlaybackManifest' | 'getDeviceConfig' | 'locateSegment' | 'readSegmentBytes' | 'setDeviceConfig' | 'rescanStorage' | 'pruneFootage' | 'getStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
277
|
+
readonly recording: Pick<InferDeviceProxyCap<typeof recordingCapability>, 'getAvailability' | 'getDaysWithRecordings' | 'getPlaybackManifest' | 'getDeviceConfig' | 'locateSegment' | 'readSegmentBytes' | 'setDeviceConfig' | 'rescanStorage' | 'pruneFootage' | 'deleteFootprint' | 'getStatus' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
278
278
|
readonly recordingExport: Pick<InferDeviceProxyCap<typeof recordingExportCapability>, 'createExport' | 'listExports'>;
|
|
279
279
|
readonly streamBroker: Pick<InferDeviceProxyCap<typeof streamBrokerCapability>, 'publishCameraStream' | 'retractCameraStream' | 'assignProfile' | 'unassignProfile' | 'restartProfile' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
|
|
280
280
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 801 method paths across 116 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -79,7 +79,7 @@ export interface SystemProxy {
|
|
|
79
79
|
readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAgentSettings' | 'listAgentSettings' | 'setAgentAddonDefaults' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentDetectWeight' | 'setAgentCapabilities' | 'setAgentReachableHost' | 'resetNodePipelineDefaults' | 'getCameraStatuses' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate'>;
|
|
80
80
|
readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras' | 'getNativeCrop'>;
|
|
81
81
|
readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate' | 'listVehicles' | 'createVehicle' | 'renameVehicle' | 'deleteVehicle' | 'listVehicleSamples' | 'removeVehicleSample' | 'assignPlate' | 'unassignPlate' | 'assignPlates' | 'unassignPlates'>;
|
|
82
|
-
readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage'>;
|
|
82
|
+
readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog'>;
|
|
83
83
|
readonly recordingExport: Pick<InferProvider<typeof recordingExportCapability>, 'getExport' | 'cancelExport' | 'deleteExport' | 'getDownloadUrl'>;
|
|
84
84
|
readonly serverManagement: Pick<InferProvider<typeof serverManagementCapability>, 'getServerPackageStatus' | 'checkServerUpdate' | 'applyServerUpdate' | 'rollbackServerUpdate' | 'restartServer'>;
|
|
85
85
|
readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'insert' | 'update' | 'delete' | 'count' | 'histogram' | 'isEmpty' | 'declareCollection'>;
|
package/dist/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export type * from './interfaces/analysis.js';
|
|
|
44
44
|
export type * from './interfaces/advanced-notifier.js';
|
|
45
45
|
export * from './interfaces/recording-config.js';
|
|
46
46
|
export { migrateConfigToBands } from './interfaces/recording-config-migrate.js';
|
|
47
|
+
export * from './interfaces/ops-log.js';
|
|
47
48
|
export type * from './interfaces/python-env.js';
|
|
48
49
|
export type * from './interfaces/network.js';
|
|
49
50
|
export type * from './interfaces/router.js';
|