@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/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { G as GetPaymentLinkInput, P as PaymentLinkStatus, C as Connection, O as Operations, a as Config, b as Credentials } from './connection-ozFLV9Xy.js';
2
- export { c as ConfigSchema, d as CredentialSource, e as GetPaymentLinkInputSchema, f as PaymentLinkStatusSchema, g as decodeCredentials, n as newConnection, h as newConnectionWithOperations } from './connection-ozFLV9Xy.js';
3
- import { QueryDefinition, QueryStepConfig, Query, QueryResult, QueryStep, CredentialProvider, Call, QueryAttempt } from '@superdurable/connectors-sdk';
1
+ import { P as PaymentReferenceModificationInput, a as PaymentModificationReceipt, C as Connection, b as PaymentModificationInput, c as CreatePaymentLinkInput, d as CreatedPaymentLink, E as ExpirePaymentLinkInput, e as PaymentLinkStatus, G as GetPaymentLinkInput, L as ListPaymentMethodsInput, f as PaymentMethodPage, g as LookupCardBrandsByBINInput, h as CardBrands, O as Operations, i as Config, j as Credentials } from './connection-DqqfBp8C.js';
2
+ export { A as AvailablePaymentMethod, k as AvailablePaymentMethodSchema, l as CardBrand, m as CardBrandSchema, n as CardBrandsSchema, o as ConfigSchema, p as CreatePaymentLinkInputSchema, q as CreatedPaymentLinkSchema, r as CredentialMaterialError, s as CredentialSource, t as ExpirePaymentLinkInputSchema, u as GetPaymentLinkInputSchema, v as ListPaymentMethodsInputSchema, w as LookupCardBrandsByBINInputSchema, x as PaymentLinkStatusSchema, y as PaymentMethodPageSchema, z as PaymentModificationInputSchema, B as PaymentModificationReceiptSchema, D as PaymentReferenceModificationInputSchema, S as SignedInteger, F as decodeCredentials, H as decodeSignedInteger, I as exactIntegerJSONCodec, J as isCredentialMaterialError, K as newConnection, M as newConnectionWithOperations, N as parseExactIntegerJSON, Q as parseJSONNumberTokens } from './connection-DqqfBp8C.js';
3
+ import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, Call, QueryAttempt, MutationAttempt, CredentialProvider } from '@superdurable/connectors-sdk';
4
4
  import { StepTarget } from '@superdurable/dex';
5
5
  import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
6
6
  import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
@@ -10,6 +10,201 @@ import 'zod';
10
10
  declare const ConnectorID = "adyen";
11
11
  /** Provider identity for named connections. */
12
12
  declare const ProviderID = "adyen";
13
+ /** Branch IDs for lookupCardBrandsByBIN. */
14
+ declare const LookupCardBrandsByBINBranch: {
15
+ readonly Found: "found";
16
+ readonly ProviderRejected: "providerRejected";
17
+ readonly InvalidResponse: "invalidResponse";
18
+ readonly Defect: "defect";
19
+ };
20
+ /** Adyen returned card brands for the issuer BIN. */
21
+ declare const LookupCardBrandsByBINBranchFound: "found";
22
+ /** Adyen conclusively rejected the lookup. */
23
+ declare const LookupCardBrandsByBINBranchProviderRejected: "providerRejected";
24
+ /** Adyen returned malformed or oversized JSON. */
25
+ declare const LookupCardBrandsByBINBranchInvalidResponse: "invalidResponse";
26
+ /** Local input or credentials are invalid. */
27
+ declare const LookupCardBrandsByBINBranchDefect: "defect";
28
+ /** Manifest definition for lookupCardBrandsByBIN. */
29
+ declare const LookupCardBrandsByBINDefinition: QueryDefinition;
30
+ /** Manifest metadata for lookupCardBrandsByBIN. */
31
+ declare const LookupCardBrandsByBINMetadata: {
32
+ readonly kind: "query";
33
+ readonly idempotency: "none";
34
+ readonly authorization: "required";
35
+ };
36
+ /** Branch IDs for capturePayment. */
37
+ declare const CapturePaymentBranch: {
38
+ readonly Received: "received";
39
+ readonly ProviderRejected: "providerRejected";
40
+ readonly Defect: "defect";
41
+ };
42
+ /** Adyen received the modification for asynchronous processing. */
43
+ declare const CapturePaymentBranchReceived: "received";
44
+ /** Adyen conclusively rejected the modification. */
45
+ declare const CapturePaymentBranchProviderRejected: "providerRejected";
46
+ /** Local input or credentials are invalid. */
47
+ declare const CapturePaymentBranchDefect: "defect";
48
+ /** Manifest definition for capturePayment. */
49
+ declare const CapturePaymentDefinition: MutationDefinition;
50
+ /** Manifest metadata for capturePayment. */
51
+ declare const CapturePaymentMetadata: {
52
+ readonly kind: "mutation";
53
+ readonly idempotency: "required";
54
+ readonly authorization: "required";
55
+ };
56
+ /** Branch IDs for cancelPayment. */
57
+ declare const CancelPaymentBranch: {
58
+ readonly Received: "received";
59
+ readonly ProviderRejected: "providerRejected";
60
+ readonly Defect: "defect";
61
+ };
62
+ /** Adyen received the modification for asynchronous processing. */
63
+ declare const CancelPaymentBranchReceived: "received";
64
+ /** Adyen conclusively rejected the modification. */
65
+ declare const CancelPaymentBranchProviderRejected: "providerRejected";
66
+ /** Local input or credentials are invalid. */
67
+ declare const CancelPaymentBranchDefect: "defect";
68
+ /** Manifest definition for cancelPayment. */
69
+ declare const CancelPaymentDefinition: MutationDefinition;
70
+ /** Manifest metadata for cancelPayment. */
71
+ declare const CancelPaymentMetadata: {
72
+ readonly kind: "mutation";
73
+ readonly idempotency: "required";
74
+ readonly authorization: "required";
75
+ };
76
+ /** Branch IDs for refundPayment. */
77
+ declare const RefundPaymentBranch: {
78
+ readonly Received: "received";
79
+ readonly ProviderRejected: "providerRejected";
80
+ readonly Defect: "defect";
81
+ };
82
+ /** Adyen received the modification for asynchronous processing. */
83
+ declare const RefundPaymentBranchReceived: "received";
84
+ /** Adyen conclusively rejected the modification. */
85
+ declare const RefundPaymentBranchProviderRejected: "providerRejected";
86
+ /** Local input or credentials are invalid. */
87
+ declare const RefundPaymentBranchDefect: "defect";
88
+ /** Manifest definition for refundPayment. */
89
+ declare const RefundPaymentDefinition: MutationDefinition;
90
+ /** Manifest metadata for refundPayment. */
91
+ declare const RefundPaymentMetadata: {
92
+ readonly kind: "mutation";
93
+ readonly idempotency: "required";
94
+ readonly authorization: "required";
95
+ };
96
+ /** Branch IDs for reversePayment. */
97
+ declare const ReversePaymentBranch: {
98
+ readonly Received: "received";
99
+ readonly ProviderRejected: "providerRejected";
100
+ readonly Defect: "defect";
101
+ };
102
+ /** Adyen received the modification for asynchronous processing. */
103
+ declare const ReversePaymentBranchReceived: "received";
104
+ /** Adyen conclusively rejected the modification. */
105
+ declare const ReversePaymentBranchProviderRejected: "providerRejected";
106
+ /** Local input or credentials are invalid. */
107
+ declare const ReversePaymentBranchDefect: "defect";
108
+ /** Manifest definition for reversePayment. */
109
+ declare const ReversePaymentDefinition: MutationDefinition;
110
+ /** Manifest metadata for reversePayment. */
111
+ declare const ReversePaymentMetadata: {
112
+ readonly kind: "mutation";
113
+ readonly idempotency: "required";
114
+ readonly authorization: "required";
115
+ };
116
+ /** Branch IDs for updateAuthorisedAmount. */
117
+ declare const UpdateAuthorisedAmountBranch: {
118
+ readonly Received: "received";
119
+ readonly ProviderRejected: "providerRejected";
120
+ readonly Defect: "defect";
121
+ };
122
+ /** Adyen received the modification for asynchronous processing. */
123
+ declare const UpdateAuthorisedAmountBranchReceived: "received";
124
+ /** Adyen conclusively rejected the modification. */
125
+ declare const UpdateAuthorisedAmountBranchProviderRejected: "providerRejected";
126
+ /** Local input or credentials are invalid. */
127
+ declare const UpdateAuthorisedAmountBranchDefect: "defect";
128
+ /** Manifest definition for updateAuthorisedAmount. */
129
+ declare const UpdateAuthorisedAmountDefinition: MutationDefinition;
130
+ /** Manifest metadata for updateAuthorisedAmount. */
131
+ declare const UpdateAuthorisedAmountMetadata: {
132
+ readonly kind: "mutation";
133
+ readonly idempotency: "required";
134
+ readonly authorization: "required";
135
+ };
136
+ /** Branch IDs for listPaymentMethods. */
137
+ declare const ListPaymentMethodsBranch: {
138
+ readonly Listed: "listed";
139
+ readonly ProviderRejected: "providerRejected";
140
+ readonly InvalidResponse: "invalidResponse";
141
+ readonly Defect: "defect";
142
+ };
143
+ /** Adyen returned available payment methods. */
144
+ declare const ListPaymentMethodsBranchListed: "listed";
145
+ /** Adyen conclusively rejected the request. */
146
+ declare const ListPaymentMethodsBranchProviderRejected: "providerRejected";
147
+ /** Adyen returned malformed or oversized JSON. */
148
+ declare const ListPaymentMethodsBranchInvalidResponse: "invalidResponse";
149
+ /** Local input or connection credentials are invalid. */
150
+ declare const ListPaymentMethodsBranchDefect: "defect";
151
+ /** Manifest definition for listPaymentMethods. */
152
+ declare const ListPaymentMethodsDefinition: QueryDefinition;
153
+ /** Manifest metadata for listPaymentMethods. */
154
+ declare const ListPaymentMethodsMetadata: {
155
+ readonly kind: "query";
156
+ readonly idempotency: "none";
157
+ readonly authorization: "required";
158
+ };
159
+ /** Branch IDs for createPaymentLink. */
160
+ declare const CreatePaymentLinkBranch: {
161
+ readonly Created: "created";
162
+ readonly ProviderRejected: "providerRejected";
163
+ readonly InvalidResponse: "invalidResponse";
164
+ readonly Defect: "defect";
165
+ };
166
+ /** Adyen created a payment link. */
167
+ declare const CreatePaymentLinkBranchCreated: "created";
168
+ /** Adyen conclusively rejected the payment link request. */
169
+ declare const CreatePaymentLinkBranchProviderRejected: "providerRejected";
170
+ /** Adyen returned malformed or oversized JSON. */
171
+ declare const CreatePaymentLinkBranchInvalidResponse: "invalidResponse";
172
+ /** Local input or connection credentials are invalid. */
173
+ declare const CreatePaymentLinkBranchDefect: "defect";
174
+ /** Manifest definition for createPaymentLink. */
175
+ declare const CreatePaymentLinkDefinition: MutationDefinition;
176
+ /** Manifest metadata for createPaymentLink. */
177
+ declare const CreatePaymentLinkMetadata: {
178
+ readonly kind: "mutation";
179
+ readonly idempotency: "required";
180
+ readonly authorization: "required";
181
+ };
182
+ /** Branch IDs for expirePaymentLink. */
183
+ declare const ExpirePaymentLinkBranch: {
184
+ readonly Expired: "expired";
185
+ readonly NotFound: "notFound";
186
+ readonly ProviderRejected: "providerRejected";
187
+ readonly InvalidResponse: "invalidResponse";
188
+ readonly Defect: "defect";
189
+ };
190
+ /** Adyen confirmed the link expired. */
191
+ declare const ExpirePaymentLinkBranchExpired: "expired";
192
+ /** Adyen did not expose the payment link. */
193
+ declare const ExpirePaymentLinkBranchNotFound: "notFound";
194
+ /** Adyen conclusively rejected expiry. */
195
+ declare const ExpirePaymentLinkBranchProviderRejected: "providerRejected";
196
+ /** Adyen returned malformed or oversized JSON. */
197
+ declare const ExpirePaymentLinkBranchInvalidResponse: "invalidResponse";
198
+ /** Local input or connection credentials are invalid. */
199
+ declare const ExpirePaymentLinkBranchDefect: "defect";
200
+ /** Manifest definition for expirePaymentLink. */
201
+ declare const ExpirePaymentLinkDefinition: MutationDefinition;
202
+ /** Manifest metadata for expirePaymentLink. */
203
+ declare const ExpirePaymentLinkMetadata: {
204
+ readonly kind: "mutation";
205
+ readonly idempotency: "required";
206
+ readonly authorization: "required";
207
+ };
13
208
  /** Branch IDs for getPaymentLink. */
14
209
  declare const GetPaymentLinkBranch: {
15
210
  readonly Found: "found";
@@ -37,6 +232,183 @@ declare const GetPaymentLinkMetadata: {
37
232
  readonly authorization: "required";
38
233
  };
39
234
 
235
+ /** Configuration for the lookupCardBrandsByBIN connector Step. */
236
+ interface LookupCardBrandsByBINStepConfig<StepInput, OperationInput = LookupCardBrandsByBINInput, OperationOutput = CardBrands> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
237
+ /** Named connection supplying this operation. */
238
+ connection: Connection<{
239
+ lookupCardBrandsByBIN(): Query<OperationInput, OperationOutput>;
240
+ }>;
241
+ /** Name matching the bound connection. */
242
+ connectionName: string;
243
+ /** Adyen returned card brands for the issuer BIN. */
244
+ found: StepTarget<QueryResult<OperationOutput>>;
245
+ /** Adyen conclusively rejected the lookup. */
246
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
247
+ /** Adyen returned malformed or oversized JSON. */
248
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
249
+ /** Local input or credentials are invalid. */
250
+ defect?: StepTarget<QueryResult<OperationOutput>>;
251
+ }
252
+ /** Build the lookupCardBrandsByBIN Step from a named connection. */
253
+ declare function newLookupCardBrandsByBINStep<StepInput, OperationInput = LookupCardBrandsByBINInput, OperationOutput = CardBrands>(configuration: LookupCardBrandsByBINStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
254
+ /** Configuration for the capturePayment connector Step. */
255
+ interface CapturePaymentStepConfig<StepInput, OperationInput = PaymentModificationInput, OperationOutput = PaymentModificationReceipt> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
256
+ /** Named connection supplying this operation. */
257
+ connection: Connection<{
258
+ capturePayment(): Mutation<OperationInput, OperationOutput>;
259
+ }>;
260
+ /** Name matching the bound connection. */
261
+ connectionName: string;
262
+ /** Adyen received the modification for asynchronous processing. */
263
+ received: StepTarget<MutationResult<OperationOutput>>;
264
+ /** Adyen conclusively rejected the modification. */
265
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
266
+ /** Local input or credentials are invalid. */
267
+ defect?: StepTarget<MutationResult<OperationOutput>>;
268
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
269
+ maxSends?: number;
270
+ }
271
+ /** Build the capturePayment Step from a named connection. */
272
+ declare function newCapturePaymentStep<StepInput, OperationInput = PaymentModificationInput, OperationOutput = PaymentModificationReceipt>(configuration: CapturePaymentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
273
+ /** Configuration for the cancelPayment connector Step. */
274
+ interface CancelPaymentStepConfig<StepInput, OperationInput = PaymentReferenceModificationInput, OperationOutput = PaymentModificationReceipt> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
275
+ /** Named connection supplying this operation. */
276
+ connection: Connection<{
277
+ cancelPayment(): Mutation<OperationInput, OperationOutput>;
278
+ }>;
279
+ /** Name matching the bound connection. */
280
+ connectionName: string;
281
+ /** Adyen received the modification for asynchronous processing. */
282
+ received: StepTarget<MutationResult<OperationOutput>>;
283
+ /** Adyen conclusively rejected the modification. */
284
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
285
+ /** Local input or credentials are invalid. */
286
+ defect?: StepTarget<MutationResult<OperationOutput>>;
287
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
288
+ maxSends?: number;
289
+ }
290
+ /** Build the cancelPayment Step from a named connection. */
291
+ declare function newCancelPaymentStep<StepInput, OperationInput = PaymentReferenceModificationInput, OperationOutput = PaymentModificationReceipt>(configuration: CancelPaymentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
292
+ /** Configuration for the refundPayment connector Step. */
293
+ interface RefundPaymentStepConfig<StepInput, OperationInput = PaymentModificationInput, OperationOutput = PaymentModificationReceipt> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
294
+ /** Named connection supplying this operation. */
295
+ connection: Connection<{
296
+ refundPayment(): Mutation<OperationInput, OperationOutput>;
297
+ }>;
298
+ /** Name matching the bound connection. */
299
+ connectionName: string;
300
+ /** Adyen received the modification for asynchronous processing. */
301
+ received: StepTarget<MutationResult<OperationOutput>>;
302
+ /** Adyen conclusively rejected the modification. */
303
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
304
+ /** Local input or credentials are invalid. */
305
+ defect?: StepTarget<MutationResult<OperationOutput>>;
306
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
307
+ maxSends?: number;
308
+ }
309
+ /** Build the refundPayment Step from a named connection. */
310
+ declare function newRefundPaymentStep<StepInput, OperationInput = PaymentModificationInput, OperationOutput = PaymentModificationReceipt>(configuration: RefundPaymentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
311
+ /** Configuration for the reversePayment connector Step. */
312
+ interface ReversePaymentStepConfig<StepInput, OperationInput = PaymentReferenceModificationInput, OperationOutput = PaymentModificationReceipt> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
313
+ /** Named connection supplying this operation. */
314
+ connection: Connection<{
315
+ reversePayment(): Mutation<OperationInput, OperationOutput>;
316
+ }>;
317
+ /** Name matching the bound connection. */
318
+ connectionName: string;
319
+ /** Adyen received the modification for asynchronous processing. */
320
+ received: StepTarget<MutationResult<OperationOutput>>;
321
+ /** Adyen conclusively rejected the modification. */
322
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
323
+ /** Local input or credentials are invalid. */
324
+ defect?: StepTarget<MutationResult<OperationOutput>>;
325
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
326
+ maxSends?: number;
327
+ }
328
+ /** Build the reversePayment Step from a named connection. */
329
+ declare function newReversePaymentStep<StepInput, OperationInput = PaymentReferenceModificationInput, OperationOutput = PaymentModificationReceipt>(configuration: ReversePaymentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
330
+ /** Configuration for the updateAuthorisedAmount connector Step. */
331
+ interface UpdateAuthorisedAmountStepConfig<StepInput, OperationInput = PaymentModificationInput, OperationOutput = PaymentModificationReceipt> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
332
+ /** Named connection supplying this operation. */
333
+ connection: Connection<{
334
+ updateAuthorisedAmount(): Mutation<OperationInput, OperationOutput>;
335
+ }>;
336
+ /** Name matching the bound connection. */
337
+ connectionName: string;
338
+ /** Adyen received the modification for asynchronous processing. */
339
+ received: StepTarget<MutationResult<OperationOutput>>;
340
+ /** Adyen conclusively rejected the modification. */
341
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
342
+ /** Local input or credentials are invalid. */
343
+ defect?: StepTarget<MutationResult<OperationOutput>>;
344
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
345
+ maxSends?: number;
346
+ }
347
+ /** Build the updateAuthorisedAmount Step from a named connection. */
348
+ declare function newUpdateAuthorisedAmountStep<StepInput, OperationInput = PaymentModificationInput, OperationOutput = PaymentModificationReceipt>(configuration: UpdateAuthorisedAmountStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
349
+ /** Configuration for the listPaymentMethods connector Step. */
350
+ interface ListPaymentMethodsStepConfig<StepInput, OperationInput = ListPaymentMethodsInput, OperationOutput = PaymentMethodPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
351
+ /** Named connection supplying this operation. */
352
+ connection: Connection<{
353
+ listPaymentMethods(): Query<OperationInput, OperationOutput>;
354
+ }>;
355
+ /** Name matching the bound connection. */
356
+ connectionName: string;
357
+ /** Adyen returned available payment methods. */
358
+ listed: StepTarget<QueryResult<OperationOutput>>;
359
+ /** Adyen conclusively rejected the request. */
360
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
361
+ /** Adyen returned malformed or oversized JSON. */
362
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
363
+ /** Local input or connection credentials are invalid. */
364
+ defect?: StepTarget<QueryResult<OperationOutput>>;
365
+ }
366
+ /** Build the listPaymentMethods Step from a named connection. */
367
+ declare function newListPaymentMethodsStep<StepInput, OperationInput = ListPaymentMethodsInput, OperationOutput = PaymentMethodPage>(configuration: ListPaymentMethodsStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
368
+ /** Configuration for the createPaymentLink connector Step. */
369
+ interface CreatePaymentLinkStepConfig<StepInput, OperationInput = CreatePaymentLinkInput, OperationOutput = CreatedPaymentLink> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
370
+ /** Named connection supplying this operation. */
371
+ connection: Connection<{
372
+ createPaymentLink(): Mutation<OperationInput, OperationOutput>;
373
+ }>;
374
+ /** Name matching the bound connection. */
375
+ connectionName: string;
376
+ /** Adyen created a payment link. */
377
+ created: StepTarget<MutationResult<OperationOutput>>;
378
+ /** Adyen conclusively rejected the payment link request. */
379
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
380
+ /** Adyen returned malformed or oversized JSON. */
381
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
382
+ /** Local input or connection credentials are invalid. */
383
+ defect?: StepTarget<MutationResult<OperationOutput>>;
384
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
385
+ maxSends?: number;
386
+ }
387
+ /** Build the createPaymentLink Step from a named connection. */
388
+ declare function newCreatePaymentLinkStep<StepInput, OperationInput = CreatePaymentLinkInput, OperationOutput = CreatedPaymentLink>(configuration: CreatePaymentLinkStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
389
+ /** Configuration for the expirePaymentLink connector Step. */
390
+ interface ExpirePaymentLinkStepConfig<StepInput, OperationInput = ExpirePaymentLinkInput, OperationOutput = PaymentLinkStatus> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
391
+ /** Named connection supplying this operation. */
392
+ connection: Connection<{
393
+ expirePaymentLink(): Mutation<OperationInput, OperationOutput>;
394
+ }>;
395
+ /** Name matching the bound connection. */
396
+ connectionName: string;
397
+ /** Adyen confirmed the link expired. */
398
+ expired: StepTarget<MutationResult<OperationOutput>>;
399
+ /** Adyen did not expose the payment link. */
400
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
401
+ /** Adyen conclusively rejected expiry. */
402
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
403
+ /** Adyen returned malformed or oversized JSON. */
404
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
405
+ /** Local input or connection credentials are invalid. */
406
+ defect?: StepTarget<MutationResult<OperationOutput>>;
407
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
408
+ maxSends?: number;
409
+ }
410
+ /** Build the expirePaymentLink Step from a named connection. */
411
+ declare function newExpirePaymentLinkStep<StepInput, OperationInput = ExpirePaymentLinkInput, OperationOutput = PaymentLinkStatus>(configuration: ExpirePaymentLinkStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
40
412
  /** Configuration for the getPaymentLink connector Step. */
41
413
  interface GetPaymentLinkStepConfig<StepInput, OperationInput = GetPaymentLinkInput, OperationOutput = PaymentLinkStatus> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
42
414
  /** Named connection supplying this operation. */
@@ -62,15 +434,121 @@ declare function newGetPaymentLinkStep<StepInput, OperationInput = GetPaymentLin
62
434
  /** Open one named Adyen connection from Dex project configuration. */
63
435
  declare function newProjectConnection(project: LoadedProject, connectionName: string): Connection<Operations>;
64
436
 
437
+ /** Look up the supported schemes for a six-digit issuer BIN. */
438
+ declare class LookupCardBrandsByBINOperation implements Query<LookupCardBrandsByBINInput, CardBrands> {
439
+ private readonly client;
440
+ /** Bind the authenticated client. */
441
+ constructor(client: AdyenClient);
442
+ /** Return the generated operation contract. */
443
+ definition(): QueryDefinition;
444
+ /** Look up the supported schemes for a six-digit issuer BIN. */
445
+ invoke(call: Call, input: LookupCardBrandsByBINInput): Promise<QueryAttempt<CardBrands>>;
446
+ }
447
+ /** Request capture of an authorized payment. */
448
+ declare class CapturePaymentOperation implements Mutation<PaymentModificationInput, PaymentModificationReceipt> {
449
+ private readonly client;
450
+ /** Bind the authenticated client. */
451
+ constructor(client: AdyenClient);
452
+ /** Return the generated operation contract. */
453
+ definition(): MutationDefinition;
454
+ /** Use the Dex call ID across attempts. */
455
+ idempotencyKey(callId: string): string;
456
+ /** Request capture of an authorized payment. */
457
+ invoke(call: Call, input: PaymentModificationInput): Promise<MutationAttempt<PaymentModificationReceipt>>;
458
+ }
459
+ /** Request cancellation of an authorized payment. */
460
+ declare class CancelPaymentOperation implements Mutation<PaymentReferenceModificationInput, PaymentModificationReceipt> {
461
+ private readonly client;
462
+ /** Bind the authenticated client. */
463
+ constructor(client: AdyenClient);
464
+ /** Return the generated operation contract. */
465
+ definition(): MutationDefinition;
466
+ /** Use the Dex call ID across attempts. */
467
+ idempotencyKey(callId: string): string;
468
+ /** Request cancellation of an authorized payment. */
469
+ invoke(call: Call, input: PaymentReferenceModificationInput): Promise<MutationAttempt<PaymentModificationReceipt>>;
470
+ }
471
+ /** Request a refund for a captured payment. */
472
+ declare class RefundPaymentOperation implements Mutation<PaymentModificationInput, PaymentModificationReceipt> {
473
+ private readonly client;
474
+ /** Bind the authenticated client. */
475
+ constructor(client: AdyenClient);
476
+ /** Return the generated operation contract. */
477
+ definition(): MutationDefinition;
478
+ /** Use the Dex call ID across attempts. */
479
+ idempotencyKey(callId: string): string;
480
+ /** Request a refund for a captured payment. */
481
+ invoke(call: Call, input: PaymentModificationInput): Promise<MutationAttempt<PaymentModificationReceipt>>;
482
+ }
483
+ /** Request reversal of a payment. */
484
+ declare class ReversePaymentOperation implements Mutation<PaymentReferenceModificationInput, PaymentModificationReceipt> {
485
+ private readonly client;
486
+ /** Bind the authenticated client. */
487
+ constructor(client: AdyenClient);
488
+ /** Return the generated operation contract. */
489
+ definition(): MutationDefinition;
490
+ /** Use the Dex call ID across attempts. */
491
+ idempotencyKey(callId: string): string;
492
+ /** Request reversal of a payment. */
493
+ invoke(call: Call, input: PaymentReferenceModificationInput): Promise<MutationAttempt<PaymentModificationReceipt>>;
494
+ }
495
+ /** Set the new amount of an authorized payment. */
496
+ declare class UpdateAuthorisedAmountOperation implements Mutation<PaymentModificationInput, PaymentModificationReceipt> {
497
+ private readonly client;
498
+ /** Bind the authenticated client. */
499
+ constructor(client: AdyenClient);
500
+ /** Return the generated operation contract. */
501
+ definition(): MutationDefinition;
502
+ /** Use the Dex call ID across attempts. */
503
+ idempotencyKey(callId: string): string;
504
+ /** Set the new amount of an authorized payment. */
505
+ invoke(call: Call, input: PaymentModificationInput): Promise<MutationAttempt<PaymentModificationReceipt>>;
506
+ }
507
+ /** List the methods available for a proposed payment. */
508
+ declare class ListPaymentMethodsOperation implements Query<ListPaymentMethodsInput, PaymentMethodPage> {
509
+ private readonly client;
510
+ /** Bind the authenticated client. */
511
+ constructor(client: AdyenClient);
512
+ /** Return the generated operation contract. */
513
+ definition(): QueryDefinition;
514
+ /** List the methods available for a proposed payment. */
515
+ invoke(call: Call, input: ListPaymentMethodsInput): Promise<QueryAttempt<PaymentMethodPage>>;
516
+ }
517
+ /** Create a hosted Adyen payment link. */
518
+ declare class CreatePaymentLinkOperation implements Mutation<CreatePaymentLinkInput, CreatedPaymentLink> {
519
+ private readonly client;
520
+ /** Bind the authenticated client. */
521
+ constructor(client: AdyenClient);
522
+ /** Return the generated operation contract. */
523
+ definition(): MutationDefinition;
524
+ /** Use the Dex call ID across attempts. */
525
+ idempotencyKey(callId: string): string;
526
+ /** Create a hosted Adyen payment link. */
527
+ invoke(call: Call, input: CreatePaymentLinkInput): Promise<MutationAttempt<CreatedPaymentLink>>;
528
+ }
529
+ /** Set an existing payment link to expired. */
530
+ declare class ExpirePaymentLinkOperation implements Mutation<ExpirePaymentLinkInput, PaymentLinkStatus> {
531
+ private readonly client;
532
+ /** Bind the authenticated client. */
533
+ constructor(client: AdyenClient);
534
+ /** Return the generated operation contract. */
535
+ definition(): MutationDefinition;
536
+ /** Use the Dex call ID across attempts. */
537
+ idempotencyKey(callId: string): string;
538
+ /** Set an existing payment link to expired. */
539
+ invoke(call: Call, input: ExpirePaymentLinkInput): Promise<MutationAttempt<PaymentLinkStatus>>;
540
+ }
541
+
65
542
  /** Injectable provider sender for tests and local applications. */
66
543
  interface AdyenClientOptions {
67
544
  /** Provider sender; omitted uses the SDK transport. */ send?: (request: ProviderRequest) => Promise<ProviderResponse>;
68
545
  }
546
+ /** One bounded provider response. */
69
547
  interface Exchange {
70
548
  status: number;
71
549
  body: Uint8Array;
72
550
  retryAfterMs: number;
73
- error?: 'credential' | 'request' | 'tooLarge';
551
+ error?: 'credential' | 'request' | 'tooLarge' | 'interrupted';
74
552
  }
75
553
  /** Authenticated Adyen REST API client for payment link metadata. */
76
554
  declare class AdyenClient {
@@ -82,8 +560,28 @@ declare class AdyenClient {
82
560
  /** Validate provider configuration without contacting Adyen. */
83
561
  constructor(config: Config, credentials: CredentialProvider<Credentials>, options?: AdyenClientOptions);
84
562
  /** Bind the getPaymentLink Query. */ getPaymentLink(): GetPaymentLinkOperation;
563
+ /** Look up the supported schemes for a six-digit issuer BIN. */
564
+ lookupCardBrandsByBIN(): LookupCardBrandsByBINOperation;
565
+ /** Request capture of an authorized payment. */
566
+ capturePayment(): CapturePaymentOperation;
567
+ /** Request cancellation of an authorized payment. */
568
+ cancelPayment(): CancelPaymentOperation;
569
+ /** Request a refund for a captured payment. */
570
+ refundPayment(): RefundPaymentOperation;
571
+ /** Request reversal of a payment. */
572
+ reversePayment(): ReversePaymentOperation;
573
+ /** Set the new amount of an authorized payment. */
574
+ updateAuthorisedAmount(): UpdateAuthorisedAmountOperation;
575
+ /** List the methods available for a proposed payment. */
576
+ listPaymentMethods(): ListPaymentMethodsOperation;
577
+ /** Create a hosted Adyen payment link. */
578
+ createPaymentLink(): CreatePaymentLinkOperation;
579
+ /** Set an existing payment link to expired. */
580
+ expirePaymentLink(): ExpirePaymentLinkOperation;
85
581
  /** Resolve the API key and send one bounded payment link lookup. */
86
582
  get(call: Call, paymentLinkID: string): Promise<Exchange>;
583
+ /** Make a bounded request using the current Adyen credentials. */
584
+ exchange(call: Call, method: string, path: string, payload?: object, usesIdempotencyKey?: boolean): Promise<Exchange>;
87
585
  }
88
586
  /** Read one payment link's ID, name, and status. */
89
587
  declare class GetPaymentLinkOperation implements Query<GetPaymentLinkInput, PaymentLinkStatus> {
@@ -94,4 +592,4 @@ declare class GetPaymentLinkOperation implements Query<GetPaymentLinkInput, Paym
94
592
  invoke(call: Call, input: GetPaymentLinkInput): Promise<QueryAttempt<PaymentLinkStatus>>;
95
593
  }
96
594
 
97
- export { AdyenClient, type AdyenClientOptions, Config, Connection, ConnectorID, Credentials, GetPaymentLinkBranch, GetPaymentLinkBranchDefect, GetPaymentLinkBranchFound, GetPaymentLinkBranchInvalidResponse, GetPaymentLinkBranchNotFound, GetPaymentLinkBranchProviderRejected, GetPaymentLinkDefinition, GetPaymentLinkInput, GetPaymentLinkMetadata, GetPaymentLinkOperation, type GetPaymentLinkStepConfig, PaymentLinkStatus, ProviderID, newGetPaymentLinkStep, newProjectConnection };
595
+ export { AdyenClient, type AdyenClientOptions, CancelPaymentBranch, CancelPaymentBranchDefect, CancelPaymentBranchProviderRejected, CancelPaymentBranchReceived, CancelPaymentDefinition, CancelPaymentMetadata, CancelPaymentOperation, type CancelPaymentStepConfig, CapturePaymentBranch, CapturePaymentBranchDefect, CapturePaymentBranchProviderRejected, CapturePaymentBranchReceived, CapturePaymentDefinition, CapturePaymentMetadata, CapturePaymentOperation, type CapturePaymentStepConfig, CardBrands, Config, Connection, ConnectorID, CreatePaymentLinkBranch, CreatePaymentLinkBranchCreated, CreatePaymentLinkBranchDefect, CreatePaymentLinkBranchInvalidResponse, CreatePaymentLinkBranchProviderRejected, CreatePaymentLinkDefinition, CreatePaymentLinkInput, CreatePaymentLinkMetadata, CreatePaymentLinkOperation, type CreatePaymentLinkStepConfig, CreatedPaymentLink, Credentials, ExpirePaymentLinkBranch, ExpirePaymentLinkBranchDefect, ExpirePaymentLinkBranchExpired, ExpirePaymentLinkBranchInvalidResponse, ExpirePaymentLinkBranchNotFound, ExpirePaymentLinkBranchProviderRejected, ExpirePaymentLinkDefinition, ExpirePaymentLinkInput, ExpirePaymentLinkMetadata, ExpirePaymentLinkOperation, type ExpirePaymentLinkStepConfig, GetPaymentLinkBranch, GetPaymentLinkBranchDefect, GetPaymentLinkBranchFound, GetPaymentLinkBranchInvalidResponse, GetPaymentLinkBranchNotFound, GetPaymentLinkBranchProviderRejected, GetPaymentLinkDefinition, GetPaymentLinkInput, GetPaymentLinkMetadata, GetPaymentLinkOperation, type GetPaymentLinkStepConfig, ListPaymentMethodsBranch, ListPaymentMethodsBranchDefect, ListPaymentMethodsBranchInvalidResponse, ListPaymentMethodsBranchListed, ListPaymentMethodsBranchProviderRejected, ListPaymentMethodsDefinition, ListPaymentMethodsInput, ListPaymentMethodsMetadata, ListPaymentMethodsOperation, type ListPaymentMethodsStepConfig, LookupCardBrandsByBINBranch, LookupCardBrandsByBINBranchDefect, LookupCardBrandsByBINBranchFound, LookupCardBrandsByBINBranchInvalidResponse, LookupCardBrandsByBINBranchProviderRejected, LookupCardBrandsByBINDefinition, LookupCardBrandsByBINInput, LookupCardBrandsByBINMetadata, LookupCardBrandsByBINOperation, type LookupCardBrandsByBINStepConfig, PaymentLinkStatus, PaymentMethodPage, PaymentModificationInput, PaymentModificationReceipt, PaymentReferenceModificationInput, ProviderID, RefundPaymentBranch, RefundPaymentBranchDefect, RefundPaymentBranchProviderRejected, RefundPaymentBranchReceived, RefundPaymentDefinition, RefundPaymentMetadata, RefundPaymentOperation, type RefundPaymentStepConfig, ReversePaymentBranch, ReversePaymentBranchDefect, ReversePaymentBranchProviderRejected, ReversePaymentBranchReceived, ReversePaymentDefinition, ReversePaymentMetadata, ReversePaymentOperation, type ReversePaymentStepConfig, UpdateAuthorisedAmountBranch, UpdateAuthorisedAmountBranchDefect, UpdateAuthorisedAmountBranchProviderRejected, UpdateAuthorisedAmountBranchReceived, UpdateAuthorisedAmountDefinition, UpdateAuthorisedAmountMetadata, UpdateAuthorisedAmountOperation, type UpdateAuthorisedAmountStepConfig, newCancelPaymentStep, newCapturePaymentStep, newCreatePaymentLinkStep, newExpirePaymentLinkStep, newGetPaymentLinkStep, newListPaymentMethodsStep, newLookupCardBrandsByBINStep, newProjectConnection, newRefundPaymentStep, newReversePaymentStep, newUpdateAuthorisedAmountStep };