@ray-js/lock-sdk 1.2.4-beta.1 → 1.2.4-beta.2

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.
@@ -28,6 +28,7 @@ export const createTempCustomForRuntime = parallelOnlyForRuntime(async function
28
28
  });
29
29
  if (!useNear) {
30
30
  try {
31
+ await isValidPassword(baseData);
31
32
  const res = await createTemporaryPassword({
32
33
  ...baseData,
33
34
  sn: 0,
@@ -9,7 +9,7 @@ import { updateUserTimeSchedule, addNormalUser, removeNormalUser, } from "../../
9
9
  import { validConfigDpMap } from "../../config/dp-map/common";
10
10
  import { isUseNearChannelForRuntime } from "../misc/is-use-near-channel-for-runtime";
11
11
  import { getUnlockMethodTypeByDpCodeForRuntime } from "../utils";
12
- import { formatTimestampToMilliseconds, formatWeek, isAdmin, parseWeek, validateEffectiveConfig, } from "../../utils";
12
+ import { formatTimestampToMilliseconds, formatWeek, isAdmin, isHarmony, parseWeek, validateEffectiveConfig, } from "../../utils";
13
13
  import { getCurrentHomeInfo, isSupportShortLink } from "../../platform/device";
14
14
  import { LoopTypes } from "../../utils/constant";
15
15
  import { getCurrentUserForRuntime } from "./current-user";
@@ -337,8 +337,8 @@ export const openAddFamilyUser = async () => {
337
337
  if (!link) {
338
338
  link = await isSupportShortLink("thingsh_family_add_member_rn");
339
339
  }
340
- if (link) {
341
- const url = `tuyaSmart://${link}?homeId=${homeInfo.homeId}`;
340
+ if (link || isHarmony()) {
341
+ const url = `tuyaSmart://${isHarmony() ? "thingsh_family_add_member_rn" : link}?homeId=${homeInfo.homeId}`;
342
342
  return new Promise((resolve, reject) => {
343
343
  ty.router({
344
344
  url: url,
@@ -369,7 +369,7 @@ export async function openFamilyUserDetailForRuntime(rt, userId) {
369
369
  const { userType: currentUserType } = await getCurrentUserForRuntime(rt);
370
370
  const role = userTypeMap[currentUserType];
371
371
  let link = await isSupportShortLink("member_info");
372
- if (link) {
372
+ if (link || isHarmony()) {
373
373
  const url = `tuyaSmart://member_info?homeId=${homeId}&memberId=${userId}&role=${role}`;
374
374
  ty.router({
375
375
  url: url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lock-sdk",
3
- "version": "1.2.4-beta.1",
3
+ "version": "1.2.4-beta.2",
4
4
  "files": [
5
5
  "lib",
6
6
  "LICENSE.md"