@ray-js/lock-sdk 1.2.1-beta.2 → 1.2.1-beta.3

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.
@@ -37,4 +37,15 @@ export interface getAlbumDateListResult {
37
37
  dateList: string[];
38
38
  }
39
39
  export declare const getAlbumDateList: (devId: string) => Promise<getAlbumDateListResult>;
40
+ interface GetDeviceCurrentMeidaConfigResult {
41
+ audioAttributes: {
42
+ callMode: Array<1 | 2>;
43
+ hardwareCapability: Array<1 | 2>;
44
+ };
45
+ maxZoomInTimes: number;
46
+ skill: string;
47
+ vedioClarity: number;
48
+ vedioClaritys: number[];
49
+ }
50
+ export declare const getDeviceCurrentMeidaConfig: (devId: string) => Promise<GetDeviceCurrentMeidaConfigResult>;
40
51
  export {};
package/lib/api/video.js CHANGED
@@ -60,3 +60,13 @@ export const getAlbumDateList = (devId) => {
60
60
  },
61
61
  });
62
62
  };
63
+ export const getDeviceCurrentMeidaConfig = (devId) => {
64
+ return requestApi({
65
+ logName: "getDeviceCurrentMeidaConfig",
66
+ api: "m.ipc.device.ability.get",
67
+ version: "1.0",
68
+ data: {
69
+ devId,
70
+ },
71
+ });
72
+ };
@@ -4,5 +4,4 @@ export declare function offOfflineDpsUpdate(callback: (dps: OfflineDps) => void)
4
4
  export declare function publishOfflineDps(dps: Record<string, DpValue>): Promise<void>;
5
5
  export declare function getOfflineDps(isForce?: boolean): Promise<OfflineDps>;
6
6
  export declare function getOfflineDpCache(code: string): import("../../../interface").OfflineDpInfo | undefined;
7
- export declare function checkOfflineDpUpdate(dps: Record<string, DpValue>, isForce?: boolean): Promise<void>;
8
7
  export declare function isOfflineDpSyncing(code: string): boolean;
@@ -1,5 +1,5 @@
1
1
  import { resolveRuntimeFromExportThis } from "../bootstrap/resolve-runtime-from-export-this";
2
- import { checkOfflineDpUpdateForRuntime, publishOfflineDpsForRuntime, getOfflineDpsForRuntime, getOfflineDpCacheForRuntime, onOfflineDpsUpdateForRuntime, offOfflineDpsUpdateForRuntime, } from "../../../feature/offline-dps";
2
+ import { publishOfflineDpsForRuntime, getOfflineDpsForRuntime, getOfflineDpCacheForRuntime, onOfflineDpsUpdateForRuntime, offOfflineDpsUpdateForRuntime, } from "../../../feature/offline-dps";
3
3
  export function onOfflineDpsUpdate(callback) {
4
4
  onOfflineDpsUpdateForRuntime(resolveRuntimeFromExportThis(this), callback);
5
5
  }
@@ -15,9 +15,6 @@ export async function getOfflineDps(isForce) {
15
15
  export function getOfflineDpCache(code) {
16
16
  return getOfflineDpCacheForRuntime(resolveRuntimeFromExportThis(this), code);
17
17
  }
18
- export async function checkOfflineDpUpdate(dps, isForce) {
19
- return checkOfflineDpUpdateForRuntime(resolveRuntimeFromExportThis(this), dps, isForce);
20
- }
21
18
  export function isOfflineDpSyncing(code) {
22
19
  const rt = resolveRuntimeFromExportThis(this);
23
20
  if (!rt.config.supportOfflineDps) {
@@ -1,7 +1,7 @@
1
1
  import dpUtils from "@ray-js/tuya-dp-transform";
2
2
  import { createUnlockMethod } from "../../../api/lock";
3
3
  import { parallelOnlyForRuntime } from "../../utils";
4
- import { formatCloudUnlockId, sleep } from "../../../utils";
4
+ import { sleep } from "../../../utils";
5
5
  import { getError } from "../../../utils/errors";
6
6
  import { publishDpsForRuntime } from "../../dp/publish-dps";
7
7
  import emitter from "../../../utils/event";
@@ -207,7 +207,7 @@ const handleAddReport = async (dps) => {
207
207
  const res = await createUnlockMethod({
208
208
  devId: cfg.devInfo.devId,
209
209
  userId: addUnlockMethodData.userId,
210
- unlockId: formatCloudUnlockId(addUnlockMethodData.unlockDpId, result.unlockId),
210
+ unlockId: `${addUnlockMethodData.unlockDpId}-${result.unlockId}`,
211
211
  unlockName: "",
212
212
  unlockAttr: 0,
213
213
  });
@@ -1,7 +1,7 @@
1
1
  import dpUtils from "@ray-js/tuya-dp-transform";
2
2
  import { createUnlockMethod } from "../../../api/lock";
3
3
  import { encrypt } from "../../../platform/device";
4
- import { formatCloudUnlockId, sleep } from "../../../utils";
4
+ import { sleep } from "../../../utils";
5
5
  import { getError, handleCloudError } from "../../../utils/errors";
6
6
  import { publishDpsForRuntime } from "../../dp/publish-dps";
7
7
  import { getUnlockMethodBase } from "./internal/base";
@@ -76,7 +76,7 @@ export async function addPasswordForRuntime(rt, params) {
76
76
  const result = await createUnlockMethod({
77
77
  devId: devId,
78
78
  userId: params.userId,
79
- unlockId: formatCloudUnlockId(dpId, res.unlockId),
79
+ unlockId: `${dpId}-${res.unlockId}`,
80
80
  unlockName: params.name,
81
81
  unlockDetail: aesPwd,
82
82
  ...specialInfo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lock-sdk",
3
- "version": "1.2.1-beta.2",
3
+ "version": "1.2.1-beta.3",
4
4
  "files": [
5
5
  "lib",
6
6
  "LICENSE.md"