获取分享用户在时间段内是否可以开门

checkCanRemoteUnlock

引入

使用该功能需要 @ray-js/ray 版本 1.6.6 及以上。

import { checkCanRemoteUnlock } from '@ray-js/ray'

参数

CanUnlockRemoteParams

属性类型必填说明
devIdstring是设备 Id

返回

CanUnlockRemoteResponse

boolean,判断用户是否可以远程开门的响应结果。

函数定义示例

/**
 * 判断用户是否可以远程开门
 */
export function checkCanRemoteUnlock(
  params: CanUnlockRemoteParams
): Promise<CanUnlockRemoteResponse>

远程免密开门功能

remoteOpenDoor

引入

使用该功能需要 @ray-js/ray 版本 1.6.6 及以上。

import { remoteOpenDoor } from '@ray-js/ray'

参数

RemoteOpenParams

属性类型必填说明
devIdstring是设备 Id
openboolean是是否开门

返回

RemoteOpenResponse

boolean,远程免密开门的响应结果。

函数定义示例

/**
 * 远程免密开门
 */
export function remoteOpenDoor(params: RemoteOpenParams): Promise<RemoteOpenResponse>