From 6e67869ffcb7e5a584640672e6b06074507234d9 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 19 Jan 2023 22:40:02 +0000 Subject: [PATCH 1/5] Changes generated by b65d486bde4f8625bca7922e9fdff228dd9e083a --- .circleci/config.yml | 71 ++++++++++++++++++++++++++++ .gitignore | 6 --- package-lock.json | 108 +++++++++++++++++++++---------------------- 3 files changed, 125 insertions(+), 60 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..ce137541 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,71 @@ +version: 2 +references: + build_directory: &build_directory + '/built-library' + + dist_folder: &dist_folder + '/built-library/dist' + + node_image: &node_image + working_directory: *build_directory + docker: + - image: "node:10" + +jobs: + transpile_library: + <<: *node_image + steps: + - checkout + - run: npm install + - run: npm install -g typescript + - run: tsc -p . + - persist_to_workspace: + root: *build_directory + paths: + - "*" + environment: + OUT_DIR: *build_directory + DIST_FOLDER: *dist_folder + + test_library: + <<: *node_image + steps: + - checkout + - run: npm install --save-dev jest typescript ts-jest @types/jest + - run: npm test + + publish_to_npm: + <<: *node_image + steps: + - checkout + - attach_workspace: + at: *build_directory + - run: cp package.json $DIST_FOLDER + - run: cp README.md $DIST_FOLDER + - run: npm install + - run: + name: Authenticate w/NPM. + command: echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > .npmrc + - run: + name: Publish the library. + command: npm publish $DIST_FOLDER + environment: + OUT_DIR: *build_directory + DIST_FOLDER: *dist_folder + + +workflows: + version: 2 + deploy_library: + jobs: + - test_library + - transpile_library: + requires: + - test_library + - publish_to_npm: + requires: + - transpile_library + filters: + branches: + only: + - master diff --git a/.gitignore b/.gitignore index 0bacecc0..f711aadf 100644 --- a/.gitignore +++ b/.gitignore @@ -15,12 +15,6 @@ pids *.seed *.pid.lock -# Ignore all logfiles and tempfiles. -/log/* -/tmp/* -!/log/.keep -!/tmp/.keep - # Directory for instrumented libs generated by jscoverage/JSCover lib-cov diff --git a/package-lock.json b/package-lock.json index 6a37721e..778a454c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,31 +24,31 @@ } }, "@babel/compat-data": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz", - "integrity": "sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==", + "version": "7.20.10", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz", + "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==", "dev": true }, "@babel/core": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.7.tgz", - "integrity": "sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw==", + "version": "7.20.12", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", + "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", "@babel/generator": "^7.20.7", "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.20.7", + "@babel/helper-module-transforms": "^7.20.11", "@babel/helpers": "^7.20.7", "@babel/parser": "^7.20.7", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", + "@babel/traverse": "^7.20.12", "@babel/types": "^7.20.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", + "json5": "^2.2.2", "semver": "^6.3.0" } }, @@ -124,9 +124,9 @@ } }, "@babel/helper-module-transforms": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.7.tgz", - "integrity": "sha512-FNdu7r67fqMUSVuQpFQGE6BPdhJIhitoxhGzDbAXNcA07uoVG37fOiMk3OSV8rEICuyG6t8LGkd9EE64qIEoIA==", + "version": "7.20.11", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz", + "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==", "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.18.9", @@ -135,7 +135,7 @@ "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.19.1", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", + "@babel/traverse": "^7.20.10", "@babel/types": "^7.20.7" } }, @@ -372,9 +372,9 @@ } }, "@babel/traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.7.tgz", - "integrity": "sha512-xueOL5+ZKX2dJbg8z8o4f4uTRTqGDRjilva9D1hiRlayJbTY8jBRL+Ph67IeRTIE439/VifHk+Z4g0SwRtQE0A==", + "version": "7.20.12", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.12.tgz", + "integrity": "sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", @@ -685,13 +685,13 @@ } }, "@types/babel__core": { - "version": "7.1.20", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.20.tgz", - "integrity": "sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.0.tgz", + "integrity": "sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==", "dev": true, "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" @@ -737,16 +737,16 @@ }, "dependencies": { "@types/node": { - "version": "18.11.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.17.tgz", - "integrity": "sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==" + "version": "18.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", + "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" } } }, "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", "dev": true, "requires": { "@types/node": "*" @@ -801,9 +801,9 @@ }, "dependencies": { "@types/node": { - "version": "18.11.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.17.tgz", - "integrity": "sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==" + "version": "18.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", + "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" } } }, @@ -843,9 +843,9 @@ }, "dependencies": { "@types/node": { - "version": "18.11.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.17.tgz", - "integrity": "sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==" + "version": "18.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", + "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" } } }, @@ -856,9 +856,9 @@ "dev": true }, "@types/yargs": { - "version": "15.0.14", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.14.tgz", - "integrity": "sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ==", + "version": "15.0.15", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.15.tgz", + "integrity": "sha512-IziEYMU9XoVj8hWg7k+UJrXALkGFjWJhn5QFEv9q4p+v40oZhSuC135M38st8XPjICL7Ey4TV64ferBGUoJhBg==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -1045,9 +1045,9 @@ "dev": true }, "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", "dev": true }, "babel-jest": { @@ -1345,9 +1345,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001441", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", - "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", + "version": "1.0.30001446", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001446.tgz", + "integrity": "sha512-fEoga4PrImGcwUUGEol/PoFCSBnSkA9drgdkxXkJLsUBOnJ8rs3zDv6ApqYXGQFOyMPsjh79naWhF4DAxbF8rw==", "dev": true }, "capture-exit": { @@ -3178,9 +3178,9 @@ "dev": true }, "json5": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.2.tgz", - "integrity": "sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "jsprim": { @@ -3450,9 +3450,9 @@ "dev": true }, "nock": { - "version": "13.2.9", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.9.tgz", - "integrity": "sha512-1+XfJNYF1cjGB+TKMWi29eZ0b82QOvQs2YoLNzbpWGqFMtRQHTa57osqdGj4FrFPgkO4D4AZinzUJR9VvW3QUA==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.3.0.tgz", + "integrity": "sha512-HHqYQ6mBeiMc+N038w8LkMpDCRquCHWeNmN3v6645P3NhN2+qXOBqvPqo7Rt1VyCMzKhJ733wZqw5B7cQVFNPg==", "dev": true, "requires": { "debug": "^4.1.0", @@ -3583,9 +3583,9 @@ } }, "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" }, "object-visit": { "version": "1.0.1", @@ -3820,9 +3820,9 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true }, "qs": { From cce964161358d9fee37d9a0c7bf240084cac9321 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 2 Feb 2023 10:49:19 +0000 Subject: [PATCH 2/5] Changes generated by 6ac822c25851be0dc830f2dea031833e185f2602 --- package-lock.json | 86 +++++++++++++++++++++++------------------------ package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/package-lock.json b/package-lock.json index 778a454c..b8cf5855 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gocardless-nodejs", - "version": "3.8.0", + "version": "3.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -24,9 +24,9 @@ } }, "@babel/compat-data": { - "version": "7.20.10", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz", - "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==", + "version": "7.20.14", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.14.tgz", + "integrity": "sha512-0YpKHD6ImkWMEINCyDAD0HLLUH/lPCefG8ld9it8DJB2wnApraKuhgYTvTY1z7UFIfBTGy5LwncZ+5HWWGbhFw==", "dev": true }, "@babel/core": { @@ -53,9 +53,9 @@ } }, "@babel/generator": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz", - "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==", + "version": "7.20.14", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.14.tgz", + "integrity": "sha512-AEmuXHdcD3A52HHXxaTmYlb8q/xMEhoRP67B3T4Oq7lbmSoqroMZzjnGj3+i1io3pdnF8iBYVu4Ilj+c4hBxYg==", "dev": true, "requires": { "@babel/types": "^7.20.7", @@ -182,13 +182,13 @@ "dev": true }, "@babel/helpers": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz", - "integrity": "sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==", + "version": "7.20.13", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.13.tgz", + "integrity": "sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg==", "dev": true, "requires": { "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", + "@babel/traverse": "^7.20.13", "@babel/types": "^7.20.7" } }, @@ -256,9 +256,9 @@ } }, "@babel/parser": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", - "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==", + "version": "7.20.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.13.tgz", + "integrity": "sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -372,9 +372,9 @@ } }, "@babel/traverse": { - "version": "7.20.12", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.12.tgz", - "integrity": "sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==", + "version": "7.20.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.13.tgz", + "integrity": "sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", @@ -383,7 +383,7 @@ "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.7", + "@babel/parser": "^7.20.13", "@babel/types": "^7.20.7", "debug": "^4.1.0", "globals": "^11.1.0" @@ -1247,15 +1247,15 @@ } }, "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" } }, "bs-logger": { @@ -1345,9 +1345,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001446", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001446.tgz", - "integrity": "sha512-fEoga4PrImGcwUUGEol/PoFCSBnSkA9drgdkxXkJLsUBOnJ8rs3zDv6ApqYXGQFOyMPsjh79naWhF4DAxbF8rw==", + "version": "1.0.30001450", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001450.tgz", + "integrity": "sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew==", "dev": true }, "capture-exit": { @@ -1620,9 +1620,9 @@ "dev": true }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==", "dev": true }, "defer-to-connect": { @@ -2089,9 +2089,9 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -2287,9 +2287,9 @@ "dev": true }, "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "http-signature": { "version": "1.2.0", @@ -3494,9 +3494,9 @@ } }, "node-releases": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz", - "integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.9.tgz", + "integrity": "sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA==", "dev": true }, "normalize-package-data": { @@ -4876,9 +4876,9 @@ } }, "typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "union-value": { diff --git a/package.json b/package.json index 2acbf641..5c57c93a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gocardless-nodejs", - "version": "3.8.0", + "version": "3.9.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": { diff --git a/src/constants.ts b/src/constants.ts index d997a77c..d3074e08 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -5,7 +5,7 @@ enum Environments { Sandbox = 'SANDBOX', } -const CLIENT_VERSION = '3.8.0'; +const CLIENT_VERSION = '3.9.0'; const API_VERSION = '2015-07-06'; export { Environments, CLIENT_VERSION, API_VERSION }; From a0c491cefcfc9f58ef2fd5d482ba93518c62064a Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 7 Feb 2023 12:13:16 +0000 Subject: [PATCH 3/5] Changes generated by 21cf6c0cf07683fa6188cc562178517e428fd87f --- package-lock.json | 38 ++-- package.json | 2 +- src/client.ts | 22 ++ src/constants.ts | 2 +- src/services/creditorService.ts | 56 ++--- src/services/instalmentScheduleService.ts | 2 +- src/services/mandateService.ts | 4 + src/services/schemeIdentifierService.ts | 129 ++++++++++++ src/services/verificationDetailService.ts | 84 ++++++++ src/types/Types.ts | 244 +++++++++++++++++++++- 10 files changed, 525 insertions(+), 58 deletions(-) create mode 100644 src/services/schemeIdentifierService.ts create mode 100644 src/services/verificationDetailService.ts diff --git a/package-lock.json b/package-lock.json index b8cf5855..73238da2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gocardless-nodejs", - "version": "3.9.0", + "version": "4.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -256,9 +256,9 @@ } }, "@babel/parser": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.13.tgz", - "integrity": "sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==", + "version": "7.20.15", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.15.tgz", + "integrity": "sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -737,9 +737,9 @@ }, "dependencies": { "@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" + "version": "18.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", + "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==" } } }, @@ -801,9 +801,9 @@ }, "dependencies": { "@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" + "version": "18.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", + "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==" } } }, @@ -843,9 +843,9 @@ }, "dependencies": { "@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" + "version": "18.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", + "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==" } } }, @@ -1709,9 +1709,9 @@ } }, "electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.288", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.288.tgz", + "integrity": "sha512-8s9aJf3YiokIrR+HOQzNOGmEHFXVUQzXM/JaViVvKdCkNUjS+lEa/uT7xw3nDVG/IgfxiIwUGkwJ6AR1pTpYsQ==", "dev": true }, "emoji-regex": { @@ -3494,9 +3494,9 @@ } }, "node-releases": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.9.tgz", - "integrity": "sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", "dev": true }, "normalize-package-data": { diff --git a/package.json b/package.json index 5c57c93a..4a6167b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gocardless-nodejs", - "version": "3.9.0", + "version": "4.0.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": { diff --git a/src/client.ts b/src/client.ts index 76046602..baa6935d 100644 --- a/src/client.ts +++ b/src/client.ts @@ -28,8 +28,10 @@ import { PayoutItemService } from './services/payoutItemService'; import { RedirectFlowService } from './services/redirectFlowService'; import { RefundService } from './services/refundService'; import { ScenarioSimulatorService } from './services/scenarioSimulatorService'; +import { SchemeIdentifierService } from './services/schemeIdentifierService'; import { SubscriptionService } from './services/subscriptionService'; import { TaxRateService } from './services/taxRateService'; +import { VerificationDetailService } from './services/verificationDetailService'; import { WebhookService } from './services/webhookService'; export class GoCardlessClient { @@ -61,8 +63,10 @@ export class GoCardlessClient { private _redirectFlows: RedirectFlowService; private _refunds: RefundService; private _scenarioSimulators: ScenarioSimulatorService; + private _schemeIdentifiers: SchemeIdentifierService; private _subscriptions: SubscriptionService; private _taxRates: TaxRateService; + private _verificationDetails: VerificationDetailService; private _webhooks: WebhookService; constructor(token: string, environment = Environments.Live, options = {}) { @@ -94,8 +98,10 @@ export class GoCardlessClient { this._redirectFlows = undefined; this._refunds = undefined; this._scenarioSimulators = undefined; + this._schemeIdentifiers = undefined; this._subscriptions = undefined; this._taxRates = undefined; + this._verificationDetails = undefined; this._webhooks = undefined; } @@ -309,6 +315,14 @@ export class GoCardlessClient { return this._scenarioSimulators; } + get schemeIdentifiers(): SchemeIdentifierService { + if (!this._schemeIdentifiers) { + this._schemeIdentifiers = new SchemeIdentifierService(this._api); + } + + return this._schemeIdentifiers; + } + get subscriptions(): SubscriptionService { if (!this._subscriptions) { this._subscriptions = new SubscriptionService(this._api); @@ -325,6 +339,14 @@ export class GoCardlessClient { return this._taxRates; } + get verificationDetails(): VerificationDetailService { + if (!this._verificationDetails) { + this._verificationDetails = new VerificationDetailService(this._api); + } + + return this._verificationDetails; + } + get webhooks(): WebhookService { if (!this._webhooks) { this._webhooks = new WebhookService(this._api); diff --git a/src/constants.ts b/src/constants.ts index d3074e08..749fcefe 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -5,7 +5,7 @@ enum Environments { Sandbox = 'SANDBOX', } -const CLIENT_VERSION = '3.9.0'; +const CLIENT_VERSION = '4.0.0'; const API_VERSION = '2015-07-06'; export { Environments, CLIENT_VERSION, API_VERSION }; diff --git a/src/services/creditorService.ts b/src/services/creditorService.ts index 9e8ae6a1..d0c75714 100644 --- a/src/services/creditorService.ts +++ b/src/services/creditorService.ts @@ -11,22 +11,6 @@ interface CreditorListResponse extends Types.APIResponse { } interface CreditorCreateRequest { - // The first line of the creditor's address. - - address_line1?: string; - - // The second line of the creditor's address. - - address_line2?: string; - - // The third line of the creditor's address. - - address_line3?: string; - - // The city of the creditor's address. - - city?: string; - // [ISO 3166-1 alpha-2 // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) @@ -37,17 +21,9 @@ interface CreditorCreateRequest { creditor_type: Types.CreditorCreditorType; - // The creditor's name. + // The creditor's trading name. name: string; - - // The creditor's postal code. - - postal_code?: string; - - // The creditor's address region, county or department. - - region?: string; } interface CreditorListRequest { @@ -92,7 +68,7 @@ interface CreditorUpdateRequest { // Resources linked to this Creditor. links?: Types.CreditorUpdateRequestLinks; - // The creditor's name. + // The creditor's trading name. name?: string; @@ -105,6 +81,11 @@ interface CreditorUpdateRequest { region?: string; } +interface CreditorApplySchemeIdentifierRequest { + // Resources linked to this Creditor. + links: Types.CreditorApplySchemeIdentifierRequestLinks; +} + export class CreditorService { private api: Api; @@ -217,4 +198,27 @@ export class CreditorService { return formattedResponse; } + + async applySchemeIdentifier( + identity: string, + requestParameters: CreditorApplySchemeIdentifierRequest + ): Promise { + const urlParameters = [{ key: 'identity', value: identity }]; + const requestParams = { + path: '/creditors/:identity/actions/apply_scheme_identifier', + method: 'post', + urlParameters, + requestParameters, + payloadKey: null, + fetch: null, + }; + + const response = await this.api.request(requestParams); + const formattedResponse: CreditorResponse = { + ...response.body['creditors'], + __response__: response.__response__, + }; + + return formattedResponse; + } } diff --git a/src/services/instalmentScheduleService.ts b/src/services/instalmentScheduleService.ts index 2895064c..915ce10d 100644 --- a/src/services/instalmentScheduleService.ts +++ b/src/services/instalmentScheduleService.ts @@ -28,7 +28,7 @@ interface InstalmentScheduleCreateWithDatesRequest { // An explicit array of instalment payments, each specifying at least an // `amount` and `charge_date`. - instalments: Types.InstalmentScheduleInstalments[]; + instalments: Types.InstalmentScheduleInstalment[]; // Resources linked to this InstalmentSchedule. links: Types.InstalmentScheduleCreateWithDatesRequestLinks; diff --git a/src/services/mandateService.ts b/src/services/mandateService.ts index 4dd1e71d..5717cb2e 100644 --- a/src/services/mandateService.ts +++ b/src/services/mandateService.ts @@ -36,6 +36,10 @@ interface MandateCreateRequest { // For ACH customers only. Required for ACH customers. A string containing the // IP address of the payer to whom the mandate belongs (i.e. as a result of // their completion of a mandate setup flow in their browser). + // + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. + // payer_ip_address?: string; diff --git a/src/services/schemeIdentifierService.ts b/src/services/schemeIdentifierService.ts new file mode 100644 index 00000000..c6458fba --- /dev/null +++ b/src/services/schemeIdentifierService.ts @@ -0,0 +1,129 @@ +'use strict'; + +import { Api } from '../api/api'; +import * as Types from '../types/Types'; + +interface SchemeIdentifierResponse + extends Types.SchemeIdentifier, + Types.APIResponse {} + +interface SchemeIdentifierListResponse extends Types.APIResponse { + scheme_identifiers: Types.SchemeIdentifier[]; + meta: Types.ListMeta; +} + +interface SchemeIdentifierCreateRequest { + // The name which appears on customers' bank statements. This should usually be + // the merchant's trading name. + + name: string; + + // The scheme which this scheme identifier applies to. + + scheme: Types.SchemeIdentifierScheme; +} + +interface SchemeIdentifierListRequest { + // 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; +} + +export class SchemeIdentifierService { + private api: Api; + + constructor(api) { + this.api = api; + } + + async create( + requestParameters: SchemeIdentifierCreateRequest, + idempotencyKey = '', + customHeaders: Types.JsonMap = {} + ): Promise { + const urlParameters = []; + const requestParams = { + path: '/scheme_identifiers', + method: 'post', + urlParameters, + requestParameters, + payloadKey: 'scheme_identifiers', + idempotencyKey, + customHeaders, + fetch: async identity => this.find(identity), + }; + + const response = await this.api.request(requestParams); + const formattedResponse: SchemeIdentifierResponse = { + ...(response.body?.['scheme_identifiers'] ?? response), + __response__: response.__response__, + }; + + return formattedResponse; + } + + async list( + requestParameters: SchemeIdentifierListRequest + ): Promise { + const urlParameters = []; + const requestParams = { + path: '/scheme_identifiers', + method: 'get', + urlParameters, + requestParameters, + payloadKey: null, + fetch: null, + }; + + const response = await this.api.request(requestParams); + const formattedResponse: SchemeIdentifierListResponse = { + ...response.body, + __response__: response.__response__, + }; + + return formattedResponse; + } + + async *all( + requestParameters: SchemeIdentifierListRequest + ): AsyncGenerator { + let cursor = undefined; + do { + const list = await this.list({ ...requestParameters, after: cursor }); + + for (const schemeidentifier of list.scheme_identifiers) { + yield schemeidentifier; + } + + cursor = list.meta.cursors.after; + } while (cursor); + } + + async find(identity: string): Promise { + const urlParameters = [{ key: 'identity', value: identity }]; + const requestParams = { + path: '/scheme_identifiers/:identity', + method: 'get', + urlParameters, + + payloadKey: null, + fetch: null, + }; + + const response = await this.api.request(requestParams); + const formattedResponse: SchemeIdentifierResponse = { + ...response.body['scheme_identifiers'], + __response__: response.__response__, + }; + + return formattedResponse; + } +} diff --git a/src/services/verificationDetailService.ts b/src/services/verificationDetailService.ts new file mode 100644 index 00000000..ebdddfb6 --- /dev/null +++ b/src/services/verificationDetailService.ts @@ -0,0 +1,84 @@ +'use strict'; + +import { Api } from '../api/api'; +import * as Types from '../types/Types'; + +interface VerificationDetailResponse + extends Types.VerificationDetail, + Types.APIResponse {} + +interface VerificationDetailListResponse extends Types.APIResponse { + verification_details: Types.VerificationDetail[]; + meta: Types.ListMeta; +} + +interface VerificationDetailCreateRequest { + // The first line of the company's address. + + address_line1: string; + + // The second line of the company's address. + + address_line2?: string; + + // The third line of the company's address. + + address_line3?: string; + + // The city of the company's address. + + city: string; + + // The company's registration number. + + company_number: string; + + // A summary describing what the company does. + + description: string; + + // The company's directors. + + directors: Types.VerificationDetailDirector[]; + + // Resources linked to this VerificationDetail. + links: Types.VerificationDetailCreateRequestLinks; + + // The company's postal code. + + postal_code: string; +} + +export class VerificationDetailService { + private api: Api; + + constructor(api) { + this.api = api; + } + + async create( + requestParameters: VerificationDetailCreateRequest, + idempotencyKey = '', + customHeaders: Types.JsonMap = {} + ): Promise { + const urlParameters = []; + const requestParams = { + path: '/verification_details', + method: 'post', + urlParameters, + requestParameters, + payloadKey: 'verification_details', + idempotencyKey, + customHeaders, + fetch: undefined, + }; + + const response = await this.api.request(requestParams); + const formattedResponse: VerificationDetailResponse = { + ...(response.body?.['verification_details'] ?? response), + __response__: response.__response__, + }; + + return formattedResponse; + } +} diff --git a/src/types/Types.ts b/src/types/Types.ts index 00d76455..0527e780 100644 --- a/src/types/Types.ts +++ b/src/types/Types.ts @@ -220,6 +220,10 @@ export interface BillingRequestCustomerBillingDetail { // For ACH customers only. Required for ACH customers. A string containing the // IP address of the payer to whom the mandate belongs (i.e. as a result of // their completion of a mandate setup flow in their browser). + // + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. + // ip_address?: string | null; // The customer's postal code. @@ -721,6 +725,10 @@ export interface BillingRequestResourcesCustomerBillingDetail { // For ACH customers only. Required for ACH customers. A string containing the // IP address of the payer to whom the mandate belongs (i.e. as a result of // their completion of a mandate setup flow in their browser). + // + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. + // ip_address?: string | null; // The customer's postal code. @@ -1157,7 +1165,7 @@ export interface Creditor { // behalf of this organisation. merchant_responsible_for_notifications?: boolean; - // The creditor's name. + // The creditor's trading name. name?: string; // The creditor's postal code. @@ -1230,6 +1238,12 @@ export interface CreditorUpdateRequestLinks { default_usd_payout_account?: string | null; } +/** Type for a creditorapplyschemeidentifierrequestlinks resource. */ +export interface CreditorApplySchemeIdentifierRequestLinks { + // Unique identifier, usually beginning with "SU". + scheme_identifier: string; +} + export enum CreditorCreditorType { Company = 'company', Individual = 'individual', @@ -1286,32 +1300,39 @@ export interface CreditorLinks { /** Type for a creditorschemeidentifier resource. */ export interface CreditorSchemeIdentifier { - // The first line of the support address. + // The first line of the scheme identifier's support address. address_line1?: string; - // The second line of the support address. + // The second line of the scheme identifier's support address. address_line2?: string | null; - // The third line of the support address. + // The third line of the scheme identifier's support address. address_line3?: string | null; // Whether a custom reference can be submitted for mandates using this scheme // identifier. can_specify_mandate_reference?: boolean; - // The city of the support address. + // The city of the scheme identifier's support address. city?: string; // [ISO 3166-1 alpha-2 // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country_code?: string; + // Fixed [timestamp](#api-usage-time-zones--dates), recording when this + // resource was created. + created_at?: string; + // The currency of the scheme identifier. currency?: CreditorSchemeIdentifierCurrency; - // The support email address. + // Scheme identifier's support email address. email?: string; + // Unique identifier, usually beginning with "SU". + id?: string; + // The minimum interval, in working days, between the sending of a // pre-notification to the customer, and the charge date of a payment using // this scheme identifier. @@ -1321,23 +1342,28 @@ export interface CreditorSchemeIdentifier { // details. minimum_advance_notice?: number; - // The name which appears on customers' bank statements. + // The name which appears on customers' bank statements. This should usually + // be the merchant's trading name. name?: string; - // The support phone number. + // Scheme identifier's support phone number. phone_number?: string; - // The support postal code. + // The scheme identifier's support postal code. postal_code?: string; // The scheme-unique identifier against which payments are submitted. reference?: string; - // The support address region, county or department. + // The scheme identifier's support address region, county or department. region?: string | null; // The scheme which this scheme identifier applies to. scheme?: CreditorSchemeIdentifierScheme; + + // The status of the scheme identifier. Only `active` scheme identifiers will + // be applied to a creditor and used against payments. + status?: CreditorSchemeIdentifierStatus; } export enum CreditorSchemeIdentifierCurrency { @@ -1366,6 +1392,11 @@ export enum CreditorSchemeIdentifierScheme { SepaInstantCreditTransfer = 'sepa_instant_credit_transfer', } +export enum CreditorSchemeIdentifierStatus { + Pending = 'pending', + Active = 'active', +} + export enum CreditorVerificationStatus { Successful = 'successful', InReview = 'in_review', @@ -2010,6 +2041,25 @@ export interface InstalmentSchedule { total_amount?: string; } +/** Type for a instalmentscheduleinstalment resource. */ +export interface InstalmentScheduleInstalment { + // Amount, in the lowest denomination for the currency (e.g. pence in GBP, + // cents in EUR). + amount: string; + + // A future date on which the payment should be collected. If the date + // is before the next_possible_charge_date on the + // [mandate](#core-endpoints-mandates), it will be automatically rolled + // forwards to that date. + charge_date: string | null; + + // A human-readable description of the payment. This will be included in the + // notification email GoCardless sends to your customer if your organisation + // does not send its own notifications (see [compliance + // requirements](#appendix-compliance-requirements)). + description?: string | null; +} + /** Type for a instalmentschedulecreatewithdatesrequestlinks resource. */ export interface InstalmentScheduleCreateWithDatesRequestLinks { // ID of the associated [mandate](#core-endpoints-mandates) which the @@ -2184,6 +2234,10 @@ export interface Mandate { // created // status?: MandateStatus; + + // [Timestamp](#api-usage-time-zones--dates) recording when this mandate was + // verified. + verified_at?: string | null; } /** Type for a mandatecreaterequestlinks resource. */ @@ -2724,6 +2778,10 @@ export interface PayerAuthorisationMandate { // For ACH customers only. Required for ACH customers. A string containing the // IP address of the payer to whom the mandate belongs (i.e. as a result of // their completion of a mandate setup flow in their browser). + // + // Not required for creating offline mandates where `authorisation_source` is + // set to telephone or paper. + // payer_ip_address?: string | null; // Unique reference. Different schemes have different length and [character @@ -3698,6 +3756,105 @@ export interface ScenarioSimulatorRunRequestLinks { resource: string; } +/** Type for a schemeidentifier resource. */ +export interface SchemeIdentifier { + // The first line of the scheme identifier's support address. + address_line1?: string; + + // The second line of the scheme identifier's support address. + address_line2?: string | null; + + // The third line of the scheme identifier's support address. + address_line3?: string | null; + + // Whether a custom reference can be submitted for mandates using this scheme + // identifier. + can_specify_mandate_reference?: boolean; + + // The city of the scheme identifier's support address. + city?: string; + + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + country_code?: string; + + // Fixed [timestamp](#api-usage-time-zones--dates), recording when this + // resource was created. + created_at?: string; + + // The currency of the scheme identifier. + currency?: SchemeIdentifierCurrency; + + // Scheme identifier's support email address. + email?: string; + + // Unique identifier, usually beginning with "SU". + id?: string; + + // The minimum interval, in working days, between the sending of a + // pre-notification to the customer, and the charge date of a payment using + // this scheme identifier. + // + // By default, GoCardless sends these notifications automatically. Please see + // our [compliance requirements](#appendix-compliance-requirements) for more + // details. + minimum_advance_notice?: number; + + // The name which appears on customers' bank statements. This should usually + // be the merchant's trading name. + name?: string; + + // Scheme identifier's support phone number. + phone_number?: string; + + // The scheme identifier's support postal code. + postal_code?: string; + + // The scheme-unique identifier against which payments are submitted. + reference?: string; + + // The scheme identifier's support address region, county or department. + region?: string | null; + + // The scheme which this scheme identifier applies to. + scheme?: SchemeIdentifierScheme; + + // The status of the scheme identifier. Only `active` scheme identifiers will + // be applied to a creditor and used against payments. + status?: SchemeIdentifierStatus; +} + +export enum SchemeIdentifierCurrency { + AUD = 'AUD', + CAD = 'CAD', + DKK = 'DKK', + EUR = 'EUR', + GBP = 'GBP', + NZD = 'NZD', + SEK = 'SEK', + USD = 'USD', +} + +export enum SchemeIdentifierScheme { + Ach = 'ach', + Autogiro = 'autogiro', + Bacs = 'bacs', + Becs = 'becs', + BecsNz = 'becs_nz', + Betalingsservice = 'betalingsservice', + FasterPayments = 'faster_payments', + Pad = 'pad', + PayTo = 'pay_to', + Sepa = 'sepa', + SepaCreditTransfer = 'sepa_credit_transfer', + SepaInstantCreditTransfer = 'sepa_instant_credit_transfer', +} + +export enum SchemeIdentifierStatus { + Pending = 'pending', + Active = 'active', +} + type JsonField = boolean | number | string | null; export interface JsonMap { @@ -3953,6 +4110,73 @@ export interface TaxRate { type?: string; } +/** Type for a verificationdetail resource. */ +export interface VerificationDetail { + // The first line of the company's address. + address_line1?: string; + + // The second line of the company's address. + address_line2?: string | null; + + // The third line of the company's address. + address_line3?: string | null; + + // The city of the company's address. + city?: string; + + // The company's registration number. + company_number?: string; + + // A summary describing what the company does. + description?: string; + + // The company's directors. + directors?: VerificationDetailDirector[]; + + // Resources linked to this VerificationDetail. + links?: VerificationDetailLinks; + + // The company's postal code. + postal_code?: string; +} + +/** Type for a verificationdetailcreaterequestlinks resource. */ +export interface VerificationDetailCreateRequestLinks { + // ID of the associated [creditor](#core-endpoints-creditors). + creditor: string; +} + +/** Type for a verificationdetaildirector resource. */ +export interface VerificationDetailDirector { + // The city of the person's address. + city: string; + + // [ISO 3166-1 alpha-2 + // code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + country_code: string; + + // The person's date of birth. + date_of_birth: string; + + // The person's family name. + family_name: string; + + // The person's given name. + given_name: string; + + // The person's postal code. + postal_code: string; + + // The street of the person's address. + street: string; +} + +/** Type for a verificationdetaillinks resource. */ +export interface VerificationDetailLinks { + // ID of the [creditor](#core-endpoints-creditors) + creditor?: string; +} + /** Type for a webhook resource. */ export interface Webhook { // Fixed [timestamp](#api-usage-time-zones--dates), recording when this From c7ebd43fa3eb1149c980841b67510c25e773beea Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 7 Feb 2023 12:49:22 +0000 Subject: [PATCH 4/5] Changes generated by 12f98c5e813a1c494228940a1860e8c914399a3c --- package-lock.json | 2 +- package.json | 2 +- src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73238da2..c28c710e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gocardless-nodejs", - "version": "4.0.0", + "version": "3.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 4a6167b1..5c57c93a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gocardless-nodejs", - "version": "4.0.0", + "version": "3.9.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": { diff --git a/src/constants.ts b/src/constants.ts index 749fcefe..d3074e08 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -5,7 +5,7 @@ enum Environments { Sandbox = 'SANDBOX', } -const CLIENT_VERSION = '4.0.0'; +const CLIENT_VERSION = '3.9.0'; const API_VERSION = '2015-07-06'; export { Environments, CLIENT_VERSION, API_VERSION }; From 039c7a7b210c63cc1429cf8cd4d9d7b8bbd700cc Mon Sep 17 00:00:00 2001 From: jjholmes927 Date: Tue, 7 Feb 2023 13:13:59 +0000 Subject: [PATCH 5/5] remove circle ci conf --- .circleci/config.yml | 71 -------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index ce137541..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,71 +0,0 @@ -version: 2 -references: - build_directory: &build_directory - '/built-library' - - dist_folder: &dist_folder - '/built-library/dist' - - node_image: &node_image - working_directory: *build_directory - docker: - - image: "node:10" - -jobs: - transpile_library: - <<: *node_image - steps: - - checkout - - run: npm install - - run: npm install -g typescript - - run: tsc -p . - - persist_to_workspace: - root: *build_directory - paths: - - "*" - environment: - OUT_DIR: *build_directory - DIST_FOLDER: *dist_folder - - test_library: - <<: *node_image - steps: - - checkout - - run: npm install --save-dev jest typescript ts-jest @types/jest - - run: npm test - - publish_to_npm: - <<: *node_image - steps: - - checkout - - attach_workspace: - at: *build_directory - - run: cp package.json $DIST_FOLDER - - run: cp README.md $DIST_FOLDER - - run: npm install - - run: - name: Authenticate w/NPM. - command: echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > .npmrc - - run: - name: Publish the library. - command: npm publish $DIST_FOLDER - environment: - OUT_DIR: *build_directory - DIST_FOLDER: *dist_folder - - -workflows: - version: 2 - deploy_library: - jobs: - - test_library - - transpile_library: - requires: - - test_library - - publish_to_npm: - requires: - - transpile_library - filters: - branches: - only: - - master