@superdurable/connector-adyen 0.1.0 → 0.2.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.
package/README.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Adyen TypeScript connector
2
2
 
3
- Implements `getPaymentLink`, returning a payment link ID, status, and amount currency. Go-recorded conformance checks exact requests, branches, retries, and outputs.
3
+ Version 0.2.0 implements all 10 Adyen checkout operations for Dex TypeScript
4
+ Flows, including payment link lifecycle, method discovery, six-digit BIN
5
+ lookup, and payment modifications. A modification returns Adyen's receipt for
6
+ asynchronous processing. See the [connector guide](../README.md) for how to
7
+ confirm the final outcome.
8
+
9
+ Applications with custom `newConnectionWithOperations` bindings must provide the nine
10
+ new operation handlers in v0.2.0. The client-backed and project constructors
11
+ bind them automatically.
4
12
 
5
13
  Create a secret API key in Adyen Customer Area > Developers > API credentials and grant the Checkout webservice role. Save it as `api_key` in Dex Web Connections. See the [connection guide](../README.md) and [runnable example](examples/payment-link-inspection/README.md). Live provider authorization remains unverified.
14
+
15
+ Run `npm run check` to replay Go-recorded requests, responses, and retry
16
+ decisions. Set `DEX_FLOW_SERVICE_ADDRESS` to a local Dex server and run
17
+ `npm run test:integration` to exercise the Flows against an Adyen fixture.
18
+
19
+ The amount fields use the generated signed 64-bit integer models. Use
20
+ `exactIntegerJSONCodec` at the Flow input and output boundaries to preserve
21
+ amounts outside JavaScript’s safe integer range. The runnable create-link
22
+ Flow demonstrates the corresponding amount codecs.
@@ -1,12 +1,544 @@
1
1
  {
2
2
  "connectorId": "adyen",
3
- "releaseTag": "connectors/adyen/go/v0.1.0",
3
+ "releaseTag": "connectors/adyen/go/v0.2.0",
4
4
  "package": {
5
5
  "ecosystem": "npm",
6
6
  "name": "@superdurable/connector-adyen",
7
- "version": "0.1.0"
7
+ "version": "0.2.0"
8
8
  },
9
9
  "factories": [
10
+ {
11
+ "name": "newLookupCardBrandsByBINStep",
12
+ "kind": "query",
13
+ "operationId": "lookupCardBrandsByBIN",
14
+ "inputType": "LookupCardBrandsByBINInput",
15
+ "description": "Look up supported card brands using only a six-digit issuer BIN.",
16
+ "fields": {
17
+ "stepType": "stepType",
18
+ "annotations": "annotations",
19
+ "connectionName": "connectionName",
20
+ "resultAttribute": "resultAttribute"
21
+ },
22
+ "branches": [
23
+ {
24
+ "id": "found",
25
+ "field": "found",
26
+ "optional": false
27
+ },
28
+ {
29
+ "id": "providerRejected",
30
+ "field": "providerRejected",
31
+ "optional": true
32
+ },
33
+ {
34
+ "id": "invalidResponse",
35
+ "field": "invalidResponse",
36
+ "optional": true
37
+ },
38
+ {
39
+ "id": "defect",
40
+ "field": "defect",
41
+ "optional": true
42
+ }
43
+ ],
44
+ "inputSchema": {
45
+ "additionalProperties": false,
46
+ "description": "LookupCardBrandsByBINInput supplies only a six-digit issuer prefix, never a full card number.",
47
+ "properties": {
48
+ "countryCode": {
49
+ "description": "CountryCode optionally narrows supported brands to an uppercase two-letter shopper country.",
50
+ "type": "string"
51
+ },
52
+ "issuerBin": {
53
+ "description": "IssuerBIN is exactly the first six card digits; never supply the remaining digits.",
54
+ "type": "string"
55
+ },
56
+ "merchantAccount": {
57
+ "description": "MerchantAccount is the account shown in Customer Area > Settings > Merchant accounts.",
58
+ "type": "string"
59
+ }
60
+ },
61
+ "required": [
62
+ "issuerBin",
63
+ "merchantAccount"
64
+ ],
65
+ "type": "object"
66
+ }
67
+ },
68
+ {
69
+ "name": "newCapturePaymentStep",
70
+ "kind": "mutation",
71
+ "operationId": "capturePayment",
72
+ "inputType": "PaymentModificationInput",
73
+ "description": "Capture an authorised payment amount. Adyen idempotency keys make retries safe.",
74
+ "fields": {
75
+ "stepType": "stepType",
76
+ "annotations": "annotations",
77
+ "connectionName": "connectionName",
78
+ "resultAttribute": "resultAttribute"
79
+ },
80
+ "branches": [
81
+ {
82
+ "id": "received",
83
+ "field": "received",
84
+ "optional": false
85
+ },
86
+ {
87
+ "id": "providerRejected",
88
+ "field": "providerRejected",
89
+ "optional": true
90
+ },
91
+ {
92
+ "id": "defect",
93
+ "field": "defect",
94
+ "optional": true
95
+ }
96
+ ],
97
+ "inputSchema": {
98
+ "additionalProperties": false,
99
+ "description": "PaymentModificationInput identifies a payment and optional amount to modify.",
100
+ "properties": {
101
+ "amountMinorUnits": {
102
+ "description": "AmountMinorUnits is the positive capture/refund amount or replacement authorised amount.",
103
+ "type": "integer"
104
+ },
105
+ "currencyCode": {
106
+ "description": "CurrencyCode is the original payment's three-letter ISO currency for amount operations.",
107
+ "type": "string"
108
+ },
109
+ "merchantAccount": {
110
+ "description": "MerchantAccount is the account in Customer Area > Settings > Merchant accounts.",
111
+ "type": "string"
112
+ },
113
+ "paymentPspReference": {
114
+ "description": "PaymentPspReference is the payment reference from Customer Area > Payments > Payment list.",
115
+ "type": "string"
116
+ },
117
+ "reference": {
118
+ "description": "Reference is an optional merchant reconciliation reference of at most 80 characters.",
119
+ "type": "string"
120
+ }
121
+ },
122
+ "required": [
123
+ "merchantAccount",
124
+ "paymentPspReference"
125
+ ],
126
+ "type": "object"
127
+ }
128
+ },
129
+ {
130
+ "name": "newCancelPaymentStep",
131
+ "kind": "mutation",
132
+ "operationId": "cancelPayment",
133
+ "inputType": "PaymentReferenceModificationInput",
134
+ "description": "Cancel an authorised uncaptured payment. Adyen idempotency keys make retries safe.",
135
+ "fields": {
136
+ "stepType": "stepType",
137
+ "annotations": "annotations",
138
+ "connectionName": "connectionName",
139
+ "resultAttribute": "resultAttribute"
140
+ },
141
+ "branches": [
142
+ {
143
+ "id": "received",
144
+ "field": "received",
145
+ "optional": false
146
+ },
147
+ {
148
+ "id": "providerRejected",
149
+ "field": "providerRejected",
150
+ "optional": true
151
+ },
152
+ {
153
+ "id": "defect",
154
+ "field": "defect",
155
+ "optional": true
156
+ }
157
+ ],
158
+ "inputSchema": {
159
+ "additionalProperties": false,
160
+ "description": "PaymentReferenceModificationInput selects a payment for a full cancel or reversal.",
161
+ "properties": {
162
+ "merchantAccount": {
163
+ "description": "MerchantAccount is the account in Customer Area > Settings > Merchant accounts.",
164
+ "type": "string"
165
+ },
166
+ "paymentPspReference": {
167
+ "description": "PaymentPspReference is the payment reference from Customer Area > Payments > Payment list.",
168
+ "type": "string"
169
+ },
170
+ "reference": {
171
+ "description": "Reference is an optional merchant reconciliation reference of at most 80 characters.",
172
+ "type": "string"
173
+ }
174
+ },
175
+ "required": [
176
+ "merchantAccount",
177
+ "paymentPspReference"
178
+ ],
179
+ "type": "object"
180
+ }
181
+ },
182
+ {
183
+ "name": "newRefundPaymentStep",
184
+ "kind": "mutation",
185
+ "operationId": "refundPayment",
186
+ "inputType": "PaymentModificationInput",
187
+ "description": "Refund a captured payment amount. Adyen idempotency keys make retries safe.",
188
+ "fields": {
189
+ "stepType": "stepType",
190
+ "annotations": "annotations",
191
+ "connectionName": "connectionName",
192
+ "resultAttribute": "resultAttribute"
193
+ },
194
+ "branches": [
195
+ {
196
+ "id": "received",
197
+ "field": "received",
198
+ "optional": false
199
+ },
200
+ {
201
+ "id": "providerRejected",
202
+ "field": "providerRejected",
203
+ "optional": true
204
+ },
205
+ {
206
+ "id": "defect",
207
+ "field": "defect",
208
+ "optional": true
209
+ }
210
+ ],
211
+ "inputSchema": {
212
+ "additionalProperties": false,
213
+ "description": "PaymentModificationInput identifies a payment and optional amount to modify.",
214
+ "properties": {
215
+ "amountMinorUnits": {
216
+ "description": "AmountMinorUnits is the positive capture/refund amount or replacement authorised amount.",
217
+ "type": "integer"
218
+ },
219
+ "currencyCode": {
220
+ "description": "CurrencyCode is the original payment's three-letter ISO currency for amount operations.",
221
+ "type": "string"
222
+ },
223
+ "merchantAccount": {
224
+ "description": "MerchantAccount is the account in Customer Area > Settings > Merchant accounts.",
225
+ "type": "string"
226
+ },
227
+ "paymentPspReference": {
228
+ "description": "PaymentPspReference is the payment reference from Customer Area > Payments > Payment list.",
229
+ "type": "string"
230
+ },
231
+ "reference": {
232
+ "description": "Reference is an optional merchant reconciliation reference of at most 80 characters.",
233
+ "type": "string"
234
+ }
235
+ },
236
+ "required": [
237
+ "merchantAccount",
238
+ "paymentPspReference"
239
+ ],
240
+ "type": "object"
241
+ }
242
+ },
243
+ {
244
+ "name": "newReversePaymentStep",
245
+ "kind": "mutation",
246
+ "operationId": "reversePayment",
247
+ "inputType": "PaymentReferenceModificationInput",
248
+ "description": "Cancel or refund a full payment. Adyen idempotency keys make retries safe.",
249
+ "fields": {
250
+ "stepType": "stepType",
251
+ "annotations": "annotations",
252
+ "connectionName": "connectionName",
253
+ "resultAttribute": "resultAttribute"
254
+ },
255
+ "branches": [
256
+ {
257
+ "id": "received",
258
+ "field": "received",
259
+ "optional": false
260
+ },
261
+ {
262
+ "id": "providerRejected",
263
+ "field": "providerRejected",
264
+ "optional": true
265
+ },
266
+ {
267
+ "id": "defect",
268
+ "field": "defect",
269
+ "optional": true
270
+ }
271
+ ],
272
+ "inputSchema": {
273
+ "additionalProperties": false,
274
+ "description": "PaymentReferenceModificationInput selects a payment for a full cancel or reversal.",
275
+ "properties": {
276
+ "merchantAccount": {
277
+ "description": "MerchantAccount is the account in Customer Area > Settings > Merchant accounts.",
278
+ "type": "string"
279
+ },
280
+ "paymentPspReference": {
281
+ "description": "PaymentPspReference is the payment reference from Customer Area > Payments > Payment list.",
282
+ "type": "string"
283
+ },
284
+ "reference": {
285
+ "description": "Reference is an optional merchant reconciliation reference of at most 80 characters.",
286
+ "type": "string"
287
+ }
288
+ },
289
+ "required": [
290
+ "merchantAccount",
291
+ "paymentPspReference"
292
+ ],
293
+ "type": "object"
294
+ }
295
+ },
296
+ {
297
+ "name": "newUpdateAuthorisedAmountStep",
298
+ "kind": "mutation",
299
+ "operationId": "updateAuthorisedAmount",
300
+ "inputType": "PaymentModificationInput",
301
+ "description": "Replace an uncaptured payment authorisation amount. Adyen idempotency keys make retries safe.",
302
+ "fields": {
303
+ "stepType": "stepType",
304
+ "annotations": "annotations",
305
+ "connectionName": "connectionName",
306
+ "resultAttribute": "resultAttribute"
307
+ },
308
+ "branches": [
309
+ {
310
+ "id": "received",
311
+ "field": "received",
312
+ "optional": false
313
+ },
314
+ {
315
+ "id": "providerRejected",
316
+ "field": "providerRejected",
317
+ "optional": true
318
+ },
319
+ {
320
+ "id": "defect",
321
+ "field": "defect",
322
+ "optional": true
323
+ }
324
+ ],
325
+ "inputSchema": {
326
+ "additionalProperties": false,
327
+ "description": "PaymentModificationInput identifies a payment and optional amount to modify.",
328
+ "properties": {
329
+ "amountMinorUnits": {
330
+ "description": "AmountMinorUnits is the positive capture/refund amount or replacement authorised amount.",
331
+ "type": "integer"
332
+ },
333
+ "currencyCode": {
334
+ "description": "CurrencyCode is the original payment's three-letter ISO currency for amount operations.",
335
+ "type": "string"
336
+ },
337
+ "merchantAccount": {
338
+ "description": "MerchantAccount is the account in Customer Area > Settings > Merchant accounts.",
339
+ "type": "string"
340
+ },
341
+ "paymentPspReference": {
342
+ "description": "PaymentPspReference is the payment reference from Customer Area > Payments > Payment list.",
343
+ "type": "string"
344
+ },
345
+ "reference": {
346
+ "description": "Reference is an optional merchant reconciliation reference of at most 80 characters.",
347
+ "type": "string"
348
+ }
349
+ },
350
+ "required": [
351
+ "merchantAccount",
352
+ "paymentPspReference"
353
+ ],
354
+ "type": "object"
355
+ }
356
+ },
357
+ {
358
+ "name": "newListPaymentMethodsStep",
359
+ "kind": "query",
360
+ "operationId": "listPaymentMethods",
361
+ "inputType": "ListPaymentMethodsInput",
362
+ "description": "List available method codes and names without stored shopper payment details.",
363
+ "fields": {
364
+ "stepType": "stepType",
365
+ "annotations": "annotations",
366
+ "connectionName": "connectionName",
367
+ "resultAttribute": "resultAttribute"
368
+ },
369
+ "branches": [
370
+ {
371
+ "id": "listed",
372
+ "field": "listed",
373
+ "optional": false
374
+ },
375
+ {
376
+ "id": "providerRejected",
377
+ "field": "providerRejected",
378
+ "optional": true
379
+ },
380
+ {
381
+ "id": "invalidResponse",
382
+ "field": "invalidResponse",
383
+ "optional": true
384
+ },
385
+ {
386
+ "id": "defect",
387
+ "field": "defect",
388
+ "optional": true
389
+ }
390
+ ],
391
+ "inputSchema": {
392
+ "additionalProperties": false,
393
+ "description": "ListPaymentMethodsInput describes a checkout context without shopper identity.",
394
+ "properties": {
395
+ "amountMinorUnits": {
396
+ "description": "AmountMinorUnits is the positive proposed amount in currency minor units.",
397
+ "type": "integer"
398
+ },
399
+ "countryCode": {
400
+ "description": "CountryCode optionally narrows methods to an uppercase two-letter shopper country.",
401
+ "type": "string"
402
+ },
403
+ "currencyCode": {
404
+ "description": "CurrencyCode is the three-letter ISO currency of the proposed payment.",
405
+ "type": "string"
406
+ },
407
+ "merchantAccount": {
408
+ "description": "MerchantAccount is the account shown in Adyen Customer Area > Settings > Merchant accounts.",
409
+ "type": "string"
410
+ }
411
+ },
412
+ "required": [
413
+ "amountMinorUnits",
414
+ "currencyCode",
415
+ "merchantAccount"
416
+ ],
417
+ "type": "object"
418
+ }
419
+ },
420
+ {
421
+ "name": "newCreatePaymentLinkStep",
422
+ "kind": "mutation",
423
+ "operationId": "createPaymentLink",
424
+ "inputType": "CreatePaymentLinkInput",
425
+ "description": "Create a payment link for a merchant reference and amount with an Adyen idempotency key.",
426
+ "fields": {
427
+ "stepType": "stepType",
428
+ "annotations": "annotations",
429
+ "connectionName": "connectionName",
430
+ "resultAttribute": "resultAttribute"
431
+ },
432
+ "branches": [
433
+ {
434
+ "id": "created",
435
+ "field": "created",
436
+ "optional": false
437
+ },
438
+ {
439
+ "id": "providerRejected",
440
+ "field": "providerRejected",
441
+ "optional": true
442
+ },
443
+ {
444
+ "id": "invalidResponse",
445
+ "field": "invalidResponse",
446
+ "optional": true
447
+ },
448
+ {
449
+ "id": "defect",
450
+ "field": "defect",
451
+ "optional": true
452
+ }
453
+ ],
454
+ "inputSchema": {
455
+ "additionalProperties": false,
456
+ "description": "CreatePaymentLinkInput supplies the required Checkout fields and an optional shopper country.",
457
+ "properties": {
458
+ "amountMinorUnits": {
459
+ "description": "AmountMinorUnits is the positive amount in the currency's minor units.",
460
+ "type": "integer"
461
+ },
462
+ "countryCode": {
463
+ "description": "CountryCode optionally narrows available payment methods to a two-letter shopper country.",
464
+ "type": "string"
465
+ },
466
+ "currencyCode": {
467
+ "description": "CurrencyCode is the three-letter ISO currency of the amount.",
468
+ "type": "string"
469
+ },
470
+ "merchantAccount": {
471
+ "description": "MerchantAccount is the account shown in Adyen Customer Area > Settings > Merchant accounts.",
472
+ "type": "string"
473
+ },
474
+ "reference": {
475
+ "description": "Reference identifies the payment in future Adyen status communications.",
476
+ "type": "string"
477
+ }
478
+ },
479
+ "required": [
480
+ "amountMinorUnits",
481
+ "currencyCode",
482
+ "merchantAccount",
483
+ "reference"
484
+ ],
485
+ "type": "object"
486
+ }
487
+ },
488
+ {
489
+ "name": "newExpirePaymentLinkStep",
490
+ "kind": "mutation",
491
+ "operationId": "expirePaymentLink",
492
+ "inputType": "ExpirePaymentLinkInput",
493
+ "description": "Force a payment link to expire using the absolute expired status.",
494
+ "fields": {
495
+ "stepType": "stepType",
496
+ "annotations": "annotations",
497
+ "connectionName": "connectionName",
498
+ "resultAttribute": "resultAttribute"
499
+ },
500
+ "branches": [
501
+ {
502
+ "id": "expired",
503
+ "field": "expired",
504
+ "optional": false
505
+ },
506
+ {
507
+ "id": "notFound",
508
+ "field": "notFound",
509
+ "optional": true
510
+ },
511
+ {
512
+ "id": "providerRejected",
513
+ "field": "providerRejected",
514
+ "optional": true
515
+ },
516
+ {
517
+ "id": "invalidResponse",
518
+ "field": "invalidResponse",
519
+ "optional": true
520
+ },
521
+ {
522
+ "id": "defect",
523
+ "field": "defect",
524
+ "optional": true
525
+ }
526
+ ],
527
+ "inputSchema": {
528
+ "additionalProperties": false,
529
+ "description": "ExpirePaymentLinkInput selects one link whose status should become expired.",
530
+ "properties": {
531
+ "paymentLinkId": {
532
+ "description": "PaymentLinkID is the non-secret Adyen link ID.",
533
+ "type": "string"
534
+ }
535
+ },
536
+ "required": [
537
+ "paymentLinkId"
538
+ ],
539
+ "type": "object"
540
+ }
541
+ },
10
542
  {
11
543
  "name": "newGetPaymentLinkStep",
12
544
  "kind": "query",