# oro-sdk-apis

ORO SDK apis package is intended to be run in browser or Node.js environment. It contains all models and apis services.

## Requirements

-   npm >=6.14.13

> Powered by [tsdx](https://github.com/formium/tsdx)

## Local development

> If you cannot see Jest types try opening this folder in a seperate VSCode window.

### Set up project

```bash
npm install
```

Then, it's possible to either build/watch component by using

```bash
npm start # watch
npm build # build
```

### Linking the apis locally:

If you need to link `oro-sdk-apis` to app please see https://github.com/OROHealth/oro-apis/blob/main/sdk/ts/README.md#linking-the-sdk-locally

In all cases (node.js or app), you need to use:

```bash
    npm install
    npm run link:watch
```

Make sure that you are using the same version of node and npm in the SDK and in the service that you are trying to link.

### Publishing package

1. (Only first time) Locally run `npm login` and use the creds in 1password (tech-team-oro) . This will create ~/.npmrc . You will require a OTP but it's sent on tech@orohealth.me so you should all have it.
2. Run `docker-compose up --build sdk-apis-publisher`

#### Publishing `oro-sdk` and `oro-sdk-apis`

Cf. https://github.com/OROHealth/oro-apis/blob/bc91807d8059c9b50cb602f83911969188253d0f/sdk/ts/README.md#publishing-oro-sdk-and-oro-sdk-apis`