# onoffice

> OnOffice typescript api client and sdk

Latest version **0.1.10** (published 2022-07-18) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install onoffice
pnpm add onoffice
yarn add onoffice
bun add onoffice
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2022-07-18 |
| First published | 2022-04-25 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=15.0.0 |
| Dependencies | 3 |
| Unpacked size | 48.1 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Maurice Conrad |
| Maintainers | mauriceconrad |
| Keywords | onoffice, sdk, api |

## Links

- npm: https://www.npmjs.com/package/onoffice
- npm.io page: https://npm.io/package/onoffice

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.26.1
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.1.1
- [base64-arraybuffer](https://npm.io/package/base64-arraybuffer.md) ^1.0.2

## Recent versions

- 0.1.10 (latest) — 2022-07-18
- 0.1.9 — 2022-07-18
- 0.1.8 — 2022-07-18
- 0.1.6 — 2022-07-17
- 0.1.5 — 2022-07-15
- 0.1.4 — 2022-07-15
- 0.1.3 — 2022-07-10
- 0.1.2 — 2022-07-10
- 0.1.1 — 2022-05-19
- 0.1.0 — 2022-05-09
- 0.0.17 — 2022-05-09
- 0.0.16 — 2022-05-09
- 0.0.15 — 2022-05-09
- 0.0.14 — 2022-05-09
- 0.0.13 — 2022-05-09
- … 12 more at https://npm.io/package/onoffice/versions

## README

## API Client


The easiest way to use the API is the `OnOfficeAPIClient` class which provides straight-forward methods such as `searchResource()`.

```typescript
import { OnOfficeAPIController } from 'onoffice';

const api = new OnOfficeAPIClient('TOKEN', 'SECRET');

const res = await api.searchResource({
  input: 'Aachen'
});
console.log(res);
```

### Native Methods 

```typescript
import { fetchActions, signAction } from 'onoffice';

// More native interaction with onoffice API but still handling signing the request

const res = await fetchActions([
  {
    {
      actionid: "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
      identifier: "",
      parameters: {
        input: "Aachen"
      },
      resourceid: "estate",
      resourcetype: "search"
    }
  }
], 'TOKEN', 'SECRET', 'https://api.onoffice.de/api/latest/api.php', 'json');

// Anyway, this would just sign an action object 
const signedAction = signAction({
  actionid: "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
  identifier: "",
  parameters: {
    input: "Aachen"
  },
  resourceid: "estate",
  resourcetype: "search"
}, 'TOKEN', 'SECRET');

```

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