@ray-js/lock-sdk 1.1.1-beta.17 → 1.1.1-beta.19

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/lib/api/user.js CHANGED
@@ -57,7 +57,7 @@ export const getUsersSyncLockData = (deviceId) => {
57
57
  export const removeUser = (devId, userId) => {
58
58
  return requestApi({
59
59
  api: `${THING}.m.device.member.remove`,
60
- version: "2.0",
60
+ version: "1.0",
61
61
  data: {
62
62
  devId,
63
63
  userId,
package/lib/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { hasCapability, hasDp, updateConfig } from "./config";
2
2
  import { LockSDKOption } from "./interface";
3
3
  import { getCurrentUser, getDeviceStatus, onDeviceStatusChange, offDeviceStatusChange, getCurrentUserSync, getMediaRotate } from "./state";
4
4
  import { syncUnlockMethod } from "./sync/unlock-method";
5
+ import syncDeleteUsers from "./sync/user";
5
6
  import { publishDps } from "./utils/publishDps";
6
7
  import { publishOfflineDps, getOfflineDps, isOfflineDpSyncing, onOfflineDpsUpdate, offOfflineDpsUpdate, getOfflineDpCache } from "./offline-dps";
7
8
  export * from "./user";
@@ -19,4 +20,4 @@ export * from "./linkage";
19
20
  export * from "./capability";
20
21
  export declare const init: (options?: LockSDKOption) => Promise<void>;
21
22
  export declare const destroy: () => void;
22
- export { getCurrentUser, getMediaRotate, getCurrentUserSync, syncUnlockMethod, getDeviceStatus, onDeviceStatusChange, offDeviceStatusChange, updateConfig, hasCapability, hasDp, publishDps, publishOfflineDps, getOfflineDps, isOfflineDpSyncing, onOfflineDpsUpdate, offOfflineDpsUpdate, getOfflineDpCache, };
23
+ export { getCurrentUser, getMediaRotate, getCurrentUserSync, syncUnlockMethod, syncDeleteUsers, getDeviceStatus, onDeviceStatusChange, offDeviceStatusChange, updateConfig, hasCapability, hasDp, publishDps, publishOfflineDps, getOfflineDps, isOfflineDpSyncing, onOfflineDpsUpdate, offOfflineDpsUpdate, getOfflineDpCache, };
package/lib/index.js CHANGED
@@ -4,6 +4,7 @@ import { addEvents, clearState, initState, removeEvents, getCurrentUser, getDevi
4
4
  import { getCapabilities } from "./utils";
5
5
  import { getDeviceInfo, getLaunchOptionsSync, trackEvent, } from "./utils/device";
6
6
  import { syncUnlockMethod } from "./sync/unlock-method";
7
+ import syncDeleteUsers from "./sync/user";
7
8
  import { publishDps } from "./utils/publishDps";
8
9
  import { publishOfflineDps, getOfflineDps, isOfflineDpSyncing, onOfflineDpsUpdate, offOfflineDpsUpdate, getOfflineDpCache, } from "./offline-dps";
9
10
  export * from "./user";
@@ -72,4 +73,4 @@ export const destroy = () => {
72
73
  clearState();
73
74
  removeEvents();
74
75
  };
75
- export { getCurrentUser, getMediaRotate, getCurrentUserSync, syncUnlockMethod, getDeviceStatus, onDeviceStatusChange, offDeviceStatusChange, updateConfig, hasCapability, hasDp, publishDps, publishOfflineDps, getOfflineDps, isOfflineDpSyncing, onOfflineDpsUpdate, offOfflineDpsUpdate, getOfflineDpCache, };
76
+ export { getCurrentUser, getMediaRotate, getCurrentUserSync, syncUnlockMethod, syncDeleteUsers, getDeviceStatus, onDeviceStatusChange, offDeviceStatusChange, updateConfig, hasCapability, hasDp, publishDps, publishOfflineDps, getOfflineDps, isOfflineDpSyncing, onOfflineDpsUpdate, offOfflineDpsUpdate, getOfflineDpCache, };
@@ -18,17 +18,21 @@ export const syncUnlockMethod = async () => {
18
18
  const dpCode = config.supportBigData
19
19
  ? dpCodes.synchMethodW
20
20
  : dpCodes.synchMethod;
21
- await publishDps({ [dpCode]: ins }, {
22
- checkReport: (dpData) => {
23
- if (typeof dpData[dpCode] !== "undefined") {
24
- const result = dpUtils.parse(dpData[dpCode], config.supportBigData ? reportSyncBigMap : reportSyncMap);
25
- if (result.stage === 1) {
26
- return true;
21
+ try {
22
+ await publishDps({ [dpCode]: ins }, {
23
+ checkReport: (dpData) => {
24
+ if (typeof dpData[dpCode] !== "undefined") {
25
+ const result = dpUtils.parse(dpData[dpCode], config.supportBigData ? reportSyncBigMap : reportSyncMap);
26
+ if (result.stage === 1) {
27
+ return true;
28
+ }
27
29
  }
28
- }
29
- return false;
30
- },
31
- });
30
+ return false;
31
+ },
32
+ });
33
+ }
34
+ catch (error) {
35
+ }
32
36
  }
33
37
  };
34
38
  export const autoSyncUnlockMethod = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lock-sdk",
3
- "version": "1.1.1-beta.17",
3
+ "version": "1.1.1-beta.19",
4
4
  "files": [
5
5
  "lib",
6
6
  "LICENSE.md"