getFitPasswordList()

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

Description

Get the current accessory's online password list.

Parameters

None

Return Value

Type: Promise<FitPasswordItem[]>
List data
FitPasswordItem
PropertyTypeDescription
idnumberCloud unlock-method record ID (from `unlockBindingId`)
unlockIdstringLock-side unlock instance ID (from cloud `devUnlockId`, hexadecimal string)
unlockNamestringUnlock method name (from cloud `name`)
photoUnlockbooleanWhether it is an image-based unlock method; the accessory cloud does not return this field, fixed to `false`
userNamestringUsername the password belongs to
lockUserIdnumberUser ID on the lock side
userTypenumberUser type: 10 Administrator / 20 Regular member / 30 Unnamed member / 50 Home owner
devLockIdstringLock-side ID (hexadecimal string, from cloud `devUnlockId`)
Validity settings: effective/expiry time; when repeating weekly, includes `weeks` and per-day time slots

Referenced Types

interfaceEffectiveConfig
PropertyTypeDescription
effectiveDatenumberEffective date (seconds-level timestamp)
expiredDatenumberExpiration date (seconds-level timestamp)
repeat"none" | "week"Repeat policy: none or weekly
weeksWeekWeekly repeat bitmap
effectiveTimenumberDaily start time (minutes)
expiredTimenumberDaily end time (minutes)
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

EffectiveConfig.repeat
ValueDescriptionSince
none--
week--
Week
ValueDescriptionSince
0--
1--

Examples

import { getFitPasswordList } from '@ray-js/lock-sdk';
const list = getFitPasswordList();
console.log(list);