# @open-age/client

> a client to connect to open-age services

Latest version **1.2.4** (published 2024-10-27) · WTFPL license · 0 weekly downloads

## Install

```sh
npm install @open-age/client
pnpm add @open-age/client
yarn add @open-age/client
bun add @open-age/client
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.4 |
| Published | 2024-10-27 |
| First published | 2021-10-27 |
| Weekly downloads | 0 |
| License | WTFPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sunny Parkash |
| Maintainers | sunny-parkash |
| Keywords | api, open-age, directory, send-it, drive, insight, discover, gateway, welcome, composer, billing, client |

## Links

- npm: https://www.npmjs.com/package/@open-age/client
- Repository: https://github.com/openage/client
- Homepage: https://github.com/openage/client#readme
- Issues: https://github.com/openage/client/issues
- npm.io page: https://npm.io/package/@open-age/client

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.2.4 (latest) — 2024-10-27
- 1.2.3 — 2024-10-26
- 1.2.2 — 2024-08-22
- 1.2.1 — 2023-01-23
- 1.2.0 — 2022-12-29
- 1.1.1 — 2022-12-21
- 1.1.0 — 2022-11-10
- 1.0.7 — 2022-10-03
- 1.0.6 — 2022-08-04
- 1.0.5 — 2022-06-15
- 1.0.4 — 2022-04-05
- 1.0.3 — 2021-11-25
- 1.0.2 — 2021-10-28
- 1.0.0 — 2021-10-27

## README

# directory-client

Client to interact with the user

## config

add following section to the `config/{env}.config` file

```JSON
"providers": {
    "directory": {
        "url": "http://api.openage.in/directory/v1/api", // prod url
        "role": {
            "key": "<presistant token>"
        }
    }
}
```

## usage

Get a role by key

```JavaScript

const client = require('@open-age/client')

const roleKey = 'xxx....xxx' // role key of the user

// impersonates the user
const role = await client.directory.roles.get(roleKey)
```

---
_Source: https://npm.io/package/@open-age/client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
