getUnlockMethodDetail(id: number)

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

Description

Get unlock method details

Parameters

ParameterTypeRequiredDescription
idnumberYesRecord ID

Return Value

Type: Promise<UnlockMethodDetail>
Unlock method details (parsed cloud record)
UnlockMethodDetail
PropertyTypeDescription
isBoundbooleanWhether bound to a cloud user
type"finger" | "face" | "password" | "card" | "fingerVein" | "hand" | "eye"Unlock method type
phasenumberCloud stage/status value
dpIdnumberCorresponding DP numeric ID
isSpecialbooleanWhether it's a special unlock method
unlockNamestringUnlock method name
userIdstringAssociated cloud user ID
unlockIdnumberLock-side unlock instance ID
lockUserIdnumberLock-side user ID
idstringCloud unlock method record ID (string form)
userTypenumberUser type (numeric)
Notification configuration; effective when `isSpecial` is true

Error Code

Error CodeError Message
1040Cloud: record does not exist (RECORD_NOT_EXIST)

Referenced Types

interfaceNotifyInfo
PropertyTypeDescription
appSendbooleanWhether to push App notifications
msgSendbooleanWhether to send SMS
msgPhonestringSMS recipient phone number (value present usually indicates SMS enabled)
countryCodestringSMS country code

Valid Values

return.type
ValueDescriptionSince
finger--
face--
password--
card--
fingerVein--
hand--
eye--

Examples

import { getUnlockMethodDetail } from '@ray-js/lock-sdk';
const detail = await getUnlockMethodDetail(123456);