@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 +34 -1
- package/dist/api/exchange-token.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/typings.d.ts +43 -35
- package/package.json +9 -4
package/dist/typings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const supportedAuthAction: readonly ["login", "signup"];
|
|
2
|
-
export
|
|
2
|
+
export type AuthAction = typeof supportedAuthAction[number];
|
|
3
3
|
export interface PrivateParams {
|
|
4
4
|
cobrandClientId?: string;
|
|
5
5
|
samlSubjectId?: string;
|
|
@@ -9,7 +9,7 @@ export interface PrivateConfigsOptions {
|
|
|
9
9
|
sdkVersion?: string;
|
|
10
10
|
}
|
|
11
11
|
export declare const supportedAuthnMethod: readonly ["passwordless", "sso", "credentials"];
|
|
12
|
-
export
|
|
12
|
+
export type AuthnMethod = typeof supportedAuthnMethod[number];
|
|
13
13
|
export interface ConfigsOptions extends PrivateConfigsOptions {
|
|
14
14
|
email?: string;
|
|
15
15
|
backTo?: string;
|
|
@@ -20,58 +20,57 @@ export interface ConfigsOptions extends PrivateConfigsOptions {
|
|
|
20
20
|
forceLogout?: boolean;
|
|
21
21
|
authnMethod?: AuthnMethod;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
24
|
-
export
|
|
23
|
+
export type ConfigsOptionsWithoutIsNewTab = Omit<ConfigsOptions, 'isNewTab'>;
|
|
24
|
+
export type VaultViewServiceList = {
|
|
25
25
|
view: 'services-list';
|
|
26
26
|
group?: 'grouping_bank' | 'grouping_bank_credit_card' | 'grouping_bank_dc_card' | 'grouping_corporate_credit_card' | 'grouping_credit_card' | 'grouping_credit_coop' | 'grouping_credit_union' | 'grouping_dc_pension_plan' | 'grouping_debit_card' | 'grouping_digital_money' | 'grouping_ja_bank' | 'grouping_life_insurance' | 'grouping_point' | 'grouping_regional_bank' | 'grouping_stock' | 'grouping_testing';
|
|
27
27
|
type?: 'bank' | 'credit_card' | 'stored_value' | 'point' | 'corporate';
|
|
28
28
|
search?: string;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type VaultViewServiceConnection = {
|
|
31
31
|
view: 'service-connection';
|
|
32
32
|
entityKey: string;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type VaultViewConnectionSetting = {
|
|
35
35
|
view: 'connection-setting';
|
|
36
36
|
credentialId: string;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type VaultViewCustomerSupport = {
|
|
39
39
|
view: 'customer-support';
|
|
40
40
|
};
|
|
41
|
-
export
|
|
42
|
-
export
|
|
41
|
+
export type VaultServiceTypes = VaultViewServiceList | VaultViewServiceConnection | VaultViewConnectionSetting | VaultViewCustomerSupport;
|
|
42
|
+
export type MyAccountServiceTypes = {
|
|
43
43
|
view: LoginLinkTo;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
export
|
|
45
|
+
export type MyAccountOpenServiceOptions = ConfigsOptions | (ConfigsOptions & MyAccountServiceTypes);
|
|
46
|
+
export type MyAccountOpenServiceUrlOptions = ConfigsOptionsWithoutIsNewTab | (ConfigsOptionsWithoutIsNewTab & MyAccountServiceTypes);
|
|
47
|
+
export type VaultOpenServiceViewServiceList = ConfigsOptions & VaultViewServiceList;
|
|
48
|
+
export type VaultOpenServiceViewServiceConnection = ConfigsOptions & VaultViewServiceConnection;
|
|
49
|
+
export type VaultOpenServiceViewConnectionSetting = ConfigsOptions & VaultViewConnectionSetting;
|
|
50
|
+
export type VaultOpenServiceViewCustomerSupport = ConfigsOptions & VaultViewCustomerSupport;
|
|
51
|
+
export type VaultOpenServiceUrlViewServiceList = ConfigsOptionsWithoutIsNewTab & VaultViewServiceList;
|
|
52
|
+
export type VaultOpenServiceUrlViewServiceConnection = ConfigsOptionsWithoutIsNewTab & VaultViewServiceConnection;
|
|
53
|
+
export type VaultOpenServiceUrlViewConnectionSetting = ConfigsOptionsWithoutIsNewTab & VaultViewConnectionSetting;
|
|
54
|
+
export type VaultOpenServiceUrlViewCustomerSupport = ConfigsOptionsWithoutIsNewTab & VaultViewCustomerSupport;
|
|
55
|
+
export type LinkKitOpenServiceOptions = ConfigsOptions;
|
|
56
|
+
export type LinkKitOpenServiceUrlOptions = ConfigsOptionsWithoutIsNewTab;
|
|
57
|
+
export type OpenServiceOptions = MyAccountOpenServiceOptions | ConfigsOptions | VaultOpenServiceViewServiceList | VaultOpenServiceViewConnectionSetting | VaultOpenServiceViewCustomerSupport | LinkKitOpenServiceOptions;
|
|
58
|
+
export type OpenServiceUrlOptions = MyAccountOpenServiceUrlOptions | ConfigsOptionsWithoutIsNewTab | VaultOpenServiceUrlViewServiceList | VaultOpenServiceUrlViewConnectionSetting | VaultOpenServiceUrlViewCustomerSupport | LinkKitOpenServiceUrlOptions;
|
|
59
|
+
export type Scopes = string | string[];
|
|
60
60
|
interface AuthorizeConfigsOptions {
|
|
61
61
|
forceLogout?: boolean;
|
|
62
62
|
}
|
|
63
|
-
interface OAuthSharedParams {
|
|
63
|
+
export interface OAuthSharedParams {
|
|
64
64
|
state?: string;
|
|
65
65
|
redirectUri?: string;
|
|
66
66
|
}
|
|
67
67
|
export interface AuthorizeOptions extends OAuthSharedParams, ConfigsOptions, AuthorizeConfigsOptions {
|
|
68
68
|
scopes?: Scopes;
|
|
69
69
|
codeChallenge?: string;
|
|
70
|
-
pkce?: boolean;
|
|
71
70
|
}
|
|
72
|
-
export
|
|
73
|
-
export
|
|
74
|
-
export
|
|
71
|
+
export type AuthorizeUrlOptions = Omit<AuthorizeOptions, 'isNewTab'>;
|
|
72
|
+
export type Mode = 'production' | 'staging' | 'develop' | 'local';
|
|
73
|
+
export type InitOptions = Omit<Omit<AuthorizeOptions, 'forceLogout'>, 'codeChallenge'> & PrivateParams & {
|
|
75
74
|
mode?: Mode;
|
|
76
75
|
locale?: string;
|
|
77
76
|
};
|
|
@@ -83,12 +82,12 @@ export interface ExchangeTokenOptions extends OAuthSharedParams {
|
|
|
83
82
|
code?: string;
|
|
84
83
|
codeVerifier?: string;
|
|
85
84
|
}
|
|
86
|
-
export
|
|
87
|
-
export
|
|
88
|
-
export
|
|
89
|
-
export
|
|
90
|
-
export
|
|
91
|
-
export
|
|
85
|
+
export type LogoutOptions = ConfigsOptions;
|
|
86
|
+
export type LogoutUrlOptions = Omit<ConfigsOptions, 'isNewTab'>;
|
|
87
|
+
export type OnboardOptions = Omit<Omit<Omit<Omit<AuthorizeOptions, 'showAuthToggle'>, 'forceLogout'>, 'showRememberMe'>, 'authAction'>;
|
|
88
|
+
export type OnboardUrlOptions = Omit<OnboardOptions, 'isNewTab'>;
|
|
89
|
+
export type ServiceId = 'vault' | 'myaccount' | 'link-kit';
|
|
90
|
+
export type LoginLinkTo = 'settings' | 'settings/authorized-applications' | 'settings/change-language' | 'settings/email-preferences' | 'settings/delete-account' | 'settings/update-email' | 'settings/update-password';
|
|
92
91
|
export interface RequestLoginLinkOptions extends ConfigsOptions {
|
|
93
92
|
loginLinkTo?: LoginLinkTo;
|
|
94
93
|
}
|
|
@@ -111,4 +110,13 @@ export interface TokenInfo {
|
|
|
111
110
|
lang: string;
|
|
112
111
|
};
|
|
113
112
|
}
|
|
113
|
+
export interface Token {
|
|
114
|
+
access_token: string;
|
|
115
|
+
refresh_token: string;
|
|
116
|
+
token_type: string;
|
|
117
|
+
created_at: number;
|
|
118
|
+
expires_in: number;
|
|
119
|
+
scope: string;
|
|
120
|
+
resource_server: string;
|
|
121
|
+
}
|
|
114
122
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneytree/mt-link-javascript-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Moneytree Link JavaScript SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -10,23 +10,28 @@
|
|
|
10
10
|
"author": "Moneytree",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "rm -rf dist && webpack",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
13
|
+
"build": "rm -rf dist && NODE_OPTIONS=--openssl-legacy-provider webpack",
|
|
14
|
+
"build:docs": "rm -rf docs/types && typedoc --out docs/types src",
|
|
15
|
+
"prepareRelease": "npm run build && git add dist && npm run build:docs && git add docs",
|
|
16
|
+
"createChangelog": "conventional-changelog -i CHANGELOG.md -s && git add CHANGELOG.md",
|
|
16
17
|
"version": "npm run prepareRelease && npm run createChangelog",
|
|
17
18
|
"test": "jest --no-cache",
|
|
18
19
|
"lint:js": "eslint '**/*.js'",
|
|
19
20
|
"lint:ts": "eslint -c './.eslintrc-ts.js' '**/*.ts'",
|
|
20
21
|
"lint": "yarn lint:js; yarn lint:ts",
|
|
22
|
+
"format": "prettier scripts src sample/src --write",
|
|
23
|
+
"spellcheck": "cspell src script sample/src",
|
|
21
24
|
"lint:fix": "yarn lint:js --fix; yarn lint:ts --fix",
|
|
22
25
|
"start:docs": "docsify serve docs",
|
|
23
26
|
"prepare": "husky install"
|
|
24
27
|
},
|
|
25
28
|
"dependencies": {
|
|
26
29
|
"crypto-browserify": "^3.12.0",
|
|
30
|
+
"cspell": "^7.3.7",
|
|
27
31
|
"node-fetch": "^2.6.1",
|
|
28
32
|
"qs": "^6.10.1",
|
|
29
33
|
"snake-case": "^3.0.4",
|
|
34
|
+
"typedoc": "^0.25.1",
|
|
30
35
|
"url-safe-base64": "^1.1.1"
|
|
31
36
|
},
|
|
32
37
|
"devDependencies": {
|