Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mft/mhe-sdk

Package Overview
Dependencies
Maintainers
7
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mft/mhe-sdk

An SDK for interacting with MoneyHub Enterprise APIs.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-50%
Maintainers
7
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 12 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc