mangopay4-nodejs-sdk 1.68.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +0 -6
  3. package/docs/templates/class.mustache +0 -0
  4. package/docs/templates/file.mustache +0 -0
  5. package/docs/templates/function.mustache +0 -0
  6. package/docs/templates/index.mustache +0 -0
  7. package/docs/templates/overview.mustache +0 -0
  8. package/lib/models/CardPreAuthorization.js +2 -2
  9. package/package.json +16 -24
  10. package/.github/workflows/node.js.yml +0 -32
  11. package/.github/workflows/npm-publish.yml +0 -26
  12. package/.jshintrc +0 -16
  13. package/test/TestKycPageFile.png +0 -0
  14. package/test/helpers.js +0 -1537
  15. package/test/main.js +0 -10
  16. package/test/mocha.opts +0 -3
  17. package/test/services/Acquiring.js +0 -338
  18. package/test/services/BankAccounts.js +0 -46
  19. package/test/services/BankingAliases.js +0 -89
  20. package/test/services/CardPreAuthorizations.js +0 -70
  21. package/test/services/CardRegistrations.js +0 -239
  22. package/test/services/Cards.js +0 -56
  23. package/test/services/Clients.js +0 -235
  24. package/test/services/Conversions.js +0 -319
  25. package/test/services/Deposits.js +0 -148
  26. package/test/services/Disputes.js +0 -542
  27. package/test/services/EMoney.js +0 -54
  28. package/test/services/Events.js +0 -147
  29. package/test/services/Hooks.js +0 -109
  30. package/test/services/Idempotency.js +0 -41
  31. package/test/services/IdentityVerifications.js +0 -68
  32. package/test/services/KycDocuments.js +0 -73
  33. package/test/services/Mandates.js +0 -256
  34. package/test/services/PayIns.js +0 -2632
  35. package/test/services/PayOuts.js +0 -119
  36. package/test/services/RateLimit.js +0 -43
  37. package/test/services/Recipients.js +0 -234
  38. package/test/services/Refunds.js +0 -123
  39. package/test/services/Regulatory.js +0 -45
  40. package/test/services/Reports.js +0 -114
  41. package/test/services/ReportsV2.js +0 -306
  42. package/test/services/Repudiations.js +0 -22
  43. package/test/services/Settlements.js +0 -127
  44. package/test/services/Tokens.js +0 -55
  45. package/test/services/Transfers.js +0 -137
  46. package/test/services/UboDeclarations.js +0 -130
  47. package/test/services/Users.js +0 -1322
  48. package/test/services/VirtualAccounts.js +0 -105
  49. package/test/services/Wallets.js +0 -132
  50. package/test/settlement_sample.csv +0 -8
  51. package/test/settlement_sample_bad.csv +0 -8
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## [2.0.0] - 2026-05-27
2
+
3
+ > **⚠️ Breaking release.** This version raises the minimum required Node.js version and bumps several dependencies. The runtime API of the SDK is unchanged — no method signatures, models, or TypeScript typings were modified — but please review the notes below before upgrading.
4
+
5
+ ### Breaking change - Minimum Node.js version raised to 22
6
+ - `engines.node` is now `>=22.0.0` (previously `>= v0.10.0`).
7
+ - Installing the SDK on Node < 22 will produce an `EBADENGINE` warning and is no longer supported. Upgrade your runtime before installing `2.0.0`.
8
+ - `@types/node` is now pinned to `22.19.18`. Projects on older `@types/node` may see type drift in transitive types and should align their version.
9
+
10
+ ### Breaking change - Dependency upgrades
11
+ Runtime and dev dependencies have been bumped to current versions to clear transitive vulnerabilities and align with the new Node 22 baseline:
12
+
13
+ - Runtime: `axios` `1.12.0` → `1.16.0`, `form-data` `4.0.4` → `4.0.5`, `promise` `8.1.x` → `8.3.0`, `underscore` `1.12.x` → `1.13.8`, `@types/node` `14.14.x` → `22.19.18`.
14
+ - Dev: `mocha` `9.2.0` → `11.7.5`, `chai` `4.2.x` → `4.5.0`, `sinon` `9.2.x` → `21.0.1`, `typescript` `4.1.x` → `6.0.3`, `ts-node` `^9.1.1` → `10.9.2`, `tsd` `^0.30.4` → `0.33.0`.
15
+ - Projects that depend on the older transitive versions (for example, code relying on Axios `1.12` request/response shapes) should re-test their integration against `2.0.0`.
16
+
17
+ ### Changed - Source repository no longer on GitHub
18
+ - The source repository has been moved off GitHub. The previous `github.com/Mangopay/mangopay2-nodejs-sdk` location is no longer maintained and will not receive new commits, issues, or pull requests.
19
+ - The `repository` field has been removed from `package.json`.
20
+ - This change does not affect consumption: `npm install mangopay4-nodejs-sdk` continues to work exactly as before.
21
+
22
+ ### Fixed - Garbled comment in `CardPreAuthorization`
23
+ - Replaced non-UTF-8 characters in the `IpAddress` JSDoc comment of `lib/models/CardPreAuthorization.js`. No behavior change.
24
+
25
+ ### Notes for upgraders
26
+ - If your project is on Node 16/18/20, upgrade to Node 22 (or newer) before installing `2.0.0`. The `1.x` line remains available on npm for environments that cannot upgrade their runtime yet.
27
+ - No application code changes are required for SDK callers — all service methods, models, and TypeScript typings are unchanged from `1.68.0`.
28
+
1
29
  ## [1.68.0] - 2026-03-25
2
30
  ### Added - Acquiring pay-in service
3
31
  - New `Acquiring` service with `createPayIn` (Card, iDEAL, Apple Pay, Google Pay, PayPal), `createPayInRefund`, `createPayPalDataCollection`, and `createCardValidation` methods
package/README.md CHANGED
@@ -244,12 +244,6 @@ Sample usage of Mangopay SDK installed with npm in a Node.js project
244
244
  -------------------------------------------------
245
245
  Don't forget to check examples folder !
246
246
 
247
- Contributing
248
- -------------------------------------------------
249
- npm start // installs dependencies and global mocha for testing and jsdox for documentation
250
- npm test // runs the mocha tests
251
- npm run-script documentation // update documentation using jsdox, make sure to have it installed globally
252
-
253
247
  Unit Tests
254
248
  -------------------------------------------------
255
249
  Mocha tests are placed under ``/test/`` folder. To run the tests, make sure you have all dependencies installed.
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -93,8 +93,8 @@ var CardPreAuthorization = Model.extend({
93
93
  MultiCapture: null,
94
94
 
95
95
  /**
96
- * Is not Mandatory for 3DSv1 (flag Use 3DSV2 Scenario OFF)
97
- * Is mandatory when the flag Use 3DSV2 Scenario is active for (FORCE/DEFAULT/FRICTIONLESS both 3)
96
+ * Is not Mandatory for 3DSv1 (flag Use 3DSV2 Scenario OFF)
97
+ * Is mandatory when the flag Use 3DSV2 Scenario is active for (FORCE/DEFAULT/FRICTIONLESS both 3)
98
98
  */
99
99
  IpAddress: null,
100
100
 
package/package.json CHANGED
@@ -1,40 +1,32 @@
1
1
  {
2
2
  "name": "mangopay4-nodejs-sdk",
3
- "version": "1.68.0",
3
+ "version": "2.0.0",
4
4
  "types": "./typings/index.d.ts",
5
5
  "description": "Mangopay Node.js SDK",
6
- "repository": "https://github.com/Mangopay/mangopay2-nodejs-sdk.git",
7
6
  "license": "MIT",
8
- "keywords": [
9
- "mangopay",
10
- "nodejs",
11
- "sdk",
12
- "credit cards",
13
- "api"
14
- ],
15
7
  "engines": {
16
- "node": ">= v0.10.0"
8
+ "node": ">=22.0.0"
17
9
  },
18
10
  "main": "./index.js",
19
11
  "dependencies": {
20
- "@types/node": "14.14.x",
21
- "axios": "1.12.0",
22
- "form-data": "4.0.4",
23
- "promise": "8.1.x",
24
- "underscore": "1.12.x"
12
+ "@types/node": "22.19.18",
13
+ "axios": "1.16.0",
14
+ "form-data": "4.0.5",
15
+ "promise": "8.3.0",
16
+ "underscore": "1.13.8"
25
17
  },
26
18
  "devDependencies": {
27
- "chai": "4.2.x",
28
- "mocha": "9.2.0",
29
- "sinon": "9.2.x",
30
- "tsd": "^0.30.4",
31
- "ts-node": "^9.1.1",
32
- "typescript": "4.1.x"
19
+ "c8": "11.0.0",
20
+ "chai": "4.5.0",
21
+ "mocha": "11.7.5",
22
+ "sinon": "21.0.1",
23
+ "ts-node": "10.9.2",
24
+ "tsd": "0.33.0",
25
+ "typescript": "6.0.3"
33
26
  },
34
27
  "scripts": {
35
- "start": "npm install -g mocha && npm install -g jsdox && npm install",
36
- "documentation": "jsdox -t docs/templates/ -i README -o docs lib/services",
37
28
  "test": "mocha 'test/**/*.js' --recursive --timeout 30000 --ui bdd",
29
+ "test:coverage": "c8 --reporter=lcov --reporter=text pnpm test",
38
30
  "test:types": "tsd"
39
31
  }
40
- }
32
+ }
@@ -1,32 +0,0 @@
1
- # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
-
4
- name: mangopay4-nodejs-sdk-ci
5
-
6
- on:
7
- push:
8
- branches:
9
- # push on master branch
10
- - master
11
- pull_request:
12
- branches: [ master ]
13
-
14
- jobs:
15
- build:
16
-
17
- runs-on: ubuntu-latest
18
-
19
- strategy:
20
- matrix:
21
- node-version: [16.x]
22
- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
23
-
24
- steps:
25
- - uses: actions/checkout@v2
26
- - name: Use Node.js ${{ matrix.node-version }}
27
- uses: actions/setup-node@v2
28
- with:
29
- node-version: ${{ matrix.node-version }}
30
- - run: npm i
31
- - run: npm run build --if-present
32
- - run: npm test && npm run test:types
@@ -1,26 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3
-
4
- name: mangopay4-nodejs-sdk-cd
5
-
6
- on:
7
- push:
8
- # Sequence of patterns matched against refs/tags
9
- tags:
10
- # It pushes any tags that contain a v. ex: v1.16.1
11
- - '*'
12
-
13
- jobs:
14
- build:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - uses: actions/checkout@v2
18
- - uses: actions/setup-node@v2
19
- with:
20
- node-version: 16
21
- registry-url: https://registry.npmjs.org/
22
- - run: npm i
23
- - run: npm run build --if-present
24
- - run: npm publish
25
- env:
26
- NODE_AUTH_TOKEN: ${{secrets.NPM_OFFICIEL_TOKEN}}
package/.jshintrc DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "nonew": true,
3
- "curly": true,
4
- "noarg": true,
5
- "forin": true,
6
- "noempty": true,
7
- "node": true,
8
- "eqeqeq": true,
9
- "undef": true,
10
- "bitwise": true,
11
- "esversion": 6,
12
- "browser": true,
13
- "predef": ["require", "module"],
14
- "mocha": true,
15
- "expr": true
16
- }
Binary file