@camstack/types 1.2.547 → 1.2.549
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 +20 -0
- package/dist/addon.js +5 -5
- package/dist/addon.mjs +5 -5
- package/dist/automation/condition-eval.d.ts +24 -0
- package/dist/automation/hold.d.ts +11 -0
- package/dist/automation/index.d.ts +6 -4
- package/dist/automation/recipe.d.ts +5 -0
- package/dist/automation/step-condition.d.ts +7 -2
- package/dist/automation/trace.d.ts +6 -0
- package/dist/automation/trigger-variables.d.ts +3 -1
- package/dist/automation/when-site.d.ts +27 -0
- package/dist/automation/when.d.ts +107 -1
- package/dist/capabilities/accessories.cap.d.ts +1 -1
- package/dist/capabilities/actions.cap.d.ts +2 -0
- package/dist/capabilities/battery.cap.d.ts +2 -2
- package/dist/capabilities/capability-definition.d.ts +47 -1
- package/dist/capabilities/climate-control.cap.d.ts +8 -1
- package/dist/capabilities/core-blocks.cap.d.ts +8 -0
- package/dist/capabilities/customize-catalog.d.ts +3 -1
- package/dist/capabilities/customize-spec.d.ts +26 -2
- package/dist/capabilities/device-manager.cap.d.ts +6 -0
- package/dist/capabilities/fan-control.cap.d.ts +248 -0
- package/dist/capabilities/fan-presets.cap.d.ts +172 -536
- package/dist/capabilities/group-active.cap.d.ts +1 -1
- package/dist/capabilities/group-commands.cap.d.ts +1 -1
- package/dist/capabilities/group-status.cap.d.ts +1 -1
- package/dist/capabilities/heating-valve.cap.d.ts +1 -1
- package/dist/capabilities/hero-layout.cap.d.ts +2 -0
- package/dist/capabilities/humidifier.cap.d.ts +5 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +4 -4
- package/dist/capabilities/media-player.cap.d.ts +7 -0
- package/dist/capabilities/pet-fountain.cap.d.ts +5 -0
- package/dist/capabilities/power-meter.cap.d.ts +5 -5
- package/dist/capabilities/power-source.cap.d.ts +5 -0
- package/dist/capabilities/running-state.cap.d.ts +2 -2
- package/dist/capabilities/schedulers.cap.d.ts +2 -0
- package/dist/capabilities/switch.cap.d.ts +1 -1
- package/dist/capabilities/temperature-sensor.cap.d.ts +1 -1
- package/dist/capabilities/timed-run.cap.d.ts +19 -5
- package/dist/capabilities/water-heater.cap.d.ts +7 -0
- package/dist/client.js +7 -11
- package/dist/client.mjs +7 -11
- package/dist/{composed-stable-id-DrGLxjVF.js → composed-stable-id-CDNLq7Y8.js} +27 -10
- package/dist/{composed-stable-id-DFNyOFzz.mjs → composed-stable-id-CPp3votu.mjs} +27 -10
- package/dist/composition/composition-report.d.ts +6 -0
- package/dist/composition/evaluate-field.d.ts +7 -0
- package/dist/composition/field-kinds.d.ts +12 -1
- package/dist/composition/helpers/index.d.ts +1 -1
- package/dist/composition/helpers/source-pick.d.ts +0 -5
- package/dist/composition/power-source-link.d.ts +15 -0
- package/dist/composition/state-fields.d.ts +2 -0
- package/dist/composition/validate-composition.d.ts +15 -1
- package/dist/device/base-device-provider.d.ts +13 -0
- package/dist/device/device-control-resolution.d.ts +1 -33
- package/dist/device/device-kind.d.ts +36 -0
- package/dist/device/device-management.d.ts +3 -0
- package/dist/device/device-type.d.ts +27 -10
- package/dist/device/hero/hero-fragment.d.ts +2 -0
- package/dist/device/hero/hero-layout.d.ts +1 -3
- package/dist/device/hero/hero-look.d.ts +18 -12
- package/dist/device/hero/hero-scene.d.ts +9 -3
- package/dist/device/index.d.ts +2 -1
- package/dist/device/power-switch.d.ts +82 -0
- package/dist/device/schema-fields.d.ts +10 -1
- package/dist/generated/addon-api.d.ts +27 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/customize-catalog.d.ts +257 -8
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/{implemented-methods-M5aguGon.mjs → implemented-methods-5YMDeE3f.mjs} +1 -1
- package/dist/{implemented-methods-8AU92riC.js → implemented-methods-Cj65uy2F.js} +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.js +1783 -451
- package/dist/index.mjs +1740 -445
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/{sleep-D_NpiLFP.mjs → sleep-Bn346wCJ.mjs} +46 -1
- package/dist/{sleep-vzHEmsrO.js → sleep-LFKpQ2_f.js} +46 -1
- package/dist/time/index.d.ts +1 -0
- package/dist/time/time-spec.d.ts +5 -0
- package/dist/time/time-window.d.ts +33 -0
- package/package.json +1 -1
|
@@ -118,8 +118,7 @@ export declare const HERO_SCENE_BY_TYPE: {
|
|
|
118
118
|
readonly siren: 'siren';
|
|
119
119
|
readonly switch: 'plug';
|
|
120
120
|
readonly sensor: 'sensor-sparkline';
|
|
121
|
-
readonly
|
|
122
|
-
readonly climate: 'ac';
|
|
121
|
+
readonly climate: 'thermostat';
|
|
123
122
|
readonly button: 'button';
|
|
124
123
|
readonly "event-emitter": 'event-stream';
|
|
125
124
|
readonly update: 'update';
|
|
@@ -147,7 +146,6 @@ export declare const HERO_SCENE_BY_TYPE: {
|
|
|
147
146
|
readonly "pet-fountain": 'pet-fountain';
|
|
148
147
|
readonly dishwasher: 'dishwasher';
|
|
149
148
|
readonly washer: 'washer';
|
|
150
|
-
readonly heater: 'heater';
|
|
151
149
|
readonly dryer: 'dryer';
|
|
152
150
|
readonly gateway: 'gateway';
|
|
153
151
|
};
|
|
@@ -172,6 +170,14 @@ export declare const HERO_SCENE_BY_ROLE: {
|
|
|
172
170
|
readonly "cover-window": 'inherit';
|
|
173
171
|
readonly "binary-helper": 'inherit';
|
|
174
172
|
readonly outlet: 'plug';
|
|
173
|
+
readonly "switch-heater": 'heater';
|
|
174
|
+
readonly "switch-fan": 'fan';
|
|
175
|
+
readonly "climate-ac": 'ac';
|
|
176
|
+
readonly "climate-thermostat": 'inherit';
|
|
177
|
+
readonly "climate-floor": 'inherit';
|
|
178
|
+
readonly "climate-radiator": 'inherit';
|
|
179
|
+
readonly "climate-heater": 'inherit';
|
|
180
|
+
readonly "climate-heat-pump-circuit": 'inherit';
|
|
175
181
|
readonly "motion-sensor": 'presence';
|
|
176
182
|
readonly "contact-sensor": 'contact';
|
|
177
183
|
readonly "leak-sensor": 'inherit';
|
package/dist/device/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type { DeviceProfile, DeviceProfileDefaults, DeviceProfileMatch, Pipeline
|
|
|
18
18
|
export { BATTERY_DEVICE_PROFILE, DEVICE_PROFILES, deviceMatchesProfile, resolveDeviceProfile, } from './device-profile.js';
|
|
19
19
|
export type { IDeviceRuntimeState, Snapshot as RuntimeStateSnapshot, } from './device-runtime-state.js';
|
|
20
20
|
export { ChargingStatus, DeviceFeature, DeviceRole, DeviceType, featuresOfBoundCaps, } from './device-type.js';
|
|
21
|
+
export { capAppliesToDeviceKind, canonicalStoredDeviceType, CLIMATE_ROLES, climateRoleOf, isAirConditioner, type ClimateRole, type DeviceKindGate, } from './device-kind.js';
|
|
21
22
|
export type { IBatteryOperated, IDoorbellButton, INativeSnapshot, IPanTiltZoom, IRebootable, ITwoWayAudio, } from './features.js';
|
|
22
23
|
export type { IconCategoryId, IconEntry, IconHit, IconKey, } from './icon-catalog.js';
|
|
23
24
|
export { ICON_CATALOG_SOURCE, ICON_CATEGORIES, ICON_ENTRIES, ICON_KEYS, ICON_VIEWER_MODULES, IconKeySchema, canonicalIconKey, iconCategoryLabel, iconEntry, iconsInCategory, isIconKey, resolveIconKey, searchIcons, } from './icon-catalog.js';
|
|
@@ -28,7 +29,7 @@ export type { ReachabilityPollHandle, ReachabilityPollLogger, ReachabilityPollOp
|
|
|
28
29
|
export { REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, startReachabilityPoll, } from './reachability-poll.js';
|
|
29
30
|
export type { RuntimeStateBridge, RuntimeStateStaleReadPolicy, } from './runtime-state-helpers.js';
|
|
30
31
|
export { createRuntimeStateBridge, OPERATOR_WRITTEN_STALE_MS, RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS, } from './runtime-state-helpers.js';
|
|
31
|
-
export type { WireableField } from './schema-fields.js';
|
|
32
|
+
export type { WireableField, WireableScalarKind } from './schema-fields.js';
|
|
32
33
|
export { enumerateItemArrayFields, enumerateSchemaFields, unwrapSchema } from './schema-fields.js';
|
|
33
34
|
export type { DeviceConfigEntry } from './zod-to-config-ui.js';
|
|
34
35
|
export { zodEntriesToConfigUI } from './zod-to-config-ui.js';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `switch` is the one on/off control of a device (D-power-switch, #462 P1).
|
|
3
|
+
*
|
|
4
|
+
* A device whose own cap carries a `power` hint (`*.cap.ts`, D4) — a
|
|
5
|
+
* humidifier's `on`, a media player's `state`, a climate unit's `mode` —
|
|
6
|
+
* gets its `switch` from its OWNER addon through this one helper, never from
|
|
7
|
+
* a kernel scan or a hand-written second provider:
|
|
8
|
+
*
|
|
9
|
+
* - `switch.getStatus` is computed from the owner's slice at READ time
|
|
10
|
+
* (D224): the power fact is stored once, in the owner's slice.
|
|
11
|
+
* - The `switch` runtime slice is a projection of that same fact, written
|
|
12
|
+
* only here and only when the derived value changes, so the state mirror,
|
|
13
|
+
* the hero and the exporters read one shape for every powered device.
|
|
14
|
+
* - A value the owner has not reported is `null`, never `false` (D393).
|
|
15
|
+
* - Turning a `mode` device on restores its last non-off mode (the hub
|
|
16
|
+
* mirror keeps it, `last-active-mode.ts`); with none known it refuses
|
|
17
|
+
* `no-last-mode` instead of guessing one.
|
|
18
|
+
*
|
|
19
|
+
* Guard: `scripts/check-power-hint.ts`.
|
|
20
|
+
*/
|
|
21
|
+
import type { CapabilityDefinition, CapabilityPowerHint, InferNativeProvider } from '../capabilities/capability-definition.js';
|
|
22
|
+
import { switchCapability } from '../capabilities/switch.cap.js';
|
|
23
|
+
import type { DeviceContext } from './device-context.js';
|
|
24
|
+
import type { IDeviceRuntimeState } from './device-runtime-state.js';
|
|
25
|
+
import type { IScopedLogger } from '../interfaces/logging.js';
|
|
26
|
+
export type PowerSwitchRefusal = 'no-last-mode' | 'owner-method-missing';
|
|
27
|
+
export declare class PowerSwitchRefusedError extends Error {
|
|
28
|
+
readonly reason: PowerSwitchRefusal;
|
|
29
|
+
constructor(reason: PowerSwitchRefusal, message: string);
|
|
30
|
+
}
|
|
31
|
+
/** The owner cap's provider, seen only through the method names its hint
|
|
32
|
+
* declares. */
|
|
33
|
+
export type PowerSwitchOwner = object;
|
|
34
|
+
export type PowerSwitchState = Pick<IDeviceRuntimeState, 'getCapState' | 'setCapState' | 'subscribeCap'>;
|
|
35
|
+
export interface PowerSwitchHost {
|
|
36
|
+
readonly deviceId: number;
|
|
37
|
+
readonly runtimeState: PowerSwitchState;
|
|
38
|
+
readonly registerNativeCap: DeviceContext['registerNativeCap'];
|
|
39
|
+
/** The hub mirror of a slice (`deviceState.getCapSlice`); `null` when it
|
|
40
|
+
* has none or the read failed. */
|
|
41
|
+
readonly readHubSlice: (capName: string) => Promise<Readonly<Record<string, unknown>> | null>;
|
|
42
|
+
}
|
|
43
|
+
/** The one hub read the switch needs: the mirror of the owner's slice. */
|
|
44
|
+
export interface PowerSwitchHubApi {
|
|
45
|
+
readonly deviceState: {
|
|
46
|
+
readonly getCapSlice: {
|
|
47
|
+
query(input: {
|
|
48
|
+
deviceId: number;
|
|
49
|
+
capName: string;
|
|
50
|
+
}): Promise<Record<string, unknown> | null>;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface PowerSwitchDevice {
|
|
55
|
+
readonly ctx: Pick<DeviceContext, 'id' | 'registerNativeCap'> & {
|
|
56
|
+
readonly api: PowerSwitchHubApi;
|
|
57
|
+
readonly logger: Pick<IScopedLogger, 'warn' | 'debug'>;
|
|
58
|
+
};
|
|
59
|
+
readonly runtimeState: PowerSwitchState;
|
|
60
|
+
}
|
|
61
|
+
export interface BuiltPowerSwitch {
|
|
62
|
+
readonly provider: InferNativeProvider<typeof switchCapability>;
|
|
63
|
+
/** Stops the slice projection. */
|
|
64
|
+
readonly dispose: () => void;
|
|
65
|
+
}
|
|
66
|
+
type SliceRecord = Readonly<Record<string, unknown>> | undefined;
|
|
67
|
+
/** `true` / `false` from the owner slice, `null` when the hinted field is
|
|
68
|
+
* absent or not of the hinted shape. */
|
|
69
|
+
export declare function powerOnFromSlice(hint: CapabilityPowerHint, slice: SliceRecord): boolean | null;
|
|
70
|
+
/** Whether `owner` serves every method its cap's power hint names. A media
|
|
71
|
+
* player whose `turnOn` / `turnOff` are not served has no power, so no switch. */
|
|
72
|
+
export declare function powerServedBy(hint: CapabilityPowerHint | undefined, owner: PowerSwitchOwner): boolean;
|
|
73
|
+
/** Builds the `switch` provider and starts the slice projection. Exported
|
|
74
|
+
* for the specs; providers call `registerPowerSwitch`. */
|
|
75
|
+
export declare function buildPowerSwitch<TCap extends CapabilityDefinition>(host: PowerSwitchHost, cap: TCap, owner: PowerSwitchOwner): BuiltPowerSwitch;
|
|
76
|
+
/**
|
|
77
|
+
* Registers `switch` for a device whose `cap` carries a `power` hint, built
|
|
78
|
+
* from `owner` (the provider the device registered for `cap`). Call it right
|
|
79
|
+
* after `registerNativeCap(cap, owner)`.
|
|
80
|
+
*/
|
|
81
|
+
export declare function registerPowerSwitch<TCap extends CapabilityDefinition>(device: PowerSwitchDevice, cap: TCap, owner: InferNativeProvider<TCap>): () => void;
|
|
82
|
+
export {};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type ReadingQuantity } from '../units/quantity.js';
|
|
3
|
+
/** A scalar member of a `union` field. */
|
|
4
|
+
export type WireableScalarKind = 'string' | 'number' | 'boolean';
|
|
3
5
|
export interface WireableField {
|
|
4
6
|
readonly path: string;
|
|
5
|
-
|
|
7
|
+
/**
|
|
8
|
+
* `union` (D1034): a field whose members are all scalars (`control.value` is
|
|
9
|
+
* `number | string`). It is readable; which member a reading carries is the
|
|
10
|
+
* SOURCE's live kind, judged where it is linked and again on every read.
|
|
11
|
+
*/
|
|
12
|
+
readonly kind: 'string' | 'number' | 'boolean' | 'enum' | 'union';
|
|
6
13
|
readonly enumValues?: readonly string[];
|
|
14
|
+
/** Present only when `kind === 'union'`: the scalar kinds it may carry. */
|
|
15
|
+
readonly unionMembers?: readonly WireableScalarKind[];
|
|
7
16
|
/** Quantity of a numeric reading, when the schema declares one. */
|
|
8
17
|
readonly quantity?: ReadingQuantity;
|
|
9
18
|
/** True when `path` is relative to ONE item of an item-array cap (see
|
|
@@ -4062,6 +4062,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
4062
4062
|
output: z.infer<typeof fanControlCapability.methods.setOscillating.output>;
|
|
4063
4063
|
meta: object;
|
|
4064
4064
|
}>;
|
|
4065
|
+
setOscillationAxis: TRPCMutationProcedure<{
|
|
4066
|
+
input: {
|
|
4067
|
+
[x: string]: unknown;
|
|
4068
|
+
} & z.input<typeof fanControlCapability.methods.setOscillationAxis.input>;
|
|
4069
|
+
output: z.infer<typeof fanControlCapability.methods.setOscillationAxis.output>;
|
|
4070
|
+
meta: object;
|
|
4071
|
+
}>;
|
|
4065
4072
|
}>>;
|
|
4066
4073
|
fanPresets: TRPCBuiltRouter<{
|
|
4067
4074
|
ctx: TrpcContext;
|
|
@@ -14589,6 +14596,16 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
14589
14596
|
} | null;
|
|
14590
14597
|
meta: object;
|
|
14591
14598
|
}>;
|
|
14599
|
+
deviceAccess: import("@trpc/server").TRPCQueryProcedure<{
|
|
14600
|
+
input: {
|
|
14601
|
+
deviceId: number;
|
|
14602
|
+
};
|
|
14603
|
+
output: {
|
|
14604
|
+
view: boolean;
|
|
14605
|
+
command: boolean;
|
|
14606
|
+
};
|
|
14607
|
+
meta: object;
|
|
14608
|
+
}>;
|
|
14592
14609
|
previewScope: import("@trpc/server").TRPCQueryProcedure<{
|
|
14593
14610
|
input: {
|
|
14594
14611
|
scopes: unknown[];
|
|
@@ -15668,6 +15685,16 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
15668
15685
|
} | null;
|
|
15669
15686
|
meta: object;
|
|
15670
15687
|
}>;
|
|
15688
|
+
deviceAccess: import("@trpc/server").TRPCQueryProcedure<{
|
|
15689
|
+
input: {
|
|
15690
|
+
deviceId: number;
|
|
15691
|
+
};
|
|
15692
|
+
output: {
|
|
15693
|
+
view: boolean;
|
|
15694
|
+
command: boolean;
|
|
15695
|
+
};
|
|
15696
|
+
meta: object;
|
|
15697
|
+
}>;
|
|
15671
15698
|
previewScope: import("@trpc/server").TRPCQueryProcedure<{
|
|
15672
15699
|
input: {
|
|
15673
15700
|
scopes: unknown[];
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Plain data, zero Zod: a forked runner must not import the schema barrel
|
|
12
12
|
* (~144MB RSS per runner — D28).
|
|
13
13
|
*
|
|
14
|
-
* Coverage:
|
|
14
|
+
* Coverage: 33 caps, 84 methods with defaults.
|
|
15
15
|
*/
|
|
16
16
|
export declare const CAP_INPUT_DEFAULTS: Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
|
|
17
17
|
/**
|
|
@@ -21,7 +21,7 @@ export declare function isCollectionArrayMethodName(capName: string, method: str
|
|
|
21
21
|
* Per capability, the methods declared `optionalMethod` — the ones whose
|
|
22
22
|
* ABSENCE on a provider is a fact about that provider, not a bug.
|
|
23
23
|
*
|
|
24
|
-
* Coverage: 10 caps,
|
|
24
|
+
* Coverage: 10 caps, 44 methods.
|
|
25
25
|
*/
|
|
26
26
|
export declare const PROVIDER_OPTIONAL_METHODS: Readonly<Record<string, readonly string[]>>;
|
|
27
27
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DeviceType } from '../device/device-type.js';
|
|
2
2
|
/**
|
|
3
3
|
* Customize catalog, projected from every `*.cap.ts` `customize` block.
|
|
4
|
-
*
|
|
4
|
+
* 11 caps. Field keys are `runtimeState` paths. No Zod.
|
|
5
5
|
*/
|
|
6
6
|
export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
7
7
|
readonly battery: {
|
|
@@ -9,7 +9,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
9
9
|
readonly targets: readonly [{
|
|
10
10
|
readonly id: 'level';
|
|
11
11
|
readonly cardinality: 'scalar';
|
|
12
|
-
readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.
|
|
12
|
+
readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter];
|
|
13
13
|
readonly apply: 'add';
|
|
14
14
|
readonly vocabularyCap: 'battery';
|
|
15
15
|
readonly vocabularyStateField: 'level';
|
|
@@ -56,7 +56,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
56
56
|
readonly targets: readonly [{
|
|
57
57
|
readonly id: 'items';
|
|
58
58
|
readonly cardinality: 'keyedArray';
|
|
59
|
-
readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.
|
|
59
|
+
readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump];
|
|
60
60
|
readonly apply: 'add';
|
|
61
61
|
readonly vocabularyCap: 'consumables';
|
|
62
62
|
readonly sources: readonly [];
|
|
@@ -171,6 +171,255 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
171
171
|
readonly debounceMs: 2000;
|
|
172
172
|
}];
|
|
173
173
|
};
|
|
174
|
+
readonly 'fan-control': {
|
|
175
|
+
readonly version: 1;
|
|
176
|
+
readonly targets: readonly [{
|
|
177
|
+
readonly id: 'horizontal-oscillating';
|
|
178
|
+
readonly cardinality: 'scalar';
|
|
179
|
+
readonly deviceTypes: readonly [DeviceType.Fan];
|
|
180
|
+
readonly apply: 'replace';
|
|
181
|
+
readonly vocabularyCap: 'fan-control';
|
|
182
|
+
readonly vocabularyStateField: 'oscillating';
|
|
183
|
+
readonly sources: readonly [{
|
|
184
|
+
readonly kind: 'switch';
|
|
185
|
+
readonly transformKinds: readonly ["identity"];
|
|
186
|
+
readonly transforms: readonly [{
|
|
187
|
+
readonly kind: 'identity';
|
|
188
|
+
}];
|
|
189
|
+
}];
|
|
190
|
+
readonly sourceReport: {
|
|
191
|
+
readonly status: 'assignment-status';
|
|
192
|
+
};
|
|
193
|
+
readonly advancedExpression: false;
|
|
194
|
+
readonly section: 'oscillation-axes';
|
|
195
|
+
readonly path: 'oscillationAxes.horizontal.oscillating';
|
|
196
|
+
readonly valueKind: 'boolean';
|
|
197
|
+
readonly nullable: true;
|
|
198
|
+
}, {
|
|
199
|
+
readonly id: 'horizontal-angle';
|
|
200
|
+
readonly cardinality: 'scalar';
|
|
201
|
+
readonly deviceTypes: readonly [DeviceType.Fan];
|
|
202
|
+
readonly apply: 'replace';
|
|
203
|
+
readonly vocabularyCap: 'fan-control';
|
|
204
|
+
readonly sources: readonly [{
|
|
205
|
+
readonly kind: 'numeric';
|
|
206
|
+
readonly transformKinds: readonly ["identity"];
|
|
207
|
+
readonly transforms: readonly [{
|
|
208
|
+
readonly kind: 'identity';
|
|
209
|
+
}];
|
|
210
|
+
}];
|
|
211
|
+
readonly sourceReport: {
|
|
212
|
+
readonly status: 'assignment-status';
|
|
213
|
+
};
|
|
214
|
+
readonly advancedExpression: false;
|
|
215
|
+
readonly section: 'oscillation-axes';
|
|
216
|
+
readonly path: 'oscillationAxes.horizontal.angle';
|
|
217
|
+
readonly valueKind: 'number';
|
|
218
|
+
readonly nullable: true;
|
|
219
|
+
readonly companions: readonly [{
|
|
220
|
+
readonly kind: 'source-field';
|
|
221
|
+
readonly path: 'oscillationAxes.horizontal.min';
|
|
222
|
+
readonly field: 'min';
|
|
223
|
+
}, {
|
|
224
|
+
readonly kind: 'source-field';
|
|
225
|
+
readonly path: 'oscillationAxes.horizontal.max';
|
|
226
|
+
readonly field: 'max';
|
|
227
|
+
}, {
|
|
228
|
+
readonly kind: 'source-field';
|
|
229
|
+
readonly path: 'oscillationAxes.horizontal.step';
|
|
230
|
+
readonly field: 'step';
|
|
231
|
+
}];
|
|
232
|
+
}, {
|
|
233
|
+
readonly id: 'horizontal-sweepFrom';
|
|
234
|
+
readonly cardinality: 'scalar';
|
|
235
|
+
readonly deviceTypes: readonly [DeviceType.Fan];
|
|
236
|
+
readonly apply: 'replace';
|
|
237
|
+
readonly vocabularyCap: 'fan-control';
|
|
238
|
+
readonly sources: readonly [{
|
|
239
|
+
readonly kind: 'numeric';
|
|
240
|
+
readonly transformKinds: readonly ["identity"];
|
|
241
|
+
readonly transforms: readonly [{
|
|
242
|
+
readonly kind: 'identity';
|
|
243
|
+
}];
|
|
244
|
+
}];
|
|
245
|
+
readonly sourceReport: {
|
|
246
|
+
readonly status: 'assignment-status';
|
|
247
|
+
};
|
|
248
|
+
readonly advancedExpression: false;
|
|
249
|
+
readonly section: 'oscillation-axes';
|
|
250
|
+
readonly path: 'oscillationAxes.horizontal.sweepFrom';
|
|
251
|
+
readonly valueKind: 'number';
|
|
252
|
+
readonly nullable: true;
|
|
253
|
+
}, {
|
|
254
|
+
readonly id: 'horizontal-sweepTo';
|
|
255
|
+
readonly cardinality: 'scalar';
|
|
256
|
+
readonly deviceTypes: readonly [DeviceType.Fan];
|
|
257
|
+
readonly apply: 'replace';
|
|
258
|
+
readonly vocabularyCap: 'fan-control';
|
|
259
|
+
readonly sources: readonly [{
|
|
260
|
+
readonly kind: 'numeric';
|
|
261
|
+
readonly transformKinds: readonly ["identity"];
|
|
262
|
+
readonly transforms: readonly [{
|
|
263
|
+
readonly kind: 'identity';
|
|
264
|
+
}];
|
|
265
|
+
}];
|
|
266
|
+
readonly sourceReport: {
|
|
267
|
+
readonly status: 'assignment-status';
|
|
268
|
+
};
|
|
269
|
+
readonly advancedExpression: false;
|
|
270
|
+
readonly section: 'oscillation-axes';
|
|
271
|
+
readonly path: 'oscillationAxes.horizontal.sweepTo';
|
|
272
|
+
readonly valueKind: 'number';
|
|
273
|
+
readonly nullable: true;
|
|
274
|
+
}, {
|
|
275
|
+
readonly id: 'vertical-oscillating';
|
|
276
|
+
readonly cardinality: 'scalar';
|
|
277
|
+
readonly deviceTypes: readonly [DeviceType.Fan];
|
|
278
|
+
readonly apply: 'replace';
|
|
279
|
+
readonly vocabularyCap: 'fan-control';
|
|
280
|
+
readonly vocabularyStateField: 'oscillating';
|
|
281
|
+
readonly sources: readonly [{
|
|
282
|
+
readonly kind: 'switch';
|
|
283
|
+
readonly transformKinds: readonly ["identity"];
|
|
284
|
+
readonly transforms: readonly [{
|
|
285
|
+
readonly kind: 'identity';
|
|
286
|
+
}];
|
|
287
|
+
}];
|
|
288
|
+
readonly sourceReport: {
|
|
289
|
+
readonly status: 'assignment-status';
|
|
290
|
+
};
|
|
291
|
+
readonly advancedExpression: false;
|
|
292
|
+
readonly section: 'oscillation-axes';
|
|
293
|
+
readonly path: 'oscillationAxes.vertical.oscillating';
|
|
294
|
+
readonly valueKind: 'boolean';
|
|
295
|
+
readonly nullable: true;
|
|
296
|
+
}, {
|
|
297
|
+
readonly id: 'vertical-angle';
|
|
298
|
+
readonly cardinality: 'scalar';
|
|
299
|
+
readonly deviceTypes: readonly [DeviceType.Fan];
|
|
300
|
+
readonly apply: 'replace';
|
|
301
|
+
readonly vocabularyCap: 'fan-control';
|
|
302
|
+
readonly sources: readonly [{
|
|
303
|
+
readonly kind: 'numeric';
|
|
304
|
+
readonly transformKinds: readonly ["identity"];
|
|
305
|
+
readonly transforms: readonly [{
|
|
306
|
+
readonly kind: 'identity';
|
|
307
|
+
}];
|
|
308
|
+
}];
|
|
309
|
+
readonly sourceReport: {
|
|
310
|
+
readonly status: 'assignment-status';
|
|
311
|
+
};
|
|
312
|
+
readonly advancedExpression: false;
|
|
313
|
+
readonly section: 'oscillation-axes';
|
|
314
|
+
readonly path: 'oscillationAxes.vertical.angle';
|
|
315
|
+
readonly valueKind: 'number';
|
|
316
|
+
readonly nullable: true;
|
|
317
|
+
readonly companions: readonly [{
|
|
318
|
+
readonly kind: 'source-field';
|
|
319
|
+
readonly path: 'oscillationAxes.vertical.min';
|
|
320
|
+
readonly field: 'min';
|
|
321
|
+
}, {
|
|
322
|
+
readonly kind: 'source-field';
|
|
323
|
+
readonly path: 'oscillationAxes.vertical.max';
|
|
324
|
+
readonly field: 'max';
|
|
325
|
+
}, {
|
|
326
|
+
readonly kind: 'source-field';
|
|
327
|
+
readonly path: 'oscillationAxes.vertical.step';
|
|
328
|
+
readonly field: 'step';
|
|
329
|
+
}];
|
|
330
|
+
}, {
|
|
331
|
+
readonly id: 'vertical-sweepFrom';
|
|
332
|
+
readonly cardinality: 'scalar';
|
|
333
|
+
readonly deviceTypes: readonly [DeviceType.Fan];
|
|
334
|
+
readonly apply: 'replace';
|
|
335
|
+
readonly vocabularyCap: 'fan-control';
|
|
336
|
+
readonly sources: readonly [{
|
|
337
|
+
readonly kind: 'numeric';
|
|
338
|
+
readonly transformKinds: readonly ["identity"];
|
|
339
|
+
readonly transforms: readonly [{
|
|
340
|
+
readonly kind: 'identity';
|
|
341
|
+
}];
|
|
342
|
+
}];
|
|
343
|
+
readonly sourceReport: {
|
|
344
|
+
readonly status: 'assignment-status';
|
|
345
|
+
};
|
|
346
|
+
readonly advancedExpression: false;
|
|
347
|
+
readonly section: 'oscillation-axes';
|
|
348
|
+
readonly path: 'oscillationAxes.vertical.sweepFrom';
|
|
349
|
+
readonly valueKind: 'number';
|
|
350
|
+
readonly nullable: true;
|
|
351
|
+
}, {
|
|
352
|
+
readonly id: 'vertical-sweepTo';
|
|
353
|
+
readonly cardinality: 'scalar';
|
|
354
|
+
readonly deviceTypes: readonly [DeviceType.Fan];
|
|
355
|
+
readonly apply: 'replace';
|
|
356
|
+
readonly vocabularyCap: 'fan-control';
|
|
357
|
+
readonly sources: readonly [{
|
|
358
|
+
readonly kind: 'numeric';
|
|
359
|
+
readonly transformKinds: readonly ["identity"];
|
|
360
|
+
readonly transforms: readonly [{
|
|
361
|
+
readonly kind: 'identity';
|
|
362
|
+
}];
|
|
363
|
+
}];
|
|
364
|
+
readonly sourceReport: {
|
|
365
|
+
readonly status: 'assignment-status';
|
|
366
|
+
};
|
|
367
|
+
readonly advancedExpression: false;
|
|
368
|
+
readonly section: 'oscillation-axes';
|
|
369
|
+
readonly path: 'oscillationAxes.vertical.sweepTo';
|
|
370
|
+
readonly valueKind: 'number';
|
|
371
|
+
readonly nullable: true;
|
|
372
|
+
}, {
|
|
373
|
+
readonly id: 'preset';
|
|
374
|
+
readonly cardinality: 'scalar';
|
|
375
|
+
readonly deviceTypes: readonly [DeviceType.Fan];
|
|
376
|
+
readonly apply: 'replace';
|
|
377
|
+
readonly vocabularyCap: 'fan-control';
|
|
378
|
+
readonly sources: readonly [{
|
|
379
|
+
readonly kind: 'field';
|
|
380
|
+
readonly valueKinds: readonly ["string"];
|
|
381
|
+
readonly transformKinds: readonly ["identity"];
|
|
382
|
+
readonly transforms: readonly [{
|
|
383
|
+
readonly kind: 'identity';
|
|
384
|
+
}];
|
|
385
|
+
}];
|
|
386
|
+
readonly sourceReport: {
|
|
387
|
+
readonly status: 'assignment-status';
|
|
388
|
+
};
|
|
389
|
+
readonly advancedExpression: false;
|
|
390
|
+
readonly path: 'preset';
|
|
391
|
+
readonly valueKind: 'string';
|
|
392
|
+
readonly nullable: false;
|
|
393
|
+
}];
|
|
394
|
+
readonly overridable: readonly [{
|
|
395
|
+
readonly path: 'oscillationAxes.horizontal.oscillating';
|
|
396
|
+
readonly by: 'horizontal-oscillating';
|
|
397
|
+
}, {
|
|
398
|
+
readonly path: 'oscillationAxes.horizontal.angle';
|
|
399
|
+
readonly by: 'horizontal-angle';
|
|
400
|
+
}, {
|
|
401
|
+
readonly path: 'oscillationAxes.horizontal.sweepFrom';
|
|
402
|
+
readonly by: 'horizontal-sweepFrom';
|
|
403
|
+
}, {
|
|
404
|
+
readonly path: 'oscillationAxes.horizontal.sweepTo';
|
|
405
|
+
readonly by: 'horizontal-sweepTo';
|
|
406
|
+
}, {
|
|
407
|
+
readonly path: 'oscillationAxes.vertical.oscillating';
|
|
408
|
+
readonly by: 'vertical-oscillating';
|
|
409
|
+
}, {
|
|
410
|
+
readonly path: 'oscillationAxes.vertical.angle';
|
|
411
|
+
readonly by: 'vertical-angle';
|
|
412
|
+
}, {
|
|
413
|
+
readonly path: 'oscillationAxes.vertical.sweepFrom';
|
|
414
|
+
readonly by: 'vertical-sweepFrom';
|
|
415
|
+
}, {
|
|
416
|
+
readonly path: 'oscillationAxes.vertical.sweepTo';
|
|
417
|
+
readonly by: 'vertical-sweepTo';
|
|
418
|
+
}, {
|
|
419
|
+
readonly path: 'preset';
|
|
420
|
+
readonly by: 'preset';
|
|
421
|
+
}];
|
|
422
|
+
};
|
|
174
423
|
readonly 'fan-presets': {
|
|
175
424
|
readonly version: 1;
|
|
176
425
|
readonly targets: readonly [{
|
|
@@ -262,7 +511,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
262
511
|
readonly targets: readonly [{
|
|
263
512
|
readonly id: 'power';
|
|
264
513
|
readonly cardinality: 'scalar';
|
|
265
|
-
readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.
|
|
514
|
+
readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
|
|
266
515
|
readonly apply: 'add';
|
|
267
516
|
readonly vocabularyCap: 'power-meter';
|
|
268
517
|
readonly vocabularyStateField: 'power';
|
|
@@ -289,7 +538,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
289
538
|
}, {
|
|
290
539
|
readonly id: 'energy';
|
|
291
540
|
readonly cardinality: 'scalar';
|
|
292
|
-
readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.
|
|
541
|
+
readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
|
|
293
542
|
readonly apply: 'add';
|
|
294
543
|
readonly vocabularyCap: 'power-meter';
|
|
295
544
|
readonly vocabularyStateField: 'energy';
|
|
@@ -316,7 +565,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
316
565
|
}, {
|
|
317
566
|
readonly id: 'voltage';
|
|
318
567
|
readonly cardinality: 'scalar';
|
|
319
|
-
readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.
|
|
568
|
+
readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
|
|
320
569
|
readonly apply: 'add';
|
|
321
570
|
readonly vocabularyCap: 'power-meter';
|
|
322
571
|
readonly vocabularyStateField: 'voltage';
|
|
@@ -343,7 +592,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
343
592
|
}, {
|
|
344
593
|
readonly id: 'current';
|
|
345
594
|
readonly cardinality: 'scalar';
|
|
346
|
-
readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.
|
|
595
|
+
readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
|
|
347
596
|
readonly apply: 'add';
|
|
348
597
|
readonly vocabularyCap: 'power-meter';
|
|
349
598
|
readonly vocabularyStateField: 'current';
|
|
@@ -427,7 +676,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
427
676
|
readonly targets: readonly [{
|
|
428
677
|
readonly id: 'running';
|
|
429
678
|
readonly cardinality: 'scalar';
|
|
430
|
-
readonly deviceTypes: readonly [DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.
|
|
679
|
+
readonly deviceTypes: readonly [DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder];
|
|
431
680
|
readonly apply: 'add';
|
|
432
681
|
readonly vocabularyCap: 'running-state';
|
|
433
682
|
readonly vocabularyStateField: 'running';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 1483 method paths across 205 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { MethodRole } from '../auth/viewer-access.js';
|
|
12
12
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 613 methods carry a device reference, of which
|
|
10
10
|
* 195 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Top-level fields, number arrays, and one-level arrays of objects carrying
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DeviceType, i as DeviceRole, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-
|
|
1
|
+
import { a as DeviceType, i as DeviceRole, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-CPp3votu.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
//#region src/ffmpeg/invocation.ts
|