---
name: "getTempEffectiveList"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "getTempEffectiveList - Get valid temporary password list."
summary: "Get valid temporary password list."
---

## getTempEffectiveList

> [VERSION] @ray-js/lock-sdk >= 1.0.0

### Description

Get the list of active temporary passwords.

### Parameters

None


### Return Value

Type: `Promise<EffectivePasswrodItem[]>`

Current list of active temporary passwords

##### EffectivePasswrodItem

| Property | Type | Description |
| --- | --- | --- |
| `status` | `ValidPasswordStatus` | Password status |
| `unlockBindingId` | `string` | Password ID |
| `effectiveConfig` | `EffectiveConfig` | Validity settings |
| `name` | `string` | Password name |
| `type` | `TemporaryPasswordType` | Password type |
| `sn` | `number` | Password SN |
| `hasClearPwd` | `boolean` | Whether the current password is marked for clearing |
| `clearInfo` | `Object` | Target info for clearing a single password |

##### EffectivePasswrodItem.clearInfo properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `string` | Yes | - | Name of a single password |
| `effectiveConfig` | `EffectiveConfig` | Yes | - | Validity settings for a single password |


### Referenced Types

##### `type` ValidPasswordStatus

Temporary password 'in-effect' status enum

- effective: Effective
- toBeEffective: Pending activation
- frozen: Frozen
- freezing: Freezing
- synchronizing: Synchronizing
- toBeDeleted: Pending deletion

```typescript
export type ValidPasswordStatus =
  | "effective"
  | "toBeEffective"
  | "frozen"
  | "freezing"
  | "synchronizing"
  | "toBeDeleted";
```

##### `interface` EffectiveConfig

| Property | Type | Description |
| --- | --- | --- |
| `effectiveDate` | `number` | Effective date (seconds-level timestamp) |
| `expiredDate` | `number` | Expiration date (seconds-level timestamp) |
| `repeat` | `"none" \| "week"` | Repeat policy: none or weekly |
| `weeks` | `[0 \| 1, 0 \| 1, 0 \| 1, 0 \| 1, 0 \| 1, 0 \| 1, 0 \| 1]` | Weekly repeat bitmap |
| `effectiveTime` | `number` | Daily start time (minutes) |
| `expiredTime` | `number` | Daily end time (minutes) |

##### `type` TemporaryPasswordType

Temporary password business subtype

```typescript
export type TemporaryPasswordType =
  | "custom"
  | "once"
  | "limit"
  | "clear"
  | "clearOne";
```

##### `type` Week

Weekly repeat bitmap: indices 0–6 correspond to Sun–Sat; 0 inactive, 1 active

```typescript
export type Week = [
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
  BitStatus,
];
```

##### `type` BitStatus

Bit switch: 0 off, 1 on / Single-bit flag

```typescript
export type BitStatus = 0 | 1;
```


### Examples

#### Example

```ts
import { getTempEffectiveList } from '@ray-js/lock-sdk';
const list = getTempEffectiveList();
```
