# hxb-sdk

> ### - Started: - Install: ```bash - yarn install ``` - Building: ```bash - yarn run build ``` - create file ```.env``` from ```.env.test``` then Config file testing at ```.env```: ```bash - cp .env.test .env

Latest version **1.0.11** (published 2022-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install hxb-sdk
pnpm add hxb-sdk
yarn add hxb-sdk
bun add hxb-sdk
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2022-04-20 |
| First published | 2022-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 465.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | beee-devops |

## Links

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

## Dependencies (4)

- [dotenv](https://npm.io/package/dotenv.md) ^16.0.0
- [nodemon](https://npm.io/package/nodemon.md) ^2.0.15
- [typescript](https://npm.io/package/typescript.md) ^4.6.3
- [graphql-request](https://npm.io/package/graphql-request.md) ^4.2.0

## Recent versions

- 1.0.11 (latest) — 2022-04-20
- 1.0.10 — 2022-04-19
- 1.0.8 — 2022-04-18
- 1.0.6-a — 2022-04-18
- 1.0.6 — 2022-04-15
- 1.0.5 — 2022-04-14
- 1.0.4 — 2022-04-12
- 1.0.3 — 2022-04-12
- 1.0.2 — 2022-04-12
- 1.0.1 — 2022-04-08
- 1.0.0 — 2022-04-08

## README

# Hexabase-sdk

### - Started:
  - Install:
    ```bash
      - yarn install
    ```
  - Building:
    ```bash
      - yarn run build
    ```
  - create file ```.env``` from ```.env.test``` then Config file testing at ```.env```:
    ```bash
      - cp .env.test .env
      - config enviroment in .env file
    ```
  - Run test hexabase client:
    ```bash
      - yarn run test:client
      or
      - yarn jest src/hexabase.test.ts
    ```
  - Run test hexabase application:
    ```bash
      - yarn run test:application
      or
      - yarn jest src/lib/packages/application/application.test.ts
    ```
  - Run test hexabase auth:
    ```bash
      - yarn run test:dataauthstore
      or
      - yarn jest src/lib/packages/auth/auth.test.ts
    ```
  - Run test hexabase user:
    ```bash
      - yarn run test:user
      or
      - yarn jest src/lib/packages/user/user.test.ts
    ```
  - Run test hexabase workspace:
    ```bash
      - yarn run test:workspace
      or
      - yarn jest src/lib/packages/workspace/workspace.test.ts
    ```
  - Run test hexabase datastore:
    ```bash
      - yarn run test:datastore
      or
      - yarn jest src/lib/packages/datastore/datastore.test.ts
    ```
### - Initialize for SDK Packge
#### - Requirement:
  - credentials must obtain from hexabase: 
    ```bash
      - url
      - token
    ```

### - Using SDK
  - Configuration:
    ```bash
      import { Hexabase } from 'hexabase-sdk'

      const hexabase = Hexabase.createClient({url, token});
    ```

#### functions created:
```bash
  auth
    - userInfoAsync: get user info by token
    - loginAsync: login with email password
  
  workspace
    - setCurrentWsAsync: set workspace current with id
    - createWorkspaceAsync: created workspace 
    - getWorkspacesAsync: get workspaces and current workspace id
    - getCurrentWorkspaceAsync: get workspaces id current
    - getPasswordPolicyAsync: get workspace password policy
    - getFunctionalityAsync: get workspace functionlity
    - getUsageAsync: get workspace usage
    - getGroupChildrenAsync: get workspace childrent in group
    - getTaskQueueListAsync: get queue list
    - getTaskQueueStatusAsync: get task queue status

  application
    - getAppAndDsAsync: get app and ds
    - createAppAsync: create app

  datastore
    - getFieldSettingsAsync: get field setting in Ds
    - getActionsAsync: get actions in Ds
    - getStatusesAsync: get statuses in Ds
    - getActionSettingAsync: get field action setting in Ds

  item
    - getItemsAsync: get items in datastore
    - getItemsHistories: get items histories
    - createItemId: create Itemid
    - createNewItem: create new item
    - getItemRelated: get item related in datastore

  user
    - userRegisterAsync: get user register info by confirmationId
    - userPasswordExAsync: check user password is expiry
    - userConfirmAsync: get info user confirm by confirmationId
```

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