updateSharedUser

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

Method signature
updateSharedUser(params: )

Description

Update a shared user (Bluetooth door lock).

Parameters

ParameterTypeRequiredDescription
YesBluetooth key ID, name, validity, etc.

Return Value

Type: Promise<void>
None

Error Code

Error CodeError Message
1031Name length exceeds 20 characters
1032effectiveType is limit but effective is not provided
1033Validity start date not configured
1034Validity end date not configured
1010Start time cannot be later than end time
1035weeks not configured for weekly repetition

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,
];

Valid Values

EffectiveConfig.repeat
ValueDescriptionSince
none--
week--
Week
ValueDescriptionSince
0--
1--
UpdateSharedUserParams.effectiveType
ValueDescriptionSince
once--
permanent--
limit--

Examples

import { updateSharedUser } from '@ray-js/lock-sdk';
await updateSharedUser({
  unlockBindingId: '1234567890',
  name: 'Zhang San',
  effectiveType: 'once',
});