open-index/open-npm huggingface dataset:
npm package: @fluentdevelopment/basiq-api
Description: DEPRECATED: A NodeJS wrapper around the Basiq.io API
Author: OpenSource - Fluent Development
Latest version: 0.1.8
Deprecated: This package is no longer maintained and has been moved to https://www.npmjs.com/package/basiq-api

# DEPRECATED

This package is no longer maintained and has been moved to [basiq-api][npmPackage]. It should be installed using `npm install basiq-api`

[npmPackage]: https://npmjs.com/package/basiq-api

## Basiq.io Node.js bindings

[Basiq.io API][bio-api] bindings for Node.js

[bio-api]: https://basiq.io/api/

## Configuration

The API key can be found on the [API Keys][dashboard] tab in the Basiq.io dashboard.

[dashboard]: https://dashboard.basiq.io/

## Require

```javascript
var BasiqAPI = require('@fluentdevelopment/basiq-api').BasiqAPI;

var apiOptions = {
  baseURL: 'https://au-api.basiq.io', // optional
  auth: {
    apiKey: 'abc123'
  }
}

var basiq = new BasiqAPI(apiOptions);
```

## Importing

```javascript
import { BasiqAPI, BasiqAPIOptions, BasiqResponse } from '@fluentdevelopment/basiq-api';

const apiOptions: BasiqAPIOptions = {
  baseURL: 'https://au-api.basiq.io', // optional
  auth: {
    apiKey: 'abc123'
  }
}

const basiq: BasiqAPI = new BasiqAPI(apiOptions);
```

## API Overview

Every resource is accessed via your `basiq` instance:

```javascript
// basiq.{ RESOURCE_NAME }.{ METHOD_NAME }
```

Every resource method returns a promise, which can be chained or used with async/await.

```javascript
basiq.accounts
  .list('123')
  .then((res: BasiqResponse) => {
    return res.body;
  })
  ;

// where supported
async function getAccounts(connectionId) {
  var resp: BasiqResponse = await basiq.accounts.list(connectionId);
  return resp.body;
}
```

### Available resources and methods

* connections
    * `create(options: ConnectionCreateOptions)`
    * `refresh(connectionId: string)`
    * `retrieve(connectionId: string)`
    * `update(connectionId: string, options: ConnectionUpdateOptions)`
    * `delete(connectionId: string)`
* accounts
    * `retrieve(connectionId: string, accountId: string)`
    * `list(connectionId:string)`
* transactions
    * `retrieve(connectionId: string, transactionId: string)`
    * `list(connectionId: string)`
* institutions
    * `retrieve(institutionId: string)`
    * `list()`

### Interfaces

```typescript
export interface AuthenticationOptions {
  apiKey: string;
}

export interface BasiqAPIOptions {
  baseUrl?: string;
  auth: AuthenticationOptions;
}

export interface ConnectionCreateOptions {
  loginId: string;
  password: string;
  securityCode?: string;
  externalUserId: string;
  institution: {
    id: string;
  };
}

export interface ConnectionUpdateOptions {
  loginId?: string;
  password?: string;
  securityCode?: string;
  externalUserId?: string;
}

export interface BasiqResponse {
  status: number;
  statusText: string;
  body: any;
  headers?: any;
}
```