@tuya-miniapp/ark-extension-virtual-device 1.8.6-beta-13 → 1.8.6-beta-14

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.
@@ -220752,7 +220752,7 @@ var require_package2 = __commonJS({
220752
220752
  "package.json"(exports, module2) {
220753
220753
  module2.exports = {
220754
220754
  name: "@tuya-miniapp/ark-extension-virtual-device",
220755
- version: "1.8.6-beta-12",
220755
+ version: "1.8.6-beta-13",
220756
220756
  license: "MIT",
220757
220757
  files: [
220758
220758
  "manifest.json",
@@ -264463,6 +264463,9 @@ async function getGroupDeviceList(params) {
264463
264463
  });
264464
264464
  const list = devList2?.result?.filter((item) => item.checked);
264465
264465
  if (list && list.length > 0) {
264466
+ const pid = list[0].productId;
264467
+ const product = await getProductInfo({ productIds: [pid] });
264468
+ console.log("----->>>>>>>>productId", product);
264466
264469
  try {
264467
264470
  const homeAllDeviceResponse = await apiRequestByAtop({
264468
264471
  api: "tuya.m.my.group.device.list",
@@ -264472,17 +264475,22 @@ async function getGroupDeviceList(params) {
264472
264475
  gid: homeId
264473
264476
  }
264474
264477
  });
264478
+ const p2 = product?.result?.[0] || {};
264475
264479
  const devIds = list.map((item) => item.devId);
264476
264480
  const l2 = homeAllDeviceResponse?.result?.filter(
264477
264481
  (item) => devIds.indexOf(item.devId) > -1
264478
- );
264482
+ ).map((item) => {
264483
+ const result = { ...item, capability: p2.capability };
264484
+ delete result["ownerId"];
264485
+ return result;
264486
+ });
264479
264487
  deviceList = l2;
264480
264488
  return {
264481
264489
  data: {
264482
264490
  deviceList,
264483
264491
  groupId
264484
264492
  },
264485
- errorCode: import_TYUniCode2.TYUniPluginError.SUCCESS.code,
264493
+ errorCode: 0,
264486
264494
  errorMsg: import_TYUniCode2.TYUniPluginError.SUCCESS.des
264487
264495
  };
264488
264496
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/ark-extension-virtual-device",
3
- "version": "1.8.6-beta-13",
3
+ "version": "1.8.6-beta-14",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "manifest.json",