@camstack/addon-provider-rtsp 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
@@ -4642,7 +4642,7 @@ function preprocess(fn, schema) {
4642
4642
  });
4643
4643
  }
4644
4644
  //#endregion
4645
- //#region ../types/dist/sleep-B3AOslwX.mjs
4645
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4646
4646
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4647
4647
  EventCategory["SystemBoot"] = "system.boot";
4648
4648
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6210,6 +6210,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6210
6210
  DeviceType["Switch"] = "switch";
6211
6211
  DeviceType["Sensor"] = "sensor";
6212
6212
  DeviceType["Thermostat"] = "thermostat";
6213
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6214
+ * `climate-control` cap surface with `Thermostat` but renders a
6215
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6216
+ * independent vertical/horizontal swing). Sources: native Gree, and
6217
+ * reusable by other AC integrations. */
6218
+ DeviceType["Climate"] = "climate";
6213
6219
  DeviceType["Button"] = "button";
6214
6220
  /** Generic stateless event emitter — carries a device's EXACT declared
6215
6221
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9025,7 +9031,7 @@ var climateControlCapability = {
9025
9031
  scope: "device",
9026
9032
  deviceNative: true,
9027
9033
  mode: "singleton",
9028
- deviceTypes: [DeviceType.Thermostat],
9034
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9029
9035
  methods: {
9030
9036
  setMode: method(object({
9031
9037
  deviceId: number().int().nonnegative(),
@@ -13624,10 +13630,30 @@ var deviceProviderCapability = {
13624
13630
  type: string()
13625
13631
  }))),
13626
13632
  supportsDiscovery: method(object({}), boolean()),
13627
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13633
+ /**
13634
+ * Run a network scan. `params` carries optional provider-specific scan
13635
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13636
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13637
+ * (provider uses its local-network default).
13638
+ */
13639
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13628
13640
  kind: "mutation",
13629
13641
  auth: "admin"
13630
13642
  }),
13643
+ /**
13644
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13645
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13646
+ * `null` when the provider takes no extra scan params — the generic
13647
+ * aggregated scan never renders this; the per-integration scan does.
13648
+ */
13649
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13650
+ /**
13651
+ * The DeviceType this provider creates via manual add (Camera for
13652
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13653
+ * provider does not support manual creation. Lets the Add-Device dialog
13654
+ * pick the right type instead of assuming Camera.
13655
+ */
13656
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13631
13657
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13632
13658
  kind: "mutation",
13633
13659
  auth: "admin"
@@ -13751,9 +13777,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13751
13777
  async supportsDiscovery() {
13752
13778
  return false;
13753
13779
  }
13754
- async discoverDevices() {
13780
+ async discoverDevices(_input) {
13755
13781
  return [];
13756
13782
  }
13783
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13784
+ * Null = no extra params. Override in providers that support scoped scans. */
13785
+ async getDiscoveryParamsSchema() {
13786
+ return null;
13787
+ }
13788
+ /**
13789
+ * The DeviceType this provider creates via manual add — derived from the
13790
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13791
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13792
+ */
13793
+ async getManualCreationType() {
13794
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13795
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13796
+ }
13757
13797
  async adoptDiscoveredDevice(_input) {
13758
13798
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13759
13799
  }
@@ -15598,7 +15638,10 @@ method(object({
15598
15638
  }), FieldProbeResultSchema, {
15599
15639
  kind: "mutation",
15600
15640
  auth: "admin"
15601
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15641
+ }), method(object({
15642
+ addonId: string(),
15643
+ integrationId: string()
15644
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15602
15645
  addonId: string(),
15603
15646
  integrationId: string()
15604
15647
  }), AdoptionStatusSchema, {
@@ -15613,7 +15656,24 @@ method(object({
15613
15656
  }), method(ResyncInputSchema, ResyncResultSchema, {
15614
15657
  kind: "mutation",
15615
15658
  auth: "admin"
15659
+ }), method(object({}), object({ providers: array(object({
15660
+ addonId: string(),
15661
+ label: string()
15662
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15663
+ addonId: string(),
15664
+ label: string(),
15665
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15666
+ error: string().nullable()
15667
+ })).readonly() }), {
15668
+ kind: "mutation",
15669
+ auth: "admin"
15616
15670
  }), method(object({
15671
+ addonId: string(),
15672
+ params: record(string(), unknown()).optional()
15673
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15674
+ kind: "mutation",
15675
+ auth: "admin"
15676
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15617
15677
  deviceId: number(),
15618
15678
  key: string(),
15619
15679
  value: unknown()
@@ -20792,6 +20852,12 @@ Object.freeze({
20792
20852
  addonId: null,
20793
20853
  access: "create"
20794
20854
  },
20855
+ "deviceManager.adoptionListCandidateFilters": {
20856
+ capName: "device-manager",
20857
+ capScope: "system",
20858
+ addonId: null,
20859
+ access: "view"
20860
+ },
20795
20861
  "deviceManager.adoptionListCandidates": {
20796
20862
  capName: "device-manager",
20797
20863
  capScope: "system",
@@ -20840,12 +20906,30 @@ Object.freeze({
20840
20906
  addonId: null,
20841
20907
  access: "create"
20842
20908
  },
20909
+ "deviceManager.discoverAllProviders": {
20910
+ capName: "device-manager",
20911
+ capScope: "system",
20912
+ addonId: null,
20913
+ access: "create"
20914
+ },
20843
20915
  "deviceManager.discoverDevices": {
20844
20916
  capName: "device-manager",
20845
20917
  capScope: "system",
20846
20918
  addonId: null,
20847
20919
  access: "create"
20848
20920
  },
20921
+ "deviceManager.discoverProvider": {
20922
+ capName: "device-manager",
20923
+ capScope: "system",
20924
+ addonId: null,
20925
+ access: "create"
20926
+ },
20927
+ "deviceManager.discoveryProviders": {
20928
+ capName: "device-manager",
20929
+ capScope: "system",
20930
+ addonId: null,
20931
+ access: "view"
20932
+ },
20849
20933
  "deviceManager.enable": {
20850
20934
  capName: "device-manager",
20851
20935
  capScope: "system",
@@ -20996,6 +21080,18 @@ Object.freeze({
20996
21080
  addonId: null,
20997
21081
  access: "create"
20998
21082
  },
21083
+ "deviceManager.providerCreationType": {
21084
+ capName: "device-manager",
21085
+ capScope: "system",
21086
+ addonId: null,
21087
+ access: "view"
21088
+ },
21089
+ "deviceManager.providerDiscoveryParamsSchema": {
21090
+ capName: "device-manager",
21091
+ capScope: "system",
21092
+ addonId: null,
21093
+ access: "view"
21094
+ },
20999
21095
  "deviceManager.registerDevice": {
21000
21096
  capName: "device-manager",
21001
21097
  capScope: "system",
@@ -21212,6 +21308,18 @@ Object.freeze({
21212
21308
  addonId: null,
21213
21309
  access: "view"
21214
21310
  },
21311
+ "deviceProvider.getDiscoveryParamsSchema": {
21312
+ capName: "device-provider",
21313
+ capScope: "system",
21314
+ addonId: null,
21315
+ access: "view"
21316
+ },
21317
+ "deviceProvider.getManualCreationType": {
21318
+ capName: "device-provider",
21319
+ capScope: "system",
21320
+ addonId: null,
21321
+ access: "view"
21322
+ },
21215
21323
  "deviceProvider.getStatus": {
21216
21324
  capName: "device-provider",
21217
21325
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4641,7 +4641,7 @@ function preprocess(fn, schema) {
4641
4641
  });
4642
4642
  }
4643
4643
  //#endregion
4644
- //#region ../types/dist/sleep-B3AOslwX.mjs
4644
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4645
4645
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4646
4646
  EventCategory["SystemBoot"] = "system.boot";
4647
4647
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6209,6 +6209,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6209
6209
  DeviceType["Switch"] = "switch";
6210
6210
  DeviceType["Sensor"] = "sensor";
6211
6211
  DeviceType["Thermostat"] = "thermostat";
6212
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6213
+ * `climate-control` cap surface with `Thermostat` but renders a
6214
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6215
+ * independent vertical/horizontal swing). Sources: native Gree, and
6216
+ * reusable by other AC integrations. */
6217
+ DeviceType["Climate"] = "climate";
6212
6218
  DeviceType["Button"] = "button";
6213
6219
  /** Generic stateless event emitter — carries a device's EXACT declared
6214
6220
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9024,7 +9030,7 @@ var climateControlCapability = {
9024
9030
  scope: "device",
9025
9031
  deviceNative: true,
9026
9032
  mode: "singleton",
9027
- deviceTypes: [DeviceType.Thermostat],
9033
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9028
9034
  methods: {
9029
9035
  setMode: method(object({
9030
9036
  deviceId: number().int().nonnegative(),
@@ -13623,10 +13629,30 @@ var deviceProviderCapability = {
13623
13629
  type: string()
13624
13630
  }))),
13625
13631
  supportsDiscovery: method(object({}), boolean()),
13626
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13632
+ /**
13633
+ * Run a network scan. `params` carries optional provider-specific scan
13634
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13635
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13636
+ * (provider uses its local-network default).
13637
+ */
13638
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13627
13639
  kind: "mutation",
13628
13640
  auth: "admin"
13629
13641
  }),
13642
+ /**
13643
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13644
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13645
+ * `null` when the provider takes no extra scan params — the generic
13646
+ * aggregated scan never renders this; the per-integration scan does.
13647
+ */
13648
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13649
+ /**
13650
+ * The DeviceType this provider creates via manual add (Camera for
13651
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13652
+ * provider does not support manual creation. Lets the Add-Device dialog
13653
+ * pick the right type instead of assuming Camera.
13654
+ */
13655
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13630
13656
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13631
13657
  kind: "mutation",
13632
13658
  auth: "admin"
@@ -13750,9 +13776,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13750
13776
  async supportsDiscovery() {
13751
13777
  return false;
13752
13778
  }
13753
- async discoverDevices() {
13779
+ async discoverDevices(_input) {
13754
13780
  return [];
13755
13781
  }
13782
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13783
+ * Null = no extra params. Override in providers that support scoped scans. */
13784
+ async getDiscoveryParamsSchema() {
13785
+ return null;
13786
+ }
13787
+ /**
13788
+ * The DeviceType this provider creates via manual add — derived from the
13789
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13790
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13791
+ */
13792
+ async getManualCreationType() {
13793
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13794
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13795
+ }
13756
13796
  async adoptDiscoveredDevice(_input) {
13757
13797
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13758
13798
  }
@@ -15597,7 +15637,10 @@ method(object({
15597
15637
  }), FieldProbeResultSchema, {
15598
15638
  kind: "mutation",
15599
15639
  auth: "admin"
15600
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15640
+ }), method(object({
15641
+ addonId: string(),
15642
+ integrationId: string()
15643
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15601
15644
  addonId: string(),
15602
15645
  integrationId: string()
15603
15646
  }), AdoptionStatusSchema, {
@@ -15612,7 +15655,24 @@ method(object({
15612
15655
  }), method(ResyncInputSchema, ResyncResultSchema, {
15613
15656
  kind: "mutation",
15614
15657
  auth: "admin"
15658
+ }), method(object({}), object({ providers: array(object({
15659
+ addonId: string(),
15660
+ label: string()
15661
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15662
+ addonId: string(),
15663
+ label: string(),
15664
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15665
+ error: string().nullable()
15666
+ })).readonly() }), {
15667
+ kind: "mutation",
15668
+ auth: "admin"
15615
15669
  }), method(object({
15670
+ addonId: string(),
15671
+ params: record(string(), unknown()).optional()
15672
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15673
+ kind: "mutation",
15674
+ auth: "admin"
15675
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15616
15676
  deviceId: number(),
15617
15677
  key: string(),
15618
15678
  value: unknown()
@@ -20791,6 +20851,12 @@ Object.freeze({
20791
20851
  addonId: null,
20792
20852
  access: "create"
20793
20853
  },
20854
+ "deviceManager.adoptionListCandidateFilters": {
20855
+ capName: "device-manager",
20856
+ capScope: "system",
20857
+ addonId: null,
20858
+ access: "view"
20859
+ },
20794
20860
  "deviceManager.adoptionListCandidates": {
20795
20861
  capName: "device-manager",
20796
20862
  capScope: "system",
@@ -20839,12 +20905,30 @@ Object.freeze({
20839
20905
  addonId: null,
20840
20906
  access: "create"
20841
20907
  },
20908
+ "deviceManager.discoverAllProviders": {
20909
+ capName: "device-manager",
20910
+ capScope: "system",
20911
+ addonId: null,
20912
+ access: "create"
20913
+ },
20842
20914
  "deviceManager.discoverDevices": {
20843
20915
  capName: "device-manager",
20844
20916
  capScope: "system",
20845
20917
  addonId: null,
20846
20918
  access: "create"
20847
20919
  },
20920
+ "deviceManager.discoverProvider": {
20921
+ capName: "device-manager",
20922
+ capScope: "system",
20923
+ addonId: null,
20924
+ access: "create"
20925
+ },
20926
+ "deviceManager.discoveryProviders": {
20927
+ capName: "device-manager",
20928
+ capScope: "system",
20929
+ addonId: null,
20930
+ access: "view"
20931
+ },
20848
20932
  "deviceManager.enable": {
20849
20933
  capName: "device-manager",
20850
20934
  capScope: "system",
@@ -20995,6 +21079,18 @@ Object.freeze({
20995
21079
  addonId: null,
20996
21080
  access: "create"
20997
21081
  },
21082
+ "deviceManager.providerCreationType": {
21083
+ capName: "device-manager",
21084
+ capScope: "system",
21085
+ addonId: null,
21086
+ access: "view"
21087
+ },
21088
+ "deviceManager.providerDiscoveryParamsSchema": {
21089
+ capName: "device-manager",
21090
+ capScope: "system",
21091
+ addonId: null,
21092
+ access: "view"
21093
+ },
20998
21094
  "deviceManager.registerDevice": {
20999
21095
  capName: "device-manager",
21000
21096
  capScope: "system",
@@ -21211,6 +21307,18 @@ Object.freeze({
21211
21307
  addonId: null,
21212
21308
  access: "view"
21213
21309
  },
21310
+ "deviceProvider.getDiscoveryParamsSchema": {
21311
+ capName: "device-provider",
21312
+ capScope: "system",
21313
+ addonId: null,
21314
+ access: "view"
21315
+ },
21316
+ "deviceProvider.getManualCreationType": {
21317
+ capName: "device-provider",
21318
+ capScope: "system",
21319
+ addonId: null,
21320
+ access: "view"
21321
+ },
21214
21322
  "deviceProvider.getStatus": {
21215
21323
  capName: "device-provider",
21216
21324
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",
@@ -40,6 +40,7 @@
40
40
  "icon": "assets/icon.svg",
41
41
  "color": "#78716c",
42
42
  "instanceMode": "unique",
43
+ "mode": "standalone",
43
44
  "execution": {
44
45
  "placement": "hub-only"
45
46
  },