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/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/src/app-gocardless/bank-factory.js b/src/app-gocardless/bank-factory.js index a2c88eaa9..9c0e04f74 100644 --- a/src/app-gocardless/bank-factory.js +++ b/src/app-gocardless/bank-factory.js @@ -10,6 +10,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'; @@ -43,6 +44,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/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/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 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/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"