taxtank-core 0.33.29 → 0.33.30
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/services/http/user/user-messages.enum.mjs +2 -1
- package/esm2022/src/lib/services/http/user/user.service.mjs +8 -1
- package/fesm2022/taxtank-core.mjs +8 -0
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/services/http/user/user-messages.enum.d.ts +2 -1
- package/src/lib/services/http/user/user.service.d.ts +1 -0
@@ -3,5 +3,6 @@ export var UserMessagesEnum;
|
|
3
3
|
UserMessagesEnum["PHOTO_UPDATED"] = "Profile photo updated";
|
4
4
|
UserMessagesEnum["USER_DATA_UPDATED"] = "Data was successfully updated!";
|
5
5
|
UserMessagesEnum["CLIENT_DETAILS_UPDATED"] = "Client details updated";
|
6
|
+
UserMessagesEnum["DELETE"] = "Closing your account will mean you won't be able to access this account again. It will also revoke consent for all banks and delete all transaction data. This can not be undone.";
|
6
7
|
})(UserMessagesEnum || (UserMessagesEnum = {}));
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1tZXNzYWdlcy5lbnVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL3NlcnZpY2VzL2h0dHAvdXNlci91c2VyLW1lc3NhZ2VzLmVudW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksZ0JBS1g7QUFMRCxXQUFZLGdCQUFnQjtJQUMxQiwyREFBdUMsQ0FBQTtJQUN2Qyx3RUFBb0QsQ0FBQTtJQUNwRCxxRUFBaUQsQ0FBQTtJQUNqRCxnTkFBNEwsQ0FBQTtBQUM5TCxDQUFDLEVBTFcsZ0JBQWdCLEtBQWhCLGdCQUFnQixRQUszQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIFVzZXJNZXNzYWdlc0VudW0ge1xuICBQSE9UT19VUERBVEVEID0gJ1Byb2ZpbGUgcGhvdG8gdXBkYXRlZCcsXG4gIFVTRVJfREFUQV9VUERBVEVEID0gJ0RhdGEgd2FzIHN1Y2Nlc3NmdWxseSB1cGRhdGVkIScsXG4gIENMSUVOVF9ERVRBSUxTX1VQREFURUQgPSAnQ2xpZW50IGRldGFpbHMgdXBkYXRlZCcsXG4gIERFTEVURSA9IGBDbG9zaW5nIHlvdXIgYWNjb3VudCB3aWxsIG1lYW4geW91IHdvbid0IGJlIGFibGUgdG8gYWNjZXNzIHRoaXMgYWNjb3VudCBhZ2Fpbi4gSXQgd2lsbCBhbHNvIHJldm9rZSBjb25zZW50IGZvciBhbGwgYmFua3MgYW5kIGRlbGV0ZSBhbGwgdHJhbnNhY3Rpb24gZGF0YS4gVGhpcyBjYW4gbm90IGJlIHVuZG9uZS5gXG59XG4iXX0=
|
@@ -62,6 +62,13 @@ export class UserService extends RestService {
|
|
62
62
|
finishOnboarding(user) {
|
63
63
|
return this.put(user, `${this.apiUrl}/status`);
|
64
64
|
}
|
65
|
+
deactivate(user) {
|
66
|
+
return this.put(user, `${this.apiUrl}/${user.id}/delete`).pipe(map((user) => {
|
67
|
+
localStorage.clear();
|
68
|
+
location.replace('/login');
|
69
|
+
return user;
|
70
|
+
}));
|
71
|
+
}
|
65
72
|
updatePhoto(photo) {
|
66
73
|
return this.http.post(`${this.apiUrl}/photo?_method=PUT`, photo).pipe(map((photoUrl) => {
|
67
74
|
this.setCache([Object.assign(this.getCacheFirst(), { photo: photoUrl })], true);
|
@@ -102,4 +109,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
102
109
|
type: Inject,
|
103
110
|
args: ['environment']
|
104
111
|
}] }] });
|
105
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNl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G4gICAgICAgIHRoaXMucmVmcmVzaENhY2hlKCk7XG4gICAgICB9LCAyMDAwKTtcbiAgICB9LCBbJ3Bvc3QnLCAncHV0J10pO1xuICB9XG59XG4iXX0=
|
@@ -15841,6 +15841,7 @@ var UserMessagesEnum;
|
|
15841
15841
|
UserMessagesEnum["PHOTO_UPDATED"] = "Profile photo updated";
|
15842
15842
|
UserMessagesEnum["USER_DATA_UPDATED"] = "Data was successfully updated!";
|
15843
15843
|
UserMessagesEnum["CLIENT_DETAILS_UPDATED"] = "Client details updated";
|
15844
|
+
UserMessagesEnum["DELETE"] = "Closing your account will mean you won't be able to access this account again. It will also revoke consent for all banks and delete all transaction data. This can not be undone.";
|
15844
15845
|
})(UserMessagesEnum || (UserMessagesEnum = {}));
|
15845
15846
|
|
15846
15847
|
/**
|
@@ -15918,6 +15919,13 @@ class UserService extends RestService$1 {
|
|
15918
15919
|
finishOnboarding(user) {
|
15919
15920
|
return this.put(user, `${this.apiUrl}/status`);
|
15920
15921
|
}
|
15922
|
+
deactivate(user) {
|
15923
|
+
return this.put(user, `${this.apiUrl}/${user.id}/delete`).pipe(map((user) => {
|
15924
|
+
localStorage.clear();
|
15925
|
+
location.replace('/login');
|
15926
|
+
return user;
|
15927
|
+
}));
|
15928
|
+
}
|
15921
15929
|
updatePhoto(photo) {
|
15922
15930
|
return this.http.post(`${this.apiUrl}/photo?_method=PUT`, photo).pipe(map((photoUrl) => {
|
15923
15931
|
this.setCache([Object.assign(this.getCacheFirst(), { photo: photoUrl })], true);
|