taxtank-core 2.0.110 → 2.0.111
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/fesm2022/taxtank-core.mjs +21 -25
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/index.d.ts +7 -12
- package/package.json +1 -1
|
@@ -32,12 +32,12 @@ import moment$1 from 'moment/moment';
|
|
|
32
32
|
import { EventSourcePolyfill } from 'event-source-polyfill/src/eventsource.min.js';
|
|
33
33
|
import clone from 'lodash/clone';
|
|
34
34
|
import merge from 'lodash/merge';
|
|
35
|
+
import remove from 'lodash/remove';
|
|
35
36
|
import mixpanel from 'mixpanel-browser';
|
|
36
37
|
import { JwtHelperService } from '@auth0/angular-jwt';
|
|
37
38
|
import * as i4 from '@angular/router';
|
|
38
39
|
import { NavigationEnd } from '@angular/router';
|
|
39
40
|
import _ from 'lodash';
|
|
40
|
-
import remove from 'lodash/remove';
|
|
41
41
|
import pick from 'lodash/pick';
|
|
42
42
|
import { checkAdBlock } from 'adblock-checker';
|
|
43
43
|
import { jsPDF } from 'jspdf';
|
|
@@ -755,10 +755,6 @@ class BasiqToken extends AbstractModel {
|
|
|
755
755
|
}
|
|
756
756
|
|
|
757
757
|
class BasiqUser extends AbstractModel {
|
|
758
|
-
constructor() {
|
|
759
|
-
super(...arguments);
|
|
760
|
-
this.name = 'Profile1';
|
|
761
|
-
}
|
|
762
758
|
/**
|
|
763
759
|
* reminder to sign basiq consent after x days before the expiration
|
|
764
760
|
*/
|
|
@@ -12595,6 +12591,9 @@ let RestService$1 = class RestService extends DataService {
|
|
|
12595
12591
|
hasInCache(id) {
|
|
12596
12592
|
return !!this.getCache()?.findBy('id', id);
|
|
12597
12593
|
}
|
|
12594
|
+
fromCache(id) {
|
|
12595
|
+
return this.getCache()?.findBy('id', id);
|
|
12596
|
+
}
|
|
12598
12597
|
getArray() {
|
|
12599
12598
|
return this.get().pipe(map((collection) => collection.toArray()));
|
|
12600
12599
|
}
|
|
@@ -13055,6 +13054,12 @@ class BankConnectionService extends RestService$1 {
|
|
|
13055
13054
|
break;
|
|
13056
13055
|
}
|
|
13057
13056
|
}
|
|
13057
|
+
//
|
|
13058
|
+
const connection = this.fromCache(result.id);
|
|
13059
|
+
if (connection.isReconnecting()) {
|
|
13060
|
+
remove(this.cache.items, { id: result.id, status: BankConnectionStatusEnum.RECONNECTING });
|
|
13061
|
+
this.setCache(this.cache.items, true);
|
|
13062
|
+
}
|
|
13058
13063
|
return result;
|
|
13059
13064
|
}), catchError((error) => {
|
|
13060
13065
|
// Show error when user provided wrong login data
|
|
@@ -13071,6 +13076,13 @@ class BankConnectionService extends RestService$1 {
|
|
|
13071
13076
|
return throwError(error);
|
|
13072
13077
|
}));
|
|
13073
13078
|
}
|
|
13079
|
+
/**
|
|
13080
|
+
* remove basiq connection to create a new one (because basiq has no update option),
|
|
13081
|
+
* used for upgrade to openBanking and manage shared bank accounts flow
|
|
13082
|
+
*/
|
|
13083
|
+
deleteBasiq(connection) {
|
|
13084
|
+
return this.put(connection, `${this.apiUrl}/${connection.id}/remove-basiq`);
|
|
13085
|
+
}
|
|
13074
13086
|
activate(bankConnection) {
|
|
13075
13087
|
return this.put(bankConnection, `${this.apiUrl}/${bankConnection.id}/activate`);
|
|
13076
13088
|
}
|
|
@@ -13236,17 +13248,6 @@ class BasiqService extends RestService$1 {
|
|
|
13236
13248
|
listenEvents() {
|
|
13237
13249
|
this.listenNotifications();
|
|
13238
13250
|
}
|
|
13239
|
-
/**
|
|
13240
|
-
* remove basiq connection to create a new one (because basiq has no update option),
|
|
13241
|
-
* used for upgrade to openBanking and manage shared bank accounts flow
|
|
13242
|
-
*/
|
|
13243
|
-
deleteBasiq(connection) {
|
|
13244
|
-
return this.http.put(`${this.environment.apiV2}/bank-connections/${connection.id}/remove-basiq`, {})
|
|
13245
|
-
.pipe(map((connection) => connection
|
|
13246
|
-
// @TODO Alex token should be inside this service
|
|
13247
|
-
// this.redirectToBasiqConsent(token.value, connection.bank.externalId, true);
|
|
13248
|
-
));
|
|
13249
|
-
}
|
|
13250
13251
|
/**
|
|
13251
13252
|
* listen to notifications to update basiq accounts list
|
|
13252
13253
|
*/
|
|
@@ -13310,21 +13311,15 @@ class BasiqUserService extends RestService$1 {
|
|
|
13310
13311
|
const url = new URL(BasiqUserService.basiqConsentUrl);
|
|
13311
13312
|
url.searchParams.set('token', token.value);
|
|
13312
13313
|
url.searchParams.set('institutionId', bankId);
|
|
13313
|
-
|
|
13314
|
+
// @TODO TT-4883 vik state not coming from basiq
|
|
13315
|
+
localStorage.setItem('basiqUserId', user.id);
|
|
13316
|
+
// url.searchParams.set('state', user.id);
|
|
13314
13317
|
if (user.consentId) {
|
|
13315
13318
|
url.searchParams.set('action', 'connect');
|
|
13316
13319
|
}
|
|
13317
13320
|
window.location.replace(url.toString());
|
|
13318
13321
|
}));
|
|
13319
13322
|
}
|
|
13320
|
-
/**
|
|
13321
|
-
* Open basiq consent ui to allow user to manage basiq access to his bank data
|
|
13322
|
-
*/
|
|
13323
|
-
redirectToBasiqRevoke(basiqUserId) {
|
|
13324
|
-
return this.basiqTokenService.getOne(basiqUserId).pipe(map(token => {
|
|
13325
|
-
window.location.replace(`${BasiqUserService.basiqConsentUrl}?token=${token.value}&action=manage`);
|
|
13326
|
-
}));
|
|
13327
|
-
}
|
|
13328
13323
|
/**
|
|
13329
13324
|
* redirect to basiq extend consent date to prolong it
|
|
13330
13325
|
*/
|
|
@@ -22027,6 +22022,7 @@ const ENDPOINTS = {
|
|
|
22027
22022
|
BASIQ_TOKENS_GET: new Endpoint('GET', '\\/basiq-users\\/tokens'),
|
|
22028
22023
|
BASIQ_TOKEN_GET: new Endpoint('GET', '\\/basiq-users/\\d+\\/tokens'),
|
|
22029
22024
|
BASIQ_DELETE: new Endpoint('PUT', '\\/bank-connections/\\d+\\/remove-basiq'),
|
|
22025
|
+
BASIQ_CONSENT_REVOKE: new Endpoint('PUT', '\\/basiq-users\\/\\consents\\/revoke'),
|
|
22030
22026
|
BASIQ_USERS_GET: new Endpoint('GET', '\\/basiq-users'),
|
|
22031
22027
|
BASIQ_USERS_POST: new Endpoint('POST', '\\/basiq-users'),
|
|
22032
22028
|
BASIQ_USERS_PUT: new Endpoint('PUT', '\\/basiq-users\\/\\d+'),
|