@camstack/addon-provider-tuya 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
@@ -8538,7 +8538,8 @@ var OpsLogReasonSchema = _enum([
8538
8538
  "quota",
8539
8539
  "manual",
8540
8540
  "operator",
8541
- "maintenance"
8541
+ "maintenance",
8542
+ "orphaned-device"
8542
8543
  ]);
8543
8544
  /** One audit row, shared verbatim by both domains. */
8544
8545
  var OpsLogEntrySchema = object({
@@ -13850,10 +13851,39 @@ var DevicePersistConfigPayloadSchema = object({
13850
13851
  deviceId: number(),
13851
13852
  data: record(string(), unknown())
13852
13853
  });
13854
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13855
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13856
+ var MigrateSwitchOutcomeSchema = _enum([
13857
+ "off",
13858
+ "on",
13859
+ "not-offered",
13860
+ "unreachable"
13861
+ ]);
13862
+ var MigrateSwitchReportSchema = object({
13863
+ deviceId: number(),
13864
+ switchId: CameraSwitchIdSchema,
13865
+ outcome: MigrateSwitchOutcomeSchema,
13866
+ detail: string().optional()
13867
+ });
13868
+ var MigrateDeviceResultSchema = object({
13869
+ sourceId: number(),
13870
+ targetId: number(),
13871
+ switches: array(MigrateSwitchReportSchema).readonly(),
13872
+ /** Switches that could NOT be turned off on the source. Empty is the only
13873
+ * value meaning the replaced hardware is quiet. */
13874
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13875
+ swapped: boolean()
13876
+ });
13853
13877
  method(object({
13854
13878
  addonId: string(),
13855
13879
  stableId: string()
13856
- }), 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({
13880
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13881
+ sourceId: number(),
13882
+ targetId: number()
13883
+ }), MigrateDeviceResultSchema, {
13884
+ kind: "mutation",
13885
+ auth: "admin"
13886
+ }), 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({
13857
13887
  deviceId: number(),
13858
13888
  name: string()
13859
13889
  }), _void(), {
@@ -34856,6 +34886,12 @@ Object.freeze({
34856
34886
  addonId: null,
34857
34887
  access: "view"
34858
34888
  },
34889
+ "deviceManager.migrateDevice": {
34890
+ capName: "device-manager",
34891
+ capScope: "system",
34892
+ addonId: null,
34893
+ access: "create"
34894
+ },
34859
34895
  "deviceManager.persistConfig": {
34860
34896
  capName: "device-manager",
34861
34897
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -8537,7 +8537,8 @@ var OpsLogReasonSchema = _enum([
8537
8537
  "quota",
8538
8538
  "manual",
8539
8539
  "operator",
8540
- "maintenance"
8540
+ "maintenance",
8541
+ "orphaned-device"
8541
8542
  ]);
8542
8543
  /** One audit row, shared verbatim by both domains. */
8543
8544
  var OpsLogEntrySchema = object({
@@ -13849,10 +13850,39 @@ var DevicePersistConfigPayloadSchema = object({
13849
13850
  deviceId: number(),
13850
13851
  data: record(string(), unknown())
13851
13852
  });
13853
+ /** What a migration actually did, per switch. `unreachable` is a first-class
13854
+ * answer: a camera that could not be asked is not a camera that was silenced. */
13855
+ var MigrateSwitchOutcomeSchema = _enum([
13856
+ "off",
13857
+ "on",
13858
+ "not-offered",
13859
+ "unreachable"
13860
+ ]);
13861
+ var MigrateSwitchReportSchema = object({
13862
+ deviceId: number(),
13863
+ switchId: CameraSwitchIdSchema,
13864
+ outcome: MigrateSwitchOutcomeSchema,
13865
+ detail: string().optional()
13866
+ });
13867
+ var MigrateDeviceResultSchema = object({
13868
+ sourceId: number(),
13869
+ targetId: number(),
13870
+ switches: array(MigrateSwitchReportSchema).readonly(),
13871
+ /** Switches that could NOT be turned off on the source. Empty is the only
13872
+ * value meaning the replaced hardware is quiet. */
13873
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
13874
+ swapped: boolean()
13875
+ });
13852
13876
  method(object({
13853
13877
  addonId: string(),
13854
13878
  stableId: string()
13855
- }), 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({
13879
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
13880
+ sourceId: number(),
13881
+ targetId: number()
13882
+ }), MigrateDeviceResultSchema, {
13883
+ kind: "mutation",
13884
+ auth: "admin"
13885
+ }), 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({
13856
13886
  deviceId: number(),
13857
13887
  name: string()
13858
13888
  }), _void(), {
@@ -34855,6 +34885,12 @@ Object.freeze({
34855
34885
  addonId: null,
34856
34886
  access: "view"
34857
34887
  },
34888
+ "deviceManager.migrateDevice": {
34889
+ capName: "device-manager",
34890
+ capScope: "system",
34891
+ addonId: null,
34892
+ access: "create"
34893
+ },
34858
34894
  "deviceManager.persistConfig": {
34859
34895
  capName: "device-manager",
34860
34896
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-tuya",
3
- "version": "0.2.52",
3
+ "version": "0.2.53",
4
4
  "description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
5
5
  "keywords": [
6
6
  "camstack",