@ray-js/lock-sdk 1.0.4 → 1.1.0-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.
- package/lib/api/index.d.ts +25 -0
- package/lib/api/index.js +59 -3
- package/lib/api/linkage.js +7 -7
- package/lib/api/lock.js +16 -16
- package/lib/api/log.js +6 -6
- package/lib/api/request.d.ts +6 -0
- package/lib/api/request.js +57 -0
- package/lib/api/setting.d.ts +1 -1
- package/lib/api/setting.js +3 -3
- package/lib/api/temp.js +20 -20
- package/lib/api/user.d.ts +21 -0
- package/lib/api/user.js +26 -7
- package/lib/api/video.js +2 -2
- package/lib/capability.d.ts +4 -0
- package/lib/capability.js +95 -0
- package/lib/config/dp-code/index.d.ts +6 -1
- package/lib/config/dp-code/index.js +6 -1
- package/lib/config/dp-map/normal.d.ts +2 -3
- package/lib/config/dp-map/normal.js +2 -9
- package/lib/config/dp-map/unlock-method.d.ts +489 -0
- package/lib/config/dp-map/unlock-method.js +17 -0
- package/lib/config/index.d.ts +6 -1
- package/lib/config/index.js +17 -1
- package/lib/index.d.ts +6 -2
- package/lib/index.js +8 -3
- package/lib/interface.d.ts +33 -1
- package/lib/media.d.ts +1 -0
- package/lib/media.js +9 -1
- package/lib/offline-dps.d.ts +9 -0
- package/lib/offline-dps.js +84 -0
- package/lib/open.d.ts +3 -0
- package/lib/open.js +56 -10
- package/lib/other.d.ts +14 -2
- package/lib/other.js +174 -31
- package/lib/signal.d.ts +1 -0
- package/lib/signal.js +7 -0
- package/lib/sleep.d.ts +3 -3
- package/lib/sleep.js +40 -25
- package/lib/state.js +116 -57
- package/lib/sync/offline-dps.d.ts +1 -0
- package/lib/sync/offline-dps.js +34 -0
- package/lib/sync/remote-serect-key.js +19 -23
- package/lib/sync/t0.js +2 -2
- package/lib/sync/unlock-method.d.ts +2 -0
- package/lib/sync/unlock-method.js +42 -0
- package/lib/sync/user.d.ts +2 -0
- package/lib/sync/user.js +76 -0
- package/lib/utils/device.d.ts +7 -0
- package/lib/utils/device.js +39 -0
- package/lib/utils/errors.js +3 -0
- package/lib/utils/index.js +6 -6
- package/lib/utils/ipc.d.ts +11 -0
- package/lib/utils/ipc.js +26 -0
- package/package.json +2 -2
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { getDeviceAdvancedAbility, getProductAbilities } from "./api";
|
|
2
|
+
import config, { hasCapability } from "./config";
|
|
3
|
+
import { ProductCommunicationType } from "./constant";
|
|
4
|
+
import { getDeviceStatus } from "./state";
|
|
5
|
+
import { checkShowMatterMutilpleShare } from "./utils/device";
|
|
6
|
+
let isActiveThreadCache = false;
|
|
7
|
+
export const isActiveThread = async () => {
|
|
8
|
+
const hasThread = hasCapability(ProductCommunicationType.THREAD);
|
|
9
|
+
if (hasThread) {
|
|
10
|
+
const deviceStatus = getDeviceStatus();
|
|
11
|
+
if (deviceStatus.onlineType === "cloud" ||
|
|
12
|
+
config.communication.length === 1) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
const hasBle = hasCapability(ProductCommunicationType.BLUETOOTH);
|
|
16
|
+
if (hasBle) {
|
|
17
|
+
if (isActiveThreadCache) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
await checkShowMatterMutilpleShare(config.devInfo.devId);
|
|
22
|
+
isActiveThreadCache = true;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
export const isShareThead = () => {
|
|
33
|
+
const hasThread = hasCapability(ProductCommunicationType.THREAD);
|
|
34
|
+
return (hasThread &&
|
|
35
|
+
!config.devInfo.meta?.["threadWithBLE"] &&
|
|
36
|
+
!config.devInfo.parentId);
|
|
37
|
+
};
|
|
38
|
+
let deviceAdvanceAbilityCache;
|
|
39
|
+
export const getDeviceAdvancedAbilities = async () => {
|
|
40
|
+
if (deviceAdvanceAbilityCache) {
|
|
41
|
+
return deviceAdvanceAbilityCache;
|
|
42
|
+
}
|
|
43
|
+
const [productAbilities, deviceAdvancedAbility] = await Promise.all([
|
|
44
|
+
getProductAbilities(config.devInfo.devId, [
|
|
45
|
+
"tyabi4ucx5",
|
|
46
|
+
"tyabis9tpe",
|
|
47
|
+
"tyabiwxrn9",
|
|
48
|
+
]),
|
|
49
|
+
getDeviceAdvancedAbility(config.devInfo.devId),
|
|
50
|
+
]);
|
|
51
|
+
deviceAdvanceAbilityCache = {
|
|
52
|
+
cloudStorage: {
|
|
53
|
+
support: deviceAdvancedAbility.types.includes(0),
|
|
54
|
+
},
|
|
55
|
+
ai: {
|
|
56
|
+
support: false,
|
|
57
|
+
config: {},
|
|
58
|
+
},
|
|
59
|
+
wechat: {
|
|
60
|
+
support: false,
|
|
61
|
+
config: {},
|
|
62
|
+
},
|
|
63
|
+
voip: {
|
|
64
|
+
support: deviceAdvancedAbility.types.includes(1),
|
|
65
|
+
config: {},
|
|
66
|
+
},
|
|
67
|
+
wechatVoip: {
|
|
68
|
+
support: false,
|
|
69
|
+
config: {},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
productAbilities.forEach((item) => {
|
|
73
|
+
const data = JSON.parse(item.extConfig);
|
|
74
|
+
if (item.abilityCode === "tyabi4ucx5" && item.isOpen) {
|
|
75
|
+
deviceAdvanceAbilityCache.ai.config = data;
|
|
76
|
+
const dataReport = data?.ai_data_report ?? false;
|
|
77
|
+
const itemRecognition = data?.ai_recognition?.[0]?.item_recognition ?? false;
|
|
78
|
+
const petRecognition = data?.ai_recognition?.[0]?.pet_recognition ?? false;
|
|
79
|
+
const voice = data?.ai_voice ?? false;
|
|
80
|
+
const message = data?.ai_message ?? false;
|
|
81
|
+
deviceAdvanceAbilityCache.ai.support =
|
|
82
|
+
dataReport || itemRecognition || petRecognition || voice || message;
|
|
83
|
+
}
|
|
84
|
+
else if (item.abilityCode === "tyabis9tpe" && item.isOpen) {
|
|
85
|
+
deviceAdvanceAbilityCache.wechat.support = true;
|
|
86
|
+
deviceAdvanceAbilityCache.wechat.config = data;
|
|
87
|
+
}
|
|
88
|
+
else if (item.abilityCode === "tyabiwxrn9" && item.isOpen) {
|
|
89
|
+
deviceAdvanceAbilityCache.wechatVoip.support =
|
|
90
|
+
!!data?.voipType?.includes("0");
|
|
91
|
+
deviceAdvanceAbilityCache.wechatVoip.config = data;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return deviceAdvanceAbilityCache;
|
|
95
|
+
};
|
|
@@ -46,17 +46,22 @@ declare const dpCodes: {
|
|
|
46
46
|
message: string;
|
|
47
47
|
passwordOfflineTime: string;
|
|
48
48
|
linkMode: string;
|
|
49
|
-
|
|
49
|
+
wirelessAwake: string;
|
|
50
50
|
dormantTimeSet: string;
|
|
51
51
|
dormantSwitch: string;
|
|
52
52
|
onlineSwitch: string;
|
|
53
53
|
recordModeAovSwitch: string;
|
|
54
54
|
sdStatus: string;
|
|
55
55
|
updataInfo: string;
|
|
56
|
+
deviceInfo: string;
|
|
57
|
+
doNotDisturb: string;
|
|
58
|
+
muteModePeriod: string;
|
|
59
|
+
matterLanUnlock: string;
|
|
56
60
|
doorlockStatus: string;
|
|
57
61
|
unlockInside: string;
|
|
58
62
|
doorOpened: string;
|
|
59
63
|
unlockApp: string;
|
|
64
|
+
initiativeMessage: string;
|
|
60
65
|
};
|
|
61
66
|
export declare const latLogDpCodes: string[];
|
|
62
67
|
export default dpCodes;
|
|
@@ -46,17 +46,22 @@ const dpCodes = {
|
|
|
46
46
|
message: "message",
|
|
47
47
|
passwordOfflineTime: "password_offline_time",
|
|
48
48
|
linkMode: "link_mode",
|
|
49
|
-
|
|
49
|
+
wirelessAwake: "wireless_awake",
|
|
50
50
|
dormantTimeSet: "dormant_time_set",
|
|
51
51
|
dormantSwitch: "dormant_switch",
|
|
52
52
|
onlineSwitch: "online_switch",
|
|
53
53
|
recordModeAovSwitch: "record_mode_aov_switch",
|
|
54
54
|
sdStatus: "sd_status",
|
|
55
55
|
updataInfo: "updata_info",
|
|
56
|
+
deviceInfo: "device_info",
|
|
57
|
+
doNotDisturb: "do_not_disturb",
|
|
58
|
+
muteModePeriod: "mute_mode_period",
|
|
59
|
+
matterLanUnlock: "matter_lan_unlock",
|
|
56
60
|
doorlockStatus: "doorlock_status",
|
|
57
61
|
unlockInside: "unlock_inside",
|
|
58
62
|
doorOpened: "door_opened",
|
|
59
63
|
unlockApp: "unlock_app",
|
|
64
|
+
initiativeMessage: "initiative_message",
|
|
60
65
|
};
|
|
61
66
|
export const latLogDpCodes = [
|
|
62
67
|
dpCodes.unlockPassword,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DpMap } from "@ray-js/tuya-dp-transform";
|
|
2
2
|
declare const battery: DpMap;
|
|
3
3
|
declare const capabilities: DpMap;
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
export { battery, capabilities, dormancyTime, doNotDisturbTime };
|
|
4
|
+
declare const periodTime: DpMap;
|
|
5
|
+
export { battery, capabilities, periodTime };
|
|
@@ -14,17 +14,10 @@ const capabilities = [
|
|
|
14
14
|
{ name: "communicationType", defaultValue: 0 },
|
|
15
15
|
{ name: "rotateType", defaultValue: 0 },
|
|
16
16
|
];
|
|
17
|
-
const
|
|
17
|
+
const periodTime = [
|
|
18
18
|
{ name: "startHour" },
|
|
19
19
|
{ name: "startMunite" },
|
|
20
20
|
{ name: "endHour" },
|
|
21
21
|
{ name: "endMunite" },
|
|
22
|
-
{ name: "weeks", type: "week" },
|
|
23
22
|
];
|
|
24
|
-
|
|
25
|
-
{ name: "startHour" },
|
|
26
|
-
{ name: "startMunite" },
|
|
27
|
-
{ name: "endHour" },
|
|
28
|
-
{ name: "endMunite" },
|
|
29
|
-
];
|
|
30
|
-
export { battery, capabilities, dormancyTime, doNotDisturbTime };
|
|
23
|
+
export { battery, capabilities, periodTime };
|
|
@@ -486,3 +486,492 @@ declare const reportUpdateTempPwd: DpMap;
|
|
|
486
486
|
declare const sync: DpMap;
|
|
487
487
|
declare const reportSync: DpMap;
|
|
488
488
|
export { add, reportAdd, remove, reportRemove, update, updateMemberRole, reportUpdate, addTempPwd, reportAddTempPwd, removeTempPwd, reportRemoveTempPwd, updateTempPwd, reportUpdateTempPwd, sync, reportSync, };
|
|
489
|
+
declare const _default: {
|
|
490
|
+
add: readonly [{
|
|
491
|
+
readonly name: "type";
|
|
492
|
+
}, {
|
|
493
|
+
readonly name: "stage";
|
|
494
|
+
}, {
|
|
495
|
+
readonly name: "admin";
|
|
496
|
+
readonly type: "boolean";
|
|
497
|
+
readonly defaultValue: false;
|
|
498
|
+
}, {
|
|
499
|
+
readonly name: "memberId";
|
|
500
|
+
}, {
|
|
501
|
+
readonly name: "unlockId";
|
|
502
|
+
}, {
|
|
503
|
+
readonly name: "validConfig";
|
|
504
|
+
readonly type: "child";
|
|
505
|
+
readonly bytes: 17;
|
|
506
|
+
readonly childMap: readonly [{
|
|
507
|
+
readonly name: "startTime";
|
|
508
|
+
readonly bytes: 4;
|
|
509
|
+
}, {
|
|
510
|
+
readonly name: "endTime";
|
|
511
|
+
readonly bytes: 4;
|
|
512
|
+
}, {
|
|
513
|
+
readonly name: "loop";
|
|
514
|
+
}, {
|
|
515
|
+
readonly name: "loopConfig";
|
|
516
|
+
readonly condition: {
|
|
517
|
+
readonly type: "and";
|
|
518
|
+
readonly conditions: readonly [{
|
|
519
|
+
readonly prop: "validConfig.loop";
|
|
520
|
+
readonly value: 2;
|
|
521
|
+
readonly operation: "neq";
|
|
522
|
+
}, {
|
|
523
|
+
readonly prop: "loop";
|
|
524
|
+
readonly value: 3;
|
|
525
|
+
readonly operation: "neq";
|
|
526
|
+
}];
|
|
527
|
+
};
|
|
528
|
+
readonly bytes: 4;
|
|
529
|
+
readonly defaultValue: 0;
|
|
530
|
+
}, {
|
|
531
|
+
readonly name: "weeks";
|
|
532
|
+
readonly condition: {
|
|
533
|
+
readonly prop: "validConfig.loop";
|
|
534
|
+
readonly value: 2;
|
|
535
|
+
};
|
|
536
|
+
readonly type: "custom";
|
|
537
|
+
readonly bytes: 4;
|
|
538
|
+
readonly parse: (value: number) => number[];
|
|
539
|
+
readonly format: (value: number[]) => string;
|
|
540
|
+
readonly defaultValue: readonly [0, 0, 0, 0, 0, 0, 0];
|
|
541
|
+
}, {
|
|
542
|
+
readonly name: "days";
|
|
543
|
+
readonly condition: {
|
|
544
|
+
readonly prop: "validConfig.loop";
|
|
545
|
+
readonly value: 3;
|
|
546
|
+
};
|
|
547
|
+
readonly type: "bits";
|
|
548
|
+
readonly bytes: 4;
|
|
549
|
+
readonly defaultValue: 0;
|
|
550
|
+
}, {
|
|
551
|
+
readonly name: "startHour";
|
|
552
|
+
readonly type: "number";
|
|
553
|
+
readonly bytes: 1;
|
|
554
|
+
readonly defaultValue: 0;
|
|
555
|
+
}, {
|
|
556
|
+
readonly name: "startMinute";
|
|
557
|
+
readonly type: "number";
|
|
558
|
+
readonly bytes: 1;
|
|
559
|
+
readonly defaultValue: 0;
|
|
560
|
+
}, {
|
|
561
|
+
readonly name: "endHour";
|
|
562
|
+
readonly type: "number";
|
|
563
|
+
readonly bytes: 1;
|
|
564
|
+
readonly defaultValue: 0;
|
|
565
|
+
}, {
|
|
566
|
+
readonly name: "endMinute";
|
|
567
|
+
readonly type: "number";
|
|
568
|
+
readonly bytes: 1;
|
|
569
|
+
readonly defaultValue: 0;
|
|
570
|
+
}];
|
|
571
|
+
}, {
|
|
572
|
+
readonly name: "validNum";
|
|
573
|
+
}, {
|
|
574
|
+
readonly name: "pwdLength";
|
|
575
|
+
}, {
|
|
576
|
+
readonly name: "pwd";
|
|
577
|
+
readonly type: "number";
|
|
578
|
+
readonly limit: "pwdLength";
|
|
579
|
+
readonly loop: true;
|
|
580
|
+
readonly defaultValue: readonly [];
|
|
581
|
+
}, {
|
|
582
|
+
readonly name: "sn";
|
|
583
|
+
readonly bytes: 2;
|
|
584
|
+
}];
|
|
585
|
+
reportAdd: readonly [{
|
|
586
|
+
readonly name: "type";
|
|
587
|
+
}, {
|
|
588
|
+
readonly name: "stage";
|
|
589
|
+
}, {
|
|
590
|
+
readonly name: "admin";
|
|
591
|
+
readonly type: "boolean";
|
|
592
|
+
readonly defaultValue: false;
|
|
593
|
+
}, {
|
|
594
|
+
readonly name: "memberId";
|
|
595
|
+
}, {
|
|
596
|
+
readonly name: "unlockId";
|
|
597
|
+
}, {
|
|
598
|
+
readonly name: "total";
|
|
599
|
+
readonly condition: {
|
|
600
|
+
readonly prop: "stage";
|
|
601
|
+
readonly value: 0;
|
|
602
|
+
};
|
|
603
|
+
}, {
|
|
604
|
+
readonly name: "step";
|
|
605
|
+
readonly condition: {
|
|
606
|
+
readonly prop: "stage";
|
|
607
|
+
readonly value: 252;
|
|
608
|
+
};
|
|
609
|
+
}, {
|
|
610
|
+
readonly name: "stageFail";
|
|
611
|
+
readonly condition: {
|
|
612
|
+
readonly prop: "stage";
|
|
613
|
+
readonly value: 253;
|
|
614
|
+
};
|
|
615
|
+
}, {
|
|
616
|
+
readonly name: "none";
|
|
617
|
+
readonly condition: {
|
|
618
|
+
readonly type: "and";
|
|
619
|
+
readonly conditions: readonly [{
|
|
620
|
+
readonly prop: "stage";
|
|
621
|
+
readonly value: 0;
|
|
622
|
+
readonly operation: "neq";
|
|
623
|
+
}, {
|
|
624
|
+
readonly prop: "stage";
|
|
625
|
+
readonly value: 252;
|
|
626
|
+
readonly operation: "neq";
|
|
627
|
+
}, {
|
|
628
|
+
readonly prop: "stage";
|
|
629
|
+
readonly value: 253;
|
|
630
|
+
readonly operation: "neq";
|
|
631
|
+
}];
|
|
632
|
+
};
|
|
633
|
+
}, {
|
|
634
|
+
readonly name: "status";
|
|
635
|
+
}, {
|
|
636
|
+
readonly name: "sn";
|
|
637
|
+
readonly bytes: 2;
|
|
638
|
+
}];
|
|
639
|
+
remove: readonly [{
|
|
640
|
+
readonly name: "type";
|
|
641
|
+
}, {
|
|
642
|
+
readonly name: "stage";
|
|
643
|
+
}, {
|
|
644
|
+
readonly name: "admin";
|
|
645
|
+
readonly type: "boolean";
|
|
646
|
+
readonly defaultValue: false;
|
|
647
|
+
}, {
|
|
648
|
+
readonly name: "memberId";
|
|
649
|
+
}, {
|
|
650
|
+
readonly name: "unlockId";
|
|
651
|
+
}, {
|
|
652
|
+
readonly name: "target";
|
|
653
|
+
}];
|
|
654
|
+
reportRemove: ({
|
|
655
|
+
readonly name: "type";
|
|
656
|
+
} | {
|
|
657
|
+
readonly name: "stage";
|
|
658
|
+
} | {
|
|
659
|
+
readonly name: "admin";
|
|
660
|
+
readonly type: "boolean";
|
|
661
|
+
readonly defaultValue: false;
|
|
662
|
+
} | {
|
|
663
|
+
readonly name: "memberId";
|
|
664
|
+
} | {
|
|
665
|
+
readonly name: "unlockId";
|
|
666
|
+
} | {
|
|
667
|
+
readonly name: "target";
|
|
668
|
+
} | {
|
|
669
|
+
name: string;
|
|
670
|
+
})[];
|
|
671
|
+
update: readonly [{
|
|
672
|
+
readonly name: "type";
|
|
673
|
+
}, {
|
|
674
|
+
readonly name: "stage";
|
|
675
|
+
}, {
|
|
676
|
+
readonly name: "admin";
|
|
677
|
+
readonly type: "boolean";
|
|
678
|
+
readonly defaultValue: false;
|
|
679
|
+
}, {
|
|
680
|
+
readonly name: "memberId";
|
|
681
|
+
}, {
|
|
682
|
+
readonly name: "unlockId";
|
|
683
|
+
}, {
|
|
684
|
+
readonly name: "validConfig";
|
|
685
|
+
readonly type: "child";
|
|
686
|
+
readonly bytes: 17;
|
|
687
|
+
readonly childMap: readonly [{
|
|
688
|
+
readonly name: "startTime";
|
|
689
|
+
readonly bytes: 4;
|
|
690
|
+
}, {
|
|
691
|
+
readonly name: "endTime";
|
|
692
|
+
readonly bytes: 4;
|
|
693
|
+
}, {
|
|
694
|
+
readonly name: "loop";
|
|
695
|
+
}, {
|
|
696
|
+
readonly name: "loopConfig";
|
|
697
|
+
readonly condition: {
|
|
698
|
+
readonly type: "and";
|
|
699
|
+
readonly conditions: readonly [{
|
|
700
|
+
readonly prop: "validConfig.loop";
|
|
701
|
+
readonly value: 2;
|
|
702
|
+
readonly operation: "neq";
|
|
703
|
+
}, {
|
|
704
|
+
readonly prop: "loop";
|
|
705
|
+
readonly value: 3;
|
|
706
|
+
readonly operation: "neq";
|
|
707
|
+
}];
|
|
708
|
+
};
|
|
709
|
+
readonly bytes: 4;
|
|
710
|
+
readonly defaultValue: 0;
|
|
711
|
+
}, {
|
|
712
|
+
readonly name: "weeks";
|
|
713
|
+
readonly condition: {
|
|
714
|
+
readonly prop: "validConfig.loop";
|
|
715
|
+
readonly value: 2;
|
|
716
|
+
};
|
|
717
|
+
readonly type: "custom";
|
|
718
|
+
readonly bytes: 4;
|
|
719
|
+
readonly parse: (value: number) => number[];
|
|
720
|
+
readonly format: (value: number[]) => string;
|
|
721
|
+
readonly defaultValue: readonly [0, 0, 0, 0, 0, 0, 0];
|
|
722
|
+
}, {
|
|
723
|
+
readonly name: "days";
|
|
724
|
+
readonly condition: {
|
|
725
|
+
readonly prop: "validConfig.loop";
|
|
726
|
+
readonly value: 3;
|
|
727
|
+
};
|
|
728
|
+
readonly type: "bits";
|
|
729
|
+
readonly bytes: 4;
|
|
730
|
+
readonly defaultValue: 0;
|
|
731
|
+
}, {
|
|
732
|
+
readonly name: "startHour";
|
|
733
|
+
readonly type: "number";
|
|
734
|
+
readonly bytes: 1;
|
|
735
|
+
readonly defaultValue: 0;
|
|
736
|
+
}, {
|
|
737
|
+
readonly name: "startMinute";
|
|
738
|
+
readonly type: "number";
|
|
739
|
+
readonly bytes: 1;
|
|
740
|
+
readonly defaultValue: 0;
|
|
741
|
+
}, {
|
|
742
|
+
readonly name: "endHour";
|
|
743
|
+
readonly type: "number";
|
|
744
|
+
readonly bytes: 1;
|
|
745
|
+
readonly defaultValue: 0;
|
|
746
|
+
}, {
|
|
747
|
+
readonly name: "endMinute";
|
|
748
|
+
readonly type: "number";
|
|
749
|
+
readonly bytes: 1;
|
|
750
|
+
readonly defaultValue: 0;
|
|
751
|
+
}];
|
|
752
|
+
}, {
|
|
753
|
+
readonly name: "validNum";
|
|
754
|
+
}, {
|
|
755
|
+
readonly name: "pwdLength";
|
|
756
|
+
}, {
|
|
757
|
+
readonly name: "pwd";
|
|
758
|
+
readonly type: "number";
|
|
759
|
+
readonly limit: "pwdLength";
|
|
760
|
+
readonly loop: true;
|
|
761
|
+
readonly defaultValue: readonly [];
|
|
762
|
+
}];
|
|
763
|
+
updateMemberRole: readonly [{
|
|
764
|
+
readonly name: "type";
|
|
765
|
+
}, {
|
|
766
|
+
readonly name: "stage";
|
|
767
|
+
}, {
|
|
768
|
+
readonly name: "admin";
|
|
769
|
+
readonly type: "boolean";
|
|
770
|
+
readonly defaultValue: false;
|
|
771
|
+
}, {
|
|
772
|
+
readonly name: "memberId";
|
|
773
|
+
}, {
|
|
774
|
+
readonly name: "unlockId";
|
|
775
|
+
}];
|
|
776
|
+
reportUpdate: readonly [{
|
|
777
|
+
readonly name: "type";
|
|
778
|
+
}, {
|
|
779
|
+
readonly name: "stage";
|
|
780
|
+
}, {
|
|
781
|
+
readonly name: "admin";
|
|
782
|
+
readonly type: "boolean";
|
|
783
|
+
readonly defaultValue: false;
|
|
784
|
+
}, {
|
|
785
|
+
readonly name: "memberId";
|
|
786
|
+
}, {
|
|
787
|
+
readonly name: "unlockId";
|
|
788
|
+
}, {
|
|
789
|
+
readonly name: "validNum";
|
|
790
|
+
}, {
|
|
791
|
+
readonly name: "status";
|
|
792
|
+
}];
|
|
793
|
+
addTempPwd: readonly [{
|
|
794
|
+
readonly name: "cloudNo";
|
|
795
|
+
readonly bytes: 2;
|
|
796
|
+
}, {
|
|
797
|
+
readonly name: "valid";
|
|
798
|
+
readonly type: "boolean";
|
|
799
|
+
}, {
|
|
800
|
+
readonly name: "validConfig";
|
|
801
|
+
readonly type: "child";
|
|
802
|
+
readonly bytes: 17;
|
|
803
|
+
readonly childMap: readonly [{
|
|
804
|
+
readonly name: "startTime";
|
|
805
|
+
readonly bytes: 4;
|
|
806
|
+
}, {
|
|
807
|
+
readonly name: "endTime";
|
|
808
|
+
readonly bytes: 4;
|
|
809
|
+
}, {
|
|
810
|
+
readonly name: "loop";
|
|
811
|
+
}, {
|
|
812
|
+
readonly name: "loopConfig";
|
|
813
|
+
readonly condition: {
|
|
814
|
+
readonly type: "and";
|
|
815
|
+
readonly conditions: readonly [{
|
|
816
|
+
readonly prop: "validConfig.loop";
|
|
817
|
+
readonly value: 2;
|
|
818
|
+
readonly operation: "neq";
|
|
819
|
+
}, {
|
|
820
|
+
readonly prop: "loop";
|
|
821
|
+
readonly value: 3;
|
|
822
|
+
readonly operation: "neq";
|
|
823
|
+
}];
|
|
824
|
+
};
|
|
825
|
+
readonly bytes: 4;
|
|
826
|
+
readonly defaultValue: 0;
|
|
827
|
+
}, {
|
|
828
|
+
readonly name: "weeks";
|
|
829
|
+
readonly condition: {
|
|
830
|
+
readonly prop: "validConfig.loop";
|
|
831
|
+
readonly value: 2;
|
|
832
|
+
};
|
|
833
|
+
readonly type: "custom";
|
|
834
|
+
readonly bytes: 4;
|
|
835
|
+
readonly parse: (value: number) => number[];
|
|
836
|
+
readonly format: (value: number[]) => string;
|
|
837
|
+
readonly defaultValue: readonly [0, 0, 0, 0, 0, 0, 0];
|
|
838
|
+
}, {
|
|
839
|
+
readonly name: "days";
|
|
840
|
+
readonly condition: {
|
|
841
|
+
readonly prop: "validConfig.loop";
|
|
842
|
+
readonly value: 3;
|
|
843
|
+
};
|
|
844
|
+
readonly type: "bits";
|
|
845
|
+
readonly bytes: 4;
|
|
846
|
+
readonly defaultValue: 0;
|
|
847
|
+
}, {
|
|
848
|
+
readonly name: "startHour";
|
|
849
|
+
readonly type: "number";
|
|
850
|
+
readonly bytes: 1;
|
|
851
|
+
readonly defaultValue: 0;
|
|
852
|
+
}, {
|
|
853
|
+
readonly name: "startMinute";
|
|
854
|
+
readonly type: "number";
|
|
855
|
+
readonly bytes: 1;
|
|
856
|
+
readonly defaultValue: 0;
|
|
857
|
+
}, {
|
|
858
|
+
readonly name: "endHour";
|
|
859
|
+
readonly type: "number";
|
|
860
|
+
readonly bytes: 1;
|
|
861
|
+
readonly defaultValue: 0;
|
|
862
|
+
}, {
|
|
863
|
+
readonly name: "endMinute";
|
|
864
|
+
readonly type: "number";
|
|
865
|
+
readonly bytes: 1;
|
|
866
|
+
readonly defaultValue: 0;
|
|
867
|
+
}];
|
|
868
|
+
}, {
|
|
869
|
+
readonly name: "validNum";
|
|
870
|
+
}, {
|
|
871
|
+
readonly name: "pwdLength";
|
|
872
|
+
}, {
|
|
873
|
+
readonly name: "pwd";
|
|
874
|
+
readonly type: "number";
|
|
875
|
+
readonly limit: "pwdLength";
|
|
876
|
+
readonly loop: true;
|
|
877
|
+
readonly defaultValue: readonly [];
|
|
878
|
+
}];
|
|
879
|
+
reportAddTempPwd: readonly [{
|
|
880
|
+
readonly name: "cloudNo";
|
|
881
|
+
readonly bytes: 2;
|
|
882
|
+
}, {
|
|
883
|
+
readonly name: "unlockId";
|
|
884
|
+
}, {
|
|
885
|
+
readonly name: "status";
|
|
886
|
+
}];
|
|
887
|
+
removeTempPwd: DpMap;
|
|
888
|
+
reportRemoveTempPwd: DpMap;
|
|
889
|
+
updateTempPwd: ({
|
|
890
|
+
readonly name: "validConfig";
|
|
891
|
+
readonly type: "child";
|
|
892
|
+
readonly bytes: 17;
|
|
893
|
+
readonly childMap: readonly [{
|
|
894
|
+
readonly name: "startTime";
|
|
895
|
+
readonly bytes: 4;
|
|
896
|
+
}, {
|
|
897
|
+
readonly name: "endTime";
|
|
898
|
+
readonly bytes: 4;
|
|
899
|
+
}, {
|
|
900
|
+
readonly name: "loop";
|
|
901
|
+
}, {
|
|
902
|
+
readonly name: "loopConfig";
|
|
903
|
+
readonly condition: {
|
|
904
|
+
readonly type: "and";
|
|
905
|
+
readonly conditions: readonly [{
|
|
906
|
+
readonly prop: "validConfig.loop";
|
|
907
|
+
readonly value: 2;
|
|
908
|
+
readonly operation: "neq";
|
|
909
|
+
}, {
|
|
910
|
+
readonly prop: "loop";
|
|
911
|
+
readonly value: 3;
|
|
912
|
+
readonly operation: "neq";
|
|
913
|
+
}];
|
|
914
|
+
};
|
|
915
|
+
readonly bytes: 4;
|
|
916
|
+
readonly defaultValue: 0;
|
|
917
|
+
}, {
|
|
918
|
+
readonly name: "weeks";
|
|
919
|
+
readonly condition: {
|
|
920
|
+
readonly prop: "validConfig.loop";
|
|
921
|
+
readonly value: 2;
|
|
922
|
+
};
|
|
923
|
+
readonly type: "custom";
|
|
924
|
+
readonly bytes: 4;
|
|
925
|
+
readonly parse: (value: number) => number[];
|
|
926
|
+
readonly format: (value: number[]) => string;
|
|
927
|
+
readonly defaultValue: readonly [0, 0, 0, 0, 0, 0, 0];
|
|
928
|
+
}, {
|
|
929
|
+
readonly name: "days";
|
|
930
|
+
readonly condition: {
|
|
931
|
+
readonly prop: "validConfig.loop";
|
|
932
|
+
readonly value: 3;
|
|
933
|
+
};
|
|
934
|
+
readonly type: "bits";
|
|
935
|
+
readonly bytes: 4;
|
|
936
|
+
readonly defaultValue: 0;
|
|
937
|
+
}, {
|
|
938
|
+
readonly name: "startHour";
|
|
939
|
+
readonly type: "number";
|
|
940
|
+
readonly bytes: 1;
|
|
941
|
+
readonly defaultValue: 0;
|
|
942
|
+
}, {
|
|
943
|
+
readonly name: "startMinute";
|
|
944
|
+
readonly type: "number";
|
|
945
|
+
readonly bytes: 1;
|
|
946
|
+
readonly defaultValue: 0;
|
|
947
|
+
}, {
|
|
948
|
+
readonly name: "endHour";
|
|
949
|
+
readonly type: "number";
|
|
950
|
+
readonly bytes: 1;
|
|
951
|
+
readonly defaultValue: 0;
|
|
952
|
+
}, {
|
|
953
|
+
readonly name: "endMinute";
|
|
954
|
+
readonly type: "number";
|
|
955
|
+
readonly bytes: 1;
|
|
956
|
+
readonly defaultValue: 0;
|
|
957
|
+
}];
|
|
958
|
+
} | {
|
|
959
|
+
readonly name: "pwdLength";
|
|
960
|
+
} | {
|
|
961
|
+
readonly name: "pwd";
|
|
962
|
+
readonly type: "number";
|
|
963
|
+
readonly limit: "pwdLength";
|
|
964
|
+
readonly loop: true;
|
|
965
|
+
readonly defaultValue: readonly [];
|
|
966
|
+
} | {
|
|
967
|
+
name: string;
|
|
968
|
+
type?: undefined;
|
|
969
|
+
} | {
|
|
970
|
+
name: string;
|
|
971
|
+
type: string;
|
|
972
|
+
})[];
|
|
973
|
+
reportUpdateTempPwd: DpMap;
|
|
974
|
+
sync: DpMap;
|
|
975
|
+
reportSync: DpMap;
|
|
976
|
+
};
|
|
977
|
+
export default _default;
|
|
@@ -228,3 +228,20 @@ const reportSync = [
|
|
|
228
228
|
},
|
|
229
229
|
];
|
|
230
230
|
export { add, reportAdd, remove, reportRemove, update, updateMemberRole, reportUpdate, addTempPwd, reportAddTempPwd, removeTempPwd, reportRemoveTempPwd, updateTempPwd, reportUpdateTempPwd, sync, reportSync, };
|
|
231
|
+
export default {
|
|
232
|
+
add,
|
|
233
|
+
reportAdd,
|
|
234
|
+
remove,
|
|
235
|
+
reportRemove,
|
|
236
|
+
update,
|
|
237
|
+
updateMemberRole,
|
|
238
|
+
reportUpdate,
|
|
239
|
+
addTempPwd,
|
|
240
|
+
reportAddTempPwd,
|
|
241
|
+
removeTempPwd,
|
|
242
|
+
reportRemoveTempPwd,
|
|
243
|
+
updateTempPwd,
|
|
244
|
+
reportUpdateTempPwd,
|
|
245
|
+
sync,
|
|
246
|
+
reportSync,
|
|
247
|
+
};
|