Node Flinks
A Flinks API wrapper for Node.js
Usage
Installation
yarn add node-flinks
Creating a client
import FlinksClient from 'node-flinks';
const flinks = new FlinksClient({
instanceName: 'toolbox',
clientId: '43387ca6-0391-4c82-857d-70d95f087ecb'
});
Making an authorize request
Before you can make any requests to the Flinks API you must first make an authorize
request where you exchange a loginId
for a requestId
.
const requestId = await flinks.authorize({ loginId: '<your loginId>' });
Requesting accounts detail
Once you have a requestId
you can request the user's accounts detail.
const accountsDetail = await flinks.getAccountsDetail({ requestId: '<your requestId from earlier' });
Debugging
This library uses the debug library. To print debug messages for node-flinks
set DEBUG=node-flinks:*
.
API
The API of this library mostly follows the Flinks API as specified in the REST API docs. The main difference is that the Flinks API uses PascalCase for object keys and this library uses camelCase.
Here is a list of all the Flinks API endpoints along with the corresponding library method. We have not yet implemented all the endpoints in the Flinks REST API. If an endpoint you need is missing please consider submitting a pull request.
Endpoint | Client Method | Reference |
---|
/AnswerMFAQuestions | Not implemented | Docs |
/Attributes | Not implemented | Docs |
/Authorize | authorize | Docs |
/DeleteCard | Not implemented | Docs |
/GenerateAuthorizeToken | Not implemented | Docs |
/GetAccountsDetail | getAccountsDetail | Docs |
/GetAccountsDetailAsync | getAccountsDetailAsync | Docs |
/GetAccountsSummary | getAccountsSummary | Docs |
/GetAccountsSummaryAsync | getAccountsSummaryAsync | Docs |
/GetAllAttributes | Not implemented | Docs |
/GetCreditRiskAttributes | Not implemented | Docs |
/GetIncomeAttributes | Not implemented | Docs |
/GetMFAQuestions | Not implemented | Docs |
/GetStatements | getStatements | Docs |
/GetUserAnalysisAttributes | Not implemented | Docs |
/Investments | Not implemented | Docs |
/SetScheduledRefresh | Not implemented | Docs |
Contributing
Development
- Clone this repo
yarn
- Build package with
yarn build
or turn on watch mode with yarn watch
- Run client tests against Flinks API with
yarn test:client
Testing
yarn test
Building
yarn build
If you need to clear the build cache run yarn clean
Publishing
- Update the version in
package.json
- Add a
CHANGELOG
entry - Commit your changes
- Run
npm pack --dry-run
to see what will be published - Run
npm publish
- Create a release on GitHub. Use the version as the tag and release name. For example for version
1.0.0
the tag and release name would be v1.0.0
.