@mft/mhe-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

MHE-SDK

This module provides easy access to the MoneyHub Enterprise API.

Overview

Here are the main processes that this repository is responsible for:

  • A simple boilerplate for experimenting with the API.
  • Integrated Typescript toolchain
  • Providing a live-reloading build system

Example

#!javascript

import MoneyHub from '@mft/mhe-sdk';

MoneyHub.setup({
  environment: 'test',
  clientId: ''
  clientSecret: '',
  scopes: ''
});

const refreshToken = 'Refresh token goes here';
MoneyHub.user(refreshToken).accounts().create({
  ...
}).then((account) => console.log);

Setup Development Environment

Important: This project requires Node v6 to run. I recommend using nvm to install alternate versions of Node.

  1. Clone this repository
  2. npm install (using Node v6)
  3. npm run start (to transpile the project into build/ and begin execution)

Style Guidelines

The project is written using Typescript and ES6 (ES2015) features only.

The build system is integrated with both TSLint and ESLint, thanks to the tslint.json and .eslintrc.json files provided. When the service is started or reloads, all the code is run through both linters and you will see their output.

We intend to code in the AirBnB Javascript Style, and ESLint is configured to use their rules, with a few modifications to suit the context of Typescript code.

For maximum benefit, this project aims to embrace as much of Typescript as possible. Therefore, TSLint will insist upon giving all variables type definitions.

Type definitions

When installing new NPM modules, check if they have an @types declaration. This package/file is provided by the community to give standard Javascript modules types from Typescript, allowing for interoperability. If you import a module which does not have one, you will have to create your own for Typescript to detect the module. Examples of these can be found in "src/types".

You can create a simple stub declaration:

declare module 'module-name' {

}

You might end up declaring significant portions of the module's API, but this will ensure more consistent code in the future.

More information about importing type definitions can be found here.

Readme

Keywords

none

Package Sidebar

Install

npm i @mft/mhe-sdk

Weekly Downloads

0

Version

1.0.3

License

UNLICENSED

Last publish

Collaborators

  • nadia.pavelin
  • mainulsarder-mh
  • paulina.cisek
  • james-mh
  • nickmoneyhub
  • ingrid.acero
  • annaduh
  • lily.page
  • stephy.wong
  • irialuz
  • stefanie.satna
  • mckenzie.flavius
  • jake.fenley.moneyhub
  • gareth.williams1
  • joeharris_mh
  • yevhen.sydorov
  • wai.yuen
  • thomaskupai
  • viktor.sleifmanis
  • mertgonulmoneyhub
  • alexandru.ionascu.mh
  • kassim-moneyhub
  • ned_davies
  • piyushgoyal
  • tom.mcvay
  • jess_npm_05838
  • renatoalvesmh
  • mattcobleymh
  • tundeph_mh
  • jenniferbeckingham
  • tomcopestake
  • adamtmh
  • chrisw00d
  • phongvu
  • ozamarripamft
  • davidgtonge
  • mft-bamboo
  • maciej.dworakowski
  • hannah_goodridge
  • jspaine
  • skamaraddi
  • stefanspita
  • samybounouar42
  • conradjackson
  • jon_bride_mh
  • lukesparey
  • gilbert.holland-lloyd
  • daniel_cook
  • jackscott10
  • dougmcdonaldmoneyhub
  • moneyhubcolin
  • littlejohnd
  • vicki_tamar
  • davinderbains