@camstack/addon-provider-onvif 1.1.9 → 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
@@ -8469,7 +8475,7 @@ object({
8469
8475
  /** Ms epoch when the slice was last updated (push or command). */
8470
8476
  lastFetchedAt: number()
8471
8477
  });
8472
- DeviceType.Thermostat, method(object({
8478
+ DeviceType.Thermostat, DeviceType.Climate, method(object({
8473
8479
  deviceId: number().int().nonnegative(),
8474
8480
  mode: HvacModeSchema
8475
8481
  }), _void(), {
@@ -11164,10 +11170,30 @@ var deviceProviderCapability = {
11164
11170
  type: string()
11165
11171
  }))),
11166
11172
  supportsDiscovery: method(object({}), boolean()),
11167
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
11173
+ /**
11174
+ * Run a network scan. `params` carries optional provider-specific scan
11175
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
11176
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
11177
+ * (provider uses its local-network default).
11178
+ */
11179
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
11168
11180
  kind: "mutation",
11169
11181
  auth: "admin"
11170
11182
  }),
11183
+ /**
11184
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
11185
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
11186
+ * `null` when the provider takes no extra scan params — the generic
11187
+ * aggregated scan never renders this; the per-integration scan does.
11188
+ */
11189
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
11190
+ /**
11191
+ * The DeviceType this provider creates via manual add (Camera for
11192
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
11193
+ * provider does not support manual creation. Lets the Add-Device dialog
11194
+ * pick the right type instead of assuming Camera.
11195
+ */
11196
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
11171
11197
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
11172
11198
  kind: "mutation",
11173
11199
  auth: "admin"
@@ -11291,9 +11317,23 @@ var BaseDeviceProvider = class extends BaseAddon {
11291
11317
  async supportsDiscovery() {
11292
11318
  return false;
11293
11319
  }
11294
- async discoverDevices() {
11320
+ async discoverDevices(_input) {
11295
11321
  return [];
11296
11322
  }
11323
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
11324
+ * Null = no extra params. Override in providers that support scoped scans. */
11325
+ async getDiscoveryParamsSchema() {
11326
+ return null;
11327
+ }
11328
+ /**
11329
+ * The DeviceType this provider creates via manual add — derived from the
11330
+ * `deviceClasses` map (first registered type). `null` when manual creation is
11331
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
11332
+ */
11333
+ async getManualCreationType() {
11334
+ if (!await this.supportsManualCreation()) return { deviceType: null };
11335
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
11336
+ }
11297
11337
  async adoptDiscoveredDevice(_input) {
11298
11338
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
11299
11339
  }
@@ -13138,7 +13178,10 @@ method(object({
13138
13178
  }), FieldProbeResultSchema, {
13139
13179
  kind: "mutation",
13140
13180
  auth: "admin"
13141
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
13181
+ }), method(object({
13182
+ addonId: string(),
13183
+ integrationId: string()
13184
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
13142
13185
  addonId: string(),
13143
13186
  integrationId: string()
13144
13187
  }), AdoptionStatusSchema, {
@@ -13153,7 +13196,24 @@ method(object({
13153
13196
  }), method(ResyncInputSchema, ResyncResultSchema, {
13154
13197
  kind: "mutation",
13155
13198
  auth: "admin"
13199
+ }), method(object({}), object({ providers: array(object({
13200
+ addonId: string(),
13201
+ label: string()
13202
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
13203
+ addonId: string(),
13204
+ label: string(),
13205
+ candidates: array(DiscoveryCandidateSchema).readonly(),
13206
+ error: string().nullable()
13207
+ })).readonly() }), {
13208
+ kind: "mutation",
13209
+ auth: "admin"
13156
13210
  }), method(object({
13211
+ addonId: string(),
13212
+ params: record(string(), unknown()).optional()
13213
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
13214
+ kind: "mutation",
13215
+ auth: "admin"
13216
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
13157
13217
  deviceId: number(),
13158
13218
  key: string(),
13159
13219
  value: unknown()
@@ -15848,6 +15908,17 @@ var AvailableIntegrationTypeSchema = object({
15848
15908
  iconUrl: string().nullable(),
15849
15909
  color: string(),
15850
15910
  instanceMode: string(),
15911
+ /**
15912
+ * Integration wizard `mode` (LOCKED MODEL): `standalone` (create
15913
+ * immediately then add devices, no config step/button), `account` (config
15914
+ * step), or `broker` (broker step). Derived server-side by
15915
+ * `getAvailableTypes` when the addon manifest omits an explicit `mode`.
15916
+ */
15917
+ mode: _enum([
15918
+ "standalone",
15919
+ "account",
15920
+ "broker"
15921
+ ]),
15851
15922
  discoveryMode: string(),
15852
15923
  /**
15853
15924
  * Which integration-marker cap the addon declared, so the wizard can
@@ -18350,6 +18421,12 @@ Object.freeze({
18350
18421
  addonId: null,
18351
18422
  access: "create"
18352
18423
  },
18424
+ "deviceManager.adoptionListCandidateFilters": {
18425
+ capName: "device-manager",
18426
+ capScope: "system",
18427
+ addonId: null,
18428
+ access: "view"
18429
+ },
18353
18430
  "deviceManager.adoptionListCandidates": {
18354
18431
  capName: "device-manager",
18355
18432
  capScope: "system",
@@ -18398,12 +18475,30 @@ Object.freeze({
18398
18475
  addonId: null,
18399
18476
  access: "create"
18400
18477
  },
18478
+ "deviceManager.discoverAllProviders": {
18479
+ capName: "device-manager",
18480
+ capScope: "system",
18481
+ addonId: null,
18482
+ access: "create"
18483
+ },
18401
18484
  "deviceManager.discoverDevices": {
18402
18485
  capName: "device-manager",
18403
18486
  capScope: "system",
18404
18487
  addonId: null,
18405
18488
  access: "create"
18406
18489
  },
18490
+ "deviceManager.discoverProvider": {
18491
+ capName: "device-manager",
18492
+ capScope: "system",
18493
+ addonId: null,
18494
+ access: "create"
18495
+ },
18496
+ "deviceManager.discoveryProviders": {
18497
+ capName: "device-manager",
18498
+ capScope: "system",
18499
+ addonId: null,
18500
+ access: "view"
18501
+ },
18407
18502
  "deviceManager.enable": {
18408
18503
  capName: "device-manager",
18409
18504
  capScope: "system",
@@ -18554,6 +18649,18 @@ Object.freeze({
18554
18649
  addonId: null,
18555
18650
  access: "create"
18556
18651
  },
18652
+ "deviceManager.providerCreationType": {
18653
+ capName: "device-manager",
18654
+ capScope: "system",
18655
+ addonId: null,
18656
+ access: "view"
18657
+ },
18658
+ "deviceManager.providerDiscoveryParamsSchema": {
18659
+ capName: "device-manager",
18660
+ capScope: "system",
18661
+ addonId: null,
18662
+ access: "view"
18663
+ },
18557
18664
  "deviceManager.registerDevice": {
18558
18665
  capName: "device-manager",
18559
18666
  capScope: "system",
@@ -18770,6 +18877,18 @@ Object.freeze({
18770
18877
  addonId: null,
18771
18878
  access: "view"
18772
18879
  },
18880
+ "deviceProvider.getDiscoveryParamsSchema": {
18881
+ capName: "device-provider",
18882
+ capScope: "system",
18883
+ addonId: null,
18884
+ access: "view"
18885
+ },
18886
+ "deviceProvider.getManualCreationType": {
18887
+ capName: "device-provider",
18888
+ capScope: "system",
18889
+ addonId: null,
18890
+ access: "view"
18891
+ },
18773
18892
  "deviceProvider.getStatus": {
18774
18893
  capName: "device-provider",
18775
18894
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4632,7 +4632,7 @@ function _instanceof(cls, params = {}) {
4632
4632
  return inst;
4633
4633
  }
4634
4634
  //#endregion
4635
- //#region ../types/dist/sleep-B3AOslwX.mjs
4635
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4636
4636
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4637
4637
  EventCategory["SystemBoot"] = "system.boot";
4638
4638
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6200,6 +6200,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6200
6200
  DeviceType["Switch"] = "switch";
6201
6201
  DeviceType["Sensor"] = "sensor";
6202
6202
  DeviceType["Thermostat"] = "thermostat";
6203
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6204
+ * `climate-control` cap surface with `Thermostat` but renders a
6205
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6206
+ * independent vertical/horizontal swing). Sources: native Gree, and
6207
+ * reusable by other AC integrations. */
6208
+ DeviceType["Climate"] = "climate";
6203
6209
  DeviceType["Button"] = "button";
6204
6210
  /** Generic stateless event emitter — carries a device's EXACT declared
6205
6211
  * event vocabulary verbatim (no normalization). Installed with the
@@ -8470,7 +8476,7 @@ object({
8470
8476
  /** Ms epoch when the slice was last updated (push or command). */
8471
8477
  lastFetchedAt: number()
8472
8478
  });
8473
- DeviceType.Thermostat, method(object({
8479
+ DeviceType.Thermostat, DeviceType.Climate, method(object({
8474
8480
  deviceId: number().int().nonnegative(),
8475
8481
  mode: HvacModeSchema
8476
8482
  }), _void(), {
@@ -11165,10 +11171,30 @@ var deviceProviderCapability = {
11165
11171
  type: string()
11166
11172
  }))),
11167
11173
  supportsDiscovery: method(object({}), boolean()),
11168
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
11174
+ /**
11175
+ * Run a network scan. `params` carries optional provider-specific scan
11176
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
11177
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
11178
+ * (provider uses its local-network default).
11179
+ */
11180
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
11169
11181
  kind: "mutation",
11170
11182
  auth: "admin"
11171
11183
  }),
11184
+ /**
11185
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
11186
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
11187
+ * `null` when the provider takes no extra scan params — the generic
11188
+ * aggregated scan never renders this; the per-integration scan does.
11189
+ */
11190
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
11191
+ /**
11192
+ * The DeviceType this provider creates via manual add (Camera for
11193
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
11194
+ * provider does not support manual creation. Lets the Add-Device dialog
11195
+ * pick the right type instead of assuming Camera.
11196
+ */
11197
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
11172
11198
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
11173
11199
  kind: "mutation",
11174
11200
  auth: "admin"
@@ -11292,9 +11318,23 @@ var BaseDeviceProvider = class extends BaseAddon {
11292
11318
  async supportsDiscovery() {
11293
11319
  return false;
11294
11320
  }
11295
- async discoverDevices() {
11321
+ async discoverDevices(_input) {
11296
11322
  return [];
11297
11323
  }
11324
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
11325
+ * Null = no extra params. Override in providers that support scoped scans. */
11326
+ async getDiscoveryParamsSchema() {
11327
+ return null;
11328
+ }
11329
+ /**
11330
+ * The DeviceType this provider creates via manual add — derived from the
11331
+ * `deviceClasses` map (first registered type). `null` when manual creation is
11332
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
11333
+ */
11334
+ async getManualCreationType() {
11335
+ if (!await this.supportsManualCreation()) return { deviceType: null };
11336
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
11337
+ }
11298
11338
  async adoptDiscoveredDevice(_input) {
11299
11339
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
11300
11340
  }
@@ -13139,7 +13179,10 @@ method(object({
13139
13179
  }), FieldProbeResultSchema, {
13140
13180
  kind: "mutation",
13141
13181
  auth: "admin"
13142
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
13182
+ }), method(object({
13183
+ addonId: string(),
13184
+ integrationId: string()
13185
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
13143
13186
  addonId: string(),
13144
13187
  integrationId: string()
13145
13188
  }), AdoptionStatusSchema, {
@@ -13154,7 +13197,24 @@ method(object({
13154
13197
  }), method(ResyncInputSchema, ResyncResultSchema, {
13155
13198
  kind: "mutation",
13156
13199
  auth: "admin"
13200
+ }), method(object({}), object({ providers: array(object({
13201
+ addonId: string(),
13202
+ label: string()
13203
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
13204
+ addonId: string(),
13205
+ label: string(),
13206
+ candidates: array(DiscoveryCandidateSchema).readonly(),
13207
+ error: string().nullable()
13208
+ })).readonly() }), {
13209
+ kind: "mutation",
13210
+ auth: "admin"
13157
13211
  }), method(object({
13212
+ addonId: string(),
13213
+ params: record(string(), unknown()).optional()
13214
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
13215
+ kind: "mutation",
13216
+ auth: "admin"
13217
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
13158
13218
  deviceId: number(),
13159
13219
  key: string(),
13160
13220
  value: unknown()
@@ -15849,6 +15909,17 @@ var AvailableIntegrationTypeSchema = object({
15849
15909
  iconUrl: string().nullable(),
15850
15910
  color: string(),
15851
15911
  instanceMode: string(),
15912
+ /**
15913
+ * Integration wizard `mode` (LOCKED MODEL): `standalone` (create
15914
+ * immediately then add devices, no config step/button), `account` (config
15915
+ * step), or `broker` (broker step). Derived server-side by
15916
+ * `getAvailableTypes` when the addon manifest omits an explicit `mode`.
15917
+ */
15918
+ mode: _enum([
15919
+ "standalone",
15920
+ "account",
15921
+ "broker"
15922
+ ]),
15852
15923
  discoveryMode: string(),
15853
15924
  /**
15854
15925
  * Which integration-marker cap the addon declared, so the wizard can
@@ -18351,6 +18422,12 @@ Object.freeze({
18351
18422
  addonId: null,
18352
18423
  access: "create"
18353
18424
  },
18425
+ "deviceManager.adoptionListCandidateFilters": {
18426
+ capName: "device-manager",
18427
+ capScope: "system",
18428
+ addonId: null,
18429
+ access: "view"
18430
+ },
18354
18431
  "deviceManager.adoptionListCandidates": {
18355
18432
  capName: "device-manager",
18356
18433
  capScope: "system",
@@ -18399,12 +18476,30 @@ Object.freeze({
18399
18476
  addonId: null,
18400
18477
  access: "create"
18401
18478
  },
18479
+ "deviceManager.discoverAllProviders": {
18480
+ capName: "device-manager",
18481
+ capScope: "system",
18482
+ addonId: null,
18483
+ access: "create"
18484
+ },
18402
18485
  "deviceManager.discoverDevices": {
18403
18486
  capName: "device-manager",
18404
18487
  capScope: "system",
18405
18488
  addonId: null,
18406
18489
  access: "create"
18407
18490
  },
18491
+ "deviceManager.discoverProvider": {
18492
+ capName: "device-manager",
18493
+ capScope: "system",
18494
+ addonId: null,
18495
+ access: "create"
18496
+ },
18497
+ "deviceManager.discoveryProviders": {
18498
+ capName: "device-manager",
18499
+ capScope: "system",
18500
+ addonId: null,
18501
+ access: "view"
18502
+ },
18408
18503
  "deviceManager.enable": {
18409
18504
  capName: "device-manager",
18410
18505
  capScope: "system",
@@ -18555,6 +18650,18 @@ Object.freeze({
18555
18650
  addonId: null,
18556
18651
  access: "create"
18557
18652
  },
18653
+ "deviceManager.providerCreationType": {
18654
+ capName: "device-manager",
18655
+ capScope: "system",
18656
+ addonId: null,
18657
+ access: "view"
18658
+ },
18659
+ "deviceManager.providerDiscoveryParamsSchema": {
18660
+ capName: "device-manager",
18661
+ capScope: "system",
18662
+ addonId: null,
18663
+ access: "view"
18664
+ },
18558
18665
  "deviceManager.registerDevice": {
18559
18666
  capName: "device-manager",
18560
18667
  capScope: "system",
@@ -18771,6 +18878,18 @@ Object.freeze({
18771
18878
  addonId: null,
18772
18879
  access: "view"
18773
18880
  },
18881
+ "deviceProvider.getDiscoveryParamsSchema": {
18882
+ capName: "device-provider",
18883
+ capScope: "system",
18884
+ addonId: null,
18885
+ access: "view"
18886
+ },
18887
+ "deviceProvider.getManualCreationType": {
18888
+ capName: "device-provider",
18889
+ capScope: "system",
18890
+ addonId: null,
18891
+ access: "view"
18892
+ },
18774
18893
  "deviceProvider.getStatus": {
18775
18894
  capName: "device-provider",
18776
18895
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "ONVIF 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": "#06b6d4",
42
42
  "instanceMode": "unique",
43
+ "mode": "standalone",
43
44
  "capabilities": [
44
45
  {
45
46
  "name": "device-provider"