@moneytree/mt-link-javascript-sdk 3.2.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Moneytree Link JavaScript SDK
2
2
 
3
+ [![NPM Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.npmjs.org%2F%40moneytree%2Fmt-link-javascript-sdk&query=%24%5B'dist-tags'%5D%5B'latest'%5D&logo=npm&label=%40moneytree%2Fmt-link-javascript-sdk&color=14BF31)](https://www.npmjs.com/package/@moneytree/mt-link-javascript-sdk)
4
+
3
5
  This is a library for browser client to help you integrate Moneytree tools such as My Account and the Vault without having to do worry about the complex configurations.
4
6
 
5
- Read the [documentation](docs/README.md) for more information.
7
+ ## For SDK Users
8
+
9
+ Read the [documentation](https://moneytree.github.io/mt-link-javascript-sdk/) for more information.
10
+
11
+ ## For SDK Maintainers
12
+
13
+ ```bash
14
+ yarn install
15
+ yarn lint # runs eslint
16
+ yarn test # runs all the tests
17
+ yarn build # bundles the library
18
+ ```
19
+
20
+ There is a minimal sample application in the `sample` directory.
21
+
22
+ ### Documentation
23
+
24
+ ```bash
25
+ yarn build:docs # bundles the documentation
26
+ yarn start:docs # Serves the documentation
27
+ ```
28
+
29
+ We use [docsify](https://docsify.js.org/) to serve the documentation landing page (`docs/README.md`) and [typedoc](https://typedoc.org/) to generate the API documentation (`docs/types`).
30
+
31
+ ### Publishing
32
+
33
+ ```bash
34
+ npm version
35
+ # after merging the new version to master
36
+ npm login
37
+ npm publish
38
+ ```
@@ -1,2 +1,2 @@
1
- import { StoredOptions, ExchangeTokenOptions } from '../typings';
2
- export default function exchangeToken(storedOptions: StoredOptions, options?: ExchangeTokenOptions): Promise<string>;
1
+ import { StoredOptions, ExchangeTokenOptions, Token } from '../typings';
2
+ export default function exchangeToken(storedOptions: StoredOptions, options?: ExchangeTokenOptions): Promise<Token>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { StoredOptions, LogoutOptions, InitOptions, AuthorizeOptions, OnboardOptions, ExchangeTokenOptions, RequestLoginLinkOptions, TokenInfo, AuthorizeUrlOptions, LogoutUrlOptions, OnboardUrlOptions, LinkKitOpenServiceUrlOptions, MyAccountOpenServiceUrlOptions, LinkKitOpenServiceOptions, MyAccountOpenServiceOptions, ConfigsOptions, ConfigsOptionsWithoutIsNewTab, VaultOpenServiceUrlViewServiceList, VaultOpenServiceUrlViewServiceConnection, VaultOpenServiceUrlViewConnectionSetting, VaultOpenServiceUrlViewCustomerSupport, VaultOpenServiceViewServiceList, VaultOpenServiceViewServiceConnection, VaultOpenServiceViewConnectionSetting, VaultOpenServiceViewCustomerSupport } from './typings';
1
+ import { Token, StoredOptions, LogoutOptions, InitOptions, AuthorizeOptions, OnboardOptions, ExchangeTokenOptions, RequestLoginLinkOptions, TokenInfo, AuthorizeUrlOptions, LogoutUrlOptions, OnboardUrlOptions, LinkKitOpenServiceUrlOptions, MyAccountOpenServiceUrlOptions, LinkKitOpenServiceOptions, MyAccountOpenServiceOptions, ConfigsOptions, ConfigsOptionsWithoutIsNewTab, VaultOpenServiceUrlViewServiceList, VaultOpenServiceUrlViewServiceConnection, VaultOpenServiceUrlViewConnectionSetting, VaultOpenServiceUrlViewCustomerSupport, VaultOpenServiceViewServiceList, VaultOpenServiceViewServiceConnection, VaultOpenServiceViewConnectionSetting, VaultOpenServiceViewCustomerSupport } from './typings';
2
2
  export * from './typings';
3
3
  export declare class MtLinkSdk {
4
4
  storedOptions: StoredOptions;
@@ -25,7 +25,7 @@ export declare class MtLinkSdk {
25
25
  openServiceUrl(serviceId: 'vault', options?: VaultOpenServiceUrlViewConnectionSetting): string;
26
26
  openServiceUrl(serviceId: 'vault', options?: VaultOpenServiceUrlViewCustomerSupport): string;
27
27
  requestLoginLink(options?: RequestLoginLinkOptions): Promise<void>;
28
- exchangeToken(options?: ExchangeTokenOptions): Promise<string>;
28
+ exchangeToken(options?: ExchangeTokenOptions): Promise<Token>;
29
29
  tokenInfo(token: string): Promise<TokenInfo>;
30
30
  }
31
31
  declare const mtLinkSdk: MtLinkSdk;