getUserInfo

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

Method signature
getUserInfo(params: )

Description

Get details of a single user.

Parameters

ParameterTypeRequiredDescription
YesQuery parameters (userId: user ID)

Return Value

Type: Promise<UserInfo>
User details
UserInfo
PropertyTypeDescription
userIdstringCloud user ID
lockUserIdnumberLock-side user ID
avatarUrlstringAvatar URL
backHomeNotifyAttrnumberReturn-home notification bit flags
effectiveFlagnumberActive status flag
nickNamestringNickname
offlineUnlockbooleanWhether offline unlocking is supported
Effective period and repeat rules
[]Details grouped by unlock method type
userContactstringUser contact info (account)
userTypeUserTypeUser type
isFamilyUserbooleanWhether the user is a home member

Referenced Types

typeWeekWeekly repeat bitmap: indices 0–6 correspond to Sun–Sat; 0 inactive, 1 active
export type Week = [
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
];
interfaceUnlockMethodBaseInfo
PropertyTypeDescription
unlockIdnumberUnlock method hardware/instance ID
unlockNamestringUnlock method name
isBoundbooleanWhether bound to a cloud user
idnumberCloud-assigned unlock method record ID
photoUnlockbooleanWhether an image-based unlock method
isSpecialbooleanWhether a special unlock method (notifications and other extensions)
enumUserType
ValueActual ValueDescription
UserType.ADMIN10Administrator
UserType.MEMBER20Member
UserType.UNKNOW30Anonymous
UserType.SHARE40Shared member
UserType.OWNER50Home owner

Valid Values

Week
ValueDescriptionSince
0--
1--
return.unlockDetails.type
ValueDescriptionSince
finger--
face--
password--
card--
fingerVein--
hand--
eye--
UserType
ValueDescriptionSince
10Administrator-
20Member-
30Anonymous-
40Shared member-
50Home owner-

Examples

import { getUserInfo } from '@ray-js/lock-sdk';
const info = await getUserInfo({ userId: 'user_001' });