Skip to content

Commit 7181458

Browse files
Merge pull request #1227 from Adyen/automation/release
Release v14.1.0
2 parents b4774d1 + 27eb843 commit 7181458

File tree

193 files changed

+4288
-9636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+4288
-9636
lines changed
File renamed without changes.

.github/workflows/lib-gh-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ jobs:
3030
- name: Update develop branch
3131
run: |
3232
git checkout develop
33-
git merge origin/main
34-
git push origin develop
33+
git rebase origin/main
34+
git push origin develop

.github/workflows/lib-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
git fetch origin develop:develop
2323
git reset --hard develop
2424
- name: Get the release script
25+
if: github.repository != 'Adyen/adyen-node-api-library'
2526
run: |
2627
wget https://raw.githubusercontent.com/Adyen/adyen-node-api-library/develop/.github/scripts/release.js -P ./.github/scripts
2728
- name: Grab current version
@@ -45,6 +46,7 @@ jobs:
4546
CURRENT_VERSION: ${{steps.current-version.outputs.currentVersion}}
4647
NEXT_VERSION: ${{steps.release.outputs.nextVersion}}
4748
- name: Delete the release script
49+
if: github.repository != 'Adyen/adyen-node-api-library'
4850
run: rm -f ./.github/scripts/release.js
4951
- name: Create Pull Request
5052
id: cpr
@@ -66,4 +68,4 @@ jobs:
6668
with:
6769
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
6870
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
69-
merge-method: merge
71+
merge-method: merge

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ openapi-generator-url:=https://repo1.maven.org/maven2/org/openapitools/openapi-g
44
openapi-generator-jar:=build/openapi-generator-cli.jar
55
openapi-generator-cli:=java -jar $(openapi-generator-jar)
66

7-
services:=balanceControl balancePlatform binLookup checkout configurationWebhooks dataProtection legalEntityManagement management payment payout recurring reportWebhooks storedValue terminalManagement transfer transferWebhooks
7+
services:=acsWebhooks balanceControl balancePlatform binLookup checkout configurationWebhooks dataProtection legalEntityManagement management managementWebhooks payment payout recurring reportWebhooks storedValue terminalManagement transfers transferWebhooks
88

99
# Generate models (for each service)
1010
models: $(services)
@@ -26,10 +26,14 @@ platformsFund: spec=FundService-v6
2626
platformsNotificationConfiguration: spec=NotificationConfigurationService-v6
2727
platformsHostedOnboardingPage: spec=HopService-v6
2828
transfers: spec=TransferService-v3
29+
2930
# BalanceWebhooks
31+
acsWebhooks: spec=BalancePlatformAcsNotification-v1
3032
configurationWebhooks: spec=BalancePlatformConfigurationNotification-v1
3133
reportWebhooks: spec=BalancePlatformReportNotification-v1
3234
transferWebhooks: spec=BalancePlatformTransferNotification-v3
35+
# ManagementWebhooks
36+
managementWebhooks: spec=ManagementNotificationService-v1
3337

3438
$(services): build/spec $(openapi-generator-jar)
3539
rm -rf src/typings/$@ build/model

README.md

Lines changed: 209 additions & 27 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adyen/api-library",
3-
"version": "14.0.0",
3+
"version": "14.1.0",
44
"description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.",
55
"main": "lib/src/index.js",
66
"types": "lib/src/index.d.ts",
@@ -41,13 +41,13 @@
4141
"acorn": "^8.0.1",
4242
"coveralls": "3.1.1",
4343
"dotenv": "^16.0.0",
44-
"eslint": "8.44.0",
44+
"eslint": "8.48.0",
4545
"eslint-plugin-unused-imports": "^2.0.0",
4646
"jest": "^27.0.6",
4747
"jest-ts-auto-mock": "^2.0.0",
4848
"kind-of": "^6.0.3",
4949
"minimist": ">=1.2.3",
50-
"nock": "13.3.1",
50+
"nock": "13.3.3",
5151
"ts-auto-mock": "^3.3.5",
5252
"ts-jest": "^27.0.4",
5353
"ts-loader": "9.4.4",
@@ -58,6 +58,6 @@
5858
"https-proxy-agent": "5.0.1"
5959
},
6060
"optionalDependencies": {
61-
"@types/node": "14.18.53"
61+
"@types/node": "14.18.58"
6262
}
6363
}

src/__tests__/balancePlatform.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ describe("Balance Platform", (): void => {
348348
"status": balancePlatform.SweepConfigurationV2.StatusEnum.Inactive,
349349
"currency": "EUR",
350350
"schedule": {
351-
"type": balancePlatform.CronSweepSchedule.TypeEnum.Cron
351+
"type": balancePlatform.SweepSchedule.TypeEnum.Cron
352352
}
353353
};
354354

src/__tests__/classicIntegration.spec.ts

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import nock from "nock";
22
import {createClient} from "../__mocks__/base";
33
import Client from "../client";
44
import ClassicIntegration from "../services/paymentApi";
5-
import { payments } from "../typings";
5+
import { payment } from "../typings";
66
import HttpClientException from "../httpClient/httpClientException";
7+
import {PaymentResult} from "../typings/payment/paymentResult";
78

89
let client: Client;
910
let classicIntegration: ClassicIntegration;
@@ -35,7 +36,7 @@ describe("Classic Integration", (): void => {
3536
"authCode": "011381"
3637
}
3738
);
38-
const paymentRequest: payments.PaymentRequest = {
39+
const paymentRequest: payment.PaymentRequest = {
3940
"card": {
4041
"number": "4111111111111111",
4142
"expiryMonth": "03",
@@ -51,7 +52,7 @@ describe("Classic Integration", (): void => {
5152
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
5253
};
5354

54-
const paymentResult: payments.PaymentResult = await classicIntegration.authorise(paymentRequest);
55+
const paymentResult: PaymentResult = await classicIntegration.authorise(paymentRequest);
5556
expect(paymentResult.pspReference).toEqual("JVBXGSDM53RZNN82");
5657
});
5758

@@ -65,7 +66,7 @@ describe("Classic Integration", (): void => {
6566
"errorType": "security"
6667
}
6768
);
68-
const paymentRequest: payments.PaymentRequest = {
69+
const paymentRequest: payment.PaymentRequest = {
6970
"card": {
7071
"number": "4111111111111111",
7172
"expiryMonth": "03",
@@ -104,14 +105,14 @@ describe("Classic Integration", (): void => {
104105
"authCode": "011381"
105106
}
106107
);
107-
const paymentRequest: payments.PaymentRequest3d = {
108+
const paymentRequest: payment.PaymentRequest3d = {
108109
"md": "31h..........vOXek7w",
109110
"paResponse": "eNqtmF........wGVA4Ch",
110111
"shopperIP": "61.294.12.12",
111112
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
112113
};
113114

114-
const paymentResult: payments.PaymentResult = await classicIntegration.authorise3d(paymentRequest);
115+
const paymentResult: payment.PaymentResult = await classicIntegration.authorise3d(paymentRequest);
115116
expect(paymentResult.pspReference).toEqual("JVBXGSDM53RZNN82");
116117
});
117118

@@ -127,7 +128,7 @@ describe("Classic Integration", (): void => {
127128
"authCode": "011381"
128129
}
129130
);
130-
const paymentRequest: payments.PaymentRequest3ds2 = {
131+
const paymentRequest: payment.PaymentRequest3ds2 = {
131132
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
132133
"amount": {
133134
"value": 1500,
@@ -141,7 +142,7 @@ describe("Classic Integration", (): void => {
141142
"threeDS2Token": "— - BINARY DATA - -"
142143
};
143144

144-
const paymentResult: payments.PaymentResult = await classicIntegration.authorise3ds2(paymentRequest);
145+
const paymentResult: payment.PaymentResult = await classicIntegration.authorise3ds2(paymentRequest);
145146
expect(paymentResult.pspReference).toEqual("JVBXGSDM53RZNN82");
146147
});
147148

@@ -150,25 +151,25 @@ describe("Classic Integration", (): void => {
150151
"threeDS2Result": { "authenticationValue": "THREEDS2RESULT"}
151152
});
152153

153-
const getAuthenticationResultrequest: payments.AuthenticationResultRequest = {
154+
const getAuthenticationResultrequest: payment.AuthenticationResultRequest = {
154155
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
155156
"pspReference": "9935272408535455"
156157
};
157158

158-
const getAuthenticationResultResponse: payments.AuthenticationResultResponse = await classicIntegration.getAuthenticationResult(getAuthenticationResultrequest);
159+
const getAuthenticationResultResponse: payment.AuthenticationResultResponse = await classicIntegration.getAuthenticationResult(getAuthenticationResultrequest);
159160
expect(getAuthenticationResultResponse?.threeDS2Result?.authenticationValue).toEqual("THREEDS2RESULT");
160161
});
161162

162163
test("Should retrieve 3DS2 result", async (): Promise<void> => {
163164
scope.post("/retrieve3ds2Result").reply(200, {
164165
"threeDS2Result": { "authenticationValue": "THREEDS2RESULT"}
165166
});
166-
const retrieve3ds2ResultRequest: payments.ThreeDS2ResultRequest = {
167+
const retrieve3ds2ResultRequest: payment.ThreeDS2ResultRequest = {
167168
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
168169
"pspReference": "9935272408535455"
169170
};
170171

171-
const retrieve3ds2ResultResponse: payments.ThreeDS2ResultResponse = await classicIntegration.retrieve3ds2Result(retrieve3ds2ResultRequest);
172+
const retrieve3ds2ResultResponse: payment.ThreeDS2ResultResponse = await classicIntegration.retrieve3ds2Result(retrieve3ds2ResultRequest);
172173
expect(retrieve3ds2ResultResponse?.threeDS2Result?.authenticationValue).toEqual("THREEDS2RESULT");
173174
});
174175

@@ -179,7 +180,7 @@ describe("Classic Integration", (): void => {
179180
"response": "[capture-received]"
180181
});
181182

182-
const modificationRequest: payments.CaptureRequest = {
183+
const modificationRequest: payment.CaptureRequest = {
183184
"originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE",
184185
"modificationAmount": {
185186
"value": 500,
@@ -189,8 +190,8 @@ describe("Classic Integration", (): void => {
189190
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
190191
};
191192

192-
const modificationResult: payments.ModificationResult = await classicIntegration.capture(modificationRequest);
193-
expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.CaptureReceived);
193+
const modificationResult: payment.ModificationResult = await classicIntegration.capture(modificationRequest);
194+
expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.CaptureReceived);
194195
});
195196

196197
test("Should successfully send Cancel request", async (): Promise<void> => {
@@ -200,14 +201,14 @@ describe("Classic Integration", (): void => {
200201
"response": "[cancel-received]"
201202
});
202203

203-
const modificationRequest: payments.CancelRequest = {
204+
const modificationRequest: payment.CancelRequest = {
204205
"originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE",
205206
"reference": "YourModificationReference",
206207
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
207208
};
208209

209-
const modificationResult: payments.ModificationResult = await classicIntegration.cancel(modificationRequest);
210-
expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.CancelReceived);
210+
const modificationResult: payment.ModificationResult = await classicIntegration.cancel(modificationRequest);
211+
expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.CancelReceived);
211212
});
212213

213214
test("Should successfully send Refund request", async (): Promise<void> => {
@@ -217,7 +218,7 @@ describe("Classic Integration", (): void => {
217218
"response": "[refund-received]"
218219
});
219220

220-
const modificationRequest: payments.RefundRequest = {
221+
const modificationRequest: payment.RefundRequest = {
221222
"originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE",
222223
"modificationAmount": {
223224
"value": 500,
@@ -227,8 +228,8 @@ describe("Classic Integration", (): void => {
227228
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
228229
};
229230

230-
const modificationResult: payments.ModificationResult = await classicIntegration.refund(modificationRequest);
231-
expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.RefundReceived);
231+
const modificationResult: payment.ModificationResult = await classicIntegration.refund(modificationRequest);
232+
expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.RefundReceived);
232233
});
233234

234235
test("Should successfully send CancelOrRefund request", async (): Promise<void> => {
@@ -238,14 +239,14 @@ describe("Classic Integration", (): void => {
238239
"response": "[cancelOrRefund-received]"
239240
});
240241

241-
const modificationRequest: payments.CancelOrRefundRequest = {
242+
const modificationRequest: payment.CancelOrRefundRequest = {
242243
"originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE",
243244
"reference": "YourModificationReference",
244245
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
245246
};
246247

247-
const modificationResult: payments.ModificationResult = await classicIntegration.cancelOrRefund(modificationRequest);
248-
expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.CancelOrRefundReceived);
248+
const modificationResult: payment.ModificationResult = await classicIntegration.cancelOrRefund(modificationRequest);
249+
expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.CancelOrRefundReceived);
249250
});
250251

251252
test("Should successfully send TechnicalCancel request", async (): Promise<void> => {
@@ -255,7 +256,7 @@ describe("Classic Integration", (): void => {
255256
"response": "[technical-cancel-received]"
256257
});
257258

258-
const modificationRequest: payments.TechnicalCancelRequest = {
259+
const modificationRequest: payment.TechnicalCancelRequest = {
259260
"originalMerchantReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE",
260261
"modificationAmount": {
261262
"value": 500,
@@ -265,8 +266,8 @@ describe("Classic Integration", (): void => {
265266
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
266267
};
267268

268-
const modificationResult: payments.ModificationResult = await classicIntegration.technicalCancel(modificationRequest);
269-
expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.TechnicalCancelReceived);
269+
const modificationResult: payment.ModificationResult = await classicIntegration.technicalCancel(modificationRequest);
270+
expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.TechnicalCancelReceived);
270271
});
271272

272273
test("Should successfully send AdjustAuthorisation request", async (): Promise<void> => {
@@ -276,7 +277,7 @@ describe("Classic Integration", (): void => {
276277
"response": "[adjustAuthorisation-received]"
277278
});
278279

279-
const modificationRequest: payments.AdjustAuthorisationRequest = {
280+
const modificationRequest: payment.AdjustAuthorisationRequest = {
280281
"originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE",
281282
"modificationAmount": {
282283
"value": 500,
@@ -286,8 +287,8 @@ describe("Classic Integration", (): void => {
286287
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
287288
};
288289

289-
const modificationResult: payments.ModificationResult = await classicIntegration.adjustAuthorisation(modificationRequest);
290-
expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.AdjustAuthorisationReceived);
290+
const modificationResult: payment.ModificationResult = await classicIntegration.adjustAuthorisation(modificationRequest);
291+
expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.AdjustAuthorisationReceived);
291292
});
292293

293294
test("Should successfully send Donate request", async (): Promise<void> => {
@@ -297,7 +298,7 @@ describe("Classic Integration", (): void => {
297298
"response": "[donation-received]"
298299
});
299300

300-
const modificationRequest: payments.DonationRequest = {
301+
const modificationRequest: payment.DonationRequest = {
301302
"originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE",
302303
"modificationAmount": {
303304
"value": 500,
@@ -308,8 +309,8 @@ describe("Classic Integration", (): void => {
308309
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
309310
};
310311

311-
const modificationResult: payments.ModificationResult = await classicIntegration.donate(modificationRequest);
312-
expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.DonationReceived);
312+
const modificationResult: payment.ModificationResult = await classicIntegration.donate(modificationRequest);
313+
expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.DonationReceived);
313314
});
314315

315316
test("Should successfully send VoidPendingRefund request", async (): Promise<void> => {
@@ -319,13 +320,13 @@ describe("Classic Integration", (): void => {
319320
"response": "[voidPendingRefund-received]"
320321
});
321322

322-
const modificationRequest: payments.VoidPendingRefundRequest = {
323+
const modificationRequest: payment.VoidPendingRefundRequest = {
323324
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
324325
"tenderReference": "5Iw8001176969533005",
325326
"uniqueTerminalId": "VX820-123456789"
326327
};
327328

328-
const modificationResult: payments.ModificationResult = await classicIntegration.voidPendingRefund(modificationRequest);
329-
expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.VoidPendingRefundReceived);
329+
const modificationResult: payment.ModificationResult = await classicIntegration.voidPendingRefund(modificationRequest);
330+
expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.VoidPendingRefundReceived);
330331
});
331332
});

src/__tests__/management.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import nock from "nock";
22
import Client from "../client";
33
import { createClient } from "../__mocks__/base";
4-
import { ManagemenAPI } from "../services";
4+
import { ManagementAPI } from "../services";
55
import { management } from "../typings";
66
import * as requests from "../__mocks__/management/requests";
77
import * as responses from "../__mocks__/management/responses";
@@ -11,7 +11,7 @@ import {forbiddenError} from "../__mocks__/management/forbidden403";
1111
import {invalidUserCreated422} from "../__mocks__/management/invalidUserCreated422";
1212

1313
let client: Client;
14-
let managementService: ManagemenAPI;
14+
let managementService: ManagementAPI;
1515
let scope: nock.Scope;
1616

1717
const merchantId = "merchantId";
@@ -29,7 +29,7 @@ beforeEach((): void => {
2929
}
3030
client = createClient();
3131
scope = nock("https://management-test.adyen.com/v1");
32-
managementService = new ManagemenAPI(client);
32+
managementService = new ManagementAPI(client);
3333
});
3434

3535
afterEach(() => {

0 commit comments

Comments
 (0)