# @or-sdk/sdk-api

> OneReach SDK client for Sdk Api

Latest version **0.32.2** (published 2026-09-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @or-sdk/sdk-api
pnpm add @or-sdk/sdk-api
yarn add @or-sdk/sdk-api
bun add @or-sdk/sdk-api
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.32.2 |
| Published | 2026-09-25 |
| First published | 2021-12-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 47.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | onereach.admin, user.npm |

## Links

- npm: https://www.npmjs.com/package/@or-sdk/sdk-api
- npm.io page: https://npm.io/package/@or-sdk/sdk-api

## Dependencies (1)

- [@or-sdk/base](https://npm.io/package/@or-sdk/base.md) ^0.45.2

## Recent versions

- 0.32.2 (latest) — 2026-09-25
- 0.32.2-beta.4380.0 (beta) — 2026-09-25
- 0.32.1 — 2026-09-21
- 0.32.1-beta.4364.0 — 2026-09-21
- 0.32.1-beta.4362.0 — 2026-09-21
- 0.32.0 — 2026-08-10
- 0.31.1-beta.4293.0 — 2026-08-10
- 0.29.6-beta.4292.0 — 2026-08-06
- 0.29.6-beta.4291.0 — 2026-08-06
- 0.29.6-beta.4290.0 — 2026-08-06
- 0.31.0 — 2026-08-05
- 0.30.1-beta.4286.0 — 2026-08-05
- 0.30.1-beta.4283.0 — 2026-08-05
- 0.30.1-beta.4282.0 — 2026-08-05
- 0.29.6-beta.4281.0 — 2026-08-05
- … 393 more at https://npm.io/package/@or-sdk/sdk-api/versions

## README

# `@or-sdk/sdk-api`

OneReach SDK client for Sdk Api.

## When to use

- Use this package when integrating with the Sdk Api capability on the OneReach platform.
- Use its typed client and exported models instead of hand-writing requests to that service.

## When not to use

- Do not use it for a different platform capability; choose the dedicated `@or-sdk/*` package instead.
- Do not use it for generic third-party HTTP calls.

## Installation
```
$ npm i @or-sdk/sdk-api
```

## Usage
```typescript
import { SdkApi } from '@or-sdk/sdk-api'

// with direct api url
const sdkApi = new SdkApi({
  token: 'my-account-token-string',
  sdkUrl: 'http://example.sdk-api/endpoint'
});

// with service discovery(slower)
const sdkApi = new SdkApi({
  token: 'my-account-token-string',
  discoveryUrl: 'http://example.discovery/endpoint'
});
 ```

## Configuration

- Prefer `sdkUrl` when the service URL is known; it avoids a discovery request.
- Use `discoveryUrl` only when the service URL is not available.
- Provide `token` as a bearer-token string or getter where supported.

## Common pitfalls

- Keep the client token current when it can expire; a token getter is preferable where the constructor accepts one.
- Treat the generated TypeScript types as the authoritative contract for optional parameters and response shapes.

## Method map

| Method | Purpose |
|---|---|
| `generateLegacyToken(...)` | See the exported TypeScript signature for parameters and result. |

## More detail

Full signatures and exported types are available in `src/` and `dist/types/`.


## Additional API reference

Methods below were missing from the package guide. Signatures and return types are taken directly from the exported source API.

### `SdkApi`

| Method | Returns | Purpose |
|---|---|---|
| `makeRequest(params: CalApiParams)` | `Promise<T>` | See the exported TypeScript signature for behavior and constraints. |

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