@ray-js/lock-sdk 1.2.1-beta.0 → 1.2.1-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/gesture.d.ts +4 -2
- package/lib/entries/main/exports/capability.d.ts +0 -2
- package/lib/entries/main/exports/capability.js +1 -7
- package/lib/entries/main/exports/fit-sdk/device.d.ts +0 -1
- package/lib/entries/main/exports/fit-sdk/device.js +0 -4
- package/lib/entries/main/exports/fit-sdk/temp.d.ts +4 -19
- package/lib/entries/main/exports/gesture.d.ts +3 -5
- package/lib/entries/main/exports/media.d.ts +1 -1
- package/lib/entries/main/exports/misc.d.ts +2 -4
- package/lib/entries/main/exports/notify.d.ts +2 -5
- package/lib/entries/main/exports/temporary.d.ts +2 -11
- package/lib/entries/main/index.d.ts +2 -1
- package/lib/feature/fit/password-list.d.ts +3 -13
- package/lib/feature/fit/temp-password.d.ts +3 -2
- package/lib/feature/media/camera.d.ts +2 -4
- package/lib/feature/misc/capability.d.ts +1 -1
- package/lib/feature/misc/capability.js +1 -1
- package/lib/feature/misc/types.d.ts +3 -0
- package/lib/feature/password/temporary/lists.d.ts +3 -2
- package/lib/feature/password/temporary/offline-create.d.ts +3 -2
- package/lib/feature/password/temporary/wifi-online.d.ts +3 -2
- package/lib/feature/state/init-state.js +9 -9
- package/lib/feature/state/internal/share-thread-local.js +2 -2
- package/package.json +1 -1
package/lib/api/gesture.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ export interface GestureStatus {
|
|
|
4
4
|
[k: string]: any;
|
|
5
5
|
}
|
|
6
6
|
export declare const getGestureStatusApi: (devId: string) => Promise<GestureStatus>;
|
|
7
|
-
export
|
|
8
|
-
devId: string;
|
|
7
|
+
export interface UpdateGestureStatusParams {
|
|
9
8
|
password: string;
|
|
10
9
|
open: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const setGestureStatusApi: (params: UpdateGestureStatusParams & {
|
|
12
|
+
devId: string;
|
|
11
13
|
}) => Promise<boolean>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { ProductCommunicationType } from "../../../constant";
|
|
2
2
|
export declare function hasCapability(capability: ProductCommunicationType): boolean;
|
|
3
3
|
export declare function isBlePureDevice(): boolean;
|
|
4
|
-
export declare function isShareThead(): boolean;
|
|
5
|
-
export declare function isActiveThread(): Promise<boolean>;
|
|
6
4
|
export declare function getDeviceAdvancedAbilities(): Promise<import("../../..").DeviceAdvancedAbility>;
|
|
7
5
|
export declare function getDeviceAdvancedAbilitiesSync(): import("../../..").DeviceAdvancedAbility | undefined;
|
|
8
6
|
export declare function getDeviceCapabilities(): import("../../..").CapabilityInfo | null;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { resolveRuntimeFromExportThis } from "../bootstrap/resolve-runtime-from-export-this";
|
|
2
|
-
import { hasCapabilityForRuntime, isBlePureDeviceForRuntime,
|
|
2
|
+
import { hasCapabilityForRuntime, isBlePureDeviceForRuntime, getDeviceAdvancedAbilitiesForRuntime, getDeviceAdvancedAbilitiesSyncForRuntime, getDeviceCapabilitiesForRuntime, } from "../../../feature/misc/capability";
|
|
3
3
|
export function hasCapability(capability) {
|
|
4
4
|
return hasCapabilityForRuntime(resolveRuntimeFromExportThis(this), capability);
|
|
5
5
|
}
|
|
6
6
|
export function isBlePureDevice() {
|
|
7
7
|
return isBlePureDeviceForRuntime(resolveRuntimeFromExportThis(this));
|
|
8
8
|
}
|
|
9
|
-
export function isShareThead() {
|
|
10
|
-
return isShareTheadForRuntime(resolveRuntimeFromExportThis(this));
|
|
11
|
-
}
|
|
12
|
-
export async function isActiveThread() {
|
|
13
|
-
return isActiveThreadForRuntime(resolveRuntimeFromExportThis(this));
|
|
14
|
-
}
|
|
15
9
|
export async function getDeviceAdvancedAbilities() {
|
|
16
10
|
return getDeviceAdvancedAbilitiesForRuntime(resolveRuntimeFromExportThis(this));
|
|
17
11
|
}
|
|
@@ -24,4 +24,3 @@ interface RemoveFitBleKeyParams {
|
|
|
24
24
|
export declare function removeFitBleKey(params: RemoveFitBleKeyParams): Promise<unknown>;
|
|
25
25
|
export declare function renameFitBleKey(params: RenameFitBleKeyParams): Promise<unknown>;
|
|
26
26
|
export declare function getFitUsers(): Promise<FitUserItem[]>;
|
|
27
|
-
export declare function setFitSetting(dpCode: string, value: string | number | boolean): Promise<void>;
|
|
@@ -6,7 +6,6 @@ import { offFitAddUnlockMethodForRuntime, onFitAddUnlockMethodForRuntime, } from
|
|
|
6
6
|
import { getFitUnlockMethodListForRuntime } from "../../../../feature/fit/method/list";
|
|
7
7
|
import { syncOpenModeRiseForRuntime } from "../../../../feature/fit/sync";
|
|
8
8
|
import { getFitBleKeyListForRuntime, addFitBleKeyForRuntime, createFitPermanentBleKeyForRuntime, createFitTemporaryBleKeyForRuntime, updateFitTemporaryBleKeyForRuntime, removeFitBleKeyForRuntime, renameFitBleKeyForRuntime, } from "../../../../feature/fit/ble-key";
|
|
9
|
-
import { setFitSettingForRuntime } from "../../../../feature/fit/setting";
|
|
10
9
|
import { getFitUsersForRuntime, } from "../../../../feature/fit/users";
|
|
11
10
|
export function fitAddPassword(params) {
|
|
12
11
|
return fitAddPasswordForRuntime(resolveRuntimeFromExportThis(this), params);
|
|
@@ -59,6 +58,3 @@ export function renameFitBleKey(params) {
|
|
|
59
58
|
export function getFitUsers() {
|
|
60
59
|
return getFitUsersForRuntime(resolveRuntimeFromExportThis(this));
|
|
61
60
|
}
|
|
62
|
-
export function setFitSetting(dpCode, value) {
|
|
63
|
-
return setFitSettingForRuntime(resolveRuntimeFromExportThis(this), dpCode, value);
|
|
64
|
-
}
|
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
import { type FitOnlinePasswordItem, type FitOfflinePasswordItem } from "../../../../feature/fit/password-list";
|
|
2
2
|
import { type AddFitTempPwdParams, type RemoveFitTempPwdParams, type RenameFitTempPwdParams, type RenameFitOfflineTempPwdParams, type RevokeFitOfflineTempPwdParams, type FitOfflineClearCodeResult, type ResendFitTempPwdParams, type UpdateFitTempPwdParams } from "../../../../feature/fit/temp-password";
|
|
3
3
|
import { type ClearFitInvalidPwdParams, type GetFitInvalidPwdListParams } from "../../../../feature/fit/invalid-password";
|
|
4
|
-
import { type FitOfflineOnceResult } from "../../../../feature/password/temporary/offline-create";
|
|
4
|
+
import { type FitOfflineOnceResult, type FitOfflineLimitParams } from "../../../../feature/password/temporary/offline-create";
|
|
5
5
|
import type { LimitOfflinePwdItem, OfflinePwdAvailableResult } from "../../../../api/temp";
|
|
6
6
|
import type { TempPasswordResult } from "../../../../interface";
|
|
7
|
-
export declare function getFitPasswordList(): Promise<
|
|
8
|
-
id: number;
|
|
9
|
-
unlockId: string;
|
|
10
|
-
unlockName: string;
|
|
11
|
-
photoUnlock: boolean;
|
|
12
|
-
userName: string;
|
|
13
|
-
lockUserId: number;
|
|
14
|
-
userType: number;
|
|
15
|
-
devLockId: string;
|
|
16
|
-
effective: import("../../../../interface").EffectiveConfig;
|
|
17
|
-
}[]>;
|
|
7
|
+
export declare function getFitPasswordList(): Promise<import("../../../../feature/fit/password-list").FitPasswordItem[]>;
|
|
18
8
|
export declare function getFitOnlinePasswordList(): Promise<FitOnlinePasswordItem[]>;
|
|
19
9
|
export declare function getFitOfflinePasswordList(): Promise<FitOfflinePasswordItem[]>;
|
|
20
|
-
export declare function addFitTempPwd(params: AddFitTempPwdParams): Promise<
|
|
21
|
-
pwdId: number;
|
|
22
|
-
}>;
|
|
10
|
+
export declare function addFitTempPwd(params: AddFitTempPwdParams): Promise<import("../../../../feature/fit/temp-password").AddFitTempPwdResult>;
|
|
23
11
|
export declare function removeFitTempPwd(params: RemoveFitTempPwdParams): Promise<void>;
|
|
24
12
|
export declare function updateFitTempPwd(params: UpdateFitTempPwdParams): Promise<void>;
|
|
25
13
|
export declare function renameFitTempPwd(params: RenameFitTempPwdParams): Promise<void>;
|
|
@@ -30,10 +18,7 @@ export declare function getFitInvalidPwdList(params?: GetFitInvalidPwdListParams
|
|
|
30
18
|
export declare function clearFitInvalidPwd(params?: ClearFitInvalidPwdParams): Promise<boolean>;
|
|
31
19
|
export declare function getFitDynamicPassword(): Promise<TempPasswordResult>;
|
|
32
20
|
export declare function getFitOfflineOncePassword(): Promise<FitOfflineOnceResult>;
|
|
33
|
-
export declare function getFitOfflineLimitPassword(params:
|
|
34
|
-
effectiveTime: number;
|
|
35
|
-
invalidTime: number;
|
|
36
|
-
}): Promise<FitOfflineOnceResult>;
|
|
21
|
+
export declare function getFitOfflineLimitPassword(params: FitOfflineLimitParams): Promise<FitOfflineOnceResult>;
|
|
37
22
|
export declare function getFitOfflineClearAllCode(): Promise<FitOfflineOnceResult>;
|
|
38
23
|
export declare function getFitOfflineRevocableList(): Promise<LimitOfflinePwdItem[]>;
|
|
39
24
|
export declare function getFitOfflinePwdAvailable(pwdType: string): Promise<OfflinePwdAvailableResult>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import type { UpdateGestureStatusParams } from "../../../api/gesture";
|
|
2
|
+
export type { GestureStatus, UpdateGestureStatusParams, } from "../../../api/gesture";
|
|
2
3
|
export declare function getGestureStatus(): Promise<import("../../../api/gesture").GestureStatus>;
|
|
3
|
-
export declare function updateGestureStatus(params:
|
|
4
|
-
password: string;
|
|
5
|
-
open: boolean;
|
|
6
|
-
}): Promise<boolean>;
|
|
4
|
+
export declare function updateGestureStatus(params: UpdateGestureStatusParams): Promise<boolean>;
|
|
@@ -7,7 +7,7 @@ export declare function openLocalAlbum(params?: OpenLocalAlbumParams): Promise<v
|
|
|
7
7
|
export declare function gotoPlayback(params?: GotoPlaybackParams): Promise<void>;
|
|
8
8
|
export declare function isSupportMultiCamera(): boolean;
|
|
9
9
|
export declare function getCameraInfo(): import("../../../feature/media/camera").CameraDpInfo | undefined;
|
|
10
|
-
export declare function queryCameraInfo(): Promise<import("../../../feature/media/camera").
|
|
10
|
+
export declare function queryCameraInfo(): Promise<import("../../../feature/media/camera").CameraDpInfo | undefined>;
|
|
11
11
|
export declare function switchCamera(index: number): Promise<true>;
|
|
12
12
|
export declare function getMediaViewTimes(): Promise<import("../../../api/video").MediaViewTimesResult>;
|
|
13
13
|
export declare function addMediaViewTimes(): Promise<import("../../../api/video").MediaViewTimesResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GotoServiceParams } from "../../../feature/service/goto-service";
|
|
2
|
-
import type { OpenSceneOptions } from "../../../feature/misc/types";
|
|
2
|
+
import type { OpenSceneOptions, ConnectDeviceOptions } from "../../../feature/misc/types";
|
|
3
3
|
export { parseDpPeriodTime } from "../../../feature/misc/dp-period";
|
|
4
4
|
export { formatDpPeriodTime } from "../../../feature/misc/dp-period";
|
|
5
5
|
export declare function openScene(options?: OpenSceneOptions): Promise<void>;
|
|
@@ -13,8 +13,6 @@ export interface UpdateDpPeriodTimeOption {
|
|
|
13
13
|
offlineDp?: boolean;
|
|
14
14
|
}
|
|
15
15
|
export declare function updateDpPeriodTime(dpCode: string, data: UpdateDpPeriodTimeParams, option?: UpdateDpPeriodTimeOption): Promise<void>;
|
|
16
|
-
export declare function connectDevice(options?:
|
|
17
|
-
timeout?: number;
|
|
18
|
-
}): Promise<true>;
|
|
16
|
+
export declare function connectDevice(options?: ConnectDeviceOptions): Promise<true>;
|
|
19
17
|
export declare function gotoService(params?: GotoServiceParams): Promise<void>;
|
|
20
18
|
export declare function validatePwdComplexity(password: string): Promise<boolean>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
+
import type { UpdateVasNotifyConfigParams } from "../../../api/notify";
|
|
1
2
|
export type { VasNotifyConfig, VasNotifyScene, VasNotifyPushConfig, UpdateVasNotifyConfigParams, } from "../../../api/notify";
|
|
2
3
|
export declare function getVasNotifyConfig(): Promise<import("../../../api/notify").VasNotifyConfig>;
|
|
3
|
-
export declare function updateVasNotifyConfig(params:
|
|
4
|
-
key: string;
|
|
5
|
-
enable: boolean;
|
|
6
|
-
userId?: string;
|
|
7
|
-
}): Promise<import("../../../api/notify").VasNotifyConfig>;
|
|
4
|
+
export declare function updateVasNotifyConfig(params: UpdateVasNotifyConfigParams): Promise<import("../../../api/notify").VasNotifyConfig>;
|
|
@@ -5,21 +5,12 @@ export declare function createTempCustom(params: CreateCustomParams): Promise<Te
|
|
|
5
5
|
export declare function removeTempCustom(params: RemoveCustomProps): Promise<boolean>;
|
|
6
6
|
export declare function updateTempCustom(params: UpdateTempPasswordParams): Promise<boolean>;
|
|
7
7
|
export declare function getTempEffectiveList(): Promise<import("../../../feature/password/temporary/types").EffectivePasswrodItem[]>;
|
|
8
|
-
export declare function getTempInvalidList(params?: GetInvalidListParams): Promise<
|
|
9
|
-
list: import("../../../feature/password/temporary/types").InvalidPasswordItem[];
|
|
10
|
-
hasMore: boolean;
|
|
11
|
-
total: number;
|
|
12
|
-
}>;
|
|
8
|
+
export declare function getTempInvalidList(params?: GetInvalidListParams): Promise<import("../../../feature/password/temporary/lists").GetTempInvalidListResult>;
|
|
13
9
|
export declare function clearTempInvalidList(): Promise<boolean>;
|
|
14
10
|
export declare function freezeTemp(params: FreezeParams): Promise<boolean>;
|
|
15
11
|
export declare function unfreezeTemp(params: FreezeParams): Promise<boolean>;
|
|
16
12
|
export declare function renameTemp(params: RenameParams): Promise<void>;
|
|
17
|
-
export declare function saveTempOnlineUnlimited(params: CreateOnlineUnlimitedParams): Promise<
|
|
18
|
-
type: "custom";
|
|
19
|
-
name: string;
|
|
20
|
-
pwdId: string;
|
|
21
|
-
effectiveConfig: import("../../../interface").EffectiveConfig;
|
|
22
|
-
}>;
|
|
13
|
+
export declare function saveTempOnlineUnlimited(params: CreateOnlineUnlimitedParams): Promise<import("../../../feature/password/temporary/wifi-online").SaveTempOnlineUnlimitedResult>;
|
|
23
14
|
export declare function removeTempOnlineUnlimited(id: string): Promise<void>;
|
|
24
15
|
export declare function getTempOnlineUnlimitedList(): Promise<import("../../../feature/password/temporary/wifi-online").OnlinePasswordItem[]>;
|
|
25
16
|
export declare function createTempOffline(params: CreateOfflineParams): Promise<import("../../../feature/password/temporary/types").OfflineTempResult>;
|
|
@@ -3,6 +3,7 @@ import type { LockSDKInstance, FitSDKInstance } from "./build-instance";
|
|
|
3
3
|
export * from "./exports";
|
|
4
4
|
export type { LockSDKInstance, FitSDKInstance };
|
|
5
5
|
export type { LockSdkBoundExportThis } from "./bootstrap/resolve-runtime-from-export-this";
|
|
6
|
-
export
|
|
6
|
+
export type SDKOptions = Omit<LockSDKOption, "preFetch">;
|
|
7
|
+
export declare const createSDK: (options?: SDKOptions) => Promise<LockSDKInstance>;
|
|
7
8
|
export declare const init: (options?: LockSDKOption) => Promise<void>;
|
|
8
9
|
export declare const destroy: () => void;
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import { type RawFitOpenModeScheduleItem } from "../../api/fit";
|
|
2
|
-
import { EffectiveConfig
|
|
2
|
+
import { EffectiveConfig } from "../../interface";
|
|
3
3
|
import { LockDeviceRuntime } from "../../runtime/LockDeviceRuntime";
|
|
4
4
|
export interface FitPasswordItem {
|
|
5
|
-
id: number;
|
|
6
|
-
unlockId: number;
|
|
7
|
-
unlockName: string;
|
|
8
|
-
type: UnlockMethodType;
|
|
9
|
-
userName: string;
|
|
10
|
-
lockUserId: number;
|
|
11
|
-
userType: number;
|
|
12
|
-
devLockId: string;
|
|
13
|
-
effective: EffectiveConfig;
|
|
14
|
-
}
|
|
15
|
-
export declare const getFitPasswordListForRuntime: (runtime: LockDeviceRuntime) => Promise<{
|
|
16
5
|
id: number;
|
|
17
6
|
unlockId: string;
|
|
18
7
|
unlockName: string;
|
|
@@ -22,7 +11,8 @@ export declare const getFitPasswordListForRuntime: (runtime: LockDeviceRuntime)
|
|
|
22
11
|
userType: number;
|
|
23
12
|
devLockId: string;
|
|
24
13
|
effective: EffectiveConfig;
|
|
25
|
-
}
|
|
14
|
+
}
|
|
15
|
+
export declare const getFitPasswordListForRuntime: (runtime: LockDeviceRuntime) => Promise<FitPasswordItem[]>;
|
|
26
16
|
export interface FitOnlinePasswordItem {
|
|
27
17
|
id: number;
|
|
28
18
|
pwdId: number;
|
|
@@ -15,9 +15,10 @@ export interface UpdateFitTempPwdParams {
|
|
|
15
15
|
name: string;
|
|
16
16
|
effective: EffectiveConfig;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export interface AddFitTempPwdResult {
|
|
19
19
|
pwdId: number;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
|
+
export declare function fitAddTempPwdForRuntime(runtime: LockDeviceRuntime, params: AddFitTempPwdParams): Promise<AddFitTempPwdResult>;
|
|
21
22
|
export declare function fitRemoveTempPwdForRuntime(runtime: LockDeviceRuntime, params: RemoveFitTempPwdParams): Promise<void>;
|
|
22
23
|
export declare function fitUpdateTempPwdForRuntime(runtime: LockDeviceRuntime, params: UpdateFitTempPwdParams): Promise<void>;
|
|
23
24
|
export interface RenameFitTempPwdParams {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { LockDeviceRuntime } from "../../runtime/LockDeviceRuntime";
|
|
2
|
-
import type { CameraConfig
|
|
3
|
-
import { locationSelectReportMap } from "../../config/dp-map/media";
|
|
4
|
-
export type CameraInfo = DpMapDataType<typeof locationSelectReportMap>;
|
|
2
|
+
import type { CameraConfig } from "../../interface";
|
|
5
3
|
export declare const isSupportMultiCameraForRuntime: (runtime: LockDeviceRuntime) => boolean;
|
|
6
4
|
interface CameraItem {
|
|
7
5
|
index: number;
|
|
@@ -12,7 +10,7 @@ export interface CameraDpInfo {
|
|
|
12
10
|
list: CameraItem[];
|
|
13
11
|
}
|
|
14
12
|
export declare const getCameraInfoForRuntime: (runtime: LockDeviceRuntime) => CameraDpInfo | undefined;
|
|
15
|
-
export declare const queryCameraInfoForRuntime: (runtime: LockDeviceRuntime) => Promise<
|
|
13
|
+
export declare const queryCameraInfoForRuntime: (runtime: LockDeviceRuntime) => Promise<CameraDpInfo | undefined>;
|
|
16
14
|
export declare const switchCameraForRuntime: (runtime: LockDeviceRuntime, index: number) => Promise<true>;
|
|
17
15
|
export declare const getCameraConfigForRuntime: (runtime: LockDeviceRuntime) => CameraConfig[];
|
|
18
16
|
export {};
|
|
@@ -3,7 +3,7 @@ import { DeviceAdvancedAbility } from "../../interface";
|
|
|
3
3
|
import type { LockDeviceRuntime } from "../../runtime/LockDeviceRuntime";
|
|
4
4
|
export declare const hasCapabilityForRuntime: (runtime: LockDeviceRuntime, capability: ProductCommunicationType) => boolean;
|
|
5
5
|
export declare const isBlePureDeviceForRuntime: (rt: LockDeviceRuntime) => boolean;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const isShareThreadForRuntime: (rt: LockDeviceRuntime) => boolean;
|
|
7
7
|
export declare const isActiveThreadForRuntime: (rt: LockDeviceRuntime) => Promise<boolean>;
|
|
8
8
|
export declare const getDeviceAdvancedAbilitiesSyncForRuntime: (rt: LockDeviceRuntime) => DeviceAdvancedAbility | undefined;
|
|
9
9
|
export declare const getDeviceAdvancedAbilitiesForRuntime: (rt: LockDeviceRuntime) => Promise<DeviceAdvancedAbility>;
|
|
@@ -6,7 +6,7 @@ import { getWithLocalCache } from "../storage/swr-cache";
|
|
|
6
6
|
export const hasCapabilityForRuntime = (runtime, capability) => runtime.config.communication.includes(capability);
|
|
7
7
|
export const isBlePureDeviceForRuntime = (rt) => hasCapabilityForRuntime(rt, ProductCommunicationType.BLUETOOTH) &&
|
|
8
8
|
rt.config.communication.length === 1;
|
|
9
|
-
export const
|
|
9
|
+
export const isShareThreadForRuntime = (rt) => {
|
|
10
10
|
const hasThread = hasCapabilityForRuntime(rt, ProductCommunicationType.THREAD);
|
|
11
11
|
return (hasThread &&
|
|
12
12
|
!rt.config.devInfo.meta?.["threadWithBLE"] &&
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export type ExecutorRange = "unlock" | "lock";
|
|
2
2
|
export type Ability = "backHome" | "alarm" | "geographyArrive" | "geographyLeave" | "bleGeofence" | "siriUnlock" | "siriLock";
|
|
3
|
+
export interface ConnectDeviceOptions {
|
|
4
|
+
timeout?: number;
|
|
5
|
+
}
|
|
3
6
|
export interface OpenSceneOptions {
|
|
4
7
|
themeColor?: string;
|
|
5
8
|
executorRange?: Array<ExecutorRange>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { LockDeviceRuntime } from "../../../runtime/LockDeviceRuntime";
|
|
2
2
|
import type { EffectivePasswrodItem, GetInvalidListParams, InvalidPasswordItem } from "./types";
|
|
3
3
|
export declare function getTempEffectiveListForRuntime(rt: LockDeviceRuntime): Promise<EffectivePasswrodItem[]>;
|
|
4
|
-
export
|
|
4
|
+
export interface GetTempInvalidListResult {
|
|
5
5
|
list: InvalidPasswordItem[];
|
|
6
6
|
hasMore: boolean;
|
|
7
7
|
total: number;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
|
+
export declare function getTempInvalidListForRuntime(rt: LockDeviceRuntime, params?: GetInvalidListParams): Promise<GetTempInvalidListResult>;
|
|
9
10
|
export declare function clearTempInvalidListForRuntime(rt: LockDeviceRuntime): Promise<boolean>;
|
|
10
11
|
export interface LimitTempItem {
|
|
11
12
|
id: string;
|
|
@@ -10,10 +10,11 @@ export interface FitOfflineOnceResult {
|
|
|
10
10
|
gmtExpired: number;
|
|
11
11
|
}
|
|
12
12
|
export declare function createFitOfflineOnceForRuntime(rt: LockDeviceRuntime): Promise<FitOfflineOnceResult>;
|
|
13
|
-
export
|
|
13
|
+
export interface FitOfflineLimitParams {
|
|
14
14
|
effectiveTime: number;
|
|
15
15
|
invalidTime: number;
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
export declare function createFitOfflineLimitForRuntime(rt: LockDeviceRuntime, params: FitOfflineLimitParams): Promise<FitOfflineOnceResult>;
|
|
17
18
|
export declare function createFitOfflineClearAllForRuntime(rt: LockDeviceRuntime): Promise<FitOfflineOnceResult>;
|
|
18
19
|
export declare function getFitOfflineRevocableListForRuntime(rt: LockDeviceRuntime): Promise<LimitOfflinePwdItem[]>;
|
|
19
20
|
export declare function getFitOfflinePwdAvailableForRuntime(rt: LockDeviceRuntime, pwdType: string): Promise<OfflinePwdAvailableResult>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { LockDeviceRuntime } from "../../../runtime/LockDeviceRuntime";
|
|
2
2
|
import type { CreateOnlineUnlimitedParams } from "./types";
|
|
3
3
|
import type { EffectiveConfig } from "../../../interface";
|
|
4
|
-
export
|
|
4
|
+
export interface SaveTempOnlineUnlimitedResult {
|
|
5
5
|
type: "custom";
|
|
6
6
|
name: string;
|
|
7
7
|
pwdId: string;
|
|
8
8
|
effectiveConfig: EffectiveConfig;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
export declare function saveTempOnlineUnlimitedForRuntime(rt: LockDeviceRuntime, params: CreateOnlineUnlimitedParams): Promise<SaveTempOnlineUnlimitedResult>;
|
|
10
11
|
export declare function removeTempOnlineUnlimitedForRuntime(rt: LockDeviceRuntime, id: string): Promise<void>;
|
|
11
12
|
export interface OnlinePasswordItem {
|
|
12
13
|
status: "effective" | "synchronizing" | "expired" | "disabled" | "invalid";
|
|
@@ -14,7 +14,7 @@ import syncT0 from "./sync/t0";
|
|
|
14
14
|
import { getDeviceStatusForRuntime, updateOnlineType } from "./device-status";
|
|
15
15
|
import { handleDpChange } from "./dp-change";
|
|
16
16
|
import { fetchDeviceProperties } from "./remote-permissions";
|
|
17
|
-
import { ipc, yuChannelSyncSingleSync
|
|
17
|
+
import { ipc, yuChannelSyncSingleSync } from "../../platform";
|
|
18
18
|
import { sdkLog } from "../../utils/sdk-log";
|
|
19
19
|
import { ProductCommunicationType, RotateType } from "../../constant";
|
|
20
20
|
import { isHarmony } from "../../utils";
|
|
@@ -41,7 +41,7 @@ export const initState = async (runtime) => {
|
|
|
41
41
|
isSupportVideo,
|
|
42
42
|
},
|
|
43
43
|
});
|
|
44
|
-
const [, , , advanceAbilities, isActiveThread, rotateInfo, deviceSkill, ipcConfig,] = await Promise.allSettled([
|
|
44
|
+
const [, userInfoResult, , advanceAbilities, isActiveThread, rotateInfo, deviceSkill, ipcConfig,] = await Promise.allSettled([
|
|
45
45
|
updateOnlineType(runtime),
|
|
46
46
|
getCurrentUserForRuntime(runtime),
|
|
47
47
|
fetchDeviceProperties(runtime),
|
|
@@ -71,6 +71,9 @@ export const initState = async (runtime) => {
|
|
|
71
71
|
},
|
|
72
72
|
}),
|
|
73
73
|
]);
|
|
74
|
+
if (userInfoResult.status === "rejected") {
|
|
75
|
+
throw userInfoResult.reason;
|
|
76
|
+
}
|
|
74
77
|
if (isSupportVideo) {
|
|
75
78
|
const isSEI = runtime.config.capabilities?.rotateType === RotateType.SEI;
|
|
76
79
|
if (rotateInfo.status === "fulfilled") {
|
|
@@ -85,14 +88,11 @@ export const initState = async (runtime) => {
|
|
|
85
88
|
}
|
|
86
89
|
if (ipcConfig.status === "fulfilled" &&
|
|
87
90
|
ipcConfig.value?.audioAttributes?.hardwareCapability?.includes(2)) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
91
|
+
runtime.config.supportTalk = true;
|
|
92
|
+
runtime.config.isTwoWayTalk =
|
|
93
|
+
ipcConfig.value?.audioAttributes?.callMode?.[0] === 2;
|
|
94
|
+
if (!isHarmony()) {
|
|
94
95
|
try {
|
|
95
|
-
runtime.config.supportTalk = true;
|
|
96
96
|
const modeRes = await ipc.getCurrentSupportedTalkMode(devId);
|
|
97
97
|
runtime.config.isTwoWayTalk = modeRes.talkbackMode === 2;
|
|
98
98
|
sdkLog("info", "initState", "supportTalk", {
|