# oute-services-authorization-sdk

> - Initialization

Latest version **0.0.16** (published 2024-06-27) · 0 weekly downloads

## Install

```sh
npm install oute-services-authorization-sdk
pnpm add oute-services-authorization-sdk
yarn add oute-services-authorization-sdk
bun add oute-services-authorization-sdk
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.16 |
| Published | 2024-06-27 |
| First published | 2024-03-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |

## Links

- npm: https://www.npmjs.com/package/oute-services-authorization-sdk
- npm.io page: https://npm.io/package/oute-services-authorization-sdk

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [oute-services-utility-sdk](https://npm.io/package/oute-services-utility-sdk.md) ^0.0.64

## Recent versions

- 0.0.16 (latest) — 2024-06-27
- 0.0.15 — 2024-06-24
- 0.0.14 — 2024-06-21
- 0.0.13 — 2024-06-19
- 0.0.12 — 2024-06-17
- 0.0.11 — 2024-06-17
- 0.0.10 — 2024-06-17
- 0.0.9 — 2024-06-03
- 0.0.8 — 2024-05-31
- 0.0.7 — 2024-05-28
- 0.0.6 — 2024-05-28
- 0.0.5 — 2024-05-27
- 0.0.4 — 2024-05-24
- 0.0.3 — 2024-04-12
- 0.0.2 — 2024-04-12
- … 1 more at https://npm.io/package/oute-services-authorization-sdk/versions

## README

# This module expose helper functions

- Initialization

```js
  params = {
    url: @server url
    token: @access token
  }
  Authorization = require("oute-services-authorization-sdk")
  authorization_instance = new Authorization(params)
```

## Cache functions

## Core functions

- Save

```js
  body = {
    "_id": "FRldyxUB1",
    "name": "slack",
    "auth_type": "JWT",
    "parent_id": "q-GmTD5-K",
    "workspace_id": "ZzBfJMpfQ",
    "configs": [],
    "state": "ACTIVE",
    "environment_id": null //send the environment id for environment specific value and used to get from variables
  }
  await authorization_instance.save(body)
```

- delete by id

```js
  authorization_id = "FRldyxUB1"
  await authorization_instance.deleteById(authorization_id)
```

- get by parent id

```js
  query = {
    parent_id: "q-GmTD5-K"
  }
  await authorization_instance.getByParent(query)
```

- map to assets

```js
  body = {
    "authorization_ids": ["FRldyxUB1"],
    "workspace_id": "ZzBfJMpfQ",
    "asset_id" : "q-GmTD5-K"
  }
  await authorization_instance.mapToAsset(body)
```

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