@camstack/addon-provider-hikvision 1.1.10 → 1.1.11

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
@@ -4631,7 +4631,7 @@ function _instanceof(cls, params = {}) {
4631
4631
  return inst;
4632
4632
  }
4633
4633
  //#endregion
4634
- //#region ../types/dist/sleep-B3AOslwX.mjs
4634
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4635
4635
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4636
4636
  EventCategory["SystemBoot"] = "system.boot";
4637
4637
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6199,6 +6199,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6199
6199
  DeviceType["Switch"] = "switch";
6200
6200
  DeviceType["Sensor"] = "sensor";
6201
6201
  DeviceType["Thermostat"] = "thermostat";
6202
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6203
+ * `climate-control` cap surface with `Thermostat` but renders a
6204
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6205
+ * independent vertical/horizontal swing). Sources: native Gree, and
6206
+ * reusable by other AC integrations. */
6207
+ DeviceType["Climate"] = "climate";
6202
6208
  DeviceType["Button"] = "button";
6203
6209
  /** Generic stateless event emitter — carries a device's EXACT declared
6204
6210
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9196,7 +9202,7 @@ var climateControlCapability = {
9196
9202
  scope: "device",
9197
9203
  deviceNative: true,
9198
9204
  mode: "singleton",
9199
- deviceTypes: [DeviceType.Thermostat],
9205
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9200
9206
  methods: {
9201
9207
  setMode: method(object({
9202
9208
  deviceId: number().int().nonnegative(),
@@ -13795,10 +13801,30 @@ var deviceProviderCapability = {
13795
13801
  type: string()
13796
13802
  }))),
13797
13803
  supportsDiscovery: method(object({}), boolean()),
13798
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13804
+ /**
13805
+ * Run a network scan. `params` carries optional provider-specific scan
13806
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13807
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13808
+ * (provider uses its local-network default).
13809
+ */
13810
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13799
13811
  kind: "mutation",
13800
13812
  auth: "admin"
13801
13813
  }),
13814
+ /**
13815
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13816
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13817
+ * `null` when the provider takes no extra scan params — the generic
13818
+ * aggregated scan never renders this; the per-integration scan does.
13819
+ */
13820
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13821
+ /**
13822
+ * The DeviceType this provider creates via manual add (Camera for
13823
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13824
+ * provider does not support manual creation. Lets the Add-Device dialog
13825
+ * pick the right type instead of assuming Camera.
13826
+ */
13827
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13802
13828
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13803
13829
  kind: "mutation",
13804
13830
  auth: "admin"
@@ -13922,9 +13948,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13922
13948
  async supportsDiscovery() {
13923
13949
  return false;
13924
13950
  }
13925
- async discoverDevices() {
13951
+ async discoverDevices(_input) {
13926
13952
  return [];
13927
13953
  }
13954
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13955
+ * Null = no extra params. Override in providers that support scoped scans. */
13956
+ async getDiscoveryParamsSchema() {
13957
+ return null;
13958
+ }
13959
+ /**
13960
+ * The DeviceType this provider creates via manual add — derived from the
13961
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13962
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13963
+ */
13964
+ async getManualCreationType() {
13965
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13966
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13967
+ }
13928
13968
  async adoptDiscoveredDevice(_input) {
13929
13969
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13930
13970
  }
@@ -15781,7 +15821,10 @@ method(object({
15781
15821
  }), FieldProbeResultSchema, {
15782
15822
  kind: "mutation",
15783
15823
  auth: "admin"
15784
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15824
+ }), method(object({
15825
+ addonId: string(),
15826
+ integrationId: string()
15827
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15785
15828
  addonId: string(),
15786
15829
  integrationId: string()
15787
15830
  }), AdoptionStatusSchema, {
@@ -15796,7 +15839,24 @@ method(object({
15796
15839
  }), method(ResyncInputSchema, ResyncResultSchema, {
15797
15840
  kind: "mutation",
15798
15841
  auth: "admin"
15842
+ }), method(object({}), object({ providers: array(object({
15843
+ addonId: string(),
15844
+ label: string()
15845
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15846
+ addonId: string(),
15847
+ label: string(),
15848
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15849
+ error: string().nullable()
15850
+ })).readonly() }), {
15851
+ kind: "mutation",
15852
+ auth: "admin"
15799
15853
  }), method(object({
15854
+ addonId: string(),
15855
+ params: record(string(), unknown()).optional()
15856
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15857
+ kind: "mutation",
15858
+ auth: "admin"
15859
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15800
15860
  deviceId: number(),
15801
15861
  key: string(),
15802
15862
  value: unknown()
@@ -21337,6 +21397,12 @@ Object.freeze({
21337
21397
  addonId: null,
21338
21398
  access: "create"
21339
21399
  },
21400
+ "deviceManager.adoptionListCandidateFilters": {
21401
+ capName: "device-manager",
21402
+ capScope: "system",
21403
+ addonId: null,
21404
+ access: "view"
21405
+ },
21340
21406
  "deviceManager.adoptionListCandidates": {
21341
21407
  capName: "device-manager",
21342
21408
  capScope: "system",
@@ -21385,12 +21451,30 @@ Object.freeze({
21385
21451
  addonId: null,
21386
21452
  access: "create"
21387
21453
  },
21454
+ "deviceManager.discoverAllProviders": {
21455
+ capName: "device-manager",
21456
+ capScope: "system",
21457
+ addonId: null,
21458
+ access: "create"
21459
+ },
21388
21460
  "deviceManager.discoverDevices": {
21389
21461
  capName: "device-manager",
21390
21462
  capScope: "system",
21391
21463
  addonId: null,
21392
21464
  access: "create"
21393
21465
  },
21466
+ "deviceManager.discoverProvider": {
21467
+ capName: "device-manager",
21468
+ capScope: "system",
21469
+ addonId: null,
21470
+ access: "create"
21471
+ },
21472
+ "deviceManager.discoveryProviders": {
21473
+ capName: "device-manager",
21474
+ capScope: "system",
21475
+ addonId: null,
21476
+ access: "view"
21477
+ },
21394
21478
  "deviceManager.enable": {
21395
21479
  capName: "device-manager",
21396
21480
  capScope: "system",
@@ -21541,6 +21625,18 @@ Object.freeze({
21541
21625
  addonId: null,
21542
21626
  access: "create"
21543
21627
  },
21628
+ "deviceManager.providerCreationType": {
21629
+ capName: "device-manager",
21630
+ capScope: "system",
21631
+ addonId: null,
21632
+ access: "view"
21633
+ },
21634
+ "deviceManager.providerDiscoveryParamsSchema": {
21635
+ capName: "device-manager",
21636
+ capScope: "system",
21637
+ addonId: null,
21638
+ access: "view"
21639
+ },
21544
21640
  "deviceManager.registerDevice": {
21545
21641
  capName: "device-manager",
21546
21642
  capScope: "system",
@@ -21757,6 +21853,18 @@ Object.freeze({
21757
21853
  addonId: null,
21758
21854
  access: "view"
21759
21855
  },
21856
+ "deviceProvider.getDiscoveryParamsSchema": {
21857
+ capName: "device-provider",
21858
+ capScope: "system",
21859
+ addonId: null,
21860
+ access: "view"
21861
+ },
21862
+ "deviceProvider.getManualCreationType": {
21863
+ capName: "device-provider",
21864
+ capScope: "system",
21865
+ addonId: null,
21866
+ access: "view"
21867
+ },
21760
21868
  "deviceProvider.getStatus": {
21761
21869
  capName: "device-provider",
21762
21870
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4630,7 +4630,7 @@ function _instanceof(cls, params = {}) {
4630
4630
  return inst;
4631
4631
  }
4632
4632
  //#endregion
4633
- //#region ../types/dist/sleep-B3AOslwX.mjs
4633
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4634
4634
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4635
4635
  EventCategory["SystemBoot"] = "system.boot";
4636
4636
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6198,6 +6198,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6198
6198
  DeviceType["Switch"] = "switch";
6199
6199
  DeviceType["Sensor"] = "sensor";
6200
6200
  DeviceType["Thermostat"] = "thermostat";
6201
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6202
+ * `climate-control` cap surface with `Thermostat` but renders a
6203
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6204
+ * independent vertical/horizontal swing). Sources: native Gree, and
6205
+ * reusable by other AC integrations. */
6206
+ DeviceType["Climate"] = "climate";
6201
6207
  DeviceType["Button"] = "button";
6202
6208
  /** Generic stateless event emitter — carries a device's EXACT declared
6203
6209
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9195,7 +9201,7 @@ var climateControlCapability = {
9195
9201
  scope: "device",
9196
9202
  deviceNative: true,
9197
9203
  mode: "singleton",
9198
- deviceTypes: [DeviceType.Thermostat],
9204
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9199
9205
  methods: {
9200
9206
  setMode: method(object({
9201
9207
  deviceId: number().int().nonnegative(),
@@ -13794,10 +13800,30 @@ var deviceProviderCapability = {
13794
13800
  type: string()
13795
13801
  }))),
13796
13802
  supportsDiscovery: method(object({}), boolean()),
13797
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13803
+ /**
13804
+ * Run a network scan. `params` carries optional provider-specific scan
13805
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13806
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13807
+ * (provider uses its local-network default).
13808
+ */
13809
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13798
13810
  kind: "mutation",
13799
13811
  auth: "admin"
13800
13812
  }),
13813
+ /**
13814
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13815
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13816
+ * `null` when the provider takes no extra scan params — the generic
13817
+ * aggregated scan never renders this; the per-integration scan does.
13818
+ */
13819
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13820
+ /**
13821
+ * The DeviceType this provider creates via manual add (Camera for
13822
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13823
+ * provider does not support manual creation. Lets the Add-Device dialog
13824
+ * pick the right type instead of assuming Camera.
13825
+ */
13826
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13801
13827
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13802
13828
  kind: "mutation",
13803
13829
  auth: "admin"
@@ -13921,9 +13947,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13921
13947
  async supportsDiscovery() {
13922
13948
  return false;
13923
13949
  }
13924
- async discoverDevices() {
13950
+ async discoverDevices(_input) {
13925
13951
  return [];
13926
13952
  }
13953
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13954
+ * Null = no extra params. Override in providers that support scoped scans. */
13955
+ async getDiscoveryParamsSchema() {
13956
+ return null;
13957
+ }
13958
+ /**
13959
+ * The DeviceType this provider creates via manual add — derived from the
13960
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13961
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13962
+ */
13963
+ async getManualCreationType() {
13964
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13965
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13966
+ }
13927
13967
  async adoptDiscoveredDevice(_input) {
13928
13968
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13929
13969
  }
@@ -15780,7 +15820,10 @@ method(object({
15780
15820
  }), FieldProbeResultSchema, {
15781
15821
  kind: "mutation",
15782
15822
  auth: "admin"
15783
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15823
+ }), method(object({
15824
+ addonId: string(),
15825
+ integrationId: string()
15826
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15784
15827
  addonId: string(),
15785
15828
  integrationId: string()
15786
15829
  }), AdoptionStatusSchema, {
@@ -15795,7 +15838,24 @@ method(object({
15795
15838
  }), method(ResyncInputSchema, ResyncResultSchema, {
15796
15839
  kind: "mutation",
15797
15840
  auth: "admin"
15841
+ }), method(object({}), object({ providers: array(object({
15842
+ addonId: string(),
15843
+ label: string()
15844
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15845
+ addonId: string(),
15846
+ label: string(),
15847
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15848
+ error: string().nullable()
15849
+ })).readonly() }), {
15850
+ kind: "mutation",
15851
+ auth: "admin"
15798
15852
  }), method(object({
15853
+ addonId: string(),
15854
+ params: record(string(), unknown()).optional()
15855
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15856
+ kind: "mutation",
15857
+ auth: "admin"
15858
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15799
15859
  deviceId: number(),
15800
15860
  key: string(),
15801
15861
  value: unknown()
@@ -21336,6 +21396,12 @@ Object.freeze({
21336
21396
  addonId: null,
21337
21397
  access: "create"
21338
21398
  },
21399
+ "deviceManager.adoptionListCandidateFilters": {
21400
+ capName: "device-manager",
21401
+ capScope: "system",
21402
+ addonId: null,
21403
+ access: "view"
21404
+ },
21339
21405
  "deviceManager.adoptionListCandidates": {
21340
21406
  capName: "device-manager",
21341
21407
  capScope: "system",
@@ -21384,12 +21450,30 @@ Object.freeze({
21384
21450
  addonId: null,
21385
21451
  access: "create"
21386
21452
  },
21453
+ "deviceManager.discoverAllProviders": {
21454
+ capName: "device-manager",
21455
+ capScope: "system",
21456
+ addonId: null,
21457
+ access: "create"
21458
+ },
21387
21459
  "deviceManager.discoverDevices": {
21388
21460
  capName: "device-manager",
21389
21461
  capScope: "system",
21390
21462
  addonId: null,
21391
21463
  access: "create"
21392
21464
  },
21465
+ "deviceManager.discoverProvider": {
21466
+ capName: "device-manager",
21467
+ capScope: "system",
21468
+ addonId: null,
21469
+ access: "create"
21470
+ },
21471
+ "deviceManager.discoveryProviders": {
21472
+ capName: "device-manager",
21473
+ capScope: "system",
21474
+ addonId: null,
21475
+ access: "view"
21476
+ },
21393
21477
  "deviceManager.enable": {
21394
21478
  capName: "device-manager",
21395
21479
  capScope: "system",
@@ -21540,6 +21624,18 @@ Object.freeze({
21540
21624
  addonId: null,
21541
21625
  access: "create"
21542
21626
  },
21627
+ "deviceManager.providerCreationType": {
21628
+ capName: "device-manager",
21629
+ capScope: "system",
21630
+ addonId: null,
21631
+ access: "view"
21632
+ },
21633
+ "deviceManager.providerDiscoveryParamsSchema": {
21634
+ capName: "device-manager",
21635
+ capScope: "system",
21636
+ addonId: null,
21637
+ access: "view"
21638
+ },
21543
21639
  "deviceManager.registerDevice": {
21544
21640
  capName: "device-manager",
21545
21641
  capScope: "system",
@@ -21756,6 +21852,18 @@ Object.freeze({
21756
21852
  addonId: null,
21757
21853
  access: "view"
21758
21854
  },
21855
+ "deviceProvider.getDiscoveryParamsSchema": {
21856
+ capName: "device-provider",
21857
+ capScope: "system",
21858
+ addonId: null,
21859
+ access: "view"
21860
+ },
21861
+ "deviceProvider.getManualCreationType": {
21862
+ capName: "device-provider",
21863
+ capScope: "system",
21864
+ addonId: null,
21865
+ access: "view"
21866
+ },
21759
21867
  "deviceProvider.getStatus": {
21760
21868
  capName: "device-provider",
21761
21869
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",
@@ -41,6 +41,7 @@
41
41
  "icon": "assets/icon.svg",
42
42
  "color": "#c1272d",
43
43
  "instanceMode": "unique",
44
+ "mode": "standalone",
44
45
  "execution": {
45
46
  "placement": "hub-only"
46
47
  },