@camstack/types 1.2.112 → 1.2.114

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.
@@ -42,6 +42,44 @@ declare const FaceInfoSchema: z.ZodObject<{
42
42
  suggestedMatchScore: z.ZodOptional<z.ZodNumber>;
43
43
  }, z.core.$strip>;
44
44
  export type FaceInfo = z.infer<typeof FaceInfoSchema>;
45
+ /**
46
+ * What a `listRecentFaces` page is ORDERED BY.
47
+ *
48
+ * - `timestamp` — when the face was seen. The historical (and default) order.
49
+ * - `suggestionConfidence` — {@link FaceInfo.suggestedMatchScore}, the peak
50
+ * cosine of the face's SUGGESTED identity. This is the "review by certainty"
51
+ * order: it puts the suggestions an operator can confirm with one tap at the
52
+ * top, and it is the reason this enum exists — a client that ranked a capped
53
+ * page client-side was ranking the newest N, never the most certain N.
54
+ *
55
+ * A row with NO suggestion (`suggestedMatchScore` absent — a legacy row, an
56
+ * auto-assigned face, or a face below the suggestion band) has no certainty to
57
+ * compare. Under `suggestionConfidence` it sorts **LAST, in BOTH directions**
58
+ * — flipping the direction reorders the rows that HAVE a certainty and never
59
+ * floods the page with the ones that do not. `addon-post-analysis`'s
60
+ * `store/face-sort.ts` is the single implementation, tiebreaks newest-first
61
+ * then by faceId, and is what makes this a total order instead of the
62
+ * backend's NULL-collation accident.
63
+ */
64
+ declare const FaceSortFieldEnum: z.ZodEnum<{
65
+ timestamp: "timestamp";
66
+ suggestionConfidence: "suggestionConfidence";
67
+ }>;
68
+ export type FaceSortField = z.infer<typeof FaceSortFieldEnum>;
69
+ declare const FaceSortDirectionEnum: z.ZodEnum<{
70
+ asc: "asc";
71
+ desc: "desc";
72
+ }>;
73
+ export type FaceSortDirection = z.infer<typeof FaceSortDirectionEnum>;
74
+ /** One suggested group of look-alike UNASSIGNED faces. Ids only — an embedding
75
+ * never leaves the server. */
76
+ declare const FaceClusterSchema: z.ZodObject<{
77
+ faceIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
78
+ representativeFaceId: z.ZodString;
79
+ size: z.ZodNumber;
80
+ cohesion: z.ZodNumber;
81
+ }, z.core.$strip>;
82
+ export type FaceCluster = z.infer<typeof FaceClusterSchema>;
45
83
  export declare const faceGalleryCapability: {
46
84
  readonly name: "face-gallery";
47
85
  readonly scope: "system";
@@ -90,6 +128,7 @@ export declare const faceGalleryCapability: {
90
128
  }, z.core.$strip>, z.ZodVoid, "mutation">;
91
129
  readonly listRecentFaces: import("./capability-definition.js").CapabilityMethodSchema<z.ZodOptional<z.ZodObject<{
92
130
  deviceId: z.ZodOptional<z.ZodNumber>;
131
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
93
132
  limit: z.ZodOptional<z.ZodNumber>;
94
133
  filter: z.ZodOptional<z.ZodEnum<{
95
134
  all: "all";
@@ -97,6 +136,16 @@ export declare const faceGalleryCapability: {
97
136
  recognized: "recognized";
98
137
  identified: "identified";
99
138
  }>>;
139
+ since: z.ZodOptional<z.ZodNumber>;
140
+ until: z.ZodOptional<z.ZodNumber>;
141
+ sortBy: z.ZodOptional<z.ZodEnum<{
142
+ timestamp: "timestamp";
143
+ suggestionConfidence: "suggestionConfidence";
144
+ }>>;
145
+ sortDirection: z.ZodOptional<z.ZodEnum<{
146
+ asc: "asc";
147
+ desc: "desc";
148
+ }>>;
100
149
  includeCrops: z.ZodOptional<z.ZodBoolean>;
101
150
  }, z.core.$strip>>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
102
151
  faceId: z.ZodString;
@@ -185,7 +234,9 @@ export declare const faceGalleryCapability: {
185
234
  readonly suggestFaceClusters: import("./capability-definition.js").CapabilityMethodSchema<z.ZodOptional<z.ZodObject<{
186
235
  threshold: z.ZodOptional<z.ZodNumber>;
187
236
  minClusterSize: z.ZodOptional<z.ZodNumber>;
237
+ maxClusters: z.ZodOptional<z.ZodNumber>;
188
238
  limit: z.ZodOptional<z.ZodNumber>;
239
+ maxFacesScanned: z.ZodOptional<z.ZodNumber>;
189
240
  }, z.core.$strip>>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
190
241
  faceIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
191
242
  representativeFaceId: z.ZodString;
@@ -195,4 +246,13 @@ export declare const faceGalleryCapability: {
195
246
  };
196
247
  };
197
248
  export type IFaceGalleryProvider = InferProvider<typeof faceGalleryCapability>;
249
+ /**
250
+ * The inputs, as the PROVIDER sees them.
251
+ *
252
+ * Named so an implementation can annotate its methods without re-typing the
253
+ * shape (`z.infer`, never a hand copy — a duplicated input shape is how a new
254
+ * field arrives at the router and is dropped by the provider).
255
+ */
256
+ export type ListRecentFacesInput = z.infer<typeof faceGalleryCapability.methods.listRecentFaces.input>;
257
+ export type SuggestFaceClustersInput = z.infer<typeof faceGalleryCapability.methods.suggestFaceClusters.input>;
198
258
  export {};
@@ -142,7 +142,7 @@ export { type DoorbellPressEvent, DoorbellPressEventSchema, type DoorbellStatus,
142
142
  export { type EnumSensorDateTimeFormat, EnumSensorDateTimeFormatSchema, type EnumSensorStatus, EnumSensorStatusSchema, enumSensorCapability, type IEnumSensorProvider, } from './enum-sensor.cap.js';
143
143
  export { type EventEmitterStatus, EventEmitterStatusSchema, type EventFire, EventFireSchema, eventEmitterCapability, type IEventEmitterProvider, } from './event-emitter.cap.js';
144
144
  export { EventItemSchema, eventsCapability, type IEventsProvider } from './events.cap.js';
145
- export { type FaceInfo, faceGalleryCapability, type Identity, type IdentitySampleInfo, type IFaceGalleryProvider, } from './face-gallery.cap.js';
145
+ export { type FaceCluster, type FaceInfo, type FaceSortDirection, type FaceSortField, faceGalleryCapability, type Identity, type IdentitySampleInfo, type IFaceGalleryProvider, type ListRecentFacesInput, type SuggestFaceClustersInput, } from './face-gallery.cap.js';
146
146
  export { type FanControlStatus, FanControlStatusSchema, type FanDirection, FanDirectionSchema, fanControlCapability, type IFanControlProvider, } from './fan-control.cap.js';
147
147
  export { type FeatureProbeStatus, FeatureProbeStatusSchema, featureProbeCapability, type IFeatureProbeProvider, } from './feature-probe.cap.js';
148
148
  export { type FloodStatus, FloodStatusSchema, floodCapability, type IFloodProvider, } from './flood.cap.js';
@@ -189,7 +189,7 @@ export { type CamStreamDescriptor, CamStreamDescriptorSchema, type IStreamCatalo
189
189
  export { type IStreamParamsProvider, type StreamParamsOptions, StreamParamsOptionsSchema, type StreamParamsStatus, StreamParamsStatusSchema, type StreamProfile, StreamProfileConfigSchema, StreamProfileOptionsSchema, type StreamProfilePatch, StreamProfilePatchSchema, StreamProfileSchema, streamParamsCapability, } from './stream-params.cap.js';
190
190
  export { buildStreamParamsConfigSchema, parseStreamParamsFormPatch, STREAM_PROFILE_META, type StreamProfileMeta, } from './stream-params-config-schema.js';
191
191
  export { type ISwitchProvider, type SwitchStatus, SwitchStatusSchema, switchCapability, } from './switch.cap.js';
192
- export { FeatureManifestSchema, HealthStatusSchema, type ISystemProvider, NetworkAddressSchema, type SetSiteLocationInput, SetSiteLocationInputSchema, type SiteLocation, SiteLocationSchema, type SiteLocationSource, SiteLocationSourceSchema, type SiteLocationStatus, SiteLocationStatusSchema, systemCapability, } from './system.cap.js';
192
+ export { type DiagnosticId, DiagnosticIdSchema, type DiagnosticWindow, type DiagnosticWindowPatch, DiagnosticWindowPatchSchema, DiagnosticWindowSchema, FeatureManifestSchema, type GetLoggingSettingsInput, GetLoggingSettingsInputSchema, HealthStatusSchema, type ISystemProvider, type LoggingEffective, LoggingEffectiveSchema, type LoggingExplicit, LoggingExplicitSchema, type LoggingLevelLayer, LoggingLevelLayerSchema, type LoggingLevelSource, LoggingLevelSourceSchema, type LoggingScopeKind, LoggingScopeKindSchema, type LoggingSettingsPatch, LoggingSettingsPatchSchema, type LoggingSettingsState, LoggingSettingsStateSchema, NetworkAddressSchema, type RequestCensusGroup, RequestCensusGroupSchema, type RequestCensusProcedure, RequestCensusProcedureSchema, type RequestCensusSnapshot, RequestCensusSnapshotSchema, type RequestCensusStatus, RequestCensusStatusSchema, type SetLoggingSettingsInput, SetLoggingSettingsInputSchema, type SetSiteLocationInput, SetSiteLocationInputSchema, type SiteLocation, SiteLocationSchema, type SiteLocationSource, SiteLocationSourceSchema, type SiteLocationStatus, SiteLocationStatusSchema, systemCapability, type TransportPlane, type TransportPlaneCounts, TransportPlaneCountsSchema, TransportPlaneSchema, } from './system.cap.js';
193
193
  export { type ITamperProvider, type TamperStatus, TamperStatusSchema, tamperCapability, } from './tamper.cap.js';
194
194
  export { type ITemperatureSensorProvider, type TemperatureSensorStatus, TemperatureSensorStatusSchema, temperatureSensorCapability, } from './temperature-sensor.cap.js';
195
195
  export { type IToastProvider, ToastSchema, toastCapability } from './toast.cap.js';
@@ -327,6 +327,12 @@ export declare const recordingCapability: {
327
327
  triggers: z.ZodOptional<z.ZodObject<{
328
328
  motion: z.ZodOptional<z.ZodBoolean>;
329
329
  audioThresholdDbfs: z.ZodOptional<z.ZodNumber>;
330
+ objectClasses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
331
+ person: "person";
332
+ vehicle: "vehicle";
333
+ animal: "animal";
334
+ }>>>;
335
+ sensorDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
330
336
  }, z.core.$strip>>;
331
337
  preBufferSec: z.ZodOptional<z.ZodNumber>;
332
338
  postBufferSec: z.ZodOptional<z.ZodNumber>;
@@ -422,6 +428,12 @@ export declare const recordingCapability: {
422
428
  triggers: z.ZodOptional<z.ZodObject<{
423
429
  motion: z.ZodOptional<z.ZodBoolean>;
424
430
  audioThresholdDbfs: z.ZodOptional<z.ZodNumber>;
431
+ objectClasses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
432
+ person: "person";
433
+ vehicle: "vehicle";
434
+ animal: "animal";
435
+ }>>>;
436
+ sensorDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
425
437
  }, z.core.$strip>>;
426
438
  preBufferSec: z.ZodOptional<z.ZodNumber>;
427
439
  postBufferSec: z.ZodOptional<z.ZodNumber>;
@@ -455,6 +467,12 @@ export declare const recordingCapability: {
455
467
  triggers: z.ZodOptional<z.ZodObject<{
456
468
  motion: z.ZodOptional<z.ZodBoolean>;
457
469
  audioThresholdDbfs: z.ZodOptional<z.ZodNumber>;
470
+ objectClasses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
471
+ person: "person";
472
+ vehicle: "vehicle";
473
+ animal: "animal";
474
+ }>>>;
475
+ sensorDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
458
476
  }, z.core.$strip>>;
459
477
  preBufferSec: z.ZodOptional<z.ZodNumber>;
460
478
  postBufferSec: z.ZodOptional<z.ZodNumber>;