getFitLogs(params?: GetFitLogsParams)

版本要求:
@ray-js/lock-sdk≥1.2.0

描述

获取配件开关门记录列表

参数

参数类型必填说明
否入参(page/pageSize)

返回值

类型:Promise<GetLogsResult>
分页记录列表
GetLogsResult
属性类型说明
日志数据
hasMoreboolean是否有更多
totalnumber总数量

引用对象

interfaceLogData
属性类型描述
logIdstring日志唯一 id
timenumber发生时间(毫秒时间戳)
currentUserboolean是否与当前登录用户相关
type"alarm_record" | "close_record" | "unlock_record" | "operation" | "local_operation"日志类型
operationType"dev_bind" | "member_schedule_update" | "unlock_add" | "unlock_del" | "temp_pwd_create" | "temp_pwd_del" | "temp_pwd_meta_update" | "temp_pwd_name_update" | "offline_pwd_achieve" | "offline_pwd_clear_achieve" | "offline_pwd_clear_single_achieve" | "offline_pwd_name_update" | "arming_switch" | "unlock_switch" | "automatic_lock" | "auto_lock_time" | "verify_lock_switch" | "do_not_disturb" | "special_control" | "special_function" | "beep_volume" | "remote_unlock_setting" | "remote_voice_pwd_setting"操作类型 type 为 operation 时有效
userIdstring关联用户 id
dpIdnumber关联 DP 数字 id
dpCodestring关联 DP code
dataany业务数据(DP 值或其他结构)
userNamestring关联用户昵称
avatarUrlstring关联用户头像 URL(history.list 2.0 部分设备返回)
relateDevNamestring关联子设备名(history.list 2.0 部分设备返回,子设备/网关下挂锁场景)
bindableboolean是否可绑定(unlock_record 时有效)
unlockNamestring开锁方式名称(unlock_record)
附件媒体列表
组合开锁成员(unlock_record)
closeValue"UNDEFINED" | "VOICE_REMOTE" | "APP_REMOTE" | "AUTO" | "LOCAL_MANUAL" | "FITTINGS" | "APP" | "GEO_FENCE"关锁方式(close_record)
本地操作明细(local_operation)
isHijackboolean是否劫持告警
unlockMethod"finger" | "face" | "password" | "card" | "fingerVein" | "hand" | "eye"开锁方式类型(unlock_record)
matter 开锁记录
临时密码信息,operateType 为 temp_pwd_create/ 时有效
清除密码的信息
开锁方式信息
操作类型为 unlock_add/unlock_del 时有效
修改用户时效信息
操作类型为 member_schedule_update 时有效
enumLocalOperateUserType
枚举值实际值描述
LocalOperateUserType.SUPER_ADMIN0超级管理员
LocalOperateUserType.ADMIN1管理员
LocalOperateUserType.SPECIAL_USER2特殊用户
LocalOperateUserType.NORMAL_USER3普通用户
typeWeek周重复位图:下标 0–6 对应周日–周六,0 不生效 1 生效
export type Week = [
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
];

合法值

LogData.type
值说明最低版本
alarm_record--
close_record--
unlock_record--
operation--
local_operation--
LogData.operationType
值说明最低版本
dev_bind--
member_schedule_update--
unlock_add--
unlock_del--
temp_pwd_create--
temp_pwd_del--
temp_pwd_meta_update--
temp_pwd_name_update--
offline_pwd_achieve--
offline_pwd_clear_achieve--
offline_pwd_clear_single_achieve--
offline_pwd_name_update--
arming_switch--
unlock_switch--
automatic_lock--
auto_lock_time--
verify_lock_switch--
do_not_disturb--
special_control--
special_function--
beep_volume--
remote_unlock_setting--
remote_voice_pwd_setting--
LogData.unionUnlockInfo.type
值说明最低版本
finger--
face--
password--
card--
fingerVein--
hand--
eye--
LogData.closeValue
值说明最低版本
UNDEFINED--
VOICE_REMOTE--
APP_REMOTE--
AUTO--
LOCAL_MANUAL--
FITTINGS--
APP--
GEO_FENCE--
LocalUnlockMethodData.category
值说明最低版本
0--
1--
2--
LocalUnlockMethodData.unlockMethod
值说明最低版本
finger--
face--
password--
card--
fingerVein--
hand--
eye--
LocalOperateUserType
值说明最低版本
0超级管理员-
1管理员-
2特殊用户-
3普通用户-
LocalAddUserData.category
值说明最低版本
16--
17--
LogData.unlockMethod
值说明最低版本
finger--
face--
password--
card--
fingerVein--
hand--
eye--
EffectiveConfig.repeat
值说明最低版本
none--
week--
Week
值说明最低版本
0--
1--
LogData.unlockInfo.type
值说明最低版本
finger--
face--
password--
card--
fingerVein--
hand--
eye--

示例代码

import { getFitLogs } from '@ray-js/lock-sdk';
const { list, hasMore, total } = await getFitLogs({ page: 1, pageSize: 20 });