wealthica-sdk-js 0.0.19 → 0.0.21

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
@@ -165,7 +165,7 @@ token = await user.getToken(); // fetches and returns a new token
165
165
  token = await user.getToken({ minimumLifeTime: 600 }); // fetches and returns another new token
166
166
  ```
167
167
 
168
- #### user.getConnectData({ provider, redirectURI, state, lang, theme, providersPerLine, webhookURI })
168
+ #### user.getConnectData({ provider, redirectURI, state, lang, theme, providersPerLine, disabledProviders, webhookURI })
169
169
 
170
170
  This method returns a Wealthica Connect URL and authentication token for user to connect an institution.
171
171
 
@@ -188,6 +188,7 @@ const { url, token } = await user.getConnectData({
188
188
  state: 'YOUR_APP_STATE', // optional
189
189
  lang: 'en', // optional (en | es | fr | it), 'en' by default
190
190
  providers: ['wise', 'stockchase'], // optional, ignored if `provider` is also passed in.
191
+ disabledProviders: ['questrade', 'wealthsimple'], // optional, exclude specific providers from the list.
191
192
  providerGroups: ['core', 'thirdparty'], // optional, ['core'] by default
192
193
  theme: 'light', // optional (light | dark), 'light' by default
193
194
  providersPerLine: 1, // optional (1 | 2), 2 by default
@@ -228,7 +229,7 @@ const user2 = wealthica.login('USER_ID_2');
228
229
  const { url: url2, token } = await user2.getConnectData();
229
230
  ```
230
231
 
231
- #### user.connect({ provider, providers, institutionId, lang, theme, providersPerLine, features, origin, webhookURI })
232
+ #### user.connect({ provider, providers, disabledProviders, institutionId, lang, theme, providersPerLine, features, origin, webhookURI })
232
233
 
233
234
  This method starts the Wealthica Connect process inside your webpage/app for user to connect their institution.
234
235
 
@@ -17,7 +17,8 @@ interface APIInterface {
17
17
  getTeam(): string;
18
18
  getConnectData(options: ConnectDataOptions): Promise<ConnectData>
19
19
  connect(options?: ConnectDataOptions): APIInterface
20
- reconnect(institutionId: string, options: ConnectDataOptions): APIUserInterface
20
+ reconnect(institutionId: string, options?: ConnectDataOptions): APIInterface
21
+ verifyMfa(institutionId: string, options?: ConnectDataOptions): APIInterface
21
22
  onConnection(callback: Function): APIInterface
22
23
  onError(callback: Function): APIInterface
23
24
  onEvent(callback: Function): APIInterface
@@ -88,13 +89,15 @@ type TokenOptions = {
88
89
  }
89
90
 
90
91
  type ConnectDataOptions = {
91
- provider: string;
92
- institutionId: string;
93
- state: string;
92
+ provider?: string;
93
+ institutionId?: string;
94
+ connectionRoute?: string;
95
+ state?: string;
94
96
  origin: string | undefined;
95
97
  lang: string;
96
98
  redirectURI: string;
97
99
  providers: Array<string> | undefined;
100
+ disabledProviders: Array<string> | undefined;
98
101
  providerGroups: Array<string> | undefined;
99
102
  theme: string;
100
103
  providersPerLine: number | string;
@@ -17,7 +17,8 @@ interface APIInterface {
17
17
  getTeam(): string;
18
18
  getConnectData(options: ConnectDataOptions): Promise<ConnectData>
19
19
  connect(options?: ConnectDataOptions): APIInterface
20
- reconnect(institutionId: string, options: ConnectDataOptions): APIUserInterface
20
+ reconnect(institutionId: string, options?: ConnectDataOptions): APIInterface
21
+ verifyMfa(institutionId: string, options?: ConnectDataOptions): APIInterface
21
22
  onConnection(callback: Function): APIInterface
22
23
  onError(callback: Function): APIInterface
23
24
  onEvent(callback: Function): APIInterface
@@ -88,13 +89,15 @@ type TokenOptions = {
88
89
  }
89
90
 
90
91
  type ConnectDataOptions = {
91
- provider: string;
92
- institutionId: string;
93
- state: string;
92
+ provider?: string;
93
+ institutionId?: string;
94
+ connectionRoute?: string;
95
+ state?: string;
94
96
  origin: string | undefined;
95
97
  lang: string;
96
98
  redirectURI: string;
97
99
  providers: Array<string> | undefined;
100
+ disabledProviders: Array<string> | undefined;
98
101
  providerGroups: Array<string> | undefined;
99
102
  theme: string;
100
103
  providersPerLine: number | string;