@camstack/types 1.2.386 → 1.2.388
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 +26 -16
- package/dist/addon.mjs +26 -16
- package/dist/auth/credential-scope.d.ts +37 -5
- package/dist/auth/principal-scope.d.ts +1 -1
- package/dist/capabilities/alarm-panel.cap.d.ts +10 -2
- package/dist/capabilities/capability-definition.d.ts +21 -3
- package/dist/capabilities/connectivity.cap.d.ts +10 -2
- package/dist/capabilities/device-history.cap.d.ts +195 -3
- package/dist/capabilities/dishwasher.cap.d.ts +17 -0
- package/dist/capabilities/enum-sensor.cap.d.ts +12 -2
- package/dist/capabilities/index.d.ts +6 -5
- package/dist/capabilities/llm.cap.d.ts +252 -309
- package/dist/capabilities/lock-control.cap.d.ts +9 -2
- package/dist/capabilities/log-destination.cap.d.ts +148 -19
- package/dist/capabilities/media-player.cap.d.ts +15 -2
- package/dist/capabilities/notification-rules.cap.d.ts +213 -13
- package/dist/capabilities/stream-params.cap.d.ts +24 -2
- package/dist/capabilities/user-management.cap.d.ts +4 -409
- package/dist/client.js +76 -11
- package/dist/client.mjs +76 -11
- package/dist/device/base-device.d.ts +34 -1
- package/dist/device/index.d.ts +2 -2
- package/dist/generated/addon-api.d.ts +548 -187
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/collection-array-methods.d.ts +2 -2
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +5 -3
- package/dist/index.js +861 -164
- package/dist/index.mjs +815 -162
- package/dist/interfaces/addon-data-plane.d.ts +4 -4
- package/dist/interfaces/addon-peer-bytes.d.ts +1 -1
- package/dist/interfaces/logging.d.ts +16 -1
- package/dist/notification/media-image.d.ts +67 -0
- package/dist/schemas/auth-records.d.ts +1 -1
- package/dist/schemas/user-preferences.d.ts +103 -0
- package/dist/{sleep-BxjU_fJM.mjs → sleep-BSuCCFjf.mjs} +34 -5
- package/dist/{sleep-BE7_6UnC.js → sleep-DKtoyk6X.js} +34 -5
- package/package.json +1 -1
package/dist/client.mjs
CHANGED
|
@@ -23037,6 +23037,33 @@ var NcRuleTargetSchema = z.object({
|
|
|
23037
23037
|
params: z.record(z.string(), z.unknown()).optional()
|
|
23038
23038
|
});
|
|
23039
23039
|
/**
|
|
23040
|
+
* WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
|
|
23041
|
+
*
|
|
23042
|
+
* Every mode starts from the same CLEAN source frame of the trigger moment
|
|
23043
|
+
* (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
|
|
23044
|
+
* to the zone that fired the rule) and renders it once at send time:
|
|
23045
|
+
* - `scene-boxes` — the whole scene, the subject outlined thick in the accent
|
|
23046
|
+
* colour and every OTHER track visible at that instant outlined thin, each
|
|
23047
|
+
* labelled with class and confidence ("dog 87%").
|
|
23048
|
+
* - `crop` — the subject cut out of that frame around its box at that instant.
|
|
23049
|
+
* - `clean` — the whole scene with nothing drawn on it.
|
|
23050
|
+
* - `none` — no picture.
|
|
23051
|
+
*
|
|
23052
|
+
* A mode that cannot be honoured (no box at that instant, a photograph with no
|
|
23053
|
+
* tracked subject) ships `clean` and names the reason in the log, per camera.
|
|
23054
|
+
* It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
|
|
23055
|
+
* ship a crop on one event and a boxed scene on the next depending on which
|
|
23056
|
+
* stored kind had landed.
|
|
23057
|
+
*/
|
|
23058
|
+
var NcMediaImageSchema = z.enum([
|
|
23059
|
+
"scene-boxes",
|
|
23060
|
+
"crop",
|
|
23061
|
+
"clean",
|
|
23062
|
+
"none"
|
|
23063
|
+
]);
|
|
23064
|
+
/**
|
|
23065
|
+
* @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
|
|
23066
|
+
*
|
|
23040
23067
|
* Media attachment policy (P1 still-image subset).
|
|
23041
23068
|
* - `best` — the best AVAILABLE subject image at dispatch time (D-3).
|
|
23042
23069
|
* - `best-matching` — the media that explains WHY the rule fired: a rule
|
|
@@ -23050,6 +23077,8 @@ var NcRuleTargetSchema = z.object({
|
|
|
23050
23077
|
* - `none` — no attachment.
|
|
23051
23078
|
*/
|
|
23052
23079
|
/**
|
|
23080
|
+
* @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
|
|
23081
|
+
*
|
|
23053
23082
|
* WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
|
|
23054
23083
|
* conflate it with the selection strategy and betray the request: asking for
|
|
23055
23084
|
* the clean scene frame on an object-event owner used to start at
|
|
@@ -23078,16 +23107,29 @@ var NcMediaFrameSchema = z.enum([
|
|
|
23078
23107
|
*/
|
|
23079
23108
|
var NcLinkedCameraModeSchema = z.enum(["mosaic", "each"]);
|
|
23080
23109
|
var NcMediaPolicySchema = z.object({
|
|
23110
|
+
/**
|
|
23111
|
+
* The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
|
|
23112
|
+
* saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
|
|
23113
|
+
* triple below, at load and at every write, and the store keeps only this.
|
|
23114
|
+
*/
|
|
23115
|
+
image: NcMediaImageSchema.optional(),
|
|
23116
|
+
/**
|
|
23117
|
+
* Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
|
|
23118
|
+
* a `crop` never shows it). Valid only on a rule whose trigger is a zone —
|
|
23119
|
+
* `conditions.zones` or an occupancy zone — and refused on save otherwise.
|
|
23120
|
+
* Replaces `zoneCrop`.
|
|
23121
|
+
*/
|
|
23122
|
+
showTriggerZone: z.boolean().optional(),
|
|
23123
|
+
/** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
|
|
23081
23124
|
attach: z.enum([
|
|
23082
23125
|
"best",
|
|
23083
23126
|
"best-matching",
|
|
23084
23127
|
"keyFrame",
|
|
23085
23128
|
"none"
|
|
23086
|
-
]).
|
|
23087
|
-
/**
|
|
23129
|
+
]).optional(),
|
|
23130
|
+
/** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
|
|
23088
23131
|
frame: NcMediaFrameSchema.optional(),
|
|
23089
|
-
/**
|
|
23090
|
-
* "show me the ZONE", not the whole scene or the subject crop. */
|
|
23132
|
+
/** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
|
|
23091
23133
|
zoneCrop: z.boolean().optional(),
|
|
23092
23134
|
/**
|
|
23093
23135
|
* Also attach a short GIF cut from the stream broker's clip ring around the
|
|
@@ -23272,7 +23314,9 @@ var NcRuleInputSchema = z.object({
|
|
|
23272
23314
|
* targets.
|
|
23273
23315
|
*/
|
|
23274
23316
|
targetUsers: z.array(z.string()).optional(),
|
|
23275
|
-
|
|
23317
|
+
/** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
|
|
23318
|
+
* detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
|
|
23319
|
+
media: NcMediaPolicySchema.default({}),
|
|
23276
23320
|
throttle: NcThrottleSchema.default({
|
|
23277
23321
|
cooldownSec: 60,
|
|
23278
23322
|
scope: "rule-device"
|
|
@@ -24232,13 +24276,37 @@ var NcAlarmModeOpeningsSchema = z.object({
|
|
|
24232
24276
|
/** Covered devices whose state could not be read (D49): neither open nor closed. */
|
|
24233
24277
|
unknown: z.array(z.number().int())
|
|
24234
24278
|
});
|
|
24279
|
+
/**
|
|
24280
|
+
* One alarm INPUT — a (rule, device) pair — the operator bypassed until the
|
|
24281
|
+
* next disarm ("Bypass this input until disarm" on a trigger notification, or
|
|
24282
|
+
* `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
|
|
24283
|
+
* never looks fully armed (D62: off must never look like broken).
|
|
24284
|
+
*/
|
|
24285
|
+
var NcAlarmInputBypassViewSchema = z.object({
|
|
24286
|
+
ruleId: z.string(),
|
|
24287
|
+
/** The rule's current name (its frozen name when the rule is gone). */
|
|
24288
|
+
ruleName: z.string(),
|
|
24289
|
+
/** The input: the sensor of the match, else its camera. */
|
|
24290
|
+
deviceId: z.number().int(),
|
|
24291
|
+
/** The input's current name. */
|
|
24292
|
+
name: z.string(),
|
|
24293
|
+
/** When it was bypassed (ms epoch). */
|
|
24294
|
+
since: z.number(),
|
|
24295
|
+
/** Triggers from this input dropped since. */
|
|
24296
|
+
dropped: z.number().int().min(0)
|
|
24297
|
+
});
|
|
24235
24298
|
var NcAlarmLiveSchema = z.object({
|
|
24236
24299
|
state: AlarmStateSchema,
|
|
24237
24300
|
/** The mode being armed into (exit delay) or held; null when disarmed. */
|
|
24238
24301
|
targetMode: AlarmArmModeSchema.nullable(),
|
|
24239
24302
|
availableModes: z.array(AlarmArmModeSchema),
|
|
24240
24303
|
openings: z.array(NcAlarmModeOpeningsSchema),
|
|
24241
|
-
exclusions: z.array(NcAlarmExclusionViewSchema)
|
|
24304
|
+
exclusions: z.array(NcAlarmExclusionViewSchema),
|
|
24305
|
+
/**
|
|
24306
|
+
* Inputs bypassed for the rest of this arm session; cleared on disarm.
|
|
24307
|
+
* Defaulted so an older hub answer still parses (as "none known").
|
|
24308
|
+
*/
|
|
24309
|
+
bypassedInputs: z.array(NcAlarmInputBypassViewSchema).default([])
|
|
24242
24310
|
});
|
|
24243
24311
|
var NcAlarmConfigSchema = z.object({
|
|
24244
24312
|
/**
|
|
@@ -27735,6 +27803,7 @@ function createSystemProxy(api) {
|
|
|
27735
27803
|
deviceHistory: {
|
|
27736
27804
|
listNodeSeries: (input) => dispatch("deviceHistory", "listNodeSeries", "query", input),
|
|
27737
27805
|
queryNode: (input) => dispatch("deviceHistory", "queryNode", "query", input),
|
|
27806
|
+
queryMany: (input) => dispatch("deviceHistory", "queryMany", "query", input),
|
|
27738
27807
|
declareSeries: (input) => dispatch("deviceHistory", "declareSeries", "mutation", input),
|
|
27739
27808
|
record: (input) => dispatch("deviceHistory", "record", "mutation", input),
|
|
27740
27809
|
recordBuckets: (input) => dispatch("deviceHistory", "recordBuckets", "mutation", input),
|
|
@@ -27868,7 +27937,7 @@ function createSystemProxy(api) {
|
|
|
27868
27937
|
migrateRawSecrets: (input) => dispatch("llm", "migrateRawSecrets", "mutation", input),
|
|
27869
27938
|
deleteProfile: (input) => dispatch("llm", "deleteProfile", "mutation", input),
|
|
27870
27939
|
testProfile: (input) => dispatch("llm", "testProfile", "mutation", input),
|
|
27871
|
-
listModels: (input) => dispatch("llm", "listModels", "
|
|
27940
|
+
listModels: (input) => dispatch("llm", "listModels", "mutation", input),
|
|
27872
27941
|
getDefaults: (input) => dispatch("llm", "getDefaults", "query", input),
|
|
27873
27942
|
setDefault: (input) => dispatch("llm", "setDefault", "mutation", input),
|
|
27874
27943
|
getUsage: (input) => dispatch("llm", "getUsage", "query", input),
|
|
@@ -28312,10 +28381,6 @@ function createSystemProxy(api) {
|
|
|
28312
28381
|
validateCredentials: (input) => dispatch("userManagement", "validateCredentials", "mutation", input),
|
|
28313
28382
|
listApiKeys: (input) => dispatch("userManagement", "listApiKeys", "query", input),
|
|
28314
28383
|
revokeApiKey: (input) => dispatch("userManagement", "revokeApiKey", "mutation", input),
|
|
28315
|
-
createScopedToken: (input) => dispatch("userManagement", "createScopedToken", "mutation", input),
|
|
28316
|
-
revokeScopedToken: (input) => dispatch("userManagement", "revokeScopedToken", "mutation", input),
|
|
28317
|
-
validateScopedToken: (input) => dispatch("userManagement", "validateScopedToken", "query", input),
|
|
28318
|
-
listScopedTokens: (input) => dispatch("userManagement", "listScopedTokens", "query", input),
|
|
28319
28384
|
setupTotp: (input) => dispatch("userManagement", "setupTotp", "mutation", input),
|
|
28320
28385
|
confirmTotp: (input) => dispatch("userManagement", "confirmTotp", "mutation", input),
|
|
28321
28386
|
disableTotp: (input) => dispatch("userManagement", "disableTotp", "mutation", input),
|
|
@@ -294,9 +294,18 @@ export declare abstract class BaseDevice<T extends z.ZodObject<z.core.$ZodLooseS
|
|
|
294
294
|
* Drivers can use the `getProbeFlags()` helper to read the flag bag
|
|
295
295
|
* with a typed cast.
|
|
296
296
|
*
|
|
297
|
+
* Answer what you KNOW. A plain array is read as the complete list only
|
|
298
|
+
* while this device is `online` and probed; return
|
|
299
|
+
* `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
|
|
300
|
+
* now (no credentials, parent not connected, a failed or partial read) —
|
|
301
|
+
* the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
|
|
302
|
+
* to say "connected, and this is the complete list" explicitly. A shrink is
|
|
303
|
+
* deleted only after a second agreeing complete read on a later probe (D49;
|
|
304
|
+
* `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
|
|
305
|
+
*
|
|
297
306
|
* Default: no children.
|
|
298
307
|
*/
|
|
299
|
-
getAccessoryChildren():
|
|
308
|
+
getAccessoryChildren(): AccessoryChildrenAnswer;
|
|
300
309
|
/**
|
|
301
310
|
* Read the current feature-probe flag bag with a typed cast. Helper
|
|
302
311
|
* for `getAccessoryChildren()` and `features` getters that derive
|
|
@@ -311,6 +320,30 @@ export declare abstract class BaseDevice<T extends z.ZodObject<z.core.$ZodLooseS
|
|
|
311
320
|
*/
|
|
312
321
|
protected hasProbed(): boolean;
|
|
313
322
|
}
|
|
323
|
+
/** "I cannot know my accessory children right now" — the kernel prunes nothing. */
|
|
324
|
+
export interface AccessoryChildrenUnknown {
|
|
325
|
+
readonly kind: 'unknown';
|
|
326
|
+
/** Why, for the log line (`no credentials`, `cloud not connected`, …). */
|
|
327
|
+
readonly reason: string;
|
|
328
|
+
/**
|
|
329
|
+
* Children known to exist even so (e.g. the core device of a cloud
|
|
330
|
+
* container): they are spawned, never used as the list to prune against.
|
|
331
|
+
*/
|
|
332
|
+
readonly known?: readonly AccessoryChildSpec[];
|
|
333
|
+
}
|
|
334
|
+
/** "Connected, and this is the COMPLETE list" — the only answer a prune may follow. */
|
|
335
|
+
export interface AccessoryChildrenComplete {
|
|
336
|
+
readonly kind: 'complete';
|
|
337
|
+
readonly children: readonly AccessoryChildSpec[];
|
|
338
|
+
}
|
|
339
|
+
export type AccessoryChildrenRead = AccessoryChildrenComplete | AccessoryChildrenUnknown;
|
|
340
|
+
/**
|
|
341
|
+
* What `getAccessoryChildren()` may answer: a typed read, or a plain list
|
|
342
|
+
* (complete only while the parent is online and probed).
|
|
343
|
+
*/
|
|
344
|
+
export type AccessoryChildrenAnswer = readonly AccessoryChildSpec[] | AccessoryChildrenRead;
|
|
345
|
+
export declare function accessoryChildrenUnknown(reason: string, known?: readonly AccessoryChildSpec[]): AccessoryChildrenUnknown;
|
|
346
|
+
export declare function accessoryChildrenComplete(children: readonly AccessoryChildSpec[]): AccessoryChildrenComplete;
|
|
314
347
|
/**
|
|
315
348
|
* Specification for one accessory child a parent device wants the
|
|
316
349
|
* kernel to auto-spawn. Returned from `BaseDevice.getAccessoryChildren()`.
|
package/dist/device/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ACCESSORY_LABEL, AccessoryKind, type AccessoryKindValue, accessoryStableId, } from './accessory.js';
|
|
2
|
-
export type { AccessoryChildSpec } from './base-device.js';
|
|
3
|
-
export { BaseDevice } from './base-device.js';
|
|
2
|
+
export type { AccessoryChildrenAnswer, AccessoryChildrenComplete, AccessoryChildrenRead, AccessoryChildrenUnknown, AccessoryChildSpec, } from './base-device.js';
|
|
3
|
+
export { accessoryChildrenComplete, accessoryChildrenUnknown, BaseDevice } from './base-device.js';
|
|
4
4
|
export type { DeviceRestoreReport, DeviceSummary, DiscoveryCandidate, FieldProbeResult, ProviderStatus, } from './base-device-provider.js';
|
|
5
5
|
export { BaseDeviceProvider, toDeviceSummary } from './base-device-provider.js';
|
|
6
6
|
export type { DeviceRestoreRetrySchedulerOptions, InitialRestoreFailure, PermanentRestoreFailure, PermanentRestoreFailureHandler, RestoreAttemptFn, } from './device-restore-retry.js';
|