wealthica-sdk-js 0.0.18 → 0.0.20
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 +43 -0
- package/dist/wealthica.d.ts +10 -4
- package/dist/wealthica.es5.d.ts +10 -4
- package/dist/wealthica.es5.js +23560 -23046
- package/dist/wealthica.js +23560 -23046
- package/dist/wealthica.min.d.ts +10 -4
- package/dist/wealthica.min.js +8 -6
- package/dist/wealthica.min.js.map +1 -1
- package/lib/wealthica.d.ts +10 -4
- package/lib/wealthica.js +8407 -5459
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -272,6 +272,49 @@ user.reconnect('INSTITUTION_ID', {
|
|
|
272
272
|
});
|
|
273
273
|
```
|
|
274
274
|
|
|
275
|
+
### Feature Flags
|
|
276
|
+
|
|
277
|
+
The `features` parameter accepts a comma-separated list of feature flags to enable specific behaviors in the Connect widget.
|
|
278
|
+
|
|
279
|
+
#### Available Feature Flags
|
|
280
|
+
|
|
281
|
+
**`quick_retry`** *(Available from v0.0.19+)*
|
|
282
|
+
|
|
283
|
+
Enables a quick retry option when temporary connection failures occur (e.g., timeout, temporary API issues).
|
|
284
|
+
|
|
285
|
+
- **Default:** Disabled
|
|
286
|
+
- **Behavior:** When enabled, users see a retry button instead of automatic widget closure after temporary failures
|
|
287
|
+
- **Retry Limit:** One retry attempt per session
|
|
288
|
+
|
|
289
|
+
**Usage Example:**
|
|
290
|
+
|
|
291
|
+
```javascript
|
|
292
|
+
// Enable quick retry feature
|
|
293
|
+
user.connect({
|
|
294
|
+
provider: 'td',
|
|
295
|
+
features: 'quick_retry',
|
|
296
|
+
// ... other options
|
|
297
|
+
}).onConnection((institution) => {
|
|
298
|
+
console.log('Connected:', institution);
|
|
299
|
+
}).onError((error) => {
|
|
300
|
+
console.error('Error:', error);
|
|
301
|
+
}).onEvent((name, data) => {
|
|
302
|
+
// Listen for retry events
|
|
303
|
+
if (name === 'RETRY_ATTEMPT') {
|
|
304
|
+
console.log('User is retrying connection');
|
|
305
|
+
}
|
|
306
|
+
if (name === 'RETRY_DECLINED') {
|
|
307
|
+
console.log('User declined to retry');
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// Enable multiple features
|
|
312
|
+
user.connect({
|
|
313
|
+
features: 'quick_retry,another_feature',
|
|
314
|
+
// ... other options
|
|
315
|
+
});
|
|
316
|
+
```
|
|
317
|
+
|
|
275
318
|
### User APIs
|
|
276
319
|
|
|
277
320
|
These methods return user data and thus require a Wealthica Connect SDK User instance. They automatically fetch a new token if necessary so you would not be bothered with tokens logic.
|
package/dist/wealthica.d.ts
CHANGED
|
@@ -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
|
|
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,14 +89,19 @@ type TokenOptions = {
|
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
type ConnectDataOptions = {
|
|
91
|
-
provider
|
|
92
|
-
institutionId
|
|
93
|
-
|
|
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;
|
|
98
100
|
providerGroups: Array<string> | undefined;
|
|
101
|
+
theme: string;
|
|
102
|
+
providersPerLine: number | string;
|
|
103
|
+
features: string;
|
|
104
|
+
webhookURI: string;
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
type ConnectData = {
|
package/dist/wealthica.es5.d.ts
CHANGED
|
@@ -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
|
|
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,14 +89,19 @@ type TokenOptions = {
|
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
type ConnectDataOptions = {
|
|
91
|
-
provider
|
|
92
|
-
institutionId
|
|
93
|
-
|
|
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;
|
|
98
100
|
providerGroups: Array<string> | undefined;
|
|
101
|
+
theme: string;
|
|
102
|
+
providersPerLine: number | string;
|
|
103
|
+
features: string;
|
|
104
|
+
webhookURI: string;
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
type ConnectData = {
|