获取授权记录列表
getLockAuthList
引入
@ray-js/ray^1.5.0 以上版本可使用
import { getLockAuthList } from '@ray-js/ray'
参数
AuthListParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备 ID |
authTypes | Array<string> | 是 | 授权类型数组 |
返回
AuthListResult
属性 | 类型 | 说明 |
---|---|---|
hasNext | boolean | 是否还有下一页 |
totalCount | number | 总记录数 |
datas | Array<AuthListResultEntry> | 授权记录列表结果条目数组 |
函数定义示例
/**
* 获取授权记录列表
*/
export function getLockAuthList(params: AuthListParams): Promise<AuthListResult>
获取已失效的授权记录列表
getInvalidAuthList
引入
@ray-js/ray^1.5.0 以上版本可使用
import { getInvalidAuthList } from '@ray-js/ray'
参数
InvalidAuthListParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备 ID |
offSet | number | 是 | 起始记录数 |
limit | number | 是 | 每页个数 |
返回
InvalidAuthListResult
Array<InvalidAuthListResultEntry>
,包含已失效的授权记录列表结果条目。
函数定义示例
/**
* 获取已失效的授权记录列表
*/
export function getInvalidAuthList(params: InvalidAuthListParams): Promise<InvalidAuthListResult>
👉 立即免费领取开发资源,体验涂鸦 MiniApp 小程序开发。
清空已失效的授权记录列表
clearInvalidAuthList
引入
@ray-js/ray^1.5.0 以上版本可使用
import { clearInvalidAuthList } from '@ray-js/ray'
参数
ClearInvalidAuthListParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备 ID |
返回
ClearInvalidAuthListResult
boolean
,表示是否成功清空列表。
函数定义示例
/**
* 清空已失效的授权记录列表
*/
export function clearInvalidAuthList(
params: ClearInvalidAuthListParams
): Promise<ClearInvalidAuthListResult>
添加蓝牙授权记录
addBluetoothAuth
引入
@ray-js/ray^1.5.0 以上版本可使用
import { addBluetoothAuth } from '@ray-js/ray'
参数
AddBluetoothAuthParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备 ID |
timeSetType | number | 是 | 时效类型 |
effectiveTime | number | 是 | 生效时间 |
invalidTime | number | 是 | 失效时间 |
availTime | number | 否 | 可用次数 |
name | string | 是 | 名称 |
schedule | Schedule | 否 | 周期设置 |
countryCode | string | 是 | 国家码 |
account | string | 是 | 账号 |
offlineUnlock | boolean | 是 | 是否支持离线解锁 |
返回
AddBluetoothAuthResult
属性 | 类型 | 说明 |
---|---|---|
unlockBindingId | string | 临时蓝牙开锁对应的序号 |
name | string | 名称 |
userExist | boolean | 用户是否已注册涂鸦智能 |
函数定义示例
/**
* 添加蓝牙授权记录
*/
export function addBluetoothAuth(params: AddBluetoothAuthParams): Promise<AddBluetoothAuthResult>
修改蓝牙钥匙信息
updateBluetoothKey
引入
@ray-js/ray^1.5.0 以上版本可使用
import { updateBluetoothKey } from '@ray-js/ray'
参数
UpdateBluetoothKeyParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备 ID |
unlockBindingId | string | 是 | 临时蓝牙开锁对应的序号 |
offlineUnlock | boolean | 是 | 是否支持离线解锁 |
timeSetType | number | 是 | 时效类型 |
effectiveTime | number | 是 | 生效时间 |
invalidTime | number | 是 | 失效时间 |
availTime | number | 否 | 可用次数 |
name | string | 否 | 名称 |
phase | number | 否 | 状态 |
schedule | UpdateSchedule | 否 | 周期设置 |
返回
UpdateBluetoothKeyResult
boolean
,表示修改是否成功。
函数定义示例
/**
* 修改蓝牙钥匙信息
*/
export function updateBluetoothKey(
params: UpdateBluetoothKeyParams
): Promise<UpdateBluetoothKeyResult>
冻结或解冻蓝牙钥匙
freezeUnfreezeBluetoothKey
引入
@ray-js/ray^1.5.0 以上版本可使用
import { freezeUnfreezeBluetoothKey } from '@ray-js/ray'
参数
FreezeUnfreezeBluetoothKeyParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备 ID |
unlockBindingId | string | 是 | 临时蓝牙开锁对应的序号 |
phase | number | 否 | 状态:2. 正常 4. 冻结 |
返回
FreezeUnfreezeBluetoothKeyResult
boolean
,表示冻结或解冻是否成功。
函数定义示例
/**
* 冻结或解冻蓝牙钥匙
*/
export function freezeUnfreezeBluetoothKey(
params: FreezeUnfreezeBluetoothKeyParams
): Promise<FreezeUnfreezeBluetoothKeyResult>
修改蓝牙钥匙名称
changeBluetoothKeyName
引入
@ray-js/ray^1.5.0 以上版本可使用
import { changeBluetoothKeyName } from '@ray-js/ray'
参数
ChangeBluetoothKeyNameParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备 ID |
unlockBindingId | string | 是 | 临时蓝牙开锁对应的序号 |
name | string | 是 | 新名称 |
返回
ChangeBluetoothKeyNameResult
boolean
,表示修改名称是否成功。
函数定义示例
/**
* 修改蓝牙钥匙名称
*/
export function changeBluetoothKeyName(
params: ChangeBluetoothKeyNameParams
): Promise<ChangeBluetoothKeyNameResult>
删除蓝牙钥匙授权
removeBluetoothKeyAuthorization
引入
@ray-js/ray^1.5.0 以上版本可使用
import { removeBluetoothKeyAuthorization } from '@ray-js/ray'
参数
RemoveBluetoothKeyParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 设备 ID |
unlockBindingId | string | 是 | 临时蓝牙开锁对应的序号 |
返回
RemoveBluetoothKeyResult
boolean
,表示删除授权是否成功。
函数定义示例
/**
* 删除蓝牙钥匙授权
*/
export function removeBluetoothKeyAuthorization(
params: RemoveBluetoothKeyParams
): Promise<RemoveBluetoothKeyResult>
👉 立即免费领取开发资源,体验涂鸦 MiniApp 小程序开发。