open-index/open-npm huggingface dataset:
npm package: @micoach/js-sdk
Description: SDK client for @micoach/js-sdk
Author: itjuana
Latest version: 0.5.2

# @micoach/js-sdk

This is a Javascript client that utilizes Axios to interact with micoach API. This SDK can be used in the following environments: 

* Node.js
* Webpack
* Browserify

Language level
* ES5 - you must have a Promises/A+ library installed
* ES6

Module system
* CommonJS
* ES6 module system

It can be used in both TypeScript and JavaScript projects. In TypeScript, the definition should be automatically resolved via `package.json` as types are already included. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))

## How to install

First, install the SDK in the desired project: 

```
npm install --save @micoach/js-sdk
```

## Usage

Instantiate a client depending on the API you need, for example to consume the Candidates API: 

```js
import micoach from "@micoach/js-sdk";

const candidatesApi = new micoach.CandidatesApi({
  accessToken: getAuthToken(), // this can be an async function
});

const response = await candidatesApi.listCandidates();
const candidates = response.data;
```

## Override endpoint

By default, the SDK is pointing to the production environment, but you can easily override the environment by specifying the basePath property while instantiating a client: 

```js
import micoach from "@micoach/js-sdk";

const candidatesApi = new micoach.CandidatesApi({
  basePath: "http://localhost:4000/api/micoach",
});
```

<hr />

## How to publish a new version

1. Go to the [Generate SDK GitHub Action](https://github.com/iTjuana/micoach-js-sdk/actions/workflows/generate-sdk.yml) and click the Run workflow button. 

2. Type the type of release: patch, minor or major. 

3. Click run. 

4. A new pull request will automatically be created. Review the changes and if everything looks good, merge the CR. 

5. [Create a new GitHub release](https://github.com/iTjuana/micoach-js-sdk/releases/new) and publish it.