@camstack/system 1.2.342 → 1.2.344
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-runner.js +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/calendars/calendars.addon.d.ts +11 -0
- package/dist/builtins/calendars/index.d.ts +1 -0
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{child-cap-dispatch-Vuns6Iq-.mjs → child-cap-dispatch-B52e2Bcw.mjs} +1 -1
- package/dist/{child-cap-dispatch-BrNyZOV_.js → child-cap-dispatch-Bm4Kpo7v.js} +1 -1
- package/dist/{composition-sources-DHOJmzw1.mjs → composition-sources-BSzq8Hfu.mjs} +1 -1
- package/dist/{composition-sources-CLLeNCdr.js → composition-sources-Dk6MDMFV.js} +1 -1
- package/dist/{dist-BYHMg5zg.mjs → dist-0zO6jHkf.mjs} +174 -8
- package/dist/{dist-Tk7iDxUC.js → dist-CqafgUSr.js} +179 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +105 -2
- package/dist/index.mjs +105 -3
- package/dist/{retired-settings-keys-bYXNyr6b.mjs → retired-settings-keys-Dnuhd8Ml.mjs} +1 -1
- package/dist/{retired-settings-keys-BQS_wD85.js → retired-settings-keys-uQUjT56-.js} +1 -1
- package/package.json +14 -1
|
@@ -21413,19 +21413,52 @@ var NcAlarmNonBlockingEditSchema = z.object({
|
|
|
21413
21413
|
nonBlocking: z.boolean()
|
|
21414
21414
|
});
|
|
21415
21415
|
/**
|
|
21416
|
-
*
|
|
21417
|
-
*
|
|
21416
|
+
* Controllable openings: opt IN to blocking (default is do not block). Contacts
|
|
21417
|
+
* keep using {@link NcAlarmNonBlockingEditSchema}.
|
|
21418
|
+
*/
|
|
21419
|
+
var NcAlarmBlockingEditSchema = z.object({
|
|
21420
|
+
mode: AlarmArmModeSchema,
|
|
21421
|
+
deviceId: z.number().int().positive(),
|
|
21422
|
+
/** true = on the list (blocks when open); false = off the list (default). */
|
|
21423
|
+
blocking: z.boolean()
|
|
21424
|
+
});
|
|
21425
|
+
/**
|
|
21426
|
+
* Controllable openings: opt OUT of secure-on-arm (default is secure ON —
|
|
21427
|
+
* close / lock / turn off when this mode arms).
|
|
21428
|
+
*/
|
|
21429
|
+
var NcAlarmSecureOnArmEditSchema = z.object({
|
|
21430
|
+
mode: AlarmArmModeSchema,
|
|
21431
|
+
deviceId: z.number().int().positive(),
|
|
21432
|
+
/** true = secure on arm (default); false = do not actuate on arm. */
|
|
21433
|
+
secureOnArm: z.boolean()
|
|
21434
|
+
});
|
|
21435
|
+
/**
|
|
21436
|
+
* One arm mode's device-id list (non-blocking, blocking, or secure-on-arm-off).
|
|
21418
21437
|
*/
|
|
21419
|
-
var
|
|
21438
|
+
var NcAlarmModeDeviceListSchema = z.object({
|
|
21420
21439
|
mode: AlarmArmModeSchema,
|
|
21421
21440
|
deviceIds: z.array(z.number().int()).max(200)
|
|
21422
21441
|
});
|
|
21423
21442
|
/**
|
|
21443
|
+
* One arm mode's non-blocking list: devices that may be open when that mode
|
|
21444
|
+
* arms, without the arm being refused.
|
|
21445
|
+
*/
|
|
21446
|
+
var NcAlarmNonBlockingSchema = NcAlarmModeDeviceListSchema;
|
|
21447
|
+
/** Controllable devices that DO block when open (opt-in; default empty). */
|
|
21448
|
+
var NcAlarmBlockingSchema = NcAlarmModeDeviceListSchema;
|
|
21449
|
+
/**
|
|
21450
|
+
* Controllable devices that do NOT secure on arm (opt-out; default empty =
|
|
21451
|
+
* every controllable secures).
|
|
21452
|
+
*/
|
|
21453
|
+
var NcAlarmSecureOnArmOffSchema = NcAlarmModeDeviceListSchema;
|
|
21454
|
+
/**
|
|
21424
21455
|
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
21425
21456
|
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
21426
21457
|
* at the boundary rather than interpreted.
|
|
21427
21458
|
*/
|
|
21428
21459
|
var NcAlarmNonBlockingListSchema = z.array(NcAlarmNonBlockingSchema).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
|
|
21460
|
+
var NcAlarmBlockingListSchema = z.array(NcAlarmBlockingSchema).max(8).refine(uniqueModes, { message: "blocking: at most one list per arm mode" });
|
|
21461
|
+
var NcAlarmSecureOnArmOffListSchema = z.array(NcAlarmSecureOnArmOffSchema).max(8).refine(uniqueModes, { message: "secureOnArmOff: at most one list per arm mode" });
|
|
21429
21462
|
/**
|
|
21430
21463
|
* The three durations — global, and per mode since D697 — the panel's state
|
|
21431
21464
|
* machine runs on, who hears about its transitions, and which openings each mode tolerates.
|
|
@@ -21468,9 +21501,23 @@ var NcAlarmSettingsSchema = z.object({
|
|
|
21468
21501
|
* arm (a window left ajar for the cat under `home`, say). At most one entry
|
|
21469
21502
|
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
21470
21503
|
* parses as "every opening blocks" — the behaviour it was written under.
|
|
21504
|
+
* Contacts use this list; controllable openings use {@link blocking} instead
|
|
21505
|
+
* (default: do not block).
|
|
21471
21506
|
*/
|
|
21472
21507
|
nonBlocking: NcAlarmNonBlockingListSchema.default([]),
|
|
21473
21508
|
/**
|
|
21509
|
+
* Per arm mode, controllable openings that DO refuse the arm when open.
|
|
21510
|
+
* Default `[]` = none block (secure-on-arm closes them instead). Absent on a
|
|
21511
|
+
* blob older than this field — read as empty.
|
|
21512
|
+
*/
|
|
21513
|
+
blocking: NcAlarmBlockingListSchema.default([]),
|
|
21514
|
+
/**
|
|
21515
|
+
* Per arm mode, controllable openings that must NOT be actuated on arm.
|
|
21516
|
+
* Default `[]` = every controllable secures (close / lock / off). Absent on
|
|
21517
|
+
* an older blob — read as empty (secure ON).
|
|
21518
|
+
*/
|
|
21519
|
+
secureOnArmOff: NcAlarmSecureOnArmOffListSchema.default([]),
|
|
21520
|
+
/**
|
|
21474
21521
|
* Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
|
|
21475
21522
|
* without a field, uses the global value above — so `[]`, the default, is exactly the
|
|
21476
21523
|
* behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
|
|
@@ -21480,7 +21527,7 @@ var NcAlarmSettingsSchema = z.object({
|
|
|
21480
21527
|
/**
|
|
21481
21528
|
* Every field optional — a tab edits one control at a time.
|
|
21482
21529
|
*
|
|
21483
|
-
*
|
|
21530
|
+
* List fields and `modeDelays` are re-declared WITHOUT their defaults:
|
|
21484
21531
|
* `.partial()` does not remove an inner `.default()`, so a patch that never
|
|
21485
21532
|
* named the field would parse to `[]` and wipe every mode's list on an
|
|
21486
21533
|
* unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
|
|
@@ -21488,11 +21535,15 @@ var NcAlarmSettingsSchema = z.object({
|
|
|
21488
21535
|
*/
|
|
21489
21536
|
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
|
|
21490
21537
|
nonBlocking: NcAlarmNonBlockingListSchema,
|
|
21538
|
+
blocking: NcAlarmBlockingListSchema,
|
|
21539
|
+
secureOnArmOff: NcAlarmSecureOnArmOffListSchema,
|
|
21491
21540
|
/** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
|
|
21492
21541
|
modeDelays: NcAlarmModeDelaysEditListSchema,
|
|
21493
21542
|
/** ONE membership change; the panel applies it to the list it holds at its turn. */
|
|
21494
|
-
nonBlockingEdit: NcAlarmNonBlockingEditSchema
|
|
21495
|
-
|
|
21543
|
+
nonBlockingEdit: NcAlarmNonBlockingEditSchema,
|
|
21544
|
+
blockingEdit: NcAlarmBlockingEditSchema,
|
|
21545
|
+
secureOnArmEdit: NcAlarmSecureOnArmEditSchema
|
|
21546
|
+
}).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" }).refine((p) => p.blocking === void 0 || p.blockingEdit === void 0, { message: "blocking and blockingEdit are exclusive — send the whole lists or one edit" }).refine((p) => p.secureOnArmOff === void 0 || p.secureOnArmEdit === void 0, { message: "secureOnArmOff and secureOnArmEdit are exclusive — send the whole lists or one edit" });
|
|
21496
21547
|
/**
|
|
21497
21548
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
21498
21549
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -21607,7 +21658,13 @@ var NcAlarmSensorStateSchema = z.object({
|
|
|
21607
21658
|
/** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
|
|
21608
21659
|
unknownWhy: z.enum(["read-failed", "unknown-word"]).nullable(),
|
|
21609
21660
|
/** The device manager's liveness as the centre mirrors it; null = not known. */
|
|
21610
|
-
online: z.boolean().nullable()
|
|
21661
|
+
online: z.boolean().nullable(),
|
|
21662
|
+
/**
|
|
21663
|
+
* True when the opening is a cover / lock / switch — the table shows the
|
|
21664
|
+
* Secure-on-arm switch and uses the controllable defaults. False for contacts
|
|
21665
|
+
* and for non-openings. Defaulted so an older hub answer still parses.
|
|
21666
|
+
*/
|
|
21667
|
+
controllable: z.boolean().default(false)
|
|
21611
21668
|
});
|
|
21612
21669
|
var NcAlarmSensorsInputSchema = z.object({ deviceIds: z.array(z.number().int().positive()).max(500) });
|
|
21613
21670
|
var NcAlarmSensorsSchema = z.object({
|
|
@@ -32764,6 +32821,83 @@ var buttonCapability = {
|
|
|
32764
32821
|
}) }
|
|
32765
32822
|
};
|
|
32766
32823
|
/**
|
|
32824
|
+
* `calendar-source` — collection cap exposing per-provider calendars and
|
|
32825
|
+
* their events. Every addon that contributes calendars (Home Assistant,
|
|
32826
|
+
* a future Google Calendar addon, …) registers a provider here. The hub
|
|
32827
|
+
* singleton `calendars` walks the collection and merges the answers.
|
|
32828
|
+
*
|
|
32829
|
+
* Mirrors `addon-pages-source`: the public listing is a different shape
|
|
32830
|
+
* (source-stamped ids) and lives on the aggregator.
|
|
32831
|
+
*/
|
|
32832
|
+
var CalendarSourceKindSchema = z.enum(["ha", "addon"]);
|
|
32833
|
+
var CalendarInfoSchema = z.object({
|
|
32834
|
+
/** Provider-local id (e.g. HA `calendar.family`). The aggregator prefixes. */
|
|
32835
|
+
id: z.string().min(1),
|
|
32836
|
+
name: z.string().min(1),
|
|
32837
|
+
source: CalendarSourceKindSchema,
|
|
32838
|
+
enabled: z.boolean()
|
|
32839
|
+
});
|
|
32840
|
+
var CalendarEventSchema = z.object({
|
|
32841
|
+
id: z.string().min(1),
|
|
32842
|
+
calendarId: z.string().min(1),
|
|
32843
|
+
title: z.string(),
|
|
32844
|
+
startMs: z.number().int(),
|
|
32845
|
+
endMs: z.number().int(),
|
|
32846
|
+
allDay: z.boolean().optional(),
|
|
32847
|
+
description: z.string().optional(),
|
|
32848
|
+
location: z.string().optional()
|
|
32849
|
+
});
|
|
32850
|
+
var CalendarListEventsInputSchema = z.object({
|
|
32851
|
+
calendarIds: z.array(z.string().min(1)).max(64).optional(),
|
|
32852
|
+
startMs: z.number().int(),
|
|
32853
|
+
endMs: z.number().int()
|
|
32854
|
+
});
|
|
32855
|
+
var calendarSourceCapability = {
|
|
32856
|
+
name: "calendar-source",
|
|
32857
|
+
scope: "system",
|
|
32858
|
+
mode: "collection",
|
|
32859
|
+
internal: true,
|
|
32860
|
+
methods: {
|
|
32861
|
+
listCalendars: method(z.void(), z.array(CalendarInfoSchema).readonly(), { auth: "admin" }),
|
|
32862
|
+
listEvents: method(CalendarListEventsInputSchema, z.array(CalendarEventSchema).readonly(), { auth: "admin" })
|
|
32863
|
+
}
|
|
32864
|
+
};
|
|
32865
|
+
/**
|
|
32866
|
+
* `calendars` — system-scoped singleton. Public surface admin-ui and the
|
|
32867
|
+
* notification-center calendar-events producer consume.
|
|
32868
|
+
*
|
|
32869
|
+
* Walks every `calendar-source` provider, stamps each calendar with a
|
|
32870
|
+
* cluster-stable id (`<sourceAddonId>:<localId>`) and the providing
|
|
32871
|
+
* addon's id, and fans `listEvents` out the same way. Home Assistant
|
|
32872
|
+
* import is a built-in refresh of the HA source rather than a second
|
|
32873
|
+
* registry — `importFromHomeAssistant` asks that source to re-discover.
|
|
32874
|
+
*/
|
|
32875
|
+
var CalendarEntrySchema = CalendarInfoSchema.extend({
|
|
32876
|
+
/** Cluster-stable id: `<providerAddonId>:<localId>`. */
|
|
32877
|
+
id: z.string().min(1),
|
|
32878
|
+
/** The addon that registered the calendar-source provider. */
|
|
32879
|
+
providerAddonId: z.string().min(1).optional()
|
|
32880
|
+
});
|
|
32881
|
+
var CalendarImportResultSchema = z.object({
|
|
32882
|
+
imported: z.number().int().nonnegative(),
|
|
32883
|
+
/** Absent when no HA calendar-source provider was reachable. */
|
|
32884
|
+
providerAddonId: z.string().min(1).optional(),
|
|
32885
|
+
error: z.string().optional()
|
|
32886
|
+
});
|
|
32887
|
+
var calendarsCapability = {
|
|
32888
|
+
name: "calendars",
|
|
32889
|
+
scope: "system",
|
|
32890
|
+
mode: "singleton",
|
|
32891
|
+
methods: {
|
|
32892
|
+
listCalendars: method(z.void(), z.array(CalendarEntrySchema).readonly(), { auth: "admin" }),
|
|
32893
|
+
listEvents: method(CalendarListEventsInputSchema, z.array(CalendarEventSchema).readonly(), { auth: "admin" }),
|
|
32894
|
+
importFromHomeAssistant: method(z.void(), CalendarImportResultSchema, {
|
|
32895
|
+
auth: "admin",
|
|
32896
|
+
kind: "mutation"
|
|
32897
|
+
})
|
|
32898
|
+
}
|
|
32899
|
+
};
|
|
32900
|
+
/**
|
|
32767
32901
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
32768
32902
|
* + auth surface in a vendor-neutral shape.
|
|
32769
32903
|
*
|
|
@@ -47535,6 +47669,8 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
47535
47669
|
brightnessCapability,
|
|
47536
47670
|
brokerCapability,
|
|
47537
47671
|
buttonCapability,
|
|
47672
|
+
calendarSourceCapability,
|
|
47673
|
+
calendarsCapability,
|
|
47538
47674
|
cameraCredentialsCapability,
|
|
47539
47675
|
cameraGridLayoutCapability,
|
|
47540
47676
|
cameraPipelineConfigCapability,
|
|
@@ -48455,6 +48591,36 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
48455
48591
|
addonId: null,
|
|
48456
48592
|
access: "create"
|
|
48457
48593
|
},
|
|
48594
|
+
"calendars.importFromHomeAssistant": {
|
|
48595
|
+
capName: "calendars",
|
|
48596
|
+
capScope: "system",
|
|
48597
|
+
addonId: null,
|
|
48598
|
+
access: "create"
|
|
48599
|
+
},
|
|
48600
|
+
"calendars.listCalendars": {
|
|
48601
|
+
capName: "calendars",
|
|
48602
|
+
capScope: "system",
|
|
48603
|
+
addonId: null,
|
|
48604
|
+
access: "view"
|
|
48605
|
+
},
|
|
48606
|
+
"calendars.listEvents": {
|
|
48607
|
+
capName: "calendars",
|
|
48608
|
+
capScope: "system",
|
|
48609
|
+
addonId: null,
|
|
48610
|
+
access: "view"
|
|
48611
|
+
},
|
|
48612
|
+
"calendarSource.listCalendars": {
|
|
48613
|
+
capName: "calendar-source",
|
|
48614
|
+
capScope: "system",
|
|
48615
|
+
addonId: null,
|
|
48616
|
+
access: "view"
|
|
48617
|
+
},
|
|
48618
|
+
"calendarSource.listEvents": {
|
|
48619
|
+
capName: "calendar-source",
|
|
48620
|
+
capScope: "system",
|
|
48621
|
+
addonId: null,
|
|
48622
|
+
access: "view"
|
|
48623
|
+
},
|
|
48458
48624
|
"cameraCredentials.getCredentials": {
|
|
48459
48625
|
capName: "camera-credentials",
|
|
48460
48626
|
capScope: "device",
|
|
@@ -58881,4 +59047,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
58881
59047
|
return out;
|
|
58882
59048
|
}
|
|
58883
59049
|
//#endregion
|
|
58884
|
-
export {
|
|
59050
|
+
export { collectSecretConfigKeys as $, asNumber as $n, objectInputDeclaresRequiredDeviceId as $t, REDACTED_SECRET as A, buildFfmpegArgs as An, gbToBytes as At, UserRecordSchema as B, toExpressionValue as Bn, localNetworkCapability as Bt, LOG_LEVEL_RANK as C, userManagementCapability as Cn, evaluateCompositionField as Ct, MINUTES_PER_DAY as D, vectorStoreCapability as Dn, filesystemBrowseCapability as Dt, METHOD_ACCESS_MAP as E, vectorIndexDimConflictError as En, extractNestedAddonId as Et, ScopedTokenSchema as F, compositionItemFieldPath as Fn, isVoidInput as Ft, authProviderCapability as G, BaseAddon as Gn, mayReadLocation as Gt, addonSettingsCapability as H, DeviceRole as Hn, logDestinationCapability as Ht, StorageCleanupJobSchema as I, compositionSliceKey as In, kebabToCamel as It, batteryCapability as J, DEVICE_STATUS_METHOD as Jn, metricsProviderCapability as Jt, backupCapability as K, DATAPLANE_SECRET_HEADER as Kn, mayWriteToLocation as Kt, StorageLocationModeSchema as L, compositionSourceKey as Ln, legacyAutoLinkIds as Lt, RecordingStatusSchema as M, composedDeviceRef as Mn, isCollectionArrayMethod as Mt, STORAGE_ACCESS_FALLBACK as N, composedDeviceStableId as Nn, isLocationEnabled as Nt, MOTION_CLOSE_AFTER_MS as O, withLocationMode as On, foldSnapshotByFunction as Ot, STREAM_PROFILE_META as P, compositionFeatureEnabled as Pn, isObjectInput as Pt, cameraGridLayoutCapability as Q, asJsonObject as Qn, objectInputDeclaresAddonId as Qt, StorageLocationTypeSchema as R, createStatefulExpressionMemory as Rn, legacyModeOf as Rt, FieldClaimSchema as S, streamQualityLabel as Sn, enumerateSchemaFields as St, LocationIconIdSchema as T, vectorDimFromBase64 as Tn, expandContainer as Tt, addonWidgetsCapability as U, DeviceType as Un, logLevelAtMost as Ut, addonPagesCapability as V, DeviceFeature as Vn, locationIconKey as Vt, alertsCapability as W, errMsg as Wn, looseSchema as Wt, buildStreamParamsConfigSchema as X, ReadinessTimeoutError as Xn, motionCapability as Xt, buildCapabilityLookup as Y, ReadinessRegistry as Yn, modeMayWrite as Yt, calendarsCapability as Z, WELL_KNOWN_TAB_MAP as Zn, normalizeUnit as Zt, DERIVED_CAMERA_SILENCED_CAP_NAMES as _, storageCapability as _n, deviceManagerCapability as _t, BatteryStatusSchema as a, reducePoints as an, hydrateSchema as ar, coreBlockIdFromAddonId as at, FIRST_LEVEL_MACRO_CLASSES as b, storageProviderCapability as bn, enumerateInferenceDevices as bt, COMPOSED_ITEM_FIXED_FIELDS as c, resolveLocationMode as cn, nodePin as cr, createDeviceExtensionProvider as ct, CORE_BLOCK_ADDON_PREFIX as d, scopesAllowAddon as dn, readinessKey as dr, declarationOwnerNodeId as dt, parseStreamParamsFormPatch as en, asString$1 as er, composerCapability as et, CoreBlockSchema as f, scopesAllowDeviceCap as fn, resolveCapMount as fr, decodeVectorBase64 as ft, DAY_NAMES as g, snapshotCapability as gn, EventCategory as gr, deviceExtensionCapability as gt, DATABASE_SNAPSHOT_TIMEOUT_MS as h, siteZoneKey as hn, toNodeId as hr, describeComposableCaps as ht, BaseDevice as i, ptzAutotrackCapability as in, expandCapMethods as ir, coreBlockComposition as it, RUNTIME_DEFAULTS as j, cloneStatefulExpressionMemory as jn, isArrayOutputSchema as jt, RECORDING_SOURCE_CAMSTACK_ADDON as k, COMPOSER_ADDON_ID as kn, formatMinutes as kt, COMPOSER_RUNNER_ID as l, resolveMethodAuth as ln, parseJsonObject as lr, dataStoreProviderCapability as lt, DATABASE_SNAPSHOT_SUFFIX as m, settingsStoreCapability as mn, sleep as mr, deriveBatteryPresence as mt, AlertSchema as n, platformProbeCapability as nn, emitDownForOwnedCaps as nr, compositionSourceRefs as nt, CAMERA_SWITCH_ORDER as o, replacedFieldKeys as on, isDeviceConfigCap as or, coreBlockSourceKind as ot, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as p, scoreRuntimes as pn, scopeKey as pr, defineExtensionSlotProvider as pt, bareAddonId as q, DEVICE_SETTINGS_CONTRIBUTION_METHODS as qn, memoizePinnedFfmpeg as qt, ApiKeyRecordSchema as r, procedureAuthKey as rn, emitReadiness as rr, coreBlockAddonId as rt, CAP_NAMES_WITH_STATUS as s, resolveBucketMs as sn, isEvent as sr, coreBlocksCapability as st, ALL_CAPABILITY_DEFINITIONS as t, planComposition as tn, createEvent as tr, compositionFieldKey as tt, CORE_BLOCKS_ADDON_ID as u, runtimeStatePolicyFor as un, parseJsonUnknown as ur, databaseSnapshotCapability as ut, DeclaredDevices as v, storageMigrationCapability as vn, deviceStateCapability as vt, LegacyStorageLocationDefaultSchema as w, validateComposition as wn, evictionPolicyOfLocation as wt, FieldClaimModeSchema as x, streamCatalogCapability as xn, enumerateItemArrayFields as xt, DeviceStatusSchema as y, storageOccupancyCapability as yn, deviceStatusCapability as yt, StorageMigrationJobSchema as z, disarmRoseMemory as zn, lifecycleJobSchema as zt };
|
|
@@ -21413,19 +21413,52 @@ var NcAlarmNonBlockingEditSchema = zod.z.object({
|
|
|
21413
21413
|
nonBlocking: zod.z.boolean()
|
|
21414
21414
|
});
|
|
21415
21415
|
/**
|
|
21416
|
-
*
|
|
21417
|
-
*
|
|
21416
|
+
* Controllable openings: opt IN to blocking (default is do not block). Contacts
|
|
21417
|
+
* keep using {@link NcAlarmNonBlockingEditSchema}.
|
|
21418
21418
|
*/
|
|
21419
|
-
var
|
|
21419
|
+
var NcAlarmBlockingEditSchema = zod.z.object({
|
|
21420
|
+
mode: AlarmArmModeSchema,
|
|
21421
|
+
deviceId: zod.z.number().int().positive(),
|
|
21422
|
+
/** true = on the list (blocks when open); false = off the list (default). */
|
|
21423
|
+
blocking: zod.z.boolean()
|
|
21424
|
+
});
|
|
21425
|
+
/**
|
|
21426
|
+
* Controllable openings: opt OUT of secure-on-arm (default is secure ON —
|
|
21427
|
+
* close / lock / turn off when this mode arms).
|
|
21428
|
+
*/
|
|
21429
|
+
var NcAlarmSecureOnArmEditSchema = zod.z.object({
|
|
21430
|
+
mode: AlarmArmModeSchema,
|
|
21431
|
+
deviceId: zod.z.number().int().positive(),
|
|
21432
|
+
/** true = secure on arm (default); false = do not actuate on arm. */
|
|
21433
|
+
secureOnArm: zod.z.boolean()
|
|
21434
|
+
});
|
|
21435
|
+
/**
|
|
21436
|
+
* One arm mode's device-id list (non-blocking, blocking, or secure-on-arm-off).
|
|
21437
|
+
*/
|
|
21438
|
+
var NcAlarmModeDeviceListSchema = zod.z.object({
|
|
21420
21439
|
mode: AlarmArmModeSchema,
|
|
21421
21440
|
deviceIds: zod.z.array(zod.z.number().int()).max(200)
|
|
21422
21441
|
});
|
|
21423
21442
|
/**
|
|
21443
|
+
* One arm mode's non-blocking list: devices that may be open when that mode
|
|
21444
|
+
* arms, without the arm being refused.
|
|
21445
|
+
*/
|
|
21446
|
+
var NcAlarmNonBlockingSchema = NcAlarmModeDeviceListSchema;
|
|
21447
|
+
/** Controllable devices that DO block when open (opt-in; default empty). */
|
|
21448
|
+
var NcAlarmBlockingSchema = NcAlarmModeDeviceListSchema;
|
|
21449
|
+
/**
|
|
21450
|
+
* Controllable devices that do NOT secure on arm (opt-out; default empty =
|
|
21451
|
+
* every controllable secures).
|
|
21452
|
+
*/
|
|
21453
|
+
var NcAlarmSecureOnArmOffSchema = NcAlarmModeDeviceListSchema;
|
|
21454
|
+
/**
|
|
21424
21455
|
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
21425
21456
|
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
21426
21457
|
* at the boundary rather than interpreted.
|
|
21427
21458
|
*/
|
|
21428
21459
|
var NcAlarmNonBlockingListSchema = zod.z.array(NcAlarmNonBlockingSchema).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
|
|
21460
|
+
var NcAlarmBlockingListSchema = zod.z.array(NcAlarmBlockingSchema).max(8).refine(uniqueModes, { message: "blocking: at most one list per arm mode" });
|
|
21461
|
+
var NcAlarmSecureOnArmOffListSchema = zod.z.array(NcAlarmSecureOnArmOffSchema).max(8).refine(uniqueModes, { message: "secureOnArmOff: at most one list per arm mode" });
|
|
21429
21462
|
/**
|
|
21430
21463
|
* The three durations — global, and per mode since D697 — the panel's state
|
|
21431
21464
|
* machine runs on, who hears about its transitions, and which openings each mode tolerates.
|
|
@@ -21468,9 +21501,23 @@ var NcAlarmSettingsSchema = zod.z.object({
|
|
|
21468
21501
|
* arm (a window left ajar for the cat under `home`, say). At most one entry
|
|
21469
21502
|
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
21470
21503
|
* parses as "every opening blocks" — the behaviour it was written under.
|
|
21504
|
+
* Contacts use this list; controllable openings use {@link blocking} instead
|
|
21505
|
+
* (default: do not block).
|
|
21471
21506
|
*/
|
|
21472
21507
|
nonBlocking: NcAlarmNonBlockingListSchema.default([]),
|
|
21473
21508
|
/**
|
|
21509
|
+
* Per arm mode, controllable openings that DO refuse the arm when open.
|
|
21510
|
+
* Default `[]` = none block (secure-on-arm closes them instead). Absent on a
|
|
21511
|
+
* blob older than this field — read as empty.
|
|
21512
|
+
*/
|
|
21513
|
+
blocking: NcAlarmBlockingListSchema.default([]),
|
|
21514
|
+
/**
|
|
21515
|
+
* Per arm mode, controllable openings that must NOT be actuated on arm.
|
|
21516
|
+
* Default `[]` = every controllable secures (close / lock / off). Absent on
|
|
21517
|
+
* an older blob — read as empty (secure ON).
|
|
21518
|
+
*/
|
|
21519
|
+
secureOnArmOff: NcAlarmSecureOnArmOffListSchema.default([]),
|
|
21520
|
+
/**
|
|
21474
21521
|
* Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
|
|
21475
21522
|
* without a field, uses the global value above — so `[]`, the default, is exactly the
|
|
21476
21523
|
* behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
|
|
@@ -21480,7 +21527,7 @@ var NcAlarmSettingsSchema = zod.z.object({
|
|
|
21480
21527
|
/**
|
|
21481
21528
|
* Every field optional — a tab edits one control at a time.
|
|
21482
21529
|
*
|
|
21483
|
-
*
|
|
21530
|
+
* List fields and `modeDelays` are re-declared WITHOUT their defaults:
|
|
21484
21531
|
* `.partial()` does not remove an inner `.default()`, so a patch that never
|
|
21485
21532
|
* named the field would parse to `[]` and wipe every mode's list on an
|
|
21486
21533
|
* unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
|
|
@@ -21488,11 +21535,15 @@ var NcAlarmSettingsSchema = zod.z.object({
|
|
|
21488
21535
|
*/
|
|
21489
21536
|
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
|
|
21490
21537
|
nonBlocking: NcAlarmNonBlockingListSchema,
|
|
21538
|
+
blocking: NcAlarmBlockingListSchema,
|
|
21539
|
+
secureOnArmOff: NcAlarmSecureOnArmOffListSchema,
|
|
21491
21540
|
/** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
|
|
21492
21541
|
modeDelays: NcAlarmModeDelaysEditListSchema,
|
|
21493
21542
|
/** ONE membership change; the panel applies it to the list it holds at its turn. */
|
|
21494
|
-
nonBlockingEdit: NcAlarmNonBlockingEditSchema
|
|
21495
|
-
|
|
21543
|
+
nonBlockingEdit: NcAlarmNonBlockingEditSchema,
|
|
21544
|
+
blockingEdit: NcAlarmBlockingEditSchema,
|
|
21545
|
+
secureOnArmEdit: NcAlarmSecureOnArmEditSchema
|
|
21546
|
+
}).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" }).refine((p) => p.blocking === void 0 || p.blockingEdit === void 0, { message: "blocking and blockingEdit are exclusive — send the whole lists or one edit" }).refine((p) => p.secureOnArmOff === void 0 || p.secureOnArmEdit === void 0, { message: "secureOnArmOff and secureOnArmEdit are exclusive — send the whole lists or one edit" });
|
|
21496
21547
|
/**
|
|
21497
21548
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
21498
21549
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -21607,7 +21658,13 @@ var NcAlarmSensorStateSchema = zod.z.object({
|
|
|
21607
21658
|
/** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
|
|
21608
21659
|
unknownWhy: zod.z.enum(["read-failed", "unknown-word"]).nullable(),
|
|
21609
21660
|
/** The device manager's liveness as the centre mirrors it; null = not known. */
|
|
21610
|
-
online: zod.z.boolean().nullable()
|
|
21661
|
+
online: zod.z.boolean().nullable(),
|
|
21662
|
+
/**
|
|
21663
|
+
* True when the opening is a cover / lock / switch — the table shows the
|
|
21664
|
+
* Secure-on-arm switch and uses the controllable defaults. False for contacts
|
|
21665
|
+
* and for non-openings. Defaulted so an older hub answer still parses.
|
|
21666
|
+
*/
|
|
21667
|
+
controllable: zod.z.boolean().default(false)
|
|
21611
21668
|
});
|
|
21612
21669
|
var NcAlarmSensorsInputSchema = zod.z.object({ deviceIds: zod.z.array(zod.z.number().int().positive()).max(500) });
|
|
21613
21670
|
var NcAlarmSensorsSchema = zod.z.object({
|
|
@@ -32764,6 +32821,83 @@ var buttonCapability = {
|
|
|
32764
32821
|
}) }
|
|
32765
32822
|
};
|
|
32766
32823
|
/**
|
|
32824
|
+
* `calendar-source` — collection cap exposing per-provider calendars and
|
|
32825
|
+
* their events. Every addon that contributes calendars (Home Assistant,
|
|
32826
|
+
* a future Google Calendar addon, …) registers a provider here. The hub
|
|
32827
|
+
* singleton `calendars` walks the collection and merges the answers.
|
|
32828
|
+
*
|
|
32829
|
+
* Mirrors `addon-pages-source`: the public listing is a different shape
|
|
32830
|
+
* (source-stamped ids) and lives on the aggregator.
|
|
32831
|
+
*/
|
|
32832
|
+
var CalendarSourceKindSchema = zod.z.enum(["ha", "addon"]);
|
|
32833
|
+
var CalendarInfoSchema = zod.z.object({
|
|
32834
|
+
/** Provider-local id (e.g. HA `calendar.family`). The aggregator prefixes. */
|
|
32835
|
+
id: zod.z.string().min(1),
|
|
32836
|
+
name: zod.z.string().min(1),
|
|
32837
|
+
source: CalendarSourceKindSchema,
|
|
32838
|
+
enabled: zod.z.boolean()
|
|
32839
|
+
});
|
|
32840
|
+
var CalendarEventSchema = zod.z.object({
|
|
32841
|
+
id: zod.z.string().min(1),
|
|
32842
|
+
calendarId: zod.z.string().min(1),
|
|
32843
|
+
title: zod.z.string(),
|
|
32844
|
+
startMs: zod.z.number().int(),
|
|
32845
|
+
endMs: zod.z.number().int(),
|
|
32846
|
+
allDay: zod.z.boolean().optional(),
|
|
32847
|
+
description: zod.z.string().optional(),
|
|
32848
|
+
location: zod.z.string().optional()
|
|
32849
|
+
});
|
|
32850
|
+
var CalendarListEventsInputSchema = zod.z.object({
|
|
32851
|
+
calendarIds: zod.z.array(zod.z.string().min(1)).max(64).optional(),
|
|
32852
|
+
startMs: zod.z.number().int(),
|
|
32853
|
+
endMs: zod.z.number().int()
|
|
32854
|
+
});
|
|
32855
|
+
var calendarSourceCapability = {
|
|
32856
|
+
name: "calendar-source",
|
|
32857
|
+
scope: "system",
|
|
32858
|
+
mode: "collection",
|
|
32859
|
+
internal: true,
|
|
32860
|
+
methods: {
|
|
32861
|
+
listCalendars: method(zod.z.void(), zod.z.array(CalendarInfoSchema).readonly(), { auth: "admin" }),
|
|
32862
|
+
listEvents: method(CalendarListEventsInputSchema, zod.z.array(CalendarEventSchema).readonly(), { auth: "admin" })
|
|
32863
|
+
}
|
|
32864
|
+
};
|
|
32865
|
+
/**
|
|
32866
|
+
* `calendars` — system-scoped singleton. Public surface admin-ui and the
|
|
32867
|
+
* notification-center calendar-events producer consume.
|
|
32868
|
+
*
|
|
32869
|
+
* Walks every `calendar-source` provider, stamps each calendar with a
|
|
32870
|
+
* cluster-stable id (`<sourceAddonId>:<localId>`) and the providing
|
|
32871
|
+
* addon's id, and fans `listEvents` out the same way. Home Assistant
|
|
32872
|
+
* import is a built-in refresh of the HA source rather than a second
|
|
32873
|
+
* registry — `importFromHomeAssistant` asks that source to re-discover.
|
|
32874
|
+
*/
|
|
32875
|
+
var CalendarEntrySchema = CalendarInfoSchema.extend({
|
|
32876
|
+
/** Cluster-stable id: `<providerAddonId>:<localId>`. */
|
|
32877
|
+
id: zod.z.string().min(1),
|
|
32878
|
+
/** The addon that registered the calendar-source provider. */
|
|
32879
|
+
providerAddonId: zod.z.string().min(1).optional()
|
|
32880
|
+
});
|
|
32881
|
+
var CalendarImportResultSchema = zod.z.object({
|
|
32882
|
+
imported: zod.z.number().int().nonnegative(),
|
|
32883
|
+
/** Absent when no HA calendar-source provider was reachable. */
|
|
32884
|
+
providerAddonId: zod.z.string().min(1).optional(),
|
|
32885
|
+
error: zod.z.string().optional()
|
|
32886
|
+
});
|
|
32887
|
+
var calendarsCapability = {
|
|
32888
|
+
name: "calendars",
|
|
32889
|
+
scope: "system",
|
|
32890
|
+
mode: "singleton",
|
|
32891
|
+
methods: {
|
|
32892
|
+
listCalendars: method(zod.z.void(), zod.z.array(CalendarEntrySchema).readonly(), { auth: "admin" }),
|
|
32893
|
+
listEvents: method(CalendarListEventsInputSchema, zod.z.array(CalendarEventSchema).readonly(), { auth: "admin" }),
|
|
32894
|
+
importFromHomeAssistant: method(zod.z.void(), CalendarImportResultSchema, {
|
|
32895
|
+
auth: "admin",
|
|
32896
|
+
kind: "mutation"
|
|
32897
|
+
})
|
|
32898
|
+
}
|
|
32899
|
+
};
|
|
32900
|
+
/**
|
|
32767
32901
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
32768
32902
|
* + auth surface in a vendor-neutral shape.
|
|
32769
32903
|
*
|
|
@@ -47535,6 +47669,8 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
47535
47669
|
brightnessCapability,
|
|
47536
47670
|
brokerCapability,
|
|
47537
47671
|
buttonCapability,
|
|
47672
|
+
calendarSourceCapability,
|
|
47673
|
+
calendarsCapability,
|
|
47538
47674
|
cameraCredentialsCapability,
|
|
47539
47675
|
cameraGridLayoutCapability,
|
|
47540
47676
|
cameraPipelineConfigCapability,
|
|
@@ -48455,6 +48591,36 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
48455
48591
|
addonId: null,
|
|
48456
48592
|
access: "create"
|
|
48457
48593
|
},
|
|
48594
|
+
"calendars.importFromHomeAssistant": {
|
|
48595
|
+
capName: "calendars",
|
|
48596
|
+
capScope: "system",
|
|
48597
|
+
addonId: null,
|
|
48598
|
+
access: "create"
|
|
48599
|
+
},
|
|
48600
|
+
"calendars.listCalendars": {
|
|
48601
|
+
capName: "calendars",
|
|
48602
|
+
capScope: "system",
|
|
48603
|
+
addonId: null,
|
|
48604
|
+
access: "view"
|
|
48605
|
+
},
|
|
48606
|
+
"calendars.listEvents": {
|
|
48607
|
+
capName: "calendars",
|
|
48608
|
+
capScope: "system",
|
|
48609
|
+
addonId: null,
|
|
48610
|
+
access: "view"
|
|
48611
|
+
},
|
|
48612
|
+
"calendarSource.listCalendars": {
|
|
48613
|
+
capName: "calendar-source",
|
|
48614
|
+
capScope: "system",
|
|
48615
|
+
addonId: null,
|
|
48616
|
+
access: "view"
|
|
48617
|
+
},
|
|
48618
|
+
"calendarSource.listEvents": {
|
|
48619
|
+
capName: "calendar-source",
|
|
48620
|
+
capScope: "system",
|
|
48621
|
+
addonId: null,
|
|
48622
|
+
access: "view"
|
|
48623
|
+
},
|
|
48458
48624
|
"cameraCredentials.getCredentials": {
|
|
48459
48625
|
capName: "camera-credentials",
|
|
48460
48626
|
capScope: "device",
|
|
@@ -59277,6 +59443,12 @@ Object.defineProperty(exports, "buildStreamParamsConfigSchema", {
|
|
|
59277
59443
|
return buildStreamParamsConfigSchema;
|
|
59278
59444
|
}
|
|
59279
59445
|
});
|
|
59446
|
+
Object.defineProperty(exports, "calendarsCapability", {
|
|
59447
|
+
enumerable: true,
|
|
59448
|
+
get: function() {
|
|
59449
|
+
return calendarsCapability;
|
|
59450
|
+
}
|
|
59451
|
+
});
|
|
59280
59452
|
Object.defineProperty(exports, "cameraGridLayoutCapability", {
|
|
59281
59453
|
enumerable: true,
|
|
59282
59454
|
get: function() {
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { ScopedTokenManager } from './auth/scoped-token-manager.js';
|
|
|
13
13
|
export type { UserConfigReader, UserRecord, UserStorageAccess } from './auth/user-manager.js';
|
|
14
14
|
export { UserManager } from './auth/user-manager.js';
|
|
15
15
|
export { AlertCenterAddon } from './builtins/alerts/index.js';
|
|
16
|
+
export { CalendarsAddon } from './builtins/calendars/index.js';
|
|
16
17
|
export { ComposerAddon } from './builtins/composer/index.js';
|
|
17
18
|
export { ConsoleDestination, ConsoleLoggingAddon } from './builtins/console-logging/index.js';
|
|
18
19
|
export { CoreBlocksAddon } from './builtins/core-blocks/index.js';
|