getFitLogs(params?: GetFitLogsParams)

Requires:
@ray-js/lock-sdk≥1.2.0

Description

Get the accessory's door open/close record list

Parameters

ParameterTypeRequiredDescription
NoInput params (page/pageSize)

Return Value

Type: Promise<GetLogsResult>
Paginated record list
GetLogsResult
PropertyTypeDescription
Log data
hasMorebooleanHas more
totalnumberTotal count

Referenced Types

interfaceLogData
PropertyTypeDescription
logIdstringUnique log ID
timenumberEvent time (milliseconds timestamp)
currentUserbooleanWhether related to the current logged-in user
type"alarm_record" | "close_record" | "unlock_record" | "operation" | "local_operation"Log type
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"Only valid when the operation type field type equals operation
userIdstringAssociated user ID
dpIdnumberAssociated DP numeric ID
dpCodestringAssociated DP code
dataanyBusiness data (DP value or other structure)
userNamestringAssociated user nickname
avatarUrlstringAssociated user avatar URL (returned by some devices in history.list 2.0)
relateDevNamestringAssociated sub-device name (returned by some devices in history.list 2.0; sub-device/gateway-attached lock scenario)
bindablebooleanWhether bindable (valid for unlock_record)
unlockNamestringUnlock method name (unlock_record)
Attachment media list
Combination unlock members (unlock_record)
closeValue"UNDEFINED" | "VOICE_REMOTE" | "APP_REMOTE" | "AUTO" | "LOCAL_MANUAL" | "FITTINGS" | "APP" | "GEO_FENCE"Lock method (close_record)
Local operation details (local_operation)
isHijackbooleanDuress alarm
unlockMethod"finger" | "face" | "password" | "card" | "fingerVein" | "hand" | "eye"Unlock method type (unlock_record)
Matter unlock record
Temporary password info; valid when operateType is temp_pwd_create/
Clear-password info
Unlock method info
Valid when the operation type is unlock_add/unlock_del
Update user validity info
Valid when the operation type is member_schedule_update
enumLocalOperateUserType
ValueActual ValueDescription
LocalOperateUserType.SUPER_ADMIN0Super administrator
LocalOperateUserType.ADMIN1Administrator
LocalOperateUserType.SPECIAL_USER2Special user
LocalOperateUserType.NORMAL_USER3Regular user
typeWeekWeekly repeat bitmap: indices 0–6 correspond to Sun–Sat; 0 inactive, 1 active
export type Week = [
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
];

Valid Values

LogData.type
ValueDescriptionSince
alarm_record--
close_record--
unlock_record--
operation--
local_operation--
LogData.operationType
ValueDescriptionSince
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
ValueDescriptionSince
finger--
face--
password--
card--
fingerVein--
hand--
eye--
LogData.closeValue
ValueDescriptionSince
UNDEFINED--
VOICE_REMOTE--
APP_REMOTE--
AUTO--
LOCAL_MANUAL--
FITTINGS--
APP--
GEO_FENCE--
LocalUnlockMethodData.category
ValueDescriptionSince
0--
1--
2--
LocalUnlockMethodData.unlockMethod
ValueDescriptionSince
finger--
face--
password--
card--
fingerVein--
hand--
eye--
LocalOperateUserType
ValueDescriptionSince
0Super administrator-
1Administrator-
2Special user-
3Regular user-
LocalAddUserData.category
ValueDescriptionSince
16--
17--
LogData.unlockMethod
ValueDescriptionSince
finger--
face--
password--
card--
fingerVein--
hand--
eye--
EffectiveConfig.repeat
ValueDescriptionSince
none--
week--
Week
ValueDescriptionSince
0--
1--
LogData.unlockInfo.type
ValueDescriptionSince
finger--
face--
password--
card--
fingerVein--
hand--
eye--

Examples

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