From d3a7b6228ac273f8ae6f5f6b1fe5d0f919308239 Mon Sep 17 00:00:00 2001 From: Froghut Date: Tue, 3 Dec 2024 18:53:00 +0100 Subject: [PATCH 1/4] Fix gocardless bank "Hanseatic Bank" (access_valid_for_days max 89) (#514) * Add support for "Hanseatic Bank" (access_valid_for_days max 89) * add PR changelog file * fix line endings + author format * make linter happy * make linter happy * use alphabetical order for import and banks list --- src/app-gocardless/bank-factory.js | 2 ++ src/app-gocardless/banks/HANSEATIC_HSTBDEHH.js | 10 ++++++++++ upcoming-release-notes/514.md | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 src/app-gocardless/banks/HANSEATIC_HSTBDEHH.js create mode 100644 upcoming-release-notes/514.md diff --git a/src/app-gocardless/bank-factory.js b/src/app-gocardless/bank-factory.js index c368b94fe..aaa4f9304 100644 --- a/src/app-gocardless/bank-factory.js +++ b/src/app-gocardless/bank-factory.js @@ -9,6 +9,7 @@ import CBCcregbebb from './banks/cbc_cregbebb.js'; import DanskeBankDabNO22 from './banks/danskebank-dabno22.js'; import EasybankBawaatww from './banks/easybank-bawaatww.js'; import Fortuneo from './banks/FORTUNEO_FTNOFRP1XXX.js'; +import HanseaticBank from './banks/HANSEATIC_HSTBDEHH.js'; import IngIngbrobu from './banks/ing-ingbrobu.js'; import IngIngddeff from './banks/ing-ingddeff.js'; import IngPlIngbplpw from './banks/ing-pl-ingbplpw.js'; @@ -41,6 +42,7 @@ export const banks = [ DanskeBankDabNO22, EasybankBawaatww, Fortuneo, + HanseaticBank, IngIngbrobu, IngIngddeff, IngPlIngbplpw, diff --git a/src/app-gocardless/banks/HANSEATIC_HSTBDEHH.js b/src/app-gocardless/banks/HANSEATIC_HSTBDEHH.js new file mode 100644 index 000000000..143f92bf4 --- /dev/null +++ b/src/app-gocardless/banks/HANSEATIC_HSTBDEHH.js @@ -0,0 +1,10 @@ +import Fallback from './integration-bank.js'; + +/** @type {import('./bank.interface.js').IBank} */ +export default { + ...Fallback, + + institutionIds: ['HANSEATIC_HSTBDEHH'], + + accessValidForDays: 89, +}; diff --git a/upcoming-release-notes/514.md b/upcoming-release-notes/514.md new file mode 100644 index 000000000..6d47d90ae --- /dev/null +++ b/upcoming-release-notes/514.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [Froghut] +--- + +Fix gocardless bank "Hanseatic Bank" \ No newline at end of file From 39dbdc04183e387699bb8a2c723551f317348bd7 Mon Sep 17 00:00:00 2001 From: Matt Fiddaman Date: Fri, 6 Dec 2024 16:39:22 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=94=96=20(24.12.0)=20(#515)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * bump version * Remove used release notes * bump web version --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- package.json | 4 ++-- upcoming-release-notes/479.md | 6 ------ upcoming-release-notes/484.md | 6 ------ upcoming-release-notes/485.md | 6 ------ upcoming-release-notes/490.md | 6 ------ upcoming-release-notes/493.md | 6 ------ upcoming-release-notes/494.md | 6 ------ upcoming-release-notes/497.md | 6 ------ upcoming-release-notes/498.md | 6 ------ upcoming-release-notes/504.md | 6 ------ upcoming-release-notes/507.md | 6 ------ upcoming-release-notes/511.md | 6 ------ upcoming-release-notes/514.md | 6 ------ 13 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 upcoming-release-notes/479.md delete mode 100644 upcoming-release-notes/484.md delete mode 100644 upcoming-release-notes/485.md delete mode 100644 upcoming-release-notes/490.md delete mode 100644 upcoming-release-notes/493.md delete mode 100644 upcoming-release-notes/494.md delete mode 100644 upcoming-release-notes/497.md delete mode 100644 upcoming-release-notes/498.md delete mode 100644 upcoming-release-notes/504.md delete mode 100644 upcoming-release-notes/507.md delete mode 100644 upcoming-release-notes/511.md delete mode 100644 upcoming-release-notes/514.md diff --git a/package.json b/package.json index 46e1018c6..db9107182 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "actual-sync", - "version": "24.11.0", + "version": "24.12.0", "license": "MIT", "description": "actual syncing server", "type": "module", @@ -21,7 +21,7 @@ }, "dependencies": { "@actual-app/crdt": "2.1.0", - "@actual-app/web": "24.11.0", + "@actual-app/web": "24.12.0", "bcrypt": "^5.1.1", "better-sqlite3": "^9.6.0", "body-parser": "^1.20.3", diff --git a/upcoming-release-notes/479.md b/upcoming-release-notes/479.md deleted file mode 100644 index 17fd70b70..000000000 --- a/upcoming-release-notes/479.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Maintenance -authors: [rare-magma] ---- - -Updates the docker images base version and set node_env env variable to production diff --git a/upcoming-release-notes/484.md b/upcoming-release-notes/484.md deleted file mode 100644 index 2d7c9e07c..000000000 --- a/upcoming-release-notes/484.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [matt-fidd] ---- - -Add support for `1822-DIREKT-HELADEF1822` transaction information diff --git a/upcoming-release-notes/485.md b/upcoming-release-notes/485.md deleted file mode 100644 index 3fd1ff078..000000000 --- a/upcoming-release-notes/485.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [psybers] ---- - -Check if SimpleFIN accessKey is in the correct format. diff --git a/upcoming-release-notes/490.md b/upcoming-release-notes/490.md deleted file mode 100644 index 850e6140a..000000000 --- a/upcoming-release-notes/490.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [dmednis] ---- - -Add support for "SWEDBANK_HABALV22" transaction date \ No newline at end of file diff --git a/upcoming-release-notes/493.md b/upcoming-release-notes/493.md deleted file mode 100644 index b8767a9a7..000000000 --- a/upcoming-release-notes/493.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [matt-fidd] ---- - -GoCardless: `ING_PL_INGBPLPW` should prefer valueDate over bookingDate diff --git a/upcoming-release-notes/494.md b/upcoming-release-notes/494.md deleted file mode 100644 index 9efdee05c..000000000 --- a/upcoming-release-notes/494.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [matt-fidd] ---- - -Prefer using the SimpleFin pending flag to set cleared status diff --git a/upcoming-release-notes/497.md b/upcoming-release-notes/497.md deleted file mode 100644 index 0836318c8..000000000 --- a/upcoming-release-notes/497.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Enhancements -authors: [dmednis] ---- - -Improve support for "SWEDBANK_HABALV22" transaction date & enrich creditor name for pending transactions \ No newline at end of file diff --git a/upcoming-release-notes/498.md b/upcoming-release-notes/498.md deleted file mode 100644 index e1b8c807d..000000000 --- a/upcoming-release-notes/498.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Features -authors: [apilat, lelemm] ---- - -Add support for authentication using OpenID Connect. diff --git a/upcoming-release-notes/504.md b/upcoming-release-notes/504.md deleted file mode 100644 index 5f3364eba..000000000 --- a/upcoming-release-notes/504.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [matt-fidd] ---- - -Fix bug in batch SimpleFIN startDate logic diff --git a/upcoming-release-notes/507.md b/upcoming-release-notes/507.md deleted file mode 100644 index 32961ec26..000000000 --- a/upcoming-release-notes/507.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [lelemm] ---- - -Fixed bug where the openid migration was removing access for users diff --git a/upcoming-release-notes/511.md b/upcoming-release-notes/511.md deleted file mode 100644 index 9a248c527..000000000 --- a/upcoming-release-notes/511.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [guglicap] ---- - -Fixed Hype Bank sync diff --git a/upcoming-release-notes/514.md b/upcoming-release-notes/514.md deleted file mode 100644 index 6d47d90ae..000000000 --- a/upcoming-release-notes/514.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -category: Bugfix -authors: [Froghut] ---- - -Fix gocardless bank "Hanseatic Bank" \ No newline at end of file From df958eb35c9e815a438354ad15a044d9fe272512 Mon Sep 17 00:00:00 2001 From: Matt Fiddaman Date: Fri, 6 Dec 2024 17:55:52 +0000 Subject: [PATCH 3/4] update yarn.lock (#520) --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7b315598e..062e31e1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,10 +16,10 @@ __metadata: languageName: node linkType: hard -"@actual-app/web@npm:24.11.0": - version: 24.11.0 - resolution: "@actual-app/web@npm:24.11.0" - checksum: 10c0/d6a49d3a2c0539dd41c1caef917f1afa48584af0746ca9f8db3b76fa8c154c081277818bf6a0ec85aeb9d724d3eb4132c13217e6a0725dd730992b57d9e57e97 +"@actual-app/web@npm:24.12.0": + version: 24.12.0 + resolution: "@actual-app/web@npm:24.12.0" + checksum: 10c0/865fd5898e8da6347759a65d557047b80cd0c4162601fd4f57eccd1d84289d84c9f2fe563a4b4547dc2f67353042fb94a6e9c0cb13cacfda0547f84aaba73ef6 languageName: node linkType: hard @@ -1531,7 +1531,7 @@ __metadata: resolution: "actual-sync@workspace:." dependencies: "@actual-app/crdt": "npm:2.1.0" - "@actual-app/web": "npm:24.11.0" + "@actual-app/web": "npm:24.12.0" "@babel/preset-typescript": "npm:^7.20.2" "@types/bcrypt": "npm:^5.0.2" "@types/better-sqlite3": "npm:^7.6.7" From 645958bbeb25c9feadd7d95e58a05b501b3e6a1e Mon Sep 17 00:00:00 2001 From: Matt Fiddaman Date: Fri, 6 Dec 2024 21:29:26 +0000 Subject: [PATCH 4/4] Return GoCardless rate limit information on error (#509) --- src/app-gocardless/app-gocardless.js | 13 ++++++++++++- upcoming-release-notes/509.md | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/509.md diff --git a/src/app-gocardless/app-gocardless.js b/src/app-gocardless/app-gocardless.js index cabeffcd6..b076a91b5 100644 --- a/src/app-gocardless/app-gocardless.js +++ b/src/app-gocardless/app-gocardless.js @@ -201,8 +201,19 @@ app.post( }); } } catch (error) { + const headers = error.details?.response?.headers ?? {}; + + const rateLimitHeaders = Object.fromEntries( + Object.entries(headers).filter(([key]) => + key.startsWith('http_x_ratelimit'), + ), + ); + const sendErrorResponse = (data) => - res.send({ status: 'ok', data: { ...data, details: error.details } }); + res.send({ + status: 'ok', + data: { ...data, details: error.details, rateLimitHeaders }, + }); switch (true) { case error instanceof RequisitionNotLinked: diff --git a/upcoming-release-notes/509.md b/upcoming-release-notes/509.md new file mode 100644 index 000000000..91e2afe47 --- /dev/null +++ b/upcoming-release-notes/509.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [matt-fidd] +--- + +Add more logging for GoCardless rate limit information