@camstack/addon-provider-wyze 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -4659,7 +4659,7 @@ function _instanceof(cls, params = {}) {
4659
4659
  return inst;
4660
4660
  }
4661
4661
  //#endregion
4662
- //#region ../types/dist/sleep-B3AOslwX.mjs
4662
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4663
4663
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4664
4664
  EventCategory["SystemBoot"] = "system.boot";
4665
4665
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6227,6 +6227,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6227
6227
  DeviceType["Switch"] = "switch";
6228
6228
  DeviceType["Sensor"] = "sensor";
6229
6229
  DeviceType["Thermostat"] = "thermostat";
6230
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6231
+ * `climate-control` cap surface with `Thermostat` but renders a
6232
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6233
+ * independent vertical/horizontal swing). Sources: native Gree, and
6234
+ * reusable by other AC integrations. */
6235
+ DeviceType["Climate"] = "climate";
6230
6236
  DeviceType["Button"] = "button";
6231
6237
  /** Generic stateless event emitter — carries a device's EXACT declared
6232
6238
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9022,7 +9028,7 @@ var climateControlCapability = {
9022
9028
  scope: "device",
9023
9029
  deviceNative: true,
9024
9030
  mode: "singleton",
9025
- deviceTypes: [DeviceType.Thermostat],
9031
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9026
9032
  methods: {
9027
9033
  setMode: method(object({
9028
9034
  deviceId: number().int().nonnegative(),
@@ -13621,10 +13627,30 @@ var deviceProviderCapability = {
13621
13627
  type: string()
13622
13628
  }))),
13623
13629
  supportsDiscovery: method(object({}), boolean()),
13624
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13630
+ /**
13631
+ * Run a network scan. `params` carries optional provider-specific scan
13632
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13633
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13634
+ * (provider uses its local-network default).
13635
+ */
13636
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13625
13637
  kind: "mutation",
13626
13638
  auth: "admin"
13627
13639
  }),
13640
+ /**
13641
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13642
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13643
+ * `null` when the provider takes no extra scan params — the generic
13644
+ * aggregated scan never renders this; the per-integration scan does.
13645
+ */
13646
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13647
+ /**
13648
+ * The DeviceType this provider creates via manual add (Camera for
13649
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13650
+ * provider does not support manual creation. Lets the Add-Device dialog
13651
+ * pick the right type instead of assuming Camera.
13652
+ */
13653
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13628
13654
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13629
13655
  kind: "mutation",
13630
13656
  auth: "admin"
@@ -13748,9 +13774,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13748
13774
  async supportsDiscovery() {
13749
13775
  return false;
13750
13776
  }
13751
- async discoverDevices() {
13777
+ async discoverDevices(_input) {
13752
13778
  return [];
13753
13779
  }
13780
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13781
+ * Null = no extra params. Override in providers that support scoped scans. */
13782
+ async getDiscoveryParamsSchema() {
13783
+ return null;
13784
+ }
13785
+ /**
13786
+ * The DeviceType this provider creates via manual add — derived from the
13787
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13788
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13789
+ */
13790
+ async getManualCreationType() {
13791
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13792
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13793
+ }
13754
13794
  async adoptDiscoveredDevice(_input) {
13755
13795
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13756
13796
  }
@@ -15612,7 +15652,10 @@ method(object({
15612
15652
  }), FieldProbeResultSchema, {
15613
15653
  kind: "mutation",
15614
15654
  auth: "admin"
15615
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15655
+ }), method(object({
15656
+ addonId: string(),
15657
+ integrationId: string()
15658
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15616
15659
  addonId: string(),
15617
15660
  integrationId: string()
15618
15661
  }), AdoptionStatusSchema, {
@@ -15627,7 +15670,24 @@ method(object({
15627
15670
  }), method(ResyncInputSchema, ResyncResultSchema, {
15628
15671
  kind: "mutation",
15629
15672
  auth: "admin"
15673
+ }), method(object({}), object({ providers: array(object({
15674
+ addonId: string(),
15675
+ label: string()
15676
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15677
+ addonId: string(),
15678
+ label: string(),
15679
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15680
+ error: string().nullable()
15681
+ })).readonly() }), {
15682
+ kind: "mutation",
15683
+ auth: "admin"
15630
15684
  }), method(object({
15685
+ addonId: string(),
15686
+ params: record(string(), unknown()).optional()
15687
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15688
+ kind: "mutation",
15689
+ auth: "admin"
15690
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15631
15691
  deviceId: number(),
15632
15692
  key: string(),
15633
15693
  value: unknown()
@@ -20857,6 +20917,12 @@ Object.freeze({
20857
20917
  addonId: null,
20858
20918
  access: "create"
20859
20919
  },
20920
+ "deviceManager.adoptionListCandidateFilters": {
20921
+ capName: "device-manager",
20922
+ capScope: "system",
20923
+ addonId: null,
20924
+ access: "view"
20925
+ },
20860
20926
  "deviceManager.adoptionListCandidates": {
20861
20927
  capName: "device-manager",
20862
20928
  capScope: "system",
@@ -20905,12 +20971,30 @@ Object.freeze({
20905
20971
  addonId: null,
20906
20972
  access: "create"
20907
20973
  },
20974
+ "deviceManager.discoverAllProviders": {
20975
+ capName: "device-manager",
20976
+ capScope: "system",
20977
+ addonId: null,
20978
+ access: "create"
20979
+ },
20908
20980
  "deviceManager.discoverDevices": {
20909
20981
  capName: "device-manager",
20910
20982
  capScope: "system",
20911
20983
  addonId: null,
20912
20984
  access: "create"
20913
20985
  },
20986
+ "deviceManager.discoverProvider": {
20987
+ capName: "device-manager",
20988
+ capScope: "system",
20989
+ addonId: null,
20990
+ access: "create"
20991
+ },
20992
+ "deviceManager.discoveryProviders": {
20993
+ capName: "device-manager",
20994
+ capScope: "system",
20995
+ addonId: null,
20996
+ access: "view"
20997
+ },
20914
20998
  "deviceManager.enable": {
20915
20999
  capName: "device-manager",
20916
21000
  capScope: "system",
@@ -21061,6 +21145,18 @@ Object.freeze({
21061
21145
  addonId: null,
21062
21146
  access: "create"
21063
21147
  },
21148
+ "deviceManager.providerCreationType": {
21149
+ capName: "device-manager",
21150
+ capScope: "system",
21151
+ addonId: null,
21152
+ access: "view"
21153
+ },
21154
+ "deviceManager.providerDiscoveryParamsSchema": {
21155
+ capName: "device-manager",
21156
+ capScope: "system",
21157
+ addonId: null,
21158
+ access: "view"
21159
+ },
21064
21160
  "deviceManager.registerDevice": {
21065
21161
  capName: "device-manager",
21066
21162
  capScope: "system",
@@ -21277,6 +21373,18 @@ Object.freeze({
21277
21373
  addonId: null,
21278
21374
  access: "view"
21279
21375
  },
21376
+ "deviceProvider.getDiscoveryParamsSchema": {
21377
+ capName: "device-provider",
21378
+ capScope: "system",
21379
+ addonId: null,
21380
+ access: "view"
21381
+ },
21382
+ "deviceProvider.getManualCreationType": {
21383
+ capName: "device-provider",
21384
+ capScope: "system",
21385
+ addonId: null,
21386
+ access: "view"
21387
+ },
21280
21388
  "deviceProvider.getStatus": {
21281
21389
  capName: "device-provider",
21282
21390
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4638,7 +4638,7 @@ function _instanceof(cls, params = {}) {
4638
4638
  return inst;
4639
4639
  }
4640
4640
  //#endregion
4641
- //#region ../types/dist/sleep-B3AOslwX.mjs
4641
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4642
4642
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4643
4643
  EventCategory["SystemBoot"] = "system.boot";
4644
4644
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6206,6 +6206,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6206
6206
  DeviceType["Switch"] = "switch";
6207
6207
  DeviceType["Sensor"] = "sensor";
6208
6208
  DeviceType["Thermostat"] = "thermostat";
6209
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6210
+ * `climate-control` cap surface with `Thermostat` but renders a
6211
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6212
+ * independent vertical/horizontal swing). Sources: native Gree, and
6213
+ * reusable by other AC integrations. */
6214
+ DeviceType["Climate"] = "climate";
6209
6215
  DeviceType["Button"] = "button";
6210
6216
  /** Generic stateless event emitter — carries a device's EXACT declared
6211
6217
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9001,7 +9007,7 @@ var climateControlCapability = {
9001
9007
  scope: "device",
9002
9008
  deviceNative: true,
9003
9009
  mode: "singleton",
9004
- deviceTypes: [DeviceType.Thermostat],
9010
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9005
9011
  methods: {
9006
9012
  setMode: method(object({
9007
9013
  deviceId: number().int().nonnegative(),
@@ -13600,10 +13606,30 @@ var deviceProviderCapability = {
13600
13606
  type: string()
13601
13607
  }))),
13602
13608
  supportsDiscovery: method(object({}), boolean()),
13603
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13609
+ /**
13610
+ * Run a network scan. `params` carries optional provider-specific scan
13611
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13612
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13613
+ * (provider uses its local-network default).
13614
+ */
13615
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13604
13616
  kind: "mutation",
13605
13617
  auth: "admin"
13606
13618
  }),
13619
+ /**
13620
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13621
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13622
+ * `null` when the provider takes no extra scan params — the generic
13623
+ * aggregated scan never renders this; the per-integration scan does.
13624
+ */
13625
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13626
+ /**
13627
+ * The DeviceType this provider creates via manual add (Camera for
13628
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13629
+ * provider does not support manual creation. Lets the Add-Device dialog
13630
+ * pick the right type instead of assuming Camera.
13631
+ */
13632
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13607
13633
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13608
13634
  kind: "mutation",
13609
13635
  auth: "admin"
@@ -13727,9 +13753,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13727
13753
  async supportsDiscovery() {
13728
13754
  return false;
13729
13755
  }
13730
- async discoverDevices() {
13756
+ async discoverDevices(_input) {
13731
13757
  return [];
13732
13758
  }
13759
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13760
+ * Null = no extra params. Override in providers that support scoped scans. */
13761
+ async getDiscoveryParamsSchema() {
13762
+ return null;
13763
+ }
13764
+ /**
13765
+ * The DeviceType this provider creates via manual add — derived from the
13766
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13767
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13768
+ */
13769
+ async getManualCreationType() {
13770
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13771
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13772
+ }
13733
13773
  async adoptDiscoveredDevice(_input) {
13734
13774
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13735
13775
  }
@@ -15591,7 +15631,10 @@ method(object({
15591
15631
  }), FieldProbeResultSchema, {
15592
15632
  kind: "mutation",
15593
15633
  auth: "admin"
15594
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15634
+ }), method(object({
15635
+ addonId: string(),
15636
+ integrationId: string()
15637
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15595
15638
  addonId: string(),
15596
15639
  integrationId: string()
15597
15640
  }), AdoptionStatusSchema, {
@@ -15606,7 +15649,24 @@ method(object({
15606
15649
  }), method(ResyncInputSchema, ResyncResultSchema, {
15607
15650
  kind: "mutation",
15608
15651
  auth: "admin"
15652
+ }), method(object({}), object({ providers: array(object({
15653
+ addonId: string(),
15654
+ label: string()
15655
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15656
+ addonId: string(),
15657
+ label: string(),
15658
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15659
+ error: string().nullable()
15660
+ })).readonly() }), {
15661
+ kind: "mutation",
15662
+ auth: "admin"
15609
15663
  }), method(object({
15664
+ addonId: string(),
15665
+ params: record(string(), unknown()).optional()
15666
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15667
+ kind: "mutation",
15668
+ auth: "admin"
15669
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15610
15670
  deviceId: number(),
15611
15671
  key: string(),
15612
15672
  value: unknown()
@@ -20836,6 +20896,12 @@ Object.freeze({
20836
20896
  addonId: null,
20837
20897
  access: "create"
20838
20898
  },
20899
+ "deviceManager.adoptionListCandidateFilters": {
20900
+ capName: "device-manager",
20901
+ capScope: "system",
20902
+ addonId: null,
20903
+ access: "view"
20904
+ },
20839
20905
  "deviceManager.adoptionListCandidates": {
20840
20906
  capName: "device-manager",
20841
20907
  capScope: "system",
@@ -20884,12 +20950,30 @@ Object.freeze({
20884
20950
  addonId: null,
20885
20951
  access: "create"
20886
20952
  },
20953
+ "deviceManager.discoverAllProviders": {
20954
+ capName: "device-manager",
20955
+ capScope: "system",
20956
+ addonId: null,
20957
+ access: "create"
20958
+ },
20887
20959
  "deviceManager.discoverDevices": {
20888
20960
  capName: "device-manager",
20889
20961
  capScope: "system",
20890
20962
  addonId: null,
20891
20963
  access: "create"
20892
20964
  },
20965
+ "deviceManager.discoverProvider": {
20966
+ capName: "device-manager",
20967
+ capScope: "system",
20968
+ addonId: null,
20969
+ access: "create"
20970
+ },
20971
+ "deviceManager.discoveryProviders": {
20972
+ capName: "device-manager",
20973
+ capScope: "system",
20974
+ addonId: null,
20975
+ access: "view"
20976
+ },
20893
20977
  "deviceManager.enable": {
20894
20978
  capName: "device-manager",
20895
20979
  capScope: "system",
@@ -21040,6 +21124,18 @@ Object.freeze({
21040
21124
  addonId: null,
21041
21125
  access: "create"
21042
21126
  },
21127
+ "deviceManager.providerCreationType": {
21128
+ capName: "device-manager",
21129
+ capScope: "system",
21130
+ addonId: null,
21131
+ access: "view"
21132
+ },
21133
+ "deviceManager.providerDiscoveryParamsSchema": {
21134
+ capName: "device-manager",
21135
+ capScope: "system",
21136
+ addonId: null,
21137
+ access: "view"
21138
+ },
21043
21139
  "deviceManager.registerDevice": {
21044
21140
  capName: "device-manager",
21045
21141
  capScope: "system",
@@ -21256,6 +21352,18 @@ Object.freeze({
21256
21352
  addonId: null,
21257
21353
  access: "view"
21258
21354
  },
21355
+ "deviceProvider.getDiscoveryParamsSchema": {
21356
+ capName: "device-provider",
21357
+ capScope: "system",
21358
+ addonId: null,
21359
+ access: "view"
21360
+ },
21361
+ "deviceProvider.getManualCreationType": {
21362
+ capName: "device-provider",
21363
+ capScope: "system",
21364
+ addonId: null,
21365
+ access: "view"
21366
+ },
21259
21367
  "deviceProvider.getStatus": {
21260
21368
  capName: "device-provider",
21261
21369
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",