@moneytree/mt-link-javascript-sdk 4.3.0 → 5.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.
@@ -0,0 +1,34 @@
1
+ /*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
9
+
10
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
11
+
12
+ /**
13
+ * @module url-safe-base64
14
+ * @license UNLICENSE
15
+ * @example
16
+ * import {
17
+ * encode, decode, trim,
18
+ * isBase64, isUrlSafeBase64
19
+ * } from 'url-safe-base64'
20
+ * const safe = encode('A/B+C==')
21
+ * // > 'A-B_C..'
22
+ * trim(safe)
23
+ * // > 'A-B_C'
24
+ * const base64 = decode(safe)
25
+ * // > 'A/B+C=='
26
+ * isBase64(base64)
27
+ * // > true
28
+ * isBase64(safe)
29
+ * // > false
30
+ * isUrlSafeBase64(base64)
31
+ * // > false
32
+ * isUrlSafeBase64(safe)
33
+ * // > true
34
+ */
package/dist/typings.d.ts CHANGED
@@ -7,6 +7,7 @@ export interface PrivateParams {
7
7
  export interface PrivateConfigsOptions {
8
8
  sdkPlatform?: 'ios' | 'android' | 'js';
9
9
  sdkVersion?: string;
10
+ emailToken?: string;
10
11
  }
11
12
  export declare const supportedAuthnMethod: readonly ["passwordless", "sso", "credentials", "otp"];
12
13
  export type AuthnMethod = typeof supportedAuthnMethod[number];
@@ -47,27 +48,32 @@ export type VaultViewCustomerSupport = {
47
48
  view: 'customer-support';
48
49
  };
49
50
  export type VaultServiceTypes = VaultViewServiceList | VaultViewServiceConnection | VaultViewConnectionSetting | VaultViewConnectionUpdate | VaultViewConnectionDelete | VaultViewCustomerSupport;
51
+ export interface VaultSpecificOptions {
52
+ showBackBarOn?: Pick<VaultViewServiceList, 'view'> | VaultViewConnectionSetting;
53
+ }
50
54
  export type MyAccountServiceTypes = {
51
55
  view: LoginLinkTo;
52
56
  };
53
57
  export type MyAccountOpenServiceOptions = ConfigsOptions | (ConfigsOptions & MyAccountServiceTypes);
54
58
  export type MyAccountOpenServiceUrlOptions = ConfigsOptionsWithoutIsNewTab | (ConfigsOptionsWithoutIsNewTab & MyAccountServiceTypes);
55
- export type VaultOpenServiceViewServiceList = ConfigsOptions & VaultViewServiceList;
56
- export type VaultOpenServiceViewServiceConnection = ConfigsOptions & VaultViewServiceConnection;
57
- export type VaultOpenServiceViewConnectionSetting = ConfigsOptions & VaultViewConnectionSetting;
58
- export type VaultOpenServiceViewConnectionUpdate = ConfigsOptions & VaultViewConnectionUpdate;
59
- export type VaultOpenServiceViewConnectionDelete = ConfigsOptions & VaultViewConnectionDelete;
60
- export type VaultOpenServiceViewCustomerSupport = ConfigsOptions & VaultViewCustomerSupport;
61
- export type VaultOpenServiceUrlViewServiceList = ConfigsOptionsWithoutIsNewTab & VaultViewServiceList;
62
- export type VaultOpenServiceUrlViewServiceConnection = ConfigsOptionsWithoutIsNewTab & VaultViewServiceConnection;
63
- export type VaultOpenServiceUrlViewConnectionSetting = ConfigsOptionsWithoutIsNewTab & VaultViewConnectionSetting;
64
- export type VaultOpenServiceUrlViewConnectionUpdate = ConfigsOptionsWithoutIsNewTab & VaultViewConnectionUpdate;
65
- export type VaultOpenServiceUrlViewConnectionDelete = ConfigsOptionsWithoutIsNewTab & VaultViewConnectionDelete;
66
- export type VaultOpenServiceUrlViewCustomerSupport = ConfigsOptionsWithoutIsNewTab & VaultViewCustomerSupport;
59
+ export type VaultOpenServiceOptions = ConfigsOptions & VaultSpecificOptions;
60
+ export type VaultOpenServiceUrlOptions = ConfigsOptionsWithoutIsNewTab & VaultSpecificOptions;
61
+ export type VaultOpenServiceViewServiceList = VaultOpenServiceOptions & VaultViewServiceList;
62
+ export type VaultOpenServiceViewServiceConnection = VaultOpenServiceOptions & VaultViewServiceConnection;
63
+ export type VaultOpenServiceViewConnectionSetting = VaultOpenServiceOptions & VaultViewConnectionSetting;
64
+ export type VaultOpenServiceViewConnectionUpdate = VaultOpenServiceOptions & VaultViewConnectionUpdate;
65
+ export type VaultOpenServiceViewConnectionDelete = VaultOpenServiceOptions & VaultViewConnectionDelete;
66
+ export type VaultOpenServiceViewCustomerSupport = VaultOpenServiceOptions & VaultViewCustomerSupport;
67
+ export type VaultOpenServiceUrlViewServiceList = VaultOpenServiceUrlOptions & VaultViewServiceList;
68
+ export type VaultOpenServiceUrlViewServiceConnection = VaultOpenServiceUrlOptions & VaultViewServiceConnection;
69
+ export type VaultOpenServiceUrlViewConnectionSetting = VaultOpenServiceUrlOptions & VaultViewConnectionSetting;
70
+ export type VaultOpenServiceUrlViewConnectionUpdate = VaultOpenServiceUrlOptions & VaultViewConnectionUpdate;
71
+ export type VaultOpenServiceUrlViewConnectionDelete = VaultOpenServiceUrlOptions & VaultViewConnectionDelete;
72
+ export type VaultOpenServiceUrlViewCustomerSupport = VaultOpenServiceUrlOptions & VaultViewCustomerSupport;
67
73
  export type LinkKitOpenServiceOptions = ConfigsOptions;
68
74
  export type LinkKitOpenServiceUrlOptions = ConfigsOptionsWithoutIsNewTab;
69
- export type OpenServiceOptions = MyAccountOpenServiceOptions | ConfigsOptions | VaultOpenServiceViewServiceList | VaultOpenServiceViewConnectionSetting | VaultOpenServiceViewConnectionUpdate | VaultOpenServiceViewConnectionDelete | VaultOpenServiceViewCustomerSupport | LinkKitOpenServiceOptions;
70
- export type OpenServiceUrlOptions = MyAccountOpenServiceUrlOptions | ConfigsOptionsWithoutIsNewTab | VaultOpenServiceUrlViewServiceList | VaultOpenServiceUrlViewConnectionSetting | VaultOpenServiceUrlViewConnectionUpdate | VaultOpenServiceUrlViewConnectionDelete | VaultOpenServiceUrlViewCustomerSupport | LinkKitOpenServiceUrlOptions;
75
+ export type OpenServiceOptions = MyAccountOpenServiceOptions | VaultOpenServiceOptions | VaultOpenServiceViewServiceList | VaultOpenServiceViewConnectionSetting | VaultOpenServiceViewConnectionUpdate | VaultOpenServiceViewConnectionDelete | VaultOpenServiceViewCustomerSupport | LinkKitOpenServiceOptions;
76
+ export type OpenServiceUrlOptions = MyAccountOpenServiceUrlOptions | VaultOpenServiceUrlOptions | VaultOpenServiceUrlViewServiceList | VaultOpenServiceUrlViewConnectionSetting | VaultOpenServiceUrlViewConnectionUpdate | VaultOpenServiceUrlViewConnectionDelete | VaultOpenServiceUrlViewCustomerSupport | LinkKitOpenServiceUrlOptions;
71
77
  export type Scopes = string | string[];
72
78
  interface AuthorizeConfigsOptions {
73
79
  forceLogout?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneytree/mt-link-javascript-sdk",
3
- "version": "4.3.0",
3
+ "version": "5.0.0",
4
4
  "description": "Moneytree Link JavaScript SDK",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -13,7 +13,7 @@
13
13
  "author": "Moneytree",
14
14
  "license": "MIT",
15
15
  "scripts": {
16
- "build": "rm -rf dist && NODE_OPTIONS=--openssl-legacy-provider webpack",
16
+ "build": "rm -rf dist && webpack",
17
17
  "build:docs": "rm -rf docs/types && typedoc --out docs/types src",
18
18
  "prepareRelease": "npm run build && git add dist && npm run build:docs && git add docs",
19
19
  "createChangelog": "conventional-changelog -i CHANGELOG.md -s && git add CHANGELOG.md",
@@ -29,11 +29,14 @@
29
29
  "prepare": "husky install"
30
30
  },
31
31
  "dependencies": {
32
- "crypto-browserify": "^3.12.0",
32
+ "buffer": "^6.0.3",
33
+ "create-hash": "^1.2.0",
33
34
  "cspell": "^7.3.7",
34
35
  "node-fetch": "^2.6.1",
36
+ "process": "^0.11.10",
35
37
  "qs": "^6.10.1",
36
38
  "snake-case": "^3.0.4",
39
+ "stream-browserify": "^3.0.0",
37
40
  "typedoc": "^0.25.1",
38
41
  "url-safe-base64": "^1.1.1"
39
42
  },
@@ -41,7 +44,8 @@
41
44
  "@commitlint/cli": "^12.1.4",
42
45
  "@commitlint/config-conventional": "^12.1.4",
43
46
  "@testing-library/jest-dom": "^5.12.0",
44
- "@types/jest": "^26.0.23",
47
+ "@types/create-hash": "^1.2.6",
48
+ "@types/jest": "^27",
45
49
  "@types/node-fetch": "^2.5.10",
46
50
  "@types/qs": "^6.9.6",
47
51
  "@types/url-safe-base64": "^1.1.0",
@@ -54,13 +58,14 @@
54
58
  "eslint-config-prettier": "^8.3.0",
55
59
  "eslint-plugin-prettier": "^3.4.0",
56
60
  "husky": "^6.0.0",
57
- "jest": "^26.6.3",
61
+ "jest": "^27",
58
62
  "jest-fetch-mock": "^3.0.3",
59
63
  "prettier": "^2.3.0",
60
- "ts-jest": "^26.5.6",
61
- "ts-loader": "^8.0.6",
64
+ "ts-jest": "^27",
65
+ "ts-loader": "^9",
62
66
  "typescript": "^4.2.4",
63
- "webpack": "^4.44.2",
64
- "webpack-cli": "^4.7.0"
65
- }
67
+ "webpack": "^5",
68
+ "webpack-cli": "^5"
69
+ },
70
+ "packageManager": "yarn@4.14.1"
66
71
  }