diff --git a/README.md b/README.md index da9c2fe8..a6edd3bb 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,7 @@ To initialise the client, you must provide: - Any additional options (see [here](#available-client-options) for a list of supported options). ```js -import gocardless from 'gocardless-nodejs'; -import { Environments } from 'gocardless-nodejs/constants'; +import gocardless, { Environments } from 'gocardless-nodejs'; // Initialize the client const client = gocardless( @@ -39,9 +38,7 @@ const client = gocardless( TypeScript: ```typescript -import gocardless, { GoCardlessClient } from 'gocardless-nodejs'; -import { Environments } from 'gocardless-nodejs/constants'; -import type { Payment } from 'gocardless-nodejs/types'; +import gocardless, { GoCardlessClient, Environments, Payment } from 'gocardless-nodejs'; const client: GoCardlessClient = gocardless( process.env.GC_ACCESS_TOKEN, @@ -111,7 +108,7 @@ We provide a CommonJS implementation for backwards compatibility. For CommonJS, ```js const gocardless = require('gocardless-nodejs'); -const { Environments } = require('gocardless-nodejs/constants'); +const { Environments } = require('gocardless-nodejs'); ``` ## Upgrading from older versions diff --git a/jest.config.js b/jest.config.js index 14bfb585..2253a104 100644 --- a/jest.config.js +++ b/jest.config.js @@ -15,5 +15,14 @@ export default { }, }, ], + '^.+\\.js$': [ + 'ts-jest', + { + useESM: true, + }, + ], }, + transformIgnorePatterns: [ + 'node_modules/(?!uuid)', + ], }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d8617d60..cbcead1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,17 @@ { "name": "gocardless-nodejs", - "version": "8.1.0", + "version": "8.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gocardless-nodejs", - "version": "8.1.0", + "version": "8.2.0", "license": "MIT", "dependencies": { - "buffer-equal-constant-time": "1.0.1", "got": "^11.8.6", - "lodash": "^4.17.21", "qs": "^6.14.0", - "uuid": "^11.1.0" + "uuid": "^14.0.0" }, "devDependencies": { "@types/jest": "^30.0.0", @@ -51,9 +49,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", - "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "version": "7.29.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.3.tgz", + "integrity": "sha512-LIVqM46zQWZhj17qA8wb4nW/ixr2y1Nw+r1etiAWgRM6U1IqP+LNhL1yg440jYZR72jCWcWbLWzIosH+uP1fqg==", "dev": true, "license": "MIT", "engines": { @@ -228,23 +226,23 @@ } }, "node_modules/@babel/helpers": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz", - "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.28.6", - "@babel/types": "^7.28.6" + "@babel/types": "^7.29.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz", - "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==", + "version": "7.29.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz", + "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==", "dev": true, "license": "MIT", "dependencies": { @@ -552,21 +550,21 @@ "license": "MIT" }, "node_modules/@emnapi/core": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.8.1.tgz", - "integrity": "sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.1.0", + "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "node_modules/@emnapi/runtime": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", - "integrity": "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", "dev": true, "license": "MIT", "optional": true, @@ -575,9 +573,9 @@ } }, "node_modules/@emnapi/wasi-threads": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", - "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", "dev": true, "license": "MIT", "optional": true, @@ -841,9 +839,9 @@ } }, "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", "dev": true, "license": "MIT", "engines": { @@ -851,17 +849,17 @@ } }, "node_modules/@jest/console": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.3.0.tgz", - "integrity": "sha512-PAwCvFJ4696XP2qZj+LAn1BWjZaJ6RjG6c7/lkMaUJnkyMS34ucuIsfqYvfskVNvUI27R/u4P1HMYFnlVXG/Ww==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.4.1.tgz", + "integrity": "sha512-v3bhyxUh9Hgmo5p6hAOXe14/R3ZxZDOsvHleh4B07z3m/x4/ngPUXEm9XwK4sF4u+f+P2ORb0Ge+MgpaqRMVDA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.3.0", + "@jest/types": "30.4.1", "@types/node": "*", "chalk": "^4.1.2", - "jest-message-util": "30.3.0", - "jest-util": "30.3.0", + "jest-message-util": "30.4.1", + "jest-util": "30.4.1", "slash": "^3.0.0" }, "engines": { @@ -869,38 +867,39 @@ } }, "node_modules/@jest/core": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.3.0.tgz", - "integrity": "sha512-U5mVPsBxLSO6xYbf+tgkymLx+iAhvZX43/xI1+ej2ZOPnPdkdO1CzDmFKh2mZBn2s4XZixszHeQnzp1gm/DIxw==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.4.2.tgz", + "integrity": "sha512-TZJA6cPJUFxoWhxaLo8t0VX/MZX2wPWr0uIDvLSHIvN4gu9h02vSzqI2kBADG1ExqQlC+cY09xKMSreivvrChQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "30.3.0", - "@jest/pattern": "30.0.1", - "@jest/reporters": "30.3.0", - "@jest/test-result": "30.3.0", - "@jest/transform": "30.3.0", - "@jest/types": "30.3.0", + "@jest/console": "30.4.1", + "@jest/pattern": "30.4.0", + "@jest/reporters": "30.4.1", + "@jest/test-result": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", "ci-info": "^4.2.0", "exit-x": "^0.2.2", + "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.11", - "jest-changed-files": "30.3.0", - "jest-config": "30.3.0", - "jest-haste-map": "30.3.0", - "jest-message-util": "30.3.0", - "jest-regex-util": "30.0.1", - "jest-resolve": "30.3.0", - "jest-resolve-dependencies": "30.3.0", - "jest-runner": "30.3.0", - "jest-runtime": "30.3.0", - "jest-snapshot": "30.3.0", - "jest-util": "30.3.0", - "jest-validate": "30.3.0", - "jest-watcher": "30.3.0", - "pretty-format": "30.3.0", + "jest-changed-files": "30.4.1", + "jest-config": "30.4.2", + "jest-haste-map": "30.4.1", + "jest-message-util": "30.4.1", + "jest-regex-util": "30.4.0", + "jest-resolve": "30.4.1", + "jest-resolve-dependencies": "30.4.2", + "jest-runner": "30.4.2", + "jest-runtime": "30.4.2", + "jest-snapshot": "30.4.1", + "jest-util": "30.4.1", + "jest-validate": "30.4.1", + "jest-watcher": "30.4.1", + "pretty-format": "30.4.1", "slash": "^3.0.0" }, "engines": { @@ -916,9 +915,9 @@ } }, "node_modules/@jest/diff-sequences": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.3.0.tgz", - "integrity": "sha512-cG51MVnLq1ecVUaQ3fr6YuuAOitHK1S4WUJHnsPFE/quQr33ADUx1FfrTCpMCRxvy0Yr9BThKpDjSlcTi91tMA==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.4.0.tgz", + "integrity": "sha512-zOpzlfUs45l6u7jm39qr87JCHUDsaeCtvL+kQe/Vn9jSnRB4/5IPXISm0h9I1vZW/o00Kn4UTJ2MOlhnUGwv3g==", "dev": true, "license": "MIT", "engines": { @@ -926,39 +925,39 @@ } }, "node_modules/@jest/environment": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.3.0.tgz", - "integrity": "sha512-SlLSF4Be735yQXyh2+mctBOzNDx5s5uLv88/j8Qn1wH679PDcwy67+YdADn8NJnGjzlXtN62asGH/T4vWOkfaw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.4.1.tgz", + "integrity": "sha512-AK9yNRqgKxiabqMoe4oW+3/TSSeV8vkdC7BGaxZdU0AFXfOpofTLqdru2GXKZghP3sdgwE9XXpnVwfZ8JnFV4w==", "dev": true, "license": "MIT", "dependencies": { - "@jest/fake-timers": "30.3.0", - "@jest/types": "30.3.0", + "@jest/fake-timers": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", - "jest-mock": "30.3.0" + "jest-mock": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.3.0.tgz", - "integrity": "sha512-76Nlh4xJxk2D/9URCn3wFi98d2hb19uWE1idLsTt2ywhvdOldbw3S570hBgn25P4ICUZ/cBjybrBex2g17IDbg==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.4.1.tgz", + "integrity": "sha512-ginrj6TMgh2GshLUGCjO94Ptx9HhdZA/I6A9iUfyeLKFtdAjnKzHDgzgP9HYQgbxM1lbXScQ2eUBz2lGeVDPWA==", "dev": true, "license": "MIT", "dependencies": { - "expect": "30.3.0", - "jest-snapshot": "30.3.0" + "expect": "30.4.1", + "jest-snapshot": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.3.0.tgz", - "integrity": "sha512-j0+W5iQQ8hBh7tHZkTQv3q2Fh/M7Je72cIsYqC4OaktgtO7v1So9UTjp6uPBHIaB6beoF/RRsCgMJKvti0wADA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.4.1.tgz", + "integrity": "sha512-ZBn5CglH8fBsQsvs4VWNzD4aWfUYks+IdOOQU3MEK71ol/BcVm+P+rtb1KpiFBpSWSCE27uOahyyf1vfqOVbcQ==", "dev": true, "license": "MIT", "dependencies": { @@ -969,18 +968,18 @@ } }, "node_modules/@jest/fake-timers": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.3.0.tgz", - "integrity": "sha512-WUQDs8SOP9URStX1DzhD425CqbN/HxUYCTwVrT8sTVBfMvFqYt/s61EK5T05qnHu0po6RitXIvP9otZxYDzTGQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.4.1.tgz", + "integrity": "sha512-iW5umdmfPeWzehrVhugFQZqCchSCud5S1l2YT0O9ZhjRR0ExclANDZkiSBwzqtnlOn0J1JXvO+HZ6rkuyOVOgQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.3.0", - "@sinonjs/fake-timers": "^15.0.0", + "@jest/types": "30.4.1", + "@sinonjs/fake-timers": "^15.4.0", "@types/node": "*", - "jest-message-util": "30.3.0", - "jest-mock": "30.3.0", - "jest-util": "30.3.0" + "jest-message-util": "30.4.1", + "jest-mock": "30.4.1", + "jest-util": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -997,47 +996,47 @@ } }, "node_modules/@jest/globals": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.3.0.tgz", - "integrity": "sha512-+owLCBBdfpgL3HU+BD5etr1SvbXpSitJK0is1kiYjJxAAJggYMRQz5hSdd5pq1sSggfxPbw2ld71pt4x5wwViA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.4.1.tgz", + "integrity": "sha512-ZbuY4cmXC8DkxYjfvT2DbcHWL2T6vmsMhXCDcmTB2T0y0gaezBI77ufq5ZAIdcRkYZ7NEQEDg1xFeKbxUJ5v5Q==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.3.0", - "@jest/expect": "30.3.0", - "@jest/types": "30.3.0", - "jest-mock": "30.3.0" + "@jest/environment": "30.4.1", + "@jest/expect": "30.4.1", + "@jest/types": "30.4.1", + "jest-mock": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/pattern": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", - "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.4.0.tgz", + "integrity": "sha512-RAWn3+f9u8BsHijKJ71uHcFp6vmyEt6VvoWXkl6hKF3qVIuWNmudVjg12DlBPGup/frIl5UcUlH5HfEuvHpEXg==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", - "jest-regex-util": "30.0.1" + "jest-regex-util": "30.4.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/reporters": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.3.0.tgz", - "integrity": "sha512-a09z89S+PkQnL055bVj8+pe2Caed2PBOaczHcXCykW5ngxX9EWx/1uAwncxc/HiU0oZqfwseMjyhxgRjS49qPw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.4.1.tgz", + "integrity": "sha512-/SnkPCzEQpUaBH81kjdEdDdo2WZl5hxw+BmLDGWjRkm8o7XlhjwsU36cqwe5PGBE5WYpBvDzRSdXx9rbGuJtNA==", "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "30.3.0", - "@jest/test-result": "30.3.0", - "@jest/transform": "30.3.0", - "@jest/types": "30.3.0", + "@jest/console": "30.4.1", + "@jest/test-result": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", "@jridgewell/trace-mapping": "^0.3.25", "@types/node": "*", "chalk": "^4.1.2", @@ -1050,9 +1049,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^5.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "30.3.0", - "jest-util": "30.3.0", - "jest-worker": "30.3.0", + "jest-message-util": "30.4.1", + "jest-util": "30.4.1", + "jest-worker": "30.4.1", "slash": "^3.0.0", "string-length": "^4.0.2", "v8-to-istanbul": "^9.0.1" @@ -1070,9 +1069,9 @@ } }, "node_modules/@jest/schemas": { - "version": "30.0.5", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", - "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.4.1.tgz", + "integrity": "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1083,13 +1082,13 @@ } }, "node_modules/@jest/snapshot-utils": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.3.0.tgz", - "integrity": "sha512-ORbRN9sf5PP82v3FXNSwmO1OTDR2vzR2YTaR+E3VkSBZ8zadQE6IqYdYEeFH1NIkeB2HIGdF02dapb6K0Mj05g==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.4.1.tgz", + "integrity": "sha512-ObY4ljvQ95mt6iwKtVLetR/4yXiAgl3H4nJxhztr0MTjrN97TwDYrnCp/kF60Ec9HdhkWTHSu+Hg05aXfngpOA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.3.0", + "@jest/types": "30.4.1", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "natural-compare": "^1.4.0" @@ -1114,14 +1113,14 @@ } }, "node_modules/@jest/test-result": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.3.0.tgz", - "integrity": "sha512-e/52nJGuD74AKTSe0P4y5wFRlaXP0qmrS17rqOMHeSwm278VyNyXE3gFO/4DTGF9w+65ra3lo3VKj0LBrzmgdQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.4.1.tgz", + "integrity": "sha512-/ZG7pgEiOmmWkN9TplKbOu4id2N5lh7FHwRwlkgBVAzGdRH+OkkQ8wX/kIxg4zmd3ZQvAL1RwL2yWsvNYYECTw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "30.3.0", - "@jest/types": "30.3.0", + "@jest/console": "30.4.1", + "@jest/types": "30.4.1", "@types/istanbul-lib-coverage": "^2.0.6", "collect-v8-coverage": "^1.0.2" }, @@ -1130,15 +1129,15 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.3.0.tgz", - "integrity": "sha512-dgbWy9b8QDlQeRZcv7LNF+/jFiiYHTKho1xirauZ7kVwY7avjFF6uTT0RqlgudB5OuIPagFdVtfFMosjVbk1eA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.4.1.tgz", + "integrity": "sha512-PeYE+4td5rKjoRPxztObrXU+H8hsjZfxKMXOcmrr34JerSyB/ROOxbbicz8B7A5j9R9VayDnVPvBmedqCsFCdw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "30.3.0", + "@jest/test-result": "30.4.1", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.3.0", + "jest-haste-map": "30.4.1", "slash": "^3.0.0" }, "engines": { @@ -1146,23 +1145,23 @@ } }, "node_modules/@jest/transform": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.3.0.tgz", - "integrity": "sha512-TLKY33fSLVd/lKB2YI1pH69ijyUblO/BQvCj566YvnwuzoTNr648iE0j22vRvVNk2HsPwByPxATg3MleS3gf5A==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.4.1.tgz", + "integrity": "sha512-Wz0LyktlTvRefoymh+n64hQ84KNXsRGcwdoZ8CSa0Ea+fgYcHZlnk+hDP7v2MS7il2bQ5uTEIxf4/NNfhMN4KQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.27.4", - "@jest/types": "30.3.0", + "@jest/types": "30.4.1", "@jridgewell/trace-mapping": "^0.3.25", "babel-plugin-istanbul": "^7.0.1", "chalk": "^4.1.2", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.3.0", - "jest-regex-util": "30.0.1", - "jest-util": "30.3.0", + "jest-haste-map": "30.4.1", + "jest-regex-util": "30.4.0", + "jest-util": "30.4.1", "pirates": "^4.0.7", "slash": "^3.0.0", "write-file-atomic": "^5.0.1" @@ -1172,14 +1171,14 @@ } }, "node_modules/@jest/types": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.3.0.tgz", - "integrity": "sha512-JHm87k7bA33hpBngtU8h6UBub/fqqA9uXfw+21j5Hmk7ooPHlboRNxHq0JcMtC+n8VJGP1mcfnD3Mk+XKe1oSw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.4.1.tgz", + "integrity": "sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/pattern": "30.0.1", - "@jest/schemas": "30.0.5", + "@jest/pattern": "30.4.0", + "@jest/schemas": "30.4.1", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", "@types/node": "*", @@ -1457,9 +1456,9 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.34.48", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.48.tgz", - "integrity": "sha512-kKJTNuK3AQOrgjjotVxMrCn1sUJwM76wMszfq1kdU4uYVJjvEWuFQ6HgvLt4Xz3fSmZlTOxJ/Ie13KnIcWQXFA==", + "version": "0.34.49", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.49.tgz", + "integrity": "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A==", "dev": true, "license": "MIT" }, @@ -1486,9 +1485,9 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.1.1.tgz", - "integrity": "sha512-cO5W33JgAPbOh07tvZjUOJ7oWhtaqGHiZw+11DPbyqh2kHTBc3eF/CjJDeQ4205RLQsX6rxCuYOroFQwl7JDRw==", + "version": "15.4.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.4.0.tgz", + "integrity": "sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -1508,9 +1507,9 @@ } }, "node_modules/@tybys/wasm-util": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", - "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", + "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", "dev": true, "license": "MIT", "optional": true, @@ -1587,9 +1586,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, @@ -1906,9 +1905,9 @@ } }, "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.1.tgz", + "integrity": "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==", "dev": true, "license": "ISC" }, @@ -2205,9 +2204,9 @@ } }, "node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -2291,9 +2290,9 @@ } }, "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -2331,16 +2330,16 @@ } }, "node_modules/babel-jest": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.3.0.tgz", - "integrity": "sha512-gRpauEU2KRrCox5Z296aeVHR4jQ98BCnu0IO332D/xpHNOsIH/bgSRk9k6GbKIbBw8vFeN6ctuu6tV8WOyVfYQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.4.1.tgz", + "integrity": "sha512-fATAbM8piYxkiXQp3RBXmZHxZVNJZAVXXfyeyCN2Tida3+qJ8ea9UxhiJ2y4fLO90ZImKt6k9FlcH2+rLkJGhw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/transform": "30.3.0", + "@jest/transform": "30.4.1", "@types/babel__core": "^7.20.5", "babel-plugin-istanbul": "^7.0.1", - "babel-preset-jest": "30.3.0", + "babel-preset-jest": "30.4.0", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "slash": "^3.0.0" @@ -2373,9 +2372,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.3.0.tgz", - "integrity": "sha512-+TRkByhsws6sfPjVaitzadk1I0F5sPvOVUH5tyTSzhePpsGIVrdeunHSw/C36QeocS95OOk8lunc4rlu5Anwsg==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.4.0.tgz", + "integrity": "sha512-9EdtWM/sSfXLOGLwSn+GS6pIXyBnL07/8gyJlwFXjWy4DxMOyItqyUT29d4lQiS380EZwYlX7/At4PgBS+m2aA==", "dev": true, "license": "MIT", "dependencies": { @@ -2413,13 +2412,13 @@ } }, "node_modules/babel-preset-jest": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.3.0.tgz", - "integrity": "sha512-6ZcUbWHC+dMz2vfzdNwi87Z1gQsLNK2uLuK1Q89R11xdvejcivlYYwDlEv0FHX3VwEXpbBQ9uufB/MUNpZGfhQ==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.4.0.tgz", + "integrity": "sha512-lBY4jxsNmCnSiu7kquw8ZC9F4+XLMOKypT3RnNHPvU2Kpd4W0xaPuLr5ZkRyOsvLYAY4yaW1ZwTW4xB7NIiZzg==", "dev": true, "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "30.3.0", + "babel-plugin-jest-hoist": "30.4.0", "babel-preset-current-node-syntax": "^1.2.0" }, "engines": { @@ -2437,9 +2436,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.0.tgz", - "integrity": "sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA==", + "version": "2.10.29", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.29.tgz", + "integrity": "sha512-Asa2krT+XTPZINCS+2QcyS8WTkObE77RwkydwF7h6DmnKqbvlalz93m/dnphUyCa6SWSP51VgtEUf2FN+gelFQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2457,9 +2456,9 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "dev": true, "license": "MIT", "dependencies": { @@ -2481,9 +2480,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", - "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", "dev": true, "funding": [ { @@ -2501,11 +2500,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.9.0", - "caniuse-lite": "^1.0.30001759", - "electron-to-chromium": "^1.5.263", - "node-releases": "^2.0.27", - "update-browserslist-db": "^1.2.0" + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" @@ -2537,12 +2536,6 @@ "node-int64": "^0.4.0" } }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "license": "BSD-3-Clause" - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2672,9 +2665,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001777", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001777.tgz", - "integrity": "sha512-tmN+fJxroPndC74efCdp12j+0rk0RHwV5Jwa1zWaFVyw2ZxAuPeG8ZgWC3Wz7uSjT3qMRQ5XHZ4COgQmsCMJAQ==", + "version": "1.0.30001792", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001792.tgz", + "integrity": "sha512-hVLMUZFgR4JJ6ACt1uEESvQN1/dBVqPAKY0hgrV70eN3391K6juAfTjKZLKvOMsx8PxA7gsY1/tLMMTcfFLLpw==", "dev": true, "funding": [ { @@ -2872,9 +2865,9 @@ "license": "MIT" }, "node_modules/core-js": { - "version": "3.48.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.48.0.tgz", - "integrity": "sha512-zpEHTy1fjTMZCKLHUZoVeylt9XrzaIN2rbPXEt0k+q7JE5CkCZdo6bNq55bn24a69CH7ErAVLKijxJja4fw+UQ==", + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.49.0.tgz", + "integrity": "sha512-es1U2+YTtzpwkxVLwAFdSpaIMyQaq0PBgm3YD1W3Qpsn1NAmO3KSgZfu+oGSWVu6NvLHoHCV/aYcsE5wiB7ALg==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -3059,9 +3052,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.307", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.307.tgz", - "integrity": "sha512-5z3uFKBWjiNR44nFcYdkcXjKMbg5KXNdciu7mhTPo9tB7NbqSNP2sSnGR+fqknZSCwKkBN+oxiiajWs4dT6ORg==", + "version": "1.5.355", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.355.tgz", + "integrity": "sha512-LUPZhKzZPYSPme1jEYohpkA+ybYCJztr1quAdBd7E7h3+VOBVcKkwwtBJu41nrjawrRzfb8mtMfzWozoaK0ZIQ==", "dev": true, "license": "ISC" }, @@ -3456,18 +3449,18 @@ } }, "node_modules/expect": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.3.0.tgz", - "integrity": "sha512-1zQrciTiQfRdo7qJM1uG4navm8DayFa2TgCSRlzUyNkhcJ6XUZF3hjnpkyr3VhAqPH7i/9GkG7Tv5abz6fqz0Q==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.4.1.tgz", + "integrity": "sha512-PMARsyh/JtqC20HoGqlFcIlQAyqUtW4PlI1rup1uhYJtKuwAjbvWi3GQMAn+STdHum/dk8xrKfUM1+5SAwpolA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/expect-utils": "30.3.0", + "@jest/expect-utils": "30.4.1", "@jest/get-type": "30.1.0", - "jest-matcher-utils": "30.3.0", - "jest-message-util": "30.3.0", - "jest-mock": "30.3.0", - "jest-util": "30.3.0" + "jest-matcher-utils": "30.4.1", + "jest-message-util": "30.4.1", + "jest-mock": "30.4.1", + "jest-util": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -3610,9 +3603,9 @@ } }, "node_modules/flatted": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.1.tgz", - "integrity": "sha512-IxfVbRFVlV8V/yRaGzk0UVIcsKKHMSfYw66T/u4nTwlWteQePsxe//LjudR1AMX4tZW3WFCh3Zqa/sjlqpbURQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true, "license": "ISC" }, @@ -3795,9 +3788,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -3909,9 +3902,9 @@ "license": "MIT" }, "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3976,9 +3969,9 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -4287,16 +4280,16 @@ } }, "node_modules/jest": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-30.3.0.tgz", - "integrity": "sha512-AkXIIFcaazymvey2i/+F94XRnM6TsVLZDhBMLsd1Sf/W0wzsvvpjeyUrCZD6HGG4SDYPgDJDBKeiJTBb10WzMg==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-30.4.2.tgz", + "integrity": "sha512-Yi1jqNC/Oq0N4hBgNH/YvBpP1P57QqundgytzYqy3yqAa7NZPNjSoi4SGbRAXDMdBzNE6xBCi5U7RgfrvMEUVQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "30.3.0", - "@jest/types": "30.3.0", + "@jest/core": "30.4.2", + "@jest/types": "30.4.1", "import-local": "^3.2.0", - "jest-cli": "30.3.0" + "jest-cli": "30.4.2" }, "bin": { "jest": "bin/jest.js" @@ -4314,14 +4307,14 @@ } }, "node_modules/jest-changed-files": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.3.0.tgz", - "integrity": "sha512-B/7Cny6cV5At6M25EWDgf9S617lHivamL8vl6KEpJqkStauzcG4e+WPfDgMMF+H4FVH4A2PLRyvgDJan4441QA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.4.1.tgz", + "integrity": "sha512-IuctmYrxi21iOSOaIXpJWalHyPAsVv0GeBHKDn8C1CA4W5htHn7INL+wdnL4Bo0+olEndvAFkmb++tIQJG+vvg==", "dev": true, "license": "MIT", "dependencies": { "execa": "^5.1.1", - "jest-util": "30.3.0", + "jest-util": "30.4.1", "p-limit": "^3.1.0" }, "engines": { @@ -4329,29 +4322,29 @@ } }, "node_modules/jest-circus": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.3.0.tgz", - "integrity": "sha512-PyXq5szeSfR/4f1lYqCmmQjh0vqDkURUYi9N6whnHjlRz4IUQfMcXkGLeEoiJtxtyPqgUaUUfyQlApXWBSN1RA==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.4.2.tgz", + "integrity": "sha512-rvHH7VlY6LgbJXJTQ87GW62g1FntOtbhh0zT+v04kC+pgL6aBKyYINXxWukCpj3dcIBMw5/XUbtDS9dU9JTXeQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.3.0", - "@jest/expect": "30.3.0", - "@jest/test-result": "30.3.0", - "@jest/types": "30.3.0", + "@jest/environment": "30.4.1", + "@jest/expect": "30.4.1", + "@jest/test-result": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", "chalk": "^4.1.2", "co": "^4.6.0", "dedent": "^1.6.0", "is-generator-fn": "^2.1.0", - "jest-each": "30.3.0", - "jest-matcher-utils": "30.3.0", - "jest-message-util": "30.3.0", - "jest-runtime": "30.3.0", - "jest-snapshot": "30.3.0", - "jest-util": "30.3.0", + "jest-each": "30.4.1", + "jest-matcher-utils": "30.4.1", + "jest-message-util": "30.4.1", + "jest-runtime": "30.4.2", + "jest-snapshot": "30.4.1", + "jest-util": "30.4.1", "p-limit": "^3.1.0", - "pretty-format": "30.3.0", + "pretty-format": "30.4.1", "pure-rand": "^7.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.6" @@ -4361,21 +4354,21 @@ } }, "node_modules/jest-cli": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.3.0.tgz", - "integrity": "sha512-l6Tqx+j1fDXJEW5bqYykDQQ7mQg+9mhWXtnj+tQZrTWYHyHoi6Be8HPumDSA+UiX2/2buEgjA58iJzdj146uCw==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.4.2.tgz", + "integrity": "sha512-jfA2ocvVHMXS2QijrJ0d31ektP+d/W0T5RpcTX2Pq+3sVqHlsXVCM2+FmwpL+bdY8OfHpIg9xMxLF17Zg0U49Q==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "30.3.0", - "@jest/test-result": "30.3.0", - "@jest/types": "30.3.0", + "@jest/core": "30.4.2", + "@jest/test-result": "30.4.1", + "@jest/types": "30.4.1", "chalk": "^4.1.2", "exit-x": "^0.2.2", "import-local": "^3.2.0", - "jest-config": "30.3.0", - "jest-util": "30.3.0", - "jest-validate": "30.3.0", + "jest-config": "30.4.2", + "jest-util": "30.4.1", + "jest-validate": "30.4.1", "yargs": "^17.7.2" }, "bin": { @@ -4394,33 +4387,33 @@ } }, "node_modules/jest-config": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.3.0.tgz", - "integrity": "sha512-WPMAkMAtNDY9P/oKObtsRG/6KTrhtgPJoBTmk20uDn4Uy6/3EJnnaZJre/FMT1KVRx8cve1r7/FlMIOfRVWL4w==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.4.2.tgz", + "integrity": "sha512-rNHAShJQqQwFNoL0hbf3BphSBOWnpOUAKvidLS/AjNVLPfoj5mSf4jQMfW3cYOs6hXeZC7nF7mDHaBnbxELOzg==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.27.4", "@jest/get-type": "30.1.0", - "@jest/pattern": "30.0.1", - "@jest/test-sequencer": "30.3.0", - "@jest/types": "30.3.0", - "babel-jest": "30.3.0", + "@jest/pattern": "30.4.0", + "@jest/test-sequencer": "30.4.1", + "@jest/types": "30.4.1", + "babel-jest": "30.4.1", "chalk": "^4.1.2", "ci-info": "^4.2.0", "deepmerge": "^4.3.1", "glob": "^10.5.0", "graceful-fs": "^4.2.11", - "jest-circus": "30.3.0", - "jest-docblock": "30.2.0", - "jest-environment-node": "30.3.0", - "jest-regex-util": "30.0.1", - "jest-resolve": "30.3.0", - "jest-runner": "30.3.0", - "jest-util": "30.3.0", - "jest-validate": "30.3.0", + "jest-circus": "30.4.2", + "jest-docblock": "30.4.0", + "jest-environment-node": "30.4.1", + "jest-regex-util": "30.4.0", + "jest-resolve": "30.4.1", + "jest-runner": "30.4.2", + "jest-util": "30.4.1", + "jest-validate": "30.4.1", "parse-json": "^5.2.0", - "pretty-format": "30.3.0", + "pretty-format": "30.4.1", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -4445,25 +4438,25 @@ } }, "node_modules/jest-diff": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.3.0.tgz", - "integrity": "sha512-n3q4PDQjS4LrKxfWB3Z5KNk1XjXtZTBwQp71OP0Jo03Z6V60x++K5L8k6ZrW8MY8pOFylZvHM0zsjS1RqlHJZQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.4.1.tgz", + "integrity": "sha512-CRpFK0RtLriVDGcPPAnR6HMVI8bSR2jnUIgralhauzYQZIb4RH9AtEInTuQr65LmmGggGcRT6HIASxwqsVsmlA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/diff-sequences": "30.3.0", + "@jest/diff-sequences": "30.4.0", "@jest/get-type": "30.1.0", "chalk": "^4.1.2", - "pretty-format": "30.3.0" + "pretty-format": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-docblock": { - "version": "30.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.2.0.tgz", - "integrity": "sha512-tR/FFgZKS1CXluOQzZvNH3+0z9jXr3ldGSD8bhyuxvlVUwbeLOGynkunvlTMxchC5urrKndYiwCFC0DLVjpOCA==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.4.0.tgz", + "integrity": "sha512-ZPMabUZCx5MpbZ2eBYSvZ0J8fvo3dR9oM+eeUpb3aKNQFuS2tu3Duw1TNlMoP8k3WQgKGJuhcMFvwcVuq6T7oA==", "dev": true, "license": "MIT", "dependencies": { @@ -4474,56 +4467,56 @@ } }, "node_modules/jest-each": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.3.0.tgz", - "integrity": "sha512-V8eMndg/aZ+3LnCJgSm13IxS5XSBM22QSZc9BtPK8Dek6pm+hfUNfwBdvsB3d342bo1q7wnSkC38zjX259qZNA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.4.1.tgz", + "integrity": "sha512-/8MJbH6fuj48TstjrMf+u/pd06Qezz5xOXvZA6442heNOWr8bdeoGZX2d9fCn028CoMgYmroH9//zky5GfyYmA==", "dev": true, "license": "MIT", "dependencies": { "@jest/get-type": "30.1.0", - "@jest/types": "30.3.0", + "@jest/types": "30.4.1", "chalk": "^4.1.2", - "jest-util": "30.3.0", - "pretty-format": "30.3.0" + "jest-util": "30.4.1", + "pretty-format": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-environment-node": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.3.0.tgz", - "integrity": "sha512-4i6HItw/JSiJVsC5q0hnKIe/hbYfZLVG9YJ/0pU9Hz2n/9qZe3Rhn5s5CUZA5ORZlcdT/vmAXRMyONXJwPrmYQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.4.1.tgz", + "integrity": "sha512-4FZYVOk85hz2AyT6BbarKy9u37g6DbrDyCdFhsnDdXqyrueYQvB+0zO4f/kqLCRD0BsPRXPMNJeQwihKZV8naw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.3.0", - "@jest/fake-timers": "30.3.0", - "@jest/types": "30.3.0", + "@jest/environment": "30.4.1", + "@jest/fake-timers": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", - "jest-mock": "30.3.0", - "jest-util": "30.3.0", - "jest-validate": "30.3.0" + "jest-mock": "30.4.1", + "jest-util": "30.4.1", + "jest-validate": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-haste-map": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.3.0.tgz", - "integrity": "sha512-mMi2oqG4KRU0R9QEtscl87JzMXfUhbKaFqOxmjb2CKcbHcUGFrJCBWHmnTiUqi6JcnzoBlO4rWfpdl2k/RfLCA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.4.1.tgz", + "integrity": "sha512-rFrcONd8jeFsyw+Z9CrScJgglRf2+NFmNam8dKu7n+SoHqNYT47mn0DdEcVUZJpvh7Iz6/si7f7yUH7GJHVgnw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.3.0", + "@jest/types": "30.4.1", "@types/node": "*", "anymatch": "^3.1.3", "fb-watchman": "^2.0.2", "graceful-fs": "^4.2.11", - "jest-regex-util": "30.0.1", - "jest-util": "30.3.0", - "jest-worker": "30.3.0", + "jest-regex-util": "30.4.0", + "jest-util": "30.4.1", + "jest-worker": "30.4.1", "picomatch": "^4.0.3", "walker": "^1.0.8" }, @@ -4535,49 +4528,50 @@ } }, "node_modules/jest-leak-detector": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.3.0.tgz", - "integrity": "sha512-cuKmUUGIjfXZAiGJ7TbEMx0bcqNdPPI6P1V+7aF+m/FUJqFDxkFR4JqkTu8ZOiU5AaX/x0hZ20KaaIPXQzbMGQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.4.1.tgz", + "integrity": "sha512-IpmyiioeHxiWDhesHnUFmOxcTzwCwKpgACgWajtAP+nYQXiY7DakTxB6Bx9JFiRMljr0AX1PvnQdaU1KFoz6NQ==", "dev": true, "license": "MIT", "dependencies": { "@jest/get-type": "30.1.0", - "pretty-format": "30.3.0" + "pretty-format": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.3.0.tgz", - "integrity": "sha512-HEtc9uFQgaUHkC7nLSlQL3Tph4Pjxt/yiPvkIrrDCt9jhoLIgxaubo1G+CFOnmHYMxHwwdaSN7mkIFs6ZK8OhA==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.4.1.tgz", + "integrity": "sha512-zvYfX5CaeEkFrrLS9suWe9rvJrm9J1Iv3ua8kIBv9GEPzcnsfBf0bob37la7s67fs0nlBC3EuvkOLnXQKxtx4A==", "dev": true, "license": "MIT", "dependencies": { "@jest/get-type": "30.1.0", "chalk": "^4.1.2", - "jest-diff": "30.3.0", - "pretty-format": "30.3.0" + "jest-diff": "30.4.1", + "pretty-format": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-message-util": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.3.0.tgz", - "integrity": "sha512-Z/j4Bo+4ySJ+JPJN3b2Qbl9hDq3VrXmnjjGEWD/x0BCXeOXPTV1iZYYzl2X8c1MaCOL+ewMyNBcm88sboE6YWw==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.4.1.tgz", + "integrity": "sha512-kwCKIvq0MCW1HzLoGola9Te6JUdzgV0loyKJ3Qghrkz9i5/RRIHsL95BMQc2HBBhlBKC4j22K9p11TGHH8RBpQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@jest/types": "30.3.0", + "@jest/types": "30.4.1", "@types/stack-utils": "^2.0.3", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", + "jest-util": "30.4.1", "picomatch": "^4.0.3", - "pretty-format": "30.3.0", + "pretty-format": "30.4.1", "slash": "^3.0.0", "stack-utils": "^2.0.6" }, @@ -4586,15 +4580,15 @@ } }, "node_modules/jest-mock": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.3.0.tgz", - "integrity": "sha512-OTzICK8CpE+t4ndhKrwlIdbM6Pn8j00lvmSmq5ejiO+KxukbLjgOflKWMn3KE34EZdQm5RqTuKj+5RIEniYhog==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.4.1.tgz", + "integrity": "sha512-/i8SVb8/NSB7RfNi8gfqu8gxLV23KaL5EpAttyb9iz8qWRIqXRLflycz/32wXsYkOnaUlx8NAKnJYtpsmXUmfw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.3.0", + "@jest/types": "30.4.1", "@types/node": "*", - "jest-util": "30.3.0" + "jest-util": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -4619,9 +4613,9 @@ } }, "node_modules/jest-regex-util": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", - "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", + "version": "30.4.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.4.0.tgz", + "integrity": "sha512-mWlvLviKIgIQ8VCuM1xRdD0TWp3zlzionlmDBjuXVBs+VkmXq6FgW9T4Emr7oGz/Rk6feDCGyiugolcQEyp3mg==", "dev": true, "license": "MIT", "engines": { @@ -4629,18 +4623,18 @@ } }, "node_modules/jest-resolve": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.3.0.tgz", - "integrity": "sha512-NRtTAHQlpd15F9rUR36jqwelbrDV/dY4vzNte3S2kxCKUJRYNd5/6nTSbYiak1VX5g8IoFF23Uj5TURkUW8O5g==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.4.1.tgz", + "integrity": "sha512-Zry8Yq/yJcNAZ7dJ5F2heic8AheXvbFZ7XI5V+h28nrYZ7Qoyy4dItq8OodjnYD270mvX+ZudmrNV9cysqhW5Q==", "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.2", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.3.0", + "jest-haste-map": "30.4.1", "jest-pnp-resolver": "^1.2.3", - "jest-util": "30.3.0", - "jest-validate": "30.3.0", + "jest-util": "30.4.1", + "jest-validate": "30.4.1", "slash": "^3.0.0", "unrs-resolver": "^1.7.11" }, @@ -4649,46 +4643,46 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.3.0.tgz", - "integrity": "sha512-9ev8s3YN6Hsyz9LV75XUwkCVFlwPbaFn6Wp75qnI0wzAINYWY8Fb3+6y59Rwd3QaS3kKXffHXsZMziMavfz/nw==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.4.2.tgz", + "integrity": "sha512-gDiVh1I+GxYzz9oXlyw+1wv6VOYX1WYxMOfjsA3iGKePV2oxmbHhwxfkALxNxYy1ciw6APWwkW2zZONwP97aEQ==", "dev": true, "license": "MIT", "dependencies": { - "jest-regex-util": "30.0.1", - "jest-snapshot": "30.3.0" + "jest-regex-util": "30.4.0", + "jest-snapshot": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-runner": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.3.0.tgz", - "integrity": "sha512-gDv6C9LGKWDPLia9TSzZwf4h3kMQCqyTpq+95PODnTRDO0g9os48XIYYkS6D236vjpBir2fF63YmJFtqkS5Duw==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.4.2.tgz", + "integrity": "sha512-2dw0PslVYXxffXGpLo+Ejad+KcI1Qkjn7f4X4619gf21oCUmL+SPfjqIa/losUem3yEOvfNZe/F1HWUcNpODcg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "30.3.0", - "@jest/environment": "30.3.0", - "@jest/test-result": "30.3.0", - "@jest/transform": "30.3.0", - "@jest/types": "30.3.0", + "@jest/console": "30.4.1", + "@jest/environment": "30.4.1", + "@jest/test-result": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", "chalk": "^4.1.2", "emittery": "^0.13.1", "exit-x": "^0.2.2", "graceful-fs": "^4.2.11", - "jest-docblock": "30.2.0", - "jest-environment-node": "30.3.0", - "jest-haste-map": "30.3.0", - "jest-leak-detector": "30.3.0", - "jest-message-util": "30.3.0", - "jest-resolve": "30.3.0", - "jest-runtime": "30.3.0", - "jest-util": "30.3.0", - "jest-watcher": "30.3.0", - "jest-worker": "30.3.0", + "jest-docblock": "30.4.0", + "jest-environment-node": "30.4.1", + "jest-haste-map": "30.4.1", + "jest-leak-detector": "30.4.1", + "jest-message-util": "30.4.1", + "jest-resolve": "30.4.1", + "jest-runtime": "30.4.2", + "jest-util": "30.4.1", + "jest-watcher": "30.4.1", + "jest-worker": "30.4.1", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -4697,32 +4691,32 @@ } }, "node_modules/jest-runtime": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.3.0.tgz", - "integrity": "sha512-CgC+hIBJbuh78HEffkhNKcbXAytQViplcl8xupqeIWyKQF50kCQA8J7GeJCkjisC6hpnC9Muf8jV5RdtdFbGng==", + "version": "30.4.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.4.2.tgz", + "integrity": "sha512-3/5e8iPz2k/VLqlr8DgTftYyLUv8Su3FkCAO2/Od81UsUTpSxOrS6O5x5KkoQwyUjmpYyDJKeyAvg2T2nvpNkQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.3.0", - "@jest/fake-timers": "30.3.0", - "@jest/globals": "30.3.0", + "@jest/environment": "30.4.1", + "@jest/fake-timers": "30.4.1", + "@jest/globals": "30.4.1", "@jest/source-map": "30.0.1", - "@jest/test-result": "30.3.0", - "@jest/transform": "30.3.0", - "@jest/types": "30.3.0", + "@jest/test-result": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", "chalk": "^4.1.2", "cjs-module-lexer": "^2.1.0", "collect-v8-coverage": "^1.0.2", "glob": "^10.5.0", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.3.0", - "jest-message-util": "30.3.0", - "jest-mock": "30.3.0", - "jest-regex-util": "30.0.1", - "jest-resolve": "30.3.0", - "jest-snapshot": "30.3.0", - "jest-util": "30.3.0", + "jest-haste-map": "30.4.1", + "jest-message-util": "30.4.1", + "jest-mock": "30.4.1", + "jest-regex-util": "30.4.0", + "jest-resolve": "30.4.1", + "jest-snapshot": "30.4.1", + "jest-util": "30.4.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -4731,9 +4725,9 @@ } }, "node_modules/jest-snapshot": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.3.0.tgz", - "integrity": "sha512-f14c7atpb4O2DeNhwcvS810Y63wEn8O1HqK/luJ4F6M4NjvxmAKQwBUWjbExUtMxWJQ0wVgmCKymeJK6NZMnfQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.4.1.tgz", + "integrity": "sha512-tEOkkfOMppUyeiHwjZswOQ3lcnoTnws/q5FnGIaeIh/jmoU0ZlgMYRR8sTlTj+nNGCoJ0RDq6SfxGxCsyMTPmw==", "dev": true, "license": "MIT", "dependencies": { @@ -4742,20 +4736,20 @@ "@babel/plugin-syntax-jsx": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1", "@babel/types": "^7.27.3", - "@jest/expect-utils": "30.3.0", + "@jest/expect-utils": "30.4.1", "@jest/get-type": "30.1.0", - "@jest/snapshot-utils": "30.3.0", - "@jest/transform": "30.3.0", - "@jest/types": "30.3.0", + "@jest/snapshot-utils": "30.4.1", + "@jest/transform": "30.4.1", + "@jest/types": "30.4.1", "babel-preset-current-node-syntax": "^1.2.0", "chalk": "^4.1.2", - "expect": "30.3.0", + "expect": "30.4.1", "graceful-fs": "^4.2.11", - "jest-diff": "30.3.0", - "jest-matcher-utils": "30.3.0", - "jest-message-util": "30.3.0", - "jest-util": "30.3.0", - "pretty-format": "30.3.0", + "jest-diff": "30.4.1", + "jest-matcher-utils": "30.4.1", + "jest-message-util": "30.4.1", + "jest-util": "30.4.1", + "pretty-format": "30.4.1", "semver": "^7.7.2", "synckit": "^0.11.8" }, @@ -4764,13 +4758,13 @@ } }, "node_modules/jest-util": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.3.0.tgz", - "integrity": "sha512-/jZDa00a3Sz7rdyu55NLrQCIrbyIkbBxareejQI315f/i8HjYN+ZWsDLLpoQSiUIEIyZF/R8fDg3BmB8AtHttg==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.4.1.tgz", + "integrity": "sha512-vjQb1sACEiv13DKJMDToJpzVW0joCsIQrmbg0fi7CyOOt+g9jTuQl2A216pWRBYhOVt53XbL/2LbMKg1BECWOw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.3.0", + "@jest/types": "30.4.1", "@types/node": "*", "chalk": "^4.1.2", "ci-info": "^4.2.0", @@ -4782,18 +4776,18 @@ } }, "node_modules/jest-validate": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.3.0.tgz", - "integrity": "sha512-I/xzC8h5G+SHCb2P2gWkJYrNiTbeL47KvKeW5EzplkyxzBRBw1ssSHlI/jXec0ukH2q7x2zAWQm7015iusg62Q==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.4.1.tgz", + "integrity": "sha512-PDWi4SOwLnwqNDfHZjOcsEFyZ4fc/2W2gVL3DEoyqnB6jCQMLRtfBong8s6omIw3lI0HWOus12xfnFmQtjW3fw==", "dev": true, "license": "MIT", "dependencies": { "@jest/get-type": "30.1.0", - "@jest/types": "30.3.0", + "@jest/types": "30.4.1", "camelcase": "^6.3.0", "chalk": "^4.1.2", "leven": "^3.1.0", - "pretty-format": "30.3.0" + "pretty-format": "30.4.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -4813,19 +4807,19 @@ } }, "node_modules/jest-watcher": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.3.0.tgz", - "integrity": "sha512-PJ1d9ThtTR8aMiBWUdcownq9mDdLXsQzJayTk4kmaBRHKvwNQn+ANveuhEBUyNI2hR1TVhvQ8D5kHubbzBHR/w==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.4.1.tgz", + "integrity": "sha512-/l9UonmvCwjHH7d2h3iAwIloLc1H0S8mJZ/LNK3i86hqwPAz8otUJjP9MfYtz9Tt77Su5FD2xGjZn8d31IZHlw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "30.3.0", - "@jest/types": "30.3.0", + "@jest/test-result": "30.4.1", + "@jest/types": "30.4.1", "@types/node": "*", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", "emittery": "^0.13.1", - "jest-util": "30.3.0", + "jest-util": "30.4.1", "string-length": "^4.0.2" }, "engines": { @@ -4833,15 +4827,15 @@ } }, "node_modules/jest-worker": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.3.0.tgz", - "integrity": "sha512-DrCKkaQwHexjRUFTmPzs7sHQe0TSj9nvDALKGdwmK5mW9v7j90BudWirKAJHt3QQ9Dhrg1F7DogPzhChppkJpQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.4.1.tgz", + "integrity": "sha512-SHynN/q/QD++iNyvMdy+WMmbCGk8jIsNcRxycXbWubSOhvo6T+j2afcfUSl+3hYsiBebOTo0cT7c2H7CXugu1g==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", "@ungap/structured-clone": "^1.3.0", - "jest-util": "30.3.0", + "jest-util": "30.4.1", "merge-stream": "^2.0.0", "supports-color": "^8.1.1" }, @@ -5002,9 +4996,10 @@ } }, "node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "dev": true, "license": "MIT" }, "node_modules/lodash.memoize": { @@ -5229,9 +5224,9 @@ } }, "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -5367,9 +5362,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.36", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", - "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", + "version": "2.0.44", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.44.tgz", + "integrity": "sha512-5WUyunoPMsvvEhS8AxHtRzP+oA8UCkJ7YRxatWKjngndhDGLiqEVAQKWjFAiAiuL8zMRGzGSJxFnLetoa43qGQ==", "dev": true, "license": "MIT" }, @@ -5625,9 +5620,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", "engines": { @@ -6125,15 +6120,16 @@ } }, "node_modules/pretty-format": { - "version": "30.3.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.3.0.tgz", - "integrity": "sha512-oG4T3wCbfeuvljnyAzhBvpN45E8iOTXCU/TD3zXW80HA3dQ4ahdqMkWGiPWZvjpQwlbyHrPTWUAqUzGzv4l1JQ==", + "version": "30.4.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.4.1.tgz", + "integrity": "sha512-K6KiKMHTL4jjX4u3Kir2EW07nRfcqVTXIImx50wbjHQTcZPgg+gjVeNTIT3l3L1Rd4UefxfogquC9J37SoFyyw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "30.0.5", + "@jest/schemas": "30.4.1", "ansi-styles": "^5.2.0", - "react-is": "^18.3.1" + "react-is-18": "npm:react-is@^18.3.1", + "react-is-19": "npm:react-is@^19.2.5" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -6200,9 +6196,9 @@ "license": "MIT" }, "node_modules/qs": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz", - "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==", + "version": "6.15.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz", + "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -6247,13 +6243,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/react-is": { + "node_modules/react-is-18": { + "name": "react-is", "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true, "license": "MIT" }, + "node_modules/react-is-19": { + "name": "react-is", + "version": "19.2.6", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.6.tgz", + "integrity": "sha512-XjBR15BhXuylgWGuslhDKqlSayuqvqBX91BP8pauG8kd1zY8kotkNWbXksTCNRarse4kuGbe2kIY05ARtwNIvw==", + "dev": true, + "license": "MIT" + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -6421,9 +6426,9 @@ "license": "ISC" }, "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", + "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", "dev": true, "license": "ISC", "bin": { @@ -6483,13 +6488,13 @@ } }, "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" + "object-inspect": "^1.13.4" }, "engines": { "node": ">= 0.4" @@ -7089,16 +7094,16 @@ } }, "node_modules/uuid": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", - "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], "license": "MIT", "bin": { - "uuid": "dist/esm/bin/uuid" + "uuid": "dist-node/bin/uuid" } }, "node_modules/v8-to-istanbul": { diff --git a/package.json b/package.json index 56804a98..baa3cb51 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gocardless-nodejs", - "version": "8.1.0", + "version": "8.2.0", "description": "Node.js client for the GoCardless API - a powerful, simple solution for the collection of recurring bank-to-bank payments", "author": "GoCardless Ltd ", "repository": { @@ -106,9 +106,7 @@ }, "dependencies": { "got": "^11.8.6", - "lodash": "^4.17.21", - "uuid": "^11.1.0", - "buffer-equal-constant-time": "1.0.1", + "uuid": "^14.0.0", "qs": "^6.14.0" }, "devDependencies": { diff --git a/src/api/api.ts b/src/api/api.ts index 7b2e31e4..92d5aeb4 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -1,6 +1,5 @@ import * as os from 'os'; import * as process from 'process'; -import * as _ from 'lodash'; import { v4 as uuidv4 } from 'uuid'; import * as url from 'url'; import got, { Agents, OptionsOfJSONResponseBody } from 'got'; diff --git a/src/client.ts b/src/client.ts index 5f41aee3..d0e35f21 100644 --- a/src/client.ts +++ b/src/client.ts @@ -28,6 +28,8 @@ import { MandateImportEntryService } from './services/mandateImportEntryService. import { MandatePdfService } from './services/mandatePdfService.js'; import { NegativeBalanceLimitService } from './services/negativeBalanceLimitService.js'; import { OutboundPaymentService } from './services/outboundPaymentService.js'; +import { OutboundPaymentImportService } from './services/outboundPaymentImportService.js'; +import { OutboundPaymentImportEntryService } from './services/outboundPaymentImportEntryService.js'; import { PayerAuthorisationService } from './services/payerAuthorisationService.js'; import { PayerThemeService } from './services/payerThemeService.js'; import { PaymentService } from './services/paymentService.js'; @@ -76,6 +78,8 @@ export class GoCardlessClient { private _mandatePdfs: MandatePdfService; private _negativeBalanceLimits: NegativeBalanceLimitService; private _outboundPayments: OutboundPaymentService; + private _outboundPaymentImports: OutboundPaymentImportService; + private _outboundPaymentImportEntries: OutboundPaymentImportEntryService; private _payerAuthorisations: PayerAuthorisationService; private _payerThemes: PayerThemeService; private _payments: PaymentService; @@ -124,6 +128,8 @@ export class GoCardlessClient { this._mandatePdfs = undefined; this._negativeBalanceLimits = undefined; this._outboundPayments = undefined; + this._outboundPaymentImports = undefined; + this._outboundPaymentImportEntries = undefined; this._payerAuthorisations = undefined; this._payerThemes = undefined; this._payments = undefined; @@ -366,6 +372,22 @@ export class GoCardlessClient { return this._outboundPayments; } + get outboundPaymentImports(): OutboundPaymentImportService { + if (!this._outboundPaymentImports) { + this._outboundPaymentImports = new OutboundPaymentImportService(this._api); + } + + return this._outboundPaymentImports; + } + + get outboundPaymentImportEntries(): OutboundPaymentImportEntryService { + if (!this._outboundPaymentImportEntries) { + this._outboundPaymentImportEntries = new OutboundPaymentImportEntryService(this._api); + } + + return this._outboundPaymentImportEntries; + } + get payerAuthorisations(): PayerAuthorisationService { if (!this._payerAuthorisations) { this._payerAuthorisations = new PayerAuthorisationService(this._api); diff --git a/src/constants.ts b/src/constants.ts index 0f647679..acc8f7b5 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -3,7 +3,7 @@ enum Environments { Sandbox = 'SANDBOX', } -const CLIENT_VERSION = '8.1.0'; +const CLIENT_VERSION = '8.2.0'; const API_VERSION = '2015-07-06'; export { Environments, CLIENT_VERSION, API_VERSION }; diff --git a/src/errors.test.ts b/src/errors.test.ts index f9c7927c..0ea7d0be 100644 --- a/src/errors.test.ts +++ b/src/errors.test.ts @@ -1,4 +1,41 @@ -const { ApiError, GoCardlessInternalError } = require('./errors'); +const { ApiError, GoCardlessInternalError, MalformedResponseError } = require('./errors'); + +describe('MalformedResponseError', () => { + test('includes status code and body preview in message', () => { + const response = { + statusCode: 502, + headers: { 'x-request-id': 'REQ789' }, + body: '502 Bad Gateway', + }; + + const err = new MalformedResponseError('Malformed JSON received from GoCardless API', response); + + expect(err.statusCode).toBe(502); + expect(err.requestId).toBe('REQ789'); + expect(err.message).toContain('HTTP 502'); + expect(err.message).toContain('502 Bad Gateway'); + }); + + test('truncates long bodies to 500 chars', () => { + const body = 'x'.repeat(800); + const err = new MalformedResponseError('Malformed', { + statusCode: 500, + headers: {}, + body, + }); + + expect(err.message).toContain('x'.repeat(500) + '...'); + expect(err.message).not.toContain('x'.repeat(501)); + }); + + test('handles missing headers and status code', () => { + const err = new MalformedResponseError('Malformed', {}); + + expect(err.statusCode).toBeNull(); + expect(err.requestId).toBeNull(); + expect(err.message).toBe('Malformed'); + }); +}); describe('ApiError.buildFromResponse', () => { test('handles string error in response body', () => { diff --git a/src/errors.ts b/src/errors.ts index c3677510..d370b3ae 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,14 +1,35 @@ class GoCardlessException extends Error {} class MalformedResponseError extends GoCardlessException { + static BODY_PREVIEW_MAX_LENGTH = 500; + public response: object; public requestId: string; + public statusCode: number | null; public constructor(message, response) { - super(message); + super(MalformedResponseError.buildMessage(message, response)); this.response = response; - this.requestId = response.headers['x-request-id']; + this.statusCode = response?.statusCode ?? null; + this.requestId = response?.headers?.['x-request-id'] ?? null; + } + + private static buildMessage(message, response): string { + let full = message; + const statusCode = response?.statusCode; + if (statusCode !== undefined && statusCode !== null) { + full += ` (HTTP ${statusCode})`; + } + const body = typeof response?.body === 'string' ? response.body : response?.rawBody?.toString?.(); + if (body) { + const preview = + body.length > MalformedResponseError.BODY_PREVIEW_MAX_LENGTH + ? body.slice(0, MalformedResponseError.BODY_PREVIEW_MAX_LENGTH) + '...' + : body; + full += `: ${preview}`; + } + return full; } } diff --git a/src/index.ts b/src/index.ts index 26613837..6d7bf10e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,5 +24,9 @@ export { GoCardlessClient } from './client.js'; export { Environments, CLIENT_VERSION, API_VERSION } from './constants.js'; export { parse, verifySignature, InvalidSignatureError } from './webhooks.js'; export type { APIOptions } from './api/api.js'; +export type { ApiRequestSigningOptions } from './apiRequestSigning.js'; export { toMetadataValue, toMetadata, isValidMetadata, parseMetadataValue } from './metadata-helpers.js'; + +export * from './types/Types.js'; +export * from './errors.js'; diff --git a/src/services/balanceService.ts b/src/services/balanceService.ts index 9b395483..f120701d 100644 --- a/src/services/balanceService.ts +++ b/src/services/balanceService.ts @@ -34,7 +34,7 @@ export class BalanceService { } public async list( - requestParameters: BalanceListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -58,7 +58,7 @@ export class BalanceService { } public async *all( - requestParameters: BalanceListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/bankAccountHolderVerificationService.ts b/src/services/bankAccountHolderVerificationService.ts index 7b0287dc..ba07a6c0 100644 --- a/src/services/bankAccountHolderVerificationService.ts +++ b/src/services/bankAccountHolderVerificationService.ts @@ -16,7 +16,7 @@ interface BankAccountHolderVerificationCreateRequest { // eg. [Confirmation of // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) - type: Types.BankAccountHolderVerificationType; + type: `${Types.BankAccountHolderVerificationType}`; } export class BankAccountHolderVerificationService { diff --git a/src/services/bankDetailsLookupService.ts b/src/services/bankDetailsLookupService.ts index 737f9860..0dbbd4b0 100644 --- a/src/services/bankDetailsLookupService.ts +++ b/src/services/bankDetailsLookupService.ts @@ -31,7 +31,7 @@ interface BankDetailsLookupCreateRequest { branch_code?: string; // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) // alpha-2 code. Must be provided if specifying local details. country_code?: string; diff --git a/src/services/billingRequestFlowService.ts b/src/services/billingRequestFlowService.ts index 0e6c451e..8045cf70 100644 --- a/src/services/billingRequestFlowService.ts +++ b/src/services/billingRequestFlowService.ts @@ -139,7 +139,7 @@ export class BillingRequestFlowService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'billing_request_flows', fetch: null, customHeaders, }; diff --git a/src/services/billingRequestService.ts b/src/services/billingRequestService.ts index f2b0d57b..a6b9858a 100644 --- a/src/services/billingRequestService.ts +++ b/src/services/billingRequestService.ts @@ -39,7 +39,7 @@ interface BillingRequestCreateRequest { // processors understand the payment scenario and apply appropriate processing // rules and risk controls. - payment_context_code?: Types.BillingRequestPaymentContextCode; + payment_context_code?: `${Types.BillingRequestPaymentContextCode}`; // Specifies the underlying purpose of the payment. Defines the specific reason // or type of service/goods the payment relates to, improving straight-through @@ -60,7 +60,7 @@ interface BillingRequestCreateRequest { // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for // the complete list of valid codes. - purpose_code?: Types.BillingRequestPurposeCode; + purpose_code?: `${Types.BillingRequestPurposeCode}`; // subscription_request?: Types.BillingRequestSubscriptionRequest; @@ -97,7 +97,7 @@ interface BillingRequestCollectBankAccountRequest { // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: Types.BillingRequestAccountType; + account_type?: `${Types.BillingRequestAccountType}`; // Bank code - see [local details](#appendix-local-bank-details) for more // information. Alternatively you can provide an `iban`. @@ -110,14 +110,14 @@ interface BillingRequestCollectBankAccountRequest { branch_code?: string; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. currency?: string; @@ -202,13 +202,13 @@ interface BillingRequestListRequest { // used // - status?: Types.BillingRequestStatus; + status?: `${Types.BillingRequestStatus}`; } interface BillingRequestNotifyRequest { // Currently, can only be `email`. - notification_type: Types.BillingRequestNotificationType; + notification_type: `${Types.BillingRequestNotificationType}`; // URL that the payer can be redirected to after authorising the payment. @@ -216,8 +216,8 @@ interface BillingRequestNotifyRequest { } interface BillingRequestChooseCurrencyRequest { - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. currency: string; @@ -230,7 +230,7 @@ interface BillingRequestChooseCurrencyRequest { interface BillingRequestSelectInstitutionRequest { // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) // alpha-2 code. The country code of the institution. If nothing is provided, // institutions with the country code 'GB' are returned by default. @@ -276,7 +276,7 @@ export class BillingRequestService { public async collectCustomerDetails( identity: string, - requestParameters: BillingRequestCollectCustomerDetailsRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -285,7 +285,7 @@ export class BillingRequestService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'billing_requests', fetch: null, customHeaders, }; @@ -301,7 +301,7 @@ export class BillingRequestService { public async collectBankAccount( identity: string, - requestParameters: BillingRequestCollectBankAccountRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -310,7 +310,7 @@ export class BillingRequestService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'billing_requests', fetch: null, customHeaders, }; @@ -326,7 +326,7 @@ export class BillingRequestService { public async confirmPayerDetails( identity: string, - requestParameters: BillingRequestConfirmPayerDetailsRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -335,7 +335,7 @@ export class BillingRequestService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'billing_requests', fetch: null, customHeaders, }; @@ -351,7 +351,7 @@ export class BillingRequestService { public async fulfil( identity: string, - requestParameters: BillingRequestFulfilRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -360,7 +360,7 @@ export class BillingRequestService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'billing_requests', fetch: null, customHeaders, }; @@ -376,7 +376,7 @@ export class BillingRequestService { public async cancel( identity: string, - requestParameters: BillingRequestCancelRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -385,7 +385,7 @@ export class BillingRequestService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'billing_requests', fetch: null, customHeaders, }; @@ -400,7 +400,7 @@ export class BillingRequestService { } public async list( - requestParameters: BillingRequestListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -424,7 +424,7 @@ export class BillingRequestService { } public async *all( - requestParameters: BillingRequestListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -462,7 +462,7 @@ export class BillingRequestService { public async notify( identity: string, - requestParameters: BillingRequestNotifyRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -471,7 +471,7 @@ export class BillingRequestService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'billing_requests', fetch: null, customHeaders, }; @@ -492,7 +492,7 @@ export class BillingRequestService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'billing_requests', fetch: null, customHeaders, }; @@ -508,7 +508,7 @@ export class BillingRequestService { public async chooseCurrency( identity: string, - requestParameters: BillingRequestChooseCurrencyRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -517,7 +517,7 @@ export class BillingRequestService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'billing_requests', fetch: null, customHeaders, }; @@ -533,7 +533,7 @@ export class BillingRequestService { public async selectInstitution( identity: string, - requestParameters: BillingRequestSelectInstitutionRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -542,7 +542,7 @@ export class BillingRequestService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'billing_requests', fetch: null, customHeaders, }; diff --git a/src/services/billingRequestTemplateService.ts b/src/services/billingRequestTemplateService.ts index f08ff765..40404c3d 100644 --- a/src/services/billingRequestTemplateService.ts +++ b/src/services/billingRequestTemplateService.ts @@ -39,7 +39,8 @@ interface BillingRequestTemplateCreateRequest { // required for PayTo and VRP. mandate_request_constraints?: Types.BillingRequestTemplateMandateRequestConstraints; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. mandate_request_currency?: string; @@ -89,7 +90,7 @@ interface BillingRequestTemplateCreateRequest { // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) // for more information. - mandate_request_verify?: Types.BillingRequestTemplateMandateRequestVerify; + mandate_request_verify?: `${Types.BillingRequestTemplateMandateRequestVerify}`; // Key-value store of custom data. Up to 3 keys are permitted, with key names up // to 50 characters and values up to 500 characters. @@ -105,9 +106,9 @@ interface BillingRequestTemplateCreateRequest { payment_request_amount?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // `GBP` and `EUR` supported; `GBP` with your customers in the UK and for `EUR` - // with your customers in supported Eurozone countries only. + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. `GBP` and `EUR` supported; `GBP` with your customers in the UK and for + // `EUR` with your customers in supported Eurozone countries only. payment_request_currency?: string; @@ -142,7 +143,8 @@ interface BillingRequestTemplateUpdateRequest { // required for PayTo and VRP. mandate_request_constraints?: Types.BillingRequestTemplateMandateRequestConstraints; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. mandate_request_currency?: string; @@ -192,7 +194,7 @@ interface BillingRequestTemplateUpdateRequest { // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) // for more information. - mandate_request_verify?: Types.BillingRequestTemplateMandateRequestVerify; + mandate_request_verify?: `${Types.BillingRequestTemplateMandateRequestVerify}`; // Key-value store of custom data. Up to 3 keys are permitted, with key names up // to 50 characters and values up to 500 characters. @@ -208,9 +210,9 @@ interface BillingRequestTemplateUpdateRequest { payment_request_amount?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // `GBP` and `EUR` supported; `GBP` with your customers in the UK and for `EUR` - // with your customers in supported Eurozone countries only. + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. `GBP` and `EUR` supported; `GBP` with your customers in the UK and for + // `EUR` with your customers in supported Eurozone countries only. payment_request_currency?: string; @@ -248,7 +250,7 @@ export class BillingRequestTemplateService { } public async list( - requestParameters: BillingRequestTemplateListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -272,7 +274,7 @@ export class BillingRequestTemplateService { } public async *all( - requestParameters: BillingRequestTemplateListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -336,7 +338,7 @@ export class BillingRequestTemplateService { public async update( identity: string, - requestParameters: BillingRequestTemplateUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; diff --git a/src/services/billingRequestWithActionService.ts b/src/services/billingRequestWithActionService.ts index 2aaf2b1c..6986c622 100644 --- a/src/services/billingRequestWithActionService.ts +++ b/src/services/billingRequestWithActionService.ts @@ -39,7 +39,7 @@ interface BillingRequestWithActionCreateWithActionsRequest { // processors understand the payment scenario and apply appropriate processing // rules and risk controls. - payment_context_code?: Types.BillingRequestWithActionPaymentContextCode; + payment_context_code?: `${Types.BillingRequestWithActionPaymentContextCode}`; // Specifies the underlying purpose of the payment. Defines the specific reason // or type of service/goods the payment relates to, improving straight-through @@ -60,7 +60,7 @@ interface BillingRequestWithActionCreateWithActionsRequest { // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for // the complete list of valid codes. - purpose_code?: Types.BillingRequestWithActionPurposeCode; + purpose_code?: `${Types.BillingRequestWithActionPurposeCode}`; } export class BillingRequestWithActionService { diff --git a/src/services/blockService.ts b/src/services/blockService.ts index 85d4499e..8a748518 100644 --- a/src/services/blockService.ts +++ b/src/services/blockService.ts @@ -19,7 +19,7 @@ interface BlockCreateRequest { // can currently be one of 'email', 'email_domain', 'bank_account', or // 'bank_name'. - block_type?: Types.BlockBlockType; + block_type?: `${Types.BlockBlockType}`; // This field is required if the reason_type is other. It should be a // description of @@ -37,7 +37,7 @@ interface BlockCreateRequest { // of the // above then 'other' can be selected but you must provide a reason description. - reason_type?: Types.BlockReasonType; + reason_type?: `${Types.BlockReasonType}`; // This field is a reference to the value you wish to block. This may be the raw // value @@ -69,7 +69,7 @@ interface BlockListRequest { // can currently be one of 'email', 'email_domain', 'bank_account', or // 'bank_name'. - block_type?: Types.BlockBlockType; + block_type?: `${Types.BlockBlockType}`; // The creation date of this Block. created_at?: Types.CreatedAtFilter; @@ -84,7 +84,7 @@ interface BlockListRequest { // of the // above then 'other' can be selected but you must provide a reason description. - reason_type?: Types.BlockReasonType; + reason_type?: `${Types.BlockReasonType}`; // Fixed [timestamp](#api-usage-dates-and-times), recording when this // resource was updated. @@ -115,12 +115,12 @@ interface BlockBlockByRefRequest { // of the // above then 'other' can be selected but you must provide a reason description. - reason_type?: Types.BlockReasonType; + reason_type?: `${Types.BlockReasonType}`; // Type of entity we will seek to get the associated emails and bank accounts to // create blocks from. This can currently be one of 'customer' or 'mandate'. - reference_type?: Types.BlockReferenceType; + reference_type?: `${Types.BlockReferenceType}`; // This field is a reference to the entity you wish to block based on its emails // and bank accounts. This may be the ID of a customer or a mandate. This means @@ -186,7 +186,7 @@ export class BlockService { } public async list( - requestParameters: BlockListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -210,7 +210,7 @@ export class BlockService { } public async *all( - requestParameters: BlockListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -232,7 +232,7 @@ export class BlockService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'blocks', fetch: null, customHeaders, }; @@ -253,7 +253,7 @@ export class BlockService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'blocks', fetch: null, customHeaders, }; @@ -268,7 +268,7 @@ export class BlockService { } public async block_by_ref( - requestParameters: BlockBlockByRefRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; diff --git a/src/services/creditorBankAccountService.ts b/src/services/creditorBankAccountService.ts index 5256b20d..360c323d 100644 --- a/src/services/creditorBankAccountService.ts +++ b/src/services/creditorBankAccountService.ts @@ -24,7 +24,7 @@ interface CreditorBankAccountCreateRequest { // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: Types.CreditorBankAccountAccountType; + account_type?: `${Types.CreditorBankAccountAccountType}`; // Bank code - see [local details](#appendix-local-bank-details) for more // information. Alternatively you can provide an `iban`. @@ -37,14 +37,14 @@ interface CreditorBankAccountCreateRequest { branch_code?: string; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. currency?: string; @@ -130,7 +130,7 @@ export class CreditorBankAccountService { } public async list( - requestParameters: CreditorBankAccountListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -154,7 +154,7 @@ export class CreditorBankAccountService { } public async *all( - requestParameters: CreditorBankAccountListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -197,7 +197,7 @@ export class CreditorBankAccountService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'creditor_bank_accounts', fetch: null, customHeaders, }; diff --git a/src/services/creditorService.ts b/src/services/creditorService.ts index 7ced3b14..810306b7 100644 --- a/src/services/creditorService.ts +++ b/src/services/creditorService.ts @@ -21,14 +21,14 @@ interface CreditorCreateRequest { bank_reference_prefix?: string; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code: string; // The type of business of the creditor. Currently, `individual`, `company`, // `charity`, `partnership`, and `trust` are supported. - creditor_type: Types.CreditorCreditorType; + creditor_type: `${Types.CreditorCreditorType}`; // The creditor's trading name. @@ -81,7 +81,7 @@ interface CreditorUpdateRequest { city?: string; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; @@ -135,7 +135,7 @@ export class CreditorService { } public async list( - requestParameters: CreditorListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -159,7 +159,7 @@ export class CreditorService { } public async *all( - requestParameters: CreditorListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -197,7 +197,7 @@ export class CreditorService { public async update( identity: string, - requestParameters: CreditorUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; diff --git a/src/services/currencyExchangeRateService.ts b/src/services/currencyExchangeRateService.ts index 7c7939db..04413630 100644 --- a/src/services/currencyExchangeRateService.ts +++ b/src/services/currencyExchangeRateService.ts @@ -38,7 +38,7 @@ export class CurrencyExchangeRateService { } public async list( - requestParameters: CurrencyExchangeRateListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -62,7 +62,7 @@ export class CurrencyExchangeRateService { } public async *all( - requestParameters: CurrencyExchangeRateListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/customerBankAccountService.ts b/src/services/customerBankAccountService.ts index 48d1d05e..95728ded 100644 --- a/src/services/customerBankAccountService.ts +++ b/src/services/customerBankAccountService.ts @@ -26,7 +26,7 @@ interface CustomerBankAccountCreateRequest { // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: Types.CustomerBankAccountAccountType; + account_type?: `${Types.CustomerBankAccountAccountType}`; // Bank code - see [local details](#appendix-local-bank-details) for more // information. Alternatively you can provide an `iban`. @@ -39,14 +39,14 @@ interface CustomerBankAccountCreateRequest { branch_code?: string; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. currency?: string; @@ -133,7 +133,7 @@ export class CustomerBankAccountService { } public async list( - requestParameters: CustomerBankAccountListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -157,7 +157,7 @@ export class CustomerBankAccountService { } public async *all( - requestParameters: CustomerBankAccountListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -195,7 +195,7 @@ export class CustomerBankAccountService { public async update( identity: string, - requestParameters: CustomerBankAccountUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -225,7 +225,7 @@ export class CustomerBankAccountService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'customer_bank_accounts', fetch: null, customHeaders, }; diff --git a/src/services/customerNotificationService.ts b/src/services/customerNotificationService.ts index a4934f13..6829f0e8 100644 --- a/src/services/customerNotificationService.ts +++ b/src/services/customerNotificationService.ts @@ -22,7 +22,7 @@ export class CustomerNotificationService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'customer_notifications', fetch: null, customHeaders, }; diff --git a/src/services/customerService.ts b/src/services/customerService.ts index dfd62895..704e7f6d 100644 --- a/src/services/customerService.ts +++ b/src/services/customerService.ts @@ -34,7 +34,7 @@ interface CustomerCreateRequest { company_name?: string; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; @@ -57,7 +57,7 @@ interface CustomerCreateRequest { given_name?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used // as the language for notification emails sent by GoCardless if your // organisation does not send its own (see [compliance // requirements](#appendix-compliance-requirements)). Currently only "en", "fr", @@ -98,7 +98,7 @@ interface CustomerCreateRequest { interface CustomerListRequest { // Boolean indicating whether the customer has any actions required. - action_required?: Types.CustomerActionRequired; + action_required?: `${Types.CustomerActionRequired}`; // Cursor pointing to the start of the desired set. @@ -111,11 +111,11 @@ interface CustomerListRequest { // The creation date of this Customer. created_at?: Types.CreatedAtFilter; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. - currency?: Types.CustomerCurrency; + currency?: `${Types.CustomerCurrency}`; // Number of records to return. @@ -128,7 +128,7 @@ interface CustomerListRequest { //
  • `desc`
  • // - sort_direction?: Types.CustomerSortDirection; + sort_direction?: `${Types.CustomerSortDirection}`; // Field by which to sort records. // One of: @@ -138,7 +138,7 @@ interface CustomerListRequest { //
  • `created_at`
  • // - sort_field?: Types.CustomerSortField; + sort_field?: `${Types.CustomerSortField}`; } interface CustomerUpdateRequest { @@ -167,7 +167,7 @@ interface CustomerUpdateRequest { company_name?: string; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; @@ -190,7 +190,7 @@ interface CustomerUpdateRequest { given_name?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. Used // as the language for notification emails sent by GoCardless if your // organisation does not send its own (see [compliance // requirements](#appendix-compliance-requirements)). Currently only "en", "fr", @@ -262,7 +262,7 @@ export class CustomerService { } public async list( - requestParameters: CustomerListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -286,7 +286,7 @@ export class CustomerService { } public async *all( - requestParameters: CustomerListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -324,7 +324,7 @@ export class CustomerService { public async update( identity: string, - requestParameters: CustomerUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; diff --git a/src/services/eventService.ts b/src/services/eventService.ts index 3968a009..b0abdb1f 100644 --- a/src/services/eventService.ts +++ b/src/services/eventService.ts @@ -53,9 +53,10 @@ interface EventListRequest { //
  • `scheme_identifier`
  • //
  • `subscription`
  • //
  • `outbound_payment`
  • + //
  • `payment_account_transaction`
  • // - include?: Types.EventInclude; + include?: `${Types.EventInclude}`; // ID of an [instalment schedule](#core-endpoints-instalment-schedules). If // specified, this endpoint will return all events for the given instalment @@ -91,6 +92,11 @@ interface EventListRequest { payment?: string; + // ID of a payment account transaction. If specified, this endpoint will return + // all events for the given transaction. + + payment_account_transaction?: string; + // ID of a [payout](#core-endpoints-payouts). If specified, this endpoint will // return all events for the given payout. @@ -104,8 +110,8 @@ interface EventListRequest { // Type of resource that you'd like to get all events for. // Cannot be used together with the `billing_request`, `creditor`, // `export`,`instalment_schedule`, `mandate`, `payer_authorisation`, `payment`, - // `payout`, `refund`, `scheme_identifier`, `subscription` or `outbound_payment` - // parameters. + // `payout`, `refund`, `scheme_identifier`, `subscription`, `outbound_payment` + // or `payment_account_transaction` parameters. // The type can be one of: //
      //
    • `billing_requests`
    • @@ -120,9 +126,10 @@ interface EventListRequest { //
    • `scheme_identifiers`
    • //
    • `subscriptions`
    • //
    • `outbound_payments`
    • + //
    • `payment_account_transactions`
    • //
    - resource_type?: Types.EventResourceType; + resource_type?: `${Types.EventResourceType}`; // ID of a [scheme identifier](#core-endpoints-scheme-identifiers). If // specified, this endpoint will return all events for the given scheme @@ -144,7 +151,7 @@ export class EventService { } public async list( - requestParameters: EventListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -168,7 +175,7 @@ export class EventService { } public async *all( - requestParameters: EventListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/exportService.ts b/src/services/exportService.ts index 2ca50dfd..f25a0ef3 100644 --- a/src/services/exportService.ts +++ b/src/services/exportService.ts @@ -51,7 +51,7 @@ export class ExportService { } public async list( - requestParameters: ExportListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -75,7 +75,7 @@ export class ExportService { } public async *all( - requestParameters: ExportListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/fundsAvailabilityService.ts b/src/services/fundsAvailabilityService.ts index 2357596a..4a1dda90 100644 --- a/src/services/fundsAvailabilityService.ts +++ b/src/services/fundsAvailabilityService.ts @@ -23,7 +23,7 @@ export class FundsAvailabilityService { public async check( identity: string, - requestParameters: FundsAvailabilityCheckRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; diff --git a/src/services/instalmentScheduleService.ts b/src/services/instalmentScheduleService.ts index 0d706334..2a4bef89 100644 --- a/src/services/instalmentScheduleService.ts +++ b/src/services/instalmentScheduleService.ts @@ -15,11 +15,11 @@ interface InstalmentScheduleCreateWithDatesRequest { app_fee?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. - currency: Types.InstalmentScheduleCurrency; + currency: `${Types.InstalmentScheduleCurrency}`; // An explicit array of instalment payments, each specifying at least an // `amount` and `charge_date`. See [create (with @@ -86,11 +86,11 @@ interface InstalmentScheduleCreateWithScheduleRequest { app_fee?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. - currency: Types.InstalmentScheduleCurrency; + currency: `${Types.InstalmentScheduleCurrency}`; // Frequency of the payments you want to create, together with an array of // payment @@ -178,7 +178,7 @@ interface InstalmentScheduleListRequest { // At most five valid status values - status?: Types.InstalmentScheduleStatus[]; + status?: `${Types.InstalmentScheduleStatus}`[]; } interface InstalmentScheduleUpdateRequest { @@ -248,7 +248,7 @@ export class InstalmentScheduleService { } public async list( - requestParameters: InstalmentScheduleListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -272,7 +272,7 @@ export class InstalmentScheduleService { } public async *all( - requestParameters: InstalmentScheduleListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -310,7 +310,7 @@ export class InstalmentScheduleService { public async update( identity: string, - requestParameters: InstalmentScheduleUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -340,7 +340,7 @@ export class InstalmentScheduleService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'instalment_schedules', fetch: null, customHeaders, }; diff --git a/src/services/institutionService.ts b/src/services/institutionService.ts index 2738458f..24000b90 100644 --- a/src/services/institutionService.ts +++ b/src/services/institutionService.ts @@ -15,7 +15,7 @@ interface InstitutionListRequest { branch_code?: string; // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) // alpha-2 code. The country code of the institution. If nothing is provided, // institutions with the country code 'GB' are returned by default. @@ -37,7 +37,7 @@ interface InstitutionListRequest { interface InstitutionListForBillingRequestRequest { // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) // alpha-2 code. The country code of the institution. If nothing is provided, // institutions with the country code 'GB' are returned by default. @@ -69,7 +69,7 @@ export class InstitutionService { } public async list( - requestParameters: InstitutionListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -94,7 +94,7 @@ export class InstitutionService { public async list_for_billing_request( identity: string, - requestParameters: InstitutionListForBillingRequestRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; diff --git a/src/services/mandateImportEntryService.ts b/src/services/mandateImportEntryService.ts index 3d0f8c63..9278c87a 100644 --- a/src/services/mandateImportEntryService.ts +++ b/src/services/mandateImportEntryService.ts @@ -59,7 +59,7 @@ interface MandateImportEntryListRequest { // error, see the 'processing_errors' value // - status?: Types.MandateImportEntryStatus; + status?: `${Types.MandateImportEntryStatus}`; } export class MandateImportEntryService { @@ -96,7 +96,7 @@ export class MandateImportEntryService { } public async list( - requestParameters: MandateImportEntryListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -120,7 +120,7 @@ export class MandateImportEntryService { } public async *all( - requestParameters: MandateImportEntryListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/mandateImportService.ts b/src/services/mandateImportService.ts index 92c50a35..b4053b90 100644 --- a/src/services/mandateImportService.ts +++ b/src/services/mandateImportService.ts @@ -16,7 +16,7 @@ interface MandateImportCreateRequest { // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and // "sepa_core" are supported. - scheme: Types.MandateImportScheme; + scheme: `${Types.MandateImportScheme}`; } export class MandateImportService { @@ -80,7 +80,7 @@ export class MandateImportService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'mandate_imports', fetch: null, customHeaders, }; @@ -101,7 +101,7 @@ export class MandateImportService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'mandate_imports', fetch: null, customHeaders, }; diff --git a/src/services/mandatePdfService.ts b/src/services/mandatePdfService.ts index 297262ec..c93303d8 100644 --- a/src/services/mandatePdfService.ts +++ b/src/services/mandatePdfService.ts @@ -24,7 +24,7 @@ interface MandatePdfCreateRequest { // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: Types.MandatePdfAccountType; + account_type?: `${Types.MandatePdfAccountType}`; // The first line of the customer's address. @@ -63,7 +63,7 @@ interface MandatePdfCreateRequest { company_name?: string; // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) // alpha-2 code. Required if providing local details. country_code?: string; @@ -140,7 +140,7 @@ interface MandatePdfCreateRequest { // by the mandate. One of `weekly`, `monthly` or `yearly`. Is required if // `subscription_amount` has been provided. - subscription_frequency?: Types.MandatePdfSubscriptionFrequency; + subscription_frequency?: `${Types.MandatePdfSubscriptionFrequency}`; // For Swedish customers only. The civic/company number (personnummer, // samordningsnummer, or organisationsnummer) of the customer. Should only be diff --git a/src/services/mandateService.ts b/src/services/mandateService.ts index eb152cda..2fab83e5 100644 --- a/src/services/mandateService.ts +++ b/src/services/mandateService.ts @@ -21,7 +21,7 @@ interface MandateCreateRequest { // authenticated (maps to SEC code: PPD) // - authorisation_source?: Types.MandateAuthorisationSource; + authorisation_source?: `${Types.MandateAuthorisationSource}`; // Resources linked to this Mandate. links: Types.MandateCreateRequestLinks; @@ -106,7 +106,7 @@ interface MandateListRequest { // One or more valid statuses - status?: Types.MandateStatus[]; + status?: `${Types.MandateStatus}`[]; } interface MandateUpdateRequest { @@ -164,7 +164,7 @@ export class MandateService { } public async list( - requestParameters: MandateListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -188,7 +188,7 @@ export class MandateService { } public async *all( - requestParameters: MandateListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -226,7 +226,7 @@ export class MandateService { public async update( identity: string, - requestParameters: MandateUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -251,7 +251,7 @@ export class MandateService { public async cancel( identity: string, - requestParameters: MandateCancelRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -260,7 +260,7 @@ export class MandateService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'mandates', fetch: null, customHeaders, }; @@ -276,7 +276,7 @@ export class MandateService { public async reinstate( identity: string, - requestParameters: MandateReinstateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -285,7 +285,7 @@ export class MandateService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'mandates', fetch: null, customHeaders, }; diff --git a/src/services/negativeBalanceLimitService.ts b/src/services/negativeBalanceLimitService.ts index 293944eb..db6fb59a 100644 --- a/src/services/negativeBalanceLimitService.ts +++ b/src/services/negativeBalanceLimitService.ts @@ -21,11 +21,11 @@ interface NegativeBalanceLimitListRequest { creditor?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. - currency?: Types.NegativeBalanceLimitCurrency; + currency?: `${Types.NegativeBalanceLimitCurrency}`; // Number of records to return. @@ -40,7 +40,7 @@ export class NegativeBalanceLimitService { } public async list( - requestParameters: NegativeBalanceLimitListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -64,7 +64,7 @@ export class NegativeBalanceLimitService { } public async *all( - requestParameters: NegativeBalanceLimitListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/outboundPaymentImportEntryService.ts b/src/services/outboundPaymentImportEntryService.ts new file mode 100644 index 00000000..b117dc61 --- /dev/null +++ b/src/services/outboundPaymentImportEntryService.ts @@ -0,0 +1,75 @@ +import { Api } from '../api/api.js'; +import * as Types from '../types/Types.js'; + +interface OutboundPaymentImportEntryResponse extends Types.OutboundPaymentImportEntry, Types.APIResponse {} + +interface OutboundPaymentImportEntryListResponse extends Types.APIResponse { + outbound_payment_import_entries: Array; + meta: Types.ListMeta; +} + +interface OutboundPaymentImportEntryListRequest { + // Cursor pointing to the start of the desired set. + + after?: string; + + // Cursor pointing to the end of the desired set. + + before?: string; + + // Number of records to return. + + limit?: string; + + // Unique identifier, beginning with "IM". + + outbound_payment_import: string; +} + +export class OutboundPaymentImportEntryService { + private api: Api; + + constructor(api) { + this.api = api; + } + + public async list( + requestParameters?: Partial, + customHeaders: Types.JsonMap = {}, + ): Promise { + const urlParameters = []; + const requestParams = { + path: '/outbound_payment_import_entries', + method: 'get', + urlParameters, + requestParameters, + payloadKey: null, + fetch: null, + customHeaders, + }; + + const response = await this.api.request(requestParams); + const formattedResponse: OutboundPaymentImportEntryListResponse = { + ...response.body, + __response__: response.__response__, + }; + + return formattedResponse; + } + + public async *all( + requestParameters?: Partial, + customHeaders: Types.JsonMap = {}, + ): AsyncGenerator { + let cursor = undefined; + do { + const list = await this.list({ ...requestParameters, after: cursor }, customHeaders); + + for (const outboundpaymentimportentry of list.outbound_payment_import_entries) { + yield outboundpaymentimportentry; + } + + cursor = list.meta.cursors.after; + } while (cursor); + } +} diff --git a/src/services/outboundPaymentImportService.ts b/src/services/outboundPaymentImportService.ts new file mode 100644 index 00000000..6411c600 --- /dev/null +++ b/src/services/outboundPaymentImportService.ts @@ -0,0 +1,145 @@ +import { Api } from '../api/api.js'; +import * as Types from '../types/Types.js'; + +interface OutboundPaymentImportResponse extends Types.OutboundPaymentImport, Types.APIResponse {} + +interface OutboundPaymentImportListResponse extends Types.APIResponse { + outbound_payment_imports: Array; + meta: Types.ListMeta; +} + +interface OutboundPaymentImportCreateRequest { + // + + entry_items: Types.OutboundPaymentImportEntryItem[]; + + // Resources linked to this OutboundPaymentImport. + links?: Types.OutboundPaymentImportCreateRequestLinks; +} + +interface OutboundPaymentImportListRequest { + // Cursor pointing to the start of the desired set. + + after?: string; + + // Cursor pointing to the end of the desired set. + + before?: string; + + // The creation date of this OutboundPaymentImport. + created_at?: Types.CreatedAtFilter; + + // Number of records to return. + + limit?: string; + + // The status of the outbound payment import. + //
      + //
    • `created`: The initial state of a new import.
    • + //
    • `validating`: Import validation in progress.
    • + //
    • `invalid`: Import validation failed.
    • + //
    • `valid`: Import validation succeeded.
    • + //
    • `processing`: Authorisation received; payments are being generated.
    • + //
    • `processed`: All entries have been successfully converted into outbound + // payments.
    • + //
    • `cancelled`: The import was cancelled by a user or automatically expired + // by the system.
    • + //
    + + status?: `${Types.OutboundPaymentImportStatus}`; +} + +export class OutboundPaymentImportService { + private api: Api; + + constructor(api) { + this.api = api; + } + + public async create( + requestParameters: OutboundPaymentImportCreateRequest, + idempotencyKey = '', + customHeaders: Types.JsonMap = {}, + ): Promise { + const urlParameters = []; + const requestParams = { + path: '/outbound_payment_imports', + method: 'post', + urlParameters, + requestParameters, + payloadKey: 'outbound_payment_imports', + idempotencyKey, + customHeaders, + fetch: async (identity) => await this.find(identity), + }; + + const response = await this.api.request(requestParams); + const formattedResponse: OutboundPaymentImportResponse = { + ...(response.body?.['outbound_payment_imports'] ?? response), + __response__: response.__response__, + }; + + return formattedResponse; + } + + public async find(identity: string, customHeaders: Types.JsonMap = {}): Promise { + const urlParameters = [{ key: 'identity', value: identity }]; + const requestParams = { + path: '/outbound_payment_imports/:identity', + method: 'get', + urlParameters, + + payloadKey: null, + fetch: null, + customHeaders, + }; + + const response = await this.api.request(requestParams); + const formattedResponse: OutboundPaymentImportResponse = { + ...response.body['outbound_payment_imports'], + __response__: response.__response__, + }; + + return formattedResponse; + } + + public async list( + requestParameters?: Partial, + customHeaders: Types.JsonMap = {}, + ): Promise { + const urlParameters = []; + const requestParams = { + path: '/outbound_payment_imports', + method: 'get', + urlParameters, + requestParameters, + payloadKey: null, + fetch: null, + customHeaders, + }; + + const response = await this.api.request(requestParams); + const formattedResponse: OutboundPaymentImportListResponse = { + ...response.body, + __response__: response.__response__, + }; + + return formattedResponse; + } + + public async *all( + requestParameters?: Partial, + customHeaders: Types.JsonMap = {}, + ): AsyncGenerator { + let cursor = undefined; + do { + const list = await this.list({ ...requestParameters, after: cursor }, customHeaders); + + for (const outboundpaymentimport of list.outbound_payment_imports) { + yield outboundpaymentimport; + } + + cursor = list.meta.cursors.after; + } while (cursor); + } +} diff --git a/src/services/outboundPaymentService.ts b/src/services/outboundPaymentService.ts index 6242ed3b..66f68a4a 100644 --- a/src/services/outboundPaymentService.ts +++ b/src/services/outboundPaymentService.ts @@ -41,7 +41,7 @@ interface OutboundPaymentCreateRequest { // Bank payment scheme to process the outbound payment. Currently only // "faster_payments" (GBP) is supported. - scheme: Types.OutboundPaymentScheme; + scheme: `${Types.OutboundPaymentScheme}`; } interface OutboundPaymentWithdrawRequest { @@ -77,7 +77,7 @@ interface OutboundPaymentWithdrawRequest { // Bank payment scheme to process the outbound payment. Currently only // "faster_payments" (GBP) is supported. - scheme: Types.OutboundPaymentScheme; + scheme: `${Types.OutboundPaymentScheme}`; } interface OutboundPaymentCancelRequest { @@ -129,7 +129,7 @@ interface OutboundPaymentListRequest { // after executing. // - status?: Types.OutboundPaymentStatus; + status?: `${Types.OutboundPaymentStatus}`; } interface OutboundPaymentUpdateRequest { @@ -173,8 +173,7 @@ export class OutboundPaymentService { } public async withdraw( - identity: string, - requestParameters: OutboundPaymentWithdrawRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -183,7 +182,7 @@ export class OutboundPaymentService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'outbound_payments', fetch: null, customHeaders, }; @@ -199,7 +198,7 @@ export class OutboundPaymentService { public async cancel( identity: string, - requestParameters: OutboundPaymentCancelRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -208,7 +207,7 @@ export class OutboundPaymentService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'outbound_payments', fetch: null, customHeaders, }; @@ -229,7 +228,7 @@ export class OutboundPaymentService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'outbound_payments', fetch: null, customHeaders, }; @@ -265,7 +264,7 @@ export class OutboundPaymentService { } public async list( - requestParameters: OutboundPaymentListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -289,7 +288,7 @@ export class OutboundPaymentService { } public async *all( - requestParameters: OutboundPaymentListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -306,7 +305,7 @@ export class OutboundPaymentService { public async update( identity: string, - requestParameters: OutboundPaymentUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -329,7 +328,7 @@ export class OutboundPaymentService { return formattedResponse; } - public async stats(identity: string, customHeaders: Types.JsonMap = {}): Promise { + public async stats(customHeaders: Types.JsonMap = {}): Promise { const urlParameters = []; const requestParams = { path: '/outbound_payments/stats', diff --git a/src/services/payerAuthorisationService.ts b/src/services/payerAuthorisationService.ts index 7e2fa93c..b41b1f06 100644 --- a/src/services/payerAuthorisationService.ts +++ b/src/services/payerAuthorisationService.ts @@ -92,7 +92,7 @@ export class PayerAuthorisationService { public async update( identity: string, - requestParameters: PayerAuthorisationUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -122,7 +122,7 @@ export class PayerAuthorisationService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'payer_authorisations', fetch: null, customHeaders, }; @@ -143,7 +143,7 @@ export class PayerAuthorisationService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'payer_authorisations', fetch: null, customHeaders, }; diff --git a/src/services/paymentAccountService.ts b/src/services/paymentAccountService.ts index f5237b96..37980e80 100644 --- a/src/services/paymentAccountService.ts +++ b/src/services/paymentAccountService.ts @@ -51,7 +51,7 @@ export class PaymentAccountService { } public async list( - requestParameters: PaymentAccountListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -75,7 +75,7 @@ export class PaymentAccountService { } public async *all( - requestParameters: PaymentAccountListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/paymentAccountTransactionService.ts b/src/services/paymentAccountTransactionService.ts index 465391fc..559cf9c7 100644 --- a/src/services/paymentAccountTransactionService.ts +++ b/src/services/paymentAccountTransactionService.ts @@ -21,7 +21,7 @@ interface PaymentAccountTransactionListRequest { // outbound payment), while credits signify money coming in (e.g. manual // top-up). - direction?: Types.PaymentAccountTransactionDirection; + direction?: `${Types.PaymentAccountTransactionDirection}`; // Number of records to return. @@ -66,7 +66,7 @@ export class PaymentAccountTransactionService { public async list( identity: string, - requestParameters: PaymentAccountTransactionListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -91,7 +91,7 @@ export class PaymentAccountTransactionService { public async *all( identity: string, - requestParameters: PaymentAccountTransactionListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/paymentService.ts b/src/services/paymentService.ts index 6ff882e1..dfa1ccf8 100644 --- a/src/services/paymentService.ts +++ b/src/services/paymentService.ts @@ -27,11 +27,11 @@ interface PaymentCreateRequest { charge_date?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. - currency: Types.PaymentCurrency; + currency: `${Types.PaymentCurrency}`; // A human-readable description of the payment. This will be included in the // notification email GoCardless sends to your customer if your organisation @@ -65,7 +65,7 @@ interface PaymentCreateRequest { // recurring subscription payment). // - psu_interaction_type?: Types.PaymentPsuInteractionType; + psu_interaction_type?: `${Types.PaymentPsuInteractionType}`; // An optional reference that will appear on your customer's bank statement. The // character limit for this reference is dependent on the scheme.
    @@ -115,11 +115,11 @@ interface PaymentListRequest { creditor?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. - currency?: Types.PaymentCurrency; + currency?: `${Types.PaymentCurrency}`; // ID of a customer to filter payments by. If you pass this parameter, you // cannot also pass `creditor`. @@ -148,7 +148,7 @@ interface PaymentListRequest { //
  • `desc`
  • // - sort_direction?: Types.PaymentSortDirection; + sort_direction?: `${Types.PaymentSortDirection}`; // Field by which to sort records. // One of: @@ -157,7 +157,7 @@ interface PaymentListRequest { //
  • `amount`
  • // - sort_field?: Types.PaymentSortField; + sort_field?: `${Types.PaymentSortField}`; // One of: //
      @@ -177,7 +177,7 @@ interface PaymentListRequest { //
    • `charged_back`: the payment has been charged back
    • //
    - status?: Types.PaymentStatus; + status?: `${Types.PaymentStatus}`; // Unique identifier, beginning with "SB". @@ -255,7 +255,7 @@ export class PaymentService { } public async list( - requestParameters: PaymentListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -279,7 +279,7 @@ export class PaymentService { } public async *all( - requestParameters: PaymentListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -317,7 +317,7 @@ export class PaymentService { public async update( identity: string, - requestParameters: PaymentUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -342,7 +342,7 @@ export class PaymentService { public async cancel( identity: string, - requestParameters: PaymentCancelRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -351,7 +351,7 @@ export class PaymentService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'payments', fetch: null, customHeaders, }; @@ -367,7 +367,7 @@ export class PaymentService { public async retry( identity: string, - requestParameters: PaymentRetryRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -376,7 +376,7 @@ export class PaymentService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'payments', fetch: null, customHeaders, }; diff --git a/src/services/payoutItemService.ts b/src/services/payoutItemService.ts index 2fd1cf08..54087dd8 100644 --- a/src/services/payoutItemService.ts +++ b/src/services/payoutItemService.ts @@ -20,7 +20,7 @@ interface PayoutItemListRequest { // Boolean value indicating whether the API should return tax data for the // cutover period of April to August 2020. Defaults to false. - include_2020_tax_cutover?: Types.PayoutItemInclude2020TaxCutover; + include_2020_tax_cutover?: `${Types.PayoutItemInclude2020TaxCutover}`; // Number of records to return. @@ -39,7 +39,7 @@ export class PayoutItemService { } public async list( - requestParameters: PayoutItemListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -63,7 +63,7 @@ export class PayoutItemService { } public async *all( - requestParameters: PayoutItemListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/payoutService.ts b/src/services/payoutService.ts index b2a99a4b..d6c0b777 100644 --- a/src/services/payoutService.ts +++ b/src/services/payoutService.ts @@ -28,11 +28,11 @@ interface PayoutListRequest { creditor_bank_account?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. - currency?: Types.PayoutCurrency; + currency?: `${Types.PayoutCurrency}`; // Number of records to return. @@ -46,7 +46,7 @@ interface PayoutListRequest { // Whether a payout contains merchant revenue or partner fees. - payout_type?: Types.PayoutPayoutType; + payout_type?: `${Types.PayoutPayoutType}`; // Reference which appears on the creditor's bank statement. @@ -61,7 +61,7 @@ interface PayoutListRequest { //
  • `bounced`: the payout bounced when sent, the payout can be retried.
  • // - status?: Types.PayoutStatus; + status?: `${Types.PayoutStatus}`; } interface PayoutUpdateRequest { @@ -79,7 +79,7 @@ export class PayoutService { } public async list( - requestParameters: PayoutListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -103,7 +103,7 @@ export class PayoutService { } public async *all( - requestParameters: PayoutListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -141,7 +141,7 @@ export class PayoutService { public async update( identity: string, - requestParameters: PayoutUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; diff --git a/src/services/redirectFlowService.ts b/src/services/redirectFlowService.ts index 5907ee89..9443c814 100644 --- a/src/services/redirectFlowService.ts +++ b/src/services/redirectFlowService.ts @@ -40,7 +40,7 @@ interface RedirectFlowCreateRequest { // recommended that you leave this blank so the most appropriate scheme is // picked based on the customer's bank account. - scheme?: Types.RedirectFlowScheme; + scheme?: `${Types.RedirectFlowScheme}`; // The customer's session ID must be provided when the redirect flow is set up // and again when it is completed. This allows integrators to ensure that the @@ -120,7 +120,7 @@ export class RedirectFlowService { public async complete( identity: string, - requestParameters: RedirectFlowCompleteRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -129,7 +129,7 @@ export class RedirectFlowService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'redirect_flows', fetch: null, customHeaders, }; diff --git a/src/services/refundService.ts b/src/services/refundService.ts index dc0075b7..9f9004a6 100644 --- a/src/services/refundService.ts +++ b/src/services/refundService.ts @@ -87,7 +87,7 @@ interface RefundListRequest { //
  • `mandate`: returns refunds created against mandates only
  • // - refund_type?: Types.RefundRefundType; + refund_type?: `${Types.RefundRefundType}`; } interface RefundUpdateRequest { @@ -131,7 +131,7 @@ export class RefundService { } public async list( - requestParameters: RefundListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -155,7 +155,7 @@ export class RefundService { } public async *all( - requestParameters: RefundListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -193,7 +193,7 @@ export class RefundService { public async update( identity: string, - requestParameters: RefundUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; diff --git a/src/services/scenarioSimulatorService.ts b/src/services/scenarioSimulatorService.ts index 026dea6f..db70785f 100644 --- a/src/services/scenarioSimulatorService.ts +++ b/src/services/scenarioSimulatorService.ts @@ -22,7 +22,7 @@ export class ScenarioSimulatorService { public async run( identity: string, - requestParameters: ScenarioSimulatorRunRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -31,7 +31,7 @@ export class ScenarioSimulatorService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'scenario_simulators', fetch: null, customHeaders, }; diff --git a/src/services/schemeIdentifierService.ts b/src/services/schemeIdentifierService.ts index 4a76badf..61ba5c37 100644 --- a/src/services/schemeIdentifierService.ts +++ b/src/services/schemeIdentifierService.ts @@ -19,7 +19,7 @@ interface SchemeIdentifierCreateRequest { // The scheme which this scheme identifier applies to. - scheme: Types.SchemeIdentifierScheme; + scheme: `${Types.SchemeIdentifierScheme}`; } interface SchemeIdentifierListRequest { @@ -74,7 +74,7 @@ export class SchemeIdentifierService { } public async list( - requestParameters: SchemeIdentifierListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -98,7 +98,7 @@ export class SchemeIdentifierService { } public async *all( - requestParameters: SchemeIdentifierListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/subscriptionService.ts b/src/services/subscriptionService.ts index 914e93f4..335beb88 100644 --- a/src/services/subscriptionService.ts +++ b/src/services/subscriptionService.ts @@ -24,8 +24,8 @@ interface SubscriptionCreateRequest { count?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. - // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. currency: string; @@ -55,7 +55,7 @@ interface SubscriptionCreateRequest { // The unit of time between customer charge dates. One of `weekly`, `monthly` or // `yearly`. - interval_unit: Types.SubscriptionIntervalUnit; + interval_unit: `${Types.SubscriptionIntervalUnit}`; // Resources linked to this Subscription. links: Types.SubscriptionCreateRequestLinks; @@ -70,7 +70,7 @@ interface SubscriptionCreateRequest { // when the interval_unit is `yearly`. // - month?: Types.SubscriptionMonth; + month?: `${Types.SubscriptionMonth}`; // Optional name for the subscription. This will be set as the description on // each payment created. Must not exceed 255 characters. @@ -141,7 +141,7 @@ interface SubscriptionListRequest { // // Omit entirely to include subscriptions in all states. - status?: Types.SubscriptionStatus[]; + status?: `${Types.SubscriptionStatus}`[]; } interface SubscriptionUpdateRequest { @@ -252,7 +252,7 @@ export class SubscriptionService { } public async list( - requestParameters: SubscriptionListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -276,7 +276,7 @@ export class SubscriptionService { } public async *all( - requestParameters: SubscriptionListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -314,7 +314,7 @@ export class SubscriptionService { public async update( identity: string, - requestParameters: SubscriptionUpdateRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -339,7 +339,7 @@ export class SubscriptionService { public async pause( identity: string, - requestParameters: SubscriptionPauseRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -348,7 +348,7 @@ export class SubscriptionService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'subscriptions', fetch: null, customHeaders, }; @@ -364,7 +364,7 @@ export class SubscriptionService { public async resume( identity: string, - requestParameters: SubscriptionResumeRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -373,7 +373,7 @@ export class SubscriptionService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'subscriptions', fetch: null, customHeaders, }; @@ -389,7 +389,7 @@ export class SubscriptionService { public async cancel( identity: string, - requestParameters: SubscriptionCancelRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = [{ key: 'identity', value: identity }]; @@ -398,7 +398,7 @@ export class SubscriptionService { method: 'post', urlParameters, requestParameters, - payloadKey: null, + payloadKey: 'subscriptions', fetch: null, customHeaders, }; diff --git a/src/services/taxRateService.ts b/src/services/taxRateService.ts index ec403275..18a3063b 100644 --- a/src/services/taxRateService.ts +++ b/src/services/taxRateService.ts @@ -34,7 +34,7 @@ export class TaxRateService { } public async list( - requestParameters: TaxRateListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -58,7 +58,7 @@ export class TaxRateService { } public async *all( - requestParameters: TaxRateListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/verificationDetailService.ts b/src/services/verificationDetailService.ts index 11d0a61b..72b03330 100644 --- a/src/services/verificationDetailService.ts +++ b/src/services/verificationDetailService.ts @@ -101,7 +101,7 @@ export class VerificationDetailService { } public async list( - requestParameters: VerificationDetailListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -125,7 +125,7 @@ export class VerificationDetailService { } public async *all( - requestParameters: VerificationDetailListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; diff --git a/src/services/webhookService.ts b/src/services/webhookService.ts index aa17118d..3faa885c 100644 --- a/src/services/webhookService.ts +++ b/src/services/webhookService.ts @@ -41,7 +41,7 @@ export class WebhookService { } public async list( - requestParameters: WebhookListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): Promise { const urlParameters = []; @@ -65,7 +65,7 @@ export class WebhookService { } public async *all( - requestParameters: WebhookListRequest, + requestParameters?: Partial, customHeaders: Types.JsonMap = {}, ): AsyncGenerator { let cursor = undefined; @@ -108,7 +108,7 @@ export class WebhookService { method: 'post', urlParameters, - payloadKey: null, + payloadKey: 'webhooks', fetch: null, customHeaders, }; diff --git a/src/types/Types.ts b/src/types/Types.ts index a7041cfa..58c7b5b8 100644 --- a/src/types/Types.ts +++ b/src/types/Types.ts @@ -21,12 +21,12 @@ export type Balance = { // pending_payouts will only be non-zero while we are generating and // submitting the payouts to our partner bank. // - balance_type?: BalanceBalanceType; + balance_type?: `${BalanceBalanceType}`; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. - currency?: BalanceCurrency; + currency?: `${BalanceCurrency}`; // Dynamic [timestamp](#api-usage-dates-and-times) recording when this // resource was last updated. @@ -106,7 +106,7 @@ export type BankAccountHolderVerification = { //
  • `unable_to_match`: The verification could not be performed due to // recipient bank issues or technical issues
  • // - result?: BankAccountHolderVerificationResult; + result?: `${BankAccountHolderVerificationResult}`; // The status of the bank account holder verification. //
      @@ -116,12 +116,12 @@ export type BankAccountHolderVerification = { // used. //
    // - status: BankAccountHolderVerificationStatus; + status: `${BankAccountHolderVerificationStatus}`; // Type of the verification that has been performed // eg. [Confirmation of // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) - type: BankAccountHolderVerificationType; + type: `${BankAccountHolderVerificationType}`; }; /** Type for a bankaccountholderverificationcreaterequestlinks resource. */ @@ -149,7 +149,7 @@ export enum BankAccountHolderVerificationStatus { /** Type for a bankauthorisation resource. */ export type BankAuthorisation = { // Type of authorisation, can be either 'mandate' or 'payment'. - authorisation_type?: BankAuthorisationAuthorisationType; + authorisation_type?: `${BankAuthorisationAuthorisationType}`; // Fixed [timestamp](#api-usage-dates-and-times), recording when the user has // been authorised. @@ -232,7 +232,7 @@ export type BankAuthorisationLinks = { export type BankDetailsLookup = { // Array of [schemes](#mandates_scheme) supported for this bank account. This // will be an empty array if the bank account is not reachable by any schemes. - available_debit_schemes?: BankDetailsLookupAvailableDebitScheme[]; + available_debit_schemes?: `${BankDetailsLookupAvailableDebitScheme}`[]; // The name of the bank with which the account is held (if available). bank_name?: string | null; @@ -292,7 +292,7 @@ export type BillingRequest = { links?: BillingRequestLinks; // Request for a mandate - mandate_request?: BillingRequestMandateRequest; + mandate_request?: BillingRequestMandateRequest | null; // Key-value store of custom data. Up to 3 keys are permitted, with key names // up to 50 characters and values up to 500 characters. @@ -303,7 +303,7 @@ export type BillingRequest = { // transactions, ecommerce, or account transfers. This helps banks and payment // processors understand the payment scenario and apply appropriate processing // rules and risk controls. - payment_context_code?: BillingRequestPaymentContextCode; + payment_context_code?: `${BillingRequestPaymentContextCode}`; // Specifies the underlying purpose of the payment. Defines the specific // reason or type of service/goods the payment relates to, improving @@ -314,7 +314,7 @@ export type BillingRequest = { payment_purpose_code?: string; // Request for a one-off strongly authorised payment - payment_request?: BillingRequestPaymentRequest; + payment_request?: BillingRequestPaymentRequest | null; // Specifies the high-level purpose/category of a mandate and/or payment using // a set of pre-defined categories. Provides context on the nature and reason @@ -322,7 +322,7 @@ export type BillingRequest = { // See [Billing Request Purpose // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for // the complete list of valid codes. - purpose_code?: BillingRequestPurposeCode; + purpose_code?: `${BillingRequestPurposeCode}`; // resources?: BillingRequestResources; @@ -338,7 +338,7 @@ export type BillingRequest = { //
  • `cancelled`: the billing request has been cancelled and cannot be // used
  • // - status?: BillingRequestStatus; + status?: `${BillingRequestStatus}`; // Request for a subscription subscription_request?: BillingRequestSubscriptionRequest | null; @@ -447,7 +447,7 @@ export type BillingRequestCustomer = { // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. // Used as the language for notification emails sent by GoCardless if your // organisation does not send its own (see [compliance // requirements](#appendix-compliance-requirements)). Currently only "en", @@ -481,7 +481,7 @@ export type BillingRequestCustomerBillingDetail = { city?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // For Danish customers only. The civic/company number (CPR or CVR) of the @@ -556,7 +556,7 @@ export type BillingRequestAction = { // - `success`: we inferred the institution and added it to the resources of a // Billing Request // - institution_guess_status?: BillingRequestActionInstitutionGuessStatus; + institution_guess_status?: `${BillingRequestActionInstitutionGuessStatus}`; // Informs you whether the action is required to fulfil the billing request or // not. @@ -566,25 +566,24 @@ export type BillingRequestAction = { requires_actions?: string[]; // Status of the action - status?: BillingRequestActionStatus; + status?: `${BillingRequestActionStatus}`; // Unique identifier for the action. - type?: BillingRequestActionType; + type?: `${BillingRequestActionType}`; }; /** Type for a billingrequestactionbankauthorisation resource. */ export type BillingRequestActionBankAuthorisation = { // Which authorisation adapter will be used to power these authorisations // (GoCardless internal use only) - adapter?: BillingRequestActionBankAuthorisationAdapter; + adapter?: `${BillingRequestActionBankAuthorisationAdapter}`; // What type of bank authorisations are supported on this billing request - authorisation_type?: BillingRequestActionBankAuthorisationAuthorisationType; + authorisation_type?: `${BillingRequestActionBankAuthorisationAuthorisationType}`; }; export enum BillingRequestActionBankAuthorisationAdapter { OpenBankingGatewayPis = 'open_banking_gateway_pis', - PlaidAis = 'plaid_ais', OpenBankingGatewayAis = 'open_banking_gateway_ais', BankidAis = 'bankid_ais', BankPayRecurring = 'bank_pay_recurring', @@ -642,7 +641,7 @@ export type BillingRequestInstalmentScheduleRequest = { // denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "USD" and "CAD" are supported. currency?: string; @@ -728,7 +727,7 @@ export type BillingRequestInstalmentScheduleRequestInstalmentsWithSchedule = { // The unit of time between customer charge dates. One of `weekly`, `monthly` // or `yearly`. - interval_unit: BillingRequestInstalmentScheduleRequestInstalmentsWithScheduleIntervalUnit; + interval_unit: `${BillingRequestInstalmentScheduleRequestInstalmentsWithScheduleIntervalUnit}`; // The date on which the first payment should be charged. Must be on or after // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When @@ -824,7 +823,7 @@ export type BillingRequestMandateRequest = { // paper: Authorisation is provided in writing and signed, or similarly // authenticated (maps to SEC code: PPD) // - authorisation_source?: BillingRequestMandateRequestAuthorisationSource; + authorisation_source?: `${BillingRequestMandateRequestAuthorisationSource}`; // This attribute represents the authorisation type between the payer and // merchant. It can be set to `one_off`, @@ -838,7 +837,7 @@ export type BillingRequestMandateRequest = { // required for PayTo and VRP. constraints?: BillingRequestMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. currency?: string; @@ -856,7 +855,7 @@ export type BillingRequestMandateRequest = { // merchant where // invoicing will be handled separately. // - funds_settlement?: BillingRequestMandateRequestFundsSettlement; + funds_settlement?: `${BillingRequestMandateRequestFundsSettlement}`; // Resources linked to this BillingRequestMandateRequest. links?: BillingRequestMandateRequestLinks; @@ -910,7 +909,7 @@ export type BillingRequestMandateRequest = { // See [Billing Requests: Creating Verified // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) // for more information. - verify?: BillingRequestMandateRequestVerify; + verify?: `${BillingRequestMandateRequestVerify}`; }; export enum BillingRequestMandateRequestAuthorisationSource { @@ -966,10 +965,14 @@ export type BillingRequestMandateRequestConstraintsPeriodicLimit = { // period. For example Monthly it will expire on the same day of the next // month, or yearly the same day of the next year. // - alignment?: BillingRequestMandateRequestConstraintsPeriodicLimitAlignment; + alignment?: `${BillingRequestMandateRequestConstraintsPeriodicLimitAlignment}`; - // (Optional) The maximum number of payments that can be collected in this - // periodic limit. + // The maximum number of payments that can be collected in this periodic + // limit. + // _Note:_ Only supported for the PayTo scheme, where it is required. + // Providing this field for other VRP schemes will result in a validation + // error. + // max_payments?: number; // The maximum total amount that can be charged for all payments in this @@ -980,7 +983,7 @@ export type BillingRequestMandateRequestConstraintsPeriodicLimit = { // The repeating period for this mandate. Defaults to flexible for PayTo if // not specified. - period?: BillingRequestMandateRequestConstraintsPeriodicLimitPeriod; + period?: `${BillingRequestMandateRequestConstraintsPeriodicLimitPeriod}`; }; export enum BillingRequestMandateRequestConstraintsPeriodicLimitAlignment { @@ -1026,7 +1029,7 @@ export type BillingRequestPaymentRequest = { // denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. `GBP` and `EUR` supported; `GBP` with your customers in the UK and // for `EUR` with your customers in supported Eurozone countries only. currency?: string; @@ -1045,7 +1048,7 @@ export type BillingRequestPaymentRequest = { // merchant where // invoicing will be handled separately. // - funds_settlement?: BillingRequestPaymentRequestFundsSettlement; + funds_settlement?: `${BillingRequestPaymentRequestFundsSettlement}`; // Resources linked to this BillingRequestPaymentRequest. links?: BillingRequestPaymentRequestLinks; @@ -1119,7 +1122,7 @@ export type BillingRequestResourcesCustomer = { // Unique identifier, beginning with "CU". id?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. // Used as the language for notification emails sent by GoCardless if your // organisation does not send its own (see [compliance // requirements](#appendix-compliance-requirements)). Currently only "en", @@ -1153,7 +1156,7 @@ export type BillingRequestResourcesCustomerBankAccount = { // Bank account type. Required for USD-denominated bank accounts. Must not be // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: BillingRequestResourcesCustomerBankAccountAccountType; + account_type?: `${BillingRequestResourcesCustomerBankAccountAccountType}`; // A token to uniquely refer to a set of bank account details. This feature is // still in early access and is only available for certain organisations. @@ -1163,7 +1166,7 @@ export type BillingRequestResourcesCustomerBankAccount = { bank_name?: string; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string | null; @@ -1172,7 +1175,7 @@ export type BillingRequestResourcesCustomerBankAccount = { // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. currency?: string | null; @@ -1218,7 +1221,7 @@ export type BillingRequestResourcesCustomerBillingDetail = { city?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource @@ -1274,7 +1277,7 @@ export type BillingRequestSubscriptionRequest = { // The total number of payments that should be taken by this subscription. count?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "USD" and "CAD" are supported. currency?: string; @@ -1289,7 +1292,7 @@ export type BillingRequestSubscriptionRequest = { // The unit of time between customer charge dates. One of `weekly`, `monthly` // or `yearly`. - interval_unit?: BillingRequestSubscriptionRequestIntervalUnit; + interval_unit?: `${BillingRequestSubscriptionRequestIntervalUnit}`; // Resources linked to this BillingRequestSubscriptionRequest. links?: BillingRequestSubscriptionRequestLinks; @@ -1302,7 +1305,7 @@ export type BillingRequestSubscriptionRequest = { // applies // when the interval_unit is `yearly`. // - month?: BillingRequestSubscriptionRequestMonth; + month?: `${BillingRequestSubscriptionRequestMonth}`; // Optional name for the subscription. This will be set as the description on // each payment created. Must not exceed 255 characters. @@ -1478,7 +1481,7 @@ export type BillingRequestFlowPrefilledBankAccount = { // Bank account type for USD-denominated bank accounts. Must not be provided // for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: BillingRequestFlowPrefilledBankAccountAccountType; + account_type?: `${BillingRequestFlowPrefilledBankAccountAccountType}`; }; export enum BillingRequestFlowPrefilledBankAccountAccountType { @@ -1505,7 +1508,7 @@ export type BillingRequestFlowPrefilledCustomer = { company_name?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // For Danish customers only. The civic/company number (CPR or CVR) of the @@ -1549,7 +1552,7 @@ export type BillingRequestTemplate = { // required for PayTo and VRP. mandate_request_constraints?: BillingRequestTemplateMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. mandate_request_currency?: string; @@ -1595,7 +1598,7 @@ export type BillingRequestTemplate = { // See [Billing Requests: Creating Verified // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) // for more information. - mandate_request_verify?: BillingRequestTemplateMandateRequestVerify; + mandate_request_verify?: `${BillingRequestTemplateMandateRequestVerify}`; // Key-value store of custom data. Up to 3 keys are permitted, with key names // up to 50 characters and values up to 500 characters. @@ -1608,7 +1611,7 @@ export type BillingRequestTemplate = { // Amount in full. payment_request_amount?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. `GBP` and `EUR` supported; `GBP` with your customers in the UK and // for `EUR` with your customers in supported Eurozone countries only. payment_request_currency?: string; @@ -1700,10 +1703,14 @@ export type BillingRequestTemplateMandateRequestConstraintsPeriodicLimit = { // period. For example Monthly it will expire on the same day of the next // month, or yearly the same day of the next year. // - alignment?: BillingRequestTemplateMandateRequestConstraintsPeriodicLimitAlignment; + alignment?: `${BillingRequestTemplateMandateRequestConstraintsPeriodicLimitAlignment}`; - // (Optional) The maximum number of payments that can be collected in this - // periodic limit. + // The maximum number of payments that can be collected in this periodic + // limit. + // _Note:_ Only supported for the PayTo scheme, where it is required. + // Providing this field for other VRP schemes will result in a validation + // error. + // max_payments?: number; // The maximum total amount that can be charged for all payments in this @@ -1714,7 +1721,7 @@ export type BillingRequestTemplateMandateRequestConstraintsPeriodicLimit = { // The repeating period for this mandate. Defaults to flexible for PayTo if // not specified. - period?: BillingRequestTemplateMandateRequestConstraintsPeriodicLimitPeriod; + period?: `${BillingRequestTemplateMandateRequestConstraintsPeriodicLimitPeriod}`; }; export enum BillingRequestTemplateMandateRequestConstraintsPeriodicLimitAlignment { @@ -1799,7 +1806,7 @@ export type BillingRequestWithActionActionsCollectBankAccount = { // Bank account type. Required for USD-denominated bank accounts. Must not be // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: BillingRequestWithActionActionsCollectBankAccountAccountType; + account_type?: `${BillingRequestWithActionActionsCollectBankAccountAccountType}`; // Bank code - see [local details](#appendix-local-bank-details) for more // information. Alternatively you can provide an `iban`. @@ -1810,12 +1817,12 @@ export type BillingRequestWithActionActionsCollectBankAccount = { branch_code?: string | null; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. currency?: string | null; @@ -1868,7 +1875,7 @@ export type BillingRequestWithActionActionsCollectCustomerDetailsCustomer = { // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. // Used as the language for notification emails sent by GoCardless if your // organisation does not send its own (see [compliance // requirements](#appendix-compliance-requirements)). Currently only "en", @@ -1902,7 +1909,7 @@ export type BillingRequestWithActionActionsCollectCustomerDetailsCustomerBilling city?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // For Danish customers only. The civic/company number (CPR or CVR) of the @@ -1952,7 +1959,7 @@ export type BillingRequestWithActionActionsConfirmPayerDetails = { /** Type for a billingrequestwithactionactionsselectinstitution resource. */ export type BillingRequestWithActionActionsSelectInstitution = { // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) // alpha-2 code. The country code of the institution. If nothing is provided, // institutions with the country code 'GB' are returned by default. country_code: string; @@ -1991,13 +1998,13 @@ export type BillingRequestWithActionMandateRequest = { // paper: Authorisation is provided in writing and signed, or similarly // authenticated (maps to SEC code: PPD) // - authorisation_source?: BillingRequestWithActionMandateRequestAuthorisationSource; + authorisation_source?: `${BillingRequestWithActionMandateRequestAuthorisationSource}`; // Constraints that will apply to the mandate_request. (Optional) Specifically // required for PayTo and VRP. constraints?: BillingRequestWithActionMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. currency?: string; @@ -2015,7 +2022,7 @@ export type BillingRequestWithActionMandateRequest = { // merchant where // invoicing will be handled separately. // - funds_settlement?: BillingRequestWithActionMandateRequestFundsSettlement; + funds_settlement?: `${BillingRequestWithActionMandateRequestFundsSettlement}`; // Key-value store of custom data. Up to 3 keys are permitted, with key names // up to 50 characters and values up to 500 characters. @@ -2064,7 +2071,7 @@ export type BillingRequestWithActionMandateRequest = { // See [Billing Requests: Creating Verified // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) // for more information. - verify?: BillingRequestWithActionMandateRequestVerify; + verify?: `${BillingRequestWithActionMandateRequestVerify}`; }; export enum BillingRequestWithActionMandateRequestAuthorisationSource { @@ -2120,10 +2127,14 @@ export type BillingRequestWithActionMandateRequestConstraintsPeriodicLimit = { // period. For example Monthly it will expire on the same day of the next // month, or yearly the same day of the next year. // - alignment?: BillingRequestWithActionMandateRequestConstraintsPeriodicLimitAlignment; + alignment?: `${BillingRequestWithActionMandateRequestConstraintsPeriodicLimitAlignment}`; - // (Optional) The maximum number of payments that can be collected in this - // periodic limit. + // The maximum number of payments that can be collected in this periodic + // limit. + // _Note:_ Only supported for the PayTo scheme, where it is required. + // Providing this field for other VRP schemes will result in a validation + // error. + // max_payments?: number; // The maximum total amount that can be charged for all payments in this @@ -2134,7 +2145,7 @@ export type BillingRequestWithActionMandateRequestConstraintsPeriodicLimit = { // The repeating period for this mandate. Defaults to flexible for PayTo if // not specified. - period?: BillingRequestWithActionMandateRequestConstraintsPeriodicLimitPeriod; + period?: `${BillingRequestWithActionMandateRequestConstraintsPeriodicLimitPeriod}`; }; export enum BillingRequestWithActionMandateRequestConstraintsPeriodicLimitAlignment { @@ -2181,7 +2192,7 @@ export type BillingRequestWithActionPaymentRequest = { // denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. `GBP` and `EUR` supported; `GBP` with your customers in the UK and // for `EUR` with your customers in supported Eurozone countries only. currency?: string; @@ -2200,7 +2211,7 @@ export type BillingRequestWithActionPaymentRequest = { // merchant where // invoicing will be handled separately. // - funds_settlement?: BillingRequestWithActionPaymentRequestFundsSettlement; + funds_settlement?: `${BillingRequestWithActionPaymentRequestFundsSettlement}`; // Key-value store of custom data. Up to 3 keys are permitted, with key names // up to 50 characters and values up to 500 characters. @@ -2296,7 +2307,7 @@ export enum BillingRequestWithActionPurposeCode { /** Type for a billingrequestwithactionbankauthorisations resource. */ export type BillingRequestWithActionBankAuthorisations = { // Type of authorisation, can be either 'mandate' or 'payment'. - authorisation_type?: BillingRequestWithActionBankAuthorisationsAuthorisationType; + authorisation_type?: `${BillingRequestWithActionBankAuthorisationsAuthorisationType}`; // Fixed [timestamp](#api-usage-dates-and-times), recording when the user has // been authorised. @@ -2409,7 +2420,7 @@ export type BillingRequestWithActionBillingRequests = { links?: BillingRequestWithActionBillingRequestsLinks; // Request for a mandate - mandate_request?: BillingRequestWithActionBillingRequestsMandateRequest; + mandate_request?: BillingRequestWithActionBillingRequestsMandateRequest | null; // Key-value store of custom data. Up to 3 keys are permitted, with key names // up to 50 characters and values up to 500 characters. @@ -2420,7 +2431,7 @@ export type BillingRequestWithActionBillingRequests = { // transactions, ecommerce, or account transfers. This helps banks and payment // processors understand the payment scenario and apply appropriate processing // rules and risk controls. - payment_context_code?: BillingRequestWithActionBillingRequestsPaymentContextCode; + payment_context_code?: `${BillingRequestWithActionBillingRequestsPaymentContextCode}`; // Specifies the underlying purpose of the payment. Defines the specific // reason or type of service/goods the payment relates to, improving @@ -2431,7 +2442,7 @@ export type BillingRequestWithActionBillingRequests = { payment_purpose_code?: string; // Request for a one-off strongly authorised payment - payment_request?: BillingRequestWithActionBillingRequestsPaymentRequest; + payment_request?: BillingRequestWithActionBillingRequestsPaymentRequest | null; // Specifies the high-level purpose/category of a mandate and/or payment using // a set of pre-defined categories. Provides context on the nature and reason @@ -2439,7 +2450,7 @@ export type BillingRequestWithActionBillingRequests = { // See [Billing Request Purpose // Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for // the complete list of valid codes. - purpose_code?: BillingRequestWithActionBillingRequestsPurposeCode; + purpose_code?: `${BillingRequestWithActionBillingRequestsPurposeCode}`; // resources?: BillingRequestWithActionBillingRequestsResources; @@ -2455,7 +2466,7 @@ export type BillingRequestWithActionBillingRequests = { //
  • `cancelled`: the billing request has been cancelled and cannot be // used
  • // - status?: BillingRequestWithActionBillingRequestsStatus; + status?: `${BillingRequestWithActionBillingRequestsStatus}`; // Request for a subscription subscription_request?: BillingRequestWithActionBillingRequestsSubscriptionRequest | null; @@ -2564,7 +2575,7 @@ export type BillingRequestWithActionBillingRequestsCustomer = { // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. // Used as the language for notification emails sent by GoCardless if your // organisation does not send its own (see [compliance // requirements](#appendix-compliance-requirements)). Currently only "en", @@ -2598,7 +2609,7 @@ export type BillingRequestWithActionBillingRequestsCustomerBillingDetail = { city?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // For Danish customers only. The civic/company number (CPR or CVR) of the @@ -2673,7 +2684,7 @@ export type BillingRequestWithActionBillingRequestsAction = { // - `success`: we inferred the institution and added it to the resources of a // Billing Request // - institution_guess_status?: BillingRequestWithActionBillingRequestsActionInstitutionGuessStatus; + institution_guess_status?: `${BillingRequestWithActionBillingRequestsActionInstitutionGuessStatus}`; // Informs you whether the action is required to fulfil the billing request or // not. @@ -2683,25 +2694,24 @@ export type BillingRequestWithActionBillingRequestsAction = { requires_actions?: string[]; // Status of the action - status?: BillingRequestWithActionBillingRequestsActionStatus; + status?: `${BillingRequestWithActionBillingRequestsActionStatus}`; // Unique identifier for the action. - type?: BillingRequestWithActionBillingRequestsActionType; + type?: `${BillingRequestWithActionBillingRequestsActionType}`; }; /** Type for a billingrequestwithactionbillingrequestsactionbankauthorisation resource. */ export type BillingRequestWithActionBillingRequestsActionBankAuthorisation = { // Which authorisation adapter will be used to power these authorisations // (GoCardless internal use only) - adapter?: BillingRequestWithActionBillingRequestsActionBankAuthorisationAdapter; + adapter?: `${BillingRequestWithActionBillingRequestsActionBankAuthorisationAdapter}`; // What type of bank authorisations are supported on this billing request - authorisation_type?: BillingRequestWithActionBillingRequestsActionBankAuthorisationAuthorisationType; + authorisation_type?: `${BillingRequestWithActionBillingRequestsActionBankAuthorisationAuthorisationType}`; }; export enum BillingRequestWithActionBillingRequestsActionBankAuthorisationAdapter { OpenBankingGatewayPis = 'open_banking_gateway_pis', - PlaidAis = 'plaid_ais', OpenBankingGatewayAis = 'open_banking_gateway_ais', BankidAis = 'bankid_ais', BankPayRecurring = 'bank_pay_recurring', @@ -2759,7 +2769,7 @@ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequest = { // denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "USD" and "CAD" are supported. currency?: string; @@ -2845,7 +2855,7 @@ export type BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInst // The unit of time between customer charge dates. One of `weekly`, `monthly` // or `yearly`. - interval_unit: BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithScheduleIntervalUnit; + interval_unit: `${BillingRequestWithActionBillingRequestsInstalmentScheduleRequestInstalmentsWithScheduleIntervalUnit}`; // The date on which the first payment should be charged. Must be on or after // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When @@ -2941,7 +2951,7 @@ export type BillingRequestWithActionBillingRequestsMandateRequest = { // paper: Authorisation is provided in writing and signed, or similarly // authenticated (maps to SEC code: PPD) // - authorisation_source?: BillingRequestWithActionBillingRequestsMandateRequestAuthorisationSource; + authorisation_source?: `${BillingRequestWithActionBillingRequestsMandateRequestAuthorisationSource}`; // This attribute represents the authorisation type between the payer and // merchant. It can be set to `one_off`, @@ -2955,7 +2965,7 @@ export type BillingRequestWithActionBillingRequestsMandateRequest = { // required for PayTo and VRP. constraints?: BillingRequestWithActionBillingRequestsMandateRequestConstraints | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. currency?: string; @@ -2973,7 +2983,7 @@ export type BillingRequestWithActionBillingRequestsMandateRequest = { // merchant where // invoicing will be handled separately. // - funds_settlement?: BillingRequestWithActionBillingRequestsMandateRequestFundsSettlement; + funds_settlement?: `${BillingRequestWithActionBillingRequestsMandateRequestFundsSettlement}`; // Resources linked to this BillingRequestWithActionBillingRequestsMandateRequest. links?: BillingRequestWithActionBillingRequestsMandateRequestLinks; @@ -3027,7 +3037,7 @@ export type BillingRequestWithActionBillingRequestsMandateRequest = { // See [Billing Requests: Creating Verified // Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) // for more information. - verify?: BillingRequestWithActionBillingRequestsMandateRequestVerify; + verify?: `${BillingRequestWithActionBillingRequestsMandateRequestVerify}`; }; export enum BillingRequestWithActionBillingRequestsMandateRequestAuthorisationSource { @@ -3083,10 +3093,14 @@ export type BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeri // period. For example Monthly it will expire on the same day of the next // month, or yearly the same day of the next year. // - alignment?: BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimitAlignment; + alignment?: `${BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimitAlignment}`; - // (Optional) The maximum number of payments that can be collected in this - // periodic limit. + // The maximum number of payments that can be collected in this periodic + // limit. + // _Note:_ Only supported for the PayTo scheme, where it is required. + // Providing this field for other VRP schemes will result in a validation + // error. + // max_payments?: number; // The maximum total amount that can be charged for all payments in this @@ -3097,7 +3111,7 @@ export type BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeri // The repeating period for this mandate. Defaults to flexible for PayTo if // not specified. - period?: BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimitPeriod; + period?: `${BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimitPeriod}`; }; export enum BillingRequestWithActionBillingRequestsMandateRequestConstraintsPeriodicLimitAlignment { @@ -3143,7 +3157,7 @@ export type BillingRequestWithActionBillingRequestsPaymentRequest = { // denomination for the currency (e.g. pence in GBP, cents in EUR). app_fee?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. `GBP` and `EUR` supported; `GBP` with your customers in the UK and // for `EUR` with your customers in supported Eurozone countries only. currency?: string; @@ -3162,7 +3176,7 @@ export type BillingRequestWithActionBillingRequestsPaymentRequest = { // merchant where // invoicing will be handled separately. // - funds_settlement?: BillingRequestWithActionBillingRequestsPaymentRequestFundsSettlement; + funds_settlement?: `${BillingRequestWithActionBillingRequestsPaymentRequestFundsSettlement}`; // Resources linked to this BillingRequestWithActionBillingRequestsPaymentRequest. links?: BillingRequestWithActionBillingRequestsPaymentRequestLinks; @@ -3236,7 +3250,7 @@ export type BillingRequestWithActionBillingRequestsResourcesCustomer = { // Unique identifier, beginning with "CU". id?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. // Used as the language for notification emails sent by GoCardless if your // organisation does not send its own (see [compliance // requirements](#appendix-compliance-requirements)). Currently only "en", @@ -3270,7 +3284,7 @@ export type BillingRequestWithActionBillingRequestsResourcesCustomerBankAccount // Bank account type. Required for USD-denominated bank accounts. Must not be // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: BillingRequestWithActionBillingRequestsResourcesCustomerBankAccountAccountType; + account_type?: `${BillingRequestWithActionBillingRequestsResourcesCustomerBankAccountAccountType}`; // A token to uniquely refer to a set of bank account details. This feature is // still in early access and is only available for certain organisations. @@ -3280,7 +3294,7 @@ export type BillingRequestWithActionBillingRequestsResourcesCustomerBankAccount bank_name?: string; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string | null; @@ -3289,7 +3303,7 @@ export type BillingRequestWithActionBillingRequestsResourcesCustomerBankAccount // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. currency?: string | null; @@ -3335,7 +3349,7 @@ export type BillingRequestWithActionBillingRequestsResourcesCustomerBillingDetai city?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource @@ -3391,7 +3405,7 @@ export type BillingRequestWithActionBillingRequestsSubscriptionRequest = { // The total number of payments that should be taken by this subscription. count?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "USD" and "CAD" are supported. currency?: string; @@ -3406,7 +3420,7 @@ export type BillingRequestWithActionBillingRequestsSubscriptionRequest = { // The unit of time between customer charge dates. One of `weekly`, `monthly` // or `yearly`. - interval_unit?: BillingRequestWithActionBillingRequestsSubscriptionRequestIntervalUnit; + interval_unit?: `${BillingRequestWithActionBillingRequestsSubscriptionRequestIntervalUnit}`; // Resources linked to this BillingRequestWithActionBillingRequestsSubscriptionRequest. links?: BillingRequestWithActionBillingRequestsSubscriptionRequestLinks; @@ -3419,7 +3433,7 @@ export type BillingRequestWithActionBillingRequestsSubscriptionRequest = { // applies // when the interval_unit is `yearly`. // - month?: BillingRequestWithActionBillingRequestsSubscriptionRequestMonth; + month?: `${BillingRequestWithActionBillingRequestsSubscriptionRequestMonth}`; // Optional name for the subscription. This will be set as the description on // each payment created. Must not exceed 255 characters. @@ -3490,7 +3504,7 @@ export type Block = { // This // can currently be one of 'email', 'email_domain', 'bank_account', or // 'bank_name'. - block_type?: BlockBlockType; + block_type?: `${BlockBlockType}`; // Fixed [timestamp](#api-usage-dates-and-times), recording when this // resource was created. @@ -3514,7 +3528,7 @@ export type Block = { // one of the // above then 'other' can be selected but you must provide a reason // description. - reason_type?: BlockReasonType; + reason_type?: `${BlockReasonType}`; // This field is a reference to the value you wish to block. This may be the // raw value @@ -3579,7 +3593,7 @@ export type Creditor = { city?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource @@ -3588,19 +3602,19 @@ export type Creditor = { // The type of business of the creditor. Currently, `individual`, `company`, // `charity`, `partnership`, and `trust` are supported. - creditor_type?: CreditorCreditorType; + creditor_type?: `${CreditorCreditorType}`; // Boolean value indicating whether creditor has the [Custom Payment // Pages](https://hub.gocardless.com/s/article/Custom-payment-pages) // functionality enabled. custom_payment_pages_enabled?: boolean; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which amounts will be paid out (after foreign exchange). + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which amounts will be paid out (after foreign exchange). // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. Present only if payouts will be (or were) made via foreign // exchange. - fx_payout_currency?: CreditorFxPayoutCurrency; + fx_payout_currency?: `${CreditorFxPayoutCurrency}`; // Unique identifier, beginning with "CR". id?: string; @@ -3658,7 +3672,7 @@ export type Creditor = { // verify their account so they can receive payouts, and should visit the // verification flow. // - verification_status?: CreditorVerificationStatus; + verification_status?: `${CreditorVerificationStatus}`; }; export enum CreditorCreditorType { @@ -3769,7 +3783,7 @@ export type CreditorSchemeIdentifier = { city?: string; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource @@ -3777,7 +3791,7 @@ export type CreditorSchemeIdentifier = { created_at?: string; // The currency of the scheme identifier. - currency?: CreditorSchemeIdentifierCurrency; + currency?: `${CreditorSchemeIdentifierCurrency}`; // Scheme identifier's support email address. email?: string; @@ -3811,11 +3825,11 @@ export type CreditorSchemeIdentifier = { region?: string | null; // The scheme which this scheme identifier applies to. - scheme?: CreditorSchemeIdentifierScheme; + scheme?: `${CreditorSchemeIdentifierScheme}`; // The status of the scheme identifier. Only `active` scheme identifiers will // be applied to a creditor and used against payments. - status?: CreditorSchemeIdentifierStatus; + status?: `${CreditorSchemeIdentifierStatus}`; }; export enum CreditorSchemeIdentifierCurrency { @@ -3869,13 +3883,13 @@ export type CreditorBankAccount = { // Bank account type. Required for USD-denominated bank accounts. Must not be // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: CreditorBankAccountAccountType; + account_type?: `${CreditorBankAccountAccountType}`; // Name of bank, taken from the bank details. bank_name?: string; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string | null; @@ -3884,7 +3898,7 @@ export type CreditorBankAccount = { // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. currency?: string | null; @@ -3904,7 +3918,7 @@ export type CreditorBankAccount = { // Verification status of the Bank Account. Can be one of `pending`, // `in_review` or `successful` - verification_status?: CreditorBankAccountVerificationStatus; + verification_status?: `${CreditorBankAccountVerificationStatus}`; }; export enum CreditorBankAccountAccountType { @@ -3971,7 +3985,7 @@ export type Customer = { company_name?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource @@ -3996,7 +4010,7 @@ export type Customer = { // Unique identifier, beginning with "CU". id?: string; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. // Used as the language for notification emails sent by GoCardless if your // organisation does not send its own (see [compliance // requirements](#appendix-compliance-requirements)). Currently only "en", @@ -4071,7 +4085,7 @@ export type CustomerBankAccount = { // Bank account type. Required for USD-denominated bank accounts. Must not be // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: CustomerBankAccountAccountType; + account_type?: `${CustomerBankAccountAccountType}`; // A token to uniquely refer to a set of bank account details. This feature is // still in early access and is only available for certain organisations. @@ -4081,7 +4095,7 @@ export type CustomerBankAccount = { bank_name?: string; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string | null; @@ -4090,7 +4104,7 @@ export type CustomerBankAccount = { // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. currency?: string | null; @@ -4107,6 +4121,11 @@ export type CustomerBankAccount = { // Key-value store of custom data. Up to 3 keys are permitted, with key names // up to 50 characters and values up to 500 characters. metadata?: { [key: string]: string }; + + // Whether this customer bank account is registered as a trusted recipient for + // Outbound Payments. Only present when the feature is enabled for the + // organisation. + trusted_recipient?: boolean; }; export enum CustomerBankAccountAccountType { @@ -4139,7 +4158,7 @@ export type CustomerNotification = { // `handled`, // which means the integrator sent the notification themselves. // - action_taken?: CustomerNotificationActionTaken; + action_taken?: `${CustomerNotificationActionTaken}`; // Fixed [timestamp](#api-usage-dates-and-times), recording when this // action was taken. @@ -4167,7 +4186,7 @@ export type CustomerNotification = { //
  • `instalment_schedule_created`
  • //
  • `instalment_schedule_cancelled`
  • // - type?: CustomerNotificationType; + type?: `${CustomerNotificationType}`; }; export enum CustomerNotificationActionTaken { @@ -4262,8 +4281,9 @@ export type Event = { //
  • `scheme_identifiers`
  • //
  • `subscriptions`
  • //
  • `outbound_payments`
  • + //
  • `payment_account_transactions`
  • // - resource_type?: EventResourceType; + resource_type?: `${EventResourceType}`; // Audit information about the source of the event. source?: EventSource; @@ -4278,6 +4298,7 @@ export enum EventInclude { OutboundPayment = 'outbound_payment', PayerAuthorisation = 'payer_authorisation', Payment = 'payment', + PaymentAccountTransaction = 'payment_account_transaction', Payout = 'payout', Refund = 'refund', SchemeIdentifier = 'scheme_identifier', @@ -4339,7 +4360,7 @@ export type EventDetails = { //
  • `customer`: this event was triggered by a Customer
  • //
  • `payer`: this event was triggered by a Payer
  • // - origin?: EventDetailsOrigin; + origin?: `${EventDetailsOrigin}`; // When we send a creditor `creditor_updated` webhook, this tells you which // property on the creditor has been updated @@ -4354,7 +4375,7 @@ export type EventDetails = { reason_code?: string; // A bank payment scheme. Set when a bank is the origin of the event. - scheme?: EventDetailsScheme; + scheme?: `${EventDetailsScheme}`; // Whether the payment will be retried automatically. Set on a payment failed // event. @@ -4450,6 +4471,10 @@ export type EventLinks = { // [payment](#core-endpoints-payments) which has been updated. payment?: string; + // If `resource_type` is `payment_account_transaction`, this is the ID of a + // transaction which has been recorded on the payment account. + payment_account_transaction?: string; + // If `resource_type` is `billing_requests`, this is the ID of the // [payment](#core-endpoints-payments) which has been created for Instant Bank // Payment. @@ -4489,6 +4514,7 @@ export enum EventResourceType { OutboundPayments = 'outbound_payments', PayerAuthorisations = 'payer_authorisations', Payments = 'payments', + PaymentAccountTransactions = 'payment_account_transactions', Payouts = 'payouts', Refunds = 'refunds', SchemeIdentifiers = 'scheme_identifiers', @@ -4501,7 +4527,7 @@ export type EventSource = { name?: string; // The type of the event's source. - type?: EventSourceType; + type?: `${EventSourceType}`; }; export enum EventSourceType { @@ -4523,8 +4549,11 @@ export type Export = { // Download url for the export file. Subject to expiry. download_url?: string | null; + // Error message if the export encountered an error during processing. + error_message?: string | null; + // The type of the export - export_type?: ExportExportType; + export_type?: `${ExportExportType}`; // Unique identifier, beginning with "EX". id?: string; @@ -4568,10 +4597,10 @@ export type InstalmentSchedule = { // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. - currency?: InstalmentScheduleCurrency; + currency?: `${InstalmentScheduleCurrency}`; // Unique identifier, beginning with "IS". id?: string; @@ -4607,7 +4636,7 @@ export type InstalmentSchedule = { //
  • `cancelled`: the schedule has been cancelled
  • //
  • `errored`: one or more payments have failed
  • // - status?: InstalmentScheduleStatus; + status?: `${InstalmentScheduleStatus}`; // The total amount of the instalment schedule, defined as the sum of all // individual @@ -4670,7 +4699,7 @@ export type InstalmentScheduleInstalments = { // The unit of time between customer charge dates. One of `weekly`, `monthly` // or `yearly`. - interval_unit: InstalmentScheduleInstalmentsIntervalUnit; + interval_unit: `${InstalmentScheduleInstalmentsIntervalUnit}`; // The date on which the first payment should be charged. Must be on or after // the [mandate](#core-endpoints-mandates)'s `next_possible_charge_date`. When @@ -4723,7 +4752,7 @@ export type Institution = { autocompletes_collect_bank_account?: boolean; // [ISO - // 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) // alpha-2 code. The country code of the institution. If nothing is provided, // institutions with the country code 'GB' are returned by default. country_code?: string; @@ -4744,7 +4773,7 @@ export type Institution = { name?: string; // The status of the institution - status?: InstitutionStatus; + status?: `${InstitutionStatus}`; }; /** Type for a institutionbranchcode resource. */ @@ -4804,7 +4833,7 @@ export type Mandate = { // paper: Authorisation is provided in writing and signed, or similarly // authenticated (maps to SEC code: PPD) // - authorisation_source?: MandateAuthorisationSource; + authorisation_source?: `${MandateAuthorisationSource}`; // (Optional) Payto and VRP Scheme specific information consent_parameters?: MandateConsentParameters | null; @@ -4812,7 +4841,7 @@ export type Mandate = { // (Optional) Specifies the type of authorisation agreed between the payer and // merchant. It can be set to one-off, recurring or standing for ACH, or // single, recurring and sporadic for PAD. - consent_type?: MandateConsentType | null; + consent_type?: `${MandateConsentType}` | null; // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource // was created. @@ -4827,7 +4856,7 @@ export type Mandate = { // merchant where // invoicing will be handled separately. // - funds_settlement?: MandateFundsSettlement; + funds_settlement?: `${MandateFundsSettlement}`; // Unique identifier, beginning with "MD". Note that this prefix may not apply // to mandates created before 2016. @@ -4885,7 +4914,7 @@ export type Mandate = { //
  • `blocked`: the mandate has been blocked and payments cannot be // created
  • // - status?: MandateStatus; + status?: `${MandateStatus}`; // [Timestamp](#api-usage-dates-and-times) recording when this mandate was // verified. @@ -4927,7 +4956,7 @@ export type MandateConsentParameters = { max_payments_per_period?: number; // The repeating period for this mandate - period?: MandateConsentParametersPeriod; + period?: `${MandateConsentParametersPeriod}`; // The date from which payments can be taken start_date?: string; @@ -4999,7 +5028,7 @@ export type MandateImport = { // The scheme of the mandates to be imported.
    All mandates in a single // mandate // import must be for the same scheme. - scheme?: MandateImportScheme; + scheme?: `${MandateImportScheme}`; // The status of the mandate import. //
      @@ -5014,7 +5043,7 @@ export type MandateImport = { // team member it will be in this state while mandates are imported. //
    • `processed`: When all mandates have been imported successfully.
    • //
    - status?: MandateImportStatus; + status?: `${MandateImportStatus}`; }; /** Type for a mandateimportcreaterequestlinks resource. */ @@ -5106,7 +5135,7 @@ export type MandateImportEntryBankAccount = { // Bank account type. Required for USD-denominated bank accounts. Must not be // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: MandateImportEntryBankAccountAccountType; + account_type?: `${MandateImportEntryBankAccountAccountType}`; // Bank code - see [local details](#appendix-local-bank-details) for more // information. Alternatively you can provide an `iban`. @@ -5117,7 +5146,7 @@ export type MandateImportEntryBankAccount = { branch_code?: string | null; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string | null; @@ -5162,7 +5191,7 @@ export type MandateImportEntryCustomer = { company_name?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // For Danish customers only. The civic/company number (CPR or CVR) of the @@ -5180,7 +5209,7 @@ export type MandateImportEntryCustomer = { // Customer's first name. Required unless a `company_name` is provided. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. // Used as the language for notification emails sent by GoCardless if your // organisation does not send its own (see [compliance // requirements](#appendix-compliance-requirements)). Currently only "en", @@ -5233,7 +5262,7 @@ export type MandateImportEntryMandate = { // paper: Authorisation is provided in writing and signed, or similarly // authenticated (maps to SEC code: PPD) // - authorisation_source?: MandateImportEntryMandateAuthorisationSource; + authorisation_source?: `${MandateImportEntryMandateAuthorisationSource}`; // Key-value store of custom data. Up to 3 keys are permitted, with key names // up to 50 characters and values up to 500 characters. @@ -5322,10 +5351,10 @@ export type NegativeBalanceLimit = { // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. - currency?: NegativeBalanceLimitCurrency; + currency?: `${NegativeBalanceLimitCurrency}`; // Unique identifier, beginning with "NBL". id?: string; @@ -5364,9 +5393,9 @@ export type OutboundPayment = { // payment was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency. + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency. // Currently only "GBP" is supported. - currency?: OutboundPaymentCurrency; + currency?: `${OutboundPaymentCurrency}`; // A human-readable description of the outbound payment description?: string; @@ -5397,7 +5426,7 @@ export type OutboundPayment = { // Bank payment scheme to process the outbound payment. Currently only // "faster_payments" (GBP) is supported. - scheme?: OutboundPaymentScheme; + scheme?: `${OutboundPaymentScheme}`; // One of: //
      @@ -5419,7 +5448,7 @@ export type OutboundPayment = { //
    • `failed`: The payment was not sent, usually due to an error while or // after executing.
    • //
    - status?: OutboundPaymentStatus; + status?: `${OutboundPaymentStatus}`; // Contains details of the verifications performed for the outbound payment verifications?: OutboundPaymentVerifications | null; @@ -5430,6 +5459,9 @@ export type OutboundPaymentCreateRequestLinks = { // ID of the creditor who sends the outbound payment. creditor?: string; + // ID of the outbound payment import that created this outbound payment. + outbound_payment_import?: string; + // ID of the customer bank account which receives the outbound payment. recipient_bank_account: string; }; @@ -5467,6 +5499,9 @@ export type OutboundPaymentLinks = { // payment customer?: string; + // ID of the outbound payment import that created this outbound payment. + outbound_payment_import?: string; + // ID of the customer bank account which receives the outbound payment. recipient_bank_account?: string; }; @@ -5494,12 +5529,12 @@ export type OutboundPaymentVerificationsRecipientBankAccountHolderVerification = //
  • `unable_to_match`: The verification could not be performed due to // recipient bank issues or technical issues
  • // - result?: OutboundPaymentVerificationsRecipientBankAccountHolderVerificationResult; + result?: `${OutboundPaymentVerificationsRecipientBankAccountHolderVerificationResult}`; // Type of the verification that has been performed // eg. [Confirmation of // Payee](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) - type?: OutboundPaymentVerificationsRecipientBankAccountHolderVerificationType; + type?: `${OutboundPaymentVerificationsRecipientBankAccountHolderVerificationType}`; }; export enum OutboundPaymentVerificationsRecipientBankAccountHolderVerificationResult { @@ -5513,6 +5548,227 @@ export enum OutboundPaymentVerificationsRecipientBankAccountHolderVerificationTy ConfirmationOfPayee = 'confirmation_of_payee', } +/** Type for a outboundpaymentimport resource. */ +export type OutboundPaymentImport = { + // The sum of all import entry amounts, in the lowest denomination for the + // currency (e.g. pence in GBP, cents in EUR). + amount_sum?: number; + + // The link to the GoCardless dashboard to review and authorise the import + authorisation_url?: string; + + // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource + // was created. + created_at?: string; + + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency. + // Currently only "GBP" is supported. + currency?: `${OutboundPaymentImportCurrency}`; + + // + entry_counts?: OutboundPaymentImportEntryCounts; + + // Unique identifier, beginning with "IM". + id: string; + + // Resources linked to this OutboundPaymentImport. + links?: OutboundPaymentImportLinks; + + // The status of the outbound payment import. + //
      + //
    • `created`: The initial state of a new import.
    • + //
    • `validating`: Import validation in progress.
    • + //
    • `invalid`: Import validation failed.
    • + //
    • `valid`: Import validation succeeded.
    • + //
    • `processing`: Authorisation received; payments are being + // generated.
    • + //
    • `processed`: All entries have been successfully converted into outbound + // payments.
    • + //
    • `cancelled`: The import was cancelled by a user or automatically + // expired by the system.
    • + //
    + status?: `${OutboundPaymentImportStatus}`; +}; + +/** Type for a outboundpaymentimportentryitem resource. */ +export type OutboundPaymentImportEntryItem = { + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). + amount: number; + + // Key-value store of custom data. Up to 3 keys are permitted, with + // key names up to 50 characters and values up to 500 characters. + metadata?: { [key: string]: string }; + + // ID of the customer bank account which receives the outbound payment. + recipient_bank_account_id: string; + + // An optional reference that will appear on your customer's bank statement. + // The character limit for this reference is dependent on the scheme.
    + // Faster Payments - 18 characters, including: + // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 &-./"
    + reference?: string; + + // Bank payment scheme to process the outbound payment. Currently only + // "faster_payments" (GBP) is supported. + scheme: `${OutboundPaymentImportEntryItemScheme}`; +}; + +export enum OutboundPaymentImportEntryItemScheme { + FasterPayments = 'faster_payments', +} + +/** Type for a outboundpaymentimportcreaterequestlinks resource. */ +export type OutboundPaymentImportCreateRequestLinks = { + // ID of the creditor who sends the outbound payments from the import. + creditor?: string; +}; + +export enum OutboundPaymentImportStatus { + Created = 'created', + Validating = 'validating', + Valid = 'valid', + Invalid = 'invalid', + Processing = 'processing', + Processed = 'processed', + Cancelled = 'cancelled', +} + +export enum OutboundPaymentImportCurrency { + GBP = 'GBP', +} + +/** Type for a outboundpaymentimportentrycounts resource. */ +export type OutboundPaymentImportEntryCounts = { + // Count of entries that encountered a terminal error during the outbound + // payment generation process. + failed_to_process?: number; + + // Count of entries that failed validation checks. + invalid?: number; + + // Count of entries successfully converted into outbound payments after the + // import was authorised. + processed?: number; + + // The total number of entries included in the import. + total?: number; + + // Count of entries that passed validation checks. + valid?: number; + + // Total count of entries checked against bank account holder verification + // services (e.g., CoP). + verified?: number; + + // Count of entries where the account holder name was a direct match. + verified_with_full_match?: number; + + // Count of entries where the account holder name did not match the records. + verified_with_no_match?: number; + + // Count of entries where the account holder name was a close match. + verified_with_partial_match?: number; + + // Count of entries where the verification service could not return a + // definitive result. + verified_with_unable_to_match?: number; +}; + +/** Type for a outboundpaymentimportlinks resource. */ +export type OutboundPaymentImportLinks = { + // ID of the creditor who sends the outbound payments from the import. + creditor?: string; +}; + +/** Type for a outboundpaymentimportentry resource. */ +export type OutboundPaymentImportEntry = { + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). + amount?: number | null; + + // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource + // was created. + created_at?: string; + + // Unique identifier, beginning with "IE". + id?: string; + + // Resources linked to this OutboundPaymentImportEntry. + links?: OutboundPaymentImportEntryLinks; + + // Key-value store of custom data. Up to 3 keys are permitted, with + // key names up to 50 characters and values up to 500 characters. + metadata?: { [key: string]: string } | null; + + // Fixed [timestamp](#api-usage-dates-and-times), recording when this entry + // was processed. + processed_at?: string | null; + + // An optional reference for the outbound payment. + reference?: string | null; + + // Bank payment scheme to process the outbound payment. Currently only + // "faster_payments" (GBP) is supported. + scheme?: `${OutboundPaymentImportEntryScheme}`; + + // Per-field validation errors for this entry, keyed by resource type and then + // by field name. + validation_errors?: OutboundPaymentImportEntryValidationErrors | null; + + // The result of bank account holder verification, if performed. + verification_result?: `${OutboundPaymentImportEntryVerificationResult}` | null; +}; + +/** Type for a outboundpaymentimportentrylinks resource. */ +export type OutboundPaymentImportEntryLinks = { + // ID of the associated outbound payment, once the entry has been processed. + outbound_payment?: string | null; + + // ID of the associated import. + outbound_payment_import?: string; + + // ID of the recipient bank account. + recipient_bank_account?: string | null; +}; + +export enum OutboundPaymentImportEntryScheme { + FasterPayments = 'faster_payments', +} + +/** Type for a outboundpaymentimportentryvalidationerrors resource. */ +export type OutboundPaymentImportEntryValidationErrors = { + // Validation errors for the outbound payment fields. + outbound_payment?: OutboundPaymentImportEntryValidationErrorsOutboundPayment; +}; + +/** Type for a outboundpaymentimportentryvalidationerrorsoutboundpayment resource. */ +export type OutboundPaymentImportEntryValidationErrorsOutboundPayment = { + // Errors related to the amount field. + amount?: string[]; + + // Errors related to the recipient bank account. + recipient_bank_account?: string[]; + + // Errors related to the reference field. + reference?: string[]; + + // Bank payment scheme to process the outbound payment. Currently only + // "faster_payments" (GBP) is supported. + scheme?: `${OutboundPaymentImportEntryValidationErrorsOutboundPaymentScheme}`; +}; + +export enum OutboundPaymentImportEntryValidationErrorsOutboundPaymentScheme { + FasterPayments = 'faster_payments', +} + +export enum OutboundPaymentImportEntryVerificationResult { + FullMatch = 'full_match', + PartialMatch = 'partial_match', + NoMatch = 'no_match', + UnableToMatch = 'unable_to_match', +} + /** Type for a payerauthorisation resource. */ export type PayerAuthorisation = { // All details required for the creation of a @@ -5552,7 +5808,7 @@ export type PayerAuthorisation = { //
  • `failed`: The PayerAuthorisation has failed and customer, bank_account // and mandate is not created
  • // - status?: PayerAuthorisationStatus; + status?: `${PayerAuthorisationStatus}`; }; /** Type for a payerauthorisationbankaccount resource. */ @@ -5579,7 +5835,7 @@ export type PayerAuthorisationBankAccount = { // Bank account type. Required for USD-denominated bank accounts. Must not be // provided for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: PayerAuthorisationBankAccountAccountType; + account_type?: `${PayerAuthorisationBankAccountAccountType}`; // Bank code - see [local details](#appendix-local-bank-details) for more // information. Alternatively you can provide an `iban`. @@ -5590,12 +5846,12 @@ export type PayerAuthorisationBankAccount = { branch_code?: string | null; // [ISO 3166-1 alpha-2 - // code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + // code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). // Defaults to the country code of the `iban` if supplied, otherwise is // required. country_code?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. currency?: string | null; @@ -5638,7 +5894,7 @@ export type PayerAuthorisationCustomer = { company_name?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // For Danish customers only. The civic/company number (CPR or CVR) of the @@ -5730,7 +5986,7 @@ export type PayerAuthorisationMandate = { // A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", // "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" and // "sepa_core" are supported. - scheme?: PayerAuthorisationMandateScheme; + scheme?: `${PayerAuthorisationMandateScheme}`; }; export enum PayerAuthorisationMandateScheme { @@ -5787,10 +6043,10 @@ export type Payment = { // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. - currency?: PaymentCurrency; + currency?: `${PaymentCurrency}`; // A human-readable description of the payment. This will be included in the // notification email GoCardless sends to your customer if your organisation @@ -5866,7 +6122,7 @@ export type Payment = { // banks. //
  • `charged_back`: the payment has been charged back
  • // - status?: PaymentStatus; + status?: `${PaymentStatus}`; }; export enum PaymentCurrency { @@ -5950,12 +6206,12 @@ export type PaymentFx = { // Present only after the resource has been paid out. fx_amount?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which amounts will be paid out (after foreign exchange). + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which amounts will be paid out (after foreign exchange). // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. Present only if payouts will be (or were) made via foreign // exchange. - fx_currency?: PaymentFxFxCurrency; + fx_currency?: `${PaymentFxFxCurrency}`; }; export enum PaymentFxFxCurrency { @@ -6014,7 +6270,7 @@ export type PaymentAccount = { // Name of bank, taken from the bank details. bank_name?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. currency?: string | null; @@ -6048,7 +6304,7 @@ export type PaymentAccountTransaction = { counterparty_name?: string; // The currency of the transaction. - currency?: PaymentAccountTransactionCurrency; + currency?: `${PaymentAccountTransactionCurrency}`; // The description of the transaction, if available description?: string; @@ -6056,7 +6312,7 @@ export type PaymentAccountTransaction = { // The direction of the transaction. Debits mean money leaving the account // (e.g. outbound payment), while credits signify money coming in (e.g. manual // top-up). - direction?: PaymentAccountTransactionDirection; + direction?: `${PaymentAccountTransactionDirection}`; // The unique ID of the payment account transaction. id?: string; @@ -6113,10 +6369,10 @@ export type Payout = { // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. - currency?: PayoutCurrency; + currency?: `${PayoutCurrency}`; // Fees that have already been deducted from the payout amount in minor unit // (e.g. pence in GBP, cents in EUR), inclusive of tax if applicable. @@ -6147,7 +6403,7 @@ export type Payout = { metadata?: { [key: string]: string }; // Whether a payout contains merchant revenue or partner fees. - payout_type?: PayoutPayoutType; + payout_type?: `${PayoutPayoutType}`; // Reference which appears on the creditor's bank statement. reference?: string; @@ -6161,10 +6417,10 @@ export type Payout = { //
  • `bounced`: the payout bounced when sent, the payout can be // retried.
  • // - status?: PayoutStatus; + status?: `${PayoutStatus}`; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which tax is paid out to the tax authorities of your tax + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which tax is paid out to the tax authorities of your tax // jurisdiction. Currently “EUR”, “GBP”, for French or British merchants, this // will be `null` if tax is not applicable beta tax_currency?: string | null; @@ -6209,12 +6465,12 @@ export type PayoutFx = { // Present only after the resource has been paid out. fx_amount?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which amounts will be paid out (after foreign exchange). + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which amounts will be paid out (after foreign exchange). // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. Present only if payouts will be (or were) made via foreign // exchange. - fx_currency?: PayoutFxFxCurrency; + fx_currency?: `${PayoutFxFxCurrency}`; }; export enum PayoutFxFxCurrency { @@ -6290,7 +6546,7 @@ export type PayoutItem = { // for merchants. // // - type?: PayoutItemType; + type?: `${PayoutItemType}`; }; export enum PayoutItemInclude2020TaxCutover { @@ -6320,10 +6576,10 @@ export type PayoutItemTaxis = { // decimal place. amount?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. - currency?: PayoutItemTaxisCurrency; + currency?: `${PayoutItemTaxisCurrency}`; // The amount of tax to be paid out to the tax authorities in fractional // currency; the lowest denomination for the currency (e.g. pence in GBP, @@ -6333,8 +6589,8 @@ export type PayoutItemTaxis = { // until the `exchange_rate` has been finalised. destination_amount?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which tax is paid out to the tax authorities of your tax + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which tax is paid out to the tax authorities of your tax // jurisdiction. Currently “EUR” for French merchants and “GBP” for British // merchants. destination_currency?: string; @@ -6422,7 +6678,7 @@ export type RedirectFlow = { // will only allow the set-up of a mandate for the specified scheme. It is // recommended that you leave this blank so the most appropriate scheme is // picked based on the customer's bank account. - scheme?: RedirectFlowScheme; + scheme?: `${RedirectFlowScheme}`; // The customer's session ID must be provided when the redirect flow is set up // and again when it is completed. This allows integrators to ensure that the @@ -6448,7 +6704,7 @@ export type RedirectFlowPrefilledBankAccount = { // Bank account type for USD-denominated bank accounts. Must not be provided // for bank accounts in other currencies. See [local // details](#local-bank-details-united-states) for more information. - account_type?: RedirectFlowPrefilledBankAccountAccountType; + account_type?: `${RedirectFlowPrefilledBankAccountAccountType}`; }; export enum RedirectFlowPrefilledBankAccountAccountType { @@ -6475,7 +6731,7 @@ export type RedirectFlowPrefilledCustomer = { company_name?: string | null; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string | null; // For Danish customers only. The civic/company number (CPR or CVR) of the @@ -6491,7 +6747,7 @@ export type RedirectFlowPrefilledCustomer = { // Customer's first name. given_name?: string | null; - // [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + // [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. language?: string | null; // For New Zealand customers only. @@ -6556,7 +6812,7 @@ export type Refund = { // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. This is set to the currency of the refund's // [payment](#core-endpoints-payments). currency?: string; @@ -6605,7 +6861,7 @@ export type Refund = { //
  • `bounced`: the refund has failed to be paid
  • //
  • `funds_returned`: the refund has had its funds returned
  • // - status?: RefundStatus; + status?: `${RefundStatus}`; }; /** Type for a refundcreaterequestlinks resource. */ @@ -6644,12 +6900,12 @@ export type RefundFx = { // Present only after the resource has been paid out. fx_amount?: string | null; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the - // currency in which amounts will be paid out (after foreign exchange). + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for + // the currency in which amounts will be paid out (after foreign exchange). // Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are // supported. Present only if payouts will be (or were) made via foreign // exchange. - fx_currency?: RefundFxFxCurrency; + fx_currency?: `${RefundFxFxCurrency}`; }; export enum RefundFxFxCurrency { @@ -6844,7 +7100,7 @@ export type SchemeIdentifier = { city?: string; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; // Fixed [timestamp](#api-usage-dates-and-times), recording when this resource @@ -6852,7 +7108,7 @@ export type SchemeIdentifier = { created_at?: string; // The currency of the scheme identifier. - currency?: SchemeIdentifierCurrency; + currency?: `${SchemeIdentifierCurrency}`; // Scheme identifier's support email address. email?: string; @@ -6886,11 +7142,11 @@ export type SchemeIdentifier = { region?: string | null; // The scheme which this scheme identifier applies to. - scheme?: SchemeIdentifierScheme; + scheme?: `${SchemeIdentifierScheme}`; // The status of the scheme identifier. Only `active` scheme identifiers will // be applied to a creditor and used against payments. - status?: SchemeIdentifierStatus; + status?: `${SchemeIdentifierStatus}`; }; /** Type for a schemeidentifiercreaterequestlinks resource. */ @@ -7015,7 +7271,7 @@ export type Subscription = { // was created. created_at?: string; - // [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency + // [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency // code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" // are supported. currency?: string; @@ -7050,7 +7306,7 @@ export type Subscription = { // The unit of time between customer charge dates. One of `weekly`, `monthly` // or `yearly`. - interval_unit?: SubscriptionIntervalUnit; + interval_unit?: `${SubscriptionIntervalUnit}`; // Resources linked to this Subscription. links?: SubscriptionLinks; @@ -7063,7 +7319,7 @@ export type Subscription = { // applies // when the interval_unit is `yearly`. // - month?: SubscriptionMonth; + month?: `${SubscriptionMonth}`; // Optional name for the subscription. This will be set as the description on // each payment created. Must not exceed 255 characters. @@ -7111,7 +7367,7 @@ export type Subscription = { //
  • `paused`: the subscription has been paused and will not create // payments
  • // - status?: SubscriptionStatus; + status?: `${SubscriptionStatus}`; // Up to 10 upcoming payments with their amounts and charge dates. upcoming_payments?: SubscriptionUpcomingPayment[]; @@ -7267,7 +7523,7 @@ export type VerificationDetailDirector = { city: string; // [ISO 3166-1 alpha-2 - // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // code.](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code: string; // The person's date of birth.