@camstack/addon-export-hap 1.1.7 → 1.1.8
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/export-hap.addon.js +79 -14
- package/dist/export-hap.addon.mjs +79 -14
- package/package.json +1 -1
package/dist/export-hap.addon.js
CHANGED
|
@@ -9047,18 +9047,47 @@ object({
|
|
|
9047
9047
|
lastUpdated: number().nullable()
|
|
9048
9048
|
});
|
|
9049
9049
|
DeviceType.Image;
|
|
9050
|
+
/**
|
|
9051
|
+
* Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
|
|
9052
|
+
* with a mowing lifecycle plus a dock action.
|
|
9053
|
+
*
|
|
9054
|
+
* Activity follows HA's canonical lawn-mower lifecycle: `idle` /
|
|
9055
|
+
* `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
|
|
9056
|
+
* nullable — some mowers don't report a battery percentage.
|
|
9057
|
+
*
|
|
9058
|
+
* `startMowing` begins a mowing run, `pause` halts it in place, and
|
|
9059
|
+
* `dock` sends the mower back to its charging station.
|
|
9060
|
+
*/
|
|
9061
|
+
var LawnMowerActivitySchema = _enum([
|
|
9062
|
+
"idle",
|
|
9063
|
+
"mowing",
|
|
9064
|
+
"paused",
|
|
9065
|
+
"docked",
|
|
9066
|
+
"error"
|
|
9067
|
+
]);
|
|
9068
|
+
/** Severity of the current device/error code — info (status), warning, error. */
|
|
9069
|
+
var DeviceCodeSeveritySchema = _enum([
|
|
9070
|
+
"info",
|
|
9071
|
+
"warning",
|
|
9072
|
+
"error"
|
|
9073
|
+
]);
|
|
9050
9074
|
object({
|
|
9051
9075
|
/** Lifecycle activity of the mower. */
|
|
9052
|
-
activity:
|
|
9053
|
-
"idle",
|
|
9054
|
-
"mowing",
|
|
9055
|
-
"paused",
|
|
9056
|
-
"docked",
|
|
9057
|
-
"error"
|
|
9058
|
-
]),
|
|
9076
|
+
activity: LawnMowerActivitySchema,
|
|
9059
9077
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
9060
9078
|
* reading. */
|
|
9061
9079
|
batteryLevel: number().min(0).max(100).nullable(),
|
|
9080
|
+
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
9081
|
+
* task is active / progress is unavailable. */
|
|
9082
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
9083
|
+
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
9084
|
+
* or null when unknown. */
|
|
9085
|
+
currentCode: number().nullable(),
|
|
9086
|
+
/** Human label for {@link currentCode}, or null when undecodable. */
|
|
9087
|
+
currentCodeLabel: string().nullable(),
|
|
9088
|
+
/** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
|
|
9089
|
+
* attention; `info` is normal status. */
|
|
9090
|
+
severity: DeviceCodeSeveritySchema,
|
|
9062
9091
|
/** Ms epoch when the slice was last updated. */
|
|
9063
9092
|
lastChangedAt: number()
|
|
9064
9093
|
});
|
|
@@ -10633,6 +10662,7 @@ var VacuumStateSchema = _enum([
|
|
|
10633
10662
|
"paused",
|
|
10634
10663
|
"returning",
|
|
10635
10664
|
"docked",
|
|
10665
|
+
"drying",
|
|
10636
10666
|
"error"
|
|
10637
10667
|
]);
|
|
10638
10668
|
/**
|
|
@@ -10671,6 +10701,12 @@ object({
|
|
|
10671
10701
|
detergent: TankStatusSchema.nullable(),
|
|
10672
10702
|
/** Dust bin. Null when the hardware has no dust bin. */
|
|
10673
10703
|
dustBin: TankStatusSchema.nullable(),
|
|
10704
|
+
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
10705
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
10706
|
+
/** Current error code (0 / null = no error). */
|
|
10707
|
+
errorCode: number().nullable(),
|
|
10708
|
+
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
10709
|
+
errorLabel: string().nullable(),
|
|
10674
10710
|
/** Ms epoch when the slice was last updated. */
|
|
10675
10711
|
lastChangedAt: number()
|
|
10676
10712
|
});
|
|
@@ -12112,17 +12148,32 @@ var ReleaseInputSchema = object({
|
|
|
12112
12148
|
* the parent cascades into every accessory. */
|
|
12113
12149
|
camDeviceId: number().int().nonnegative()
|
|
12114
12150
|
});
|
|
12115
|
-
var ResyncInputSchema = object({
|
|
12116
|
-
/** Parent CamStack device id of an adopted device. The provider resolves its
|
|
12117
|
-
* source (integration/broker + native id) and re-aligns the device's
|
|
12118
|
-
* structural spec (type/role/capabilities/units) with the live mapping,
|
|
12119
|
-
* rebuilding any child whose class changed while preserving operator edits. */
|
|
12120
|
-
camDeviceId: number().int().nonnegative()
|
|
12151
|
+
var ResyncInputSchema = object({
|
|
12152
|
+
/** Parent CamStack device id of an adopted device. The provider resolves its
|
|
12153
|
+
* source (integration/broker + native id) and re-aligns the device's
|
|
12154
|
+
* structural spec (type/role/capabilities/units) with the live mapping,
|
|
12155
|
+
* rebuilding any child whose class changed while preserving operator edits. */
|
|
12156
|
+
camDeviceId: number().int().nonnegative(),
|
|
12157
|
+
/** "Resync from zero" (#19). When true, the kernel PURGES every accessory
|
|
12158
|
+
* child of `camDeviceId` BEFORE the provider re-derives the device, so the
|
|
12159
|
+
* children are rebuilt fresh from source — correct names, coords, and units —
|
|
12160
|
+
* instead of being preserved by the incremental reconcile. Use to recover from
|
|
12161
|
+
* legacy generic/placeholder names that the normal name-precedence keeps frozen
|
|
12162
|
+
* (the operator's explicit reset). Push-driven integrations (no-op resync)
|
|
12163
|
+
* rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
|
|
12164
|
+
* Operator edits on the PARENT (its name, layout, primary-child pick) survive —
|
|
12165
|
+
* only the children are torn down. Omitted/false ⇒ the normal incremental
|
|
12166
|
+
* re-sync that preserves children. */
|
|
12167
|
+
resetToSource: boolean().optional()
|
|
12168
|
+
});
|
|
12121
12169
|
var ResyncResultSchema = object({
|
|
12122
12170
|
/** True when the persisted spec actually changed (children may have been rebuilt). */
|
|
12123
12171
|
changed: boolean(),
|
|
12124
12172
|
/** Number of child devices rebuilt into a new class by this re-sync. */
|
|
12125
|
-
rebuiltChildren: number().int().nonnegative()
|
|
12173
|
+
rebuiltChildren: number().int().nonnegative(),
|
|
12174
|
+
/** Number of accessory children torn down by a `resetToSource` purge before the
|
|
12175
|
+
* provider re-derived the device. 0/absent for a normal incremental re-sync. */
|
|
12176
|
+
removedChildren: number().int().nonnegative().optional()
|
|
12126
12177
|
});
|
|
12127
12178
|
method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
|
|
12128
12179
|
kind: "mutation",
|
|
@@ -13846,6 +13897,11 @@ var DeviceMetaSchema = object({
|
|
|
13846
13897
|
addonId: string(),
|
|
13847
13898
|
type: string(),
|
|
13848
13899
|
name: string(),
|
|
13900
|
+
/** True once an operator explicitly renamed the device via `setName`. Drives
|
|
13901
|
+
* reconcile name-precedence (preserve operator name vs adopt fresh provider
|
|
13902
|
+
* name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
|
|
13903
|
+
* `DeviceMeta.userNamed`. */
|
|
13904
|
+
userNamed: boolean().optional(),
|
|
13849
13905
|
location: string().nullable(),
|
|
13850
13906
|
disabled: boolean(),
|
|
13851
13907
|
parentDeviceId: number().nullable(),
|
|
@@ -14156,6 +14212,9 @@ method(object({
|
|
|
14156
14212
|
}), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
|
|
14157
14213
|
kind: "mutation",
|
|
14158
14214
|
auth: "admin"
|
|
14215
|
+
}), method(ResyncInputSchema, ResyncResultSchema, {
|
|
14216
|
+
kind: "mutation",
|
|
14217
|
+
auth: "admin"
|
|
14159
14218
|
}), method(object({
|
|
14160
14219
|
deviceId: number(),
|
|
14161
14220
|
key: string(),
|
|
@@ -17918,6 +17977,12 @@ Object.freeze({
|
|
|
17918
17977
|
addonId: null,
|
|
17919
17978
|
access: "create"
|
|
17920
17979
|
},
|
|
17980
|
+
"deviceManager.adoptionResync": {
|
|
17981
|
+
capName: "device-manager",
|
|
17982
|
+
capScope: "system",
|
|
17983
|
+
addonId: null,
|
|
17984
|
+
access: "create"
|
|
17985
|
+
},
|
|
17921
17986
|
"deviceManager.allocateDeviceId": {
|
|
17922
17987
|
capName: "device-manager",
|
|
17923
17988
|
capScope: "system",
|
|
@@ -9022,18 +9022,47 @@ object({
|
|
|
9022
9022
|
lastUpdated: number().nullable()
|
|
9023
9023
|
});
|
|
9024
9024
|
DeviceType.Image;
|
|
9025
|
+
/**
|
|
9026
|
+
* Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
|
|
9027
|
+
* with a mowing lifecycle plus a dock action.
|
|
9028
|
+
*
|
|
9029
|
+
* Activity follows HA's canonical lawn-mower lifecycle: `idle` /
|
|
9030
|
+
* `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
|
|
9031
|
+
* nullable — some mowers don't report a battery percentage.
|
|
9032
|
+
*
|
|
9033
|
+
* `startMowing` begins a mowing run, `pause` halts it in place, and
|
|
9034
|
+
* `dock` sends the mower back to its charging station.
|
|
9035
|
+
*/
|
|
9036
|
+
var LawnMowerActivitySchema = _enum([
|
|
9037
|
+
"idle",
|
|
9038
|
+
"mowing",
|
|
9039
|
+
"paused",
|
|
9040
|
+
"docked",
|
|
9041
|
+
"error"
|
|
9042
|
+
]);
|
|
9043
|
+
/** Severity of the current device/error code — info (status), warning, error. */
|
|
9044
|
+
var DeviceCodeSeveritySchema = _enum([
|
|
9045
|
+
"info",
|
|
9046
|
+
"warning",
|
|
9047
|
+
"error"
|
|
9048
|
+
]);
|
|
9025
9049
|
object({
|
|
9026
9050
|
/** Lifecycle activity of the mower. */
|
|
9027
|
-
activity:
|
|
9028
|
-
"idle",
|
|
9029
|
-
"mowing",
|
|
9030
|
-
"paused",
|
|
9031
|
-
"docked",
|
|
9032
|
-
"error"
|
|
9033
|
-
]),
|
|
9051
|
+
activity: LawnMowerActivitySchema,
|
|
9034
9052
|
/** 0..100 battery percentage. Null when the device has no battery
|
|
9035
9053
|
* reading. */
|
|
9036
9054
|
batteryLevel: number().min(0).max(100).nullable(),
|
|
9055
|
+
/** 0..100 mowing-completion percentage of the current task, or null when no
|
|
9056
|
+
* task is active / progress is unavailable. */
|
|
9057
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
9058
|
+
/** Current device/event code (dynamic — mostly status, sometimes an error),
|
|
9059
|
+
* or null when unknown. */
|
|
9060
|
+
currentCode: number().nullable(),
|
|
9061
|
+
/** Human label for {@link currentCode}, or null when undecodable. */
|
|
9062
|
+
currentCodeLabel: string().nullable(),
|
|
9063
|
+
/** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
|
|
9064
|
+
* attention; `info` is normal status. */
|
|
9065
|
+
severity: DeviceCodeSeveritySchema,
|
|
9037
9066
|
/** Ms epoch when the slice was last updated. */
|
|
9038
9067
|
lastChangedAt: number()
|
|
9039
9068
|
});
|
|
@@ -10608,6 +10637,7 @@ var VacuumStateSchema = _enum([
|
|
|
10608
10637
|
"paused",
|
|
10609
10638
|
"returning",
|
|
10610
10639
|
"docked",
|
|
10640
|
+
"drying",
|
|
10611
10641
|
"error"
|
|
10612
10642
|
]);
|
|
10613
10643
|
/**
|
|
@@ -10646,6 +10676,12 @@ object({
|
|
|
10646
10676
|
detergent: TankStatusSchema.nullable(),
|
|
10647
10677
|
/** Dust bin. Null when the hardware has no dust bin. */
|
|
10648
10678
|
dustBin: TankStatusSchema.nullable(),
|
|
10679
|
+
/** 0..100 cleaning-completion percentage of the current task, or null. */
|
|
10680
|
+
progressPercent: number().min(0).max(100).nullable(),
|
|
10681
|
+
/** Current error code (0 / null = no error). */
|
|
10682
|
+
errorCode: number().nullable(),
|
|
10683
|
+
/** Human label for {@link errorCode}, or null when none / undecodable. */
|
|
10684
|
+
errorLabel: string().nullable(),
|
|
10649
10685
|
/** Ms epoch when the slice was last updated. */
|
|
10650
10686
|
lastChangedAt: number()
|
|
10651
10687
|
});
|
|
@@ -12087,17 +12123,32 @@ var ReleaseInputSchema = object({
|
|
|
12087
12123
|
* the parent cascades into every accessory. */
|
|
12088
12124
|
camDeviceId: number().int().nonnegative()
|
|
12089
12125
|
});
|
|
12090
|
-
var ResyncInputSchema = object({
|
|
12091
|
-
/** Parent CamStack device id of an adopted device. The provider resolves its
|
|
12092
|
-
* source (integration/broker + native id) and re-aligns the device's
|
|
12093
|
-
* structural spec (type/role/capabilities/units) with the live mapping,
|
|
12094
|
-
* rebuilding any child whose class changed while preserving operator edits. */
|
|
12095
|
-
camDeviceId: number().int().nonnegative()
|
|
12126
|
+
var ResyncInputSchema = object({
|
|
12127
|
+
/** Parent CamStack device id of an adopted device. The provider resolves its
|
|
12128
|
+
* source (integration/broker + native id) and re-aligns the device's
|
|
12129
|
+
* structural spec (type/role/capabilities/units) with the live mapping,
|
|
12130
|
+
* rebuilding any child whose class changed while preserving operator edits. */
|
|
12131
|
+
camDeviceId: number().int().nonnegative(),
|
|
12132
|
+
/** "Resync from zero" (#19). When true, the kernel PURGES every accessory
|
|
12133
|
+
* child of `camDeviceId` BEFORE the provider re-derives the device, so the
|
|
12134
|
+
* children are rebuilt fresh from source — correct names, coords, and units —
|
|
12135
|
+
* instead of being preserved by the incremental reconcile. Use to recover from
|
|
12136
|
+
* legacy generic/placeholder names that the normal name-precedence keeps frozen
|
|
12137
|
+
* (the operator's explicit reset). Push-driven integrations (no-op resync)
|
|
12138
|
+
* rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
|
|
12139
|
+
* Operator edits on the PARENT (its name, layout, primary-child pick) survive —
|
|
12140
|
+
* only the children are torn down. Omitted/false ⇒ the normal incremental
|
|
12141
|
+
* re-sync that preserves children. */
|
|
12142
|
+
resetToSource: boolean().optional()
|
|
12143
|
+
});
|
|
12096
12144
|
var ResyncResultSchema = object({
|
|
12097
12145
|
/** True when the persisted spec actually changed (children may have been rebuilt). */
|
|
12098
12146
|
changed: boolean(),
|
|
12099
12147
|
/** Number of child devices rebuilt into a new class by this re-sync. */
|
|
12100
|
-
rebuiltChildren: number().int().nonnegative()
|
|
12148
|
+
rebuiltChildren: number().int().nonnegative(),
|
|
12149
|
+
/** Number of accessory children torn down by a `resetToSource` purge before the
|
|
12150
|
+
* provider re-derived the device. 0/absent for a normal incremental re-sync. */
|
|
12151
|
+
removedChildren: number().int().nonnegative().optional()
|
|
12101
12152
|
});
|
|
12102
12153
|
method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
|
|
12103
12154
|
kind: "mutation",
|
|
@@ -13821,6 +13872,11 @@ var DeviceMetaSchema = object({
|
|
|
13821
13872
|
addonId: string(),
|
|
13822
13873
|
type: string(),
|
|
13823
13874
|
name: string(),
|
|
13875
|
+
/** True once an operator explicitly renamed the device via `setName`. Drives
|
|
13876
|
+
* reconcile name-precedence (preserve operator name vs adopt fresh provider
|
|
13877
|
+
* name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
|
|
13878
|
+
* `DeviceMeta.userNamed`. */
|
|
13879
|
+
userNamed: boolean().optional(),
|
|
13824
13880
|
location: string().nullable(),
|
|
13825
13881
|
disabled: boolean(),
|
|
13826
13882
|
parentDeviceId: number().nullable(),
|
|
@@ -14131,6 +14187,9 @@ method(object({
|
|
|
14131
14187
|
}), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
|
|
14132
14188
|
kind: "mutation",
|
|
14133
14189
|
auth: "admin"
|
|
14190
|
+
}), method(ResyncInputSchema, ResyncResultSchema, {
|
|
14191
|
+
kind: "mutation",
|
|
14192
|
+
auth: "admin"
|
|
14134
14193
|
}), method(object({
|
|
14135
14194
|
deviceId: number(),
|
|
14136
14195
|
key: string(),
|
|
@@ -17893,6 +17952,12 @@ Object.freeze({
|
|
|
17893
17952
|
addonId: null,
|
|
17894
17953
|
access: "create"
|
|
17895
17954
|
},
|
|
17955
|
+
"deviceManager.adoptionResync": {
|
|
17956
|
+
capName: "device-manager",
|
|
17957
|
+
capScope: "system",
|
|
17958
|
+
addonId: null,
|
|
17959
|
+
access: "create"
|
|
17960
|
+
},
|
|
17896
17961
|
"deviceManager.allocateDeviceId": {
|
|
17897
17962
|
capName: "device-manager",
|
|
17898
17963
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-export-hap",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "HomeKit (HAP) bridge exporter for CamStack devices. Publishes a bridged accessory per exposed device — MotionSensor in this MVP; Camera/Doorbell/Switch/Light follow.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|