mangopay4-nodejs-sdk 1.68.0 → 2.1.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 (67) hide show
  1. package/CHANGELOG.md +68 -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/apiMethods.js +6 -1
  9. package/lib/models/CardPreAuthorization.js +2 -2
  10. package/lib/models/Hook.js +2 -1
  11. package/lib/models/PayInRecurringRegistration.js +2 -1
  12. package/lib/models/PayPalDepositPreauthorization.js +21 -0
  13. package/lib/models/ReportV2.js +2 -1
  14. package/lib/services/Deposits.js +13 -0
  15. package/lib/services/PayIns.js +94 -1
  16. package/package.json +16 -24
  17. package/typings/enums.d.ts +3 -1
  18. package/typings/models/cardPreauthorization.d.ts +7 -1
  19. package/typings/models/deposit.d.ts +165 -0
  20. package/typings/models/hook.d.ts +7 -2
  21. package/typings/models/payIn.d.ts +1302 -135
  22. package/typings/models/reportV2.d.ts +2 -0
  23. package/typings/models/virtualAccount.d.ts +48 -0
  24. package/typings/services/Deposits.d.ts +2 -0
  25. package/typings/services/PayIns.d.ts +63 -6
  26. package/.github/workflows/node.js.yml +0 -32
  27. package/.github/workflows/npm-publish.yml +0 -26
  28. package/.jshintrc +0 -16
  29. package/test/TestKycPageFile.png +0 -0
  30. package/test/helpers.js +0 -1537
  31. package/test/main.js +0 -10
  32. package/test/mocha.opts +0 -3
  33. package/test/services/Acquiring.js +0 -338
  34. package/test/services/BankAccounts.js +0 -46
  35. package/test/services/BankingAliases.js +0 -89
  36. package/test/services/CardPreAuthorizations.js +0 -70
  37. package/test/services/CardRegistrations.js +0 -239
  38. package/test/services/Cards.js +0 -56
  39. package/test/services/Clients.js +0 -235
  40. package/test/services/Conversions.js +0 -319
  41. package/test/services/Deposits.js +0 -148
  42. package/test/services/Disputes.js +0 -542
  43. package/test/services/EMoney.js +0 -54
  44. package/test/services/Events.js +0 -147
  45. package/test/services/Hooks.js +0 -109
  46. package/test/services/Idempotency.js +0 -41
  47. package/test/services/IdentityVerifications.js +0 -68
  48. package/test/services/KycDocuments.js +0 -73
  49. package/test/services/Mandates.js +0 -256
  50. package/test/services/PayIns.js +0 -2632
  51. package/test/services/PayOuts.js +0 -119
  52. package/test/services/RateLimit.js +0 -43
  53. package/test/services/Recipients.js +0 -234
  54. package/test/services/Refunds.js +0 -123
  55. package/test/services/Regulatory.js +0 -45
  56. package/test/services/Reports.js +0 -114
  57. package/test/services/ReportsV2.js +0 -306
  58. package/test/services/Repudiations.js +0 -22
  59. package/test/services/Settlements.js +0 -127
  60. package/test/services/Tokens.js +0 -55
  61. package/test/services/Transfers.js +0 -137
  62. package/test/services/UboDeclarations.js +0 -130
  63. package/test/services/Users.js +0 -1322
  64. package/test/services/VirtualAccounts.js +0 -105
  65. package/test/services/Wallets.js +0 -132
  66. package/test/settlement_sample.csv +0 -8
  67. package/test/settlement_sample_bad.csv +0 -8
@@ -138,6 +138,8 @@ export namespace reportV2 {
138
138
  * The data columns to be included in the report.
139
139
  */
140
140
  Columns?: string[];
141
+
142
+ DateRangeBy?: string;
141
143
  }
142
144
 
143
145
  interface ReportColumn {
@@ -58,8 +58,14 @@ export namespace virtualAccount {
58
58
  */
59
59
  Capabilities: VirtualAccountCapabilities;
60
60
 
61
+ /**
62
+ * Result code
63
+ */
61
64
  ResultCode: string;
62
65
 
66
+ /**
67
+ * Result message
68
+ */
63
69
  ResultMessage: string;
64
70
  }
65
71
 
@@ -112,8 +118,14 @@ export namespace virtualAccount {
112
118
  */
113
119
  Address: VirtualAccountAddress;
114
120
 
121
+ /**
122
+ * Details of the account in the local account identifier format
123
+ */
115
124
  Account: LocalAccount;
116
125
 
126
+ /**
127
+ * The name of the bank
128
+ */
117
129
  BankName: string;
118
130
  }
119
131
 
@@ -136,19 +148,55 @@ export namespace virtualAccount {
136
148
  */
137
149
  SortCode: string;
138
150
 
151
+ /**
152
+ * The international bank account number (IBAN) of the account.
153
+ */
139
154
  Iban: string;
140
155
 
156
+ /**
157
+ * The bank identifier code (BIC) of the account.
158
+ */
141
159
  Bic: string;
142
160
 
161
+ /**
162
+ * The 9-digit ACH routing number of the account.
163
+ */
143
164
  AchNumber: string;
144
165
 
166
+ /**
167
+ * The 9-digit Fedwire (ABA) number of the account.
168
+ */
145
169
  FedWireNumber: string;
146
170
 
171
+ /**
172
+ * The account type of the account
173
+ */
147
174
  AccountType: string;
148
175
 
176
+ /**
177
+ * The 5-digit branch code or transit number of the account.
178
+ */
149
179
  BranchCode: string;
150
180
 
181
+ /**
182
+ * The 3-digit institution number of the account.
183
+ */
151
184
  InstitutionNumber: string;
185
+
186
+ /**
187
+ * The 4-digit bank code of the account
188
+ */
189
+ BankCode: string;
190
+
191
+ /**
192
+ * The 6-digit bank state branch (BSB) code of the account.
193
+ */
194
+ BSBCode: string;
195
+
196
+ /**
197
+ * The 5-digit bank clearing number of the account
198
+ */
199
+ BCNumber: string;
152
200
  }
153
201
 
154
202
  interface InternationalAccount {
@@ -6,6 +6,8 @@ import MethodOverload = base.MethodOverload;
6
6
  export class Deposits {
7
7
  create: MethodOverload<deposit.CreateDeposit, deposit.DepositData>;
8
8
 
9
+ createPayPalPreauthorization: MethodOverload<deposit.CreatePayPalDepositPreauthorization, deposit.DepositData>;
10
+
9
11
  get: MethodOverload<string, deposit.DepositData>;
10
12
 
11
13
  cancel: MethodOverload<string, deposit.DepositData>;
@@ -1,6 +1,6 @@
1
- import { payIn } from "../models/payIn";
2
- import { refund } from "../models/refund";
3
- import { base } from "../base";
1
+ import {payIn} from "../models/payIn";
2
+ import {refund} from "../models/refund";
3
+ import {base} from "../base";
4
4
  import MethodOverload = base.MethodOverload;
5
5
  import TwoArgsMethodOverload = base.TwoArgsMethodOverload;
6
6
  import NoArgMethodOverload = base.NoArgMethodOverload;
@@ -35,7 +35,20 @@ export class PayIns {
35
35
  MethodOverload<payIn.CreateBizumWebPayIn, payIn.BizumWebPayInData> &
36
36
  MethodOverload<payIn.CreatePayByBankWebPayIn, payIn.PayByBankWebPayInData>;
37
37
 
38
-
38
+ /**
39
+ * Create a recurring PayIn (Card, PayPal, ApplePay, GooglePay)
40
+ * @param payIn
41
+ * @param options
42
+ */
43
+ createRecurringPayIn:
44
+ MethodOverload<payIn.CreateRecurringCardPayInCIT, payIn.RecurringPayInData> &
45
+ MethodOverload<payIn.CreateRecurringCardPayInMIT, payIn.RecurringPayInData> &
46
+ MethodOverload<payIn.CreateRecurringPayPalPayInCIT, payIn.RecurringPayInData> &
47
+ MethodOverload<payIn.CreateRecurringPayPalPayInMIT, payIn.RecurringPayInData> &
48
+ MethodOverload<payIn.CreateRecurringApplePayPayInCIT, payIn.RecurringPayInData> &
49
+ MethodOverload<payIn.CreateRecurringApplePayPayInMIT, payIn.RecurringPayInData> &
50
+ MethodOverload<payIn.CreateRecurringGooglePayPayInCIT, payIn.RecurringPayInData> &
51
+ MethodOverload<payIn.CreateRecurringGooglePayPayInMIT, payIn.RecurringPayInData>
39
52
 
40
53
  /**
41
54
  * Get pay-in
@@ -64,58 +77,102 @@ export class PayIns {
64
77
  /**
65
78
  * Get Recurring PayIn
66
79
  * @param payInId
80
+ * @deprecated Use 'getRecurringPayInRegistration' instead
67
81
  */
68
82
  getRecurringPayin: MethodOverload<string, payIn.PayInRecurringRegistrationData>;
69
83
 
84
+ /**
85
+ * Get a recurring PayIn registration
86
+ * @param recurringPayInRegistrationId The recurring PayIn registration identifier
87
+ */
88
+ getRecurringPayInRegistration: MethodOverload<string, payIn.RecurringPayInRegistrationData>;
89
+
70
90
  /**
71
91
  * Update Recurring PayIn
72
92
  * @param payInId
73
93
  * @param updateData
94
+ * @deprecated Use 'updateRecurringPayInRegistration' instead
74
95
  */
75
96
  updateRecurringPayin: TwoArgsMethodOverload<string,
76
97
  payIn.UpdatePayInRecurringRegistration,
77
98
  payIn.PayInRecurringRegistrationData>;
78
99
 
100
+ /**
101
+ * Update a recurring PayIn registration. The Object must contain the 'Id'.
102
+ */
103
+ updateRecurringPayInRegistration:
104
+ MethodOverload<payIn.UpdateRecurringCardPayInRegistration, payIn.RecurringPayInRegistrationData> &
105
+ MethodOverload<payIn.UpdateRecurringPayPalPayInRegistration, payIn.RecurringPayInRegistrationData> &
106
+ MethodOverload<payIn.UpdateRecurringApplePayPayInRegistration, payIn.RecurringPayInRegistrationData> &
107
+ MethodOverload<payIn.UpdateRecurringGooglePayPayInRegistration, payIn.RecurringPayInRegistrationData>
108
+
79
109
  /**
80
110
  * Create Recurring PayIn Registration
81
111
  * @param createData
112
+ * @deprecated Use 'createRecurringPayInRegistration' instead
82
113
  */
83
114
  createRecurringPayment: MethodOverload<payIn.CreatePayInRecurringRegistration,
84
115
  payIn.PayInRecurringRegistrationData>;
85
116
 
117
+ /**
118
+ * Create a recurring PayIn registration
119
+ */
120
+ createRecurringPayInRegistration:
121
+ MethodOverload<payIn.CreateRecurringCardPayInRegistration, payIn.RecurringPayInRegistrationData> &
122
+ MethodOverload<payIn.CreateRecurringPayPalPayInRegistration, payIn.RecurringPayInRegistrationData> &
123
+ MethodOverload<payIn.CreateRecurringApplePayPayInRegistration, payIn.RecurringPayInRegistrationData> &
124
+ MethodOverload<payIn.CreateRecurringGooglePayPayInRegistration, payIn.RecurringPayInRegistrationData>
125
+
86
126
  /**
87
127
  * Create new recurring pay-in CIT
128
+ * @deprecated Use 'createRecurringPayIn' instead
88
129
  */
89
130
  createRecurringPayInRegistrationCIT: MethodOverload<payIn.CreateRecurringPayInCIT,
90
131
  payIn.RecurringPayInData>;
91
132
 
92
133
  /**
93
134
  * Create new recurring pay-in MIT
135
+ * @deprecated Use 'createRecurringPayIn' instead
94
136
  */
95
137
  createRecurringPayInRegistrationMIT: MethodOverload<payIn.CreateRecurringPayInMIT,
96
138
  payIn.RecurringPayInData>;
97
139
 
98
140
  /**
99
141
  * Create new Card PreAuthorized Deposit PayIn without complement
142
+ * @deprecated Use 'createDepositPreauthorizedPayInWithoutComplement' instead
100
143
  */
101
144
  createCardPreAuthorizedDepositPayIn:
102
145
  MethodOverload<payIn.CreateCardPreAuthorizedDepositPayIn, payIn.CardPreAuthorizedDepositPayInData>;
103
146
 
147
+ /**
148
+ * Create new PreAuthorized Deposit PayIn without complement
149
+ */
150
+ createDepositPreauthorizedPayInWithoutComplement:
151
+ MethodOverload<payIn.CreateDepositPreAuthorizedPayIn, payIn.DepositPreAuthorizedPayInData>;
152
+
104
153
  /**
105
154
  * Create new Card PreAuthorized Deposit PayIn prior to complement
106
155
  */
107
156
  createDepositPreauthorizedPayInPriorToComplement:
108
- MethodOverload<payIn.CreateCardPreAuthorizedDepositPayIn, payIn.CardPreAuthorizedDepositPayInData>;
157
+ MethodOverload<payIn.CreateCardPreAuthorizedDepositPayIn, payIn.CardPreAuthorizedDepositPayInData> &
158
+ MethodOverload<payIn.CreateDepositPreAuthorizedPayIn, payIn.DepositPreAuthorizedPayInData>;
109
159
 
110
160
  /**
111
161
  * Create new Card PreAuthorized Deposit PayIn complement
112
162
  */
113
163
  createDepositPreauthorizedPayInComplement:
114
- MethodOverload<payIn.CreateCardPreAuthorizedDepositPayIn, payIn.CardPreAuthorizedDepositPayInData>;
164
+ MethodOverload<payIn.CreateCardPreAuthorizedDepositPayIn, payIn.CardPreAuthorizedDepositPayInData> &
165
+ MethodOverload<payIn.CreateDepositPreAuthorizedPayIn, payIn.DepositPreAuthorizedPayInData>;
115
166
 
167
+ /**
168
+ * @deprecated Use 'createRecurringPayIn' instead
169
+ */
116
170
  createRecurringPayPalPayInCIT: MethodOverload<payIn.CreateRecurringPayPalPayInCIT,
117
171
  payIn.RecurringPayInData>;
118
172
 
173
+ /**
174
+ * @deprecated Use 'createRecurringPayIn' instead
175
+ */
119
176
  createRecurringPayPalPayInMIT: MethodOverload<payIn.CreateRecurringPayPalPayInMIT,
120
177
  payIn.RecurringPayInData>;
121
178
 
@@ -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