updateUserLimitTime(params: UpdateUserLimitTimeParams)

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

Description

Update user validity, permanent flag, and offline unlock restrictions.

Parameters

ParameterTypeRequiredDescription
YesUpdate parameters (user ID and effective time configuration)

Return Value

Type: Promise<void>
None

Error Code

Error CodeError Message
1014The device does not support this feature
1069No permission to modify member validity (non-admin)
1049Modifying admin validity is not supported
1032Validity configuration missing when not permanent
1033Validity start date not configured
1034Validity end date not configured
1010Start time cannot be later than end time
1035weeks not configured for weekly repetition
1011Failed to update member validity on the device
1012Failed to update member validity in the cloud

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--

Examples

import { updateUserLimitTime } from '@ray-js/lock-sdk';
await updateUserLimitTime({ userId: 'user_001', lockUserId: 1, permanent: true });