@camstack/types 1.2.539 → 1.2.541
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/CHANGELOG.md +29 -0
- package/dist/addon.js +44 -12
- package/dist/addon.mjs +44 -12
- package/dist/capabilities/capability-definition.d.ts +4 -0
- package/dist/capabilities/climate-control.cap.d.ts +18 -6
- package/dist/capabilities/cluster-update.cap.d.ts +376 -0
- package/dist/capabilities/cover.cap.d.ts +9 -3
- package/dist/capabilities/device-manager.cap.d.ts +117 -0
- package/dist/capabilities/device-search.d.ts +168 -0
- package/dist/capabilities/fan-control.cap.d.ts +12 -4
- package/dist/capabilities/hero-layout.cap.d.ts +4 -0
- package/dist/capabilities/hub-address.d.ts +10 -0
- package/dist/capabilities/index.d.ts +8 -5
- package/dist/capabilities/lock-control.cap.d.ts +3 -1
- package/dist/capabilities/media-player.cap.d.ts +48 -16
- package/dist/capabilities/notification-output.cap.d.ts +40 -0
- package/dist/capabilities/notification-rules.cap.d.ts +366 -0
- package/dist/capabilities/osd-manager.cap.d.ts +40 -277
- package/dist/capabilities/valve.cap.d.ts +3 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.js +94 -8
- package/dist/client.mjs +94 -9
- package/dist/{composed-stable-id-C3J6LxC9.js → composed-stable-id-BtaMj_W7.js} +4 -0
- package/dist/{composed-stable-id-DLcPInGv.mjs → composed-stable-id-jnvhwGoH.mjs} +4 -0
- package/dist/device/container-primary-child.d.ts +39 -4
- package/dist/device/device-binding.d.ts +6 -0
- package/dist/device/device-feature-requirements.d.ts +137 -0
- package/dist/device/device-management.d.ts +9 -0
- package/dist/device/device-type.d.ts +5 -1
- package/dist/device/hero/hero-model.d.ts +14 -0
- package/dist/device/implemented-methods.d.ts +6 -0
- package/dist/device/linked-device-resolve.d.ts +2 -0
- package/dist/expression/device-template.d.ts +31 -1
- package/dist/generated/addon-api.d.ts +50 -7
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/device-proxy.d.ts +2 -2
- 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 +3 -1
- package/dist/{composition-BcVAbtBc.js → implemented-methods-C_iV6BiP.js} +17 -1
- package/dist/{composition-BFJq1Y88.mjs → implemented-methods-OitwyO1Y.mjs} +12 -2
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1231 -444
- package/dist/index.mjs +944 -203
- package/dist/interfaces/addon.d.ts +7 -0
- package/dist/interfaces/event-bus.d.ts +2 -0
- package/dist/migrations/api/migration-api.v1.d.ts +11 -0
- package/dist/migrations/api/migration-api.v1.schema.d.ts +25 -0
- package/dist/node.d.ts +1 -0
- package/dist/node.js +26 -25
- package/dist/node.mjs +3 -3
- package/dist/notification/degrade-engine.d.ts +7 -1
- package/dist/notification/notification-fields.d.ts +69 -0
- package/dist/notification/timelapse-rule.d.ts +69 -0
- package/dist/{sleep-VrfKAAGN.mjs → sleep-Cw1uUXvl.mjs} +5 -2
- package/dist/{sleep-DgCXXFc3.js → sleep-PfAAmxV-.js} +5 -2
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -392,8 +392,31 @@ var TargetKindAttachmentsCapsSchema = zod.z.object({
|
|
|
392
392
|
max: zod.z.number().int().nonnegative(),
|
|
393
393
|
maxBytes: zod.z.number().int().positive().optional()
|
|
394
394
|
});
|
|
395
|
+
/**
|
|
396
|
+
* Which TEXT fields a kind delivers (#483). Alexa speaks a title and nothing
|
|
397
|
+
* else; a push service shows both.
|
|
398
|
+
*
|
|
399
|
+
* `.optional()` on the caps block, never defaulted: absent = both, which is
|
|
400
|
+
* what every kind declared before this field meant (D938's rule for a Zod
|
|
401
|
+
* default on the addon cap path).
|
|
402
|
+
*/
|
|
403
|
+
var TargetKindTextCapsSchema = zod.z.object({
|
|
404
|
+
title: zod.z.boolean(),
|
|
405
|
+
body: zod.z.boolean()
|
|
406
|
+
});
|
|
407
|
+
zod.z.enum([
|
|
408
|
+
"title",
|
|
409
|
+
"body",
|
|
410
|
+
"attachments",
|
|
411
|
+
"actions",
|
|
412
|
+
"priority",
|
|
413
|
+
"sound",
|
|
414
|
+
"clickUrl"
|
|
415
|
+
]);
|
|
395
416
|
/** The full capability block consulted before dispatch. */
|
|
396
417
|
var TargetKindCapsSchema = zod.z.object({
|
|
418
|
+
/** Text fields this kind delivers (#483). Absent = title AND body. */
|
|
419
|
+
text: TargetKindTextCapsSchema.optional(),
|
|
397
420
|
attachments: TargetKindAttachmentsCapsSchema,
|
|
398
421
|
/** Max action buttons (0 = none). */
|
|
399
422
|
actions: zod.z.number().int().nonnegative(),
|
|
@@ -23742,6 +23765,26 @@ var NcRuleTargetSchema = zod.z.object({
|
|
|
23742
23765
|
*/
|
|
23743
23766
|
params: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
23744
23767
|
});
|
|
23768
|
+
/** Which picture kind one target receives (#487). */
|
|
23769
|
+
var NcTargetAttachmentSchema = zod.z.enum([
|
|
23770
|
+
"none",
|
|
23771
|
+
"image",
|
|
23772
|
+
"clip",
|
|
23773
|
+
"gif"
|
|
23774
|
+
]);
|
|
23775
|
+
var NcTargetOverrideSchema = zod.z.object({
|
|
23776
|
+
template: zod.z.object({
|
|
23777
|
+
title: zod.z.string().max(500).optional(),
|
|
23778
|
+
body: zod.z.string().max(2e3).optional()
|
|
23779
|
+
}).optional(),
|
|
23780
|
+
schedule: NcScheduleSchema.optional(),
|
|
23781
|
+
priority: zod.z.number().int().min(1).max(5).optional(),
|
|
23782
|
+
attachment: NcTargetAttachmentSchema.optional(),
|
|
23783
|
+
/** `false` = no buttons for this target; `true` is the same as absent. */
|
|
23784
|
+
actions: zod.z.boolean().optional()
|
|
23785
|
+
});
|
|
23786
|
+
/** Per-target settings keyed by target id (#487). */
|
|
23787
|
+
var NcTargetOverridesSchema = zod.z.record(zod.z.string(), NcTargetOverrideSchema);
|
|
23745
23788
|
/**
|
|
23746
23789
|
* WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
|
|
23747
23790
|
*
|
|
@@ -24036,6 +24079,13 @@ var NcRuleInputSchema = zod.z.object({
|
|
|
24036
24079
|
* targets.
|
|
24037
24080
|
*/
|
|
24038
24081
|
targetUsers: zod.z.array(zod.z.string()).optional(),
|
|
24082
|
+
/**
|
|
24083
|
+
* Per-target settings keyed by target id (#487): texts, schedule, priority.
|
|
24084
|
+
* Absent (and an absent entry) = the rule's own values. A patch that omits
|
|
24085
|
+
* the key keeps the stored map; a patch that names it REPLACES it whole —
|
|
24086
|
+
* `{}` empties it.
|
|
24087
|
+
*/
|
|
24088
|
+
targetOverrides: NcTargetOverridesSchema.optional(),
|
|
24039
24089
|
/** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
|
|
24040
24090
|
* detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
|
|
24041
24091
|
media: NcMediaPolicySchema.default({}),
|
|
@@ -26535,9 +26585,11 @@ function remoteRoleLabel(role, locale) {
|
|
|
26535
26585
|
* priority-in-sync.ts` fails the build when either drifts — the comment that
|
|
26536
26586
|
* used to ask for this could not.
|
|
26537
26587
|
*
|
|
26538
|
-
* The rule has
|
|
26539
|
-
* wins outright; else
|
|
26540
|
-
*
|
|
26588
|
+
* The rule has four steps and the ORDER matters: an operator's explicit pick
|
|
26589
|
+
* wins outright; else the container's own declaration, an ordered list of
|
|
26590
|
+
* child keys its provider stamped at create
|
|
26591
|
+
* ({@link ContainerPrimaryChildPreference}); else a declaration on the device
|
|
26592
|
+
* type ({@link CONTAINER_PRIMARY_CHILD_RULES}); else role, namesake, then type
|
|
26541
26593
|
* priority. The pick is keyed on the child's re-sync-stable `entityId`, not
|
|
26542
26594
|
* its numeric id, so it survives a re-sync that reallocates ids.
|
|
26543
26595
|
*/
|
|
@@ -26550,6 +26602,25 @@ var CONTAINER_PRIMARY_CHILD_RULES = [{
|
|
|
26550
26602
|
deviceType: DeviceType.HeatPump,
|
|
26551
26603
|
primary: "self"
|
|
26552
26604
|
}];
|
|
26605
|
+
/** The declaration of a container read from its meta, or undefined when it declared none. */
|
|
26606
|
+
function primaryChildPreferenceOf(container) {
|
|
26607
|
+
const keys = container.primaryChildPreference;
|
|
26608
|
+
if (container.stableId === void 0 || keys === void 0 || keys === null) return void 0;
|
|
26609
|
+
if (keys.length === 0) return void 0;
|
|
26610
|
+
return {
|
|
26611
|
+
parentStableId: container.stableId,
|
|
26612
|
+
childKeys: keys
|
|
26613
|
+
};
|
|
26614
|
+
}
|
|
26615
|
+
/** The first declared child that exists, or undefined when none does. */
|
|
26616
|
+
function applyPrimaryChildPreference(preference, children) {
|
|
26617
|
+
if (preference === void 0) return void 0;
|
|
26618
|
+
for (const key of preference.childKeys) {
|
|
26619
|
+
const expected = `${preference.parentStableId}-${key}`;
|
|
26620
|
+
const match = children.find((child) => child.stableId === expected);
|
|
26621
|
+
if (match !== void 0) return match;
|
|
26622
|
+
}
|
|
26623
|
+
}
|
|
26553
26624
|
/**
|
|
26554
26625
|
* The type declaration, before the heuristic. `fall-through` means the
|
|
26555
26626
|
* heuristic still decides: the type declared nothing, or it named a child
|
|
@@ -26657,7 +26728,8 @@ function rank(type) {
|
|
|
26657
26728
|
}
|
|
26658
26729
|
/**
|
|
26659
26730
|
* The child a container stands for: the operator's pick when it still exists,
|
|
26660
|
-
* else the
|
|
26731
|
+
* else the container's declared preference, else the device type's
|
|
26732
|
+
* declaration, else the highest-priority type. `null`
|
|
26661
26733
|
* for a childless container, and for a type that stands for itself — a caller
|
|
26662
26734
|
* must decide what "no child" means for it, rather than being handed a child
|
|
26663
26735
|
* that is not the device.
|
|
@@ -26689,11 +26761,13 @@ function sameName(childName, containerName) {
|
|
|
26689
26761
|
const flatten = (v) => v.toLowerCase().replace(/[-_\s]+/g, " ").trim();
|
|
26690
26762
|
return flatten(childName) === flatten(containerName);
|
|
26691
26763
|
}
|
|
26692
|
-
function resolveContainerPrimaryChild(children, overrideEntityId, containerName, containerType) {
|
|
26764
|
+
function resolveContainerPrimaryChild(children, overrideEntityId, containerName, containerType, preference) {
|
|
26693
26765
|
if (overrideEntityId !== void 0 && overrideEntityId !== null) {
|
|
26694
26766
|
const picked = children.find((c) => c.stableId === overrideEntityId) ?? children.find((c) => c.entityId !== void 0 && c.entityId === overrideEntityId);
|
|
26695
26767
|
if (picked !== void 0) return picked;
|
|
26696
26768
|
}
|
|
26769
|
+
const preferred = applyPrimaryChildPreference(preference, children);
|
|
26770
|
+
if (preferred !== void 0) return preferred;
|
|
26697
26771
|
const declared = applyPrimaryChildRule(CONTAINER_PRIMARY_CHILD_RULES.find((entry) => entry.deviceType === containerType), children);
|
|
26698
26772
|
if (declared.kind === "none") return null;
|
|
26699
26773
|
if (declared.kind === "child") return declared.child;
|
|
@@ -27605,6 +27679,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
27605
27679
|
setLinkDeviceId: (input) => dispatchSystem("deviceManager", "setLinkDeviceId", "mutation", input),
|
|
27606
27680
|
setPrimaryChildEntityId: (input) => dispatchSystem("deviceManager", "setPrimaryChildEntityId", "mutation", input),
|
|
27607
27681
|
setChildLayout: (input) => dispatchSystem("deviceManager", "setChildLayout", "mutation", input),
|
|
27682
|
+
setPrimaryChildPreference: (input) => dispatchSystem("deviceManager", "setPrimaryChildPreference", "mutation", input),
|
|
27608
27683
|
setDisplay: (input) => dispatchSystem("deviceManager", "setDisplay", "mutation", input),
|
|
27609
27684
|
getWireableFields: (input) => dispatchSystem("deviceManager", "getWireableFields", "query", input),
|
|
27610
27685
|
setRole: (input) => dispatchSystem("deviceManager", "setRole", "mutation", input),
|
|
@@ -27655,11 +27730,11 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
27655
27730
|
const notificationRulesInterface = { setDeviceMuted: (input) => dispatchSystem("notificationRules", "setDeviceMuted", "mutation", input) };
|
|
27656
27731
|
const osdManagerInterface = {
|
|
27657
27732
|
getDeviceOsd: (input) => dispatchSystem("osdManager", "getDeviceOsd", "query", input),
|
|
27658
|
-
getSourceCatalog: (input) => dispatchSystem("osdManager", "getSourceCatalog", "query", input),
|
|
27659
27733
|
setSlotBinding: (input) => dispatchSystem("osdManager", "setSlotBinding", "mutation", input),
|
|
27660
27734
|
clearSlotBinding: (input) => dispatchSystem("osdManager", "clearSlotBinding", "mutation", input),
|
|
27661
27735
|
setSlotCameraEnabled: (input) => dispatchSystem("osdManager", "setSlotCameraEnabled", "mutation", input),
|
|
27662
27736
|
previewSlot: (input) => dispatchSystem("osdManager", "previewSlot", "mutation", input),
|
|
27737
|
+
previewTemplate: (input) => dispatchSystem("osdManager", "previewTemplate", "mutation", input),
|
|
27663
27738
|
renderDevice: (input) => dispatchSystem("osdManager", "renderDevice", "mutation", input)
|
|
27664
27739
|
};
|
|
27665
27740
|
const pipelineExecutorInterface = {
|
|
@@ -28761,6 +28836,11 @@ function createSystemProxy(api) {
|
|
|
28761
28836
|
getPreferences: (input) => dispatch("calendars", "getPreferences", "query", input),
|
|
28762
28837
|
setCalendarPreference: (input) => dispatch("calendars", "setCalendarPreference", "mutation", input)
|
|
28763
28838
|
},
|
|
28839
|
+
clusterUpdate: {
|
|
28840
|
+
previewClusterUpdate: (input) => dispatch("clusterUpdate", "previewClusterUpdate", "query", input),
|
|
28841
|
+
startClusterUpdate: (input) => dispatch("clusterUpdate", "startClusterUpdate", "mutation", input),
|
|
28842
|
+
getClusterUpdateJob: (input) => dispatch("clusterUpdate", "getClusterUpdateJob", "query", input)
|
|
28843
|
+
},
|
|
28764
28844
|
coreBlocks: {
|
|
28765
28845
|
list: (input) => dispatch("coreBlocks", "list", "query", input),
|
|
28766
28846
|
get: (input) => dispatch("coreBlocks", "get", "query", input),
|
|
@@ -28856,6 +28936,7 @@ function createSystemProxy(api) {
|
|
|
28856
28936
|
setLocationZone: (input) => dispatch("deviceManager", "setLocationZone", "mutation", input),
|
|
28857
28937
|
listPersistedByAddon: (input) => dispatch("deviceManager", "listPersistedByAddon", "query", input),
|
|
28858
28938
|
listAll: (input) => dispatch("deviceManager", "listAll", "query", input),
|
|
28939
|
+
search: (input) => dispatch("deviceManager", "search", "query", input),
|
|
28859
28940
|
getChildren: (input) => dispatch("deviceManager", "getChildren", "query", input),
|
|
28860
28941
|
getChildrenBatch: (input) => dispatch("deviceManager", "getChildrenBatch", "query", input),
|
|
28861
28942
|
getLinkedDevicesBatch: (input) => dispatch("deviceManager", "getLinkedDevicesBatch", "query", input),
|
|
@@ -32926,7 +33007,9 @@ var TimelapseRuleInputSchema = zod.z.object({
|
|
|
32926
33007
|
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
32927
33008
|
reportClasses: ReportClassesField.optional(),
|
|
32928
33009
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
32929
|
-
priority: PriorityField.default(3)
|
|
33010
|
+
priority: PriorityField.default(3),
|
|
33011
|
+
/** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
|
|
33012
|
+
targetOverrides: NcTargetOverridesSchema.optional()
|
|
32930
33013
|
});
|
|
32931
33014
|
/**
|
|
32932
33015
|
* The caption a rule that never set one gets.
|
|
@@ -32950,7 +33033,9 @@ zod.z.object({
|
|
|
32950
33033
|
previewText: PreviewTextField.optional(),
|
|
32951
33034
|
previewMode: PreviewModeField.optional(),
|
|
32952
33035
|
reportClasses: ReportClassesField.optional(),
|
|
32953
|
-
priority: PriorityField.optional()
|
|
33036
|
+
priority: PriorityField.optional(),
|
|
33037
|
+
/** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
|
|
33038
|
+
targetOverrides: NcTargetOverridesSchema.optional()
|
|
32954
33039
|
});
|
|
32955
33040
|
/** A persisted timelapse rule. */
|
|
32956
33041
|
var TimelapseRuleSchema = TimelapseRuleInputSchema.extend({
|
|
@@ -33085,6 +33170,7 @@ exports.parseDeviceEnrollmentLink = parseDeviceEnrollmentLink;
|
|
|
33085
33170
|
exports.parseRetrainRevisionConflict = parseRetrainRevisionConflict;
|
|
33086
33171
|
exports.pickerForCondition = pickerForCondition;
|
|
33087
33172
|
exports.pickerForRuleClasses = pickerForRuleClasses;
|
|
33173
|
+
exports.primaryChildPreferenceOf = primaryChildPreferenceOf;
|
|
33088
33174
|
exports.projectSubjectPath = projectSubjectPath;
|
|
33089
33175
|
exports.remoteRoleIcon = remoteRoleIcon;
|
|
33090
33176
|
exports.remoteRoleLabel = remoteRoleLabel;
|
package/dist/client.mjs
CHANGED
|
@@ -391,8 +391,31 @@ var TargetKindAttachmentsCapsSchema = z.object({
|
|
|
391
391
|
max: z.number().int().nonnegative(),
|
|
392
392
|
maxBytes: z.number().int().positive().optional()
|
|
393
393
|
});
|
|
394
|
+
/**
|
|
395
|
+
* Which TEXT fields a kind delivers (#483). Alexa speaks a title and nothing
|
|
396
|
+
* else; a push service shows both.
|
|
397
|
+
*
|
|
398
|
+
* `.optional()` on the caps block, never defaulted: absent = both, which is
|
|
399
|
+
* what every kind declared before this field meant (D938's rule for a Zod
|
|
400
|
+
* default on the addon cap path).
|
|
401
|
+
*/
|
|
402
|
+
var TargetKindTextCapsSchema = z.object({
|
|
403
|
+
title: z.boolean(),
|
|
404
|
+
body: z.boolean()
|
|
405
|
+
});
|
|
406
|
+
z.enum([
|
|
407
|
+
"title",
|
|
408
|
+
"body",
|
|
409
|
+
"attachments",
|
|
410
|
+
"actions",
|
|
411
|
+
"priority",
|
|
412
|
+
"sound",
|
|
413
|
+
"clickUrl"
|
|
414
|
+
]);
|
|
394
415
|
/** The full capability block consulted before dispatch. */
|
|
395
416
|
var TargetKindCapsSchema = z.object({
|
|
417
|
+
/** Text fields this kind delivers (#483). Absent = title AND body. */
|
|
418
|
+
text: TargetKindTextCapsSchema.optional(),
|
|
396
419
|
attachments: TargetKindAttachmentsCapsSchema,
|
|
397
420
|
/** Max action buttons (0 = none). */
|
|
398
421
|
actions: z.number().int().nonnegative(),
|
|
@@ -23741,6 +23764,26 @@ var NcRuleTargetSchema = z.object({
|
|
|
23741
23764
|
*/
|
|
23742
23765
|
params: z.record(z.string(), z.unknown()).optional()
|
|
23743
23766
|
});
|
|
23767
|
+
/** Which picture kind one target receives (#487). */
|
|
23768
|
+
var NcTargetAttachmentSchema = z.enum([
|
|
23769
|
+
"none",
|
|
23770
|
+
"image",
|
|
23771
|
+
"clip",
|
|
23772
|
+
"gif"
|
|
23773
|
+
]);
|
|
23774
|
+
var NcTargetOverrideSchema = z.object({
|
|
23775
|
+
template: z.object({
|
|
23776
|
+
title: z.string().max(500).optional(),
|
|
23777
|
+
body: z.string().max(2e3).optional()
|
|
23778
|
+
}).optional(),
|
|
23779
|
+
schedule: NcScheduleSchema.optional(),
|
|
23780
|
+
priority: z.number().int().min(1).max(5).optional(),
|
|
23781
|
+
attachment: NcTargetAttachmentSchema.optional(),
|
|
23782
|
+
/** `false` = no buttons for this target; `true` is the same as absent. */
|
|
23783
|
+
actions: z.boolean().optional()
|
|
23784
|
+
});
|
|
23785
|
+
/** Per-target settings keyed by target id (#487). */
|
|
23786
|
+
var NcTargetOverridesSchema = z.record(z.string(), NcTargetOverrideSchema);
|
|
23744
23787
|
/**
|
|
23745
23788
|
* WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
|
|
23746
23789
|
*
|
|
@@ -24035,6 +24078,13 @@ var NcRuleInputSchema = z.object({
|
|
|
24035
24078
|
* targets.
|
|
24036
24079
|
*/
|
|
24037
24080
|
targetUsers: z.array(z.string()).optional(),
|
|
24081
|
+
/**
|
|
24082
|
+
* Per-target settings keyed by target id (#487): texts, schedule, priority.
|
|
24083
|
+
* Absent (and an absent entry) = the rule's own values. A patch that omits
|
|
24084
|
+
* the key keeps the stored map; a patch that names it REPLACES it whole —
|
|
24085
|
+
* `{}` empties it.
|
|
24086
|
+
*/
|
|
24087
|
+
targetOverrides: NcTargetOverridesSchema.optional(),
|
|
24038
24088
|
/** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
|
|
24039
24089
|
* detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
|
|
24040
24090
|
media: NcMediaPolicySchema.default({}),
|
|
@@ -26534,9 +26584,11 @@ function remoteRoleLabel(role, locale) {
|
|
|
26534
26584
|
* priority-in-sync.ts` fails the build when either drifts — the comment that
|
|
26535
26585
|
* used to ask for this could not.
|
|
26536
26586
|
*
|
|
26537
|
-
* The rule has
|
|
26538
|
-
* wins outright; else
|
|
26539
|
-
*
|
|
26587
|
+
* The rule has four steps and the ORDER matters: an operator's explicit pick
|
|
26588
|
+
* wins outright; else the container's own declaration, an ordered list of
|
|
26589
|
+
* child keys its provider stamped at create
|
|
26590
|
+
* ({@link ContainerPrimaryChildPreference}); else a declaration on the device
|
|
26591
|
+
* type ({@link CONTAINER_PRIMARY_CHILD_RULES}); else role, namesake, then type
|
|
26540
26592
|
* priority. The pick is keyed on the child's re-sync-stable `entityId`, not
|
|
26541
26593
|
* its numeric id, so it survives a re-sync that reallocates ids.
|
|
26542
26594
|
*/
|
|
@@ -26549,6 +26601,25 @@ var CONTAINER_PRIMARY_CHILD_RULES = [{
|
|
|
26549
26601
|
deviceType: DeviceType.HeatPump,
|
|
26550
26602
|
primary: "self"
|
|
26551
26603
|
}];
|
|
26604
|
+
/** The declaration of a container read from its meta, or undefined when it declared none. */
|
|
26605
|
+
function primaryChildPreferenceOf(container) {
|
|
26606
|
+
const keys = container.primaryChildPreference;
|
|
26607
|
+
if (container.stableId === void 0 || keys === void 0 || keys === null) return void 0;
|
|
26608
|
+
if (keys.length === 0) return void 0;
|
|
26609
|
+
return {
|
|
26610
|
+
parentStableId: container.stableId,
|
|
26611
|
+
childKeys: keys
|
|
26612
|
+
};
|
|
26613
|
+
}
|
|
26614
|
+
/** The first declared child that exists, or undefined when none does. */
|
|
26615
|
+
function applyPrimaryChildPreference(preference, children) {
|
|
26616
|
+
if (preference === void 0) return void 0;
|
|
26617
|
+
for (const key of preference.childKeys) {
|
|
26618
|
+
const expected = `${preference.parentStableId}-${key}`;
|
|
26619
|
+
const match = children.find((child) => child.stableId === expected);
|
|
26620
|
+
if (match !== void 0) return match;
|
|
26621
|
+
}
|
|
26622
|
+
}
|
|
26552
26623
|
/**
|
|
26553
26624
|
* The type declaration, before the heuristic. `fall-through` means the
|
|
26554
26625
|
* heuristic still decides: the type declared nothing, or it named a child
|
|
@@ -26656,7 +26727,8 @@ function rank(type) {
|
|
|
26656
26727
|
}
|
|
26657
26728
|
/**
|
|
26658
26729
|
* The child a container stands for: the operator's pick when it still exists,
|
|
26659
|
-
* else the
|
|
26730
|
+
* else the container's declared preference, else the device type's
|
|
26731
|
+
* declaration, else the highest-priority type. `null`
|
|
26660
26732
|
* for a childless container, and for a type that stands for itself — a caller
|
|
26661
26733
|
* must decide what "no child" means for it, rather than being handed a child
|
|
26662
26734
|
* that is not the device.
|
|
@@ -26688,11 +26760,13 @@ function sameName(childName, containerName) {
|
|
|
26688
26760
|
const flatten = (v) => v.toLowerCase().replace(/[-_\s]+/g, " ").trim();
|
|
26689
26761
|
return flatten(childName) === flatten(containerName);
|
|
26690
26762
|
}
|
|
26691
|
-
function resolveContainerPrimaryChild(children, overrideEntityId, containerName, containerType) {
|
|
26763
|
+
function resolveContainerPrimaryChild(children, overrideEntityId, containerName, containerType, preference) {
|
|
26692
26764
|
if (overrideEntityId !== void 0 && overrideEntityId !== null) {
|
|
26693
26765
|
const picked = children.find((c) => c.stableId === overrideEntityId) ?? children.find((c) => c.entityId !== void 0 && c.entityId === overrideEntityId);
|
|
26694
26766
|
if (picked !== void 0) return picked;
|
|
26695
26767
|
}
|
|
26768
|
+
const preferred = applyPrimaryChildPreference(preference, children);
|
|
26769
|
+
if (preferred !== void 0) return preferred;
|
|
26696
26770
|
const declared = applyPrimaryChildRule(CONTAINER_PRIMARY_CHILD_RULES.find((entry) => entry.deviceType === containerType), children);
|
|
26697
26771
|
if (declared.kind === "none") return null;
|
|
26698
26772
|
if (declared.kind === "child") return declared.child;
|
|
@@ -27604,6 +27678,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
27604
27678
|
setLinkDeviceId: (input) => dispatchSystem("deviceManager", "setLinkDeviceId", "mutation", input),
|
|
27605
27679
|
setPrimaryChildEntityId: (input) => dispatchSystem("deviceManager", "setPrimaryChildEntityId", "mutation", input),
|
|
27606
27680
|
setChildLayout: (input) => dispatchSystem("deviceManager", "setChildLayout", "mutation", input),
|
|
27681
|
+
setPrimaryChildPreference: (input) => dispatchSystem("deviceManager", "setPrimaryChildPreference", "mutation", input),
|
|
27607
27682
|
setDisplay: (input) => dispatchSystem("deviceManager", "setDisplay", "mutation", input),
|
|
27608
27683
|
getWireableFields: (input) => dispatchSystem("deviceManager", "getWireableFields", "query", input),
|
|
27609
27684
|
setRole: (input) => dispatchSystem("deviceManager", "setRole", "mutation", input),
|
|
@@ -27654,11 +27729,11 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
27654
27729
|
const notificationRulesInterface = { setDeviceMuted: (input) => dispatchSystem("notificationRules", "setDeviceMuted", "mutation", input) };
|
|
27655
27730
|
const osdManagerInterface = {
|
|
27656
27731
|
getDeviceOsd: (input) => dispatchSystem("osdManager", "getDeviceOsd", "query", input),
|
|
27657
|
-
getSourceCatalog: (input) => dispatchSystem("osdManager", "getSourceCatalog", "query", input),
|
|
27658
27732
|
setSlotBinding: (input) => dispatchSystem("osdManager", "setSlotBinding", "mutation", input),
|
|
27659
27733
|
clearSlotBinding: (input) => dispatchSystem("osdManager", "clearSlotBinding", "mutation", input),
|
|
27660
27734
|
setSlotCameraEnabled: (input) => dispatchSystem("osdManager", "setSlotCameraEnabled", "mutation", input),
|
|
27661
27735
|
previewSlot: (input) => dispatchSystem("osdManager", "previewSlot", "mutation", input),
|
|
27736
|
+
previewTemplate: (input) => dispatchSystem("osdManager", "previewTemplate", "mutation", input),
|
|
27662
27737
|
renderDevice: (input) => dispatchSystem("osdManager", "renderDevice", "mutation", input)
|
|
27663
27738
|
};
|
|
27664
27739
|
const pipelineExecutorInterface = {
|
|
@@ -28760,6 +28835,11 @@ function createSystemProxy(api) {
|
|
|
28760
28835
|
getPreferences: (input) => dispatch("calendars", "getPreferences", "query", input),
|
|
28761
28836
|
setCalendarPreference: (input) => dispatch("calendars", "setCalendarPreference", "mutation", input)
|
|
28762
28837
|
},
|
|
28838
|
+
clusterUpdate: {
|
|
28839
|
+
previewClusterUpdate: (input) => dispatch("clusterUpdate", "previewClusterUpdate", "query", input),
|
|
28840
|
+
startClusterUpdate: (input) => dispatch("clusterUpdate", "startClusterUpdate", "mutation", input),
|
|
28841
|
+
getClusterUpdateJob: (input) => dispatch("clusterUpdate", "getClusterUpdateJob", "query", input)
|
|
28842
|
+
},
|
|
28763
28843
|
coreBlocks: {
|
|
28764
28844
|
list: (input) => dispatch("coreBlocks", "list", "query", input),
|
|
28765
28845
|
get: (input) => dispatch("coreBlocks", "get", "query", input),
|
|
@@ -28855,6 +28935,7 @@ function createSystemProxy(api) {
|
|
|
28855
28935
|
setLocationZone: (input) => dispatch("deviceManager", "setLocationZone", "mutation", input),
|
|
28856
28936
|
listPersistedByAddon: (input) => dispatch("deviceManager", "listPersistedByAddon", "query", input),
|
|
28857
28937
|
listAll: (input) => dispatch("deviceManager", "listAll", "query", input),
|
|
28938
|
+
search: (input) => dispatch("deviceManager", "search", "query", input),
|
|
28858
28939
|
getChildren: (input) => dispatch("deviceManager", "getChildren", "query", input),
|
|
28859
28940
|
getChildrenBatch: (input) => dispatch("deviceManager", "getChildrenBatch", "query", input),
|
|
28860
28941
|
getLinkedDevicesBatch: (input) => dispatch("deviceManager", "getLinkedDevicesBatch", "query", input),
|
|
@@ -32925,7 +33006,9 @@ var TimelapseRuleInputSchema = z.object({
|
|
|
32925
33006
|
/** Classes the notification counts — see {@link ReportClassesField}. */
|
|
32926
33007
|
reportClasses: ReportClassesField.optional(),
|
|
32927
33008
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
32928
|
-
priority: PriorityField.default(3)
|
|
33009
|
+
priority: PriorityField.default(3),
|
|
33010
|
+
/** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
|
|
33011
|
+
targetOverrides: NcTargetOverridesSchema.optional()
|
|
32929
33012
|
});
|
|
32930
33013
|
/**
|
|
32931
33014
|
* The caption a rule that never set one gets.
|
|
@@ -32949,7 +33032,9 @@ z.object({
|
|
|
32949
33032
|
previewText: PreviewTextField.optional(),
|
|
32950
33033
|
previewMode: PreviewModeField.optional(),
|
|
32951
33034
|
reportClasses: ReportClassesField.optional(),
|
|
32952
|
-
priority: PriorityField.optional()
|
|
33035
|
+
priority: PriorityField.optional(),
|
|
33036
|
+
/** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
|
|
33037
|
+
targetOverrides: NcTargetOverridesSchema.optional()
|
|
32953
33038
|
});
|
|
32954
33039
|
/** A persisted timelapse rule. */
|
|
32955
33040
|
var TimelapseRuleSchema = TimelapseRuleInputSchema.extend({
|
|
@@ -32989,4 +33074,4 @@ var TimelapseRuleSchema = TimelapseRuleInputSchema.extend({
|
|
|
32989
33074
|
updatedAt: z.number()
|
|
32990
33075
|
});
|
|
32991
33076
|
//#endregion
|
|
32992
|
-
export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CONTAINER_PRIMARY_CHILD_RULES, CamProfileSchema, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFINITIVE_DEVICE_REFUSALS, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, ICON_CATEGORIES, ICON_ENTRIES, ICON_KEYS, ICON_VIEWER_MODULES, IconKeySchema, LOCATION_ICON_FALLBACK, MACRO_LABELS, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CAMERA_SCOPE_CAP_NAME, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SYSTEM_EVENT_CLASS_SPECS, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NcAlarmConfigSchema, NcAlarmSensorsSchema, NcAlarmSettingsPatchSchema, NcHistoryEntrySchema, NcRuleLastRunsSchema, NodeDirectorySchema, RECORDING_EXPORT_MAX_READ_BYTES, REMOTE_CUSTOM_ROLE_ICON, REMOTE_ROLE_VOCABULARY, RETRAIN_REVIEW_ADJUSTED_IOU, RETRAIN_REVIEW_MATCH_IOU, RETRAIN_REVIEW_STATUSES, RETRAIN_REVISION_CONFLICT, SystemMirror, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleSchema, YAMNET_TO_MACRO, alarmDeviceBlocksArming, alarmDeviceSecureOnArm, alarmPatchLanded, buildDeviceEnrollmentLink, buildDeviceSignatureMessage, buildSubjectPath, bundledCamstack, canonicalIconKey, classifyRetrainReview, conditionVisibleForKind, createSystemProxy, deviceRefusalFromMessage, droppedConditionsForKind, expandSystemEventClasses, iconCategoryLabel, iconEntry, iconsInCategory, isDefinitiveDeviceRefusal, isDrawableSubjectPath, isHeldBackTemplateVar, isIconKey, isSystemRuleKind, kindsForDiscriminator, knownValues, locationIconKey, nodePickerItems, packagePickerItems, paintHex, paletteResultSchema, parseDeviceEnrollmentLink, parseRetrainRevisionConflict, pickerForCondition, pickerForRuleClasses, projectSubjectPath, remoteRoleIcon, remoteRoleLabel, remoteRoleLegend, resolveContainerPrimaryChild, resolveIconKey, resolveModeDelays, retrainBoxIou, retrainRevisionConflictMessage, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, searchIcons, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, subjectPathSampleFromBox, subjectPathSvgPoints, summarizeReview, systemEventClassKinds, systemEventClassesFor, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, withSystemEventClasses };
|
|
33077
|
+
export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CONTAINER_PRIMARY_CHILD_RULES, CamProfileSchema, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DEFINITIVE_DEVICE_REFUSALS, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, ICON_CATEGORIES, ICON_ENTRIES, ICON_KEYS, ICON_VIEWER_MODULES, IconKeySchema, LOCATION_ICON_FALLBACK, MACRO_LABELS, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CAMERA_SCOPE_CAP_NAME, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SYSTEM_EVENT_CLASS_SPECS, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NcAlarmConfigSchema, NcAlarmSensorsSchema, NcAlarmSettingsPatchSchema, NcHistoryEntrySchema, NcRuleLastRunsSchema, NodeDirectorySchema, RECORDING_EXPORT_MAX_READ_BYTES, REMOTE_CUSTOM_ROLE_ICON, REMOTE_ROLE_VOCABULARY, RETRAIN_REVIEW_ADJUSTED_IOU, RETRAIN_REVIEW_MATCH_IOU, RETRAIN_REVIEW_STATUSES, RETRAIN_REVISION_CONFLICT, SystemMirror, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleSchema, YAMNET_TO_MACRO, alarmDeviceBlocksArming, alarmDeviceSecureOnArm, alarmPatchLanded, buildDeviceEnrollmentLink, buildDeviceSignatureMessage, buildSubjectPath, bundledCamstack, canonicalIconKey, classifyRetrainReview, conditionVisibleForKind, createSystemProxy, deviceRefusalFromMessage, droppedConditionsForKind, expandSystemEventClasses, iconCategoryLabel, iconEntry, iconsInCategory, isDefinitiveDeviceRefusal, isDrawableSubjectPath, isHeldBackTemplateVar, isIconKey, isSystemRuleKind, kindsForDiscriminator, knownValues, locationIconKey, nodePickerItems, packagePickerItems, paintHex, paletteResultSchema, parseDeviceEnrollmentLink, parseRetrainRevisionConflict, pickerForCondition, pickerForRuleClasses, primaryChildPreferenceOf, projectSubjectPath, remoteRoleIcon, remoteRoleLabel, remoteRoleLegend, resolveContainerPrimaryChild, resolveIconKey, resolveModeDelays, retrainBoxIou, retrainRevisionConflictMessage, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, searchIcons, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, subjectPathSampleFromBox, subjectPathSvgPoints, summarizeReview, systemEventClassKinds, systemEventClassesFor, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, withSystemEventClasses };
|
|
@@ -288,6 +288,10 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
288
288
|
/** Robot mower exposes targeted mowing (all-area / zones / edges /
|
|
289
289
|
* spots) — gates the Mow action + map selectors. */
|
|
290
290
|
DeviceFeature["MowerHasTargetedMowing"] = "mower-has-targeted-mowing";
|
|
291
|
+
/** The device has a drive/navigation surface (`navigation` cap): a robot camera. */
|
|
292
|
+
DeviceFeature["Navigation"] = "navigation";
|
|
293
|
+
/** The device has a network-link reading (`network-link` cap). */
|
|
294
|
+
DeviceFeature["NetworkLink"] = "network-link";
|
|
291
295
|
return DeviceFeature;
|
|
292
296
|
}({});
|
|
293
297
|
/**
|
|
@@ -288,6 +288,10 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
288
288
|
/** Robot mower exposes targeted mowing (all-area / zones / edges /
|
|
289
289
|
* spots) — gates the Mow action + map selectors. */
|
|
290
290
|
DeviceFeature["MowerHasTargetedMowing"] = "mower-has-targeted-mowing";
|
|
291
|
+
/** The device has a drive/navigation surface (`navigation` cap): a robot camera. */
|
|
292
|
+
DeviceFeature["Navigation"] = "navigation";
|
|
293
|
+
/** The device has a network-link reading (`network-link` cap). */
|
|
294
|
+
DeviceFeature["NetworkLink"] = "network-link";
|
|
291
295
|
return DeviceFeature;
|
|
292
296
|
}({});
|
|
293
297
|
/**
|
|
@@ -23,9 +23,11 @@
|
|
|
23
23
|
* priority-in-sync.ts` fails the build when either drifts — the comment that
|
|
24
24
|
* used to ask for this could not.
|
|
25
25
|
*
|
|
26
|
-
* The rule has
|
|
27
|
-
* wins outright; else
|
|
28
|
-
*
|
|
26
|
+
* The rule has four steps and the ORDER matters: an operator's explicit pick
|
|
27
|
+
* wins outright; else the container's own declaration, an ordered list of
|
|
28
|
+
* child keys its provider stamped at create
|
|
29
|
+
* ({@link ContainerPrimaryChildPreference}); else a declaration on the device
|
|
30
|
+
* type ({@link CONTAINER_PRIMARY_CHILD_RULES}); else role, namesake, then type
|
|
29
31
|
* priority. The pick is keyed on the child's re-sync-stable `entityId`, not
|
|
30
32
|
* its numeric id, so it survives a re-sync that reallocates ids.
|
|
31
33
|
*/
|
|
@@ -51,6 +53,32 @@ export interface ContainerPrimaryChildRule {
|
|
|
51
53
|
* otherwise pick.
|
|
52
54
|
*/
|
|
53
55
|
export declare const CONTAINER_PRIMARY_CHILD_RULES: readonly ContainerPrimaryChildRule[];
|
|
56
|
+
/**
|
|
57
|
+
* What one CONTAINER declares it stands for, in preference order.
|
|
58
|
+
*
|
|
59
|
+
* A device type cannot tell a vendor's children apart when they all share one
|
|
60
|
+
* type (an energy installation whose PV, battery and house readings are all
|
|
61
|
+
* `sensor` children). The provider knows, so it stamps an ordered list of
|
|
62
|
+
* accessory `childKey`s (the `stableIdSuffix` it spawned each child with) on
|
|
63
|
+
* the container's meta (`DeviceMeta.primaryChildPreference`). The first key
|
|
64
|
+
* whose child exists wins. A child matches when its `stableId` is
|
|
65
|
+
* `${parentStableId}-${childKey}`, the convention `childLayout` uses.
|
|
66
|
+
*/
|
|
67
|
+
export interface ContainerPrimaryChildPreference {
|
|
68
|
+
/** The container's own `stableId`. */
|
|
69
|
+
readonly parentStableId: string;
|
|
70
|
+
/** Accessory `childKey`s, most preferred first. */
|
|
71
|
+
readonly childKeys: readonly string[];
|
|
72
|
+
}
|
|
73
|
+
/** The slice of a container's meta its declaration is read from. */
|
|
74
|
+
export interface ContainerPreferenceSource {
|
|
75
|
+
readonly stableId?: string | undefined;
|
|
76
|
+
readonly primaryChildPreference?: readonly string[] | null | undefined;
|
|
77
|
+
}
|
|
78
|
+
/** The declaration of a container read from its meta, or undefined when it declared none. */
|
|
79
|
+
export declare function primaryChildPreferenceOf(container: ContainerPreferenceSource): ContainerPrimaryChildPreference | undefined;
|
|
80
|
+
/** The first declared child that exists, or undefined when none does. */
|
|
81
|
+
export declare function applyPrimaryChildPreference(preference: ContainerPrimaryChildPreference | undefined, children: readonly ContainerChildRef[]): ContainerChildRef | undefined;
|
|
54
82
|
export type AppliedPrimaryChildRule = {
|
|
55
83
|
readonly kind: 'fall-through';
|
|
56
84
|
} | {
|
|
@@ -122,4 +150,11 @@ export interface ContainerChildRef {
|
|
|
122
150
|
* they are deliberately absent and fall through to type priority.
|
|
123
151
|
*/
|
|
124
152
|
export declare const CONTAINER_CHILD_ROLE_PRIORITY: readonly string[];
|
|
125
|
-
export declare function resolveContainerPrimaryChild(children: readonly ContainerChildRef[], overrideEntityId: string | null | undefined, containerName: string | undefined, containerType: string | undefined
|
|
153
|
+
export declare function resolveContainerPrimaryChild(children: readonly ContainerChildRef[], overrideEntityId: string | null | undefined, containerName: string | undefined, containerType: string | undefined,
|
|
154
|
+
/**
|
|
155
|
+
* The container's own declaration (`primaryChildPreferenceOf(container)`).
|
|
156
|
+
* Required, `undefined` when the container declared none: a caller that
|
|
157
|
+
* forgets it would silently answer the heuristic's child instead of the one
|
|
158
|
+
* the provider named, so the compiler must find every caller.
|
|
159
|
+
*/
|
|
160
|
+
preference: ContainerPrimaryChildPreference | undefined): ContainerChildRef | null;
|
|
@@ -26,6 +26,12 @@ export interface DeviceBindingEntry {
|
|
|
26
26
|
providerNodeId: string;
|
|
27
27
|
/** Always the addon id of the underlying native provider for the device. */
|
|
28
28
|
nativeAddonId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Which of the cap's methods the bound NATIVE provider implements. Absent
|
|
31
|
+
* means "all of them" (an older worker, or a wrapper): the kernel then
|
|
32
|
+
* derives device features from the cap being bound alone, never from nothing.
|
|
33
|
+
*/
|
|
34
|
+
implementedMethods?: string[];
|
|
29
35
|
}
|
|
30
36
|
export interface DeviceBinding {
|
|
31
37
|
/** Numeric device id — matches `IDevice.id`. */
|