@camstack/addon-provider-unifi 0.2.52 → 0.2.53

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
@@ -7718,7 +7718,8 @@ var OpsLogReasonSchema = _enum([
7718
7718
  "quota",
7719
7719
  "manual",
7720
7720
  "operator",
7721
- "maintenance"
7721
+ "maintenance",
7722
+ "orphaned-device"
7722
7723
  ]);
7723
7724
  /** One audit row, shared verbatim by both domains. */
7724
7725
  var OpsLogEntrySchema = object({
@@ -13013,10 +13014,39 @@ var DevicePersistConfigPayloadSchema = object({
13013
13014
  deviceId: number(),
13014
13015
  data: record(string(), unknown())
13015
13016
  });
13017
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13018
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13019
+ var MigrateSwitchOutcomeSchema = _enum([
13020
+ "off",
13021
+ "on",
13022
+ "not-offered",
13023
+ "unreachable"
13024
+ ]);
13025
+ var MigrateSwitchReportSchema = object({
13026
+ deviceId: number(),
13027
+ switchId: CameraSwitchIdSchema,
13028
+ outcome: MigrateSwitchOutcomeSchema,
13029
+ detail: string().optional()
13030
+ });
13031
+ var MigrateDeviceResultSchema = object({
13032
+ sourceId: number(),
13033
+ targetId: number(),
13034
+ switches: array(MigrateSwitchReportSchema).readonly(),
13035
+ /** Switches that could NOT be turned off on the source. Empty is the only
13036
+ * value meaning the replaced hardware is quiet. */
13037
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13038
+ swapped: boolean()
13039
+ });
13016
13040
  method(object({
13017
13041
  addonId: string(),
13018
13042
  stableId: string()
13019
- }), object({ id: number() }), { kind: "mutation" }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13043
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13044
+ sourceId: number(),
13045
+ targetId: number()
13046
+ }), MigrateDeviceResultSchema, {
13047
+ kind: "mutation",
13048
+ auth: "admin"
13049
+ }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13020
13050
  deviceId: number(),
13021
13051
  name: string()
13022
13052
  }), _void(), {
@@ -34028,6 +34058,12 @@ Object.freeze({
34028
34058
  addonId: null,
34029
34059
  access: "view"
34030
34060
  },
34061
+ "deviceManager.migrateDevice": {
34062
+ capName: "device-manager",
34063
+ capScope: "system",
34064
+ addonId: null,
34065
+ access: "create"
34066
+ },
34031
34067
  "deviceManager.persistConfig": {
34032
34068
  capName: "device-manager",
34033
34069
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7717,7 +7717,8 @@ var OpsLogReasonSchema = _enum([
7717
7717
  "quota",
7718
7718
  "manual",
7719
7719
  "operator",
7720
- "maintenance"
7720
+ "maintenance",
7721
+ "orphaned-device"
7721
7722
  ]);
7722
7723
  /** One audit row, shared verbatim by both domains. */
7723
7724
  var OpsLogEntrySchema = object({
@@ -13012,10 +13013,39 @@ var DevicePersistConfigPayloadSchema = object({
13012
13013
  deviceId: number(),
13013
13014
  data: record(string(), unknown())
13014
13015
  });
13016
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13017
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13018
+ var MigrateSwitchOutcomeSchema = _enum([
13019
+ "off",
13020
+ "on",
13021
+ "not-offered",
13022
+ "unreachable"
13023
+ ]);
13024
+ var MigrateSwitchReportSchema = object({
13025
+ deviceId: number(),
13026
+ switchId: CameraSwitchIdSchema,
13027
+ outcome: MigrateSwitchOutcomeSchema,
13028
+ detail: string().optional()
13029
+ });
13030
+ var MigrateDeviceResultSchema = object({
13031
+ sourceId: number(),
13032
+ targetId: number(),
13033
+ switches: array(MigrateSwitchReportSchema).readonly(),
13034
+ /** Switches that could NOT be turned off on the source. Empty is the only
13035
+ * value meaning the replaced hardware is quiet. */
13036
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13037
+ swapped: boolean()
13038
+ });
13015
13039
  method(object({
13016
13040
  addonId: string(),
13017
13041
  stableId: string()
13018
- }), object({ id: number() }), { kind: "mutation" }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13042
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13043
+ sourceId: number(),
13044
+ targetId: number()
13045
+ }), MigrateDeviceResultSchema, {
13046
+ kind: "mutation",
13047
+ auth: "admin"
13048
+ }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
13019
13049
  deviceId: number(),
13020
13050
  name: string()
13021
13051
  }), _void(), {
@@ -34027,6 +34057,12 @@ Object.freeze({
34027
34057
  addonId: null,
34028
34058
  access: "view"
34029
34059
  },
34060
+ "deviceManager.migrateDevice": {
34061
+ capName: "device-manager",
34062
+ capScope: "system",
34063
+ addonId: null,
34064
+ access: "create"
34065
+ },
34030
34066
  "deviceManager.persistConfig": {
34031
34067
  capName: "device-manager",
34032
34068
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.52",
3
+ "version": "0.2.53",
4
4
  "description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
5
5
  "keywords": [
6
6
  "camstack",